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 |
---|---|---|---|---|---|---|
PO: Moves this actor to a new location. If there is another actor at the given location, it is removed. Precondition: (1) This actor is contained in a grid (2) newLocation is valid in the grid of this actor | public void moveTo(Actor actor, Location newLocation)
{
//creating the variables to make the code easier to read
Grid<Actor> grid = actor.getGrid();
Location location = actor.getLocation();
if (grid == null)
throw new IllegalStateException("This actor is not in a grid.");
if (grid.get(location) != actor)
throw new IllegalStateException(
"The grid contains a different actor at location "
+ location + ".");
if (!grid.isValid(newLocation))
throw new IllegalArgumentException("Location " + newLocation
+ " is not valid.");
if (newLocation.equals(location))
return;
//this line below was added
actor.removeSelfFromGrid();
//changed the code slightly to make sure now that not being called from within the actor that we refer to the
//actor itself when removing and placing actor on grid
//grid.remove(location);
Actor other = grid.get(newLocation);
if (other != null)
other.removeSelfFromGrid();
location = newLocation;
actor.putSelfInGrid(grid, location);
//grid.put(location, actor);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic boolean move(Tile newLocation){\r\n\t\tif(!newLocation.checkOccupied() && newLocation.attribute != Tile.typeAttributes.get(TileType.WALL_TILE)){\r\n\t\t\tcurrentPosition.pullUnit();\r\n\t\t\tthis.currentPosition = newLocation;\r\n\t\t\tthis.currentPosition.pushUnit(this);\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\tthis.act();\r\n\t\t}\r\n\t\treturn false;\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}",
"public void moveTo(Actor newActor, int location) throws IllegaleToestandsUitzondering, IllegalArgumentException {\r\n\t\tHolder oldActor = getHolder();\r\n\t\tif(newActor == null)\r\n\t\t\tthrow new IllegalArgumentException();\r\n\t\tif(!newActor.canHoldItem(this,location) || !isValidHolder(newActor)) { \r\n\t\t\tthrow new IllegaleToestandsUitzondering(\"the given holder isn't valid for this item\");\r\n\t\t}\r\n\t\ttry {\r\n\t\t\tsetHolder(newActor);\r\n\t\t\toldActor.removeItem(this);\r\n\t\t\tnewActor.addItem(this, location); \r\n\t\t} catch (IllegaleToestandsUitzondering e) {\r\n\t\t\treset(oldActor);\r\n\t\t\tthrow e;\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\treset(oldActor);\r\n\t\t\tthrow e;\r\n\t\t} \r\n\t}",
"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 boolean moveActor(Actor actor, Coordinate newPosition) {\n\t\tCoordinate pos = actor.getPosition();\n\t\tTile tile = getTileAt(pos.x, pos.y);\n\t\tif (tile.getActor() != null) {\n\t\t\tif (tile.moveActorTo(getTileAt(newPosition))) {\n\t\t\t\tactor.setPosition(newPosition.x, newPosition.y);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }",
"public abstract void removeLocation(Location location);",
"protected void changeLocation(Location newLoc)\n {\n // Change location and notify the environment.\n Location oldLoc = location();\n myLoc = newLoc;\n environment().recordMove(this, oldLoc);\n\n // object is again at location myLoc in environment\n }",
"void makeMove(Location loc);",
"public boolean move(Location location) {\n return move(location, false);\n }",
"@Override\r\n public void moveSoldier(int previousLocationX, int previousLocationY, int newLocationX, int newLocationY) {\r\n\r\n // delete soldier representation from previous location \r\n // then render soldier representation in new location \r\n }",
"public void movePlayerPiece(Tile newTile) {\n // Check if the target tile is a position that can be moved to.\n PlayerPiece pp = currentPlayersTurn.getPiece();\n int tileRow = pp.getLocation().getRow();\n int tileCol = pp.getLocation().getColumn();\n List<Pair<Integer, Integer>> neighbours = new ArrayList<>();\n\n // Generate immediately adjacent tiles.\n for (int row = tileRow - 1; row <= tileRow + 1; row++) {\n if (row == tileRow || row > board.getGrid().getRows() ||\n row < 0) {\n continue;\n }\n neighbours.add(new Pair<>(row, tileCol));\n }\n for (int col = tileCol - 1; col <= tileCol + 1; col++) {\n if (col == tileCol || col > board.getGrid().getColumns() ||\n col < 0) {\n continue;\n }\n neighbours.add(new Pair<>(tileRow, col));\n }\n\n boolean canMove = neighbours.contains(new Pair<>(newTile.getRow(),\n newTile.getColumn())) && (currentPlayersSteps > 0)\n && state == GameState.InPlay && !newTile.isOccupied();\n\n if (canMove) {\n currentPlayersTurn.getPiece().getLocation().removeOccupier();\n currentPlayersTurn.getPiece().setLocation(newTile);\n currentPlayersSteps--;\n }\n\n if (currentPlayersSteps <= 0) {\n endTurn();\n }\n }",
"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\tif (gr.isValid(next)) {\n\t\t\tsetDirection(getLocation().getDirectionToward(next));\n\t\t\tmoveTo(next);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t\tFlower flower = new Flower(getColor());\n\t\tflower.putSelfInGrid(gr, loc);\n\t}",
"public void moveRobber(HexLocation loc) {\n\n\t}",
"public void move(Actor actor)\n\t\t {\n\t\t\t \t//PO: updated the methods after the move from the Bug Class to be called from\n\t\t \t//PO: the passed actor\n\t\t Grid<Actor> gr = actor.getGrid();\n\t\t if (gr == null)\n\t\t return;\n\t\t Location loc = actor.getLocation();\n\t\t Location next = loc.getAdjacentLocation(actor.getDirection());\n\t\t if (gr.isValid(next))\n\t\t \t//PO: alter the original code instead of calling the \n\t\t \t//PO: moveTo method in Actor call the method that is from this current behaviour\n\t\t this.moveTo(actor, next);\n\t\t else\n\t\t actor.removeSelfFromGrid();\n\t\t Flower flower = new Flower(actor.getColor());\n\t\t flower.putSelfInGrid(gr, loc);\n\t\t \n\t\t }",
"public void setLocation(Location newLocation) {\n if (newLocation instanceof Tile) {\n tile = ((Tile) newLocation);\n } else {\n throw new IllegalArgumentException(\"newLocation is not a Tile\");\n }\n }",
"public void makeMove(Location loc)\n {\n \tLocation curLoc = getLocation();\n \tint curDirection = getDirection();\n // get 2 left locations\n\t\tLocation leftNeighborLoc = curLoc.getAdjacentLocation(curDirection + Location.LEFT);\n Location leftNextNeighborLoc = leftNeighborLoc.getAdjacentLocation(curDirection + Location.LEFT);\n // get 2 right locations\n Location rightNeighborLoc = curLoc.getAdjacentLocation(curDirection + Location.RIGHT);\n Location rightNextNeighborLoc = rightNeighborLoc.getAdjacentLocation(curDirection + Location.RIGHT);\n // initial a null\n Actor leftNeighborActor = null;\n Actor leftNextNeighborActor = null;\n Actor rightNeighborActor = null;\n Actor rightNextNeighborActor = null;\n\n boolean isLeftValid = false;\n boolean isRightValid = false;\n\n Grid<Actor> grid = getGrid();\n // if left valid\n if (grid.isValid(leftNeighborLoc) && grid.isValid(leftNextNeighborLoc))\n {\n \tleftNeighborActor = grid.get(leftNeighborLoc);\n \tleftNextNeighborActor = grid.get(leftNextNeighborLoc);\n \t\n \tif (leftNeighborActor == null && leftNextNeighborActor == null) {\n \t\tisLeftValid = true;\n }\n }\n // if right valid\n if (grid.isValid(rightNeighborLoc) && grid.isValid(rightNextNeighborLoc))\n {\n \trightNeighborActor = grid.get(rightNeighborLoc);\n \trightNextNeighborActor = grid.get(rightNextNeighborLoc);\n\n \tif (rightNeighborActor == null && leftNextNeighborActor == null) {\n \t\tisRightValid = true;\n }\n }\n // if both valid\n if (isLeftValid && isRightValid)\n {\n\t // move ramdonly\n if (Math.random() < 0.5)\n\t {\n\t \tmoveTo(leftNextNeighborLoc);\n\t \n\t }\n\t else{\n\t \tmoveTo(rightNextNeighborLoc);\n\t }\n }\n // right valid only\n else if (isRightValid && !isLeftValid)\n {\n \tmoveTo(rightNextNeighborLoc);\n }\n // left valid only\n else if (!isRightValid && isLeftValid)\n {\n \tmoveTo(leftNextNeighborLoc);\n }\n else\n {\n \tsuper.makeMove(loc);\n }\n \n }",
"protected void move(int newX, int newY) {\n if (grid.inBounds(newX, newY)) {\n grid.exit(this, newX, newY);\n }\n if (grid.valid(newX, newY) && System.currentTimeMillis() - lastMovement > 100) {\n grid.addTokenAt(null, positionX, positionY);\n grid.addTokenAt(this, newX, newY);\n positionX = newX;\n positionY = newY;\n lastMovement = System.currentTimeMillis();\n grid.repaint();\n }\n }",
"public void moveTo(Hero newHero, LocationEquipment location) throws IllegaleToestandsUitzondering, IllegalArgumentException {\r\n\t\tif(location == null)\r\n\t\t\tthrow new IllegalArgumentException(\"ineffectif location\");\r\n\t\tmoveTo(newHero,location.getFollowNumber());\r\n\t}",
"private void setLocation(Location newLocation) {\n\t\tif (location != null) {\n\t\t\tfield.clear(location);\n\t\t}\n\t\tlocation = newLocation;\n\t\tfield.place(this, newLocation);\n\t}",
"public void move() {\n\t\t// Override move so we don't move, then get location set by owner.\n\t}",
"protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }",
"public void move() {\n Grid<Actor> gr = getGrid();\n if (gr == null) {\n return;\n }\n Location loc = getLocation();\n if (gr.isValid(next)) {\n setDirection(getLocation().getDirectionToward(next));\n moveTo(next);\n } else {\n removeSelfFromGrid();\n }\n Flower flower = new Flower(getColor());\n flower.putSelfInGrid(gr, loc);\n }",
"public void move(Cell[][] board) {\n Cell[] nextCells = generateNeighbors(this.x, this.y);\n Cell nextCell = nextCells[rand.nextInt(4)];\n if (!this.objectFound) {\n if (nextCell != null && nextCell.isOccupied() && nextCell.occupiedBy instanceof Integer) {\n this.objectFound = true;\n this.goal = nextCell;\n } else if (nextCell != null && !nextCell.isOccupied()) {\n synchronized (board[this.x][this.y]) {\n board[this.x][this.y].resetCell();\n nextCell.occupiedBy = this;\n }\n }\n } else {\n // bfs to location\n System.out.println(\"BFS to goal\");\n }\n }",
"public void movePlayer(String playerName, Location newLocation )\n\t{\n\t\tplayerLocations.put(playerName, newLocation);\n\t}",
"public Integer moveCar(Integer old_location, Random rand)\n {\n checkSennott(old_location);\n\n // Find a random new location based off of the old location of the car\n Integer location_boolean = rand.nextBoolean() ? 0 : 1;\n Integer new_location = null;\n\n // Based on old location, move the car to a new location. This new location is determined by\n // the random number previously generated.\n if(old_location == 1)\n {\n if(location_boolean == 0)\n {\n new_location = 2;\n }\n else if(location_boolean == 1)\n {\n new_location = 3;\n }\n }\n else if(old_location == 2)\n {\n if(location_boolean == 0)\n {\n new_location = 4;\n }\n else if(location_boolean == 1)\n {\n new_location = 5;\n }\n }\n else if(old_location == 3)\n {\n if(location_boolean == 0)\n {\n new_location = 1;\n }\n else if(location_boolean == 1)\n {\n new_location = 5;\n }\n }\n else if(old_location == 4)\n {\n if(location_boolean == 0)\n {\n new_location = 2;\n }\n else if(location_boolean == 1)\n {\n new_location = 3;\n }\n }\n\n // Set current location to new location\n setLocation(new_location);\n\n // Add current location to visited locations\n getLocations().add(new_location);\n\n return new_location;\n }",
"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\r\n public void move() {\r\n Grid<Actor> gr = getGrid();\r\n if (gr == null) {\r\n return;\r\n }\r\n Location loc = getLocation();\r\n if (gr.isValid(next)) {\r\n setDirection(getLocation().getDirectionToward(next));\r\n moveTo(next);\r\n } else {\r\n removeSelfFromGrid();\r\n }\r\n Flower flower = new Flower(getColor());\r\n flower.putSelfInGrid(gr, loc);\r\n }",
"private void resetLocation(Point newLocation) {\n\t\tif (newLocation.x < 0) {\n\t\t\tnewLocation.x = 0;\n\t\t}\n\n\t\tif (newLocation.y < 0) {\n\t\t\tnewLocation.y = 0;\n\t\t}\n\t}",
"public void act(){\n // Removing object, if out of the simulated zone\n if (atWorldEdge()){\n getWorld().removeObject(this);\n return;\n }\n\n //Move Thanos up\n setLocation (getX(), getY() - speed);\n }",
"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 }",
"public void movePiece(Coordinate from, Coordinate to);",
"public void move(Location moveTo){\n if(canMove(moveTo)){\n removeFromGrid();\n setDirection(Location.NORTH);\n getLocation().setX(moveTo.getX());\n getLocation().setY(moveTo.getY());\n theWorld.add(this, getLocation().getX(), getLocation().getY());\n putInGrid(theWorld,getLocation().getX(),getLocation().getY());\n }\n }",
"public Evolver remove(Location loc)\n {\n Evolver occupant = getGrid().get(loc);\n if (occupant == null)\n return null;\n occupant.removeSelfFromGrid();\n return occupant;\n }",
"public boolean moveToNextLocation() {\n if (currentLocation.getPreOrders().isEmpty() && currentLocation.getReservations().isEmpty()) {\n this.currentLocation = route.get(0);\n route.remove(0);\n return true;\n }\n return false;\n }",
"public void removeFromLocation() {\n if (getAssignedLocation() != location) {\n this.location.fireEmployee(this);\n this.location = null;\n //bidirectional relationship!\n }\n System.out.println(\"We are firing an employee! \" + getName());\n }",
"public void move(Pawn pawn, Point destination) {\n\t\tPoint lastLocation = pawn.getLocation();\r\n\t\tboard[lastLocation.x][lastLocation.y].setEmpty();\r\n\t\tboard[destination.x][destination.y].setTaken();\r\n\t\tpawn.setLocation(destination);\r\n\t\tpawn.setLastLocation(lastLocation);\r\n\t\t\r\n\t\tif(isNeighbor(lastLocation, destination)) {\r\n\t\t\tpawn.setAfterStep();\r\n\t\t}\r\n\t\t\r\n\t\tif(board[destination.x][destination.y].getFieldType().equals(pawn.getTarget())) {\r\n\t\t\tpawn.setInTarget();\r\n\t\t}\r\n\t}",
"private boolean moveTo(AntArea.Cell dest) throws AntArtException {\n if (dest.isAntPresent()) {\n return false;\n }\n\n getCurrentCell().leave(this);\n dest.move(this);\n\n //Update the ant location\n Pair<Integer, Integer> newLoc = dest.getLocation();\n location = new Pair<>(newLoc.getKey(), newLoc.getValue());\n\n return true;\n }",
"@Override\n\tpublic void tick(Location currentLocation) {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.tick(currentLocation);\n\t\tturnsToZombify--;\n\t\tif(turnsToZombify<=0&&!currentLocation.containsAnActor()) {\n\t\t\tcurrentLocation.removeItem(this);\n\t\t\tcurrentLocation.addActor(new Zombie(\"undead\"+name));\n\t\t\t\n\t\t}\n\t}",
"public void moveNpc(NPC npc, Room newRoom) {\n\n if (this.getNPCsInRoomMap().containsKey(npc.getName())) {\n this.NPCsInRoom.remove(npc.getName());\n newRoom.NPCsInRoom.put(npc.getName(), npc);\n npc.setCurrentRoomName(newRoom.getRoomName());\n }\n }",
"public abstract void move(int newXPosition, int newYPosition, PiecePosition position) throws BoardException;",
"public void move(GeoCoordFine geoCoord) throws ARDInstanceException;",
"protected void setLocation(Location newLocation)\n {\n if(location != null) {\n field.clear(location);\n }\n location = newLocation;\n field.place(this, newLocation);\n }",
"public void movePiece(Location a, Location b)\n {\n Square s1 = getSquare(a);\n Square s2 = getSquare(b);\n Piece p = s1.getPiece();\n if (p==null)\n return;\n int moveType = canMoveTo(p,b);\n boolean taking = getPiece(b)!=null;\n boolean fiftyMoveBreak = getPiece(b)!=null||p.getType()==Type.PAWN;\n s2.setPiece(s1.removePiece());\n p.setHasMoved(true);\n if (p.getType()==Type.PAWN)\n {\n if (mainBoard&&((p.white()&&getLocation(p).getRow()==0)\n || !p.white()&&getLocation(p).getRow()==7))\n promotePawn(p);\n else if (moveType==EN_PASSANT)\n {\n int row = a.getRow();\n int col = b.getCol();\n removePiece(new Location(row,col));\n taking = true;\n }\n }\n else if (moveType==KINGSIDE_CASTLING||moveType==QUEENSIDE_CASTLING)\n {\n Location rookLoc;\n Location rookDest;\n if (moveType==KINGSIDE_CASTLING)\n {\n rookLoc = b.farther(Direction.EAST);\n rookDest = b.farther(Direction.WEST);\n }\n else\n {\n rookLoc = new Location(b.getRow(),b.getCol()-2);\n rookDest = b.farther(Direction.EAST);\n }\n //movePiece(getLocation(rook),rookDest);\n getSquare(rookDest).setPiece(removePiece(rookLoc)); //moves the rook\n }\n if (mainBoard)\n {\n turn++;\n if (fiftyMoveBreak)\n fiftyMove= 0;\n else fiftyMove++;\n }\n for (Piece piece: getPieces())\n piece.setHasJustMoved(false);\n p.setHasJustMoved(true);\n if (mainBoard)\n {\n positions.add(toString());\n \n //this is all for the notation on the side\n notateMove(p,b,moveType,taking);\n /*JTable not = frame.getNotation();\n DefaultTableModel d = (DefaultTableModel)not.getModel();\n String notation;\n PieceColor color = p.getColor();\n if (color==PieceColor.WHITE)\n notation = turn/2+1+\". \"; //the turn number first, on the left\n else notation = \"\";\n if (moveType==QUEENSIDE_CASTLING)\n notation += \"0-0-0\";\n else if (moveType==KINGSIDE_CASTLING)\n notation += \"0-0\";\n else //normal move\n {\n if (p.getType()!=Type.PAWN)\n notation+=p.getType().toNotation(); //the type of piece (K,N,R,etc)\n if (taking)\n notation+=\"x\"; //this is if the move involves taking\n notation+=Location.LocToNot(b);\n }\n if (checkmate(colorGoing())) //notates # for checkmate\n notation+=\"#\";\n else if (inCheck(colorGoing())) //notates + for check\n notation+=\"+\";\n \n if (color==PieceColor.WHITE)\n d.addRow(new Object[]{notation,\"\"});\n else \n d.setValueAt(notation, (turn-1)/2, 1);*/\n }\n }",
"private void removeMoveIfExist(ActorRef actorRef) {\n for (int distance = 1; distance <= pointsMap.getLength(); distance++) {\n for (int lane = 1; lane <= pointsMap.getLanesNumber(); lane++) {\n if (!pointsMap.isMarked(distance, lane)) {\n pointsMap.putWithCondition(distance, lane, null, oldAct -> oldAct == actorRef);\n }\n }\n }\n }",
"public boolean moveCard(AbstractCard card, CardCollection moveLocation);",
"public void movePawn(int row, int col, int newRow, int newCol, boolean isWhite) {\n removePawn(row, col);\n int rowDiff = newRow - row;\n int colDiff = newCol - col;\n if(FIELDS[newRow-1][newCol-1] == null) {\n //if there is no Pawn on the place where we want to move the pawn moves\n if (isWhite) {\n FIELDS[newRow - 1][newCol - 1] = new Pawn(true, false, newRow, newCol);\n } else {\n FIELDS[newRow - 1][newCol - 1] = new Pawn(false, false, newRow, newCol);\n }}\n else if((FIELDS[newRow-1][newCol-1]).IS_WHITE!= isWhite){\n //if there is opponent Pawn on the place where we want to move the pawn beat it (delete) and move one position more\n\n removePawn(newRow, newCol);\n if (isWhite) {\n FIELDS[newRow - 1 + rowDiff][newCol - 1 + colDiff] = new Pawn(true, false, newRow, newCol);\n } else {\n FIELDS[newRow - 1 + rowDiff][newCol - 1 + colDiff] = new Pawn(false, false, newRow, newCol);\n }\n\n }\n\n }",
"@Override\n\tpublic void updatePosition()\n\t{\n\t\tif(!fired && !pathfinding)\n\t\t{\n\t\t\tif(x == destX && y == destY)\n\t\t\t{\n\t\t\t\tfired = true;\n\t\t\t\tvehicle.msgAnimationDestinationReached();\n\t\t\t\tcurrentDirection = MovementDirection.None;\n\t\t\t\t\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\tif(cIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t{\n\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t{\n\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t{\n\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(allowedToMove || drunk)\n\t\t\t{\n\t\t\t\tswitch(currentDirection)\n\t\t\t\t{\n\t\t\t\t\tcase Right:\n\t\t\t\t\t\tx++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:\n\t\t\t\t\t\ty--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Down:\n\t\t\t\t\t\ty++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:\n\t\t\t\t\t\tx--;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(x % CityPanel.GRID_SIZE == 0 && y % CityPanel.GRID_SIZE == 0 && !moves.isEmpty())\n\t\t\t{\t\n\t\t\t\tif(allowedToMove || drunk)\n\t\t\t\t{\n\t\t\t\t\tcurrentDirection = moves.pop();\n\t\t\t\t\n\t\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\t\n\t\t\t\t\tif(current != next)\n\t\t\t\t\t{\n\t\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(nextIntersection == null)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tif(Pathfinder.isCrossWalk(current,city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(current.y).get(current.x);\n\t\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\twhile(guiList.contains(this))\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tguiList.remove(this);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tcurrent = next;\n\t\t\t\t\t\n\t\t\t\t\tswitch(currentDirection)\n\t\t\t\t\t{\n\t\t\t\t\tcase Down:next = new Point(current.x,current.y + 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Left:next = new Point(current.x - 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Right:next = new Point(current.x + 1,current.y);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase Up:next = new Point(current.x,current.y - 1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:next = current;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\n\t\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\t\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(city.permissions[next.y][next.x].tryAcquire())\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tif(cIntersection == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t//**************************ADDED**************************//\n\t\t\t\t\t\tList<Gui> guiList = city.crosswalkPermissions.get(next.y).get(next.x);\n\t\t\t\t\t\tsynchronized(guiList)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(Pathfinder.isCrossWalk(next, city.getWalkingMap(), city.getDrivingMap()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tfor(Gui g : guiList)\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tif(g instanceof PassengerGui)\n\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\t\treturn;\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\tif(nextIntersection.acquireIntersection())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnextIntersection.acquireAll();\n\t\t\t\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tallowedToMove = false;\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tguiList.add(this);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//**************************END ADDED**************************//\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tallowedToMove = true;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(!allowedToMove && drunk)\n\t\t{\n\t\t\tcity.addGui(new ExplosionGui(x,y));\n\t\t\tSystem.out.println(\"DESTROYING\");\n\t\t\tcity.removeGui(this);\n\t\t\tvehicle.stopThread();\n\t\t\tsetPresent(false);\n\t\t\t\n\t\t\tIntersection nextIntersection = city.getIntersection(next);\n\t\t\tIntersection cIntersection = city.getIntersection(current);\n\t\t\t\n\t\t\tif(cIntersection == null)\n\t\t\t{\n\t\t\t\tif(city.permissions[current.y][current.x].tryAcquire() || true)\n\t\t\t\t{\n\t\t\t\t\tcity.permissions[current.y][current.x].release();\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tif(nextIntersection == null)\n\t\t\t\t{\n\t\t\t\t\tif(!cIntersection.acquireIntersection())\n\t\t\t\t\t{\n\t\t\t\t\t\tcIntersection.releaseAll();\n\t\t\t\t\t}\n\t\t\t\t\tcIntersection.releaseIntersection();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\r\n\tpublic void spawn(Location location) {\n\t\t\r\n\t}",
"public abstract void removeMove(Move move, int indexOfMove, String label);",
"private void processMoving(Figure currentFigure, int desiredRow, int desiredCol, int currentRow, int currentCol) {\n if (currentFigure.isValidMove(currentRow, currentCol, desiredRow, desiredCol)) {\n\n if (desiredField.isObstacle()) {\n\n showMessageOnScreen(\"Obstacle in your desired destination,destroy it!\");\n\n\n } else if (!desiredField.isFieldFree()) {\n showMessageOnScreen(\"Opponent unit in your desired destination,kill it!\");\n\n } else {\n this.stats.increaseNumberOfRounds();\n desiredField.setCurrentFigure(currentFigure);\n currentField.setCurrentFigure(null);\n currentPlayer = currentPlayer.equals(playerOne) ? playerTwo : playerOne;\n\n }\n\n } else {\n\n showMessageOnScreen(\"Invalid move!\");\n\n }\n clearChosenFields();\n }",
"public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }",
"private Piece removePiece(Location loc)\n {\n Square s = getSquare(loc);\n return s.removePiece();\n }",
"public void updateTile(Larva lar, Pt newPos) {\n\t\tGridTile newTile = getTile(newPos);\t\n\t\t\n\t\t// If the entity changed tiles:\n\t\tif(lar.tile() != newTile) {\n\t\t\t\n\t\t\t// Remove the entity from its current tile\n\t\t\tlar.tile().remove(lar);\n\t\t\t\n\t\t\t// Add the entity to its new tile\n\t\t\t// This method also reset's the larva's tile reference\n\t\t\tnewTile.add(lar);\t\n\t\t}\n\t}",
"private static void spawn(Actor actor, ActorWorld world)\n {\n Random generator = new Random();\n int row = generator.nextInt(10);\n int col = generator.nextInt(10);\n Location loc = new Location(row, col);\n while(world.getGrid().get(loc) != null)\n {\n row = generator.nextInt(10);\n col = generator.nextInt(10);\n loc = new Location(row, col);\n }\n world.add(loc, actor);\n }",
"public void setCell(final Cell location) {\r\n this.locateCell.removeInhabit();\r\n locateCell = location;\r\n location.setInhabit(this);\r\n }",
"public void moveToLastAcceptableLocation(){\n\t\tthis.x=this.xTemp;\n\t\tthis.y=this.yTemp;\n\t}",
"public void move() {\n if (!canMove) {\n return;\n }\n int moveX = currDirection == EAST ? PACE : currDirection == WEST ? -PACE : 0;\n int moveY = currDirection == NORTH ? PACE : currDirection == SOUTH ? -PACE : 0;\n if (grid == null || grid.isOutside(currX + moveX, currY + moveY)) {\n return;\n }\n currX += moveX;\n currY += moveY;\n }",
"@Override\r\n\tpublic void move() {\n\t\tPoint target = strategy.search(this.getLocation(), new Point(0,0));\r\n\r\n\t\tint tries = 0;\r\n\t\t\r\n\t\twhile(!state.equals(\"Inactive\") && !game.movement(this, target.x, target.y)){\r\n\t\t\ttarget = strategy.search(new Point(x,y),playerLocation);\r\n\t\t\ttries++;\r\n\t\t\tif(tries > 4) return; // the search strategy has 4 tries to pick a valid location to move to\r\n\t\t}\r\n\t\t\r\n\t\tx = target.x;\r\n\t\ty = target.y;\r\n\r\n\t\tmoveSprite();\r\n\t}",
"public void moveActor();",
"private void moveToNewLocation() {\r\n System.out.println(\"\\nThis is the move to a new location option\");\r\n }",
"public boolean moveUnit(Position from, Position to);",
"public void moveTo(Position newPosition)\n\t{\n\t\tcurrentPosition = newPosition;\n\t}",
"private void cleanUpAfterMove(Unit unit){\n\t\t\t//add current location\n\t\t\tpastLocations.add(unit.location().mapLocation());\n\t\t\t//get rid of oldest to maintain recent locations\n\t\t\tif (pastLocations.size()>9)\n\t\t\t\tpastLocations.remove(0);\t\n\t}",
"public abstract Field.RadioData move(Field.RadioData radioData, Location newLoc);",
"static boolean tryMoveToLoc(MapLocation loc) throws GameActionException {\n\t\tDirection dir = rc.getLocation().directionTo(loc);\n\t\treturn tryMove(dir);\n\t}",
"@Test\n public void removing_location_from_solver_with_more_than_two_locations_must_happen_through_problem_fact_change() {\n TspSolution solution = createSolution(location1, location2, location3);\n when(bestSolutionChangedEvent.isEveryProblemFactChangeProcessed()).thenReturn(true);\n when(bestSolutionChangedEvent.getNewBestSolution()).thenReturn(solution);\n routeOptimizer.addLocation(location1, distanceMatrix);\n routeOptimizer.addLocation(location2, distanceMatrix);\n routeOptimizer.addLocation(location3, distanceMatrix);\n routeOptimizer.bestSolutionChanged(bestSolutionChangedEvent);\n\n routeOptimizer.removeLocation(location2);\n verify(solver).addProblemFactChanges(any()); // note that it's plural\n // solver still running\n verify(solver, never()).terminateEarly();\n }",
"private void removeLocation() {\n try {\n this.location_view.setVisibility(View.GONE);\n this.current_location.setVisibility(View.GONE);\n this.drop_location.setVisibility(View.GONE);\n this.mPostModel.setLocationPost(\"\");\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }",
"public void move(FightCell cell);",
"public boolean movePlayer(MazePlayer p, Direction d) {\n//\t System.out.println(\"Player \"+p.name+\" requests to move in direction \"+d);\n// players can move through walls with some small probability!\n\t\t // calculate the new position after the move \n\t\t MazePosition oldPos = playerPosition.get(p.name);\n\t\t MazePosition newPos = theBoard.tryMove(oldPos,d);\n\n\t\t \n\t\t //make sure there is no other player at that position\n\t\t // and if there is someone there then just return without moving\n\t\t if (playerPosition.containsValue(newPos)){\n\t\t\t if (!newPos.equals(oldPos))\n\t\t\t\t if (debugging) System.out.println(\"player \"+p.name+\" tried to move into an occupied space.\");\n\t\t\t else\n\t\t\t\t if (debugging) System.out.println(p.name+\" stays at \"+oldPos);\n\t\t\t return false;\n\t\t }\n\t\t \n\t\t //otherwise, make the move\n\t\t playerPosition.put(p.name,newPos);\n\t\t if (debugging) System.out.println(p.name+\": \"+oldPos+\" -> \"+newPos);\n\t\t \n\t\t //take off points if you moved through a wall\n\t\t if (!theBoard.canMove(oldPos,d)){\n\t\t\t score.put(p.name,score.get(p.name)-2);\n\t\t\t if (debugging) System.out.println(p.name+\" moved through a wall\");\n\t\t }\n\t\t \n\t\t // mark that old space as \"free space\"\n\t\t freeSpace.add(0,oldPos);\n\t\t \n\t\t // check to see if there is a jewel in the new position.\n\t\t int i = jewelPosition.indexOf(newPos);\n\t\t if (i > -1) {\n\t\t\t // add 5 to the score\n\t\t\t score.put(p.name,score.get(p.name)+5);\n\t\t\t // remove the jewel\n\t\t\t jewelPosition.remove(i);\n\t\t\t if (debugging) System.out.println(\"and lands on a jewel!, score is now \" +score.get(p.name));\n\t\t\t // add another jewel\n\t\t\t MazePosition q = getEmptySpace();\n\t\t\t jewelPosition.add(q);\n\t\t\t if (debugging) System.out.println(\"adding a new jewel at \"+q);\n\t\t\t \n\t\t }\n\t\t else {\n\t\t\t // if no jewel, then remove the space from the freeSpace list\n\t\t\t freeSpace.remove(newPos);\n\t\t }\n\t\t return true;\n\n }",
"public void move() {\n spriteBase.move();\n\n Double newX = spriteBase.getXCoordinate() + spriteBase.getDxCoordinate();\n Double newY = spriteBase.getYCoordinate() + spriteBase.getDyCoordinate();\n\n if (!newX.equals(spriteBase.getXCoordinate())\n || !newY.equals(spriteBase.getYCoordinate())) {\n Logger.log(String.format(\"Monster moved from (%f, %f) to (%f, %f)\",\n spriteBase.getXCoordinate(), spriteBase.getYCoordinate(), newX, newY));\n }\n }",
"@Test\n\tpublic final void testMoveTo() {\n\t\tRoom testRoom = new Room(\"247\", 2, \"Computer Lab\");\n\t\t\n\t\tanimal.moveTo(testForest);\n\t\tassertEquals(\"Move To Forest\", animal.location(), testForest);\n\t\t\n\t\tanimal.moveTo(testRoom);\n\t\tassertEquals(\"Move To Room\", animal.location(), testForest);\t\n\t\t\n\t}",
"private void move() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n Position.Direction direction = currentPosition.getDirection();\n int newX = -1;\n int newY = -1;\n switch (direction) {\n case EAST:\n newX = currentPosition.getX() + 1;\n newY = currentPosition.getY();\n break;\n case WEST:\n newX = currentPosition.getX() - 1;\n newY = currentPosition.getY();\n break;\n case NORTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() + 1;\n break;\n case SOUTH:\n newX = currentPosition.getX();\n newY = currentPosition.getY() - 1;\n break;\n }\n\n if(newX < lowerBound.getX() || newY < lowerBound.getY()\n || newX > upperBound.getX() || newY > upperBound.getY()) {\n System.out.println(\"Cannot move to \" + direction);\n return;\n }\n\n currentPosition.setX(newX);\n currentPosition.setY(newY);\n }",
"public void setLocation(Point newLocation) {\r\n this.p = newLocation;\r\n }",
"public void removeTile(){\n\t\toccupied = false;\n\t\tcurrentTile = null;\n\t}",
"public boolean canMove (Location loc) {\n Grid<Actor> gr = getGrid();\n if (gr == null)\n return false;\n if (!gr.isValid(loc))\n return false;\n Actor neighbor = gr.get(loc);\n return !(neighbor instanceof Wall);\n }",
"@Override\n\tpublic void move() {\n\t\theading = Heading.randHeading();\n\t\tif (heading == Heading.NORTH) {\n\t\t\tthis.location.y -= Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.EAST) {\n\t\t\tthis.location.x += Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.SOUTH) {\n\t\t\tthis.location.y += Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t} else if (heading == Heading.WEST) {\n\t\t\tthis.location.x -= Utilities.rng.nextInt(Simulation.WORLD_SIZE/10);\n\t\t}\n\t\tadjustPos();\n\t\tinfect();\n\t}",
"abstract protected boolean clearSquareHitMine(Location m);",
"public void spawnEnemy(Location location) {\r\n\t\t\tlocation.addNpc((Npc) this.getNpcSpawner().newObject());\r\n\t\t}",
"protected void move(Player player, Movement move) {\n if (board.board[move.oldP.x][move.oldP.y] != null) {\n board.board[move.newP.x][move.newP.y] = board.board[move.oldP.x][move.oldP.y];\n board.board[move.oldP.x][move.oldP.y] = null;\n\n if (player.colour == Colour.BLACK) {\n blackPlayer.move(move);\n whitePlayer.removePiece(move.newP);\n } else if (player.colour == Colour.WHITE) {\n whitePlayer.move(move);\n blackPlayer.removePiece(move.newP);\n }\n\n sharedBoard.update(whitePlayer.getOccupied(), blackPlayer.getOccupied());\n\n // Check for promotions...\n for (int x = 0; x < board.board.length; ++x)\n if (board.board[x][0] instanceof Pawn)\n board.board[x][0] = new Queen(Colour.BLACK);\n else if (board.board[x][7] instanceof Pawn)\n board.board[x][7] = new Queen(Colour.WHITE);\n }\n }",
"public abstract void move(int row, int col) throws IllegalMoveException;",
"@Override\n\tpublic boolean move(LifeForm lifeForm, Cell[][] cells, int row, int column, int spaces)\n\t{\n\t\tboolean moved = false;\n\t\tint numberOfColumns = Environment.getWorldInstance().getWorldCols();\n\t\t\n\t\tif((column+spaces) >= numberOfColumns)\n\t\t{\n\t\t\tspaces = (numberOfColumns - column) - 1;\n\t\t}\n\t\t\n\t\tint i = 0;\n\t\twhile(!moved && (i < spaces))\n\t\t{\n\t\t\tif(cells[row][column+(spaces-i)].getLifeForm() == null)\n\t\t\t{\n\t\t\t\tcells[row][column].removeLifeForm();\n\t\t\t\tcells[row][column+(spaces-i)].addLifeForm(lifeForm);\n\t\t\t\tEnvironment.getWorldInstance().setSelectedLFRow(row);\n\t\t\t\tEnvironment.getWorldInstance().setSelectedLFCol(column+(spaces-i));\n\t\t\t\tmoved = true;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\n\t\treturn moved;\n\t}",
"public void moveCharacter(AStarCharacter character, 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(!character.getUsername().equals(basicAvatarData.getUsername()))\r\n\t\t{\r\n\t\t\ttheGridView.moveCharacterInRoom(character, destGridX, destGridY);\r\n\t\t}\r\n\t}",
"public abstract boolean canMoveTo(Case Location);",
"public Location updateRoute(Location updatedLocation, LocationRepository locationRepository) {\n ArrayList<Location> routeOld = new ArrayList<>(route);\n route.clear();\n int index = 0;\n for (; index < routeOld.size(); index++) {\n if (!routeOld.get(index).getName().equals(updatedLocation.getName())) {\n route.add(routeOld.get(index));\n } else {\n if (index == 0) {\n updatedLocation = Location.create(updatedLocation, this);\n } else {\n updatedLocation = Location.create(updatedLocation, this, route.get(index - 1));\n }\n route.add(updatedLocation);\n break;\n }\n }\n index++;\n for (; index < routeOld.size(); index++) {\n Location location = routeOld.get(index).merge(Location.create(routeOld.get(index), this, route.get(index - 1)));\n route.add(location);\n locationRepository.save(location);\n }\n return updatedLocation;\n }",
"final protected void setSpawnPosition(int newX, int newY)\n {\n spawnPoint = new Point(newX, newY);\n boundingBox.setLocation(spawnPoint);\n }",
"protected void updateLocation (BodyObject source, Location loc)\n {\n SceneLocation sloc = new SceneLocation(loc, source.getOid());\n if (!_ssobj.occupantLocs.contains(sloc)) {\n // complain if they don't already have a location configured\n Log.warning(\"Changing loc for occupant without previous loc \" +\n \"[where=\" + where() + \", who=\" + source.who() +\n \", nloc=\" + loc + \"].\");\n _ssobj.addToOccupantLocs(sloc);\n } else {\n _ssobj.updateOccupantLocs(sloc);\n }\n }",
"void makeUseOfNewLocation(Location location) {\n if ( isBetterLocation(location, currentBestLocation) ) {\n currentBestLocation = location;\n }\n }",
"public void movePlayerPiece(int newRow, int newCol) {\n int currentPlayerNumber = GameService.getInstance().getCurrentPlayerNum();\n playerPieces[currentPlayerNumber].addPreviousPlayerPosition(playerPiecePositions[currentPlayerNumber]);\n playerPiecePositions[currentPlayerNumber] = new Position(newRow, newCol);\n }",
"public void setSpawnLocation(Location spawnLocation) {\n this.spawnLocation = spawnLocation;\n }",
"private boolean movePiece(Tile fromTile) {\r\n\t\tgetBoard().setToTile(tile);\r\n\t\tmakeBackup();\r\n\r\n\t\ttile.setPiece(fromTile.getPiece());\r\n\r\n\t\t// League wins the game if the piece carrying the flag returns to its territory\r\n\t\tif (tile.getPiece().getHasEnemyFlag() == true && tile.getPiece().getLEAGUE().toString().toLowerCase()\r\n\t\t\t\t.equals(tile.getTer().territoryName().toLowerCase())) {\r\n\t\t\tGame.getInstance().setGameOver(true);\r\n\t\t}\r\n\r\n\t\t// reset the old position\r\n\t\tfromTile.setPiece(null);\r\n\t\tgetBoard().setFromTile(null);\r\n\r\n\t\t// reset the selection\r\n\t\tgetBoard().setPieceSelected(false);\r\n\r\n\t\t// fromTile = null;\r\n\t\tgetBoard().setToTile(null);\r\n\r\n\t\treturn true;\r\n\t}",
"public void moveInside(Field.RadioData rd, Location newLoc)\r\n {\r\n rd = move(rd, newLoc);\r\n if(Main.ASSERT) Util.assertion(rd==null);\r\n }",
"public void gerak() \n {\n setLocation(getX(),getY()-5);\n if(getY()<20){\n getWorld().removeObject(this);\n }else\n cek_kena();\n \n }",
"public void setCurrentLocation(Location newLocation)\n\t{\n\t\tcurrentLocation = newLocation;\n\t}",
"public void jumpLocation ( Point loc )\r\n\t{\r\n\t\tif ( loc.x < 0 || loc.y < 0 || \r\n\t\t\t\t loc.x >= size || loc.y >= size )\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tmaze [currentRow] [currentCol].removeWalker(Direction.NONE);\r\n\t\tcurrentRow = loc.y;\r\n\t\tcurrentCol = loc.x;\r\n\t\tmaze [currentRow] [currentCol].InsertWalker();\r\n\t}",
"protected void move() {\n\t\tx += dx;\n\t\ty += dy;\n\t\tif (distance() > range) remove();\n\t}",
"public void move(World world, double new_x, double new_y){\n double x_sign = Math.signum(new_x - getX());\n if(!world.terrainBlocks(new_x + x_sign * getWidth() / 2, getY() + getHeight() / 2) \n && !world.terrainBlocks(new_x + x_sign * getWidth() / 2, getY() - getHeight() / 2)) {\n setX(new_x);\n }\n \n // Then move in y\n double y_sign = Math.signum(new_y - this.getY());\n if(!world.terrainBlocks(getX() + getWidth() / 2, new_y + y_sign * getHeight() / 2) \n && !world.terrainBlocks(getX() - getWidth() / 2, new_y + y_sign * getHeight() / 2)){\n setY(new_y);\n }\n\t\t\n\t}",
"private void moveMine(int row, int col){\n\t\tboolean moved = false;\n\t\t//cycle the board looking for a non mine space\n\t\tfor (int r = 0; r < board.length; r++) {\n\t\t\tif (moved) //breaks out if it moves the mine\n\t\t\t\tbreak;\n\t\t\telse\n\t\t\t\tfor (int c = 0; c < board[0].length; c++)\n\t\t\t\t\tif(moved) //breaks out if it moves the mine\n\t\t\t\t\t\tbreak;\n\t\t\t\t\telse if (!board[r][c].isMine()) {\n\t\t\t\t\t\tboard[r][c].setMine(true);\n\t\t\t\t\t\tmoved = true;\n\t\t\t\t\t}\n\t\t}\n\n\t\tboard[row][col].setMine(false);\n\t}",
"@Override\n\tpublic boolean isLegalMove(Square newPosition) {\n\t\treturn false;\n\t}",
"public void movePawn(Pawn p) {\n pawn = new Pawn(p);\n p.removePawn();\n }"
]
| [
"0.7242688",
"0.71756965",
"0.6996713",
"0.6746841",
"0.67115504",
"0.6632291",
"0.6470968",
"0.6324901",
"0.6215709",
"0.6200773",
"0.6174651",
"0.6165584",
"0.61594313",
"0.6156949",
"0.61397886",
"0.6130017",
"0.61175215",
"0.608951",
"0.60791254",
"0.6019464",
"0.6013554",
"0.59821564",
"0.59703076",
"0.5963305",
"0.5922663",
"0.59084433",
"0.5886983",
"0.5861723",
"0.58563447",
"0.58488613",
"0.5839978",
"0.58283377",
"0.5806004",
"0.58042943",
"0.57997483",
"0.5777757",
"0.5775323",
"0.5745778",
"0.57342947",
"0.57328117",
"0.5730792",
"0.5724661",
"0.5712982",
"0.5707642",
"0.5696665",
"0.5678266",
"0.5648413",
"0.56036496",
"0.5600723",
"0.55939627",
"0.5588137",
"0.5579478",
"0.557472",
"0.5572384",
"0.55593044",
"0.55580884",
"0.5554071",
"0.5541575",
"0.5519768",
"0.55110556",
"0.55029714",
"0.5501029",
"0.5500083",
"0.54970634",
"0.5494978",
"0.5491843",
"0.5482418",
"0.5473505",
"0.5471189",
"0.54622775",
"0.5461557",
"0.5458845",
"0.5455142",
"0.545287",
"0.5438986",
"0.5434636",
"0.5432222",
"0.5428674",
"0.5420503",
"0.5412978",
"0.5412396",
"0.54080504",
"0.54026574",
"0.54001486",
"0.5398732",
"0.5397996",
"0.53967726",
"0.5392665",
"0.5387032",
"0.53741825",
"0.53696835",
"0.53689826",
"0.53624743",
"0.5361791",
"0.53577286",
"0.5357134",
"0.5351557",
"0.53449184",
"0.5337272",
"0.53199875"
]
| 0.83657277 | 0 |
Tests whether this bug can move forward into a location that is empty or contains a flower. | public boolean canMove(Actor actor)
{
//PO: updated the methods after the move from the Bug Class to be called from
//PO: the passed actor
Grid<Actor> gr = actor.getGrid();
if (gr == null)
return false;
Location loc = actor.getLocation();
Location next = loc.getAdjacentLocation(actor.getDirection());
if (!gr.isValid(next))
return false;
Actor neighbor = gr.get(next);
return (neighbor == null) || (neighbor instanceof Flower);
// ok to move into empty location or onto flower
// not ok to move onto any other actor
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean canMoveForward()\n {\n boolean ans = true;\n\n Iterator<WallMulti> walls = this.walls.iterator();\n\n while(walls.hasNext ())\n {\n WallMulti wall = walls.next();\n\n if(wall.getType ().equals (\"H\"))\n {\n if(locX>=wall.getX()-15 && locX<=wall.getX()+wall.getLength()+15)\n {\n if(wall.getY()-locY<=50 && wall.getY()-locY>=0 && degree>=0 && degree<=150)\n {\n ans=false;\n }\n if(locY-wall.getY()<=8 && locY-wall.getY()>=0 && degree>=180 && degree<=360)\n {\n ans=false;\n }\n }\n }\n\n if(wall.getType ().equals (\"V\"))\n {\n if(locY>=wall.getY()-15 &&locY<=wall.getY()+wall.getLength()+15)\n {\n if(wall.getX()-locX<=50 && wall.getX()-locX>=0 &&\n ((degree>=0 && degree<=90)||(degree>=270 && degree<=360)) )\n {\n ans=false;\n }\n if(locX-wall.getX()<=8 && locX-wall.getX()>=0 &&\n degree>=90 && degree<=270 )\n {\n ans=false;\n }\n }\n }\n }\n return ans;\n }",
"private boolean checkCrash (Location next)\n {\n if (next == null) {\n return true;\n }\n\n Location last = playerLocations.get(playerLocations.size()-1);\n\n LocationType type = next.getType();\n //println(getLocation(next).getType()+\" : \"+next);\n if (type == LocationType.POWERUP) {\n PowerUp p = getPowerUp(next);\n\n if (p != null) { // Basically a workaround for the NPE\n // if (ENABLE_SOUND) {\n // sfx.gainedPowerUp();\n // }\n addSpeed(1);\n speedTimer += (int) frameRate * 2;\n removePowerUp(p);\n }\n\n return false;\n }\n\n if ((type == LocationType.PLAYER || type == LocationType.WALL) ||\n (next.getY() != last.getY() && (direction == LEFTKEY || direction == RIGHTKEY)) ||\n (next.getX() != last.getX() && (direction == UPKEY || direction == DOWNKEY))) { // This is to prevent bike from wrapping around edge of grid, because grid is a 1d array\n //sfx.lostALife(); //Commented out because you hear a shrill sound at the end for some reason\n return true;\n }\n\n return false;\n }",
"public static boolean move() {\n S.rc.setIndicatorString(2, \"move\");\n if (target == null) {\n System.err.println(\"ERROR: tried to move without target\");\n return false;\n }\n\n // Check if we are close enough.\n int distanceSqToTarget = S.rc.getLocation().distanceSquaredTo(target);\n if (distanceSqToTarget <= thresholdDistanceSq) {\n // Stop bugging.\n start = null;\n S.rc.setIndicatorString(2, \"close enough\");\n return moveCloserToTarget();\n }\n\n if (start == null) {\n // Not currently bugging.\n forward = S.rc.getLocation().directionTo(target);\n S.rc.setIndicatorString(2, \"not buggin\");\n if (moveForwardish()) return true;\n // Start bugging.\n start = S.rc.getLocation();\n forward = forward.rotateRight().rotateRight();\n return move();\n } else {\n // Already bugging.\n // Stop bugging if we got closer to the target than when we started bugging.\n if (distanceSqToTarget < start.distanceSquaredTo(target)) {\n start = null;\n return move();\n }\n\n // Stop bugging if back-left is clear.\n // This means that we must have bugged around something that has since moved.\n if (canMove(forward.rotateLeft().rotateLeft().rotateLeft())) {\n start = null;\n forward = S.rc.getLocation().directionTo(target);\n S.rc.setIndicatorString(2, \"back left clear, forward \" + forward);\n return moveForwardish();\n }\n\n S.rc.setIndicatorString(2, \"scan circle\");\n forward = forward.rotateLeft().rotateLeft();\n // Try moving left, and try every direction in a circle from there.\n for (int i = 0; i < 8; i++) {\n if (moveForwardStrict()) return true;\n forward = forward.rotateRight();\n }\n return false;\n }\n }",
"public void checkIsFrogAtTheEdge() {\n\t\tif (getY()<0 || getY()>800) {\n\t\t\tsetY(FrogPositionY);\t\n\t\t}\n\t\tif (getX()<-20) {\n\t\t\tmove(movementX*2, 0);\n\t\t} else if (getX()>600) {\n\t\t\tmove(-movementX*2, 0);\n\t\t}\n\t\tif (getY()<130 && ! ((getIntersectingObjects(End.class).size() >= 1))) {\n\t\t\tmove(0, movementY*2);\n\t\t\t\n\t\t}\n\t}",
"private boolean legalMove() {\n\n\t\t// empty landing spot\n\t\tif (tilePath.size() == 0) {\n\t\t\tdebug(\"illegal, empty landing spot\");\n\t\t\treturn false;\n\t\t}\n\n\t\tif (!mBoard.tileIsEmpty(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, tile not empty\");\n\t\t\treturn false;\n\t\t}\n\n\t\t// start doesn't equal end\n\t\tif (tilePath.get(0).equals(tilePath.get(tilePath.size() - 1))) {\n\t\t\tdebug(\"illegal, start doesn't equal end\");\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}",
"private boolean isThereValidMove() {\n\t\treturn true;\n\t}",
"private boolean foundFlower() {\n\t\t// get the grid location of this Bee\n\t\tGridPoint myPoint = grid.getLocation(this);\n\t\tGridPoint theirPoint;\n\t\t\n\t\t// if the bee is within range of a flower's size, target that flower\n\t\tfor(int i=0; i<flowers.size(); i++){\n\t\t\ttheirPoint = grid.getLocation(flowers.get(i));\n\t\t\tif(grid.getDistance(myPoint, theirPoint) < (flowers.get(i).size/100.0)){\n\t\t\t\ttargetFlower = flowers.get(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private static boolean moveForwardish() {\n if (moveForwardStrict()) return true;\n Direction f = forward;\n forward = f.rotateLeft();\n if (moveForwardStrict()) return true;\n forward = f.rotateRight();\n if (moveForwardStrict()) return true;\n forward = f;\n return false;\n }",
"public boolean checkAndMove() {\r\n\r\n\t\tif(position == 0)\r\n\t\t\tdirection = true;\r\n\r\n\t\tguardMove();\r\n\r\n\t\tif((position == (guardRoute.length - 1)) && direction) {\r\n\t\t\tposition = 0;\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif(direction)\r\n\t\t\tposition++;\r\n\t\telse\r\n\t\t\tposition--;\r\n\r\n\t\treturn false;\r\n\t}",
"public abstract boolean canMoveTo(Case Location);",
"public boolean stepLeft() {\n //it should be wall and maze border check here\n xMaze--;\n printMyPosition();\n return true; // should return true if step was successful\n }",
"public boolean atPosition() {\n return m_X.getClosedLoopError() < Constants.k_ToleranceX;\n }",
"@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }",
"@Override\r\n\tpublic boolean checkIfOnTraineeship() {\n\t\treturn false;\r\n\t}",
"protected boolean anyMovesLeft() {\r\n return super.anyMovesLeft();\r\n }",
"public boolean checkRep() {\n return location.x() >= 0 && location.x() < board.getWidth() && \n location.y() >= 0 && location.y() < board.getHeight(); \n }",
"public boolean isMoving() {\n/* 270 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public boolean hasFainted() {\n return hp <= 0;\n }",
"public boolean canMove() {\n ArrayList<Location> valid = canMoveInit();\n if (valid == null || valid.isEmpty()) {\n return false;\n }\n ArrayList<Location> lastCross = crossLocation.peek();\n for (Location loc : valid) {\n Actor actor = (Actor) getGrid().get(loc);\n if (actor instanceof Rock && actor.getColor().equals(Color.RED)) {\n next = loc;\n isEnd = true;\n return false;\n }\n if (!lastCross.contains(loc)) {\n lastCross.add(loc);\n next = loc;\n ArrayList<Location> nextCross = new ArrayList<>();\n nextCross.add(next);\n nextCross.add(last);\n crossLocation.push(nextCross);\n return probabilityAdd();\n }\n }\n next = lastCross.get(1);\n crossLocation.pop();\n return probabilitySub();\n }",
"public boolean hasFurthestPoint() {\n return fieldSetFlags()[5];\n }",
"private boolean atLeastOneNonWallLocation() {\n\t\tfor (int x = 0; x < this.map.getMapWidth(); x++) {\n\t\t\tfor (int y = 0; y < this.map.getMapHeight(); y++) {\n\n\t\t\t\tif (this.map.getMapCell(new Location(x, y)).isWalkable()) {\n\t\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}",
"public boolean hasMoves() {\n if(color != 0){\n activePieces = getPiece();\n\n for(int i = 0; i < activePieces.size(); i++){\n Piece curr = activePieces.get(i);\n\n if(curr.possibleMoves(state).size() > 0){\n //curr.printSpecial();\n return true;\n }\n }\n return false;\n }\n System.out.println(\"Empty stop error\");\n return false;\n }",
"@Override\r\n public boolean canMove() {\r\n Grid<Actor> gr = getGrid();\r\n int dirs[] = {\r\n Location.AHEAD, Location.HALF_CIRCLE, Location.LEFT,\r\n Location.RIGHT };\r\n // 当终点在周围时,不能移动且isEnd应当为true\r\n for (int i = 0; i < dirs.length; i++) {\r\n Location tarLoc = getLocation().getAdjacentLocation(dirs[i]);\r\n if (gr.isValid(tarLoc) && gr.get(tarLoc) != null) {\r\n // Color直接用==计算竟然不可行(真是哔了dog...\r\n if (gr.get(tarLoc) instanceof Rock\r\n && gr.get(tarLoc).getColor().equals(Color.RED)) {\r\n isEnd = true;\r\n return false;\r\n }\r\n }\r\n }\r\n ArrayList<Location> nextLocs = getValid(getLocation());\r\n // 当附近没有可以移动的位置时,不能移动\r\n if (nextLocs.size() == 0) {\r\n return false;\r\n }\r\n // 当可以移动的位置>1时,说明存在一个节点,这个节点应当被新建一个arraylist入栈\r\n if (nextLocs.size() > 1) {\r\n ArrayList<Location> newStackElem = new ArrayList<Location>();\r\n newStackElem.add(getLocation());\r\n crossLocation.push(newStackElem);\r\n }\r\n // 有可以移动的位置时,向概率最高的方向移动\r\n int maxProbLoc = 0;\r\n // 由于nextLocs不一定有4个location,所以只好循环判断取最大值\r\n for (int i = 0; i < nextLocs.size(); i++) {\r\n Location loc = nextLocs.get(i);\r\n int dirNum = getLocation().getDirectionToward(loc) / 90;\r\n if (probablyDir[dirNum] > probablyDir[maxProbLoc]) {\r\n maxProbLoc = i;\r\n }\r\n }\r\n next = nextLocs.get(maxProbLoc);\r\n return true;\r\n }",
"@Override\n public boolean canMove() {\n return storage.isRampClosed();\n }",
"public boolean isLegalMove() {\n return iterator().hasNext();\n }",
"public boolean foundGoal() \r\n\t{\r\n\t\t// Write the method that determines if the walker has found a way out of the maze.\r\n\t\treturn ( currentCol < 0 || currentRow < 0 || \r\n\t\t\t\t currentCol >= size || currentRow >= size );\r\n\t}",
"public boolean canMove() {\n\t\tArrayList<Location> loc = getValid(getLocation());\n\t\tif (loc.isEmpty()) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\tpath.add(getLocation());\n\t\t\tif (loc.size() >= 2) {\n\t\t\t\tcrossLocation.push(path);\n\t\t\t\tpath = new ArrayList<Location>();\n\t\t\t\tnext = betterDir(loc);\n\t\t\t}\n\t\t\tnext = loc.get(0);\n\t\t}\n\t\treturn true;\n\t}",
"private boolean validMove(int xi, int yi, int xf, int yf) {\n\t\tPiece prevP = pieceAt(xi, yi);\n\t\tPiece nextP = pieceAt(xf, yf);\n\n\t\tif (prevP.isKing()) {\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && ((yf - yi) == 1 || (yi - yf) == 1)) \n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\tif (prevP.isFire()) \n\t\t{\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && (yf - yi) == 1) \n\t\t\t{\n\t\t\t\tif (nextP != null && !nextP.isFire()) \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\telse if ((xf - xi) == 2 && (yf - yi) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi+1, yi+1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse if ((xi - xf) == 2 && (yf - yi) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi-1, yi+1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} else \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else \n\t\t{\n\t\t\tif (((xf - xi) == 1 || (xi - xf) == 1) && (yi - yf) == 1) \n\t\t\t{\n\t\t\t\tif (nextP != null && nextP.isFire()) \n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\treturn true;\n\t\t\t} \n\t\t\telse if ((xf - xi) == 2 && (yi - yf) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi+1, yi-1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\telse if ((xi - xf) == 2 && (yi - yf) == 2) \n\t\t\t{\n\t\t\t\tPiece pBetween = pieceAt(xi-1, yi-1);\n\t\t\t\tif (pBetween != null && prevP.side() != pBetween.side()) \n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"private boolean isMove() {\n return this.getMoves().size() != 0;\n }",
"private boolean checkMovePrevious(PositionTracker tracker) {\n\t\t \n\t\t if(tracker.getExactRow() == 0) { //initiate if statement\n\t\t\t if(tracker.getExactColumn() == 0) //initiate if statement\n\t\t\t\t return false; //returns the value false\n\t\t }\n\t\t \n\t\t return true; //returns the boolean value true\n\t }",
"boolean reachedLeft() {\n\t\treturn this.x <= 0;\n\t}",
"private boolean isTest() {\n \t\treturn false;\n\t\t// return !index.isLeft();\n\t}",
"public boolean updateState(Landscape scape) {\n\t\tboolean[] emptyElevators = new boolean[this.elevators.length];\n\t\tint emptyCount = 0;\n\t\t\n\t\t\n\t\t\t\t\n\t\t// this finds out which elevators are in which state and what direction they are traveling in so that\n\t\t// we can only act on ones that are in similar situations\n\t\tfor( int i = 0 ; i < this.elevators.length ; i++){\n\t\t\t// empty and has no target floor\n\t\t\tif( this.elevators[i].isEmpty() ){\n\t\t\t\temptyElevators[i] = true;\n\t\t\t\temptyCount++;\n\t\t\t}\n\t\t\telse{\n\t\t\t\temptyElevators[i] = false;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif( ElevatorBank.strategy == ElevatorBank.STRATEGY.GROUP_3){\n\t\t\temptyRule2(emptyElevators, emptyCount);\n\t\t}\n\t\telse{\n\t\t\temptyRule(emptyElevators, emptyCount);\n\t\t}\n\t\t// never dies\n\t\treturn true;\n\t}",
"private static boolean moveCloserToTarget() {\n Direction f = forward;\n int startingDistance = target.distanceSquaredTo(S.rc.getLocation());\n forward = S.rc.getLocation().directionTo(target);\n forward = forward.rotateLeft();\n for (int i = 0; i < 8; i++) {\n if (target.distanceSquaredTo(S.rc.getLocation().add(forward)) < startingDistance)\n if (moveForwardStrict())\n return true;\n forward = forward.rotateRight();\n }\n forward = f;\n return false;\n }",
"public boolean floodCheck() {\r\n return true;\r\n }",
"public boolean canMove() {\n\n\tArrayList<Location> moveLocs = getValid(getLocation());\n\n\tif (isEnd == true) {\n\t return false;\n\t} \n\tif (!moveLocs.isEmpty()) {\n\t \n\t randomSelect(moveLocs);\n\t // selectMoveLocation(moveLocs);\n\t return true;\n\n\t} else {\n\t return false;\n\t}\n }",
"@Test\n void checkCannotForceWithForcedCellOccupied() {\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(1, 0)));\n }",
"private boolean probe(Tile tile, Direction previousDirection) {\n int currentX = tile.getPosition().getX();\n int currentY = tile.getPosition().getY();\n\n if (tile.getTerrain().equals(Terrain.EMPTY))\n return false;\n else if (currentX == 0 || currentX == MAP_WIDTH - 1 || currentY == 0 || currentY == MAP_HEIGHT - 1) {\n return true; // Check if tile hits edge wall\n } else {\n for (Direction direction : Direction.cardinals) {\n Tile targetTile = getTileAtCoordinates(Utility.locateDirection(tile.getPosition(), direction));\n if (!direction.equals(previousDirection) && targetTile.getTerrain().equals(Terrain.WALL)) {\n if (probe(targetTile, Utility.opposite(direction))) {\n tile.setTerrain(Terrain.EMPTY);\n return false;\n }\n }\n }\n return false;\n }\n }",
"public boolean fuelIsFull() throws Exception;",
"public boolean destinationReached() {\n boolean xCheck = cDestination.getX() <= cPosition.getX() + cFishSizeX\n && cDestination.getX() >= cPosition.getX();\n\n boolean yCheck = cDestination.getY() <= cPosition.getY() + cFishSizeY\n && cDestination.getY() >= cPosition.getY();\n return xCheck && yCheck;\n }",
"@Override\n public boolean isFinished() {\n double[] positions = drivetrain.getPositions();\n\n return Math.abs(positions[0] - targetDistance) <= allowedError && Math.abs(positions[1] - targetDistance) <= allowedError;\n }",
"public boolean canMove2() {\n\t\tGrid<Actor> gr = getGrid(); \n\t\tif (gr == null) {\n\t\t\treturn false; \n\t\t}\n\t\t\n\t\tLocation loc = getLocation(); \n\t\tLocation next = loc.getAdjacentLocation(getDirection());\n\t\tLocation next2 = next.getAdjacentLocation(getDirection());\n\t\tif (!gr.isValid(next)) {\n\t\t\treturn false;\n\t\t}\n\t\tif (!gr.isValid(next2)) {\n\t\t\treturn false;\n\t\t}\n\t\tActor neighbor = gr.get(next2); \n\t\treturn (neighbor == null) || (neighbor instanceof Flower); \n\t}",
"@java.lang.Override\n public boolean hasForward() {\n return stepInfoCase_ == 13;\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 }",
"protected boolean shouldMoveTo(World worldIn, BlockPos pos)\n {\n Block block = worldIn.getBlockState(pos).getBlock();\n\n if (block == Blocks.FARMLAND)\n {\n pos = pos.up();\n IBlockState iblockstate = worldIn.getBlockState(pos);\n block = iblockstate.getBlock();\n\n if (block instanceof BlockCrops && this.wantsToReapStuff && (this.currentTask == 0 || this.currentTask < 0))\n {\n this.currentTask = 0;\n return true;\n }\n\n }\n\n return false;\n }",
"private void checkPreviousSquare(){\n\t\t\n\t\tif(!frontIsClear()){\n\t\t\tfaceBackwards();\n\t\t\tmove();\n\t\t\tif(!beepersPresent()){\n\t\t\t\tfaceBackwards();\n\t\t\t\tmove();\n\t\t\t\tputBeeper();\n\t\t\t} else {\n\t\t\t\tfaceBackwards();\n\t\t\t\tmove();\n\t\t\t}\n\t\t}\n\t}",
"public boolean isLegalStep(MoveDirection dir){\r\n GamePosition curPos = currentGame.getCurrentPosition();\n\t\tPlayer white = currentGame.getWhitePlayer();\n\t\tint[] toCheckPos = new int[2];\n\t\tint[] existingPos = new int[2];\n\t\tif(curPos.getPlayerToMove().equals(white)) {\n\t\t\ttoCheckPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t} else {\n\t\t\ttoCheckPos[0] = curPos.getBlackPosition().getTile().getColumn();\n\t\t\ttoCheckPos[1] = curPos.getBlackPosition().getTile().getRow();\n\t\t\t\n\t\t\texistingPos[0] = curPos.getWhitePosition().getTile().getColumn();\n\t\t\texistingPos[1] = curPos.getWhitePosition().getTile().getRow();\n\t\t}\n\t\t//0 = column, 1 = row\n\t\tif(dir == MoveDirection.North) {\n\t\t\tif(toCheckPos[1] == 1) return false;\n\t\t\tif(toCheckPos[1] - 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), -1, 0);\n\t\t} else if(dir == MoveDirection.South) {\n\t\t\tif(toCheckPos[1] == 9) return false;\n\t\t\tif(toCheckPos[1] + 1 == existingPos[1] && toCheckPos[0] == existingPos[0]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 1, 0);\n\t\t} else if(dir == MoveDirection.East) {\n\t\t\tif(toCheckPos[0] == 9) return false;\n\t\t\tif(toCheckPos[0] + 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, 1);\n\t\t} else if(dir == MoveDirection.West) {\n\t\t\tif(toCheckPos[0] == 1) return false;\n\t\t\tif(toCheckPos[0] - 1 == existingPos[0] && toCheckPos[1] == existingPos[1]) return false;\n\t\t\treturn QuoridorController.noWallBlock(curPos.getPlayerToMove(), 0, -1);\n\t\t}\n\t\t\n\t\treturn false;\r\n }",
"@java.lang.Override\n public boolean hasForward() {\n return stepInfoCase_ == 13;\n }",
"private boolean didCloseOffNewSpace(Point p, Moves m) {\n if (m == Moves.LEFT) {\n if (isEmpty(p.x - 1, p.y) &&\n (isEmpty(p.x - 1, p.y - 1) || !isEmpty(p.x, p.y - 1)) &&\n (isEmpty(p.x - 1, p.y + 1) || !isEmpty(p.x, p.y + 1))) {\n return false;\n }\n } else if (m == Moves.RIGHT) {\n if (isEmpty(p.x + 1, p.y) &&\n (isEmpty(p.x + 1, p.y - 1) || !isEmpty(p.x, p.y - 1)) &&\n (isEmpty(p.x + 1, p.y + 1) || !isEmpty(p.x, p.y + 1))) {\n return false;\n }\n } else if (m == Moves.UP) {\n if (isEmpty(p.x, p.y + 1) &&\n (isEmpty(p.x - 1, p.y + 1) || !isEmpty(p.x - 1, p.y)) &&\n (isEmpty(p.x + 1, p.y + 1) || !isEmpty(p.x + 1, p.y))) {\n return false;\n }\n } else if (m == Moves.DOWN) {\n if (isEmpty(p.x, p.y - 1) &&\n (isEmpty(p.x - 1, p.y - 1) || !isEmpty(p.x - 1, p.y)) &&\n (isEmpty(p.x + 1, p.y - 1) || !isEmpty(p.x + 1, p.y))) {\n return false;\n }\n }\n return true;\n }",
"public boolean shift_under_error() {\r\n return get_action(((Symbol) this.stack.peek()).parse_state, error_sym()) > 0;\r\n }",
"@Test\r\n public void should_not_be_allowed_to_move_in_wrong_direction() {\r\n game.nextTurn(); // will throw [1,2] and thus black starts\r\n assertFalse(game.move(Location.R12, Location.R10));\r\n }",
"private boolean hasPossibleMove()\n {\n for(int i=0; i<FieldSize; ++i)\n {\n for(int j=1; j<FieldSize; ++j)\n {\n if(field[i][j] == field[i][j-1])\n return true;\n }\n }\n for(int j=0; j<FieldSize; ++j)\n {\n for(int i=1; i<FieldSize; ++i)\n {\n if(field[i][j] == field[i-1][j])\n return true;\n }\n }\n return false;\n }",
"public boolean hasForward() {\n if (index + 1 < history.size() && index >= 0) {\n return true;\n } else {\n return false;\n }\n }",
"public boolean onFirstMove() {\n\t\treturn (PawnMoveInformation.NOT_MOVED_YET == this.info);\n\t}",
"private boolean inGameInvariant(){\n if (owner != null && troops >= 1)\n return true;\n else\n throw new IllegalStateException(\"A Territory is left without a Master or Troops\");\n }",
"boolean outOfSight();",
"public boolean outOfBounds()\n {\n if((lastpowerUp.equals(\"BLUE\") || lastpowerUp.equals(\"RAINBOW\")) && powerupTimer > 0)\n {\n return false;\n }\n \n if(head.getA() < 150 || head.getA() >= 1260)\n return true;\n else if(head.getB() <150 || head.getB() >=630)\n return true;\n else \n return false;\n \n \n }",
"private void checkInFront(Tile[][] chessBoard,int pawnX,int pawnY, char pawnColor) {\r\n\t\tint direction;\r\n\t\tBoolean extraStep = false;\r\n\t\tif (pawnColor =='w') {\r\n\t\t\tdirection = 1;\r\n\t\t\tif (pawnY == 1){\r\n\t\t\t\textraStep = true;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tdirection = -1;\r\n\t\t\tif (pawnY == 6) {\r\n\t\t\t\textraStep = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (extraStep) {\r\n\t\t\tcheckMove(chessBoard, pawnX, pawnY, direction);\r\n\t\t\tcheckMove(chessBoard, pawnX, pawnY, 2*direction);\r\n\t\t} else {\r\n\t\t\tcheckMove(chessBoard, pawnX, pawnY,direction);\r\n\t\t}\r\n\t}",
"private boolean isAtFish(){\n final RSNPC[] fishing_spots = NPCs.findNearest(\"Fishing spot\");\n if (fishing_spots.length < 1){\n return false;\n }\n return fishing_spots[0].isOnScreen();\n }",
"private final boolean isBackwardsStart()\n {\n return (m_bufferOffset_ < 0 && m_source_.getIndex() == 0)\n || (m_bufferOffset_ == 0 && m_FCDStart_ <= 0);\n }",
"public boolean checkTroopToCarrierMove(Troop aTroop){\r\n\t boolean found = false;\r\n\t int i = 0;\r\n\t while ((found == false) & (i < troopToCarrierMoves.size())){\r\n\t\t TroopToCarrierMovement tempMove = troopToCarrierMoves.get(i);\r\n\t\t if (tempMove.isThisTroop(aTroop)){\r\n\t\t\t found = true;\r\n\t\t }else{\r\n\t\t\t i++;\r\n\t\t }\r\n\t }\r\n\t return found;\r\n }",
"public boolean fuelIsEmpty() throws Exception;",
"@Override\n\tpublic boolean validMove(int xEnd, int yEnd, board b){\n\t\t//try to land one same color piece\n\t\tif(b.occupied(xEnd, yEnd)&&b.getPiece(xEnd, yEnd).getColor()==color){\n\t\t\treturn false;\n\t\t}\n\t\tif(v==0){\n\t\t\tif(!this.guard(xEnd, yEnd, b)){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\t//normal move\n\t\tif((xEnd==x-1&&yEnd==y-1)||(xEnd==x-1&&yEnd==y)||(xEnd==x-1&&yEnd==y+1)||(xEnd==x&&yEnd==y-1)||(xEnd==x&&yEnd==y+1)||(xEnd==x+1&&yEnd==y-1)||(xEnd==x+1&&yEnd==y)||(xEnd==x+1&&yEnd==y+1)){\n\t\t\tif(b.occupied(xEnd, yEnd)){\n\t\t\t\t//set the enpass flage back\n\t\t\t\tb.setFlag(color, 100, 100);\n\t\t\t\tb.recycle(xEnd, yEnd);\n\t\t\t\tthis.setPosition(xEnd, yEnd);\n\t\t\t\tb.update();\n\t\t\t\tc=0;\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\t//set the enpass flage back\n\t\t\t\tb.setFlag(color, 100, 100);\n\t\t\t\tthis.setPosition(xEnd, yEnd);\n\t\t\t\tb.update();\n\t\t\t\tc=0;\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}else if((xEnd==x-2&&yEnd==y)){ //castling\n\t\t\tpiece r = b.getPiece(0, y);\n\t\t\tif(r==null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(r.getC()==0||r.getColor()!=color||r.getType()!= type.ROOK||c==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor(int i=3;i>0;i--){\n\t\t\t\tif(b.occupied(i, y)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setPosition(xEnd, yEnd);\n\t\t\tr.setPosition(3,y);\n\t\t\tc=0;\n\t\t\tr.setC(0);\n\t\t\tb.setFlag(color, 100, 100);\n\t\t\tb.update();\n\t\t\treturn true;\n\t\t}else if((xEnd==x+2&&yEnd==y)){\n\t\t\tpiece r = b.getPiece(7, y);\n\t\t\tif(r==null){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(r.getC()==0||r.getColor()!=color||r.getType()!= type.ROOK||c==0){\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tfor(int i=5;i<=6;i++){\n\t\t\t\tif(b.occupied(i, y)){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tthis.setPosition(xEnd, yEnd);\n\t\t\tr.setPosition(5,y);\n\t\t\tc=0;\n\t\t\tr.setC(0);\n\t\t\tb.setFlag(color, 100, 100);\n\t\t\tb.update();\n\t\t\treturn true;\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t}",
"@java.lang.Override\n public boolean hasEtaToFirstWaypoint() {\n return etaToFirstWaypoint_ != null;\n }",
"@Test\n void checkCannotForceWithNoDestination() {\n Worker worker1 = new Worker(0, board.getCellFromCoords(0, 1));\n Worker worker2 = new Worker(1, board.getCellFromCoords(0, 0));\n\n Map<Worker, Boolean> otherWorkers = new HashMap<>();\n otherWorkers.put(worker2, false);\n\n turn = new Turn(worker1, otherWorkers, (cell) -> board.getNeighborings(cell), cell -> board.isPerimeterSpace(cell));\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(0, 0)));\n assertThrows(IllegalArgumentException.class, () -> abilities.doMove(turn, board.getCellFromCoords(0, 0)));\n }",
"public boolean hasLocation()\n {\n return targetLocation != null;\n }",
"private boolean zzRefill() {\n\t\treturn zzCurrentPos>=s.offset+s.count;\n\t}",
"private boolean zzRefill() {\n\t\treturn zzCurrentPos>=s.offset+s.count;\n\t}",
"private boolean canMoveUp()\n {\n // runs through column first, row second\n for ( int column = 0; column < grid[0].length ; column++ ) {\n for ( int row = 1; row < grid.length; row++ ) {\n // looks at tile directly above the current tile\n int compare = row-1;\n if ( grid[row][column] != 0 ) {\n if ( grid[compare][column] == 0 || grid[row][column] ==\n grid[compare][column] ) {\n return true;\n }\n }\n }\n } \n return false;\n }",
"public boolean isSolvable()\n {\n return moves() >= 0;\n }",
"private boolean zzRefill() {\r\n\t\treturn zzCurrentPos>=s.offset+s.count;\r\n\t}",
"private boolean validMove(int xi, int yi, int xf, int yf) {\n\t\tif (pieceAt(xi, yi).isKing() && pieceAt(xi, yi).isFire() && pieceAt(xf, yf) == null) {\n\t\t\tif (Math.abs(xi - xf) == 1 && Math.abs(yi - yf) == 1) {\n\t\t\t\treturn true;\n\t\t\t} else if (pieceAt((xi+xf)/2, (yi+yf)/2) != null && pieceAt((xi+xf)/2, (yi+yf)/2).isFire() == false && Math.abs(xi - xf) == 2 && Math.abs(yi - yf) == 2) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (pieceAt(xi, yi).isKing() && pieceAt(xi, yi).isFire() == false && pieceAt(xf, yf) == null) {\n\t\t\tif (Math.abs(xi - xf) == 1 && Math.abs(yi - yf) == 1) {\n\t\t\t\treturn true;\n\t\t\t} else if (pieceAt((xi+xf)/2, (yi+yf)/2) != null && pieceAt((xi+xf)/2, (yi+yf)/2).isFire() && Math.abs(xi - xf) == 2 && Math.abs(yi - yf) == 2) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t} else if (pieceAt(xi, yi).isKing() == false && pieceAt(xi, yi).isFire() && pieceAt(xf, yf) == null) {\n\t\t\tif ((xi - xf == -1 && yi - yf == -1) || (xi - xf == 1 && yi - yf == -1)) {\n\t\t\t\treturn true;\n\t\t\t} else if (pieceAt((xi+xf)/2, (yi+yf)/2) != null && pieceAt((xi+xf)/2, (yi+yf)/2).isFire() == false) {\n\t\t\t\tif (xi - xf == -2 && yi - yf == -2) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (xi - xf == 2 && yi - yf == -2) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t} else if (pieceAt(xi, yi).isKing() == false && pieceAt(xi, yi).isFire() == false && pieceAt(xf, yf) == null) {\n\t\t\tif ((xi - xf == -1 && yi - yf == 1) || (xi - xf == 1 && yi - yf == 1)) {\n\t\t\t\treturn true;\n\t\t\t} else if (pieceAt((xi+xf)/2, (yi+yf)/2) != null && pieceAt((xi+xf)/2, (yi+yf)/2).isFire()) {\n\t\t\t\tif (xi - xf == 2 && yi - yf == 2) {\n\t\t\t\t\treturn true;\n\t\t\t\t} else if (xi - xf == -2 && yi - yf == 2) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Test\n void checkCanForcePush() {\n assertTrue(abilities.checkCanMove(turn, board.getCellFromCoords(1, 1)));\n }",
"private ArrayList<Location> canMoveInit() {\n if (last == null) {\n ArrayList<Location> firstList = new ArrayList<>();\n firstList.add(getLocation());\n firstList.add(null);\n crossLocation.push(firstList);\n }\n if (crossLocation.empty() || isEnd) {\n return null;\n }\n Grid gr = getGrid();\n if (gr == null) {\n return null;\n }\n last = getLocation();\n return getValid(getLocation());\n }",
"boolean goalState() {\n\t\treturn (numbersLeft == 0);\n\t}",
"protected void checkInFront()\n {\n d = (Defender)getOneObjectAtOffset(getImage().getWidth()/4, 0, Defender.class);\n if (d != null )\n {\n\n frontEmpty= false;\n d.takeDamage(damage);\n }\n\n else\n {\n frontEmpty = true;\n }\n }",
"public void InvalidMove();",
"@Test\n void checkDoMove() {\n abilities.doMove(turn, board.getCellFromCoords(1, 1));\n assertEquals(turn.getWorker().getCell(), board.getCellFromCoords(1, 1));\n Worker forcedWorker = turn.getWorker();\n for (Worker other : turn.getOtherWorkers()) {\n if (other.getCell() == board.getCellFromCoords(2, 2)) {\n forcedWorker = other;\n }\n }\n\n assertEquals(forcedWorker.getCell(), board.getCellFromCoords(2, 2));\n\n // Can't move anymore after having already moved\n assertFalse(abilities.checkCanMove(turn, board.getCellFromCoords(0, 0)));\n }",
"@Override\n protected void checkLocation() {\n // nothing\n }",
"public boolean zzasp() {\n this.f603zF--;\n if (this.f603zF > 0) {\n return false;\n }\n if (this.f603zF < 0) {\n Log.w(\"GoogleApiClientConnecting\", this.f600zA.f682yW.zzatb());\n Log.wtf(\"GoogleApiClientConnecting\", \"GoogleApiClient received too many callbacks for the given step. Clients may be in an unexpected state; GoogleApiClient will now disconnect.\", new Exception());\n zzf(new ConnectionResult(8, null));\n return false;\n } else if (this.f618zq == null) {\n return true;\n } else {\n this.f600zA.f674AB = this.f601zD;\n zzf(this.f618zq);\n return false;\n }\n }",
"public boolean floodCheck() {\r\n return this.flooded;\r\n }",
"private boolean needToTurn() {\n\t\tdouble curDir = sens.getDirection();\n\t\tdouble desDirPlusAmount = desiredDirection + TURNSPEED;\n\t\tdouble desDirMinusAmount = desiredDirection - TURNSPEED;\n\n\t\t// if desired direction is <||> +_ x degrees\n\t\tif (curDir < desDirMinusAmount || curDir > desDirPlusAmount) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n protected boolean isFinished() {\n //stop once the left side is high enough\n return Robot.myLifter.getLeftEncoder() < pos;\n }",
"public boolean canWalk() {\n\t\treturn rangeBottomLeft != null && !rangeBottomLeft.equals(location)\n\t\t\t\t&& rangeTopRight != null && !rangeTopRight.equals(location);\n\t}",
"@Override\n\tpublic boolean walkThrough(Direction walkingDirection, unit unit) {\n\t\treturn false;\n\t}",
"private boolean fail(Piece piece) {\n\n // To store the moving over\n int localColumnPos = columnPos - piece.getShift();\n\n // If the piece will go outside the bounds of the board, return false\n if (piece.getMatrix().length + rowPos > board.length ||\n piece.getMatrix()[0].length + localColumnPos > board[0].length || localColumnPos < 0) return true;\n\n // Check for no true true collisions\n for (int i = 0; i < piece.getMatrix().length; i++) {\n for (int j = 0; j < piece.getMatrix()[0].length; j++) {\n // If there is a true + true anywhere, do not add piece\n if (piece.getMatrix()[i][j] && board[i + rowPos][j + localColumnPos]) return true;\n }\n }\n return false;\n }",
"private static Boolean checkForContinuousConnectivity()\n\t{\n\t\tint row=0;\n\t\tint column=0;\n\t\tBoolean floorFound=false;\n\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j<board[i].length; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR)\n\t\t\t\t{\n\t\t\t\t\trow=i;\n\t\t\t\t\tcolumn=j;\n\t\t\t\t\tfloorFound = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (floorFound)\n\t\t\t\tbreak;\n\t\t}\n\n\t\tfor(int i=0; i<board.length; i++)\n\t\t{\n\t\t\tfor(int j=0; j<board[i].length; j++)\n\t\t\t{\n\t\t\t\tif(board[i][j]==Cells.FLOOR && !(_PF.canFindAWay(column, row, j, i)))\n\t\t\t\t{\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"@Override\n protected boolean isFinished() {\n return (Math.abs(hpIntake.getWristPosition()) - HatchPanelIntake.positions[position.ordinal()] < Math.PI/12);\n }",
"boolean prepareToMove();",
"public boolean checkForGourds() {return false;}",
"protected boolean checkRep() {\n if ( this.getX() < 0 || this.getY() < 0 || this.getX() >= 20 || this.getY() >= 20 ) {\n return false;\n }\n return true;\n }",
"public boolean isValidPlacementSpot() {\n return isEmpty() && ! getNeighbours().stream().allMatch(Spot::isEmpty);\n }",
"public boolean justMoved() {\n\n\t\tdouble[] scores = compareFrames(length-1, length-2);\n\n\t\tSystem.out.println(scores[0]);\n\n\t\treturn scores[0] > MOVEMENT_THRESHOLD; // || scores[1] > ROTATION_THRESHOLD;\n\t}",
"public boolean canMove() {\n return (Math.abs(getDist())>=50);\n }",
"private boolean isLastMoveRochade()\r\n\t{\r\n\t\tMove lastMove = getLastMove();\r\n\t\tif (lastMove == null) return false;\r\n\t\tPiece king = lastMove.to.piece;\r\n\t\tif (!(king instanceof King)) return false;\r\n\t\t\r\n\t\tint y = king.getColor().equals(Color.WHITE) ? 0 : 7;\r\n\t\tif (lastMove.to.coordinate.y != y) return false;\r\n\t\t\r\n\t\tint xDiffAbs = Math.abs(lastMove.to.coordinate.x - lastMove.from.coordinate.x); \r\n\t\treturn xDiffAbs == 2;\r\n\t}",
"public boolean land() {\n\t\treturn ( Math.random() > this.crashProb);\r\n\t}",
"@Test\n public void isMoveActionLegalFor()\n {\n // Setup.\n final CheckersGameInjector injector = new CheckersGameInjector();\n final List<Agent> agents = createAgents(injector);\n final CheckersEnvironment environment = createEnvironment(injector, agents);\n final CheckersAdjudicator adjudicator = injector.injectAdjudicator();\n\n // Agent white can move his token to an adjacent empty space.\n assertTrue(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P13));\n\n // Agent white cannot move backwards.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P05));\n\n // Agent white cannot move to an occupied space.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P04,\n CheckersPosition.P08));\n\n // Agent white cannot move a red token.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P21,\n CheckersPosition.P17));\n\n // Agent white cannot move too far.\n assertFalse(adjudicator.isMoveActionLegalFor(environment, CheckersTeam.WHITE, CheckersPosition.P09,\n CheckersPosition.P18));\n }",
"public boolean land() {\n\t\treturn (Math.random() > this.crashProb);\r\n\t}",
"@Test\n void RookMoveOutOfBound() {\n Board board = new Board(8, 8);\n Piece rook = new Rook(board, 1, 5, 1);\n board.getBoard()[1][5] = rook;\n board.movePiece(rook, -1, 5);\n }",
"public boolean mustDie() {\n\t\tif (this.not_fed == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}"
]
| [
"0.6536339",
"0.64703673",
"0.6430293",
"0.635493",
"0.6331816",
"0.62543666",
"0.6225393",
"0.61649424",
"0.6157155",
"0.61149",
"0.6107254",
"0.6092737",
"0.60610604",
"0.60569406",
"0.6055393",
"0.6033172",
"0.60091025",
"0.60077155",
"0.60024655",
"0.59948653",
"0.5992407",
"0.59903234",
"0.5981993",
"0.5975924",
"0.5966526",
"0.5954596",
"0.5929833",
"0.59046674",
"0.5901585",
"0.5899606",
"0.5896081",
"0.58943325",
"0.5891985",
"0.58853316",
"0.58815926",
"0.58600503",
"0.58594096",
"0.58544946",
"0.5839991",
"0.58377564",
"0.58320963",
"0.58320147",
"0.583101",
"0.58197916",
"0.5816556",
"0.58143014",
"0.5807757",
"0.58064884",
"0.58057624",
"0.58051795",
"0.57954097",
"0.57939667",
"0.57939607",
"0.5782197",
"0.5779953",
"0.57701135",
"0.5754126",
"0.5752505",
"0.57481617",
"0.5741279",
"0.57340336",
"0.5723038",
"0.57199526",
"0.5716399",
"0.57012075",
"0.5693526",
"0.56865126",
"0.56865126",
"0.5679606",
"0.5679532",
"0.56757295",
"0.5665835",
"0.5657735",
"0.56531674",
"0.56503004",
"0.56473833",
"0.5644419",
"0.5634538",
"0.5631937",
"0.56319016",
"0.56314474",
"0.5630529",
"0.56247056",
"0.5623182",
"0.562158",
"0.5614564",
"0.560719",
"0.5604871",
"0.5598838",
"0.55869776",
"0.5586628",
"0.55836064",
"0.5583226",
"0.55831444",
"0.5578128",
"0.55781245",
"0.5577735",
"0.5577217",
"0.5575767",
"0.55755246"
]
| 0.65873444 | 0 |
Moves the bug forward, putting a flower into the location it previously occupied. | public void move(Actor actor)
{
//PO: updated the methods after the move from the Bug Class to be called from
//PO: the passed actor
Grid<Actor> gr = actor.getGrid();
if (gr == null)
return;
Location loc = actor.getLocation();
Location next = loc.getAdjacentLocation(actor.getDirection());
if (gr.isValid(next))
//PO: alter the original code instead of calling the
//PO: moveTo method in Actor call the method that is from this current behaviour
this.moveTo(actor, next);
else
actor.removeSelfFromGrid();
Flower flower = new Flower(actor.getColor());
flower.putSelfInGrid(gr, loc);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void move() {\r\n Grid<Actor> gr = getGrid();\r\n if (gr == null) {\r\n return;\r\n }\r\n Location loc = getLocation();\r\n if (gr.isValid(next)) {\r\n setDirection(getLocation().getDirectionToward(next));\r\n moveTo(next);\r\n } else {\r\n removeSelfFromGrid();\r\n }\r\n Flower flower = new Flower(getColor());\r\n flower.putSelfInGrid(gr, loc);\r\n }",
"public void move() {\n Grid<Actor> gr = getGrid();\n if (gr == null) {\n return;\n }\n Location loc = getLocation();\n if (gr.isValid(next)) {\n setDirection(getLocation().getDirectionToward(next));\n moveTo(next);\n } else {\n removeSelfFromGrid();\n }\n Flower flower = new Flower(getColor());\n flower.putSelfInGrid(gr, loc);\n }",
"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\tif (gr.isValid(next)) {\n\t\t\tsetDirection(getLocation().getDirectionToward(next));\n\t\t\tmoveTo(next);\n\t\t} else {\n\t\t\tremoveSelfFromGrid();\n\t\t}\n\t\tFlower flower = new Flower(getColor());\n\t\tflower.putSelfInGrid(gr, loc);\n\t}",
"public void flyUpward() {\n /* Implement \"fly upward\" behavior if you want it! */\n }",
"protected void moveFrontAndLaterally() {\n\n dbugThis(\"================================= NEW TRY ====================================================\");\n botTop.swing(BotTop.SWING_UP_COMMAND, true);\n autonomousIdleTasks();\n botTop.openClaw();\n autonomousIdleTasks();\n justWait(1000);\n moveXInchesFromFrontObject(DISTANCE_TO_STONEWALL, 10000, 0.2);\n boolean right = true;\n while (opModeIsActive()) {\n justWait(1000);\n if (right) {\n moveRight(40.0, 0.4);\n right = false;\n }\n else {\n moveLeft(40.0, 0.4);\n right = true;\n }\n }\n return;\n }",
"public void move() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null) {\n\n\t return;\n\t}\n\n\tLocation loc = getLocation();\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t int counter = dirCounter.get(getDirection());\n\t dirCounter.put(getDirection(), ++counter);\n\n\t if (!crossLocation.isEmpty()) {\n\t\t\n\t\t//reset the node of previously occupied location\n\t\tArrayList<Location> lastNode = crossLocation.pop();\n\t\tlastNode.add(next);\n\t\tcrossLocation.push(lastNode);\t\n\t\t\n\t\t//push the node of current location\n\t\tArrayList<Location> currentNode = new ArrayList<Location>();\n\t\tcurrentNode.add(getLocation());\n\t\tcurrentNode.add(loc);\n\n\t\tcrossLocation.push(currentNode);\t\n\t }\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n\t\t\n }",
"public void moveTileForward()\n {\n if(!(activeTile+1 > tiles.length-1) && tiles[activeTile+1] != null)\n {\n Tile tmpTile = tiles[activeTile];\n PImage tmpPreview = previews[activeTile];\n PImage tmpPreviewGradients = previewGradients[activeTile];\n boolean tmpPreviewHover = previewHover[activeTile];\n \n tiles[activeTile+1].setStartColor(tmpTile.getStartColor());\n tiles[activeTile+1].setEndColor(tmpTile.getEndColor());\n tmpTile.setStartColor(tiles[activeTile+1].getStartColor());\n tmpTile.setEndColor(tiles[activeTile+1].getEndColor());\n \n tiles[activeTile+1].setTileLevel(tiles[activeTile+1].getTileLevel()-1);\n tiles[activeTile] = tiles[activeTile+1];\n previews[activeTile] = previews[activeTile+1];\n previewGradients[activeTile] = previewGradients[activeTile+1];\n previewHover[activeTile] = previewHover[activeTile+1];\n \n \n tmpTile.setTileLevel(tmpTile.getTileLevel()+1);\n tiles[activeTile+1] = tmpTile;\n tiles[activeTile+1].setStartColor(tiles[activeTile+1].getStartColor());\n previews[activeTile+1] = tmpPreview;\n previewGradients[activeTile+1] = tmpPreviewGradients;\n previewHover[activeTile+1] = tmpPreviewHover;\n \n activeTile += 1;\n createPreviewGradients();\n }\n }",
"public void lowerFuelCell() {\n FuelCell.fuelCellFlipSol = false;\n raiseHopper.set(false);\n lowerHopper.set(true);\n }",
"protected void move()\n {\n // Find a location to move to.\n Debug.print(\"Fish \" + toString() + \" attempting to move. \");\n Location nextLoc = nextLocation();\n\n // If the next location is different, move there.\n if ( ! nextLoc.equals(location()) )\n {\n // Move to new location.\n Location oldLoc = location();\n changeLocation(nextLoc);\n\n // Update direction in case fish had to turn to move.\n Direction newDir = environment().getDirection(oldLoc, nextLoc);\n changeDirection(newDir);\n Debug.println(\" Moves to \" + location() + direction());\n }\n else\n Debug.println(\" Does not move.\");\n }",
"private void moveToWall() {\n\t\t// TODO Auto-generated method stub\n\t\t// if front is clear then keep moving\n\t\twhile (this.frontIsClear()) {\n\t\t\tthis.move();\n\t\t}\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Tiger moves forward\");\r\n\t}",
"public void stepForward() {\n\t\tposition = forwardPosition();\n\t}",
"public void frogReposition() {\n\t\tsetY(FrogPositionY);\n\t\tsetX(FrogPositionX);\t\t\n\t\t}",
"public void move()\n\t{\n\t\tx = x + frogVelocityX;\n\t}",
"public void flap(){\n bird.setY(bird.getY() - 6);\n }",
"public void forward() {\n\t\t\n\t\tif(hasEaten()) {\n\t\t\taddBodyPart();\n\t\t} else {\n\t\t\tshuffleBody();\n\t\t}\n\t\t\n\t\tthis.setLocation(this.getX()+dX, this.getY()+dY); // move head\n\t\tthis.display(w); \n\t}",
"public void move()\n\t{\n\t\tVector v = ship.v;\n\t\tb = b.getLocation().add(v).getBlock();\n\t\tif(triangle != null) triangle.move();\n\t\tif(rear != null) rear.move();\n\t\tif(foreAndAft != null) foreAndAft.move();\n\t\tif(sails != null) for(int i = 0; i < sails.size(); i++)\n\t\t{\n\t\t\tSail sail = sails.get(i);\n\t\t\tsail.move();\n\t\t}\n\t}",
"void moveForward();",
"public void move(GridPanel bugGrid)\n\t{\tRandom generator = new Random();\n\t\tif (row < bugGrid.getBoardRows()) \n\t\t\t\t\t\t\t\t\n\t\t // -----------------------------------------------------\n\t\t // Simple bug mover randomly, 0-3 spaces\n\t\t //-----------------------------------------------------\n\t\n\t\t bugGrid.addImage(null, row, column);\n\t\t row++;\n\t\t bugGrid.addImage(image, row, column);\n\n }",
"public void back() {\n\n\tGrid<Actor> gr = getGrid();\n\tif (gr == null)\n\t return;\n\n\tif (!crossLocation.isEmpty()) {\n\t\t\n\t crossLocation.pop();\n\n\t //back\n\t ArrayList<Location> lastNode = crossLocation.peek();\n\t next = lastNode.get(0);\n\t}\n\n\tLocation loc = getLocation();\n\t\n\tif (gr.isValid(next)) {\n\n\t setDirection(loc.getDirectionToward(next));\n\t moveTo(next);\n\n\t} else {\n\t removeSelfFromGrid();\n\t}\n\t\n\tint counter = dirCounter.get(getDirection());\n\tdirCounter.put(getDirection(), --counter);\n\n\tFlower flower = new Flower(getColor());\n\tflower.putSelfInGrid(gr, loc);\n\t\n\tlast = loc;\n }",
"public void flood() {\r\n this.flooded = true;\r\n }",
"@Override\n\tpublic void swim() {\n\t\tthis.fly();\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This Goose moves forward\");\r\n\t}",
"public void moveForward()\r\n\t{\r\n\t\tif(loc[1] > 1)\r\n\t\t{\r\n\t\t\tthis.loc[0] -= Math.sin(Math.toRadians(heading-90))*distance; \r\n\t\t\tthis.loc[2] -= Math.cos(Math.toRadians(heading-90))*distance;\r\n\t\t}\r\n\t}",
"abstract public void moveForward();",
"public void stepForwad() {\n\t\t\t\n\t\t\tswitch(this.direction) {\n\t\t\t\tcase 0:\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 1:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tthis.x += 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: \n\t\t\t\t\tthis.x -= 1;\n\t\t\t\t\tthis.y += 1;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tthis.x = (this.worldWidth + this.x)%this.worldWidth;\n\t\t\tthis.y = (this.worldHeight + this.y)%this.worldHeight;\n\t\t}",
"public void move() {\n\t\t\tar.setAhead(10 * fahrtrichtung);\n\n\t\t\t// Wie schnell sich der Roboter drehen soll\n\t\t\tar.setTurnRight(45 * drehrichtung);\n\t\t\tar.execute();\n\t\t\tfarbschema = farbschema * (-1);\n\t\t}",
"public void movePointerForward() throws EndTaskException {\n\t\tpickBeeper();\n\t\tmove();\n\t\tputBeeper();\n\t}",
"public void sunFlowerAction(SunFlower s, int i, int j) {\n\t\tthis.sp += s.generateSun();\n\t\tif (s.getHp() <= 0) {\n\t\t\tthis.board.removeModel(s, i, j);\n\t\t}\n\t}",
"public void move() {\r\n\r\n\t\tif(x < 0) {\r\n\t\t\tx = 400;\r\n\t\t}\r\n\r\n\t\t// factor for speed increase\r\n\t\tx -= 1 * factor;\r\n\t}",
"private void wrap() {\n if (myCurrentLeftX % (Grass.TILE_WIDTH * Grass.CYCLE) == 0) {\n if (myLeft) {\n myCowboy.move(Grass.TILE_WIDTH * Grass.CYCLE, 0);\n myCurrentLeftX += (Grass.TILE_WIDTH * Grass.CYCLE);\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i]\n .move(Grass.TILE_WIDTH * Grass.CYCLE, 0);\n }\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].move(Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n } else {\n myCowboy.move(-(Grass.TILE_WIDTH * Grass.CYCLE), 0);\n myCurrentLeftX -= (Grass.TILE_WIDTH * Grass.CYCLE);\n for (int i = 0; i < myLeftTumbleweeds.length; i++) {\n myLeftTumbleweeds[i].move(-Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n for (int i = 0; i < myRightTumbleweeds.length; i++) {\n myRightTumbleweeds[i].move(-Grass.TILE_WIDTH * Grass.CYCLE,\n 0);\n }\n }\n }\n }",
"private void aimlessScout() {\n\t\ttargetFlower = null;\n\t\t// if bee is sufficiently far from flower, look for other flowers\n\t\tif((clock.time - tempTime) > 0.15) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying\n\t\telse{\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\t//energy -= exhaustionRate;\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"public void move() {\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t\tthis.swim();\r\n\t}",
"void toyPlacingfStuff(){\n //nu stiu daca asta ramane\n gettingBackToInitial();\n nearingTheWallBefore();\n parallelToTheWall();\n actualToyPlacing();\n }",
"@Override\n protected void flamemove ()\n {\n \n }",
"public void bringBack(Fighter f1)\r\n {\r\n if(f1.getPos()[0] + f1.getSize() > 950) //if they are to the right of the screen\r\n {\r\n f1.setPos(950 - f1.getSize(),f1.getPos()[1]); //move them back onto the screen\r\n f1.setMvmtVel(0,f1.getMvmtVel()[1]); //remove horizontal momentum\r\n f1.setKnockBackVel(0,f1.getKnockBackVel()[1]); //remove horizontal knockback\r\n \r\n }\r\n if(f1.getPos()[0] < 0) //if they are to the left of the screen\r\n {\r\n f1.setPos(0,f1.getPos()[1]); //move them back onto the screen\r\n f1.setMvmtVel(0,f1.getMvmtVel()[1]); //remove horizontal momentum\r\n f1.setKnockBackVel(0,f1.getKnockBackVel()[1]); //remove horizontal knockback\r\n \r\n }\r\n }",
"public void moveForward(){\n\t\tSystem.out.println(\"Vehicle moved forward\");\n\t}",
"public void move(Fish fish, Pond pond, double x, double y)\n\t{\n double[] location = pond.findNearestPlant(x, y);\n fish.swimTowards(location[0], location[1]);\n\t}",
"public void frontUp(){\n frontSolenoid.set(DoubleSolenoid.Value.kForward);\n }",
"public void fly(){\n\t\t\n\t\t//If bird is facing up.\n\t\tif (i == 0){\n\t\t\t\n\t\t\t//Move up one position and change direction (i).\n\t\t\tsuper.p.y = super.p.y - 1;\n\t\t\ti = 1;\n\t\t\t\n\t\t\t//If bird is facing to the left.\n\t\t\t} else if (i == 1){\n\t\t\n\t\t\t//Move to the left one position and change direction (i).\n\t\t\tsuper.p.x = super.p.x - 1;\n\t\t\ti = 2;\n\t\t\t\n\t\t\t//If bird is facing down.\n\t\t\t} else if (i == 2){\n\t\t\n\t\t\t//Move down right one position and change direction (i).\n\t\t\tsuper.p.y = super.p.y + 1;\n\t\t\ti = 3;\n\t\t\t\n\t\t\t//If bird is facing to the right.\n\t\t\t} else if (i == 3){\n\t\t\n\t\t\t//Move to the right one position and change direction (i).\n\t\t\tsuper.p.x = super.p.x + 1;\n\t\t\ti = 0;\n\t\t}\n\t\t\n\t\t//Increase count of flights.\n\t\tsuper.countfly++;\n\t}",
"public void moveForward(double inches, double power){\n frontLeft.setPower(power);\n }",
"@Override\n\tpublic void moveForward() {\n\t\tSystem.out.println(\"Animal moved foreward\");\n\t}",
"public void moveLeft()\n\t{\n\t\tx = x - STEP_SIZE;\n\t}",
"private void scout() {\n\t\ttargetFlower = null;\n\t\t// fly to flower if nearby\n\t\tif(foundFlower()) {\n\t\t\tstate = \"TARGETING\";\n\t\t}\n\t\t// otherwise keep scouting\n\t\telse{\n\t\t\t// change angle randomly during flight\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/8, Math.PI/8);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"public void moveLeft() {\n locX = locX - 1;\n }",
"private void follow() {\n\t\t// calculate distance back to hive\n\t\tdouble distToHive = grid.getDistance(grid.getLocation(this),grid.getLocation(hive));\n\t\t// if close to flower from dance information, start scouting\n\t\tif(distToHive > followDist - 5) {\n\t\t\tstate = \"SCOUTING\";\n\t\t}\n\t\t// otherwise keep flying in direction of dance\n\t\telse{\n\t\t\t// deviate slightly from correct angle because bee's aren't perfect (I don't think)\n\t\t\tcurrentAngle += RandomHelper.nextDoubleFromTo(-Math.PI/50, Math.PI/50);\n\t\t\tspace.moveByVector(this, 4, currentAngle,0);\n\t\t\tNdPoint myPoint = space.getLocation(this);\n\t\t\tgrid.moveTo(this, (int) myPoint.getX(), (int) myPoint.getY());\n\t\t\tfood -= highMetabolicRate;\n\t\t}\n\t}",
"private void moveBack(){\r\n\t\tturnAround();\r\n\t\tmove();\r\n\t}",
"@Override\n\tpublic void goForward() {\n\t\t// check side and move the according room and side\n\t\tif (side.equals(\"hRight\")) {\n\t\t\tthis.side = \"bFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"hFront\")) {\n\t\t\tthis.side = \"mFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"bLeft\")) {\n\t\t\tthis.side = \"rLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(4);\n\n\t\t} else if (side.equals(\"rBack\")) {\n\t\t\tthis.side = \"bBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(3);\n\n\t\t} else if (side.equals(\"bBack\")) {\n\t\t\tthis.side = \"hLeft\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else if (side.equals(\"kBack\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"lLeft\")) {\n\t\t\tthis.side = \"kRight\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(6);\n\n\t\t} else if (side.equals(\"lBack\")) {\n\t\t\tthis.side = \"mBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(2);\n\n\t\t} else if (side.equals(\"mFront\")) {\n\t\t\tthis.side = \"lFront\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(5);\n\n\t\t} else if (side.equals(\"mBack\")) {\n\t\t\tthis.side = \"hBack\";\n\t\t\tthis.room = properties.getRoomFromProperties().get(1);\n\n\t\t} else {\n\t\t\trandomRoom();\n\t\t\tSystem.out.println(\"Entered Wormhole!\");\n\t\t\tSystem.out.println(\"Location was chosen at random\");\n\t\t\tSystem.out.println(\"New location is: \" + room + \" room and \" + side.substring(1) + \" side\");\n\n\t\t}\n\t}",
"private void moveFireball1() {\r\n\t\tif(count == 280 && dragon1 != null) {\r\n\t\t\tfireball1 = new GImage(\"fireball1.png\");\r\n\t\t\tadd(fireball1, dragon1.getX() - fireball1.getWidth(), dragon1.getY() + 10);\r\n\t\t\tcount = 0;\r\n\t\t}\r\n\t\tif(fireball1 != null) {\r\n\t\t\tfireball1.move(-FIREBALL_SPEED, 0);\r\n\t\t\t//checkWeaponCollisions(fireball1);\r\n\t\t\tfireball1Collisions();\r\n\t\t\tmoveOffScreen(fireball1);\r\n\t\t}\r\n\t}",
"public void fireBombs() {\n electricSide.set(Value.kForward);\n pneumaticSide.set(Value.kForward);\n }",
"public void move(){\n \n currentFloor = currentFloor + ( 1 * this.direction);\n //if we're at the bottom or top after move, flip the bit\n if(Elevator.MIN_FLOOR == currentFloor \n || currentFloor == Elevator.MAX_FLOOR)\n this.direction *= -1;\n \n if(destinedPassengers[ currentFloor ] > 0)\n elevatorStop( currentFloor, true );\n \n if(building.floor(currentFloor).passengersWaiting() > 0)\n elevatorStop(currentFloor, false);\n \n }",
"public void moveUp() {\n\t\tstate.updateFloor(state.getFloor()+1);\n\t}",
"public void nextFrame() {\n\t\tfor (int i = 0; i < numFlakes; i++) {\n\t\t\tflakes[i].nextFrame();\n\t\t}\n\t}",
"protected Vec3 maybeBackOffFromEdge(Vec3 debug1, MoverType debug2) {\n/* 1102 */ if (!this.abilities.flying && (debug2 == MoverType.SELF || debug2 == MoverType.PLAYER) && isStayingOnGroundSurface() && isAboveGround()) {\n/* 1103 */ double debug3 = debug1.x;\n/* 1104 */ double debug5 = debug1.z;\n/* 1105 */ double debug7 = 0.05D;\n/* */ \n/* */ \n/* */ \n/* */ \n/* 1110 */ while (debug3 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(debug3, -this.maxUpStep, 0.0D))) {\n/* 1111 */ if (debug3 < 0.05D && debug3 >= -0.05D) {\n/* 1112 */ debug3 = 0.0D; continue;\n/* 1113 */ } if (debug3 > 0.0D) {\n/* 1114 */ debug3 -= 0.05D; continue;\n/* */ } \n/* 1116 */ debug3 += 0.05D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1121 */ while (debug5 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(0.0D, -this.maxUpStep, debug5))) {\n/* 1122 */ if (debug5 < 0.05D && debug5 >= -0.05D) {\n/* 1123 */ debug5 = 0.0D; continue;\n/* 1124 */ } if (debug5 > 0.0D) {\n/* 1125 */ debug5 -= 0.05D; continue;\n/* */ } \n/* 1127 */ debug5 += 0.05D;\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1132 */ while (debug3 != 0.0D && debug5 != 0.0D && this.level.noCollision((Entity)this, getBoundingBox().move(debug3, -this.maxUpStep, debug5))) {\n/* 1133 */ if (debug3 < 0.05D && debug3 >= -0.05D) {\n/* 1134 */ debug3 = 0.0D;\n/* 1135 */ } else if (debug3 > 0.0D) {\n/* 1136 */ debug3 -= 0.05D;\n/* */ } else {\n/* 1138 */ debug3 += 0.05D;\n/* */ } \n/* */ \n/* 1141 */ if (debug5 < 0.05D && debug5 >= -0.05D) {\n/* 1142 */ debug5 = 0.0D; continue;\n/* 1143 */ } if (debug5 > 0.0D) {\n/* 1144 */ debug5 -= 0.05D; continue;\n/* */ } \n/* 1146 */ debug5 += 0.05D;\n/* */ } \n/* */ \n/* 1149 */ debug1 = new Vec3(debug3, debug1.y, debug5);\n/* */ } \n/* 1151 */ return debug1;\n/* */ }",
"void moveForward(Lawn lawn);",
"public void faceUp(){\r\n changePlace(hand);\r\n //do a magical work\r\n changePlace(graveYard);\r\n }",
"public void move() {\n energy -= 0.03;\n if (energy < 0) {\n energy = 0;\n }\n }",
"@Test\n void RookMoveOutOfBound() {\n Board board = new Board(8, 8);\n Piece rook = new Rook(board, 1, 5, 1);\n board.getBoard()[1][5] = rook;\n board.movePiece(rook, -1, 5);\n }",
"public void move(){\n\t\tif (currentFloor == TOTALFLOORS) currentDirection = \"DOWN\"; else currentDirection =\"UP\";\t\t//sets inital direction for the elevator.\n\t\tfor (int x = 1; x <= TOTALFLOORS; x++){\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//This loop will move the elevator through each floor. \n\t\t\tif (getTotalPassDestFloor()[currentFloor] >0 || destRequest[currentFloor] == 'Y')this.stop(); \t//Checks for the destined passengers or registered request for the current floor.\n\t\t\tif (currentDirection == \"UP\") currentFloor++; else currentFloor--;\t\t\t\t\t\t\t//Moves the elevator up/down based on the direction\n\t\t}\n\t\tif (currentFloor == 8) currentFloor--;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//Adjusts currentfloor value when elevator-\n\t\tif (currentFloor == 0) currentFloor++;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//-is at first or top most floor\n\t}",
"public void move() {\n\t\tthis.position.stepForwad();\n\t\tthis.position.spin();\n\t}",
"public void move() {\r\n\t\tSystem.out.print(\"This animal moves forward\");\r\n\t}",
"private void reproduce(State s) {\r\n\t\tmoveToOpen(new WaTorCell(this.getBlock(), s, this.ageToReproduce, this.baseEnergy));\r\n\t}",
"void step () {\n if (gameOver)\n return;\n if (!isFalling) {\n // if last piece finished falling, spawn a new one\n spawnNewPiece();\n // if it can't move, game over\n if (!canMove(currentRow + 1, currentColumn)) {\n endGame();\n }\n updateView();\n }\n else if (canMove(currentRow + 1, currentColumn)) {\n currentRow += 1;\n updateView();\n } else {\n // the piece fell!\n isFalling = false;\n // draw current shape to the board\n drawCurrentToBoard();\n currentPiece.blocks = new int[currentPiece.blocks.length][currentPiece.blocks[0].length];\n increaseScore(board.clearFullRows(this));\n }\n }",
"@Test\n void RookMoveUp() {\n Board board = new Board(8, 8);\n Piece rook = new Rook(board, 5, 4, 1);\n\n board.getBoard()[5][4] = rook;\n\n board.movePiece(rook, 5, 2);\n\n Assertions.assertEquals(rook, board.getBoard()[5][2]);\n Assertions.assertNull(board.getBoard()[5][4]);\n }",
"public void laserMoveUp()\r\n\t{\r\n\r\n\t\tif (y > 0)\r\n\t\t\ty -= 20;\r\n\r\n\t\telse\r\n\t\t\tdestroyed = true;\r\n\r\n\t}",
"public void moveLeft()\n {\n if (this.x >= 2) {\n --x;\n } else {\n System.out.println(\"Move is outside of the field! Try again.\");\n }\n }",
"public void moveLeft()\n\t{\n\t\tcol--;\n\t}",
"void moveFront()\n\t{\n\t\tif (length != 0)\n\t\t {\n\t\t\tcursor = front;\n\t\t\tindex = 0; //cursor will be at the front\n\t\t\t\n\n\t\t}\n\t}",
"public void act()\n {\n // Make sure fish is alive and well in the environment -- fish\n // that have been removed from the environment shouldn't act.\n if ( isInEnv() ) \n move();\n }",
"public void makesHereBack(){this.piece.affect();}",
"private boolean foundFlower() {\n\t\t// get the grid location of this Bee\n\t\tGridPoint myPoint = grid.getLocation(this);\n\t\tGridPoint theirPoint;\n\t\t\n\t\t// if the bee is within range of a flower's size, target that flower\n\t\tfor(int i=0; i<flowers.size(); i++){\n\t\t\ttheirPoint = grid.getLocation(flowers.get(i));\n\t\t\tif(grid.getDistance(myPoint, theirPoint) < (flowers.get(i).size/100.0)){\n\t\t\t\ttargetFlower = flowers.get(i);\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void fly() {\n\t\tsuper.fly();\r\n\t\tsuper.fly();\r\n\t\tsuper.fly();\r\n\t}",
"public boolean placeFlower(World world, int x, int z, EnumType flowerType) {\n\t\tBlockPos topPos = world.getTopSolidOrLiquidBlock(new BlockPos(x, 64, z));\n\t\tif (topPos.getY() == -1) {\n\t\t\treturn false;\n\t\t}\n\n\t\t// If the surface can sustain this plant, go ahead and plant it\n\t\tIBlockState surface = world.getBlockState(topPos.down(1));\n\t\tif (canSustainBush(surface)) {\n\t\t\tworld.setBlockState(topPos, this.getDefaultState().withProperty(TYPE, flowerType));\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"@SuppressWarnings(\"unused\")\r\n\tprivate void planTower(Direction freeDirection) throws GameActionException {\r\n\t\tstairs.clear();\r\n\t\tstairs.add(fluxInfo.location);\r\n\t\tif (true) return;\r\n\t\t\r\n\t\tList<MapLocation> blocks = new ArrayList<MapLocation>(Arrays.asList(myRC.senseNearbyBlocks()));\r\n\t\tint howMany = 0;\r\n\t\tint towerSize = 0;\r\n\t\tfor (MapLocation blockLocation : blocks) {\r\n\t\t\thowMany += myRC.senseNumBlocksAtLocation(blockLocation);\r\n\t\t}\r\n\t\t\r\n\t\tstairs.add(fluxInfo.location);\r\n\t\ttowerSize++;\r\n\t\thowMany -= 2;\r\n\t\t\r\n\t\tDirection towerDirection = freeDirection.rotateRight().rotateRight();\r\n\t\twhile ((howMany > 0) && (towerDirection != freeDirection)){\r\n\t\t\tstairs.add(1, fluxInfo.location.add(towerDirection));\r\n\t\t\ttowerSize++;\r\n\t\t\thowMany -= towerSize * 2;\r\n\t\t\ttowerDirection = towerDirection.rotateRight();\r\n\t\t}\r\n\t\t\r\n\t\tCollections.reverse(stairs);\r\n\t}",
"private void arretes_fW(){\n\t\tthis.cube[4] = this.cube[1]; \n\t\tthis.cube[1] = this.cube[3];\n\t\tthis.cube[3] = this.cube[7];\n\t\tthis.cube[7] = this.cube[5];\n\t\tthis.cube[5] = this.cube[4];\n\t}",
"static void soldier() throws GameActionException {\n \tmoveToEdgeOfBase(true);\n\t\twhile (true) {\n\t\t\tClock.yield();\n\t\t}\n }",
"public void moveForward(boolean endWithBrake){\r\n \r\n Motor.B.rotate(DEGREES_PER_TILE, true);//Accesses Motor thread\r\n Motor.C.rotate(DEGREES_PER_TILE, true);\r\n while(Motor.B.isMoving() || Motor.C.isMoving())\r\n ;//wait for motors to be done\r\n return;\r\n }",
"protected void moveWest(){\n\t\tcar.setXLocation(currentX - 1);\n\t\tcurrentX -= 1;\n\t}",
"public void pushFront(IClause c) {\n tab[front--] = c;\n if (front < 0)\n front = tab.length - 1;\n\n if (back + 1 == front || (front == 0 && back == tab.length - 1))\n throw new BufferOverflowException();\n }",
"public void liftOff() {\n\t\tL.trace(\"liftOff\");\n\t\tif (canFly()) {\n\t\t\tjump();\n\t\t}\n\t}",
"public void moveTileBack()\n {\n if(!(activeTile-1 < 0) && activeTile > 0)\n {\n Tile tmpTile = tiles[activeTile];\n PImage tmpPreview = previews[activeTile];\n PImage tmpPreviewGradients = previewGradients[activeTile];\n boolean tmpPreviewHover = previewHover[activeTile];\n \n tiles[activeTile-1].setStartColor(tmpTile.getStartColor());\n tiles[activeTile-1].setEndColor(tmpTile.getEndColor());\n tmpTile.setStartColor(tiles[activeTile-1].getStartColor());\n tmpTile.setEndColor(tiles[activeTile-1].getEndColor());\n \n tiles[activeTile-1].setTileLevel(tiles[activeTile-1].getTileLevel()+1);\n tiles[activeTile] = tiles[activeTile-1];\n previews[activeTile] = previews[activeTile-1];\n previewGradients[activeTile] = previewGradients[activeTile-1];\n previewHover[activeTile] = previewHover[activeTile-1];\n \n \n tmpTile.setTileLevel(tmpTile.getTileLevel()-1);\n tiles[activeTile-1] = tmpTile;\n tiles[activeTile-1].setStartColor(tiles[activeTile-1].getStartColor());\n previews[activeTile-1] = tmpPreview;\n previewGradients[activeTile-1] = tmpPreviewGradients;\n previewHover[activeTile-1] = tmpPreviewHover;\n \n activeTile -= 1;\n createPreviewGradients();\n }\n }",
"private void moveForwards() {\n\t\tposition = MoveAlgorithmExecutor.getAlgorithmFromCondition(orientation).execute(position);\n\t\t\n\t\t// Extracted the condition to check if tractor is in Ditch\n\t\tif(isTractorInDitch()){\n\t\t\tthrow new TractorInDitchException();\n\t\t}\n\t}",
"public void performFly(){\n fb.fly();\n }",
"@Override\n public void moveTowards(int destination) throws FragileItemBrokenException {\n if(delaying){\n delaying = false;\n } else {\n super.moveTowards(destination);\n delaying = true;\n }\n }",
"private void alternateBeeper(){\n\t\tputBeeper();\n\t\tif(frontIsClear()){\n\t\tmove();\n\t\t}\n\t\tif(frontIsClear()){\n\t\t\tmove();\n\t\t} \n\t}",
"public void lower() {\n fangSolenoid.set(DoubleSolenoid.Value.kForward);\n }",
"public void throwBall() {\r\n\t\tthis.move();\r\n\t\tballCount--;\r\n\r\n\t}",
"public void uTurnFormation() {\n // First, move all troops down column wise\n for (int j = 0; j < width; j ++) {\n for (int i = 0; i < depth; i++) {\n if (aliveTroopsFormation[i][j] == null) {\n int numSteps = depth - i;\n for (int rev = depth - 1; rev >= numSteps; rev--) {\n swapTwoTroopPositions( rev - numSteps, j, rev, j);\n }\n break;\n }\n }\n }\n\n // Then reverse the order\n for (int index = 0; index < width * depth / 2; index++) {\n int row = index / width;\n int col = index % width;\n swapTwoTroopPositions(row, col, depth - row - 1, width - col - 1);\n }\n\n // Reset the flankers\n resetFlanker();\n }",
"@Override\n\tpublic void moveForward(int inches) throws ObstacleHitException {\n\t\t\n\t}",
"@Override\r\n\tpublic void goForward() {\n\t\t\r\n\t}",
"public void moveForwardOneBlock() {\n\t\tBlockInterface nextBlock = this.currentBlock.goesto(previousBlock);\n\t\tthis.previousBlock = this.currentBlock;\n\t\tthis.currentBlock = nextBlock;\n\t\tif(nextBlock instanceof BlockStation){\n\t\t\tString nbname = ((BlockStation)nextBlock).getStationName();\n\t\t\tif(schedule.containsKey(nbname)){\n\t\t\t\tschedule.remove(nbname);\n\t\t\t\t((SchedulePane)c.schedulepane).reloadSchedual();\n\t\t\t}\n\t\t}\n\t}",
"public void backUp(){\n backSolenoid.set(DoubleSolenoid.Value.kForward);\n }",
"public void moveLeft() {\n\t\t\n\t}",
"public void advanceFloor(){\n //TODO: write method to move onto next floor\n }",
"public void moveUp()\n\t{\n\t\ty = y - STEP_SIZE;\n\t}",
"public void moveBomber(){\n\t\t\t\n\t\t\tif (startredtimer) redtimer++;\n\t\t\tif (redtimer > 5) {\n\t\t\t\tredtimer = 0;\n\t\t\t\tstartredtimer = false;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tif (rand.nextInt(21) == 20){ //controls the switching of directions\n\t\t\t\tif (direction == 1) direction = 0;\n\t\t\t\telse if (direction == 0) direction = 1;\n\t\t\t}\n\t\t\tif (direction == 1){ //actually moves the plain\n\t\t\t\tx += 10;\n\t\t\t\tr = true;\n\t\t\t}\n\t\t\telse if (direction == 0){\n\t\t\t\tx -= 10;\n\t\t\t\tr = false;\n\t\t\t}\n\t\t\t\n\t\t\tif (x <= 0) x = 992; //handles the ofscrean plane\n\t\t\telse if ( x >= 992) x = 0;\n\t\t\t\n\t\t\tthis.setBounds(x,y,100,50); //updates the bounds\n\t\t\t\n\t\t}",
"@Test\n void RookMoveLeft() {\n Board board = new Board(8, 8);\n Piece rook = new Rook(board, 5, 5, 1);\n\n board.getBoard()[5][5] = rook;\n\n board.movePiece(rook, 1, 5);\n\n Assertions.assertEquals(rook, board.getBoard()[1][5]);\n Assertions.assertNull(board.getBoard()[5][5]);\n }",
"public void moveRobber(HexLocation loc) {\n\n\t}",
"public Direction movePinky(Ghost g);",
"public void move()\n {\n daysSurvived+=1;\n\n energy -= energyLostPerDay;\n\n Random generator = new Random();\n\n //losowo okreslony ruch na podstawie genomu\n int turnIndex = generator.nextInt((int)Math.ceil(Genome.numberOfGenes));\n int turn = genome.getGenome().get(turnIndex);\n\n //wywolujemy metode obrotu - dodaje odpowiednio liczbe do aktualnego kierunku\n direction.turn(turn);\n\n //zmieniamy pozycje zwierzaka przez dodanie odpowiedniego wektora\n position = position.add(direction.move());\n //walidacja pozycji tak, by wychodzac za mape byc na mapie z drugiej strony\n position.validatePosition(map.getWidth(),map.getHeight());\n\n moveOnSimulation();\n\n //jesli po ruchu zwierzaczek nie ma juz energii na kolejny ruch\n if(energy < energyLostPerDay )\n {\n this.animalHungry = true;\n }\n }"
]
| [
"0.69086903",
"0.6875838",
"0.6756886",
"0.62560964",
"0.6204533",
"0.61993456",
"0.602484",
"0.5981714",
"0.59634155",
"0.5945705",
"0.5863505",
"0.58079463",
"0.5800861",
"0.5794943",
"0.5766349",
"0.5761529",
"0.5750345",
"0.57409793",
"0.5724312",
"0.5712281",
"0.56904507",
"0.5658529",
"0.56521237",
"0.5650339",
"0.56418616",
"0.56291574",
"0.5607087",
"0.5596134",
"0.55793494",
"0.557186",
"0.5558608",
"0.5546378",
"0.55453706",
"0.55115354",
"0.55105335",
"0.54978037",
"0.5495015",
"0.54815793",
"0.54762036",
"0.546469",
"0.5455794",
"0.54519045",
"0.54499936",
"0.5435566",
"0.54303724",
"0.542862",
"0.54239327",
"0.54155165",
"0.5412664",
"0.54028577",
"0.5394303",
"0.5389069",
"0.53876466",
"0.5383006",
"0.53796047",
"0.5374475",
"0.5371839",
"0.5369638",
"0.5350941",
"0.5340809",
"0.53356504",
"0.53288454",
"0.53272855",
"0.53157884",
"0.5315535",
"0.53002715",
"0.52952737",
"0.5293454",
"0.5290646",
"0.5289981",
"0.52815944",
"0.5281539",
"0.52787775",
"0.52725935",
"0.5267315",
"0.5259928",
"0.5255601",
"0.525288",
"0.5250695",
"0.5247449",
"0.5246201",
"0.524052",
"0.5234253",
"0.52336365",
"0.5226193",
"0.5219844",
"0.5215506",
"0.5212136",
"0.52121186",
"0.5211155",
"0.52101266",
"0.5208285",
"0.5207516",
"0.5205466",
"0.5204867",
"0.520457",
"0.52039135",
"0.5193883",
"0.5191078",
"0.51891106"
]
| 0.6425735 | 3 |
A timer, so info can be displayed at the beginning of every battle Creates a new battle against a trainer, reading in a Pokemon from a file. | public BattleWorld(int enemyPokemonID)
{
wildPokemon = false;
isBattleOver = false;
initWorld("", 0, enemyPokemonID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}",
"public void timer()\n {\n if(exists == true)\n { \n if(counter < 500) \n { \n counter++; \n } \n else \n { \n Greenfoot.setWorld(new Test()); \n exists = false; \n } \n } \n }",
"public void pickUpTimer()\r\n\t{\t\t\r\n\t\tSystem.out.println(timer.get());\r\n\t\tif(timer.get() < Config.Auto.timeIntakeOpen)\r\n\t\t{\r\n\t\t\t//claw.openClaw();\r\n\t\t\tSystem.out.println(\"in second if\");\r\n\t\t}\r\n\t\t\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeElevatorStack)\r\n\t\t{\r\n\t\t\t//elevator.setLevel(elevatorLevel);\r\n\t\t\t//elevatorLevel++;\r\n\t\t}\r\n\t\t\r\n\t\telse if(timer.get() < Config.Auto.timeIntakeClose)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"in first if\");\r\n\t\t\t//claw.closeClaw();\r\n\t\t}\r\n\t\t\r\n\t\telse\r\n\t\t\tendRoutine();\r\n\t}",
"public void play() throws FileNotFoundException, IOException, Throwable {\n Time time = new Time();\n initGame();\n printWelcome();\n time.start();\n data.logWrite(System.lineSeparator() + System.lineSeparator() + \" >>> Starting new game <<< \" + System.lineSeparator() + System.lineSeparator());\n\n boolean finished = false;\n\n while (!finished) {\n Command command = parser.getCommand();\n finished = processCommand(command);\n }\n time.stopTime();\n System.out.println(\"Thank you for playing. Good bye.\" + \"\\n\" + \"You spend: \" + Time.getSecondsPassed() + \" seconds playing the game\");\n //added to shutdown\n System.exit(0);\n }",
"public void createTimer() {\n timer = new AnimationTimer() {\n @Override\n public void handle(long now) {\n if (animal.changeScore()) {\n setNumber(animal.getPoints());\n }\n if (animal.getStop()) {\n System.out.println(\"Game Ended\");\n background.stopMusic();\n stop();\n background.stop();\n\n ArrayList list = null;\n try {\n list = scoreFile.sortFile(animal.getPoints());\n } catch (IOException e) {\n e.printStackTrace();\n }\n popUp(list);\n }\n }\n };\n }",
"public void act()\r\n {\r\n if(worldTimer == 1)\r\n {\r\n if(wildPokemon)\r\n {\r\n textInfoBox.displayText(\"Wild \" + enemyPokemon.getName() + \" appeared!\", true, false);\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(\"Enemy trainer sent out \" + enemyPokemon.getName() + \"!\", true, false);\r\n }\r\n textInfoBox.displayText(\"Go \" + playerPokemon.getName() + \"!\", true, false);\r\n textInfoBox.updateImage();\r\n\r\n worldTimer++;\r\n }\r\n else if(worldTimer == 0)\r\n {\r\n worldTimer++;\r\n }\r\n\r\n if(getObjects(Pokemon.class).size() < 2)\r\n {\r\n ArrayList<Pokemon> pokemon = (ArrayList<Pokemon>) getObjects(Pokemon.class);\r\n for(Pokemon pkmn : pokemon)\r\n {\r\n if(pkmn.getIsPlayers() == true)\r\n {\r\n textInfoBox.displayText(\"Enemy \" + enemyPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n int expGain = StatCalculator.experienceGainCalc(playerPokemon.getName(), playerPokemon.getLevel());\r\n textInfoBox.displayText(playerPokemon.getName().toUpperCase() + \" gained \" + expGain + \"\\nEXP. Points!\", true, false);\r\n playerPokemon.addEXP(expGain);\r\n if(playerPokemon.getCurrentExperience() >= StatCalculator.experienceToNextLevel(playerPokemon.getLevel()))\r\n {\r\n int newEXP = playerPokemon.getCurrentExperience() - StatCalculator.experienceToNextLevel(playerPokemon.getLevel());\r\n playerPokemon.setEXP(newEXP);\r\n playerPokemon.levelUp();\r\n playerPokemon.newPokemonMoves();\r\n\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" grew to level \" + playerPokemon.getLevel() + \"!\", true, false);\r\n }\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n\r\n textInfoBox.updateImage();\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n String playerName = Reader.readStringFromFile(\"gameInformation\", 0, 0);\r\n textInfoBox.displayText(playerName + \" blacked out!\", true, false);\r\n\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n String newWorld = Reader.readStringFromFile(\"gameInformation\", 0, 4);\r\n int newX = Reader.readIntFromFile(\"gameInformation\", 0, 5);\r\n int newY = Reader.readIntFromFile(\"gameInformation\", 0, 6);\r\n\r\n GameWorld gameWorld = new GameWorld(newWorld, newX, newY, \"Down\");\r\n gameWorld.healPokemon();\r\n Greenfoot.setWorld(gameWorld);\r\n\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n }\r\n } \r\n\r\n if(isBattleOver)\r\n {\r\n isPlayersTurn = true;\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n newGameWorld();\r\n }\r\n }",
"public void fill(String thing){\n try{\n \n FileReader fr = new FileReader(\"src//monsters//\" + thing + \".txt\");\n BufferedReader br = new BufferedReader(fr);\n //the monster's name\n String monName = br.readLine();\n lblMonName.setText(monName);\n \n //monster's health\n String h = br.readLine();\n monHealth = Integer.parseInt(h); \n //loop to load up the health onto the health bar\n String H = \"\"; \n for(int i = 0; i < monHealth; i++){\n H += \"❤ \";\n }\n lblMonHealth.setText(H);\n \n //Monster's attack stats\n String f = br.readLine();\n String e = br.readLine();\n String i = br.readLine();\n String w = br.readLine();\n monFire = Double.parseDouble(f);\n monEarth = Double.parseDouble(e);\n monIce = Double.parseDouble(i);\n monWater = Double.parseDouble(w);\n //displays the monster's stats\n lblMonStats.setText(\"Earth: \" + monEarth + \"\\nFire: \" + monFire + \"\\nWater: \" + monWater + \"\\nIce: \" + monIce);\n \n //the amount of XP the player will gain if this monster is defeated\n String x = br.readLine();\n expGain = Integer.parseInt(x);\n \n //creates a new monster to hold all of this information for referance later\n m = new monster(thing, monFire, monEarth, monIce, monWater, monHealth);\n }catch(IOException e){\n //if something goes wrong, you will find it here\n System.out.println(e + \": Error reading monster file: \" + thing);\n }\n \n //set the image of the monster - depends on what level the user is at\n ImageIcon im = new ImageIcon(\"src//elementals//images//\" + thing + \".png\");\n lblMonster.setIcon(im);\n \n //set the players box to their color\n lblPlayer.setBackground(c.getUserColor());\n \n }",
"public void run(){\n SimpleDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\"); \n Date date = new Date(); \n \n String formatted_date = formatter.format((date)); \n \n if(TimeInRange(formatted_date)){\n \n String DailyReport = BuildDailyReport();\n String InventoryReport = BuildInventoryReport();\n \n sprinter.PrintDailyReport(DailyReport);\n sprinter.PrintInventoryReport(InventoryReport);\n \n } \n \n //Cancel current.\n timer.cancel();\n \n //Start a newone.\n TimerDevice t = new TimerDevice();\n \n }",
"public void play() \n { \n if (!gameLoaded)\n {\n String msg = \"The game has not been loaded\";\n System.out.println(msg);\n SystemLog.getErrorLog().writeToLog(msg);\n SystemLog.saveAllLogs();\n return;\n }\n \n // Setup Timer\n timer = new Timer();\n timer.schedule(timeHolder, 0, 1000);\n \n // Setup user input\n parser = new Parser();\n }",
"public static void battleStatus(){\n Program.terminal.println(\"________________TURN \"+ turn +\"________________\");\n Program.terminal.println(\"\");\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\" |Name:\"+ currentMonster.name);\n Program.terminal.println(\" |HP: \" + currentMonster.currentHp+\"/\"+currentMonster.hp);\n Program.terminal.println(\" |\" + barGauge(1));\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\"\");\n Program.terminal.println(\"My HP:\" + MainCharacter.hpNow +\"/\"+ MainCharacter.hpMax + \" \" + barGauge(2));\n Program.terminal.println(\"My MP:\" + MainCharacter.mpNow +\"/\"+ MainCharacter.mpMax + \" \" + barGauge(3));\n Program.terminal.println(\"\");\n askAction();\n }",
"public Game() throws IOException\n\t {\n\t\t //reading the game.txt file \n\t\t try\n\t\t\t{\n\t\t\t \tHeliCopIn = new Scanner(HeliCopFile);\n\t\t\t\tString line = \"\";\n\t\t\t\twhile ( HeliCopIn.hasNext() )\n\t\t\t\t{\n\t\t\t\t\tline = HeliCopIn.nextLine();\n\t\t\t\t\tStringTokenizer GameTokenizer = new StringTokenizer(line);\n\t\t\t\t\tif ( !GameTokenizer.hasMoreTokens() || GameTokenizer.countTokens() != 5 )\n\t\t\t\t\t{\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tint XCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint YCoord = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint health = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumRocketsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tint NumBulletsStart = Integer.parseInt(GameTokenizer.nextToken());\n\t\t\t\t\tif (Player.Validate(line) == true)\n\t\t\t\t\t{\n\t\t\t\t\t\t//creating a new player and initialising the number of bullets; \n\t\t\t\t\t pl = new Player(XCoord,YCoord,health,NumRocketsStart,NumBulletsStart); \n\t\t\t\t\t pl.NumBullets = pl.GetNumBulletsStart(); \n\t\t\t\t\t pl.NumRockets = pl.GetnumRocketsStart(); \n\t\t\t\t\t \n\t\t\t\t\t//\tSystem.out.println(XCoord) ;\n\t\t\t\t\t\t//System.out.println(YCoord) ;\n\t\t\t\t\t\t//System.out.println(health) ;\n\t\t\t\t\t\t//System.out.println(NumRocketsStart) ;\n\t\t\t\t\t\t//System.out.println(NumBulletsStart) ;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (FileNotFoundException ex)\n\t\t\t{\n\t\t\t\tex.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tfinally\n\t\t\t{\n\t\t\t\tif ( HeliCopIn != null )\n\t\t\t\t{\n\t\t\t\t\tHeliCopIn.close();\n\t\t\t\t}\n\t\t\t}\n\t\t \n\t\t \n\t\t //loading the background image and explosion image\n\t\t try {\n\t\t\t\tBackGround = ImageIO.read(new File(\"images\\\\finalcloud.jpg\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tExplosion = ImageIO.read(new File(\"images\\\\explosion.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameOver = ImageIO.read(new File(\"images\\\\gameover.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\t\n\t\t\ttry {\n\t\t\t\tGameWin = ImageIO.read(new File(\"images\\\\gamewin.gif\"));\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\n\t\t\t\t\t\t\t\t\t\n\t\t\tupdate();\n\t\t\t\n\t\t\tint del = 2000; \n\t\t // createEnemyHelicopter(); \n\t\t\ttime = new Timer(del , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tcreateEnemyHelicopter(); \n\t\t\t\t\t\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t});\n\t\t\ttime.start();\n\t\t\t\n\t\t\ttime = new Timer(delay , new ActionListener()\n\t\t\t{\n\t\t\t\t@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t\t{\n\t\t\t\t\tif (GameOn==true ){\n\t\t\t\t\t\t updateEnemies(); \n\t\t\t\t \t UpdateBullets(); \n\t\t\t\t \t UpdateRockets(); \n\t\t\t\t \t pl.Update(); \n\t\t\t\t \t repaint();\n\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t \t try {\n\t\t\t\t\t\tWiriteToBinary();\n\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\n\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t} \n\t\t\t\t}\n\n\t\t\t});\n\t\t\ttime.start();\n\t\t\n\t\t\t//WiriteToBinary(); \n\t\t\t\n\t }",
"public void startTimer(){\n timer = System.currentTimeMillis();\n System.out.println(\"Receiving file \\'sendingFile.txt\\' for the \" + (fileCount)+ \" time\");\n }",
"public void play() {\n //Set up the timer if needed\n if (!dataGame.isTrainingMode()) {\n timer = new Timer();\n secondsPassed = 65;\n TimerTask task = new TimerTask() {\n public void run() {\n secondsPassed--;\n //Before the game starts, countdown:\t\t\t\t\t\n if (secondsPassed > 63) {\n dataGame.notifyObserverTime(\"Be ready !\");\n } else if (secondsPassed == 63) {\n dataGame.notifyObserverTime(Integer.toString(3));\n } else if (secondsPassed == 62) {\n dataGame.notifyObserverTime(Integer.toString(2));\n } else if (secondsPassed == 61) {\n dataGame.notifyObserverTime(Integer.toString(1));\n } else if (secondsPassed == 60) {\n dataGame.notifyObserverTime(\"GO !\");\n pickNewWord();\n } else if (secondsPassed == 0) {\n dataGame.notifyObserverTime(\"STOP\");\n stop(false);\n } else {\n dataGame.notifyObserverTime(Integer.toString(secondsPassed));\n }\n }\n };\n timer.scheduleAtFixedRate(task, 100, 1000); //After 100ms, the timer starts, it decreases every seconds\n } else {\n pickNewWord();\n }\n }",
"private void trackerTimer() {\n\n Thread timer;\n timer = new Thread() {\n\n @Override\n public void run() {\n while (true) {\n\n if (Var.timerStart) {\n try {\n Var.sec++;\n if (Var.sec == 59) {\n Var.sec = 0;\n Var.minutes++;\n }\n if (Var.minutes == 59) {\n Var.minutes = 0;\n Var.hours++;\n }\n Thread.sleep(1000);\n } catch (Exception cool) {\n System.out.println(cool.getMessage());\n }\n\n }\n timerText.setText(Var.hours + \":\" + Var.minutes + \":\" + Var.sec);\n }\n\n }\n };\n\n timer.start();\n }",
"public void run() {\n\t\tif (timeToStart > 0 && timeToStart <= 3) {\n\t\t\tfor (Player online : PlayersUtil.getPlayers()) {\n\t\t\t\tonline.sendMessage(Main.prefix() + \"UHC is starting in §6\" + String.valueOf(timeToStart) + \"§7.\");\n\t\t\t\tonline.playSound(online.getLocation(), Sound.SUCCESSFUL_HIT, 1, 0);\n\t\t\t}\n\t\t}\n\t\t\n\t\tif (timeToStart == 1) {\n\t\t\tMain.stopCountdown();\n\t\t\tBukkit.getServer().getScheduler().scheduleSyncDelayedTask(Main.plugin, new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tfor (Player online : PlayersUtil.getPlayers()) {\n\t\t\t\t\t\tonline.playSound(online.getLocation(), Sound.SUCCESSFUL_HIT, 1, 1);\n\t\t\t\t\t\tif (ArrayUtil.spectating.contains(online.getName())) {\n\t\t\t\t\t\t\tSpectator.getManager().set(online, false);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonline.setAllowFlight(false);\n\t\t\t\t\t\tonline.setFlying(false);\n\t\t\t\t\t\tonline.setHealth(20.0);\n\t\t\t\t\t\tonline.setFireTicks(0);\n\t\t\t\t\t\tonline.setSaturation(20);\n\t\t\t\t\t\tonline.setLevel(0);\n\t\t\t\t\t\tonline.setExp(0);\n\t\t\t\t\t\tif (!ArrayUtil.spectating.contains(online.getName())) {\n\t\t\t\t\t\t\tonline.showPlayer(online);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonline.awardAchievement(Achievement.OPEN_INVENTORY);\n\t\t\t\t\t\tonline.setFoodLevel(20);\n\t\t\t\t\t\tonline.getInventory().clear();\n\t\t\t\t\t\tonline.getInventory().setArmorContents(null);\n\t\t\t\t\t\tonline.setItemOnCursor(new ItemStack (Material.AIR));\n\t\t\t\t\t\t\n\t\t\t\t\t\tif (online.getGameMode() != GameMode.SURVIVAL) {\n\t\t\t\t\t\t\tonline.setGameMode(GameMode.SURVIVAL);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tfor (PotionEffect effect : online.getActivePotionEffects()) {\n\t\t\t\t\t\t\tonline.removePotionEffect(effect.getType());\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tonline.addPotionEffect(new PotionEffect(PotionEffectType.DAMAGE_RESISTANCE, 250, 100));\n\t\t\t\t\t\tonline.addPotionEffect(new PotionEffect(PotionEffectType.SATURATION, 6000, 100));\n\t\t\t\t\t\tonline.sendMessage(Main.prefix() + \"UHC has now started, Good luck!\");\n\t\t\t\t\t\tonline.sendMessage(Main.prefix() + \"PvP will be enabled in §6\" + Settings.getInstance().getData().getInt(\"game.pvp\") + \" §7mins in.\");\n\t\t\t\t\t\tonline.sendMessage(Main.prefix() + \"Meetup at §6\" + Settings.getInstance().getData().getInt(\"game.meetup\") + \" §7mins in.\");\n\t\t\t\t\t\tonline.sendMessage(Main.prefix() + \"Remember to read the match post: \" + Settings.getInstance().getData().getString(\"match.post\"));\n\t\t\t\t\t\tonline.sendMessage(Main.prefix() + \"/helpop questions.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tGameState.setState(GameState.INGAME);\n\t\t\t\t\tScoreboards.getManager().setScore(\"§a§lPvE\", 1);\n\t\t\t\t\tScoreboards.getManager().setScore(\"§a§lPvE\", 0);\n\t\t\t\t\tScoreboards.getManager().setScore(\"§b§lMeetup\", Integer.parseInt(\"-\" + Settings.getInstance().getData().getInt(\"game.meetup\")));\n\t\t\t\t\tScoreboards.getManager().setScore(\"§b§lPvP\", Integer.parseInt(\"-\" + Settings.getInstance().getData().getInt(\"game.pvp\")));\n\t\t\t\t\tScoreboards.getManager().setScore(\"§b§lFinal heal\", -1);\n\t\t\t\t\t\n\t\t\t\t\tfor (World world : Bukkit.getWorlds()) {\n\t\t\t\t\t\tworld.setTime(0);\n\t\t\t\t\t\tworld.setDifficulty(Difficulty.HARD);\n\t\t\t\t\t\tworld.setPVP(false);\n\t\t\t\t\t\tfor (Entity mobs : world.getEntities()) {\n\t\t\t\t\t\t\tif (mobs.getType() == EntityType.BLAZE ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.CAVE_SPIDER ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.CREEPER ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.ENDERMAN ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.ZOMBIE ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.WITCH ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.WITHER ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.DROPPED_ITEM ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.GHAST ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.GIANT ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.MAGMA_CUBE ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.DROPPED_ITEM ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.SKELETON ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.SPIDER ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.SLIME ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.SILVERFISH ||\n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.SKELETON || \n\t\t\t\t\t\t\t\t\tmobs.getType() == EntityType.EXPERIENCE_ORB) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tmobs.remove();\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}, 20);\n\t\t\t\n\t\t\tBukkit.getServer().getScheduler().scheduleSyncRepeatingTask(Main.plugin, new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif (Scoreboards.getManager().getScoreType(\"§b§lFinal heal\") != null) {\n\t\t\t\t\t\tif ((Scoreboards.getManager().getScore(\"§b§lFinal heal\") + 1) == 0) {\n\t\t\t\t\t\t\tScoreboards.getManager().resetScore(\"§b§lFinal heal\");\n\t\t\t\t\t\t\tfor (Player online : PlayersUtil.getPlayers()) {\n\t\t\t\t\t\t\t\tonline.sendMessage(Main.prefix() + \"§6§lFinal heal!\");\n\t\t\t\t\t\t\t\tonline.playSound(online.getLocation(), Sound.NOTE_PLING, 1, 0);\n\t\t\t\t\t\t\t\tonline.setHealth(20.0);\n\t\t\t\t\t\t\t\tonline.setFireTicks(0);\n\t\t\t\t\t\t\t\tonline.setFoodLevel(20);\n\t\t\t\t\t\t\t\tonline.setSaturation(20);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((Scoreboards.getManager().getScore(\"§b§lFinal heal\") + 1) < 0) {\n\t\t\t\t\t\t\t\tScoreboards.getManager().setScore(\"§b§lFinal heal\", Scoreboards.getManager().getScore(\"§b§lFinal heal\") + 1);\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\tif (Scoreboards.getManager().getScoreType(\"§b§lPvP\") != null) {\n\t\t\t\t\t\tif ((Scoreboards.getManager().getScore(\"§b§lPvP\") + 1) == 0) {\n\t\t\t\t\t\t\tScoreboards.getManager().resetScore(\"§b§lPvP\");\n\t\t\t\t\t\t\tfor (Player online : PlayersUtil.getPlayers()) {\n\t\t\t\t\t\t\t\tonline.sendMessage(Main.prefix() + \"PvP is now enabled, Good luck everyone.\");\n\t\t\t\t\t\t\t\tonline.playSound(online.getLocation(), Sound.NOTE_PLING, 1, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tfor (World world : Bukkit.getWorlds()) {\n\t\t\t\t\t\t\t\tworld.setPVP(true);\n\t\t\t\t\t\t\t\tworld.setPVP(true);\n\t\t\t\t\t\t\t\tworld.setPVP(true);\n\t\t\t\t\t\t\t\tworld.setPVP(true);\n\t\t\t\t\t\t\t\tworld.setPVP(true);\n\t\t\t\t\t\t\t\tworld.setPVP(true);\n\t\t\t\t\t\t\t\tworld.setPVP(true);\n\t\t\t\t\t\t\t\tworld.setPVP(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((Scoreboards.getManager().getScore(\"§b§lPvP\") + 1) < 0) {\n\t\t\t\t\t\t\t\tScoreboards.getManager().setScore(\"§b§lPvP\", Scoreboards.getManager().getScore(\"§b§lPvP\") + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (Scoreboards.getManager().getScore(\"§b§lPvP\") == -5) {\n\t\t\t\t\t\t\t\tBukkit.broadcastMessage(Main.prefix() + \"5 minutes to pvp, do §6/stalk §7if you think you're being stalked.\");\n\t\t\t\t\t\t\t\tfor (Player online : PlayersUtil.getPlayers()) {\n\t\t\t\t\t\t\t\t\tonline.playSound(online.getLocation(), Sound.NOTE_PLING, 1, 0);\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 (Scoreboards.getManager().getScore(\"§b§lPvP\") == -1) {\n\t\t\t\t\t\t\t\tBukkit.broadcastMessage(Main.prefix() + \"1 minute to pvp, do §6/stalk §7if you think you're being stalked.\");\n\t\t\t\t\t\t\t\tfor (Player online : PlayersUtil.getPlayers()) {\n\t\t\t\t\t\t\t\t\tonline.playSound(online.getLocation(), Sound.NOTE_PLING, 1, 0);\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\n\t\t\t\t\tif (Scoreboards.getManager().getScoreType(\"§b§lMeetup\") != null) {\n\t\t\t\t\t\tif ((Scoreboards.getManager().getScore(\"§b§lMeetup\") + 1) == 0) {\n\t\t\t\t\t\t\tScoreboards.getManager().resetScore(\"§b§lMeetup\");\n\t\t\t\t\t\t\tfor (Player online : PlayersUtil.getPlayers()) {\n\t\t\t\t\t\t\t\tonline.sendMessage(ChatColor.DARK_GRAY + \"==============================================\");\t\t\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tonline.sendMessage(ChatColor.GREEN + \" Meetup has started, start headding to 0,0.\");\t\t\t\t\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t\tonline.sendMessage(ChatColor.GREEN + \" Only stop for a fight, nothing else.\");\n\t\t\t\t\t\t\t\tonline.sendMessage(ChatColor.DARK_GRAY + \"==============================================\");\n\t\t\t\t\t\t\t\tonline.playSound(online.getLocation(), Sound.WITHER_DEATH, 1, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tif ((Scoreboards.getManager().getScore(\"§b§lMeetup\") + 1) < 0) {\n\t\t\t\t\t\t\t\tScoreboards.getManager().setScore(\"§b§lMeetup\", Scoreboards.getManager().getScore(\"§b§lMeetup\") + 1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (Scoreboards.getManager().getScore(\"§b§lMeetup\") == -1) {\n\t\t\t\t\t\t\t\tBukkit.broadcastMessage(Main.prefix() + \"1 minute to meetup, Pack your stuff and get ready to head to 0,0.\");\n\t\t\t\t\t\t\t\tfor (Player online : PlayersUtil.getPlayers()) {\n\t\t\t\t\t\t\t\t\tonline.playSound(online.getLocation(), Sound.NOTE_PLING, 1, 0);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}, 1200, 1200);\n\t\t\t\n\t\t\tBukkit.getServer().getScheduler().runTaskLater(Main.plugin, new Runnable() {\n\t\t\t\tpublic void run() {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tBukkit.getPlayer(Settings.getInstance().getData().getString(\"game.host\")).chat(\"/gamerule doMobSpawning true\");\n\t\t\t\t\t} catch (Exception e) {}\n\t\t\t\t}\n\t\t\t}, 3600);\n\t\t}\n\t\ttimeToStart -=1;\n\t}",
"public static void gameLoop(boolean battle){\r\n if(battle){\r\n inBattleMenu = true;\r\n inMenu = false;\r\n }else{\r\n inMenu = true;\r\n inBattleMenu = false;\r\n }\r\n while(inMenu){\r\n String input = text.getStringInput(\"MENU> \");\r\n \r\n\r\n //Description: Enters the battle menu.\r\n if(input.equalsIgnoreCase(\"battle\")){\r\n text.print(\"Entering battle menu...\");\r\n inMenu = false;\r\n inBattleMenu = true;\r\n }\r\n\r\n //Description: Displays Pokemon list.\r\n else if(input.equalsIgnoreCase(\"list\")){\r\n listPokemon();\r\n if(fileManager.getPkmn() == 0){\r\n text.print(\"You currently have 0 loaded Pokemon.\");\r\n }\r\n text.blank();\r\n }\r\n\r\n //Description: Displays game credits.\r\n else if(input.equalsIgnoreCase(\"credits\")){\r\n text.print(\"PokeSim v\" + GAME_VERSION + \" created by [][].\");\r\n text.blank();\r\n }\r\n\r\n //Description: Displays commands available in the help menu.\r\n else if(input.equalsIgnoreCase(\"help\")){\r\n text.print(\"battle - Opens the battle menu. Used to battle certain pokemon.\");\r\n text.print(\"list - Prints all loaded Pokemon in memory.\");\r\n text.print(\"help - Display this menu.\");\r\n text.print(\"profile - Displays your profile info.\");\r\n text.print(\"tour - Gives you a tour of the game. Useful for new players.\");\r\n text.blank();\r\n }\r\n\r\n //Description: Gives a tour of the game and how to use it.\r\n else if(input.equalsIgnoreCase(\"tour\")){\r\n String decision = text.getStringInput(\"Take tour? (y/n): \");\r\n if(decision != \"y\"){\r\n \r\n }\r\n \r\n if(decision.equalsIgnoreCase(\"y\")){\r\n text.blank();\r\n for(int i = 0; i < 150; i++){\r\n text.blank();\r\n }\r\n text.drawASCII(\"PokeSim\", 10);\r\n System.out.println(\"===========================================\"); \r\n text.print(\"PokeSim is a text based game inspired by other simulations of Pokemon battles such as \");\r\n text.print(\"Pokemon Showdown. This version attemps to recreate Showdown but with a much simper \");\r\n text.print(\"approach. Many more features are added, including but not limited to the creation of\");\r\n text.print(\"custom Pokemon and attacks, profiles, and easily accessable databases of Pokemon stored in \");\r\n text.print(\"the directory for the game. \");\r\n text.seperateText(\"Getting Started\");\r\n text.print(\"Assuming you have the first-gen pack installed in C://PokeSim, you can setup a party by doing\");\r\n text.print(\" \\\"setpoke <file>.poke\\\"\");\r\n text.print(\"And then battle a Pokemon by simply writing\");\r\n text.print(\" \\\"start <file>.poke\\\"\");\r\n text.print(\"Other useful commands can be found by typing \\\"help\\\" on the command line.\");\r\n text.blank();\r\n }\r\n }\r\n \r\n //Description: Displays the user's profile.\r\n else if(input.equalsIgnoreCase(\"profile\")){\r\n text.print(\"Profile name: \" + name);\r\n text.print(\"Java: Java v\" + System.getProperty(\"java.version\") + \" by \" + System.getProperty(\"java.vendor\"));\r\n text.print(\"OS: \" + System.getProperty(\"os.arch\") + \" \" + System.getProperty(\"os.name\") + \" \" + System.getProperty(\"os.version\"));\r\n \r\n text.blank();\r\n }\r\n \r\n \r\n else if(input.equalsIgnoreCase(\"quit\")){\r\n text.print(\"Quitting game...\");\r\n System.exit(0);\r\n }\r\n }\r\n\r\n /* Battle menu functions and command */\r\n while(inBattleMenu) {\r\n String input = text.getStringInput(\"BATTLE> \");\r\n String[] a_Input = input.split(\" \"); //For multiple arguments.\r\n \r\n //Description: Displays commands used in battle menu\r\n if (input.equalsIgnoreCase(\"help\")) {\r\n text.print(\"- start <file> to battle a specific Pokemon.\");\r\n text.print(\"- setpoke <file> to set your battle Pokemon.\");\r\n text.print(\"- edit <file> <attr> <repl> to edit a Pokemon.\");\r\n text.print(\"- check <file> to check syntax for a file.\");\r\n text.print(\"- open <file> to print a file's contents.\");\r\n text.print(\"- cls to clear the console window.\");\r\n text.print(\"- random to battle a random Pokemon.\");\r\n text.print(\"- back to return to the main menu.\");\r\n text.print(\"- list to list the available Pokemon to battle.\");\r\n text.print(\"- del to delete a Pokemon or attack.\");\r\n text.print(\"- new to create a new Pokemon.\");\r\n text.print(\"- newatk to create a new attack.\");\r\n text.print(\"- attacks to list your loaded attacks.\");\r\n text.print(\"- party to view your current party Pokemon.\");\r\n text.blank();\r\n\r\n //Description: Returns user to main menu.\r\n } else if (input.equalsIgnoreCase(\"back\")) {\r\n text.print(\"Returning to main menu...\");\r\n text.blank();\r\n gameLoop(false);\r\n\r\n //Description: Battles a random, valid file. \r\n } else if (input.equalsIgnoreCase(\"random\")) {\r\n battler.battle(fileManager.getRandomPokemon());\r\n\r\n //Description: Lists all Pokemon, if any. \r\n } else if (input.equalsIgnoreCase(\"list\")) {\r\n if (fileManager.getPkmn() == 0) {\r\n text.print(\"You currently have 0 loaded Pokemon.\");\r\n }else{\r\n listPokemon();\r\n }\r\n text.blank();\r\n\r\n //Description: Creates a new Pokemon. \r\n } else if(input.equalsIgnoreCase(\"new\")){\r\n String in = text.getStringInput(\"Create new Pokemon? (y/n): \");\r\n while(!in.equalsIgnoreCase(\"y\") && !in.equalsIgnoreCase(\"n\") && !in.equalsIgnoreCase(\"back\")){\r\n in = text.getStringInput(\"Create new Pokemon? (y/n): \");\r\n }\r\n if(in.equalsIgnoreCase(\"back\")){\r\n gameLoop(true);\r\n }\r\n if(in.equalsIgnoreCase(\"y\")){\r\n try{\r\n String filename = text.getStringInput(\"Filename?: \");\r\n String name = text.getStringInput(\"Name?: \");\r\n String atk = text.getStringInput(\"Atk Stat?: \");\r\n String def = text.getStringInput(\"Def Stat?: \");\r\n String spd = text.getStringInput(\"Speed?: \");\r\n String type = text.getStringInput(\"Type?: \");\r\n String hp = text.getStringInput(\"HP?: \");\r\n String attackone = text.getStringInput(\"Attack?: \");\r\n String attacktwo = text.getStringInput(\"Attack?: \");\r\n String attackthree = text.getStringInput(\"Attack?: \");\r\n String attackfour = text.getStringInput(\"Attack?: \");\r\n //TODO: Check if all attacks are valid except if they are empty (\"\")\r\n if(filename.length() > 16 || filename.length() < 1 || name.length() > 16 || name.length() < 1 || !Arrays.asList(validTypes).contains(type) || Integer.parseInt(hp) < 1){\r\n if(filename.length() > 16 || filename.length() < 1){\r\n text.print(\"Filename must be between 1 and 16 characters long.\");\r\n }\r\n if(name.length() > 16 || name.length() < 1){\r\n text.print(\"Name must have between 1 and 16 characters.\");\r\n }\r\n if(!Arrays.asList(validTypes).contains(type)){\r\n text.print(\"\\\"\" + type + \"\\\" is not a valid type.\");\r\n }\r\n if(Integer.parseInt(hp) < 1){\r\n text.print(\"HP must be between 1 and 2147483647.\");\r\n }\r\n gameLoop(true);\r\n }\r\n else if(!fileManager.atkExists(attackone)){\r\n text.print(attackone + \" is not a valid attack.\");\r\n gameLoop(true);\r\n }\r\n else if(!fileManager.atkExists(attacktwo)){\r\n text.print(attacktwo + \" is not a valid attack.\");\r\n gameLoop(true);\r\n }\r\n else if(!fileManager.atkExists(attackthree)){\r\n text.print(attackthree + \" is not a valid attack.\");\r\n gameLoop(true);\r\n }\r\n else if(!fileManager.atkExists(attackfour)){\r\n text.print(attackfour + \" is not a valid attack.\");\r\n gameLoop(true);\r\n }\r\n //save file now, it is valid.\r\n text.print(\"Validating file...\");\r\n String newType = type.replace(type.charAt(0), Character.toUpperCase(type.charAt(0)));\r\n fileManager.writePokemonFile(filename + \".poke\", name, Integer.valueOf(atk), Integer.valueOf(def), Integer.valueOf(spd), newType, hp, attackone, attacktwo, attackthree, attackfour);\r\n text.print(fileManager.getPkmn() + \" Pokemon initialized.\");\r\n\r\n }catch(Exception e){\r\n text.print(\"Enter a number between 1 and 2147483647.\");\r\n gameLoop(true);\r\n }\r\n\r\n }\r\n if(in.equalsIgnoreCase(\"n\")){\r\n gameLoop(true);\r\n }\r\n\r\n //Description: Start a battle. \r\n } else if(Arrays.asList(a_Input).contains(\"start\")){\r\n if(fileManager.getPkmn() == 0 && a_Input[0].equals(\"start\")) {\r\n text.print(\"You cannot battle because you have no Pokemon loaded.\");\r\n gameLoop(true);\r\n }\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: start <file>\");\r\n gameLoop(true);\r\n }\r\n if(fileManager.fileExists(a_Input[1]) && (fileManager.getFile(a_Input[1]).getName().endsWith(\".poke\") || fileManager.getFile(a_Input[1]).getName().endsWith(\".trn\"))){\r\n battler.battle(fileManager.getFile(a_Input[1])); //null pointer wtf ? \r\n }else{\r\n text.print(\"File not found or file is not a POKE/TRN file.\");\r\n }\r\n \r\n \r\n //Description: Delete a file.\r\n } else if(Arrays.asList(a_Input).contains(\"del\")){\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: del <file>\");\r\n gameLoop(true);\r\n }\r\n String filename = a_Input[1];\r\n if(fileManager.fileExists(filename)){\r\n try{\r\n if(fileManager.getFile(filename).delete()){\r\n text.print(\"Successfully deleted file \" + filename + \".\");\r\n }else{\r\n text.print(\"Unable to delete file \" + filename + \".\");\r\n text.print(\"This may be caused by Java being unable to delete files on your OS.\");\r\n }\r\n }catch(SecurityException s){\r\n text.print(\"Java is blocked access from deleting files.\");\r\n }\r\n \r\n }else{\r\n text.print(\"File not found.\");\r\n }\r\n\r\n //Description: Prints all attacks.\r\n } else if(input.equalsIgnoreCase(\"attacks\")){\r\n if(fileManager.getAttackCount() == 0){\r\n text.print(\"You currently have 0 loaded attacks.\");\r\n }else{\r\n listAttacks();\r\n }\r\n text.blank();\r\n\r\n //Description: Edits a .pkmn file or .atk file.\r\n } else if(Arrays.asList(a_Input).contains(\"edit\")) {\r\n //Usage: edit <file> <attr> <replacement>\r\n if(!(a_Input.length == 4)) {\r\n text.print(\"Usage: edit <file.poke> <attribute> <replacement>\");\r\n text.print(\"Example: edit charizard.poke speed 500\");\r\n }else{\r\n boolean found = false;\r\n for(File file : fileManager.gameDirectory.listFiles()) {\r\n if(file.getName().equals(a_Input[1])){\r\n found = true;\r\n fileManager.modifyAttr(a_Input[2], a_Input[3], file);\r\n }else{\r\n \r\n }\r\n }\r\n if(!found) {\r\n text.print(\"File not found.\");\r\n gameLoop(true);\r\n }\r\n }\r\n \r\n }else if(Arrays.asList(a_Input).contains(\"setpoke\")){\r\n if(fileManager.getPkmn() == 0 && a_Input[0].equals(\"setpoke\")){\r\n text.print(\"You must have atleast one Pokemon to set as your current Pokemon.\"); \r\n gameLoop(true);\r\n }\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: setpoke <file>\");\r\n gameLoop(true);\r\n }\r\n if(fileManager.fileExists(a_Input[1])){\r\n if(fileManager.isValidFile(fileManager.getFile(a_Input[1]))){\r\n party = fileManager.getFile(a_Input[1]);\r\n text.print(\"Party member #1 set to \" + fileManager.getName(fileManager.getFile(a_Input[1])));\r\n }else{\r\n text.print(\"The specified file is not a valid Pokemon file.\");\r\n }\r\n }else{\r\n text.print(\"File not found.\");\r\n }\r\n \r\n }else if(input.equalsIgnoreCase(\"party\")){\r\n if(party == null){\r\n text.print(\"You haven't set your party Pokemon yet. Use setpoke <file>.\");\r\n gameLoop(true);\r\n }\r\n \r\n text.print(\"File/Name/Atk/Def/Speed/Type/HP/Attack/Attack/Attack/Attack\");\r\n text.print(\"===========================================================\");\r\n fileManager.printInfo(party);\r\n \r\n }else if (input.equalsIgnoreCase(\"newatk\")){\r\n String in = text.getStringInput(\"Create new attack? (y/n): \");\r\n while(!in.equalsIgnoreCase(\"y\") && !in.equalsIgnoreCase(\"n\") && !in.equalsIgnoreCase(\"back\")){\r\n in = text.getStringInput(\"Create new attack? (y/n): \");\r\n }\r\n if(in.equalsIgnoreCase(\"back\")){\r\n gameLoop(true);\r\n }\r\n else if(in.equalsIgnoreCase(\"y\")){\r\n try{\r\n String filename = text.getStringInput(\"Filename?: \");\r\n String name = text.getStringInput(\"Name?: \");\r\n String type = text.getStringInput(\"Type?: \");\r\n String pwr = text.getStringInput(\"Power?: \");\r\n String acc = text.getStringInput(\"Accuracy?: \");\r\n \r\n if(filename.length() < 1 || filename.length() > 16 || name.length() > 16 || name.length() < 1 || !Arrays.asList(validTypes).contains(type) || Integer.valueOf(acc) > 100 || Integer.valueOf(acc) < 1){\r\n if(name.length() > 16 || name.length() < 1){\r\n text.print(\"Attack name must be between 1 and 16 characters.\");\r\n }\r\n if(!Arrays.asList(validTypes).contains(type)){\r\n text.print(type + \" is not a valid type.\");\r\n }\r\n if(Integer.valueOf(acc) > 100 || Integer.valueOf(acc) < 1){\r\n text.print(\"Accuracy must be between 1 and 100.\");\r\n }\r\n if(filename.length() < 1 || filename.length() > 16){\r\n text.print(\"Filename must be between 1 and 16 characters.\");\r\n }\r\n gameLoop(true);\r\n }\r\n //validate\r\n text.print(\"Validating attack...\");\r\n type = type.replace(type.charAt(0), Character.toUpperCase(type.charAt(0)));\r\n fileManager.writeAttackFile(filename + \".atk\", name, type, Integer.valueOf(pwr), Integer.valueOf(acc));\r\n text.print(fileManager.getAttackCount() + \" attacks initialized.\");\r\n }catch(Exception e){\r\n text.print(\"An error occurred while reading input.\");\r\n }\r\n }\r\n }else if(input.equalsIgnoreCase(\"cls\")){\r\n for(int i = 0; i < 300; i++){\r\n System.out.println(\"\");\r\n }\r\n }else if(Arrays.asList(a_Input).contains(\"check\")){\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: check <file>\");\r\n }else{\r\n if(fileManager.fileExists(a_Input[1])){\r\n if(a_Input[1].endsWith(\"poke\")){\r\n if(fileManager.isValidFile(fileManager.getFile(a_Input[1]))){\r\n text.print(a_Input[1] + \" is a valid POKE file.\");\r\n }else{\r\n text.print(a_Input[1] + \" is not a valid POKE file.\");\r\n }\r\n }\r\n else if(a_Input[1].endsWith(\"atk\")){\r\n if(fileManager.isValidAttack(fileManager.getFile(a_Input[1]))){\r\n text.print(a_Input[1] + \" is a valid attack file.\");\r\n }else{\r\n text.print(a_Input[1] + \" is not a valid attack file.\");\r\n }\r\n }\r\n }else{\r\n text.print(\"File not found.\");\r\n }\r\n }\r\n }else if(Arrays.asList(a_Input).contains(\"open\")){\r\n if(a_Input.length != 2){\r\n text.print(\"Usage: open <file>\");\r\n gameLoop(true);\r\n }\r\n if(fileManager.fileExists(a_Input[1])){\r\n fileManager.open(fileManager.getFile(a_Input[1]));\r\n }else{\r\n text.print(\"File not found.\");\r\n }\r\n }else if(input.equalsIgnoreCase(\"quit\")){\r\n text.print(\"Quitting game...\");\r\n System.exit(0);\r\n }\r\n }\r\n }",
"public void ratCrewStart() {\n printStatus();\n ratCrewGo();\n madeTheRun = true;\n printStatus();\n }",
"public void update() {\n if(this.getLine(0) != \"\") this.setLine(0, \"\");\n if(this.getLine(0) != plugin.getGameManager().getAlivePlayers().size() + \" §7Joueurs\") this.setLine(1, plugin.getGameManager().getAlivePlayers().size() + \" §7Joueurs\");\n if(this.getLine(0) != Team.getTeams().size() + \" §7Equipes\") this.setLine(2, Team.getTeams().size() + \" §7Equipes\");\n if(this.getLine(0) != \" \") this.setLine(3, \" \");\n\n /* Timer part */\n if(plugin.getGameManager().hasStarted()) {\n this.setLine(4, \"§eTimer: §r\" + getFormattedTimer(plugin.getTimerManager().getMinutesLeft(), plugin.getTimerManager().getSecondsLeft()) + \" [§bE\" + getFormattedEpisode(plugin.getTimerManager().getEpisode()) + \"§r]\");\n\n String text = \"\";\n List<Integer> timers = new ArrayList<>();\n if(!plugin.getGameManager().isPvpActivated())\n timers.add(plugin.getTimerManager().getMinutesPvpLeft());\n if(!plugin.getGameManager().isRolesActivated())\n timers.add(plugin.getTimerManager().getMinutesRolesLeft());\n if(!plugin.getGameManager().isKitsActivated())\n timers.add(plugin.getTimerManager().getMinutesKitsLeft());\n if(!plugin.getBorderManager().isShrinking())\n timers.add(plugin.getTimerManager().getMinutesBorderLeft());\n\n try {\n int min = timers\n .stream()\n .filter(v -> v != -1)\n .mapToInt(v -> v)\n .min()\n .orElseThrow(NoSuchElementException::new);\n\n if(min == plugin.getTimerManager().getMinutesPvpLeft() && !plugin.getGameManager().isPvpActivated())\n text = \"Pvp\";\n else if(min == plugin.getTimerManager().getMinutesRolesLeft() && !plugin.getGameManager().isRolesActivated())\n text = \"Equipes\";\n else if(min == plugin.getTimerManager().getMinutesKitsLeft() && !plugin.getGameManager().isKitsActivated())\n text = \"Kits\";\n else if(min == plugin.getTimerManager().getMinutesBorderLeft() && !plugin.getBorderManager().isShrinking())\n text = \"Bordure\";\n\n if(!text.equals(\"\")) {\n this.setLine(5, \"§c\" + text + \": §r< \" + (min + 1) + \"min\");\n }\n } catch (NoSuchElementException e) {\n this.removeLine(5);\n }\n }\n }",
"public void start() {\n System.out.println(\"Hello player. In front of you is a 3 x 3 grid of tiles numbered from 1 to 8, and \\n\" +\n \"the goal is to put the tiles in increasing order from left to right and top to bottom \\n\" +\n \"as shown below. \\n\");\n\n int[][] sample = {{1,2,3},{4,5,6},{7,8,0}};\n Board sampleBoard = new Board(sample);\n\n System.out.println(sampleBoard.toString());\n\n System.out.println(\"After you have solved the board or you have forfeited by pressing the SPACE key, you can \\n\" +\n \"right-click to generate a new board and then press enter to start the timer again.\\n\\n\" +\n \"If you ever have any trouble, you can request the computer\\n\" +\n \"to solve the board by forfeiting and pressing ENTER to let the computer walk you through a solution. \\n\\n\" +\n \"When you are ready, PRESS ENTER KEY TO START THE TIMER OR PRESS SPACE TO FORFEIT AND TRY ANOTHER BOARD. \");\n\n\n }",
"private void readFile() {\n\t\tint newPlayerScore = level.animal.getPoints();\n\t\t\n\t\tlevel.worDim = 30;\n\t\tlevel.wordShift = 25;\n\t\tlevel.digDim = 30;\n\t\tlevel.digShift = 25;\n\t\t\n\t\tfor( int y =0; y<10; y++ ) { //display placeholder numbers\n\t\t\tfor( int x=0; x<4; x++ ) {\n\t\t\t\tbackground.add(new Digit( 0, 30, 470 - (25*x), 200 + (35*y) ) );\n\t\t\t}\n\t\t}\n\t\t\n\t\ttry { //display highscores from highscores.txt\n\t\t\tScanner fileReader = new Scanner(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tint loopCount = 0;\n\t\t\twhile( loopCount < 10 ) {\n\t\t\t\tString playerName = fileReader.next() ;\n\t\t\t\tString playerScore = fileReader.next() ;\n\t\t\t\tint score=Integer.parseInt(playerScore);\n\t\t\t\t\n\t\t\t\tif( newPlayerScore >= score && newHighScore == false ) {\n\t\t\t\t\tstopAt = loopCount;\n\t\t\t\t\tnewHighScore = true;\n\t\t\t\t\tlevel.wordY = 200 + (35*loopCount);\n\t\t\t\t\t\n\t\t\t\t\tpointer = new Icon(\"pointer.png\", 30, 75, 200 + (35*loopCount) );// add pointer indicator\n\t\t\t\t\tbackground.add( pointer ); \n\t\t\t\t\tlevel.setNumber(newPlayerScore, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}else {\n\t\t\t\t\tlevel.setWord(playerName, 10, 100, 200 + (35*loopCount));\n\t\t\t\t\tlevel.setNumber(score, 470, 200 + (35*loopCount));\n\t\t\t\t\tloopCount += 1;\n\t\t\t\t}\n\t\t\t}//end while\n\t\t\tfileReader.close();\n\t\t\tif( newHighScore ) {\n\t\t\t\tnewHighScoreAlert();\n\t\t\t}else {\n\t\t\t\tgameOverAlert();\n\t\t\t}\n } catch (Exception e) {\n \tSystem.out.print(\"ERROR: Line 168: Unable to read file\");\n //e.printStackTrace();\n }\n\t}",
"void tick() {\n\t\tif (playing) {\n\t\t\tdeadcannon = null;\n\t\t\t// sets general output message\n\t\t\tstatus.setText(\"Engaging alien wave \" + Integer.toString(level)+ \" \");\n\n\t\t\t// controls the first shot fired by the aliens\n\t\t\tif (shot1 == null) {\n\t\t\t\tint count1 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count1++ ;}\n\t\t\t\t}\n\t\t\t\tif (count1 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\telse {\n\t\t\t\t\tint count2 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count2++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count2 > 1) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count3 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count3++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count3 != 0) shot1 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// controls the second shot fired by the aliens\n\t\t\tif (shot2 == null) {\n\t\t\t\tint count4 = 0;\n\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\tif (alien3[i]!=null) {if (!alien3[i].Destroyed) count4++ ;}\n\t\t\t\t}\n\t\t\t\tif (count4 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\tshootbottom().pos_x + 18, shootbottom().pos_y); \n\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\telse {\n\t\t\t\t\tint count5 = 0;\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null) {if(!alien2[i].Destroyed)count5++;}\n\t\t\t\t\t}\n\t\t\t\t\tif (count5 != 0) { shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\tshootmiddle().pos_x + 18, shootmiddle().pos_y);\n\t\t\t\t\tStdAudio.play(\"zap.wav\"); }\n\t\t\t\t\telse {\n\t\t\t\t\t\tint count6 = 0;\n\t\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\t\tif (alien1[i]!=null) {if(!alien1[i].Destroyed)count6++;}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (count6 != 0) {shot2 = new Shot(COURT_WIDTH, COURT_HEIGHT, \n\t\t\t\t\t\t\t\tshoottop().pos_x + 18, shoottop().pos_y);\n\t\t\t\t\t\tStdAudio.play(\"zap.wav\");}\n\t\t\t\t\t\telse {level = level + 1; \n\t\t\t\t\t\tnewlevel();\n\t\t\t\t\t\tthescore=thescore + 100;\n\t\t\t\t\t\tStdAudio.play(\"up.wav\");}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// move bullet and delete if it reaches the roof\n\t\t\tif (bullet!= null) {\n\t\t\t\tbullet.move();\n\t\t\t\tif (bullet.pos_y == 0) bullet = null;\n\t\t\t}\n\n\t\t\t// controls movement of first shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tshot1.move();\n\t\t\t\tif (shot1.pos_y > 435) shot1 = null;\n\t\t\t}\n\t\t\t// controls movement of second shot\n\t\t\tif (shot2 != null) {\n\t\t\t\tshot2.move();\n\t\t\t\tif (shot2.pos_y > 435) shot2 = null;\n\t\t\t}\n\n\t\t\t// For Top Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien1[0] != null && alien1[9] != null){\n\t\t\t\tif (alien1[0].pos_x == 0 || alien1[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\t\t\tif (alien1[i]!=null){alien1[i].v_x = -alien1[i].v_x;\n\t\t\t\t\t\talien1[i].pos_y=alien1[i].pos_y+15;\n\t\t\t\t\t\tif (alien1[i].pos_y >= 385 && !alien1[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been overrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\t \n\t\t\t\t\t\t} \n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null) \n\t\t\t\t\talien1[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien1.length; i++) {\n\t\t\t\tif (alien1[i] != null && bullet != null) {\n\t\t\t\t\tif (alien1[i].intersects(bullet) && !alien1[i].Destroyed) { \n\t\t\t\t\t\talien1[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 20;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien1[i].img_file = \"black.jpg\";\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\t// For Second Row\n\n\t\t\t// change alien direction if a wall is reached\n\t\t\tif (alien2[0] != null && alien2[9] != null){\n\t\t\t\tif (alien2[0].pos_x == 0 || alien2[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\t\t\tif (alien2[i]!=null){alien2[i].v_x = -alien2[i].v_x;\n\t\t\t\t\t\talien2[i].pos_y=alien2[i].pos_y+15;\n\t\t\t\t\t\tif (alien2[i].pos_y >= 385 && !alien2[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false; \n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\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}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null) \n\t\t\t\t\talien2[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien2.length; i++) {\n\t\t\t\tif (alien2[i] != null && bullet != null) {\n\t\t\t\t\tif (alien2[i].intersects(bullet) && !alien2[i].Destroyed) { \n\t\t\t\t\t\talien2[i].Destroyed=true;\n\t\t\t\t\t\tthescore +=15;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10 ) {\n\t\t\t\t\t\t\talien2[i].img_file = \"black.jpg\";\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\t//For third row\n\n\t\t\t//change alien direction if a wall is reached\n\t\t\tif (alien3[0] != null && alien3[9] != null){\n\t\t\t\tif (alien3[0].pos_x == 0 || alien3[9].pos_x == 730) {\n\t\t\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\t\t\tif (alien3[i]!=null){alien3[i].v_x = -alien3[i].v_x;\n\t\t\t\t\t\talien3[i].pos_y=alien3[i].pos_y+15;\n\t\t\t\t\t\tif (alien3[i].pos_y >= 385 && !alien3[i].Destroyed){\n\t\t\t\t\t\t\tplaying = false;\n\t\t\t\t\t\t\tstatus.setText(\"You have been ovverrun and Earth \"+\n\t\t\t\t\t\t\t\t\t\"has been destroyed. You are a terrible \"+\n\t\t\t\t\t\t\t\t\t\"defender of humanity. \");\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}\n\t\t\t}\n\n\t\t\t// move the aliens as group\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null) \n\t\t\t\t\talien3[i].move();\n\t\t\t}\n\n\t\t\t// destroy both bullet and aliens if bullet hits\n\t\t\tfor (int i = 0; i < alien3.length; i++) {\n\t\t\t\tif (alien3[i] != null && bullet != null) {\n\t\t\t\t\tif (alien3[i].intersects(bullet) && !alien3[i].Destroyed) { \n\t\t\t\t\t\talien3[i].Destroyed=true;\n\t\t\t\t\t\tthescore += 10;\n\t\t\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\t\t\tbullet = null;\n\t\t\t\t\t\tif (i == 0 || i == 10) {\n\t\t\t\t\t\t\talien3[i].img_file = \"black.jpg\";\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\t// destroy cannon if shot\n\t\t\tif (shot1 != null) {\n\t\t\t\tif (shot1.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (shot2 != null) {\n\t\t\t\tif (shot2.intersects(cannon)){ dead = true; \n\t\t\t\tthelives = thelives - 1;\n\t\t\t\tStdAudio.play(\"bigboom.wav\");}\n\t\t\t\tcannon.img_file = \"dead.jpg\";\n\t\t\t}\n\n\t\t\t// ends the game when all lives are lost\n\t\t\tif (thelives <= 0) {\n\t\t\t\tplaying = false; \n\t\t\t\tStdAudio.play(\"bomb-02.wav\");\n\t\t\t\tstatus.setText(\"You have been killed and Earth has been \" +\n\t\t\t\t\t\t\"destroyed. You are a terrible defender \" +\n\t\t\t\t\t\t\"of humanity. \");\n\t\t\t}\n\n\t\t\t//makes sure lives cannot become negative\n\t\t\tif (thelives <= 0) {\n\t\t\t\tthelives = 0;\n\t\t\t\tdeadcannon = new DeadCannon(COURT_WIDTH, COURT_HEIGHT);\n\t\t\t\tdeadcannon.pos_x = cannon.pos_x;\n\t\t\t\tStdAudio.play(\"loss.wav\");\n\t\t\t}\n\n\t\t\t//set the text labels at the bottom of the screen\n\t\t\tmyscore.setText(\"Score = \"+ Integer.toString(thescore)+ \" \");\n\t\t\tmylives.setText(\"Lives = \"+ Integer.toString(thelives));\n\t\t\trepaint();\n\t\t\n\t\t\t//move cannon\n\t\t\tcannon.move();\n\t\t} \n\t}",
"public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tLOGGER.log(Level.INFO, \"Timer started\");\n\t\t\ttry {\n\t\t\t\tThread.sleep(TIMEOUT);\n\t\t\t\tif (gameCanStart()) {\n\t\t\t\t\tstartNewGame(players);\n\t\t\t\t} else {\n\t\t\t\t\tLOGGER.log(Level.INFO, \"No players available right now...\");\n\t\t\t\t}\n\t\t\t\tLOGGER.log(Level.INFO, \"Timer stopped\");\n\t\t\t\tactiveConnections = 0;\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// Non fa nulla, può essere interrotto\n\t\t\t\tLOGGER.log(Level.INFO, \"Timer interrupted\", e);\n\t\t\t}\n\t\t}",
"public void run() {\r\n\t\tGameArchive ga = GameArchive.getInstance();\r\n\t\tga.newGame();\r\n\t\t_game = ga.getCurrentGame();\r\n\t\tint startRound = 1;\r\n\t\tint endRound = (int)(1.0*cardFinder.getCardsInDeck() /_playerCollection.size());\r\n\t\tint dealer = -1;\r\n\t\tint lead = 0;\r\n\t\tint inc = 1;\r\n\t\tif(go.getGameSpeed().equals(GameSpeed.QUICK_PLAY)) {\r\n\t\t\tinc = 2;\r\n\t\t\tif(_playerCollection.size() != 4) {\r\n\t\t\t\tstartRound = 2;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\r\n\t\tList<Integer> playerIds = getPlayerId();\r\n\t\tList<String> playerNames = getPlayerNames();\r\n\t\tfor (int i = 0; i < playerIds.size(); i++) {\r\n\t\t\t_game.addPlayer(playerIds.get(i), playerNames.get(i));\r\n\t\t}\r\n\t\tgameEventNotifier.notify(new NewGameEvent(playerIds,playerNames));\r\n\t\tfor (int roundId = startRound; roundId < endRound + 1; roundId = roundId + inc) {\r\n\t\t\tdealer = (dealer + 1)% _playerCollection.size();\r\n\t\t\tlead = (dealer + 1)% _playerCollection.size();\r\n\t\t\tgameEventNotifier.notify(new NewRoundEvent(roundId));\r\n\t\t\t_game.newRound(roundId);\r\n\t\t\tRound round = _game.getCurrentRound();\r\n\t\t\tCard trump = dealCards(roundId, dealer, lead);\r\n\t\t\tgameEventNotifier.notify(new NewTrumpEvent(trump));\r\n\t\t\tround.setTrump(trump);\r\n\r\n\t\t\tif(trump != null && trump.getValue().equals(Value.WIZARD)) {\r\n\t\t\t\tPlayer trumpPicker = _playerCollection.get(dealer);\r\n\t\t\t\t//_logger.info(trumpPicker.getName() + \" gets to pick trump.\");\r\n\t\t\t\ttrump = new Card(null, trumpPicker.pickTrump(), -1);\r\n\t\t\t\tgameEventNotifier.notify(new NewTrumpEvent(trump));\r\n\t\t\t\tround.setTrump(trump);\r\n\t\t\t}\r\n\t\t\tint cardsDealt = roundId;\r\n\t\t\tBid bid = bid(trump, lead, cardsDealt, round);\r\n\t\t\tif(go.getBidType().equals(BidType.HIDDEN)) {\r\n\t\t\t\tfor(IndividualBid individualBid :bid.getBids()) {\r\n\t\t\t\t\tgameEventNotifier.notify(new PlayerBidEvent(individualBid.getPlayer().getId(), individualBid.getBid()));\r\n\t\t\t\t\tround.setBid(individualBid.getPlayer().getId(), individualBid.getBid());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tRoundSummary roundSummary = new RoundSummary();\r\n\t\t\tfor (int i = 0; i < roundId; i++) {\r\n\t\t\t\tTrickTracker trickTracker = playTrick(trump, lead, round);\r\n\t\t\t\troundSummary.addTrickTracker(trickTracker);\r\n\t\t\t\tint playerIdWhoWon = trickTracker.winningPlay().getPlayerId();\r\n\t\t\t\tlead = findPlayerIndex(playerIdWhoWon);\r\n\t\t\t}\r\n\t\t\tif(go.getBidType().equals(BidType.SECRET)) {\r\n\t\t\t\tfor(IndividualBid individualBid :bid.getBids()) {\r\n\t\t\t\t\tgameEventNotifier.notify(new PlayerBidEvent(individualBid.getPlayer().getId(), individualBid.getBid()));\r\n\t\t\t\t\tround.setBid(individualBid.getPlayer().getId(), individualBid.getBid());\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tscoreRound(roundSummary, bid, _game);\r\n\t\t\tthis.overallScores.displayScore();\r\n\t\t}\r\n\t\tCollection<Integer> winningPlayerIds = calcWinningIds();\r\n\t\tCollection<String> winningPlayers = getPlayerNames(winningPlayerIds);\r\n\t\tfor(int winningIds:winningPlayerIds) {\r\n\t\t\t_game.addWinner(winningIds);\r\n\t\t}\r\n\t\tgameEventNotifier.notify(new GameOverEvent(winningPlayerIds, winningPlayers));\r\n\t}",
"public void startGame() {\n\t\timages = new ImageContainer();\n\t\ttimer = new Timer(15, this);\n\t\ttimer.setRepeats(true);\n\t\tlevelStartTimer = new Timer(2000, this);\n\t\thighScore = new HighScore();\n\t\tpacmanAnimation = new PacmanAnimation(images.pacman, new int[] { 3, 2,\n\t\t\t\t0, 1, 2 });\n\t\tactualLevel = 1;\n\t\tinitNewLevel();\n\t}",
"public void playGame() {\n if (!runGame) {\n return;\n }\n if (doLeaderboard) {\n String gameOver = \"Game Over\";\n String leaderboard = \"\";\n\n int place = 1;\n for (Player player : getLeaderboard()) {\n leaderboard += \"\\n\"+(place++)+\". \"+player.name()+\" (\"+player.lives()+\" lives)\";\n }\n\n background(0, 0, 0);\n PFont f2 = createFont(\"HelveticaNeue-Bold\", 85, true);\n textAlign(CENTER);\n textFont(f2);\n fill(color(134, 244, 250));\n text(gameOver, width/2, height/2 - 50);\n\n textFont(f);\n text(leaderboard, width/2, height/2 -35); // Make text size a variable\n textAlign(BASELINE);\n this.doLeaderboard = false;\n this.runGame = false;\n noLoop();\n\n // Need a way to keep this text on the screen without it getting overwritten by setup();\n // Source for below code: https://stackoverflow.com/questions/2258066/java-run-a-function-after-a-specific-number-of-seconds\n new java.util.Timer().schedule(\n new java.util.TimerTask() {\n @Override\n public void run() {\n setup();\n this.cancel();\n }\n }\n , 2000);\n } else if (this.doRespawn) {\n if (respawnTimer > 0) {\n background(0, 0, 0);\n textFont(f, 60);\n fill(color(134, 244, 250));\n DecimalFormat df = new DecimalFormat(\"0.0\");\n textAlign(CENTER);\n text(\"Restarting In\\n\"+df.format(respawnTimer), width/2, height/2);\n textAlign(BASELINE);\n respawnTimer -= 0.1f;\n } else {\n respawnTimer = respawnTimerBackup;\n this.resetGrid();\n int count = 0;\n\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n Player player = players.get(i);\n if (player.lives() > 0) {\n String dir = directions.get(index++); // just assume # players <= # of directions\n player.respawn(spawns.get(dir));\n player.setDirection(dir);\n count++;\n }\n }\n\n if (count <= 1) {\n // if (ENABLE_SOUND) {\n // sfx.endGame();\n // }\n gameOver();\n return;\n }\n\n this.doRespawn = false;\n frameRate(framerate);\n return;\n }\n } else {\n int dead = 0;\n int eliminated = 0;\n\n // Draw the current ColorPicker\n for (Player player : players) {\n if (player.isAlive()) {\n player.move();\n } else {\n dead++;\n if (player.lives() == 0) {\n eliminated++;\n }\n }\n }\n\n if (players.size() - dead <= 1) {\n if (eliminated >= players.size() - 1) { // Can probably merge the two calls to setup()\n // RETURN TO MENU / PLAY AGAIN screen\n gameOver();\n return;\n }\n frameRate(10);\n doRespawn = true;\n } else {\n render();\n }\n }\n if (bar != null) {\n bar.render();\n }\n}",
"public void timer() {\r\n date.setTime(System.currentTimeMillis());\r\n calendarG.setTime(date);\r\n hours = calendarG.get(Calendar.HOUR_OF_DAY);\r\n minutes = calendarG.get(Calendar.MINUTE);\r\n seconds = calendarG.get(Calendar.SECOND);\r\n //Gdx.app.debug(\"Clock\", hours + \":\" + minutes + \":\" + seconds);\r\n\r\n buffTimer();\r\n dayNightCycle(false);\r\n }",
"public void run() {\n\t\t\t \t \n\t\t\t \t test.load2();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }",
"public void playGame() {\n\t\tint generations = 1;\n\t\treadFromFile();\n\t\twhile (generations <= numGens) {\n\t\t\tgetNeighbors();\n\t\t\tsetNextGeneration();\n\t\t\tgenerations += 1;\n\t\t}\n\t\toutputToFile();\n\t}",
"private void createAndStartTimer() {\n CountDownTimer timer = new CountDownTimer(INTERVAL, SECOND) {\n @Override\n public void onTick(long millisUntilFinished) { }\n\n @Override\n public void onFinish() {\n /* Get the saved JSON file and store in variable */\n /* will be implemented later */\n\n /* Get the new JSON file */\n Log.d(\"timer\", \"finished one timer cycle\");\n new DownloadDataTask().execute(USGS_URL);\n try {\n // get the most recent earthquake\n mostRecentEarthquake = getFirstEarthquakeFromJson();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n // notify user of earthquake\n Intent i = new Intent(getBaseContext(), EarthquakeWatchService.class);\n i.putExtra(\"earthquake\", mostRecentEarthquake);\n startService(i);\n createAndStartTimer();\n }\n };\n\n timer.start();\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile(gameTimer > 0 && !Timer.this.gameScene.popUp){\n\t\t\t\t\tcountDown();\n\t\t\t\t\ttry{\n\t\t\t\t\t\tThread.sleep(10);\n\t\t\t\t\t}catch(InterruptedException e){\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\toutOfTime = true;\n\t\t\t}",
"public Screen()\n { \n FileReader filereader;\n BufferedReader reader;\n PrintWriter writer;\n String line;\n int defaultColor;\n int defaultDiff;\n int defaultMode;\n int defaultOps;\n try{\n filereader = new FileReader(\"settings.txt\");\n reader = new BufferedReader(filereader);\n \n //if(reader.readLine() !=null)\n line = reader.readLine();\n defaultMode = Integer.parseInt(line);\n line = reader.readLine();\n defaultDiff = Integer.parseInt(line);\n line = reader.readLine();\n defaultColor = Integer.parseInt(line);\n line = reader.readLine();\n defaultOps = Integer.parseInt(line);\n String[] options = {\"Regular Mode\", \"Time Trial\"};\n int n = -1;\n n = JOptionPane.showOptionDialog(null,\"Choose your mode\",\"Mode Selection\",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[defaultMode]);\n if(n==0)\n modeT = false;\n else if(n==1)\n {\n modeT = true;\n difficult = \"HARD\";\n \n timer2=5.0;\n }\n else if(n==-1)\n {\n resetSettings();\n System.exit(0);\n }\n if(!modeT)\n {\n difficult = (String)JOptionPane.showInputDialog(null,\"Choose your difficulty\",\"Choose Difficulty\",JOptionPane.QUESTION_MESSAGE,null,difficultyOption,difficultyOption[defaultDiff]);\n if(difficult == null)\n { \n resetSettings();\n System.exit(0);\n }\n }\n int a = 2;\n int b = 0;\n int c = 0;\n int d = 0;\n writer = new PrintWriter(new File(\"settings.txt\"));\n for(int i = 0;i<difficultyOption.length;i++)\n {\n if(difficultyOption[i].equalsIgnoreCase(difficult))\n {\n a = i;\n //writer.println(i);\n //System.out.println(i);\n }\n }\n //On ghost the color will automatically be black so you shouldn't be allowed to select a color\n if(!difficult.equals(\"GHOST\") && difficult != null && color != null )\n {\n color = (String)JOptionPane.showInputDialog(null,\"Select a color for your Snake\",\"Choose Color\",JOptionPane.QUESTION_MESSAGE,null,colorOption,colorOption[defaultColor]);\n if(color == null)\n {\n resetSettings();\n System.exit(0);\n \n }\n for(int i = 0;i<colorOption.length;i++)\n {\n if(colorOption[i].equalsIgnoreCase(color))\n {\n //writer = new PrintWriter(new File(\"settings.txt\"));\n //writer.println(i);\n //System.out.println(i);\n b = i;\n }\n }\n \n int restart = -1;\n String[] ops = {\"Yes\", \"No\"};\n String str1 = \"Would you like to play with special power ups and challenges?\\nIf yes is selected, different items will occasionally appear which have temporary special effects:\\n\\n\\nBlue Shell: No boundaries\\nStar: snake cannot die\\nGolden Mushroom: increases head size of snake\\nGhost: turns the snake invisible\\nPow Block: allows the snake to travel through itself\\nThree Mushrooms: double points\\nBanana: reverses the keys\";\n String str2 = \"Would you like to play with special power ups and challenges?\\nIf yes is selected, different items will occasionally appear which have temporary special effects:\\n\\n\\nBlue Shell: No boundaries\\nStar: snake cannot die, timer stops\\nGolden Mushroom: adds 3 extra seconds to timer when collected\\nIce Crystal: pauses timer\\nPow Block: allows the snake to travel through itself\\nThree Mushrooms: double points\\nGreen Mushroom: increases head size of state\";\n //int restart = JOptionPane.showOptionDialog(null,\"Choose your mode\",\"Mode Selection\",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[defaultMode]);\n if(!modeT)\n restart = JOptionPane.showOptionDialog(null,str1,\"Specials?\",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,ops,ops[defaultOps]);\n //restart = JOptionPane.showConfirmDialog(null,\"Would you like to play with special power ups and challenges?\\nIf yes is selected, different items will occasionally appear which have temporary special effects:\\n\\n\\nBlue Shell: No boundaries\\nStar: snake cannot die\\nGolden Mushroom: increases head size of snake\\nGhost: turns the snake invisible\\nPow Block: allows the snake to travel through itself\\nThree Mushrooms: double points\\nBanana: reverses the keys\" ,\"Specials?\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);\n else\n restart = JOptionPane.showOptionDialog(null,str2,\"Specials?\",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,ops,ops[defaultOps]);\n //restart = JOptionPane.showConfirmDialog(null,\"Would you like to play with special power ups and challenges?\\nIf yes is selected, different items will occasionally appear which have temporary special effects:\\n\\n\\nBlue Shell: No boundaries\\nStar: snake cannot die, timer stops\\nGolden Mushroom: adds 3 extra seconds to timer when collected\\nIce Crystal: pauses timer\\nPow Block: allows the snake to travel through itself\\nThree Mushrooms: double points\\nGreen Mushroom: increases head size of state\" ,\"Specials?\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);\n \n if(restart == 1) \n specials = false;\n else if(restart ==0) \n specials = true;\n else if(restart == -1)\n {\n resetSettings();\n System.exit(0);\n }\n \n d = restart;\n }\n if(modeT)\n c = 1;\n \n int[] ab = {c,a,b,d};\n for(int x: ab)\n writer.println(x);\n writer.close();\n //Makes sure the cancel option works\n if(color == null)\n {\n resetSettings();\n System.exit(0);\n }\n }\n catch(IOException e){} \n try { \n image = ImageIO.read(new File(\"Star.png\"));\n image2 = ImageIO.read(new File(\"Mushroom.png\"));\n image3 = ImageIO.read(new File(\"Red Mushroom.png\"));\n image4 = ImageIO.read(new File(\"Blue Shell.png\"));\n image5 = ImageIO.read(new File(\"Boo.png\"));\n image6 = ImageIO.read(new File(\"Three Mushrooms.png\"));\n image7 = ImageIO.read(new File(\"Pow Block.png\"));\n image8 = ImageIO.read(new File(\"Banana.png\"));\n image9 = ImageIO.read(new File(\"Ice Crystal.png\"));\n image10 = ImageIO.read(new File(\"Unmute.png\"));\n image11 = ImageIO.read(new File(\"Mute.png\"));\n image12 = ImageIO.read(new File(\"Green Mushroom.png\"));\n image13 = ImageIO.read(new File(\"Red Shell.png\"));\n image14 = ImageIO.read(new File(\"Red Shell Big.png\"));\n } catch (IOException ex) {\n // handle exception...\n }\n try{\n URL url = this.getClass().getClassLoader().getResource(\"Coin.wav\");\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n bclip = AudioSystem.getClip();\n \n //URL url2 = this.getClass().getClassLoader().getResource(\"Relaxing Elevator Music.wav\");\n \n //AudioInputStream audioIn2 = AudioSystem.getAudioInputStream(url2);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n //clip2.open(audioIn2); \n }catch(Exception e){}\n \n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n //pclip.open(audioIn); \n \n }catch(Exception e){}\n \n \n //Makes sure the cancel option works\n \n \n setFocusable(true);\n requestFocusInWindow();\n setPreferredSize(new Dimension(WIDTH, HEIGHT));\n \n //Creates a list of all locations on the grid\n for(int b = 150; b<630; b+= 15)\n {\n for(int a = 150; a< 1260; a+= 15)\n {\n allLocations.add(new Location(a,b));\n }\n } \n startSnake();\n \n //Makes sure the Dot does not originally start on the snake\n boolean go = true;\n while(go)\n {\n if(snakeOnDot())\n {\n //dots.remove(0);\n \n randomize();\n dot.setA(a);\n dot.setB(b); \n \n //dots.add(dot);\n }\n else\n go = false;\n }\n \n start();\n }",
"public void startTimer() {\n // TODO = handle more aspects of the behaviour required by the specification\n System.out.println(\"starting timer\");\n initialHeroCastle();\n isPaused = false;\n // trigger adding code to process main game logic to queue. JavaFX will target\n // framerate of 0.3 seconds\n timeline = new Timeline(new KeyFrame(Duration.seconds(0.1), event -> {\n if (world.getMode() == -1){\n modeSelectionSwitchToMainMenu();\n }\n world.runTickMoves();\n world.runBattles();\n world.updateGoal();\n if (world.goalAchieved()) {\n world.gameOver();\n deadSwitchToMainMenu(true);\n return;\n }\n List<Soldier> soldiers = world.possiblySpawnSoldiers();\n for (Soldier s : soldiers) {\n loadSoldier(s);\n }\n List<BasicEnemy> deadEnemies = world.cleanEnemies();\n for (BasicEnemy e : deadEnemies) {\n reactToEnemyDefeat(e);\n }\n List<BasicEnemy> newEnemies = world.possiblySpawnEnemies();\n for (BasicEnemy newEnemy : newEnemies) {\n loadEnemies(newEnemy);\n }\n printThreadingNotes(\"HANDLED TIMER\");\n loopNumber.setText(\"Loop: \" + (int) world.getCurrentLoop().get());\n if (world.isCharacterDead()) {\n if (!world.useOneRing())\n deadSwitchToMainMenu(false);\n return;\n }\n if (world.isAtHeroCastle() && world.shouldShopAppear()) {\n System.out.println(\"At Hero Castle. Shopping!\");\n shopSwitchToMainMenu();\n }\n }));\n timeline.setCycleCount(Animation.INDEFINITE);\n timeline.play();\n }",
"public void start (Frogger f, final int GameLevel) {\n\t\t\n\t\tif (!isHot && timeMs > PERIOD) {\t\t\n\t\t\tif (r.nextInt(100) < GameLevel*10) {\n\t\t\t\tdurationMs = 1;\n\t\t\t\tisHot = true;\n\t\t\t\tf.hw_hasMoved = false;\n\t\t\t\tAudioEfx.heat.play(0.2);\n\t\t\t}\t\t\n\t\t\ttimeMs = 0;\n\t\t}\n\t}",
"public GameController() {\r\n\t\t//mySnake = null;\r\n\t\tlives = 5;\r\n\t\treset();\r\n\r\n\t\tgameOver = false;\r\n\r\n\t\tmoveTimer.start();\r\n\t\t\r\n\t\tpoints = 0;\r\n\r\n\t\trand = new Random();\r\n\t\tmushroomTimer = new Timer(1000, new MushroomTimerHelper());\r\n\t\tmushroomTimer.start();\r\n\t\t\r\n\t\tscores = new HighScore[10];\r\n\r\n\t\tfile = new File(\"highscore.txt\");\r\n\t\t\r\n\t\ttry{\r\n\t\t\treadScoresFromFile(file);\r\n\t\t} catch (Exception e){\r\n\t\t\t\r\n\t\t}\r\n\t}",
"void start() throws Exception {\n\t\tSystem.out.println(readLine(110));\n\n\t\tint teamsCount = Integer.parseInt(readLine(5));\n\n\t\tArrayList teams = new ArrayList(teamsCount+1);\n\t\tHashtable teamsTable = new Hashtable();\n\t\twhile(teamsCount--!=0) {\n\t\t\tTeam t = new Team();\n\t\t\tt.name = readLine(100);\n\t\t\tteams.add(t);\n\t\t\tteamsTable.put(t.name,t);\n\t\t}\n\n\t\tint gamesCount = Integer.parseInt(readLine(5));\n\t\twhile(gamesCount--!=0) {\n\t\t\tString line = readLine(100);\n\t\t\tint arroba = line.indexOf('@');\n\t\t\tTeam t1 = (Team) teamsTable.get(line.substring(0,line.indexOf('#')));\n\t\t\tint goals1 = Integer.parseInt(line.substring(line.indexOf('#')+1,arroba));\n\t\t\tt1.goals += goals1;\n\t\t\tline = line.substring(arroba);\n\t\t\tTeam t2 = (Team) teamsTable.get(line.substring(line.indexOf('#')+1));\n\t\t\tint goals2 = Integer.parseInt(line.substring(1,line.indexOf('#')));\n\t\t\tt2.goals += goals2;\n\t\t\tt1.against += goals2;\n\t\t\tt2.against += goals1;\n\n\t\t\tt1.games++;\n\t\t\tt2.games++;\n\n\t\t\tif(goals1>goals2) {\n\t\t\t\tt1.won++;\n\t\t\t\tt2.lost++;\n\t\t\t\tt1.points+=3;\n\t\t\t} else if(goals1<goals2) {\n\t\t\t\tt2.won++;\n\t\t\t\tt1.lost++;\n\t\t\t\tt2.points+=3;\n\t\t\t} else {\n\t\t\t\tt1.draw++;\n\t\t\t\tt2.draw++;\n\t\t\t\tt1.points+=1;\n\t\t\t\tt2.points+=1;\n\t\t\t}\n\n\t\t}\n\n\t\tTreeSet h = new TreeSet(new CompareTeams());\n\t\th.addAll(teams);\n\n\t\tint i=1;\n\t\tfor(Iterator it = h.iterator();it.hasNext();i++) {\n\t\t\tTeam t = (Team) it.next();\n\t\t\tSystem.out.println(\n\t\t\t\ti + \") \" + t.name + \" \" + t.points + \"p, \" + t.games + \"g (\"\n\t\t\t\t+ t.won + \"-\" + t.draw + \"-\" + t.lost + \"), \" + (t.goals-t.against) + \"gd (\"\n\t\t\t\t+ t.goals + \"-\" + t.against + \")\"\n\t\t\t);\n\t\t}\n\n\t}",
"public void assist() throws IOException {\n\t\tlong timerStart = System.currentTimeMillis();\n\t\tTrivia trivia = myTriviaReader.read();\n\t\tGuess guess = new GuesserFactory().getGuesser(trivia).makeGuess(trivia);\n\t\tSystem.out.println(guess);\n\t\tlong timerEnd = System.currentTimeMillis();\n\t\tSystem.out.println(\"Timed: \"+(timerEnd-timerStart)+\" millis\");\n\t\tSystem.out.println(\"\\n\\n\\n\");\n\t}",
"public static void main(String[] args) { \n \tprintAvailableMaps();\n \t\n\t\tGame game = new Game();\n\t\tScanner input = game.openFile();\n \tgame.readMapFile(input);\n \tgame.prepareTable();\n \tTapeHead player = game.preparePlayer();\n \t//game.print();\n \twhile(true) {\n \t\tgame.GameRunning(player);\n \t} \n }",
"public void run() {\n\t\t\t \t \n\t\t\t \t test.load1();\n\t\t\t \t //System.out.println(\"heart beat report\"+System.currentTimeMillis());\n\t\t\t }",
"public void runTime() {\n int generation = 0;\n System.out.println(\"Beginning of time\");\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // CLS\n\n while (!universeIsDead() & generation < 2000 /*& !universStable*/) {\n // CLS\n System.out.println(\"Generation : \" + generation);\n generation++;\n System.out.println(this);\n nextGeneration();\n try {\n Thread.sleep(50);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n // CLS\n System.out.println(\"Generation : \" + generation);\n System.out.println(this);\n System.out.println(\"Ending of time\");\n }",
"public void shoot() {\r\n\t\twhile (rounds > 1) {\r\n\t\t\trounds--;\r\n\t\t\tSystem.out.println(gunType + \" is shooting now\\n\" + rounds + \" \\nCLACK! CLACK! CLAK! CLAK! CLAK!\");\r\n\t\t\tif (rounds == 1) {\r\n\t\t\t\tSystem.out.println(\"Magazine's Empty!! \\nRELOAD!!\\nRELOAD!!!\\nRELAOD!!!\");\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}",
"static void recordProcess() {\n try {\n PrintWriter output = new PrintWriter(new FileWriter(file, true));\n output.print(huLuWaList.size() + \" \");\n lock.lock();\n for (Creature creature : huLuWaList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.print(enemyList.size() + \" \");\n for (Creature creature : enemyList) {\n output.print(creature.getCreatureName() + \" \" + creature.getX() + \" \" + creature.getY()+\" \");\n }\n output.println();\n output.close();\n lock.unlock();\n }catch (Exception ex){\n System.out.println(ex);\n }\n }",
"public static void main(String[] args) throws Exception\n {\n StdDraw.setCanvasSize(1920, 1080);\n StdDraw.setXscale(0, 1920);\n StdDraw.setYscale(0, 1080);\n //enable the calcul off the next screen before displaying\n //increase fluidity\n StdDraw.enableDoubleBuffering();\n\n int level;\n int number_of_wins = 0;\n RefreshTimer refresh_timer; //needed to get the same refresh rate\n //between every computer\n\n// StdAudio.loop(\"audio/background_low.wav\");\n //this music had to be remove for the zip to be less than 20MB...\n\n while (true) //the whole ame loop\n {\n IngameTimer timer1 = null; //timers for respawn\n IngameTimer timer2 = null;\n StdDraw.clear();\n int lives = 3; //chosen number of lives\n int lives2 = 3;\n Wrapper.first_player_points = 0;\n Wrapper.second_player_points = 0;\n //draw the menu screen, waiting for a key pressed\n while(true)\n {\n if (StdDraw.isKeyPressed(77)) //M key\n {\n DrawAll.drawMore();\n StdDraw.show();\n while (!StdDraw.isKeyPressed(82)) //R key\n {\n if (StdDraw.isKeyPressed(27))\n System.exit(0);\n }\n }\n else\n {\n DrawAll.drawStart();\n StdDraw.show();\n if (StdDraw.isKeyPressed(49)) //1 key\n {\n level = 1;\n break;\n }\n\n if (StdDraw.isKeyPressed(50)) //2 key\n {\n level = 2;\n break;\n }\n if (StdDraw.isKeyPressed(51)) //3 key\n {\n level = 3;\n break;\n }\n if (StdDraw.isKeyPressed(27)) //escape key\n System.exit(0);\n }\n }\n StdAudio.close();\n StdAudio.play(\"audio/start_click_v2.wav\");\n //create a new SpaceInvaders object and initliaze Wrapper variables\n Wrapper.initializeVariables();\n SpaceInvaders SI = new SpaceInvaders(level, number_of_wins);\n refresh_timer = new RefreshTimer(1); //just to avoid a null\n //comparision every iteration of the loop below\n //THE PLAYING PART\n while (SI.aliensWon() == 0)\n {\n if (refresh_timer.getTime() == 0)\n {\n refresh_timer = new RefreshTimer(20);\n\n //restart if no aliens left\n if (SI.aliensLeft() == 0)\n {\n DrawAll.drawWon();\n StdDraw.show();\n StdAudio.play(\"audio/win.wav\");\n WaitTimer timer = new WaitTimer(3000);\n synchronized (Wrapper.lock){Wrapper.lock.wait();}\n SI = new SpaceInvaders(level, ++number_of_wins);\n Wrapper.initializeVariables();\n }\n\n //pause screen\n if (StdDraw.isKeyPressed(80))\n {\n SI.pause();\n DrawAll.drawPause();\n StdDraw.show();\n while(true)\n {\n if (StdDraw.isKeyPressed(27)) //escape key\n System.exit(0);\n\n if (StdDraw.isKeyPressed(82)) //R key\n break;\n }\n SI.resume();\n }\n\n //calcul part\n SI.movePlayer();\n SI.updateBullets();\n SI.updateAliens();\n\n if (level != 2)\n SI.updateProtections();\n\n if (level == 1)\n {\n if (SI.player.isAlive() == 1)\n SI.updateBonus();\n if (Wrapper.extraLife() == 1)\n lives++;\n }\n\n //drawing part\n StdDraw.clear();\n //draw background\n DrawAll.drawBackground();\n //go SpaceInvaders.java to see what it draws\n SI.drawEverything();\n //draw rocket lives\n DrawAll.drawLivesFirst(lives);\n\n if (level != 3)\n DrawAll.drawPoints(SI);\n else\n {\n DrawAll.drawPointsMulti(SI);\n DrawAll.drawLivesSecond(lives2);\n }\n\n //check if player is still alive\n if (SI.player.isAlive() == 0)\n {\n DrawAll.drawDead(SI.player);\n if (timer1 == null)\n {\n timer1 = new IngameTimer(1000);\n lives--;\n if (lives == 0)\n break;\n }\n else if (timer1.time == 0)\n {\n timer1 = null;\n if (level != 3)\n SI.restart();\n else\n SI.player.restart();\n Wrapper.repositioning();\n }\n if (level != 3)\n DrawAll.drawDeadScreen();\n }\n\n //check game state (finished, lost, win\n if (SI.player2.isAlive() == 0)\n {\n DrawAll.drawDead(SI.player2);\n if (timer2 == null)\n {\n timer2 = new IngameTimer(1000);\n lives2--;\n if (lives2 == 0)\n break;\n }\n else if (timer2.time == 0)\n {\n timer2 = null;\n SI.player2.restart();\n }\n }\n }\n //need to pause the display of the images, otherwise\n //we literally see nothing\n StdDraw.show(10);\n }\n\n number_of_wins = 0;\n\n StdAudio.play(\"audio/game_over_v3.wav\");\n\n if (SI.aliensWon() == 1)\n {\n DrawAll.drawAliensWon();\n DrawAll.drawDead(SI.player);\n }\n\n if (lives == 0 && level != 3)\n DrawAll.drawAliensWon();\n else if (lives == 0)\n DrawAll.drawDeadPlayer1();\n else if (lives2 == 0)\n DrawAll.drawDeadPlayer2();\n\n StdDraw.show();\n\n WaitTimer timer = new WaitTimer(1000);\n synchronized (Wrapper.lock){Wrapper.lock.wait();}\n\n IngameTimer timer3 = null;\n int n = 5;\n int changed;\n if (level != 3)\n changed = Scoreboard.checkSolo();\n else\n changed = Scoreboard.checkMulti();\n\n //wait for key pressed\n while(true)\n {\n if (n == -1)\n break;\n else if (timer3 == null)\n timer3 = new IngameTimer(1200);\n else if (timer3.time == 0)\n {\n DrawAll.drawGameOver(level, SI.aliensWon(),\n lives, lives2, n, changed);\n n--;\n timer3 = null;\n StdDraw.show();\n }\n if (StdDraw.isKeyPressed(27)) //escape key\n {\n System.exit(0);\n break;\n }\n if (StdDraw.isKeyPressed(82)) //r key\n {\n break;\n }\n }\n }\n }",
"public GameLevel LoadGame() throws IOException {\n FileReader fr = null;\n BufferedReader reader = null;\n\n try {\n System.out.println(\"Reading \" + fileName + \" data/saves.txt\");\n\n fr = new FileReader(fileName);\n reader = new BufferedReader(fr);\n\n String line = reader.readLine();\n int levelNumber = Integer.parseInt(line);\n\n //--------------------------------------------------------------------------------------------\n\n if (levelNumber == 1){\n gameLevel = new Level1();\n } else if(levelNumber == 2){\n gameLevel = new Level2();\n JFrame debugView = new DebugViewer(gameLevel, 700, 700);\n } else {\n gameLevel = new Level3();\n }\n\n //------------------------------------------------------------------------------------------\n\n\n while ((line = reader.readLine()) != null){\n String[] tokens = line.split(\",\");\n String className = tokens[0];\n float x = Float.parseFloat(tokens[1]);\n float y = Float.parseFloat(tokens[2]);\n Vec2 pos = new Vec2(x, y);\n Body platform = null;\n\n if (className.equals(\"PlayableCharacter\")){\n PlayableCharacter playableCharacter = new PlayableCharacter(gameLevel, PlayableCharacter.getItemsCollected(),PlayableCharacter.isSpecialGravity(),game);\n playableCharacter.setPosition(pos);\n gameLevel.setPlayer(playableCharacter);\n\n }\n\n if (className.equals(\"LogPlatform\")){\n Body body = new LogPlatform(gameLevel, platform);\n body.setPosition(pos);\n }\n\n if (className.equals(\"Coin\")){\n Body body = new Coin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new Pickup(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"ReducedGravityCoin\")){\n Body body = new ReducedGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupRGC(gameLevel.getPlayer(), game)\n\n );\n }\n\n if (className.equals(\"AntiGravityCoin\")){\n Body body = new AntiGravityCoin(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new PickupAGC(gameLevel.getPlayer(), game) );\n }\n\n if (className.equals(\"Rock\")){\n Body body = new Rock(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new FallCollisionListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Pellet\")){\n Body body = new Pellet(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(\n new AddLifeCollisionListener(gameLevel.getPlayer(), game));\n }\n\n if (className.equals(\"Branch\")){\n Body body = new Branch(gameLevel);\n body.setPosition(pos);\n body.addCollisionListener(new BranchListener(gameLevel.getPlayableCharacter(), game));\n }\n\n if (className.equals(\"Portal\")){\n Body portal = new Portal(gameLevel);\n portal.setPosition(pos);\n portal.addCollisionListener(new DoorListener(game));\n }\n\n if (className.equals(\"DeathPlatform\")){\n float w = Float.parseFloat(tokens[3]);\n float h = Float.parseFloat(tokens[4]);\n float deg = Float.parseFloat(tokens[5]);\n\n Body body = new DeathPlatform(gameLevel, w, h);\n body.setPosition(pos);\n body.addCollisionListener(new FallCollisionListener(gameLevel.getPlayer(), game));\n body.setFillColor(Color.black);\n body.setAngleDegrees(deg);\n\n }\n\n }\n\n return gameLevel;\n } finally {\n if (reader != null) {\n reader.close();\n }\n if (fr != null) {\n fr.close();\n }\n }\n }",
"void turn2Start() throws InterruptedException {\r\n\t\t \r\n\t\t secondTurn = true;\r\n\t\t \r\n\t\t displayMessage.setText(\"TIME'S UP!\");\r\n\t\t timeSeconds2 = 1; //duration\r\n\t\t \r\n\t\t Timer clock2 = new Timer();\r\n\t\t clock2.scheduleAtFixedRate(new TimerTask() {\r\n\t\t public void run() {\r\n\t\t if(timeSeconds2 >= 0)\r\n\t\t {\r\n\t\t timeSeconds2--; \r\n\t\t }\r\n\t\t else {\r\n\t\t clock2.cancel();\r\n\t\t \r\n\t\t try {\r\n\t\t\t\t\t\t\t\tgetReadyMessage2();\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\t\t} \r\n\t\t \r\n\t\t ////////////////////////////////reset everything///////////////////\r\n\t\t wordCount.setVisible(false);\r\n\t\t wordMax.setVisible(false);\r\n\t\t slash.setVisible(false);\r\n\t\t counterBox.setVisible(false);\r\n\t\t countDownTimer.setVisible(false);\r\n\t\t countDownTimer.setText(\"20\");\r\n\t\t outOf=0;\r\n\t\t wordCount.setText(Integer.toString(outOf));\r\n\t\t \r\n\t\t String sequenceText = \"\" ;\r\n\t\t \t\t\t\tfor (int i = 0; i < DupMeClient.myPattern.size(); i++) {\r\n\t\t \t\t\t\t\tsequenceText = sequenceText + Integer.toString(DupMeClient.myPattern.get(i));\r\n\t\t \t\t\t\t}\r\n\t\t \t\t\t\tlastPattern.setText(sequenceText);\r\n\t\t \t\t\t\t\r\n\t\t DupMeClient.opponentPattern = DupMeClient.myPattern;\r\n\t\t DupMeClient.myPattern = new ArrayList<Integer>();\r\n\t\t \r\n\t\t \r\n\t\t }\r\n\t\t }\r\n\t\t }, 1000,1000);\r\n }",
"protected void processTimer(){\n if(timer != null){\n timer.cancel();\n timer = null;\n }\n // Verificamos si el partido esta en progreso\n if(match.status == Match.STATUS_PENDING || match.status == Match.STATUS_ENDED){\n return;\n }\n // Creamos temporizador 90 * 60 * 1000 = 5.400.000\n timer = new CountDownTimer(5400000, 1000) {\n @Override\n public void onTick(long l) {\n // Calcular los segundos que pasaron\n long seconds = (new Date().getTime() - matchDayLong) / 1000;\n // Calcular los minutos del partido\n long minutes = seconds / 60;\n //long minutes = TimeUnit.MILLISECONDS.toMinutes(uptime);\n if(minutes < 0){\n minutes = 0;\n seconds = 0;\n statusMedium.setText(\"PT\");\n }if(minutes > 45 && minutes < 60){\n minutes = 45;\n seconds = 60;\n }else if(minutes > 90){\n minutes = 90;\n seconds = 60;\n statusMedium.setText(\"ST\");\n }else if(minutes >= 60){\n minutes -= 15;\n statusMedium.setText(\"ST\");\n }else{\n statusMedium.setText(\"PT\");\n }\n\n statusTime.setText(String.format(\"%02d:%02d\", minutes, (seconds%60)));\n }\n\n @Override\n public void onFinish() {\n\n }\n }.start();\n }",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(System.in));\n\t\tline = br.readLine().split(\" \");\n\t\tr = Integer.parseInt(line[0]);\n\t\tc = Integer.parseInt(line[1]);\n\t\tn = Integer.parseInt(line[2]);\n\t\tmap = new char[r][c];\n\t\ttimer = new int[r][c];\n\t\t//0 sec: bomb setup\n\t\tfor(int i=0;i<r;i++){\n\t\t\tString rc = br.readLine().trim();\n\t\t\tmap[i] = rc.toCharArray();\n\t\t\tfor(int j=0;j<c;j++){\n\t\t\t\tif(map[i][j] == 'O'){\n\t\t\t\t\ttimer[i][j] = 3;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t//1 sec ~ : active tictok\n\t\ttiktok(1,1);\n\t}",
"public void progressBarTimer() {\r\n progressBar.setProgress(0);\r\n TimerTask task = new TimerTask() {\r\n @Override\r\n public void run() {\r\n if(!pause) progressBar.incrementProgressBy(1);\r\n\r\n //Game over\r\n if (progressBar.getProgress() >= 100) gameOver();\r\n }\r\n };\r\n\r\n //schedule starts after 0.01 seconds and repeats every second.\r\n timer.schedule(task, 10, 1000);\r\n }",
"@Override\n public void startGame() {\n timer.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n update();\n }\n }, 0, 2);\n }",
"private void delayTimerActionPerformed(ActionEvent e) {\n timer.stop();\n guessesCounter++;\n guess.setText(\"Guesses: \" + String.valueOf(guessesCounter));\n\n picked[1] = index;\n if (behind[picked[0]] == behind[picked[1]]) {\n behind[picked[0]] = -1;\n behind[picked[1]] = -1;\n remaining--;\n gameOverMessage(\"Good job!\");\n } else {\n gameOverMessage(\"Try again!\");\n //delay 1 second\n long t = System.currentTimeMillis();\n while (System.currentTimeMillis() - t < 1000){\n boxLabel[picked[0]].setIcon(back);\n boxLabel[picked[1]].setIcon(back);\n }\n }\n\n choice = 0;\n if (remaining == 0) {\n // save best score in a file\n try {\n // Create file\n File scoreFile = new File(\"scores/score.txt\");\n PrintWriter out = new PrintWriter(new FileWriter(scoreFile, true));\n out.println(\"Score: \" + guessesCounter);\n out.close();\n } catch (Exception err){\n System.err.println(\"Error: \" + err.getMessage());\n }\n newButton.requestFocus();\n //exitButton.doClick();\n\n String outputText;\n if(guessesCounter <= 11){\n outputText = \"That couldn't be true. You are so lucky, bro!!!\";\n gameOverMessage(outputText);\n } else if (guessesCounter > 11 && guessesCounter <= 13){\n outputText = \"Lol, nice game. You have really good memory!\";\n gameOverMessage(outputText);\n } else if (guessesCounter >=14 && guessesCounter < 16){\n outputText = \"Not bad, bravo!\";\n gameOverMessage(outputText);\n } else if(guessesCounter >=17 && guessesCounter <= 19){\n outputText = \"You need a little bit more concentration\";\n gameOverMessage(outputText);\n } else {\n outputText = \"Come on. You can do it better! Try again!\";\n gameOverMessage(outputText);\n }\n }\n }",
"void hp_counter()\n {\n T=new Timer();\n T.scheduleAtFixedRate(new TimerTask() {\n @Override\n public void run() {\n runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //decrement the HP by delay of a second\n if(hp_value>0) {\n redball.setText(hp_value + \"\");\n hp_value--;\n }\n //you have lost and the game will reset\n else if(hp_value<=0)\n {\n //Here's a funny toast for all Sheldon's fans\n toast.setView(lost);\n toast.show();\n //\n resetValues();\n }\n }\n });\n }\n }, 1000, 1000);\n\n }",
"@Override\n\tpublic void start() {\n\t\tplaySound(audio.newSoundEffect(\"sfx\" + File.separator + \"crash.ogg\"));\n\n\t\tdeaths = (int) (Math.random() * 500) + 300;\n\t\ttimer = 0;\n\n\t\ttextBox = new lib.TextBox(64, 96, window.width() - 128,\n\t\t\t\twindow.height() - 96, 32);\n\t\ttextBox.addText(String.valueOf(deaths) + \" people died in the crash.\");\n\t\ttextBox.delay(0.4);\n\t\ttextBox.addText(\"British Bearways is facing heavy legal pressure from the family and loved-ones of the dead and an investigation into the incident will be performed.\");\n\t\ttextBox.newline();\n\t\ttextBox.delay(0.4);\n\t\ttextBox.addText(\"The inquery into your incompetance will lead to humanity discovering your true bear nature.\");\n\t\ttextBox.newline();\n\t\ttextBox.delay(0.4);\n\t\ttextBox.addText(\"Your guilt for the deaths you caused, and your failure to pass as a human, will gnaw at you and you will have to revert to your drinking problem to attempt to cope.\");\n\t\ttextBox.newline();\n\t\ttextBox.newline();\n\t\ttextBox.delay(0.4);\n\t\ttextBox.addText(\"With no income, there is no way your family can survive the fast-approaching winter months.\");\n\t\ttextBox.newline();\n\t\ttextBox.newline();\n\t\ttextBox.delay(0.4);\n\t\ttextBox.newline();\n\t\ttextBox.addText(\"Game Over.\");\n\t\ttextBox.delay(0.5);\n\t\ttextBox.addText(\"You Lose.\");\n\n\t\tsaveScore();\n\t}",
"public void run() //call game over method \r\n {\r\n gui.display(\"The time limit has been reached. The game is now over!\");\r\n \r\n try { //try catch for Thread.sleep in gameOver()\r\n gameOver();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Game.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private void temporizadorRonda(int t) {\n Timer timer = new Timer();\n TimerTask tarea = new TimerTask() {\n @Override\n public void run() {\n if (!dead) {\n vida = vidaEstandar;\n atacar();\n rondas ++;\n tiempoRonda = tiempo;\n incrementarTiempo();\n reiniciarVentana();\n if(rondas == 4){\n matar();\n }\n temporizadorRonda(tiempo);\n }\n }\n };\n timer.schedule(tarea, t * 1000);\n }",
"public void start() {\n clear();\n // Assigning chess pieces to players.\n whitePieces.add(new Piece(Owner.WHITE, Who.KING, Rank.R1, File.E));\n whitePieces.add(new Piece(Owner.WHITE, Who.QUEEN, Rank.R1, File.D));\n whitePieces.add(new Piece(Owner.WHITE, Who.ROOK, Rank.R1, File.A));\n whitePieces.add(new Piece(Owner.WHITE, Who.ROOK, Rank.R1, File.H));\n whitePieces.add(new Piece(Owner.WHITE, Who.BISHOP, Rank.R1, File.C));\n whitePieces.add(new Piece(Owner.WHITE, Who.BISHOP, Rank.R1, File.F));\n whitePieces.add(new Piece(Owner.WHITE, Who.KNIGHT, Rank.R1, File.B));\n whitePieces.add(new Piece(Owner.WHITE, Who.KNIGHT, Rank.R1, File.G));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.A));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.B));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.C));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.D));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.E));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.F));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.G));\n whitePieces.add(new Piece(Owner.WHITE, Who.PAWN, Rank.R2, File.H));\n\n for (Piece p : whitePieces) {\n board[p.row.ordinal()][p.col.ordinal()] = p;\n }\n\n blackPieces.add(new Piece(Owner.BLACK, Who.KING, Rank.R8, File.E));\n blackPieces.add(new Piece(Owner.BLACK, Who.QUEEN, Rank.R8, File.D));\n blackPieces.add(new Piece(Owner.BLACK, Who.ROOK, Rank.R8, File.A));\n blackPieces.add(new Piece(Owner.BLACK, Who.ROOK, Rank.R8, File.H));\n blackPieces.add(new Piece(Owner.BLACK, Who.BISHOP, Rank.R8, File.C));\n blackPieces.add(new Piece(Owner.BLACK, Who.BISHOP, Rank.R8, File.F));\n blackPieces.add(new Piece(Owner.BLACK, Who.KNIGHT, Rank.R8, File.B));\n blackPieces.add(new Piece(Owner.BLACK, Who.KNIGHT, Rank.R8, File.G));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.A));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.B));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.C));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.D));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.E));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.F));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.G));\n blackPieces.add(new Piece(Owner.BLACK, Who.PAWN, Rank.R7, File.H));\n\n for (Piece p : blackPieces) {\n board[p.row.ordinal()][p.col.ordinal()] = p;\n }\n\n whoseTurn = Owner.WHITE;\n canCastle = 15;\n passer = null;\n movesDone = lastEatMove = 0;\n }",
"public void Beginattack(HW10Trainer[] people, int numTrainer,Scanner scan)\n{\nString name1, name2;\nname1=scan.next();//reads the first part and sets it as a string \nname2=scan.next();//reads the second part and sets it as a string \nscan.nextLine();\nHW10Trainer a = new HW10Trainer();//pre set\nHW10Trainer b= new HW10Trainer(); \n\nfor (int i =0; i<numTrainer; i++)///matches the trainer with there name\n{\n\tif(name1.equals(people[i].getName()))//determines which trainer in the array goes with this name\n\t{\n\t\ta=people[i];\n\t}\n\tif(name2.equals(people[i].getName()))\n\t{\n\t\tb=people[i];\n\t}\n}\nint max1,max2;\nmax1=a.getNumMonsters();//gets the total amount of pokemen for that trainer\nmax2=b.getNumMonsters();\nint curr1,curr2; //acts as the index place value for the array \ncurr1=0;//starts the array at poistion 0\ncurr2=0;\nHW10Monster side1,side2;//sets the side for the battle \nside1= a.getMonster(curr1);//sets side one for all of the first trainers monsters\nside2=b.getMonster(curr2);//side two = all seconds trainers monsters\nSystem.out.println(a.getName() + \" is fighting \" + b.getName());\nSystem.out.println(\"Starting battle is \" + side1.name + \" versus \" + side2.name);\nwhile(curr1 < max1 && curr2<=max2)//if curr1 is less then max and curr2 is less then max2 then run\n{\n\t\n\tint result = fight(side1,side2,a,b);//sends the fight method the pokemon information and the Trainers information\nif(result==1)\n{\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\tif(curr2<max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n}\n else if(result == 2)\n{\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n}\n else if(result == 3)\n{\n\tSystem.out.println(\"*Draw*\");\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\t\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\t\n\tif(curr2 < max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n\tSystem.out.println(\"* End Draw *\");\n}\n\n\n\t\n}\n\tif( curr1<max1 && curr2>max2)//if the first trainer still has pokemon and the second does not\n\t{\n\t\tSystem.out.println(a.getName() + \" won the match\");\n\t}\n\telse if (curr2<max2 && curr1>max1)//if the second trainer still has pokemon and the first does not\n\t{\n\t\t\n\t\tSystem.out.println(b.getName() + \" won the match\");\n\t}\n\telse if(curr2<max2 && curr1<max1)//if both sides dont have any pokemon left\n\t\tSystem.out.println(\"Battle is a draw\");\n\n}",
"@Override\n\tpublic void run() {\n\t\tlogger.info(\"Timer for the initialization expired\");\n\t\tif(logic.getCurrentPlayer() != null) {\n\t\t\tlogic.setBonusBar(0, player.getPlayerID());\n\t\t}\n\t\telse {\n\t\t\tlogic.setLeaderCard(0, player.getPlayerID());\n\t\t}\n\t}",
"public void savePokemonData()\r\n {\r\n try\r\n {\r\n int currentPokemon = playerPokemon.getCurrentPokemon();\r\n\r\n FileWriter fw = new FileWriter(\"tempPlayerPokemon.txt\");\r\n\r\n List<String> list = Files.readAllLines(Paths.get(\"playerPokemon.txt\"), StandardCharsets.UTF_8);\r\n String[] pokemonList = list.toArray(new String[list.size()]);\r\n\r\n String currentPokemonStr = pokemonList[currentPokemon];\r\n String[] currentPokemonArray = currentPokemonStr.split(\"\\\\s*,\\\\s*\");\r\n\r\n currentPokemonArray[1] = Integer.toString(playerPokemon.getLevel());\r\n currentPokemonArray[3] = Integer.toString(playerPokemon.getCurrentHealth());\r\n currentPokemonArray[4] = Integer.toString(playerPokemon.getCurrentExperience());\r\n for(int c = 0; c < 4; c++)\r\n {\r\n currentPokemonArray[5 + c] = playerPokemon.getMove(c);\r\n }\r\n\r\n String arrayAdd = currentPokemonArray[0];\r\n for(int i = 1; i < currentPokemonArray.length; i++)\r\n {\r\n arrayAdd = arrayAdd.concat(\", \" + currentPokemonArray[i]);\r\n }\r\n\r\n pokemonList[currentPokemon] = arrayAdd;\r\n\r\n for(int f = 0; f < pokemonList.length; f++)\r\n {\r\n fw.write(pokemonList[f]);\r\n fw.write(\"\\n\");\r\n }\r\n fw.close();\r\n\r\n Writer.overwriteFile(\"tempPlayerPokemon\", \"playerPokemon\");\r\n }\r\n catch(Exception error)\r\n {\r\n }\r\n }",
"public void run(){\n // Initialized at a lower number just for testing purposes - 2 mins is too long to wait\n // OUTPUT MESSAGE - BANK SIMULATION RESULTS\n \n // RUN MAIN IF CONDITION\n // IF Timer is equal to time requested to run - change equal value to whatever needed\n // THEN print out all recorded results\n if(timer == 25){\n \n totalNumCustomers = helped1 + helped2 + helped3 + helped4 + helped5 + bankLine.size();\n \n System.out.println(\"\\n-------------------------------------------------------------------------------\\n\");\n System.out.println(\" *** BANK SIMULATION RESULTS *** \\n\");\n System.out.println(\"\\t - Total amount of customers that visited the bank: \" + totalNumCustomers + \"\\n\");\n System.out.println(\"\\t - Teller #1 helped: \" + helped1 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent1 + \" seconds\");\n System.out.println(\"\\t - Teller #2 helped: \" + helped2 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent2 + \" seconds\");\n System.out.println(\"\\t - Teller #3 helped: \" + helped3 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent3 + \" seconds\");\n System.out.println(\"\\t - Teller #4 helped: \" + helped4 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent4 + \" seconds\");\n System.out.println(\"\\t - Teller #5 helped: \" + helped5 + \" customers\" + \"\\tTotal occupied time: \" + timeSpent5 + \" seconds\");\n System.out.println(\"\\n\\t - Total amount of customers that did not get help: \" + bankLine.size());\n System.out.println(\"\\n-------------------------------------------------------------------------------\\n\");\n \n System.exit(-1);\n \n // RUN MAIN ELSE CONDITION\n } else {\n // Random time with teller 2 - 5 seconds\n if(randy.nextInt(2) < 6){\n int randomTime = (randy.nextInt(5 - 2) + 3);\n bankLine.add(randomTime);\n }\n \n // BANKER 1------------------------------------------------------------------\n while(banker1 == 1){\n processTime = timer;\n banker1 = 0;\n }\n if((timer - processTime) >= randTeller[0]){\n System.out.println(\"Teller is now available.\");\n availableBanker[0] = true; // Teller is now available\n }\n if(availableBanker[0] == true && bankLine.isEmpty() == false){\n timeSpent1 = timeSpent1 + randTeller[0];\n randTeller[0] = bankLine.poll();\n banker1 = 1;\n System.out.println(\"A customer was served successfully served. (1)\");\n helped1++;\n }\n \n // BANKER 2------------------------------------------------------------------\n // This starts the timer until the teller is done with the customer. Then it resets.\n while(banker2 == 1){\n processTime2 = timer;\n banker2 = 0;\n }\n if((timer - processTime2) >= randTeller[1]){\n System.out.println(\"Teller is now available.\");\n availableBanker[1] = true; // Teller is now available\n }\n if(availableBanker[1] == true && bankLine.isEmpty() == false){\n timeSpent2 = timeSpent2 + randTeller[1];\n randTeller[1] = bankLine.poll();\n banker2 = 1;\n System.out.println(\"A customer was served successfully served. (2)\");\n helped2++;\n }\n \n \n // BANKER 3------------------------------------------------------------------\n while(banker3 == 1){\n processTime3 = timer;\n banker3 = 0;\n }\n if((timer - processTime3) >= randTeller[2]){\n System.out.println(\"Teller is now available.\");\n availableBanker[2] = true; // Teller is now available\n }\n if(availableBanker[2] == true && bankLine.isEmpty() == false){\n timeSpent3 = timeSpent3 + randTeller[2];\n randTeller[2] = bankLine.poll();\n banker3 = 1;\n System.out.println(\"A customer was served successfully served. (3)\");\n helped3++;\n \n }\n \n \n // BANKER 4------------------------------------------------------------------\n while(banker4 == 1){\n processTime4 = timer;\n banker3 = 0;\n }\n if((timer - processTime4) >= randTeller[3]){\n System.out.println(\"Teller is now available.\");\n availableBanker[3] = true; // Teller is now available\n }\n if(availableBanker[3] == true && bankLine.isEmpty() == false){\n timeSpent4 = timeSpent4 + randTeller[3];\n randTeller[3] = bankLine.poll();\n banker4 = 1;\n System.out.println(\"A customer was served successfully served. (4)\");\n helped4++; \n }\n \n \n // BANKER 5------------------------------------------------------------------\n while(banker5 == 1){\n processTime5 = timer;\n banker5 = 0;\n }\n if((timer - processTime5) >= randTeller[4]){\n System.out.println(\"Teller is now available.\");\n availableBanker[4] = true; // Teller is now available\n }\n if(availableBanker[4] == true && bankLine.isEmpty() == false){\n timeSpent5 = timeSpent5 + randTeller[4];\n randTeller[4] = bankLine.poll();\n banker5 = 1;\n System.out.println(\"A customer was served successfully served. (5)\");\n helped5++; \n }\n \n timer++;\n \n } // End of timer == value \n \n }",
"public boolean runGame()\n {\n int indexAnimaux; // index de l'animal qui joue\n int tourDeJeu; // numéro du tour de jeu\n long heureDebutTourDeJeu; // heure de début de la boucle\n \n tourDeJeu = 0;\n runGame = true;\n do {\n heureDebutTourDeJeu = System.currentTimeMillis();\n winCons.print(\"\\n------[Début du tour n°\" + tourDeJeu + \"]------\");\n // System.out.println(\"------[Début du tour n°\" + tourDeJeu + \"]------\");\n for (indexAnimaux = 0 ; indexAnimaux < nombreMaxAnimaux ; indexAnimaux++ ) {\n if (tableDesAnimaux[indexAnimaux] != null) {\n // C'est le tour de cet animal de jouer\n if (modeConsole) {\n winCons.print(\"C'est à l'animal \" + indexAnimaux + \" de jouer...\");\n }\n // Test animal vivant\n if (tableDesAnimaux[indexAnimaux].estVivant() == false) {\n // L'animal est mort !\n winCons.print(\"L'animal n°\" + indexAnimaux + \" est mort !!!\");\n //tableDesAnimaux[indexAnimaux] = null;\n }\n // Repeint la carte de jeu pour faire 'bouger' les animaux\n winMap.repaint(tableDesAnimaux[indexAnimaux].getX(), tableDesAnimaux[indexAnimaux].getY());\n // Joue !\n tableDesAnimaux[indexAnimaux].joueSonTour();\n // Affiche la position de l'animal dans la console\n winCons.print(tableDesAnimaux[indexAnimaux].lectureLogTour());\n // Repeint la carte de jeu pour faire 'bouger' les animaux\n winMap.repaint(tableDesAnimaux[indexAnimaux].getX(), tableDesAnimaux[indexAnimaux].getY());\n }\n }\n /*\n // Repeindre la carte de jeu pour faire évoluer les animaux\n winMap.paintMe();\n */\n \n // Calcul du temps du tour de jeu\n winCons.print(\"Durée du temps de travail : \" +\n ((System.currentTimeMillis() - heureDebutTourDeJeu) / 1000) + \"secondes\");\n //System.out.println(\"Durée du temps de travail : \" + ((System.currentTimeMillis() - heureDebutTourDeJeu) / 1000) + \"secondes\" );\n // Attente pour obtenir un tour en 1 seconde\n do {\n // Attente pour obtenir au minimum 1 seconde de tour de jeu\n } while (System.currentTimeMillis() < heureDebutTourDeJeu + 1000);\n\n \n \n // Incrémentation au numéro de tour suivant\n tourDeJeu++;\n /*\n if (tourDeJeu >= 50) {\n runGame = false;\n }\n */\n \n } while(runGame);\n winMap.hideMe();\n winMap = null;\n winCons.hideMe();\n winCons = null;\n return true;\n }",
"private void startGame() {\r\n setGrid();\r\n setSnake();\r\n newPowerUp();\r\n timer.start();\r\n }",
"public void boggartBattle (int points)\n {\n\tchar doesntmatter = IBIO.inputChar (\"Type anything to proceed on your journey: \");\n\tprintSlow (\"\\nAfter being completely confused out of your mind in Divination, you glance at your schedule and notice that\");\n\tprintSlow (\"Defence Against the Dark Arts is your next class! Although in the past, you haven't had much luck with\");\n\tprintSlow (\"Teachers in this subject, you have a really good feeling about this year.\");\n\tprintSlow (\"You walk into class just in time as your teacher begins his lecture...\\n\");\n\tprintSlow (\"Welcome Third Year Students of Hogwarts, to you very first Defence against The Dark Arts Class of the Year.\");\n\tprintSlow (\"My name is Remus Lupin, and for the duration of the year, I will be your guide to facing these awful Beasts\");\n\tprintSlow (\"Many of the challenges you may face throughout this course are designed pretty simply - To end your life\");\n\tprintSlow (\"Do not take these lightly, or you may not make it out alive!\");\n\tSystem.out.print (\"*Lupin Grins*\");\n\tprintSlow (\" Alright then, onto our first lesson against an evil we may face out in the real world, a boggart!\");\n\tprintSlow (\"These hide in cabinets, and will summon themselves as your greatest fear. The only way to defeat them is stare them in the eye, and shout...\");\n\tprintSlow (\"\\t\\t\\t\\t\\t\\tRiddikulus!\");\n\tprintSlow (\"For this challenge, your opponents will be controlled - you'll either face a dragon, aragog, a goblin, a death eater, or a dementor.\");\n\tprintSlow (\"\\nHarry my boy, you can be first up to the challenge, go ahead!\\n\");\n\tcabinet ();\n\tString evil = \"boggart\";\n\t//Generates your foe\n\tint randomnum = (int) (Math.random () * 5) + 1;\n\tString randomfoe = \"idk\";\n\tString foeText = \"idk\";\n\tif (randomnum == 1)\n\t{\n\t randomfoe = \"dragon\";\n\t foeText = \"You see before you something that reminds you of a Muggle-lizard, with large metallic scales and enormous wings.\\nThe foe seems warm, as if it might breath fire...\";\n\t}\n\n\n\telse if (randomnum == 2)\n\t{\n\t randomfoe = \"aragog\";\n\t foeText = \"The creature before you is an enormous spider, an adversary you've faced before, but barely escaped the clutches of.\\nThis creature seems like something Hagrid would keep around...\";\n\t}\n\n\n\telse if (randomnum == 3)\n\t{\n\t randomfoe = \"goblin\";\n\t foeText = \"The creature before you seems very old, carrying coins as if it could work for a bank.\\nAlthough initially not intimidating, you notice it's carrying a knife!\";\n\t}\n\n\n\telse if (randomnum == 4)\n\t{\n\t randomfoe = \"death eater\";\n\t foeText = \"A scary wizard appears before you, he is armed and seems to have a skull tattoo on his arm. This wizard looks to be aligned with Lord Voldemort...\";\n\t}\n\n\n\telse\n\t{\n\t randomfoe = \"dementor\";\n\t foeText = \"Your soul feels chilled as this ominous figure apppears from the wardrobe. This cloaked figure floats towards you, rather relatable to a muggle-ghost.\\nAs it gets closer, you feel increasingly weaker.\"; // fix\n\t}\n\n\n\tprintSlow (foeText);\n\tint scare = 0;\n\t//Add a timer if possible\n\twhile (!evil.equals (randomfoe) && scare < 5)\n\t{\n\t // If try is failed, add points and also generate an increasingly scary message\n\n\t evil = IBIO.inputString (\"\\nWhat do you see before you? (Answer in lowercase) \");\n\t scare++;\n\t String scaremsg = \"You almost get your head completely sliced off by the \" + randomfoe + \"!\";\n\t if (scare == 1)\n\t\tscaremsg = \"\\nYou stop the creature it it's tracks, it's unable to do anything before you identify it!\";\n\t else if (scare == 2)\n\t {\n\t\tscaremsg = \"\\nThe creature now attacks you, scraping your leg!\";\n\t\tpoints += 3;\n\t }\n\t else if (scare == 3)\n\t {\n\t\tscaremsg = \"\\nThe creature now attacks again, bruising your arm!\";\n\t\tpoints += 4;\n\t }\n\t else if (scare == 4)\n\t {\n\t\tscaremsg = \"\\nThe creature cuts into your neck, and it starts bleeding badly.\";\n\t\tpoints += 5;\n\t }\n\n\t printSlow (scaremsg);\n\t}\n\n\n\tif (scare >= 5)\n\t{\n\t printSlow (\"\\nCome on Harry, you hove to know by now that it's a \" + randomfoe + \"!\");\n\t points += 10;\n\t}\n\n\n\telse\n\t{\n\t printSlow (\"Good Job Harry!\");\n\t}\n\n\n\tString pword = \"not riddikulus\";\n\twhile ((!pword.equals (\"riddikulus\") && !pword.equals (\"Riddikulus\") && !pword.equals (\"riddikulus!\") && !pword.equals (\"Riddikulus!\")))\n\t{\n\t pword = IBIO.inputString (\"Now that you know that you're against a/an \" + randomfoe + \", how are you going to dispel it? \");\n\t points += 5;\n\t if (!pword.equals (\"riddikulus\") && !pword.equals (\"Riddikulus\") && !pword.equals (\"riddikulus!\") && !pword.equals (\"Riddikulus!\"))\n\t {\n\t\tprintSlow (\"\\nHarry my boy, think of something more.. Absurd!\");\n\t\tprintSlow (\"Try to recall my lesson!\\n\");\n\t }\n\t}\n\tif (scare == 0 || scare == 1)\n\t{\n\t printSlow (\"\\nAmazing job Harry my boy!, you're a natural, just like your father!\\n\\n~You sit through all your classmates as they try to deal with their biggest fears. Neville's grandmother scares you almost as much as she scares him!~\\nAlright, class dismissed. Good work today!\\n\");\n\t}\n\telse\n\t printSlow (\"\\nAmazing job Harry my boy!, you got it in \" + scare + \" tries!\\n\\n~You sit through all your classmates as they try to deal with their biggest fears. Neville's grandmother scares you almost as much as she scares him!~\\nAlright, class dismissed. Good work today!\\n\");\n }",
"private void loadTimingInformation()\n\t{\n\t\ttry\n\t\t{\n\t\t\tFile loadFile = new File(\"asdasda.save\");\n\t\t\tif(loadFile.exists())\n\t\t\t{\n\t\t\t\tqueryList.clear();\n\t\t\t\tScanner textScanner = new Scanner(loadFile);\n\t\t\t\twhile(textScanner.hasNext())\n\t\t\t\t{\n\t\t\t\t\tString query = textScanner.nextLine();\n\t\t\t\t\tlong queryTime = Long.parseLong(textScanner.nextLine());\n\t\t\t\t\tqueryList.add(new QueryInfo(query, queryTime));\n\t\t\t\t}\n\t\t\t\ttextScanner.close();\n\t\t\t\tJOptionPane.showMessageDialog(getAppFrame(), queryList.size() + \" QueryInfo objects were loaded into the application\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tJOptionPane.showMessageDialog(getAppFrame(), \"File not present. No QueryInfo objects loaded\");\n\t\t\t}\n\t\t}\n\t\tcatch(IOException currentError)\n\t\t{\n\t\t\tdataController.displayErrors(currentError);\n\t\t}\n\t}",
"public void walking(final Player p){\n timerListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n //test to see if the player is currently jumping\n if(jumpState != 2){\n //if the player is not jumping this if else statement will\n //change the character from leg out to leg in position\n if(jumpState == 1){\n //sets the image to have the leg in\n jumpState = 0;\n }\n else{\n //sets the image to have the leg out\n jumpState = 1;\n }\n\n }\n\n }\n };\n //creates the timer for continous animation of walkListener\n walker = new Timer(getWalkSpeed(), timerListener);\n //starts timer for walk animation\n walker.start();\n ActionListener walkIncListener = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if (getWalkSpeed() > WALK_SPEED_MIN)\n {\n System.out.println(\"1\");\n walker.stop();\n incWalkSpeed(getWalkSpeedInc());\n walker = new Timer(getWalkSpeed(), timerListener);\n walker.start();\n }\n else\n {\n walkInc.stop();\n System.out.println(\"2\");\n }\n\n }\n };\n walkInc = new Timer(WALK_SPEED, walkIncListener);\n //starts timer for walk animation\n walker.start();\n ActionListener dead = new ActionListener()\n {\n public void actionPerformed(ActionEvent e)\n {\n if(p.isAlive() == false){\n walker.stop();\n }\n }\n };\n Timer kill = new Timer(100, dead);\n kill.start();\n\n }",
"private void attackPlayer()\n\t{\n\t\tif(shootTimer.done())\n\t\t{\n\t\t\tProjectile spiderWeb = new SpiderWeb(x, y);\n\t\t\tGame.objectWaitingRoom.add(spiderWeb);\n\t\t\tspiderWeb.shoot();\n\t\t\tshootTimer.setTime(200);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\n Scanner sc = new Scanner(System.in);\n Gson gson = new Gson();\n // Random random = new Random(System.nanoTime());\n int banana = 3;\n int snowball = 3;\n int strategi = 0;\n while (true) {\n try {\n int roundNumber = sc.nextInt();\n\n String statePath = String.format(\"./%s/%d/%s\", ROUNDS_DIRECTORY, roundNumber, STATE_FILE_NAME);\n String state = new String(Files.readAllBytes(Paths.get(statePath)));\n\n GameState gameState = gson.fromJson(state, GameState.class);\n Bot bot = new Bot(gameState,banana,snowball,strategi);\n Command command = bot.run();\n banana = bot.BananaValue();\n snowball = bot.SnowballValue();\n strategi = bot.Strategi();\n \n\n System.out.println(String.format(\"C;%d;%s\", roundNumber, command.render()));\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }",
"static void startMatch()\n {\n // suggests that we should first use the pokedex menu\n if (Player.current.pokedex.isEmpty())\n {\n System.out.println(\"\\nYou have no pokemon to enter the match with kid. Use your pokedex and get some pokemon first.\");\n pause();\n return;\n }\n\n // print stuff\n clrscr();\n System.out.println(title());\n\n // print more stuff\n System.out.println(Player.opponent.name.toUpperCase() + \" IS PREPARING HIS POKEMON FOR BATTLE!\");\n \n // initialises the opponent logic - pokemon often enter evolved states\n Pokemon two = Opponent.init();\n\n System.out.println(\"\\n\"\n + Player.opponent.name.toUpperCase() + \" HAS CHOSEN \" + two +\"\\n\"\n + Player.current.name.toUpperCase() + \"! CHOOSE A POKEMON!!\");\n\n // displays the list of pokemon available for battle\n Player.current.showNamesPokedex();\n System.out.print(\"Gimme an index (Or type anything else to return)! \");\n int option = input.hasNextInt()? input.nextInt() - 1 : Player.current.pokedex.size();\n\n // sends back to mainMenu if option is out of bounds \n if (option >= Player.current.pokedex.size() || option < 0)\n {\n mainMenu();\n }\n\n // definitions, aliases for the two combatting pokemon\n Pokemon one = Player.current.pokedex.get(option);\n Pokemon.Move oneMove1 = one.listMoves.get(0);\n Pokemon.Move oneMove2 = one.listMoves.get(1);\n\n // if there's a bit of confusion regarding why two pokemon have the same nickname ...\n if (one.nickname.equals(two.nickname))\n System.out.println(one.nickname.toUpperCase() + \" vs ... \" + two.nickname.toUpperCase() + \"?? Okey-dokey, LET'S RUMBLE!!\");\n else // ... handle it\n System.out.println(one.nickname.toUpperCase() + \" vs \" + two.nickname.toUpperCase() + \"!! LET'S RUMBLE!!\");\n\n pause();\n clrscr();\n\n // Battle start!\n Pokemon winner = new Pokemon();\n // never give up!\n // unless it's addiction to narcotics \n boolean giveUp = false;\n while (one.getHp() > 0 && two.getHp() > 0 && !giveUp)\n {\n // returns stats of the pokemon\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n\n // 30% chance dictates whether the pokemon recover in a battle, but naturally so\n if (random.nextInt(101) + 1 < 30 && one.getHp() < one.maxHp)\n ++one.hp;\n\n if (random.nextInt(101) + 1 < 30 && two.getHp() < two.maxHp)\n ++two.hp;\n\n // the in-game selection menu\n System.out.print(\"\\n\"\n + Player.current.name.toUpperCase() + \"! WHAT WILL YOU HAVE \" + one.getFullName().toUpperCase() + \" DO?\\n\"\n + \"(a) Attack\\n\"\n + (oneMove1.isUsable? \"(1) Use \" + oneMove1.name.toUpperCase() + \"\\n\" : \"\")\n + (oneMove2.isUsable? \"(2) Use \" + oneMove2.name.toUpperCase() + \"\\n\" : \"\")\n + \"(f) Flee\\n\"\n + \"Enter the index from the brackets (E.g. (a) -> 'A' key): \");\n\n char choice = input.hasNext(\"[aAfF12]\")? input.next().charAt(0) : 'a';\n\n // a switch to handle the options supplied\n switch (choice)\n {\n case 'a': case 'A': default:\n one.attack(two);\n break;\n\n case 'f': case 'F':\n winner = two;\n giveUp = true;\n break;\n\n case '1':\n one.attack(two, oneMove1.name);\n break;\n\n case '2':\n one.attack(two, oneMove2.name);\n break;\n }\n\n // Opponent's turn, always second\n pause();\n clrscr();\n\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n Opponent.fight(one);\n pause();\n clrscr();\n }\n\n // find out the winner from combat or withdrawal\n winner = giveUp? two : one.getHp() > 0? one : two;\n System.out.println(\"\\nWINNER: \" + winner.getFullName() + \" of \" + winner.owner.name + \"!\\n\");\n\n if (winner == one)\n {\n // register the victory\n Player.current.gems += 100;\n System.out.println(\"You got 100 gems as a reward!\\n\");\n ++Player.current.wins;\n }\n else\n {\n // register the defeat\n ++Player.current.losses;\n System.out.println(\"Tough luck. Do not be worried! There's always a next time!\\n\");\n }\n\n pause();\n }",
"private void startGame(){\n try{\n Thread.sleep(500); \n }catch(Exception e){\n System.out.println(e);\n }\n\n this.gameThread = new Thread(new GameHandler());\n this.town.sendMessage(\"<s>\");\n this.town.sendMessage(\"t\");\n this.town.sendMessage(this.scp.getUsername());\n System.out.println(\"SCP: \" + this.scp.getUsername());\n this.town.sendMessage(\"\" + game.getMoney());\n this.town.sendMessage(\"\" + game.getFood());\n this.scp.sendMessage(\"<s>\");\n this.scp.sendMessage(\"s\");\n this.scp.sendMessage(this.town.getUsername());\n System.out.println(\"TOWN: \" + this.town.getUsername());\n this.scp.sendMessage(\"\" + game.getHume());\n this.gameThread.start();\n }",
"private void startTimer()\n {\n if (timer == null)\n {\n timer = new CountDownTimer(TIMER_MILLI_SEC, 1000)\n {\n @Override\n public void onTick(long l)\n {\n timerText.setText(\"\" + l / 1000);\n }\n\n @Override\n public void onFinish()\n {\n // Let P2 play\n if (secondPlayer instanceof IAPlayer)\n {\n ((IAPlayer) secondPlayer).playRandom();\n }\n // Animations and full results\n announceRoundResult();\n\n // Hide timer\n timerText.setVisibility(View.GONE);\n gameControlButton.setVisibility(View.VISIBLE);\n }\n };\n }\n\n // Clean UI state\n gameControlButton.setVisibility(View.INVISIBLE);\n timerText.setVisibility(View.VISIBLE);\n\n drawIcon.setVisibility(View.INVISIBLE);\n firstCup.setVisibility(View.INVISIBLE);\n secondCup.setVisibility(View.INVISIBLE);\n\n // Reset users actions\n resetActionButtonsState();\n firstPlayer.resetLastAction();\n secondPlayer.resetLastAction();\n\n // First player plays first\n if (firstPlayer instanceof IAPlayer)\n {\n ((IAPlayer) firstPlayer).playRandom();\n }\n\n // Start count down\n timer.start();\n }",
"public static void countdown(Player player) {\n Bukkit.broadcastMessage(prefix + ChatColor.YELLOW + \"Game starting in \" + count + \" seconds..\");\n new BukkitRunnable() {\n @Override\n public void run() {\n if (count == 0) {\n Bukkit.broadcastMessage(prefix + ChatColor.YELLOW + \"Teleporting players to arena\");\n for(Player onlinePlayer : Bukkit.getOnlinePlayers()) {\n\n String name = onlinePlayer.getName();\n teleport(onlinePlayer);\n }\n gameStart(player);\n cancel();\n } else {\n RainbowText text = new RainbowText(\"Teleporting players in \");\n RainbowText text2 = new RainbowText(count + \" seconds..\");\n\n for(Player player : Bukkit.getOnlinePlayers()) {\n player.sendTitle(text.getText(), text2.getText(), 1, 20, 1);\n text.moveRainbow();\n player.playSound(player.getLocation(), Sound.ENTITY_EXPERIENCE_ORB_PICKUP, 2.0F, 1.0F);\n }\n Bukkit.broadcastMessage(prefix + ChatColor.YELLOW + \"Teleporting players in \" + count + \" seconds..\");\n count--;\n\n }\n }\n }.runTaskTimer(Bukkit.getServer().getPluginManager().getPlugin(\"Seawars\"), 20L, 20L);\n }",
"public void start() {\n try {\n long start = System.currentTimeMillis();\n readFile();\n result = wordStorage.getTopNWords(3);\n long end = System.currentTimeMillis();\n long timeTaken = ((end - start) / 1000);\n logger.info(\"time taken to run program: \" + timeTaken);\n display.displayTimeTaken(timeTaken);\n display.displayTopNWords(result);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void timmer() {\n showTimmerOptions();\n\n\n\n final int val = 500;\n taskProgressInner = (ProgressBar) findViewById(com.ryansplayllc.ryansplay.R.id.TaskProgress_Inner);\n new Thread(new Runnable() {\n public void run() {\n int tmp = (val / 100);\n\n for (int incr = 0; incr <= val; incr++) {\n\n try {\n taskProgressInner.setProgress(incr);\n if ((incr % 100) == 0) {\n tmp--;\n }\n Thread.sleep(10);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }\n }).start();\n\n // intilaizating count down timer object\n progressDialog.dismiss();\n countDownTimer = new CountDownTimer(4000, 1000) {\n\n public void onTick(long millisUntilFinished) {\n countDownTextView.setText(Long\n .toString(millisUntilFinished / 1000));\n\n\n }\n\n public void onFinish() {\n\n countDownTextView.setText(\"0\");\n\n\n isSelectable = false;\n\n\n // changing text view if player is not umpire\n if (!Utility.isUmpire) {\n\n runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n String message = \"Waiting for the Umpire result.\";\n// showWaitingPopUp(message);\n showBallinPlayView();\n final ImageView gamescreenbackground = (ImageView) findViewById(com.ryansplayllc.ryansplay.R.id.umpirescreenfield);\n gamescreenbackground.setImageResource(com.ryansplayllc.ryansplay.R.drawable.baseball_field);\n\n\n }\n });\n }\n // calling method to submit result\n submitPlayerPrediction();\n }\n };\n isSelectable = true;\n countDownTimer.start();\n\n }",
"private void startTime()\n {\n timer.start();\n }",
"public void run()\n {\n try\n {\n while (true)\n {\n String message = in.readLine();\n System.out.println(\"received: \" + message);\n String[] tokens = message.split(\" \");\n if(tokens[0].equals(\"update\"))\n {\n bothConnected = true;\n activeEnemy = Pokemon.pokemonList(tokens[1]);\n activeEnemy.setCurrentHealth(Integer.parseInt(tokens[2]));\n if (!tokens[3].equals(team[0].getName()))\n {\n Pokemon temp = team[0];\n team[0] = team[index];\n team[index] = temp;\n GUI.swapPokemon();\n }\n team[0].setCurrentHealth(Integer.parseInt(tokens[4])); //I changed this from team\n }\n else if(tokens[0].equals(\"faintSwap\"))\n {\n GUI.faintSwap();\n activeEnemy = Pokemon.pokemonList(tokens[1]);\n activeEnemy.setCurrentHealth(Integer.parseInt(tokens[2]));\n }\n else if(tokens[0].equals(\"fail\"))\n {\n \n }\n \n// if (tokens[0].equals(\"good\"))\n// {\n// display.goodGuess(tokens[1]);\n// }\n// else if (tokens[0].equals(\"bad\"))\n// {\n// display.badGuess(tokens[1]);\n// }\n }\n }\n catch(IOException e)\n {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }",
"public void render() throws IOException {\r\n\t\tBufferedImage bi = null;\r\n\t\t// Wipes the screen, always above the objects you're animating\r\n\t\tColor bgC = new Color(135, 206, 235);\r\n\t\tg.setColor(bgC);\r\n\t\tg.fillRect(0, 0, BOX_WIDTH, BOX_HEIGHT);\r\n\r\n\t\tif (players.size() > 0) {\r\n\t\t\t// Allows hovering in the pick country part of the game\r\n\t\t\tfor (Country x : Countries) {\r\n\t\t\t\tif (hoveredColor.equals(x.getDetectionColor())) {\r\n\t\t\t\t\tnew threadz(x, players.get(turnCounter).getColor(), false);\r\n\t\t\t\t\tbi = x.getImg();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Draws the waterMap and hovered country\r\n\t\tg.drawImage(waterMap, 0, 0, null);\r\n\t\tg.drawImage(bi, 0, 0, null);\r\n\r\n\t\t//Draws the countries\r\n\t\tfor (Player x : players) {\r\n\t\t\tfor (Country k : x.getCountries()) {\r\n\t\t\t\tif (x.getCountries().size() > 0)\r\n\t\t\t\t\tg.drawImage(k.getImg(), 0, 0, null);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t//Draws the labels\r\n\t\tg.drawImage(labels, 0, 0, null);\r\n\t\r\n\t\t//Draws how many troops are on each country\r\n\t\tdrawTroopNumbers();\r\n\t\tif (gameOver == true) {\r\n\t\t\tg.setFont(new Font(\"Vani\",Font.BOLD, 150));\r\n\t\t\tg.setColor(Color.BLACK);\r\n\t\t\tg.drawString(\"Player \" + (turnCounter+1) + \" Wins!\", 160, 430);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tg.setColor(players.get(turnCounter).getColor());\r\n\t\t\tg.drawString(\"Player \" + (turnCounter+1) + \" Wins!\", 150, 420);\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\r\n\t\tattacker.setText(\"ATT: \"+attackSlide.getValue());\r\n\t\t\r\n\t\tbs.show();\r\n\r\n\t}",
"public static void NewChar(){\n\t\tSystem.out.println(\"\\\"What is the name of the powerful soul who wishes to brave the Depths alone?\\\"\");\n\t\tScanner sc = new Scanner(System.in);\n\t\tString Name = sc.nextLine();\n\t\tSystem.out.println(\"\\\"\" + Name + \"? Such an odd name, I cannot tell if this is bravery or foolishness...\\\"\");\n\t\tSystem.out.println(\"\\\"So tell me, \" + Name + \", what do your stats look like?\\\"\");\n\t\tboolean key = true; //To allow the player to re-enter stats if he/she messes up in choosing them.\n\t\twhile (key){\n\t\t\tkey = false;\n\t\t\ttstr = statChoice(\"strength\"); //The string in this method is used as text to let the player in on what stat they are choosing. The method automatically lowers the statPoints.\n\t\t\ttmag = statChoice(\"magic power\");\n\t\t\ttluc = statChoice(\"luck\");\n\t\t\ttacc = statChoice(\"accuracy\");\n\t\t\ttdef = statChoice(\"defense\");\n\t\t\ttspe = statChoice(\"speed\");\n\t\t\ttHP = ((statChoice(\"Health Points\") * 10) + 10); //HP and MP are multiplied by ten, and HP auto starts at 10 so the player doesn't automatically die when they start the game.\n\t\t\ttMP = (statChoice(\"Mystic Energy\") * 10);\n\t\t\ttstatSheet(); //This method just prints out the player's current stats.\n\t\t\tSystem.out.println(\"Are you okay with these stats?(Note - You cannot change them later)\");\n\t\t\tString statConfermation = sc.nextLine();\n\t\t\tif(statConfermation.equalsIgnoreCase(\"yes\")||statConfermation.equalsIgnoreCase(\"ye\")||statConfermation.equalsIgnoreCase(\"y\")){\n\t\t\t\tPlayer player = new Player(Name, tstr, tmag, tluc, tacc, tdef, tspe, tHP, tMP); //This is cementing the stats in the Player class\n\t\t\t\tArrays.fill(player.items, \"\");\n\t\t\t\tArrays.fill(player.spell, \"\");\n\t\t\t\tplayer.statSheet();\n\t\t\t\tChooseGift(player);\n\t\t\t\tSystem.out.println(\"\\\"It appears you have chosen your gift.\\nI believe you have all you need, \" + player.name + \", I hope you are ready for the depths!\\nGood luck.\\\"\");\n\t\t\t\tDepthsIntro.Enter(player);\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tReset(); //this method just resets the game for the process to go through again.\n\t\t\t\tkey = true;\n\t\t\t}\n\t\t}\n\t\t}",
"void startFile() {\n writeToFile(defaultScore);\n for (int i = 0; i < 5; i++) {\n writeToFile(readFromFile() + defaultScore);\n }\n }",
"void set_running() {\n this.cur_state = State.RUNNING;\n try (Scanner randGen = new Scanner(new File(\"random-numbers.txt\"))){\n if(burst_time == 0) {\n \tif(randInts.size() == 0) { \t \n while(randGen.hasNext()) {\n randInts.add(randGen.nextInt());\n }\n }\n }\n int rand_val = randInts.remove(0);\n burst_time = (rand_val % rbound) + 1;\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public LookAtProgress(Timer tImer, Thread tHread){\r\n \t\tthis.tImer = tImer;\r\n \t\tthis.tHread=tHread;\r\n \t}",
"@Override\n public void run() {\n TimeManager tM = new TimeManager();\n try {\n tM.timeKeeper();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n }",
"public void start()\n {\n clock = new java.util.Timer();\n clock.schedule(\n new TimerTask() //This is really a new anonymous class, extending TimerTask.\n {\t\t\t\t\t //Since it has only one method, it seemed easiest to create it in line here.\n public void run() //Called by the Timer when scheduled.\n {\n timeElapsed++;\n if (timeElapsed > 999) //999 is the highest 3 digit integer, the highest number that can\n {\t\t\t\t\t\t\t //be shown on the displays. Beyond that, the player automatically loses.\n endGame(false);\n return;\n }\n repaint();\n }\n }\n \t\t\t, 1000, 1000); //1000 milliseconds, so a repeated 1 second delay.\n }",
"public static void main(String[] args) {\n\t\tPokemon firstPokemon = new Pokemon(\" P1 Typhlosion \", 1600, \" Fire \" , \" Healthy \" , \"Scratch\" , \"Bite\" , \"Fire Blast\", 300 , 375 , 450);\r\n\t\t Pokemon secondPokemon = new Pokemon(\" P2 Snorlax \", 1300, \" Normal \" , \" Healthy \" , \"Body Slam\" , \"Sleep\" , \"Swallow\", 500 , 100 , 200);\r\n\t\t System.out.println (firstPokemon.name + firstPokemon.health + firstPokemon.type + firstPokemon.status );\r\n\t\t System.out.println (secondPokemon.name + secondPokemon.health + secondPokemon.type + secondPokemon.status );\r\n\t\t Scanner myObj = new Scanner(System.in);\r\n\t\t\r\n\t\t \r\n\t\t System.out.println( \"P1 Turn. Enter number for corresponding attack! \" );\r\n\t\t System.out.println( \" 1(\" + firstPokemon.pAttack1 +\")\"+ \" 2(\" + firstPokemon.pAttack2 +\")\"+ \" 3(\" + firstPokemon.pAttack3 +\")\" );\r\n\t\t String battleCommand = myObj.nextLine();\r\n\t\t System.out.println (battleCommand);\r\n\t\t if (battleCommand.charAt(0) == '1') {\r\n\t\t\t System.out.println (firstPokemon.pAttack1);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '2') {\r\n\t\t\t System.out.println (firstPokemon.pAttack2);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '3') {\r\n\t\t\t System.out.println (firstPokemon.pAttack3);\r\n\t\t }\r\n\t\t else {\r\n\t\t\t System.out.println(\"Please enter the correct number.\");\r\n\t\t\t \r\n\t\t }\r\n\t}",
"public void whatGame() throws IOException{\n try{\n inFile = new Scanner(new File(\"output.txt\"));\n } catch (InputMismatchException e) {\n System.err.printf(\"ERROR: Cannot open %s\\n\", \"output.txt\");\n System.exit(1);\n }\n \n gameNumber = inFile.nextInt();\n System.out.println(gameNumber);\n inFile.close();\n \n try {\n outFile = new PrintWriter(\"output.txt\");\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n outFile.print(gameNumber+1);\n outFile.close();\n \n }",
"public void startMiniTimer() {\n long millisInFuture = 10000;\r\n long countDownInterval = 1000;\r\n phaseTwoTimer = new CountDownTimer(millisInFuture, countDownInterval) {\r\n public void onTick(long millisUntilFinished) {\r\n long millis = millisUntilFinished;\r\n\r\n // notifications for time\r\n if (millis <= 10000 && millis > 9001) {\r\n Toast.makeText(getActivity(), \"10\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 9000 && millis >= 8001) {\r\n Toast.makeText(getActivity(), \"9\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 8000 && millis >= 7001) {\r\n Toast.makeText(getActivity(), \"8\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 7000 && millis >= 6001) {\r\n Toast.makeText(getActivity(), \"7\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 6000 && millis >= 5001) {\r\n Toast.makeText(getActivity(), \"6\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 5000 && millis >= 4001) {\r\n Toast.makeText(getActivity(), \"5\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 4000 && millis >= 3001) {\r\n Toast.makeText(getActivity(), \"4\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 3000 && millis >= 2001) {\r\n Toast.makeText(getActivity(), \"3\", Toast.LENGTH_LONG).show();\r\n } else if (millis <= 2000 && millis >= 1001) {\r\n Toast.makeText(getActivity(), \"2\", Toast.LENGTH_LONG).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"1\", Toast.LENGTH_LONG).show();\r\n }\r\n }\r\n\r\n public void onFinish() {\r\n Toast.makeText(getActivity(), \"PHASE 2\", Toast.LENGTH_LONG).show(); // entering phase 2\r\n phase = 2;\r\n initTimer(rootView);\r\n drawNewBoards();\r\n }\r\n }.start();\r\n }",
"private void startGame() {\n\t\ttimer = new Timer();\n\t\ttimer.scheduleAtFixedRate(new ScheduleTask(), 5, BreakoutBall.BALLSPEED);\n\t}",
"public Pokemon start() {\n System.out.println(\"\\n\" + this.pokemonOne.getName() + \" affronte \" + this.pokemonTwo.getName() + \" dans un combat qui s'annonce extraordinaire\\n\");\n\n this.pokemonOne.speakFightShout();\n this.pokemonTwo.speakFightShout();\n\n while (true) {\n if (this.PokemonOneIsAlive()) {\n this.pokemonOne.giveDamage(pokemonTwo);\n } else {\n this.pokemonOne.speakDefeatShout();\n this.pokemonTwo.speakVictoryShout();\n return this.pokemonOne;\n }\n if (this.PokemonTwoIsAlive()) {\n this.pokemonTwo.giveDamage(pokemonOne);\n } else {\n this.pokemonTwo.speakDefeatShout();\n this.pokemonOne.speakVictoryShout();\n return this.pokemonTwo;\n }\n }\n }",
"public void startClock(){\n\n final Timer gTimer = new Timer();\n gTimer.schedule(new TimerTask() {\n @Override\n public void run() {\n //Log.e(\"GLOBAL TIMER\",\"RUNNING...\");\n if(!((MainActivity)context).isPaused) {\n //if they are dead, remove them from list\n Iterator<EnemyCharacter> iter0 = enemyFactory.enemies.iterator();\n while (iter0.hasNext()) {\n EnemyCharacter enemyCharacter = iter0.next();\n\n if (enemyCharacter.isDead) {\n iter0.remove();\n }\n }\n\n gTime++;\n //Reset the power ups on set intervals.\n if (gTime % 2000 == 0) {\n canGrowl = true;\n bottomFragment = (BottomFragment) ((MainActivity) context).getSupportFragmentManager().findFragmentById(R.id.bottom_fragment);\n ((MainActivity) context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n bottomFragment.growl.setBackgroundResource(R.drawable.growl_btn);\n }\n });\n\n }\n if (gTime % 7000 == 0) {\n canTebow = true;\n bottomFragment = (BottomFragment) ((MainActivity) context).getSupportFragmentManager().findFragmentById(R.id.bottom_fragment);\n ((MainActivity) context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n bottomFragment.tebow.setBackgroundResource(R.drawable.tebow_btn);\n }\n });\n }\n if (gTime % 5000 == 0) {\n canAlberta = true;\n bottomFragment = (BottomFragment) ((MainActivity) context).getSupportFragmentManager().findFragmentById(R.id.bottom_fragment);\n ((MainActivity) context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n bottomFragment.alberta.setBackgroundResource(R.drawable.alberta_btn);\n }\n });\n }\n\n //INCREASE DIFFICULTY OVER TIME\n if (gTime < 1000) {\n difficulty = 1;\n } else if (gTime < 3000) {\n difficulty = 2;\n } else if (gTime < 7000) {\n difficulty = 3;\n } else if (gTime < 12000) {\n difficulty = 4;\n } else {\n difficulty = 5;\n }\n\n //USE DIFFICULTY TO CREATE ENEMIES\n if (difficulty == 1) {\n if (gTime % 400 == 0) {\n enemyFactory.newEnemy(maxHeight, maxWidth, difficulty);\n }\n } else if (difficulty == 2) {\n if (gTime % 300 == 0) {\n enemyFactory.newEnemy(maxHeight, maxWidth, difficulty);\n }\n } else if (difficulty == 3) {\n if (gTime % 300 == 0) {\n enemyFactory.newEnemy(maxHeight, maxWidth, difficulty);\n enemyFactory.newEnemy(maxHeight, maxWidth, difficulty);\n }\n } else if (difficulty == 4) {\n if (gTime % 200 == 0) {\n enemyFactory.newEnemy(maxHeight, maxWidth, difficulty);\n enemyFactory.newEnemy(maxHeight, maxWidth, difficulty);\n }\n } else {\n //Log.e(\"MAX\", \"Difficulty\");\n if (gTime % 100 == 0) {\n enemyFactory.newEnemy(maxHeight, maxWidth, difficulty);\n enemyFactory.newEnemy(maxHeight, maxWidth, difficulty);\n }\n }\n\n //DO THE ANIMATIONS\n Iterator<EnemyCharacter> iter3 = enemyFactory.enemies.iterator();\n while (iter3.hasNext()) {\n EnemyCharacter enemyCharacter = iter3.next();\n\n //Do the animation and moving every ten times this timer runs\n if (gTime % 10 == 0) {\n enemyCharacter.animate();\n enemyCharacter.move();\n }\n }\n\n //TEBOW TO THE RESCUE WITH THE POWER OF JEEESUUUSS!\n if (drawTebow) {\n Iterator<EnemyCharacter> iter = enemyFactory.enemies.iterator();\n while (iter.hasNext()) {\n EnemyCharacter enemyCharacter = iter.next();\n if (enemyCharacter.x < maxWidth / 2) {\n tebow.setX(enemyCharacter.x - 100);\n tebow.setY(enemyCharacter.y);\n iter.remove();\n drawTebowCounter++;\n }\n if (drawTebowCounter >= 10) {\n drawTebow = false;\n drawTebowCounter = 0;\n }\n }\n }\n\n //REDRAW EVERYTHING CONSTANTLY\n ((MainActivity) context).runOnUiThread(new Runnable() {\n @Override\n public void run() {\n canvasView.invalidate();\n }\n });\n\n //CHECK TO SEE IF THE PLAYER LOST THE GAME OR IF ENEMY GETS AUTO-MAGICALLY CHOMPED\n Iterator<EnemyCharacter> iter1 = enemyFactory.enemies.iterator();\n while (iter1.hasNext()) {\n EnemyCharacter enemyCharacter = iter1.next();\n\n //Check if the player lost\n if (enemyCharacter.x < -50) {\n gameOver = true;\n }\n if (enemyCharacter.x < 50) {\n if ((enemyCharacter.y + enemyCharacter.bitmap.getHeight() / 2) > canvasView.albert.y) {\n if ((enemyCharacter.y + enemyCharacter.bitmap.getHeight() / 2) < canvasView.albert.y + canvasView.albert.bitmap.getHeight()) {\n //Enemy in range. Chomp him.\n enemyCharacter.isDead = true;\n score++;\n canvasView.albert.chomp(canvasView);\n bottomFragment = (BottomFragment) ((MainActivity) context).getSupportFragmentManager().findFragmentById(R.id.bottom_fragment);\n bottomFragment.updateScores();\n }\n }\n }\n }\n\n if (gameOver) {\n gTimer.purge();\n gTimer.cancel();\n restart();\n\n //launch play fragment dialog\n DialogFragment gameOverDialog = new PlayFragment.GameOverDialog();\n gameOverDialog.show(((MainActivity) context).getFragmentManager(), \"Game Over\");\n }\n }\n }//END OF GLOBAL TIMER RUN METHOD\n },0,10);\n }",
"public void loadGame() throws IOException\r\n\t{\r\n\t\tjava.io.BufferedReader reader;\r\n\t String line;\r\n\t String[] elements;\r\n\t int ammo = 0;\r\n\t String state = null;\r\n\t try\r\n\t {\r\n\t reader = new java.io.BufferedReader(new java.io.FileReader(\"Game.ser\"));\r\n\t line = reader.readLine();\r\n\t elements = line.split(\":\");\r\n\t state = elements[0];\r\n\t ammo = Integer.decode(elements[1]);\r\n\t \r\n\t reader.close();\r\n\t \r\n\t\t gamePanel.getView().getPlayer().setAmmo(ammo);\r\n\t\t gamePanel.getView().getPlayer().setState(state);\r\n\t }\r\n\t catch(Exception e)\r\n\t {\r\n\t System.out.println(\"Can't load this save\");\r\n\t }\r\n\t \r\n\t \r\n\r\n\t}",
"@Override\n public void run() {\n try (BufferedReader reader = new BufferedReader(new FileReader(file.getAbsoluteFile()))) {\n String lineFromFile = reader.readLine();\n String[] splitLine;\n String userName;\n String url;\n long time;\n while ((lineFromFile = reader.readLine()) != null) {\n splitLine = lineFromFile.split(\";\");\n userName = splitLine[3];\n url = splitLine[1];\n time = Long.parseLong(splitLine[2]);\n if (userNamesAndCorrespondingContent.containsKey(userName)) {\n Content content = userNamesAndCorrespondingContent.get(userName);\n if (content.getUrlAndCorrespondingTime().containsKey(url)) {\n content.updateTimeForCorrespondingUrl(url, time);\n } else {\n content.updateUrlAndTimeInfoForCorrespondingUsername(url, time);\n }\n } else {\n Map<String, Long> newUrlAndTime = new ConcurrentSkipListMap<>();\n newUrlAndTime.put(url, time);\n userNamesAndCorrespondingContent.put(userName, new Content(newUrlAndTime));\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void run() {\r\n\t\t// Get current date/time and format it for output\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat format = \r\n\t\t\tnew SimpleDateFormat(\"dd.mm.yyyy hh:mm:ss\");\r\n\t\tString current_time = format.format(date);\r\n\r\n\t\t// Output to user the name of the objecet and the current \r\n\t\t// time\r\n\t\tSystem.out.println(objectName + \" - Current time: \" + \r\n\t\t\t\tcurrent_time);\r\n\t\t\r\n\t\t// notify each observer of timer expiry\r\n\t\tnotifyObservers();\r\n\t}",
"public void atacar(Pokemon t){\n\tif(t.obtenerTipo()==tipoPokeMasDano){\n\t dano*=2;\n\t System.out.println(\"El ataque se hace más fuerte contra este tipo de Pokemon\");\n\t}\n\tSystem.out.println(\"Has ejecutado \"+obtenerNombreAtaque()+\"\\nEl ataque le causa un daño de \"+obtenerDano()+\" a \"+\n\t\t\t t.obtenerApodo()+\":\\n\"+obtenerDescripcionAtaque());\n\tt.puntosVida-=dano;\n\tcontadorNivel++;\n\tSystem.out.println(\"Los puntos de vida restantes de \"+t.obtenerApodo()+\" son \" +t.obtenerPuntosVida());\n }",
"public void run() throws IOException {\n\t\tcount();\n\t\t//System.out.println(algae);\n\t\tArrayList<GameObjects> fish = new ArrayList<GameObjects>();\n\t\tint b = bigFish;\n\t\tint c = crab;\n\t\tint a = algae;\n\t\t// for big fish\n\t\tif(b>=c) {\n\t\t\tbigFish = c;\n\n\t\t\tcrab = 0;\n\t\t}\n\t\telse {\n\t\t\tbigFish = b;\n\t\t\tif(bigFish > 8) {\n\t\t\t\tbigFish = 8;\n\t\t\t}\n\t\t}\n\t\tif(c>=a) {\n\t\t\tif(a-b > 0) {\n\t\t\t\tcrab = a-b;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcrab = 0;\n\t\t\t}\n\t\t\talgae = 0;\n\t\t}\n\t\telse {\n\t\t\tif(b>=c) {\n\t\t\t\tcrab=0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tcrab = c - (((int)(b/2))+1) + ((int)(((c - (((int)(b/2))+1))/4))) - ((int)((((int)(bigFish/2))/2)));\n\t\t\t\tif(crab > 10) {\n\t\t\t\t\tcrab = 10;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(a==0) {\n\t\t\t\talgae = 0;\n\t\t\t}\n\t\t\telse {\n\t\t\t\talgae = a - (((int)(c/2))+1) + ((int)(((a - (((int)(c/2))+1))/4))) - ((int)((((int)(crab/2))/2)));\n\t\t\t\tif(algae > 15) {\n\t\t\t\t\talgae = 15;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\taddAnimals();\n\t\tdayNum+=1;\n\t\tint cb = (crab - bigFish);\n\t\tif(cb>0) {\n\t\t\tscore += cb;\n\t\t}\n\t\tint ac = (algae - crab);\n\t\tif(ac > 0) {\n\t\t\tscore += ac;\n\t\t}\n\t\ttutorial = false;\n\t}",
"public void run()\n\t\t{\n\t\t\ttimerRunning = true;\n\t\t\tdate = new Date();\n\t\t\tstartTime = date.getTime();\n\t\t\tendTime = startTime + planet.getTimeMS();\n\t\t\tbuttonPanel.getTimeLabel().setText(\"Time: \" + planet.getTimeMS()/1000 + \" s\");\n\n\t\t\twhile(timerRunning)\n\t\t\t{\n\t\t\t\tdate = new Date();\n\t\t\t\tnowTime = date.getTime();\n\n\t\t\t\t// If the countdown has reached 0 (or less)\n\t\t\t\t// Stop the timer and other threads and end the game\n\t\t\t\tif(nowTime >= endTime)\n\t\t\t\t{\n\t\t\t\t\tstopTimer();\n\t\t\t\t\tbuttonPanel.getTimeLabel().setText(\"Time: 0 s\");\n\t\t\t\t\tstopThreads();\n\t\t\t\t\tJOptionPane.showMessageDialog(lander,\"Sorry, you ran out of time.\\nGame Over!\", \"Ran Out Of Time\", JOptionPane.INFORMATION_MESSAGE);\n\t\t\t\t\tendGame();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tbuttonPanel.getTimeLabel().setText(\"Time: \" + (endTime-nowTime)/1000 + \" s\");\n\t\t\t\t}\n\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t}\n\t\t\t\tcatch (InterruptedException e) {}\n\t\t\t}\n\t\t}",
"@Override\n public void run() {\n\n secs++;\n if (secs == 10) {\n tens++;\n secs = 0;\n }\n if (tens == 6) {\n mins++;\n tens = 0;\n secs = 0;\n }\n time = mins + \":\" + tens + \"\" + secs;\n timePlayed.setText(\"Time: \" + time);\n }",
"public void start() throws IOException {\n startTime = Calendar.getInstance().getTime();\n pw = new PrintWriter(new FileWriter(logFileName));\n\n writeln(\"# --------------------------------------------------------------------\");\n writeln(\"# LOG FILE : \" + logFileName);\n writeln(\"# START TIME : \" + startTime);\n writeln(\"# --------------------------------------------------------------------\");\n writeln();\n }",
"public void start() {timer.start();}",
"private void startNewTimer(){\n timer.cancel();\n timer = null;\n timesUp();\n timer = new MainGameTimer(this);\n timer.startNewRoundCountDown();\n }",
"private void timerstart() {\n timer = new Timer(timer1, new ActionListener(){ \n \tpublic void actionPerformed(ActionEvent ae){\n \t\tcheckMatch();\n \t}});\n timer.start();\n timer.setRepeats(false);\n }",
"public void startFCombat() {\n\t\ttry { \n\t\t\tenemyName = Monster.getFBossName();\n\t\t\tSystem.out.println(\"\\t!#> \" + enemyName + \" has appeared! <#! \");\n\t\t\tenemyNewHealth = Monster.getFBossHealth();\n\n\t\t\t// While enemy is alive\n\t\t\tCOMBAT_START: while (enemyNewHealth > 0) {\n\t\t\t\tSystem.out.println(Player.getPlayerName() + \"\\n HP: \" + playerNewHealth + \" Stamina: \"\n\t\t\t\t\t\t+ Player.getPlayerStamina());\n\t\t\t\tSystem.out.println(\"----------------------------\");\n\t\t\t\tSystem.out.println(enemyName + \" HP: \" + enemyNewHealth);\n\n\t\t\t\tScanner in = new Scanner(System.in);\n\t\t\t\tSystem.out.println(\"\\n\\t # ACTIONS # \");\n\t\t\t\tSystem.out.println(\"\\t1.) Attack!\");\n\t\t\t\tSystem.out.println(\"\\t2.) Block!\");\n\t\t\t\tSystem.out.println(\"\\t3.) Run!\\n\");\n\t\t\t\tSystem.out.println(\"What are you going to do?\");\n\t\t\t\tint input = in.nextInt();\n\t\t\t\t// conditonal preventing other input\n\t\t\t\tif (input == 1 || input == 2 || input == 3) {\n\t\t\t\t\t// Attack\n\t\t\t\t\tif (input == 1) {\n\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.getFBossAttack()+1);\n\t\t\t\t\t\thit = rand.nextInt(Player.Attack()+1);\n\t\t\t\t\t\tSystem.out.println(\"You lunge forward and strike the \" + enemyName + \"!!\");\n\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\t\tSystem.out.println(\"You dealt \" + hit + \" damage!\");\t\t\n\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" Damage!\");\n\t\t\t\t\t\tenemyNewHealth = enemyNewHealth - hit;\n\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\tif (playerNewHealth <= 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\t!@#$%^ GAME OVER ^%$#@!\");\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (enemyNewHealth <= 0) {\n\t\t\t\t\t\t\tenemyNewHealth = 0;\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(\"The \" + enemyName + \" has \" + enemyNewHealth + \" health left!\");\n\t\t\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t// Block\n\t\t\t\t\tif (input == 2) {\n\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.Attack());\n\t\t\t\t\t\tSystem.out.println(\"You attempt to cower behind your shield!\");\n\t\t\t\t\t\t// Block\n\t\t\t\t\t\tif (Player.Block() == true) {\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\n\t\t\t\t\t\t\tSystem.out.println(\"\\tBlock Successful!\");\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" trys to deal \" + enemySwing + \" damage!\");\n\t\t\t\t\t\t\t// how much is blocked\n\t\t\t\t\t\t\tenemySwing = enemySwing - rand.nextInt(Player.getPlayerMaxBlock());\n\t\t\t\t\t\t\t// if how much is blocked results neg make it 0\n\t\t\t\t\t\t\tif (enemySwing <= 0) {\n\t\t\t\t\t\t\t\tenemySwing = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// output results\n\t\t\t\t\t\t\tSystem.out.println(\"You took \" + enemySwing + \" damage\");\n\t\t\t\t\t\t\t// adjust health value\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" damage!\");\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (playerNewHealth <= 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\t!@#$%^ GAME OVER ^%$#@!\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcontinue COMBAT_START;\n\n\t\t\t\t\t}\n\t\t\t\t\t// Run chance\n\t\t\t\t\tif (input == 3) {\n\t\t\t\t\t\tSystem.out.println(\"You attempt to flee!\");\n\t\t\t\t\t\t// roll to see if flee\n\t\t\t\t\t\tif (Player.Run() == true) {\n\t\t\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\t\t\tSystem.out.println(\"you've run away from the \" + enemyName + \"!\");\n\t\t\t\t\t\t\tbreak COMBAT_START;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tenemySwing = rand.nextInt(Monster.Attack());\n\t\t\t\t\t\t\tSystem.out.println(enemyName + \" dealt \" + enemySwing + \" Damage!\");\n\t\t\t\t\t\t\tplayerNewHealth = playerNewHealth - enemySwing;\n\t\t\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"\\t!!!Invalid Input!!!\");\n\t\t\t\t\tSystem.out.println(\"\\tPlease try Again.\");\n\t\t\t\t}\n\n\t\t\t\t// When Enemy Dies.\n\t\t\t\t//TODO: add timeunit here\n\t\t\t\tif (enemyNewHealth <= 0) {\n\t\t\t\t\tSystem.out.println(\"You have defeated \" + enemyName + \"!!\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tYou have beaten my FIRST game ever.\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tThank you so fuckin' much for playing.\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tit means the W O R L D to me :)\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tIf you want to see more of my work,\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(1);\n\t\t\t\t\tSystem.out.println(\"\\tfollow me on Twitter @Simons_saysNull\");\n\t\t\t\t\tTimeUnit.SECONDS.sleep(2);\n\t\t\t\t\tSystem.out.println(\"\\tThanks again for playing my game. - Robb Simons\");\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\tbreak;\n\t\t\t\t} else {\n\t\t\t\t\tcontinue COMBAT_START;\n\t\t\t\t}\n\n\t\t\t}\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void loadTilemap(File fileToLoad) \n {\n File levelFile = fileToLoad;\n boolean roverPainted = false; //Used to check if rover is painted twice\n try\n {\n Scanner scanner = new Scanner(levelFile);\n //Strict capture, instead of hasNextLine()\n // to enforce level grid size\n //Collect data for each column in row, then go to next row\n // 0 = surface, 1 = rover, 2 = rock, 3 = mineral\n for(int y = 0; y < Level.MAX_ROWS; y++)\n {\n for(int x = 0; x < Level.MAX_COLUMNS; x++)\n {\n if(scanner.hasNext())\n {\n tilemap[x][y] = scanner.nextInt();\n \n //Check if this tile paint was a rover\n if(tilemap[x][y] == 1)\n {\n //If rover has already been painted\n if(roverPainted)\n {\n System.out.println(\"WARNING: Multiple rovers exist. \"\n + \"Please fix level file. \");\n }\n roverPainted = true; //Set roverPainted to true\n }\n }\n else\n {\n tilemap[x][y] = 0;\n }\n }\n }\n scanner.close();\n repaint();\n }\n catch (FileNotFoundException e) \n {\n System.out.println(\"Invalid Level File\");\n e.printStackTrace();\n }\n }",
"@Override\n\tpublic void tick() {\n\t\tif(fighting) {\n\t\t\t//Mostrar numero de ronda\n\t\t\tif(msjRonda) {\n\t\t\t\ttiempoRondaMsj--;\n\t\t\t\tif(tiempoRondaMsj==0) {\n\t\t\t\t\tmsjRonda=false;\n\t\t\t\t\ttiempoRondaMsj=100;\n\t\t\t\t\tmsjFight=true;\n\t\t\t\t\thandler.getGame().setSoundEffect(6,true);\n\t\t\t\t}\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t}\n\t\t\t//Mostrar mensaje FIGHT!\n\t\t\telse if(msjFight) {\n\t\t\t\ttiempoFightMsj--;\n\t\t\t\tif(tiempoFightMsj==0) {\n\t\t\t\t\tmsjFight=false;\n\t\t\t\t\ttiempoFightMsj=100;\n\t\t\t\t}\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t}\n\t\t\t//Mostrar el ganador de la ronda\n\t\t\telse if(msjGanador) {\n\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t\ttiempoGanador--;\n\t\t\t\tif(tiempoGanador==0) {\n\t\t\t\t\tmsjGanador=false;\n\t\t\t\t\ttiempoGanador=100;\n\t\t\t\t\t//Si gana la CPU no mostramos los puntos que ha hecho (nos saltamos el estado msjGanador)\n\t\t\t\t\tif((mode==1 && resultado==2) || mode==3) {\n\t\t\t\t\t\ttiempoTime=50;\n\t\t\t\t\t\ttiempoVital=100;\n\t\t\t\t\t\tmsjPuntos=false;\n\t\t\t\t\t\tbonus=0;\n\t\t\t\t\t\thandler.getGame().setFade(true);\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Actualizar variables para gestionar el final de ronda\n\t\t\t\t\t\taccionFinRonda();\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tmsjPuntos=true;\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Mostrar puntos ganados\n\t\t\telse if(msjPuntos) {\n\t\t\t\ttiempoTime--;\n\t\t\t\ttiempoVital--;\n\t\t\t\t//bonus se usa para controlar el tiempo a mostrar despues de llegar hasta el maximo valor del bonus\n\t\t\t\tif(bonus>=(puntosTime+puntosVital+10000)) {\n\t\t\t\t\ttiempoTime=50;\n\t\t\t\t\ttiempoVital=100;\n\t\t\t\t\tmsjPuntos=false;\n\t\t\t\t\thandler.getGame().setFade(true);\t\n\t\t\t\t\tbonus=0;\n\t\t\t\t\t\n\t\t\t\t\t//Actualizar variables para gestionar el final de ronda\n\t\t\t\t\taccionFinRonda();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Comenzamos a hacer tick de la pelea cuando se han mostrado los mensajes iniciales\n\t\t\telse {\n\t\t\t\tif(handler.getGame().getKeyManager().primeraVez && primeraVez2) {\n\t\t\t\t\tprimeraVez2=false;\n\t\t\t\t\t\n\t\t\t\t\tif(handler.getKeyManager().ESC){ // Salir juego\n\t\t\t\t\t\tpause=!pause;\n\t\t\t\t\t\thandler.getGame().setSoundEffect(25,false);\n\t\t\t\t\t\thandler.getGame().quererSalir=true;\n\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\thandler.getGame().xEsc=590;\n\t\t\t\t\t\thandler.getGame().yEsc=335;\n\t\t\t\t\t\thandler.getGame().widthEsc=100;\n\t\t\t\t\t\thandler.getGame().heightEsc=50;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tif(handler.getGame().quererSalir) {\n\t\t\t\t\t\tif(handler.getKeyManager().enter && handler.getGame().posAvion==2){ // yes\n\t\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().enter && handler.getGame().posAvion==1){ // no\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(25,false);\n\t\t\t\t\t\t\thandler.getGame().quererSalir=false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().D){ // dcha\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(26,false);\n\t\t\t\t\t\t\tif(handler.getGame().posAvion==2) {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(handler.getKeyManager().A){ // izq\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(26,false);\n\t\t\t\t\t\t\tif(handler.getGame().posAvion==1) {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\thandler.getGame().posAvion=1;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tif(handler.getKeyManager().P && mode!=3){ // Pause !!!!\n\t\t\t\t\t\t\t//System.out.println(\"Hola\");\n\t\t\t\t\t\t\tpause=!pause;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(!handler.getGame().getKeyManager().primeraVez) {\n\t\t\t\t\tprimeraVez2=true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(pause) {\n\t\t\t\t\t//que se detenga el tiempo de la pelea\n\t\t\t\t\thandler.getGame().setTiempoQuieto(true);\n\t\t\t\t\thandler.getGame().pauseState=new PauseState(handler);\n\t\t\t\t\tpause=false;\n\t\t\t\t\tState.setState(handler.getGame().pauseState);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t//que avance el tiempo de la pelea\n\t\t\t\t\thandler.getGame().setTiempoQuieto(false);\n\t\t\t\t\t\n\t\t\t\t\tworld.tick();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//Si se ha acabado el tiempo\n\t\t\t\tif(handler.getGame().tiempoRestante==0) {\n\t\t\t\t\t//Y el player 2 tiene mas vida, gana player 2\n\t\t\t\t\tif(handler.getWorld().getEntityManager().getPlayer_1().getVida()<\n\t\t\t\t\t handler.getWorld().getEntityManager().getPlayer_2().getVida()) {\n\t\t\t\t\t\tmarcador2++;\n\t\t\t\t\t\tresultado=2;\n\t\t\t\t\t}\n\t\t\t\t\t//Y el player 1 tiene mas vida, gana el player 1\n\t\t\t\t\telse {\n\t\t\t\t\t\tresultado=1;\n\t\t\t\t\t\tmarcador1++;\n\t\t\t\t\t}\n\t\t\t\t\tfinRonda=true;\n\t\t\t\t}\n\t\t\t\t//Player 2 ha ganado\n\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_1().getVida()<=0) {\n\t\t\t\t\t//Comienza la animacion de KO\n\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_1().getAnimacionActual() != 13) {\n\t\t\t\t\t\t//Sonido de grito\n\t\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_1().getFighter() == 1) {\n\t\t\t\t\t\t\t//Chun\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(30);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//Ryu y Blanka\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(29);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ko) {\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = true;\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = true;\n\t\t\t\t\t\t\tresultado=2;\n\t\t\t\t\t\t\tmarcador2++;\n\t\t\t\t\t\t\tko = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().setAnimacionActual(13);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).setAnimacionEnCurso(true);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).resetAnimtaion();\n\t\t\t\t\t}\n\t\t\t\t\t//Finaliza la animacion de KO\n\t\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_1().getAnimacionActual() == 13\n\t\t\t\t\t\t\t&& handler.getWorld().getEntityManager().getPlayer_1().getAnimaciones().get(13).getIndex() == 4) {\n\t\t\t\t\t\tfinRonda=true;\n\t\t\t\t\t\tko = true;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = false;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Player 1 ha ganado\n\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_2().getVida()<=0) {\n\t\t\t\t\t//Comienza la animacion de KO\n\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_2().getAnimacionActual() != 13) {\n\t\t\t\t\t\t//Sonido de grito\n\t\t\t\t\t\tif (handler.getWorld().getEntityManager().getPlayer_2().getFighter() == 1) {\n\t\t\t\t\t\t\t//Chun\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(30);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t//Ryu y Blanka\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(29);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (ko) {\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = true;\n\t\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = true;\n\t\t\t\t\t\t\tresultado=1;\n\t\t\t\t\t\t\tmarcador1++;\n\t\t\t\t\t\t\tko = false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().setAnimacionActual(13);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).setAnimacionEnCurso(true);\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).resetAnimtaion();\n\t\t\t\t\t}\n\t\t\t\t\t//Finaliza la animacion de KO\n\t\t\t\t\telse if(handler.getWorld().getEntityManager().getPlayer_2().getAnimacionActual() == 13\n\t\t\t\t\t\t\t&& handler.getWorld().getEntityManager().getPlayer_2().getAnimaciones().get(13).getIndex() == 4) {\n\t\t\t\t\t\tfinRonda=true;\n\t\t\t\t\t\tko = true;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_1().KO = false;\n\t\t\t\t\t\thandler.getWorld().getEntityManager().getPlayer_2().KO = false;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//SUMAR LOS PUNTOS AL JUGADOR QUE CORRESPONDA SI HA TERMINADO LA RONDA\n\t\t\t\tif(finRonda) {\n\t\t\t\t\t//Si ha ganado la ronda el jugador 1, se le suman los puntos por tiempo y vida\n\t\t\t\t\tif(resultado==1) {\n\t\t\t\t\t\t//TIEMPO\n\t\t\t\t\t\tpuntosTime=handler.getGame().tiempoRestante*100;\n\t\t\t\t\t\t//VIDA\n\t\t\t\t\t\tpuntosVital=(int)handler.getWorld().getEntityManager().getPlayer_1().getVida()*10;\n\t\t\t\t\t\t//Bonus de dificutad:\n\t\t\t\t\t\tif (handler.getGame().mode == 1) {\n\t\t\t\t\t\t\tif (handler.getGame().getDificultad() == 1 || handler.getGame().getDificultad() == 3) {\n\t\t\t\t\t\t\t\t//Medio o incremental\n\t\t\t\t\t\t\t\tpuntosTime *= 1.2;\n\t\t\t\t\t\t\t\tpuntosVital*=1.2;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse if (handler.getGame().getDificultad() == 2) {\n\t\t\t\t\t\t\t\t//Medio o incremental\n\t\t\t\t\t\t\t\tpuntosTime *= 1.4;\n\t\t\t\t\t\t\t\tpuntosVital*=1.4;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse if(resultado==2) {\n\t\t\t\t\t\t//TIEMPO\n\t\t\t\t\t\tpuntosTime=handler.getGame().tiempoRestante*100;\n\t\t\t\t\t\t//VIDA\n\t\t\t\t\t\tpuntosVital=(int)handler.getWorld().getEntityManager().getPlayer_2().getVida()*10;\n\t\t\t\t\t}\n\t\t\t\t\tmsjGanador=true;\n\t\t\t\t\tif(mode==1) {\n\t\t\t\t\t\tif(resultado==1) {\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(19);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thandler.getGame().setSoundEffect(20);\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}\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t//Si ha terminado la pelea y se muestran las caras reventadas\n\t\telse {\n\t\t\ttiempoVS--;\n\t\t\tif(tiempoVS<=0) {\n\t\t\t\ttiempoVS=250;\n\t\t\t\tif(mode==2) {\n\t\t\t\t\thandler.getGame().setPuntos1(0);\n\t\t\t\t\thandler.getGame().setPuntos2(0);\n\t\t\t\t\thandler.getGame().setCurrentSong(3);\n\t\t\t\t\tState.setState(handler.getGame().selectFighterState2);\n\t\t\t\t}\n\t\t\t\telse if(mode==1) {\n\t\t\t\t\t//Si ha ganado la CPU se guarda el score\n\t\t\t\t\tif(mostrarScoreLose) {\n\t\t\t\t\t\tState ScoreState = new ScoreState(handler,fighter1,false);\n\t\t\t\t\t\thandler.getGame().setCurrentSong(0);\n\t\t\t\t\t\tState.setState(ScoreState);\n\t\t\t\t\t}\n\t\t\t\t\t//Si se termina el modo historia se guarda el score\n\t\t\t\t\telse if(mostrarScoreWin) {\n\t\t\t\t\t\tState EndGameState = new EndGameState(handler,fighter1,false);\n\t\t\t\t\t\tif(fighter1==0) {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(7);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(fighter1==1) {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(8);\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\thandler.getGame().setCurrentSong(9);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tAssets.initAssets_EndGameState();\n\t\t\t\t\t\tState.setState(EndGameState);\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tState selectFighterState1=new SelectFighterState1(handler,fighterToSelectFighter);\n\t\t\t\t\t\thandler.getGame().setCurrentSong(3);\n\t\t\t\t\t\tState.setState(selectFighterState1);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse if(mode==3) {\n\t\t\t\t\thandler.getGame().finPeleaDemo=true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}"
]
| [
"0.6257378",
"0.6034262",
"0.6030672",
"0.5990752",
"0.59399617",
"0.59213126",
"0.5847182",
"0.58384734",
"0.5825083",
"0.5806089",
"0.57246614",
"0.5722113",
"0.5695576",
"0.5685689",
"0.56542957",
"0.5579471",
"0.5574777",
"0.5570244",
"0.55442077",
"0.55311984",
"0.5491689",
"0.5484567",
"0.5456114",
"0.54280746",
"0.541451",
"0.5402832",
"0.5384564",
"0.53733575",
"0.5362231",
"0.5352192",
"0.53478724",
"0.53447473",
"0.5341114",
"0.53383905",
"0.53281236",
"0.5325513",
"0.5317308",
"0.5311935",
"0.5293381",
"0.52811325",
"0.52791977",
"0.52754587",
"0.5273547",
"0.5270634",
"0.5269883",
"0.52688867",
"0.52686614",
"0.52606726",
"0.52457905",
"0.52456856",
"0.52386177",
"0.5234266",
"0.52328885",
"0.5230253",
"0.5229267",
"0.52250963",
"0.52237654",
"0.52189136",
"0.52158076",
"0.5211302",
"0.52106965",
"0.52097917",
"0.5198575",
"0.5190049",
"0.5184241",
"0.5179594",
"0.5174638",
"0.51724946",
"0.51641977",
"0.515976",
"0.51490146",
"0.51448953",
"0.5144597",
"0.5140129",
"0.5139685",
"0.5137941",
"0.51368445",
"0.51359075",
"0.5132691",
"0.5130529",
"0.51285064",
"0.51266074",
"0.51168364",
"0.51160145",
"0.511046",
"0.51072574",
"0.51062495",
"0.51058835",
"0.5105832",
"0.5102772",
"0.5100296",
"0.50992566",
"0.50951856",
"0.5091306",
"0.50875384",
"0.50875247",
"0.5086511",
"0.50846404",
"0.507952",
"0.50792485",
"0.5077327"
]
| 0.0 | -1 |
Creates a battle against a wild Pokemon. | public BattleWorld(String pokemonName, int level)
{
wildPokemon = true;
isBattleOver = false;
initWorld(pokemonName, level, 0);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PlayerFighter create(GamePlayer player);",
"public Battle() {\r\n\t\tfoesPokemon = new Pokemon[] {\r\n\t\t\t\tnew Totodile(12),\r\n\t\t\t\tnew Bulbasaur(15),\r\n\t\t\t\tnew Combusken(20),\r\n\t\t\t\tnew Raichu(25),\r\n\t\t\t\tnew Venausaur(50),\r\n\t\t\t\tnew Blaziken(50)\r\n\t\t};\r\n\t\tyourPokemon = new Pokemon[] {\r\n\t\t\t\tnew Torchic(14),\r\n\t\t\t\tnew Ivysaur(18),\r\n\t\t\t\tnew Croconaw(20),\r\n\t\t\t\tnew Raichu(25),\r\n\t\t\t\tnew Blaziken(29),\r\n\t\t\t\tnew Feraligatr(40)\r\n\t\t};\r\n\t}",
"private boolean isCreateBattle() {\r\n int percent = ConfigUtil.getConfigInteger(\"battlePercent\", 30);\r\n if(RandomUtil.nextInt(100) < percent){\r\n return true;\r\n }\r\n return false;\r\n }",
"public Battle(){\r\n\t\t\r\n\t}",
"public Battle(Pokemon[] yourPokemon, Pokemon[] foePokemon) {\r\n\t\tthis.yourPokemon = yourPokemon;\r\n\t\tthis.foesPokemon = foePokemon;\r\n\t}",
"ArenaCreature createPlayerMageArenaCreature(Player player);",
"public void createNewGame() {\n\t\tfor(int n = 0; n < 8; n++){\n\t\t\tfor(int j = 0; j < 8; j++){\n\t\t\t\tif ( n % 2 == j % BLACK_PAWN ) {\n\t\t\t\t\tif (n < 3)\n\t\t\t\t\t\tarr[n][j] = RED_PAWN;\n\t\t\t\t\telse if (n > 4)\n\t\t\t\t\t\tarr[n][j] = BLACK_PAWN;\n\t\t\t\t\telse\n\t\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t } \n\t\t\t\telse\n\t\t\t\t\tarr[n][j] = EMPTY;\n\t\t\t}\n\t\t}\n\t}",
"public void battle(AbstractPokemon otherPokemon)\n {\n boolean capturedPokemon = false;\n AbstractPokemon myPokemon = caughtPokemon.get(0);\n while(caughtPokemon.size() > 0 && otherPokemon.getHealth() > 0 && myPokemon.getHealth() > 0 && capturedPokemon == false)\n {\n System.out.println(otherPokemon.toString() + \" has \" + otherPokemon.getHealth() + \" HP.\");\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has \" + myPokemon.getHealth() + \" HP.\");\n while (otherPokemon.getHealth() > 0 && myPokemon.getHealth() > 0 && capturedPokemon == false)\n {\n boolean willingToCapture = false;\n if(faveType == AbstractPokemon.Type.ANY_TYPE)\n willingToCapture = true;\n else if(otherPokemon.getType() == faveType)\n willingToCapture = true;\n if(!otherPokemon.canCapture() || !willingToCapture)\n {\n otherPokemon.takeDamage(myPokemon);\n if(otherPokemon.getHealth() < 0)\n otherPokemon.setHealth(0);\n System.out.println(otherPokemon.toString() + \" has \" + otherPokemon.getHealth() + \" HP.\");\n if(otherPokemon.getHealth() > 0)\n {\n myPokemon.takeDamage(otherPokemon);\n if(myPokemon.getHealth() < 0)\n myPokemon.setHealth(0);\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has \" + myPokemon.getHealth() + \" HP.\");\n }\n }\n else\n {\n if(throwPokeball(otherPokemon))\n {\n System.out.println(otherPokemon.toString() + \" has been captured!\");\n otherPokemon.setHealth(20);\n caughtPokemon.add(otherPokemon);\n otherPokemon.removeSelfFromGrid();\n capturedPokemon = true;\n }\n else\n {\n myPokemon.takeDamage(otherPokemon);\n if(myPokemon.getHealth() < 0)\n myPokemon.setHealth(0);\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has \" + myPokemon.getHealth() + \" HP.\");\n }\n }\n }\n if (myPokemon.getHealth() <= 0)\n {\n System.out.println(toString() + \"'s \" + myPokemon.toString() + \" has fainted!\");\n caughtPokemon.remove(0);\n }\n if (caughtPokemon.size() > 0)\n {\n System.out.println(toString() + \" sent out \" + caughtPokemon.get(0).toString() + \".\");\n myPokemon = caughtPokemon.get(0);\n }\n }\n if(capturedPokemon == false)\n {\n if (otherPokemon.getHealth() <= 0)\n {\n System.out.println(otherPokemon.toString() + \" has fainted!\");\n otherPokemon.removeSelfFromGrid();\n myPokemon.setHealth(20);\n }\n else\n {\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n removeSelfFromGrid();\n otherPokemon.setHealth(20);\n }\n }\n System.out.println(\"\");\n }",
"public battle(player a) {\n initComponents();\n //set background color\n Color battle = new Color(255,129,106);\n this.getContentPane().setBackground(battle);\n \n //sets the given player to the subject player\n c = a;\n //players current xp\n exp = c.getXP();\n //players starting health\n playerHealth = 3;\n //displays the players stats\n btnEarth.setText(\"Earth: \" + c.getEarth());\n btnFire.setText(\"Fire: \" + c.getFire());\n btnWater.setText(\"Water: \" + c.getWater());\n btnIce.setText(\"Ice: \" + c.getIce());\n \n //determines which monster to fight\n if(exp < 4){\n fill(\"Blob-Boy\");\n }else if(exp < 8){\n fill(\"Spike\");\n }else{\n fill(\"Shadow\");\n }\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 }",
"public Square createGround() {Collect.Hit(\"BoardFactory.java\",\"createGround()\"); Collect.Hit(\"BoardFactory.java\",\"createGround()\", \"1746\");return new Ground(sprites.getGroundSprite()) ; }",
"void createNewGame(Player player);",
"public Pokemon() {\n }",
"public static void main (String[] args) throws InvalidShotException {\n Player human = new Player();\n try {\n human.placeBoat(0, 5, 4, 5, 8);\n human.placeBoat(1, 2, 3, 5, 3);\n System.out.println(human.findMyFleet());\n System.out.println(human.printGrid());\n System.out.println(human.getBoatAt(0));\n human.removeBoat(1);\n //human.resetBoat(human.getBoatAt(1));\n \n System.out.println(human.findMyFleet());\n System.out.println(human.printGrid());\n } catch (InvalidPlacementException oops) {\n System.out.println(\"Exception here~~~~~~~\");\n }\n }",
"public void makePlayerPokemon(int index)\r\n {\r\n String playerPkmnName = Reader.readStringFromFile(\"playerPokemon\", index, 0);\r\n int playerPkmnLevel = Reader.readIntFromFile(\"playerPokemon\", index, 1);\r\n boolean playerPkmnGender = Reader.readBooleanFromFile(\"playerPokemon\", index, 2);\r\n int playerPkmnCurrentHealth = Reader.readIntFromFile(\"playerPokemon\", index, 3);\r\n int playerPkmnExp = Reader.readIntFromFile(\"playerPokemon\", index, 4);\r\n this.playerPokemon = new Pokemon(currentPlayerPokemon, playerPkmnName, playerPkmnLevel, playerPkmnGender, playerPkmnCurrentHealth, playerPkmnExp, true);\r\n }",
"public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }",
"void createGame(User playerOne, User playerTwo) throws RemoteException;",
"public Pokemon(int hp){\r\n this.hp = hp;\r\n }",
"public PoisonPack(Battle battle, String name){\n\t\t//calls the ItemDrop constructor\n\t\tsuper(true, 200, 0, false, battle);\n\t\tthis.name = name;\n\t\tthis.imageName = \"poison.png\";\n\t}",
"public void createPowerUps (int low, int high, int h, int w) {\n int num = (int) (random (low, high + 1));\n for (int i = 0; i < num; i++) {\n int x = ((int) random((width/pixelSize))) * pixelSize;\n int y = ((int) random((height-topHeight)/pixelSize)) * pixelSize + topHeight;\n if (getLocation(x, y).getType() == LocationType.AIR) {\n powerUps.add (new PowerUp (x, y, w, h));\n }\n }\n}",
"public int attackPokemon(Pokemon pokemon1, Pokemon pokemon2, Player player);",
"@Test\n public void bestowEnchantmentWillNotBeTapped() {\n addCard(Zone.BATTLEFIELD, playerA, \"Forest\", 6);\n addCard(Zone.BATTLEFIELD, playerA, \"Silent Artisan\");\n\n addCard(Zone.HAND, playerA, \"Boon Satyr\");\n\n // Enchantment {1}{W}\n // Creatures your opponents control enter the battlefield tapped.\n addCard(Zone.BATTLEFIELD, playerB, \"Imposing Sovereign\");\n\n castSpell(1, PhaseStep.POSTCOMBAT_MAIN, playerA, \"Boon Satyr using bestow\", \"Silent Artisan\");\n\n setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n // because Boon Satyr is no creature on the battlefield, evolve may not trigger\n assertPermanentCount(playerA, \"Silent Artisan\", 1);\n assertPowerToughness(playerA, \"Silent Artisan\", 7, 7);\n // because cast with bestow, Boon Satyr may not be tapped\n assertTapped(\"Boon Satyr\", false);\n\n }",
"Player attackingPlayer(int age, int overall, int potential) {\r\n Player newPlayer = new Player(this.nameGenerator.generateName(), age, overall, potential, 'C' , 'F');\r\n\r\n\r\n\r\n\r\n }",
"public Battle() {\r\n\t\tnbVals = 0;\r\n\t\tplayer1 = new Deck();\r\n\t\tplayer2 = new Deck();\r\n\t\ttrick = new Deck();\r\n\t}",
"public static void main(String[] args) {\n\t\tPokemon firstPokemon = new Pokemon(\" P1 Typhlosion \", 1600, \" Fire \" , \" Healthy \" , \"Scratch\" , \"Bite\" , \"Fire Blast\", 300 , 375 , 450);\r\n\t\t Pokemon secondPokemon = new Pokemon(\" P2 Snorlax \", 1300, \" Normal \" , \" Healthy \" , \"Body Slam\" , \"Sleep\" , \"Swallow\", 500 , 100 , 200);\r\n\t\t System.out.println (firstPokemon.name + firstPokemon.health + firstPokemon.type + firstPokemon.status );\r\n\t\t System.out.println (secondPokemon.name + secondPokemon.health + secondPokemon.type + secondPokemon.status );\r\n\t\t Scanner myObj = new Scanner(System.in);\r\n\t\t\r\n\t\t \r\n\t\t System.out.println( \"P1 Turn. Enter number for corresponding attack! \" );\r\n\t\t System.out.println( \" 1(\" + firstPokemon.pAttack1 +\")\"+ \" 2(\" + firstPokemon.pAttack2 +\")\"+ \" 3(\" + firstPokemon.pAttack3 +\")\" );\r\n\t\t String battleCommand = myObj.nextLine();\r\n\t\t System.out.println (battleCommand);\r\n\t\t if (battleCommand.charAt(0) == '1') {\r\n\t\t\t System.out.println (firstPokemon.pAttack1);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '2') {\r\n\t\t\t System.out.println (firstPokemon.pAttack2);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '3') {\r\n\t\t\t System.out.println (firstPokemon.pAttack3);\r\n\t\t }\r\n\t\t else {\r\n\t\t\t System.out.println(\"Please enter the correct number.\");\r\n\t\t\t \r\n\t\t }\r\n\t}",
"@Test\r\n\tpublic void BushTest_1(){\r\n\t\tPlayer player = new Player(0,\"Chris\", new Point(1, 1), new Point(0, 1));\r\n\t\tPoint worldLocation = new Point(1, 1);\r\n\t\tPoint tileLocation = new Point(1, 1);\r\n\t\tBush bush = new Bush(worldLocation, tileLocation);\r\n\t\ttry{\r\n\t\t\ttry {\r\n\t\t\t\tbush.performAction(player);\r\n\t\t\t} catch (SignalException e) {\r\n\t\t\t}\r\n\t\t\tif(player.getPocket().getItems().size() == 1){\r\n\t\t\t\tItem item = player.getPocket().getItems().get(0);\r\n\t\t\t\tassert(item instanceof Food);\r\n\t\t\t\tassert(((Food) item).getFoodType() == FoodType.BERRY);\r\n\t\t\t}\r\n\t\t}catch(GameException e){\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public BattleWorld(int enemyPokemonID)\r\n {\r\n wildPokemon = false;\r\n isBattleOver = false;\r\n initWorld(\"\", 0, enemyPokemonID);\r\n }",
"void createPlayer(Player player);",
"@Override\npublic Action actionChoosed(Player joueur) {\n WarPlayer player = this.castPlayer(joueur);\n int index = ((WarStrategy)(player.getStrategy())).skipOrDeploy();\n Action action = new SkipAction(player);\n if (index == 0) {\n Army army = this.inputArmy(player);\n Tile tile = ((WarStrategy)player.getStrategy()).inputTileStrategy();\n if(army != null && tile != null) {\n if (army.getArmySize() > 3 && tile.equals(new MountainTile(0, 0, 1, 0))) {\n System.out.println(\" Army of size \" + army.getArmySize() + \" can't be deployed on a mountain tile ! \");\n player.addWarrior(army.getArmySize());\n } else {\n action = new WarActionDeploy(player, this.board, tile.getPosX(), tile.getPosY(), army);\n }\n } else if (army != null && tile == null) {\n player.addWarrior(army.getArmySize());\n }\n }\n return action;\n}",
"public Game createGame();",
"public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}",
"public static void createArmy() {\n Unit unitOne = new Unit(\"Unit One\");\n Unit unitTwo = new Unit(\"Unit Two\");\n Unit unitThree = new Unit(\"Unit Three\");\n Unit unitFour = new Unit(\"Unit Four\");\n Unit unitFive = new Unit(\"Unit Five\");\n\n Knight knightOne = new Knight(\"Knight One\");\n Knight knightTwo = new Knight(\"Knight Two\");\n Knight knightThree = new Knight(\"Knight Three\");\n\n General general = new General(\"General\");\n Doctor doctor = new Doctor(\"Doctor\");\n }",
"@Override\n\tpublic Pokemon createPokemon(int index, int cp, int hp, int dust, int candy) throws PokedexException {\n\t\tint id = index +1;\n\t\t\t\t\n\t\tPokemon poke;\n\t\t\n\t\t// Connection au service web\n\t\tIPokemonService service = new PokemonService();\n\t\tMap<String, Object> data = service.getPokemonMetadata(id);\n\t\tMap<String, Object> ivs = service.getPokemonIVs(id, cp, hp, dust);\n\t\t\n\t\tif (data.containsKey(PokemonService.ERROR_KEY)) {\n\t\t\tthrow new PokedexException((String) data.get(PokemonService.ERROR_KEY));\n\t\t\t//System.out.println(\"*** ERREUR : \" + data.get(PokemonService.ERROR_KEY) + \" ***\");\n\t\t\t//poke = new Pokemon(index, \"\", 0, 0, 0, cp, hp, dust, candy, 0);\n\t\t}\n\t\t\n\t\telse if (ivs.containsKey(PokemonService.ERROR_KEY)) {\n\t\t\tthrow new PokedexException((String) ivs.get(PokemonService.ERROR_KEY));\n\t\t\t//System.out.println(\"*** ERREUR : \" + ivs.get(PokemonService.ERROR_KEY) + \" ***\");\n\t\t\t//poke = new Pokemon(index, \"\", 0, 0, 0, cp, hp, dust, candy, 0);\n\t\t\t/*\n\t\t\tpoke = new Pokemon(index,\n\t\t\t\t\t(String) data.get(\"name\"),\n\t\t\t\t\t(int) data.get(\"attack\"),\n\t\t\t\t\t(int) data.get(\"defense\"),\n\t\t\t\t\t(int) data.get(\"stamina\"),\n\t\t\t\t\tcp, hp, dust, candy, 0);\n\t\t\t*/\n\t\t}\n\t\t\n\t\telse {\n\t\t\tpoke = new Pokemon(index,\n\t\t\t\t\tPokemonTranslate.getInstance().getFrenchName((String) data.get(\"name\")),\n\t\t\t\t\t(int) data.get(\"attack\"),\n\t\t\t\t\t(int) data.get(\"defense\"),\n\t\t\t\t\t(int) data.get(\"stamina\"),\n\t\t\t\t\tcp, hp, dust, candy,\n\t\t\t\t\t(double) ivs.get(\"perfection\"));\n\t\t}\n\t\t\n\t\treturn poke;\n\t}",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"public static void battle(int choice) {\n \t\tboolean monsterHeal = false;\r\n \t\tboolean monsterDefend = false;\r\n \t\tboolean monsterAttack = false;\r\n \t\tboolean playerDefend = false;\r\n \t\tboolean playerAttack = false;\r\n \t\tboolean playerHeal = false;\r\n \t\t\r\n \t\t//Get the move the monster will make\r\n \t\tint monsterAi = monster.getAiChoice();\r\n \t\t\r\n \t\t//Check what input the player has given\r\n \t\tif(choice == 1) {\r\n \t\t\t//Set the booleans according to the input for attack\r\n \t\t\tplayerAttack = true;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 2) {\r\n \t\t\t//Set the booleans according to the input for defend\r\n \t\t\tplayerDefend = true;\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 3) {\r\n \t\t\t//Set the booleans according to the input for heal\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = true;\r\n \t\t} else {\r\n \t\t\t//Set the player not to do anything if the input is wrong\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t}\r\n \t\t\r\n \t\t//Link the monster AI choice to a move\r\n \t\tif(monsterAi == 1) {\r\n \t\t\t//Set the booleans according to the AI for attack\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 2) {\r\n \t\t\t//Set the booleans according to the AI for defend\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 3) {\r\n \t\t\t//Set the booleans according to the AI for heal\r\n \t\t\tmonsterAttack = false;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = true;\r\n \t\t}\r\n \t\t\r\n \t\tString pFirst = \"\";\r\n \t\tString mFirst = \"\";\r\n \t\tString mAttack = \"\";\r\n \t\tString pAttack = \"\";\r\n \t\tString pLife = \"\";\r\n \t\tString mLife = \"\";\r\n \t\t\r\n \t\t//Player moves\r\n \t\tif(playerHeal) {\r\n \t\t\t//Heal the player by 10 life\r\n \t\t\tplayer.Heal(10);\r\n \t\t\t//Show a message saying the player was healed\r\n \t\t\tpFirst = player.name + \" healed 10 life! \\n\";\r\n \t\t} else if(playerDefend) {\r\n \t\t\t//Set the monster not to attack (do damage)\r\n \t\t\tmonsterAttack = false;\r\n \t\t\t//Shows a message that the player has defended\r\n \t\t\tpFirst = player.name + \" defended and has got 0 damage from \" + monster.name + \"\\n\";\r\n \t\t} else if(!playerAttack && !playerDefend && !playerHeal) {\r\n \t\t\t//Show a message that the player did not do anything\r\n \t\t\tpFirst = player.name + \" did nothing. \\n\";\r\n \t\t} \r\n \t\t\r\n \t\t//Monster moves\r\n \t\tif(monsterHeal) {\r\n \t\t\t//heal the monster by 10 life\r\n \t\t\tmonster.Heal(10);\r\n \t\t\t//Show a message that the monster was healed\r\n \t\t\tmFirst = (monster.name + \" healed 10 life! \\n\");\r\n \t\t} else if(monsterDefend) {\r\n \t\t\t//Set the player not to attack (do damage)\r\n \t\t\tplayerAttack = false;\r\n \t\t\t//Show a message that the monster has defended\r\n \t\t\tmFirst = monster.name + \" defended and has got 0 damage from \" + player.name + \"\\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Attack moves\r\n \t\tif(playerAttack) {\r\n \t\t\t//Lower the monsters life by the players power\r\n \t\t\tmonster.life -= player.strength;\r\n \t\t} \r\n \t\t\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Lower the players life by the monsters power\r\n \t\t\tplayer.life -= monster.strength;\r\n \t\t}\r\n \t\tif(playerAttack) {\r\n \t\t\t//Show a message that the player has attacked\r\n \t\t\tpAttack = player.name + \" hit \" + monster.name + \" for \" + player.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Show a message that the monster has attacked\r\n \t\t\tmAttack = monster.name + \" hit \" + player.name + \" for \" + monster.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Show the current life for the player and the monster\r\n \t\tpLife = player.name + \" does now have \" + player.life + \" life left. \\n\";\r\n \t\tmLife = monster.name + \" does now have \" + monster.life + \" life left. \\n\";\r\n \t\t\r\n \t\t//Print the moves message\r\n \t\tMainGame.display.disp(pFirst + mFirst + pAttack + mAttack + pLife + mLife);\r\n \t\t\r\n\t\t//Check if the player is still alive\r\n \t\tif(player.life <= 0) {\r\n \t\t\t\r\n \t\t\t//If the player has no life left, show him that he has lost\r\n \t\t\tMainGame.display.disp(\"Too bad! You lost!\" + \"\\n\" + \"Play again?\");\r\n \t\t\t\r\n \t\t\t//Show the option to play again\r\n \t\t\tMainGame.display.Enable(MainGame.display.playAgain);\r\n \t\t}\r\n \t\t\r\n\t\t//Check if the monster is still alive\r\n \t\tif(monster.life <= 0) {\r\n \t\t\t\r\n \t\t\tplayer.xp += monster.giveXp;\r\n \t\t\tMainGame.display.disp(\"You beat \" + monster.name + \"! \\n\" + \"You got \" + monster.giveXp + \" XP!\" + \"\\n\" + \"You now have \" + player.xp + \" XP!\");\r\n \t\t\t\r\n \t\t\tMainGame.display.Enable(MainGame.display.continueStage);\r\n \t\t}\r\n \t\t\r\n\t\tMainGame.display.Enable(MainGame.display.continueFight);\r\n \t\r\n \t}",
"private void newPowerUp() {\r\n int row = 0;\r\n int column = 0;\r\n do {\r\n row = Numbers.random(0,maxRows-1);\r\n column = Numbers.random(0,maxColumns-1);\r\n } while(isInSnake(row,column,false));\r\n powerUp = new Location(row,column,STOP);\r\n grid[powerUp.row][powerUp.column].setBackground(POWER_UP_COLOR);\r\n }",
"public void newGame() {\n \tturn = PieceColor.White;\n \t\n \t//the middle are empty squares\n \tfor(int i = 2; i < 6; i++) {\n \t\tfor(int j = 0; j < 8; j++) {\n \t\t\tsetPiece(j, i, new NoPiece(j, i));\n \t\t}\n \t}\n \t\n \t//pawns\n \tfor(int i = 0; i < 8; i++) {\n \t\t//make these pawns\n \t\tsetPiece(i, 1, new Pawn(i, 1, PieceColor.White, this));\n \t\tsetPiece(i, 6, new Pawn(i, 6, PieceColor.Black, this));\n \t}\n \t\n \t//white back row\n \tsetPiece(0, 0, new Rook(0, 0, PieceColor.White, this));\n \tsetPiece(1, 0, new Knight(1, 0, PieceColor.White, this));\n \tsetPiece(2, 0, new Bishop(2, 0, PieceColor.White, this));\n \tsetPiece(3, 0, new Queen(3, 0, PieceColor.White, this));\n \tsetPiece(4, 0, new King(4, 0, PieceColor.White, this));\n \tsetPiece(5, 0, new Bishop(5, 0, PieceColor.White, this));\n \tsetPiece(6, 0, new Knight(6, 0, PieceColor.White, this));\n \tsetPiece(7, 0, new Rook(7, 0, PieceColor.White, this));\n \t\n \t//black back row\n \tsetPiece(0, 7, new Rook(0, 7, PieceColor.Black, this));\n \tsetPiece(1, 7, new Knight(1, 7, PieceColor.Black, this));\n \tsetPiece(2, 7, new Bishop(2, 7, PieceColor.Black, this));\n \tsetPiece(3, 7, new Queen(3, 7, PieceColor.Black, this));\n \tsetPiece(4, 7, new King(4, 7, PieceColor.Black, this));\n \tsetPiece(5, 7, new Bishop(5, 7, PieceColor.Black, this));\n \tsetPiece(6, 7, new Knight(6, 7, PieceColor.Black, this));\n \tsetPiece(7, 7, new Rook(7, 7, PieceColor.Black, this));\n \t\n \t//store locations of king so they can be checked\n \twKing = new Square(4, 0);\n \tbKing = new Square(4, 7);\n }",
"public void makeShips()\n\t{\n\t\t//The below is firstly to create the five ships \n\t\tint[] shipSizes= {2,3,3,4,5};\n\n\t\t//### Creating battleship to be put in the playerBattleShipsList\n\t\tfor (int x = 0; x < shipSizes.length; x ++) \n\t\t{\n\t\t\t//This creates a new battleship of size X from index's of shipSizes\n\t\t\tBattleShip newPlayerBattleShip = new BattleShip(shipSizes[x]);\n\n\t\t\t//This add the new battleship of size x (above) to a part in the array\n\t\t\tplayerBattleShipsList[x] = newPlayerBattleShip;\n\t\t}\n\n\t\t//### Creating battleship to be put in the aiBattleShipsList\n\n\t\tfor (int y = 0; y < shipSizes.length; y ++) \n\t\t{\n\t\t\t//This creates a new battleship of size X from index's of shipSizes\n\t\t\tBattleShip newAIBattleShip = new BattleShip(shipSizes[y]);\n\n\t\t\t//This add the new battleship of size x (above) to a part in the array\n\t\t\taiBattleShipsList[y] = newAIBattleShip;\n\t\t}\n\n\t}",
"PlayerBean create(String name);",
"public Pokemon(String name, int number) {\r\n this.name = name;\r\n this.number = number;\r\n }",
"private void createWarrior(String persoName, String persoImage, int persoLife, int attack) {\n\t\tpersoList.add(new Warrior(persoName, persoImage, persoLife, attack));\n\t}",
"private static Bat createBat(){\n try {\n UtilityMethods.print(\"Creating Big bat for you...!\"); \n BatGenerator batGenerator = new BatGenerator();\n BatBuilder bigBatBuilder = new BigBatBuilder();\n batGenerator.setBatBuilder(bigBatBuilder);\n batGenerator.constructBat(\n \"Bat\", \n \"Male\",\n 25,\n \"Scavenger\"\n );\n Bat bigBat = bigBatBuilder.getBat();\n UtilityMethods.print(\"\\n\"); \n bigBat.eat();\n UtilityMethods.print(\"\\n\"); \n bigBat.speak();\n UtilityMethods.print(\"\\n\"); \n bigBat.walk();\n UtilityMethods.print(\"\\n\"); \n } catch (Exception e) {\n UtilityMethods.print(e.getMessage()); \n }\n return null; \n }",
"public PokemonHielo(Pokemon pokemon) {\n \tsuper(pokemon,500,100,120);\n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();",
"public static void reproduce (Species [][] map, int sheepHealth, int wolfHealth, int plantHealth) {\n \n // Place the baby\n int babyY, babyX;\n \n // Check if the baby has been placed\n int spawned = 0;\n \n for (int y = 0; y < map[0].length; y++){\n for (int x = 0; x < map.length; x++){\n \n boolean [][] breeding = breedChoice (map, x, y, plantHealth);\n \n // Sheep upwards to breed with\n if (breeding[0][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep downwards to breed with\n } else if (breeding[1][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the left to breed with\n } else if (breeding[2][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Sheep to the right to breed with\n } else if (breeding[3][0]) {\n ((Sheep)map[y][x]).reproduceHealthLost(10);\n ((Sheep)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby sheep\n Sheep sheep = new Sheep(sheepHealth, x, y);\n \n // Place the baby sheep\n do {\n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = sheep;\n spawned = 1;\n }\n } while (spawned == 0);\n \n // Wolf upwards to breed with\n } else if (breeding[0][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y-1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf downwards to breed with\n } else if (breeding[1][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y+1][x]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the left to breed with\n } else if (breeding[2][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x-1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n // Wolf to the right to breed with\n } else if (breeding[3][1]) {\n ((Wolf)map[y][x]).reproduceHealthLost(10);\n ((Wolf)map[y][x+1]).reproduceHealthLost(10);\n \n // Make baby wolf\n Wolf wolf = new Wolf(wolfHealth, x, y);\n \n // Place the baby wolf\n do { \n babyY = (int)(Math.random() * map.length);\n babyX = (int)(Math.random() * map.length);\n if (map[babyY][babyX] == null) {\n map[babyY][babyX] = wolf;\n spawned = 1; \n }\n } while (spawned == 0);\n \n }\n \n }\n }\n \n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getReservePokemon(int index);",
"public War()\n {\n //Create the decks\n dealer = new Deck(); \n dw = new Deck();\n de = new Deck(); \n warPile = new Deck(); \n \n \n fillDeck(); //Add the cards to the dealer's pile \n dealer.shuffle();//shuffle the dealer's deck\n deal(); //deal the piles \n \n }",
"@Test\n void grab() {\n ArrayList<Player> pl = new ArrayList<>();\n AlphaGame g = new AlphaGame(1, pl,false, 8);\n\n Square s = new Square(0, 4, false, true, false, true, false, 'b');\n RealPlayer p = new RealPlayer('b', \"ciccia\");\n p.setPlayerPosition(s);\n p.getPh().getPowerupDeck().getPowerups().clear();\n p.setTurn(true);\n AmmoTile a = new AmmoTile();\n PowerupDeck pud = new PowerupDeck();\n int[] cubes = new int[3];\n cubes[0] = 2;\n cubes[2] = 1;\n char[] c1 = {'b', 'b', 'b'};\n char[] c2 = {'r', 'r', 'r'};\n char[] c3 = {'y', 'y', 'y'};\n p.getPb().payAmmo(c1);\n p.getPb().payAmmo(c2);\n p.getPb().payAmmo(c3);\n a.setCubes(cubes);\n a.setPowerup(false);\n s.setAmmo(a);\n try{\n p.grab(p.getPlayerPosition(), pud);\n }catch (WrongSquareException e){}\n }",
"public void PlaceRandomBoard(){\r\n\r\n\t\tString whichShip;\r\n\t\tString coordinate;\r\n\t\t\r\n\t\t\t// Display the random board and the random board menu \r\n\t\t// DISPLAY BOARDS!!!!!\r\n\t\tint whichInput=0;\r\n\t\tShip temp = new Ship();\r\n\t\tRandom generator = new Random();\r\n\t\tint randomIndex = generator.nextInt();\r\n\t\twhile (!this.myBoard.carrier.placed || !this.myBoard.battleship.placed\r\n\t\t\t\t|| !this.myBoard.cruiser.placed || !this.myBoard.submarine.placed\r\n\t\t\t\t|| !this.myBoard.patrolboat.placed) {\r\n\r\n\t\t\twhichInput++;\r\n\r\n\t\t\twhichShip = String.valueOf(whichInput);\r\n\t\t\t\r\n\t\t\tint direction=0;\r\n\r\n\t\t\tboolean placed = false;\r\n\t\t\twhile (!placed) {\r\n\t\t\t\trandomIndex = generator.nextInt(10);\r\n\t\t\t\tcoordinate = this.indexToLetter(randomIndex);\r\n\t\t\t\tcoordinate += String.valueOf(generator.nextInt(10)+1);\r\n\t\t\t\tdirection = generator.nextInt(4) + 1;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tswitch (Integer.parseInt(whichShip)) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\ttemp = new Carrier();\r\n\t\t\t\t\ttemp.name=\"Carrier\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\ttemp = new Battleship();\r\n\t\t\t\t\ttemp.name=\"Battleship\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\ttemp = new Cruiser();\r\n\t\t\t\t\ttemp.name=\"Cruiser\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\ttemp = new Submarine();\r\n\t\t\t\t\ttemp.name=\"Submarine\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\ttemp = new PatrolBoat();\r\n\t\t\t\t\ttemp.name=\"Patrol Boat\";\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t} \r\n\t\t\t\t\r\n\t\t\t\tplaced = this.validateShipPlacement(temp, coordinate, direction);\r\n\r\n\t\t\t\tif (placed) {\r\n\t//\t\t\t\tSystem.out.println(\"Success\");\r\n\t\t\t\t\tthis.placeShip(temp, coordinate, direction);\r\n\t\t\t\t\t\r\n\t\t\t\t} else {\r\n\t//\t\t\t\tdisplay.scroll(\"Invalid coordinate, please enter another\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t}",
"public Builder addReservePokemon(\n int index, POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (reservePokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReservePokemonIsMutable();\n reservePokemon_.add(index, value);\n onChanged();\n } else {\n reservePokemonBuilder_.addMessage(index, value);\n }\n return this;\n }",
"void create(Team team);",
"public void createRoom() {\n int hp = LabyrinthFactory.HP_PLAYER;\n if (hero != null) hp = hero.getHp();\n try {\n labyrinth = labyrinthLoader.createLabyrinth(level, room);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n try {\n characterLoader.createCharacter(level, room);\n hero = characterLoader.getPlayer();\n if (room > 1) hero.setHp(hp);\n createMonsters();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public PlayerInterface createPlayer(String godName, PlayerInterface p) {\n God god = find(godName);\n p = addEffects(p, god.getEffects());\n return p;\n }",
"Hurt createHurt();",
"private void placeAllShips()\n {\n \t\n \t//place 2 aircrafts\n \tfor(int n = 0; n < 2; n++){\n \trandomRow = rnd.nextInt(10); //get random integer from 0-9\n \trandomCol = rnd.nextInt(10);//get random integer from 0-9\n \trandomDir = rnd.nextInt(2);//get random integer from 0-1\n \twhile(!checkOverlap(randomRow,randomCol,AIRCRAFT_CARRIER_LENGTH)){ //check if random integers overlap existing ones\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \t//place aircraft if no overlap\n \tfor(int i = randomRow; i <randomRow + AIRCRAFT_CARRIER_LENGTH ; i++){\n \t\tfor(int j = randomCol; j < randomCol + AIRCRAFT_CARRIER_LENGTH; ++j){\n \t\t\tif(randomDir == DIRECTION_RIGHT)\n \t\t\t\tgrid[i][randomCol] = SHIP;\n \t\t\tif(randomDir == DIRECTION_DOWN)\n \t\t\t\tgrid[randomRow][j] = SHIP;\n \t\t\t}\n \t\t}\n \t}\n \t\n \t\n \t//place battleship\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,BATTLESHIP_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i <randomRow + BATTLESHIP_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + BATTLESHIP_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\t\n \t//place destroyer\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,DESTROYER_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + DESTROYER_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + DESTROYER_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\t\n \t//place submarine\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,SUBMARINE_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + SUBMARINE_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + SUBMARINE_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\n \t//place patrol\n \trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \trandomDir = rnd.nextInt(2);\n \twhile(!checkOverlap(randomRow,randomCol,PATROL_BOAT_LENGTH)){\n \t\trandomRow = rnd.nextInt(10);\n \trandomCol = rnd.nextInt(10);\n \t}\n \tfor(int i = randomRow; i < randomRow + PATROL_BOAT_LENGTH ; i++){\n\t\t\tfor(int j = randomCol; j < randomCol + PATROL_BOAT_LENGTH; j++){\n\t\t\t\tif(randomDir == DIRECTION_RIGHT)\n\t\t\t\t\tgrid[i][randomCol] = SHIP;\n\t\t\t\tif(randomDir == DIRECTION_DOWN)\n\t\t\t\t\tgrid[randomRow][j] = SHIP;\n\t\t\t}\n\t\t}\n }",
"private void doSummon(){\n AbstractPieceFactory apf = FactoryProducer.getFactory(tf.getActivePlayer().playerType());\n // check is null\n assert apf != null;\n // create a piece instance\n IPiece temp = apf.getPiece(PieceConstants.MINION, destination);\n // cast Ipiece to minions class\n newPiece = (Minion) temp;\n newPiece.healthProperty().addListener(new ChangeListener<Number>() {\n @Override\n public void changed(ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {\n if (newValue.doubleValue() <= 0) {\n tf.removePiece(newPiece);\n tf.resetAbilityUsed();\n }\n if (oldValue.doubleValue() <= 0 && newValue.doubleValue() > 0) {\n tf.addPiece(newPiece);\n tf.resetAbilityUsed();\n }\n }\n });\n // set piece name\n newPiece.setPieceName(MinionName);\n // set piece health points\n startingHealth = newPiece.getHealth();\n // add piece to game\n tf.addPiece(newPiece);\n }",
"public void actionCombat(Party p1) {\n System.out.println(\"______________________________________________________________________________\\n\");\n System.out.println(this.Name + \" is attacking ...\");\n int choice = (int)(Math.random() * p1.getTeam().size());\n Character target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n\n if (this.SPEED - target.getSPEED() < 5) {\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n }\n else {\n int n = 0;\n while ((target.actualHP != 0) && (n < 2)) {\n if (n == 1) {\n choice = (int)(Math.random() * p1.getTeam().size() + 1);\n target = p1.getTeam().get(choice);\n System.out.println(this.Name + \" attacks \" + target.getName() + \"!\");\n }\n int damage = Math.max(this.ATK - target.getDEF(), 0);\n System.out.println(this.Name + \" has inflicted \" + damage + \" damages to \" + target.getName() + \"!\");\n target.setActualHP(Math.max(0, target.getActualHP() - damage));\n if (target.getActualHP() == 0) {\n System.out.println(\"\\n\" + target.getName() + \" is down!\\n\");\n target.setIsDead(true);\n }\n if (n == 0) System.out.println(this.Name + \" attacks again ...\");\n n++;\n }\n }\n }",
"public void battleOver()\r\n {\r\n isBattleOver = true;\r\n }",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"public void addNewPokemon(String type, int index, String tempName, int tempLevel)\r\n {\r\n if(type.equals(\"Player\"))\r\n {\r\n if(getObjects(Pokemon.class).size() == 2)\r\n {\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n removeObject(playerPokemon);\r\n }\r\n\r\n for(int i = 0; i < 6; i++)\r\n {\r\n if(Reader.readIntFromFile(\"playerPokemon\", index, 3) > 0)\r\n {\r\n makePlayerPokemon(index);\r\n break;\r\n }\r\n index++;\r\n }\r\n\r\n playerPokemonName = playerPokemon.getName();\r\n\r\n addObject(playerPokemon, getWidth() / 4, getHeight() / 2 - 12);\r\n\r\n if(getObjects(Pokemon.class).size() == 2)\r\n {\r\n playerPkmnInfoBox.drawAll();\r\n }\r\n }\r\n else if(type.equals(\"Enemy\"))\r\n {\r\n if(getObjects(Pokemon.class).size() == 2)\r\n {\r\n removeObject(enemyPokemon);\r\n }\r\n\r\n if(!wildPokemon)\r\n {\r\n String enemyPkmnName = Reader.readStringFromFile(\"pokeMonListBattle\", index, 0);\r\n int enemyPkmnLevel = Reader.readIntFromFile(\"pokeMonListBattle\", index, 1);\r\n boolean enemyPkmnGender = Reader.readBooleanFromFile(\"pokeMonListBattle\", index, 2);\r\n int enemyPkmnCurrentHealth = Reader.readIntFromFile(\"pokeMonListBattle\", index, 3);\r\n this.enemyPokemon = new Pokemon(currentEnemyPokemon, enemyPkmnName, enemyPkmnLevel, enemyPkmnGender, enemyPkmnCurrentHealth, 0, false);\r\n\r\n enemyPokemonName = enemyPkmnName;\r\n\r\n addObject(enemyPokemon, 372, 84);\r\n }\r\n else\r\n {\r\n this.enemyPokemon = new Pokemon(currentEnemyPokemon, tempName, tempLevel, getRandomBoolean(), 9999, 0, false);\r\n enemyPokemonName = tempName;\r\n addObject(enemyPokemon, 372, 84);\r\n }\r\n }\r\n }",
"@Override\n public void applyItem() {\n Player player;\n if (Battle.getRunningBattle().getTurn() % 2 == 1)\n player = Battle.getRunningBattle().getPlayer2();\n else\n player = Battle.getRunningBattle().getPlayer1();\n\n if (player.getInGameCards().size() == 0)\n return;\n Random random = new Random();\n int randomIndex = random.nextInt(player.getInGameCards().size());\n while (!(getPlayer().getInGameCards().get(randomIndex) instanceof Warrior)) {\n randomIndex = random.nextInt(getPlayer().getInGameCards().size());\n }\n\n Buff buff = new PoisonBuff(1, true);\n buff.setWarrior((Warrior) player.getInGameCards().get(randomIndex));\n Battle.getRunningBattle().getPassiveBuffs().add(buff);\n }",
"private void createGame(String name){\n\n }",
"@Override\n\tpublic void battle(String ip) throws RemoteException {\n\t\tSystem.out.println(\"Chiamato il metodo battle da \" +ip);\n\t}",
"private void warSeed(Player player) {\n\t\t\n\t}",
"private void makeBoss()\r\n {\r\n maxHealth = 1000;\r\n health = maxHealth;\r\n \r\n weapon = new Equip(\"Claws of Death\", Equip.WEAPON, 550);\r\n armor = new Equip(\"Inpenetrable skin\", Equip.ARMOR, 200);\r\n }",
"public GameChart placePawn(GamePlay p);",
"public void createGame();",
"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 }",
"public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}",
"public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\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 pickUpWeapon(CardWeapon weapon, CardWeapon weaponToWaste, List<CardPower> powerUp) throws InsufficientAmmoException, NoCardWeaponSpaceException {\n List <Color> tmp = new ArrayList<>(weapon.getPrice());\n List <CardPower> tmpPU = new ArrayList<>();\n if(this.weapons.size()== 3)\n if(weaponToWaste==null)\n throw new NoCardWeaponSpaceException();\n if(tmp.size() > 1)\n {\n tmp = tmp.subList(1, tmp.size());\n pay(tmp, powerUp);\n }\n if (weapons.size() == 3){\n this.position.getWeapons().add(weaponToWaste);\n this.weapons.remove(weaponToWaste);\n }\n this.weapons.add(weapon);\n weapon.setShooter(this);\n this.position.getWeapons().remove(weapon);\n if(game != null)\n game.notifyGrabWeapon(this,weapon, weaponToWaste);\n\n }",
"public Player() { \n grid = new Cell[GRID_DIMENSIONS][GRID_DIMENSIONS]; //size of grid\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n grid[i][j] = new Cell(); //creating all Cells for a new grid\n }\n }\n \n fleet = new LinkedList<Boat>(); //number of boats in fleet\n for (int i = 0; i < NUM_BOATS; i++) {\n Boat temp = new Boat(BOAT_LENGTHS[i]); \n fleet.add(temp);\n }\n shipsSunk = new LinkedList<Boat>();\n }",
"@Test\r\n public void testBuildingPlaceOverlap(){\r\n BetterHelper h = new BetterHelper();\r\n LoopManiaWorld world = h.testWorld;\r\n \r\n world.loadCard(\"ZombiePitCard\");\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 1, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 0, 1));\r\n assertTrue(world.canPlaceBuilding(\"ZombiePitCard\", 1, 0));\r\n assertFalse(world.canPlaceBuilding(\"ZombiePitCard\", 5, 5));\r\n }",
"public WarGame() {\r\n\t\tsetGame();\r\n\t}",
"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 Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}",
"@Test\n public void createUnassignedGame() throws Exception {\n final GameResource resource = TestUtils.newGameResource();\n resource.setStartsAt(\"2014-03-21T16:00:00.000\");\n\n mockMvc.perform(post(BASE_REQUEST_URL).with(superadmin)\n .header(AUTH_HEADER_NAME, createTokenForUser())\n .contentType(contentType)\n .content(TestUtils.convertObjectToJson(resource)))\n .andExpect(status().isCreated())\n .andExpect(content().contentType(contentType))\n .andExpect(jsonPath(\"$.site\", is(resource.getSite())))\n .andExpect(jsonPath(\"$.startsAt\", is(resource.getStartsAt())));\n }",
"public void lostBattle()\n\t{\n\t\t/* Heal the players Pokemon */\n\t\thealPokemon();\n\t\t/* Make the Pokemon unhappy */\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] != null)\n\t\t\t\tm_pokemon[i].setHappiness((int) (m_pokemon[i].getHappiness() * 0.8));\n\t\t/* Now warp them to the last place they were healed */\n\t\tm_x = m_healX;\n\t\tm_y = m_healY;\n\t\tif(getSession() != null && getSession().getLoggedIn())\n\t\t\tsetMap(GameServer.getServiceManager().getMovementService().getMapMatrix().getMapByGamePosition(m_healMapX, m_healMapY), null);\n\t\telse\n\t\t{\n\t\t\tm_mapX = m_healMapX;\n\t\t\tm_mapY = m_healMapY;\n\t\t}\n\t\t/* Turn back to normal sprite */\n\t\tif(isSurfing())\n\t\t\tsetSurfing(false);\n\t}",
"static void startMatch()\n {\n // suggests that we should first use the pokedex menu\n if (Player.current.pokedex.isEmpty())\n {\n System.out.println(\"\\nYou have no pokemon to enter the match with kid. Use your pokedex and get some pokemon first.\");\n pause();\n return;\n }\n\n // print stuff\n clrscr();\n System.out.println(title());\n\n // print more stuff\n System.out.println(Player.opponent.name.toUpperCase() + \" IS PREPARING HIS POKEMON FOR BATTLE!\");\n \n // initialises the opponent logic - pokemon often enter evolved states\n Pokemon two = Opponent.init();\n\n System.out.println(\"\\n\"\n + Player.opponent.name.toUpperCase() + \" HAS CHOSEN \" + two +\"\\n\"\n + Player.current.name.toUpperCase() + \"! CHOOSE A POKEMON!!\");\n\n // displays the list of pokemon available for battle\n Player.current.showNamesPokedex();\n System.out.print(\"Gimme an index (Or type anything else to return)! \");\n int option = input.hasNextInt()? input.nextInt() - 1 : Player.current.pokedex.size();\n\n // sends back to mainMenu if option is out of bounds \n if (option >= Player.current.pokedex.size() || option < 0)\n {\n mainMenu();\n }\n\n // definitions, aliases for the two combatting pokemon\n Pokemon one = Player.current.pokedex.get(option);\n Pokemon.Move oneMove1 = one.listMoves.get(0);\n Pokemon.Move oneMove2 = one.listMoves.get(1);\n\n // if there's a bit of confusion regarding why two pokemon have the same nickname ...\n if (one.nickname.equals(two.nickname))\n System.out.println(one.nickname.toUpperCase() + \" vs ... \" + two.nickname.toUpperCase() + \"?? Okey-dokey, LET'S RUMBLE!!\");\n else // ... handle it\n System.out.println(one.nickname.toUpperCase() + \" vs \" + two.nickname.toUpperCase() + \"!! LET'S RUMBLE!!\");\n\n pause();\n clrscr();\n\n // Battle start!\n Pokemon winner = new Pokemon();\n // never give up!\n // unless it's addiction to narcotics \n boolean giveUp = false;\n while (one.getHp() > 0 && two.getHp() > 0 && !giveUp)\n {\n // returns stats of the pokemon\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n\n // 30% chance dictates whether the pokemon recover in a battle, but naturally so\n if (random.nextInt(101) + 1 < 30 && one.getHp() < one.maxHp)\n ++one.hp;\n\n if (random.nextInt(101) + 1 < 30 && two.getHp() < two.maxHp)\n ++two.hp;\n\n // the in-game selection menu\n System.out.print(\"\\n\"\n + Player.current.name.toUpperCase() + \"! WHAT WILL YOU HAVE \" + one.getFullName().toUpperCase() + \" DO?\\n\"\n + \"(a) Attack\\n\"\n + (oneMove1.isUsable? \"(1) Use \" + oneMove1.name.toUpperCase() + \"\\n\" : \"\")\n + (oneMove2.isUsable? \"(2) Use \" + oneMove2.name.toUpperCase() + \"\\n\" : \"\")\n + \"(f) Flee\\n\"\n + \"Enter the index from the brackets (E.g. (a) -> 'A' key): \");\n\n char choice = input.hasNext(\"[aAfF12]\")? input.next().charAt(0) : 'a';\n\n // a switch to handle the options supplied\n switch (choice)\n {\n case 'a': case 'A': default:\n one.attack(two);\n break;\n\n case 'f': case 'F':\n winner = two;\n giveUp = true;\n break;\n\n case '1':\n one.attack(two, oneMove1.name);\n break;\n\n case '2':\n one.attack(two, oneMove2.name);\n break;\n }\n\n // Opponent's turn, always second\n pause();\n clrscr();\n\n System.out.println(\"\\nBATTLE STATS\\n\" + one + \"\\n\" + two);\n Opponent.fight(one);\n pause();\n clrscr();\n }\n\n // find out the winner from combat or withdrawal\n winner = giveUp? two : one.getHp() > 0? one : two;\n System.out.println(\"\\nWINNER: \" + winner.getFullName() + \" of \" + winner.owner.name + \"!\\n\");\n\n if (winner == one)\n {\n // register the victory\n Player.current.gems += 100;\n System.out.println(\"You got 100 gems as a reward!\\n\");\n ++Player.current.wins;\n }\n else\n {\n // register the defeat\n ++Player.current.losses;\n System.out.println(\"Tough luck. Do not be worried! There's always a next time!\\n\");\n }\n\n pause();\n }",
"public void Beginattack(HW10Trainer[] people, int numTrainer,Scanner scan)\n{\nString name1, name2;\nname1=scan.next();//reads the first part and sets it as a string \nname2=scan.next();//reads the second part and sets it as a string \nscan.nextLine();\nHW10Trainer a = new HW10Trainer();//pre set\nHW10Trainer b= new HW10Trainer(); \n\nfor (int i =0; i<numTrainer; i++)///matches the trainer with there name\n{\n\tif(name1.equals(people[i].getName()))//determines which trainer in the array goes with this name\n\t{\n\t\ta=people[i];\n\t}\n\tif(name2.equals(people[i].getName()))\n\t{\n\t\tb=people[i];\n\t}\n}\nint max1,max2;\nmax1=a.getNumMonsters();//gets the total amount of pokemen for that trainer\nmax2=b.getNumMonsters();\nint curr1,curr2; //acts as the index place value for the array \ncurr1=0;//starts the array at poistion 0\ncurr2=0;\nHW10Monster side1,side2;//sets the side for the battle \nside1= a.getMonster(curr1);//sets side one for all of the first trainers monsters\nside2=b.getMonster(curr2);//side two = all seconds trainers monsters\nSystem.out.println(a.getName() + \" is fighting \" + b.getName());\nSystem.out.println(\"Starting battle is \" + side1.name + \" versus \" + side2.name);\nwhile(curr1 < max1 && curr2<=max2)//if curr1 is less then max and curr2 is less then max2 then run\n{\n\t\n\tint result = fight(side1,side2,a,b);//sends the fight method the pokemon information and the Trainers information\nif(result==1)\n{\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\tif(curr2<max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n}\n else if(result == 2)\n{\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n}\n else if(result == 3)\n{\n\tSystem.out.println(\"*Draw*\");\n\tSystem.out.println(a.getName() +\"'s \" + side1.name + \" lost\");\n\tcurr1++;//if side 1 is losing/ below 1 the call next monster\n\tif(curr1<max1)\n\t\tside1=a.getMonster(curr1);\n\t\n\tSystem.out.println(a.getName() + \" is bringing out \" + side1.name);\n\tSystem.out.println(b.getName() +\"'s \" + side2.name + \" lost\");\n\tcurr2++;//if side 2 is losing / below 1 then call next monster\n\t\n\tif(curr2 < max2)\n\t\tside2=b.getMonster(curr2);\n\tSystem.out.println(b.getName() + \" is bringing out \" + side2.name);\n\tSystem.out.println(\"* End Draw *\");\n}\n\n\n\t\n}\n\tif( curr1<max1 && curr2>max2)//if the first trainer still has pokemon and the second does not\n\t{\n\t\tSystem.out.println(a.getName() + \" won the match\");\n\t}\n\telse if (curr2<max2 && curr1>max1)//if the second trainer still has pokemon and the first does not\n\t{\n\t\t\n\t\tSystem.out.println(b.getName() + \" won the match\");\n\t}\n\telse if(curr2<max2 && curr1<max1)//if both sides dont have any pokemon left\n\t\tSystem.out.println(\"Battle is a draw\");\n\n}",
"public void attack(Player opponent) {\n\t\t\n\t\tboolean ok = false;\n\t\tString coord = \"\";\n\t\t\n\n\t\twhile(!ok) {\n\t\t\tcoord = CoordCheck.getRandomCoordinate();\n\t\t\tif (!this.shots.contains(coord)) {\n\t\t\t\tok = true;\n\t\t\t\tthis.shots.add(coord);\n\t\t\t}\n\n\t\t}\n\t\ttry {\n\t\t\tthis.gameBoard.shot(opponent.getGameBoard(), coord);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\r\n public void testKillCharacterAutoBattle() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Spawn 10 vampires to ensure character defeat\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n for (int count = 10; count > 0; count --) {\r\n Vampire newVampire = new Vampire(null);\r\n fighters.add(newVampire);\r\n }\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // Character should lose and have depleted health\r\n assertFalse(battleResult);\r\n assertTrue(character.getCurrHP() == 0);\r\n }",
"public static void main(String[] args) {\n\t\t\n\t\tImageIcon dragon = new ImageIcon(\"src/section4/dragonPicture.jpg\");\t\t\n\t\t\n\t\tJOptionPane.showMessageDialog(null, \"Defeat the dragon to take its treasure!\", \"Dragon Fighter\", 0, dragon);\n\t\t// 2. Create a variable called \"playerHealth\" to store your health (set it equal to 100)\n\tint playerHealth = 100;\n\t\t// 3. Create a variable called \"dragonHealth\" to store the dragon's health (set it equal to 100)\n\t\tint dragonHealth = 100;\n\t\t// 4. Create a variable to hold the damage the player's attack does each round\n\t\t\n\t\t// 5. Create a variable to hold the damage the dragon's attack does each round\n\t\tint dragonAttack = 0;\n\t\t\n\t\t// 6. Delete the slashes at the beginning of the next line. \n\t\t\n\t\twhile(playerHealth>0 && dragonHealth>0) { //this line of code keeps the battle going until someone's health reaches 0 \n\t\t\n\t\t// 7. Add a closing mustache at the very bottom of this program (since we just added an opening mustache on the previous step).\n\t\t\n\t\t// 8. Ask the player in a pop-up if they want to attack the dragon with a yell or a kick\n\t\tString a = JOptionPane.showInputDialog(\" Do you want to yell or kick the dragon\");\n\t\t// 9. If they typed in \"yell\":\n\t\tif (a.equalsIgnoreCase(\"Yell\")) {\n\t\t\n\t\t\tRandom ran = new Random();\n\t\t\t dragonAttack = ran.nextInt(11);\n\t\n\t\t\tdragonHealth = dragonHealth - dragonAttack;\n\t\t}\n\t\t// 10. If they typed in \"kick\":\n\t\tif (a.equalsIgnoreCase(\"Kick\")) {\n\t\t\t//-- Find a random number between 0 and 25 and store it in dragonDamage\n\t\t\tRandom dan = new Random();\n\t\t\tdragonAttack = dan.nextInt(26);\n\t\t\t//-- Subtract that number from the dragon's health variable\n\t\t\tdragonHealth = dragonHealth - dragonAttack;\n\t\t}\n\t\t\n\t\t// 11. Find a random number between 0 and 35 and store it in playerDamage\n\t\tRandom play = new Random();\n\t\tint oof = play.nextInt(36);\n\t\t// 12. Subtract this number from the player's health\n\t\t\n\t\tplayerHealth = playerHealth - oof;\n\t\t\n\t\t// 13. If the user's health is less than or equal to 0\n\t\t\n\t\t\t//-- Tell the user that they lost\n\t\t\n\t\tif (playerHealth <= 0) {\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"You lost!\");\n\t\t\t\n\t\t}\n\t\t\t\n\t\t\n\t\t// 14. Else if the dragon's health is less than or equal to 0\n\t\t\n\t\t\t//-- Tell the user that the dragon is dead and they took a ton of gold!\n\t\t\n\t\t\n\t\tif (dragonHealth <= 0) {\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog (null, \"You beat the dragon and won a million dollars!\");\n\t\t\t\n\t\t}\n\n\t\t\t\n\t // 15. Else\n\t\telse {\n\t\t\t\n\t\t\tJOptionPane.showMessageDialog(null, \"You have lost \" + oof + \" life and you dealt \" + dragonAttack + \" damage to the dragon.\\n You have \" + playerHealth + \" health left.\\n The dragon has \" + dragonHealth + \" life left\");\n\t\t}\n\t\t\t\n\t\t\t//-- Pop up a message that tells the their current health and the dragon's currently health (Bonus: Also display the amount of health that was lost for each player this round)\n\t\t}\t\n\t\t}",
"@Override\n \t\t\t\tpublic void doCreateProjectedWater() {\n \n \t\t\t\t}",
"public PokemonEntity create(PokemonEntity pokemon )\n {\n em.persist(pokemon);\n return pokemon;\n }",
"public abstract String wildEight(DiscardPile discardPile, \n\t Stack<Card> drawPile, \n\t\t\t\t\t\t\t\t\t\t \tArrayList<Player> players);",
"public void testNewBattleShooter() {\n\t\tGame game = new Game(5, \"\");\n\t\t\n\t\t//Method being tested\n\t\tgame.newBattleShooter();\n\t\t\n\t\t//Check outcome; \n\t\tEnemyShip actual = game.getAllEnemys().iterator().next();\n\t\tBattleShooter expected = new BattleShooter(game.getTheGrid());\n\t\t\n\t\tassertTrue(actual.getClass() == expected.getClass());\n\t}",
"public Builder setReservePokemon(\n int index, POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (reservePokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReservePokemonIsMutable();\n reservePokemon_.set(index, value);\n onChanged();\n } else {\n reservePokemonBuilder_.setMessage(index, value);\n }\n return this;\n }",
"private void combatPhase() {\n \t\n \tpause();\n \tDice.setFinalValMinusOne();\n\n \t// Go through each battle ground a resolve each conflict\n \tfor (Coord c : battleGrounds) {\n \t\t\n \tClickObserver.getInstance().setTerrainFlag(\"\");\n \t\n \tSystem.out.println(\"Entering battleGround\");\n \t\tfinal Terrain battleGround = Board.getTerrainWithCoord(c);\n \t\t\n \t\t// find the owner of terrain for post combat\n \tPlayer owner = battleGround.getOwner();\n \t\n \t\t// simulate a click on the first battleGround, cover all other terrains\n \t\tClickObserver.getInstance().setClickedTerrain(battleGround);\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \t\tClickObserver.getInstance().whenTerrainClicked();\n \t\tBoard.applyCovers();\n \t\tClickObserver.getInstance().getClickedTerrain().uncover();\n \tClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n }\n });\n \t\t\n \t\t// Get the fort\n \t Fort battleFort = battleGround.getFort(); \n \t\t\n \t\t// List of players to battle in the terrain\n \t\tArrayList<Player> combatants = new ArrayList<Player>();\n \t\t\n \t\t// List of pieces that can attack (including forts, city/village)\n \t\tHashMap<String, ArrayList<Piece>> attackingPieces = new HashMap<String, ArrayList<Piece>>();\n \t\t\n \t\tSystem.out.println(battleGround.getContents().keySet());\n \t\t\n \t\tIterator<String> keySetIterator = battleGround.getContents().keySet().iterator();\n\t \twhile(keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n \t\t\tcombatants.add(battleGround.getContents().get(key).getOwner());\n \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n \t\t\t\n\t \t}\n\t \t\n\t \t\n\t \t\n\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n\t\t\tif (!combatants.contains(battleGround.getOwner()) && battleFort != null) {\n\t\t\t\tcombatants.add(battleGround.getOwner());\n\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n\t\t\t}\n\n \t\t// add forts and city/village to attackingPieces\n \t\tif (battleFort != null) {\n \t\t\tattackingPieces.get(battleGround.getOwner().getName()).add(battleFort);\n \t\t}\n \t\t\n \t\tkeySetIterator = attackingPieces.keySet().iterator();\n\t \twhile (keySetIterator.hasNext()) {\n\t \t\tString key = keySetIterator.next();\n\t \t\t\n\t \t\tfor (Piece p : attackingPieces.get(key)) {\n\t \t\t\tif (p.getName().equals(\"Baron Munchhausen\") || p.getName().equals(\"Grand Duke\")) {\n\t \t\t\t\tif (p.getOwner() != battleGround.getOwner())\n\t \t\t\t\t\t((Performable)p).specialAbility();\n\t \t\t\t}\n\t \t\t\t\t\n\t \t\t}\n\t \t}\n \t\t// TODO implement city/village\n// \t\tif (City and village stuff here)\n \t\tSystem.out.println(combatants);\n \t\t\n \t\tboolean exploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t// Fight until all attackers are dead, or until the attacker becomes the owner of the hex\n \t\twhile (combatants.size() > 1 || exploring) {\n \t\t\t\n /////////////Exploration\n \t// Check if this is an exploration battle:\n \t\t// Must fight other players first\n \t\t\tboolean fightingWildThings = false;\n \tif (exploring) {\n\n \t\t\t\t// Set the battleGround explored\n \t\t\t\tbattleGround.setExplored(true);\n \t\n \t\tString exploringPlayer = null;\n \t\tIterator<String> keySetIter = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIter.hasNext()) {\n \t \t\tString key = keySetIter.next();\n \t \t\texploringPlayer = key;\n \t \t}\n \t\tplayer = battleGround.getContents(exploringPlayer).getOwner();\n \t\tplayer.flipAllUp();\n \t \t\n \t\t// Get user to roll die to see if explored right away\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tDiceGUI.getInstance().uncover();\n \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t \t\t\t+ \", roll the die. You need a 1 or a 6 to explore this terrain without a fight!\");\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\tint luckyExplore = -1;\n \t\t\t\twhile (luckyExplore == -1) {\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\tluckyExplore = Dice.getFinalVal();\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// If success TODO FIX this \n \t\t\t\tif (luckyExplore == 1 || luckyExplore == 6) {\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Congrats!\" + player.getName() \n \t\t \t\t\t+ \"!, You get the terrain!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\texploring = false;\n \t\t\t\t\tbreak;\n \t\t\t\t\t\n \t\t\t\t} else { // Else failure. Must fight or bribe\n \t\t\t\t\t\n \t\t\t\t\tfightingWildThings = true;\n \t\t\t\t\t\n \t\t\t\t\t// Cover die. Display msg\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \tDiceGUI.getInstance().cover();\n \t\t \tbattleGround.coverPieces();\n \t\t \tGUI.getHelpText().setText(\"Attack phase: Boooo!\" + player.getName() \n \t\t \t\t\t+ \"!, You have to bribe, or fight for your right to explore!\");\n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// add luckyExplore amount of pieces to terrain under wildThing player\n \t\t\t\t\tfinal ArrayList<Piece> wildPieces = TheCup.getInstance().draw(luckyExplore);\n \t\t\t\t\t\t\n \t\t\t\t\t// Update the infopanel with played pieces. Active done button\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t @Override\n \t\t public void run() {\n \t\t \twildThings.playWildPieces(wildPieces, battleGround);\n \t\t GUI.getDoneButton().setDisable(false);\n \t\t battleGround.coverPieces();\n \t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t \n \t\t }\n \t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t//////Bribing here\n \t\t\t\t\tpause();\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectCreatureToBribe\");\n \t\t\t\t\t\n \t\t\t\t\t// Uncover the pieces that the player can afford to bribe\n \t\t\t\t\t// canPay is false if there are no Pieces that the user can afford to bribe\n \t\t\t\t\tboolean canPay = false;\n \t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n \t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n \t\t\t\t\t\t\tcanPay = true;\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tp.uncover();\n \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\ttry { Thread.sleep(50); } catch( Exception e ){ return; }\n \t\t\t\t\t\n \t\t\t\t\t// Continue looping until there are no more pieces user can afford to bribe, or user hits done button\n \t\t\t\t\twhile (canPay && isPaused) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t\t @Override\n\t \t\t public void run() {\n\t \t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t\t \t\t\t+ \", Click on creatures you would like to bribe\");\n\t \t\t }\n \t\t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t\t// wait for user to hit done, or select a piece\n \t\t\t\t\t\tpieceClicked = null;\n \t\t\t\t\t\twhile(pieceClicked == null && isPaused) {\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (pieceClicked != null) {\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// spend gold for bribing. Remove clicked creature\n \t\t\t\t\t\t\tplayer.spendGold(((Combatable)pieceClicked).getCombatValue());\n \t\t\t\t\t\t\t((Combatable)pieceClicked).inflict();\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// cover pieces that are too expensive\n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t\t\t\t @Override\n \t\t\t\t public void run() {\n \t\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n \t\t\t \t\t\t+ \" bribed \" + pieceClicked.getName());\n \t\t\t\t \tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t \tif (battleGround.getContents(wildThings.getName()) != null) {\n\t \t\t\t\t for (Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t \tif (((Combatable)p).getCombatValue() > player.getGold())\n\t \t\t\t\t \t\tp.cover();\n\t \t\t\t\t }\n \t\t\t\t \t}\n \t\t\t\t }\n \t\t\t\t\t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t\t\n \t\t\t\t\t\t\t// Check if there are any pieces user can afford to bribe and set canPay to true if so\n \t\t\t\t\t\t\tcanPay = false;\n \t\t\t\t\t\t\tif (battleGround.getContents(wildThings.getName()) == null || battleGround.getContents(wildThings.getName()).getStack().size() == 1)\n \t\t\t\t\t\t\t\tbreak;\n \t\t\t\t\t\t\telse {\n\t \t\t\t\t\t\t\tfor (final Piece p : battleGround.getContents(wildThings.getName()).getStack()) {\n\t \t\t\t\t\t\t\t\tif (((Combatable)p).getCombatValue() <= player.getGold()) {\n\t \t\t\t\t\t\t\t\t\tcanPay = true;\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\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t\t \t\t\t+ \" done bribing\");\n\t\t\t }\n \t\t\t\t\t});\n \t\t\t\t\tSystem.out.println(\"Made it past bribing\");\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\t\n \t\t\t\t\t// Done bribing, on to fighting\n \t\t\t\t\t\n \t\t\t\t\t// find another player to control wildThings and move on to regular combat\n \t\t\t\t\t// to be used later \n \t\t\t\t\tPlayer explorer = player;\n \t\t\t\t\tPlayer wildThingsController = null;\n \t\t\t\t\tfor (Player p : playerList) {\n \t\t\t\t\t\tif (!p.getName().equals(player.getName()))\n \t\t\t\t\t\t\twildThingsController = p;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// If wild things still has pieces left:\n \t\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName())) {\n\t \t\t\t\t\tcombatants.add(battleGround.getContents().get(wildThings.getName()).getOwner());\n\t \t \t\t\tattackingPieces.put(wildThings.getName(), (ArrayList<Piece>) battleGround.getContents().get(wildThings.getName()).getStack().clone()); \n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// cover pieces again\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \tbattleGround.coverPieces();\n \t }\n \t\t\t\t});\n \t\t\t\t\n \t\t\t\tplayer.flipAllDown();\n \t} // end if (exploring)\n \t\t\t\n \t\t\tSystem.out.println(\"combatants.size() > 1 : \" + combatants.size());\n \t\t\tSystem.out.println(combatants);\n \t\t\t\n \t\t\t// This hashMap keeps track of the player to attack for each player\n \t\t\tHashMap<String, Player> toAttacks = new HashMap<String, Player>();\n\n\t\t\t\t// each player selects which other player to attack in case of more than two combatants\n \t\t\tif (combatants.size() > 2) {\n \t\t\t\t\n \t\t\t\tfor (final Player p : combatants) {\n \t\t\t\t\tif (!p.isWildThing()) {\n\t \t \t\tpause();\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"Attacking: SelectPlayerToAttack\");\n\t \t \t\tplayer = p;\n\t\t \tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tPlayerBoard.getInstance().applyCovers();\n\t\t \t \tbattleGround.coverPieces();\n\t\t \t \t GUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", select which player to attack\");\n\t\t\t \t \t}\n\t\t \t });\n\t\t \tfor (final Player pl : combatants) {\n\t\t \t\tif (!pl.getName().equals(player.getName())) {\n\t\t \t\t\tPlatform.runLater(new Runnable() {\n\t\t \t \t @Override\n\t\t \t \t public void run() {\n\t\t \t \t \tPlayerBoard.getInstance().uncover(pl);\n\t\t \t \t }\n\t\t \t\t\t});\n\t\t \t\t}\n\t\t \t}\n\t\t \twhile (isPaused) {\n\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t \t }\n\t\t \t\n\t\t \t// ClickObserver sets playerClicked, then unpauses. This stores what player is attacking what player\n\t\t \ttoAttacks.put(p.getName(), playerClicked);\n\t \t \t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\t \t\n\t \t \t} \n \t\t\t\t}\n \t\t\t\tcombatants.remove(wildThings);\n \t\t\t\tPlayerBoard.getInstance().removeCovers();\n \t\t\t\t\n \t } else { // Only two players fighting\n \t \t\n \t \tfor (Player p1 : combatants) {\n \t \t\tfor (Player p2 : combatants) {\n \t \t\t\tif (!p1.getName().equals(p2.getName())) {\n \t \t \ttoAttacks.put(p1.getName(), p2);\n \t \t\t\t}\n \t \t\t}\n \t \t}\n \t }\n \t\t\t\n ///////////////////Call out bluffs here:\n \t\t\tbattleGround.flipPiecesUp();\n \t\t\tfor (final Player p : combatants) {\n \t\t\t\t\n \t\t\t\t// Make sure not wildThings\n \t\t\t\tif (!p.isWildThing()) {\n \t\t\t\t\t\n \t\t\t\t\tArrayList <Piece> callOuts = new ArrayList<Piece>();\n \t\t\t\t\t\n \t\t\t\t\tfor (final Piece ap : attackingPieces.get(p.getName())) {\n \t\t\t\t\t\t\n \t\t\t\t\t\t// If not supported the gtfo\n \t\t\t\t\t\tif (!ap.isSupported()) {\n\n \t\t\t\t\t\t\tcallOuts.add(ap);\n \t\t\t\t\t\t\t((Combatable)ap).inflict();\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t \tInfoPanel.showTileInfo(battleGround);\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: \" + p.getName()\n\t\t\t \t + \" lost their \" + ap.getName() + \" in a called bluff!\");\n\t \t \t }\n\t \t\t\t});\n \t\t\t\t\t\t\ttry { Thread.sleep(250); } catch( Exception e ){ return; } \n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t\tfor (Piece co : callOuts) {\n \t\t\t\t\t\tattackingPieces.get(p.getName()).remove(co);\n \t\t\t\t\t}\n\t\t\t\t\t\tif (attackingPieces.get(p.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(p.getName());\n \t\t\t\t}\n \t\t\t}\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tPlayer baby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\t// Set up this HashMap that will store successful attacking pieces\n \t\t\tHashMap<String, ArrayList<Piece>> successAttacks = new HashMap<String, ArrayList<Piece>>();\n \t\t\t// Set up this HashMap that will store piece marked to get damage inflicted\n\t\t\t\tHashMap<String, ArrayList<Piece>> toInflict = new HashMap<String, ArrayList<Piece>>();\n \t\t\tfor (Player p : combatants) {\n \t\t\t\t\n \t\t\t\tsuccessAttacks.put(p.getName(), new ArrayList<Piece>());\n \t\t\t\ttoInflict.put(p.getName(), new ArrayList<Piece>());\n \t\t\t}\n \t\t\t\n \t\t\t// Array List of pieces that need to be used during a particular phase\n\t\t\t\tfinal ArrayList<Piece> phaseThings = new ArrayList<Piece>();\n\t\t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Magic!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n/////////////////////// Magic phase\n \t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its magic. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isMagic() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover magic pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mag : phaseThings) \n\t \t\t\t\t\tmag.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n\n\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\tSystem.out.println(\"attackingPieces.size(): \" + attackingPieces.size());\n\t\t\t\t\tSystem.out.println(\"attackingPieces.keySet(): \" + attackingPieces.keySet());\n\t\t\t\t\tIterator<String> keySetIte = battleGround.getContents().keySet().iterator();\n \t \twhile(keySetIte.hasNext()) {\n \t \t\tString key = keySetIte.next();\n\n \t\t\t\t\tSystem.out.println(\"key: \" + key);\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key).size():\\n\" + attackingPieces.get(key).size());\n \t\t\t\t\tSystem.out.println(\"attackingPieces.get(key):\\n\" + attackingPieces.get(key));\n \t \t}\n\t\t\t\t\tSystem.out.println(\"----------------------------------------------------------------\");\n\t\t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more magic pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a magic piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a magic piece to attack with\");\n\t \t }\n\t \t });\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() \n\t \t \t\t\t+ \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\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// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName()); // 'defender'\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ti++;\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Ranged!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n//////////////////// Ranged phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its ranged. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && ((Combatable)p).isRanged() && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover ranged pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece ran : phaseThings) \n\t \t\t\t\t\tran.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more ranged pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a ranged piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a ranged piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tpieceClicked.highLight();\n\t \t \tDiceGUI.getInstance().uncover();\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\n\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n \t\t\t\t\tint attackStrength = -1;\n \t\t\t\t\twhile (attackStrength == -1) {\n \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n \t\t\t\t\t}\n\t\t\t\t\t\t\n \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n \t\t\t\t\t\t\n \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n \t \t @Override\n \t \t public void run() {\n \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n \t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n \t \t }\n \t\t\t\t\t});\n \t\t\t\t\t\t\n \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t \t\t\t\t\t\tpieceClicked.cover();\n \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\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// Pause to a second for easy game play, remove the clicked piece from phaseThings\n \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Melee!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t\n\n///////////////////////////// Melee phase\n\t\t\t\tfor (final Player pl : combatants) {\n \t\t\t\t\n \t\t\t\tplayer = pl;\n \t\t\t\t// Cover all pieces\n \t\t\t\tPlatform.runLater(new Runnable() {\n \t @Override\n \t public void run() {\n \t \t\tbattleGround.coverPieces();\n \t }\n \t });\n \t\t\t\t\n \t\t\t\t// For each piece, if its melee. Add it to the phaseThings array\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) {\n \t\t\t\t\tif (p instanceof Combatable && !(((Combatable)p).isRanged() || ((Combatable)p).isMagic()) && !(p instanceof Fort && ((Fort)p).getCombatValue() == 0)) \n \t\t\t\t\t\tphaseThings.add(p);\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// uncover melee pieces for clicking\n \t\t\t\tif (phaseThings.size() > 0) {\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \t\t\t\tfor (Piece mel : phaseThings) \n\t \t\t\t\t\tmel.uncover();\n\t \t }\n\t \t });\n \t\t\t\t}\n \t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n \t\t\t\t\n \t\t\t\t// Have user select a piece to attack with until there are no more melee pieces\n \t\t\t\twhile (phaseThings.size() > 0) {\n \t\t\t\t\t\n \t\t\t\t\t// Display message prompting user to select a melee piece\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", select a melee piece to attack with\");\n\t \t }\n\t \t });\n\n \t\t\t\t\t// Wait for user to select piece\n \t\t\t\tpieceClicked = null;\n \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToAttackWith\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t \t\t\t\t\n\t \t\t\t\t// Is it a charging piece?\n\t \t\t\t\tint charger;\n\t \t\t\t\tif (((Combatable)pieceClicked).isCharging()) {\n\t \t\t\t\t\tcharger = 2;\n\t \t\t\t\t} else\n\t \t\t\t\t\tcharger = 1;\n\t \t\t\t\t\n\t \t\t\t\t// do twice if piece is a charger\n\t \t\t\t\tfor (int i = 0; i < charger; i++) {\n\t \t\t\t\t\t\n\t\t \t\t\t\t// hightlight piece that was selected, uncover the die to use, display message about rolling die\n\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t \t @Override\n\t\t \t public void run() {\n\t\t \t \tpieceClicked.highLight();\n\t\t \t \tDiceGUI.getInstance().uncover();\n\t\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName()\n\t\t \t + \", roll the die. You need a \" + ((Combatable)pieceClicked).getCombatValue() + \" or lower\");\n\t\t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\n\t\t \t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t \t\t\t\t\tint attackStrength = -1;\n\t \t\t\t\t\twhile (attackStrength == -1) {\n\t \t\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\t\t\tattackStrength = Dice.getFinalVal();\n\t \t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t \t\t\t\t\t// If the roll was successful. Add to successfulThings Array, and change it image. prompt Failed attack\n\t \t\t\t\t\tif (attackStrength <= ((Combatable)pieceClicked).getCombatValue()) {\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t\tsuccessAttacks.get(player.getName()).add(pieceClicked);\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t \t @Override\n\t \t \t public void run() {\n\t \t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(true);\n\t \t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t \t \t \tGUI.getHelpText().setText(\"Attack phase: Successful Attack!\");\n\t \t \t }\n\t \t\t\t\t\t});\n\t \t\t\t\t\t\t\n\t \t\t\t\t\t} else { // else failed attack, update image, prompt Failed attack\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t\t\t\t\t\t((Combatable)pieceClicked).setAttackResult(false);\n\t\t\t \t\t\t\t\t\tpieceClicked.cover();\n\t \t \t\t\t\t\t\tpieceClicked.unhighLight();\n\t\t\t \t \tGUI.getHelpText().setText(\"Attack phase: Failed Attack!\");\n\t\t\t \t }\n\t\t \t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// If piece is charging, and it is its first attack, remove the cover again\n\t \t\t\t\t\tif (((Combatable)pieceClicked).isCharging() && i == 0) {\n\t \t\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t \t \tpieceClicked.uncover();\n\t\t\t \t }\n\t \t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t\t\n\t \t\t\t\t\t// Pause to a second for easy game play, remove the clicked piece from phaseThings\n\t \t\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t \t\t\t\t}\n\n \t\t\t\t\tphaseThings.remove(pieceClicked);\n \t\t\t\t}\n \t\t\t}\n\n\t\t\t\t// For each piece that had success, player who is being attacked must choose a piece\n \t\t\t// Gets tricky here. Will be tough for Networking :(\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Active player is set to the player who 'pl' is attack based on toAttack HashMap\n \t\t\t\tplayer = toAttacks.get(pl.getName());\n \t\t\t\tfinal String plName = pl.getName();\n \t\t\t\t\n \t\t\t\t// For each piece of pl's that has a success (in successAttacks)\n \t\t\t\tint i = 0;\n \t\t\t\tfor (final Piece p : successAttacks.get(plName)) {\n \t\t\t\t\t\n \t\t\t\t\t// If there are more successful attacks then pieces to attack, break after using enough attacks\n \t\t\t\t\tif (i >= attackingPieces.get(player.getName()).size()) {\n \t\t\t\t\t\tbreak;\n \t\t\t\t\t}\n \t\t\t\t\t\n \t\t\t\t\t// Display message, cover other players pieces, uncover active players pieces\n\t \t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tGUI.getHelpText().setText(\"Attack phase: \" + player.getName() + \", Select a Piece to take a hit from \" + plName + \"'s \" + p.getName());\n\t \t \tbattleGround.coverPieces();\n\t \t \tbattleGround.uncoverPieces(player.getName());\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\t\n\t \t\t\t\t// Cover pieces already choosen to be inflicted. Wait to make sure runLater covers pieces already selected\n\t \t\t\t\tfor (final Piece pi : toInflict.get(player.getName())) {\n\t \t\t\t\t\tif (!((pi instanceof Fort) && ((Fort)pi).getCombatValue() > 0)) {\n\t\t \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t \t @Override\n\t\t\t \t public void run() {\n\t\t\t\t \t\t\t\t\tpi.cover();\n\t\t\t \t }\n\t\t\t\t\t\t\t\t});\n\t \t\t\t\t\t}\n\t \t\t\t\t}//TODO here is where a pause might be needed\n\t \t\t\t\t\n\t \t\t\t\t// Wait for user to select piece\n \t\t\t\t\tpieceClicked = null;\n\t \t\t\t\tClickObserver.getInstance().setCreatureFlag(\"Combat: SelectPieceToGetHit\");\n\t \t\t\t\tClickObserver.getInstance().setFortFlag(\"Combat: SelectPieceToGetHit\");\n \t\t\t\t\twhile (pieceClicked == null) { try { Thread.sleep(100); } catch( Exception e ){ return; } }\n \t\t\t\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n \t\t\t\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\t \t\t\t\n \t\t\t\t\t// Add to arrayList in HashMap of player to mark for future inflict. Cover pieces\n \t\t\t\t\ttoInflict.get(player.getName()).add(pieceClicked);\n \t\t\t\t\tPlatform.runLater(new Runnable() {\n\t \t @Override\n\t \t public void run() {\n\t \t \tbattleGround.coverPieces();\n\t \t }\n\t\t\t\t\t\t});\n \t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t \t\t\t\ti++;\n \t\t\t\t}\n \t\t\t\t// Clear successful attacks for next phase\n \t\t\t\tsuccessAttacks.get(pl.getName()).clear();\n \t\t\t}\n \t\t\t\n \t\t\t// Remove little success and failure images, inflict if necessary\n \t\t\tfor (Player pl : combatants) {\n \t\t\t\t\n \t\t\t\t// Change piece image of success or failure to not visible\n \t\t\t\tfor (Piece p : attackingPieces.get(pl.getName())) \n \t\t\t\t\t((Combatable)p).resetAttack();\n \t\t\t\t\n\t\t\t\t\t// inflict return true if the piece is dead, and removes it from attackingPieces if so\n \t\t\t\t// Inflict is also responsible for removing from the CreatureStack\n \t\t\t\tfor (Piece p : toInflict.get(pl.getName())) {\n\t\t\t\t\t\tif (((Combatable)p).inflict()) \n\t\t\t\t\t\t\tattackingPieces.get(pl.getName()).remove(p);\n\t\t\t\t\t\tif (attackingPieces.get(pl.getName()).size() == 0)\n\t\t\t\t\t\t\tattackingPieces.remove(pl.getName());\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\t// Clear toInflict for next phase\n \t\t\t\ttoInflict.get(pl.getName()).clear();\n \t\t\t}\n\n\t\t\t\t// Update the InfoPanel gui for changed/removed pieces\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n \t\t\t\t\tInfoPanel.showTileInfo(battleGround);\n \t\t\t\t\tbattleGround.coverPieces();\n\t }\n\t\t\t\t});\n \t\t\t\n \t\t\t// Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n\t\t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\t\t\t\t// Notify next phase, wait for a second\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \t\tbattleGround.coverPieces();\n\t \tGUI.getHelpText().setText(\"Attack phase: Next phase: Retreat!\");\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Pause for 2 seconds between phases\n\t\t\t\ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n \t\t\t\n \t\t\t\n//////////////////////// Retreat phase\n\t\t\t\t// Can only retreat to a Terrain that has been explored and has no ememies on it\n\t\t\t\t\n\t\t\t\t// Display message, activate done button\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Attack phase: Retreat some of your armies?\");\n\t\t GUI.getDoneButton().setDisable(false);\n\t }\n\t }); \t\t\t\t\n\t\t\t\t\n\t\t\t\t// For each combatant, ask if they would like to retreat\n\t\t for (Player pl : combatants) {\n\t\t \t\n\t\t \t// Make sure wildThings aren't trying to get away\n\t\t \tif (!pl.isWildThing()) {\n\t\t\t \tplayer = pl;\n\t \t InfoPanel.uncover(player.getName());\n\t\t\t\t ClickObserver.getInstance().setActivePlayer(player);\n\t\t\t\t ClickObserver.getInstance().setCreatureFlag(\"Combat: SelectRetreaters\");\n\t\t\t\t \n\t\t\t\t // Pause and wait for player to hit done button\n\t\t\t\t pause();\n\t\t\t Platform.runLater(new Runnable() {\n\t\t\t @Override\n\t\t\t public void run() {\n\t\t\t \tbattleGround.coverPieces();\n\t\t\t \tbattleGround.uncoverPieces(player.getName());\n\t\t\t \tbattleGround.coverFort();\n\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \", You can retreat your armies\");\n\t\t\t }\n\t\t\t });\n\t\t\t\t while (isPaused && battleGround.getContents(player.getName()) != null) {\n\t\t\t \ttry { Thread.sleep(100); } catch( Exception e ){ return; } \n\t\t\t\t }\t \n\t\t\t\t ClickObserver.getInstance().setTerrainFlag(\"Disabled\");\n\t\t\t\t \n\t\t\t\t // TODO, maybe an if block here asking user if they would like to attack \n\t\t\t\t System.out.println(attackingPieces + \"---BEFORE CLEARING\");\n\t\t\t\t // Re-populate attackingPieces to check for changes\n\t\t\t\t attackingPieces.clear();\n\t\t\t\t Iterator<String> keySetIterator2 = battleGround.getContents().keySet().iterator();\n\t\t\t\t \twhile(keySetIterator2.hasNext()) {\n\t\t\t\t \t\tString key = keySetIterator2.next();\n System.out.println(key + \"=====key\");\n\t\t\t \t\t\tattackingPieces.put(battleGround.getContents().get(key).getOwner().getName(), (ArrayList<Piece>) battleGround.getContents().get(key).getStack().clone()); \n\t\t\t\t \t}\n // System.out.println(attackingPieces);\n\t\t\t\t \t// if the owner of the terrain has no pieces, just a fort or city/village\n System.out.println(\"===battleground\"+battleGround);\n System.out.println(\"===attackingPieces\"+attackingPieces);\n System.out.println(combatants.contains(battleGround.getOwner()) ? \"TRUE\" : \"FALSE\");\n\t\t\t\t\t\tif (combatants.contains(battleGround.getOwner()) && battleFort != null) {\n System.out.println(battleGround + \"===battleground\");\n\t\t\t\t\t\t\tattackingPieces.put(battleGround.getOwner().getName(), new ArrayList<Piece>());\n System.out.println(attackingPieces + \"===attacking pieces\");\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (battleFort != null) {\n System.out.println(battleFort.getName() + \"===battlefort\");\n System.out.println(battleFort.getOwner().getName() + \"===battlefort's owner\");\n \n\t\t\t\t\t\t\tattackingPieces.get(battleFort.getOwner().getName()).add(battleFort);\n System.out.println(attackingPieces.get(battleFort.getOwner().getName()));\n\t\t\t\t\t\t}\n\t//\t\t\t\t\tif (battleGround city/village)\n\t\t\t\t\t\t// TODO city/village\n\t\t\t\t \n\t\t\t\t\t\t\n\t\t\t\t // Check if all the players pieces are now gone\n\t\t\t\t if (!attackingPieces.containsKey(player.getName())) {\n\t\t\t\t \t\n\t\t\t\t \t// Display message, and remove player from combatants\n\t\t\t\t \tPlatform.runLater(new Runnable() {\n\t\t\t\t @Override\n\t\t\t\t public void run() {\n\t\t\t\t \t GUI.getHelpText().setText(\"Attack Phase: \" + player.getName() + \" has retreated all of their pieces!\");\n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t \t\n\t\t\t\t \t// If there is only 1 player fighting for the hex, \n\t\t\t\t \tif (attackingPieces.size() == 1) \n\t\t\t\t \t\tbreak;\n\t\t\t\t \t\n\t\t\t\t \t// Pause because somebody just retreated\n\t\t\t\t \ttry { Thread.sleep(2000); } catch( Exception e ){ return; }\n\t\t\t\t }\n\t\t\t\t \n\n\t \t InfoPanel.cover(player.getName());\n\t\t\t\t \n\t\t\t }\n\t\t }\n\t\t \n\t\t // Done button no longer needed\n\t\t Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t GUI.getDoneButton().setDisable(true);\n\t\t }\n\t\t });\n\t\t ClickObserver.getInstance().setCreatureFlag(\"\");\n\t\t ClickObserver.getInstance().setFortFlag(\"\");\n\t\t \n\t\t // Check for defeated armies:\n\t\t\t\t// - find player with no more pieces on terrain\n\t\t\t\t// - remove any such players from combatants\n\t\t\t\t// - if only one combatant, end combat\n \t\t\tbaby = null;\n \t\t\twhile (combatants.size() != attackingPieces.size()) {\n\t\t\t\t\tfor (Player pl : combatants) {\n\t\t\t\t\t\tif (!attackingPieces.containsKey(pl.getName())) {\n\t\t\t\t\t\t\tbaby = pl;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tcombatants.remove(baby);\n \t\t\t}\n \t\t\tif (combatants.size() == 1) {\n \t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n\n\t\t\t\texploring = (!battleGround.isExplored() && battleGround.getContents().size() == 1);\n\t\t\t\t\n\t\t\t\t// Add wildthings back to combatants if they were removed\n\t\t\t\tif (battleGround.getContents().containsKey(wildThings.getName()) && !combatants.contains(wildThings))\n\t\t\t\t\tcombatants.add(wildThings);\n\t\t\t\t\n \t\t} // end while (combatants.size() > 1 || exploring)\n \t\tbattleGround.coverFort();\n \t\t\n////////////////// Post Combat\n \t\t\n \t\t// sets player as the winner of the combat\n \t\t// Can be null if battle takes place on a hex owned by nobody, and each player lost all pieces\n \t\tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n \tbattleGround.removeBattleHex();\n }\n \t\t});\n \t\t\n \t\tif (combatants.size() == 0)\n \t\t\tplayer = battleGround.getOwner();\n \t\telse if (combatants.size() == 1 && combatants.get(0).getName().equals(wildThings.getName()))\n \t\t\tplayer = null;\n \t\telse\n \t\t\tplayer = combatants.get(0);\n \t\t\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\tSystem.out.println(\"combatants: \" + combatants);\n \t\tfor (Player p : combatants) {\n \t\tSystem.out.println(\"p.getName(): \"+ p.getName());\n \t\t\t\n \t\t}\n \t\tSystem.out.println(\"owner: \" + owner);\n \t\tSystem.out.println(\"combatants.get(0): \" + combatants.get(0));\n \t\tSystem.out.println(\"~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\");\n \t\t\n \t\t\n \t\t// Change ownership of hex to winner\n \t\tboolean ownerChanged = false;\n \t\tif (owner != null && combatants.size() > 0 && !battleGround.getOwner().equals(combatants.get(0))) {\n \t\t\tbattleGround.getOwner().removeHex(battleGround);\n \t\t\tcombatants.get(0).addHexOwned(battleGround);\n \t\t\townerChanged = true;\n \t\t}\n\t\t\t\n \t\t// See if fort is kept or downgraded.\n \t\tif (battleFort != null) {\n if (battleFort.getName().equals(\"Citadel\")) {\n owner.setCitadel(false);\n player.setCitadel(true);\n battleFort.healFort();\n player.addHexOwned(battleGround);\n Platform.runLater(new Runnable() {\n @Override\n public void run() {\n GUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n }\n });\n checkWinners();\n return;\n }\n \t\t\n\t\t\t\t// Get player to click dice to see if fort is kept\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", roll the die to see if the fort is kept or downgraded\");\n\t \tDiceGUI.getInstance().uncover();\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\t// Dice is set to -1 while it is 'rolling'. This waits for the roll to stop, ie not -1\n\t\t\t\tint oneOrSixGood = -1;\n\t\t\t\twhile (oneOrSixGood == -1) {\n\t\t\t\t\ttry { Thread.sleep(100); } catch( Exception e ){ return; }\n\t\t\t\t\toneOrSixGood = Dice.getFinalVal();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if a 1 or 6, keep fort (Keep it.... not turn it into a keep)\n\t\t\t\tif (oneOrSixGood == 1 || oneOrSixGood == 6) {\n\t\t\t\t\tbattleFort.healFort();\n\t\t\t\t\tplayer.addHexOwned(battleGround);\n\t\t\t\t\tPlatform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", you get to keep the fort!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t} else {\n\t\t\t\t\tbattleFort.downgrade();Platform.runLater(new Runnable() {\n\t\t @Override\n\t\t public void run() {\n\t\t \tGUI.getHelpText().setText(\"Post combat: \" + player.getName() + \", the fort was destroyed!\");\n\t\t }\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tPlatform.runLater(new Runnable() {\n\t @Override\n\t public void run() {\n\t \tInfoPanel.showTileInfo(battleGround);\n\t }\n\t });\n\t\t\t\t\n\t\t\t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n\t\t\t\t\n\t\t\t\t\n \t\t}\n\n \t\tbattleGround.flipPiecesDown();\n\t\t\t// TODO city/village and special incomes if they are kept or lost/damaged \n \t\t\n \t\ttry { Thread.sleep(1000); } catch( Exception e ){ return; }\n \t}/// end Post combat\n\n \tPlatform.runLater(new Runnable() {\n @Override\n public void run() {\n//\t\t\t\tInfoPanel.showBattleStats();\n \tBoard.removeCovers();\n }\n\t\t});\n \t\n\t\tClickObserver.getInstance().setTerrainFlag(\"\");\n\t\tClickObserver.getInstance().setPlayerFlag(\"\");\n\t\tClickObserver.getInstance().setCreatureFlag(\"\");\n\t\tClickObserver.getInstance().setFortFlag(\"\");\n\t\tbattleGrounds.clear();\n }",
"public Bowl setupGame(Bowl bowl) {\r\n\t\tbowl.letSteal();\r\n\t\tfor(int i =1; i<5;i++) {\r\n\t\t\tbowl.getNeighbor(i).letSteal();\r\n\t\t}\r\n\t\treturn bowl;\r\n\t\t// Of course this is a very artificial game state, as bowls\r\n\t\t// should not be emptied like this, but it aids in testing.\r\n\t}",
"@Test\n public void test_chooseBadTargetOnSacrifice_WithoutTargets_AI() {\n addCard(Zone.HAND, playerA, \"Redcap Melee\", 1);\n addCard(Zone.BATTLEFIELD, playerA, \"Atarka Monument\", 1); // {T}: Add {R} or {G}.\n //\n addCard(Zone.BATTLEFIELD, playerB, \"Silvercoat Lion\", 1);\n\n castSpell(1, PhaseStep.PRECOMBAT_MAIN, playerA, \"Redcap Melee\", \"Silvercoat Lion\");\n //addTarget(playerA, \"Mountain\"); no lands to sacrifice\n\n //setStrictChooseMode(true);\n setStopAt(1, PhaseStep.END_TURN);\n execute();\n\n assertGraveyardCount(playerA, \"Redcap Melee\", 1);\n assertGraveyardCount(playerB, \"Silvercoat Lion\", 1);\n }",
"@Test\r\n public void testAutoBattleTrance() {\r\n BasicHelper helper = new BasicHelper();\r\n Character character = helper.testCharacter;\r\n\r\n // Level up the character and improve stats\r\n character.gainXP(50000);\r\n character.restoreHP(999);\r\n // Equip a staff and armour\r\n character.equip(helper.testStaff);\r\n character.equip(helper.testArmour);\r\n\r\n ArrayList<MovingEntity> fighters = new ArrayList<MovingEntity>();\r\n /* create 5 enemies and 5 allies */\r\n fighters.add(new Slug(null));\r\n fighters.add(new Slug(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Zombie(null));\r\n fighters.add(new Vampire(null));\r\n\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n fighters.add(new Ally());\r\n\r\n BattleSimulator battler = new BattleSimulator(character, fighters, null);\r\n \r\n boolean battleResult = battler.runBattle();\r\n // character should win the battle, but sustain some damage\r\n assertTrue(battleResult);\r\n assertTrue(character.getCurrHP() < character.getMaxHP());\r\n // make sure only 5 enemies are defeated\r\n System.out.println(battler.getDefeated().toString());\r\n assertEquals(battler.getDefeated().size(), 5); \r\n\r\n }",
"static Player createUserPlayer(boolean randPlace, FleetMap fleetMap, BattleMap battleMap) {\n return new AbstractPlayer(fleetMap, battleMap, randPlace);\n }",
"public static void makeDwarf(Player player){\n\t\tint playerNumber = getPlayerNumber(player);\n\t\tfor(int i = 0; i < maximumSkillCount; i++){\n\t\t\tplayerSkillsArray[playerNumber][i] = 0;\n\t\t}\n\t\tDwarfCraftPlayerSkills.backupSkills();\n\t\tDwarfCraftPlayerSkills.saveSkills();\n\t\tplayer.sendMessage(\"You're now a Dwarf\");\n\t}",
"void placeTower();",
"private void plantMushroom(){\r\n\t\tif (rand.nextInt(200) < this.BIRTH_RATE){\r\n\t\t\tint plant = rand.nextInt(5);\r\n\r\n\t\t\tMushroom mush = null;\r\n\r\n\t\t\tswitch (plant){\r\n\t\t\tcase 0:\r\n\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t * These while functions make sure that the mushrooms are not spawned on top of any\r\n\t\t\t\t\t\t * other mushroom or on top of the snake itself.\r\n\t\t\t\t\t\t */\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 1:\r\n\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new RedMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new PurpleMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new BlueMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\r\n\t\t\t\tfor (int count = 0; count < mySnake.getList().size(); count++){\r\n\t\t\t\t\tif (count < shrooms.size()){\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count)) || mush.contains(shrooms.get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\twhile (mush.contains(mySnake.getList().get(count))){\r\n\t\t\t\t\t\t\tmush = new GreenMushroom(rand.nextInt(MAX_WIDTH/10)*10, rand.nextInt(MAX_HEIGHT/10)*10);\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\tbreak;\r\n\t\t\t}\r\n\r\n\t\t\tshrooms.add(mush);\t//it adds the crated mushroom to the list of mushrooms\r\n\t\t}\r\n\t}",
"public ThunderboltPokemon(int id, int hp, List<IAbility> list) {\n\t\tsuper(id, hp, list);\n\t}",
"public void newgame() {\n\t\tthis.player = 1;\n\t\t\n\n\t\tSystem.out.println(\"made a pice\");\n\t\tthis.piece = new String [9] [9];\n\t\tfor (int i=0; i<8 ;i++) {\n\t\t\tfor (int j= 0; j<8; j++) {\n\t\t\tpiece[i] [j] = \" \";\n\t\t\t}\n\t\t}\n\t\tint p = 0;\n\t\tfor (int i=0; i<=2 ;i++) {\n\t\t\tfor (int j= 0; j<8; j++) {\t\t\t\t\n\t\t\tif (p%2==1) {\n\t\t\t\tpiece[i][j]= \"1\";\n\t\t\t\tpiece[i+5][j+1] = \"2\";\n\t\t\t\tj +=1;}\n\t\t\telse {\n\t\t\t\tpiece[i][j+1]= \"1\";\n\t\t\t\tpiece[i+5][j] = \"2\";\n\t\t\t\tj +=1;\n\t\t\t\t}\n\t\t\t}p +=1;\n\t\t}\n\t\t\n\t}",
"public void throwBait() {\n\t\tpokemon.eatBait();;\n\t}"
]
| [
"0.6195924",
"0.60455287",
"0.6037541",
"0.59652567",
"0.580055",
"0.575251",
"0.57318985",
"0.5688625",
"0.559698",
"0.55717295",
"0.55249065",
"0.55231625",
"0.5519389",
"0.5496968",
"0.54933393",
"0.5441131",
"0.54358244",
"0.54249626",
"0.54239184",
"0.5423751",
"0.5422484",
"0.5393228",
"0.5374723",
"0.5363108",
"0.53390616",
"0.53322196",
"0.5320307",
"0.5319569",
"0.5304448",
"0.5303105",
"0.5296602",
"0.52875453",
"0.5285249",
"0.52742285",
"0.5270861",
"0.5266058",
"0.5260917",
"0.5255932",
"0.5243099",
"0.52383137",
"0.52305424",
"0.52238095",
"0.5223583",
"0.521421",
"0.5202594",
"0.5198779",
"0.5192017",
"0.5186668",
"0.5186473",
"0.51854527",
"0.51824915",
"0.5181093",
"0.51795316",
"0.5167364",
"0.5164394",
"0.51522267",
"0.5148356",
"0.5143394",
"0.51429975",
"0.5142849",
"0.51416063",
"0.51377904",
"0.5126779",
"0.5125989",
"0.51229537",
"0.51153815",
"0.51129097",
"0.5112408",
"0.51100755",
"0.5099803",
"0.50996125",
"0.50958383",
"0.5092968",
"0.50852984",
"0.50843096",
"0.50821936",
"0.5079498",
"0.5077113",
"0.5068406",
"0.5067244",
"0.5065114",
"0.5062886",
"0.50626326",
"0.5059281",
"0.505796",
"0.5049752",
"0.50487256",
"0.5046496",
"0.50461656",
"0.5038756",
"0.5038731",
"0.503485",
"0.50313634",
"0.5030814",
"0.5028722",
"0.50264335",
"0.50198495",
"0.5015243",
"0.50108457",
"0.50076044"
]
| 0.51226825 | 65 |
Initialises the new battle. | public void initWorld(String inName, int inLevel, int id)
{
setBackground(248);
addObject(playerPkmnInfoBox, 334, 229);
addObject(enemyPkmnInfoBox, 144, 49);
currentEnemyPokemon = id;
addNewPokemon("Player", currentPlayerPokemon, "", 0);
if(wildPokemon)
{
addNewPokemon("Enemy", currentEnemyPokemon, inName, inLevel);
}
else
{
addNewPokemon("Enemy", currentEnemyPokemon, "", 0);
}
this.textInfoBox = new TextInfoBox("BattleSelectBox", "BattleBar", currentPlayerPokemon);
addObject(textInfoBox, getWidth() / 2, getHeight() - 69); //Battle Text Box
newMusic("Battle");
Greenfoot.setSpeed(50);
setPaintOrder(Blackout.class, TextInfoBox.class, PkmnInfoBox.class, Pokemon.class);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Battle(){\r\n\t\t\r\n\t}",
"public Battle() {\r\n\t\tnbVals = 0;\r\n\t\tplayer1 = new Deck();\r\n\t\tplayer2 = new Deck();\r\n\t\ttrick = new Deck();\r\n\t}",
"public Battle() {\r\n\t\tfoesPokemon = new Pokemon[] {\r\n\t\t\t\tnew Totodile(12),\r\n\t\t\t\tnew Bulbasaur(15),\r\n\t\t\t\tnew Combusken(20),\r\n\t\t\t\tnew Raichu(25),\r\n\t\t\t\tnew Venausaur(50),\r\n\t\t\t\tnew Blaziken(50)\r\n\t\t};\r\n\t\tyourPokemon = new Pokemon[] {\r\n\t\t\t\tnew Torchic(14),\r\n\t\t\t\tnew Ivysaur(18),\r\n\t\t\t\tnew Croconaw(20),\r\n\t\t\t\tnew Raichu(25),\r\n\t\t\t\tnew Blaziken(29),\r\n\t\t\t\tnew Feraligatr(40)\r\n\t\t};\r\n\t}",
"public WarGame() {\r\n\t\tsetGame();\r\n\t}",
"public void init() {\n if (!getLocation().isTileMap()) {\n //Debug.signal( Debug.NOTICE, null, \"PlayerImpl::init\");\n this.animation = new Animation(this.wotCharacter.getImage(), ClientDirector.getDataManager().getImageLibrary());\n this.sprite = (Sprite) this.wotCharacter.getDrawable(this);\n this.brightnessFilter = new BrightnessFilter();\n this.sprite.setDynamicImageFilter(this.brightnessFilter);\n }\n this.movementComposer.init(this);\n }",
"private void initializeBadGuys() {\n\t\tplayer = new Player();\t\t\n\t\tfor (int i = 0; i < councilmen.length; i++) {\n\t\t\tcouncilmen[i] = new Councilman();\n\t\t}\n\t}",
"public BeanGame () {\n\t}",
"@Override\r\n\tpublic void init() \r\n\t{\r\n\t\tthis.board = new GameBoard();\r\n\t}",
"public Game() \n {\n parser = new Parser();\n name = new String();\n player = new Player();\n ai = new AI();\n createRooms();\n rand = -1;\n enemyPresent = false;\n wantToQuit = false;\n alive = true;\n createItems();\n createWeapons();\n createEnemy();\n setEnemy();\n setItems();\n setWeapons();\n setExits();\n }",
"public void initGame() {\r\n Log.d(\"UT3\", \"init game\");\r\n mEntireBoard = new Tile(this);\r\n // Create all the tiles\r\n for (int large = 0; large < 9; large++) {\r\n mLargeTiles[large] = new Tile(this);\r\n for (int small = 0; small < 9; small++) {\r\n mSmallTiles[large][small] = new Tile(this);\r\n }\r\n mLargeTiles[large].setSubTiles(mSmallTiles[large]);\r\n }\r\n mEntireBoard.setSubTiles(mLargeTiles);\r\n\r\n // If the player moves first, set which spots are available\r\n mLastSmall = -1;\r\n mLastLarge = -1;\r\n setAvailableFromLastMove(mLastSmall);\r\n }",
"public Player() {\n fleetMap = new Map();\n battleMap = new Map();\n sunkShipNum = 0;\n }",
"public Player() { \n grid = new Cell[GRID_DIMENSIONS][GRID_DIMENSIONS]; //size of grid\n for (int i = 0; i < GRID_DIMENSIONS; i++) {\n for (int j = 0; j < GRID_DIMENSIONS; j++) {\n grid[i][j] = new Cell(); //creating all Cells for a new grid\n }\n }\n \n fleet = new LinkedList<Boat>(); //number of boats in fleet\n for (int i = 0; i < NUM_BOATS; i++) {\n Boat temp = new Boat(BOAT_LENGTHS[i]); \n fleet.add(temp);\n }\n shipsSunk = new LinkedList<Boat>();\n }",
"void init() {\r\n\r\n map = new HashMap<Square, Piece>();\r\n for (Square sq: INITIAL_ATTACKERS) {\r\n map.put(sq, BLACK);\r\n }\r\n for (Square sq: INITIAL_DEFENDERS) {\r\n map.put(sq, WHITE);\r\n }\r\n king = sq(4, 4);\r\n map.put(king, KING);\r\n for (int i = 0; i <= 8; i++) {\r\n for (int j = 0; j <= 8; j++) {\r\n if (!map.containsKey(sq(i, j))) {\r\n map.put(sq(i, j), EMPTY);\r\n }\r\n }\r\n }\r\n\r\n board = new Piece[9][9];\r\n\r\n for (Square keys : map.keySet()) {\r\n board[keys.col()][keys.row()] = map.get(keys);\r\n }\r\n }",
"public OrchardGame() {\n\t\t\n\t}",
"public Battlefield() {\r\n\t\tshipTypeMap = new LinkedHashMap<Point, Integer>();\r\n\t\tshipStateMap = new LinkedHashMap<Point, Integer>();\r\n\t\tcreateMaps();\r\n\t\tnumberOfShips = 0;\r\n\t\tnumberOfAllowedShotsRemaining = 0;\r\n\t\tfor (int shipType = 0; shipType < 5; shipType++) {\r\n\t\t\tnumberOfAllowedShotsRemaining = numberOfAllowedShotsRemaining\r\n\t\t\t\t\t+ shipLengths[shipType];\r\n\t\t}\r\n\t\tuserName = \"\";\r\n\t}",
"public battle(player a) {\n initComponents();\n //set background color\n Color battle = new Color(255,129,106);\n this.getContentPane().setBackground(battle);\n \n //sets the given player to the subject player\n c = a;\n //players current xp\n exp = c.getXP();\n //players starting health\n playerHealth = 3;\n //displays the players stats\n btnEarth.setText(\"Earth: \" + c.getEarth());\n btnFire.setText(\"Fire: \" + c.getFire());\n btnWater.setText(\"Water: \" + c.getWater());\n btnIce.setText(\"Ice: \" + c.getIce());\n \n //determines which monster to fight\n if(exp < 4){\n fill(\"Blob-Boy\");\n }else if(exp < 8){\n fill(\"Spike\");\n }else{\n fill(\"Shadow\");\n }\n }",
"public BlackJackGame()\r\n\t{\r\n\t\tplayer1 = new Player();\r\n\t\tdealer = new Player();\r\n\t\tcardDeck = new Deck();\r\n\t\tendGame = false;\r\n\t}",
"public BattleShipGame(){\n ui = new UserInterface();\n played = false;\n highestScore = 0;\n }",
"public GameBis() { \t\n\t\t\n\t\t// initialization of the size of the game\n\t\tthis.width = 12; // ATTENTION : dimensions of the map (can be changed)\n\t\tthis.height = 12;\n\t\tthis.widthRoad = width * 2 + 1;\n\t\tthis.heightRoad = height * 2 + 1;\n\t\tthis.pxWidth = (width * 50) + ((width + 1) * 20); // ATTENTION TAILLE DES IMAGES : 50*50px (constructions), 20px (roads) (can be changed)\n\t\tthis.pxHeight = (width * 50) + ((width + 1) * 20);\n this.onTheRoadAgain= new LinkedList<Inhabitant>();\n\t\t\n\t\t// initialization of the boards of roads and constructions\n\t\tboardRoad = new BoardRoad(widthRoad, heightRoad); \n\t\tboardBuilding = new BoardBuilding(width, height);\n\t\t\n\t\t/*\n\t\t// initialization of 50 inhabitants ready to moving in at the beginning of the game\n\t\tfor (int i=0 ; i<50 ; i++) {\n\t\t\tpopulation.add(new Inhabitant(\"Inhabitant\"+i));\n\t\t}\n\t\t*/\n //initialistation du timer\n\t\ttimer = new Timer (100, new TimerClass());\n\t\ttimer.start();\n\t\t\n\t\t// display of the game\n\t\twindow = new Window(pxWidth, pxHeight, boardBuilding, boardRoad);\n\t\t\n\t}",
"public Championship() {\n }",
"public Battlefield() {\n\t\tbattlefield = new Square[HEIGHT][LENGTH];// creates a battlefield of 5x5\n\t\t\n\t\tcounter = 0;\n\n\t\tfor (int row = 0; row < battlefield.length; row++) {\n\n\t\t\tfor (int column = 0; column < battlefield[row].length; column++) {\n\t\t\t\tbattlefield[row][column] = new Square(null, null, null);\n\t\t\t\tbattlefield[row][column].setTerrain(null);\n\n\t\t\t}\n\n\t\t}\n\t\tfor (int elf = 0; elf < 10; elf++) {// creates 10 elves in random\n\t\t\t\t\t\t\t\t\t\t\t// positions in the battlefield.\n\t\t\tbattlefield[RandomUtil.nextInt(5)][RandomUtil.nextInt(5)]\n\t\t\t\t\t.setElf(new Elf());\n\n\t\t}\n\t\twhile (getElfCount() < 10) {// makes sure that 10 elves are created in\n\t\t\t\t\t\t\t\t\t// the inizialization.\n\t\t\tbattlefield[RandomUtil.nextInt(5)][RandomUtil.nextInt(5)]\n\t\t\t\t\t.setElf(new Elf());\n\t\t}\n\n\t\tfor (int orc = 0; orc < 10; orc++) {// creates ten orcs in random\n\t\t\t\t\t\t\t\t\t\t\t// positions in the battlefield.\n\t\t\tbattlefield[RandomUtil.nextInt(5)][RandomUtil.nextInt(5)]\n\t\t\t\t\t.setOrc(new Orc());\n\t\t}\n\t\twhile (getOrcCount() < 10) {// makes sure that 10 orcs are created in\n\t\t\t\t\t\t\t\t\t// the inizialization.\n\t\t\tbattlefield[RandomUtil.nextInt(5)][RandomUtil.nextInt(5)]\n\t\t\t\t\t.setOrc(new Orc());\n\t\t}\n\t\tfor (int mountain = 0; mountain < 5; mountain++) {// crates 5 mountain\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// terrains in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// random positions\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// in the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// battlefield.\n\t\t\tbattlefield[RandomUtil.nextInt(5)][RandomUtil.nextInt(5)]\n\t\t\t\t\t.setTerrain(new Terrain(\"M\"));\n\t\t}\n\n\t\twhile (getMountainCount() < 5) {// makes sure that 5 mountains are\n\t\t\t\t\t\t\t\t\t\t// created in the inizialization.\n\t\t\tbattlefield[RandomUtil.nextInt(5)][RandomUtil.nextInt(5)]\n\t\t\t\t\t.setTerrain(new Terrain(\"M\"));\n\t\t}\n\t}",
"private void init(){\n \tdimension.set(0.5f, 0.5f);\n \tsetAnimation(Assets.instance.goldCoin.animGoldCoin);\n \tstateTime = MathUtils.random(0.0f,1.0f);\n \t\n \t//regGoldCoin = Assets.instance.goldCoin.goldCoin;\n \t // Set bounding box for collision detection\n \tbounds.set(0,0,dimension.x, dimension.y);\n \tcollected = false;\n }",
"public Player() {\r\n\t\tthis.gemPile = new int[4];\r\n\t\tthis.hand = new ArrayList<Card>();\r\n\t\tthis.bag = new ArrayList<Card>();\r\n\t\tthis.discard = new ArrayList<Card>();\r\n\t\tthis.lockedCards = new ArrayList<Card>();\r\n\t\tthis.toUse = new ArrayList<Integer>();\r\n\t\tnewTurn();\r\n\t}",
"public War()\n {\n //Create the decks\n dealer = new Deck(); \n dw = new Deck();\n de = new Deck(); \n warPile = new Deck(); \n \n \n fillDeck(); //Add the cards to the dealer's pile \n dealer.shuffle();//shuffle the dealer's deck\n deal(); //deal the piles \n \n }",
"public Game() {\n initializeBoard();\n }",
"private void initialParameters()\n\t{\n\t\tasteroidList = new ArrayList<Asteroid>();\n\t\tfor(int i = 0 ; i < INITIAL_ASTEROIDS ; i++)\n\t\t\tasteroidList.add(new Asteroid(getRandomLocationX(), getRandomLocationY(), SCREEN_WIDTH, SCREEN_HEIGHT));\n\t\t\n\t\t//========== Game Status ===========\n\t\trunning \t= true;\n\t\tisWin \t\t= false;\n\t\tisGameOver \t= false;\n\t\t\n\t\t//========== Game Craft ===========\t\t\n\t\tcraft = new Craft(SCREEN_WIDTH/2, SCREEN_HEIGHT/2, SCREEN_WIDTH, SCREEN_HEIGHT);\n\t}",
"public static void load(){\n\t\tinbattle=true;\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tScanner s=new Scanner(f);\n\t\t\tturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tString curr=s.next();\n\t\t\tif(curr.equals(\"WildTrainer:\"))\n\t\t\t\topponent=WildTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"EliteTrainer:\"))\n\t\t\t\topponent=EliteTrainer.readInTrainer(s);\n\t\t\telse if(curr.equals(\"Trainer:\"))\n\t\t\t\topponent=Trainer.readInTrainer(s);\n\t\t\tSystem.out.println(\"Initializing previous battle against \"+opponent.getName());\n\t\t\tcurr=s.next();\n\t\t\tallunits=new ArrayList<Unit>();\n\t\t\tpunits=new ArrayList<Unit>();\n\t\t\tounits=new ArrayList<Unit>();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tpunits.add(Unit.readInUnit(null,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Player Units\n\t\t\tcurr=s.next();\n\t\t\twhile(!curr.equals(\"End\")){\n\t\t\t\tounits.add(Unit.readInUnit(opponent,s));\n\t\t\t\tcurr=s.next();\n\t\t\t}\n\t\t\ts.nextLine();// Opponent Units\n\t\t\tallunits.addAll(punits);\n\t\t\tallunits.addAll(ounits);\n\t\t\tpriorities=new ArrayList<Integer>();\n\t\t\tint[] temp=GameData.readIntArray(s.nextLine());\n\t\t\tfor(int i:temp){\n\t\t\t\tpriorities.add(i);\n\t\t\t}\n\t\t\txpgains=GameData.readIntArray(s.nextLine());\n\t\t\tspikesplaced=s.nextBoolean();\n\t\t\tnumpaydays=s.nextInt();\n\t\t\tactiveindex=s.nextInt();\n\t\t\tactiveunit=getUnitByID(s.nextInt());\n\t\t\tweather=Weather.valueOf(s.next());\n\t\t\tweatherturn=s.nextInt();\n\t\t\ts.nextLine();\n\t\t\tbfmaker=new LoadExistingBattlefieldMaker(s);\n\t\t\tinitBattlefield();\n\t\t\tplaceExistingUnits();\n\t\t\tMenuEngine.initialize(new UnitMenu(activeunit));\n\t\t}catch(Exception e){e.printStackTrace();System.out.println(e.getCause().toString());}\n\t}",
"public Scenario() {\n Room ninjaRoom, weaponroom, meetingRoom, zenTemple, stealthRoom, restRoom, masterRoom, ninjaTransporter;\n\n // create the rooms\n ninjaRoom = new Room(\"in the main enterence to the camp. You'll need to walk 10000 steps to get to the next room.\");\n weaponroom = new Room(\"in the Weapon's room. Normally this is where you go to grab your Nunchaku, but not today.\");\n meetingRoom = new Room(\"in the Meeting room. This is where classes are normally held. We will be here tomorrow to be sure\");\n zenTemple = new Room(\"in the Meditation room. When done for the day, this is where you clear your head.\");\n stealthRoom = new Room(\"in the Stealth training room. Ninja are made here, slow but steady will keep you alive.\");\n restRoom = new Room(\"in the Barracks. When I am done for th day, I will come back here for some rest.\");\n masterRoom = new Room(\"in the Master's room. Master is current meditating right now. Better leave him alone.\");\n ninjaTransporter = new TransporterRoom(\"in the secret Shumpo room...with this I can teleport anywhere\", this);\n\n weaponroom.addItem(new Item(\"Katana\", 3));\n weaponroom.addItem(new Item(\"Nunchaku\", 1));\n weaponroom.addItem(new Item(\"Bo\", 2));\n weaponroom.addItem(new Item(\"Sai\", 2));\n ninjaRoom.addItem(new Item(\"Master's Keys\", 1));\n meetingRoom.addItem(new Item(\"Secret Plans\", 1));\n zenTemple.addItem(new Item(\"Prayer beads\", 1));\n stealthRoom.addItem(new Item(\"Throwing Star\", 2));\n restRoom.addItem(new Item(\"Risque magazines\", 1));\n masterRoom.addItem(new Item(\"Ancient Shinobi Scroll\", 5));\n\n // initialise room exits\n ninjaRoom.setExits(\"north\", ninjaTransporter);\n\n ninjaTransporter.setExits(\"north\", weaponroom);\n ninjaTransporter.setExits(\"south\", ninjaRoom);\n\n weaponroom.setExits(\"north\", meetingRoom);\n weaponroom.setExits(\"south\", ninjaTransporter);\n\n meetingRoom.setExits(\"north\", stealthRoom);\n meetingRoom.setExits(\"east\", restRoom);\n meetingRoom.setExits(\"south\", weaponroom);\n meetingRoom.setExits(\"west\", zenTemple);\n\n zenTemple.setExits(\"east\", meetingRoom);\n\n stealthRoom.setExits(\"south\", meetingRoom);\n\n restRoom.setExits(\"east\", masterRoom);\n restRoom.setExits(\"west\", meetingRoom);\n\n masterRoom.setExits(\"west\", restRoom);\n\n // Set the start room\n startRoom = ninjaRoom; // start game @ ninjaRoom\n\n rooms = new ArrayList();\n rooms.add(ninjaRoom);\n rooms.add(weaponroom);\n rooms.add(meetingRoom);\n rooms.add(zenTemple);\n rooms.add(stealthRoom);\n rooms.add(restRoom);\n rooms.add(masterRoom);\n rooms.add(ninjaTransporter);\n\n random = new Random();\n }",
"public void initGame() {\n this.game = new Game();\n }",
"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 }",
"public void initialise_new_game() {\n\n data.read_from_file(\"maxus2.txt\");\n\n mySound.initialise();\n\n pacman.init();\n ghost.init();\n\n score.initialise();\n }",
"public Game()\n {\n createRooms();\n parser= new Parser();\n }",
"public Game() \n {\n createRooms();\n parser = new Parser();\n }",
"public Game() \n {\n createRooms();\n parser = new Parser();\n }",
"public BattleRunnable() {\n\t\tdebug.i(\"BattleRunnable constructor\");\n\t}",
"private void init(){\n stage = new Stage();\n inventory = Warrior.getInventory();\n\n Skin skin = new Skin(Gdx.files.internal(\"assets/skins/uiskin.json\"));\n\n dragAndDrop = new DragAndDrop();\n dragAndDrop.setDragActorPosition(-25,25); //offset of dragable item\n\n lootWindow = createView(skin);\n\n stage.addActor(lootWindow); // add window to stage\n }",
"public void init()\n\t{\n\t\tpaused = false;\n\t\tbg.play();\n\t\tdeath.setVolume(10);\n\t\texplosion.setVolume(20);\n\t\tsetGameOver(false);\n\t\tscore = 0;\n\t\tlives = 3;\n\t\tgameTime = 0;\n\t\tgameObj = new GameWorldCollection();\n\t\tshipSpawned = false;\n\t\tsound = true;\n\t\ttotalNPS = 0;\n\t\tcollisionVectorPS = new Vector<ICollider>();\n\t\tcollisionVectorNPS\t = new Vector<ICollider>();\n\t\tcollisionVectorAsteroid = new Vector<ICollider>();\n\t\ttrash\t\t\t\t\t= new Vector<ICollider>();\n\t\tnotifyObservers();\t\n\t}",
"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}",
"public CombatShip(CombatShipBase initTypeBase, int initFaction) {\n baseShip = initTypeBase;\n faction = initFaction;\n }",
"public Game() {\n whitePlayer = new AwfulAIPlayer(Colour.WHITE, board);\n blackPlayer = new HumanPlayer(Colour.BLACK, board);\n\n sharedBoard = new CompositeBitBoard(whitePlayer.getOccupied(), blackPlayer.getOccupied());\n }",
"public Game() {\t\t\t\t\t\n\t\t\n\t\tmDeck = new Deck();\t\t\t\t\t\t\t\t\t\t\t\n\t\tmDealer = new Dealer(mDeck.getCard(), mDeck.getCard());\t//dealer gets a random value card twice to initialise the dealers hand with 2 cards\n\t\tmUser = new User();\t\t\t\t\t\t\t\t\t\t\t\n\t\tgiveCard();\t\t\t\t\t\n\t}",
"public void init() {\n\t\tfor(int i = 0; i < roamingAliens; ++i) {\n\t\t\tAlien alien = new Alien(ColorUtil.MAGENTA, screenHeight, screenWidth, speed, speedMulti);\n\t\t\tgameObject.add((GameObject) alien); \n\t\t}\n\t\tfor(int i = 0; i < roamingAstronauts; ++i) {\n\t\t\tAstronaut astronaut = new Astronaut(ColorUtil.GREEN, screenHeight, screenWidth, speed, speedMulti);\n\t\t\tgameObject.add((GameObject) astronaut);\n\t\t}\n\t\tgameObject.add((Spaceship.getSpaceship()));\n\t\tthis.setChanged();\n\t\tthis.notifyObservers();\n\t\tthis.clearChanged();\n\t}",
"private void initPlayers() {\n this.playerOne = new Player(1, 5, 6);\n this.playerTwo = new Player(2, 0, 1);\n this.currentPlayer = playerOne;\n\n }",
"public void gameInit() {\n lobbyRoom.sendPortToAll();\n lobbyRoom.sendPlayers(game.getCars());\n lobbyRoom.sendTrack(game.getTrack());\n lobbyRoom.sendPowerupManager(game.getManager());\n this.running = true;\n }",
"public Scania() {\n\n super(2, 600, Color.white, \"Scania\", 13000);\n truckBed = new Ramp();\n }",
"public void initGame() {\n // Create a new deck, with the right numbers of cards and shuffle it.\n this.deck.clear();\n this.deck.init();\n\n // Init all the players.\n for (Player player : this.players.values()) {\n player.init();\n }\n\n // Give START_NUM_CARD to each players.\n for (int i = 0; i < START_NUM_CARD; i++) {\n for (Player player : this.players.values()) {\n player.addCard(this.deck.pop());\n }\n }\n\n // Reset vars\n this.table.clear();\n this.onTableAmount = 0;\n this.numTurns = 0;\n this.newTurn = false;\n this.numPlayerInTurn = 0;\n this.currentPlayer = this.startingGamePlayer;\n\n // Subtract the blind to each players.\n this.players.get(this.currentPlayer).addToTable(this.currentSmallBlind);\n this.addOnTableAmount(this.currentSmallBlind);\n for (int i = 0; i < this.playerAmount; i++) {\n if (!(i == this.currentPlayer)) {\n this.players.get(i).addToTable(this.currentSmallBlind * 2);\n this.addOnTableAmount(this.currentSmallBlind * 2);\n }\n }\n this.currentHighestPlayerBet = currentSmallBlind * 2;\n\n // Add the first 3 cards.\n for (int i = 0; i < 3; i++) {\n this.table.push(this.deck.pop());\n }\n\n // Increment numTurns\n this.numTurns++;\n this.numGame++;\n }",
"public Championship()\n {\n drivers = new ListOfDrivers();\n venues = new ListOfVenues();\n }",
"public BSState() {\n this.playerTurn=1;\n this.p1TotalHits=0;\n this.p2TotalHits=0;\n this.shipsAlive=10;\n this.shipsSunk=0;\n this.isHit=false;\n this.phaseOfGame=\"SetUp\";\n this.shotLocations=null;\n this.shipLocations=null;\n this.shipType=1;\n this.board=new String[10][20];\n //this.player1=new HumanPlayer;\n //this.player2=new ComputerPlayer;\n\n }",
"public void init(int wdt, int hgt, Player player, List<Guard> guards, List<Item> treasures, int wdtPortail, int hgtPortail);",
"@Override\n\tpublic void init() {\n\t\t\n\t\t// Set your level dimensions.\n\t\t// Note that rows and columns cannot exceed a size of 16\n\t\tsetDimensions(4, 4);\n\t\t\n\t\t// Select your board type\n\t\tsetBoardType(BoardType.CHECKER_BOARD);\n\n\t\t// Select your grid colors.\n\t\t// You need to specify two colors for checker boards\n\t\tList<Color> colors = new ArrayList<Color>();\n\t\tcolors.add(new Color(255, 173, 179, 250)); // stale blue\n\t\tcolors.add(new Color(255, 255, 255, 255)); // white\n\t\tsetColors(colors);\n\t\t\n\t\t// Specify the level's rules\n\t\taddGameRule(new DemoGameRule());\n\t\t\n\t\t// Retrieve player IDs\n\t\tList<String> playerIds = getContext().getGame().getPlayerIds();\n\t\tString p1 = playerIds.get(0);\n\t\tString p2 = playerIds.get(1);\n\n\t\t// Add your entities to the level's universe\n\t\t// using addEntity(GameEntity) method\n\t\taddEntity(new Pawn(this, p1, EntityType.BLACK_PAWN, new Point(0, 0)));\n\t\taddEntity(new Pawn(this, p2, EntityType.WHITE_PAWN, new Point(3, 3)));\n\t}",
"public Game() {\n board = new FourBoard();\n }",
"public void createChallenger() {\n\n Random random = new Random();\n if(currentTurn.getActivePlayers().size() != 1) {\n currentTurn.setCurrentPlayer(currentTurn.getActivePlayers().get(random.nextInt(currentTurn.getActivePlayers().size() - 1)));\n } else {\n currentTurn.setCurrentPlayer(currentTurn.getActivePlayers().get(0));\n }\n int i = onlinePlayers.indexOf(currentTurn.getCurrentPlayer());\n stateList.set(i, new Initialized(getCurrentTurn().getCurrentPlayer(), this));\n\n }",
"public Game(){\n player = new Player(createRooms());\n parser = new Parser(); \n }",
"public Game() {\n\t\tbPlayer = new Player(false);\n\t\twPlayer = new Player(true);\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Warlock() {\n name = \"\";\n className = \"\";\n currentHealth = 0;\n strength = 0;\n defense = 0;\n special = 0;\n points = 0;\n }",
"public Program7()\n { \n _tc = new TravelingCreature( 200, 200 );\n }",
"public void startGame() {\n\t\tinitChips();\n\t\tassignAndStartInitialProjects();\n\t}",
"private void prepareGame()\n {\n Rocket rocket = new Rocket();\n \n scoreCounter = new Counter(\"Score: \");\n \n addObject(rocket, getWidth()/2 + 100, getHeight()/2);\n \n addObject(scoreCounter, 60, 480);\n \n //TODO (69): Make a method call to addAsteroids that uses your constant for the number of asteroids\n addAsteroids(START_ASTEROIDS);\n }",
"public BlackjackGameImpl(){\n\t\tsuper();\n\t\tplayers = new HashMap<>();\n\t\tplayersAvailableOptions = new HashMap<>();\n\t\thandAvailableOptions = new HashMap<>();\n\t\thistoricalActions = new HashMap<>();\n\t\tinsurances = new ArrayList<>();\n\t}",
"@Override\r\n public void init() {\n \tHouse house = ((Room)getCharacterLocation()).getHouse();\r\n \tboolean freekitchen=false;\r\n \tboolean freestage=false;\r\n \tboolean freearena=false;\r\n \tboolean freebath=false;\r\n \tint chance=0;\r\n\r\n \tfor(Room room: house.getRooms()){\r\n \t\tif(room.getAmountPeople()==0){\r\n \t\t\tif(room.getRoomType()==RoomType.STAGE){freestage=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.KITCHEN){freekitchen=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.ARENA){freearena=true;}\r\n \t\t\tif(room.getRoomType()==RoomType.SPAAREA){freebath=true;}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//List what the character can do\r\n\t\tfinal Map<Occupation, Integer> characterCanDo=new HashMap<Occupation, Integer>();\r\n\t\t\r\n\t\tCharakter character = getCharacters().get(0);\r\n\t\t\r\n\t\t\r\n\t\tfor (Occupation attendType: Occupation.values()) {\r\n\t\t\tcharacterCanDo.put(attendType, 0); \r\n\t\t}\r\n\t\t\r\n\t\tif(character.getFinalValue(EssentialAttributes.ENERGY)<=80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.REST, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.REST, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.CLEANING)>=1 && house.getDirt()>30){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.CLEAN, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.CLEAN, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.SEDUCTION)>=1){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.WHORE, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.SEDUCTION)/10;\r\n\t\t\tmaxCust=1;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.WHORE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.STRIP)>=1 && freestage==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.DANCE, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.STRIP)/10;\r\n\t\t\tmaxCust=15;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.DANCE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.COOKING)>=1 && freekitchen==true){\t\t\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.COOK, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.COOK, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.WELLNESS)>=1 && freebath==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.BATHATTENDANT, chance);\r\n\t\t\tappeal=character.getFinalValue(SpecializationAttribute.WELLNESS)/10;\r\n\t\t\tmaxCust=15;\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.BATHATTENDANT, 0);\r\n\t\t}\r\n\t\tif(freebath==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.BATHE, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.BATHE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(Sextype.FOREPLAY)>50 && character.getFinalValue(EssentialAttributes.ENERGY)>80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.MASTURBATE, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.MASTURBATE, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(SpecializationAttribute.VETERAN)>=1 && freearena==true){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\t \r\n\t\t\tcharacterCanDo.put(Occupation.TRAIN, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.TRAIN, 0);\r\n\t\t}\r\n\t\tif(character.getFinalValue(EssentialAttributes.ENERGY)>80){\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\tcharacterCanDo.put(Occupation.ERRAND, chance);\r\n\t\t\tchance=Util.getInt(1,100);\r\n\t\t\tcharacterCanDo.put(Occupation.BEACH, chance);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tcharacterCanDo.put(Occupation.ERRAND, 0);\r\n\t\t\tcharacterCanDo.put(Occupation.BEACH, 0);\r\n\t\t}\r\n\r\n\t\tint previous=0;\r\n\t\tint actual=0;\r\n\t\tfor (Occupation occupation: Occupation.values()) {\r\n\t\t\tactual=characterCanDo.get(occupation);\r\n\t\t\tif(actual>previous && actual!=0){\r\n\t\t\t\tprevious=actual;\r\n\t\t\t\tcharacterOccupationMap.put(character, occupation);\r\n\t\t\t}\r\n\r\n\t\t}\r\n }",
"void initializeGame() {\n // Initialize players\n // Put the pieces on the board\n }",
"public void initialize( )\n\t{\n\t\twakeupOn( m_WakeupCondition );\n\n\t\tColor3f objColor = new Color3f( 1.0f, 0.1f, 0.2f );\n\t\tColor3f black = new Color3f( 0.0f, 0.0f, 0.0f );\n\t\tcollideMaterial = new Material( objColor, black, objColor, black, 80.0f );\n\n\t\tobjColor = new Color3f( 0.0f, 0.1f, 0.8f );\n\t\tmissMaterial = new Material( objColor, black, objColor, black, 80.0f );\n\n\t\tobjectAppearance.setMaterial( missMaterial );\n\t}",
"public MiniGame() {\n\n\t}",
"public void initializePopulation(){\n\t\t// create the population\n\t\tfor(int i = 0; i < POPULATION_SIZE; i++){\n\t\t\t// get a random length for the building sequence\n\t\t\tint randArraySize = randomGenerator.nextInt(possiblePieces.length-1)+1;\n\t\t\t\n\t\t\tBuildingPiece[] pieceSequence = new BuildingPiece[randArraySize];\n\t\t\tfor(int j = 0; j < randArraySize; j++){\n\t\t\t\t// get a random possible piece and insert it into the sequence\n\t\t\t\tint randIndex = randomGenerator.nextInt(possiblePieces.length);\n\t\t\t\tpieceSequence[j] = possiblePieces[randIndex];\n\t\t\t}\n\t\t\t\n\t\t\t/* add a new number sequence with the newly created \n\t\t\t * sequence from the input */\n\t\t\tpopulation.add(new Building(pieceSequence, generation, possiblePieces));\n\t\t}\n\t}",
"public War()\n {\n start();\n }",
"public void init(int wdt, int hgt, Player player, List<Guard> guards, List<Item> treasures, Cell[][] cells, int wdtPortail, int hgtPortail);",
"public void setUpBattleArea(int width, char height) throws SizeLimitExceededException {\r\n\t\tbattleArea = new BattleArea(width, height);\r\n\t\tcounter = 0;\r\n\r\n\t}",
"private void initNewLevel() {\n\t\tmaze = new Maze(\"maze.xml\");\n\t\tPoint position = Cell.positionOfCell(26, 13);\n\t\tposition.x += 7;\n\t\tif (highScore.getScore() == 0)\n\t\t\tpacman = new Pacman(maze, position, maze.cellAt(26, 13),\n\t\t\t\t\tDirection.RIGHT, 3);\n\t\telse\n\t\t\tpacman = new Pacman(maze, position, maze.cellAt(26, 13),\n\t\t\t\t\tDirection.RIGHT, pacman.getNumberOfLives());\n\t\tinitGhosts();\n\n\t\ttimer.stop();\n\t\tlevelStartTimer.restart();\n\t}",
"public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1078, 672, 1); \n preparePlayer1();\n preparePlayer2();\n prepareTitle();\n //playmusic();\n }",
"public GameController() {\n \t\t// Fill the table empty positions.\n \t\tfor (int i = 0; i < MAX_NUMBER_OF_PILES; i++) {\n \t\t\tmTable.add(i, null);\n \t\t}\n \t\tcreateDeck();\n \t\tgs = new GameState(mTable, pileNames, pileNo);\n \t\tnew Listener(this);\n \t}",
"private void default_init(){\n id = 0;\n xPos = 0;\n yPos = 0;\n hp = 100;\n name=\"\";\n character_id = 1;\n weapons = new ArrayList<>();\n weaponEntryTracker = new LinkedList<>();\n isJumping = false;\n isFalling = false;\n initial_y= -1;\n stateOfMovement = 0;\n for(int i = 0; i < 3; i++){\n this.weapons.add(new Pair<>(NO_WEAPON_ID, (short) 0));\n }\n this.weapons.set(0,new Pair<>(PISTOL_ID,DEFAULT_PISTOL_AMMO));\n currentWeapon = this.weapons.get(0);\n bulletsFired = new ArrayList<>();\n shootingDirection = 1;\n energy = 0;\n sprint = false;\n score = 0;\n roundsWon = 0;\n ready = false;\n audioHandler = new AudioHandler();\n }",
"public BossRoom() {\n\t\ttiles = new WorldTiles(width, height, width);\n\t\tbackground = new Sprite(SpriteList.BOSS_ROOM_BACKGROUND);\n\t}",
"public Game() {\r\n\t\tcards = new ArrayList<Card>();\r\n\t\tfor (int i = 0; i < NBCARDS; i++) {\r\n\t\t\tcards.add(new Card());\r\n\t\t}\r\n\t\tplayers = new ArrayList<Player>();\r\n\t\tfor (int i = 0; i < NBPLAYER; i++) {\r\n\t\t\tplayers.add(new Player(i + 1));\r\n\t\t}\r\n\t}",
"public void InitGame(){\n System.out.format(\"New game initiated ...\");\n Game game = new Game(client_List);\n SetGame(game);\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 setupBattle(Pokemon ally, Pokemon enemy, boolean battleType, int battleLoc){\n\t\tPokemon.generateIV(enemy);\n\t\tPokemon.generateNewStats(enemy);\n\t\n\t\t_gbs.getBattlePanel().initializeBattle(_gbs.getPlayer(), enemy, battleLoc);\n\t\t\n\t\t_gbs.getBattlePanel().repaint();\n\t}",
"public Othello() {\n\t\tmyBoard = new Board(8);\n\t\tplayerBlack = spawnPlayer(Color.BLACK);\n\t\tplayerWhite = spawnPlayer(Color.WHITE);\n\t\tpropertySupport = new PropertyChangeSupport(this);\n\t\tinitialisationBoard();\n\t\tcurrentPlayer = playerBlack;\n\t\tfoeHasPlay = true;\n\t\taiPlay = false;\n\t}",
"public void initialize() {\n\n\t\tif (sentryWeight <= 0)\n\t\t\tsentryWeight = 1.0;\n\t\tif (AttackRateSeconds > 30)\n\t\t\tAttackRateSeconds = 30.0;\n\n\t\tif (sentryHealth < 0)\n\t\t\tsentryHealth = 0;\n\n\t\tif (sentryRange < 1)\n\t\t\tsentryRange = 1;\n\t\tif (sentryRange > 100)\n\t\t\tsentryRange = 100;\n\n\t\tif (sentryWeight <= 0)\n\t\t\tsentryWeight = 1.0;\n\n\t\tif (RespawnDelaySeconds < -1)\n\t\t\tRespawnDelaySeconds = -1;\n\n\t\tif (Spawn == null)\n\t\t\tSpawn = myNPC.getBukkitEntity().getLocation();\n\n\n\t\t// defaultSpeed = myNPC.getNavigator().getSpeed();\n\n\t\t((CraftLivingEntity) myNPC.getBukkitEntity()).getHandle().setHealth(sentryHealth);\n\n\t\t_myDamamgers.clear();\n\n\t\tthis.sentryStatus = Status.isLOOKING;\n\t\tfaceForward();\n\n\t\tshootanim = new Packet18ArmAnimation( ((CraftEntity)myNPC.getBukkitEntity()).getHandle(),1);\n\t\thealanim = new Packet18ArmAnimation( ((CraftEntity)myNPC.getBukkitEntity()).getHandle(),6);\n\n\t\t//\tPacket derp = new net.minecraft.server.Packet15Place();\n\n\n\t\tmyNPC.getBukkitEntity().teleport(Spawn); //it should be there... but maybe not if the position was saved elsewhere.\n\n\t\t// plugin.getServer().broadcastMessage(\"NPC GUARDING!\");\n\n\t\tif (taskID == null) {\n\t\t\ttaskID = plugin.getServer().getScheduler().scheduleSyncRepeatingTask(plugin, new SentryLogicRunnable(), 40, _logicTick);\n\t\t}\n\n\n\t}",
"public void startGame() {\n message.openingWarVariation(gameVariation, iterations);\n setHands(player1, player2, player3, deck);\n while (versus(player1, player2, player3)) {\n }\n determineOutcome(gameVariation);\n }",
"public BattleWorld(int enemyPokemonID)\r\n {\r\n wildPokemon = false;\r\n isBattleOver = false;\r\n initWorld(\"\", 0, enemyPokemonID);\r\n }",
"public Stage1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1200, 900, 1);\n \n GreenfootImage image = getBackground();\n image.setColor(Color.BLACK);\n image.fill();\n star();\n \n \n \n //TurretBase turretBase = new TurretBase();\n playerShip = new PlayerShip();\n scoreDisplay = new ScoreDisplay();\n addObject(scoreDisplay, 100, 50);\n addObject(playerShip, 100, 450);\n \n }",
"public Inventory() {\r\n initialize();\r\n }",
"public void initGame() {\n\r\n\t\tscore = 0;\r\n\t\tshipsLeft = MAX_SHIPS;\r\n\t\tasteroidsSpeed = MIN_ROCK_SPEED;\r\n\t\tnewShipScore = NEW_SHIP_POINTS;\r\n\t\tnewUfoScore = NEW_UFO_POINTS;\r\n\t\tShip.initShip();\r\n\t\tinitPhotons();\r\n\t\tstopUfo();\r\n\t\tstopMissle();\r\n\t\tinitAsteroids();\r\n\t\tinitExplosions();\r\n\t\tplaying = true;\r\n\t\tpaused = false;\r\n\t\tphotonTime = System.currentTimeMillis();\r\n\t}",
"public BoardGame()\n\t{\n\t\tplayerPieces = new LinkedHashMap<String, GamePiece>();\n\t\tplayerLocations = new LinkedHashMap<String, Location>();\n\t\t\n\t}",
"public War()\n {\n //create deck of cards\n deck.shuffle();\n \n //deal cards to two different hands\n while(!deck.isEmpty())\n {\n card=deck.dealCard();\n player1Hand.enqueue(card);\n \n card=deck.dealCard();\n player2Hand.enqueue(card);\n }\n \n }",
"public Game()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 400, 1, false); \n Greenfoot.start(); //Autostart the game\n Greenfoot.setSpeed(50); // Set the speed to 30%\n setBackground(bgImage);// Set the background image\n \n //Create instance\n \n Airplane gameplayer = new Airplane ();\n addObject (gameplayer, 100, getHeight()/2);\n \n }",
"public Game() {\n\n\t}",
"private void init() {\n healthBars = new TextureAtlas( Gdx.files.internal( \"health/health.pack\" ) );\n buildUIElements();\n }",
"public void initMission() {\n\t\tinitNumOfMoves();\t//reset counter\n\t\t//Begin by creating a random board.\n\t\t/* 1st parameter: is the cell at (0,0) always empty?\n\t\t * 2nd parameter: will this board be accessed by the AI?\n\t\t * See the constructor comments in Board.java for more details. */\n\n\t\tboard = new Board(this.options.toUpperCase().contains(\"00\") ? true : false, false);\n\n\t\t//TODO OPTIONAL: instead of spawning a random board, we can customize\n\t\t//our own board! Just un-comment any of the below boards or paste your own!\n\n\t\t//Wastes to the right AND to the south! Watch how the AI would react.\n\t\t//try one-player AI version (aggressive or not, doesn't matter)\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"P\", \"W\", \"\", \"\", \"\"},\n//\t\t\t\t {\"W\", \"\", \"\", \"\", \"G\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"P\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\t\t//What's the most efficient way for the AI to find the victim?\n\t\t//Note there are no wastes or fire pits in this scenario.\n//\t\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \"G\", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" },\n//\t\t\t\t{\" \", \" \", \" \", \" \", \" \", \" \" }\n//\t\t\t\t});\n\n\t\t//Impossible one. Useful for explaining probability during presentation.\n//\t\t\t\t\t\tboard = new Board(new String[][]\n//\t\t\t\t\t\t\t\t{{\"\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"P\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"W\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"\", \"\", \"W\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t{\"\", \"G\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t\t\t\t\t});\n\n\t\t/* Very tough board, but the AI is up to the task. */\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"P\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"W\", \"\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t {\"G\", \"\", \"\", \"W\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t//tough tough tough. The victim is surrounded by a wall of fire!\n\t\t//try it with 2 AI's, starting in random cell. One of them might die!\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"P\", \"\", \"G\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"P\", \"W\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"W\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"P\"},\n//\t\t\t\t {\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t//with aggressiveModeOn set to true, the AI will disinfect both wastes.\n\t\t//if set to false, the AI will disinfect only one.\n\t\t//Either way, AI gets the victim.\n\t\t//\t\t\t\tboard = new Board(new String[][]\n\t\t//\t\t\t\t\t\t{{\"\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"\", \"\", \"P\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"W\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"\", \"W\", \"\", \"G\", \"\", \"P\"},\n\t\t//\t\t\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n\t\t//\t\t\t\t\t\t});\n\n\n\t\t//RARE situation (one-player mode) where setting aggressiveModeOn to true will result in death.\n\t\t//Non-aggressive mode will get the victim. Start at cell (0,0).\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"P\", \"G\", \"P\"},\n//\t\t\t\t{\"\", \"\", \"P\", \"W\", \"W\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"P\", \"P\", \"\"},\n//\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\n\t\t//Very rare instance. if both players are AI and start at cell (0,0),\n\t\t//they will BOTH die. However, note that it's not the AI's fault.\n\t\t//The AI still managed to MINIMIZE risk. They just got unlucky.\n//\t\tboard = new Board(new String[][]\n//\t\t\t\t{{\"\", \"\", \"\", \"\", \"P\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"W\", \"P\", \"\", \"\", \"\"},\n//\t\t\t\t{\"W\", \"\", \"\", \"\", \"G\", \"\"},\n//\t\t\t\t{\"P\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t{\"\", \"\", \"\", \"\", \"\", \"\"},\n//\t\t\t\t});\n\n\t\t/* Use custom method in Board class to print the board to the console and save it to a text file.\n\t\t * See the method comments in Board.java class for more details. */\n\t\tboard.printBoard();\n\n\t\t/* Initialize the cell in which the players will start the mission. */\n\t\tCell startRoom;\n\t\tCellAsPerceivedByAI startRoomAI;\n\t\tCell[] startRooms = this.setStartRoomAndBoardAI(this.options.toUpperCase().contains(\"00\"));\n\t\tstartRoom = startRooms[0];\n\t\tstartRoomAI = (CellAsPerceivedByAI)startRooms[1];\n\n\t\tthis.createPlayers(startRoom, startRoomAI, this.p1Name, this.p2Name,\n\t\t\t\tthis.options.toUpperCase().contains(\"A1\"), this.options.toUpperCase().contains(\"A2\"), this.options.toUpperCase().contains(\"S\"),\n\t\t\t\tthis.options.toUpperCase().contains(\"H\") ? \"H\" : this.options.toUpperCase().contains(\"R\") ? \"R\" : \"B\");\t//create players\n\n\t\tthis.hideAllPics();\n\t\tgreyOutCell(startRoomAI.getX(), startRoomAI.getY());\n\t\trepaint();\n\t}",
"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 Chamber() {\n this.treasures = new ArrayList<Treasure>();\n this.monsters = new ArrayList<Monster>();\n this.doors = new ArrayList<Door>();\n myContents = new ChamberContents();\n d20 = new D20();\n makeShape(mySize);\n d100 = new Percentile();\n stairs = null;\n trap = null;\n //choosing contents randomly\n myContents.chooseContents(d20.roll());\n //checking descriptions and creating contents accordingly\n makeContents();\n //calls setExits to set all exits of a chamber\n setExits();\n\n }",
"public DwarfEnemy()\r\n\t{\r\n\t\tdamagePower = GameStatics.Enemies.Dwarf.damagePower;\r\n\t\tspeed = GameStatics.Enemies.Dwarf.speed;\r\n\t\thp = GameStatics.Enemies.Dwarf.initHp;\r\n\t}",
"public Controller()\r\n {\r\n fillBombs();\r\n fillBoard();\r\n scoreBoard = new ScoreBoard();\r\n }",
"@Override\n\tpublic void init() {\n\t\tworld = new World(gsm);\n\t\tworld.init();\n\t\t\n\t\tif(worldName == null){\n\t\t\tworldName = \"null\";\n\t\t\tmap_name = \"map\";\n\t\t} \n\t\tworld.generate(map_name);\n\t}",
"public Game() {}",
"private Game() {\n\t\tlabyrinth = Labyrinth.getInstance();\n\t\tplayer = Player.getInstance();\n\n\t\tcandies = new HashMap<>();\n\t\tenemies = new HashMap<>();\n\t\tbuttons = new HashMap<>();\n\n\t\tgenerateCandies();\n\t\tgenerateEnemies();\n\t\t//generateButtons();\n\n\t\tscore = Score.getInstance();\n\n\t\t//Put the door randomly.\n int coordX = ThreadLocalRandom.current().nextInt(0, 16);\n int coordY = ThreadLocalRandom.current().nextInt(0, 16);\n\t\tthis.door = Door.getInstance(coordX, coordY);\n\t}",
"public Cheats() {\n\t\tinitComponents();\n\t}",
"public BattleWeaponsSegmentAction() {\n }",
"public Player(Room room)\n {\n Inventory = new HashMap<String, Items>();\n currentRoom = room; //Starting Room Number 1\n itemsHeld = 0; //Start with no items being held\n itemLimit = 2; // can only hold 2 items until a backpack\n Inventory = new HashMap<String, Items>();\n \n roomHistory = new Stack<Room>();\n \n haveBackpack = false; //no backpack at start\n usingFlashlight = false;\n }",
"private void prepare()\n {\n addObject(player,185,196);\n player.setLocation(71,271);\n Ground ground = new Ground();\n addObject(ground,300,360);\n invent invent = new invent();\n addObject(invent,300,375);\n }",
"public void initialise()\r\n {\n Deck d = new Deck();\r\n d.shuffle();\r\n //Deal cards to players\r\n Iterator<Card> it = d.iterator();\r\n int count = 0;\r\n while (it.hasNext())\r\n {\r\n players[count % nosPlayers].addCard(it.next());\r\n it.remove();\r\n ++count;\r\n }\r\n //Initialise Discards\r\n discards = new Hand();\r\n //Chose first player\r\n currentPlayer = 0;\r\n currentBid = new Bid();\r\n currentBid.setRank(Card.Rank.TWO);\r\n }"
]
| [
"0.738602",
"0.7246132",
"0.6960692",
"0.651809",
"0.63326705",
"0.63113075",
"0.63102186",
"0.62714374",
"0.62570155",
"0.6248426",
"0.6239063",
"0.6230058",
"0.61710703",
"0.6168952",
"0.61657906",
"0.61410445",
"0.6140685",
"0.61261284",
"0.6119456",
"0.6114515",
"0.6100942",
"0.60911334",
"0.60906786",
"0.60850483",
"0.6084383",
"0.60795504",
"0.6079066",
"0.6063802",
"0.6054289",
"0.6053922",
"0.60425115",
"0.603599",
"0.6026016",
"0.6026016",
"0.60197115",
"0.60119",
"0.59892875",
"0.5987671",
"0.598422",
"0.5978169",
"0.5977564",
"0.59499973",
"0.59430754",
"0.59394306",
"0.5929143",
"0.5916235",
"0.5914587",
"0.58916163",
"0.58851457",
"0.58656186",
"0.5865386",
"0.5864308",
"0.5864061",
"0.5839421",
"0.583801",
"0.5831079",
"0.58205074",
"0.5811277",
"0.58044344",
"0.58034545",
"0.5802817",
"0.58021766",
"0.5795176",
"0.57923174",
"0.5791654",
"0.5789351",
"0.5788612",
"0.5786038",
"0.5783685",
"0.5781778",
"0.57750326",
"0.5770497",
"0.57664806",
"0.5762581",
"0.5762485",
"0.5762139",
"0.57612956",
"0.5760198",
"0.57549137",
"0.5746543",
"0.5743343",
"0.5741017",
"0.57401675",
"0.5739591",
"0.57391167",
"0.57317764",
"0.5721142",
"0.5720322",
"0.5712058",
"0.5710372",
"0.5697406",
"0.56937206",
"0.5692773",
"0.5690408",
"0.5684183",
"0.5679679",
"0.567697",
"0.56736326",
"0.56718606",
"0.56713504",
"0.56674874"
]
| 0.0 | -1 |
Adds a new Pokemon to the world. | public void addNewPokemon(String type, int index, String tempName, int tempLevel)
{
if(type.equals("Player"))
{
if(getObjects(Pokemon.class).size() == 2)
{
savePokemonData(playerPokemon, currentPlayerPokemon);
removeObject(playerPokemon);
}
for(int i = 0; i < 6; i++)
{
if(Reader.readIntFromFile("playerPokemon", index, 3) > 0)
{
makePlayerPokemon(index);
break;
}
index++;
}
playerPokemonName = playerPokemon.getName();
addObject(playerPokemon, getWidth() / 4, getHeight() / 2 - 12);
if(getObjects(Pokemon.class).size() == 2)
{
playerPkmnInfoBox.drawAll();
}
}
else if(type.equals("Enemy"))
{
if(getObjects(Pokemon.class).size() == 2)
{
removeObject(enemyPokemon);
}
if(!wildPokemon)
{
String enemyPkmnName = Reader.readStringFromFile("pokeMonListBattle", index, 0);
int enemyPkmnLevel = Reader.readIntFromFile("pokeMonListBattle", index, 1);
boolean enemyPkmnGender = Reader.readBooleanFromFile("pokeMonListBattle", index, 2);
int enemyPkmnCurrentHealth = Reader.readIntFromFile("pokeMonListBattle", index, 3);
this.enemyPokemon = new Pokemon(currentEnemyPokemon, enemyPkmnName, enemyPkmnLevel, enemyPkmnGender, enemyPkmnCurrentHealth, 0, false);
enemyPokemonName = enemyPkmnName;
addObject(enemyPokemon, 372, 84);
}
else
{
this.enemyPokemon = new Pokemon(currentEnemyPokemon, tempName, tempLevel, getRandomBoolean(), 9999, 0, false);
enemyPokemonName = tempName;
addObject(enemyPokemon, 372, 84);
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void addNewPokemon(Pokemon pokemon) {\n try {\n PokemonSpecies pokemonSpecies = findSeenSpeciesData(pokemon.getSpecies());\n // then this Pokemon has been encountered before, just add to inventory\n pokemonSpecies.addNewPokemon(pokemon);\n } catch (PokedexException e) {\n // then this Pokemon has not been encountered before, make record of it then add to inventory\n PokemonSpecies pokemonSpecies = new PokemonSpecies(pokemon.getPokedexNumber(), pokemon.getSpecies(), 0);\n pokemonSpecies.addNewPokemon(pokemon);\n addNewSpecies(pokemonSpecies);\n }\n }",
"void addPokemon(Pokemon pokemon) {\n pokemonList.add(pokemon);\n notifyItemInserted(pokemonList.size());\n }",
"public void addPokemon(Pokemon p)\n\t{\n\t\t/* See if there is space in the player's party */\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] == null)\n\t\t\t{\n\t\t\t\tm_pokemon[i] = p;\n\t\t\t\tupdateClientParty(i);\n\t\t\t\treturn;\n\t\t\t}\n\t\t/* Else, find space in a box */\n\t\tfor(int i = 0; i < m_boxes.length; i++)\n\t\t\tif(m_boxes[i] != null)\n\t\t\t{\n\t\t\t\t/* Find space in an existing box */\n\t\t\t\tfor(int j = 0; j < m_boxes[i].getPokemon().length; j++)\n\t\t\t\t\tif(m_boxes[i].getPokemon(j) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tm_boxes[i].setPokemon(j, p);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* We need a new box */\n\t\t\t\tm_boxes[i] = new PokemonBox();\n\t\t\t\tm_boxes[i].setPokemon(0, p);\n\t\t\t\tbreak;\n\t\t\t}\n\t}",
"public void addPokemon(Pokemon pokemon) {\r\n\t\tif (caughtPokemon.containsKey(pokemon.getName())) {\r\n\t\t\tcaughtPokemon.put(pokemon.getName(), caughtPokemon.get(pokemon.getName()) + 1);\r\n\t\t} else {\r\n\t\t\tcaughtPokemon.put(pokemon.getName(), 1);\r\n\t\t}\r\n\r\n\t\tif (!(ownedPokemon.contains(pokemon))) {\r\n\r\n\t\t\townedPokemon.add(pokemon);\r\n\t\t}\r\n\t}",
"private void add(String name) {\n try {\n PokemonToEdit pkm = Reader.readPokemon(name);\n team.add(pkm);\n System.out.println(name + \" has been add to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException e) {\n System.out.println(\"Pokemon not found natively\");\n System.out.println(\"Try looking for the pokemon online\");\n try {\n PokemonToEdit pkm = Crawler.loadPokemon(name);\n Saver.savePokemon(pkm);\n team.add(pkm);\n System.out.println(name + \" has been added to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException ex) {\n System.out.println(\"Pokemon not found\");\n } catch (TeamFullException ex) {\n System.out.println(\"Team is full\");\n }\n } catch (TeamFullException e) {\n System.out.println(\"Team is full\");\n\n }\n }",
"public void addNewSpecies(PokemonSpecies species) {\n pokedex.add(species);\n }",
"@Override\n public boolean add(IPokemon pokemon) {\n if (!this.isFull()){\n this.bench.add(pokemon);\n return true;\n } return false;\n }",
"public Pokemon() {\n }",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"public Pokemon(String name, int health, int speed, String type)\n {\n this.name = name;\n this.health = health;\n this.speed = speed;\n this.type = type;\n }",
"public Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}",
"public Pokemon(String name, int number) {\r\n this.name = name;\r\n this.number = number;\r\n }",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"public void insertPokemon(Pokemon p) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(p);\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}",
"Pokemon() {\n // we want to set level to 1 for every pokemon initially\n count++;\n level = 1;\n }",
"public Pokemon(int hp){\r\n this.hp = hp;\r\n }",
"public PokemonEntity create(PokemonEntity pokemon )\n {\n em.persist(pokemon);\n return pokemon;\n }",
"public Pokemon (int id, String nombre, int evolucion, String tipo,String rutaImagen)\r\n\t{\r\n\t\tthis.id = id;\r\n\t\tthis.nombre = nombre;\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=tipo;\r\n\t\tthis.evolucion = evolucion;\r\n\t\tthis.rutaImagen = rutaImagen;\r\n\t}",
"public void makePlayerPokemon(int index)\r\n {\r\n String playerPkmnName = Reader.readStringFromFile(\"playerPokemon\", index, 0);\r\n int playerPkmnLevel = Reader.readIntFromFile(\"playerPokemon\", index, 1);\r\n boolean playerPkmnGender = Reader.readBooleanFromFile(\"playerPokemon\", index, 2);\r\n int playerPkmnCurrentHealth = Reader.readIntFromFile(\"playerPokemon\", index, 3);\r\n int playerPkmnExp = Reader.readIntFromFile(\"playerPokemon\", index, 4);\r\n this.playerPokemon = new Pokemon(currentPlayerPokemon, playerPkmnName, playerPkmnLevel, playerPkmnGender, playerPkmnCurrentHealth, playerPkmnExp, true);\r\n }",
"public void addPlayer(Player p){\r\n this.players[PlayerFactory.nb_instances-1]=p;\r\n this.tiles[p.getX()+(p.getY()*this.width)]=p;\r\n }",
"@Override\n public void add(Object o) {\n gameCollection.addElement(o);\n }",
"public Pokemon (int id, String nombre,int Nivel, int Vidas, int evolucion, String tipo,String rutaImagen)\r\n\t{\r\n\t\tthis.id = id;\r\n\t\tthis.nombre = nombre;\r\n\t\tsetVidas(vidas);\r\n\t\tsetNivel(nivel);\r\n\t\tthis.evolucion = evolucion;\r\n\t\tthis.tipo = tipo;\r\n\t\tthis.rutaImagen = rutaImagen;\r\n\t}",
"public Builder addReservePokemon(POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (reservePokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReservePokemonIsMutable();\n reservePokemon_.add(value);\n onChanged();\n } else {\n reservePokemonBuilder_.addMessage(value);\n }\n return this;\n }",
"public void addPotion() {\n setPotion(getPotion() + 1);\n }",
"public PokemonHielo(Pokemon pokemon) {\n \tsuper(pokemon,500,100,120);\n }",
"public void addToNeighborhood(Pokemon pokemon)\n\t{\n\t\tint counter = 0;\n\t\tfor (int i=0; i<pokemon.getPossibleMovesArray().length-2; i++)\n\t\t{\n\t\t\tfor (int j=i+1; j<pokemon.getPossibleMovesArray().length-1; j++)\n\t\t\t{\n\t\t\t\tfor (int k=j+1; k<pokemon.getPossibleMovesArray().length; k++)\n\t\t\t\t{\n\t\t\t\t\tif (Arrays.asList(pokemon.getSelectedMovesArray()).contains((pokemon.getPossibleMovesArray())[i]) && \n\t\t\t\t\t\t\tArrays.asList(pokemon.getSelectedMovesArray()).contains((pokemon.getPossibleMovesArray())[j]) &&\n\t\t\t\t\t\t\tArrays.asList(pokemon.getSelectedMovesArray()).contains((pokemon.getPossibleMovesArray())[k]))\n\t\t\t\t\t{\n\t\t\t\t\t\tArrayList<Pokemon> neighborhood = listOfNeighborhoods.get(counter);\n\t\t\t\t\t\tneighborhood.add(pokemon);\n\t\t\t\t\t\tlistOfNeighborhoods.set(counter, neighborhood);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcounter++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void actionPerformed(ActionEvent event)\n {\n label.append(\"\\n\" + pokemonName);\n party.add(pokemon);\n }",
"public Pokedex() {\n pokedex = new ArrayList<PokemonSpecies>();\n }",
"public void addExercise(Exercise p) {\n exercises.add(p);\n }",
"public PokemonTrainer(String name, ArrayList<AbstractPokemon> pokemonList)\n {\n faveType = AbstractPokemon.Type.ANY_TYPE;\n pokeball = new Pokeball();\n caughtPokemon = pokemonList;\n this.name = name;\n setColor(null);\n }",
"public Pokemon(String species, Type type1, Type type2, int hp, int atk, int def, int spc, int spd, int baseSpd, Move move1, Move move2, Move move3, Move move4) {\n this.SPECIES = species;\n this.TYPE1 = type1;\n this.TYPE2 = type2;\n\n this.HP = hp;\n this.currentHp = hp;\n this.ATK = atk;\n this.currentAtk = atk;\n this.DEF = def;\n this.currentDef = def;\n this.SPC = spc;\n this.currentSpc = spc;\n this.SPD = spd;\n this.currentSpd = spd;\n\n this.baseSpd = baseSpd;\n\n this.atkStageMultiplier = 0;\n this.defStageMultiplier = 0;\n this.spcStageMultiplier = 0;\n this.spdStageMultiplier = 0;\n\n this.moves = new ArrayList<Move>();\n moves.add(move1);\n moves.add(move2);\n moves.add(move3);\n moves.add(move4);\n\n this.status1 = Status.HEALTHY;\n this.status1Counter = 0;\n this.status2 = Status.HEALTHY;\n this.status2Counter = 0;\n\n this.hyperBeamRecharge = false;\n }",
"void addPiece(Piece piece);",
"public Builder addReservePokemon(\n int index, POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (reservePokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReservePokemonIsMutable();\n reservePokemon_.add(index, value);\n onChanged();\n } else {\n reservePokemonBuilder_.addMessage(index, value);\n }\n return this;\n }",
"public PokemonTrainer(String name, ArrayList<AbstractPokemon> pokemonList, AbstractPokemon.Type type)\n {\n faveType = type;\n pokeball = new Pokeball();\n caughtPokemon = pokemonList;\n this.name = name;\n setColor(null);\n }",
"public Pokemon(int pokeNumber, String pokeName, String pokeType_1, int hitPoints) {\n this.pokeNumber = pokeNumber;\n this.pokeName = pokeName;\n this.pokeType_1 = pokeType_1;\n this.hitPoints = hitPoints;\n }",
"@Override\n\tpublic Pokemon createPokemon(int index, int cp, int hp, int dust, int candy) throws PokedexException {\n\t\tint id = index +1;\n\t\t\t\t\n\t\tPokemon poke;\n\t\t\n\t\t// Connection au service web\n\t\tIPokemonService service = new PokemonService();\n\t\tMap<String, Object> data = service.getPokemonMetadata(id);\n\t\tMap<String, Object> ivs = service.getPokemonIVs(id, cp, hp, dust);\n\t\t\n\t\tif (data.containsKey(PokemonService.ERROR_KEY)) {\n\t\t\tthrow new PokedexException((String) data.get(PokemonService.ERROR_KEY));\n\t\t\t//System.out.println(\"*** ERREUR : \" + data.get(PokemonService.ERROR_KEY) + \" ***\");\n\t\t\t//poke = new Pokemon(index, \"\", 0, 0, 0, cp, hp, dust, candy, 0);\n\t\t}\n\t\t\n\t\telse if (ivs.containsKey(PokemonService.ERROR_KEY)) {\n\t\t\tthrow new PokedexException((String) ivs.get(PokemonService.ERROR_KEY));\n\t\t\t//System.out.println(\"*** ERREUR : \" + ivs.get(PokemonService.ERROR_KEY) + \" ***\");\n\t\t\t//poke = new Pokemon(index, \"\", 0, 0, 0, cp, hp, dust, candy, 0);\n\t\t\t/*\n\t\t\tpoke = new Pokemon(index,\n\t\t\t\t\t(String) data.get(\"name\"),\n\t\t\t\t\t(int) data.get(\"attack\"),\n\t\t\t\t\t(int) data.get(\"defense\"),\n\t\t\t\t\t(int) data.get(\"stamina\"),\n\t\t\t\t\tcp, hp, dust, candy, 0);\n\t\t\t*/\n\t\t}\n\t\t\n\t\telse {\n\t\t\tpoke = new Pokemon(index,\n\t\t\t\t\tPokemonTranslate.getInstance().getFrenchName((String) data.get(\"name\")),\n\t\t\t\t\t(int) data.get(\"attack\"),\n\t\t\t\t\t(int) data.get(\"defense\"),\n\t\t\t\t\t(int) data.get(\"stamina\"),\n\t\t\t\t\tcp, hp, dust, candy,\n\t\t\t\t\t(double) ivs.get(\"perfection\"));\n\t\t}\n\t\t\n\t\treturn poke;\n\t}",
"public void catchPokemon(Pokemon p)\n\t{\n\t\tDate d = new Date();\n\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd:HH-mm-ss\").format(d);\n\t\tp.setDateCaught(date);\n\t\tp.setOriginalTrainer(getName());\n\t\tp.setDatabaseID(-1);\n\t\taddPokemon(p);\n\t\taddTrainingExp(1000 / p.getRareness());\n\t\tif(!isPokemonCaught(p.getPokedexNumber()))\n\t\t\tsetPokemonCaught(p.getPokedexNumber());\n\t}",
"public void addNewPlayer(Player p) {\n\t\t// if the player don't exists in the highscore list the player is added\n\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\tif(highscore.get(p.getName()) == null) {\n\t\t\t\thighscore.put(p.getName(), 0);\n\t\t\t}\n\t\t}\n\t\tthis.playerList.add(p); \n\t}",
"private void addHero()\n {\n // Initial horizontal position\n int initialX = TILE_SIZE;\n\n // Instantiate the hero object\n theHero = new Hero(initialX);\n\n // Add hero in bottom left corner of screen\n addObject(theHero, initialX, 8 * TILE_SIZE);\n }",
"public boolean addPlayer(int pno){\n\t\t\n\t\t// Gets the coordinates of a non-wall and non-occupied space\n\t\tint[] pos = initiatePlayer(pno);\n\t\t\n\t\t// If a free space could not be found, return false and the client will be force quit\n\t\tif (pos == null){\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Put the player into the HashMaps\n\t\tplayerPosition.put(pno, pos);\n\t\tcollectedGold.put(pno, 0);\n\t\t\n\t\treturn true;\n\t}",
"public void addPlayer(String p) {\n this.playersNames.add(p);\n }",
"public void addPlayer(int place, Player p) {\r\n\t\tif (!players.containsKey(place))\r\n\t\t\tplayers.put(place, p);\r\n\t}",
"public void addPiece(Piece p) {\n\t\tpieces.add(p);\n\t}",
"public Pokemon(PokemonData data, int level) {\n\t\tthis.data = data;\n\t\tthis.level = level;\n\t\tthis.status = PokemonStatus.NORMAL;\n\t\tthis.stats = new PokemonStats(level, data.getBaseStats());\n\t\tthis.currentHp = stats.getHp();\n\t\tthis.attacks = new PokemonAttacks(data.getLearnAttackList(), level);\n\t}",
"public void addPlayer(Player player){\n players.add(player);\n }",
"public Pokemon(int xPos, int yPos, Rectangle bounds) {\n this.xPos = xPos;\n this.yPos = yPos;\n this.bounds = bounds;\n }",
"public World addPlayer(Player p){\r\n players.add(p);\r\n return this;\r\n }",
"public void drawPokemon() {\n setAttackText();\n drawImage();\n }",
"public Battle(Pokemon[] yourPokemon, Pokemon[] foePokemon) {\r\n\t\tthis.yourPokemon = yourPokemon;\r\n\t\tthis.foesPokemon = foePokemon;\r\n\t}",
"public PokemonTrainer(String name, ArrayList<AbstractPokemon> pokemonList, AbstractPokemon.Type type, Pokeball pb)\n {\n faveType = type;\n pokeball = pb;\n caughtPokemon = pokemonList;\n this.name = name;\n setColor(null);\n }",
"public void add(GameObject newObject) {\n\t\tgameObjects.addElement(newObject);\n\t}",
"public ArrayList<AbstractPokemon> selectPokemon()\n {\n /**\n * Tells the Java Runtime Environment to add a certain Pokemon to a list of Pokemon when a button is clicked.\n * \n * @author Jonathan Lowe\n * @version 1.0.0\n */\n class PokemonClickListener implements ActionListener\n {\n private JTextArea label;\n private String pokemonName;\n private AbstractPokemon pokemon;\n private ArrayList<AbstractPokemon> party;\n \n /**\n * Creates a copy of the Pokemon to be stored in the list of Pokemon\n * \n * @param list The list the selected Pokemon will be added to\n * @param label The output stream to be updated when a Pokemon is added\n * @param poke The Pokemon to be added to the list\n */\n public PokemonClickListener(ArrayList<AbstractPokemon> list, JTextArea label, AbstractPokemon poke)\n {\n this.label = label;\n this.pokemonName = poke.toString();\n if(poke instanceof Bulbasaur)\n this.pokemon = new Bulbasaur();\n else if(poke instanceof Sunkern)\n this.pokemon = new Sunkern();\n else if(poke instanceof Oddish)\n this.pokemon = new Oddish();\n else if(poke instanceof Charmander)\n this.pokemon = new Charmander();\n else if(poke instanceof Vulpix)\n this.pokemon = new Vulpix();\n else if(poke instanceof Magby)\n this.pokemon = new Magby();\n else if(poke instanceof Squirtle)\n this.pokemon = new Squirtle();\n else if(poke instanceof Poliwhirl)\n this.pokemon = new Poliwhirl();\n else if(poke instanceof Magikarp)\n this.pokemon = new Magikarp();\n else\n this.pokemon = new Charmander();\n this.party = list;\n }\n \n /**\n * Adds the copied Pokemon to the list of Pokemon\n * \n * @param event The button click event\n */\n public void actionPerformed(ActionEvent event)\n {\n label.append(\"\\n\" + pokemonName);\n party.add(pokemon);\n }\n }\n \n /**\n * Tells the Java Runtime Environment to \"close\" the JFrame this button is found in\n * \n * @author Jonathan Lowe\n * @version 1.0.0\n */\n class ExitClickListener implements ActionListener\n {\n private JFrame frame;\n \n /**\n * Sets the JFrame to be closed\n * \n * @param frame The JFrame to be closed\n */\n public ExitClickListener(JFrame frame)\n {\n this.frame = frame;\n }\n \n /**\n * Closes the JFrame\n * \n * @param event The button click event\n */\n public void actionPerformed(ActionEvent event)\n {\n frame.dispatchEvent(new WindowEvent(frame, WindowEvent.WINDOW_CLOSING));\n }\n }\n \n JFrame frame = new JFrame();\n JTextArea label = new JTextArea(\"The Pokemon in your party:\", 7, 20);\n label.setEditable(false);\n JPanel masterPanel = new JPanel(new GridLayout(3, 1));\n JLabel title = new JLabel(\"Please select this trainer's Pokemon.\");\n JPanel titlePanel = new JPanel();\n titlePanel.setSize(10, 400);\n titlePanel.add(title);\n masterPanel.add(titlePanel);\n JPanel bottomPanel = new JPanel(new GridLayout(1, 2));\n ArrayList<AbstractPokemon> party = new ArrayList<AbstractPokemon>();\n JPanel leftPanel = new JPanel(new GridLayout(3, 3));\n JButton charmanderButton = new JButton(new ImageIcon(\"Charmander.gif\"));\n charmanderButton.addActionListener(new PokemonClickListener(party, label, new Charmander()));\n leftPanel.add(charmanderButton);\n JButton vulpixButton = new JButton(new ImageIcon(\"Vulpix.gif\"));\n vulpixButton.addActionListener(new PokemonClickListener(party, label, new Vulpix()));\n leftPanel.add(vulpixButton);\n JButton magbyButton = new JButton(new ImageIcon(\"Magby.gif\"));\n magbyButton.addActionListener(new PokemonClickListener(party, label, new Magby()));\n leftPanel.add(magbyButton);\n JButton squirtleButton = new JButton(new ImageIcon(\"Squirtle.gif\"));\n squirtleButton.addActionListener(new PokemonClickListener(party, label, new Squirtle()));\n leftPanel.add(squirtleButton);\n JButton poliwhirlButton = new JButton(new ImageIcon(\"Poliwhirl.gif\"));\n poliwhirlButton.addActionListener(new PokemonClickListener(party, label, new Poliwhirl()));\n leftPanel.add(poliwhirlButton);\n JButton magikarpButton = new JButton(new ImageIcon(\"Magikarp.gif\"));\n magikarpButton.addActionListener(new PokemonClickListener(party, label, new Magikarp()));\n leftPanel.add(magikarpButton);\n JButton bulbasaurButton = new JButton(new ImageIcon(\"Bulbasaur.gif\"));\n bulbasaurButton.addActionListener(new PokemonClickListener(party, label, new Bulbasaur()));\n leftPanel.add(bulbasaurButton);\n JButton sunkernButton = new JButton(new ImageIcon(\"Sunkern.gif\"));\n sunkernButton.addActionListener(new PokemonClickListener(party, label, new Sunkern()));\n leftPanel.add(sunkernButton);\n JButton oddishButton = new JButton(new ImageIcon(\"Oddish.gif\"));\n oddishButton.addActionListener(new PokemonClickListener(party, label, new Oddish()));\n leftPanel.add(oddishButton);\n bottomPanel.add(leftPanel);\n JPanel rightPanel = new JPanel();\n rightPanel.add(label);\n bottomPanel.add(rightPanel);\n masterPanel.add(bottomPanel);\n JButton exitButton = new JButton(\"Okay, I'm done\");\n exitButton.addActionListener(new ExitClickListener(frame));\n JPanel exitPanel = new JPanel();\n exitPanel.setSize(20, 100);\n exitPanel.add(exitButton);\n masterPanel.add(exitPanel);\n frame.add(masterPanel);\n frame.setTitle(\"Pokemon Selection\");\n frame.setSize(600, 400);\n frame.setVisible(true);\n \n return party;\n }",
"public PokemonClickListener(ArrayList<AbstractPokemon> list, JTextArea label, AbstractPokemon poke)\n {\n this.label = label;\n this.pokemonName = poke.toString();\n if(poke instanceof Bulbasaur)\n this.pokemon = new Bulbasaur();\n else if(poke instanceof Sunkern)\n this.pokemon = new Sunkern();\n else if(poke instanceof Oddish)\n this.pokemon = new Oddish();\n else if(poke instanceof Charmander)\n this.pokemon = new Charmander();\n else if(poke instanceof Vulpix)\n this.pokemon = new Vulpix();\n else if(poke instanceof Magby)\n this.pokemon = new Magby();\n else if(poke instanceof Squirtle)\n this.pokemon = new Squirtle();\n else if(poke instanceof Poliwhirl)\n this.pokemon = new Poliwhirl();\n else if(poke instanceof Magikarp)\n this.pokemon = new Magikarp();\n else\n this.pokemon = new Charmander();\n this.party = list;\n }",
"public void addNewEntity() {\n Random random = new Random();\n int bound = Aquarium.WIDTH / 10;\n int randX = bound + random.nextInt(Aquarium.WIDTH - (2 * bound));\n int randY = bound + random.nextInt(Aquarium.HEIGHT - (2 * bound));\n Piranha newPiranha = new Piranha(randX, randY);\n piranhas.add(newPiranha);\n }",
"public Builder addFaintedPokemon(POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (faintedPokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFaintedPokemonIsMutable();\n faintedPokemon_.add(value);\n onChanged();\n } else {\n faintedPokemonBuilder_.addMessage(value);\n }\n return this;\n }",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto.Builder addReservePokemonBuilder() {\n return getReservePokemonFieldBuilder().addBuilder(\n POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance());\n }",
"public void addPet(VirtualPet pet) {\n\t\tshelterPets.put(pet.name, pet);\n\t}",
"void addPerson(Player player);",
"public PokemonPark(){\n super(\"Pokemon Park\", \"Una vez por turno blabla\");\n }",
"public void addPaddle(Paddle newPaddle) {\n\t\tGAME_PADDLE = newPaddle;\n\t}",
"public static void addOccupied(Point p) {\r\n\t\tif (!_playerOccupied.contains(p))\r\n\t\t\t_playerOccupied.add(p);\r\n\t}",
"@Test\n public void testAddPiece() {\n System.out.println(\"addPiece\");\n\n Piece piece = new Piece(PlayerColor.WHITE, 3);\n Player instance = new Player(PlayerColor.WHITE, \"\");\n\n instance.addPiece(piece);\n\n assertTrue(instance.getBagContent().contains(piece));\n }",
"public void add(WorldObject obj) {\n\troomList.add(obj);\n}",
"void addPlayer(Player newPlayer);",
"public void getStarterPokemon() {\r\n\t\taddPokemon(new Persian(\"Persian\", null, 30, 30, 30, 30));\r\n\t\tresetCaughtPokemon();\r\n\t}",
"@Override\n\tpublic void add(Game game) {\n\t\t\n\t}",
"public Builder addFaintedPokemon(\n int index, POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (faintedPokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureFaintedPokemonIsMutable();\n faintedPokemon_.add(index, value);\n onChanged();\n } else {\n faintedPokemonBuilder_.addMessage(index, value);\n }\n return this;\n }",
"public void addPlayerShip()\n\t{\n\t\t//if a PlayerShip is already spawned, a new one will not be added\n\t\tif (gameObj[1].size() == 0)\n\t\t{\n\t\t\tgameObj[1].add(new PlayerShip());\n\t\t\tSystem.out.println(\"PlayerShip added\");\n\t\t}else{\n\t\t\tSystem.out.println(\"A player ship is already spawned\");\n\t\t}\n\t\t\n\t}",
"POGOProtos.Rpc.PokemonProto getPokemon();",
"public void visitBasicFightingPokemon(BasicFightingPokemon basicFightingPokemon) {\n }",
"public Pokemon getPlayerPokemon()\r\n {\r\n return playerPokemon;\r\n }",
"public boolean storePokemon(Pokemon pokemon, int boxNum) {\r\n\t\tif (pokemonBoxes.get(boxNum).isFull()) {\r\n\t\t\tSystem.out.println(\"Box \" + boxNum + \" is full!\");\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tpokemonBoxes.get(boxNum).getPokemons().add(pokemon);\r\n\t\t\tSystem.out.println(pokemon.getPokemonName().getName() + \" has been sent to box \" + boxNum);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public void addNewPiece() {\n\t\t// creates a range from 1-7 to choose from each of the pieces\n\t\tint pieceChoice = (int) (Math.random()*7) + 1; \n\t\tif(pieceChoice == 1) {\n\t\t\tcurrentPiece = new TetrisI();\n\t\t}\n\t\telse if(pieceChoice == 2) {\n\t\t\tcurrentPiece = new TetrisJ();\n\t\t}\n\t\telse if(pieceChoice == 3) {\n\t\t\tcurrentPiece = new TetrisL();\n\t\t}\n\t\telse if(pieceChoice == 4) {\n\t\t\tcurrentPiece = new TetrisO();\n\t\t}\n\t\telse if(pieceChoice == 5) {\n\t\t\tcurrentPiece = new TetrisS();\n\t\t}\n\t\telse if(pieceChoice == 6) {\n\t\t\tcurrentPiece = new TetrisT();\n\t\t}\n\t\telse {\n\t\t\tcurrentPiece = new TetrisZ();\n\t\t}\n\t\tcurrentPiece.pieceRotation = 0;\n\t\tinitCurrentGP();\n\t}",
"public void addPawn(Pawn.Color c) { pawn = new Pawn(c, Pawn.Type.BASIC); }",
"public Pokemon(boolean isFishing, boolean isFighting, int hitPoints, String name) {\n this.isFishing = isFishing;\n this.isFighting = isFighting;\n this.hitPoints = hitPoints;\n this.name = name;\n \n // ensures that hitPoints is never over 255\n this.tooHigh();\n\n }",
"public PerformAbilityVisitor(IPokemonCard pokemon) {\n this.pokemon = pokemon;\n }",
"@Override\n\tpublic Oglas addPonuda(Ponuda p, Long id) {\n\t\tOglas oglas = repository.findOne(id);\n\t\toglas.getPonudeZaOglas().add(p);\n\t\treturn repository.save(oglas);\n\t}",
"public void healPokemon()\n\t{\n\t\tfor(Pokemon pokemon : getParty())\n\t\t\tif(pokemon != null)\n\t\t\t{\n\t\t\t\tpokemon.calculateStats(true);\n\t\t\t\tpokemon.reinitialise();\n\t\t\t\tpokemon.setIsFainted(false);\n\t\t\t\tfor(int i = 0; i < pokemon.getMoves().length; i++)\n\t\t\t\t\tif(pokemon.getMoves()[i] != null)\n\t\t\t\t\t{\n\t\t\t\t\t\tPokemonMove move = pokemon.getMoves()[i].getMove();\n\t\t\t\t\t\tpokemon.setPp(i, move.getPp() * (5 + pokemon.getPpUpCount(i)) / 5);\n\t\t\t\t\t\tpokemon.setMaxPP(i, move.getPp() * (5 + pokemon.getPpUpCount(i)) / 5);\n\t\t\t\t\t}\n\t\t\t}\n\t\tServerMessage sendHeal = new ServerMessage(ClientPacket.POKES_HEALED);\n\t\tgetSession().Send(sendHeal);\n\t}",
"public void addPlayer(String name) {\n players.add(new Player(name));\n }",
"void createNewGame() {\n _gameList.add(new GameObject());\n Log.i(\"createGame\", \"Created New Game\");\n }",
"void addPowerup(int xPos, int yPos) {\n int powerupIndex = new Random().nextInt(this.numPups);\n Posn loc = new Posn(xPos, yPos);\n this.pUps.add(new Powerup(this.hungerDeltaPcrntArray.get(powerupIndex),\n this.speedDeltaPcrntArray.get(powerupIndex),\n this.pointsDeltaArray.get(powerupIndex), loc,\n new FromFileImage(loc, this.imageLocationArray\n .get(powerupIndex))));\n }",
"public void addPawn(Pawn pawn, Position position) {\n\t\tboardGrid[position.getRow()][position.getColumn()] = pawn;\n\t}",
"public void addVps(Player player) {\n }",
"public void addTile(Tile tile) {\n ownedTiles.add(tile);\n }",
"public Battle() {\r\n\t\tfoesPokemon = new Pokemon[] {\r\n\t\t\t\tnew Totodile(12),\r\n\t\t\t\tnew Bulbasaur(15),\r\n\t\t\t\tnew Combusken(20),\r\n\t\t\t\tnew Raichu(25),\r\n\t\t\t\tnew Venausaur(50),\r\n\t\t\t\tnew Blaziken(50)\r\n\t\t};\r\n\t\tyourPokemon = new Pokemon[] {\r\n\t\t\t\tnew Torchic(14),\r\n\t\t\t\tnew Ivysaur(18),\r\n\t\t\t\tnew Croconaw(20),\r\n\t\t\t\tnew Raichu(25),\r\n\t\t\t\tnew Blaziken(29),\r\n\t\t\t\tnew Feraligatr(40)\r\n\t\t};\r\n\t}",
"public void addPets(PetPOJO pet) {\n pets.add(pet);\n }",
"public static void main(String[] args) {\n\t\tPokemon firstPokemon = new Pokemon(\" P1 Typhlosion \", 1600, \" Fire \" , \" Healthy \" , \"Scratch\" , \"Bite\" , \"Fire Blast\", 300 , 375 , 450);\r\n\t\t Pokemon secondPokemon = new Pokemon(\" P2 Snorlax \", 1300, \" Normal \" , \" Healthy \" , \"Body Slam\" , \"Sleep\" , \"Swallow\", 500 , 100 , 200);\r\n\t\t System.out.println (firstPokemon.name + firstPokemon.health + firstPokemon.type + firstPokemon.status );\r\n\t\t System.out.println (secondPokemon.name + secondPokemon.health + secondPokemon.type + secondPokemon.status );\r\n\t\t Scanner myObj = new Scanner(System.in);\r\n\t\t\r\n\t\t \r\n\t\t System.out.println( \"P1 Turn. Enter number for corresponding attack! \" );\r\n\t\t System.out.println( \" 1(\" + firstPokemon.pAttack1 +\")\"+ \" 2(\" + firstPokemon.pAttack2 +\")\"+ \" 3(\" + firstPokemon.pAttack3 +\")\" );\r\n\t\t String battleCommand = myObj.nextLine();\r\n\t\t System.out.println (battleCommand);\r\n\t\t if (battleCommand.charAt(0) == '1') {\r\n\t\t\t System.out.println (firstPokemon.pAttack1);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '2') {\r\n\t\t\t System.out.println (firstPokemon.pAttack2);\r\n\t\t }\r\n\t\t else if (battleCommand.charAt(0) == '3') {\r\n\t\t\t System.out.println (firstPokemon.pAttack3);\r\n\t\t }\r\n\t\t else {\r\n\t\t\t System.out.println(\"Please enter the correct number.\");\r\n\t\t\t \r\n\t\t }\r\n\t}",
"private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }",
"boolean hasPokemon();",
"public void addPoint(T p) {\n points.add(p);\n }",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto.Builder addFaintedPokemonBuilder() {\n return getFaintedPokemonFieldBuilder().addBuilder(\n POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance());\n }",
"public Builder addReservePokemon(\n POGOProtos.Rpc.CombatProto.CombatPokemonProto.Builder builderForValue) {\n if (reservePokemonBuilder_ == null) {\n ensureReservePokemonIsMutable();\n reservePokemon_.add(builderForValue.build());\n onChanged();\n } else {\n reservePokemonBuilder_.addMessage(builderForValue.build());\n }\n return this;\n }",
"public BattleWorld(String pokemonName, int level)\r\n {\r\n wildPokemon = true;\r\n isBattleOver = false;\r\n initWorld(pokemonName, level, 0);\r\n }",
"public boolean addPlayerItem(PlayerItem playerItem);",
"public void addNewRecipe() {\r\n listOfRecipes.add(new Recipe().createNewRecipe());\r\n }",
"public void addSpawnpointWeapon(Weapon w) {\n this.weaponSpawnpoint.addWeapon(w);\n }",
"public boolean addPlayer(Player p) {\n\t\tif(p != null && !squareOccuped()) {\n\t\t\tthis.player = p;\n\t\t\treturn true;\n\t\t} else return false;\n\t}",
"public void addWarp(OwnedWarp warp) {\n String player = warp.getOwner();\n List<OwnedWarp> plWarps = warps.get(player);\n if(plWarps == null) {\n plWarps = new ArrayList<OwnedWarp>();\n warps.put(player, plWarps);\n }\n plWarps.add(warp);\n }",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"public void addItem(Product p, int qty){\n //store info as an InventoryItem and add to items array\n this.items.add(new InventoryItem(p, qty));\n }"
]
| [
"0.74890906",
"0.7066181",
"0.6935309",
"0.6927881",
"0.6836731",
"0.6730086",
"0.6615398",
"0.6542769",
"0.6395855",
"0.6340557",
"0.63043094",
"0.6302678",
"0.6289809",
"0.62379676",
"0.6201173",
"0.6139551",
"0.60003024",
"0.5971128",
"0.5961929",
"0.590506",
"0.5901074",
"0.5855315",
"0.5829121",
"0.58278406",
"0.579642",
"0.57961494",
"0.5788347",
"0.5727851",
"0.57132715",
"0.57118285",
"0.5711404",
"0.5709352",
"0.57034016",
"0.5694217",
"0.5692984",
"0.5681131",
"0.56759834",
"0.5674532",
"0.56643677",
"0.55888563",
"0.5576076",
"0.5566188",
"0.5554941",
"0.55530465",
"0.5534964",
"0.55268526",
"0.5471232",
"0.5464991",
"0.5443665",
"0.54416347",
"0.5439881",
"0.5437037",
"0.5428536",
"0.54276574",
"0.5421732",
"0.5418424",
"0.5410127",
"0.5398474",
"0.5394485",
"0.5394162",
"0.5370994",
"0.53702486",
"0.5364912",
"0.53591645",
"0.5342863",
"0.5340997",
"0.53343964",
"0.53312516",
"0.532542",
"0.53192693",
"0.5310576",
"0.5306836",
"0.52848256",
"0.5270531",
"0.52431047",
"0.52329963",
"0.52309126",
"0.5226625",
"0.52129793",
"0.51918215",
"0.51901734",
"0.51753473",
"0.5175025",
"0.51743597",
"0.51738256",
"0.51565564",
"0.51555127",
"0.51539046",
"0.51464",
"0.51432544",
"0.5141972",
"0.5138431",
"0.51375204",
"0.5136058",
"0.513482",
"0.51323867",
"0.5128156",
"0.5125066",
"0.5114571",
"0.5109724"
]
| 0.6660341 | 6 |
Creates a new player Pokemon. | public void makePlayerPokemon(int index)
{
String playerPkmnName = Reader.readStringFromFile("playerPokemon", index, 0);
int playerPkmnLevel = Reader.readIntFromFile("playerPokemon", index, 1);
boolean playerPkmnGender = Reader.readBooleanFromFile("playerPokemon", index, 2);
int playerPkmnCurrentHealth = Reader.readIntFromFile("playerPokemon", index, 3);
int playerPkmnExp = Reader.readIntFromFile("playerPokemon", index, 4);
this.playerPokemon = new Pokemon(currentPlayerPokemon, playerPkmnName, playerPkmnLevel, playerPkmnGender, playerPkmnCurrentHealth, playerPkmnExp, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PokemonEntity create(PokemonEntity pokemon )\n {\n em.persist(pokemon);\n return pokemon;\n }",
"void createPlayer(Player player);",
"public Pokemon() {\n }",
"public void insertPokemon(Pokemon p) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(p);\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}",
"@Override\n\tpublic Pokemon createPokemon(int index, int cp, int hp, int dust, int candy) throws PokedexException {\n\t\tint id = index +1;\n\t\t\t\t\n\t\tPokemon poke;\n\t\t\n\t\t// Connection au service web\n\t\tIPokemonService service = new PokemonService();\n\t\tMap<String, Object> data = service.getPokemonMetadata(id);\n\t\tMap<String, Object> ivs = service.getPokemonIVs(id, cp, hp, dust);\n\t\t\n\t\tif (data.containsKey(PokemonService.ERROR_KEY)) {\n\t\t\tthrow new PokedexException((String) data.get(PokemonService.ERROR_KEY));\n\t\t\t//System.out.println(\"*** ERREUR : \" + data.get(PokemonService.ERROR_KEY) + \" ***\");\n\t\t\t//poke = new Pokemon(index, \"\", 0, 0, 0, cp, hp, dust, candy, 0);\n\t\t}\n\t\t\n\t\telse if (ivs.containsKey(PokemonService.ERROR_KEY)) {\n\t\t\tthrow new PokedexException((String) ivs.get(PokemonService.ERROR_KEY));\n\t\t\t//System.out.println(\"*** ERREUR : \" + ivs.get(PokemonService.ERROR_KEY) + \" ***\");\n\t\t\t//poke = new Pokemon(index, \"\", 0, 0, 0, cp, hp, dust, candy, 0);\n\t\t\t/*\n\t\t\tpoke = new Pokemon(index,\n\t\t\t\t\t(String) data.get(\"name\"),\n\t\t\t\t\t(int) data.get(\"attack\"),\n\t\t\t\t\t(int) data.get(\"defense\"),\n\t\t\t\t\t(int) data.get(\"stamina\"),\n\t\t\t\t\tcp, hp, dust, candy, 0);\n\t\t\t*/\n\t\t}\n\t\t\n\t\telse {\n\t\t\tpoke = new Pokemon(index,\n\t\t\t\t\tPokemonTranslate.getInstance().getFrenchName((String) data.get(\"name\")),\n\t\t\t\t\t(int) data.get(\"attack\"),\n\t\t\t\t\t(int) data.get(\"defense\"),\n\t\t\t\t\t(int) data.get(\"stamina\"),\n\t\t\t\t\tcp, hp, dust, candy,\n\t\t\t\t\t(double) ivs.get(\"perfection\"));\n\t\t}\n\t\t\n\t\treturn poke;\n\t}",
"public Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"public Pokemon(String name, int number) {\r\n this.name = name;\r\n this.number = number;\r\n }",
"Long createPokemon(PokemonCreateDTO pokemon);",
"public void addNewPokemon(String type, int index, String tempName, int tempLevel)\r\n {\r\n if(type.equals(\"Player\"))\r\n {\r\n if(getObjects(Pokemon.class).size() == 2)\r\n {\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n removeObject(playerPokemon);\r\n }\r\n\r\n for(int i = 0; i < 6; i++)\r\n {\r\n if(Reader.readIntFromFile(\"playerPokemon\", index, 3) > 0)\r\n {\r\n makePlayerPokemon(index);\r\n break;\r\n }\r\n index++;\r\n }\r\n\r\n playerPokemonName = playerPokemon.getName();\r\n\r\n addObject(playerPokemon, getWidth() / 4, getHeight() / 2 - 12);\r\n\r\n if(getObjects(Pokemon.class).size() == 2)\r\n {\r\n playerPkmnInfoBox.drawAll();\r\n }\r\n }\r\n else if(type.equals(\"Enemy\"))\r\n {\r\n if(getObjects(Pokemon.class).size() == 2)\r\n {\r\n removeObject(enemyPokemon);\r\n }\r\n\r\n if(!wildPokemon)\r\n {\r\n String enemyPkmnName = Reader.readStringFromFile(\"pokeMonListBattle\", index, 0);\r\n int enemyPkmnLevel = Reader.readIntFromFile(\"pokeMonListBattle\", index, 1);\r\n boolean enemyPkmnGender = Reader.readBooleanFromFile(\"pokeMonListBattle\", index, 2);\r\n int enemyPkmnCurrentHealth = Reader.readIntFromFile(\"pokeMonListBattle\", index, 3);\r\n this.enemyPokemon = new Pokemon(currentEnemyPokemon, enemyPkmnName, enemyPkmnLevel, enemyPkmnGender, enemyPkmnCurrentHealth, 0, false);\r\n\r\n enemyPokemonName = enemyPkmnName;\r\n\r\n addObject(enemyPokemon, 372, 84);\r\n }\r\n else\r\n {\r\n this.enemyPokemon = new Pokemon(currentEnemyPokemon, tempName, tempLevel, getRandomBoolean(), 9999, 0, false);\r\n enemyPokemonName = tempName;\r\n addObject(enemyPokemon, 372, 84);\r\n }\r\n }\r\n }",
"public PlayerFighter create(GamePlayer player);",
"PlayerBean create(String name);",
"@Override\n \tpublic void createAndAddNewPlayer( int playerID )\n \t{\n \t\t//add player with default name\n \t\tPlayer newPlayer = new Player( playerID, \"Player_\"+playerID );\n \t\tgetPlayerMap().put( playerID, newPlayer );\n \t}",
"private static Player create(String playername) throws GameException {\n\t\ttry {\n\t\t\treturn (Player) createObject(playername);\n\t\t} catch (Exception e) {\n\t\t\tthrow new GameException(\"Player \" + playername + \" not found\");\n\t\t}\n\t}",
"Player createPlayer();",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"void createNewGame(Player player);",
"public Pokemon createPokemon( String p11, String p12, String p21,\n String p22, String p31, String p32, String p41,\n String p42, String p51, String p52, String p61, String p62) { //Added String rating as a parameter\n // ---- Get a new database key for the vote\n String key = myPokemonDbRef.child(PokemonDataTag).push().getKey();\n // ---- set up the pokemon object\n Pokemon newPokemon = new Pokemon(key, p11, p12, p21, p22, p31, p32, p41, p42, p51, p52, p61, p62);\n // ---- write the vote to Firebase\n myPokemonDbRef.child(key).setValue(newPokemon);\n return newPokemon;\n }",
"public void createNewPlayer()\n\t{\n\t\t// Set up all badges.\n\t\tm_badges = new byte[42];\n\t\tfor(int i = 0; i < m_badges.length; i++)\n\t\t\tm_badges[i] = 0;\n\t\tm_isMuted = false;\n\t}",
"Player createNewPlayer(PlayerDTO playerDTO);",
"public Pokemon(String name, int health, int speed, String type)\n {\n this.name = name;\n this.health = health;\n this.speed = speed;\n this.type = type;\n }",
"@Override\n\tpublic int doCreate(Player player) throws Exception {\n\t\tif(player==null){\n\t\t\treturn 400;\n\t\t}\n\t\ttry {\n\t\t\tdao.doCreate(player);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\t//e.printStackTrace();\n\t\t\treturn 300;\n\t\t}\n\t\treturn 100;\n\t}",
"public PlayerInterface createPlayer(String godName, PlayerInterface p) {\n God god = find(godName);\n p = addEffects(p, god.getEffects());\n return p;\n }",
"public Player createPlayer(Player player) {\n // check whether unique player can be created or not\n if (playerRepository.existsByUsername(player.getUsername())) {\n return null;\n }\n if (playerRepository.existsByEmailAddress(player.getEmailAddress())) {\n return null;\n }\n player.setPassword(encryption.encoder().encode(player.getPassword()));\n return playerRepository.save(player);\n }",
"Pokemon() {\n // we want to set level to 1 for every pokemon initially\n count++;\n level = 1;\n }",
"public void addNewPokemon(Pokemon pokemon) {\n try {\n PokemonSpecies pokemonSpecies = findSeenSpeciesData(pokemon.getSpecies());\n // then this Pokemon has been encountered before, just add to inventory\n pokemonSpecies.addNewPokemon(pokemon);\n } catch (PokedexException e) {\n // then this Pokemon has not been encountered before, make record of it then add to inventory\n PokemonSpecies pokemonSpecies = new PokemonSpecies(pokemon.getPokedexNumber(), pokemon.getSpecies(), 0);\n pokemonSpecies.addNewPokemon(pokemon);\n addNewSpecies(pokemonSpecies);\n }\n }",
"public Pokemon(int hp){\r\n this.hp = hp;\r\n }",
"private Player addNewPlayer(String username) {\n if (!playerExists(username)) {\n Player p = new Player(username);\n System.out.println(\"Agregado jugador \" + username);\n players.add(p);\n return p;\n }\n return null;\n }",
"public Pokemon (int id, String nombre,int Nivel, int Vidas, int evolucion, String tipo,String rutaImagen)\r\n\t{\r\n\t\tthis.id = id;\r\n\t\tthis.nombre = nombre;\r\n\t\tsetVidas(vidas);\r\n\t\tsetNivel(nivel);\r\n\t\tthis.evolucion = evolucion;\r\n\t\tthis.tipo = tipo;\r\n\t\tthis.rutaImagen = rutaImagen;\r\n\t}",
"public Pokemon (int id, String nombre, int evolucion, String tipo,String rutaImagen)\r\n\t{\r\n\t\tthis.id = id;\r\n\t\tthis.nombre = nombre;\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=tipo;\r\n\t\tthis.evolucion = evolucion;\r\n\t\tthis.rutaImagen = rutaImagen;\r\n\t}",
"public void createPlayers() {\n\t\t\n\t\twhite = new Player(Color.WHITE);\n\t\twhite.initilizePieces();\n\t\tcurrentTurn = white;\n\t\t\n\t\tblack = new Player(Color.BLACK);\n\t\tblack.initilizePieces();\n\t}",
"protected Player createPlayer(String playerName) throws BowlingGameException {\n\t\tif (playerName == null || playerName.isEmpty()) {\n\t\t\tthrow new BowlingGameException(\"Player name can not be empty\", BowlingCodeException.PLAYER_NAME_EMPTY.name());\n\t\t}\n\t\treturn new Player(playerName);\n\t}",
"public Player addNewPlayer(String username){\n\n // if no username is provided return error;\n if(username == null || username.isEmpty()){\n throw new ApplicationException(\"Please provide a username\");\n }\n // else return player by provided username via @Repository\n System.out.println(ANSI_BLUE + \"=== PLAYER \" + username + \" CREATED ===\" + ANSI_RESET);\n return gameRepository.addNewPlayer(username);\n\n }",
"@Override\r\n public void playerCreateNewDeck(int playerPosition) {\r\n this.players.get(playerPosition).createNewDeck();\r\n System.out.println(\"Player \" + playerPosition + \" created new deck.\");\r\n }",
"public void createPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create online player \" + name);\r\n player = new OnlinePlayer(name, x, y);\r\n players.put(name, player);\r\n }\r\n }",
"public PokemonHielo(Pokemon pokemon) {\n \tsuper(pokemon,500,100,120);\n }",
"public PokemonPark(){\n super(\"Pokemon Park\", \"Una vez por turno blabla\");\n }",
"void createGame(User playerOne, User playerTwo) throws RemoteException;",
"public Builder addReservePokemon(\n int index, POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (reservePokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReservePokemonIsMutable();\n reservePokemon_.add(index, value);\n onChanged();\n } else {\n reservePokemonBuilder_.addMessage(index, value);\n }\n return this;\n }",
"public Pokemon(int pokeNumber, String pokeName, String pokeType_1, int hitPoints) {\n this.pokeNumber = pokeNumber;\n this.pokeName = pokeName;\n this.pokeType_1 = pokeType_1;\n this.hitPoints = hitPoints;\n }",
"public void createOwnerPlayer(String name, double x, double y) {\n Player player = (Player) players.get(name);\r\n if (player == null) {\r\n// System.out.println(\"Create owner player \" + name);\r\n player = new Player(name, x, y);\r\n inPlayer = player;\r\n players.put(name, player);\r\n }\r\n }",
"public Player createPlayer(String name, Player.Token token, int playerNum) {\n switch (token) {\n case MissScarlett:\n return new Player(name, token, Parser.playersStartPositions.get(0), playerNum);\n case ProfessorPlum:\n return new Player(name, token, Parser.playersStartPositions.get(1), playerNum);\n case MrsWhite:\n return new Player(name, token, Parser.playersStartPositions.get(2), playerNum);\n case MrsPeacock:\n return new Player(name, token, Parser.playersStartPositions.get(3), playerNum);\n case MrGreen:\n return new Player(name, token, Parser.playersStartPositions.get(4), playerNum);\n case ColonelMustard:\n return new Player(name, token, Parser.playersStartPositions.get(5), playerNum);\n default:\n throw new IllegalArgumentException(\"Player selection was abnormally exited\");\n }\n }",
"public void create(Player p) {\r\n\t\tAsyncCatcher.enabled = false;\r\n\t\tsboard.remove(p.getUniqueId());\r\n\t\t\r\n\t\tScoreboard sb = Bukkit.getScoreboardManager().getNewScoreboard();\r\n\t\t\r\n\t\tsboard.put(p.getUniqueId(), sb);\r\n\t\t\r\n\t\tp.setScoreboard(sb);\r\n\t\tAsyncCatcher.enabled = true;\r\n\t}",
"public Player createPlayer(String playerName) {\n Player player = new Player(playerName);\n gamePlayers.add(player);\n notifier.broadcastPlayerJoined(playerName);\n if (allPlayersJoined()) {\n startGame();\n }\n return player;\n }",
"public Pokemon(PokemonData data, int level) {\n\t\tthis.data = data;\n\t\tthis.level = level;\n\t\tthis.status = PokemonStatus.NORMAL;\n\t\tthis.stats = new PokemonStats(level, data.getBaseStats());\n\t\tthis.currentHp = stats.getHp();\n\t\tthis.attacks = new PokemonAttacks(data.getLearnAttackList(), level);\n\t}",
"private void createRemotePlayer(PlayerId pId) {\n\t\ttry {\n\t\t\tString ip = texts.get(pId.ordinal() * 2 + 1).getText();\n\n\t\t\tPlayer p = new RemotePlayerClient(ip.isEmpty() ? DEFAULT_HOST : ip);\t\t\t\n\t\t\tplayers.put(pId, p);\n\t\t} catch (IOException e) {\n\t\t\tmenuMessage.setText(\"Error -> can't create remote player : IP address must be missing\");\n\t\t}\n\t\tplayerNames.put(pId, texts.get(pId.ordinal() *2).getText().isEmpty() ? defaultNames[pId.ordinal()] : texts.get(pId.ordinal() * 2).getText());\n\t}",
"public PokemonTrainer()\n {\n name = selector.selectName();\n faveType = selector.selectType();\n pokeball = selector.selectBall();\n caughtPokemon = selector.selectPokemon();\n setColor(null);\n }",
"public Builder addReservePokemon(POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (reservePokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReservePokemonIsMutable();\n reservePokemon_.add(value);\n onChanged();\n } else {\n reservePokemonBuilder_.addMessage(value);\n }\n return this;\n }",
"Player attackingPlayer(int age, int overall, int potential) {\r\n Player newPlayer = new Player(this.nameGenerator.generateName(), age, overall, potential, 'C' , 'F');\r\n\r\n\r\n\r\n\r\n }",
"public static void createPlayers() {\n\t\tcomputer1 = new ComputerSpeler();\n\t\tspeler = new PersoonSpeler();\n//\t\tif (Main.getNumberOfPlayers() >= 3) { \n//\t\t\tSpeler computer2 = new ComputerSpeler();\n//\t\t}\n//\t\tif (Main.getNumberOfPlayers() == 4) {\n//\t\t\tSpeler computer3 = new ComputerSpeler();\n//\t\t}\n\n\n\t}",
"public Pawn(Player player) {\n super(player);\n }",
"POGOProtos.Rpc.PokemonProto getPokemon();",
"void create(Team team);",
"public Pokemon(String species, Type type1, Type type2, int hp, int atk, int def, int spc, int spd, int baseSpd, Move move1, Move move2, Move move3, Move move4) {\n this.SPECIES = species;\n this.TYPE1 = type1;\n this.TYPE2 = type2;\n\n this.HP = hp;\n this.currentHp = hp;\n this.ATK = atk;\n this.currentAtk = atk;\n this.DEF = def;\n this.currentDef = def;\n this.SPC = spc;\n this.currentSpc = spc;\n this.SPD = spd;\n this.currentSpd = spd;\n\n this.baseSpd = baseSpd;\n\n this.atkStageMultiplier = 0;\n this.defStageMultiplier = 0;\n this.spcStageMultiplier = 0;\n this.spdStageMultiplier = 0;\n\n this.moves = new ArrayList<Move>();\n moves.add(move1);\n moves.add(move2);\n moves.add(move3);\n moves.add(move4);\n\n this.status1 = Status.HEALTHY;\n this.status1Counter = 0;\n this.status2 = Status.HEALTHY;\n this.status2Counter = 0;\n\n this.hyperBeamRecharge = false;\n }",
"public void createPlayers() {\r\n\t\tPlayerList playerlist = new PlayerList();\r\n\t\tPlayer p = new Player();\r\n\t\tfor (int x = 0; x <= players; x++) {\r\n\t\t\tplayerlist.createPlayer(p);\r\n\t\t}\r\n\r\n\t\tScanner nameScanner = new Scanner(System.in);\r\n\r\n\t\tfor (int createdPlayers = 1; createdPlayers < players; createdPlayers++) {\r\n\t\t\tSystem.out.println(\"Enter next player's name:\");\r\n\t\t\tplayerlist.namePlayer(createdPlayers, nameScanner.nextLine());\r\n\t\t}\r\n\t\tnameScanner.close();\r\n\t}",
"public void generatePlayer()\n {\n board.getTile(8,0).insertPlayer(this.player);\n }",
"public void create(Person p) {\n\t\t\n\t}",
"public Builder setReservePokemon(\n int index, POGOProtos.Rpc.CombatProto.CombatPokemonProto value) {\n if (reservePokemonBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureReservePokemonIsMutable();\n reservePokemon_.set(index, value);\n onChanged();\n } else {\n reservePokemonBuilder_.setMessage(index, value);\n }\n return this;\n }",
"public void createPlayer() {\n ColorPicker colorPicker = new ColorPicker();\n\n for (Player player : players) {\n if (player.getColor() == color(0, 0, 0) || (player.hasName() == false)) {\n pickColor(player, colorPicker);\n return;\n }\n }\n\n // if (ENABLE_SOUND) {\n // sfx.moveToGame();\n // }\n\n state = GameState.PLAY_GAME;\n\n // Spawn players\n int index = 0;\n for (int i=players.size()-1; i>=0; i--) {\n String dir = directions.get(index); // Need to add players in reverse so that when they respawn, they move in the right direction\n players.get(i).setSpawn(spawns.get(dir)).setDirection(dir);\n index++;\n }\n\n // Update game state only if all players have name and color\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}",
"public Player() {}",
"public Player() {}",
"public Player() {}",
"public Player() {}",
"private void createHumanPlayer(PlayerId pId) {\n\t\tplayers.put(pId, new GraphicalPlayerAdapter());\n\t\tplayerNames.put(pId, texts.get(pId.ordinal() * 2).getText().isEmpty() ? defaultNames[pId.ordinal()] : texts.get(pId.ordinal() * 2).getText());\n\t}",
"private void createHumanPlayer() {\n humanPlayer = new Player(\"USER\");\n players[0] = humanPlayer;\n }",
"public PlayerGame create(PlayerGame playerGame) {\n if (playerGame.getId() == null) {\n playerGame.setId(++PLAYER_GAME_ID_SEQ);\n }\n\n playerGames.add(playerGame);\n\n return playerGame;\n }",
"public PokemonTrainer(String name, ArrayList<AbstractPokemon> pokemonList, AbstractPokemon.Type type)\n {\n faveType = type;\n pokeball = new Pokeball();\n caughtPokemon = pokemonList;\n this.name = name;\n setColor(null);\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 void createProbleemWizard() throws InstantiationException,\n\t\t\tIllegalAccessException {\n\n\t\tif (getMelding().getProbleem() != null) {\n\t\t\tmodelRepository.evictObject(getMelding().getProbleem());\n\t\t}\n\t\tprobleem = null;\n\t\tif (\"bord\".equals(probleemType)) {\n\n\t\t\tif (trajectType.endsWith(\"Route\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"RouteBordProbleem\", null);\n\n\t\t\t} else if (trajectType.contains(\"Netwerk\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"NetwerkBordProbleem\", null);\n\n\t\t\t}\n\n\t\t} else if (\"ander\".equals(probleemType)) {\n\n\t\t\tif (trajectType.endsWith(\"Route\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"RouteAnderProbleem\", null);\n\n\t\t\t} else if (trajectType.contains(\"Netwerk\")) {\n\t\t\t\tprobleem = (Probleem) modelRepository.createObject(\n\t\t\t\t\t\t\"NetwerkAnderProbleem\", null);\n\t\t\t}\n\t\t}\n\t\tgetMelding().setProbleem(probleem);\n\t}",
"public Player(String name){\r\n\t\tthis.name = name;\r\n\t\tDie die = new Die();\r\n\t\tthis.die = die;\r\n\t}",
"@Test\r\n\tpublic void testIntialation()\r\n\t{\r\n\t\tPokemon pk = new Vulpix(\"Vulpix\", 100);\r\n\t\r\n\t\tassertEquals(\"Vulpix\", pk.getName());\r\n\t\tassertEquals(100, pk.getMaxLfPts());\r\n\t\tassertEquals(100, pk.getCurrentLifePts());\r\n\t\tassertEquals(100, pk.getCurrentLifePts());\r\n\t\tassertEquals(\"Fire\", pk.getType().getType());\r\n\t}",
"public Pawn(String player){\r\n this.player=player;\r\n\r\n }",
"public Player(String playerId, String ptype) {\n\t\tthis.playerid = playerId;\n\t\tthis.pieceType=PieceType.valueOf(ptype);\n\t\tthis.setWhenGo();\n\t}",
"public void addPokemon(Pokemon p)\n\t{\n\t\t/* See if there is space in the player's party */\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] == null)\n\t\t\t{\n\t\t\t\tm_pokemon[i] = p;\n\t\t\t\tupdateClientParty(i);\n\t\t\t\treturn;\n\t\t\t}\n\t\t/* Else, find space in a box */\n\t\tfor(int i = 0; i < m_boxes.length; i++)\n\t\t\tif(m_boxes[i] != null)\n\t\t\t{\n\t\t\t\t/* Find space in an existing box */\n\t\t\t\tfor(int j = 0; j < m_boxes[i].getPokemon().length; j++)\n\t\t\t\t\tif(m_boxes[i].getPokemon(j) == null)\n\t\t\t\t\t{\n\t\t\t\t\t\tm_boxes[i].setPokemon(j, p);\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t/* We need a new box */\n\t\t\t\tm_boxes[i] = new PokemonBox();\n\t\t\t\tm_boxes[i].setPokemon(0, p);\n\t\t\t\tbreak;\n\t\t\t}\n\t}",
"public void insertPlayer(TennisPlayer p) throws TennisDatabaseException {\n\t\t\n\t\tthis.root = insertPlayerRec(this.root, p);\n\t\t\n\t\tplayerCount++;\n\t\t\n\t}",
"public Player(Playground_Registration pgr) {\n this.pgr = pgr;\n pgr.setPName(\"barca\");\n System.out.println(pgr.getPName());\n pgr.setLocation(\"naser city\");\n System.out.println(pgr.getLocation());\n pgr.setSize(5);\n System.out.println(pgr.getSize());\n pgr.setAvailable_Hour(3);\n System.out.println(pgr.getAvailable_Hour());\n pgr.setPrice_Of_hour(120);\n System.out.println(pgr.getPrice_Of_hour());\n pgr.setPlayground_Status(\"available\");\n System.out.println(pgr.getPlayground_Status());\n pgr.setCancelation_Perioud(\"\");\n System.out.println(pgr.getCancelation_Perioud());\n System.out.println(\"i want to book this play ground\");\n\n }",
"private void createPlayers() {\n // create human player first\n Player human = new Player(\"Player 1\", true);\n players.add(human);\n \n // create remaining AI Players\n for (int i = 0; i < numAIPlayers; i++) {\n Player AI = new Player(\"AI \" + (i + 1), false);\n players.add(AI);\n }\n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();",
"private void add(String name) {\n try {\n PokemonToEdit pkm = Reader.readPokemon(name);\n team.add(pkm);\n System.out.println(name + \" has been add to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException e) {\n System.out.println(\"Pokemon not found natively\");\n System.out.println(\"Try looking for the pokemon online\");\n try {\n PokemonToEdit pkm = Crawler.loadPokemon(name);\n Saver.savePokemon(pkm);\n team.add(pkm);\n System.out.println(name + \" has been added to the team\");\n new PokemonEditTool(pkm);\n } catch (IOException ex) {\n System.out.println(\"Pokemon not found\");\n } catch (TeamFullException ex) {\n System.out.println(\"Team is full\");\n }\n } catch (TeamFullException e) {\n System.out.println(\"Team is full\");\n\n }\n }",
"@Override\r\n\tpublic void create(Person p) \r\n\t{\n\t\t\r\n\t}",
"protected PartyPokemon(PokemonNamesies pokemonNamesies, int level, TrainerType trainerType) {\n this.pokemon = pokemonNamesies;\n\n this.nickname = this.pokemon.getName();\n this.level = level;\n this.isPlayer = trainerType.isPlayer();\n this.shiny = trainerType.isWild() && RandomUtils.chanceTest(1, 8192);\n\n this.stats = new StatValues(this);\n this.moves = new MoveList(this);\n\n PokemonInfo pokemon = this.getPokemonInfo();\n this.setGender(Gender.getGender(pokemon.getFemaleRatio()));\n\n this.abilityIndex = this.createAbilityIndex();\n this.assignAbility(-1);\n\n this.heldItem = (HoldItem)ItemNamesies.NO_ITEM.getItem();\n\n this.totalEXP = pokemon.getGrowthRate().getEXP(this.level);\n this.totalEXP += RandomUtils.getRandomInt(expToNextLevel());\n\n this.setStats();\n this.fullyHeal();\n this.resetAttributes();\n }",
"void addPokemon(Pokemon pokemon) {\n pokemonList.add(pokemon);\n notifyItemInserted(pokemonList.size());\n }",
"public void addPlayer(Player p){\r\n this.players[PlayerFactory.nb_instances-1]=p;\r\n this.tiles[p.getX()+(p.getY()*this.width)]=p;\r\n }",
"public PokemonTrainer(String name, ArrayList<AbstractPokemon> pokemonList)\n {\n faveType = AbstractPokemon.Type.ANY_TYPE;\n pokeball = new Pokeball();\n caughtPokemon = pokemonList;\n this.name = name;\n setColor(null);\n }",
"public static void createNewLeague()\n\t{\n\t\t//put code to get input from end-user here.\n\t\t//generateFixtures(leagueName, teamAmount, homeAndAway, winPoints, drawPoints, lossPoints, teamNames);\n\t}",
"@Override\n\tpublic Penguin createPenguin(Penguin penguin) {\n\t\tPenguin saved = this.repo.save(penguin);\n\t\treturn saved; // penguin with an id (has been saved)\n\t}",
"PokemonDTO getPokemonById(Long id);",
"@RequestMapping(method = RequestMethod.POST, value = \"/players/{playerName}\")\n public void addPlayer(@PathVariable String playerName) {\n playerService.addPlayer(playerName);\n }",
"static Player createUserPlayer(boolean randPlace, FleetMap fleetMap, BattleMap battleMap) {\n return new AbstractPlayer(fleetMap, battleMap, randPlace);\n }",
"public void addNewPlayer(Player p) {\n\t\t// if the player don't exists in the highscore list the player is added\n\t\tif(p.getType() == PlayerType.Agent) {\n\t\t\tif(highscore.get(p.getName()) == null) {\n\t\t\t\thighscore.put(p.getName(), 0);\n\t\t\t}\n\t\t}\n\t\tthis.playerList.add(p); \n\t}",
"P createP();",
"public Player(){}",
"public Player(){}",
"POGOProtos.Rpc.PokemonProtoOrBuilder getPokemonOrBuilder();",
"Player(String playerName) {\n this.playerName = playerName;\n }",
"public Pokemon(int xPos, int yPos, Rectangle bounds) {\n this.xPos = xPos;\n this.yPos = yPos;\n this.bounds = bounds;\n }",
"public PokemonTrainer(String name, ArrayList<AbstractPokemon> pokemonList, AbstractPokemon.Type type, Pokeball pb)\n {\n faveType = type;\n pokeball = pb;\n caughtPokemon = pokemonList;\n this.name = name;\n setColor(null);\n }",
"private void spawnPlayer() {\n\t\tplayer.show(true);\n\t\tplayer.resetPosition();\n\t\tplayerDead = false;\n\t\tplayerDeadTimeLeft = 0.0;\n\t}",
"private static void createPlayers(int numPlayers){\r\n\t\t// crea la lista de jugadores\r\n\t\tfor(int i = 1; i <= numPlayers; i++){\r\n\t\t\t// Muestra una ventana de dialogo para introducir el nombre del jugador\r\n\t\t\tJTextField textField = new JTextField();\r\n\t\t\ttextField.setText(\"Jugador\"+i);\r\n\t\t\tJOptionPane.showOptionDialog(null, textField, \"Escriba el nombre para el jugador #\"+i, JOptionPane.OK_OPTION, JOptionPane.INFORMATION_MESSAGE, null, new String[]{\"Aceptar\"}, null);\r\n\t\t\tplayers.add(new Player(textField.getText()));\r\n\t\t}\r\n\t}"
]
| [
"0.7159877",
"0.6816528",
"0.6616906",
"0.6564289",
"0.6521441",
"0.6470215",
"0.64411294",
"0.6426973",
"0.64045686",
"0.6372435",
"0.6320469",
"0.629934",
"0.6290465",
"0.6220222",
"0.61522853",
"0.61457044",
"0.61427087",
"0.6142596",
"0.6133154",
"0.6130402",
"0.61267084",
"0.61192286",
"0.60953087",
"0.60828775",
"0.59972286",
"0.59552395",
"0.59518677",
"0.5919474",
"0.59107876",
"0.58490795",
"0.5839564",
"0.5835803",
"0.5822323",
"0.58097225",
"0.58025676",
"0.5781984",
"0.5762895",
"0.57465625",
"0.5739852",
"0.5732432",
"0.5715379",
"0.5703463",
"0.5700351",
"0.56933576",
"0.5672624",
"0.5652301",
"0.5649223",
"0.56420946",
"0.56115764",
"0.55973816",
"0.55953693",
"0.55937916",
"0.55859864",
"0.55756384",
"0.5574192",
"0.55678463",
"0.5566341",
"0.55571353",
"0.5536776",
"0.5528407",
"0.55240744",
"0.55240744",
"0.55240744",
"0.55240744",
"0.5520612",
"0.55171293",
"0.5510163",
"0.55043805",
"0.5491601",
"0.54681164",
"0.54661673",
"0.5463048",
"0.54619515",
"0.5443198",
"0.5428711",
"0.5427393",
"0.5426701",
"0.54096496",
"0.5401611",
"0.5398249",
"0.5396307",
"0.5395773",
"0.53919643",
"0.5367064",
"0.5365144",
"0.536052",
"0.5356785",
"0.5352011",
"0.5345811",
"0.5343312",
"0.5338786",
"0.5335928",
"0.5332579",
"0.5332579",
"0.53244257",
"0.5323108",
"0.53213614",
"0.5316344",
"0.53155565",
"0.53061044"
]
| 0.7070541 | 1 |
The act method of the world. Does the following: Shows intro text. Shows outro text. Goes back to GameWorld at the end of a battle. | public void act()
{
if(worldTimer == 1)
{
if(wildPokemon)
{
textInfoBox.displayText("Wild " + enemyPokemon.getName() + " appeared!", true, false);
}
else
{
textInfoBox.displayText("Enemy trainer sent out " + enemyPokemon.getName() + "!", true, false);
}
textInfoBox.displayText("Go " + playerPokemon.getName() + "!", true, false);
textInfoBox.updateImage();
worldTimer++;
}
else if(worldTimer == 0)
{
worldTimer++;
}
if(getObjects(Pokemon.class).size() < 2)
{
ArrayList<Pokemon> pokemon = (ArrayList<Pokemon>) getObjects(Pokemon.class);
for(Pokemon pkmn : pokemon)
{
if(pkmn.getIsPlayers() == true)
{
textInfoBox.displayText("Enemy " + enemyPokemonName.toUpperCase() + " fainted!", true, false);
int expGain = StatCalculator.experienceGainCalc(playerPokemon.getName(), playerPokemon.getLevel());
textInfoBox.displayText(playerPokemon.getName().toUpperCase() + " gained " + expGain + "\nEXP. Points!", true, false);
playerPokemon.addEXP(expGain);
if(playerPokemon.getCurrentExperience() >= StatCalculator.experienceToNextLevel(playerPokemon.getLevel()))
{
int newEXP = playerPokemon.getCurrentExperience() - StatCalculator.experienceToNextLevel(playerPokemon.getLevel());
playerPokemon.setEXP(newEXP);
playerPokemon.levelUp();
playerPokemon.newPokemonMoves();
textInfoBox.displayText(playerPokemonName.toUpperCase() + " grew to level " + playerPokemon.getLevel() + "!", true, false);
}
savePokemonData(playerPokemon, currentPlayerPokemon);
textInfoBox.updateImage();
isPlayersTurn = true;
battleOver();
}
else
{
textInfoBox.displayText(playerPokemonName.toUpperCase() + " fainted!", true, false);
String playerName = Reader.readStringFromFile("gameInformation", 0, 0);
textInfoBox.displayText(playerName + " blacked out!", true, false);
addObject(new Blackout("Fade"), getWidth() / 2, getHeight() / 2);
removeAllObjects();
String newWorld = Reader.readStringFromFile("gameInformation", 0, 4);
int newX = Reader.readIntFromFile("gameInformation", 0, 5);
int newY = Reader.readIntFromFile("gameInformation", 0, 6);
GameWorld gameWorld = new GameWorld(newWorld, newX, newY, "Down");
gameWorld.healPokemon();
Greenfoot.setWorld(gameWorld);
isPlayersTurn = true;
battleOver();
}
}
}
if(isBattleOver)
{
isPlayersTurn = true;
savePokemonData(playerPokemon, currentPlayerPokemon);
newGameWorld();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void act() \n {\n // Add your action code here.\n MyWorld world = (MyWorld) getWorld();\n jefe = world.comprobarJefe();\n \n \n explotar();\n \n if(jefe)\n {\n girarHaciaEnemigo();\n movimientoPegadoAJefe();\n }\n }",
"public void act() \r\n {\r\n if ( Greenfoot.isKeyDown( \"left\" ) )\r\n {\r\n turn( -5 );\r\n }\r\n\r\n else if ( Greenfoot.isKeyDown( \"right\" ) )\r\n {\r\n turn( 5 );\r\n }\r\n if ( Greenfoot.isKeyDown(\"up\") )\r\n {\r\n move(10);\r\n }\r\n else if ( Greenfoot.isKeyDown( \"down\") )\r\n {\r\n move(-10);\r\n }\r\n if ( IsCollidingWithGoal() )\r\n {\r\n getWorld().showText( \"You win!\", 300, 200 );\r\n Greenfoot.stop();\r\n }\r\n }",
"public void act() \n {\n frameCount++;\n animateFlying();\n if (getWorld() instanceof DreamWorld)\n {\n dream();\n }\n else if (getWorld() instanceof FinishScreen)\n {\n runEnd();\n }\n }",
"public void act()\n {\n \n //move();\n //if(canSee(Worm.class))\n //{\n // eat(Worm.class);\n //}\n //else if( atWorldEdge() )\n //{\n // turn(15);\n //}\n\n }",
"public void act() \n {\n CreatureWorld playerWorld = (CreatureWorld)getWorld();\n\n if( getHealthBar().getCurrent() <= 0 )\n {\n getWorld().showText(\"Charmander has fainted...\", getWorld().getWidth()/2, getWorld().getHeight()/2 + 26);\n Greenfoot.delay(30);\n }\n }",
"public void act() \r\n {\r\n key();\r\n win();\r\n fall();\r\n lunch();\r\n }",
"public void act()\r\n {\r\n // back button\r\n if (Greenfoot.isKeyDown(\"escape\") || Greenfoot.mouseClicked(backButton)) {\r\n Greenfoot.setWorld(new Title(gameSettings));\r\n }\r\n }",
"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 act() \r\n {\n if(getOneIntersectingObject(Player.class)!=null)\r\n {\r\n if(MenuWorld.gamemode == 1)\r\n //marcheaza regenerarea labirintului(trecere la nivelul urmator in Modul Contra Timp)\r\n TAworld.shouldRegen=true;\r\n else\r\n { \r\n //reseteaza variabilele care tin de modul de joc\r\n MenuWorld.gamemode=-1;\r\n MenuWorld.isPlaying=false;\r\n for(int i=0;i<4;i++)\r\n ItemCounter.gems_taken[i]=0;\r\n \r\n //arata fereastra de castig \r\n PMworld.shouldShowVictoryWindow=true;\r\n }\r\n \r\n }\r\n \r\n }",
"public void act() \n {\n moveAround();\n die();\n }",
"public void act()\n {\n if(isInWorld == true)\n {\n if(!WorldOne.isTimerOn() && getWorld().getClass() == WorldOne.class && WorldControl.subWave == 1)\n { \n getWorld().addObject(healthMessage, getX() - 30, getY() - 30);\n }\n getWorld().addObject(healthMessage, getX() - 30, getY() - 30);\n move();\n lastX = getX();\n lastY = getY();\n healthMessage.updatePosition(getX() - 30, getY() - 30);\n healthMessage.update(\"HP \" + getHealth(), Color.GREEN, font); \n checkKeys();\n incrementReloadDelayCount();\n //healthMessage.update(\"HP \" + getHealth(), Color.GREEN, font);\n if(!hasHealth())\n {\n removeSelfFromWorld(healthMessage);\n removeSelfFromWorld(this);\n isInWorld = false;\n isRocketAlive = false;\n Greenfoot.playSound(\"Explosion.wav\");\n }\n } \n\n }",
"public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }",
"public void act() \n {\n moveEnemy();\n checkHealth();\n attacked();\n }",
"public void act() \n {\n gravity();\n animate();\n }",
"public void act()\n {\n // Make sure fish is alive and well in the environment -- fish\n // that have been removed from the environment shouldn't act.\n if ( isInEnv() ) \n move();\n }",
"public void act() \n {\n checkCollision();\n KeyMovements(); \n attackWeapon();\n //stopGame();\n \n }",
"public void act() \n {\n\n World wrld = getWorld();\n if(frameCounter >= frameWait)\n {\n super.act();\n frameCounter = 0;\n }\n else\n {\n frameCounter++;\n }\n if (dying)\n deathcounter++;\n GreenfootImage trans = getImage();\n trans.scale(500,500);\n setImage(trans);\n setLocation(getX(), (getY()));\n\n if (deathcounter > 10)\n {\n wrld.removeObject(this);\n ((Universe)wrld).score += 50;\n }\n else if (getX() < 10)\n wrld.removeObject(this);\n }",
"private void act() {\n\t\tmyAction.embodiment();\n\t}",
"public void act() \n {\n move(3);\n turnAtEdge(); \n StrikeSeaHorse();\n }",
"public void interact() {\r\n\t\tif(alive) {\r\n\t\t\tCaveExplorer.print(attackDescription);\r\n\t\t\tbattle();\r\n\t\t}else {\r\n\t\t\tCaveExplorer.print(deadDescription);\r\n\t\t}\r\n\t}",
"public void act() \n {\n movement();\n }",
"@Override\n public void doAction() {\n String move = agent.getBestMove(currentPosition);\n execute(move);\n\n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n\n if (w.hasWumpus(cX, cY)) {\n System.out.println(\"Wampus is here\");\n w.doAction(World.A_SHOOT);\n } else if (w.hasGlitter(cX, cY)) {\n System.out.println(\"Agent won\");\n w.doAction(World.A_GRAB);\n } else if (w.hasPit(cX, cY)) {\n System.out.println(\"Fell in the pit\");\n }\n\n// //Basic action:\n// //Grab Gold if we can.\n// if (w.hasGlitter(cX, cY)) {\n// w.doAction(World.A_GRAB);\n// return;\n// }\n//\n// //Basic action:\n// //We are in a pit. Climb up.\n// if (w.isInPit()) {\n// w.doAction(World.A_CLIMB);\n// return;\n// }\n//\n// //Test the environment\n// if (w.hasBreeze(cX, cY)) {\n// System.out.println(\"I am in a Breeze\");\n// }\n// if (w.hasStench(cX, cY)) {\n// System.out.println(\"I am in a Stench\");\n// }\n// if (w.hasPit(cX, cY)) {\n// System.out.println(\"I am in a Pit\");\n// }\n// if (w.getDirection() == World.DIR_RIGHT) {\n// System.out.println(\"I am facing Right\");\n// }\n// if (w.getDirection() == World.DIR_LEFT) {\n// System.out.println(\"I am facing Left\");\n// }\n// if (w.getDirection() == World.DIR_UP) {\n// System.out.println(\"I am facing Up\");\n// }\n// if (w.getDirection() == World.DIR_DOWN) {\n// System.out.println(\"I am facing Down\");\n// }\n//\n// //decide next move\n// rnd = decideRandomMove();\n// if (rnd == 0) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 1) {\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 2) {\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_TURN_LEFT);\n// w.doAction(World.A_MOVE);\n// }\n//\n// if (rnd == 3) {\n// w.doAction(World.A_TURN_RIGHT);\n// w.doAction(World.A_MOVE);\n// }\n }",
"public void act() \n {\n movegas();\n \n atingido2(); \n \n }",
"public void act() \r\n {\r\n move(5);\r\n if(isAtEdge())\r\n turn(4);\r\n if(Greenfoot.getRandomNumber(35) < 34)\r\n turn(10);\r\n if(Greenfoot.getRandomNumber(20)<5)\r\n turn(-15);\r\n }",
"public void act()\n {\n displayBoard();\n Greenfoot.delay(10);\n \n if( checkPlayerOneWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player One!\", \"playerOne Win\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkPlayerTwoWin() == true )\n {\n JOptionPane.showMessageDialog( null, \"Congratulations Player Two!\", \"plauerTwo Win\",JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( checkBoardFilled() == true )\n {\n JOptionPane.showMessageDialog( null, \"It is a draw!\", \"Wrong step\", JOptionPane.PLAIN_MESSAGE );\n \n Greenfoot.stop();\n }\n \n if( messageShown == false )\n {\n showTurn();\n \n messageShown = true;\n }\n \n checkMouseClick();\n }",
"public void act() \n {\n\n if(isTouching(Car.class))\n {\n Lap = Lap + 1;\n if ((Lap % 11) == 0)\n {\n String lap = Integer.toString(Lap / 11);\n\n getWorld().showText(lap, 450, 30);\n getWorld().showText(\"Lap:\", 400, 30);\n }\n } \n if (Lap == 47)\n {\n Greenfoot.stop();\n getWorld().showText(\"GameOver\",250,250);\n }\n }",
"public void act() \r\n {\r\n move();\r\n }",
"public void act() \n {\n fall();\n }",
"public void act() \r\n {\r\n if (Greenfoot.mouseClicked(this)) {\r\n Greenfoot.setWorld(new howToPlayGuide());\r\n }\r\n }",
"public void act()\n {\n // handle key events\n String key = Greenfoot.getKey();\n if (key != null)\n {\n handleKeyPress(key);\n } \n\n // handle mouse events\n if (startGameButton.wasClicked())\n {\n handleStartGame();\n }\n }",
"public void act() \n {\n playerMovement();\n }",
"public void act() \n {\n moveTowardsPlayer(); \n }",
"public void doAction()\n {\n \n //Location of the player\n int cX = w.getPlayerX();\n int cY = w.getPlayerY();\n \n //Basic action:\n //Grab Gold if we can.\n if (w.hasGlitter(cX, cY))\n {\n w.doAction(World.A_GRAB);\n return;\n }\n \n //Basic action:\n //We are in a pit. Climb up.\n if (w.isInPit())\n {\n w.doAction(World.A_CLIMB);\n return;\n }\n //Test the environment\n /*if (w.hasBreeze(cX, cY))\n {\n System.out.println(\"I am in a Breeze\");\n }\n if (w.hasStench(cX, cY))\n {\n System.out.println(\"I am in a Stench\");\n }\n if (w.hasPit(cX, cY))\n {\n System.out.println(\"I am in a Pit\");\n }\n if (w.getDirection() == World.DIR_RIGHT)\n {\n System.out.println(\"I am facing Right\");\n }\n if (w.getDirection() == World.DIR_LEFT)\n {\n System.out.println(\"I am facing Left\");\n }\n if (w.getDirection() == World.DIR_UP)\n {\n System.out.println(\"I am facing Up\");\n }\n if (w.getDirection() == World.DIR_DOWN)\n {\n System.out.println(\"I am facing Down\");\n }\n */\n \n //decide next move\n if(w.hasStench(cX, cY)&&w.hasArrow())//Wumpus can be shot if located\n {\n if((w.hasStench(cX, cY+2))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX+2, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX, cY-1))||(w.hasStench(cX+1, cY+1)&&w.isVisited(cX, cY+1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX, cY-2))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX-1, cY))||(w.hasStench(cX+1, cY-1)&&w.isVisited(cX+1, cY)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n else if((w.hasStench(cX-2, cY))||(w.hasStench(cX-1, cY+1)&&w.isVisited(cX, cY+1))||(w.hasStench(cX-1, cY-1)&&w.isVisited(cX, cY-1)))//Condition for checking wumpus location\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n else if(cX==1&&cY==1) //First tile. Shoot North. If wumpus still alive, store its location as (2,1) to avoid it\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n if(w.hasStench(cX, cY))\n {\n wumpusLoc[0] = 2;\n wumpusLoc[1] = 1;\n }\n }\n else if(cX==1&&cY==4) //Condition for corner\n {\n if(w.isVisited(1, 3))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(2, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==1) //Condition for corner\n {\n if(w.isVisited(3, 1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 2))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if(cX==4&&cY==4) //Condition for corner\n {\n if(w.isVisited(3, 4))\n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_SHOOT);\n }\n if(w.isVisited(4, 3))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_SHOOT);\n }\n \n }\n else if((cX==1)&&(w.isVisited(cX+1, cY-1))) //Condition for edge\n {\n \n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cX==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==1)&&(w.isVisited(cX-1, cY+1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else if((cY==4)&&(w.isVisited(cX-1, cY-1))) //Condition for edge\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_SHOOT);\n }\n else //Can't locate wumpus, go back to safe location\n {\n turnTo((w.getDirection()+2)%4);\n w.doAction(World.A_MOVE);\n }\n }\n else // No stench. Explore \n {\n if(w.isValidPosition(cX, cY-1)&&!w.isVisited(cX, cY-1)&&isSafe(cX, cY-1)) \n {\n turnTo(World.DIR_DOWN);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY)&&!w.isVisited(cX+1, cY)&&isSafe(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY)&&!w.isVisited(cX-1, cY)&&isSafe(cX-1,cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n else\n {\n if(w.isValidPosition(cX, cY+1))\n {\n turnTo(World.DIR_UP);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX+1, cY))\n {\n turnTo(World.DIR_RIGHT);\n w.doAction(World.A_MOVE);\n }\n else if(w.isValidPosition(cX-1, cY))\n {\n turnTo(World.DIR_LEFT);\n w.doAction(World.A_MOVE);\n }\n }\n }\n \n }",
"public void act() \n {\n move(5);\n turn(4);\n }",
"public void act() {\n\t}",
"public void act() \n {\n \n checkKey();\n platformAbove();\n \n animationCounter++;\n checkFall();\n }",
"public void act() \n {\n if (canGiveTestimony()) {\n giveTestimony();\n }\n }",
"public void act() \n {\n mouse = Greenfoot.getMouseInfo();\n \n // Removes the achievement after its duration is over if its a popup (when it pops up during the game)\n if(popup){\n if(popupDuration == 0) getWorld().removeObject(this);\n else popupDuration--;\n }\n // Displays the decription of the achievement when the user hovers over it with the mouse\n else{\n if(Greenfoot.mouseMoved(this)) drawDescription();\n if(Greenfoot.mouseMoved(null) && !Greenfoot.mouseMoved(this)) drawMedal();\n }\n }",
"public void act() \n {\n // Add your action code here.\n klawisze();\n stawiaj();\n pobierzJablka();\n }",
"public void act() \n {\n // Add your action code here.\n // get the Player's location\n if(!alive) return;\n \n int x = getX();\n int y = getY();\n \n // Move the Player. The setLocation() method will move the Player to the new\n // x and y coordinates.\n \n if( Greenfoot.isKeyDown(\"right\") ){\n setLocation(x+1, y);\n } else if( Greenfoot.isKeyDown(\"left\") ){\n setLocation(x-1, y);\n } else if( Greenfoot.isKeyDown(\"down\") ){\n setLocation(x, y+1);\n } else if( Greenfoot.isKeyDown(\"up\") ){\n setLocation(x, y-1);\n } \n \n removeTouching(Fruit.class);\n if(isTouching(Bomb.class)){\n alive = false;\n }\n \n }",
"public void act() \r\n {\r\n move(speed); //move at set speed\r\n \r\n if(actCounter < 2) //increases act counter if only 1 act has passed\r\n actCounter++;\r\n\r\n if(actCounter == 1) //if on the first act\r\n {\r\n targetClosestPlanet(); //will target closest planet depending on if it wants to find an unconquered planet, or just the closest one\r\n if(planet == null && findNearestPlanet)\r\n findNearestPlanet = false;\r\n }\r\n \r\n if(health > 0) //if alive\r\n {\r\n if(findNearestPlanet)\r\n targetClosestPlanet();\r\n if(planet != null && planet.getWorld() != null) //if planet exists\r\n moveTowards(); //move toward it\r\n else\r\n moveRandomly(); //move randomly\r\n }\r\n \r\n if(removeMe || atWorldEdge())\r\n getWorld().removeObject(this);\r\n }",
"@Override\r\n\tpublic void act() {\n\t\tausgeben();\r\n\t}",
"public void act() \n {\n advance(); // move forward in the correct direction\n\n if(canSee(Ground.class) || atWorldEdge()) {\n getWorld().removeObject(this);\n return; \n }\n\n bImpact();\n takeExplosionTimer();\n }",
"public void act()\n {\n trackTime();\n showScore();\n \n }",
"public void act() \n {\n fall();\n if(Greenfoot.isKeyDown(\"space\") && isOnSolidGround())\n {\n jump();\n }\n move();\n }",
"public void act() \r\n {\r\n \r\n // Add your action code here\r\n MovimientoNave();\r\n DisparaBala();\r\n Colisiones();\r\n //muestraPunto();\r\n //archivoTxt();\r\n }",
"public void act() \n {\n if(getY()>=30 && !cambia)\n {\n direccion = -1;\n }\n else\n {\n cambia = true;\n }\n if(getY() <= getWorld().getHeight()-30 && cambia)\n {\n direccion = 1;\n }\n else\n {\n cambia = false;\n }\n \n setLocation(getX(),getY()+(velocidad*direccion));\n reglas();\n ataque();\n \n \n \n }",
"public void act() \n {\n World w = getWorld();\n int height = w.getHeight();\n \n setLocation(getX(),getY()+1);\n if (getY() <=0 || getY() >= height || getX() <= 0) // off the world\n {\n w.removeObject(this);\n return;\n }\n \n \n SaboWorld thisWorld = (SaboWorld) getWorld();\n Turret turret = thisWorld.getTurret();\n Actor turretActor = getOneIntersectingObject(Turret.class);\n Actor bullet = getOneIntersectingObject(Projectile.class);\n \n if (turretActor!=null && bullet==null) // hit the turret!\n {\n \n turret.bombed(); //Turret loses health\n explode();\n w.removeObject(this);\n } else if (turret==null && bullet!=null) //hit by a bullet!\n {\n explode();\n w.removeObject(this);\n }\n \n }",
"public void act();",
"public void act() \n {\n moveAround(); \n addBomb(); \n touchGhost(); \n }",
"public void act() \r\n {\r\n // Add your action code here.\r\n tembak();\r\n gerakKiri();\r\n gerakKanan();\r\n \r\n \r\n \r\n }",
"public void act() {\n\t\tif (canMove2()) {\n\t\t\tsteps += 2;\n\t\t\tmove();\n\t\t} else {\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}",
"@Test\n\tpublic void testF(){\n\t\tActorWorld world = new ActorWorld();\n\t\n\t\tworld.add(new Location(6, 4), alice);\n\t\tworld.add(new Location(3, 4), bob);\n\t\tbob.setDirection(Location.SOUTH);\n\t\talice.act();\n\t\tbob.act();\n\t\tassertEquals(new Location(4, 4), alice.getLocation());\n\t\tassertEquals(new Location(5, 4), bob.getLocation());\n\n\t\tbob.moveTo(new Location(0, 4));\n\t\tint olddir = alice.getDirection();\n\t\tbob.act(); // the first act's jumper can jump\n\t\talice.act(); // the second should turn \n\t\tassertEquals((olddir + Location.RIGHT) % 360, alice.getDirection());\n\t\tassertEquals(new Location(2, 4), bob.getLocation());\n\t}",
"public void act() \n {\n String worldname = getWorld().getClass().getName();\n if (worldname == \"Level0\")\n setImage(new GreenfootImage(\"vibranium.png\"));\n else if (worldname == \"Level1\")\n setImage(rocket.getCurrentImage());\n setLocation(getX()-8, getY()); \n if (getX() == 0) \n {\n getWorld().removeObject(this);\n }\n \n }",
"void act();",
"public void act() \n {\n // Add your action code here.\n \n //setRotation();\n setLocation(getX(),getY()+2);\n movement();\n \n }",
"public void act() \n {\n if(isAlive)\n {\n move(2);\n if(isAtEdge())\n {\n turnTowards(300, 300);\n GreenfootImage img = getImage();\n img.mirrorVertically();\n setImage(img);\n }\n if (getY() <= 150 || getY() >= 395)\n {\n turn(50);\n }\n if(isTouching(Trash.class))\n {\n turnTowards(getX(), 390);\n move(1);\n setLocation(getX(), 390);\n die();\n }\n }\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 }",
"public void act() \n {\n move(-16);\n \n \n if (isAtEdge())\n {\n setLocation(700,getY());\n }\n \n if (isTouching(Shots.class))\n {\n getWorld().addObject(new SpaceObject(), 500,Greenfoot.getRandomNumber(400));\n }\n \n }",
"public void act() \r\n {\r\n if (startTime > 0) {\r\n startTime--;\r\n }\r\n else {\r\n if (isScared()) {\r\n doScareMode();\r\n }\r\n else {\r\n if (counter == 0 || !canMove(currDirectionStr)) {\r\n counter = CELL_SIZE * 4;\r\n prevDirection = currDirection;\r\n do {\r\n currDirection = (int)(Math.random() * 10);\r\n if (currDirection == 0) {\r\n currDirectionStr = \"up\";\r\n }\r\n else if (currDirection == 1) {\r\n currDirectionStr = \"left\";\r\n }\r\n else if (currDirection == 2) {\r\n currDirectionStr = \"down\";\r\n }\r\n else if (currDirection == 3) {\r\n currDirectionStr = \"right\";\r\n }\r\n } while (!canMove(currDirectionStr));\r\n }\r\n \r\n if (canMove(currDirectionStr)) {\r\n move(currDirectionStr);\r\n }\r\n counter--;\r\n } \r\n }\r\n }",
"public void act() \r\n {\n }",
"public void act() \r\n {\n }",
"public void act() \r\n {\n }",
"@Override\r\n public void act() \r\n {\n int posx = this.getX();\r\n int posy = this.getY();\r\n //calculamos las nuevas coordenadas\r\n int nuevox = posx + incx;\r\n int nuevoy = posy + incy;\r\n \r\n //accedemos al mundo para conocer su tamaño\r\n World mundo = this.getWorld();\r\n if(nuevox > mundo.getWidth())//rebota lado derecho\r\n {\r\n incx = -incx;\r\n }\r\n if(nuevoy > mundo.getHeight())//rebota en la parte de abajo\r\n {\r\n incy = -incy;\r\n }\r\n \r\n if(nuevoy < 0)//rebota arriba\r\n {\r\n incy = -incy;\r\n }\r\n if(nuevox < 0)//rebota izquierda\r\n {\r\n incx = -incx;\r\n }\r\n //cambiamos de posicion a la pelota\r\n this.setLocation(nuevox,nuevoy);\r\n }",
"public void act() // method act\n {\n moveBear(); //lakukan method movebear\n objectDisappear(); // lakukan method objeectDisappear\n }",
"public void act(){\n // Removing object, if out of the simulated zone\n if (atWorldEdge()){\n getWorld().removeObject(this);\n return;\n }\n\n //Move Thanos up\n setLocation (getX(), getY() - speed);\n }",
"public void act()\r\n {\n \r\n if (Background.enNum == 0)\r\n {\r\n length = Background.length;\r\n width = Background.width;\r\n getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n \r\n //long lastAdded2 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long curTime3 = System.currentTimeMillis();\r\n //long seconds = curTime3 / 1000;\r\n //sleep = 3;\r\n //try {\r\n //TimeUnit.SECONDS.sleep(sleep);\r\n //} catch(InterruptedException ex) {\r\n //Thread.currentThread().interrupt();\r\n //}\r\n //Greenfoot.delay(3);\r\n //long curTime3 = System.currentTimeMillis();\r\n //long secs2 = curTime3 / 1000;\r\n //long curTime4;\r\n //long secs3;\r\n //do\r\n //{\r\n //getWorld().addObject (new YouWon(), length / 2, width / 2);\r\n //curTime4 = System.currentTimeMillis();\r\n //secs3 = curTime3 / 1000;\r\n //} while (curTime4 / 1000 < curTime3 / 1000 + 3);\r\n //if (System.currentTimeMillis()/1000 - 3 >= secs2)\r\n //{\r\n //do\r\n //{\r\n pause(3000);\r\n Actor YouWon;\r\n YouWon = getOneObjectAtOffset(0, 0, YouWon.class);\r\n World world;\r\n world = getWorld();\r\n world.removeObject(this);\r\n Background.xp += 50;\r\n Background.myGold += 100;\r\n if (Background.xp >= 50 && Background.xp < 100){\r\n Background.myLevel = 2;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 100 && Background.xp < 200){\r\n Background.myLevel = 3;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 200 && Background.xp < 400){\r\n Background.myLevel = 4;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 400 && Background.xp < 800){\r\n Background.myLevel = 5;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 800 && Background.xp < 1600){\r\n Background.myLevel = 6;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 1600 && Background.xp < 3200){\r\n Background.myLevel = 7;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 3200 && Background.xp < 6400){\r\n Background.myLevel = 8;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 6400 && Background.xp < 12800){\r\n Background.myLevel = 9;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n } else if (Background.xp >= 12800){\r\n Background.myLevel = 10;\r\n getWorld().addObject (new Level(), getWorld().getWidth() / 2, getWorld().getHeight() / 2);\r\n }\r\n //curTime3 = System.currentTimeMillis();\r\n //secs2 = curTime3 / 1000;\r\n //index2++;\r\n //Greenfoot.setWorld(new YouWon());\r\n //lastAdded2 = curTime3;\r\n //}\r\n //} while (index2 <= 0);\r\n }\r\n }",
"@Override\n public Action playTurn(Actions actions, Action lastAction, GameMap map, Display display) {\n\n updateAgilisaurusState(); // update agilisaurus state\n\n if (isPregnant()) {\n pregnantPeriodCount++;\n if (pregnantPeriodCount == 10) {\n // prenant after 10 turns\n this.removeCapability(LifeStage.PREGNANT);\n this.removeCapability(LifeStage.ADULT);\n Egg egg = new Egg(\"Agilisaurus\", true, owner);\n map.locationOf(this).addItem(egg);\n\n pregnantPeriodCount = 0;\n }\n }\n\n if (this.starvationLevel == 20 || this.hitPoints == 0 | this.thirstLevel == 20) {\n this.removeCapability(LiveStatus.LIVE);\n this.addCapability(LiveStatus.DEAD);\n map.locationOf(this).addItem(new Corpse(\"Agilisaurus\"));\n map.removeActor(this);\n }\n\n if (this.foodLevel <= 0) {\n System.out.println(\"Agilisaurus is unwake due to hungry now.\");\n return new DoNothingAction();\n }\n\n Action wander = behaviour.getAction(this, map);\n if (wander != null) {\n return wander;\n } else {\n return new DoNothingAction();\n }\n }",
"public void act()\n {\n setPosition(posX + liftDirection[0] * liftSpeed, posY\n + liftDirection[1] * liftSpeed);\n setLocation(posToLoc(posX, posY));\n\n if (posY < 50)\n removeSelf();\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}",
"@Override\n public void interact() {\n System.out.println(\"Hi I'm Kingfisher Bird! \");\n System.out.println(\"I can fly at 40km/h top speed \");\n }",
"@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void act(Board b) {\n\t\t\t\t\t}",
"@Override\n public void act() {\n }",
"public void act()\r\n\t{\r\n\t\tyVel += gravity;\r\n\t\t//Resets the jump delay to when greater than 0\r\n\t\tif (jDelay > 0)\r\n\t\t{\r\n\t\t\tjDelay--;\r\n\t\t}\r\n\t\t//Sets the vertical velocity and jump delay of the bird after a jump\r\n\t\tif (alive == true && (Menu.keyPress == KeyEvent.VK_SPACE) && jDelay <= 0) \r\n\t\t{\r\n\t\t\tMenu.keyPress = 0;\r\n\t\t\tyVel = -10;\r\n\t\t\tjDelay = 10;\r\n\t\t}\r\n\t\ty += (int)yVel;\r\n\t}",
"public void act() {\n\t\tif (canMove()) {\n\t\t\tif (isOnBase()) {\n\t\t\t\tif (steps < baseSteps) {\n\t\t\t\t\tmove();\n\t\t\t\t\tsteps++;\n\t\t\t\t} else {\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tturn();\n\t\t\t\t\tsteps = 0;\n\t\t\t\t}\n\t\t\t} else if (steps == baseSteps / 2) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps++;\n\t\t\t} else if (steps == baseSteps + 1) {\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tturn();\n\t\t\t\tsteps = 0;\n\t\t\t} else {\n\t\t\t\tmove();\n\t\t\t\tsteps++;\n\t\t\t}\n\t\t} else {\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tturn();\n\t\t\tsteps = 0;\n\t\t}\n\t}",
"public void act() {\r\n\t\tturn(steps[number % steps.length]);\r\n\t\tnumber++;\r\n\t\tsuper.act();\r\n\t}",
"public void act() {\n\n\tif (0 == stepCount) {\n\n\t ArrayList<Location> node = new ArrayList<Location>();\n\t node.add(getLocation());\n\t crossLocation.push(node);\n\t}\n\n\tboolean willMove = canMove();\n\tif (isEnd == true) {\n\t //to show step count when reach the goal\t\t\n\t if (hasShown == false) {\n\t\tString msg = stepCount.toString() + \" steps\";\n\t\tJOptionPane.showMessageDialog(null, msg);\n\t\thasShown = true;\n\t }\n\t} else if (willMove) {\n\t\n\t move();\n\t //increase step count when move \n\t stepCount++;\n\t} else {\n\t \n\t back();\n\t stepCount++;\n\t}\n\n }",
"public void act ()\n {\n checkScroll();\n checkPlatform();\n checkXAxis();\n checkDeath();\n // get the current state of the mouse\n MouseInfo m = Greenfoot.getMouseInfo();\n // if the mouse is on the screen...\n if (m != null)\n {\n // if the mouse button was pressed\n if (Greenfoot.mousePressed(null))\n {\n // shoot\n player.shoot(m.getX(), m.getY());\n }\n }\n }",
"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 act() \n {\n // Add your action code here.\n tempoUp();\n }",
"public void act()\n {\n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Cabbage(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Eggplant(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(200) < 3)\n {\n addObject(new Onion(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(300) < 3)\n {\n addObject(new Pizza(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Cake(), Greenfoot.getRandomNumber(600), 0);\n }\n \n if (Greenfoot.getRandomNumber(400) < 3)\n {\n addObject(new Icecream(), Greenfoot.getRandomNumber(600), 0);\n }\n countTime();\n }",
"public void act()\n {\n if (getGrid() == null)\n return;\n if (caughtPokemon.size() <= 0)\n {\n removeSelfFromGrid();\n System.out.println(toString() + \" has blacked out! \" + toString() + \" has appeared at a PokeCenter.\");\n return;\n }\n ArrayList<Location> moveLocs = getMoveLocations();\n Location loc = selectMoveLocation(moveLocs);\n makeMove(loc);\n }",
"public void act() \n {\n if (Greenfoot.mouseClicked(this))\n {\n Peter.lb=2; \n Greenfoot.playSound(\"click.mp3\");\n Greenfoot.setWorld(new StartEngleza());\n };\n }",
"public void act() \n {\n }",
"public void act() \n {\n }",
"public void act() \n {\n }",
"public void act() \n {\n }",
"public void act() \n {\n }",
"public void act() \n {\n }",
"public void act() \n {\n }",
"public void act() \r\n {\r\n super.mueve();\r\n super.tocaBala();\r\n super.creaItem();\r\n \r\n if(getMoveE()==0)\r\n {\r\n \r\n if(shut%3==0)\r\n {\r\n dispara();\r\n shut=shut%3;\r\n shut+=1;\r\n \r\n }\r\n else \r\n shut+=1;\r\n }\r\n super.vidaCero();\r\n }",
"public void act() \n {\n move(4); \n collision();\n \n \n }",
"public void act() {\t\n\t\twhile (true) { \n\t\t\tleft(60); \n\t\t\t\n\t\t\t// draw a rectangle \n\t\t\tmove(70);\n\t\t\tright(90); \n\t\t\tmove(30); \n\t\t\tright(90); \n\t\t\tmove(70);\n\t\t\tright(90); \n\t\t\tmove(30); \n\t\t\tright(90); \n\t\t}\n\t}",
"private void goAdventure() {\n\n\t\tint experience = playern.getExp();\n\t\tint random = randomHelper.randomten();\n\n\t\t/**\n\t\t * Random part that starts with 10% occurance when user chooses goAdventuring()\n\t\t */\n\t\tif (random == 0) {\n\t\t\tSystem.out.println(\"You see nothing but unicorns running in the swaying grass..\");\n\t\t\tSystem.out.println(\"[press enter to continue]\");\n\t\t\tsc.nextLine();\n\t\t}\n\n\t\t/**\n\t\t * Chooses storyboard and battle depending on experience level\n\t\t */\n\t\tif (experience >= 40) {\n\t\t\tStoryboardTwo.leveltwo();\n\t\t\tbattleSpider();\n\t\t}else {\n\t\t\tStoryboard.intro();\n\t\t\tbattleVampire();\n\t\t}\n\t\t}",
"public void action(){\n turn.sendMsg(turn.getController().getTurnOwner().getName()+\"'s turn!\");\n if(turn.getPlayer().isDown()){\n turn.setPhase(new RecoveryPhase());\n }else {\n turn.setPhase(new StarsPhase());\n }\n }",
"public void act() \n {\n if(s == 0)\n {\n lead();\n lookForFood();\n lookForEdge();\n lookForTail();\n }\n else\n {\n follow();\n }\n }",
"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 }",
"public void act() \n {\n // Add your action code here.\n }"
]
| [
"0.76109844",
"0.76061183",
"0.75126266",
"0.74335563",
"0.73473614",
"0.7234561",
"0.71346796",
"0.7116039",
"0.7033136",
"0.7029543",
"0.69827324",
"0.6967522",
"0.6911516",
"0.6877378",
"0.6859318",
"0.68290424",
"0.6827736",
"0.68071663",
"0.6762324",
"0.6752092",
"0.6747765",
"0.67343134",
"0.6723734",
"0.6717287",
"0.67163223",
"0.67105496",
"0.6704812",
"0.66879594",
"0.66862255",
"0.6683799",
"0.6683468",
"0.6650861",
"0.66253436",
"0.6620861",
"0.66164196",
"0.6604372",
"0.6599983",
"0.6558527",
"0.6532872",
"0.6532007",
"0.65269166",
"0.65106505",
"0.6507007",
"0.6496555",
"0.6492415",
"0.64897245",
"0.6482381",
"0.648198",
"0.6458871",
"0.6432134",
"0.64150286",
"0.637985",
"0.6363658",
"0.63584507",
"0.6355448",
"0.6354165",
"0.6347225",
"0.6332082",
"0.631693",
"0.6312905",
"0.6300242",
"0.6300242",
"0.6300242",
"0.6286554",
"0.62800133",
"0.62757576",
"0.62471014",
"0.6240535",
"0.6230205",
"0.6205583",
"0.6189055",
"0.6188955",
"0.6188955",
"0.61861724",
"0.61825347",
"0.6174396",
"0.6173655",
"0.6170363",
"0.6152983",
"0.61492044",
"0.61492044",
"0.6141714",
"0.6122657",
"0.6103891",
"0.60855323",
"0.6082156",
"0.6082156",
"0.6082156",
"0.6082156",
"0.6082156",
"0.6082156",
"0.6082156",
"0.6079929",
"0.6065559",
"0.6061274",
"0.605215",
"0.60225743",
"0.6011635",
"0.60114896",
"0.60076296"
]
| 0.62229776 | 69 |
Sets the battle to be over. | public void battleOver()
{
isBattleOver = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final void turnOver() {\n this.currentMovementAllowance = this.details.getMaxMovementAllowance();\n this.onTurnOver();\n }",
"@Override\r\n\tpublic void gameOver() {\n\t\tover = true;\r\n\t\tupdate();\r\n\t}",
"public void setOver(boolean over) {\r\n isOver = over;\r\n }",
"public synchronized void setGameOver(boolean gameOver) {\n\t\tthis.gameOver = gameOver;\n\t}",
"private void gameOver() {\n\t\tgameOver=true;\n\t}",
"public void lose(){\n // If this object is not the current arena state obsolete it.\n if(this != battleState) return;\n\n isOver = true;\n battleStateLose();\n }",
"@Override\r\n\tpublic void gameOver() {\n\t\tgameOver = true;\r\n\t\tupdate();\r\n\t}",
"void setGameOver() {\n myGameOver = true;\n myJump.userPauseThreads();\n }",
"public final void turnOver() {\r\n\t\tif (inPlay() == player1())\r\n\t\t\tsetInPlay(player2());\r\n\t\telse if (inPlay() == player2())\r\n\t\t\tsetInPlay(player1());\r\n\t\telse\r\n\t\t\tthrow new IllegalStateException(\"Can`t swap players for game! \"\r\n\t\t\t\t\t+ this);\r\n\t}",
"public void win(){\n // If this object is not the current arena state obsolete it.\n if(this != battleState) return;\n if(win) return;\n\n isOver = true;\n setSlowMo(false);\n win = true;\n setSelectedPc(null);\n\n Spell.clear();\n for(Button x : spellButtons){\n x.setActive(false);\n }\n TouchHandler.clear();\n SpellTouchInput.clear();\n battleStateWin();\n }",
"public boolean isBattleOver() {\n\t\treturn battleOver;\n\t}",
"private void gameOver() {\n System.out.println(\"GAME OVER!!\");\n\n reset();\n mGameOver = true;\n mChangeObserver.gameOver();\n }",
"@Override\r\n public void checkWarGameOver(){\r\n if(this.checkOnePlayerDecksEmpty(0)){\r\n // Set gameOver flag to true\r\n this.isGameOver = true; \r\n \r\n }\r\n \r\n }",
"public void setGameOver(boolean gameOver) {\n\t\tthis.gameOver = gameOver;\n\t}",
"public void setBattleSprite(Sprite battleSprite)\n {\n this.battleSprite = battleSprite;\n }",
"public void gameOver() {\n this.lives --;\n this.alive = false;\n }",
"public void turnOver() {\n if(firstPlayer == whosTurn()) {\n turn = secondPlayer;\n } else {\n turn = firstPlayer;\n }\n hasPlacedPiece = false;\n hasRotatedBoard = false;\n }",
"private void gameOver() {\n\t\t\n\t}",
"public void gameOver() {\n\t}",
"public void gameOver(boolean won){\r\n\t\tif(won){\r\n\t\t\tgameState = \"Won\";\r\n\t\t}else{\r\n\t\t\tgameState = \"Lost\";\r\n\t\t}\r\n\t\tb1.setVisible(true);\r\n\t\tb2.setText(\"Play Again\");\r\n\t\tb2.setVisible(true);\r\n\t}",
"public void gameOver() {\r\n\t\tgameFrame.gameOver();\r\n\t\tnotifyViews();\r\n\t}",
"public void setBattleEvent(BattleEvent battleEvent) {\n this.battleEvent = battleEvent;\n }",
"public void gameOver(int type) {\n \tthis.winner = state;\n \tif( type == -1 )\n \t\tthis.winner = 0;\n \tthis.state = 0;\n }",
"public void attack() {\n\t\t\n\t\tint row = getPosition().getRow();\n\t\tint column = getPosition().getColumn();\n\t\t\n\t\tgetPosition().setCoordinates(row + 1, column);\n\t\tsetPosition(getPosition()) ;\n\t\t// restore health\n\t\tsetHealth(100);\n\t\t// end hunter mode\n\t\tthis.hunter = false;\n\t\t\n\t}",
"public void setScenarioIsOver(int value) {\n this.scenarioIsOver = value;\n }",
"public void attack() {\r\n\t\tmch.clicked = false;\r\n\t\t\r\n\t\t//Makes the troopsToDeploy and cashinButton not visible\r\n\t\t//This code will only be called once per attack()\r\n\t\tif (phaseInit == 0) {\r\n\t\t\ttroopsToDeploy.setVisible(false);\r\n\t\t\tcashInButton.setVisible(false);\r\n\t\t\t//Removes the mouse listeners from the cards and makes them invisible\r\n\t\t\tfor (int x = 0; x < 5; x++) {\r\n\t\t\t\tif (cardPics[x].getMouseListeners() != null)\r\n\t\t\t\t\tcardPics[x].removeMouseListener(mch);\r\n\t\t\t\tcardSelectedPics[x].setVisible(false);\r\n\t\t\t}\r\n\t\t}\r\n\t\tphaseInit++;\r\n\r\n\t\t//This code will determine when a battle will happen\r\n\t\tString s = \"\";\r\n\t\tfor (Player p : Board.players) {\r\n\t\t\t//get the name of the country that has been clicked\r\n\t\t\tfor (Country c : p.getCountries()) {\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor())) {\r\n\t\t\t\t\ts = c.getName();\r\n\t\t\t\t}\r\n\t\t\t\t//Ensure this country is one the current player owns and the country has more than one troop\r\n\t\t\t\tif (hoveredColor.equals(c.getDetectionColor()) && players.get(turnCounter).checkOwn(s)\r\n\t\t\t\t\t\t&& c.getTroops() > 1) {\r\n\t\t\t\t\t//Dehighlight any countries that were previously selected\r\n\t\t\t\t\tfor (Player player : players) {\r\n\t\t\t\t\t\tfor (Country ca : player.getCountries()) {\r\n\t\t\t\t\t\t\tif (ca.isHighlighted()) {\r\n\t\t\t\t\t\t\t\tnew threadz(ca, player.getColor(), false);\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//Highlight the new selected country, and its neighboring countries\r\n\t\t\t\t\tnew threadz(c, players.get(turnCounter).getColor().brighter().brighter().brighter(), true);\r\n\t\t\t\t\tc.HighlightNeighbours();\r\n\t\t\t\t\t//the attacking country is the first clicked country\r\n\t\t\t\t\tattackingCountry = c;\r\n\t\t\t\t\ttempAtt = attackingCountry.getTroops();\r\n\t\t\t\t\t\r\n\t\t\t\t\tattackSlide.setVisible(true);\r\n\t\t\t\t\tattackSlide.setMaximum(attackingCountry.getTroops()-1);\r\n\t\t\t\t\tattackSlide.setMinimum(1);\r\n\t\t\t\t\tattackSlide.setValue(attackSlide.getMaximum());\r\n\t\t\t\t\tattacker.setVisible(true);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t} else if (hoveredColor.equals(c.getDetectionColor()) && c.isHighlighted() && c.getName().equals(attackingCountry.getName()) == false && checkO(c) == false) {\r\n\t\t\t\t\t//The defending country is the second clicked country, and it must be highlighted\r\n\t\t\t\t\tdefendingCountry = c;\r\n\t\t\t\t\tbattle = true;\r\n\t\t\t\t\thasAttacked = true;\r\n\t\t\t\t\tattackSlide.setVisible(false);\r\n\t\t\t\t\tattacker.setVisible(false);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\t//If a battle has been determined to happen\r\n\t\tif (battle == true) {\r\n\t\t\t\r\n\t\t\t//Makes sure the attacking country has more than one troop and that it is attacking a neighbour\r\n\t\t\tif (attackingCountry.getTroops() > 1 && defendingCountry.isHighlighted()) {\r\n\t\t\t\t//Makes a new battle between the attacker and defender then updates their troops after the battle \r\n\t\t\t\tBattle battle1 = new Battle(attackSlide.getValue(), defendingCountry.getTroops());\r\n\t\t\t\tbattle1.BattleTroops();\r\n\t\t\t\tattackingCountry.setTroops(Battle.getAttackers());\r\n\t\t\t\tdefendingCountry.setTroops(Battle.getDefenders());\r\n\t\t\t}\r\n\r\n\t\t\t//Determines the array index of the defending country in the players array\r\n\t\t\tint defNum = 0;\r\n\t\t\tfor (Player po : players) {\r\n\t\t\t\tfor (Country co : po.getCountries()) {\r\n\t\t\t\t\tif (defendingCountry.getName().equals(co.getName())) {\r\n\t\t\t\t\t\tdefNum = po.getPlayerNum();\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//These two ifs ensure that the troops never go into the negative\r\n\t\t\tif (attackingCountry.getTroops() < 0) {\r\n\t\t\t\tattackingCountry.setTroops(0);\r\n\t\t\t}\r\n\t\t\tif (defendingCountry.getTroops() < 0) {\r\n\t\t\t\tdefendingCountry.setTroops(0);\r\n\t\t\t}\r\n\r\n\t\t\t\r\n\t\t\t// If Attackers lose\r\n\t\t\tif (attackingCountry.getTroops() == 0) {\r\n\t\t\t\t//Unhighlight its neighbors\r\n\t\t\t\tattackingCountry.unHighlightNeighbours();\r\n\t\t\t\t\r\n\t\t\t\tattackingCountry.setTroops(tempAtt - attackSlide.getValue());\r\n\t\t\t\t//Updates the defenders based on the defenders left\r\n\t\t\t\tdefendingCountry.setTroops(defendingCountry.getTroops());\r\n\r\n\t\t\t\t\r\n\t\t\t\t//Ensures the troops never go negative or less than zero\r\n\t\t\t\tif (defendingCountry.getTroops() <= 0) {\r\n\t\t\t\t\tdefendingCountry.setTroops(1);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t//If defenders lose\r\n\t\t\tif (defendingCountry.getTroops() == 0) {\r\n\t\t\t\t//Unhighlights the defending country\r\n\t\t\t\tfor (Player p: players) {\r\n\t\t\t\t\tfor (Country c: p.getCountries()) {\r\n\t\t\t\t\t\tif (c.getName().equals(defendingCountry.getName())){\r\n\t\t\t\t\t\t\tc.setHighlighted(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\t//Recolor the defenders country to the attackers color\r\n\t\t\t\tnew threadz(defendingCountry, players.get(turnCounter).getColor(), false);\r\n\t\t\t\tattackingCountry.unHighlightNeighbours();\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t//Updates the troop numbers\r\n\t\t\t\r\n\t\t\t\tdefendingCountry.setTroops(attackingCountry.getTroops());\r\n\t\t\t\tattackingCountry.setTroops(tempAtt - attackSlide.getValue());\r\n\t\t\t\tif (attackingCountry.getTroops() <= 0) {\r\n\t\t\t\t\tattackingCountry.setTroops(1);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t//Removes the defender from the defenders country arraylist\r\n\t\t\t\tplayers.get(defNum).getCountries().remove(defendingCountry);\r\n\t\t\t\t//Adds the defender country to the attackers country arrayList.\r\n\t\t\t\tplayers.get(turnCounter).getCountries().add(defendingCountry);\r\n\t\t\t\thasWon = true;\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tif (players.get(defNum).getCountries().size() == 0) {\r\n\t\t\t\t\tFile fanfare = new File(\"Ressources/\" + \"fanfare2.wav\");\r\n\t\t\t\t\tplaySound(fanfare);\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\tJOptionPane.showMessageDialog(window.getFrame(), \"Player \" + (defNum+1) + \" has been Eliminated!\");\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t\twhile(players.get(defNum).getCards().size() > 0) {\r\n\t\t\t\t\t\tusedCards.add(players.get(defNum).getCards().get(0));\r\n\t\t\t\t\t\tplayers.get(defNum).getCards().remove(0);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t} // End of i\r\n\r\n\t\tbattle = false;\r\n\t\t\r\n\t}",
"public void gameOver() {\r\n grid.exposeMines();\r\n this.displayGrid();\r\n System.out.println(\"Better luck next time!\");\r\n }",
"public void lostBattle()\n\t{\n\t\t/* Heal the players Pokemon */\n\t\thealPokemon();\n\t\t/* Make the Pokemon unhappy */\n\t\tfor(int i = 0; i < m_pokemon.length; i++)\n\t\t\tif(m_pokemon[i] != null)\n\t\t\t\tm_pokemon[i].setHappiness((int) (m_pokemon[i].getHappiness() * 0.8));\n\t\t/* Now warp them to the last place they were healed */\n\t\tm_x = m_healX;\n\t\tm_y = m_healY;\n\t\tif(getSession() != null && getSession().getLoggedIn())\n\t\t\tsetMap(GameServer.getServiceManager().getMovementService().getMapMatrix().getMapByGamePosition(m_healMapX, m_healMapY), null);\n\t\telse\n\t\t{\n\t\t\tm_mapX = m_healMapX;\n\t\t\tm_mapY = m_healMapY;\n\t\t}\n\t\t/* Turn back to normal sprite */\n\t\tif(isSurfing())\n\t\t\tsetSurfing(false);\n\t}",
"public void notifyGameOver() {\n\t\tgameOver = true;\n\t}",
"public void gameOver(int gameOver);",
"private void battle(){\n\n while(!isBattleOver()){\n\n battleAllyAttack();\n if(isBattleOver()) return;\n\n battleEnemyAttack();\n if(isBattleOver()) return;\n\n readyNextAttackers();\n\n }\n System.out.println(\"battle over\");\n\n }",
"public void setWins() {\r\n this.wins++;\r\n }",
"public boolean getIsBattleOver()\r\n {\r\n return isBattleOver;\r\n }",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public void gameOver() {\n tb.setState();\n Date finalDate = new Date();\n float currTime = (finalDate.getTime() - start) / 1000F;\n Intent intent = new Intent(getContext(), TrueBlueOverActivity.class);\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TASK);\n\n intent.putExtra(\"Score\", score);\n\n intent.putExtra(\"Time\", currTime);\n\n intent.putExtra(\"Level\", level);\n getContext().startActivity(intent);\n }",
"public void liftUp(){\n set(m_defaultLiftSpeedUp);\n }",
"public void setWins(int value) {\n this.wins = value;\n }",
"public void gameOver() \n {\n ScoreBoard endGame = new ScoreBoard(\"You Lose!\", scoreCounter.getValue());\n addObject(endGame, getWidth()/2, getHeight()/2);\n }",
"public void setWins(int wins) {\n if (wins > 0) {\n this.wins = wins;\n }\n }",
"public void setBattleAction(BattleAction action)\n {\n battleFrame = 0.0f;\n battleAction = action;\n this.getBattleSprite().setRow(battleAction.ordinal());\n }",
"public void battleEnemyAttack() {\n if(battleEnemy != null){ // If all enemies have attacked, they cannot attack anymore for this round\n\n MovingEntity target = battleEnemy.getAttackPreference(targetAllies);\n if(target == null){\n target = targetAlly;\n }\n\n battleEnemy.attack(target, targetEnemies, targetAllies);\n //System.out.println(battleEnemy.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still friendly incase of zombify\n targetAlly = checkSideSwap(targetAlly, false, battleEnemies, targetEnemies, battleAllies, targetAllies);\n }\n\n battleEnemy = nextAttacker(battleEnemy, battleEnemies);\n\n }\n }",
"public void attackOrQuit(){\n gameState = GameState.ATTACKORQUIT;\n notifyObservers();\n }",
"public void setAttack(int attack) {\n base.setAttack(attack);\n }",
"public void gameOver ()\n {\n Greenfoot.delay (50);\n if (gameOver)\n {\n fader = new Fader (); // create a new fader\n addObject (fader, 400, 300); // add the fader object to the world\n if (UserInfo.isStorageAvailable()) {\n HighScore highScore = new HighScore (score);\n addObject (highScore, 300, 170);\n }\n Greenfoot.stop();\n }\n }",
"public void setToDefualts(){\n\t\tchangeInPlayerHealth = 0;\n\t\tchangeInPlayerScore = 0;\n\t\tchangInBatteryCharge = 0;\n\t\tpuaseForAnimation = false;\n\t}",
"public void gameOver() {\n\t\tframe.setTitle(frame.getTitle() + \" - Game Over\");\n\t}",
"public void playerAttack() {\n if (playerTurn==true) {\n myMonster.enemHealth=myMonster.enemHealth-battlePlayer.str;\n }\n playerTurn=false;\n enemyMove();\n }",
"@Override\n public void endGame(){\n gameOver = true;\n }",
"@Override\n public void hardMode() {\n super.setHP(1800);\n super.getFrontAttack().setBaseDamage(37.5);\n super.getRightAttack().setBaseDamage(37.5);\n super.getBackAttack().setBaseDamage(37.5);\n super.getLeftAttack().setBaseDamage(37.5);\n }",
"public void survivorEscapeHunterPickup(DPlayer survivor, boolean atWill){\n survivor.getPlayerState().setCarried(false);\n if (atWill){\n survivorHitToInjured(survivor);\n\n }else{\n survivorHitToCrawling(survivor);\n }\n }",
"protected void quitGame() {\n gameOver = true;\n }",
"public void battleMode() {\n\t\tif (!inBattle) {\n\t\t\tinBattle = true;\n\t\t\tJPanel thisPanel = this;\n\n\t\t\tnew Timer(3, new ActionListener() {\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tred -= 1;\n\t\t\t\t\tgreen -= 1;\n\t\t\t\t\tblue -= 1;\n\n\t\t\t\t\tthisPanel.setBackground(new Color(red, green, blue));\n\n\t\t\t\t\tif (red == 0) {\n\t\t\t\t\t\t((Timer) e.getSource()).stop();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}).start();\n\n\t\t}\n\t}",
"public void throwRock() {\n\t\tpokemon.HitByRock();\n\t}",
"@Override\n public void endTurn() {\n battle.setState(new EnemyTurn(battle));\n battle.continueBattle();\n }",
"public void gameOver()\r\n {\n addObject(new Text(\"Game Over\"), 550, 300);\r\n backgroundMusic.pause();\r\n Greenfoot.stop();\r\n }",
"public void damaged() {\n this.damageState = DamageState.DAMAGED;\n }",
"public void Hitting(Monsters opponent) throws Exception {\n\t\tassert (this != opponent);\n\t\tRandom rand = new Random();\n\t\tint hit = rand.nextInt(30);\n\t\tif(hit >= this.getHitpoints()) \n\t\t\thit = this.getHitpoints();\n\t\tif (hit >= opponent.getProtection()) {\n\t\t\tint power;\n\t\t\tif (this.getAnchor(1) == null)\n\t\t\t\tpower = this.getDamage() + (this.getStrength() - 5) / 3;\n\t\t\telse\n\t\t\t\tpower = this.getDamage() + (this.getStrength() - 5) / 3 + ((Weapons)this.getAnchor(1)).getDamage();\n\t\t\topponent.setHitpoints(opponent.getHitpoints() - power);\n\t\t\tSystem.out.println(this.getName() + \" Deals \" + power + \" damage over \" + opponent.getName());\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(this.getName() + \" attack failed!\");\n\t}",
"private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }",
"public static void gameOver() {\n ScoreBoard.write(ScoreController.getScoresPath());\n populate();\n }",
"public void gameOver() \n {\n new GameOver();\n Greenfoot.stop();\n }",
"public void knockMeOver(){}",
"public void onTurnOver() {}",
"public void fall()\n {\n powerUp.setBounds(powerUp.x,powerUp.y + 2, 65, 29);\n text.setBounds(powerUp.x,powerUp.y + 2, 65, 29);\n }",
"@Override\n public void easyMode() {\n super.setHP(900);\n super.getFrontAttack().setBaseDamage(18.75);\n super.getRightAttack().setBaseDamage(18.75);\n super.getBackAttack().setBaseDamage(18.75);\n super.getLeftAttack().setBaseDamage(18.75);\n }",
"public void levelOver(){\n\t\t// this is called by the model when the user wins the game!\n\t\tif (gameModel.levelOver){\n\t\t\tsynchronized(gameModel){\n\n\t\t\tgameModel.resetGame();\n\t\t\tgameModel.createLevel(2,width,height);\n\t\t\tfor(Square s:gameModel.targets){\n\t\t\t\tLog.d(TAG,\"target = \"+s);\n\t\t\t}\n\t\t\tgameModel.levelOver=false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"public void attack() {\n if (activeWeapon == null) {\n return;\n }\n attacking = true;\n }",
"public void gameOver() {\r\n\t\t// Clean up the model layer\r\n\t\tModelEventSource.clear();\r\n\t\tStargate.clearStargates();\r\n\r\n\t\t//\r\n\t\tisReplicatorMoving = false;\r\n\t\tplayers.clear();\r\n\t\treplicator = null;\r\n\t\tzpmSet.clear();\r\n\t}",
"public void baptism() {\n for (Card targetCard : Battle.getInstance().getActiveAccount().getActiveCardsOnGround().values()) {\n if (targetCard instanceof Minion) {\n targetCard.setHolyBuff(2, 1);\n }\n }\n }",
"public void attack() {\n this.attacked = true;\n }",
"public void attack(){\n activity = CreatureActivity.ATTACK;\n createWeapon();\n endAttack = new CountDown(20); //100\n endAnimationAttack = new CountDown(100);\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n controller.gameOver();\n }",
"public void mover() {\n\t}",
"public void setHP(int hp) {\r\n\t\tthis.hp += hp;\r\n\t}",
"public static void battle(int choice) {\n \t\tboolean monsterHeal = false;\r\n \t\tboolean monsterDefend = false;\r\n \t\tboolean monsterAttack = false;\r\n \t\tboolean playerDefend = false;\r\n \t\tboolean playerAttack = false;\r\n \t\tboolean playerHeal = false;\r\n \t\t\r\n \t\t//Get the move the monster will make\r\n \t\tint monsterAi = monster.getAiChoice();\r\n \t\t\r\n \t\t//Check what input the player has given\r\n \t\tif(choice == 1) {\r\n \t\t\t//Set the booleans according to the input for attack\r\n \t\t\tplayerAttack = true;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 2) {\r\n \t\t\t//Set the booleans according to the input for defend\r\n \t\t\tplayerDefend = true;\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t} else if(choice == 3) {\r\n \t\t\t//Set the booleans according to the input for heal\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = true;\r\n \t\t} else {\r\n \t\t\t//Set the player not to do anything if the input is wrong\r\n \t\t\tplayerAttack = false;\r\n \t\t\tplayerDefend = false;\r\n \t\t\tplayerHeal = false;\r\n \t\t}\r\n \t\t\r\n \t\t//Link the monster AI choice to a move\r\n \t\tif(monsterAi == 1) {\r\n \t\t\t//Set the booleans according to the AI for attack\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 2) {\r\n \t\t\t//Set the booleans according to the AI for defend\r\n \t\t\tmonsterAttack = true;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = false;\r\n \t\t} else if(monsterAi == 3) {\r\n \t\t\t//Set the booleans according to the AI for heal\r\n \t\t\tmonsterAttack = false;\r\n \t\t\tmonsterDefend = false;\r\n \t\t\tmonsterHeal = true;\r\n \t\t}\r\n \t\t\r\n \t\tString pFirst = \"\";\r\n \t\tString mFirst = \"\";\r\n \t\tString mAttack = \"\";\r\n \t\tString pAttack = \"\";\r\n \t\tString pLife = \"\";\r\n \t\tString mLife = \"\";\r\n \t\t\r\n \t\t//Player moves\r\n \t\tif(playerHeal) {\r\n \t\t\t//Heal the player by 10 life\r\n \t\t\tplayer.Heal(10);\r\n \t\t\t//Show a message saying the player was healed\r\n \t\t\tpFirst = player.name + \" healed 10 life! \\n\";\r\n \t\t} else if(playerDefend) {\r\n \t\t\t//Set the monster not to attack (do damage)\r\n \t\t\tmonsterAttack = false;\r\n \t\t\t//Shows a message that the player has defended\r\n \t\t\tpFirst = player.name + \" defended and has got 0 damage from \" + monster.name + \"\\n\";\r\n \t\t} else if(!playerAttack && !playerDefend && !playerHeal) {\r\n \t\t\t//Show a message that the player did not do anything\r\n \t\t\tpFirst = player.name + \" did nothing. \\n\";\r\n \t\t} \r\n \t\t\r\n \t\t//Monster moves\r\n \t\tif(monsterHeal) {\r\n \t\t\t//heal the monster by 10 life\r\n \t\t\tmonster.Heal(10);\r\n \t\t\t//Show a message that the monster was healed\r\n \t\t\tmFirst = (monster.name + \" healed 10 life! \\n\");\r\n \t\t} else if(monsterDefend) {\r\n \t\t\t//Set the player not to attack (do damage)\r\n \t\t\tplayerAttack = false;\r\n \t\t\t//Show a message that the monster has defended\r\n \t\t\tmFirst = monster.name + \" defended and has got 0 damage from \" + player.name + \"\\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Attack moves\r\n \t\tif(playerAttack) {\r\n \t\t\t//Lower the monsters life by the players power\r\n \t\t\tmonster.life -= player.strength;\r\n \t\t} \r\n \t\t\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Lower the players life by the monsters power\r\n \t\t\tplayer.life -= monster.strength;\r\n \t\t}\r\n \t\tif(playerAttack) {\r\n \t\t\t//Show a message that the player has attacked\r\n \t\t\tpAttack = player.name + \" hit \" + monster.name + \" for \" + player.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\tif(monsterAttack) {\r\n \t\t\t//Show a message that the monster has attacked\r\n \t\t\tmAttack = monster.name + \" hit \" + player.name + \" for \" + monster.strength + \" damage. \\n\";\r\n \t\t}\r\n \t\t\r\n \t\t//Show the current life for the player and the monster\r\n \t\tpLife = player.name + \" does now have \" + player.life + \" life left. \\n\";\r\n \t\tmLife = monster.name + \" does now have \" + monster.life + \" life left. \\n\";\r\n \t\t\r\n \t\t//Print the moves message\r\n \t\tMainGame.display.disp(pFirst + mFirst + pAttack + mAttack + pLife + mLife);\r\n \t\t\r\n\t\t//Check if the player is still alive\r\n \t\tif(player.life <= 0) {\r\n \t\t\t\r\n \t\t\t//If the player has no life left, show him that he has lost\r\n \t\t\tMainGame.display.disp(\"Too bad! You lost!\" + \"\\n\" + \"Play again?\");\r\n \t\t\t\r\n \t\t\t//Show the option to play again\r\n \t\t\tMainGame.display.Enable(MainGame.display.playAgain);\r\n \t\t}\r\n \t\t\r\n\t\t//Check if the monster is still alive\r\n \t\tif(monster.life <= 0) {\r\n \t\t\t\r\n \t\t\tplayer.xp += monster.giveXp;\r\n \t\t\tMainGame.display.disp(\"You beat \" + monster.name + \"! \\n\" + \"You got \" + monster.giveXp + \" XP!\" + \"\\n\" + \"You now have \" + player.xp + \" XP!\");\r\n \t\t\t\r\n \t\t\tMainGame.display.Enable(MainGame.display.continueStage);\r\n \t\t}\r\n \t\t\r\n\t\tMainGame.display.Enable(MainGame.display.continueFight);\r\n \t\r\n \t}",
"void bust() {\n\t\t_loses++;\n\t\t//_money -= _bet;\n\t\tclearHand();\n\t\t_bet = 0;\n\t}",
"public void gameOver(){\n\t\tstatus.setGameStarted(false);\n\t\tstatus.setGameOver(true);\n\t\tgameScreen.doNewGame();\n\t\tsoundMan.StopMusic();\n\t\n\t\t// delay to display \"Game Over\" messa\tprivate Object rand;\n\n\t\tTimer timer = new Timer(3000, new ActionListener(){\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tstatus.setGameOver(false);\n\t\t\t}\n\t\t});\n\t\ttimer.setRepeats(false);\n\t\ttimer.start();\n\t}",
"public battle(player a) {\n initComponents();\n //set background color\n Color battle = new Color(255,129,106);\n this.getContentPane().setBackground(battle);\n \n //sets the given player to the subject player\n c = a;\n //players current xp\n exp = c.getXP();\n //players starting health\n playerHealth = 3;\n //displays the players stats\n btnEarth.setText(\"Earth: \" + c.getEarth());\n btnFire.setText(\"Fire: \" + c.getFire());\n btnWater.setText(\"Water: \" + c.getWater());\n btnIce.setText(\"Ice: \" + c.getIce());\n \n //determines which monster to fight\n if(exp < 4){\n fill(\"Blob-Boy\");\n }else if(exp < 8){\n fill(\"Spike\");\n }else{\n fill(\"Shadow\");\n }\n }",
"public void setDamageTaken(double damage){\n\t\tlifeForce -= damage;\n\t\tif (! (lifeForce > 0) ) {\n\t\t\tJOptionPane.showMessageDialog(null, \"You Died - GAME OVER\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void liftDown() {\n set(m_defaultLiftSpeedDown);\n }",
"public void setOverhitValues(final L2Character attacker, final double damage)\n\t{\n\t\t// Calculate the over-hit damage\n\t\t// Ex: mob had 10 HP left, over-hit skill did 50 damage total, over-hit damage is 40\n\t\tfinal double overhitDmg = (getCurrentHp() - damage) * -1;\n\t\t\n\t\tif (overhitDmg < 0)\n\t\t{\n\t\t\t// we didn't killed the mob with the over-hit strike. (it wasn't really an over-hit strike)\n\t\t\t// let's just clear all the over-hit related values\n\t\t\toverhitEnabled(false);\n\t\t\toverhitDamage = 0;\n\t\t\toverhitAttacker = null;\n\t\t\t\n\t\t\treturn;\n\t\t}\n\t\t\n\t\toverhitEnabled(true);\n\t\toverhitDamage = overhitDmg;\n\t\toverhitAttacker = attacker;\n\t}",
"public void battleComplete() {\n\t}",
"public void attack() {\n energy = 2;\n redBull = 0;\n gun = 0;\n target = 1;\n // if Player is in range take off a life.\n if (CharacterTask.ghostLocation == GameWindow.playerLocation) {\n playerLives = playerLives - 1;\n System.out.println(\"Player Lives: \" + playerLives);\n }\n }",
"public void victory() {\n fieldInerface.setPleasedSmile();\n fieldInerface.timestop();\n int result = fieldInerface.timeGet();\n /*try {\n if (result < Integer.parseInt(best.getProperty(type))) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }\n } catch (NullPointerException e) {\n } catch (NumberFormatException e) {\n best.setProperty(type, Integer.toString(result));\n fieldInerface.makeChampionWindow(type);\n }*/\n\n gamestart = true; // new game isn't started yet!\n for (int j = 0; j < heightOfField; j++)\n for (int i = 0; i < widthOfField; i++)\n if (fieldManager.isCellMined(i, j))\n if (!fieldManager.isCellMarked(i, j)) {\n fieldInerface.putMarkToButton(i, j);\n fieldInerface.decrement();\n }\n gameover = true; // game is over!!\n }",
"public void setBowDamage(short bowDamage);",
"void gameOver();",
"void gameOver();",
"public void setTowerAttackDamage() {\n\t\tTowerDisplayEntity tower = new TowerDisplayEntity();\n\t\ttower.setAttackDamage(10);\n\t}",
"public void lowerHealth() {\n Greenfoot.playSound(\"hit.wav\");\n lives--;\n move(-100);\n if (lives == 0) {\n die();\n }\n }",
"public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }",
"public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }",
"public void wearOutfit() {\r\n for (int index = 0; index < mTops.size(); index++) {\r\n mTops.get(index).setWorn(true);\r\n }\r\n for (int index = 0; index < mBottoms.size(); index++) {\r\n mBottoms.get(index).setWorn(true);\r\n }\r\n if (mShoes != null) {\r\n mShoes.setWorn(true);\r\n }\r\n for (int index = 0; index < mAccessories.size(); index++) {\r\n mAccessories.get(index).setWorn(true);\r\n }\r\n if (mHat != null) {\r\n mHat.setWorn(true);\r\n }\r\n }",
"@Override\n\tpublic void landedOn() {\n\t\tMonopolyGameController.getInstance();\n\t\tMonopolyGameController.getCurrentPlayer().increaseMoney(300);\n\t\tLogger.getInstance().notifyAll(MonopolyGameController.getCurrentPlayer().getName()+ \" gained 300 dollars by landing on Bonus Square\");\n\t\tMonopolyGameController.allowCurrentPlayerToEndTurn();\n\n\t}",
"void hit(GameObject o){\r\n\t\tif (!shield){ // if sheild is on all hits do nothing\r\n\t\t\tif (!(o instanceof UpPower)){ // if didnt hit a power up the ship loses a life\r\n\t\t\t\tif (lives > 1) {\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t\treset();\r\n\t\t\t\t}\r\n\t\t\t\telse { // once there is no life left the ship dies\r\n\t\t\t\t\tdead = true;\r\n\t\t\t\t\tlives--;\r\n\t\t\t\t}\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t}",
"public void setWatering(int value) {\n\t\tthis.watering = value;\n\t}",
"public void setWon(){\n won = true;\n }",
"public void battleAllyAttack() {\n if(battleAlly instanceof Character){\n battleTickStatuses();\n updateBattleSides();\n }\n\n // battleAlly now attacks targetEnemy or preference based on the type of battleAlly\n if(battleAlly != null){ // If all allies have attacked, they cannot attack anymore for this round\n MovingEntity target = battleAlly.getAttackPreference(targetEnemies);\n // if not picky, get preference is the default next target\n if(target == null) {\n target = targetEnemy;\n }\n battleAlly.attack(target, targetAllies, targetEnemies);\n //System.out.println(battleAlly.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still unfriendly\n targetEnemy = checkSideSwap(targetEnemy, true, battleAllies, targetAllies, battleEnemies, targetEnemies);\n }\n battleAlly = nextAttacker(battleAlly, battleAllies);\n\n }\n }",
"public void caughtCheating(){\n\t\tinGoodStanding = false;\n\t}",
"public void throwBait() {\n\t\tpokemon.eatBait();;\n\t}",
"public void setOvertimeHourlyWage(int overtimeHourlyWage) {\n this.overtimeHourlyWage = overtimeHourlyWage;\n }",
"public void attack(Player player) {\n this.damage = 18 - player.getfPoint(); // the higher the Fighter skill,\n // the lower the damage. change the math.\n int newHealth = player.getShip().getHealth() - damage;\n player.getShip().setHealth(newHealth);\n }"
]
| [
"0.69008976",
"0.6893452",
"0.6763982",
"0.6637293",
"0.6616474",
"0.6597616",
"0.655179",
"0.65420866",
"0.6537785",
"0.64747965",
"0.6381829",
"0.6323245",
"0.6308149",
"0.62687993",
"0.61494815",
"0.61239046",
"0.6096752",
"0.60698336",
"0.60308653",
"0.60301036",
"0.6029884",
"0.60253793",
"0.6021131",
"0.60167855",
"0.5960156",
"0.59581083",
"0.5956444",
"0.593407",
"0.5915086",
"0.5912041",
"0.590713",
"0.5883891",
"0.5880298",
"0.58727276",
"0.5845337",
"0.58370936",
"0.58347803",
"0.5829394",
"0.58163816",
"0.58111566",
"0.581112",
"0.58067614",
"0.57803416",
"0.57647014",
"0.5754403",
"0.57458144",
"0.5742399",
"0.5724874",
"0.57185525",
"0.5711817",
"0.569966",
"0.56986564",
"0.56904495",
"0.56900316",
"0.5685781",
"0.56849694",
"0.56754094",
"0.56726944",
"0.5669041",
"0.5668742",
"0.5666527",
"0.56578904",
"0.56556565",
"0.5650247",
"0.5647261",
"0.5644757",
"0.56403065",
"0.563058",
"0.562776",
"0.5626609",
"0.56229544",
"0.5615813",
"0.56140125",
"0.5608822",
"0.55948985",
"0.55927205",
"0.55855787",
"0.55824226",
"0.5572895",
"0.5567964",
"0.5562689",
"0.55615443",
"0.55429",
"0.55396396",
"0.5537784",
"0.5537784",
"0.55359226",
"0.55251634",
"0.5520794",
"0.55187917",
"0.5518197",
"0.5516789",
"0.55146384",
"0.5512268",
"0.5511325",
"0.55111647",
"0.5504115",
"0.5501282",
"0.54911584",
"0.54899675"
]
| 0.7957377 | 0 |
Changes the turn of the player's Pokemon. | public void changeTurn()
{
isPlayersTurn = !isPlayersTurn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void changePlayerTurn()\n {\n if (player_turn == RED)\n player_turn = BLACK;\n else\n player_turn = RED;\n }",
"public void changeTurn(){\n // this function is used to calculate the turn of a player after every move is played\n int turn = this.turn;\n turn++;\n this.turn = turn%GameConfiguration.NUMBER_OF_PLAYERS;\n }",
"@Override\n\tpublic void changeTurn() {\n\t\tcomputerCall();\n\t\tplayerTurn = 1;\n\t}",
"void setPlayerTurn() throws RemoteException;",
"private void changeTurn(){ \r\n\t\tif (currentTurn == 1)\r\n\t\t\tcurrentTurn = 0; \r\n\t\telse\r\n\t\t\tcurrentTurn = 1; \r\n\t}",
"void setTurn(int turn);",
"public void changeTurn(){\r\n model.setCheckPiece(null);\r\n model.swapPlayers();\r\n }",
"@Override\n\tpublic void changeTurn() {\n\t\t\n\t}",
"private void changeTurn() {\n if (turn == RED) {\n turn = YELLOW;\n } else {\n turn = RED;\n }\n }",
"public void setCurrentTurn(Player player) {\r\n\t\tthis.currentTurn = player;\r\n\t}",
"public void changeTurn(int newTurn) {\r\n turnChoice = newTurn;\r\n }",
"public void changeTurn() {\n if (turn == 1) {\n turn = 2;\n\n } else {\n turn = 1;\n\n }\n setTextBackground();\n }",
"public void changeTurnOfPlayer(PlayerState player)\n {\n if(player.getColorOfPlayer() == Color.BLACK)\n {\n this.turnOfPlayer = playerWhite;\n }\n else\n {\n this.turnOfPlayer = playerBlack;\n }\n }",
"public void setTurn(int turn){\n this.turn = turn;\n }",
"public void setTurn(int turn) {\n this.turn = turn; \n }",
"public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }",
"@Override\n public int turn() {\n return moveOnTurn;\n }",
"public void changeTurn() {\n\t\t\n\t\tif(currentTurn == white) {\n\t\t\t\n\t\t\tcurrentTurn = black;\n\t\t}\n\t\telse if(currentTurn == black){\n\t\t\t\n\t\t\tcurrentTurn = white;\n\t\t}\n\t}",
"public void Switch()\n {\n if(getCurrentPokemon().equals(Pokemon1))\n {\n // Change to pokemon2\n setCurrentPokemon(Pokemon2);\n }\n // if my current pokemon is the same as pokemon2\n else if(getCurrentPokemon().equals(Pokemon2))\n {\n // swap to pokemon1\n setCurrentPokemon(Pokemon1);\n }\n }",
"public void setPlayerTurn(boolean playerTurn) {\n this.playerTurn = playerTurn;\n }",
"private void setTurn() {\n if (turn == black) {\n turn = white;\n } else {\n turn = black;\n }\n }",
"public void setTurn(int a_turn)\n {\n if(a_turn > m_numPlayers)\n {\n m_turn = 1;\n }\n else\n {\n m_turn = a_turn;\n }\n }",
"public void changeTurn(){\n\t\tif (this.turn ==\"blue\")\n\t\t{\n\t\t\tthis.turn = \"red\";\n\t\t\t\n\t\t}else{\n\t\t\tthis.turn =\"blue\";\n\t\t}\n\t}",
"public void turn()\n {\n turn(90);\n }",
"private void doGameTurn()\n\t{\n\t\tif (!lost && !won)\n\t\t{\n\t\t\trefreshMapAndFrame();\n\t\t\t\n\t\t\tcheckPlayerCondition();\n\t\t\tElementAccess.openExit();\n\t\t\tSystem.out.println(turn);\n\t\t}\n\t\telse if (lost)\n\t\t{\n\t\t\tSound.lost();\n\t\t\trefreshMapAndFrame();\n\n\t\t\tif (playerHasLost())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t\tlost = false;\n\t\t}\n\t\telse if (won)\n\t\t{\n\t\t\tSound.won();\n\t\t\trefreshMapAndFrame();\n\n\t\t\twon = false;\n\t\t\tif (playerNotInLevel())\n\t\t\t{\n\t\t\t\tstop = true;\n\t\t\t}\n\n\t\t\tnextLevel();\n\t\t\tMapInstance.getInstance().levelRestart();\n\t\t}\n\t}",
"@Override\n\tpublic void setPlayerTurn(int playerTurn) {\n\t\tsuper.setPlayerTurn(playerTurn);\n\t}",
"public static void switchPlayers(){\n\t\tif(turn.equals(\"white\")){\n\t\t\tturn = \"black\";\n\t\t}\n\t\telse{\n\t\t\tturn = \"white\";\n\t\t}\n\t}",
"public void nextTurn() {\r\n activePlayer = nextPlayer;\r\n advanceNextPlayer();\r\n }",
"public void switchTurn(Player player) {\n\t\t// debugMove(player.color, board);\n\n\t\t// If one player can't make a move, switch who's turn it is...\n\t\tif (noWinnerCount == 1) {\n\t\t\t// This player can't make a move so set it's turn to false\n\t\t\tplayer.setTurn(true);\n\n\t\t\t// Now set the other player's turn to true\n\t\t\tif (player.color == player1.color) {\n\t\t\t\tplayer2.setTurn(false);\n\t\t\t} else {\n\t\t\t\tplayer1.setTurn(false);\n\t\t\t}\n\t\t} else if (noWinnerCount == 3) {\n\t\t\t// If both players can't move, end the game\n\t\t\tif (player2.getScore() > player1.getScore()) {\n\t\t\t\tSystem.out.println(\"Black wins!\");\n\t\t\t} else if (player2.getScore() < player1.getScore()) {\n\t\t\t\tSystem.out.println(\"White wins!\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Draw!\");\n\t\t\t}\n\t\t} else {\n\t\t\t// Switch turns\n\t\t\tif (player1.hasTurn()) {\n\t\t\t\tplayer1.setTurn(false);\n\t\t\t\tplayer2.setTurn(true);\n\t\t\t} else {\n\t\t\t\tplayer1.setTurn(true);\n\t\t\t\tplayer2.setTurn(false);\n\t\t\t}\n\t\t}\n\t}",
"public void setTurn(Boolean turn) {\n this.turn = turn;\n }",
"public static void changePlayer() {\n\t\tvariableReset();\n\t\tif (curPlayer == 1)\n\t\t\tcurPlayer = player2;\n\t\telse\n\t\t\tcurPlayer = player1;\n\t}",
"public void setCurrentPlayerPokemon(int newID)\r\n {\r\n currentPlayerPokemon = newID;\r\n }",
"public static void NextTurn() {\n if (num_of_players == turn)\n turn=0;\n turn++;\n }",
"public void nextTurn() {\n visionChanged = true;\n SoundPlayer.playEndTurn();\n // Check if any protection objectives have failed\n gameState.updateAllHeroProtectionGoals(getHeroManager());\n // hook the next turn\n if (!multiplayerGameManager.hookNextTurn()) {\n\n if (map.enemyPerformingMove()) {\n return;\n }\n // Enemy action was made\n if (playerTurn && map.hasEnemy()) {\n try {\n map.enemyTurn(this);\n } catch (InterruptedException e) {\n logger.error(\"ayylmao at the GameManager.nextTurn(..) Method\");\n Platform.exit();\n Thread.currentThread().interrupt();\n }\n } else {\n map.playerTurn(this);\n updateBuffIcons();\n updateTempVisiblePoints();\n map.turnTick();\n for(CurrentHeroChangeListener listener:heroChangeListeners){\n \tlistener.onHeroChange(getHeroManager().getCurrentHero());\n }\n }\n\n } else {\n moveViewTo(getHeroManager().getCurrentHero().getX(), getHeroManager().getCurrentHero().getY());\n updateBuffIcons();\n updateTempVisiblePoints();\n }\n\n map.updateVisibilityArray();\n dayNightClock.tick();\n turnTickLiveTiles();\n abilitySelected = AbilitySelected.MOVE;\n abilitySelectedChanged = true;\n backgroundChanged = true;\n gameChanged = true;\n minimapChanged = true;\n saveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n // update(this.tracker,null);\n }",
"public void setTurn(boolean turn) {\n\t\tthis.turn = turn;\n\t}",
"public void action(){\n turn.sendMsg(turn.getController().getTurnOwner().getName()+\"'s turn!\");\n if(turn.getPlayer().isDown()){\n turn.setPhase(new RecoveryPhase());\n }else {\n turn.setPhase(new StarsPhase());\n }\n }",
"public void setYourTurn(Boolean yourTurn) {\n this.yourTurn = yourTurn;\n }",
"public void doTurn() {\n\t\tGFrame.getInstance().aiHold();\n\t}",
"public void setNextTurn() {\n\t\t// COMPLETE THIS METHOD\n\t\tif (turn == 1) {\n\t\t\t\n\t\t\tturn = 2;\n\t\t\tcurrentDisc = getPlayer2Disc();\n\t\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\tturn = 1;\n\t\t\tcurrentDisc = getPlayer1Disc();\n\t\t\t\n\t\t}\n\t}",
"public void nextTurn() {\n\t\tusedPocket = false;\n\t\ttookFromPot = false;\n\t\tcurrentTurn++;\n\t\tcurrentTurn = currentTurn%2;\n\t\tif(currentTurn == 0) {\n\t\t\tcurrentPlayer = player1;\n\t\t\topponentPlayer = player2;\n\t\t} else {\n\t\t\tcurrentPlayer = player2;\n\t\t\topponentPlayer = player1;\n\t\t}\n\t}",
"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 switchTurns()\n\t{\n\t\tif(current.equals(playerA))\n\t\t\tcurrent = playerB;\n\t\telse\n\t\t\tcurrent = playerA;\n\t}",
"public void setIsTurn()\n\t{\n\t\tthis.isTurn = true;\n\t}",
"public void changePiece() {\n if (piece == 1) {\n piece = 2;\n } else {\n piece = 1;\n }\n //System.out.println(\"Nu ben ik piece \" + piece);\n }",
"private void setCurrentTurnpike(Point t){\n\t\t\n\t\t_currentTurnpikeStart = t;\n\t\n\t}",
"public void playTurn() {\r\n\r\n }",
"public void setTurn(PieceColor color) {\n \tturn = color;\n }",
"void playerTurn(Player actualPlayer) {\n aiPlayer.chooseAction(actualPlayer);\n actualPlayer.setTheirTurn(false);\n }",
"public SetPlayerTurnAction() {}",
"public void incrTurn(){\n this.turn++;\n }",
"public void turn(boolean yours) {\n\t\t_endTurn.setEnabled(yours);\n\t}",
"public void changeTurn( boolean myTurn ) {\n\t\t// Go through all buttons and reset their visiblity\n\t\t// and specify enables based on who's turn it is.\n\t\tfor ( int row = 0; row < GRID_ROWS; row++ ) {\n\t\t\tfor ( int col = 0; col < GRID_COLS; col++ ) {\n\t\t\t\tletterButton[row][col].setEnabled( myTurn );\n\t\t\t\tletterButton[row][col].setVisible( true );\n\t\t\t}\n\t\t}\n\t\t// Reset word field\n\t\twordField.setText( \"\" );\n\t\tokButton.setEnabled( myTurn );\n\t}",
"public void setTurned(){\n\tIS_TURNED = true;\n\tvimage = turnedVimImage;\n }",
"public void Turn(){\r\n \r\n }",
"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}",
"private void humanTurn() \n {\n \n playTurn();\n }",
"private void swapPlayer(){\r\n resetTurn();\r\n tries = 0;\r\n Player temp = currentPlayer;\r\n currentPlayer = nextPlayer;\r\n nextPlayer = temp;\r\n if(!gameOver()){\r\n if(currentPlayer.getClass() == Ia.class) {\r\n int[] result = currentPlayer.estimateNextMove(this.getClone());\r\n if (result[0] == 0 && result[1] == 0 && result[2] == 0 && result[3] == 0) currentPlayer.setCanMove(false);\r\n else {\r\n currentPlayer.setCanMove(true);\r\n int row = result[0];\r\n int col = result[1];\r\n int nextRow = result[2];\r\n int nextCol = result[3];\r\n makeMove(row, col, nextRow, nextCol);\r\n }\r\n swapPlayer();\r\n }\r\n }\r\n else {\r\n getWinner();\r\n if(winner == null) System.out.println(\"DRAW!\");\r\n else {\r\n System.out.println(winner.getPlayerName() + \" WIN!\");\r\n if (winner.getClass() == Ia.class)\r\n System.out.println(\"Max time used to move: \" + winner.getMaxTime() + \" seconds\");\r\n }\r\n isOver = true;\r\n }\r\n\r\n }",
"public GameTurn(PlayerID player){\n\t\tPreconditions.checkNotNull(player);\n\t\tthis.player = player;\n\t}",
"private void setPlayerTurn(int turn, Controller controller){\n this.activePlayer = controller.getMainGameModel().getPlayerList().get(turn);\n }",
"private void playTurn()\n {\n try\n {\n XMLHandler.saveGame(game, GAME_CLONE_PATH);\n }\n catch(IOException | JAXBException | SAXException ex)\n {\n // TODO... ConsoleUtils.message(\"An internal save error has occured, terminating current game\");\n gameEnded = true;\n return;\n }\n \n moveCycle();\n \n if (!game.validateGame()) \n {\n IllegalBoardPenalty();\n }\n \n String gameOverMessage = game.isGameOver();\n if (gameOverMessage != null) \n {\n //TODO: ConsoleUtils.message(gameOverMessage);\n gameEnded = true;\n }\n \n game.switchPlayer();\n }",
"private void HandleOnChangeTurn(Board board, Piece turn){\n\t\tthis.turn = turn;\n\t\tif(multiview())decidesActivateBoard(turn);\n\t\tdecideMakeAutomaticMove();\n\t\tif(playerModes.get(turn)==PlayerMode.RANDOM)Utils.sleep(300);\n\t}",
"public void newTurn() {\r\n\t\tthis.money = 0;\r\n\t\tthis.blackTurns = 1;\r\n\t\tthis.blueTurns = 0;\r\n\t\tthis.purpleTurns = 0;\r\n\t\tthis.brownTurns = 0;\r\n\t\tthis.redTurns = 0;\r\n\t}",
"public void updateTurn(int turn)\n\t{\n\t\tcurTurn = turn;\n\t\trepaint();\n\t}",
"public void turn() {\n rightMotor.resetTachoCount();\n rightMotor.setSpeed(DEFAULT_TURN_SPEED);\n leftMotor.setSpeed(DEFAULT_TURN_SPEED);\n rightMotor.forward();\n leftMotor.backward();\n\n }",
"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 myTurn()\n\t{\n\t\t\n\t\tif (canPlay())\n\t\t{\n\t\t\tif (isTop())\n\t\t\t{\n\t\t\t\traise();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tequal();\n\t\t\t}\n\t\t}\n\t\ttable.nextPlayer();\n\t\t\n\t}",
"public void nextTurn(){\n\t\tplayers[currentPlayer].setNotCurrentPlayer();\n\t\t\n\t\t//increment current player to advance to next player\n\t\tcurrentPlayer = (currentPlayer + 1) % players.length;\n\t\t\n\t\t//update the new current player\n\t\tupdateCurrentPlayerView();\n\t}",
"private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }",
"public void turnToPlay(Player opponent) {\n\n }",
"protected abstract void takeTurn(int player);",
"public void turnRight() { turn(\"RIGHT\"); }",
"void gameTurn(int move){\n int gameWon = -1;\n boolean gameTie = false;\n //set the board to a move and print it\n if (loggedInUser.myGame.currentLetter.equals(\"X\")){\n gameBoard [move] = 1;\n printMove(move,\"X\");\n }\n else{\n gameBoard[move] = 2;\n printMove(move,\"O\");\n }\n //Update the status of the buttons graying out the ones that were played\n updateButtons();\n\n //checks if the game has been won or not\n gameWon = checkGameWon();\n\n //check of the game has been tied\n gameTie = checkTie();\n\n Game game = new Game(loggedInUser.opponentId);\n game.currentMove = move;\n\n if (loggedInUser.myGame.currentLetter.equals(\"X\")){\n game.currentLetter = \"O\";\n }else {\n game.currentLetter = \"X\";\n }\n\n //if the game hasn't been won and the game hasnt been tied the other playesr turn is made\n if(gameWon != 0 && !gameTie){\n game.gameInProgress = true;\n }\n //if game won\n else if (gameWon != 0){\n //remove all of the buttons\n removeAllButtons();\n game.gameInProgress = false;\n }\n else{\n playerText.setText(\"The game is tie\");\n turn.setText(\"No one wins\");\n game.gameInProgress = false;\n }\n\n //set data\n mDatabaseRef.child(loggedInUser.myId).child(\"myGame\").setValue(game);\n mDatabaseRef.child(loggedInUser.opponentId).child(\"myGame\").setValue(game);\n }",
"public void play() {\n\n int turn = 1;\n\n while (!isCheckMate()) {\n System.out.println(\"Turn \" + turn++);\n board.print();\n playTurn(whitePlayer);\n board.print();\n playTurn(blackPlayer);\n }\n }",
"public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}",
"private void playTurn(Player player) {\n\n System.out.println(player.toString() + \"'s turn\");\n\n if (!player.getOccupiedSet().isEmpty())\n while(true) {\n Movement move = player.getMove();\n if (validMove(player, move)) {\n move(player, move);\n break;\n }\n }\n }",
"public void setTurning(java.lang.Boolean value);",
"public void turnRight ()\n\t{\n\t\t//changeFallSpeed (1);\n\t\tturnInt = 1;\n\t}",
"public int incrementPlayerTurn() {\r\n\t\tthis.playerTurn++;\r\n\t\tif ( playerTurn >= 3 ) {\r\n\t\t\tthis.playerTurn = 0;\r\n\t\t}\r\n\t\t\r\n\t\treturn this.playerTurn;\r\n\t}",
"public void setWinner(Player winner) {\n this.winner = winner;\n }",
"public void nextTurn(){\r\n removeIceAndFire();\r\n currentTurn++;\r\n }",
"private void changeCurrentPlayer() {\n switch (currentPlayer) {\n case 0: currentPlayer = 1;\n return;\n default: currentPlayer = 0;\n return;\n }\n }",
"public synchronized void setMyTurn(boolean status)\n {\n \tmyTurn[0]=status;\n }",
"public void setMove(char player, int place) {\n\n playBoard[place] = player;\n }",
"@Override\n public void setPlayerDoneBrainstorming(Player player, boolean value){\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneBrainstorming\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneBrainstorming\");\n }\n }",
"public static void nextTurn(){\n\t\tPlayerButton [][] ary = GameBoard.getPBAry();\n\t\t\n\t\tfor( int x=0; x< ary.length; x++ ){\n\t\t\tfor( int y=0; y<ary[x].length; y++ ){\n\t\t\t\tary[x][y].setMovable( false );\n\t\t\t}\n\t\t}\n\t\t\n\t\tcurr++;\n\t\tif(curr >= players.size())\n\t\t\tcurr=0;\n\n\t\tif(players.get(curr).hasBeenKicked()){\n\t\t\tnextTurn();\n\t\t}\n\t}",
"public void changePlayerMode(PlayerMode p) {\n\t\t\r\n\t\tplayerMode = p;\r\n\t\tif (playerMode != PlayerMode.manual) decideMakeAutomaicMove();\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\npublic boolean changeTurn() {\n\tif (currentPlayer.hasNext()) {\n\t\tcurrentPlayer = currentPlayer.getNext();\n\t\treturn true;\n\t}\nreturn false;\n}",
"public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }",
"public final void turnOver() {\r\n\t\tif (inPlay() == player1())\r\n\t\t\tsetInPlay(player2());\r\n\t\telse if (inPlay() == player2())\r\n\t\t\tsetInPlay(player1());\r\n\t\telse\r\n\t\t\tthrow new IllegalStateException(\"Can`t swap players for game! \"\r\n\t\t\t\t\t+ this);\r\n\t}",
"public Builder setCurrentTurn(int value) {\n \n currentTurn_ = value;\n onChanged();\n return this;\n }",
"public void setPlayerTurnName(){\n game.setPlayerTurn();\n String playerTurnName = game.getPlayerTurnName();\n playerturntextID.setText(playerTurnName + \" : Turn !!\");\n }",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public void turnOn ()\n\t{\n\t\tthis.powerState = true;\n\t}",
"void onTurn();",
"public void restart(){\n for(Player p: players)\n if(p.getActive())\n p.reset();\n turn = 0;\n currentPlayer = 0;\n diceRoller=true;\n }",
"private void NextTurn() {\n\t\tTextView tvStatus = (TextView) findViewById(R.id.tvStatus);\n\t\t\n\t\t\tif(player_1){\n\t\t\t\tplayer_1 = false;\n\t\t\t\tif(players == 1){ \n\t\t\t\t\ttvStatus.setText(\"Android Nole's turn\");\n\t\t\t\t\tLog.i(\"TEST\",\"Android turn\");\n\t\t\t\t\tAndroidTurn();\n\t\t\t\t}else{\n\t\t\t\t\ttvStatus.setText(\"Nole's turn\");\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tplayer_1 = true;\n\t\t\t\ttvStatus.setText(\"Gator's turn\");\n\t\t\t}\n\t\t}",
"public void play(FightTurn turn);",
"public void extraTurn() {\r\n\t\textraTurn = true;\r\n\t}",
"public int changeTurn(int currentTurn)\n {\n if (currentTurn + 1 >= players.size())\n {\n\n currentTurn = 0;\n }\n\n // It's the next player's turn, add one more to whoseTurn\n else\n {\n currentTurn++;\n }\n\n return currentTurn;\n }",
"public void turnOver() {\n if(firstPlayer == whosTurn()) {\n turn = secondPlayer;\n } else {\n turn = firstPlayer;\n }\n hasPlacedPiece = false;\n hasRotatedBoard = false;\n }"
]
| [
"0.7369993",
"0.7352865",
"0.7318808",
"0.72519493",
"0.7072087",
"0.70661813",
"0.6926491",
"0.68584406",
"0.67737585",
"0.67415196",
"0.66930854",
"0.6610932",
"0.6609573",
"0.65991527",
"0.65784574",
"0.6578192",
"0.6572467",
"0.65587556",
"0.6527713",
"0.6517228",
"0.64620733",
"0.6447281",
"0.6434423",
"0.64291704",
"0.6366449",
"0.63603383",
"0.6340064",
"0.6334462",
"0.63189524",
"0.6311601",
"0.626149",
"0.6194216",
"0.6181344",
"0.61597",
"0.6149869",
"0.6143704",
"0.6136538",
"0.61165303",
"0.6111466",
"0.61092186",
"0.6101542",
"0.60595816",
"0.60574204",
"0.60501903",
"0.6035009",
"0.6031688",
"0.60268587",
"0.601948",
"0.60179573",
"0.6002547",
"0.59996724",
"0.59933215",
"0.5992995",
"0.59798163",
"0.59767294",
"0.59594357",
"0.5900137",
"0.58941543",
"0.5893433",
"0.5892693",
"0.5891962",
"0.58897024",
"0.58861893",
"0.58757275",
"0.5849821",
"0.58126193",
"0.580347",
"0.5784281",
"0.5777573",
"0.577507",
"0.5761505",
"0.57544327",
"0.5752516",
"0.5747103",
"0.57409656",
"0.574022",
"0.5738508",
"0.5730524",
"0.57245195",
"0.57216835",
"0.57062715",
"0.57028353",
"0.5702343",
"0.56951565",
"0.5678423",
"0.56604403",
"0.5659329",
"0.5658121",
"0.5650711",
"0.5648753",
"0.5645402",
"0.5643325",
"0.5632192",
"0.5623324",
"0.5619175",
"0.5616588",
"0.56158483",
"0.56069165",
"0.5606101",
"0.5593769"
]
| 0.755541 | 0 |
Changes the world to GameWorld. | public void newGameWorld()
{
addObject(new Blackout("Fade"), getWidth() / 2, getHeight() / 2);
removeAllObjects();
GameWorld gameWorld = new GameWorld();
Greenfoot.setWorld(gameWorld);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setWorld(GameData world) {\r\n this.world = world;\r\n }",
"public void setWorld(World world) {\n this.world = world;\n }",
"protected void updateWorld(World world) {\r\n\t\tthis.world = world;\r\n\t\tsetup(); //Call setup again to re assign certain variables that depend\r\n\t\t\t\t // on the world\r\n\t\tbufferWorld(); //Buffer the new world\r\n\t}",
"@Model\n\tprotected void setWorld(World world) {\n\t\tthis.world = world;\n\t}",
"public static void setWorld(World aWorld)\r\n/* */ {\r\n\t \tlogger.info(count++ + \" About to setWotld : \" + \"Agent\");\r\n/* 43 */ \tworldForAgent = aWorld;\r\n/* */ }",
"@Override\n public void world() {\n super.world();\n }",
"@Override\n\tpublic void update() {\n\t\tworld.update();\n\t}",
"public void setWorld(World world) {\n\t\tthis.world = world;\n\n\t\tsetPlaying(world.isPlayOnStart());\n\t}",
"public void updateGameWorld() {\r\n\t\t//divide the user entered height by the height of the canvas to get a ratio\r\n\t\tfloat canvas_height = Window.getCanvas().getHeight();\r\n\t\tfloat new_height = EnvironmentVariables.getHeight();\r\n\t\tfloat ratio = new_height / canvas_height;\r\n\t\t\r\n\t\t//use this ration th=o set the new meter value\r\n\t\tEnvironmentVariables.setMeter(EnvironmentVariables.getMeter() * ratio);\r\n\t\t\r\n\t\t//use the ratio to set all objects new location\r\n\t\tfor(GameObject obj: EnvironmentVariables.getWorldObjects()) {\r\n\t\t\tobj.setX(obj.getX() * ratio);\r\n\t\t\tobj.setY(obj.getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t\tfor(GameObject obj: EnvironmentVariables.getTerrain()) {\r\n\t\t\tobj.setX(obj.getX() * ratio);\r\n\t\t\tobj.setY(obj.getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t\tif(EnvironmentVariables.getMainPlayer() != null) {\r\n\t\t\tEnvironmentVariables.getMainPlayer().setX(EnvironmentVariables.getMainPlayer().getX() * ratio);\r\n\t\t\tEnvironmentVariables.getMainPlayer().setY(EnvironmentVariables.getMainPlayer().getY() * ratio);\r\n\t\t}\r\n\t\t\r\n\t}",
"public void addToWorld(World world);",
"public void onWorldChanged(World world);",
"void update(Env world) throws Exception;",
"public GameFrame(final World world) {\n this.world = world;\n }",
"public void setWorld(World world) throws IllegalStateException {\n\t\tif (!canHaveAsWorld(world))\n\t\t\tthrow new IllegalStateException(\"Invalid position in the world trying to assign this entity to.\");\n\t\n\t\t//If current world is null, don't try to remove 'this' from it\n\t\t//If world is null, don't try to add anything to it\n\t\t//This allows us to provide 'null' as an argument in case we want to \n\t\t//undo the association for this entity.\n\t\tif (!(this.getWorld() == null) && !(world == null)) {\n\t\t\tthis.getWorld().removeEntity(this);\n\t\t\tworld.addEntity(this);\n\t\t}\n\n\t\tthis.world = world;\n\t\t\n\t}",
"public GameData getWorld() {\r\n return world;\r\n }",
"public void resetWorld(){\r\n\t\tSystem.out.println(\"Resetting world\");\r\n\t\tengine.removeAllEntities();\r\n\t\tlvlFactory.resetWorld();\r\n\t\t\r\n\t\tplayer = lvlFactory.createPlayer(cam);\r\n\t\tlvlFactory.createFloor();\r\n lvlFactory.createWaterFloor();\r\n \r\n int wallWidth = (int) (1*RenderingSystem.PPM);\r\n int wallHeight = (int) (60*RenderingSystem.PPM);\r\n TextureRegion wallRegion = DFUtils.makeTextureRegion(wallWidth, wallHeight, \"222222FF\");\r\n lvlFactory.createWalls(wallRegion); //TODO make some damn images for this stuff \r\n \r\n // reset controller controls (fixes bug where controller stuck on directrion if died in that position)\r\n controller.left = false;\r\n controller.right = false;\r\n controller.up = false;\r\n controller.down = false;\r\n controller.isMouse1Down = false;\r\n controller.isMouse2Down = false;\r\n controller.isMouse3Down = false;\r\n\t\t\r\n\t}",
"public void changeLocation(World newWorld, int x, int y, DIRECTION facing, Color color);",
"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 GameWorld(){\r\n\t\t\r\n\t}",
"public World makeWorld() {\n World world = new World(1000, 1000);\n world.createEntity().addComponent(new CursorComponent());\n \n ProjectileSystem projectileSystem = new ProjectileSystem();\n world.addSystem(projectileSystem, 1);\n \n return world;\n }",
"public GameWorld(GameScreen gameScreen) {\n\n\t\thighScore = 0;\n\t\tfont = Assets.font;\n\t\tbigFont = Assets.bigFont;\n\t\t\n\t\tcamera = new OrthographicCamera();\n\t\tcamera.setToOrtho(true, 640, 480);\n\t\tbatch = new SpriteBatch();\n\t\t\n\t\tplayer = new Player();\n\t\treset();\n\t}",
"protected abstract void initializeWorld();",
"public void setWorld(@Nullable World worldIn)\n {\n this.world = worldIn;\n\n if (worldIn == null)\n {\n this.field_78734_h = null;\n }\n }",
"public void updateWorldRegion()\n\t{\n\t\tif(!isVisible)\n\t\t{\n\t\t\treturn;\n\t\t}\n\n\t\tL2WorldRegion newRegion = WorldManager.getInstance().getRegion(getWorldPosition());\n\t\tL2WorldRegion oldRegion = region;\n\t\tif(!newRegion.equals(oldRegion))\n\t\t{\n\t\t\tif(oldRegion != null)\n\t\t\t{\n\t\t\t\toldRegion.removeVisibleObject(object);\n\t\t\t}\n\n\t\t\tsetWorldRegion(newRegion);\n\n\t\t\t// Add the L2Object spawn to _visibleObjects and if necessary to all players of its L2WorldRegion\n\t\t\tnewRegion.addVisibleObject(object);\n\t\t}\n\t}",
"public void update(World world, Target target);",
"public SimulationWorld( SimulationEngine engine )\n {\n this.engine = engine;\n this.gravity = new Vector3f( 0f, -9.81f, 0f );\n }",
"private void createWorld() {\n world = new World();\n world.setEventDeliverySystem(new BasicEventDeliverySystem());\n //world.setSystem(new MovementSystem());\n world.setSystem(new ResetPositionSystem());\n world.setSystem(new RenderingSystem(camera, Color.WHITE));\n\n InputSystem inputSystem = new InputSystem();\n InputMultiplexer inputMultiplexer = new InputMultiplexer();\n inputMultiplexer.addProcessor(inputSystem);\n inputMultiplexer.addProcessor(new GestureDetector(inputSystem));\n Gdx.input.setInputProcessor(inputMultiplexer);\n world.setSystem(inputSystem);\n world.setSystem(new MoveCameraSystem(camera));\n\n world.initialize();\n }",
"public World() {\n\t\tblockIDArray = new byte[WORLD_SIZE][WORLD_HEIGHT][WORLD_SIZE];\n\t\tentities\t = new ArrayList<Entity>();\n\t\trand\t\t = new Random();\n\t\t\n new GravityThread(this);\n\t\t\t\t\n\t\tgenerateWorld();\n\t}",
"private void buildWorld() {\r\n\t\tremoveAll();\r\n\t\tintro = null;\r\n\t\tfacingEast = true;\r\n\t\t\r\n\t\taddLevels();\r\n\t\taddCharacters();\r\n\t\taddLifeDisplay();\r\n\t}",
"@Override\r\n public void generateWorld(World world) {\r\n // create the static non-moving bodies\r\n this.creator.createWorld(world, this, COLLISIONLAYERS);\r\n // create the transition areas\r\n this.creator.createTransition(world, this, NORTHTRANSITION, NORTH);\r\n this.creator.createTransition(world, this, SOUTHTRANSITION, SOUTH);\r\n \r\n }",
"@Override\n\tpublic World getWorld() { return world; }",
"public void setWorldData(WorldData worldData)\n {\n this.worldData = worldData;\n }",
"public void loadWorld() {\n\t\tint[][] tileTypes = new int[100][100];\n\t\tfor (int x = 0; x < 100; x++) {\n\t\t\tfor (int y = 0; y < 100; y++) {\n\t\t\t\ttileTypes[x][y] = 2;\n\t\t\t\tif (x > 40 && x < 60 && y > 40 && y < 60) {\n\t\t\t\t\ttileTypes[x][y] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tEntityList entities = new EntityList(0);\n\t\tPlayer player = new Player(Direction.SOUTH_WEST, 50, 50);\n\t\tentities.addEntity(player);\n\t\tentities.addEntity(new Tree(Direction.SOUTH_WEST,49, 49));\n\t\tworld = new World(new Map(tileTypes), player, entities);\n\t}",
"public void setWorldTime(long time)\n {\n worldTime = time;\n }",
"World getWorld();",
"public void updateWorld(Location loc)\n {\n worldData = getPersistence().get(loc.getWorld().getName(), WorldData.class);\n }",
"@Override\n public void afterWorldInit() {\n }",
"@Override\n\tpublic void handleEventWorldUpdate(World world) {\n\t}",
"private GameWorld getGameWorld(){\n\t\tHashMap<String, Location> locations = new HashMap<String, Location>();\n\t\tHashMap<Avatar, Location> avatarLocations = new HashMap<Avatar, Location>();\n\t\tArrayList<Avatar> avatars = new ArrayList<Avatar>();\n\t\t\n\t\tLocation testLocation = new Location(\"Test Location\");\n\t\tAvatar testAvatar = new Avatar(\"Slim\", 1);\n\t\t\n\t\tlocations.put(\"testLocation\", testLocation);\n\t\tavatarLocations.put(testAvatar, testLocation);\n\t\tavatars.add(testAvatar);\n\t\t\n\t\treturn new GameWorld(locations, avatarLocations, avatars);\n\t}",
"public World getWorld() {\n return world;\n }",
"public World getWorld() {\n return world;\n }",
"public static World getWorld() {\n\t\treturn world;\n\t}",
"public void recreateFromExistingWorld(WorldInfo original) {\n this.worldName = original.getWorldName();\n this.worldSeed = Long.toString(original.getSeed());\n WorldType worldtype = original.getGenerator() == WorldType.CUSTOMIZED ? WorldType.DEFAULT : original.getGenerator();\n this.selectedIndex = worldtype.getId();\n this.chunkProviderSettingsJson = original.getGeneratorOptions();\n this.generateStructuresEnabled = original.isMapFeaturesEnabled();\n this.allowCheats = original.areCommandsAllowed();\n if (original.isHardcore()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.HARDCORE;\n } else if (original.getGameType().isSurvivalOrAdventure()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.SURVIVAL;\n } else if (original.getGameType().isCreative()) {\n this.field_228197_f_ = CreateWorldScreen.GameMode.CREATIVE;\n }\n\n }",
"public World()\n\t{\n\t\tinitWorld();\t\n\t}",
"public void setWorldDisplay(Pane worldDisplay) {\n this.worldDisplay = worldDisplay;\n }",
"public World getWorld () {\n\t\treturn world;\n\t}",
"public World getWorld() {\n\t\treturn world;\n\t}",
"public void initAndSetWorld() {\n\t\tHashMap<String, Location> gameWorld = new HashMap<String, Location>();\r\n\t\tthis.world = gameWorld;\r\n\t\t\r\n\t\t// CREATING AND ADDING LOCATIONS, LOCATION AND ITEM HASHES ARE AUTOMATICALLY SET BY CALLING CONSTRUCTOR\r\n\t\tLocation valley = new Location(\"valley\", \"Evalon Valley. A green valley with fertile soil.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(valley);\r\n\t\tLocation plains = new Location(\"plains\", \"West Plains. A desolate plain.\",\r\n\t\t\t\t\"You cannot go in that direction. There is nothing but dust over there.\",true);\r\n\t\tthis.addLocation(plains);\r\n\t\tLocation mountain = new Location(\"mountain\", \"Northern Mountains. A labyrinth of razor sharp rocks.\",\r\n\t\t\t\t\"You cannot go in that direction. The Mountain is not so easily climbed.\",true);\r\n\t\tthis.addLocation(mountain);\r\n\t\tLocation shore = new Location(\"shore\", \"Western Shore. The water is calm.\",\r\n\t\t\t\t\"You cannot go in that direction. There might be dangerous beasts in the water.\",true);\r\n\t\tthis.addLocation(shore);\r\n\t\tLocation woods = new Location(\"woods\", \"King's Forest. A bright forest with high pines.\",\r\n\t\t\t\t\"You cannot go in that direction. Be careful not to get lost in the woods.\",true);\r\n\t\tthis.addLocation(woods);\r\n\t\tLocation hills = new Location(\"hills\", \"Evalon hills.\",\r\n\t\t\t\t\"You cannot go in that direction.\",true);\r\n\t\tthis.addLocation(hills);\r\n\t\tLocation cave = new Location(\"cave\", \"Blood Cave. Few of those who venture here ever return.\",\r\n\t\t\t\t\"The air smells foul over there, better not go in that direction.\",true);\r\n\t\tthis.addLocation(cave);\r\n\t\tLocation innercave = new Location(\"innercave\", \"Blood Cave. This path must lead somewhere.\",\r\n\t\t\t\t\"Better not go over there.\",true);\r\n\t\t\r\n\t\tLocation westhills = new Location(\"westhills\", \"Thornhills. A great many trees cover the steep hills.\",\r\n\t\t\t\t\"You cannot go in that direction. Watch out for the thorny bushes.\",true);\r\n\t\tthis.addLocation(westhills);\r\n\t\t\r\n\t\tLocation lake = new Location(\"lake\", \"Evalon Lake. A magnificent lake with a calm body of water.\",\r\n\t\t\t\t\"You cannot go in that direction, nothing but fish over there.\",true);\r\n\t\tthis.addLocation(lake);\r\n\t\t\r\n\t\tLocation laketown = new Location(\"laketown\", \"Messny village. A quiet village with wooden houses and a dirt road.\",\r\n\t\t\t\t\"You cannot go in that direction, probably nothing interesting over there.\",true);\r\n\t\t\r\n\t\tLocation inn = new Room(\"inn\", \"Messny Inn. A small but charming inn in the centre of the village.\",\r\n\t\t\t\t\"You cannot go in that direction.\",false);\r\n\t\t\r\n\t\t// CONNECTING LOCATIONS\r\n\t\t// IT DOES NOT MATTER ON WHICH LOCATION THE METHOD ADDPATHS IS CALLED\r\n\t\tvalley.addPaths(valley, \"east\", plains, \"west\");\r\n\t\tvalley.addPaths(valley, \"north\", mountain, \"south\");\r\n\t\tvalley.addPaths(valley, \"west\", shore, \"east\");\r\n\t\tvalley.addPaths(valley, \"south\", woods, \"north\");\r\n\t\twoods.addPaths(woods, \"east\", hills, \"west\");\r\n\t\thills.addPaths(hills, \"south\", westhills, \"north\");\r\n\t\twesthills.addPaths(westhills, \"west\", lake, \"east\");\r\n\t\tlake.addPaths(woods, \"south\", lake, \"north\");\r\n\t\tlake.addPaths(lake, \"west\", laketown, \"east\");\r\n\t\tmountain.addPaths(mountain, \"cave\", cave, \"exit\");\r\n\t\tlaketown.addPaths(laketown, \"inn\", inn, \"exit\");\r\n\t\t\r\n\r\n\t\t\r\n\t\t// CREATE EMPTY ARMOR SET FOR GAME START AND UNEQUIPS\r\n\t\tBodyArmor noBodyArmor = new BodyArmor(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBodyArmor(noBodyArmor);\r\n\t\tBoots noBoots = new Boots(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultBoots(noBoots);\r\n\t\tHeadgear noHeadgear = new Headgear(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultHeadgear(noHeadgear);\r\n\t\tGloves noGloves = new Gloves(\"unarmored\", 0, 0, true, 0);\r\n\t\tthis.setDefaultGloves(noGloves);\r\n\t\tWeapon noWeapon = new Weapon(\"unarmored\", 0, 0, true, 5, false);\r\n\t\tthis.setDefaultWeapon(noWeapon);\r\n\t\t\r\n\t\tthis.getPlayer().setBodyArmor(noBodyArmor);\r\n\t\tthis.getPlayer().setBoots(noBoots);\r\n\t\tthis.getPlayer().setGloves(noGloves);\r\n\t\tthis.getPlayer().setHeadgear(noHeadgear);\r\n\t\tthis.getPlayer().setWeapon(noWeapon);\r\n\t\t\r\n\t\t\r\n\t\t// CREATING AND ADDING ITEMS TO PLAYER INVENTORY \r\n\t\tItem potion = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tthis.getPlayer().addItem(potion);\r\n\t\tWeapon sword = new Weapon(\"sword\", 10, 200, true, 10, false);\r\n\t\tvalley.addItem(sword);\r\n\t\t\r\n\t\tWeapon swordEvalon = new Weapon(\"EvalonianSword\", 15, 400, true, 1, 15, false);\r\n\t\thills.addItem(swordEvalon);\r\n\t\t\r\n\t\tPotion potion2 = new Potion(\"largepotion\", 2, 200, true, 25);\r\n\t\tPotion potion3 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tPotion potion4 = new Potion(\"potion\", 2, 200, true, 25);\r\n\t\tlake.addItem(potion3);\r\n\t\tinn.addItem(potion4);\r\n\t\t\r\n\t\tItem potion5 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion6 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\twoods.addItem(potion6);\r\n\t\t\r\n\t\tPurse purse = new Purse(\"purse\",0,0,true,100);\r\n\t\tvalley.addItem(purse);\r\n\t\t\r\n\t\tChest chest = new Chest(\"chest\", 50, 100, false, 50);\r\n\t\tvalley.addItem(chest);\r\n\t\tchest.addItem(potion2);\r\n\t\t\r\n\t\tChest chest2 = new Chest(\"chest\", 10, 10, false, 20);\r\n\t\tinn.addItem(chest2);\r\n\t\t\r\n\t\t// ENEMY LOOT\r\n\t\tBodyArmor chestplate = new BodyArmor(\"chestplate\", 20, 200, true, 20);\r\n\t\t\r\n\t\t// ADDING NPC TO WORLD\r\n\t\tNpc innkeeper = new Npc(\"Innkeeper\", false, \"Hello, we have rooms available if you want to stay over night.\",true,1000);\r\n\t\tinn.addNpc(innkeeper);\r\n\t\t\r\n\t\tItem potion7 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tItem potion8 = new Potion(\"potion\", 1, 100, true, 10);\r\n\t\tinnkeeper.addItem(potion7);\r\n\t\tinnkeeper.addItem(potion8);\r\n\t\t\r\n\t\tNpc villager = new Npc(\"Lumberjack\", false, \"Gotta get those logs back to the mill soon, but first a few pints at the inn!\",false,0);\r\n\t\tlaketown.addNpc(villager);\r\n\t\t\r\n\t\tEnemy enemy1 = new Enemy(\"Enemy\", true, \"Come at me!\", 50, chestplate, 200, 10);\r\n\t\tmountain.addNpc(enemy1);\r\n\t\t\r\n\t\tEnemyGuardian guardian = new EnemyGuardian(\"Guardian\", true, \"I guard this cave.\", 100, potion5, 600, 15, innercave, \"An entrance reveals itself behind the fallen Guardian.\", \"inwards\", \"entrance\");\r\n\t\tcave.addNpc(guardian);\r\n\t\t\r\n\t\t// ADDING SPAWNER TO WORLD\r\n\t\tthis.setNpcSpawner(new BanditSpawner()); \r\n\t\t\r\n\t\t// ADDING PLAYER TO THE WORLD\r\n\t\tthis.getPlayer().setLocation(valley);\r\n\t\t\r\n\t\t// QUEST\r\n\t\tQuest noquest = new Quest(\"noquest\",\"nodesc\",\"nocomp\",false,true,1000,0,0,0);\r\n\t\tthis.setCurrentQuest(noquest);\r\n\t\t\r\n\t\t\r\n\t\tQuest firstquest = new Quest(\"A New Journey\",\"Find the lost sword of Evalon.\",\"You have found the lost sword of Evalon!\",false,false,1,400,0,1);\r\n\t\t\r\n\t\tScroll scroll = new Scroll(\"Questscroll\",1,1,true,firstquest);\r\n\t\tmountain.addItem(scroll);\r\n\t\t\r\n\t\tSystem.out.println(\"All set up.\");\r\n\t}",
"public void currentWorld(WumpusWorld world) throws RemoteException {\n\t\twidth = world.getWidth();\n\t\theight = world.getHeight();\n\t\tif (frame == null) {\n\t\t\tframe = new Frame();\n\t\t\tframe.addWindowListener(new WindowAdapter() {\n\t\t\t\tpublic void windowClosing(WindowEvent evt) {\n\t\t\t\t\tframe.dispose();\n\t\t\t\t\tSystem.exit(0);\n\t\t\t\t}\n\t\t\t});\n\t\t\tframe.setTitle(\"The Wumpus Monitor\");\n\t\t\tframe.setLayout(new GridLayout(width * 2, height * 2));\n\t\t\tDimension d = Toolkit.getDefaultToolkit().getScreenSize();\n\t\t\tframe.setBounds(0, 0, d.width - 1, d.height - 1);\n\t\t} else {\n\t\t\tframe.removeAll();\n\t\t}\n\t\trooms = new DirectionalPanel[width][height][8];\n\t\tfor (int row = 0; row < width; row++) {\n\t\t\tfor (int col = 0; col < height; col++) {\n\t\t\t\trooms[row][col][0] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.NORTH | ImagePanel.WEST);\n\t\t\t\trooms[row][col][1] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.NORTH | ImagePanel.EAST);\n\t\t\t\trooms[row][col][2] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.SOUTH | ImagePanel.WEST);\n\t\t\t\trooms[row][col][3] = new DirectionalPanel(-1,\n\t\t\t\t\t\t\t\t\t\tImagePanel.SOUTH | ImagePanel.EAST);\n\t\t\t\tfor (int k = 4; k < 8; k++) {\n\t\t\t\t\trooms[row][col][k] = new DirectionalPanel(-1);\n\t\t\t\t}\n\t\t\t\tagentPositions.put(new Point(row, col), new HashSet());\n\t\t\t}\n\t\t}\n\t\tfor (int row = 0; row < world.getWidth(); row++) {\n\t\t\tfor (int turn = 0; turn < 2; turn++) {\n\t\t\t\tfor (int col = 0; col < world.getHeight(); col++) {\n\t\t\t\t\tframe.add(rooms[height - row - 1][col][2*turn]);\n\t\t\t\t\tframe.add(rooms[height - row - 1][col][2*turn + 1]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int row = 0; row < width; row++) {\n\t\t\tfor (int col = 0; col < height; col++) {\n\t\t\t\tRoom room = world.getRoom(row, col);\n\t\t\t\tif (room.getPit()) {\n\t\t\t\t\taddImage(row, col, PIT_FILE, PIT_FILE);\n\t\t\t\t}\n\t\t\t\tif (room.getGold()) {\n\t\t\t\t\taddImage(row, col, GOLD_FILE, GOLD_FILE);\n\t\t\t\t}\n\t\t\t\tWumpus w = room.getWumpus();\n\t\t\t\tif (w != null) {\n\t\t\t\t\taddImage(row, col, w.getName(), WUMPUS_FILE);\n\t\t\t\t\tsetDirection(row, col, w.getName(), w.getDirection());\n\t\t\t\t\tPoint pos = new Point(w.getRow(), w.getColumn());\n\t\t\t\t\tagents.put(w.getName(), pos);\n\t\t\t\t\tSet s = (Set) agentPositions.get(pos);\n\t\t\t\t\ts.add(w);\n\t\t\t\t\tcheckStench(row + 1, col - 1, row - 1, col + 1);\n\t\t\t\t}\n\t\t\t\tSet explorers = room.getExplorers();\n\t\t\t\tfor (Iterator it = explorers.iterator(); it.hasNext(); ) {\n\t\t\t\t\tExplorer e = (Explorer) it.next();\n\t\t\t\t\taddImage(row, col, e.getName(), EXPLORER_FILE);\n\t\t\t\t\tsetDirection(row, col, e.getName(), e.getDirection());\n\t\t\t\t\tPoint pos = new Point(e.getRow(), e.getColumn());\n\t\t\t\t\tagents.put(e.getName(), pos);\n\t\t\t\t\tSet s = (Set) agentPositions.get(pos);\n\t\t\t\t\ts.add(e);\n\t\t\t\t}\n\t\t\t\tboolean breeze = false;\n\t\t\t\tif (row > 0 && world.getRoom(row - 1, col).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (row < world.getWidth() - 1 &&\n\t\t\t\t\t\t\t\t\tworld.getRoom(row + 1, col).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (col > 0 && world.getRoom(row, col - 1).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t} else if (col < world.getHeight() - 1 &&\n\t\t\t\t\t\t\t\t\tworld.getRoom(row, col + 1).getPit()) {\n\t\t\t\t\tbreeze = true;\n\t\t\t\t}\n\t\t\t\tif (breeze) {\n\t\t\t\t\taddImage(row, col, BREEZE_FILE, BREEZE_FILE);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tframe.show();\n\t\tthis.enabled = true;\n\t}",
"public void removeFromWorld(World world);",
"public void moveWorld(Direction direction) {\n switch (direction) {\n case UP:\n renderer.setMovingDirectionV(VDirection.UP);\n break;\n case DOWN:\n renderer.setMovingDirectionV(VDirection.DOWN);\n break;\n case LEFT:\n renderer.setMovingDirectionH(HDirection.LEFT);\n break;\n case RIGHT:\n renderer.setMovingDirectionH(HDirection.RIGHT);\n break;\n }\n }",
"private void configureWorlds(){\n switch (gameWorld){\n case NORMAL:\n world.setPVP(true);\n world.setKeepSpawnInMemory(false);\n world.setAutoSave(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n case NETHER:\n world.setPVP(true);\n world.setAutoSave(false);\n world.setKeepSpawnInMemory(false);\n world.setStorm(false);\n world.setThundering(false);\n world.setMonsterSpawnLimit((int) (mobLimit * 0.45));\n world.setAnimalSpawnLimit((int) (mobLimit * 0.45));\n world.setWaterAnimalSpawnLimit((int) (mobLimit * 0.1));\n world.setDifficulty(Difficulty.HARD);\n break;\n }\n }",
"public void setWorldPosition(int worldPosition) {\n\t\tcurrChunk = worldPosition / MapChunk.WIDTH;\n\t\tgrowMap();\n\t}",
"public OverWorld()\n { \n // Create a new world with 800x600 cells with a cell size of 1x1 pixels.\n super(1024, 600, 1, false);\n Setup();\n }",
"public void buildWorld() {\n buildBoundaryWall();\n buildDiscreteWorld();\n removeBoundaryWall();\n reorganizeNote();\n connectWorld();\n buildWall();\n }",
"public static void clearWorld() {\n\t\tpopulation.clear();\n\t}",
"public void createWorld(){\n\n }",
"public World setCurrentWorld(int index) {\n\t\tassert index >= 0 && index < levels.size();\n\t\treturn levels.get(levelIndex = index);\n\t}",
"public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}",
"@Override\n\tpublic void render() {\n\t\tif(!paused){\n\t\t\t//Update the game world with time since last rendered frame\n\t\t\tworldController.update(Gdx.graphics.getDeltaTime());\n\t\t}\n\t\t\n\t\t//Set ClearColor to default color\n\t\tGdx.gl20.glClearColor(0.0f, 0.0f, 0.0f, 1.0f);\n\t\t\n\t\t//Clear the screen\n\t\tGdx.gl20.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\t\n\t\t//Render the game world to the screen\n\t\tworldRenderer.render();\n\t}",
"public boolean setMainWorldUID(World world, boolean keepOldWorld) {\n if (gameState != GameState.LOBBY) {\n getUtils().log(Logger.Level.INFO, this.getClass(), \"Call to set main world for game \" + name + \" (ID \" + gameID + \") while not in lobby mode, rejecting\");\n return false;\n }\n if (keepOldWorld) {\n otherWorlds.add(mainWorldUID);\n } else {\n GameManager.unregisterWorldGame(mainWorldUID);\n }\n GameManager.registerWorldGame(world.getUID(), this);\n mainWorldUID = world.getUID();\n reset();\n return true;\n }",
"public void switchGame() {\n \tplayerController.clearKeysPressed();\n game.game1 = !game.game1;\n if (game.game1) {\n \tgame.gameSnapshot = game.game1Snapshot;\n \tgame.rooms = game.game1Rooms;\n \tgame.characters = game.game1Characters;\n \tgame.player = game.player1;\n } else {\n \tgame.gameSnapshot = game.game2Snapshot;\n \tgame.rooms = game.game2Rooms;\n \tgame.characters = game.game2Characters;\n \tgame.player = game.player2;\n }\n \n currentNPCs = game.gameSnapshot.map.getNPCs(game.player.getRoom());\n getTileRenderer().setMap(game.player.getRoom().getTiledMap());\n getTileRenderer().clearPeople();\n getTileRenderer().addPerson((List<AbstractPerson>) ((List<? extends AbstractPerson>) currentNPCs));\n getTileRenderer().addPerson(game.player);\n }",
"@Override\n\tpublic void show() {\n\t\tworld = new Worlds();\n\t\trenderer = new WorldRenderer(world, false);\n\t\tcontroller = new WorldController(world);\n\t\tGdx.input.setInputProcessor(this);\n\t}",
"public WorldRegion(GameWorldEntity entity) {\n gameWorldEntities.add(entity);\n }",
"public World getWorld();",
"public static final SpriteWorld newWorld (String name) {\n\t\tif (Top.tgame != null && !isBindedSpriteLifeCycleListener) {\n\t\t\tTop.tgame.registerLifecycleListener(SpriteLifeCycleListener);\n\t\t\tisBindedSpriteLifeCycleListener = true;\n\t\t}\n\n\t\t// create new world\n\t\tSpriteWorld world = mSpriteWorlds.get(name);\n\t\tif (world == null) {\n\t\t\tworld = new SpriteWorld();\n\t\t\tworld.bind(name);\n\t\t\tmSpriteWorlds.put(name, world);\n\t\t}\n\t\treturn world;\n\t}",
"public void switchTo(GridWorld world)\n\t{\n\t\tonDeactivation();\n\t\tworld.makeCurrent();\n\t\tworld.onActivation();\n\t}",
"public void update(Observable o, Object arg)\n\t{\n\t\tgw = (IGameWorld) arg;\n\t\trepaint();\n\t\t//mapview will print out each object using the gameworld copy sent to the proxy\n\t\t/*System.out.println(\"World height: \" + ((IGameWorld)arg).getHeight() + \" World width: \" +((IGameWorld)arg).getWidth());\n\t\tGameWorldCollection gc = ((IGameWorld)arg).returnWorld();\n\t\tIIterator iter = gc.getIterator();\n\t\tSystem.out.println(\"*****************World info**********************\");\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tSystem.out.println((GameObject) iter.getNext());\n\t\t}\n\t\tSystem.out.println(\"*****************World info**********************\");\n\t\t*/\n\t}",
"public abstract World create(World world);",
"public SideScrollingWorld()\n { \n // Create a new world with 640x480 cells with a cell size of 1x1 pixels.\n // Final argument of 'false' means that actors in the world are not restricted to the world boundary.\n // See: https://www.greenfoot.org/files/javadoc/greenfoot/World.html#World-int-int-int-boolean-\n super(VISIBLE_WIDTH, VISIBLE_HEIGHT, 1, false);\n\n // Set up the starting scene\n setup();\n\n // Game on\n isGameOver = false;\n\n }",
"private World copyWorld(boolean useCloning) throws CloneNotSupportedException {\n\t \n\t if (useCloning == false) {\n\t \t\tif ( mWorld instanceof ArrayWorld) { // if mWorld (current) is an ArrayWorld\n\t \t\t\tWorld copy;\n\t \t\t\tcopy = new ArrayWorld((ArrayWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n\t \t\telse if ( mWorld instanceof PackedWorld) {\n\t \t\t\tWorld copy = new PackedWorld((PackedWorld)mWorld);\n\t \t\t\treturn (World)copy;\n\t \t\t}\n \t \t}\n\t else {\n\t\t World copy = (World) mWorld.clone();\n\t\t \treturn copy;\n\t }\n\t \n\t return null;\n\t}",
"public void resetWorld() {\n \t\tmyForces.clear();\n \t\t\n \t\tfor (CollidableObject obj : myObjects) {\n \t\t\tobj.detach();\n \t\t}\n \t\tmyObjects.clear();\n \t\t\n \t\taddHalfspaces();\n \t}",
"public static void clearWorld() {\n // TODO: Complete this method\n population.clear();\n babies.clear();\n }",
"private void renderWorld(SpriteBatch batch)\n {\n worldController.cameraHelper.applyTo(camera);\n batch.setProjectionMatrix(camera.combined);\n batch.begin();\n worldController.level.render(batch);\n batch.end();\n }",
"private void saveWorld() {\n try {\n jsonWriter.open();\n jsonWriter.write(world);\n jsonWriter.close();\n System.out.println(\"Saved world to \" + JSON_STORE);\n } catch (FileNotFoundException e) {\n System.out.println(\"Unable to write to file: \" + JSON_STORE);\n }\n }",
"public void renderWorld (SpriteBatch batch)\n\t{\n\t\tworldController.cameraHelper.applyTo(camera);\n\t\tbatch.setProjectionMatrix(camera.combined);\n\t\tbatch.begin();\n\t\tworldController.level.render(batch);\n\t\tbatch.end();\n\t\t\n\t\tif (DEBUG_DRAW_BOX2D_WORLD)\n\t\t{\n\t\t\tb2debugRenderer.render(worldController.b2world, camera.combined);\n\t\t}\n\t}",
"public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }",
"public MyWorld()\n { \n super(1200, 600, 1); \n prepare();\n bienvenida();\n instrucciones();\n sonido();\n }",
"public static void addWorld(World world) {\n\t\tworlds.add(world);\n\t}",
"public static void setTarget(GameWorld gw){\n\t\tif(game == null)\n\t\t\tgame = gw;\n\t}",
"@BeforeClass\n\tpublic static void setup() {\n\t\tbaseWorld = new BaseWorld(1000 ,1500);\n \tGameManager.get().setWorld(new BaseWorld(1000, 1500));\n\t}",
"public GameWon()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(550, 600, 1); \n addObject(b1,275,250);\n addObject(b2,275,380);\n }",
"public World getWorld ( ) {\n\t\treturn invokeSafe ( \"getWorld\" );\n\t}",
"void updateWorld() {\n // % of surrounding neighbours that are like me\n final double threshold = 0.33;\n\n State[][] satisfactionMatrix = getSatisfactionMatrix(world, threshold); //Create matrix with satisfied/unsatisfied.\n\n int nNotSatisfied = nUnsatisfied(satisfactionMatrix); //Counts number of unsatisfied cells.\n int nNa = nNA(satisfactionMatrix); // Counts number of NA cells\n int[][] unsArray = unsatisfiedArrays(satisfactionMatrix, nNotSatisfied); //Puts coordinates for unsatisfied cells in an array.\n int[][] NAArray = NAArrays(satisfactionMatrix, nNa); //Puts coordinates for unsatisfied cells in an array.\n\n world = shuffleUnsatisfied(world, unsArray, NAArray); //Shuffles the elements in the NA Array to give the unsatisfied cells new coordinates.\n }",
"public MyWorld()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(600, 600, 1); \n \n drawLines();\n \n for( int r = 0; r < board.length; r++ )\n {\n for( int c = 0; c < board[r].length; c++)\n {\n board[r][c] = \"\"; \n \n }\n }\n }",
"public void renderWorld(boolean renderWithLight);",
"public void update(GL2 gl){\r\n\t\t// Not implemented, chunks are immutable\r\n\t}",
"public final World getWorld() {\n\t\treturn baseTile.getWorld();\n\t}",
"public World getWorld() {\n return location.getWorld();\n }",
"public static World getWorld() {\n\t\treturn ModLoader.getMinecraftInstance().theWorld;\n\t}",
"void worldGo(int speed) {\n\t\tif (Hit != true) {\n\t\t\tfloat vo = 7;\n\t\t\tint x = 0;\n\t\t\tfloat y = vo;\n\t\t\tif (EZInteraction.isKeyDown(KeyEvent.VK_SPACE)) {\n\t\t\t\ty = (float) (-vo * 1.4);\n\t\t\t}\n\t\t\tif (turtle.image.getXCenter() < 250 || reachEnd == true) {\n\t\t\t\tx = speed;\n\t\t\t} else if (turtle.image.getXCenter() >= 250 && reachEnd == false) {\n\t\t\t\tmove(-speed);\n\t\t\t\tbackground.translateBy(-0.4, 0);\n\t\t\t}\n\t\t\tif (turtle.image.getYCenter() >= 700) {\n\t\t\t\tturtle.move(0, -vo);\n\t\t\t}\n\t\t\tturtle.move(x, y);\n\t\t\tif (turtle.image.getYCenter() <= 0) {\n\t\t\t\tturtle.move(0, -y);\n\t\t\t}\n\t\t\tfor (int a = 0; a < height; a++) {\n\n\t\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\t\tif (turtle.image.isPointInElement(FWorld[a][b].getXCenter(), FWorld[a][b].getYCenter())) {\n\t\t\t\t\t\t\tHit = true;\n\t\t\t\t\t\t\tint iX = FWorld[a][b].getXCenter();\n\t\t\t\t\t\t\tint iY = FWorld[a][b].getYCenter();\n\t\t\t\t\t\t\texplosion = EZ.addImage(\"boom.png\", iX, iY);\n\t\t\t\t\t\t\tGameOver.play();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (turtle.image.getXCenter() >= 1030) {\n\t\t\t\tPlayerreachEnd = true;\n\t\t\t}\n\t\t}\n\t}",
"public ThingNode getWorld()\n {\n return world;\n }",
"public GameInstance(int gameID, World world) {\r\n this.gameID = gameID;\r\n this.world = world;\r\n }",
"void sendJoinWorld(String worldName);",
"@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}",
"@Basic\n\tpublic World getWorld() {\n\t\treturn this.world;\n\t}",
"public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }",
"public void load() {\n World loadGame;\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n int fileOpened = fileChooser.showOpenDialog(GameFrame.this);\n\n if (fileOpened == JFileChooser.APPROVE_OPTION) {\n FileInputStream fileInput =\n new FileInputStream(fileChooser.getSelectedFile());\n ObjectInputStream objInput = new ObjectInputStream(fileInput);\n loadGame = (World) objInput.readObject();\n objInput.close();\n fileInput.close();\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n return;\n } catch (ClassNotFoundException x) {\n x.printStackTrace();\n return;\n }\n\n world = loadGame;\n gridPanel.removeAll();\n fillGamePanel();\n world.reinit();\n setWorld(world);\n GameFrame.this.repaint();\n System.out.println(\"Game loaded.\");\n }",
"public abstract boolean setLocation(World world, int coords[]);",
"@Override\n\tpublic void render() {\n\t\tGdx.gl.glClearColor(0, 0, 0, 0);\n\t\tGdx.gl.glClear(GL20.GL_COLOR_BUFFER_BIT);\n\t\tworld.step(1f / 60f, 6, 2);\n\n\t\tgame.act();\n\t\tgame.render();\n\n\t}"
]
| [
"0.7892208",
"0.7571313",
"0.75299495",
"0.72067255",
"0.6971724",
"0.6912633",
"0.68673843",
"0.6843358",
"0.6843194",
"0.67773575",
"0.6753272",
"0.674827",
"0.66813594",
"0.6596207",
"0.65782654",
"0.64825386",
"0.6421659",
"0.6408244",
"0.6406867",
"0.6400593",
"0.62909776",
"0.62755424",
"0.6262807",
"0.6261636",
"0.62543184",
"0.6218823",
"0.61999655",
"0.61946166",
"0.6187587",
"0.61513567",
"0.61406773",
"0.61395717",
"0.61333305",
"0.61271924",
"0.6109844",
"0.6076668",
"0.6066029",
"0.6062662",
"0.60517174",
"0.6043612",
"0.6043612",
"0.6014773",
"0.6013091",
"0.60021436",
"0.59844285",
"0.5947066",
"0.59350324",
"0.59150285",
"0.5914419",
"0.59136075",
"0.5908002",
"0.5895887",
"0.58873403",
"0.5884183",
"0.5844854",
"0.5819669",
"0.5810157",
"0.5795068",
"0.5789779",
"0.57829714",
"0.5774838",
"0.5774087",
"0.57685167",
"0.57664376",
"0.57616186",
"0.57531476",
"0.57502496",
"0.5725773",
"0.56975925",
"0.5692696",
"0.56859857",
"0.56760013",
"0.5670295",
"0.56589407",
"0.5645482",
"0.564097",
"0.56384367",
"0.5624944",
"0.5612638",
"0.56078535",
"0.5606711",
"0.5592964",
"0.55856204",
"0.5584425",
"0.5579388",
"0.55493546",
"0.55381036",
"0.5536954",
"0.5535578",
"0.55333257",
"0.55319005",
"0.5523912",
"0.55153435",
"0.5514884",
"0.55081254",
"0.55081254",
"0.5506799",
"0.55062807",
"0.55057675",
"0.55043155"
]
| 0.68452024 | 7 |
Removes the player info box. | public void removePlayerPkmnInfoBox()
{
removeObject(playerPkmnInfoBox);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearInfo() {\n helpFocal.setText(null);\n helpLens.setText(null);\n helpObject.setText(null);\n helpImage.setText(null);\n helpPrinciple.setText(null);\n info.setText(null);\n }",
"public void unload() {\n this.currentRooms.clear();\n // Zero the info panel.\n this.roomNameField.setText(\"\");\n this.includeField.setText(\"\");\n this.inheritField.setText(\"\");\n this.streetNameField.setSelectedIndex(0);\n this.determinateField.setText(\"\");\n this.lightField.setText(\"\");\n this.shortDescriptionField.setText(\"\");\n this.longDescriptionField.setText(\"\");\n this.exitPanel.removeAll();\n }",
"public void removePanel() \n\t{\n\t\tgame.remove(this);\n\t}",
"public void removeLabel(Player tempPlayer){\r\n\t\tif(tempPlayer.getName().equals(\"P1\")) remove(player1Label);\r\n\t\telse if(tempPlayer.getName().equals(\"P2\")) remove(player2Label);\r\n\t\telse remove(player3Label);\r\n\t\tthis.revalidate();\r\n\t}",
"public void removeWizard() {\n\t\tyellowWizard = null;\n\t\tplayer.getHintIconsManager().removeAll();\n\t\tplayer.WizardUsed = true;\n\t}",
"public static void clearPlayerNames() {\r\n\t\tif (GameSetup.choiceBoxPlayer1.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer1.select(0);\r\n\t\t\tMain.player1 = \"\";\r\n\t\t}\r\n\r\n\t\tif (GameSetup.choiceBoxPlayer2.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer2.select(0);\r\n\t\t\tMain.player2 = \"\";\r\n\t\t}\r\n\r\n\t\tif (GameSetup.choiceBoxPlayer3.isEnabled()) {\r\n\t\t\tGameSetup.choiceBoxPlayer3.select(0);\r\n\t\t\tMain.player3 = \"\";\r\n\t\t}\r\n\t\t\r\n\t\t//Don't show fourth player if playing 3 handed game.\r\n\t\tif (!Main.isThreeHanded) {\r\n\t\t\tif (GameSetup.choiceBoxPlayer4.isEnabled()) {\r\n\t\t\t\tGameSetup.choiceBoxPlayer4.select(0);\r\n\t\t\t\tMain.player4 = \"\";\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void stopShowing(Player player){\n\t\tFeatherBoardAPI.removeScoreboardOverride(player,\"build-battle-game\");\n\t}",
"private void removePlayerFromLobby() {\n\n //Added Firebase functionality assuming var player is the player who wants to leave the game.\n }",
"public String removePlayer(int pno){\n\t\tplayerPosition.remove(pno);\n\t\tcollectedGold.remove(pno);\n\t\treturn \"You have left the game!\";\n\t}",
"public void removeButton() {\n pan.remove(playButton);\n }",
"private void discardPlayer(Player p)\n {\n locations.remove(p);\n plugin.getAM().arenaMap.remove(p);\n clearPlayer(p);\n }",
"void removeFromGame() {\n\t\t// remove from game\n\t\t//only for multi-player\n\t}",
"public void hidePanelToNewPlayList() {\n\t\tjpIntroduceNameList.setVisible(false);\n\t}",
"public void clearFields(){\n PlayerID.setText(\"\");\n passwordField.setText(\"\");\n }",
"public void removePlayer(String name) {\n\t\tcreateGameLobbyController.removePlayerFromList(name);\n\t}",
"public void removePlayer(int index) {\n trickPoints.remove(index);\n gamePoints.remove(index);\n lives.remove(index);\n }",
"private void destroyDisplayEditOverlay() {\n\t}",
"@Override\r\n\tpublic void removeField() {\n\t\tusernameField.setText(\"\");\r\n\t\tpassField.setText(\"\");\r\n\t}",
"private void removeSpUserInfo() {\n\t\tPreferencesHelper preferencesHelper = new PreferencesHelper(\n\t\t\t\tChangeLoginActivity.this);\n\t\tpreferencesHelper.remove(\"uid\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_EMAIL\");\n\t\tpreferencesHelper.remove(\"nickName\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ICON\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ALREADY_LOGIN\");\n\t\tpreferencesHelper.remove(\"LOGIN_PASSWORD\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_ID\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_NAME\");\n\t\tpreferencesHelper.remove(\"LOGIN_USER_PHONE\");\n\t}",
"@EventHandler\n public void onPlayerQuit(PlayerQuitEvent event) {\n playerDataMap.remove(event.getPlayer().getUniqueId());\n }",
"private void remove() {\n disableButtons();\n clientgui.getClient().sendDeleteEntity(cen);\n cen = Entity.NONE;\n }",
"public void panelGone() {\n\t\tdisplayPanel.removeImage(this);\r\n\r\n\t}",
"public void playerLogout(Player player)\n {\n PlayerAFKModel playerAFKModel = players.get(player.getUniqueId());\n\n // Check if player is AFK\n if( playerAFKModel.isAFK() )\n {\n // Is AFK. Update AFK timer before removal\n playerAFKModel.updateAFKTimer();\n playerAFKModel.markAsNotAFK();\n }\n players.remove(player.getUniqueId());\n }",
"public void remove() {\n\t\tstopFloating();\t\n\t\tPacketHandler.toggleRedTint(player, false);\n\t\tplayer.addPotionEffect(new PotionEffect(PotionEffectType.BLINDNESS, 30, 1));\n\t\tplayer.stopSound(Sound.MUSIC_DISC_CHIRP);\n\t\tcleanTasks();\n\t\tactiveScenarios.remove(player.getUniqueId());\n\t}",
"public void removePlayer(EntityPlayerMP player)\r\n {\r\n int var2 = (int)player.managedPosX >> 4;\r\n int var3 = (int)player.managedPosZ >> 4;\r\n\r\n for (int var4 = var2 - this.playerViewRadius; var4 <= var2 + this.playerViewRadius; ++var4)\r\n {\r\n for (int var5 = var3 - this.playerViewRadius; var5 <= var3 + this.playerViewRadius; ++var5)\r\n {\r\n PlayerManager.PlayerInstance var6 = this.getPlayerInstance(var4, var5, false);\r\n\r\n if (var6 != null)\r\n {\r\n var6.removePlayer(player);\r\n }\r\n }\r\n }\r\n\r\n this.players.remove(player);\r\n }",
"void clean(Player p);",
"@Override\n\tpublic void hideContents() {\n\t\tprogram.remove(Play);\n\t\tprogram.remove(Settings);\n\t\tprogram.remove(Credits);\n\t\tprogram.remove(Exit);\n\t\tprogram.remove(tank);\n\t\tprogram.remove(barrel);\n\t\tprogram.remove(explosion);\n\t\tprogram.remove(title);\n\t\tshootCounter = 0;\n\t\tdelayCounter = 0;\n\t\tbarrel = new GameImage(\"../media/TanksPNGS/large_greenTank_cannon.png\");\n\t\tbarrel.setLocation(15, 475);\n\t\tp = false;\n\t\ts= false;\n\t\tc = false;\n\t\tq = false;\n\t}",
"public void clearScreen()\n {\n showText(\"\", 150, 175);\n List objects = getObjects(null);\n if(objects != null)\n {\n removeObjects(objects);\n }\n }",
"public void removeNow() {\n if (mView != null) {\n WindowManager wm = (WindowManager) getSystemService(WINDOW_SERVICE);\n wm.removeView(mView);\n }\n }",
"public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }",
"public void remove(Player player) {\n\t\tgetPlayers().remove(player);\n\t\tif (getPlayers().size() < 2) {\n\n\t\t}\n\t}",
"@Override\n public void removePlayer(Player player){\n this.steadyPlayers.remove(player);\n }",
"private void removePlayerFromTheGame(){\n ServerConnection toRemove = currClient;\n\n currClient.send(\"You have been removed from the match!\");\n updateCurrClient();\n server.removePlayerFromMatch(gameID, toRemove);\n\n if ( toRemove == client1 ){\n this.client1 = null;\n }\n else if ( toRemove == client2 ){\n this.client2 = null;\n }\n else {\n client3 = null;\n }\n gameMessage.notify(gameMessage);\n\n if ( (client1 == null && client2 == null) || (client2 == null && client3 == null) || (client1 == null && client3 == null) ){\n gameMessage.notify(gameMessage);\n }\n if ( liteGame.isWinner() ) endOfTheGame = true;\n playerRemoved = true;\n }",
"public void clearMusicPanel(){\n\t\tmusicContents.removeAll();\n\t}",
"@Override\n public void removePlayer(String nickname) throws IOException {\n try {\n String sql = \"DELETE FROM sep2database.player WHERE nickname =?;\";\n db.update(sql, nickname);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"private void eliminatePlayer(Player loser){\n players.remove(loser);\n }",
"public void removePlayer(String name) {\n\t\tUser user = users.get(userTurn);\n\t\tFootballPlayer player = market.findPlayer(name);\n\t\tdouble marketValue = player.getMarketValue();\n\t\t\n\t\tif (tmpTeam.size() > 0) {\n\t\t\tuser.updateBudget(marketValue, \"+\");\n\t\t\ttmpTeam.removePlayer(name);\n\t\t}\n\t\tSystem.out.println(\"budget after sell\" + user.getBudget());\n\t}",
"public void removePlayer(Player player){\n playerList.remove(player);\n }",
"@Override\n public void hide() {\n if (!unit.player.isPlayerDead) {\n MyPreference.setIsNewGame(false);\n saves.Save();\n }\n GameController.allFalse();\n dispose();\n }",
"private void clearOpponentPosition() {\n\t\tfor (TextView txtView : this.computerPlayerTxtViews) {\n\t\t\ttxtView.setText(\"\");\n\t\t}\n\t}",
"@Override\n\tpublic void onGuiClosed() {\n\t\tfield_154330_a.removed();\n\t\tsuper.onGuiClosed();\n\t}",
"public void removeAuthInfo(AuthInfo info);",
"public void deleteLaser() {\n shotVisible = false;\n shot.setVisible(false);\n }",
"public void eliminatePlayer(Character player){\r\n\t\tplayer.setAsPlayer(false);\r\n\t\tSystem.err.println(player.getName() + \" was eliminated\");\r\n\t}",
"public void hideFightSetup() {\r\n\t\tremove(content);\r\n\t\tcontent.revalidate();\r\n\t\tcontent.repaint();\r\n\t\trevalidate();\r\n\t\trepaint();\r\n\t}",
"void actuallyRemove() {\n /*\n * // Set the TextViews View v = mListView.getChildAt(mRemovePosition -\n * mListView.getFirstVisiblePosition()); TextView nameView =\n * (TextView)(v.findViewById(R.id.sd_name));\n * nameView.setText(R.string.add_speed_dial);\n * nameView.setEnabled(false); TextView labelView =\n * (TextView)(v.findViewById(R.id.sd_label)); labelView.setText(\"\");\n * labelView.setVisibility(View.GONE); TextView numberView =\n * (TextView)(v.findViewById(R.id.sd_number)); numberView.setText(\"\");\n * numberView.setVisibility(View.GONE); ImageView removeView =\n * (ImageView)(v.findViewById(R.id.sd_remove));\n * removeView.setVisibility(View.GONE); ImageView photoView =\n * (ImageView)(v.findViewById(R.id.sd_photo));\n * photoView.setVisibility(View.GONE); // Pref\n */\n mPrefNumState[mRemovePosition + 1] = \"\";\n mPrefMarkState[mRemovePosition + 1] = -1;\n SharedPreferences.Editor editor = mPref.edit();\n editor.putString(String.valueOf(mRemovePosition + 1), mPrefNumState[mRemovePosition + 1]);\n editor.putInt(String.valueOf(offset(mRemovePosition + 1)),\n mPrefMarkState[mRemovePosition + 1]);\n editor.apply();\n startQuery();\n }",
"@Override\n\tpublic void hide() {\n\t\thits.remove();\n\t\ttimeLeft.remove();\n\t\tdarken.remove();\n\t\tcontainer.remove();\n\t\ttimer = null;\n\t\ttrainingBag = null;\n\t}",
"private void clearPlayer(Graphics g){\n\t\tg.clearRect(b.p.getxOld(),b.p.getyOld(),Player.SIZE,Player.SIZE);\n\t}",
"public void removePlayer(UUID id) {\r\n for (Iterator<Player> plIterator = players.iterator(); plIterator.hasNext(); ) {\r\n Player player = plIterator.next();\r\n if (player.getId().equals(id)) {\r\n plIterator.remove();\r\n ((DefaultListModel) playerListGui.getModel()).removeElement(player);\r\n }\r\n }\r\n }",
"public void removeGameObj(GameObject obj){\n display.getChildren().remove(obj.getDisplay());\n }",
"public void removePresentCard() {\n storageCards.remove();\n }",
"public void removePlayerFromCurrentLobby(LobbyPlayer player) {\n DocumentReference doc = Firebase.docRefFromPath(\"lobbies/\" + player.getLobbyCode());\n doc.update(FieldPath.of(\"players\", player.getUsername()), FieldValue.delete());\n removeListener();\n GameService.removeListener();\n cache = null;\n }",
"public void unregisterPlayer(final Player p) {\n\t\ttry {\n\t\n\t\n\t\tserver.getLoginConnector().getActionSender().playerLogout(p.getUsernameHash());\n\n\t\t\n\t\tp.setLoggedIn(false);\n\t\tp.resetAll();\n\t\tp.save();\n\t\tMob opponent = p.getOpponent();\n\t\tif (opponent != null) {\n\t\t\tp.resetCombat(CombatState.ERROR);\n\t\t\topponent.resetCombat(CombatState.ERROR);\n\t\t}\n\t\t\n\t\tdelayedEventHandler.removePlayersEvents(p);\n\t\tplayers.remove(p);\n\t\tsetLocation(p, p.getLocation(), null);\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}",
"public void removePeonStatusPane() {\n\t\tContextAreaHandler.getInstance().clearContext();\n\t}",
"public void removePlayer(String p) {\n this.playersNames.remove(p);\n }",
"public void onPlayerDisconnect(Player player)\r\n \t{\r\n \t\tPlayerData data = plugin.getPlayerDataCache().getData(player);\r\n \r\n \t\tdata.setFrenzyEnabled(false);\r\n \t\tdata.setSuperPickaxeEnabled(false);\r\n \t\tdata.setUnlimitedAmmoEnabled(false);\r\n \t}",
"@Override\n protected void onDestroy() {\n Spotify.destroyPlayer(this);\n super.onDestroy();\n }",
"public void removeExtraPanel() {\n\t\tif (extraPanel != null) {\n\t\t\tremove(extraPanel);\n\t\t\textraPanel = null;\n\t\t\tupdate();\n\t\t}\n\t}",
"@EventHandler(priority = EventPriority.MONITOR)\n public void PlayerQuit(PlayerQuitEvent e){\n plugin.playerIslands.remove(e.getPlayer().getName());\n }",
"void unsetBox();",
"private void detener() {\n player.stop();\n player.release();\n player = null;\n }",
"public void remove(){\n Api.worldRemover(getWorld().getWorldFolder());\n }",
"public void exit(Player player) {\r\n\t\tsetInBattle(false);\r\n\t\tplayer.setTeleport(false);\r\n\t\tplayer.setRemovedPrayers(false);\r\n\t\tplayer.setLocation(new Location(3207,3216,0));\r\n\t\tplayer.hints().removeAll();\r\n\t\tplayer.reset();\r\n\t\tRegionBuilder.destroyMap(regionChucks[0], regionChucks[1], 8, 8);\r\n\t}",
"public native void hide(GInfoWindow self)/*-{\r\n\t\tself.hide();\r\n\t}-*/;",
"public void removePlayer(Player plr){\r\n\t\t\r\n\t\tlobby.removePlayerFromLobby(plr);\r\n\t\tlobby.updateNames();\r\n\t\tsendNameInfoToAll();\r\n\t\tremoveConnection(plr);\r\n\t}",
"void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}",
"public void removePlayer(int playerIndex) {\n playersIndicators.remove(playerIndex);\n }",
"public void removePlayer(Player outPlayer) {\n\t\tgetPlayersInRoom().remove(outPlayer);\n\n\t}",
"public void resetPlayerInfo() {\r\n\t\tthis.damageDealt = 0;\r\n\t\tthis.damageTaken = 0;\r\n\t\tthis.robotsDestroyed = 0;\r\n\t\tthis.tilesMoved = 0;\r\n\t\tthis.turnsSinceLastMove = 0;\r\n\t\tthis.turnsSinceLastFire = 0;\r\n\t\t\r\n\t\tthis.robots = new ArrayList<Robot>(3);\r\n\t\t\r\n\t\t/* 0 = scout , 1 = sniper, 2 = tank */\r\n\t\tthis.robots.add(new Robot(playerID, 0));\r\n\t\tthis.robots.add(new Robot(playerID, 1));\r\n\t\tthis.robots.add(new Robot(playerID, 2));\r\n\t}",
"public void remove(){\n\t\tsetBounds(800, 600, WIDTH, HEIGHT);\n\t}",
"private void removeLocalVideo() {\n if (mLocalView != null) {\n mLocalContainer.removeView(mLocalView);\n }\n mLocalView = null;\n }",
"CratePrize removeEditingUser(Player player);",
"@Override\n\tpublic void destroy() {\n\t\tgeneralServices.getCallbackApi().removeReplayOpsPopupMenuItem(\n\t\t\t\tshowSc2ConverterForPatternMiningItemHandler);\n\t}",
"public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }",
"public void mo110584h() {\n if (this.f88308f != null && this.f90211A != null) {\n this.f88308f.removeView(this.f90211A);\n }\n }",
"public void logPlayerOut() {\n if (sessionInfo.isPlayerInParty())\n {\n leaveParty();\n }\n LogDispatcher.getInstance().onLogRequestReceived(new ConcreteSimpleLoggingRequest(LoggingRequest.Severity.INFO, null, \"Logged out\"));\n player.resetValues();\n }",
"private void removeButtonMouseClicked(MouseEvent e) {\n String country = (String)CountryList.getSelectedValue();\n if(country == \"\"){\n JOptionPane.showMessageDialog(this,\"Wrong input\");\n }else{\n MapGenerator mapGenerator = gameEngine.getMapGenerator();\n String message = mapGenerator.removeCountry(country);\n JOptionPane.showMessageDialog(this,message);\n }\n }",
"public void removeFromGame(){\n this.isInGame = false;\n }",
"public void clearFilmPanel(){\n\t\tfilmContents.removeAll();\n\t}",
"public void clearStats()\n {\n pathJTextArea.setText(\"\");\n costJTextField.setText(\"\");\n timeJTextField.setText(\"\");\n }",
"private void remove() {\n \t\tfor(int i = 0; i < 5; i++) {\n \t\t\trMol[i].setText(\"\");\n \t\t\trGrams[i].setText(\"\");\n \t\t\tpMol[i].setText(\"\");\n \t\t\tpGrams[i].setText(\"\");\n \t\t}\n }",
"private void remove(String name) {\n if (team.getPokemon(name) != null) {\n System.out.println(\"You are going to remove \" + name);\n System.out.println(\"This process is inrevertable, are you sure? [y/n]\");\n String command = input.next();\n if (command.equals(\"y\") || command.equals(\"yes\")) {\n team.remove(name);\n System.out.println(name + \" has been removed form your team\");\n System.out.println(\"You currently have \" + team.count() + \" pokemons in your team\");\n }\n } else {\n System.out.println(name + \" is not found within your team\");\n }\n }",
"public void removePawn() {\n lives = 0;\n }",
"@Override\n\tpublic void removeTrigger() {\n\t\tplayer.removeListener(this.listener, EventNameType.SOUL_FIGHT);\n\t}",
"public void updatePlayerPanel()\n {\n playerInfoPanel.updateLabel();\n }",
"public void removePlayer(String name) {\n\t\tfor(Player p : playerList) {\n\t\t\tif(p.getName().equals(name)) {\n\t\t\t\toccupiedPositions.remove(p.getPosition());\n\t\t\t\tif(p.getType() == Player.PlayerType.Agent) {\n\t\t\t\t\treAssignRobots(p);\n\t\t\t\t\tthis.agents -= 1;\n\t\t\t\t}\n\t\t\t\tplayerList.remove(p);\n\t\t\t}\n\t\t}\n\t\tserver.broadcastToClient(name, SendSetting.RemovePlayer, null, null);\n\t\tserver.updateGameplane();\n\t}",
"private void stopPlayer() {\n if (player != null) {\n player.release();\n Toast.makeText(this, \"player released\", Toast.LENGTH_SHORT);\n player = null;\n }\n }",
"public void removePlayer(String name) {\n for (Player player : players) {\n if (player.getName() != null && player.getName().equals(name)) {\n player.setState(false);\n for (Piece piece : player.getPieces()) {\n piece.setPosition(0);\n }\n\n // PLAYERLISTENER : Trigger playerEvent for player that LEFTGAME\n for (PlayerListener listener : playerListeners) {\n PlayerEvent event = new PlayerEvent(this, player.getColour(), PlayerEvent.LEFTGAME);\n listener.playerStateChanged(event);\n }\n\n if (player.getName().equals(players.get(activePlayer).getName())) {\n this.setNextActivePlayer();\n }\n }\n }\n }",
"public void removePlayer(int place) {\r\n\t\tplayers.remove(place);\r\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n GameWindow.this.remove(menuPanel);\n GameWindow.this.updateUI();\n checkBoolean = true;\n }",
"@EventHandler\n public void onPlayerQuitEvent(PlayerQuitEvent e)\n {\n String playerName = e.getPlayer().getName();\n \n this.afkPlayers.remove(playerName);\n this.afkPlayersAuto.remove(playerName);\n this.afkLastSeen.remove(playerName);\n }",
"private void disconnect() {\n System.out.println(String.format(\"連線中斷,%s\",\n clientSocket.getRemoteSocketAddress()));\n final int delete = thisPlayer.id - 1;\n player[delete] = null;\n empty.push(delete);\n }",
"public void removePlayer(int playerID) {\n\t\tthis.players.get(playerID).setLocation(null);//removes the player from the map\n\t\tthis.players.get(playerID).kill();\n\t\t\t\n\t\t\n\n\t\tif (this.currentPlayer == playerID) {\n\t\t\t// Advance turn to handle death on player's turn\n\t\t\tadvanceTurn(playerID);\n\t\t}\n\t}",
"public void removePlayer(int playerObjId)\n\t{\n\t\t_floodClient.remove(playerObjId);\n\t}",
"@Override\n public void remove( )\n {\n FormPortletHome.getInstance( ).remove( this );\n }",
"public void resetPlayersOverlayFooterHeader() {\n this.overlayPlayerList.resetFooterHeader();\n this.overlayBoss.clearBossInfos();\n this.mc.getToastGui().clear();\n }",
"private void removeFigureFromPlayerCollection(Figure figure, Player player) {\n player.removeFigure(figure);\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 }",
"public void removedetails(){\n SharedPreferences.Editor editor = userDetails.edit();\n editor.clear();\n editor.commit();\n\n }",
"@Override\n\tpublic void hide() {\n\t\tPostSign.Destroy();\n\t\tlevelbuilder = null;\n\t}"
]
| [
"0.6448022",
"0.63067514",
"0.62557894",
"0.613896",
"0.6129657",
"0.611697",
"0.61140007",
"0.6049843",
"0.6029601",
"0.5971602",
"0.5904509",
"0.5864069",
"0.5852168",
"0.5844669",
"0.5818775",
"0.5805894",
"0.58030427",
"0.5786168",
"0.5782483",
"0.57813925",
"0.5770922",
"0.57701206",
"0.57567924",
"0.5742415",
"0.5739618",
"0.5723793",
"0.56991154",
"0.5696474",
"0.5686063",
"0.56802535",
"0.5677106",
"0.5676244",
"0.56696683",
"0.5666452",
"0.56637466",
"0.5659248",
"0.56374997",
"0.56357324",
"0.5632228",
"0.5625723",
"0.56237596",
"0.5616165",
"0.5614818",
"0.5598552",
"0.55918324",
"0.5587976",
"0.55719334",
"0.55667764",
"0.5562466",
"0.55621344",
"0.55560714",
"0.5553424",
"0.5552497",
"0.5544902",
"0.55423313",
"0.55423164",
"0.553618",
"0.55316746",
"0.55207276",
"0.55187196",
"0.5517764",
"0.55137724",
"0.55104965",
"0.5507321",
"0.55061835",
"0.5497557",
"0.5497304",
"0.5496883",
"0.5487311",
"0.547964",
"0.5467574",
"0.5464699",
"0.54550767",
"0.5452366",
"0.54518867",
"0.54514104",
"0.5442842",
"0.5439986",
"0.54377574",
"0.54317987",
"0.54289246",
"0.54249346",
"0.54184836",
"0.54135025",
"0.54121745",
"0.5406904",
"0.5405234",
"0.540474",
"0.5403492",
"0.5400644",
"0.5396357",
"0.5393738",
"0.5389391",
"0.53878826",
"0.5383253",
"0.53795314",
"0.5377042",
"0.5374403",
"0.5369157",
"0.5363254"
]
| 0.8855968 | 0 |
Saves the data of the current Pokemon. | public void savePokemonData()
{
try
{
int currentPokemon = playerPokemon.getCurrentPokemon();
FileWriter fw = new FileWriter("tempPlayerPokemon.txt");
List<String> list = Files.readAllLines(Paths.get("playerPokemon.txt"), StandardCharsets.UTF_8);
String[] pokemonList = list.toArray(new String[list.size()]);
String currentPokemonStr = pokemonList[currentPokemon];
String[] currentPokemonArray = currentPokemonStr.split("\\s*,\\s*");
currentPokemonArray[1] = Integer.toString(playerPokemon.getLevel());
currentPokemonArray[3] = Integer.toString(playerPokemon.getCurrentHealth());
currentPokemonArray[4] = Integer.toString(playerPokemon.getCurrentExperience());
for(int c = 0; c < 4; c++)
{
currentPokemonArray[5 + c] = playerPokemon.getMove(c);
}
String arrayAdd = currentPokemonArray[0];
for(int i = 1; i < currentPokemonArray.length; i++)
{
arrayAdd = arrayAdd.concat(", " + currentPokemonArray[i]);
}
pokemonList[currentPokemon] = arrayAdd;
for(int f = 0; f < pokemonList.length; f++)
{
fw.write(pokemonList[f]);
fw.write("\n");
}
fw.close();
Writer.overwriteFile("tempPlayerPokemon", "playerPokemon");
}
catch(Exception error)
{
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void save()\n\t{\n\t\tfor(PlayerData pd : dataMap.values())\n\t\t\tpd.save();\n\t}",
"void save() {\n gameModelPoDao.saveToFile(file.getAbsolutePath(), gameModelPo);\n }",
"public void save() {\n savePrefs();\n }",
"private void saveData() {\n }",
"public void save(){\r\n\t\ttry {\r\n\t\t\tgame.suspendLoop();\r\n\t\t\tGameStockage.getInstance().save(game);\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (GameNotSaveException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.err.println(e.getMessage());\r\n\t\t\tgame.resumeLoop();\r\n\t\t}\r\n\t}",
"public void save() {\n UTILS.write(FILE.getAbsolutePath(), data);\n }",
"private void save() {\n Saver.saveTeam(team);\n }",
"public void save() {\r\n\t\tGame.getInstance().getInventory().add(id);\r\n\t}",
"private void saveData() {\n\t\tdataSaver.save(data);\n\t}",
"public void saveData ( ) {\n\t\tinvokeSafe ( \"saveData\" );\n\t}",
"@Override\r\n\tpublic void SavePlayerData() {\r\n\r\n Player player = (Player)Player.getPlayerInstance();\r\n\t\t\r\n\t\tString file = \"PlayerInfo.txt\";\r\n\t\tString playerlifepoint = \"\"+player.getLifePoints();\r\n\t\tString playerArmore = player.getArmorDescription();\r\n\t\ttry{\r\n\t\t\tPrintWriter print = new PrintWriter(file);\r\n\t\t\tprint.println(playerlifepoint);\r\n\t\t\tprint.println(playerArmore);\r\n\t\t\t\r\n\t\t}\r\n\t\tcatch(FileNotFoundException e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t}",
"public void save() {\t\n\t\n\t\n\t}",
"public void save() {\n\t\tpreferences().flush();\n\t}",
"public void save(View v) {\n if (!currentMode.equals(Mode.GAME)) {\n Toast.makeText(this, \"Speichern nur im Spiel moeglich!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // Leeres speichern verhindern\n if (!(itemList.size() > 0)) {\n Toast.makeText(this, \"Keine Tips zum Speichern!\", Toast.LENGTH_LONG).show();\n return;\n }\n // String formatieren\n String output = generateSaveFileString();\n\n // In Datei speichern\n writeToSaveFile(output);\n\n // Neue Runde starten\n startNewRound();\n }",
"public void saveGame(){\n \tsaveOriginator.writeMap(this.map, this.getObjectives(), this.gameState);\n \tsaveGame.saveGame(saveOriginator);\n }",
"public void save()\n\t{\n\t\tif(entity != null)\n\t\t\t((SaveHandler)DimensionManager.getWorld(0).getSaveHandler()).writePlayerData(entity);\n\t}",
"public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }",
"public void save() {\n //write lift information to datastore\n LiftDataAccess lda = new LiftDataAccess();\n ArrayList<Long>newKeys = new ArrayList<Long>();\n for (Lift l : lift) {\n newKeys.add(lda.insert(l));\n }\n\n //write resort information to datastore\n liftKeys = newKeys;\n dao.update(this);\n }",
"@Override\n public void onPause() {\n super.onPause();\n ObjectOutput out = null;\n String fileName = \"savedGame\";\n File saved = new File(getFilesDir(), fileName);\n\n try {\n out = new ObjectOutputStream(new FileOutputStream(saved, false));\n out.writeObject(player);\n out.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void save(HashMap<Integer, T> data) {\n\t\tthis.data.putAll(data);\n\t}",
"@Override\n public void save(Game game) {\n }",
"public static void save()\n\t{\n writeMap();\n\t}",
"public void save() {\n ProductData.saveData(tree);\n }",
"private void saveGame(){\n\t\t\n\t}",
"public void save() {\n DataBuffer.saveDataLocally();\n\n //TODO save to db must be done properly\n DataBuffer.save(session);\n\n //TODO recording saved confirmation\n }",
"void saveGame() throws IOException, Throwable {\n Save save = new Save(\"01\");\n save.addToSaveGame(objectsToSave());\n save.saveGame();\n }",
"public void save(){\n Player temp = Arena.CUR_PLAYER;\n try{\n FileOutputStream outputFile = new FileOutputStream(\"./data.sec\");\n ObjectOutputStream objectOut = new ObjectOutputStream(outputFile);\n objectOut.writeObject(temp);\n objectOut.close();\n outputFile.close();\n }\n catch(FileNotFoundException e){\n System.out.print(\"Cannot create a file at that location\");\n }\n catch(SecurityException e){\n System.out.print(\"Permission Denied!\");\n }\n catch(IOException e){\n System.out.println(\"Error 203\");\n } \n }",
"public static void save(){\n\t\ttry{\n\t\t\tFile f=new File(Constants.PATH+\"\\\\InitializeData\\\\battlesavefile.txt\");\n\t\t\tPrintWriter pw=new PrintWriter(f);\n\t\t\tpw.println(turn);\n\t\t\tpw.println(opponent.toString());\n\t\t\tfor(Unit u:punits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Player Units\");\n\t\t\tfor(Unit u:ounits){\n\t\t\t\tpw.println(u.toString());\n\t\t\t}\n\t\t\tpw.println(\"End Opponent Units\");\n\t\t\tpw.println(priorities);\n\t\t\tpw.println(Arrays.asList(xpgains));\n\t\t\tpw.println(spikesplaced+\" \"+numpaydays+\" \"+activeindex+\" \"+activeunit.getID()+\" \"+weather+\" \"+weatherturn);\n\t\t\tpw.println(bfmaker.toString());\n\t\t\tpw.close();\n\t\t}catch(Exception e){e.printStackTrace();}\n\t}",
"public boolean storePokemon(Pokemon pokemon, int boxNum) {\r\n\t\tif (pokemonBoxes.get(boxNum).isFull()) {\r\n\t\t\tSystem.out.println(\"Box \" + boxNum + \" is full!\");\r\n\t\t\treturn false;\r\n\t\t} else {\r\n\t\t\tpokemonBoxes.get(boxNum).getPokemons().add(pokemon);\r\n\t\t\tSystem.out.println(pokemon.getPokemonName().getName() + \" has been sent to box \" + boxNum);\r\n\t\t\treturn true;\r\n\t\t}\r\n\t}",
"public void saveData() {\n\t\t//place to save notes e.g to file\n\t}",
"public void saveData(){\n SerializableManager.saveSerializable(this,user,\"userInfo.data\");\n SerializableManager.saveSerializable(this,todayCollectedID,\"todayCollectedCoinID.data\");\n SerializableManager.saveSerializable(this,CollectedCoins,\"collectedCoin.data\");\n uploadUserData uploadUserData = new uploadUserData(this);\n uploadUserData.execute(this.Uid);\n System.out.println(Uid);\n\n }",
"public void storeChoicePrefs(ResultDetail restaurant) {\n SharedPreferences.Editor editor = prefs.edit();\n //put the data\n Gson gson = new Gson();\n String json = gson.toJson(restaurant);\n editor.putString(RESTAURANTS, json);\n //close the file\n editor.apply();\n }",
"public void saveGame() {\n\t\tmanager.saveGame();\n\t}",
"@Override\n\tpublic void save() {\n\t\tSystem.out.println(\"save method\");\n\t}",
"public void saveGame(DataOutputStream s) throws IOException {\n s.writeUTF(level.toString());\n s.writeUTF(level.getName());\n s.writeInt(lives);\n s.writeInt(points);\n s.writeInt(wonLevels);\n pacman.writeEntity(s);\n s.writeInt(entities.size());\n for (GameEntity entity : entities)\n entity.writeEntity(s);\n }",
"public void saveData(){\n\n if(addFieldstoLift()) {\n Intent intent = new Intent(SetsPage.this, LiftsPage.class);\n intent.putExtra(\"lift\", lift);\n setResult(Activity.RESULT_OK, intent);\n finish();\n }else{\n AlertDialog.Builder builder = new AlertDialog.Builder(SetsPage.this);\n builder.setCancelable(true);\n builder.setTitle(\"Invalid Entry\");\n builder.setMessage(\"Entry is invalid. If you continue your changes will not be saved\");\n builder.setPositiveButton(\"Continue\",\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n finish();\n }\n });\n builder.setNegativeButton(android.R.string.cancel, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n }\n });\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }\n }",
"public void save(){\n BoardSerializer.serialize(this);\n }",
"void save();",
"void save();",
"void save();",
"public void save() {\n final JFileChooser fileChooser =\n new JFileChooser(System.getProperty(\"user.dir\"));\n try {\n fileChooser.setSelectedFile(new File(\"save.ser\"));\n int saveFile = fileChooser.showSaveDialog(GameFrame.this);\n\n if (saveFile == JFileChooser.APPROVE_OPTION) {\n File saveGame = fileChooser.getSelectedFile();\n FileOutputStream fileOut = new FileOutputStream(saveGame);\n ObjectOutputStream objOut = new ObjectOutputStream(fileOut);\n objOut.writeObject(world);\n objOut.close();\n fileOut.close();\n System.out.println(\"Game saved.\");\n } else {\n return;\n }\n } catch (IOException i) {\n i.printStackTrace();\n }\n\n }",
"public static void save(Superuser pdApp) throws IOException {\n\t\t\tObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(storeDir + File.separator + storeFile));\n\t\t\toos.writeObject(pdApp);\n\t\t\toos.close();\n\t}",
"private void save() {\r\n\t\tif (Store.save()) {\r\n\t\t\tSystem.out.println(\" > The store has been successfully saved in the file StoreData.\\n\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\" > An error occurred during saving.\\n\");\r\n\t\t}\r\n\t}",
"public void saveMap(){\n dataBase.updateMap(level);\n }",
"public void saveData() {\n throw new UnsupportedOperationException(\"Not yet supported\");\n }",
"public void save() {\n try {\n FileOutputStream fos = new FileOutputStream(file);\n properties.store(fos, \"Preferences\");\n } catch (FileNotFoundException e) {\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"private void btnSaveActionPerformed(java.awt.event.ActionEvent evt) {\n rom.save(obstacle, frog);\n isSaved = true;\n }",
"public void save() {\n settingService.saveMaxScore(score);\r\n// powerUpCount = 0;\r\n// powerDownCount = 0;\r\n// purplePowerCount = 0;\r\n// yellowMadnessCount = 0;\r\n// shapeCount = 0;\r\n }",
"private void saveData() {\n\n SharedPreferences sharedPreferences=getSharedPreferences(\"userInfo\", Context.MODE_PRIVATE);\n SharedPreferences.Editor editor=sharedPreferences.edit();\n\n editor.putString(\"name\",name.getText().toString());\n editor.putString(\"regnum\",regnum.getText().toString());\n editor.putInt(\"count\", count);\n editor.apply();\n\n }",
"public void saveAllData()\n {\n \tfor(String s : games.keySet())\n \t{\n \t\tGame g = games.get(s);\n \t\tif(g.saveAllData())\n \t\t{\n \t\t\tSystem.out.println(\"Game '\" + g.getGameName() + \"' saved all data successfully!\");\n \t\t}\n \t\telse\n \t\t{\n \t\t\tSystem.out.println(\"Error when attempting to save data in game '\" + g.getGameName() + \"'!\");\n \t\t}\n \t}\n }",
"public void save() {\n }",
"private void savePreferences() {\n SharedPreferences sp = getSharedPreferences(MY_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n\n editor.putInt(\"entreeIndex\", spEntree.getSelectedItemPosition());\n editor.putInt(\"drinkIndex\", spDrink.getSelectedItemPosition());\n editor.putInt(\"dessertIndex\", spDessert.getSelectedItemPosition());\n\n editor.apply();\n }",
"protected void save() {\n close();\n if(saveAction != null) {\n saveAction.accept(getObject());\n }\n }",
"public void save() {\n\t\ttry {\n\t\t\t// use buffering\n\t\t\tOutputStream file = new FileOutputStream(\"games.txt\");\n\t\t\tOutputStream buffer = new BufferedOutputStream(file);\n\t\t\tObjectOutput output = new ObjectOutputStream(buffer);\n\t\t\ttry {\n\t\t\t\tif (gameOver) {\n\t\t\t\t\t//notify no need to save completed game\n\t\t\t\t} else {\n\t\t\t\t\tgames.add(this);\n\t\t\t\t\toutput.writeObject(games);\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\toutput.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Save not successful\");\n\t\t}\n\t}",
"public void saveCurrentPlayer() {\n\t\tBashCmdUtil.bashCmdNoOutput(\"touch data/current_player\");\n\t\tBashCmdUtil.bashCmdNoOutput(String.format(\"echo \\\"%s\\\" >> data/current_player\",_currentPlayer));\n\t}",
"private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }",
"@Override\r\n\tpublic void onPause() {\r\n\t\tsuper.onPause();\r\n\t\ttry {\r\n\t\t\tSaveGameHandler.saveGame(this, new SaveGame(controller, status),\r\n\t\t\t\t\t\"test.game\");\r\n\t\t} catch (IOException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"private void saveData() {\n // Save data to ReminderData class\n reminderData.setMinutes(timePicker.getMinute());\n reminderData.setDataHours(timePicker.getHour());\n reminderData.setNotificationText(reminderText.getText().toString());\n reminderData.saveDataToSharedPreferences();\n }",
"public void saveGame();",
"@Override\r\n\tpublic void save() {\n\r\n\t\ts.save();\r\n\r\n\t}",
"public void saveInformation(){\n market.saveInformationOfMarket();\n deckProductionCardOneBlu.saveInformationOfProductionDeck();\n deckProductionCardOneGreen.saveInformationOfProductionDeck();\n deckProductionCardOneViolet.saveInformationOfProductionDeck();\n deckProductionCardOneYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeBlu.saveInformationOfProductionDeck();\n deckProductionCardThreeGreen.saveInformationOfProductionDeck();\n deckProductionCardThreeYellow.saveInformationOfProductionDeck();\n deckProductionCardThreeViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoBlu.saveInformationOfProductionDeck();\n deckProductionCardTwoGreen.saveInformationOfProductionDeck();\n deckProductionCardTwoViolet.saveInformationOfProductionDeck();\n deckProductionCardTwoYellow.saveInformationOfProductionDeck();\n\n\n }",
"void saveGame();",
"public void storeData() {\n try {\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(\"DB/Guest.ser\"));\n out.writeInt(guestList.size());\n out.writeInt(Guest.getMaxID());\n for (Guest guest : guestList)\n out.writeObject(guest);\n //System.out.printf(\"GuestController: %,d Entries Saved.\\n\", guestList.size());\n out.close();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e){\n JFileChooser fileChooser = new JFileChooser();\n int status = fileChooser.showSaveDialog(null);\n \n //Check if they actually saved the file\n if (status == JFileChooser.APPROVE_OPTION) {\n File fileToSave = fileChooser.getSelectedFile();\n \n //Try block to make sure file actually exists\n try {\n FileOutputStream fos = new FileOutputStream(fileToSave);\n ObjectOutputStream out = new ObjectOutputStream(fos);\n out.writeObject(games);\n \n //Close the file\n fos.close();\n out.close();\n } catch (FileNotFoundException ex) {\n JOptionPane.showMessageDialog(null, \"Error: File not found\");\n } catch (IOException ex) {\n JOptionPane.showMessageDialog(null, \"Error: File I/O problem\");\n }\n \n //Tell the user it saved successfully\n JOptionPane.showMessageDialog(null, \"Saved as file: \" + fileToSave.getAbsolutePath());\n }\n }",
"public void saveGame(){\n updateProperties();\n try {\n output = new FileOutputStream(fileName);\n properties.store(output, null); //saving properties to file\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO SAVE GAME ---\");\n e.printStackTrace();\n } finally {\n if (output != null) {\n try {\n output.close();\n System.out.println(\"--- GAME SAVED ---\");\n } catch (IOException e) {\n System.out.println(\"--- FAILED TO CLOSE OUTPUT ---\");\n e.printStackTrace();\n }\n }\n }\n }",
"private void save() {\n if (mCacheFile.exists()) {\n mCacheFile.delete();\n }\n\n try (JsonWriter writer = new JsonWriter(new BufferedWriter(new FileWriter(mCacheFile)))) {\n writer.beginObject();\n writer.name(PRINTER_LIST_NAMES.get(0));\n writer.beginArray();\n for (DiscoveredPrinter printer : mSavedPrinters) {\n printer.write(writer);\n }\n writer.endArray();\n writer.endObject();\n } catch (NullPointerException | IOException e) {\n Log.w(TAG, \"Error while storing to \" + mCacheFile, e);\n }\n }",
"public void save () {\r\n\t\tlog.debug(\"TunnelList:save()\");\r\n\t\tlog.info(\"Saving to file\");\r\n\t\tFileTunnel.saveTunnels(this);\r\n\t}",
"private void save() {\n Tile[][] field = gameController.grid.field;\n Tile[][] undoField = gameController.grid.undoField;\n// SharedPreferenceUtil.put(this, SpConstant.WIDTH, field.length);\n// SharedPreferenceUtil.put(this, SpConstant.HEIGHT, field.length);\n for (int xx = 0; xx < field.length; xx++) {\n for (int yy = 0; yy < field[0].length; yy++) {\n if (field[xx][yy] != null) {\n SharedPreferenceUtil.put(this, xx + \"_\" + yy, field[xx][yy].getValue());\n } else {\n SharedPreferenceUtil.put(this, xx + \"_\" + yy, 0);\n }\n\n if (undoField[xx][yy] != null) {\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GRID + xx + \"_\" + yy, undoField[xx][yy].getValue());\n } else {\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GRID + xx + \"_\" + yy, 0);\n }\n }\n }\n SharedPreferenceUtil.put(this, SpConstant.SCORE, gameController.currentScore);\n SharedPreferenceUtil.put(this, SpConstant.HIGH_SCORE_TEMP, gameController.historyHighScore);\n SharedPreferenceUtil.put(this, SpConstant.UNDO_SCORE, gameController.lastScore);\n SharedPreferenceUtil.put(this, SpConstant.CAN_UNDO, gameController.canUndo);\n SharedPreferenceUtil.put(this, SpConstant.GAME_STATE, gameController.gameState);\n SharedPreferenceUtil.put(this, SpConstant.UNDO_GAME_STATE, gameController.lastGameState);\n SharedPreferenceUtil.put(this, SpConstant.AUDIO_ENABLED, gameController.isAudioEnabled);\n }",
"public void insertPokemon(Pokemon p) {\r\n\t\tEntityManager em = emfactory.createEntityManager();\r\n\t\tem.getTransaction().begin();\r\n\t\tem.persist(p);\r\n\t\tem.getTransaction().commit();\r\n\t\tem.close();\r\n\t}",
"public void save();",
"public void save();",
"public void save();",
"public void save();",
"private void save() {\n File personFile = mainApp.getFilmFilePath();\n if (personFile != null) {\n mainApp.saveFilmDataToFile(personFile);\n } else {\n saveAs();\n }\n }",
"public void saveOffers() {\n System.out.println(this.currentChild);\n // TODO [assignment_final] ulozeni aktualnich nabidek do souboru (vyberte si nazev souboru a format jaky uznate za vhodny - CSV nebo JSON)\n }",
"@Override\n public void save() {\n \n }",
"public void save() {\n\t\tthis.setState(Constants.CWorld.STATE_SAVING);\n\t\tthis.getWorld().saveAll();\n\t\tthis.setState(Constants.CWorld.STATE_ONLINE);\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n\tpublic void save() {\n\t\t\n\t}",
"@Override\n public void saveGame() {\n\n }",
"public void save() {\n\n\t\tint[][] rawData = new int[2][CHUNK_SIZE * CHUNK_SIZE];\n\n\t\tfor (int l = 0; l < 2; l++) {\n\t\t\tLayer layer = Layer.get(l);\n\t\t\tfor (int y = 0; y < CHUNK_SIZE; y++) {\n\t\t\t\tfor (int x = 0; x < CHUNK_SIZE; x++) {\n\t\t\t\t\trawData[l][x + y * CHUNK_SIZE] = getTileId(layer, x, y);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tthis.saveData = new RawChunkData(rawData);\n\t}",
"@Override\n\tpublic void savePlayerData(OutputStream os) {\n\t\t\n\t}",
"@Override\n public void save()\n {\n \n }",
"private void saveFood() {\n float w = Float.parseFloat(food.getDataSet().getValue(food.getMealTitle(), \"weight\"));\n float factor = Float.parseFloat(Integer.toString(quantitySeekbar.getProgress())) / w;\n\n food.setFactor(factor);\n\n LocalStorage localStorage = new LocalStorage(LocalStorage.STORAGE_KEY);\n\n ArrayList<Food> foods = (ArrayList<Food>) localStorage.retrieveObject(Constants.FOOD_ARRAYLIST_CACHE);\n\n if (foods == null) {\n foods = new ArrayList<>();\n }\n\n foods.add(food);\n\n localStorage.serializeAndStore(Constants.FOOD_ARRAYLIST_CACHE, foods);\n ((MainActivity) getActivity()).resetFragments();\n }",
"protected void savePlayers(Context context) {\n\t\tif (context == null) return;\n\n\t\t//Create json\n\t\tJSONObject JSON = new JSONObject();\n\t\ttry {\n\t\t\t//Save\n\t\t\tJSON.put(JSON_ID, m_ID);\n\t\t\tJSON.put(JSON_EMAIL, m_Email);\n\t\t} catch (JSONException e) {}\n\n\t\t//Get access to preference\n\t\t/*SharedPreferences Preference \t= context.getSharedPreferences(PREFERENCE_NAME, Context.MODE_PRIVATE);\n\t\tSharedPreferences.Editor Editor\t= Preference.edit();\n\n\t\t//Save\n\t\tEditor.putString(KEY_PLAYERS, JSON.toString());\n\t\tEditor.commit();*/\n\t}",
"void saveData() throws SerializerException;",
"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 }",
"@Override\n public void Save() {\n\t \n }",
"private void saveData() {\n SharedPreferences sharedPreferences = getSharedPreferences(SHARED_PREFS, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n Gson gson = new Gson();\n String jsonItem = gson.toJson(reminderItems);\n editor.putString(REMINDER_ITEM, jsonItem);\n editor.apply();\n }",
"public void save(Veranstaltung veranstaltung) throws RuntimeException;",
"@Override\n\tpublic void savePlayerData(OutputStream os) {\n\n\t}",
"public void save() {\r\n IniReader.write(FILE_NAME, \"x\", x, \"y\", y, \"fullscreen\", fullscreen, \"controlType\", controlType, \"vol\", volMul,\r\n \"keyUpMouse\", getKeyUpMouseName(), \"keyDownMouse\", getKeyDownMouseName(), \"keyUp\", getKeyUpName(), \"keyDown\", keyDownName,\r\n \"keyLeft\", keyLeftName, \"keyRight\", keyRightName, \"keyShoot\", keyShootName, \"keyShoot2\", getKeyShoot2Name(),\r\n \"keyAbility\", getKeyAbilityName(), \"keyEscape\", getKeyEscapeName(), \"keyMap\", keyMapName, \"keyInventory\", keyInventoryName,\r\n \"keyTalk\", getKeyTalkName(), \"keyPause\", getKeyPauseName(), \"keyDrop\", getKeyDropName(), \"keySellMenu\", getKeySellMenuName(),\r\n \"keyBuyMenu\", getKeyBuyMenuName(), \"keyChangeShipMenu\", getKeyChangeShipMenuName(), \"keyHireShipMenu\", getKeyHireShipMenuName());\r\n }",
"private void saveObjects() {\n\t\tgo.setMeteors(meteors);\n\t\tgo.setExplosions(explosions);\n\t\tgo.setTargets(targets);\n\t\tgo.setRockets(rockets);\n\t\tgo.setCrosses(crosses);\n\t\tgo.setEarth(earth);\n\t}",
"public void save(){\n DatabaseReference dbRef = DatabaseHelper.getDb().getReference().child(DatabaseVars.VouchersTable.VOUCHER_TABLE).child(getVoucherID());\n\n dbRef.setValue(this);\n }",
"public void save() throws Exception {\n\t\tgetControl(\"saveButton\").click();\n\t\tVoodooUtils.pause(3000);\n\t}",
"private static void saveEmotion() {\n try {\n //\n EmotionsManager.getManager().saveEmotions(getStoredEmotions());\n // catch any io exceptions and print them to stack trace to visualize exception\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void addNewPokemon(Pokemon pokemon) {\n try {\n PokemonSpecies pokemonSpecies = findSeenSpeciesData(pokemon.getSpecies());\n // then this Pokemon has been encountered before, just add to inventory\n pokemonSpecies.addNewPokemon(pokemon);\n } catch (PokedexException e) {\n // then this Pokemon has not been encountered before, make record of it then add to inventory\n PokemonSpecies pokemonSpecies = new PokemonSpecies(pokemon.getPokedexNumber(), pokemon.getSpecies(), 0);\n pokemonSpecies.addNewPokemon(pokemon);\n addNewSpecies(pokemonSpecies);\n }\n }",
"@Override\r\n public void storePin() {\n DataStoreGP1 data = (DataStoreGP1) ds;\r\n data.pin = data.temp_p;\r\n System.out.println(\"Pin has been saved successfully..\");\r\n }",
"public PokemonEntity create(PokemonEntity pokemon )\n {\n em.persist(pokemon);\n return pokemon;\n }",
"private void saveData() {\n readViews();\n final BookEntry bookEntry = new BookEntry(mNameString, mQuantityString, mPriceString, mSupplier, mPhoneString);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n // Insert the book only if mBookId matches DEFAULT_BOOK_ID\n // Otherwise update it\n // call finish in any case\n if (mBookId == DEFAULT_BOOK_ID) {\n mDb.bookDao().insertBook(bookEntry);\n } else {\n //update book\n bookEntry.setId(mBookId);\n mDb.bookDao().updateBook(bookEntry);\n }\n finish();\n }\n });\n }"
]
| [
"0.6837192",
"0.67360187",
"0.6535339",
"0.64985657",
"0.64647394",
"0.6408689",
"0.6378714",
"0.63058573",
"0.62612414",
"0.62499565",
"0.62124735",
"0.619285",
"0.61603343",
"0.61600643",
"0.6151947",
"0.6120496",
"0.60878915",
"0.606963",
"0.60693455",
"0.60670793",
"0.6026828",
"0.6008363",
"0.5986818",
"0.59857184",
"0.59838533",
"0.59756285",
"0.5973946",
"0.59550434",
"0.59548646",
"0.5952098",
"0.5909779",
"0.5904327",
"0.59000635",
"0.58912843",
"0.5887222",
"0.5874643",
"0.5861947",
"0.5861194",
"0.5861194",
"0.5861194",
"0.5847963",
"0.5817468",
"0.5817248",
"0.580043",
"0.579729",
"0.57898486",
"0.5786247",
"0.5777369",
"0.5771849",
"0.5767415",
"0.5765269",
"0.575992",
"0.57593834",
"0.5754708",
"0.57504416",
"0.5748112",
"0.5744364",
"0.57356167",
"0.57237446",
"0.5716599",
"0.5712678",
"0.57103086",
"0.57099974",
"0.57081014",
"0.5705357",
"0.57047135",
"0.5703343",
"0.56940293",
"0.5693118",
"0.56913763",
"0.56913763",
"0.56913763",
"0.56913763",
"0.5653146",
"0.5648252",
"0.5648139",
"0.5646665",
"0.5645851",
"0.5645851",
"0.5634788",
"0.56207687",
"0.5619299",
"0.5614965",
"0.56118906",
"0.560648",
"0.5604448",
"0.5601838",
"0.5597421",
"0.55954856",
"0.5583269",
"0.5580596",
"0.5575179",
"0.5568759",
"0.5568676",
"0.5563232",
"0.5561995",
"0.5561305",
"0.55590034",
"0.55554825",
"0.5549055"
]
| 0.7545663 | 0 |
Sets the player Pokemon object to null. | public void setPlayerPkmnNull()
{
playerPokemon = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setEnemyPkmnNull()\r\n {\r\n enemyPokemon = null;\r\n }",
"public Builder clearPokemonDisplay() {\n if (pokemonDisplayBuilder_ == null) {\n pokemonDisplay_ = null;\n onChanged();\n } else {\n pokemonDisplay_ = null;\n pokemonDisplayBuilder_ = null;\n }\n\n return this;\n }",
"public Builder clearActivePokemon() {\n if (activePokemonBuilder_ == null) {\n activePokemon_ = null;\n onChanged();\n } else {\n activePokemon_ = null;\n activePokemonBuilder_ = null;\n }\n\n return this;\n }",
"void clean(Player p);",
"public void nullEnemy(){\n enemy = null;\n nullEntity();\n }",
"public Builder clearFaintedPokemon() {\n if (faintedPokemonBuilder_ == null) {\n faintedPokemon_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n faintedPokemonBuilder_.clear();\n }\n return this;\n }",
"public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}",
"public Builder clearPlayer() {\n if (playerBuilder_ == null) {\n player_ = null;\n onChanged();\n } else {\n player_ = null;\n playerBuilder_ = null;\n }\n\n return this;\n }",
"private void discardPlayer(Player p)\n {\n locations.remove(p);\n plugin.getAM().arenaMap.remove(p);\n clearPlayer(p);\n }",
"public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}",
"public Builder clearPokemonId() {\n \n pokemonId_ = 0L;\n onChanged();\n return this;\n }",
"public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }",
"public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }",
"private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }",
"public Builder clearReservePokemon() {\n if (reservePokemonBuilder_ == null) {\n reservePokemon_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000001);\n onChanged();\n } else {\n reservePokemonBuilder_.clear();\n }\n return this;\n }",
"public Player(){\n reset();\n }",
"private void resetPlayer(int playerID) {\n\n\t\tif(getPlayerMap().get(playerID) != null){\n\t\t\tgetPlayerMap().get(playerID).setParticipating(false);\n\t\t\tgetPlayerMap().get(playerID).setCrashed(false);\n\t\t\tgetPlayerMap().get(playerID).setCurrentPosition(null);\n\t\t\tgetPlayerMap().get(playerID).setCurrentVelocity(null);\n\t\t}\n\t}",
"public Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}",
"private void abandonTileImprovementPlan() {\n if (tileImprovementPlan != null) {\n if (tileImprovementPlan.getPioneer() == getAIUnit()) {\n tileImprovementPlan.setPioneer(null);\n }\n tileImprovementPlan = null;\n }\n }",
"public void resetPuck() {\n this.puck.setPosition(new Point(this.center_point));\n }",
"public void resetCaughtPokemon() {\r\n\t\tcaughtPokemon = new HashMap<String, Integer>(emptyList);\r\n\t}",
"public void clear() {\n\t\tcopy(problem, player);\n\t}",
"public void unsetTpe()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPE$32, 0);\r\n }\r\n }",
"public void resetPlayer() {\n\t\tthis.carrotCards = 65;\n\t\tthis.playerSpace = 0;\n\n\t}",
"public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }",
"public void removePokemon(Pokemon pokemon) {\r\n\t\tif (ownedPokemon.contains(pokemon)) {\r\n\t\t\townedPokemon.remove(pokemon);\r\n\t\t}\r\n\t}",
"private void reset() {\n PlayerPanel.reset();\n playersAgentsMap.clear();\n agentList.clear();\n playerCount = 0;\n playerList.removeAll();\n iPlayerList.clear();\n dominator = \"\";\n firstBlood = false;\n }",
"public void unsetTpg()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPG$30, 0);\r\n }\r\n }",
"void setMenuNull() {\n game.r = null;\n }",
"@Override\n\tpublic Player getPlayer() {\n\t\treturn null;\n\t}",
"public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }",
"public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }",
"public void ResetPlayer() {\n\t\tfor (int i = 0; i < moveOrder.length; i++) {\n\t\t\tmoves.add(moveOrder[i]);\n\t\t}\n\t\tthis.X = 0;\n\t\tthis.Y = 0;\n\t\tthis.movesMade = 0;\n\t\tthis.face = 1;\n\t}",
"public void clearPlayed(){\n\t\tplayed = null;\n\t}",
"public void unsetZyhtVO()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ZYHTVO$0, 0);\n }\n }",
"public PokemonTrainer()\n {\n name = selector.selectName();\n faveType = selector.selectType();\n pokeball = selector.selectBall();\n caughtPokemon = selector.selectPokemon();\n setColor(null);\n }",
"public void resetPlayers() {\n Player curPlayer;\n for(int i = 0; i < players.size(); i++){\n curPlayer = players.peek();\n curPlayer.resetRole();\n curPlayer.setLocation(board.getSet(\"trailer\"));\n curPlayer.setAreaData(curPlayer.getLocation().getArea());\n view.setDie(curPlayer);\n players.add(players.remove());\n }\n\n }",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t\tplayer.resetAllPlayerGuesses();\n\t}",
"void killPlayerByPlayerMove()\n {\n movePlayerToCell(getMonsterCell());\n }",
"private void detener() {\n player.stop();\n player.release();\n player = null;\n }",
"public void resetPlayerInfo() {\r\n\t\tthis.damageDealt = 0;\r\n\t\tthis.damageTaken = 0;\r\n\t\tthis.robotsDestroyed = 0;\r\n\t\tthis.tilesMoved = 0;\r\n\t\tthis.turnsSinceLastMove = 0;\r\n\t\tthis.turnsSinceLastFire = 0;\r\n\t\t\r\n\t\tthis.robots = new ArrayList<Robot>(3);\r\n\t\t\r\n\t\t/* 0 = scout , 1 = sniper, 2 = tank */\r\n\t\tthis.robots.add(new Robot(playerID, 0));\r\n\t\tthis.robots.add(new Robot(playerID, 1));\r\n\t\tthis.robots.add(new Robot(playerID, 2));\r\n\t}",
"@Override\r\n\tpublic void noControl() {\r\n q.put(null);\r\n v.put(null);\r\n }",
"public void resetNodo()\r\n {\r\n this.nodo = null;\r\n }",
"@Override\n public final void disqualify(final int playerId) {\n this.setPointsByPlayerId(playerId, 0);\n }",
"public void unsetPir()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PIR$12, 0);\r\n }\r\n }",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"public Builder clearOpponent() {\n if (opponentBuilder_ == null) {\n opponent_ = null;\n onChanged();\n } else {\n opponent_ = null;\n opponentBuilder_ = null;\n }\n\n return this;\n }",
"private void clearObjUser() { objUser_ = null;\n \n }",
"private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\n }",
"public void reset() {\n for (Vertex v : vertices) {\n v.path = false;\n v.visited = false;\n }\n b = new BreadthFirst(vertices);\n d = new DepthFirst(vertices);\n p = new Player(vertices);\n }",
"@Override\r\n\tpublic void reset() {\r\n\t\tpilots.clear();\r\n\t\tcabinCrew.clear();\r\n\r\n\t}",
"@Override\n public void unsuspendPlayer(String username) {\n if (match != null && username != null) {\n match.unsuspendPlayer(username);\n }\n }",
"public void unfreezePlayer(Player player) {\r\n\t\tif (isFrozen(player)) {\r\n\t\t\tendFreeze(player);\r\n\t\t}\r\n\t}",
"public void reset() {\n\t\tmCustomRingtone = null;\n\t\tmSendToVM = null;\n\t\tmSelected = false;\n\t\tmHasText = null;\n\t\tmHasPhone = null;\n\t\tmHasEmail = null;\n\t\t// mPhoto = null; // don't re-get this, too expensive\n\t\tmContactInfo = null;\n\t}",
"private void reset() {\n\n\n spaceShips.clear();\n playerOne = null;\n playerTwo = null;\n friendlyBullets.clear();\n enemyBullets.clear();\n powerUps.clear();\n enemyGenerator.reset();\n difficulty.reset();\n Bullets.BulletType.resetSpeed();\n\n for (int i = 0; i < enemies.size(); i++) {\n enemies.get(i).getEnemyImage().delete();\n }\n enemies.clear();\n }",
"@Override\n public void reset()\n {\n this.titles = new ABR();\n this.years = new ABR();\n this.votes = new ABR();\n this.director = new ABR();\n\n for(int i = 0; i < this.movies.length; i++)\n this.movies.set(i, null);\n }",
"public void reset() {\n mMediaPlayer.reset();\n setPlayerState(State.IDLE);\n }",
"public void unsetTpd()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPD$34, 0);\r\n }\r\n }",
"@Override\n public void setNull() {\n\n }",
"public void reset() {\n playing = true;\n won = false;\n startGame();\n\n // Make sure that this component has the keyboard focus\n requestFocusInWindow();\n }",
"public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }",
"public void resetTitulo()\r\n {\r\n this.titulo = null;\r\n }",
"public void resetTitulo()\r\n {\r\n this.titulo = null;\r\n }",
"public void setoPlayer(Player oPlayer) {\n\t\tthis.oPlayer = oPlayer;\n\t}",
"public void unsetPresent()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PRESENT$0, 0);\n }\n }",
"public void resetProcesoCognitivo()\r\n {\r\n this.procesoCognitivo = null;\r\n }",
"public void setNone() {\n\t\tstate = State.NONE;\n\t}",
"public void Reset()\r\n\t{\r\n\t\tif(!levelEditingMode)//CAN ONLY RESET IN LEVEL EDITING MODE\r\n\t\t{\r\n\t\t\tgrid.clearUserObjects();\r\n\t\t\tmenu = new SpriteMenu(listFileName, playButton);\r\n\t\t}\r\n\t}",
"public Pokemon() {\n }",
"public void setNull(){\n for (int i = 0; i < Nodes.size(); i++){\n this.References.add(null);\n }\n }",
"public void resetGame() {\r\n\t\tfor(Player p : players) {\r\n\t\t\tp.reset();\r\n\t\t}\r\n\t\tstate.reset();\r\n\t}",
"public void reset() {\n // corresponding function called in the Board object to reset piece\n // positions\n board.reset();\n // internal logic reset\n lastColor = true;\n gameOver = false;\n opponentSet = false;\n }",
"public static void clearInventoryCrafting(Player player)\n\t{\n\t\tPlayerInventory inv = player.getInventory();\n\t\tfor(int i = 0; i < 4; i++)\n\t\t\tinv.setItem(1 + i, null);\n\t}",
"public void reset()\n\t{\n\t\tassociations = new Vector<Association>();\n\t\tif(hotspots != null)\n\t\t{\n\t\t\tfor(int i=0; i < hotspots.size(); i++)\n\t\t\t{\n\t\t\t\thotspots.elementAt(i).bound = null;\n\t\t\t\thotspots.elementAt(i).setHighlighted(false);\n\t\t\t}\n\t\t}\n\n\t\tif(movableObjects != null)\n\t\t{\n\t\t\tfor(int i=0; i < movableObjects.size(); i++)\n\t\t\t{\n\t\t\t\tmovableObjects.elementAt(i).resetPos();\n\t\t\t\tmovableObjects.elementAt(i).bound = null;\n\t\t\t}\n\t\t}\n\t\tuser_responses=0;\n\t\tmov = null;\n\t\tstart = null;\n\t\tmpos = null;\n\t\tsetFeedback();\n\t\trepaint();\n\t}",
"public void clearPolymorphismTairObjectId() {\n // Override in proxy if lazily loaded; otherwise does nothing\n }",
"@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}",
"public void reset() {\n this.state = null;\n }",
"private void nullify() {\n\t\tpaint = null;\n\t\tup = null;\n\t\tdown = null;\n\t\tleft = null;\n\t\tright = null;\n\t\tg_up = null;\n\t\tg_down = null;\n\t\tg_left = null;\n\t\tg_right = null;\n\t\tgrass = null;\n\t\tcake = null;\n\n\t\t// Call garbage collector to clean up memory.\n\t\tSystem.gc();\n\n\t}",
"public void unsetNullFlavor()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_attribute(NULLFLAVOR$28);\n }\n }",
"public void reset() {\n\t\tfor (int i = 0; i<DIVISIONS; i++){\n\t\t\tfor (int j = 0; j<DIVISIONS; j++){\n\t\t\t\tgameArray[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgameWon = false;\n\t\twinningPlayer = NEITHER;\n\t\tgameTie = false;\n\t\tcurrentPlayer = USER;\n\t}",
"public Builder clearPokeStorage() {\n bitField0_ = (bitField0_ & ~0x00000020);\n pokeStorage_ = 0;\n onChanged();\n return this;\n }",
"public void resetGameRoom() {\n gameCounter++;\n score = MAX_SCORE / 2;\n activePlayers = 0;\n Arrays.fill(players, null);\n }",
"@Override\n public PlayerMove move() {\n\n return null;\n }",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }",
"public void reset() {\n\t\tvar.clear();\n\t\tname.clear();\n\t}",
"public void reset() {\n _valueLoaded = false;\n _value = null;\n }",
"public baconhep.TTau.Builder clearPt() {\n fieldSetFlags()[0] = false;\n return this;\n }",
"public void empty() {\n\t\tempty.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = empty;\n\t}",
"public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}",
"@Override\n public void resetTour(){\n tour=null;\n this.setChanged();\n this.notifyObservers();\n }",
"public void setValueNull()\n\t{\n\t\tallValues.clear();\n\t}",
"public void reset()\n {\n reset(this.map, this.heuristic, this.neighborSelector);\n }",
"public Builder clearPokeball() {\n \n pokeball_ = 0;\n onChanged();\n return this;\n }",
"public void reset(V v) {\n\t\tmDistanceMap.remove(v);\n\t\tmIncomingEdgeMap.remove(v);\n\t}",
"public void vaciar()\n {\n this.raiz = null;\n }",
"public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}",
"public void unsetPrf()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PRF$26, 0);\r\n }\r\n }",
"public void clearTombstones(Player p) {\n\t\tSet<Tile> tombstoneTiles = getTombstoneTiles(p);\n\t\tfor (Tile t : tombstoneTiles) {\n\t\t\t//Destroy tombstone and update land type to grass\n\t\t\tt.destroyStructure();\n\t\t\tt.updateLandType(LandType.Tree);\n\t\t}\n\t}",
"public void eliminatePlayer(Character player){\r\n\t\tplayer.setAsPlayer(false);\r\n\t\tSystem.err.println(player.getName() + \" was eliminated\");\r\n\t}"
]
| [
"0.7774379",
"0.6242638",
"0.6241162",
"0.6217543",
"0.60307246",
"0.60048735",
"0.599411",
"0.59817547",
"0.597527",
"0.5961636",
"0.59574956",
"0.59513044",
"0.5929807",
"0.5899159",
"0.58976346",
"0.5881219",
"0.58232987",
"0.5800122",
"0.5778813",
"0.5764935",
"0.56908774",
"0.568272",
"0.5677755",
"0.5624083",
"0.5584855",
"0.5571512",
"0.5560889",
"0.55608433",
"0.5551988",
"0.5550155",
"0.5545812",
"0.5540925",
"0.5534588",
"0.55297637",
"0.5523225",
"0.552134",
"0.5517561",
"0.5510472",
"0.55101144",
"0.549056",
"0.54881465",
"0.54831314",
"0.54799384",
"0.5476112",
"0.5469949",
"0.54665864",
"0.5438379",
"0.54359806",
"0.54309267",
"0.54260284",
"0.5398011",
"0.5393381",
"0.5390596",
"0.5386009",
"0.5378565",
"0.53778285",
"0.536121",
"0.5352932",
"0.5342937",
"0.53426814",
"0.5339239",
"0.5339148",
"0.5339148",
"0.5334118",
"0.5327875",
"0.5321506",
"0.5312281",
"0.5311197",
"0.53066176",
"0.5302358",
"0.5293629",
"0.52914417",
"0.52912366",
"0.5289168",
"0.52869874",
"0.5286945",
"0.52857643",
"0.52814996",
"0.52548254",
"0.52548003",
"0.52542615",
"0.52492106",
"0.52444506",
"0.5241537",
"0.5241152",
"0.523019",
"0.52300847",
"0.5227054",
"0.5222707",
"0.52217287",
"0.5220501",
"0.52120245",
"0.52063495",
"0.52063066",
"0.52041966",
"0.52041864",
"0.52026486",
"0.5202486",
"0.52009267",
"0.5200205"
]
| 0.8478543 | 0 |
Sets the enemy Pokemon object to null. | public void setEnemyPkmnNull()
{
enemyPokemon = null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void nullEnemy(){\n enemy = null;\n nullEntity();\n }",
"public void setPlayerPkmnNull()\r\n {\r\n playerPokemon = null;\r\n }",
"public void enemyoff(){\n getWorld().removeObject(this);\n }",
"private void nullify() {\n paint = null;\n bg1 = null;\n bg2 = null;\n madafacka = null;\n for(int i=0; i<enemies.size(); i++){\n enemies.remove(i);\n i--;\n }\n currentSprite = null;\n ship = null;\n shipleft1 = null;\n shipleft2 = null;\n shipright1 = null;\n shipright2 = null;\n basicInv1 = null;\n basicInv2 = null;\n badBoyAnim = null;\n\n // Call garbage collector to clean up memory.\n System.gc();\n }",
"private void reset() {\n\n\n spaceShips.clear();\n playerOne = null;\n playerTwo = null;\n friendlyBullets.clear();\n enemyBullets.clear();\n powerUps.clear();\n enemyGenerator.reset();\n difficulty.reset();\n Bullets.BulletType.resetSpeed();\n\n for (int i = 0; i < enemies.size(); i++) {\n enemies.get(i).getEnemyImage().delete();\n }\n enemies.clear();\n }",
"private void abandonTileImprovementPlan() {\n if (tileImprovementPlan != null) {\n if (tileImprovementPlan.getPioneer() == getAIUnit()) {\n tileImprovementPlan.setPioneer(null);\n }\n tileImprovementPlan = null;\n }\n }",
"public Builder clearActivePokemon() {\n if (activePokemonBuilder_ == null) {\n activePokemon_ = null;\n onChanged();\n } else {\n activePokemon_ = null;\n activePokemonBuilder_ = null;\n }\n\n return this;\n }",
"public void reset() {\n monster.setHealth(10);\n player.setHealth(10);\n\n }",
"public void unsetTpe()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPE$32, 0);\r\n }\r\n }",
"public static void enemy(){\n\t\tenemy = null;\n\t\twhile(enemy == null){\n\t\t spawnEnemy();\n\t\t}\n\t}",
"private void reset() {\n PlayerPanel.reset();\n playersAgentsMap.clear();\n agentList.clear();\n playerCount = 0;\n playerList.removeAll();\n iPlayerList.clear();\n dominator = \"\";\n firstBlood = false;\n }",
"public void kill()\r\n {\n if(isTouching(TopDownPlayer.class))\r\n {\r\n health(1);\r\n\r\n getWorld().removeObject(player);\r\n //getWorld().addObject (new Test(), 20, 20);\r\n\r\n }\r\n // if(healthCount >= 1)\r\n // {\r\n // World world;\r\n // world = getWorld();\r\n // getWorld().removeObject(player);\r\n // \r\n // getWorld().addObject (new Test(), 20, 20);\r\n // }\r\n }",
"void clean(Player p);",
"private void discardPlayer(Player p)\n {\n locations.remove(p);\n plugin.getAM().arenaMap.remove(p);\n clearPlayer(p);\n }",
"public void kill() {\n this.hp = 0;\n }",
"@Override\n public void clearLocation() {\n for (Creature creature : getCreatures().values()) {\n if (isEnemy(creature)) {\n if (creature instanceof Kisk) {\n Kisk kisk = (Kisk) creature;\n kisk.getController().die();\n }\n }\n }\n\n for (Player player : getPlayers().values())\n if (isEnemy(player))\n TeleportService2.moveToBindLocation(player, true);\n }",
"void unsetObjectives();",
"public void resetPlayer() {\n\t\thealth = 3;\n\t\tplayerSpeed = 5f;\n\t\tmultiBulletIsActive = false;\n\t\tspeedBulletIsActive = false;\n\t\tquickFireBulletIsActive = false;\n\t\tinvincipleTimer = 0;\n\t\txPosition = 230;\n\t}",
"public synchronized void reset(){\n \t\teverbie = null;\n \t}",
"public void dispara()\r\n {\r\n BulletEnemy bala = new BulletEnemy();\r\n getWorld().addObject(bala,getX(),getY()+25);\r\n }",
"public void clearEnemies() {\n\t\tIterator<Entity> it = entities.iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tEntity e = it.next();\n\t\t\t//Skip playerfish\n\t\t\tif (e instanceof PlayerFish) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t//Kill and remove the entity\n\t\t\te.kill();\n\t\t\tit.remove();\n\t\t}\n\t\t\n\t\t//Remove all non playerfish from collidables\n\t\tcollidables.removeIf(c -> !(c instanceof PlayerFish));\n\t\tdrawables.removeIf(c -> !(c instanceof PlayerFish));\n\t}",
"@Override\n public void kill() {\n alive = false;\n Board.getInstance().setPoints(points);\n }",
"public Builder clearPokemonDisplay() {\n if (pokemonDisplayBuilder_ == null) {\n pokemonDisplay_ = null;\n onChanged();\n } else {\n pokemonDisplay_ = null;\n pokemonDisplayBuilder_ = null;\n }\n\n return this;\n }",
"public void unsetZyhtVO()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(ZYHTVO$0, 0);\n }\n }",
"public void reset() {\n gameStatus = null;\n userId = null;\n gameId = null;\n gameUpdated = false;\n selectedTile = null;\n moved = false;\n }",
"public void reset()\n {\n playersPiece = -1;\n king = false;\n empty = true;\n setTileColor(-1);\n }",
"protected void setDead()\n {\n alive = false;\n if(location != null) {\n field.clear(location);\n location = null;\n field = null;\n }\n }",
"protected void setDead()\n {\n alive = false;\n if(location != null) {\n field.clear(location);\n location = null;\n field = null;\n }\n }",
"public void EleaveRoom(Enemy1 x)\n\t{\n\t\toccupant = null;\n\t}",
"@Override\r\n\tpublic void reset() {\n\t\tposition.set(0, 0);\r\n\t\talive = false;\r\n\t}",
"void killPlayerByPlayerMove()\n {\n movePlayerToCell(getMonsterCell());\n }",
"public void unsetTpd()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPD$34, 0);\r\n }\r\n }",
"public void unsetPatent()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PATENT$16, 0);\r\n }\r\n }",
"public Builder clearFaintedPokemon() {\n if (faintedPokemonBuilder_ == null) {\n faintedPokemon_ = java.util.Collections.emptyList();\n bitField0_ = (bitField0_ & ~0x00000002);\n onChanged();\n } else {\n faintedPokemonBuilder_.clear();\n }\n return this;\n }",
"public void unsetAntEfficiency() {\n this.antEfficiency = null;\n }",
"public void unsetTpg()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(TPG$30, 0);\r\n }\r\n }",
"public Builder clearPokemonId() {\n \n pokemonId_ = 0L;\n onChanged();\n return this;\n }",
"public void setDead(){\n\t\t//queue this blood for cleanup\n\t\tvisible = false;\n\t\tDEAD = true;\n\t\tcleanUp();\n\t}",
"private void detener() {\n player.stop();\n player.release();\n player = null;\n }",
"public void killPlayer(){\n setInPlay(false);\n setDx(0.0f);\n setDy(0.04f);\n }",
"private void setEnemy(){\n depths.setEnemy(scorpion);\n throne.setEnemy(rusch);\n ossuary.setEnemy(skeleton);\n graveyard.setEnemy(zombie);\n ramparts.setEnemy(ghoul);\n bridge.setEnemy(concierge);\n deathRoom1.setEnemy(ghost);\n deathRoom2.setEnemy(cthulu);\n deathRoom3.setEnemy(wookie); \n }",
"public Builder clearOpponent() {\n if (opponentBuilder_ == null) {\n opponent_ = null;\n onChanged();\n } else {\n opponent_ = null;\n opponentBuilder_ = null;\n }\n\n return this;\n }",
"public void reset() { \r\n myGameOver = false; \r\n myGamePaused = false; \r\n }",
"public void removeAgent() {agent = null;}",
"public void resetHealth(){\n curHp = healthPoint;\n }",
"public void killAll() {\n for (Map.Entry<Integer, Enemy> entry :enemies.entrySet()) {\n if (!!!entry.getValue().isDead()) {\n entry.getValue().setHealth(0);\n }\n }\n }",
"private void resetPlayer() {\r\n List<Artefact> inventory = currentPlayer.returnInventory();\r\n Artefact item;\r\n int i = inventory.size();\r\n\r\n while (i > 0) {\r\n item = currentPlayer.removeInventory(inventory.get(i - 1).getName());\r\n currentLocation.addArtefact(item);\r\n i--;\r\n }\r\n currentLocation.removePlayer(currentPlayer.getName());\r\n locationList.get(0).addPlayer(currentPlayer);\r\n currentPlayer.setHealth(3);\r\n }",
"public void killedByPlayer() {\r\n\t\tscreen.enemiesKilled++;\r\n\t\tMazeCrawler mc = screen.mazeHandler.mazeCrawler;\r\n\t\tint n = 2; //if enemy is large do movement n+1 times\r\n\t\tswitch (enemyType) {\r\n\t\tcase DOWN:\r\n\t\t\tmc.moveDown();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveDown();}\r\n\t\t\tbreak;\r\n\t\tcase LEFT:\r\n\t\t\tmc.moveLeft();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveLeft();}\r\n\t\t\tbreak;\r\n\t\tcase RIGHT:\r\n\t\t\tmc.moveRight();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveRight();}\r\n\t\t\tbreak;\r\n\t\tcase UP:\r\n\t\t\tmc.moveUp();\r\n\t\t\tif(large) {for(int i = 0; i < n; i++) mc.moveUp();}\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t\tscreen.enemyDeath.play(.5f);\r\n\t\tdestroy();\r\n\t}",
"public void resetCaughtPokemon() {\r\n\t\tcaughtPokemon = new HashMap<String, Integer>(emptyList);\r\n\t}",
"public void resetNodo()\r\n {\r\n this.nodo = null;\r\n }",
"public void healPokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tp.resetCurrentHP();\r\n\t\t}\r\n\t}",
"private void nullify() {\n\t\tpaint = null;\n\t\tup = null;\n\t\tdown = null;\n\t\tleft = null;\n\t\tright = null;\n\t\tg_up = null;\n\t\tg_down = null;\n\t\tg_left = null;\n\t\tg_right = null;\n\t\tgrass = null;\n\t\tcake = null;\n\n\t\t// Call garbage collector to clean up memory.\n\t\tSystem.gc();\n\n\t}",
"protected void reset() {\n speed = 2.0;\n max_bomb = 1;\n flame = false;\n }",
"public void leaveRoom(Person x)\n {\n occupant = null;\n }",
"public void leaveRoom(Person x)\n {\n occupant = null;\n }",
"@Override\n public void destroy() {\n super.destroy();\n dungeon.removeEntity(this);\n }",
"public void empty() {\n\t\tempty.setPosition(sprite.getX(),sprite.getY());\n\t\tsprite = empty;\n\t}",
"void unsetTarget();",
"public Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}",
"void setMenuNull() {\n game.r = null;\n }",
"public void setEnemy(Enemy enemy){\n this.enemy = enemy;\n enemy.setXGrid(getXGrid());\n enemy.setYGrid(getYGrid());\n setEntity(enemy);\n }",
"public Builder clearPlayer() {\n if (playerBuilder_ == null) {\n player_ = null;\n onChanged();\n } else {\n player_ = null;\n playerBuilder_ = null;\n }\n\n return this;\n }",
"public void reset() {\n\tthis.pinguins = new ArrayList<>();\n\tthis.pinguinCourant = null;\n\tthis.pret = false;\n\tthis.scoreGlacons = 0;\n\tthis.scorePoissons = 0;\n }",
"public void nullifyCause() {\n this.cause = null;\n }",
"void destroy() {\n\t\tdespawnHitbox();\n\t\tinventory.clear();\n\t\texperience = 0;\n\t\tinvalid = true;\n\t}",
"public void reset() {\n\t\tVector2 gravity = new Vector2(world.getGravity() );\n\t\t\n\t\tfor(Obstacle obj : objects) {\n\t\t\tobj.deactivatePhysics(world);\n\t\t}\n\t\tobjects.clear();\n\t\taddQueue.clear();\n\t\tworld.dispose();\n\t\t\n\t\tworld = new World(gravity,false);\n\t\tsetComplete(false);\n\t\tsetFailure(false);\n\t\tpopulateLevel();\n\t}",
"public void removePawn() {\n lives = 0;\n }",
"private void clearObjUser() { objUser_ = null;\n \n }",
"public void playerHasNoSword() {\n\t\tthis.state = cannotBeKilled;\n\t}",
"public void killPlayer() {\n \tdungeon.removeentity(getX(), getY(), name);\n \t\tdungeon.deleteentity(getX(),getY(),name);\n \t\t//System.out.println(\"YOU LOSE MAMA\");\n \t\t//System.exit(0);\n \t\t\n }",
"public static void passByRefTest(Employee obj) {\n\t\tobj = null;\n\t}",
"public void removePokemon(Pokemon pokemon) {\r\n\t\tif (ownedPokemon.contains(pokemon)) {\r\n\t\t\townedPokemon.remove(pokemon);\r\n\t\t}\r\n\t}",
"public void clear() {\n\t\tcopy(problem, player);\n\t}",
"@Override\n public void Die() {\n this.setAlive(false);\n }",
"public final void reset() {\n\t\tscore = 0;\n\t\tlives = 10;\n\t\tshields = 3;\n\t}",
"public void unsetPatient()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(PATIENT$2, 0);\n }\n }",
"public Player(){\n reset();\n }",
"public Enemy summon() {\n\t\treturn null;\n\t}",
"private void resetPlayer(int playerID) {\n\n\t\tif(getPlayerMap().get(playerID) != null){\n\t\t\tgetPlayerMap().get(playerID).setParticipating(false);\n\t\t\tgetPlayerMap().get(playerID).setCrashed(false);\n\t\t\tgetPlayerMap().get(playerID).setCurrentPosition(null);\n\t\t\tgetPlayerMap().get(playerID).setCurrentVelocity(null);\n\t\t}\n\t}",
"@Override\n public void reset() {\n // Crea instancia y define el tipo del personaje.\n this.personaje = new Personaje();\n this.personaje.setTipo(\"Agua\");\n }",
"@Override\n public final void disqualify(final int playerId) {\n this.setPointsByPlayerId(playerId, 0);\n }",
"private void ResetGame(){\n this.deck = new Deck();\n humanPlayer.getHand().clear();\n humanPlayer.setWager(0);\n dealer.getHand().clear();\n }",
"public void unsetBirthplace()\n {\n synchronized (monitor())\n {\n check_orphaned();\n get_store().remove_element(BIRTHPLACE$24, 0);\n }\n }",
"public void noCollision(){\r\n this.collidingEntity2=null;\r\n this.collidingEntity=null;\r\n collidedTop=false;\r\n collide=false;\r\n }",
"public PokemonTrainer()\n {\n name = selector.selectName();\n faveType = selector.selectType();\n pokeball = selector.selectBall();\n caughtPokemon = selector.selectPokemon();\n setColor(null);\n }",
"public void resetGame(){\n\t\tPlayer tempPlayer = new Player();\n\t\tui.setPlayer(tempPlayer);\n\t\tui.resetCards();\n\t}",
"public void removeEnemy(Enemy e) {\r\n this.enemies.remove(e);\r\n this.numOfEnemies.decrease(1);\r\n }",
"private void clearAlive() {\n \n alive_ = false;\n }",
"public void unsetOther()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(OTHER$18, 0);\r\n }\r\n }",
"void nuke() {\n\t\tfor (int a = 0; a < height; a++) {\n\t\t\tfor (int b = 0; b < width; b++) {\n\t\t\t\tif (FWorld[a][b] != null) {\n\t\t\t\t\tEZ.removeEZElement(FWorld[a][b]);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tEZ.removeEZElement(background);\n\t\tEZ.removeEZElement(explosion);\n\t\tturtle.kill();\n\t}",
"public void setNull(){\n for (int i = 0; i < Nodes.size(); i++){\n this.References.add(null);\n }\n }",
"public void resetPlayer(){\n images = new EntitySet(true,false, 0);\n }",
"public void unsetPir()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n get_store().remove_element(PIR$12, 0);\r\n }\r\n }",
"private void killBullet() {\r\n this.dead = true;\r\n }",
"public void setEngineOff();",
"public void removeMissile(Object o,boolean enemy)\n\t{\n\t\tIIterator iter = gameObj.getIterator();\n\t\twhile(iter.hasNext())\n\t\t{\n\t\t\tGameObject current = (GameObject)iter.getNext();\n\t\t\tif(current.getClass().isInstance(o))\n\t\t\t{\n\t\t\t\tif(((Missile)current).isEnemy() == enemy)\n\t\t\t\t{\n\t\t\t\t\titer.remove();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void resetTask() {\n if (ShulkerEntity.this.getAttackTarget() == null) {\n ShulkerEntity.this.updateArmorModifier(0);\n }\n\n }",
"public void destroy()\n {\n GeneticRobots.rmCollider(this.collider);\n GeneticRobots.rmObject(this);\n }",
"public void resetArboles()\r\n {\r\n this.arboles = null;\r\n }",
"public void reset()\n {\n reset(this.map, this.heuristic, this.neighborSelector);\n }"
]
| [
"0.7678603",
"0.75187707",
"0.65179867",
"0.630473",
"0.6258495",
"0.6220579",
"0.6011205",
"0.5886352",
"0.5831209",
"0.58140796",
"0.57850677",
"0.57827055",
"0.5777734",
"0.5742273",
"0.5734157",
"0.5729768",
"0.57282144",
"0.57045704",
"0.56849205",
"0.5678923",
"0.5656556",
"0.56548685",
"0.5650336",
"0.565021",
"0.5641627",
"0.56343",
"0.56297773",
"0.56297773",
"0.562592",
"0.56088257",
"0.559882",
"0.5594911",
"0.5588695",
"0.5582743",
"0.5579802",
"0.557374",
"0.55721617",
"0.55686957",
"0.5567261",
"0.5567202",
"0.556686",
"0.55665654",
"0.5562297",
"0.55459636",
"0.5536739",
"0.55280584",
"0.55262184",
"0.5523245",
"0.5509226",
"0.55086505",
"0.5507212",
"0.5502326",
"0.54932576",
"0.5483325",
"0.5483325",
"0.54686636",
"0.5452062",
"0.5451794",
"0.5448353",
"0.54479015",
"0.5439191",
"0.5435668",
"0.5427012",
"0.5420318",
"0.5409742",
"0.5404721",
"0.53979963",
"0.5397817",
"0.53969973",
"0.53961676",
"0.53795105",
"0.5362204",
"0.5358264",
"0.5357984",
"0.53579724",
"0.5355232",
"0.5354644",
"0.5349339",
"0.5348125",
"0.5341051",
"0.53392094",
"0.5336335",
"0.5329724",
"0.53286064",
"0.532369",
"0.53154653",
"0.5312691",
"0.53062177",
"0.5303332",
"0.5295857",
"0.5295484",
"0.52950084",
"0.5284516",
"0.52793443",
"0.5277193",
"0.5274841",
"0.52744466",
"0.5271491",
"0.52707666",
"0.5269322"
]
| 0.86735046 | 0 |
Changes the current player Pokemon. | public void setCurrentPlayerPokemon(int newID)
{
currentPlayerPokemon = newID;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setCurrentPlayer(Player P){\n this.currentPlayer = P;\n }",
"public void Switch()\n {\n if(getCurrentPokemon().equals(Pokemon1))\n {\n // Change to pokemon2\n setCurrentPokemon(Pokemon2);\n }\n // if my current pokemon is the same as pokemon2\n else if(getCurrentPokemon().equals(Pokemon2))\n {\n // swap to pokemon1\n setCurrentPokemon(Pokemon1);\n }\n }",
"public void setPlayer(Player myPlayer){\n battlePlayer=myPlayer;\n }",
"public void setPlayer(Player player) {\n this.currentPlayer = player;\n }",
"public void setPlayer(Player p) {\n\t\tplayer = p;\n\t}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setPlayer(Player player) {\r\n this.player = player;\r\n }",
"public void setCurrent(ServerPlayer p) {\n\t\tthis.current = p;\n\t}",
"public void setPlayer(Player player) {\n this.player = player;\n }",
"public void setPlayer(Player newPlayer) {\n roomPlayer = newPlayer;\n }",
"public static void changePlayer() {\n\t\tvariableReset();\n\t\tif (curPlayer == 1)\n\t\t\tcurPlayer = player2;\n\t\telse\n\t\t\tcurPlayer = player1;\n\t}",
"public static void setPlayer(Player p) {\n\t\tUniverse.player = p;\n\t}",
"public static void updatePlayer(Player p){\n\t\tp.clearMoves();\n\t\tboard.possibleMoves(p);\n\t}",
"public Player updatePlayer(Player player);",
"private void changeCurrentPlayer() {\n switch (currentPlayer) {\n case 0: currentPlayer = 1;\n return;\n default: currentPlayer = 0;\n return;\n }\n }",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\r\n\t}",
"public void switchPlayer(){\n // Menukar giliran player dalam bermain\n Player temp = this.currentPlayer;\n this.currentPlayer = this.oppositePlayer;\n this.oppositePlayer = temp;\n }",
"@Override\n\tpublic void setPlayer(Player player) {\n\n\t}",
"public Pokemon getPlayerPokemon()\r\n {\r\n return playerPokemon;\r\n }",
"public void setPlayer(Player player) {\n\t\t\tthis.player = player;\n\t\t}",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t}",
"void updatePlayer(Player player);",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"public abstract void changePlayerAt(ShortPoint2D pos, Player player);",
"public void setCurrentPlayer(User newPlayer) {\n\n\t\tif (currentPlayer != null) {\n\t\t\tif (currentPlayer.equals(newPlayer))\n\t\t\t\treturn;\n\t\t\telse if (newPlayer == null)\n\t\t\t\tthrow new RuntimeException(\"Once a player has been assigned to a Level Pack, it cannot be nulled.\");\n\t\t\telse\n\t\t\t\tthrow new RuntimeException(\"Once a player has been assigned to a Level Pack, it cannot be changed.\");\n\t\t} else if (newPlayer == null)\n\t\t\treturn;\n\t\tcurrentPlayer = newPlayer;\n\t}",
"public void setPlayer(String player) {\r\n this.player = player;\r\n }",
"@Override\r\n\tpublic void set(final Player t) {\n\r\n\t}",
"public void setPlayer(Player player) {\n\t\tthis.player = player;\n\t\tplayer.resetAllPlayerGuesses();\n\t}",
"public void setPlayer(Player _player) { // beallit egy ezredest az adott mapElementre, ha az rajta van\n player = _player;\n }",
"public void updatePlayer(Player player) {\n\t\t// update the flag GO TO JAIL in Player class\n\t}",
"public void promote() {\r\n\t\tif (exp >= 20) {\r\n\t\t\tstage +=1;\r\n\t\t\texp = 0;\r\n\t\t\thp *= 2;\r\n\t\t\tenergy *= 2;\r\n\t\t\tattackPoint *= 2;\r\n\t\t\tresistancePoint *= 2;\r\n\t\t}\r\n\t\t\t\r\n\t\t\tSystem.out.printf(\"Pokemon has evolved!\\n\");\r\n\t}",
"private void ReplacePlayer()\n {\n String oldPlayer = GetPlayerString(mTeamsComboBox.getSelectedItem().toString(),\n mPositionComboBox.getSelectedItem().toString());\n if( oldPlayer == null )\n return;\n\n String newPlayer = GetPlayerString_UI();\n String team = mTeamsComboBox.getModel().getElementAt(mTeamsComboBox.getSelectedIndex()).toString();\n ReplacePlayer(team, oldPlayer, newPlayer);\n }",
"public void playOne(VirtualPet player) {\n\t\tplayer.playPet();\n\t}",
"public void setPokemonSeen(int i)\n\t{\n\t\tm_pokedex.setPokemonSeen(i);\n\t\tupdateClientPokedex(i, Pokedex.SEEN);\n\t}",
"public void setPlayer(int play)\n {\n this.player=play;\n }",
"public int getCurrentPlayerPokemon()\r\n {\r\n return currentPlayerPokemon;\r\n }",
"public void setP1(Player p1) {\n this.p1 = p1;\n }",
"public int attackPokemon(Pokemon pokemon1, Pokemon pokemon2, Player player);",
"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 }",
"protected void SwapToPokemon1(ActionEvent evt) {\n\t\tmyModel.detach(this);\n\t\tmyController = new SwapPokemonController(myModel, myModel.getPlayer().getPokemon(1));\n\t\tmyController.execute();\n\t}",
"public void pickUp(Player player) {\n player.setBox(this);\n }",
"@Override\n public void setPlayerDoneBrainstorming(Player player, boolean value){\n DatabaseReference currentRef = database.getReference(gameCodeRef).child(\"Players\").child(player.getUsername());\n currentRef.child(\"DoneBrainstorming\").setValue(value);\n if(value){\n updateNrPlayerValues(\"PlayersDoneBrainstorming\");\n }\n }",
"public void playerSet(Player player, long chips) {\n currentMatch.playerSet(player, chips);\n ifMatchIsFinishedGoAhead();\n }",
"public void setState(Player player) {\n\t\tstate = player;\n\t\tstateChanged();\n\t}",
"public void setOpponent(Player p) {\n\t\tthis.opponent = p;\n\t}",
"public void setWinner(Player winner) {\n this.winner = winner;\n }",
"private void SetCurrentPlayer() throws IOException\n {\n if( mTeamsComboBox.getSelectedItem() != null )\n {\n String team = mTeamsComboBox.getSelectedItem().toString();\n String position = mPositionComboBox.getSelectedItem().toString();\n String playerData = GetPlayerString(team, position);\n if( playerData != null )\n SetPlayerData(playerData);\n }\n }",
"public void healPokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tp.resetCurrentHP();\r\n\t\t}\r\n\t}",
"protected void SwapToPokemon0(ActionEvent evt) {\n\t\tmyModel.detach(this);\n\t\tmyController = new SwapPokemonController(myModel, myModel.getPlayer().getPokemon(0));\n\t\tmyController.execute();\n\t}",
"public void setCurrentPlayer(String currentPlayer) {\n\t\t_currentPlayer = currentPlayer;\n\t}",
"public void respawnPlayer() {\n \tboard.swapTile(board.getTile(player.getPos()), board.getTile(new Point(8,0)));\n player.setPlayerPos(new Point(8,0));\n resetAmmo();\n }",
"public Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}",
"public void setPlayer(Sprite player) {\n\t\tthis.player = player;\n\t}",
"private void play(Player p){\r\n\t\tSystem.out.println(\"What pet would you like to play with?\");\r\n\t\tint c = 1;\r\n\t\tArrayList<Toy> toys = p.getToys();\r\n\r\n\t\tfor(Pet pet : p.getPets()){\r\n\t\t\tSystem.out.println(c + \". \" + pet.getPetname());\r\n\t\t\tc++;\r\n\t\t}\r\n\t\tint selectedpetindex = getNumber(1, p.getPets().size());\r\n\t\tPet selectedpet = p.getPets().get(selectedpetindex - 1);\r\n\t\tSystem.out.println(\"What toy do you want to use to play with \" + selectedpet.getPetname());\r\n\r\n\t\tc = 1;\r\n\t\tfor(Toy t : toys){\r\n\t\t\tSystem.out.println(c + \". \" + t.getName());\r\n\t\t\tc++;\r\n\t\t}\r\n\t\tint toyindex = getNumber(1, toys.size());\r\n\t\tToy selectedtoy = toys.get(toyindex);\r\n\r\n\t\tselectedpet.play(selectedtoy);\r\n\t\tselectedtoy.setDurability(selectedtoy.getDurability() - selectedpet.getRoughness());\r\n\r\n\t\tif(selectedtoy.getDurability() < 1){\r\n\t\t\ttoys.remove(toyindex);\r\n\t\t}else{\r\n\t\t\ttoys.set(toyindex, selectedtoy);\r\n\t\t}\r\n\r\n\t\tp.setToys(toys);\r\n\t\tp.setActions(p.getActions() - 1);\r\n\t}",
"public void makePlayerPokemon(int index)\r\n {\r\n String playerPkmnName = Reader.readStringFromFile(\"playerPokemon\", index, 0);\r\n int playerPkmnLevel = Reader.readIntFromFile(\"playerPokemon\", index, 1);\r\n boolean playerPkmnGender = Reader.readBooleanFromFile(\"playerPokemon\", index, 2);\r\n int playerPkmnCurrentHealth = Reader.readIntFromFile(\"playerPokemon\", index, 3);\r\n int playerPkmnExp = Reader.readIntFromFile(\"playerPokemon\", index, 4);\r\n this.playerPokemon = new Pokemon(currentPlayerPokemon, playerPkmnName, playerPkmnLevel, playerPkmnGender, playerPkmnCurrentHealth, playerPkmnExp, true);\r\n }",
"void setCurrentHP(final int newHP);",
"public void setValue(Player player, T value) {\n\t\tsetValue(player.getUniqueId(), value);\n\t}",
"@Override\n\tpublic void startGame(){\n\t\tsuper.currentPlayer = 1;\n\t}",
"private void setPlayer() {\n player = Player.getInstance();\n }",
"void notifyPlayerChanged(PlayerNumber newPlayer);",
"public void setCurrentTurn(Player player) {\r\n\t\tthis.currentTurn = player;\r\n\t}",
"private void setPlayer()\t{\n\t\tgrid.setGameObject(spy, Spy.INITIAL_X, Spy.INITIAL_Y);\n\t}",
"public void setCurrentPlayerName(String name)\n {\n currentPlayerName = name;\n startGame();\n }",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"public void pickUpHerd() {\n rounds.get(currentRound).currentPlayerPickUpHerd();\n }",
"void changeTrainer(Long pokemonId, Long newTrainerId);",
"static void setCurrentPlayer()\n {\n System.out.println(\"Name yourself, primary player of this humble game (or type \\\"I suck in life\\\") to quit: \");\n\n String text = input.nextLine();\n\n if (text.equalsIgnoreCase(\"I suck in life\"))\n quit();\n else\n Player.current.name = text;\n }",
"Pokemon() {\n // we want to set level to 1 for every pokemon initially\n count++;\n level = 1;\n }",
"@Override\n public void updateEnergy(int p, Racer player) {\n\n super.updateEnergy(p, player);\n player.setEnergy(player.getEnergy() * 2);\n }",
"private void setPlayerRoom(){\n player.setRoom(currentRoom);\n }",
"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}",
"@Override\n public void antidote(Player p) {\n LOG.wtf(this.getClass().getSimpleName(), \"ANTIDOTE SET TO \" + p.toString());\n }",
"void changeSkill(Long pokemonId, int newSkill);",
"public void catchPokemon(Pokemon p)\n\t{\n\t\tDate d = new Date();\n\t\tString date = new SimpleDateFormat(\"yyyy-MM-dd:HH-mm-ss\").format(d);\n\t\tp.setDateCaught(date);\n\t\tp.setOriginalTrainer(getName());\n\t\tp.setDatabaseID(-1);\n\t\taddPokemon(p);\n\t\taddTrainingExp(1000 / p.getRareness());\n\t\tif(!isPokemonCaught(p.getPokedexNumber()))\n\t\t\tsetPokemonCaught(p.getPokedexNumber());\n\t}",
"public void setPawn(Pawn pawn)\n\t{\n\t\tsomethingChanged = true;\n\t\tthis.pawn = pawn;\n\t}",
"public Pokemon(String name, int number) {\r\n this.name = name;\r\n this.number = number;\r\n }",
"private void wins(Player player){\n int win = 1;\n player.setWins(win);\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\teHp -= player.Attack();\n\t\t\t\t\tpHp -= player.Attack();\n\t\t\t\t\tif (pHp <= 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// losing message\n\t\t\t\t\t\tContext context = getApplicationContext();\n\t\t\t\t\t\tToast toast = Toast.makeText(context, \"Aww...You Lost\", Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tIntent resultIntent = new Intent();\n\t\t\t\t\t\tresultIntent.putExtra(\"data1\", player);\n\t\t\t\t\t\tsetResult(RESULT_OK, resultIntent);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse if (pHp > 0 && eHp < 0){\n\t\t\t\t\t\t\n\t\t\t\t\t\t// winning message\n\t\t\t\t\t\tplayer.setCandies(player.getCandies() + 500000000);\n\t\t\t\t\t\tToast toast = Toast.makeText(context, \"You have now surpassed yourself, young grasshopper take 500000000 candies!\", Toast.LENGTH_SHORT);\n\t\t\t\t\t\ttoast.show();\n\t\t\t\t\t\tIntent resultIntent = new Intent();\n\t\t\t\t\t\tresultIntent.putExtra(\"data1\", player);\n\t\t\t\t\t\tsetResult(RESULT_OK, resultIntent);\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// update Hp\n\t\t\t\t\tplayHp.setText(\"Player Hp: \" + String.valueOf(pHp));\n\t\t\t\t\tenemyHp.setText(\"Enemy Hp: \" + String.valueOf(eHp));\n\t\t\t}",
"public void setPowerup(Powerup p)\n\t{\n\t\titsPowerup = p;\n\t}",
"public Pokemon(int hp){\r\n this.hp = hp;\r\n }",
"@Override\n\tpublic void changeTurn() {\n\t\tcomputerCall();\n\t\tplayerTurn = 1;\n\t}",
"public void setPotion(int p) {\n setStat(p, potion);\n }",
"public void updateCurrentPlayer(String currentPlayer) {\n\t\titem.setText(1, currentPlayer);\n\t}",
"public void trocarPokemon(Integer pokIndex) {\n\n\t\tPokemon auxPok = pokemons[0]; // Primeiro Pokemons é sempre o ativo\n\t\tpokemons[0].isActive = false;\n\t\tpokemons[0] = pokemons[pokIndex];\n\t\tpokemons[pokIndex].isActive = true;\n\t\tpokemons[pokIndex] = auxPok;\n\t\t\n\t}",
"public void update(Player player) {\n\t\t\n\t}",
"boolean setPlayer(String player);",
"public void notifyPlayerVictory(Player p);",
"public void setPlayerNumber(int num) {\n playerNum = num;\n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();",
"public void attack(Player p){\n p.takeDamage(damage);\n }",
"@Override\n\tpublic void updatePlayer(Joueur joueur) {\n\t\t\n\t}",
"@Override\n public IPokemon replace(int option, IPokemon pokemon) {\n if (this.isValidOption(option)){\n return this.bench.set(option, pokemon);\n } else {\n return null;\n }\n }",
"void setPlayerTurn() throws RemoteException;",
"public void switchPlayer() {\n \tisWhitesTurn = !isWhitesTurn;\n }",
"@Override\n public void onClickPokemon(PokemonItem pokemon) {\n// Toast.makeText(PokemonBankActivity.this, \"clicked \"+ pokemon.id, Toast.LENGTH_LONG).show();\n //\n gotoPkmDetail(pokemon);\n }",
"public void update(String name, PlayerCharacter p)\r\n\t{\r\n\t\t//Tests if the name of the character is the same as the one you should kill in the quest\r\n\t\tif(name.equals(characterToKill.getName()))\r\n\t\t{\r\n\t\t\tsetNumberDone(getNumberDone() + 1);\r\n\t\t\t\r\n\t\t\tupdateStatus();\r\n\t\t}\r\n\t}",
"public void setOwner(Player player) {\n owner = player;\n }",
"@Override\n protected void sendUpdatedStateTo(GamePlayer p) {\n PigGameState copy = new PigGameState(pgs);\n p.sendInfo(copy);\n }",
"private void pause()\r\n {\r\n player.pause();\r\n }",
"public void updatePlayerPoints() {\n setText(Integer.toString(owner.getPlayerPoints()) + \" points\");\n }"
]
| [
"0.68501824",
"0.67501545",
"0.6649691",
"0.65842867",
"0.6498279",
"0.6404883",
"0.63881904",
"0.63694626",
"0.6365992",
"0.6291207",
"0.6289429",
"0.62711847",
"0.62367195",
"0.62366027",
"0.6233333",
"0.62225276",
"0.6205992",
"0.6204316",
"0.619615",
"0.61846393",
"0.6164886",
"0.61365604",
"0.61208993",
"0.6105318",
"0.6099617",
"0.6079265",
"0.6056774",
"0.60451776",
"0.60224",
"0.60109854",
"0.5990982",
"0.5988039",
"0.5977529",
"0.59606266",
"0.59555197",
"0.5928432",
"0.5900919",
"0.5887724",
"0.5886799",
"0.5882814",
"0.5878355",
"0.5869284",
"0.58643985",
"0.58513296",
"0.5847748",
"0.5842627",
"0.5841987",
"0.58394563",
"0.5811083",
"0.5807653",
"0.58056647",
"0.5802556",
"0.57987773",
"0.5791982",
"0.57906365",
"0.57904536",
"0.5787147",
"0.5785556",
"0.5781624",
"0.57703245",
"0.5769924",
"0.5764077",
"0.575229",
"0.57463706",
"0.5745118",
"0.5725729",
"0.5724856",
"0.5722021",
"0.57151794",
"0.57035965",
"0.5703074",
"0.5698367",
"0.5698351",
"0.56848955",
"0.5683904",
"0.5680239",
"0.5679763",
"0.56786585",
"0.5675244",
"0.56735533",
"0.5673526",
"0.56693196",
"0.5665003",
"0.56636614",
"0.5659313",
"0.5651961",
"0.56497",
"0.5641909",
"0.5641707",
"0.5634798",
"0.5631454",
"0.5628044",
"0.5624292",
"0.5623901",
"0.56188774",
"0.56152433",
"0.56018287",
"0.56000817",
"0.55966145",
"0.5596053"
]
| 0.7575174 | 0 |
Returns the current player Pokemon. | public int getCurrentPlayerPokemon()
{
return currentPlayerPokemon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Pokemon getPlayerPokemon()\r\n {\r\n return playerPokemon;\r\n }",
"public Pokemon getAlivePokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tif (p.getCurrentHP() > 0) {\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n if (activePokemonBuilder_ == null) {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n } else {\n return activePokemonBuilder_.getMessage();\n }\n }",
"POGOProtos.Rpc.PokemonProto getPokemon();",
"public String getPokemonName() {\n\t\treturn pokemon.getName();\n\t}",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }",
"@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }",
"public Player getPlayer() {\n\t\treturn p;\n\t}",
"public Pokemon getEnemyPokemon()\r\n {\r\n return enemyPokemon;\r\n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();",
"public String getPlayer() {\n return p;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n return getActivePokemon();\n }",
"public Player getPlayer() {\n return p;\n }",
"public Player getCurrentPlayer(){\n return this.currentPlayer;\n }",
"protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }",
"public ArrayList<Pokemon> getOwnedPokemon() {\r\n\t\treturn ownedPokemon;\r\n\t}",
"public Player getCurrentPlayer() {\n return currentPlayer;\n }",
"public Player getCurrentPlayer() {\n return currentPlayer;\n }",
"public int getCurrentPlayer() {\n return player;\n }",
"public Player currentPlayer() {\n\t\treturn (currentPlayer);\n\t}",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n if (activePokemonBuilder_ != null) {\n return activePokemonBuilder_.getMessageOrBuilder();\n } else {\n return activePokemon_ == null ?\n POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }\n }",
"public Player getPlayer() {\n\t\treturn this.player;\r\n\t}",
"public Player getPlayer() {\n\t\treturn this.player;\n\t}",
"public Player getPlayer(){\n\t\treturn this.player;\n\t}",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"public final Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\r\n return world.getPlayer();\r\n }",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public Player getCurrentPlayer()\n\t{\n\t\treturn current;\n\t}",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"public int getCurrentPlayer() {\n\t\treturn player;\n\t}",
"public String getCurrentPlayer() {\n return currentPlayer;\n }",
"public User getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}",
"public String getCurrentPlayer() {\n\t\treturn _currentPlayer;\n\t}",
"public Player getPlayer() {\n\t\t\treturn player;\n\t\t}",
"public Player getPlayer() {\n return humanPlayer;\n }",
"public Player getPlayer() {\n return player;\n }",
"public AbstractGameObject getPlayer() {\n return this.player;\n }",
"public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}",
"public String getPlayer() {\r\n return player;\r\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}",
"public String getCurrentPlayer() {\r\n return this.playerIds[this.currentPlayer];\r\n }",
"public Piece getCurrPlayer() {\n return this.currPlayer;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getCurrentPlayer(){\n String playerId = getUser().get_playerId();\n\n Player player = null;\n\n try {\n player = getCurrentGame().getPlayer(playerId);\n } catch(InvalidGameException e) {\n e.printStackTrace();\n System.out.println(\"This is the real Error\");\n }\n\n return player;\n }",
"public int getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public Player getPlayer() {\r\n return player;\r\n }",
"public void getStarterPokemon() {\r\n\t\taddPokemon(new Persian(\"Persian\", null, 30, 30, 30, 30));\r\n\t\tresetCaughtPokemon();\r\n\t}",
"public char getCurrentPlayer() {\n\t\treturn currentPlayer;\n\t}",
"Pokemon.PlayerAvatar getAvatar();",
"public char getPlayer() {\n return player;\n }",
"public int getCurrentPlayer(){\n return this.currentPlayer;\n }",
"public Player getCurrent(){\n\t\tPlayer p;\n\t\ttry{\n\t\t\tp = this.players.get(this.currElem);\n\t\t\t\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\tSystem.out.println(\"There isn't any players.\");\n\t\t\tp = null;\n\t\t}\n\t\t\t\n\t\treturn p; \n\t}",
"public Player getPlayer()\r\n {\r\n return player;\r\n }",
"public int getPlayer()\n {\n return this.player;\n }",
"public ServerPlayer getCurrentPlayer() {\r\n\t\treturn this.currentPlayer;\r\n\t}",
"public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}",
"public Player getPlayer();",
"public Player getPlayer();",
"public ArrayList<AbstractPokemon> getPokemon()\n {\n return caughtPokemon;\n }",
"POGOProtos.Rpc.PokemonProtoOrBuilder getPokemonOrBuilder();",
"public Player getPlayer() {\n return me;\n }",
"public Player getPlayer() {\n return (roomPlayer);\n }",
"public static Player getCurrPlayer(){\n\t\treturn players.get(curr);\n\t}",
"POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder();",
"public PlayerPiece getPlayerPiece(int playerNum) {\n return playerPieces[playerNum];\n }",
"String getPlayer();",
"Player getCurrentPlayer();",
"Player getCurrentPlayer();",
"public Player getP1() {\n return p1;\n }",
"public String getPokemonHP() {\n\t\treturn pokemon.getCurHP() + \"/\" + pokemon.getMaxHP();\n\t}",
"public Player getPlayer() { return player; }",
"public ServerPlayer whoWon() {\r\n\t\tif (winner(CROSS)) {\r\n\t\t\treturn getP1();\r\n\t\t} else if (winner(NOUGHT)) {\r\n\t\t\treturn getP2();\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public Player getActivePlayer() {\n if (getActiveColor() == Piece.COLOR.RED)\n return getRedPlayer();\n else\n return getWhitePlayer();\n }",
"public Sprite getPlayer() {\n\t\treturn player;\n\t}",
"Player getPlayer();",
"public PokemonStats getStats() {\n\t\treturn this.stats;\n\t}",
"protected Player getPlayer() { return player; }",
"@Override\n public Player getWinningPlayer() {\n return wonGame ? currentPlayer : null;\n }",
"public Player getPlayer(String username){\n return this.players.get(username);\n }",
"Player currentPlayer();",
"POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay();",
"public PlayerProfile getPlayer(P player){\n\n if(playerMap.containsKey(player)){\n //Player is safe to send\n return playerMap.get(player);\n } else {\n //Player isn't safe to send\n System.out.println(\"Tried to grab player \" + player.getName() + \"'s data, but it's not available\");\n return null;\n }\n }",
"public PlayerEntity getPlayer() {\n return player;\n }",
"public PlayerEntity getPlayer() {\n return player;\n }",
"public Strider getPlayer() {\n return player;\n }",
"public Pokemon.PlayerAvatar getAvatar() {\n return avatar_;\n }",
"public GamePiece getPlayerGamePiece(String playerName)\n\t{\n\t\treturn playerPieces.get(playerName);\n\t}"
]
| [
"0.83478695",
"0.7712315",
"0.7381976",
"0.7380506",
"0.73567814",
"0.7353675",
"0.71875226",
"0.71514577",
"0.7140544",
"0.7136758",
"0.7033879",
"0.70203024",
"0.69703835",
"0.69142824",
"0.6897648",
"0.6850171",
"0.68390846",
"0.68390846",
"0.6835606",
"0.682411",
"0.68180126",
"0.68078154",
"0.6807782",
"0.6780548",
"0.67717314",
"0.6758789",
"0.6754842",
"0.6754275",
"0.6754275",
"0.6754275",
"0.6754275",
"0.6754275",
"0.6754275",
"0.6754275",
"0.6753728",
"0.6752591",
"0.6751895",
"0.6745219",
"0.67450565",
"0.67378795",
"0.6734462",
"0.67203516",
"0.6718135",
"0.67131597",
"0.66733885",
"0.66688657",
"0.66670936",
"0.66543645",
"0.6653643",
"0.66490436",
"0.66439277",
"0.66249466",
"0.66249466",
"0.66249466",
"0.66249466",
"0.66249466",
"0.6602066",
"0.6602041",
"0.6601659",
"0.6595121",
"0.6594012",
"0.6589033",
"0.65847665",
"0.65692776",
"0.6556238",
"0.65346485",
"0.65319866",
"0.6524462",
"0.65151185",
"0.6489586",
"0.6489586",
"0.6489344",
"0.64844877",
"0.6457152",
"0.6447982",
"0.6432002",
"0.6430956",
"0.64280665",
"0.6407796",
"0.63946164",
"0.63946164",
"0.6375799",
"0.63675827",
"0.63630104",
"0.6362002",
"0.63501686",
"0.63370454",
"0.6325903",
"0.63232034",
"0.6313535",
"0.62893045",
"0.6288232",
"0.6287191",
"0.62833047",
"0.6282705",
"0.62813276",
"0.62813276",
"0.6281218",
"0.62742233",
"0.6269144"
]
| 0.81058323 | 1 |
Returns reference to the player Pokemon. | public Pokemon getPlayerPokemon()
{
return playerPokemon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Pokemon getAlivePokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tif (p.getCurrentHP() > 0) {\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"POGOProtos.Rpc.PokemonProto getPokemon();",
"public Pokemon getEnemyPokemon()\r\n {\r\n return enemyPokemon;\r\n }",
"public int getCurrentPlayerPokemon()\r\n {\r\n return currentPlayerPokemon;\r\n }",
"public String getPokemonName() {\n\t\treturn pokemon.getName();\n\t}",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"public ArrayList<Pokemon> getOwnedPokemon() {\r\n\t\treturn ownedPokemon;\r\n\t}",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();",
"public Player getPlayer() {\n return p;\n }",
"public Player getPlayer() {\n\t\treturn p;\n\t}",
"POGOProtos.Rpc.PokemonProtoOrBuilder getPokemonOrBuilder();",
"Pokemon.PlayerAvatar getAvatar();",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n if (activePokemonBuilder_ == null) {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n } else {\n return activePokemonBuilder_.getMessage();\n }\n }",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }",
"public String getPlayer() {\n return p;\n }",
"public ArrayList<AbstractPokemon> getPokemon()\n {\n return caughtPokemon;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n return getActivePokemon();\n }",
"long getPokemonId();",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public AbstractGameObject getPlayer() {\n return this.player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer()\r\n {\r\n return player;\r\n }",
"public Player getPlayer(){\n\t\treturn this.player;\n\t}",
"public Player getPlayer() {\r\n return player;\r\n }",
"public Player getPlayer() {\n return humanPlayer;\n }",
"public Player getPlayer();",
"public Player getPlayer();",
"public Player getPlayer() { return player; }",
"POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay();",
"public Player getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public Player getPlayer() {\n\t\treturn this.player;\r\n\t}",
"public Player getPlayer() {\n\t\treturn this.player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getPlayer() {\n\t\treturn player;\n\t}",
"public Player getP1() {\n return p1;\n }",
"public Player getPlayer() {\n return me;\n }",
"public final Player getPlayer() {\n return player;\n }",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n if (activePokemonBuilder_ != null) {\n return activePokemonBuilder_.getMessageOrBuilder();\n } else {\n return activePokemon_ == null ?\n POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }\n }",
"public Pokedex getPokedex()\n\t{\n\t\treturn m_pokedex;\n\t}",
"public Player getPlayer()\r\n\t{\r\n\t\treturn mPlayer;\r\n\t}",
"POGOProtos.Rpc.HoloPokemonId getPokedexId();",
"POGOProtos.Rpc.HoloPokemonId getPokedexId();",
"protected Player getPlayer() {\n return getGame().getPlayers().get(0);\n }",
"public Pokemon[] getParty()\n\t{\n\t\treturn m_pokemon;\n\t}",
"public Player getPlayer() { return player;}",
"Player getPlayer();",
"protected Player getPlayer() { return player; }",
"public Player getPlayer() {\n return (roomPlayer);\n }",
"public Player getPlayer() {\n\t\t\treturn player;\n\t\t}",
"public static Player getHero() {\n return hero;\n }",
"public ServerPlayer whoWon() {\r\n\t\tif (winner(CROSS)) {\r\n\t\t\treturn getP1();\r\n\t\t} else if (winner(NOUGHT)) {\r\n\t\t\treturn getP2();\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder();",
"public PlayerID getPlayer(){\n\t\treturn this.player;\n\t}",
"@java.lang.Override\n public POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay() {\n return pokemonDisplay_ == null ? POGOProtos.Rpc.PokemonDisplayProto.getDefaultInstance() : pokemonDisplay_;\n }",
"public Player getPlayer() {\r\n return world.getPlayer();\r\n }",
"public String getPlayer() {\r\n return player;\r\n }",
"public int getPlayer()\n {\n return this.player;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.HoloPokemonId getPokedexId() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonId result = POGOProtos.Rpc.HoloPokemonId.valueOf(pokedexId_);\n return result == null ? POGOProtos.Rpc.HoloPokemonId.UNRECOGNIZED : result;\n }",
"public PlayerPiece getPlayerPiece(int playerNum) {\n return playerPieces[playerNum];\n }",
"public Player getPlayer(){\r\n return player;\r\n }",
"public int getPlayer() {\r\n\t\treturn myPlayer;\r\n\t}",
"@java.lang.Override public POGOProtos.Rpc.HoloPokemonId getPokedexId() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonId result = POGOProtos.Rpc.HoloPokemonId.valueOf(pokedexId_);\n return result == null ? POGOProtos.Rpc.HoloPokemonId.UNRECOGNIZED : result;\n }",
"public boolean getWildPokemon()\r\n {\r\n return wildPokemon;\r\n }",
"public Player getPlayer1(){\n return jugador1;\n }",
"public EpicPlayer getEpicPlayer(){ return epicPlayer; }",
"public Pokemon.PlayerAvatar getAvatar() {\n return avatar_;\n }",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"public int getPlayer() {\r\n\t\treturn player;\r\n\t}",
"public void getStarterPokemon() {\r\n\t\taddPokemon(new Persian(\"Persian\", null, 30, 30, 30, 30));\r\n\t\tresetCaughtPokemon();\r\n\t}",
"public PlayerEntity getPlayer() {\n return player;\n }",
"public PlayerEntity getPlayer() {\n return player;\n }",
"@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }",
"public ArrayList<Pokemon> getAllPokemon(){\n\t\treturn caughtPokemon; \n\t}",
"public Player getP2() {\n return p2;\n }",
"public Piece getCurrPlayer() {\n return this.currPlayer;\n }",
"public GamePiece getPlayerGamePiece(String playerName)\n\t{\n\t\treturn playerPieces.get(playerName);\n\t}",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"String getPlayer();",
"public String getPokemonHP() {\n\t\treturn pokemon.getCurHP() + \"/\" + pokemon.getMaxHP();\n\t}",
"public char getPlayer() {\n return player;\n }",
"public Player getCurrentPlayer(){\n return this.currentPlayer;\n }",
"public PokemonStats getStats() {\n\t\treturn this.stats;\n\t}",
"POGOProtos.Rpc.PokemonDisplayProtoOrBuilder getPokemonDisplayOrBuilder();",
"public Strider getPlayer() {\n return player;\n }",
"public PlayerData getPlayerData() {\n return player;\n }",
"public Player getPlayer(String username){\n return this.players.get(username);\n }",
"public Pawn getPawn() {\n return (Pawn) this.piece;\n }",
"public Player getHumanPlayer() {\n return humanPlayer;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.Item getPokeball() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.Item result = POGOProtos.Rpc.Item.valueOf(pokeball_);\n return result == null ? POGOProtos.Rpc.Item.UNRECOGNIZED : result;\n }"
]
| [
"0.7636486",
"0.75805223",
"0.7429093",
"0.7395827",
"0.71194667",
"0.71093565",
"0.71026725",
"0.7016045",
"0.69585705",
"0.6916428",
"0.68542916",
"0.6790417",
"0.6769662",
"0.67660373",
"0.67477363",
"0.6702579",
"0.6604544",
"0.65723044",
"0.655377",
"0.65291756",
"0.65247303",
"0.6483522",
"0.6478717",
"0.6478717",
"0.6478717",
"0.6478717",
"0.6478717",
"0.6464294",
"0.64572954",
"0.64552784",
"0.6451512",
"0.6447178",
"0.6447178",
"0.6376377",
"0.63681567",
"0.6366599",
"0.63556165",
"0.6340794",
"0.6340439",
"0.6340439",
"0.6340439",
"0.6340439",
"0.6340439",
"0.6340439",
"0.6340439",
"0.63394094",
"0.63318175",
"0.6324405",
"0.63119197",
"0.631049",
"0.63059133",
"0.6299916",
"0.6299916",
"0.6291952",
"0.62908256",
"0.6285204",
"0.62658095",
"0.6260089",
"0.6250278",
"0.6241121",
"0.6238735",
"0.62316024",
"0.620595",
"0.6204379",
"0.62031436",
"0.6191689",
"0.619133",
"0.6189021",
"0.6188467",
"0.615653",
"0.61445457",
"0.61360013",
"0.6125574",
"0.61120296",
"0.60867727",
"0.6079103",
"0.6077993",
"0.6067905",
"0.6060811",
"0.6043021",
"0.60354745",
"0.60354745",
"0.6027476",
"0.60109854",
"0.60091865",
"0.60078853",
"0.6007517",
"0.60019946",
"0.59997886",
"0.5987913",
"0.5985126",
"0.5982955",
"0.5976472",
"0.59667677",
"0.5965158",
"0.59620863",
"0.59619415",
"0.59551793",
"0.59535384",
"0.5952966"
]
| 0.8465837 | 0 |
Returns reference to the enemy Pokemon. | public Pokemon getEnemyPokemon()
{
return enemyPokemon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Pokemon getAlivePokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tif (p.getCurrentHP() > 0) {\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Enemy getEnemy(){\n return enemy;\n }",
"public Pokemon getPlayerPokemon()\r\n {\r\n return playerPokemon;\r\n }",
"@Override\n public Enemy getEnemyPlayer() {\n return batMan.getEnemyPlayer();\n }",
"public Enemy getEnemy(int whichEnemy);",
"public EnemyManager getEnemyManager() {\n return map.getEnemyManager();\n }",
"public Enemy summon() {\n\t\treturn null;\n\t}",
"public PkmnInfoBox getEnemyInfoBox()\r\n {\r\n return enemyPkmnInfoBox;\r\n }",
"public int getCurrentPlayerPokemon()\r\n {\r\n return currentPlayerPokemon;\r\n }",
"public PlayerState getEnemy()\n {\n if(this.turnOfPlayer == playerBlack)\n {\n return playerWhite;\n }\n return playerBlack;\n }",
"public ArrayList<Enemy> getEnemies()\r\n\t{\r\n\t\treturn enemy;\r\n\t}",
"public Enemy getNextEnemy() {\n return findNextEnemy(0);\n }",
"public Pokedex getPokedex()\n\t{\n\t\treturn m_pokedex;\n\t}",
"@Override\r\n\t/**\r\n\t * Each enemy has a unique health and scales as the game goes along\r\n\t */\r\n\tpublic int enemyHealth() {\n\t\treturn enemyHealth;\r\n\t}",
"public ArrayList<Pokemon> getOwnedPokemon() {\r\n\t\treturn ownedPokemon;\r\n\t}",
"public Pokemon[] getParty()\n\t{\n\t\treturn m_pokemon;\n\t}",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"Pokemon.PlayerAvatar getAvatar();",
"public MapLocation getEnemySwarmTarget() {\n\t\tdouble a = Math.sqrt(vecEnemyX * vecEnemyX + vecEnemyY * vecEnemyY) + .001;\n\n\t\treturn new MapLocation((int) (vecEnemyX * 7 / a) + br.curLoc.x,\n\t\t\t\t(int) (vecEnemyY * 7 / a) + br.curLoc.y);\n\n\t}",
"public Battleable getOpponent()\n\t{\n\t\t/* TODO: Inherited function from Character Interface, requires implementation! */\n\t\treturn null;\n\t}",
"public EnemyRoom getEnemyRoom(){\n return (EnemyRoom) room;\n }",
"@Override\r\n\tpublic EnemySprites getEnemy(int level) {\r\n \tint enemyCount = 3;\r\n \tRandom rand = new Random();\r\n \tint enemyNum = rand.nextInt(enemyCount);\r\n \tswitch(enemyNum){\r\n \tcase 0:\r\n \t\t//return new goblin(level);\r\n \t\tbreak;\r\n \tcase 1:\r\n \t\t//return new kobold(level);\r\n \t\tbreak;\r\n \tcase 2:\r\n \t\t//return new Bandit(level);\r\n \t\tbreak;\r\n \tdefault:\r\n \t\treturn null; \t\t\r\n \t}\r\n \treturn null;\r\n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();",
"public Enemy getEnemy(String name) {\n\n // For all enemies\n for (Entity curEnt : getEntityList()) {\n\n // If current enemy name matches given name\n if (curEnt.getName().equalsIgnoreCase(name)) {\n\n // Return enemy\n return (Enemy) curEnt;\n }\n }\n\n // If no enemy was found, return null\n return null;\n }",
"void useInBattle(PlayerCharacter player, Opponent enemy) {\n\t}",
"public int getDmg(){\r\n return enemyDmg;\r\n }",
"POGOProtos.Rpc.PokemonProto getPokemon();",
"public ArrayList<AbstractPokemon> getPokemon()\n {\n return caughtPokemon;\n }",
"public String getPokemonName() {\n\t\treturn pokemon.getName();\n\t}",
"public static Player getHero() {\n return hero;\n }",
"public Enemy getEnemy(String enemyType)\n {\n if(enemyType == null)\n {\n return null;\n }\n if(enemyType.equalsIgnoreCase(\"SquareEnemy\"))\n {\n return new SquareEnemy();\n }\n else if(enemyType.equalsIgnoreCase(\"CircleEnemy\"))\n {\n return new CircleEnemy();\n }\n else if(enemyType.equalsIgnoreCase(\"TriangleEnemy\"))\n {\n return new TriangleEnemy();\n }\n return null;\n }",
"public boolean getWildPokemon()\r\n {\r\n return wildPokemon;\r\n }",
"CharacterEntity getOpponent() {\n return opponent;\n }",
"public boolean getAttack(IEntity enemyUnit){\n return tempUnit.getAttack(enemyUnit);\n }",
"public Character getOpponent() {\n Character result = null;\n if (this.enemies.getAdversaries().size() > 0) {\n Collections.shuffle(this.enemies.getAdversaries());\n result = this.enemies.getAdversaries().get(0);\n this.enemies.getAdversaries().remove(result);\n }\n return result;\n }",
"public EpicPlayer getEpicPlayer(){ return epicPlayer; }",
"public abstract Player getOpponent();",
"public static void enemy(){\n\t\tenemy = null;\n\t\twhile(enemy == null){\n\t\t spawnEnemy();\n\t\t}\n\t}",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n if (activePokemonBuilder_ == null) {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n } else {\n return activePokemonBuilder_.getMessage();\n }\n }",
"public Sprite getBattleSprite()\n {\n return battleSprite;\n }",
"public Hero getHero()\n {\n return theHero;\n }",
"long getPokemonId();",
"public static Image attackPoint()\n\t{\n\t\treturn attackPoint;\n\t}",
"public Player getOpponent() {\n\t\treturn opponent;\n\t}",
"public Hero getHero();",
"public Element getOneEnemy(String name){\r\n\t\t//follow the commentarys of the player group, getOneCharacter, just doesn´t have its own where\r\n\t\treturn loadFile(getFile(getWanted(getFile(getWanted(RPGSystem.getRPGSystem().getWhere(), \"Enemys\")), name)));\r\n\t}",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }",
"@Override\n\tpublic int attack( ){\n\t\treturn enemy.attack();\n\t}",
"public int attackPokemon(Pokemon pokemon1, Pokemon pokemon2, Player player);",
"protected ResourceLocation getEntityTexture(EntityMegaZombie p_110775_1_)\n {\n return zombieTextures;\n }",
"@Override\n public Sprite getHurtSprite() {\n return Assets.getInstance().getSprite(\"entity/zombie_blood0.png\");\n }",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"public NPC getNPC(){\n return CitizensAPI.getNPCRegistry().getById(id);\n }",
"public Enemy deathSummon() {\n\t\treturn null;\n\t}",
"@java.lang.Override\n public POGOProtos.Rpc.HoloPokemonId getPokedexId() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonId result = POGOProtos.Rpc.HoloPokemonId.valueOf(pokedexId_);\n return result == null ? POGOProtos.Rpc.HoloPokemonId.UNRECOGNIZED : result;\n }",
"Pokemon.RequestEnvelop.Unknown6.Unknown2 getUnknown2();",
"Piece winner() {\r\n return _winner;\r\n }",
"public HashMap<Integer, Element> getEnemies() {\n\t\treturn enemies;\n\t}",
"public LivingEntity getLivingEntity() {\n return eliteMob;\n }",
"Piece getWinner();",
"public Player getTarget() {\n return target;\n }",
"@java.lang.Override public POGOProtos.Rpc.HoloPokemonId getPokedexId() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonId result = POGOProtos.Rpc.HoloPokemonId.valueOf(pokedexId_);\n return result == null ? POGOProtos.Rpc.HoloPokemonId.UNRECOGNIZED : result;\n }",
"public void battleEnemyAttack() {\n if(battleEnemy != null){ // If all enemies have attacked, they cannot attack anymore for this round\n\n MovingEntity target = battleEnemy.getAttackPreference(targetAllies);\n if(target == null){\n target = targetAlly;\n }\n\n battleEnemy.attack(target, targetEnemies, targetAllies);\n //System.out.println(battleEnemy.getID() + \" is attacking \" + target.getID() + \" remaining hp: \" + target.getCurrHP());\n if (updateTarget(target) == false) {\n // if target still alive, check if its still friendly incase of zombify\n targetAlly = checkSideSwap(targetAlly, false, battleEnemies, targetEnemies, battleAllies, targetAllies);\n }\n\n battleEnemy = nextAttacker(battleEnemy, battleEnemies);\n\n }\n }",
"int attack(Unit unit, Unit enemy);",
"public PokemonStats getStats() {\n\t\treturn this.stats;\n\t}",
"public Pokemon(int hp){\r\n this.hp = hp;\r\n }",
"public List<Enemy> getEnemies();",
"@Override\n\t\t\tpublic void attack(Base enemy) {\n\t\t\t}",
"Pokemon.ResponseEnvelop.Unknown6.Unknown2 getUnknown2();",
"POGOProtos.Rpc.HoloPokemonId getPokedexId();",
"POGOProtos.Rpc.HoloPokemonId getPokedexId();",
"public Pawn getPawn() {\n return (Pawn) this.piece;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n return getActivePokemon();\n }",
"public void healPokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tp.resetCurrentHP();\r\n\t\t}\r\n\t}",
"protected Entity findPlayerToAttack()\n {\n EntityPlayer var1 = this.worldObj.getClosestVulnerablePlayerToEntity(this, 16.0D);\n return var1 != null && this.canEntityBeSeen(var1) ? var1 : null;\n }",
"AbilityTarget getAbilityTarget();",
"public Attack getBestOpponentAttack()\n\t{\n\t\treturn bestOpponentAttack;\n\t}",
"public int takeDamage(Enemy enemy)\n {\n int damage = Items.determineDamage(\n enemy.getWeapon(),\n this.getArmor(),\n enemy.fight()\n );\n this.setHealth(this.getHealth() - damage);\n return damage;\n }",
"public Player getP2() {\n return p2;\n }",
"public String getPokemonHP() {\n\t\treturn pokemon.getCurHP() + \"/\" + pokemon.getMaxHP();\n\t}",
"public String attack() {\r\n\t\t\tthis.getCurrentEnemy().setHealth(this.getCurrentEnemy().getHealth()-this.getPlayer().getWeapon().getAttack());\r\n\t\t\tif(this.getCurrentEnemy().isDefeated()) {\r\n\t\t\t\tthis.setInBattle(false);\r\n\t\t\t\t\r\n\t\t\t\tthis.handleQuestrelatedEnemy(this.getCurrentEnemy());\r\n\t\t\t\t\r\n\t\t\t\tif(this.getCurrentEnemy().getLoot() != null) {\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addItem(this.getCurrentEnemy().getLoot());\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tthis.getPlayer().gainXp(this.getCurrentEnemy().getXpYield());\r\n\t\t\t\tthis.getPlayer().getCurrentLocation().removeNpc(this.getCurrentEnemy().getName());\r\n\t\t\t\tif(this.getCurrentEnemy().getClass().getName().equals(\"game.EnemyGuardian\")) {\r\n\t\t\t\t\t// adds paths between current location and location in the guardian, path names are specified in the guardian construction\r\n\t\t\t\t\tthis.getPlayer().getCurrentLocation().addPaths(this.getPlayer().getCurrentLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathTo(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t((EnemyGuardian)this.getCurrentEnemy()).getGuardedLocation(), ((EnemyGuardian)this.getCurrentEnemy()).getPathFrom());\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \". \\n\"\r\n\t\t\t\t\t\t\t+ ((EnemyGuardian)this.getCurrentEnemy()).getRevelationMessage() + \"\\n\";\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\treturn \"You defeated \" + this.getCurrentEnemy().getName() + \".\";\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\tthis.triggerEnemyAttack();\r\n\t\t\t\t\tif(this.getPlayer().getHealth() <= 0) {\r\n\r\n\t\t\t\t\t\tthis.gameOver();\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n You DIED.\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\treturn \"You attacked \" + this.getCurrentEnemy().getName() + \" for \" + this.getPlayer().getWeapon().getAttack() + \" damage. \\n\"\r\n\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().getName() + \" attacked you for \" + this.getCurrentEnemy().getAttack() + \" damage.\\n\"\r\n\t\t\t\t\t\t\t\t\t\t+ this.getCurrentEnemy().printHealth();\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}",
"public Hero getHero() {\n\t\treturn hero;\n\t}",
"public PlayerPiece getPlayerPiece(int playerNum) {\n return playerPieces[playerNum];\n }",
"Pokemon.ResponseEnvelop.Unknown7 getUnknown7();",
"public L2Character getOverhitAttacker()\n\t{\n\t\treturn overhitAttacker;\n\t}",
"Pokemon.ResponseEnvelop.Unknown6 getUnknown6();",
"public ServerPlayer whoWon() {\r\n\t\tif (winner(CROSS)) {\r\n\t\t\treturn getP1();\r\n\t\t} else if (winner(NOUGHT)) {\r\n\t\t\treturn getP2();\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public Player getPlayer() {\n return p;\n }",
"public Pawn getPawn2() {\n return pawn2;\n }",
"public int performPokeAction() {\n\t\tAction action = pokemon.chooseAction();\n\t\tif (action == Action.ATTACK) {\n\t\t\ttrainer.takeDamage(pokemon.performAttack());\n\t\t}\n\t\treturn action.getValue();\n\t\t//return Action.ATTACK.getValue();\n\t}",
"public HeroManager getHeroManager() {\n return map.getHeroManager();\n }",
"Pokemon.RequestEnvelop.Unknown6 getUnknown6();",
"public Image getPokeImg(int index) {\n\t\treturn pokemonImgs[index];\n\t}",
"public void setEnemyPkmnNull()\r\n {\r\n enemyPokemon = null;\r\n }",
"public void move2(Pokemon enemy){\n boolean crit = false;\n boolean superEffective = false;\n boolean reduced = false;\n boolean moveHit = true;\n\n int randCrit = (int)(22 * Math.random()+1);\n\n //CHANGE ATTACK TO FALSE IF MOVE DOES NO DAMAGE<<<<<<<<<<<<<\n boolean attack = true;\n //CHANGE TYPE TO TYPE OF MOVE POWER AND ACCURACY<<<<<<<<<<<<<\n String type = \"Bug\";\n int power = 80;\n int accuracy = 100;\n\n //DO NOT CHANGE BELOW THIS\n int damage = ((CONSTANT * power * ( getAtt() / enemy.getDef() )) /50);\n if(randCrit == CONSTANT){\n damage = damage * 2;\n crit = true;\n }\n if(checkSE(type,enemy.getType())){\n damage = damage * 2;\n superEffective = true;\n }\n if(checkNVE(type, enemy.getType())){\n damage = damage / 2;\n reduced = true;\n }\n if(attack && hit(accuracy)){\n enemy.lowerHp(damage);\n }\n else{\n if(hit(accuracy)){\n //DO STATUS EFFECT STUFF HERE (ill figure out later)\n }\n }\n lowerM2PP();\n }",
"public Pokemon.PlayerAvatar getAvatar() {\n return avatar_;\n }",
"public WeaponDeck getWeaponSpawnpoint() {\n return weaponSpawnpoint;\n }",
"@Override\n public Hero getOwner() {\n return owner;\n }",
"public Player getWinner();"
]
| [
"0.7246401",
"0.70771784",
"0.6975623",
"0.6886952",
"0.6749369",
"0.6271097",
"0.6242902",
"0.6233382",
"0.6180347",
"0.61481124",
"0.61170465",
"0.6106152",
"0.6105061",
"0.60549074",
"0.60458946",
"0.6028242",
"0.59965247",
"0.59964395",
"0.5968823",
"0.5960694",
"0.59602815",
"0.59338087",
"0.5915352",
"0.59148544",
"0.59029937",
"0.5896626",
"0.5864048",
"0.5863696",
"0.5851801",
"0.58239335",
"0.58237606",
"0.57901686",
"0.5784458",
"0.5784153",
"0.5773044",
"0.5758325",
"0.57332915",
"0.5733186",
"0.5723149",
"0.5719979",
"0.57066876",
"0.5701937",
"0.5695091",
"0.568297",
"0.5675144",
"0.56739193",
"0.56693184",
"0.5662835",
"0.5653888",
"0.5643998",
"0.5641644",
"0.5641334",
"0.56197536",
"0.5618258",
"0.5617867",
"0.5603159",
"0.5581138",
"0.55719954",
"0.55471283",
"0.5539097",
"0.55350506",
"0.5533111",
"0.553023",
"0.5520041",
"0.550298",
"0.5501263",
"0.5494596",
"0.54928744",
"0.5488876",
"0.5473138",
"0.5470434",
"0.5470434",
"0.54591066",
"0.54471105",
"0.54297954",
"0.5416686",
"0.54163283",
"0.54094124",
"0.5400238",
"0.53992695",
"0.5392366",
"0.5388155",
"0.5386806",
"0.5384048",
"0.5380039",
"0.5373813",
"0.5368315",
"0.5353959",
"0.53525853",
"0.53441685",
"0.5342481",
"0.533899",
"0.5322198",
"0.5318633",
"0.53164047",
"0.53121465",
"0.53102934",
"0.5305944",
"0.53034526",
"0.5298876"
]
| 0.8490559 | 0 |
Returns reference to the player Pokemon info box. | public PkmnInfoBox getPlayerInfoBox()
{
return playerPkmnInfoBox;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Pokemon getPlayerPokemon()\r\n {\r\n return playerPokemon;\r\n }",
"POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay();",
"POGOProtos.Rpc.PokemonDisplayProtoOrBuilder getPokemonDisplayOrBuilder();",
"POGOProtos.Rpc.PokemonProto getPokemon();",
"public String getPokemonName() {\n\t\treturn pokemon.getName();\n\t}",
"public PkmnInfoBox getEnemyInfoBox()\r\n {\r\n return enemyPkmnInfoBox;\r\n }",
"public int getCurrentPlayerPokemon()\r\n {\r\n return currentPlayerPokemon;\r\n }",
"@java.lang.Override\n public POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay() {\n return pokemonDisplay_ == null ? POGOProtos.Rpc.PokemonDisplayProto.getDefaultInstance() : pokemonDisplay_;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.PokemonDisplayProtoOrBuilder getPokemonDisplayOrBuilder() {\n return getPokemonDisplay();\n }",
"public POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay() {\n if (pokemonDisplayBuilder_ == null) {\n return pokemonDisplay_ == null ? POGOProtos.Rpc.PokemonDisplayProto.getDefaultInstance() : pokemonDisplay_;\n } else {\n return pokemonDisplayBuilder_.getMessage();\n }\n }",
"public Pokemon getAlivePokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tif (p.getCurrentHP() > 0) {\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"Pokemon.PlayerAvatar getAvatar();",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"public ArrayList<Pokemon> getOwnedPokemon() {\r\n\t\treturn ownedPokemon;\r\n\t}",
"POGOProtos.Rpc.PokemonProtoOrBuilder getPokemonOrBuilder();",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n return getActivePokemon();\n }",
"public Pokemon getEnemyPokemon()\r\n {\r\n return enemyPokemon;\r\n }",
"public POGOProtos.Rpc.PokemonDisplayProto.Builder getPokemonDisplayBuilder() {\n \n onChanged();\n return getPokemonDisplayFieldBuilder().getBuilder();\n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n if (activePokemonBuilder_ == null) {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n } else {\n return activePokemonBuilder_.getMessage();\n }\n }",
"public Pokemon retrievePokemon(String pokemonName, int boxNum) {\r\n\t\tif(pokemonBoxes.get(boxNum).isInTheBox(pokemonName)) {\r\n\t\t\treturn pokemonBoxes.get(boxNum).getPokemon(pokemonName);\r\n\t\t}else {\r\n\t\t\tSystem.out.println(pokemonName + \" is not inside box \" + boxNum);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n if (activePokemonBuilder_ != null) {\n return activePokemonBuilder_.getMessageOrBuilder();\n } else {\n return activePokemon_ == null ?\n POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }\n }",
"public String getPlayer() {\n return p;\n }",
"public Box pickUp() {\n //System.out.println(\"Nincs mit felvenni.\");\n return null;\n }",
"public void playerDetailedInfo(Player p){\n System.out.println(\"Indicator: \" + indicator + \"\\nJoker: \"+joker);\n System.out.println(\"Winner: Player\" + p.getPlayerNo());\n System.out.println(\"Tile size: \" + p.getTiles().size());\n System.out.println(\"Joker count: \" + p.getJokerCount());\n System.out.println(\"Double score: \" + p.getDoubleCount()*2);\n System.out.println(\"All tiles in ascending order:\\t\" + p.getTiles());\n System.out.println(\"Clustered according to number: \\t\" + p.getNoClus());\n System.out.println(\"Total number clustering score: \" + p.totalNoClustering());\n System.out.println(\"Clustered according to color: \\t\" + p.getColClus());\n System.out.println(\"Total color clustering score: \" + p.totalColCluster());\n System.out.println(\"Final score of Player\"+p.getPlayerNo()+\": \" + p.getPlayerScore());\n }",
"@Override\n\tpublic GameInfo getGameInfo() {\n\t\treturn gameInfo;\n\t}",
"public String seenPokemonMenu() {\n String rv = \"\";\n Iterator<PokemonSpecies> it = this.pokedex.iterator();\n while (it.hasNext()) {\n PokemonSpecies currentSpecies = it.next();\n rv += String.format(\"%s\\n\", currentSpecies.getSpeciesName());\n }\n return rv;\n }",
"public abstract void info(Player p);",
"public POGOProtos.Rpc.PokemonDisplayProtoOrBuilder getPokemonDisplayOrBuilder() {\n if (pokemonDisplayBuilder_ != null) {\n return pokemonDisplayBuilder_.getMessageOrBuilder();\n } else {\n return pokemonDisplay_ == null ?\n POGOProtos.Rpc.PokemonDisplayProto.getDefaultInstance() : pokemonDisplay_;\n }\n }",
"public JLabel getPlayer1() {\n return player1;\n }",
"long getPokemonId();",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"public JPanel getInfo() {\n return info;\n }",
"public BoxItem.Info getItem() {\n return this.item;\n }",
"public ArrayList<AbstractPokemon> getPokemon()\n {\n return caughtPokemon;\n }",
"public TextInfoBox getTextInfoBox()\r\n {\r\n return textInfoBox;\r\n }",
"POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder();",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto.Builder getActivePokemonBuilder() {\n \n onChanged();\n return getActivePokemonFieldBuilder().getBuilder();\n }",
"public Player getPlayer() {\n return p;\n }",
"public JTextField getPlayerID() {\n return PlayerID;\n }",
"public Object getInfo() {\n return info;\n }",
"boolean hasPokemonDisplay();",
"void detallePokemon(){\n System.out.println(numero+\" - \"+nombre);\n }",
"public InfoView getInfoView() {\r\n return infoPanel;\r\n }",
"public final String getInfo() {\r\n\t\treturn name;\r\n\t}",
"public String getTinyImageName() {\n return this.getPokemonInfo().getTinyImageName();\n }",
"public String getAboutBoxText();",
"public Player getPlayer() {\n\t\treturn p;\n\t}",
"public Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}",
"@Override\n public String getCurrentPlayer() {\n return godPower.getCurrentPlayer();\n }",
"public PlayerData getPlayerData() {\n return player;\n }",
"public void removePlayerPkmnInfoBox()\r\n {\r\n removeObject(playerPkmnInfoBox);\r\n }",
"public String getPlayer() {\r\n return player;\r\n }",
"public String getName(){\r\n\t\treturn playerName;\r\n\t}",
"private void setInfoPlayers() {\n\n\t\t//PLAYER 1\n\t\tlblPlayer1name.setText(players.get(0).getName());\n\t\tlblCashP1.setText(\"\" + players.get(0).getMoney());\n\t\tlblBuildP1.setText(\"\" + players.get(0).getNumberBuildings());\n\t\tlblPropP1.setText(\"\" + players.get(0).getOwnproperties().size());\n\t\tlblPosP1.setText(\"\"+ players.get(0).getPosition());\n\n\t\t//PLAYER 2\n\t\tlblPlayer2name.setText(players.get(1).getName());\n\t\tlblCashP2.setText(\"\" + players.get(1).getMoney());\n\t\tlblBuildP2.setText(\"\" + players.get(1).getNumberBuildings());\n\t\tlblPropP2.setText(\"\" + players.get(1).getOwnproperties().size());\n\t\tlblPosP2.setText(\"\"+ players.get(1).getPosition());\n\t\t\n\t\tif(players.size() > 2){\n\t\t\t//PLAYER 3\n\t\t\tlblPlayerName3.setText(players.get(2).getName());\n\t\t\tlblCashP3.setText(\"\" + players.get(2).getMoney());\n\t\t\tlblBuildP3.setText(\"\" + players.get(2).getNumberBuildings());\n\t\t\tlblPropP3.setText(\"\" + players.get(2).getOwnproperties().size());\n\t\t\tlblPosP3.setText(\"\"+ players.get(2).getPosition());\n\n\t\t\tif(players.size() > 3){\n\t\t\t\t//PLAYER 4\n\t\t\t\tlblPlayerName4.setText(players.get(3).getName());\n\t\t\t\tlblCashP4.setText(\"\" + players.get(3).getMoney());\n\t\t\t\tlblBuildP4.setText(\"\" + players.get(3).getNumberBuildings());\n\t\t\t\tlblPropP4.setText(\"\" + players.get(3).getOwnproperties().size());\n\t\t\t\tlblPosP4.setText(\"\"+ players.get(3).getPosition());\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void addPlayerData() {\n\t\tStackPane root = (StackPane) GameLogic.getRoot();\n\t\t//VBox info = new VBox();\n\t\t//info.setAlignment(Pos.TOP_LEFT);\n\t\tLabel playerInfo = new Label();\n\t\tplayerInfo.setBackground(new Background(new BackgroundFill(Color.LIGHTGOLDENRODYELLOW, CornerRadii.EMPTY, Insets.EMPTY)));\n\t\t//playerInfo.setGraphic(new ImageView(BackgroundImageHolder.textBackground));\n\t\tplayerInfo.setText(\" Player :\"+GameSaved.getPlayer_name()+\"\\n Level : \"+GameSaved.getPlayer_level()+\"\\n Experience point : \"+GameSaved.getExperiencePoint()+\"/\"+GameSaved.getExperiencePoint_Max()+\" \");\n\t\t//playerInfo.setAlignment(Pos.TOP_LEFT);\n\t\t//info.getChildren().add(playerInfo);\n\t\troot.getChildren().add(playerInfo);\n\t\tStackPane.setAlignment(playerInfo,Pos.TOP_LEFT);\n\t}",
"public PluginInfo getInfo() {\r\n return new devplugin.PluginInfo(TvBrowserDataService.class,\r\n mLocalizer.msg(\"name\",\"EPGfree data\"),\r\n mLocalizer.msg(\"description\", \"Data that is available for free with mostly German, Swiss, Austrian and Danish channels.\"),\r\n \"Til Schneider, www.murfman.de\",\r\n mLocalizer.msg(\"license\",\"Terms of Use:\\n=============\\nAll TV/Radio listings provided by TV-Browser (http://www.tvbrowser.org) are protected by copyright laws and may only be used within TV-Browser or other name like applications authorizied by the manufacturer of TV-Browser (http://www.tvbrowser.org) for information about the upcoming program of the available channels.\\nEvery other manner of using, reproducing or redistributing of the TV/Radio listings is illegal and may be prosecuted on civil or criminal law.\\n\\nOn downloading the TV/Radio listings you declare your agreement to these terms.\\n\\nIf you have any questions concerning these terms please contact [email protected]\"));\r\n }",
"protected BattlePokemonState pokemonState(){\n return new BattlePokemonState(\n this.mFightButton,\n this.mPokemonButton,\n this.mBagButton,\n this.mRunButton,\n this.mActionButton,\n this.mOptionList,\n this.mBattle,\n this.mMessage\n );\n }",
"public void getStarterPokemon() {\r\n\t\taddPokemon(new Persian(\"Persian\", null, 30, 30, 30, 30));\r\n\t\tresetCaughtPokemon();\r\n\t}",
"public Player getOwner() {\n return owner;\n }",
"public String getInfo()\n {\n return info;\n }",
"private static void showPlayerDeckInfo() {\n }",
"static String showPlayerGemsAndPokeballs()\n {\n return \"\\nYou have \" + Player.current.gems + \" gems and \" + Player.current.pokeballs + \" pokeball(s).\\n\";\n }",
"public JLabel getPlayer2() {\n return player2;\n }",
"public String getPlayerName() {\n return name; \n }",
"String getName(){\n\t\treturn playerName;\n\t}",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"public String getBaseImageName() {\n return this.getPokemonInfo().getBaseImageName();\n }",
"public String getPlayerName(){\n return this.playerName;\n\n }",
"String getPlayer();",
"public Player getPlayer(){\n\t\treturn this.player;\n\t}",
"public Player getPlayer() {\n return player;\n }",
"public String getInfo() {\n return info;\n }",
"public Player getPlayer() {\n return player;\n }",
"public String toString() {\n\t\treturn \"Player \" + playerNumber + \": \" + playerName;\n\t}",
"public void printDetailedPlayer(Player player);",
"@Override\r\n public String getInfo() {\r\n return \"Photo name: \"+this.info;\r\n }",
"@Override\n public String getInfo() {\n return this.info;\n }",
"String getPlayerName();",
"String getPokemonByNumber(int number) throws Exception\n\t{\n\t\tString urlHalf1 = \"https://pokeapi.co/api/v2/pokemon-form/\";\n\t\tString url = urlHalf1 + number;\n\n\t\tJsonParser parser = new JsonParser();\n\n\t\tString jsonData = getJsonData(url);\n\n\t\tJsonElement jsonTree = parser.parse(jsonData);\n\n\t\tString pokemonName = \"\";\n\n\t\tif (jsonTree.isJsonObject())\n\t\t{\n\t\t\tJsonObject treeObject = jsonTree.getAsJsonObject();\n\n\t\t\tJsonElement name = treeObject.get(\"name\");\n\n\t\t\tpokemonName = name.getAsString();\n\t\t}\n\n\t\treturn pokemonName;\n\t}",
"public PokemonStats getStats() {\n\t\treturn this.stats;\n\t}",
"public String getInfo() {\n return this.info;\n }",
"@Override\n public void onClickPokemon(PokemonItem pokemon) {\n// Toast.makeText(PokemonBankActivity.this, \"clicked \"+ pokemon.id, Toast.LENGTH_LONG).show();\n //\n gotoPkmDetail(pokemon);\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public Player getPlayer() {\n return player;\n }",
"public String getPlayerName(){\n\t\treturn playerName;\n\t}",
"public String info()\n {\n String display = \"The player has $\" + spendingMoney + \" left to spend, and has won \" + prizesWon;\n return display;\n }",
"public Player getPlayer() {\r\n return player;\r\n }",
"public Pokemon(String name, int number) {\r\n this.name = name;\r\n this.number = number;\r\n }",
"public String getPlayerName() {\n \treturn playername;\n }",
"public String getName(){\n\t\treturn players.get(0).getName();\n\t}",
"public Container getInfoPanel() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic HouseGUI getHouseGui() {\n\t\treturn housegui;\n\t}",
"public String getPlayerName() {\n return playerName;\n }",
"public String getPlayerName() {\n return playerName;\n }"
]
| [
"0.69959426",
"0.6851237",
"0.6539949",
"0.64283234",
"0.63940316",
"0.6320603",
"0.626839",
"0.6265339",
"0.6242054",
"0.60523504",
"0.6045673",
"0.60437477",
"0.60279644",
"0.6016358",
"0.60088736",
"0.6003945",
"0.5991715",
"0.59766877",
"0.59264284",
"0.5907959",
"0.58502614",
"0.5820915",
"0.5747167",
"0.5734807",
"0.57094127",
"0.5698774",
"0.5696895",
"0.5685902",
"0.5660041",
"0.5658508",
"0.56386304",
"0.56190574",
"0.5600011",
"0.557925",
"0.55159616",
"0.550864",
"0.54947853",
"0.54904854",
"0.54862076",
"0.54660857",
"0.5463345",
"0.5438451",
"0.5435084",
"0.5433885",
"0.5425521",
"0.54096395",
"0.539379",
"0.5391572",
"0.5374818",
"0.53648823",
"0.5364695",
"0.5357333",
"0.535728",
"0.5352072",
"0.53501004",
"0.53389",
"0.53332615",
"0.53261507",
"0.5318457",
"0.53151363",
"0.5312521",
"0.5306289",
"0.53032804",
"0.52991265",
"0.5298822",
"0.528587",
"0.52852356",
"0.52844626",
"0.52752805",
"0.5272609",
"0.5272155",
"0.52629364",
"0.52603",
"0.5259081",
"0.52582324",
"0.52546173",
"0.5253586",
"0.52486736",
"0.52455723",
"0.5218061",
"0.52174205",
"0.5211908",
"0.5209782",
"0.5209712",
"0.5208703",
"0.52020067",
"0.52020067",
"0.52020067",
"0.52020067",
"0.52020067",
"0.5200517",
"0.5199036",
"0.5196498",
"0.5196423",
"0.519293",
"0.5175222",
"0.51712596",
"0.5170195",
"0.5168162",
"0.5168162"
]
| 0.773585 | 0 |
Returns reference to the enemy Pokemon info box. | public PkmnInfoBox getEnemyInfoBox()
{
return enemyPkmnInfoBox;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Pokemon getEnemyPokemon()\r\n {\r\n return enemyPokemon;\r\n }",
"public PkmnInfoBox getPlayerInfoBox()\r\n {\r\n return playerPkmnInfoBox;\r\n }",
"public Pokemon getPlayerPokemon()\r\n {\r\n return playerPokemon;\r\n }",
"public Pokemon getAlivePokemon() {\r\n\t\tfor (Pokemon p : ownedPokemon) {\r\n\t\t\tif (p.getCurrentHP() > 0) {\r\n\t\t\t\treturn p;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Enemy getEnemy(){\n return enemy;\n }",
"POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay();",
"public String getPokemonName() {\n\t\treturn pokemon.getName();\n\t}",
"@Override\n public Enemy getEnemyPlayer() {\n return batMan.getEnemyPlayer();\n }",
"Pokemon.PlayerAvatar getAvatar();",
"public ArrayList<Pokemon> getOwnedPokemon() {\r\n\t\treturn ownedPokemon;\r\n\t}",
"public int getCurrentPlayerPokemon()\r\n {\r\n return currentPlayerPokemon;\r\n }",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"@java.lang.Override\n public long getPokemonId() {\n return pokemonId_;\n }",
"POGOProtos.Rpc.PokemonProto getPokemon();",
"public Pokemon retrievePokemon(String pokemonName, int boxNum) {\r\n\t\tif(pokemonBoxes.get(boxNum).isInTheBox(pokemonName)) {\r\n\t\t\treturn pokemonBoxes.get(boxNum).getPokemon(pokemonName);\r\n\t\t}else {\r\n\t\t\tSystem.out.println(pokemonName + \" is not inside box \" + boxNum);\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public EnemyManager getEnemyManager() {\n return map.getEnemyManager();\n }",
"public Enemy getEnemy(int whichEnemy);",
"POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon();",
"public String getTinyImageName() {\n return this.getPokemonInfo().getTinyImageName();\n }",
"POGOProtos.Rpc.PokemonDisplayProtoOrBuilder getPokemonDisplayOrBuilder();",
"public String seenPokemonMenu() {\n String rv = \"\";\n Iterator<PokemonSpecies> it = this.pokedex.iterator();\n while (it.hasNext()) {\n PokemonSpecies currentSpecies = it.next();\n rv += String.format(\"%s\\n\", currentSpecies.getSpeciesName());\n }\n return rv;\n }",
"@Override\n\tpublic GameInfo getGameInfo() {\n\t\treturn gameInfo;\n\t}",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n return getActivePokemon();\n }",
"public Pokemon[] getParty()\n\t{\n\t\treturn m_pokemon;\n\t}",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n if (activePokemonBuilder_ == null) {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n } else {\n return activePokemonBuilder_.getMessage();\n }\n }",
"long getPokemonId();",
"public ArrayList<AbstractPokemon> getPokemon()\n {\n return caughtPokemon;\n }",
"public MWC.GUI.Editable.EditorType getInfo()\n\t{\n\t\tif (_myEditor == null)\n\t\t\t_myEditor = new InvestigateInfo(this);\n\n\t\treturn _myEditor;\n\t}",
"@java.lang.Override\n public POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay() {\n return pokemonDisplay_ == null ? POGOProtos.Rpc.PokemonDisplayProto.getDefaultInstance() : pokemonDisplay_;\n }",
"@Override\n\tpublic HouseGUI getHouseGui() {\n\t\treturn housegui;\n\t}",
"public HashMap<Integer, Element> getEnemies() {\n\t\treturn enemies;\n\t}",
"Pokemon.RequestEnvelop.Unknown6.Unknown2 getUnknown2();",
"public Pokemon(){\r\n this.level = 1;\r\n this.hp = 100;\r\n // this.power = 100;\r\n // this.exp = 0;\r\n }",
"public ArrayList<Enemy> getEnemies()\r\n\t{\r\n\t\treturn enemy;\r\n\t}",
"public PokemonStats getStats() {\n\t\treturn this.stats;\n\t}",
"public Pokedex getPokedex()\n\t{\n\t\treturn m_pokedex;\n\t}",
"void detallePokemon(){\n System.out.println(numero+\" - \"+nombre);\n }",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder() {\n if (activePokemonBuilder_ != null) {\n return activePokemonBuilder_.getMessageOrBuilder();\n } else {\n return activePokemon_ == null ?\n POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }\n }",
"public NPC getNPC(){\n return CitizensAPI.getNPCRegistry().getById(id);\n }",
"pb4client.AchievementInfo getAchieveInfo(int index);",
"public void showAnimalInfo(Player p, Entity e){\r\n\tif(this.checkifHasOwner(e.getUniqueId().toString())){\r\n\t\tAnimals a = new Animals(plugin, e.getUniqueId().toString(), p.getUniqueId().toString());\r\n\t\tint hp = (int) a.getHeartPoints();\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"+++++ Animal Info +++++\");\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Animal Name: \" + ChatColor.GREEN+ a.getAnimalName());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Animal Owner: \" + ChatColor.GREEN+ a.getOwnerName());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Heart Level: \" + ChatColor.GREEN + hp);\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Clean: \" + ChatColor.GREEN + a.getIsWashed());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is happy: \" + ChatColor.GREEN + a.isHappy());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is lonely: \" + ChatColor.GREEN + a.getIsPet());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Hungry: \" + ChatColor.GREEN + a.getHunger());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Healthy: \" + ChatColor.GREEN + a.isHealthy());\r\n\t\tp.sendMessage(ChatColor.YELLOW + \"Is Weight: \" + ChatColor.GREEN + a.getWeight());\r\n\t\t}\r\n\t}",
"@java.lang.Override\n public POGOProtos.Rpc.PokemonDisplayProtoOrBuilder getPokemonDisplayOrBuilder() {\n return getPokemonDisplay();\n }",
"@Override\r\n\tpublic String getInfo() {\n\t\treturn \"Grass... stay away from it when a fire is near.\";\r\n\t}",
"@Override\n public String getEntLS() {\n return \"Enemies\";\n }",
"public POGOProtos.Rpc.PokemonDisplayProto.Builder getPokemonDisplayBuilder() {\n \n onChanged();\n return getPokemonDisplayFieldBuilder().getBuilder();\n }",
"Pokemon.ResponseEnvelop.Unknown6.Unknown2 getUnknown2();",
"public MenuInfoEnemigo(final int xValue, final int yValue,\n final PaqueteEnemigo enemy) {\n this.x = xValue;\n this.y = yValue;\n this.enemigo = enemy;\n }",
"public void act()\r\n {\r\n if(worldTimer == 1)\r\n {\r\n if(wildPokemon)\r\n {\r\n textInfoBox.displayText(\"Wild \" + enemyPokemon.getName() + \" appeared!\", true, false);\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(\"Enemy trainer sent out \" + enemyPokemon.getName() + \"!\", true, false);\r\n }\r\n textInfoBox.displayText(\"Go \" + playerPokemon.getName() + \"!\", true, false);\r\n textInfoBox.updateImage();\r\n\r\n worldTimer++;\r\n }\r\n else if(worldTimer == 0)\r\n {\r\n worldTimer++;\r\n }\r\n\r\n if(getObjects(Pokemon.class).size() < 2)\r\n {\r\n ArrayList<Pokemon> pokemon = (ArrayList<Pokemon>) getObjects(Pokemon.class);\r\n for(Pokemon pkmn : pokemon)\r\n {\r\n if(pkmn.getIsPlayers() == true)\r\n {\r\n textInfoBox.displayText(\"Enemy \" + enemyPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n int expGain = StatCalculator.experienceGainCalc(playerPokemon.getName(), playerPokemon.getLevel());\r\n textInfoBox.displayText(playerPokemon.getName().toUpperCase() + \" gained \" + expGain + \"\\nEXP. Points!\", true, false);\r\n playerPokemon.addEXP(expGain);\r\n if(playerPokemon.getCurrentExperience() >= StatCalculator.experienceToNextLevel(playerPokemon.getLevel()))\r\n {\r\n int newEXP = playerPokemon.getCurrentExperience() - StatCalculator.experienceToNextLevel(playerPokemon.getLevel());\r\n playerPokemon.setEXP(newEXP);\r\n playerPokemon.levelUp();\r\n playerPokemon.newPokemonMoves();\r\n\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" grew to level \" + playerPokemon.getLevel() + \"!\", true, false);\r\n }\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n\r\n textInfoBox.updateImage();\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n else\r\n {\r\n textInfoBox.displayText(playerPokemonName.toUpperCase() + \" fainted!\", true, false);\r\n\r\n String playerName = Reader.readStringFromFile(\"gameInformation\", 0, 0);\r\n textInfoBox.displayText(playerName + \" blacked out!\", true, false);\r\n\r\n addObject(new Blackout(\"Fade\"), getWidth() / 2, getHeight() / 2);\r\n removeAllObjects();\r\n\r\n String newWorld = Reader.readStringFromFile(\"gameInformation\", 0, 4);\r\n int newX = Reader.readIntFromFile(\"gameInformation\", 0, 5);\r\n int newY = Reader.readIntFromFile(\"gameInformation\", 0, 6);\r\n\r\n GameWorld gameWorld = new GameWorld(newWorld, newX, newY, \"Down\");\r\n gameWorld.healPokemon();\r\n Greenfoot.setWorld(gameWorld);\r\n\r\n isPlayersTurn = true;\r\n battleOver();\r\n }\r\n }\r\n } \r\n\r\n if(isBattleOver)\r\n {\r\n isPlayersTurn = true;\r\n savePokemonData(playerPokemon, currentPlayerPokemon);\r\n newGameWorld();\r\n }\r\n }",
"public POGOProtos.Rpc.PokemonDisplayProto getPokemonDisplay() {\n if (pokemonDisplayBuilder_ == null) {\n return pokemonDisplay_ == null ? POGOProtos.Rpc.PokemonDisplayProto.getDefaultInstance() : pokemonDisplay_;\n } else {\n return pokemonDisplayBuilder_.getMessage();\n }\n }",
"public Box pickUp() {\n //System.out.println(\"Nincs mit felvenni.\");\n return null;\n }",
"POGOProtos.Rpc.PokemonProtoOrBuilder getPokemonOrBuilder();",
"public boolean getWildPokemon()\r\n {\r\n return wildPokemon;\r\n }",
"public String getAboutBoxText();",
"public Pokemon() { // if nothing was provided i'm just gonna give \n\t\tthis.name = \"\"; //its name empty String\n\t\tthis.level = 1; // and level is level 1\n\t}",
"public POGOProtos.Rpc.CombatProto.CombatPokemonProto.Builder getActivePokemonBuilder() {\n \n onChanged();\n return getActivePokemonFieldBuilder().getBuilder();\n }",
"@Override\r\n\t/**\r\n\t * Each enemy has a unique health and scales as the game goes along\r\n\t */\r\n\tpublic int enemyHealth() {\n\t\treturn enemyHealth;\r\n\t}",
"Pokemon.ResponseEnvelop.Unknown7 getUnknown7();",
"@java.lang.Override\n public POGOProtos.Rpc.CombatProto.CombatPokemonProto getActivePokemon() {\n return activePokemon_ == null ? POGOProtos.Rpc.CombatProto.CombatPokemonProto.getDefaultInstance() : activePokemon_;\n }",
"public Image getPokeImg(int index) {\n\t\treturn pokemonImgs[index];\n\t}",
"public InfoView getInfoView() {\r\n return infoPanel;\r\n }",
"public int getDmg(){\r\n return enemyDmg;\r\n }",
"Pokemon.RequestEnvelop.Unknown6 getUnknown6();",
"Pokemon.ResponseEnvelop.Unknown6 getUnknown6();",
"protected BattlePokemonState pokemonState(){\n return new BattlePokemonState(\n this.mFightButton,\n this.mPokemonButton,\n this.mBagButton,\n this.mRunButton,\n this.mActionButton,\n this.mOptionList,\n this.mBattle,\n this.mMessage\n );\n }",
"public BoxItem.Info getItem() {\n return this.item;\n }",
"public String getPokemonHP() {\n\t\treturn pokemon.getCurHP() + \"/\" + pokemon.getMaxHP();\n\t}",
"boolean hasPokemonDisplay();",
"POGOProtos.Rpc.CombatProto.CombatPokemonProtoOrBuilder getActivePokemonOrBuilder();",
"public TextInfoBox getTextInfoBox()\r\n {\r\n return textInfoBox;\r\n }",
"public abstract void info(Player p);",
"public void actionPerformed(ActionEvent event)\n {\n label.append(\"\\n\" + pokemonName);\n party.add(pokemon);\n }",
"public EpicPlayer getEpicPlayer(){ return epicPlayer; }",
"@Override\n public Hero getOwner() {\n return owner;\n }",
"public Pokemon ()\r\n\t{\r\n\t\tthis.id = 0;\r\n\t\tthis.nombre = \" \";\r\n\t\tsetVidas(0);\r\n\t\tsetNivel(0);\r\n\t\tthis.tipo=\" \";\r\n\t\tthis.evolucion =0;\r\n\t\tthis.rutaImagen = \" \";\r\n\t}",
"public Object getInfo() {\n return info;\n }",
"public String getPopulationInfo(){\n\t\treturn populationInfo;\n\t}",
"public MapLocation getEnemySwarmTarget() {\n\t\tdouble a = Math.sqrt(vecEnemyX * vecEnemyX + vecEnemyY * vecEnemyY) + .001;\n\n\t\treturn new MapLocation((int) (vecEnemyX * 7 / a) + br.curLoc.x,\n\t\t\t\t(int) (vecEnemyY * 7 / a) + br.curLoc.y);\n\n\t}",
"public String getHealthinfo() {\n return healthinfo;\n }",
"protected ResourceLocation getEntityTexture(EntityMegaZombie p_110775_1_)\n {\n return zombieTextures;\n }",
"private void enemyEncounter()\n {\n currentEnemies = currentRoom.getEnemies();\n \n if(currentEnemies.size() > 0)\n {\n for(Enemy e : currentEnemies)\n {\n System.out.println(\"\\n\" + \"A \" + e.getName() + \" stares menacingly!\" + \"\\n\");\n enemyName = e.getName();\n \n }\n enemyPresent = true;\n clearExits();\n }\n else{\n setExits(); \n }\n }",
"public String getBaseImageName() {\n return this.getPokemonInfo().getBaseImageName();\n }",
"public String getDialogueIntelligence() {\n return this.dialogueIntelligence;\n }",
"public JPanel getInfo() {\n return info;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.HoloPokemonId getPokedexId() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.HoloPokemonId result = POGOProtos.Rpc.HoloPokemonId.valueOf(pokedexId_);\n return result == null ? POGOProtos.Rpc.HoloPokemonId.UNRECOGNIZED : result;\n }",
"public String getOpponentName() {\n return opponentName;\n }",
"public String getAwayTeam();",
"public PluginInfo getInfo() {\r\n return new devplugin.PluginInfo(TvBrowserDataService.class,\r\n mLocalizer.msg(\"name\",\"EPGfree data\"),\r\n mLocalizer.msg(\"description\", \"Data that is available for free with mostly German, Swiss, Austrian and Danish channels.\"),\r\n \"Til Schneider, www.murfman.de\",\r\n mLocalizer.msg(\"license\",\"Terms of Use:\\n=============\\nAll TV/Radio listings provided by TV-Browser (http://www.tvbrowser.org) are protected by copyright laws and may only be used within TV-Browser or other name like applications authorizied by the manufacturer of TV-Browser (http://www.tvbrowser.org) for information about the upcoming program of the available channels.\\nEvery other manner of using, reproducing or redistributing of the TV/Radio listings is illegal and may be prosecuted on civil or criminal law.\\n\\nOn downloading the TV/Radio listings you declare your agreement to these terms.\\n\\nIf you have any questions concerning these terms please contact [email protected]\"));\r\n }",
"public static Player getHero() {\n return hero;\n }",
"public String getPotionName()\r\n/* 119: */ {\r\n/* 120:121 */ return Potion.potionList[this.id].getName();\r\n/* 121: */ }",
"public JLabel getPlayer2() {\n return player2;\n }",
"POGOProtos.Rpc.HoloPokemonId getPokedexId();",
"POGOProtos.Rpc.HoloPokemonId getPokedexId();",
"@Override\n public void onClickPokemon(PokemonItem pokemon) {\n// Toast.makeText(PokemonBankActivity.this, \"clicked \"+ pokemon.id, Toast.LENGTH_LONG).show();\n //\n gotoPkmDetail(pokemon);\n }",
"public Container getInfoPanel() {\n\t\treturn null;\n\t}",
"boolean hasActivePokemon();",
"@Override //TODO\n public String toString() {\n String s = \"\";\n s += name + \" \";\n for(Pokemon p : team)\n s += p + \"\\n\";\n return s;\n }",
"@java.lang.Override\n public POGOProtos.Rpc.Item getPokeball() {\n @SuppressWarnings(\"deprecation\")\n POGOProtos.Rpc.Item result = POGOProtos.Rpc.Item.valueOf(pokeball_);\n return result == null ? POGOProtos.Rpc.Item.UNRECOGNIZED : result;\n }",
"public EnemyRoom getEnemyRoom(){\n return (EnemyRoom) room;\n }",
"public Element getOneEnemy(String name){\r\n\t\t//follow the commentarys of the player group, getOneCharacter, just doesn´t have its own where\r\n\t\treturn loadFile(getFile(getWanted(getFile(getWanted(RPGSystem.getRPGSystem().getWhere(), \"Enemys\")), name)));\r\n\t}",
"private GUIGameInfo() {\n this.board = new GUIBoard();\n this.logic = new regLogic();\n this.players = new Player[2];\n this.players[0] = new Player(Symbol.BLACK);\n this.players[1] = new Player(Symbol.WHITE);\n this.guiPlayers = new GUIPlayer[2];\n this.guiPlayers[0] = new GUIPlayer(this.players[0]);\n this.guiPlayers[1] = new GUIPlayer(this.players[1]);\n\n }"
]
| [
"0.73491",
"0.6482694",
"0.63135326",
"0.6271558",
"0.5936762",
"0.58750284",
"0.5798727",
"0.57820237",
"0.57670784",
"0.5720245",
"0.5693722",
"0.56745285",
"0.5667237",
"0.5600817",
"0.55807334",
"0.55567",
"0.55457205",
"0.55095464",
"0.55035627",
"0.55033404",
"0.54845697",
"0.5472972",
"0.54713184",
"0.54558104",
"0.5421014",
"0.5417521",
"0.54012644",
"0.53686225",
"0.5361076",
"0.5344514",
"0.533811",
"0.53379023",
"0.5333153",
"0.53089523",
"0.5298491",
"0.52965015",
"0.52957034",
"0.52829623",
"0.5269843",
"0.52601266",
"0.52591366",
"0.5251424",
"0.5250773",
"0.5212893",
"0.5207953",
"0.52059394",
"0.52043843",
"0.5194277",
"0.5191613",
"0.5186577",
"0.5178834",
"0.5175016",
"0.51617336",
"0.51587784",
"0.51481503",
"0.514661",
"0.51445204",
"0.51421636",
"0.5135607",
"0.5132976",
"0.5128269",
"0.51224166",
"0.5113039",
"0.50981104",
"0.50875086",
"0.5086364",
"0.5078801",
"0.50776845",
"0.5063812",
"0.50449985",
"0.5037699",
"0.5035742",
"0.50320244",
"0.50306827",
"0.50253737",
"0.5023191",
"0.5020813",
"0.501365",
"0.5009266",
"0.5004489",
"0.5000027",
"0.49943033",
"0.49857605",
"0.49787349",
"0.4977344",
"0.49745053",
"0.49731624",
"0.49724913",
"0.49715933",
"0.49689302",
"0.4966871",
"0.4966871",
"0.4961052",
"0.49601167",
"0.4956512",
"0.49564114",
"0.49538773",
"0.49501276",
"0.4940151",
"0.49280718"
]
| 0.7930504 | 0 |
Returns reference to the text info box. | public TextInfoBox getTextInfoBox()
{
return textInfoBox;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getInfoText();",
"public String getAboutBoxText();",
"public void setInfoText(String infoText);",
"private JTextField getTxtIdC() {\n\t\tif (txtIdC == null) {\n\t\t\ttxtIdC = new JTextField();\n\t\t\ttxtIdC.setBounds(new Rectangle(140, 10, 125, 16));\n\t\t}\n\t\treturn txtIdC;\n\t}",
"private JTextField getVstupText() {\n\t\tif (vstupText == null) {\n\t\t\tvstupText = new JTextField();\n\t\t\tvstupText.setBounds(new Rectangle(124, 278, 300, 30));\n\t\t}\n\t\treturn vstupText;\n\t}",
"public InfoDialog(String text) {\r\n\t\tthis.setDialog(text);\r\n\t}",
"public static String informationUpdatedDialog_txt(){\t\t\t\t\t\t\t\n\t\tid = \"divMessageOK\";\t\t\t\t\t\t\n\t\treturn id;\t\t\t\t\t\t\n\t}",
"private Widget getInfo() {\n FocusPanel infoPanel = new FocusPanel();\n infoPanel.setStyleName(\"elv-Molecules-InfoPanel\");\n HorizontalPanel content = new HorizontalPanel();\n try{\n Image img = new Image(ReactomeImages.INSTANCE.information());\n String helpTitle = \"Info\";\n HTMLPanel helpContent = new HTMLPanel(\n \"The molecules tab shows you all the molecules of a complete pathway diagram.\\n\" +\n \"Molecules are grouped in Chemical Compounds, Proteins, Sequences and Others.\\n\" +\n \"The molecules of a selected object appear highlighted in the molecules lists;\\n\" +\n \"a molecule selected in the list will be highlighted in the diagram.\\n\" +\n \"For each molecule you can see a symbol, a link to the main reference DB, a name and the number of\\n\" +\n \"occurrences in the pathway. Clicking on the symbol several times will allow you to circle through\\n\" +\n \"all its occurrences in the diagram.\\n\" +\n \"Expanding by clicking on the '+' will provide you with further external links.\\n\" +\n \"Lists can be downloaded. Just click on the button in the top right\\n\" +\n \"corner, select the fields and types you are interested in and click 'Start Download'.\");\n\n content.add(img);\n popup = new HelpPopup(helpTitle, helpContent);\n infoPanel.addMouseOverHandler(this);\n infoPanel.addMouseOutHandler(this);\n infoPanel.getElement().getStyle().setProperty(\"cursor\", \"help\");\n }catch (Exception e){\n// e.printStackTrace();\n Console.error(getClass() + \": \" + e.getMessage());\n //ToDo: Enough?\n }\n HTMLPanel title = new HTMLPanel(\"Info\");\n title.getElement().getStyle().setMarginLeft(10, Style.Unit.PX);\n content.add(title);\n\n infoPanel.add(content.asWidget());\n\n return infoPanel;\n }",
"private JTextField getTxtC() {\r\n\t\tif (txtC == null) {\r\n\t\t\ttxtC = new JTextField();\r\n\t\t\ttxtC.setLocation(new Point(81, 43));\r\n\t\t\ttxtC.setSize(new Dimension(32, 20));\r\n\t\t}\r\n\t\treturn txtC;\r\n\t}",
"private String getText() {\r\n\t\treturn getJTextField().getText();\r\n\t}",
"private JTextField getTxtIdE() {\n\t\tif (txtIdE == null) {\n\t\t\ttxtIdE = new JTextField();\n\t\t\ttxtIdE.setBounds(new Rectangle(140, 50, 125, 16));\n\t\t}\n\t\treturn txtIdE;\n\t}",
"public abstract String getTipForTextField();",
"private JTextField getTxtNmDocumento() {\r\n\t\tif (txtNmDocumento == null) {\r\n\t\t\ttxtNmDocumento = new JTextField();\r\n\t\t\ttxtNmDocumento.setBounds(new Rectangle(68, 44, 320, 22));\r\n\t\t\ttxtNmDocumento.setToolTipText(\"Nome do documento pendente do aluno\");\r\n\t\t}\r\n\t\treturn txtNmDocumento;\r\n\t}",
"public String getText_txt_Pick_Up_Text(){\r\n\t\treturn txt_Pick_Up_Text.getText();\r\n\t}",
"public Info(String text) {\n //new JTextArea(text);\n super(text, SwingConstants.CENTER);\n setFont(Scheme.getFont());\n setOpaque(true);\n setSize(getFontMetrics(Scheme.getFont()).stringWidth(getText()) + 13, 25);\n setBackground(Scheme.getBackgroundColor());\n setForeground(Scheme.getForegroundColor());\n setBorder(BorderFactory.createLineBorder(Color.GRAY));\n }",
"public String getText() {\r\n\t\treturn this.textfield.getText();\r\n\r\n\t}",
"public final GameElementType convertInfoBoxes(GameText boxText, Asset infoBoxAsset) {\n GenericInteraction infoBox = new GenericInteraction();\r\n infoBox.setText(new Text(boxText.getText()));\r\n infoBox.getText().setFont(infoBoxAsset.getFontFamily());\r\n infoBox.getText().setFontSize(infoBoxAsset.getFontSize());\r\n infoBox.setColor(new ElementColor());\r\n infoBox.getColor().setBackgroundColor(\r\n infoBoxAsset.getBackgroundColor());\r\n infoBox.getColor().setForegroundColor(\r\n infoBoxAsset.getForegroundColor());\r\n \r\n infoBox.setName(\"Infobox\");\r\n infoBox.setLocation(\r\n new Location(infoBoxAsset.getX(), infoBoxAsset.getY()));\r\n infoBox.setSize(\r\n new Size(infoBoxAsset.getWidth(),\r\n infoBoxAsset.getHeight()));\r\n \r\n return infoBox;\r\n }",
"public void displayInfo(String info){\n infoWindow.getContentTable().clearChildren();\n Label infoLabel = new Label(info, infoWindow.getSkin(), \"dialog\");\n infoLabel.setWrap(true);\n infoLabel.setAlignment(Align.center);\n infoWindow.getContentTable().add(infoLabel).width(500);\n infoWindow.show(guiStage);\n }",
"private JTextField getJTextField22() {\r\n\t\tif (jTextField22 == null) {\r\n\t\t\tjTextField22 = new JTextField();\r\n\t\t\tjTextField22.setBounds(new Rectangle(186, 46, 33, 20));\r\n\t\t\tjTextField22.setText(\"10\");\r\n\t\t}\r\n\t\treturn jTextField22;\r\n\t}",
"public String getText();",
"public String getText();",
"public String getText();",
"public String getText();",
"public void showInfo(String infotext) {\r\n // backup current status of text and icon for rollback:\r\n lastInfo = info.getText();\r\n lastIcon = info.getIcon();\r\n\r\n // show info icon and new info text:\r\n info.setIcon(new ImageIcon(StatusInformationPanel.class\r\n .getResource(\"img/info.gif\")));\r\n info.setText(infotext);\r\n }",
"public String getText() {\n return textField.getText();\n }",
"private JTextField getTextFieldDescription() {\r\n JTextField textFieldDescription = makeJTextField(1, 100, 130, 200, 25);\r\n textFieldDescription.setName(\"Desc\");\r\n return textFieldDescription;\r\n }",
"public static String getText()\n\t{\n\t\treturn enterURL.getText().toString();\n\t}",
"private JTextField getTId() {\r\n if (tId == null) {\r\n tId = new JTextField();\r\n tId.setBounds(new Rectangle(100, 20, 100, 20));\r\n }\r\n return tId;\r\n }",
"public static String getInputText(){\n\t\treturn textArea.getText();\n\t}",
"private JTextField getJTextField222() {\r\n\t\tif (jTextField222 == null) {\r\n\t\t\tjTextField222 = new JTextField();\r\n\t\t\tjTextField222.setBounds(new Rectangle(186, 68, 33, 20));\r\n\t\t\tjTextField222.setText(\"10\");\r\n\t\t}\r\n\t\treturn jTextField222;\r\n\t}",
"public String getText()\n {\n return getComponent().getText();\n }",
"public final MWC.GUI.Editable.EditorType getInfo()\r\n\t{\r\n\t\tif (_myEditor == null)\r\n\t\t\t_myEditor = new FieldInfo(this, this.getName());\r\n\r\n\t\treturn _myEditor;\r\n\t}",
"public InfoDialog() {\r\n\t\tcreateContents();\r\n\t}",
"private ZapTextField getTxtName() {\n if (txtName == null) {\n txtName = new ZapTextField();\n }\n return txtName;\n }",
"public String getTextFromTextField() {\r\n\t\treturn textField.getText();\r\n\t}",
"private JTextField getJTextField212() {\r\n\t\tif (jTextField212 == null) {\r\n\t\t\tjTextField212 = new JTextField();\r\n\t\t\tjTextField212.setBounds(new Rectangle(35, 347, 181, 20));\r\n\t\t\tjTextField212.setText(\"\");\r\n\t\t}\r\n\t\treturn jTextField212;\r\n\t}",
"private TextField getTxt_desc() {\n\t\treturn txt_desc;\n\t}",
"private JTextField getTNombre() {\r\n if (tNombre == null) {\r\n tNombre = new JTextField();\r\n tNombre.setBounds(new Rectangle(100, 45, 150, 20));\r\n }\r\n return tNombre;\r\n }",
"public InfoView getInfoView() {\r\n return infoPanel;\r\n }",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"String getText();",
"void displayInfoText(String info) {\n resultWindow.removeAll();\n JLabel label = new JLabel(info);\n label.setFont(resultFont);\n resultWindow.add(label);\n revalidate();\n repaint();\n }",
"private JTextField getTxtD() {\r\n\t\tif (txtD == null) {\r\n\t\t\ttxtD = new JTextField();\r\n\t\t\ttxtD.setLocation(new Point(117, 43));\r\n\t\t\ttxtD.setSize(new Dimension(32, 20));\r\n\t\t}\r\n\t\treturn txtD;\r\n\t}",
"public String getText() {\n checkWidget();\n int length = OS.GetWindowTextLength(handle);\n if (length == 0)\n return \"\";\n TCHAR buffer = new TCHAR(getCodePage(), length + 1);\n OS.GetWindowText(handle, buffer, length + 1);\n return buffer.toString(0, length);\n }",
"private JTextField getTxtA() {\r\n\t\tif (txtA == null) {\r\n\t\t\ttxtA = new JTextField();\r\n\t\t\ttxtA.setLocation(new Point(7, 43));\r\n\t\t\ttxtA.setSize(new Dimension(32, 20));\r\n\t\t}\r\n\t\treturn txtA;\r\n\t}",
"private JTextField getJTextField2221() {\r\n\t\tif (jTextField2221 == null) {\r\n\t\t\tjTextField2221 = new JTextField();\r\n\t\t\tjTextField2221.setBounds(new Rectangle(186, 91, 33, 20));\r\n\t\t\tjTextField2221.setText(\"5\");\r\n\t\t}\r\n\t\treturn jTextField2221;\r\n\t}",
"private JTextField getTxtAddress() {\r\n\t\tif (txtAddress == null) {\r\n\t\t\ttxtAddress = new JTextField();\r\n\t\t\ttxtAddress.setPreferredSize(new Dimension(200, 20));\r\n\t\t\ttxtAddress.addKeyListener(new java.awt.event.KeyAdapter() {\r\n\t\t\t\tpublic void keyTyped(java.awt.event.KeyEvent e) {\r\n\t\t\t\t\tif(e.getKeyChar() == '\\n') {\r\n\t\t\t\t\t\tgoTo(txtAddress.getText(), HistoryManagement.CLEAR);\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 txtAddress;\r\n\t}",
"private JTextField getJTextField2223() {\r\n\t\tif (jTextField2223 == null) {\r\n\t\t\tjTextField2223 = new JTextField();\r\n\t\t\tjTextField2223.setBounds(new Rectangle(186, 134, 33, 20));\r\n\t\t\tjTextField2223.setText(\"50\");\r\n\t\t}\r\n\t\treturn jTextField2223;\r\n\t}",
"TextField getTf();",
"private JTextField getJTextField221() {\r\n\t\tif (jTextField221 == null) {\r\n\t\t\tjTextField221 = new JTextField();\r\n\t\t\tjTextField221.setBounds(new Rectangle(186, 8, 33, 20));\r\n\t\t\tjTextField221.setText(\"10\");\r\n\t\t}\r\n\t\treturn jTextField221;\r\n\t}",
"public java.lang.String getText() {\n return instance.getText();\n }",
"private JTextField getNameTextField() {\n\t\tif (NameTextField == null) {\n\t\t\tNameTextField = new JTextField();\n\t\t\tNameTextField.setBounds(new Rectangle(225, 120, 180, 30));\n\t\t}\n\t\treturn NameTextField;\n\t}",
"private JTextField getCenterDescTextField() {\r\n if (this.centerDescTextArea == null) {\r\n this.centerDescTextArea = new JTextField();\r\n this.centerDescTextArea.setColumns(10);\r\n }\r\n return this.centerDescTextArea;\r\n }",
"public MWC.GUI.Editable.EditorType getInfo()\n\t{\n\t\tif (_myEditor == null)\n\t\t\t_myEditor = new InvestigateInfo(this);\n\n\t\treturn _myEditor;\n\t}",
"public String getText(){\n return input.getText().toString();\n }",
"protected Text getText()\r\n\t{\r\n\t\treturn text;\r\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 infoTextField = new javax.swing.JTextField();\n \n jLabel1.setText(\"Info:\");\n \n org.jdesktop.layout.GroupLayout layout = new org.jdesktop.layout.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(org.jdesktop.layout.GroupLayout.LEADING)\n .add(layout.createSequentialGroup()\n .addContainerGap()\n .add(jLabel1)\n .addPreferredGap(org.jdesktop.layout.LayoutStyle.RELATED)\n .add(infoTextField, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, 321, 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(jLabel1)\n .add(infoTextField, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE, org.jdesktop.layout.GroupLayout.DEFAULT_SIZE, org.jdesktop.layout.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(252, Short.MAX_VALUE))\n );\n }",
"@Override\r\n\t\t\tpublic String getText() {\n\t\t\t\treturn text;\r\n\t\t\t}",
"private JTextField getJTextField2211() {\r\n\t\tif (jTextField2211 == null) {\r\n\t\t\tjTextField2211 = new JTextField();\r\n\t\t\tjTextField2211.setText(\"25\");\r\n\t\t\tjTextField2211.setBounds(new Rectangle(185, 190, 33, 20));\r\n\t\t\tjTextField2211.setEnabled(false);\r\n\t\t}\r\n\t\treturn jTextField2211;\r\n\t}",
"public void setInfoLabelText(String text) {\n Label infoLabel = s.findNiftyControl(\"infoLabel\", Label.class);\n if (text != null) {\n infoLabel.setText(text);\n infoPanel.setVisible(true);\n } else\n infoPanel.setVisible(false);\n }",
"public String getTextInput(){\r\n\t\treturn textInput.getText();\r\n\t}",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"java.lang.String getText();",
"String getText ();",
"public InfoDialog(String text, String title) {\r\n\t\tthis.setDialog(text, title);\r\n\t}",
"public String getText() {\n return text.getText();\n }",
"protected Text getText() {\n \t\treturn text;\n \t}",
"public String getInfoString();",
"public String getSizeTextField(){\n\t\treturn textField.getText();\n\t}",
"private JTextField getTellerVeld() {\n if (tellerVeld == null) {\n tellerVeld = new JTextField();\n tellerVeld.setBounds(new Rectangle(17, 15, 74, 35));\n }\n return tellerVeld;\n }",
"private TextField getTxt_name() {\n\t\treturn txt_name;\n\t}",
"@Override\n public View getInfoContents(Marker marker) {\n View view = inflater.inflate(R.layout.layout_info_window, null, false);\n TextView txtName = view.findViewById(R.id.txtName);\n txtName.setText(marker.getTitle());\n// txtName.setText(message);\n return view;\n }",
"public InfoPanel()\n\t\t{\n\t\t\t//setting color and instantiating textfield and button\n\t\t\tsetBackground(bCol);\n\t\t\tnameJF = new JTextField(\"Type Your Name\", 20);\n\t\t\tFont naFont = new Font(\"Serif\", Font.PLAIN, 25);\n\t\t\tnameJF.setFont(naFont);\n\t\t\tsub = new JButton(\"Submit\");\n\t\t\tsub.addActionListener(this);\n\t\t\tsub.setFont(naFont);\n\t\t\tname = new String(\"\");\n\t\t\tadd(nameJF);\n\t\t\tadd(sub);\n\t\t}",
"private JTextField getServiceVersionTextField() {\r\n if (serviceVersionTextField == null) {\r\n serviceVersionTextField = new JTextField();\r\n serviceVersionTextField.getDocument().addDocumentListener(new TextBoxListener());\r\n }\r\n return serviceVersionTextField;\r\n }",
"@objid (\"477ed32e-345e-478d-bf2d-285fddcaf06e\")\r\n public Text getTextButton() {\r\n return this.text;\r\n }",
"public InformationField getInfo() {\n\treturn informationField;\n }",
"public void getText(){\n\t\tnoteText.setText(note.getText());\n\t}",
"public String getText() {\n if (!this.a_text.isEnabled())\n return null;\n\n return this.a_text.getText();\n }",
"String getDisplayText();",
"public String getText(){\r\n\t\treturn text;\r\n\t}",
"private JTextField getJTextField22111() {\r\n\t\tif (jTextField22111 == null) {\r\n\t\t\tjTextField22111 = new JTextField();\r\n\t\t\tjTextField22111.setText(\"25\");\r\n\t\t}\r\n\t\treturn jTextField22111;\r\n\t}",
"String getTextStringValue(Object txt);",
"@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tMessageDialog.openInformation(parent.getShell(), \"info\", ((ToolItem)e.getSource()).getText());\n\t\t\t}",
"@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t\tMessageDialog.openInformation(parent.getShell(), \"info\", ((ToolItem)e.getSource()).getText());\n\t\t\t}",
"public String getText()\n {\n return field.getText();\n }",
"public void setCurrentInfoText(String name) {\n\t\tthis.currentInfoText = name;\n\t}",
"public String getText() {\n return myText;\n }",
"private JTextField getCenterShortNameTextField() {\r\n if (this.centerShortNameTextField == null) {\r\n this.centerShortNameTextField = new JTextField();\r\n this.centerShortNameTextField.setColumns(10);\r\n this.centerShortNameTextField.getDocument().addDocumentListener(new TextBoxListener());\r\n }\r\n return this.centerShortNameTextField;\r\n }",
"public String getText()\n\t{\n\t\treturn text;\n\t}"
]
| [
"0.7151146",
"0.7039065",
"0.66019505",
"0.6470923",
"0.6381983",
"0.6328738",
"0.63278186",
"0.6322636",
"0.63096553",
"0.627386",
"0.62515557",
"0.62427235",
"0.62421626",
"0.62029153",
"0.6197726",
"0.6178101",
"0.6142377",
"0.61401975",
"0.61272126",
"0.61141616",
"0.61141616",
"0.61141616",
"0.61141616",
"0.6099499",
"0.6098337",
"0.60979885",
"0.6095657",
"0.60894305",
"0.60881865",
"0.607358",
"0.60373163",
"0.60365564",
"0.6035482",
"0.60221845",
"0.59854394",
"0.5983349",
"0.5982381",
"0.59557533",
"0.59548205",
"0.5952931",
"0.5952931",
"0.5952931",
"0.5952931",
"0.5952931",
"0.5952931",
"0.5952931",
"0.59446436",
"0.5943414",
"0.59266466",
"0.5924333",
"0.5912326",
"0.5910072",
"0.5907377",
"0.5902376",
"0.58841956",
"0.58829576",
"0.58782625",
"0.58675945",
"0.58601606",
"0.5848543",
"0.5837907",
"0.5836281",
"0.58245665",
"0.5823193",
"0.58192825",
"0.581807",
"0.5801854",
"0.5801854",
"0.5801854",
"0.5801854",
"0.5801854",
"0.5801854",
"0.5801854",
"0.5801854",
"0.5796329",
"0.5793359",
"0.5787379",
"0.578151",
"0.57736295",
"0.5771857",
"0.5768766",
"0.57680935",
"0.57670164",
"0.5765707",
"0.5760911",
"0.57589626",
"0.5758775",
"0.57568616",
"0.5752121",
"0.57509506",
"0.57438445",
"0.57345724",
"0.5732039",
"0.57190955",
"0.57190955",
"0.5713067",
"0.5692729",
"0.56854105",
"0.56840223",
"0.5660995"
]
| 0.858787 | 0 |
Returns of the battle is over or not. | public boolean getIsBattleOver()
{
return isBattleOver;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isBattleOver() {\n\t\treturn battleOver;\n\t}",
"public boolean isOver() {\n \treturn status == GameStatus.victory || status == GameStatus.draw || status == GameStatus.quit;\n }",
"public boolean gameOver() \n {\n \treturn status() != GAME_NOT_OVER;\n }",
"public boolean isBattleOver(){\n\n if(battleEnemies.size() == 0) {\n System.out.println(\"Battle over all enemies dead\");\n findDefeated();\n cleanStatuses();\n result = true;\n\n return true;\n }\n if(character.getCurrHP() <= 0){\n System.out.println(\"Battle over character has died\");\n //findDefeated();\n cleanStatuses();\n result = false;\n\n return true;\n }\n //System.out.printf(\"remaining enemies: %s\\n\", battleEnemies.size());\n return false;\n }",
"public void battleOver()\r\n {\r\n isBattleOver = true;\r\n }",
"public boolean gameIsOver() {return revealedShips >= 4;}",
"boolean isGameOver();",
"boolean isGameOver();",
"boolean gameOver() {\n return _gameOver;\n }",
"boolean isGameOver() {\n\t\treturn Hit;\n\t}",
"protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }",
"public boolean gameOver() {\n\t\treturn gameOver;\n\t}",
"public boolean isGameOver();",
"public boolean isGameOver();",
"public boolean gameOver()\n {\n return checkmate()||draw()!=NOT_DRAW;\n }",
"public boolean isOver() {\r\n return isOver;\r\n }",
"public boolean GameIsOver() {\n\t\tif(deck.numCardsLeft()==8) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isOver() {\n \t\treturn isOver;\n \t}",
"public int status() \n {\n \tif (stonesCount(7,12) != 0 && stonesCount(0,5) != 0)\n \t\treturn GAME_NOT_OVER;\n \telse if (stonesCount(7,13) < stonesCount(0,6))\n \t\treturn GAME_OVER_WIN;\n \telse if (stonesCount(7,13) == stonesCount(0,6))\n \t\treturn GAME_OVER_TIE;\n \telse\n \t\treturn GAME_OVER_LOSE;\n }",
"public boolean gameOver();",
"public boolean gameOver();",
"public boolean isGameOver() {\n return gameOver;\n }",
"public boolean gameOver() {\r\n return didPlayerLose() || didPlayerWin();\r\n }",
"public boolean gameOver() {\n return winner() != null;\n }",
"public boolean isOver() {\n\t\treturn over;\n\t}",
"public abstract boolean gameIsOver();",
"public boolean getOver(){\n\t\t//if the game is over, stop the timer\n\t\tif(this.over){\n\t\t\t//update the total points label\n\t\t\tthis.getPoints();\n\t\t\t\n\t\t\tthis.timer.stop();\n\t\t}\n\t\t\n\t\treturn this.over;\n\t}",
"public boolean gameOver(){\n\t\treturn this.lives < 1;\n\t}",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}",
"private boolean isOver() {\r\n return players.size() == 1;\r\n }",
"public boolean inBattle() {\r\n\t\t\treturn this.inBattle;\r\n\t\t}",
"boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }",
"public boolean isGameOver(){\n return checkKingReachedEnd() || checkNoDragonsLeft() || checkIfKingSurrounded();\n }",
"public boolean isOverState() {\n return overState;\n }",
"public boolean gameIsOver() {\r\n int cpt = 0;\r\n for (Player p : players) {\r\n if (p.getLife() > 0) {\r\n cpt++;\r\n }\r\n }\r\n return cpt==1;\r\n }",
"public synchronized boolean isGameOver() {\n\t\treturn gameOver;\n\n\t}",
"@Override\r\n public void checkWarGameOver(){\r\n if(this.checkOnePlayerDecksEmpty(0)){\r\n // Set gameOver flag to true\r\n this.isGameOver = true; \r\n \r\n }\r\n \r\n }",
"boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }",
"public boolean isGameOver() {\n\t\treturn this.b.isGameOver();\n\t}",
"public int getScenarioIsOver() {\n return scenarioIsOver;\n }",
"boolean GameOver() {\n\t\treturn player.isDead();\n\t}",
"public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }",
"public boolean isGameOver() {\n return isGameOver;\n }",
"public boolean isGameOver() {\r\n return this.isGameOver;\r\n }",
"public boolean isGameOver() {\n return (hasHeWon(computer) || hasHeWon(user) || getAvailableStates().isEmpty());\n }",
"public boolean hasWon(){\n boolean winStatus = false;\n if(balance >= 3000){\n winStatus = true;\n }\n return winStatus;\n }",
"private final String checkIfGameOver() {\n\t\tif(state.getGameOver()){\n\t\t\tint winner = state.getWinner();\n\t\t\tif(winner == CbgState.PLAYER_1){\n\t\t\t\treturn (\"Playre 1 won with \" + state.getScore(CbgState.PLAYER_1) + \" points.\");\n\t\t\t}\n\t\t\telse if(winner == CbgState.PLAYER_2){\n\t\t\t\treturn (\"Playre 2 won with \" + state.getScore(CbgState.PLAYER_1) + \" points.\");\n\t\t\t}\n\t\t\telse return \"ERROR\";//if something horrible happens\n\t\t}\n\n\t\treturn \"FALSE\";//if game is not over\n\n\t}",
"public boolean isOverhit()\n\t{\n\t\treturn overhit;\n\t}",
"public boolean isGameOver ()\n\t{\n\t\t return lives <= 0;\n\t}",
"@Override\n protected String checkIfGameOver() {\n if(state.isGameOver() == -1) {\n return \"Blue team wins\";\n } else if(state.isGameOver() == 1) {\n return \"Red team wins\";\n } else {\n return null;\n }\n }",
"public boolean gameOver()\n {\n boolean over = false;\n if (player1Hand.isEmpty()||player2Hand.isEmpty())\n {\n over = true;\n }\n return over;\n }",
"public boolean isGameOverDelayed() {\n return gameOver;\n }",
"private boolean isGameOver() {\n // either all black or all white pieces don't have any moves left, save\n // to internal field so that a delayed status is available\n gameOver = longestAvailableMoves(1, true).isEmpty() ||\n longestAvailableMoves(1, false).isEmpty();\n return gameOver;\n }",
"public boolean isGameOver() {\r\n\treturn false;\r\n }",
"@Override\n public boolean gameOver() {\n //true if the board full or a winner has been found\n return getWinner() != EMPTY || isBoardFull();\n }",
"public boolean isGameOver() {\n\t\treturn false;\n\t}",
"@Override\n public boolean gameOver() {\n return player1Wins() || player2Wins();\n }",
"public int gameOver(){\n\t\tfor(int i=0;i<3;i++){\n\t\t\tif(banmen[i][0]==1&&banmen[i][1]==1&&banmen[i][2]==1){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif(banmen[0][i]==1&&banmen[1][i]==1&&banmen[2][i]==1){\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\tif(banmen[i][0]==2&&banmen[i][1]==2&&banmen[i][2]==2){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t\tif(banmen[0][i]==2&&banmen[1][i]==2&&banmen[2][i]==2){\n\t\t\t\treturn 2;\n\t\t\t}\n\t\t}\n\t\tif(banmen[0][0]==1&&banmen[1][1]==1&&banmen[2][2]==1){\n\t\t\treturn 1;\n\t\t}\n\t\tif(banmen[0][2]==1&&banmen[1][1]==1&&banmen[2][0]==1){\n\t\t\treturn 1;\n\t\t}\n\t\tif(banmen[0][0]==2&&banmen[1][1]==2&&banmen[2][2]==2){\n\t\t\treturn 2;\n\t\t}\n\t\tif(banmen[0][2]==2&&banmen[1][1]==2&&banmen[2][0]==2){\n\t\t\treturn 2;\n\t\t}\n\t\tfor(int i=0;i<3;i++){\n\t\t\tfor(int j=0;j<3;j++){\n\t\t\t\tif(banmen[i][j]==0){\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"private void CheckFaintedPokemon() {\n \tif(user.getTeam(user.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\tuser.getTeam(user.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tbattleMessage.add(user.getTeam(user.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \tif(opponent.getTeam(opponent.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\topponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tCalculateXP(user.getTeam(),opponent.getTeam(opponent.getCurrentPokemonIndex()));\n \t\tbattleMessage.add(opponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \t\n }",
"private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }",
"public boolean isGameOver() {\r\n\t\treturn !getCurrentPlayingSpace().isBallsLeftOnTable();\r\n\t}",
"boolean getHealthy();",
"public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}",
"public boolean isGameOver()\n {\n if(bird.isOnTheFloor||gameOver||pipes.getWhereToDrawB().intersect(bird.getWhereToDraw())|| pipes.getWhereToDrawT().intersect(bird.getWhereToDraw()))\n {\n if(!gameOver){\n Music.playCrash(context);\n }\n gameOver=true;\n return gameOver;\n }\n return false;\n }",
"public boolean isRoundOver() {\n\t\tint numberOfLiving = 0;\n\t\tboolean nobodyHasAmmo = true;\n\t\t\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\t// The round is over if someone is dead\n\t\t\tif (tanks[i].isAlive()) {\n\t\t\t\tnumberOfLiving++;\n\t\t\t}\n\t\t\tnobodyHasAmmo &= tanks[i].getAmmo() == 0;\n\t\t}\n\t\t\n\t\t// Return true if one or none players are living, or stalemate\n\t\treturn numberOfLiving <= 1 || (nobodyHasAmmo && bullets.isEmpty());\n\t}",
"public boolean isOnFight();",
"public void gameOverCheck() {\n //users\n if (tankTroubleMap.getUsers().size() != 0) {\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getUsers().get(0).getGroupNumber());\n for (int i = 1; i < tankTroubleMap.getUsers().size(); i++) {\n if (tankTroubleMap.getUsers().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n //bots\n int firstBot = 0;\n if (tankTroubleMap.getBots().size() != 0) {\n if (tankTroubleMap.getWinnerGroup() == -1) {\n firstBot = 1;\n tankTroubleMap.setWinnerGroup(tankTroubleMap.getBots().get(0).getGroupNumber());\n }\n for (int i = firstBot; i < tankTroubleMap.getBots().size(); i++) {\n if (tankTroubleMap.getBots().get(i).getGroupNumber() != tankTroubleMap.getWinnerGroup())\n return;\n }\n }\n tankTroubleMap.setGameOver(true);\n }",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean isGameSpedUp();",
"public boolean isLevelOver() {\n\t\treturn waveControl.isLevelEnd();\n\t}",
"public boolean gameOver(){\r\n if(isGame) return (currentPlayer.getChecks() == 0 || nextPlayer.getChecks() == 0 || currentPlayer.getQueens() == 4 || nextPlayer.getQueens() == 4 || (currentPlayer.cantMove() && nextPlayer.cantMove()));\r\n return getNumChecks(WHITE) == 0 || getNumChecks(BLACK) == 0 || getNumQueens(WHITE) == 4 || getNumQueens(BLACK) == 4;\r\n }",
"public boolean hasWon() {\n return isGoal(curBoard);\n }",
"public boolean isGameOver() {\n if (gameStatus == null || gameStatus.getPlayerOne() == null || gameStatus.getPlayerTwo() == null) return false;\n return gameStatus.isTie()\n || gameStatus.getPlayerOne().equals(gameStatus.getWinner())\n || gameStatus.getPlayerTwo().equals(gameStatus.getWinner())\n || gameStatus.getPlayerOnePoints() == 0\n || gameStatus.getPlayerTwoPoints() == 0\n || (getWhoseTurn() == 1 && isPlayerMoveImpossible(1))\n || (getWhoseTurn() == 2 && isPlayerMoveImpossible(2));\n }",
"public static void battleStatus(){\n Program.terminal.println(\"________________TURN \"+ turn +\"________________\");\n Program.terminal.println(\"\");\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\" |Name:\"+ currentMonster.name);\n Program.terminal.println(\" |HP: \" + currentMonster.currentHp+\"/\"+currentMonster.hp);\n Program.terminal.println(\" |\" + barGauge(1));\n Program.terminal.println(\" +-------------------- \");\n Program.terminal.println(\"\");\n Program.terminal.println(\"My HP:\" + MainCharacter.hpNow +\"/\"+ MainCharacter.hpMax + \" \" + barGauge(2));\n Program.terminal.println(\"My MP:\" + MainCharacter.mpNow +\"/\"+ MainCharacter.mpMax + \" \" + barGauge(3));\n Program.terminal.println(\"\");\n askAction();\n }",
"@Override\n\tpublic boolean getIsOver();",
"public boolean isGameOver() {\n\t\treturn isBoardFull() || (isValidMoveAvailableForDisc(Disc.WHITE) == false &&\n\t\t\t\t\t\t\t\t\tisValidMoveAvailableForDisc(Disc.BLACK) == false);\n\t}",
"public boolean isGameOver() {\r\n if(timesAvoid == 3) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n }",
"public boolean isOver() {\n\t\t\n\t\tif(!dealer.hasCards()){\n\t\t\tisOver= true;\n\t\t\treturn isOver;\n\t\t}\n\t\t\n\t\tfor (Player p : players) {\n\t\t\tif (!p.hasCards()) {\n\t\t\t\tisOver = true;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn isOver;\n\t}",
"public boolean GameOver() {\r\n if(Main.player1.SuaVida()==0 || Main.player2.SuaVida()==0)\r\n return true;\r\n return false;\r\n }",
"public boolean isGameOver() {\n\t\treturn (lives <= 0);\n\t}",
"public Boolean gameIsOver(){\n\n if(playerShipDead || enemyShipDead){\n if(enemyShipDead && !(deathTriggered)){\n deathTriggered = true;\n playerScore += scoreToGain; //This will depend on the enemyShip's score amount. Only affects the display.\n playerGoldAmount += goldToGain;\n //playerShip.setPointsWorth(playerScore); // Doesn't work.\n }\n return true;\n } else {\n return false;\n }\n }",
"public boolean topPlayerWon() {\n return winner == 2;\n }",
"@Override\r\n\tpublic boolean isGameOver() {\n\t\treturn !( hasMoves( Seed.CROSS) || hasMoves( Seed.NOUGHT) );\r\n\t}",
"private boolean gameOver()\n {\n \t//lose case\n \tif (guess_number == 0)\n \t{\n \t\twin = false;\n \t\treturn true;\n \t}\n \t//win case\n \tif (mask.compareTo(word) == 0)\n \t{\n \t\twin = true;\n \t\treturn true;\n \t}\n \t\n \treturn false;\n }",
"public boolean isGameOver() {\n\t\treturn (movesLeft() == 0) || someoneQuit\n\t\t\t\t|| (winningPlayer != Game.GAME_NOT_OVER);\n\t}",
"private void gameOver() {\n\t\tgameOver=true;\n\t}",
"private boolean isOver() {\n for (Player player : players) {\n if (player.getHand().length == 0) {\n System.out.println(\"Player '\" + player.getName() + \"' won!\");\n winner = player.getID();\n return true;\n }\n }\n\n return false;\n }",
"boolean hasBonusHP();",
"public void isGameOver() { \r\n myGameOver = true;\r\n myGamePaused = true; \r\n }",
"public boolean gameOver(){\n\n\t\tif (score > highScore) {\n\t\t\thighScore = score;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}"
]
| [
"0.82399154",
"0.772624",
"0.7720861",
"0.7690286",
"0.7612658",
"0.7411291",
"0.7383918",
"0.7383918",
"0.7340194",
"0.73254883",
"0.73186576",
"0.7317525",
"0.729618",
"0.729618",
"0.72692055",
"0.72648865",
"0.72316694",
"0.7194031",
"0.7193211",
"0.71869236",
"0.71869236",
"0.7185798",
"0.71717536",
"0.71309316",
"0.71222794",
"0.7088203",
"0.706812",
"0.70539176",
"0.70456505",
"0.70456505",
"0.70456505",
"0.70456505",
"0.70456505",
"0.70456505",
"0.7013044",
"0.70108217",
"0.7008291",
"0.70036054",
"0.69988954",
"0.6991434",
"0.69857854",
"0.69813126",
"0.69494504",
"0.69476527",
"0.694383",
"0.69402856",
"0.6932152",
"0.6924477",
"0.6913948",
"0.6906261",
"0.69011253",
"0.6884344",
"0.6881689",
"0.68744916",
"0.68497497",
"0.6848494",
"0.68370354",
"0.6807424",
"0.6803589",
"0.67962986",
"0.67740697",
"0.677129",
"0.67672044",
"0.6719819",
"0.67009",
"0.66852415",
"0.66846496",
"0.6650285",
"0.66452247",
"0.6627179",
"0.66167355",
"0.6609995",
"0.66036904",
"0.6595974",
"0.6595974",
"0.6595974",
"0.6595974",
"0.6595974",
"0.6577495",
"0.65766776",
"0.65735066",
"0.65650105",
"0.6553621",
"0.65534884",
"0.6544131",
"0.6539102",
"0.6535763",
"0.6535667",
"0.65128845",
"0.651257",
"0.6489538",
"0.6484574",
"0.6476288",
"0.6472978",
"0.6455107",
"0.64447",
"0.6444396",
"0.64421165",
"0.6438745",
"0.64342195"
]
| 0.8184108 | 1 |
Returns if it is the player's turn or not. | public static boolean getIsPlayersTurn()
{
return isPlayersTurn;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isPlayerTurn() {\n return playerTurn;\n }",
"boolean isPlayerTurn();",
"public boolean isTurn() {\n\t\treturn turn;\n\t}",
"public boolean hasTurn() {\n\t\treturn world.getCurrentPlayer() == this;\n\t}",
"public boolean isTurn()\n\t{\n\t\treturn isTurn;\n\t}",
"private boolean isPlayerTurn(Move move) {\n return this.turn == move.getPlayer().getId();\n }",
"boolean isMyTurn();",
"public boolean isMyTurn() {\n if (gameStatus == null || userId == null) return false;\n return userId.equals(gameStatus.getActivePlayer());\n }",
"public boolean meTurn(){\n return (isWhite && isWhitePlayer) || (!isWhite && !isWhitePlayer);\n }",
"public boolean isTurned(){\n\treturn IS_TURNED;\n }",
"public boolean isAiTurn() {\n return whosTurn() == aiPlayer;\n }",
"@Override\n public boolean isLocalPlayersTurn() {\n return getTeam().equals(currentBoard.turn());\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public java.lang.Boolean isTurning();",
"private void checkIfMyTurn(boolean currPlayer) {\n gameService.setMyTurn(currPlayer);\n System.out.println();\n System.out.println(\"My turn now: \" + gameService.isMyTurn());\n\n if (! currPlayer) {\n gameService.setLabelTurnText(\"Wait for your turn.\");\n updateFields(gameService.receiveUpdates());\n } else {\n gameService.setLabelTurnText(\"Your turn!\");\n }\n }",
"private boolean passTurn() {\n\n\t\t// Return Boolean\n\t\tboolean ableToPassTurn = false;\n\n\t\tint playerOnTurn;\n\n\t\t// Get the playerID who is on turn\n\t\tplayerOnTurn = pTSM.playerOnTurn(gameID);\n\n\t\t// Check if the ID is equal to the playerID\n\t\ttry {\n\t\t\tif (playerOnTurn == this.userID && modelClass.gameIsWon(pTSM.getUsername(userID), gameID)) {\n\t\t\t\tthis.message = \"Het is niet jou beurt\";\n\t\t\t\tableToPassTurn = true;\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tif (playerOnTurn == this.userID) {\n\t\t\t\tableToPassTurn = true;\n\t\t\t}\n\t\t}\n\n\n\t\treturn ableToPassTurn;\n\t}",
"private static boolean canMove() {\n return GameManager.getCurrentTurn();\r\n }",
"@Override\r\n\t\tpublic boolean isPlayer() {\n\t\t\treturn state.isPlayer();\r\n\t\t}",
"public Player whosTurn() {\n return turn;\n }",
"public boolean isCrossTurn() {\r\n\t\treturn p1Turn;\r\n\t}",
"public Player getPlayerInTurn();",
"boolean CanFinishTurn();",
"public boolean extraTurn() {\n\t\tif (isPlayer1() && currentPit == 6 || !isPlayer1() && currentPit == 13) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isPlayer() {\n return player != null;\n }",
"public boolean isWinTurn() {\n for (int col = 0; col < mColsCount; col++) {\n if (isFourConnected(getCurrentPlayer(), 0, 1, 0, col, 0)\n || isFourConnected(getCurrentPlayer(), 1, 1, 0, col, 0)\n || isFourConnected(getCurrentPlayer(), -1, 1, 0, col, 0)) {\n hasWinner = true;\n return true;\n }\n }\n\n for (int row = 0; row < mRowsCount; row++) {\n if (isFourConnected(getCurrentPlayer(), 1, 0, row, 0, 0)\n || isFourConnected(getCurrentPlayer(), 1, 1, row, 0, 0)\n || isFourConnected(getCurrentPlayer(), -1, 1, row, mColsCount - 1, 0)) {\n hasWinner = true;\n return true;\n }\n }\n\n return false;\n }",
"public boolean isPass() {\n return playerMove != null && playerMove.getTypeOfChoice() == TypeOfChoiceEnum.PASS;\n }",
"public boolean hasFullyTurned() {\r\n return turningPID.onTarget();\r\n }",
"public boolean isHisTurn(UnoCard clickedCard) {\n\t\tfor (Player p : getPlayers()) {\n\t\t\tif (p.hasCard(clickedCard) && p.isMyTurn())\n\t\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public void checkSetPlayerTurn() // Check and if needed set the players turns so it is their turn.\n\t{\n\t\tswitch (totalPlayers) // Determine how many players there are...\n\t\t{\n\t\tcase 2: // For two players...\n\t\t\tswitch (gameState)\n\t\t\t{\n\t\t\tcase twoPlayersNowPlayerOnesTurn: // Make sure it's player one's turn.\n\t\t\t\tplayers.get(0).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\n\t\t\tcase twoPlayersNowPlayerTwosTurn: // Make sure it's player two's turn.\n\t\t\t\tplayers.get(1).setIsPlayerTurn(true);\n\t\t\t\tbreak;\t\t\t\t\t\t\t\n\t\t\t}\n\t\t}\n\n\t}",
"public boolean isOnPlayerOne() {\r\n\t\treturn onTraderOne;\r\n\t}",
"public boolean topPlayerWon() {\n return winner == 2;\n }",
"public Boolean getYourTurn() {\n return yourTurn;\n }",
"public boolean winner(){ \r\n\t\tif (rowWin() || colWin() || diagWin()){ \r\n\t\t\tchangeTurn(); \r\n\t\t\tSystem.out.println(\"Winner: \" + playerToString(currentTurn) + \"!\"); \r\n\t\t\treturn true; \r\n\t\t}\r\n\t\telse if (tie()){\r\n\t\t\tSystem.out.println(\"There is a tie.\");\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\telse{ \r\n\t\t\tSystem.out.println(\"No winner yet.\\n\"); \r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t}",
"public boolean canEndTurn(){\n\t\treturn moved;\n\n\t}",
"public boolean amIWinning(){\n if (playerScore > oppoScore) {\n return true;\n } else {\n return false;\n }\n }",
"public void setPlayerTurn(boolean playerTurn) {\n this.playerTurn = playerTurn;\n }",
"public int getWhoseTurn() {\n if (gameStatus == null || gameStatus.getActivePlayer() == null) return -1;\n if (gameStatus.getActivePlayer().equals(gameStatus.getPlayerOne())) return 1;\n if (gameStatus.getActivePlayer().equals(gameStatus.getPlayerTwo())) return 2;\n return -2;\n }",
"public abstract boolean isPlayer();",
"public boolean isSwitchingPlayerOneTime()\n {\n boolean change = changePlayerOneTime != null;\n changePlayerOneTime = null;\n return change;\n }",
"public boolean isPlayerInThisGame(Player player) {\n return player.equals(getRedPlayer()) || player.equals(getWhitePlayer());\n }",
"public void setIsTurn()\n\t{\n\t\tthis.isTurn = true;\n\t}",
"public boolean changeTurns(){\n return doesTurnChange;\n }",
"public String getPlayerTurn() {\n if (PlayerTurn) return this.NAME;\n else return null;\n }",
"public boolean isWinner() {\n\t\treturn winner;\n\t}",
"public int getPlayerTurn() {\r\n\t\treturn this.playerTurn;\r\n\t}",
"public boolean canEndTurn() {\n\t\tif (hasMoved || hasCaptured) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean checkForWin(){\n\t\t\n\t\tPlayer p = Game.getCurrPlayer();\n\t\t// if player made it to win area, player won\n\t\tif(p.won()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\t\t// if player is the last player on the board, player won\n\t\tif(numPlayers == 1 && !p.hasBeenKicked()){\n\t\t\tGame.gameWon = true;\n\t\t\tthis.network.sendWin();\n\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"public int playerTurn() {\n\t\treturn partita.getPlayerTurnNumber();\n\t}",
"public boolean playerWonGame(Player player) {\n if (playerWonGameWithDiagonalLine(player) || playerWonGameWithHorizontalLine(player)\n || playerWonGameWithVerticalLine(player)) {\n return true; \n }\n return false; \n \n }",
"boolean isPlayableInGame();",
"public boolean isDuringSportsActivity() {\n return (mStatus == 1);\n }",
"public boolean isHasPlayer() {\n\t\treturn HasPlayer;\n\t}",
"public Player getCurrentTurn() {\r\n\t\treturn this.currentTurn;\r\n\t}",
"@Override\n public int turn() {\n return moveOnTurn;\n }",
"public boolean gameWon(){\n\t\treturn Game.gameWon;\n\t}",
"@Override\n public boolean isPlayer() {\n return super.isPlayer();\n }",
"public void changeTurn()\r\n {\r\n isPlayersTurn = !isPlayersTurn;\r\n }",
"public boolean hasMoved(){\n\t\treturn getGame().getCurrentPlayer().hasMoved();\n\t}",
"public boolean whoIsHere(){\r\n\t\treturn otherPlayer;\r\n\t}",
"boolean isTurnedFaceUp();",
"public boolean isPlayer1() {\n\t\treturn currentPlayer.equals(player1);\n\t}",
"public boolean getPlayerState()\n\t{\n\t\treturn blnPlayerState;\n\t\t\n\t}",
"@Override\n\tpublic boolean playerWon() {\n\t\treturn lastPlayerWin;\n\t}",
"public boolean isGameDraw() {\n if (this.winner == 0 && isBoardFull() && this.gameStarted) {\n return true; \n }\n return false; \n }",
"public PlayerColor turn() {\n return board.getTurn();\n }",
"@Override\n public boolean isWaitingForTurnPhase() {return true;}",
"private boolean turnIfNeeded() {\n\t\tif (needToTurn()) {\n\t\t\tturnToDesiredDirection();\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isSetPlayer() {\n return this.player != null;\n }",
"public boolean didLastMoveWin(){\n\t\tboolean flag=false;\n\t\tif(horizontalWin()){\n\t\t\tSystem.out.println(\"You Won\");\n\t\t\tflag=true;\n\t\t}\n\t\tif(verticalWin()){\n\t\t\tSystem.out.println(\"You Won\");\n\t\t\tflag=true;\n\t\t}\n\t\tif(diagonalWin()){\n\t\t\tSystem.out.println(\"You Won\");\n\t\t\tflag=true;\n\t\t}\n\t\treturn flag;\n\t}",
"public static boolean isGameWon() {\r\n\t\tboolean gameWon = false;\r\n\t\t\r\n\t\t//Game won for three handed game.\r\n\t\tif (Main.isThreeHanded){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player2Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player3Score) >= Main.winScoreNumb) {\r\n\t\t\t\tgameWon = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Game won for four handed single player game.\r\n\t\tif (Main.isFourHandedSingle){\r\n\t\t\tif (Utils.stringToInt(Main.player1Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player2Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player3Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.player4Score) >= Main.winScoreNumb) {\r\n\t\t\t\tgameWon = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Game won for four handed team game.\r\n\t\tif (Main.isFourHandedTeams){\r\n\t\t\tif (Utils.stringToInt(Main.team1Score) >= Main.winScoreNumb ||\r\n\t\t\t\t\tUtils.stringToInt(Main.team2Score) >= Main.winScoreNumb) {\r\n\t\t\t\tgameWon = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t//Set Main variable.\r\n\t\tMain.isGameWon = gameWon;\r\n\t\t\r\n\t\treturn gameWon;\r\n\t}",
"public boolean isColumnPlayed(int column){\n return board[0][column].isPlayed();\n }",
"private boolean playerWonGameWithDiagonalLine(Player player) {\n char playerSymbol = player.getType();\n if (boardState[0][0] == playerSymbol && boardState[1][1] == playerSymbol \n && boardState[2][2] == playerSymbol) {\n return true; \n } else if (boardState[0][2] == playerSymbol && boardState[1][1] == playerSymbol \n && boardState[2][0] == playerSymbol) {\n return true; \n }\n return false; \n }",
"public boolean playerWins(){\n return playerFoundTreasure(curPlayerRow, curPlayerCol);\n }",
"public boolean isCurrentPlayer() {\n return playerStatus.isActive;\n }",
"public boolean isPlayerAlive() {\r\n\t\treturn !(this.getRobotsAlive().isEmpty());\r\n\t}",
"public boolean isWon() {\r\n\t\tif (winner(CROSS) || winner(NOUGHT))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"public boolean hasWon() {\n return isGoal(curBoard);\n }",
"public boolean isBot() {\n \t\treturn (type == PLAYER_BOT);\n \t}",
"boolean isGameSpedUp();",
"public Boolean getGameWon(){\n\t\treturn m_gameWon;\n\t\t\n\t}",
"public final boolean checkForWin() {\r\n boolean result = false;\r\n String player = \"\";\r\n \r\n for (Rail rail : rails) {\r\n if (rail.isWinner()) {\r\n result = true;\r\n for(Tile tile : rail.getTiles()) {\r\n tile.setBackground(Color.GREEN);\r\n player = tile.getText();\r\n }\r\n if (player.equals(\"X\")) {\r\n winningPlayer = \"X\";\r\n this.xWins++;\r\n } else if (player.equals(\"0\")) {\r\n winningPlayer = \"0\";\r\n this.oWins++;\r\n }\r\n break;\r\n }\r\n }\r\n \r\n return result;\r\n }",
"public boolean playGame() {\n\t\tboolean movePlayed = false;\n\t\twhile (!gameOver) {\n\t\t\tSystem.out.println(board);\n\t\t\tmovePlayed = false;\n\t\t\twhile(!movePlayed) {\n\t\t\t\ttry {\n\t\t\t\t\tplayNextTurn();\n\t\t\t\t\tmovePlayed = true;\n\t\t\t\t}\n\t\t\t\tcatch (RuntimeException e) {\n\t\t\t\t\tSystem.out.println(\"Error: \" + e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tthis.checkWin = board.checkWin();\n\t\treturn true;\n\t}",
"public boolean isGameOver() {\n if (!isFirstTurn) {\n if (state.score().totalPoints(TeamId.TEAM_1)>=Jass.WINNING_POINTS||state.score().totalPoints(TeamId.TEAM_2)>=Jass.WINNING_POINTS) {\n return true;\n }\n else {\n return false;\n }\n } \n else {return false;}\n }",
"public boolean isTie() {\n if (gameStatus == null) return false;\n return gameStatus.isTie()\n || (gameStatus.getPlayerOnePoints() != -1\n && gameStatus.getPlayerOnePoints() == gameStatus.getPlayerTwoPoints()\n && isGameOver()\n && gameStatus.getWinner() == null);\n }",
"public boolean getPlayerOne()\n\t{\n\t\treturn playerOne;\n\t}",
"public boolean hasGameEnded() {\n return winner != 0;\n }",
"public boolean isCycleOver(){\n if(playersTurns.isEmpty()) {\n eventListener.addEventObject(new RoundEvent(EventNamesConstants.RoundEnded));\n return true;\n }\n return false;\n }",
"public boolean won()\n {\n if (currentScore >= PigGame.GOAL)\n {\n return true;\n }\n \n else\n {\n return false;\n }\n }",
"public boolean isWon() {\n return getWinningScenario() != null;\n }",
"public boolean playerTurn(int col, int row, String pSymbol){\n Coordinates guess = new Coordinates(row, col);\n\n makeMove(guess, pSymbol);\n totalmoves++;\n boolean win = isWinner(guess,pSymbol);\n System.out.println(toString());\n if (win){\n if(pSymbol == \"X\"){\n wins1++;\n losses2++;\n }\n else{\n losses1++;\n wins2++;\n }\n }\n else if(totalmoves==9){\n losses1++;\n losses2++;\n win = false;\n System.out.println(\"Scratch game, both players lose\");\n }\n return win;\n }",
"private boolean checkIfGameIsWon() {\n\t\t//loop through rows\n\t\tfor (int i = 0; i < NUMBER_OF_ROWS; i++) {\n\t\t\t//gameIsWon = this.quartoBoard.checkRow(i);\n\t\t\tif (this.quartoBoard.checkRow(i)) {\n\t\t\t\tSystem.out.println(\"Win via row: \" + (i) + \" (zero-indexed)\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//loop through columns\n\t\tfor (int i = 0; i < NUMBER_OF_COLUMNS; i++) {\n\t\t\t//gameIsWon = this.quartoBoard.checkColumn(i);\n\t\t\tif (this.quartoBoard.checkColumn(i)) {\n\t\t\t\tSystem.out.println(\"Win via column: \" + (i) + \" (zero-indexed)\");\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//check Diagonals\n\t\tif (this.quartoBoard.checkDiagonals()) {\n\t\t\tSystem.out.println(\"Win via diagonal\");\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public boolean winner() {\r\n return winner;\r\n }",
"public boolean isWin() {\n return win;\n }",
"public boolean isInGame() {\n return this.hasStarted;\n }",
"public static boolean isGameFinished() {\n return mafiaIsWinner() || citizenIsWinner();\n }",
"int getTurn();",
"public boolean isWin() {\n if (chosen_door.getContains() == Contains.CAR) {\n return true;\n }\n return false;\n }",
"@Override\n\tpublic int getPlayerTurn() {\n\t\treturn super.getPlayerTurn();\n\t}",
"@Override\n\tpublic boolean nextPlayersTurn(int currentTurn, int startRow, int startCol, int endRow, int endCol) {\n\t\tif (currentTurn % player2.turn == 0) {\n\t\t\tSystem.out.println(\"****YEE-HAW! ITS PLAYER 2'S TURN*****\");\n\t\t\texecuteMove(player2, player1, state.gameBoard, currentTurn, startRow, startCol, endRow, endCol);\n\t\t} else {\n\t\t\tSystem.out.println(\"****YEE-HAW! ITS PLAYER 2'S TURN*****\");\n\t\t\texecuteMove(player1, player2, state.gameBoard, currentTurn, startRow, startCol, endRow, endCol);\n\t\t}\n\t\treturn continueGame;\n}",
"public boolean isWin() {\n\t\t\n\t\tboolean win = true;\n\t\t\n\t\tfor(int i = 0; i < numTiles - 2; i++) {\n\t\t\twin = win && (boardConfig[i] < boardConfig[i+1]);\n\t\t}\n\t\t\n\t\twin = win && (boardConfig[numTiles - 1] == 0);\n\t\t\n\t\treturn win;\n\t}",
"public boolean isConnectedToGame() {\n return this.isConnectedToGame;\n }"
]
| [
"0.8689199",
"0.85333693",
"0.8314537",
"0.82655275",
"0.82483774",
"0.7946624",
"0.79086375",
"0.7897414",
"0.78099525",
"0.78011847",
"0.7607947",
"0.7566761",
"0.7263912",
"0.7183083",
"0.717374",
"0.7097463",
"0.7067914",
"0.7044047",
"0.6992375",
"0.6973166",
"0.6963454",
"0.6954259",
"0.69195324",
"0.6908777",
"0.6884366",
"0.6871873",
"0.6793641",
"0.67920375",
"0.67853653",
"0.6750009",
"0.6713941",
"0.6686768",
"0.66560286",
"0.66488963",
"0.6629913",
"0.66281796",
"0.661099",
"0.65934104",
"0.65776134",
"0.6548842",
"0.654377",
"0.65425956",
"0.6539392",
"0.65389365",
"0.653833",
"0.65226555",
"0.65138596",
"0.64814377",
"0.6468715",
"0.6467441",
"0.64642614",
"0.6443588",
"0.642328",
"0.64214456",
"0.64004683",
"0.63926494",
"0.63811296",
"0.6371899",
"0.63449484",
"0.63431126",
"0.6343028",
"0.6330335",
"0.6318076",
"0.6311409",
"0.6293326",
"0.6293005",
"0.62747604",
"0.6273071",
"0.62695074",
"0.6265179",
"0.6256768",
"0.6229868",
"0.6225149",
"0.62173814",
"0.6215822",
"0.6205216",
"0.62041783",
"0.6203482",
"0.6199895",
"0.61997586",
"0.6193742",
"0.61806667",
"0.61796033",
"0.6175664",
"0.61742353",
"0.6160273",
"0.6160158",
"0.6154017",
"0.6150257",
"0.6139811",
"0.61346966",
"0.61339694",
"0.61326534",
"0.6131423",
"0.6128867",
"0.61276394",
"0.6127501",
"0.6124412",
"0.6121048",
"0.612038"
]
| 0.8198313 | 5 |
Returns a random boolean. | public boolean getRandomBoolean()
{
return Math.random() < 0.5;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static boolean randomBoolean() {\n\t\treturn RANDOMIZER.nextBoolean();\n\t}",
"public static boolean estraiBoolean() {\n return rand.nextBoolean();\n }",
"public abstract boolean isRandom();",
"Boolean getRandomize();",
"public boolean isRandom(){\r\n\t\treturn isRandom;\r\n\t}",
"@Override\n public boolean getBoolean(String key) {\n return random.nextInt(BOOLEAN_RANDOM_BOUND) == 1;\n }",
"@Override\n public boolean run() {\n return new Random().nextBoolean();\n }",
"private static Stream<Boolean> randomBooleans() {\n Random random = new Random();\n return Stream.generate(random::nextBoolean).limit(MAX);\n}",
"public boolean nextBoolean(){\r\n\t\treturn (nextInt() & 0x10) == 0;\r\n\t}",
"public boolean hasRandomMode()\r\n {\r\n return (random == Toggle.On);\r\n }",
"public void SetRandom(boolean random);",
"public boolean isGenerateRandomly() {\n\t\treturn generateRandomly;\n\t}",
"public boolean generate();",
"public boolean DoBlackMagic()\n{\n\tRandom generator=new Random();\n\tint result=generator.nextInt(4);\n\tif(result==0)\n\t{\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n\n}",
"boolean hasRandomKey();",
"public static boolean isPresent() {\n // random genrate\n //double ranValue = Math.floor(Math.random() * 10 ) % 3;\n //int ranValue = 0/1;\n return 1 == new Random().nextInt(1000)%2;\n }",
"public void setRandom(boolean random){\n this.random = random;\n }",
"public static boolean chance() {\r\n Random rand = new Random();\r\n int chance = rand.nextInt(10);\r\n return chance > 5;\r\n }",
"public static boolean getEncerado() {\r\n\treturn (Math.random() >= 0.5);\r\n }",
"public static boolean inputBoolean()\n\t{\n\t\treturn(sc.nextBoolean());\n\t}",
"public Random getRandom() {\n\t\treturn (rand);\n\t}",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"BooleanValue createBooleanValue();",
"boolean booleanOf();",
"@Override\n\tpublic boolean isRandomizable() {\n\t\treturn false;\n\t}",
"protected Boolean generateBooleanValue(final String key) {\n Number genValue = !seqGenerators.containsKey(key) ? 0 : seqGenerators.get(key).nextValue();\n if (genValue == null) {\n return null;\n } else {\n int result = Math.max(0, genValue.intValue());\n return result != 1;\n }\n }",
"public boolean getRandomizeAndStratify() {\n return m_randomizeAndStratify;\n }",
"public void setRandomlyEnabled(boolean randomlyEnabled) {\n isRandomlyEnabled = randomlyEnabled;\n }",
"private Random rand()\n\t{\n\t\treturn new Random();\n\t}",
"boolean getBoolValue();",
"boolean getBoolValue();",
"Randomizer getRandomizer();",
"public static boolean chance(int prob) {\n Random random = new Random();\n return random.nextInt(prob) == 1;\n // Do I really need to explain this??\n }",
"public static int randomNext() { return 0; }",
"private void chooseRandomTweet() {\n if (random.nextBoolean()) {\n realTweet = true;\n displayRandomTrumpTweet();\n } else {\n realTweet = false;\n displayRandomFakeTweet();\n }\n }",
"boolean getBoolean();",
"boolean getBoolean();",
"void setRandomize(Boolean setting);",
"@java.lang.Override\n public boolean hasRandomSampling() {\n return randomSampling_ != null;\n }",
"private boolean learning()\r\n\t{\r\n\t\tint temp = (int) (Math.random() * 100);\t\t//generate a random int between 0-100\r\n\t\tif(temp<=intelligence)\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"public S getRandomState();",
"private double getRandom() {\n return 2*Math.random() - 1;\n }",
"public abstract boolean read_boolean();",
"public boolean hasRandomSampling() {\n return randomSamplingBuilder_ != null || randomSampling_ != null;\n }",
"boolean isAlwaysTrue();",
"BoolConstant createBoolConstant();",
"public Boolean isTransmissionEffective() { return random.nextDouble() < transmissionProb; }",
"boolean readBoolean();",
"public boolean shuffleNeeded();",
"protected boolean teleportRandomly() {\n double x = this.posX + (this.rand.nextDouble() - 0.5) * 64.0;\n double y = this.posY + (this.rand.nextInt(64) - 32);\n double z = this.posZ + (this.rand.nextDouble() - 0.5) * 64.0;\n return this.teleportTo(x, y, z);\n }",
"public boolean isRandomStartImage() {\n return randomStatImage;\n }",
"public static boolean getBooleanTrue() {\n boolean returnValue = false;\n return returnValue;\n }",
"private boolean setIsSuccessful() {\n\t\tisSuccessful = false;\n\t\tRandom rand = new Random();\n\t\tint val = rand.nextInt(50);\n\t\tif (val % 2 == 0) {\n\t\t\tisSuccessful = true;\n\t\t}\n\t\treturn isSuccessful;\n\t}",
"protected Random get_rand_value()\n {\n return rand;\n }",
"abstract public boolean getAsBoolean();",
"public boolean muerteInesperada() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probMuerte) <= 0;\r\n }",
"@Override\n\t\tpublic boolean CheckIfRealPerson(Customer customer) {\n\t\t\tRandom r=new Random();\n\t\t\tint sayi=r.nextInt(3);\n\t\t\tif(sayi==1) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\telse {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}",
"public boolean isRandomPerm()\n\t{\n\t\tboolean[] bins = new boolean[arraySize];\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tbins[index] = false;\n\t\t}\n\t\tfor (int index = 0; index < arraySize; index++)\n\t\t{\n\t\t\tif (bins[array[index] - 1])\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t} \n\t\t\tbins[array[index] - 1] = true;\n\t\t}\n\t\treturn true;\n\t}",
"public void randomiseBinary()\r\n\t{\r\n\t\tfor (int i = 0; i < binary.length; i++)\r\n\t\t\tbinary[i] = Math.random() >= 0.5;\r\n\t}",
"@Test\n public void testGetInsulatedBool()\n {\n System.out.println(\"getInsulatedBool\");\n PipeTypeFour instance = new PipeTypeFour(1,39, PipeGrade.THREE, false);;\n boolean expResult = true;\n boolean result = instance.getInsulatedBool();\n assertEquals(expResult, result);\n }",
"boolean getValue();",
"public Boolean asBoolean();",
"boolean isBeating();",
"public static boolean isTrue(double percentage) {\n\t\tdouble d = Math.random();\n\t\tpercentage = percentage / 100.0;\n\t\tif(d <= percentage) {\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean getBoolean();",
"public double getRandom(){\n\t\treturn random.nextDouble();\n\t}",
"private boolean isApproved() {\r\n if (rnd.nextInt(10) < 5) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n\r\n }",
"private void random() {\n\n\t}",
"public RubyBoolean getTrue() {\n return trueObject;\n }",
"boolean hasBoolValue();",
"@ProgrammaticProperty\n public void setRandomizeAndStratify(boolean r) {\n m_randomizeAndStratify = r;\n }",
"public boolean[] getRandom(int difficulty){\n boolean[] spawn = new boolean[COLS];\n for (int i = 0; i < COLS; i++) {\n spawn[i] = (Math.random()) > 0.5 ? true : false;\n }\n return spawn;\n }",
"public boolean reproducirse() {\n r = new Random();\r\n return Float.compare(r.nextFloat(), probReproducirse) <= 0;\r\n }",
"public boolean randomCreate() {\n\t\t// Generates a random genetic code\n\t\t_geneticCode = new GeneticCode();\n\t\t// it has no parent\n\t\t_parentID = -1;\n\t\t_generation = 1;\n\t\t_growthRatio = 16;\n\t\t// initial energy\n\t\t_energy = Math.min(Utils.INITIAL_ENERGY,_world.getCO2());\n\t\t_world.decreaseCO2(_energy);\n\t\t_world.addO2(_energy);\n\t\t// initialize\n\t\tcreate();\n\t\tsymmetric();\n\t\t// put it in the world\n\t\treturn placeRandom();\n\t}",
"public boolean shouldExecute() {\n return ShulkerEntity.this.getAttackTarget() == null && ShulkerEntity.this.rand.nextInt(40) == 0;\n }",
"private double getRandomNumber(){\n double rand = Math.random();//produce a number between 0 and 1\n rand = rand - 0.5;\n return rand;\n }",
"public static double random() {\r\n return uniform();\r\n }",
"Boolean getCompletelyCorrect();",
"public abstract boolean deterministic () ;",
"boolean hasBool();",
"public static String randomAdjective()\n {\n boolean positive = Math.random() < .5;\n if(positive){\n return randomPositiveAdj();\n } else {\n return randomNegativeAdj();\n }\n }",
"@Override\r\n\tpublic boolean wasIncident() {\r\n\t\tdouble random = Math.random()*100;\r\n\t\tif(random<=25) return true;\r\n\t\treturn false;\r\n\t}",
"public boolean getShuffle() {\n\t\treturn this.shuffle;\n\t}",
"public static boolean randomChance(double percentChance) {\n return (ThreadLocalRandom.current().nextDouble() < percentChance) || DebugCommands.isDebugMode();\n }",
"public void randomChange() {\n\t\tif (Math.random() < .5) {\n\t\t\tthis.setOn(true);\n\t\t} else {\n\t\t\tthis.setOn(false);\n\t\t}\n\t}",
"public static boolean charRNG() { // Character randoms initilization\n Random randomN = new Random();\n \n int speedP1 = randomN.nextInt(5) + 1; // Super 1\n int speedP2 = randomN.nextInt(5) + 1;\n \n int defP1 = randomN.nextInt(5) + 1; // Super 2\n int defP2 = randomN.nextInt(5) + 1;\n \n int attackP1 = randomN.nextInt(5) + 1; // Super 3\n int attackP2 = randomN.nextInt(5) + 1;\n \n int P1stats = ((speedP1 + defP1) + attackP1);\n int P2stats = ((speedP2 + defP2) + attackP2);\n \n return (P1stats > P2stats);\n }",
"public boolean isSeed() {\r\n\t\treturn isSeed;\r\n\t}",
"boolean hasTestFlag();",
"public User getRandom () {\n\t\treturn User.find(\n\t\t \"user_id != ? and online = ? order by rand()\", this.user_id, true\n\t\t).first();\n\t}",
"public static int getRandom() \n\t{\n\t\treturn rGenerator.nextInt();\n\t}",
"public static boolean purge(){\r\n if((Math.random()*1000)<5) return true;\r\n return false;\r\n }",
"public boolean hasPower(){\n \thasPowerUp=false;\n \tRandom rand = new Random();\n \tint num = rand.nextInt(6);//one in six chance of getting power up\n \tif(num==0){\n \t\thasPowerUp=true;\n \t}\n \treturn hasPowerUp;\n }",
"public static Value makeBool(boolean b) {\n if (b)\n return theBoolTrue;\n else\n return theBoolFalse;\n }",
"boolean getQuick();",
"public void setGenerateRandomly(boolean generateRandomly) {\n\t\tthis.generateRandomly = generateRandomly;\n\t}",
"public Boolean IsNormally() {\n Random r = new Random();\n int k = r.nextInt(100);\n //5%\n if (k <= 5) {\n normally++;\n return true;\n }\n return false;\n }",
"public boolean getValue();",
"private void functionalInterfacesForBoolean() {\n BooleanSupplier b1 = () -> true;\n BooleanSupplier b2 = () -> Math.random() > .5;\n }"
]
| [
"0.90167767",
"0.8231669",
"0.797162",
"0.78927135",
"0.7673291",
"0.75488746",
"0.7539907",
"0.7455722",
"0.74554336",
"0.74121475",
"0.6998659",
"0.69526774",
"0.683458",
"0.6709639",
"0.6689553",
"0.66810143",
"0.6562109",
"0.6523621",
"0.64761615",
"0.6470238",
"0.64232665",
"0.638937",
"0.638937",
"0.638937",
"0.638937",
"0.63706267",
"0.6367997",
"0.6360177",
"0.6236684",
"0.61805254",
"0.6166897",
"0.61402726",
"0.61402726",
"0.6109238",
"0.60017586",
"0.59923905",
"0.5952033",
"0.5950625",
"0.5950625",
"0.5945901",
"0.59274673",
"0.5917524",
"0.59062517",
"0.5902113",
"0.58992857",
"0.589796",
"0.58918595",
"0.5866008",
"0.5830465",
"0.5823239",
"0.5820658",
"0.5814903",
"0.5814385",
"0.58135784",
"0.5812863",
"0.5807658",
"0.58012354",
"0.5778912",
"0.5774491",
"0.57717687",
"0.57639086",
"0.57592446",
"0.57537514",
"0.574585",
"0.574506",
"0.5731461",
"0.571807",
"0.5709383",
"0.5698689",
"0.56930244",
"0.56893146",
"0.56873345",
"0.56838727",
"0.56828725",
"0.56791973",
"0.56653243",
"0.5662296",
"0.5651783",
"0.5650443",
"0.5630295",
"0.56200796",
"0.56091017",
"0.56069195",
"0.55945015",
"0.55911183",
"0.5587809",
"0.55872595",
"0.55864483",
"0.55823255",
"0.5578657",
"0.55755997",
"0.556272",
"0.55607986",
"0.55407995",
"0.55357397",
"0.55321234",
"0.5520812",
"0.5512227",
"0.55096143",
"0.5508359"
]
| 0.8398797 | 1 |
Returns if the battle is against a wild pokemon or not. | public boolean getWildPokemon()
{
return wildPokemon;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasPokemon();",
"boolean hasActivePokemon();",
"boolean hasPokemonDisplay();",
"public final boolean isWild() {\n/* 165 */ return this.m_wild;\n/* */ }",
"boolean gameOver() {\n return piecesContiguous(BP) || piecesContiguous(WP);\n }",
"private void CheckFaintedPokemon() {\n \tif(user.getTeam(user.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\tuser.getTeam(user.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tbattleMessage.add(user.getTeam(user.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \tif(opponent.getTeam(opponent.getCurrentPokemonIndex()).getStats().getStatus()==Status.FNT){\n \t\topponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().setUsedInBattle(false);\n \t\tCalculateXP(user.getTeam(),opponent.getTeam(opponent.getCurrentPokemonIndex()));\n \t\tbattleMessage.add(opponent.getTeam(opponent.getCurrentPokemonIndex()).getInfo().getNickname()+\" has lost the battle. \");\n \t\tbattleOver=true;\n \t}\n \t\n }",
"public boolean throwPokeball(AbstractPokemon wildPokemon)\n {\n System.out.println(toString() + \" threw a \" + pokeball.toString() + \"!\");\n int ballFactor = pokeball.getFactor();\n if(pokeball instanceof Masterball)\n return true;\n int d = wildPokemon.getCatchRate() / ballFactor;\n if (d >= 256)\n return false;\n else\n {\n int pokemonsHP = wildPokemon.getHealth();\n if (pokemonsHP == 0)\n pokemonsHP = 4;\n int factor1 = (wildPokemon.getMaxHealth() * 255) / ballFactor;\n int factor2 = wildPokemon.getHealth() / 4;\n if (factor2 == 0)\n factor2 = 1;\n int factorTotal = factor1 / factor2;\n if (factorTotal > 255)\n factorTotal = 255;\n int probabilityOfCapture = (d * factorTotal) / 255;\n if (probabilityOfCapture > 70)\n return true;\n else\n return false;\n }\n }",
"@java.lang.Override\n public boolean hasActivePokemon() {\n return activePokemon_ != null;\n }",
"public boolean isBlackHole(){\r\n\t\tboolean flag = false;\r\n\t\tif (isSuperGiant() == true){\r\n\t\t\tflag = true;\r\n\t\t}\r\n\t\treturn flag;\r\n\t}",
"boolean gameOver() {\n return piecesContiguous(BLACK) || piecesContiguous(WHITE);\n }",
"public boolean isBattleOver(){\n\n if(battleEnemies.size() == 0) {\n System.out.println(\"Battle over all enemies dead\");\n findDefeated();\n cleanStatuses();\n result = true;\n\n return true;\n }\n if(character.getCurrHP() <= 0){\n System.out.println(\"Battle over character has died\");\n //findDefeated();\n cleanStatuses();\n result = false;\n\n return true;\n }\n //System.out.printf(\"remaining enemies: %s\\n\", battleEnemies.size());\n return false;\n }",
"boolean checkPsychicEnergy(AbstractPsychicPokemon pokemon);",
"public boolean isBattleOver() {\n\t\treturn battleOver;\n\t}",
"private boolean isCreateBattle() {\r\n int percent = ConfigUtil.getConfigInteger(\"battlePercent\", 30);\r\n if(RandomUtil.nextInt(100) < percent){\r\n return true;\r\n }\r\n return false;\r\n }",
"public static boolean isSomethingToAttackDefined() {\n\t\treturn _attackTargetUnit != null && !_attackTargetUnit.getType().isOnGeyser();\n\t}",
"@java.lang.Override\n public boolean hasPokemonDisplay() {\n return pokemonDisplay_ != null;\n }",
"public boolean hasActivePokemon() {\n return activePokemonBuilder_ != null || activePokemon_ != null;\n }",
"public boolean isCurrentPlayerHungry() {\r\n\tboolean isHungry = true;\r\n\tint length = this.territory[this.currentSide].length;\r\n\tfor (short i = 0; i < length && isHungry; i++) {\r\n\t isHungry = (this.territory[this.currentSide][i] == 0);\r\n\t}\r\n\r\n\treturn isHungry;\r\n }",
"private boolean checkVictory(){\r\n boolean wins = true;\r\n for (int i = 0; i < hidden.length; i++){\r\n if (hidden[i] == '_'){\r\n wins = false;\r\n }\r\n }\r\n return wins;\r\n }",
"@Override\n public boolean shouldHeal(ActivePokemon p) {\n return p.hasStatus();\n }",
"@Override\n public boolean shouldHeal(ActivePokemon p) {\n return p.hasStatus();\n }",
"private boolean isAtFish(){\n final RSNPC[] fishing_spots = NPCs.findNearest(\"Fishing spot\");\n if (fishing_spots.length < 1){\n return false;\n }\n return fishing_spots[0].isOnScreen();\n }",
"boolean hasMaxHP();",
"boolean hasMaxHP();",
"boolean hasMaxHP();",
"boolean hasMaxHP();",
"boolean hasMaxHP();",
"boolean hasMaxHP();",
"public boolean hasWon() {\n return isGoal(curBoard);\n }",
"public boolean canPung(int tile) {\n\t\tint[] numbers = getTileNumbers();\n\t\tint instances = TileAnalyser.in(tile, numbers);\n\t\treturn instances>1;\n\t}",
"public boolean isSunk(){\n if(places.isEmpty()){\n //ship cant be sunk if empty\n return false;\n }\n\n //Checks each place in list for hit\n for(Place place : places){\n if(!place.isHit()){\n return false;\n }\n }\n return true;\n }",
"boolean checkFighterEnergy(AbstractFighterPokemon pokemon);",
"boolean hasBonusHP();",
"public boolean isRoundOver() {\n\t\tint numberOfLiving = 0;\n\t\tboolean nobodyHasAmmo = true;\n\t\t\n\t\tfor (int i = 0; i < players.length; i++) {\n\t\t\t// The round is over if someone is dead\n\t\t\tif (tanks[i].isAlive()) {\n\t\t\t\tnumberOfLiving++;\n\t\t\t}\n\t\t\tnobodyHasAmmo &= tanks[i].getAmmo() == 0;\n\t\t}\n\t\t\n\t\t// Return true if one or none players are living, or stalemate\n\t\treturn numberOfLiving <= 1 || (nobodyHasAmmo && bullets.isEmpty());\n\t}",
"public boolean canHit() {\n\t\treturn this.hand.countValue().first() < 17;\n\t}",
"public boolean checkForTreasure(){\n Object obj=charactersOccupiedTheLocation[3];\n if(obj!=null){return true;}\n return false; \n }",
"public boolean isGoal() {\n\t\treturn hamming == 0;\n\t}",
"public boolean inBattle() {\r\n\t\t\treturn this.inBattle;\r\n\t\t}",
"public boolean isGoal() {\n return hamming == 0;\n }",
"private boolean canChooseWildDrawCardPenalty(Player nextPlayer) {\n boolean can = false;\n for (Card temp : nextPlayer.getCards()) {\n if (temp instanceof WildDrawCard) {\n can = true;\n break;\n }\n }\n if (!can) {\n System.out.println(\"The next player was fined.\");\n }\n return can;\n }",
"public boolean hasPokemonDisplay() {\n return pokemonDisplayBuilder_ != null || pokemonDisplay_ != null;\n }",
"private boolean checkNearbyVillagers() {\n\t\tIterator<Integer> it = sprites.keySet().iterator();\n\t\twhile (it.hasNext()) {\n\t\t\tSprite as = sprites.get(it.next());\n\t\t\tif (as instanceof Villager) {\n\t\t\t\tVillager v = (Villager) as;\n\t\t\t\tif (v.checkTalkable(player.pos, player.direction)) {\n\t\t\t\t\treturn executeTalkableVillager(v);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"public boolean isGoal() {\n return hamming() == 0;\n }",
"boolean checkWaterEnergy(AbstractWaterPokemon pokemon);",
"public boolean getIsBattleOver()\r\n {\r\n return isBattleOver;\r\n }",
"public boolean isBomb() {\n return type.equalsIgnoreCase(\"bomb\");\n }",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"boolean hasDamage();",
"public boolean mayPickup(Player debug1) {\n/* 112 */ return true;\n/* */ }",
"public boolean isGoal() {\n return humming() = 0;\n }",
"public boolean isFailed() {\n return candyName.equals(\"\") && pokemonHP == 10 && pokemonCP == 10;\r\n }",
"boolean hasBonusPercentHP();",
"public boolean hasJumpBoosters() {\n boolean jumpBoosters = false;\n for (Mounted mEquip : getMisc()) {\n MiscType mtype = (MiscType) mEquip.getType();\n if (mtype.hasFlag(MiscType.F_JUMP_BOOSTER)) {\n\n // one crit destroyed they all all screwed\n // --Torren\n if (mEquip.isBreached() || mEquip.isDestroyed() || mEquip.isMissing()) {\n return false;\n }\n jumpBoosters = true;\n }\n }\n return jumpBoosters;\n }",
"public boolean won()\n {\n for(int i=0;i<4;i++)\n {\n if(foundationPile[i].isEmpty() || foundationPile[i].peek().getRank()!=Rank.KING)\n return false; \n }\n return true;\n }",
"private void checkLoosePLayer(){\n if (hero.getHp()<=0){\n loose();\n }\n\n }",
"public boolean isOverhit()\n\t{\n\t\treturn overhit;\n\t}",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean hasCurHP();",
"boolean isWinner() {\n boolean win = true;\n // first method to win\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if ((state[i][j] == 'X' && stateGame[i][j] != '*') || (state[i][j] != 'X' && stateGame[i][j] == '*'))\n win = false;\n }\n }\n if (win)\n return true;\n\n win = true;\n // second method to win\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (state[i][j] == '.' && stateGame[i][j] == '.')\n win = false;\n }\n }\n return win;\n }",
"public boolean isWon() {\r\n\t\tif (winner(CROSS) || winner(NOUGHT))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}",
"public boolean shouldHit() {\r\n\t\tif(getHandVal() < 17) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false; \r\n\t}",
"private boolean checkForBigGameWin(){\n boolean truth = false;\n if (checkGameWin(getLettersOfAllGames())){\n truth = true;\n }\n return truth;\n }",
"public boolean gameWon() {\n\t\tfor (int i = 0; i < gameBoard.length; i++) {\n\t\t for (int j = 0; j < gameBoard.length; j++) {\n\t\t \tif (gameBoard[i][j] == 'M' || gameBoard[i][j] == 'I') {\n\t\t \t\treturn false;\n\t\t \t}\n\t\t }\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean isSpecial(Player pl, byte type) {\n\t\treturn type == GameMap.WALL || (type == GameMap.SPAWNER && !(pl instanceof Ghost));\n\t}",
"protected boolean isMovementNoisy() {\n/* 1861 */ return (!this.abilities.flying && (!this.onGround || !isDiscrete()));\n/* */ }",
"public boolean caughtAnotherPokemon() {\r\n\r\n\t\tint count = 0;\r\n\t\tfor (int poke : caughtPokemon.values()) {\r\n\t\t\tcount += poke;\r\n\t\t}\r\n\t\tif (pokeCount < count) {\r\n\t\t\tpokeCount = count;\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean sameTeamCheck(char state)\r\n {\r\n if((state == 'b' && isHuman) || (state == 'p' && !isHuman))\r\n return true;\r\n return false;\r\n }",
"private boolean gameOver() {\r\n\t\treturn (lifeBar == null || mehran == null);\r\n\t}",
"public boolean isGoal() {\n return hamming() == 0; // Board is solved if hamming distance is 0\n }",
"public boolean CheckForUnwinnableCondition(){\n int humanSize = GetSizeOfHumanHand();\n int computerSize = GetSizeOfComputerHand();\n\n for(int i = 0; i < humanSize; i++) {\n //Human can play a card\n String card = handHuman.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n for(int i = 0; i < computerSize; i++){\n //Human can play a card\n String card = handComputer.get(i);\n\n String firstLetter = Character.toString(card.charAt(0));\n String topFirstLetter = Character.toString(topCard.charAt(0));\n\n if (topCard.contains(\"8\")) {\n //Can play any card ontop to determine suite\n return true;\n }\n\n if (card.contains(\"8\")) {\n //valid because 8s are wild cards, human can place it\n return true;\n }\n\n //the cards match in suite, doesn't matter what it is\n else if (firstLetter.equals(topFirstLetter)) {\n return true;\n }\n\n else {\n if (topFirstLetter.equals(\"c\")) {\n String temp = topCard.substring(5, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"h\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"d\")) {\n String temp = topCard.substring(8, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n\n } else if (topFirstLetter.equals(\"s\")) {\n String temp = topCard.substring(6, topCard.length());\n\n if (card.contains(temp)) {\n return true;\n }\n }\n }\n }\n\n //Human and computer can't play a card\n return false;\n }",
"protected boolean isGameOver(){\n return (getShipsSunk()==10);\n }",
"public boolean isPeace() {\r\n\t\tfor (int i=0; i<piece.size(); i++) {\r\n\t\t\tChessPiece p = piece.get(order[i]);\r\n\t\t\tif (p.chessPlayer.equals(\"black\") || p.chessPlayer.equals(\"white\")) {\r\n\t\t\t\tVector<ChessBoardBlock> blocks = this.getMovablePosition(p);\r\n\t\t\t\tif (blocks.size()>1) {\r\n\t\t\t\t\treturn false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn true;\r\n\t}",
"boolean checkGrassEnergy(AbstractGrassPokemon pokemon);",
"public boolean isHit(Point p){\n if(super.getLocation().equals(p)){\n nunMissiles = 0;\n return true;\n } else {\n return false;\n }\n }",
"public boolean hasWon() {\n\t\tfor (int i = 0; i < wordToGuess.length(); i++) {\n\t\t\tchar letter = wordToGuess.charAt(i);\n\t\t\tif (!guessesMade.contains(letter)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"private boolean isTargetTerritoryOneBlockAway() {\n for(Territory territory:getCurrentPlayerTerritories()) {\n if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == 1) {\n int minID = Math.min(territory.getID(),selectedTerritoryByPlayer.getID());\n int maxID = Math.max(territory.getID(),selectedTerritoryByPlayer.getID());\n if(maxID % gameDescriptor.getColumns() == 0)\n return true;\n if((minID % gameDescriptor.getColumns() != 0 )\n && (minID / gameDescriptor.getColumns() == maxID / gameDescriptor.getColumns())) {\n return true;\n }\n }\n else if(Math.abs(territory.getID()-selectedTerritoryByPlayer.getID()) == gameDescriptor.getColumns())\n return true;\n }\n return false;\n }",
"public boolean hasTomb(String player) {\r\n\t\treturn tombs.containsKey(player);\r\n\t}",
"private boolean canAttack(Piece p, Location loc)\n {\n int thisRow = getLocation(p).getRow();\n int thisCol = getLocation(p).getCol();\n int otherRow = loc.getRow();\n int otherCol = loc.getCol();\n int rowDiff = Math.abs(otherRow-thisRow);\n int colDiff = Math.abs(otherCol-thisCol);\n switch (p.getType())\n {\n case PAWN:\n return rowDiff==1&&colDiff==1 &&\n ((p.white()&&otherRow<thisRow)||(!p.white()&&otherRow>thisRow));\n \n case KING:\n return adjacent(getLocation(p),loc);\n \n case KNIGHT:\n return rowDiff>0 && colDiff>0 && rowDiff+colDiff==3;\n \n //rook, bishop, queen are identical, except for their preconditions\n case ROOK:case BISHOP:case QUEEN:\n if ((p.getType()==Type.ROOK&&rowDiff>0&&colDiff>0)\n ||(p.getType()==Type.BISHOP&&rowDiff!=colDiff)\n ||(p.getType()==Type.QUEEN&&rowDiff>0&&colDiff>0&&rowDiff!=colDiff))\n return false;\n Location next = getLocation(p).closerTo(loc);\n while (!next.equals(loc))\n {\n if (getPiece(next)!=null) //checks for piece in the way\n return false;\n next = next.closerTo(loc);\n }\n return true;\n }\n return false; //will never happen because all piece types covered\n }",
"public boolean isGoal(){\n\t\tboolean ok = true;\n\t\tfor (int i = 0; i < getRows() && ok; i++) {\n\t\t\tfor (int j = 0; j < getColumns() && ok; j++) {\n\t\t\t\tif (cells[i][j].getSand() != getK()) \n\t\t\t\t\tok = false;\n\t\t\t}\n\t\t} \n\t\treturn ok;\n\t}",
"boolean isGameFinished() {\n if (tiles.takenTilesNumber() < 3)\n return false;\n Symbol winningSymbol = tiles.getTile(1);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) {\n return true;\n }\n }\n if(tiles.getTile(2).equals(winningSymbol)) {\n if(tiles.getTile(3).equals(winningSymbol)) return true;\n }\n if(tiles.getTile(4).equals(winningSymbol)) {\n if(tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n winningSymbol = tiles.getTile(2);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(8).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(3);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n if (tiles.getTile(6).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n\n\n winningSymbol = tiles.getTile(4);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(5).equals(winningSymbol)) {\n if (tiles.getTile(7).equals(winningSymbol)) return true;\n }\n }\n\n winningSymbol = tiles.getTile(7);\n if (!winningSymbol.equals(Symbol.EMPTY)) {\n if (tiles.getTile(8).equals(winningSymbol)) {\n if (tiles.getTile(9).equals(winningSymbol)) return true;\n }\n }\n return false;\n }",
"boolean hasHotwordPower();",
"public boolean isPokemonCaught(int i)\n\t{\n\t\treturn m_pokedex.isPokemonCaught(i);\n\t}",
"public boolean isGameWon(){\r\n for(Card c: this.cards){\r\n if (c.getFace() == false){\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private boolean gameOver()\n {\n \t//lose case\n \tif (guess_number == 0)\n \t{\n \t\twin = false;\n \t\treturn true;\n \t}\n \t//win case\n \tif (mask.compareTo(word) == 0)\n \t{\n \t\twin = true;\n \t\treturn true;\n \t}\n \t\n \treturn false;\n }",
"public boolean getWin() {\n if (targetDistance == 25) {\n if (missDistance <= 1 && missDistance >= -1) { //checks 25m win\n return true;\n }\n else {\n return false;\n }\n }\n else if (targetDistance == 50) { //checks 50m win\n if (missDistance <= 2 && missDistance >= -2) {\n return true;\n }\n else {\n return false;\n }\n }\n else { //checks 100m win\n if (missDistance <= 3 && missDistance >= -3) {\n return true;\n }\n else {\n return false;\n }\n }\n }",
"public boolean isOnFight();",
"boolean checkFireEnergy(AbstractFirePokemon pokemon);",
"public boolean isAttackState() {\n return States.attack.contains(this.state);\n }"
]
| [
"0.70250565",
"0.6825224",
"0.6761164",
"0.66651946",
"0.66431636",
"0.6476944",
"0.6440224",
"0.63055974",
"0.62973297",
"0.6295853",
"0.6215223",
"0.61787635",
"0.6162953",
"0.6157176",
"0.60942334",
"0.60732126",
"0.60716575",
"0.6070843",
"0.60182023",
"0.59908754",
"0.59908754",
"0.59634423",
"0.5961993",
"0.5961993",
"0.5961993",
"0.5961993",
"0.5961993",
"0.5961993",
"0.59618765",
"0.5945617",
"0.5937182",
"0.590052",
"0.5896447",
"0.5895568",
"0.58918273",
"0.58862454",
"0.58744735",
"0.5873744",
"0.5872147",
"0.58600795",
"0.58564323",
"0.58516526",
"0.5846409",
"0.5846409",
"0.5846409",
"0.5846409",
"0.5846409",
"0.5846409",
"0.58391",
"0.5814542",
"0.5802037",
"0.5777539",
"0.5777539",
"0.5777539",
"0.5777539",
"0.5777539",
"0.5776478",
"0.5775325",
"0.57669526",
"0.5764303",
"0.5764097",
"0.5756047",
"0.5755987",
"0.5753677",
"0.5753185",
"0.5753185",
"0.5753185",
"0.5753185",
"0.5753185",
"0.5753185",
"0.57439923",
"0.5737754",
"0.57367927",
"0.5735826",
"0.5733856",
"0.57293683",
"0.5716175",
"0.57106966",
"0.5708304",
"0.5704934",
"0.5702117",
"0.5702018",
"0.5699912",
"0.56992346",
"0.56943446",
"0.5691268",
"0.5689666",
"0.5667584",
"0.5659685",
"0.56557167",
"0.5653341",
"0.5650306",
"0.56493515",
"0.5636386",
"0.56300646",
"0.56289434",
"0.5616634",
"0.5611386",
"0.5609858",
"0.56093955"
]
| 0.7608242 | 0 |
Initializes a sliding window with the given size and range. For example a sliding window of 10ms every 2ms would mean: sizeMs=10, rangeMs=2 | public SlidingWindow(long sizeMs, long rangeMs){
this.sizeMs = sizeMs;
this.rangeMs = rangeMs;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"WindowedStream<T> timeSlidingWindow(long millis, long slide);",
"public BaseWindowedBolt<T> ingestionTimeWindow(Time size, Time slide) {\n long s = size.toMilliseconds();\n long l = slide.toMilliseconds();\n ensurePositiveTime(s, l);\n ensureSizeGreaterThanSlide(s, l);\n\n setSizeAndSlide(s, l);\n this.windowAssigner = SlidingIngestionTimeWindows.of(s, l);\n return this;\n }",
"public BaseWindowedBolt<T> ingestionTimeWindow(Time size) {\n long s = size.toMilliseconds();\n ensurePositiveTime(s);\n\n setSizeAndSlide(s, DEFAULT_SLIDE);\n this.windowAssigner = TumblingIngestionTimeWindows.of(s);\n return this;\n }",
"public BaseWindowedBolt<T> timeWindow(Time size, Time slide) {\n long s = size.toMilliseconds();\n long l = slide.toMilliseconds();\n ensurePositiveTime(s, l);\n ensureSizeGreaterThanSlide(s, l);\n\n setSizeAndSlide(s, l);\n this.windowAssigner = SlidingProcessingTimeWindows.of(s, l);\n return this;\n }",
"public BaseWindowedBolt<T> timeWindow(Time size) {\n long s = size.toMilliseconds();\n ensurePositiveTime(s);\n\n setSizeAndSlide(s, DEFAULT_SLIDE);\n this.windowAssigner = TumblingProcessingTimeWindows.of(s);\n return this;\n }",
"public BaseWindowedBolt<T> eventTimeWindow(Time size, Time slide) {\n long s = size.toMilliseconds();\n long l = slide.toMilliseconds();\n ensurePositiveTime(s, l);\n ensureSizeGreaterThanSlide(s, l);\n\n setSizeAndSlide(s, l);\n this.windowAssigner = SlidingEventTimeWindows.of(s, l);\n return this;\n }",
"public BaseWindowedBolt<T> eventTimeWindow(Time size) {\n long s = size.toMilliseconds();\n ensurePositiveTime(s);\n\n setSizeAndSlide(s, DEFAULT_SLIDE);\n this.windowAssigner = TumblingEventTimeWindows.of(s);\n return this;\n }",
"public BaseWindowedBolt<T> countWindow(long size, long slide) {\n ensurePositiveTime(size, slide);\n ensureSizeGreaterThanSlide(size, slide);\n\n setSizeAndSlide(size, slide);\n this.windowAssigner = SlidingCountWindows.create(size, slide);\n return this;\n }",
"public Builder<V, E> windowSize(int windowSize) {\n this.windowSize = windowSize;\n return this;\n }",
"public BaseWindowedBolt<T> withStateSize(Time size) {\n long s = size.toMilliseconds();\n ensurePositiveTime(s);\n ensureStateSizeGreaterThanWindowSize(this.size, s);\n\n this.stateSize = s;\n if (WindowAssigner.isEventTime(this.windowAssigner)) {\n this.stateWindowAssigner = TumblingEventTimeWindows.of(s);\n } else if (WindowAssigner.isProcessingTime(this.windowAssigner)) {\n this.stateWindowAssigner = TumblingProcessingTimeWindows.of(s);\n } else if (WindowAssigner.isIngestionTime(this.windowAssigner)) {\n this.stateWindowAssigner = TumblingIngestionTimeWindows.of(s);\n }\n\n return this;\n }",
"public BaseWindowedBolt<T> sessionTimeWindow(Time size) {\n long s = size.toMilliseconds();\n ensurePositiveTime(s);\n\n setSizeAndSlide(s, DEFAULT_SLIDE);\n this.windowAssigner = ProcessingTimeSessionWindows.withGap(s);\n return this;\n }",
"public Sliding()\n {\n }",
"public TimeSliceQueue(int size, int resolution) {\n this(size, resolution, 0);\n }",
"public BaseWindowedBolt<T> countWindow(long size) {\n ensurePositiveTime(size);\n\n setSizeAndSlide(size, DEFAULT_SLIDE);\n this.windowAssigner = TumblingCountWindows.create(size);\n return this;\n }",
"public BaseWindowedBolt<T> sessionEventTimeWindow(Time size) {\n long s = size.toMilliseconds();\n ensurePositiveTime(s);\n\n setSizeAndSlide(s, DEFAULT_SLIDE);\n this.windowAssigner = EventTimeSessionWindows.withGap(s);\n return this;\n }",
"public LengthWindowViewRStream(AgentInstanceViewFactoryChainContext agentInstanceViewFactoryContext, LengthWindowViewFactory lengthWindowViewFactory, int size) {\n if (size < 1) {\n throw new IllegalArgumentException(\"Illegal argument for size of length window\");\n }\n\n this.agentInstanceViewFactoryContext = agentInstanceViewFactoryContext;\n this.lengthWindowViewFactory = lengthWindowViewFactory;\n this.size = size;\n indexedEvents = new LinkedHashSet<EventBean>();\n }",
"private void initSnapLimits() {\n int halfInterval = quarterHolderWidth / 2;\n snapLimit0 = halfInterval;\n snapLimit1 = lowerLimit1 + halfInterval;\n snapLimit2 = lowerLimit2 + halfInterval;\n snapLimit3 = lowerLimit3 + halfInterval;\n }",
"public ForwardsSampler(double minVal, double maxVal, double stepSize) {\n this.minVal = minVal;\n this.maxVal = maxVal;\n this.stepSize = stepSize;\n }",
"public Builder setWindowSize(long value) {\n \n windowSize_ = value;\n onChanged();\n return this;\n }",
"public TimeWindow(int startTime, int endTime, int duration){\n this.startTime = startTime;\n this.endTime = endTime;\n this.duration = duration;\n }",
"void setSamplingIntervalMs(long ms);",
"@Nonnull\r\n\tpublic static <T> Observable<Observable<T>> window(\r\n\t\t\t@Nonnull Observable<? extends T> source,\r\n\t\t\tint size, \r\n\t\t\tlong timespan, \r\n\t\t\t@Nonnull TimeUnit unit) {\r\n\t\treturn window(source, size, timespan, unit, scheduler());\r\n\t}",
"private Slider createArrSizeSlider(BorderPane root) {\n Slider arrSizeSlider = new Slider(MIN_ARR_SIZE, MAX_ARR_SIZE, arrSize);\n\n arrSizeSlider.valueProperty().addListener((observable, oldValue, newValue) -> {\n ((HBox) root.getTop()).getChildren().get(2).setDisable(false);\n ((HBox) root.getTop()).getChildren().get(3).setDisable(false);\n\n arrSize = newValue.intValue();\n width = (SORTING_DISPLAY_WIDTH - 2 * (arrSize - 1)) / arrSize;\n\n generateRandomHeights();\n root.setBottom(createSortingDisplay());\n });\n\n return arrSizeSlider;\n }",
"protected SlidingWindowLog(int maxReqPerUnitTime) {\n\t\tsuper(maxReqPerUnitTime);\n\t}",
"@Override\n public Builder windowSize(int windowSize) {\n super.windowSize(windowSize);\n return this;\n }",
"void setWindowSize(int s);",
"@Nonnull\r\n\tpublic static <T> Observable<Observable<T>> window(\r\n\t\t\t@Nonnull Observable<? extends T> source,\r\n\t\t\tint size, \r\n\t\t\tlong timespan, \r\n\t\t\t@Nonnull TimeUnit unit, \r\n\t\t\t@Nonnull Scheduler pool) {\r\n\t\treturn new Windowing.WithTimeOrSize<T>(source, size, timespan, unit, pool);\r\n\t}",
"protected void aInit()\n {\n \ta_available=WindowSize;\n \tLimitSeqNo=WindowSize*2;\n \ta_base=1;\n \ta_nextseq=1;\n }",
"public ReboundPanel() {\r\n final int width = 600;\r\n final int height = 200;\r\n final int delay = 30;\r\n final int initialY = 40;\r\n\r\n timer = new Timer(delay, new ReboundListener());\r\n\r\n x = 0;\r\n y = initialY;\r\n\r\n setPreferredSize(new Dimension(width, height));\r\n setBackground(Color.black);\r\n timer.start();\r\n }",
"public synchronized void setSize(int lower, int upper) {\n \t\tthis.lower = lower;\n \t\tthis.upper = upper;\n \t\tadjustThreadCount();\n \t}",
"public RangeSlider() {\n initSlider();\n }",
"public void initApp() {\n \tint ms = (int) Math.round(1000d / Settings.getFramesPerSecond());\n \ttimer = new Timer(ms, this);\n \ttimer.start();\n setBackground(new Color(35, 35, 35));\n Dimension d = new Dimension(Settings.getGridDimensions());\n d.setSize(d.getWidth() + Settings.getBoxSize() * 4 + 80, d.getHeight());\n setPreferredSize(d);\n setFocusable(true);\n }",
"public abstract void initPlayboard(int size);",
"public RangeSlider(int min, int max) {\n super(min, max);\n initSlider();\n }",
"@Nonnull\r\n\tpublic static <T> Observable<Observable<T>> window(\r\n\t\t\t@Nonnull Observable<? extends T> source, int size) {\r\n\t\treturn window(source, size, size);\r\n\t}",
"Range createRange();",
"private void createSlider(){\n\t\tslider = new GVertSlider(winApp, (int)width - 10, (int)height, 10, maxRows * (int)height);\n\t\tslider.setBorder(1);\n\t\tslider.setVisible(false);\n\t\tslider.setLimits(0, 0, maxRows - 1);\n\t\tslider.addEventHandler(this, \"processSliderMotion\", new Class[] { GVertSlider.class } );\n\t\tadd(slider);\n\t}",
"public MovingAverage(int size) {\r\n this.size = size;\r\n }",
"public void autoSwipeViews() {\n mTimer = new Timer();\n mTimer.scheduleAtFixedRate(new SliderTimer(), 10000, 10000);\n }",
"public static void intervalRange() {\n Observable.intervalRange(0L, 10L, 0L, 10L, TimeUnit.MILLISECONDS).\n subscribe(new MyObserver<>());\n }",
"WindowedStream<T> timeWindow(long millis);",
"@Nonnull \r\n\tpublic static Observable<Integer> range(\r\n\t\t\tfinal int start,\r\n\t\t\tfinal int count,\r\n\t\t\t@Nonnull final Scheduler pool) {\r\n\t\treturn new Range.AsInt(start, count, pool);\r\n\t}",
"public Resize(int rows, int cols, Point start){\n this.rows = rows;\n this.cols = cols;\n this.start = start;\n }",
"@Nonnull\r\n\tpublic static Observable<BigInteger> range(\r\n\t\t\t@Nonnull final BigInteger start,\r\n\t\t\t@Nonnull final BigInteger count,\r\n\t\t\t@Nonnull final Scheduler pool) {\r\n\t\treturn new Range.AsBigInteger(start, count, pool);\r\n\t}",
"private static List<SequenceDatabase> createSegmentDatabases(SequencesHelper sequencesHelper, int win_size){\n\t\tList<Date> dates = sequencesHelper.getDates();\n\t\tList<Sequence> sequences = sequencesHelper.getSequences();\n\t\tList<SequenceDatabase> segmentdbs = new LinkedList<SequenceDatabase>();\n\t\t\n\t\tint volumn_max = win_size; // Maximum number of intervals with trajectories\n\t\tint volumn_min = win_size / 2;\t// minimum number of intervals with trajectories\n\t\tint width_max = time_span_max;\n\t\tint width_min = time_span_min;\n\t\t\n\t\tassert(dates.size() == sequences.size());\n\t\t\n\t\tDate date_max = dates.get(dates.size()-1);\n\t\tint date_start = 0;\n\t\tint date_end = 0;\n\t\t\n\t\twhile (date_max.getTime()/1000 - dates.get(date_start).getTime()/1000 >= width_min * 24 * 3600){\n\t\t\t// start a new segment database\n\t\t\tSequenceDatabase newdb = new SequenceDatabase();\n\t\t\t\n\t\t\tfor (int i=date_start; i < dates.size(); i++){\n\t\t\t\tif ( newdb.size() < volumn_max && \n\t\t\t\t\t(dates.get(i).getTime()/1000 - dates.get(date_start).getTime()/1000) < width_max * 24 * 3600){\n\t\t\t\t\tnewdb.addSequence(sequencesHelper.getSequence(i), dates.get(i));\n\t\t\t\t\tdate_end = i;\n\t\t\t\t}else{\n\t\t\t\t\tbreak; // for\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif ( newdb.size() >= volumn_min && newdb.getTimeSpanDays() >= width_min){\n\t\t\t\t// only add the database meeting the constraints.\n\t\t\t\tsegmentdbs.add(newdb);\n\t\t\t}\n\t\t\t\n\t\t\t// update date start index\n\t\t\tif ( newdb.size() > 1){\n\t\t\t\tList<Date> newdb_dates = newdb.getDates();\n\t\t\t\tDate start = newdb_dates.get(0);\n\t\t\t\tDate end = newdb_dates.get(newdb.size()-1);\n\t\t\t\t// the sliding distance depends on the median time of the sliding window.\n\t\t\t\tdouble time_middle = 0.5*(end.getTime()/1000 + start.getTime()/1000 );\n\t\t\t\tfor (int j = date_start; j <= date_end; j++){\n\t\t\t\t\tif (dates.get(j).getTime()/1000 >= time_middle){\n\t\t\t\t\t\tdate_start = j;\n\t\t\t\t\t\tdate_end = j;\n\t\t\t\t\t\tbreak; // inner for\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else\n\t\t\t\tdate_start = date_start+1;\n\t\t}\n\n\t\treturn segmentdbs;\n\t}",
"@Override\n public void beginWindow(long windowId)\n {\n // move currentCursor 1 position\n currentCursor = (currentCursor + 1) % windowSize;\n // expire the state at the first position which is the state of the streaming window moving out of the current application window\n lastExpiredWindowState = states.get(currentCursor);\n\n states.set(currentCursor, createWindowState());\n\n }",
"@Nonnull\r\n\tpublic static <T> Observable<Observable<T>> window(\r\n\t\t\t@Nonnull Observable<? extends T> source, int size, int skip) {\r\n\t\treturn new Windowing.WithSizeSkip<T>(source, size, skip);\r\n\t}",
"private Range() {}",
"public void setWindowSize(int window_size) {\n this.window_size = window_size;\n }",
"public RatioMonitor(int sampleSize, double tolerance, int minNotificationInterval)\r\n {\r\n this.sampleSize = sampleSize;\r\n this.tolerance = tolerance;\r\n this.minNotificationInterval = minNotificationInterval;\r\n monitor1 = new AmplitudeMonitor(sampleSize);\r\n monitor2 = new AmplitudeMonitor(sampleSize);\r\n }",
"private void initLimits() {\n lowerLimit1 = quarterHolderWidth;\n lowerLimit2 = (2 * quarterHolderWidth);\n lowerLimit3 = (3 * quarterHolderWidth);\n lowerLimit4 = holderWidth;\n }",
"@Nonnull\r\n\tpublic static Observable<BigInteger> range(\r\n\t\t\t@Nonnull final BigInteger start,\r\n\t\t\t@Nonnull final BigInteger count) {\r\n\t\treturn range(start, count, scheduler());\r\n\t}",
"@Override\n public void run() {\n start(10, 500);\n }",
"@Generated\n @Selector(\"setCropRectangleRampFromStartCropRectangle:toEndCropRectangle:timeRange:\")\n public native void setCropRectangleRampFromStartCropRectangleToEndCropRectangleTimeRange(\n @ByValue CGRect startCropRectangle, @ByValue CGRect endCropRectangle, @ByValue CMTimeRange timeRange);",
"Range() {}",
"public ToolWindowSelector() {\r\n\t\tfinal ImageStack slices = ImageStack.getInstance();\t\t\r\n\t\t\r\n\r\n\t\t// range_max needs to be calculated from the bits_stored value\r\n\t\t// in the current dicom series\r\n\t\tint window_center_min = 0;\r\n\t\tint window_width_min = 0;\r\n\t\tint window_center_max = 1<<(slices.getDiFile(0).getBitsStored());\r\n\t\tint window_width_max = 1<<(slices.getDiFile(0).getBitsStored());\r\n\t\t_window_center = slices.getWindowCenter();\r\n\t\t_window_width = slices.getWindowWidth();\r\n\t\t\r\n\t\t_window_settings_label = new JLabel(\"Window Settings\");\r\n\t\t_window_center_label = new JLabel(\"Window Center:\");\r\n\t\t_window_width_label = new JLabel(\"Window Width:\");\r\n\t\t\r\n\t\t_window_center_slider = new JSlider(window_center_min, window_center_max, _window_center);\r\n\t\t_window_center_slider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tJSlider source = (JSlider) e.getSource();\r\n\t\t\t\tif (source.getValueIsAdjusting()) {\r\n\t\t\t\t\t_window_center = (int)source.getValue();\r\n//\t\t\t\t\tSystem.out.println(\"_window_center_slider state Changed: \"+_window_center);\r\n\t\t\t\t\tslices.setWindowCenter(_window_center);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\t\t\r\n\t\t\r\n\t\t_window_width_slider= new JSlider(window_width_min, window_width_max, _window_width);\r\n\t\t_window_width_slider.addChangeListener(new ChangeListener() {\r\n\t\t\tpublic void stateChanged(ChangeEvent e) {\r\n\t\t\t\tJSlider source = (JSlider) e.getSource();\r\n\t\t\t\tif (source.getValueIsAdjusting()) {\r\n\t\t\t\t\t_window_width = (int)source.getValue();\r\n//\t\t\t\t\tSystem.out.println(\"_window_width_slider state Changed: \"+_window_width);\r\n\t\t\t\t\tslices.setWindowWidth(_window_width);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t});\r\n\t\t\r\n\t\tsetLayout(new GridBagLayout());\r\n\t\tGridBagConstraints c = new GridBagConstraints();\r\n\t\tc.weighty = 0.3;\r\n\t\tc.fill = GridBagConstraints.BOTH;\r\n\t\tc.insets = new Insets(2,2,2,2); // top,left,bottom,right\r\n\t\tc.weightx = 0.1;\r\n\t\tc.gridwidth = 2;\r\n\t\tc.gridx = 0; c.gridy = 0; this.add(_window_settings_label, c);\r\n\t\tc.gridwidth=1;\r\n\r\n\t\tc.weightx = 0;\r\n\t\tc.gridx = 0; c.gridy = 1; this.add(_window_center_label, c);\r\n\t\tc.gridx = 0; c.gridy = 2; this.add(_window_width_label, c);\r\n\t\tc.gridx = 1; c.gridy = 1; this.add(_window_center_slider, c);\r\n\t\tc.gridx = 1; c.gridy = 2; this.add(_window_width_slider, c);\r\n\t\t\r\n\r\n\t}",
"public Range(int minIn, int maxIn) {\n min = minIn;\n max = maxIn;\n }",
"abstract public Range createRange();",
"public static SearchCriteria build(Integer minimalSize,\n Integer maximalSize,\n Integer fromMonthInclusive,\n Integer toMonthInclusive) {\n SearchCriteria criteria = new SearchCriteria();\n criteria.minimalSize = minimalSize;\n criteria.maximalSize = maximalSize;\n criteria.fromMonthInclusive = fromMonthInclusive;\n criteria.toMonthInclusive = toMonthInclusive;\n return criteria;\n }",
"public void setTimeRange(int itmin, int itmax) {\n _itmin = itmin;\n _itmax = itmax;\n }",
"public MovingAveragefromDataStream(int size) {\n this.size = size;\n }",
"Duration(Integer duration){\n\t\t_minimum = duration;\n\t\t_maximum = duration;\n\t\t_range = new Range(_minimum, _maximum);\n\t}",
"public abstract void setRange(double value, int start, int count);",
"public SampledCounterConfig(int intervalSecs, int historySize, boolean isResetOnSample, long initialValue) {\n super(initialValue);\n if (intervalSecs < 1) { throw new IllegalArgumentException(\"Interval (\" + intervalSecs\n + \") must be greater than or equal to 1\"); }\n if (historySize < 1) { throw new IllegalArgumentException(\"History size (\" + historySize\n + \") must be greater than or equal to 1\"); }\n\n this.intervalSecs = intervalSecs;\n this.historySize = historySize;\n this.isReset = isResetOnSample;\n }",
"CollectionRange createCollectionRange();",
"@Nonnull\r\n\tpublic static Observable<Integer> range(\r\n\t\t\tfinal int start,\r\n\t\t\tfinal int count) {\r\n\t\treturn range(start, count, scheduler());\r\n\t}",
"static final int startingSubMultiple(final int lgTarget, final int lgResizeRatio, \r\n final int lgMin) {\r\n int lgStart;\r\n if (lgResizeRatio > 0) {\r\n lgStart = (Math.abs(lgTarget - lgMin) % lgResizeRatio) + lgMin;\r\n } else {\r\n lgStart = (lgTarget < lgMin) ? lgMin : lgTarget;\r\n }\r\n return lgStart;\r\n }",
"public void initialize(int size) {\n setMaxSize(size);\n }",
"public abstract void init(int w, int h);",
"public static void init() {\n init(block -> IntStream.range(0, 16));\n }",
"void assignRange() {\n rangeIndex = (int) Math.floor(value / step);\n }",
"protected IntervalAction action() {\n CCSize s = Director.sharedDirector().winSize();\n return MoveBy.action(duration, s.width-ADJUST_FACTOR,0);\n }",
"public void initialize(int size);",
"public void setLeftRange(int min, int max) {\n leftBeginning = min;\n leftEnd = max;\n }",
"void setSamplingTaskRunIntervalMs(long ms);",
"public static BsonDocument createPartitionBounds(final BsonValue lower, final BsonValue upper) {\n BsonDocument partitionBoundary = new BsonDocument();\n if (lower.getBsonType() != BsonType.MIN_KEY) {\n partitionBoundary.append(\"$gte\", lower);\n }\n if (upper.getBsonType() != BsonType.MAX_KEY) {\n partitionBoundary.append(\"$lt\", upper);\n }\n return partitionBoundary;\n }",
"public MovingAverage(int size) {\n q = new LinkedList();\n this.size = size;\n sum = 0;\n }",
"public void start(int range) {\n start(mRangeStart, range, mIsPositive);\n }",
"public void setToInitialState(int dimension, int numberOfEmptySlots);",
"@Nonnull\r\n\tpublic static Observable<Float> range(\r\n\t\t\tfinal float start,\r\n\t\t\tfinal int count,\r\n\t\t\tfinal float step) {\r\n\t\treturn range(start, count, step, scheduler());\r\n\t}",
"public void initPanel(String attrib, int desired_width){\r\n\r\n slider = new JSlider(JSlider.HORIZONTAL,\r\n min, max, min);\r\n\r\n slider.addChangeListener(new SliderBarActionListener(this,attrib));\r\n\r\n slider.setMajorTickSpacing((max-min)/5);\r\n slider.setPaintTicks(true);\r\n\r\n //Create the label table\r\n Hashtable labelTable = new Hashtable();\r\n labelTable.put( new Integer( min ), new JLabel(\"\"+ min/precision));\r\n labelTable.put( new Integer( max ), new JLabel(\"\" + max/precision));\r\n slider.setLabelTable( labelTable );\r\n\r\n slider.setPaintLabels(true);\r\n\r\n Dimension currentsize = slider.getPreferredSize();\r\n currentsize.width = desired_width;\r\n currentsize.height = (DIM_HEIGHT/12) * 11;\r\n slider.setPreferredSize(currentsize);\r\n\r\n this.setLayout(new GridLayout(2,1));\r\n\r\n this.add(label, BorderLayout.NORTH);\r\n\r\n this.add(slider, BorderLayout.SOUTH);\r\n\r\n this.revalidate();\r\n }",
"@Override\n public void setup(OperatorContext context)\n {\n super.setup(context);\n states = new ArrayList<S>(windowSize);\n //initialize the sliding window state to null\n for (int i = 0; i < windowSize; i++) {\n states.add(null);\n }\n currentCursor = -1;\n }",
"@Override\n public void settings(){\n size(500, 500);\n }",
"public static void window() {\n\n System.out.println(\"# 1\");\n\n List<String> data = Utils.getData();\n Observable.fromIterable(data)\n .window(2)\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n System.out.println(\"# 2\");\n\n Observable.fromIterable(data)\n .window(2, 3)\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n System.out.println(\"# 3\");\n\n Observable.fromIterable(data)\n .window(2, 3, 1)\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n System.out.println(\"# 4\");\n\n Observable.fromIterable(data)\n .window(100, 100, TimeUnit.MICROSECONDS)\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n System.out.println(\"# 5\");\n\n Observable.fromIterable(data)\n .window((emitter) -> emitter.onNext(1))\n .subscribe((windowStream) -> windowStream.subscribe(new MyObserver<>()));\n\n /*\n Mose of the window operators are similar to buffer.\n */\n }",
"private void generateOdd(int size, int min, int max, Point start, Point end)\n\t{\n\t\tint currentRow = start.x;\n\t\tint currentCol = start.y + ((end.y-start.y)/2);\n\t\tint counter = min;\n\t\tthis.matrix[currentRow][currentCol] = counter;\n\t\tcounter++;\t//Move to next number\n\t\t\n\t\t//one up, one right\n\t\tint newRow = -1;\n\t\tint newCol = -1;\n\t\twhile(counter <= max)\n\t\t{\n\t\t\t//Update pos\n\t\t\tnewRow = currentRow - 1;\t//-1 means go up\n\t\t\tnewCol = currentCol + 1;\n\t\t\t//Check if it's outside the box\n\t\t\tif (newRow < start.x)\n\t\t\t{\n\t\t\t\tnewRow = end.x;\n\t\t\t}\n\t\t\tif (newCol > end.y)\n\t\t\t{\n\t\t\t\tnewCol = start.y;\n\t\t\t}\n\t\t\t\n\t\t\t//Check if it's filled and update pos\n\t\t\tif (this.matrix[newRow][newCol] == 0)\n\t\t\t{\n\t\t\t\tcurrentRow = newRow;\n\t\t\t\tcurrentCol = newCol;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t//Move to box directly under it\n\t\t\t\tcurrentRow = currentRow + 1; //+1 means under it\n\t\t\t\tif (currentRow > end.x)\n\t\t\t\t{\n\t\t\t\t\tcurrentRow = start.x;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//Place next number\n\t\t\tthis.matrix[currentRow][currentCol] = counter;\n\t\t\tcounter++;\t//Increment counter by 1\n\t\t}\n\t}",
"public RangeRandom(final float min, final float max) {\n this.max = max;\n this.min = min;\n this.random = new Random(System.nanoTime());\n }",
"private Range() {\n this.length = 0;\n this.first = 0;\n this.last = -1;\n this.stride = 1;\n this.name = \"EMPTY\";\n }",
"public void makeWindows()\r\n {\r\n int spacingX = random.nextInt( 3 ) + 3;\r\n int spacingY = random.nextInt( 5 ) + 3;\r\n int windowsX = random.nextInt( 3 ) + 4;\r\n int windowsY = random.nextInt( 3 ) + 5;\r\n int sizeX = ( building.getWidth() - spacingX * ( windowsX + 1 ) ) / windowsX;\r\n int sizeY = ( building.getHeight() - spacingY * ( windowsY + 1 ) ) / windowsY;\r\n \r\n \r\n for( int i = 1; i <= windowsX; i++ )\r\n {\r\n for( int k = 1; k <= windowsY; k++ )\r\n {\r\n \r\n Rectangle r = new Rectangle( building.getXLocation() + ( spacingX / 2 + spacingX * i ) + sizeX * ( i - 1 ), \r\n building.getYLocation() + ( spacingY / 2 + spacingY * k ) + sizeY * ( k - 1 ) );\r\n r.setSize( sizeX, sizeY );\r\n r.setColor( new Color( 254, 254, 34 ) );\r\n add( r );\r\n }\r\n }\r\n }",
"private static void createSlideTransitions() {\n\t\tif (slideList.size() < SLIDES_REGIONS_LIMIT) {\n\t\t\tint length = (slideList.size() / 2) - 1;\n\t\t\t\n\t\t\tif (slideList.size() % 2 == 0) {\n\t\t\t\tlength++;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < length; i++) {\n\t\t\t\ttransitionList.add(slideList.get(i));\n\t\t\t\ttransitionList.add(slideList.get(length - i - 1));\n\t\t\t}\n\t\t} else {\n\t\t\tint length = slideList.size() / NUMBER_REGIONS / 2 - 1;\n\t\t\t\n\t\t\tif (slideList.size() % 2 == 0) {\n\t\t\t\tlength++;\n\t\t\t}\n\t\t\t\n\t\t\tfor (int i = 0; i < NUMBER_REGIONS; i++) {\n\t\t\t\tfor (int j = 0; j < length; j++) {\n\t\t\t\t\ttransitionList.add(slideList.get(j + i * length));\n\t\t\t\t\t//System.out.println(i * length - j - 1);\n\t\t\t\t\ttransitionList.add(slideList.get((i + 1) * length - j - 1));\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (slideList.size() % 2 != 0) {\n\t\t\t\ttransitionList.add(slideList.get(slideList.size() - 1));\n\t\t\t}\n\t\t}\n\t}",
"public void zoomRange(double lowerPercent, double upperPercent) {\n/* */ long adjEnd, adjStart;\n/* 1891 */ double start = this.timeline.toTimelineValue(\n/* 1892 */ (long)getRange().getLowerBound());\n/* 1893 */ double end = this.timeline.toTimelineValue(\n/* 1894 */ (long)getRange().getUpperBound());\n/* 1895 */ double length = end - start;\n/* */ \n/* */ \n/* 1898 */ if (isInverted()) {\n/* 1899 */ adjStart = (long)(start + length * (1.0D - upperPercent));\n/* 1900 */ adjEnd = (long)(start + length * (1.0D - lowerPercent));\n/* */ } else {\n/* */ \n/* 1903 */ adjStart = (long)(start + length * lowerPercent);\n/* 1904 */ adjEnd = (long)(start + length * upperPercent);\n/* */ } \n/* */ \n/* */ \n/* */ \n/* 1909 */ if (adjEnd <= adjStart) {\n/* 1910 */ adjEnd = adjStart + 1L;\n/* */ }\n/* */ \n/* 1913 */ DateRange dateRange = new DateRange(this.timeline.toMillisecond(adjStart), this.timeline.toMillisecond(adjEnd));\n/* 1914 */ setRange(dateRange);\n/* */ }",
"public InterpolatorGrid(double min, double max) {\n minValue = min;\n maxValue = max;\n }",
"@Override\n\tpublic int withIntervalInSeconds() {\n\t\treturn 10;\n\t}",
"public LongRange(long number) {\n/* 73 */ this.min = number;\n/* 74 */ this.max = number;\n/* */ }",
"public void settings() { size(1200, 800); }",
"public static TimeWindow newInstance(double start, double end) {\n return new TimeWindow(start, end);\n }",
"public Builder clearWindowSize() {\n \n windowSize_ = 0L;\n onChanged();\n return this;\n }",
"public GamePanel(int width, int height, int amount, int size) {\n\t\tsuper(); // calls and instance of JPanel (super class)\n\t\tthis.boxSize = size;\n\t\tthis.panelWidth = width;\n\t\tthis.panelHeight = height;\n\t\tcountDown.setText(\"Game Starting in 5 Seconds!\");\n\t\tadd(countDown);\n\t\tadd(score);\n\t\tadd(time);\n\t\tcreateTokens(amount);// call upon the createTokens method to create the number of desired tokens\n\t\tmouseActions();\n\t\tupdate();\n\t\t\n\t\t //calls the mouseActions class to identify the mouse actions\n\t}",
"private void initRangeSliders()\n\t{\n\t\trangeSliders.put(\"alpha\", new RangeSlider());\n\t\trangeSliders.put(\"eta\", new RangeSlider());\n\t\trangeSliders.put(\"kappa\", new RangeSlider());\n\t\t\n\t\tfor (Map.Entry<String, RangeSlider> entry : rangeSliders.entrySet()) {\n\t\t\tRangeSlider rs = entry.getValue();\n\n\t\t\trs.setMaxWidth(337);\n\t\t\trs.setPrefWidth(337);\n\t\t\trs.setMax(15);\n\t\t\trs.setMajorTickUnit(5);\n\t\t\trs.setMinorTickCount(4);\n\t\t\trs.setShowTickLabels(true);\n\t\t\trs.setShowTickMarks(true);\n\t\t\trs.setLowValue(0);\n\t\t\trs.setHighValue(25);\n\t\t\t\n\t\t\t// Get some distance between range sliders and bar charts.\n\t\t\trs.setPadding(new Insets(10, 0, 0, 1));\n\t\t\t\n\t\t\taddEventHandlerToRangeSlider(rs, entry.getKey());\n\t\t}\n\t\t\n\t\t// Set variable-specific minima and maxima.\n\t\trangeSliders.get(\"kappa\").setMin(2);\n\t\trangeSliders.get(\"kappa\").setMax(50);\n\t\trangeSliders.get(\"kappa\").setHighValue(50);\n\t\t\n\t\t// Add to respective parents.\n\t\tvBoxes.get(\"alpha\").getChildren().add(rangeSliders.get(\"alpha\"));\n\t\tvBoxes.get(\"eta\").getChildren().add(rangeSliders.get(\"eta\"));\n\t\tvBoxes.get(\"kappa\").getChildren().add(rangeSliders.get(\"kappa\"));\n\t}",
"public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n //initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }",
"public void startTimer() {\n timer = new Timer();\n\n //initialize the TimerTask's job\n initializeTimerTask();\n\n //schedule the timer, after the first 5000ms the TimerTask will run every 10000ms\n timer.schedule(timerTask, 5000, Your_X_SECS * 1000); //\n //timer.schedule(timerTask, 5000,1000); //\n }"
]
| [
"0.60397154",
"0.58784014",
"0.58001906",
"0.5799858",
"0.577485",
"0.55449593",
"0.5487144",
"0.5412166",
"0.53613603",
"0.5270392",
"0.5190278",
"0.51419544",
"0.5136287",
"0.5111383",
"0.50548756",
"0.50344855",
"0.5008437",
"0.4996668",
"0.49538442",
"0.49464798",
"0.49121734",
"0.4898259",
"0.48731023",
"0.4856326",
"0.48412916",
"0.48049024",
"0.47856462",
"0.4753288",
"0.47514224",
"0.471896",
"0.470871",
"0.46750256",
"0.4672787",
"0.46656972",
"0.4649129",
"0.4644243",
"0.46406192",
"0.46331123",
"0.46251386",
"0.45868737",
"0.45680308",
"0.45671782",
"0.4555834",
"0.45516068",
"0.45336285",
"0.4530099",
"0.45191956",
"0.4507734",
"0.45063892",
"0.4501316",
"0.4494471",
"0.44718325",
"0.44674405",
"0.44646248",
"0.44577724",
"0.44546133",
"0.4449747",
"0.4435776",
"0.44285944",
"0.44254112",
"0.44171736",
"0.44132796",
"0.43953356",
"0.43733588",
"0.43674734",
"0.4353053",
"0.4336187",
"0.43322954",
"0.42937437",
"0.42833668",
"0.42701188",
"0.42555806",
"0.42536342",
"0.4248542",
"0.42454815",
"0.4242787",
"0.4239511",
"0.42380333",
"0.42314023",
"0.42290616",
"0.42286807",
"0.42255783",
"0.42255685",
"0.4222831",
"0.4215998",
"0.42061102",
"0.42032167",
"0.41983575",
"0.4194751",
"0.41842517",
"0.41764602",
"0.4171946",
"0.41678512",
"0.41603214",
"0.41533452",
"0.4151608",
"0.4144135",
"0.41437104",
"0.41427764",
"0.41411564"
]
| 0.8382866 | 0 |
consider this is an infinite array and we do not know size and end index; | public static void main(String[] args) {
int[] arr = {1,4,5,6,7,8,100,200,300,400,500,1000,2000,3000,4000,5000,6000,7000,8000};
int target = 1;
System.out.println(helper(arr, target));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"IArray getArrayNext() throws InvalidRangeException;",
"IArray getArrayCurrent() throws InvalidRangeException;",
"public abstract void endArray();",
"int getEnd()\n {\n // check whether Deque is empty or not \n if(isEmpty() || end < 0)\n {\n System.out.println(\" Underflow\\n\");\n return -1 ;\n }\n return arr[end];\n }",
"public abstract int getEndIndex();",
"public abstract void notifyArrayEnd();",
"public abstract void startArray();",
"public int length() { return 1+maxidx; }",
"public T[] next(){\n\n if(hasNext()){\n int numElements = Math.min(window,lst.length - currentIndex);\n ArrayList<T> returnElements = new ArrayList<T>(numElements);\n for(int i = currentIndex; i < currentIndex + window && i < lst.length; i++ ){\n returnElements.add(lst[i]);\n if(i == lst.length-1){\n hasMore = Boolean.FALSE;\n }\n }\n currentIndex += step;\n return returnElements.toArray((T[]) Array.newInstance(returnElements.get(0).getClass(),0));\n }else{\n throw new NoSuchElementException(\"no elements to iterate \");\n }\n\n }",
"public abstract int end(int i);",
"public int end() { return _end; }",
"public boolean hasNext()\n/* */ {\n/* 82 */ return this.m_offset < this.m_array.length;\n/* */ }",
"private int getRealIndex()\r\n\t{\r\n\t\treturn index - 1;\r\n\t}",
"public int size ()\n {\n return lastIndex + 1;\n }",
"@Override\r\n\t\tpublic boolean hasNext() {\r\n\t\t\treturn arr[index] != null && index < arr.length;\r\n\t\t}",
"protected boolean advance()\n/* */ {\n/* 66 */ while (++this.m_offset < this.m_array.length) {\n/* 67 */ if (this.m_array[this.m_offset] != null) {\n/* 68 */ return true;\n/* */ }\n/* */ }\n/* 71 */ return false;\n/* */ }",
"public boolean hasNext(){\r\n return position<sizeArr;\r\n }",
"static void maxSubArraySum1(int a[], int size)\n {\n int max_so_far = Integer.MIN_VALUE,\n max_ending_here = 0,start = 0,\n end = 0, s = 0;\n\n for (int i = 0; i < size; i++)\n {\n max_ending_here += a[i];\n\n if (max_so_far < max_ending_here)\n {\n max_so_far = max_ending_here;\n start = s;\n end = i;\n }\n\n if (max_ending_here < 0)\n {\n max_ending_here = 0;\n s = i + 1;\n }\n }\n System.out.println(\"Maximum contiguous sum is \" + max_so_far);\n System.out.println(\"Starting index \" + start);\n System.out.println(\"Ending index \" + end);\n }",
"public SuperArray() { \n \t_data = new Comparable[10];\n \t_lastPos = -1; //flag to indicate no lastpos yet\n \t_size = 0;\t\n }",
"@Override\n @CheckReturnValue\n public boolean hasNext() {\n return offset < array.length;\n }",
"private boolean checkFull() {\n\t\treturn this.array.length - 1 == this.lastNotNull();\n\t}",
"public int getEndIndex() {\r\n\t\treturn endIndex;\r\n\t}",
"public IRubyObject subseq(long beg, long len) {\n if (beg < 0 || beg > getSize() || len < 0) {\n getRuntime().getNil();\n }\n \n if (beg + len > getSize()) {\n len = getSize() - beg;\n }\n if (len < 0) {\n len = 0;\n }\n if (len == 0) {\n return getRuntime().newArray();\n }\n \n RubyArray arr = getRuntime().newArray(0);\n for (long i = beg; i < beg + len; i++) {\n arr.append(group(i));\n }\n return arr;\n }",
"public ArrayIns(int max) // constructor\r\n {\r\n a = new long[max]; // create the array\r\n nElems = 0; // no items yet\r\n }",
"@Override\n public boolean hasNext() {\n return curIndex < maxIndex || super.hasNext();\n }",
"public BaseArray(int max) // constructor\n {\n a = new long[max]; // create the array\n nElems = 0; // no items yet\n }",
"public Object next()\n/* */ {\n/* 84 */ if (this.m_offset < this.m_limit) {\n/* 85 */ return this.m_array[(this.m_offset++)];\n/* */ }\n/* 87 */ throw new NoSuchElementException();\n/* */ }",
"private static void test() {\n\t\tint i = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[++i] = 0;\n\t\tprintArray(arr);\n\t\ti = 0;\n\t\tArrays.fill(arr, -1);\n\t\tarr[i++] = 0;\n\t\tprintArray(arr);\n\t\t\n\t}",
"public int getEndIndex() {\n return start + length - 1;\n }",
"public int getResultLength() { return i_end; }",
"protected abstract int getNextBufferSize(E[] paramArrayOfE);",
"@Override\n public boolean hasNext() {\n return j < size; // size is field of outer instance\n }",
"@Override\n public Iterator<E> iterator() {\n return new Iterator<E>() {\n private int nextIndex = 0;\n private int lastNextIndex = -1;\n private int rest = size();\n\n @Override\n public boolean hasNext() {\n return rest > 0;\n }\n\n @Override\n public E next() {\n if(!hasNext()){\n throw new NoSuchElementException();\n }\n rest--;\n lastNextIndex = nextIndex++;\n siftDown(nextIndex);\n\n return (E) array[lastNextIndex];\n }\n\n @Override\n public void remove() {\n if (lastNextIndex == -1) {\n throw new IllegalStateException();\n }\n removeElement(lastNextIndex);\n nextIndex--;\n lastNextIndex = -1;\n }\n };\n }",
"public int size() {\n\t\treturn end;\n\t}",
"private RubyArray(Ruby runtime, IRubyObject[] vals, int begin) {\n super(runtime, runtime.getArray());\n this.values = vals;\n this.begin = begin;\n this.realLength = vals.length - begin;\n this.isShared = true;\n }",
"protected int lastIdx() {\n return arrayIndex(currentWindowIndex() - 1);\n }",
"public static void main(String[] args) {\n int [] array = { 3 , 0 ,1, 5, 0 , 0,3 , 2};\n System.out.println(Arrays.toString(zerosAtTheEnd(array)));\n\n }",
"public int getRear() {\n if(size == 0) return -1;\n return tail.prev.val;\n}",
"public abstract void notifyArrayStart();",
"@Test\n public void testNextIndex_End() {\n OasisList<Integer> baseList = new SegmentedOasisList<>();\n baseList.addAll(Arrays.asList(1, 3));\n\n ListIterator<Integer> instance = baseList.listIterator();\n instance.next();\n instance.next();\n\n int expResult = 2;\n int result = instance.nextIndex();\n\n assertEquals(\"Calling nextIndex at the end of the iterator should return size of the associated list\",\n expResult, result);\n }",
"public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}",
"public boolean hasNext() {\n return cursor <= arrayLimit;\n }",
"private static ArrayList<Integer> next(ArrayList<Integer> prev, int infimum) {\n ArrayList<Integer> next = new ArrayList<>();\n\n next.add(1);\n int size = prev.size() - 1;\n for (int i = 0; i < size; i += 1) {\n int curr_ind = (prev.get(i) + prev.get(i + 1));\n next.add(curr_ind);\n }\n next.add(1);\n\n boolean found_first = false;\n int count = 0;\n while (!found_first) {\n for (int i : next) {\n count += 1;\n if (i > infimum) {\n found_first = true;\n break;\n }\n }\n if (found_first) {\n int end = next.size() - count;\n for (int i = count; i < end; i += 1) {\n next.set(i, 0);\n }\n }\n found_first = true;\n }\n\n return next;\n }",
"@Override\r\n public int nextIndex() {\r\n if (next == null) {\r\n return size; \r\n }\r\n return nextIndex - 1;\r\n }",
"public abstract double[] getUpperBound();",
"int getEnd();",
"public boolean hasNext() {\n\t\tif((++index)>=size)\n\t\t\treturn false;\t\n\t\telse\n\t\t\treturn true;\n\t}",
"public HighArray(int max) // constructor\n {\n a = new long[max]; // create the array\n nElems = 0; // no items yet\n }",
"static void rvereseArray(int arr[], int start, int end)\r\n {\r\n int temp;\r\n while(start < end){\r\n \r\n temp = arr[start];\r\n arr[start] = arr[end];\r\n arr[end] = temp;\r\n //rvereseArray(arr, start+1, end-1);\r\n // move the left and right index pointers in toward the center\r\n start++;\r\n end--;\r\n }\r\n }",
"private static void fillMaxArray() {\n int maxIndex = 0;\n int maxCount = 0;\n for (int n = 0; n < LIMIT; n++) {\n if (COUNT[n] > maxCount) {\n maxIndex = n;\n maxCount = COUNT[n];\n }\n COUNT[n] = maxIndex;\n }\n //System.err.println(Arrays.toString(COUNT));\n }",
"@Override\n public final int getEndIndex() {\n return upper;\n }",
"@Override\r\n\tpublic void visit(Array array) {\n\r\n\t}",
"public long size() {\n\treturn end - start + 1;\n }",
"boolean isFull()\n {\n return ((front == 0 && end == size-1) || front == end+1);\n }",
"private void checkIfArrayFull() {\n\n if(this.arrayList.length == this.elementsInArray) {\n size *= 2;\n arrayList = Arrays.copyOf(arrayList, size);\n }\n }",
"protected int arrayIndex(long windowIndex) {\n return (int) (windowIndex % length());\n }",
"private Object[] getArray(int index) {\n if (index >= getTreeSize(totalSize)) {\n return tail;\n } else {\n return getArray(treeRoot, treeDepth, index);\n }\n }",
"public boolean isFull() {\n return size == k;\n}",
"private int findMax(int begin, int end) {\n // you should NOT change this function\n int max = array[begin];\n for (int i = begin + 1; i <= end; i++) {\n if (array[i] > max) {\n max = array[i];\n }\n }\n return max;\n }",
"private int elementNC(int i) {\n return first + i * stride;\n }",
"public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}",
"public int checkIsEndState() {\n if (higherIndex - lowerIndex <= 1) {\n if (checkIsLeftBound(inputArray, lowerIndex)) {\n return lowerIndex;\n } else if (checkIsRightBound(inputArray, higherIndex)) {\n return higherIndex;\n }\n }\n return -1;\n }",
"public static List<int[]> getArrays( int[] arr, int end )\n {\n ArrayList<int[]> arrays = new ArrayList<int[]>( );\n int last = arr[ arr.length - 1 ];\n\n for (int lastVal = last + 1; lastVal <= end; lastVal++ )\n {\n int[] newArray = new int[ arr.length + 1 ];\n System.arraycopy( arr, 0, newArray, 0, arr.length );\n newArray[ arr.length ] = lastVal;\n arrays.add( newArray );\n }\n \n return arrays;\n }",
"@Override\n public int size() {\n return array.length;\n }",
"@Override\n public T removeLast() {\n if (size == 0) {\n return null;\n }\n\n int position = minusOne(nextLast);\n T itemToReturn = array[position];\n array[position] = null;\n nextLast = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }",
"public abstract int getStartIndex();",
"public int length() { return _end - _start; }",
"public CircularArray(int initialSize) {\n\t\tthis.array = new Object[initialSize];\n\t\tthis.index = 0;\n\t\tthis.length = 0;\n\t}",
"public int getEndIndex() {\n return this.endIndex;\n }",
"public int Rear() {\n if (count == 0) {\n return -1;\n }\n return array[tail];\n }",
"@Override\n\t\t\tpublic Iterator<Integer> iterator() {\n\t\t\t\treturn new Iterator<Integer>() {\n\n\t\t\t\t\tint index = -1;\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void remove() {\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic Integer next() {\n\t\t\t\t\t\tif (index >= length)\n\t\t\t\t\t\t\tthrow new RuntimeException();\n\t\t\t\t\t\treturn offset + index * delta;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic boolean hasNext() {\n\t\t\t\t\t\treturn ++index < length;\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t}",
"public boolean isFull() {\r\n\t\treturn cur_index == size;\r\n\t}",
"@Override\n\tpublic Iterator<T> iterator() {\n\t\treturn new CircularArrayIterator<T>(this);\n\t}",
"default Spliterator.OfInt getNextVertices(int vidx) {\n class MySpliterator extends AbstractIntSpliterator{\n int index;\n int limit;\n public MySpliterator (int vidx, int lo, int hi) {\n super(hi,ORDERED|NONNULL|SIZED|SUBSIZED);\n limit=hi;\n index=lo;\n }\n @Override\n public boolean tryAdvance(@Nonnull IntConsumer action) {\n if (index<limit) {\n action.accept(getNext(vidx,index++));\n return true;\n }\n return false;\n }\n @Nullable\n public MySpliterator trySplit() {\n int hi = limit, lo = index, mid = (lo + hi) >>> 1;\n return (lo >= mid) ? null : // divide range in half unless too small\n new MySpliterator(vidx, lo, index = mid);\n }\n \n }\n return new MySpliterator(vidx,0,getNextCount(vidx));\n }",
"public static List<int[]> getArrays( List<int[]> inputs, int end ) {\n ArrayList<int[]> arrays = new ArrayList<int[]>( );\n for (int[] stArr : inputs)\n {\n if (stArr[stArr.length-1] < end )\n {\n List<int[]> newArrays = getArrays( stArr, end );\n arrays.addAll( newArrays );\n }\n }\n \n return arrays;\n }",
"public int[] start() {\n\t\treturn null;\n\t}",
"public abstract double getDistance(int[] end);",
"private boolean isElementIndex(final long index) {\r\n\t\treturn index >= 0 && index < size;\r\n\t}",
"public int size(){return n;}",
"@Test\n public void test8() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1354,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test8\");\n Integer[] integerArray0 = new Integer[9];\n ResettableListIterator<Integer> resettableListIterator0 = IteratorUtils.arrayListIterator(integerArray0);\n assertEquals(true, resettableListIterator0.hasNext());\n }",
"public Coordinate peek(){\r\n return arr[size - 1];\r\n }",
"public DArray (int max)\n // constructor\n {\n theArray = new long[max];\n // create array\n nElems = 0;\n }",
"int getMedian () {\n if (fillLength == 0)\n throw new IndexOutOfBoundsException(\"An error occurred in getMedian method of StepDArray class\");\n return array[fillLength / 2];\n }",
"public abstract int[] findEmptyBlock(int processSize);",
"@Test\n public void test9() throws Throwable {\n\t\tfr.inria.diversify.sosie.logger.LogWriter.writeTestStart(1355,\"org.apache.commons.collections4.IteratorUtilsEvoSuiteTest.test9\");\n LinkedList<String>[] linkedListArray0 = (LinkedList<String>[]) Array.newInstance(LinkedList.class, 8);\n // Undeclared exception!\n try {\n IteratorUtils.arrayListIterator(linkedListArray0, 536);\n fail(\"Expecting exception: ArrayIndexOutOfBoundsException\");\n \n } catch(ArrayIndexOutOfBoundsException e) {\n //\n // Start index must not be greater than the array length\n //\n }\n }",
"public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }",
"public int endIndex(){\n\t\treturn this.startIndex()+this.getRows()-1;\n\t}",
"private int advance(int[] n, int i) {\n i += n[i];\n i%=len;\n while (i<0) i+=len;\n return i;\n }",
"void deletFromEnd()\n {\n if (isEmpty())\n {\n System.out.println(\" Underflow\");\n return ;\n }\n\n // Deque has only one element \n if (front == end)\n {\n front = end = -1;\n } else if (end == 0) {\n end = size-1;\n } else {\n end = end-1;\n }\n }",
"public int j()\r\n/* 60: */ {\r\n/* 61: 79 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 62: 80 */ if (this.a[i] == null) {\r\n/* 63: 81 */ return i;\r\n/* 64: */ }\r\n/* 65: */ }\r\n/* 66: 84 */ return -1;\r\n/* 67: */ }",
"@Override\n\t\tpublic int nextIndex() {\n\t\t\treturn 0;\n\t\t}",
"public int getEndIdx() {\n return this.endIdx;\n }",
"long arrayLength();",
"public int[] ArrayInverso1(int[] arr){\r\n\t\tint l=arr.length;\r\n\t\t\r\n\t\tint[] arr_inv = new int[l];\r\n\t\tfor (int i=0;i<l;i++)\r\n\t\tarr_inv[i]=arr[l-1-i];\r\n\t\treturn arr_inv;\r\n\t\t\r\n\t\t\r\n\t\r\n\t}",
"private boolean reachedEnd() {\n return current >= source.length();\n }",
"public OrderedArray(int max) {\n arr = new long[max];\n nElms = 0;\n }",
"public MovingAverage(int size) {\n value = new int[size];\n }",
"private int dequeue(){\n size--;\n int ret = array[front];\n front = (front+1)%capacity;\n return ret;\n }",
"public int getEnd()\n {\n return end;\n }",
"public int getEnd() {\r\n\t\treturn end;\r\n\t}",
"@Override\n public boolean hasNext() {\n return this.index < this.endIndex;\n }"
]
| [
"0.64676684",
"0.63095516",
"0.6300114",
"0.61843777",
"0.61102366",
"0.607261",
"0.600216",
"0.5868113",
"0.5812831",
"0.5802605",
"0.57733834",
"0.56943786",
"0.56172055",
"0.560084",
"0.5592508",
"0.5556008",
"0.55552614",
"0.55153096",
"0.5470141",
"0.54639876",
"0.5456752",
"0.5456377",
"0.5447436",
"0.54468524",
"0.5442932",
"0.5437523",
"0.54255676",
"0.54229033",
"0.54180413",
"0.5411192",
"0.540434",
"0.5360884",
"0.53559756",
"0.5343656",
"0.53434765",
"0.5333106",
"0.53291965",
"0.53195226",
"0.53168607",
"0.5310462",
"0.5309795",
"0.53024244",
"0.5301802",
"0.5291607",
"0.527201",
"0.52708715",
"0.52475375",
"0.52420366",
"0.52344674",
"0.52305984",
"0.52296025",
"0.5181241",
"0.5176417",
"0.5166393",
"0.5165215",
"0.5164752",
"0.5162701",
"0.51593566",
"0.5148546",
"0.51440364",
"0.5129921",
"0.512555",
"0.51223797",
"0.5120912",
"0.5120685",
"0.51189524",
"0.5099164",
"0.5097145",
"0.50951546",
"0.5093419",
"0.50897986",
"0.5081185",
"0.5080208",
"0.5079496",
"0.5076484",
"0.5074902",
"0.5072515",
"0.5071414",
"0.50684017",
"0.5067032",
"0.50633526",
"0.5053478",
"0.5051891",
"0.5050575",
"0.5049207",
"0.5044568",
"0.50438786",
"0.5034462",
"0.5030193",
"0.5022773",
"0.5020136",
"0.5016722",
"0.5009578",
"0.5008371",
"0.50082195",
"0.5003775",
"0.5000192",
"0.49981824",
"0.49977872",
"0.49958465",
"0.49940154"
]
| 0.0 | -1 |
Returns the size of the shadow element. | @Override
public int getShadowSize() {
return Geometry.getW(shadow.getElement());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public float getSoftShadowLength();",
"public double getSize() {\n return getElement().getSize();\n }",
"public long getSize() {\n\t\treturn Math.abs(getXSize() * getYSize() * getZSize());\n\t}",
"public float getSize() {\n\t\treturn size;\n\t}",
"public float getSize() {\n return size;\n }",
"public Dimension getSize() {\n\t\treturn size.getCopy();\n\t}",
"public float getSize()\n {\n return size;\n }",
"public Dimension getSize()\n\t{\n\t\treturn rect.getSize();\n\t}",
"public int getElementSize() {\n\t\treturn this.elementsize;\n\t}",
"public double getSize()\n\t{\n\t\treturn size;\n\t}",
"public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}",
"public Dimension getSize ( )\r\n\t{\r\n\t\treturn new Dimension ( BORDER_X*2 + SQUARE_SIZE*size, BORDER_Y*2 + SQUARE_SIZE*size );\r\n\t}",
"public double getSize() {\n return size_;\n }",
"public Point2D.Float getSize() {\r\n\t\treturn size;\r\n\t}",
"public double getSize() {\n return size_;\n }",
"public Dimension getSize()\n {\n return new Dimension(300, 150);\n }",
"public Dimension getSize() {\n if (size.height < 0 && size.width < 0 && nodeFigure != null) {\n return nodeFigure.getSize().getCopy();\n }\n return size.getCopy();\n }",
"@Override\n public int getElementSize() {\n if (elementSize <= 0)\n calcElementSize();\n return elementSize;\n }",
"Dimension getSize();",
"Dimension getSize();",
"public Vector2 getMouseSize() {\n \tdimension.set(pointer.width, pointer.height);\n \treturn dimension;\n\t}",
"public Dimension3d getSize() {\n return size;\n }",
"public int getWidth() {\n return mySize.getWidth();\n }",
"public double getSize() \n {\n return size;\n }",
"double getSize();",
"public Dimension getSize()\n\t{\n\t\treturn new Dimension(image.getWidth(),image.getHeight());\n\t}",
"public Size getSize() {\n return size;\n }",
"public final Vector2f getSize() {\r\n return size;\r\n }",
"public Point getSize() {\n checkWidget();\n return parent.fixPoint( itemBounds.width, itemBounds.height );\n }",
"public Vector2i getSize() {\n return new Vector2i(getWidth(), getHeight());\n }",
"public double angularSize() {\n return angularSize;\n }",
"public static int getSIZE() {\n return SIZE;\n }",
"public double getMySize() {\n\t\treturn size;\n\t}",
"public int getLength() {\n return mySize.getLength();\n }",
"public int getSize() {\n\t\tif (type == Attribute.Type.Int) {\r\n\t\t\treturn INT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Char) {\r\n\t\t\treturn CHAR_SIZE * length;\r\n\t\t} else if (type == Attribute.Type.Long) {\r\n\t\t\treturn LONG_SIZE;\r\n\t\t} else if (type == Attribute.Type.Float) {\r\n\t\t\treturn FLOAT_SIZE;\r\n\t\t} else if (type == Attribute.Type.Double) {\r\n\t\t\treturn DOUBLE_SIZE;\r\n\t\t} else if (type == Attribute.Type.DateTime){\r\n\t\t\treturn LONG_SIZE;\r\n\t\t}\r\n\t\t\r\n\t\treturn size;\r\n\t}",
"public int getSize() {\n\t\treturn WORLD_SIZE;\n\t}",
"public final String getSizeAttribute() {\n return getAttributeValue(\"size\");\n }",
"@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}",
"public static float getSize() {\n return STAFF_LEN + FLAG_DEL_Y;\n }",
"public long getSize() {\n return mSize;\n }",
"public Dimension getSize() { return new Dimension(width,height); }",
"public final int getSize() {\n return size;\n }",
"public int getSize() {\n\t\treturn this.getSizeRecursive(root);\n\t}",
"public int getSize() {\n\t\treturn width + length;\n\t}",
"public int getZSize() {\n\t\treturn (highPoint.getBlockZ() - lowPoint.getBlockZ()) + 1;\n\t}",
"public int getPixelSize() {\n\t\treturn pixelSize;\n\t}",
"public int getSize() {\n return this.radius;\n }",
"public FireSize getSize() {\n return size;\n }",
"public double getRectHeight() {\n return (hexHeight * 1.5) + 0.5;\n }",
"public Integer getSize() {\n return size;\n }",
"public static int GetSize() {\n\t\t\treturn gridSize.getValue();\n\t\t}",
"public Dimension getSize() {\n\t\treturn null;\n\t}",
"public Dimension getSize() {\n\t\t\t\tfor(Rectangle rec : boxes){\r\n\t\t\t\t\tbounds.union(rec);\r\n\t\t\t\t}\r\n\t\t\t\treturn bounds.getSize();\r\n\t\t\t}",
"public int getSize() {\r\n return this.radius;\r\n }",
"public int getSize()\n\t{\n\t\treturn setSize;\n\t}",
"public Float getHightlightedTextSize() {\n if (mHightlightedTextSize != null)\n return mHightlightedTextSize;\n return getTextSize();\n }",
"public float getDiameter() {\n /* 425 */\n RectF content = this.mViewPortHandler.getContentRect();\n /* 426 */\n content.left += getExtraLeftOffset();\n /* 427 */\n content.top += getExtraTopOffset();\n /* 428 */\n content.right -= getExtraRightOffset();\n /* 429 */\n content.bottom -= getExtraBottomOffset();\n /* 430 */\n return Math.min(content.width(), content.height());\n /* */\n }",
"public double getWidth() {\n return getElement().getWidth();\n }",
"public long getSize() {\r\n\t\treturn size;\r\n\t}",
"public double getHeight() {\n return getElement().getHeight();\n }",
"public Vector2f getSize() {return new Vector2f(sizeX, sizeX);}",
"public int getSize() {\n\t\treturn m_size;\n\t}",
"public double getFeederSize()\r\n\t{\r\n\t\treturn size;\r\n\t}",
"private int getSize() {\n\t\t\treturn size;\n\t\t}",
"public long getSize() {\n\t\treturn size;\n\t}",
"int getSize() {\n return size;\n }",
"public Point getSize();",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return size;\n }",
"int getSize() {\n return size;\n }",
"public RMSize getSize() { return new RMSize(getWidth(), getHeight()); }",
"public static byte getSize() {\n return SIZE;\n }",
"public float getSpringSize() {\r\n\t\treturn springSize;\r\n\t}",
"public int getSize() {\n return size;\n }",
"public int getSize() {\n return iSize;\n }",
"public int getSize() {\r\n return size;\r\n }",
"public int getSize() {\r\n return _size;\r\n }",
"public int getSize( )\n {\n return size;\n }",
"@Element \n public String getSize() {\n return size;\n }",
"public int getSize() {\r\n\t\treturn size;\r\n\t}",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }",
"public long getSize() {\n return size;\n }",
"public int getSize() {\n\n return size;\n }",
"public int getSize() {\n return this.size;\n }",
"public long getSize() {\n return size.get();\n }",
"public long getSize() {\r\n return size;\r\n }",
"public final int getWidth() {\r\n return (int) size.x();\r\n }",
"public static final int getH(Element e) {\n int ret = e.getOffsetHeight();\n ret -= MiscUtils.getComputedStyleInt(e, \"paddingTop\");\n ret -= MiscUtils.getComputedStyleInt(e, \"paddingBottom\");\n ret -= MiscUtils.getComputedStyleInt(e, \"borderTopWidth\");\n ret -= MiscUtils.getComputedStyleInt(e, \"borderBottomWidth\");\n return Math.max(ret, 0);\n }",
"public int getTransitionSize() {\n return _transitionSize;\n }",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}",
"public int getSize() {\n\t\treturn size;\n\t}"
]
| [
"0.6629826",
"0.65550333",
"0.6369756",
"0.6269714",
"0.6254549",
"0.6219356",
"0.6184271",
"0.6164071",
"0.6156617",
"0.61478984",
"0.6139233",
"0.61312",
"0.6120292",
"0.6109509",
"0.6093284",
"0.6091651",
"0.60358423",
"0.60317814",
"0.6010445",
"0.6010445",
"0.6005617",
"0.5971762",
"0.5907556",
"0.5902935",
"0.5902904",
"0.58912116",
"0.5876195",
"0.5867353",
"0.58659774",
"0.58267033",
"0.58250886",
"0.5823491",
"0.58232033",
"0.5807435",
"0.5788351",
"0.57771534",
"0.5768087",
"0.57672536",
"0.57599354",
"0.57535416",
"0.57522213",
"0.5745039",
"0.5744019",
"0.5734232",
"0.5730725",
"0.57261735",
"0.57219887",
"0.5698884",
"0.5698498",
"0.56946313",
"0.56925535",
"0.56924856",
"0.5679439",
"0.5670406",
"0.5659472",
"0.565604",
"0.56512016",
"0.56196046",
"0.56176656",
"0.56143063",
"0.56082904",
"0.56061184",
"0.5604823",
"0.56032324",
"0.5602764",
"0.5602558",
"0.5602399",
"0.55979955",
"0.55979955",
"0.55979955",
"0.55979955",
"0.55979955",
"0.55979955",
"0.55979955",
"0.55979955",
"0.5593812",
"0.55915314",
"0.55911493",
"0.55901474",
"0.558959",
"0.5589263",
"0.55872625",
"0.558487",
"0.5583552",
"0.5577972",
"0.55761033",
"0.5562769",
"0.5562769",
"0.5562769",
"0.5562769",
"0.5561106",
"0.55603343",
"0.55575085",
"0.5555728",
"0.5552014",
"0.5551366",
"0.55487394",
"0.5546858",
"0.5546858",
"0.5546858"
]
| 0.86617774 | 0 |
Creates a new delete resource action. | public DeleteResourceAction() {
super("Delete Safi Resources");
setToolTipText("Deletes physical resources from the current workspace");
// PlatformUI.getWorkbench().getHelpSystem().setHelp(this,
// IIDEHelpContextIds.DELETE_RESOURCE_ACTION);
setId(ID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public DeleteResource() {\n }",
"private void deleteResource() {\n }",
"private ServiceAction createDeleteEnrichmentAction() {\n final MarcRecord deleteRecord = new MarcRecord(marcRecord);\n final MarcRecordReader reader = new MarcRecordReader(deleteRecord);\n final String recordId = reader.getRecordId();\n final String agencyId = reader.getAgencyId();\n\n LOGGER.use(log -> log.info(\"Create action to delete old enrichment record {{}:{}}\", recordId, agencyId));\n\n final MarcRecordWriter writer = new MarcRecordWriter(deleteRecord);\n writer.markForDeletion();\n return createUpdateRecordAction(deleteRecord);\n }",
"@DELETE\n\tResponse delete();",
"@DELETE\n public void delete() {\n }",
"@DELETE\n public void delete() {\n }",
"@DELETE\n public void delete() {\n }",
"private DeleteAction makeDeleteAction(String input)\r\n throws MakeActionException {\r\n if (params.length == 0) {\r\n throw new MakeActionException(DeleteAction.ERR_INSUFFICIENT_ARGS);\r\n }\r\n DeleteAction da = new DeleteAction(goku);\r\n da.input = input;\r\n\r\n if (params.length == 1) {\r\n try {\r\n int id = Integer.parseInt(params[0]);\r\n da.id = id;\r\n } catch (NumberFormatException e) {\r\n da.id = null;\r\n da.title = params[0];\r\n }\r\n } else {\r\n da.title = Joiner.on(\" \").join(params);\r\n }\r\n return da;\r\n }",
"@Override\n\tpublic int deleteAction(JSONObject params) {\n\t\treturn this.delete(\"deleteAction\", params);\n\t}",
"DeleteType createDeleteType();",
"private Delete() {}",
"private Delete() {}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(\n String resourceGroupName,\n String workspaceName,\n String computeName,\n UnderlyingResourceAction underlyingResourceAction,\n Context context);",
"@Override\n\tpublic CommandAction execute(HttpServletRequest request, HttpServletResponse response)\n\t\t\tthrows IOException, ServletException {\n\t\treturn new CommandAction(false, \"delete.jsp\");\n\t}",
"@Override\n public ActionButton createDeleteButton()\n {\n ActionButton button = super.createDeleteButton();\n if (button != null)\n {\n button.setScript(\"LABKEY.experiment.confirmDelete('\" + getSchema().getName() + \"', '\" + getQueryDef().getName() + \"', '\" + getSelectionKey() + \"', 'sample', 'samples')\");\n button.setRequiresSelection(true);\n }\n return button;\n }",
"@Source(\"gr/grnet/pithos/resources/editdelete.png\")\n ImageResource delete();",
"@DeleteMapping(\"/event-actions/{id}\")\n @Timed\n public ResponseEntity<Void> deleteEventAction(@PathVariable Long id) {\n log.debug(\"REST request to delete EventAction : {}\", id);\n eventActionService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@ServiceMethod(returns = ReturnType.SINGLE)\n void delete(\n String resourceGroupName,\n String workspaceName,\n String computeName,\n UnderlyingResourceAction underlyingResourceAction);",
"void afterDelete(T resource);",
"public abstract boolean deleteResource(String name);",
"@Override\r\n\tpublic int delete(ActionContext arg0) throws Exception {\n\t\treturn 0;\r\n\t}",
"void delete(String typeName, String id);",
"int deleteByExample(ResourceExample example);",
"@DeleteMapping(value = \"/delete\", produces = \"application/json\")\n void delete(@RequestParam int id);",
"@DELETE\n public void delete() {\n try {\n dao.delete(dao.retrieveById(id));\n } catch (EntityInUse eiu) {\n throw new WebApplicationException(WSUtils.buildError(400, EntityInUse.ERROR_MESSAGE));\n }\n }",
"void delete(E entity, RequestContext context)\n throws TechnicalException, ResourceNotFoundException;",
"@DELETE\n @Path(\"/remove\")\n public void delete() {\n System.out.println(\"DELETE invoked\");\n }",
"private void actionDelete() {\r\n showDeleteDialog();\r\n }",
"public abstract void delete(DataAction data, DataRequest source) throws ConnectorOperationException;",
"public abstract void onDelete(final ResourceType type, final Integer... resources);",
"@DeleteMapping(\"/attractions/{id}\")\n @Timed\n public ResponseEntity<Void> deleteAttraction(@PathVariable Long id) {\n log.debug(\"REST request to delete Attraction : {}\", id);\n\n attractionRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Override\n public void deleteController(String objectId) throws ServiceException {\n UuidUtils.checkUuid(objectId);\n RestfulResponse response = getMssProxy().deleteResource(bucketName, resourceTypeName, objectId);\n ResponseUtils.checkResonseAndThrowException(response);\n\n }",
"public void delete() throws NotAuthorizedException, ConflictException,\n\t\t\tBadRequestException {\n\t}",
"@DELETE\n @Path(\"/\")\n public Response delete() {\n\n if (entityDefinition == null) {\n return Response.status(Status.NOT_FOUND).build();\n }\n entityDefinition.getService().deleteCustom(entityId);\n return Response.status(Status.NO_CONTENT).build();\n }",
"public ResponseTranslator delete() {\n setMethod(\"DELETE\");\n return doRequest();\n }",
"@Override\n\t@Action(\"delete\")\n\t@LogInfo(optType=\"删除\")\n\tpublic String delete() throws Exception {\n\t\ttry {\n\t\t\tString str=sampleManager.deleteEntity(deleteIds);\n\t\t\tStruts2Utils.getRequest().setAttribute(LogInfo.MESSAGE_ATTRIBUTE, \"删除数据:单号:\"+str);\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\trenderText(\"删除失败:\" + e.getMessage());\n\t\t\tlog.error(\"删除数据信息失败\",e);\n\t\t}\n\t\treturn null;\n\t}",
"@Override\r\n\tpublic String delete() {\n\t\treturn \"delete\";\r\n\t}",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"void delete(String resourceGroupName, String dataControllerName, Context context);",
"@DELETE\n public void delete(@PathParam(\"id\") String id) {\n }",
"@Test()\n public void testDeleteInvalidResource() throws Exception {\n if (!deleteSupported) {\n return;\n }\n\n FHIRResponse response = client.delete(MedicationAdministration.class.getSimpleName(), \"invalid-resource-id-testDeleteInvalidResource\");\n assertNotNull(response);\n assertResponse(response.getResponse(), Response.Status.OK.getStatusCode());\n }",
"@SuppressWarnings(\"serial\")\r\n private Action getDeleteAction() {\r\n if (this.deleteAction == null) {\r\n String actionCommand = bundle.getString(DELETE_NODE_KEY);\r\n String actionKey = bundle.getString(DELETE_NODE_KEY + \".action\");\r\n this.deleteAction = new AbstractAction(actionCommand) {\r\n @Override\r\n public void actionPerformed(ActionEvent e) {\r\n System.out.println(\"actionPerformed(): action = \"\r\n + e.getActionCommand());\r\n if (checkAction()) {\r\n // Checks if several nodes will be deleted\r\n if (nodes.length > 1) {\r\n model.deleteNodes(nodes);\r\n } else {\r\n model.deleteNode(nodes[0]);\r\n }\r\n }\r\n }\r\n\r\n private boolean checkAction() {\r\n // No node selected\r\n if (nodes == null) {\r\n JOptionPane.showMessageDialog(JZVNode.this, bundle\r\n .getString(\"dlg.error.deleteWithoutSelection\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }\r\n };\r\n this.deleteAction.putValue(Action.ACTION_COMMAND_KEY, actionKey);\r\n\r\n this.getInputMap(WHEN_IN_FOCUSED_WINDOW).put(\r\n KeyStroke.getKeyStroke(KeyEvent.VK_DELETE, 0), actionKey);\r\n this.getActionMap().put(actionKey, this.deleteAction);\r\n }\r\n return this.deleteAction;\r\n }",
"public void delete()\n {\n call(\"Delete\");\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"@Override\n \tpublic Representation deleteResource() {\n \t\tString interId = (String) this.getRequestAttributes().get(\"interId\");\n \t\tString srcId = (String) this.getRequestAttributes().get(\"sourceId\");\n \t\t\n \t\t// On s'assure qu'il n'est plus prsent en base de donnes\n \t\n \t\tIntervention inter = Interventions.getInstance().getIntervention(interId);\n \t\tList<Source> sources = inter.getSources();\n \t\tfor (int i = 0; i < sources.size(); i++) {\n \t\t\tif (sources.get(i).getUniqueID().equals(srcId)) {\n \t\t\t\tsources.remove(sources.get(i));\n \t\t\t}\n \t\t}\n \t\t\n \t\treturn null;\n \t}",
"@Exclude\n public abstract void delete();",
"@Test\r\n\tpublic void deleteResourceTest() {\n\t\tLibraryNode ln = ml.createNewLibrary(\"http://example.com/resource\", \"RT\", pc.getDefaultProject());\r\n\t\tBusinessObjectNode bo = ml.addBusinessObjectToLibrary(ln, \"MyBo\");\r\n\t\tResourceNode rn = ml.addResource(bo);\r\n\t\tcheck(rn);\r\n\r\n\t\t// Given\r\n\t\tCollection<TypeUser> l1 = bo.getWhereAssigned();\r\n\t\tCollection<TypeUser> l2 = bo.getWhereUsedAndDescendants();\r\n\t\tassertTrue(\"Resource must be in subject's where assigned list.\", bo.getWhereAssigned().contains(rn));\r\n\t\tassertTrue(\"Resource must have a subject.\", rn.getSubject() == bo);\r\n\t\tassertTrue(\"Resource must be in subject's where-used list.\", bo.getWhereUsedAndDescendants().contains(rn));\r\n\r\n\t\t// When - the resource is deleted\r\n\t\trn.delete();\r\n\r\n\t\t// Then\r\n\t\tassertTrue(\"Resource must be deleted.\", rn.isDeleted());\r\n\t\tassertTrue(\"Resource must NOT be in subject's where-used list.\", !bo.getWhereUsedAndDescendants().contains(rn));\r\n\t}",
"ResponseEntity deleteById(UUID id);",
"@DELETE\n @Path(\"{id}\")\n public Response delete(@PathParam(\"id\") Long id) throws UnknownResourceException {\n int previousRows = customerBillFormatFacade.count();\n CustomerBillFormat entity = customerBillFormatFacade.find(id);\n\n // Event deletion\n// publisher.deletionNotification(entity, new Date());\n try {\n //Pause for 4 seconds to finish notification\n Thread.sleep(4000);\n } catch (InterruptedException ex) {\n Logger.getLogger(CustomerBillFormatAdminResource.class.getName()).log(Level.SEVERE, null, ex);\n }\n // remove event(s) binding to the resource\n List<CustomerBillFormatEvent> events = eventFacade.findAll();\n for (CustomerBillFormatEvent event : events) {\n if (event.getResource().getId().equals(id)) {\n eventFacade.remove(event.getId());\n }\n }\n //remove resource\n customerBillFormatFacade.remove(id);\n\n int affectedRows = 1;\n Report stat = new Report(customerBillFormatFacade.count());\n stat.setAffectedRows(affectedRows);\n stat.setPreviousRows(previousRows);\n\n // 200 \n Response response = Response.ok(stat).build();\n return response;\n }",
"void delete(InformationResourceFile file);",
"public void delete() {\n\n\t}",
"public void delete(int id);",
"void delete(String identifier) throws IOException;",
"public void delete() {\n\n }",
"@DeleteMapping(name = \"delete\")\n\tpublic ResponseEntity<?> delete(@ModelAttribute Entity entity) {\n\t\tgetService().delete(entity);\n\t\treturn ResponseEntity.ok().build();\n\t}",
"@Override\r\n\tprotected ActionListener deleteBtnAction() {\n\t\treturn null;\r\n\t}",
"ActionDefinition createActionDefinition();",
"HttpResponse httpDelete(URI uri, String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"public void delete(String id);",
"@Override\n\tpublic void destroyAction(int id) {\n\t\t\n\t}",
"WriteRequest delete(PiHandle handle);",
"public void operationDelete() {\n\r\n\t\tstatusFeldDelete();\r\n\t}",
"public void delete(Long id) {\n log.debug(\"Request to delete ActionParam : {}\", id);\n actionParamRepository.deleteById(id);\n }",
"HttpDelete deleteRequest(HttpServletRequest request, String address) throws IOException;",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"void delete(String id);",
"@Override\n public void deletedResource( ResourceEvent event )\n {\n\n }",
"public void delete(SecRole entity);",
"public void delete(ControlAcceso entity) {\n\n\t}",
"org.naru.park.ParkController.CommonAction getDeleteSensor();",
"public void delete() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"deleteButton\").click();\n\t}",
"public void delete(){\r\n\r\n }",
"public abstract void delete();",
"public abstract void delete();",
"public void deleteAccount(ActionEvent actionEvent) {\n }",
"Boolean delete(HttpServletRequest request, Long id);",
"void delete(Entity entity);",
"void delete(int entityId);",
"void deleteButton_actionPerformed(ActionEvent e) {\n doDelete();\n }",
"@Test\n public void testCreateNewResource() throws Exception {\n MedicationAdministration ma = TestUtil.readLocalResource(\"MedicationAdministration.json\");\n FHIRResponse response = client.create(ma);\n assertNotNull(response);\n assertResponse(response.getResponse(), Response.Status.CREATED.getStatusCode());\n\n // Obtain the resource type and id from the location string.\n String[] locationTokens = response.parseLocation(response.getLocation());\n deletedType = locationTokens[0];\n deletedId = locationTokens[1];\n\n // Make sure we can read back the resource.\n response = client.read(deletedType, deletedId);\n assertNotNull(response);\n assertResponse(response.getResponse(), Response.Status.OK.getStatusCode());\n deletedResource = response.getResource(MedicationAdministration.class);\n assertNotNull(deletedResource);\n }",
"@PreAuthorize(\"hasAnyRole('ADMIN')\") // PERMISSÃO APENAS DO ADMIN\n\t@RequestMapping(value = \"/{id}\", method = RequestMethod.DELETE)\n\tpublic ResponseEntity<Void> delete(@PathVariable Integer id) {\n\t\tservice.delete(id);\n\t\treturn ResponseEntity.noContent().build(); // RESPOSTA 204\n\t}",
"DeleteDestinationResult deleteDestination(DeleteDestinationRequest deleteDestinationRequest);",
"@DeleteMapping(\"/course-resources/{id}\")\n @Timed\n public ResponseEntity<Void> deleteCourseResource(@PathVariable Long id) {\n log.debug(\"REST request to delete CourseResource : {}\", id);\n courseResourceService.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"DeleteACLResult deleteACL(DeleteACLRequest deleteACLRequest);",
"void delete(int id);"
]
| [
"0.6327583",
"0.6211646",
"0.605749",
"0.5914821",
"0.57831925",
"0.57831925",
"0.57750964",
"0.5772737",
"0.57377696",
"0.5703079",
"0.5699302",
"0.5699302",
"0.56818265",
"0.56797284",
"0.5678023",
"0.5673539",
"0.5664177",
"0.56566155",
"0.5632771",
"0.56052893",
"0.5591574",
"0.55733985",
"0.55707663",
"0.5565302",
"0.5554974",
"0.5515468",
"0.5502105",
"0.5444285",
"0.54376245",
"0.54374075",
"0.54107285",
"0.54062456",
"0.5396115",
"0.5379845",
"0.5374366",
"0.5361675",
"0.53517365",
"0.5349251",
"0.5349251",
"0.5349251",
"0.5349251",
"0.5349251",
"0.5349251",
"0.5336059",
"0.5334878",
"0.53336835",
"0.53287417",
"0.5318032",
"0.528315",
"0.528315",
"0.528315",
"0.5278142",
"0.52642536",
"0.52603775",
"0.52475244",
"0.5237062",
"0.52330625",
"0.52279866",
"0.52148473",
"0.52130723",
"0.5199589",
"0.51973665",
"0.51913804",
"0.5190456",
"0.51895314",
"0.5175559",
"0.5175559",
"0.5175559",
"0.5175559",
"0.5175559",
"0.51707023",
"0.5163356",
"0.5159839",
"0.51556367",
"0.5149879",
"0.51488113",
"0.51488113",
"0.51488113",
"0.51488113",
"0.51488113",
"0.51488113",
"0.5148079",
"0.5140398",
"0.51357716",
"0.5129418",
"0.5125187",
"0.51227874",
"0.5102409",
"0.5102409",
"0.50954044",
"0.5093345",
"0.5089753",
"0.5088279",
"0.50825226",
"0.5077656",
"0.5072786",
"0.5072111",
"0.5069376",
"0.5067805",
"0.5063048"
]
| 0.64461917 | 0 |
Returns whether delete can be performed on the current selection. | private boolean canDelete(IResource[] resources) {
// allow only projects or only non-projects to be selected;
// note that the selection may contain multiple types of resource
if (!(containsOnlyProjects(resources) || containsOnlyNonProjects(resources))) {
return false;
}
if (resources.length == 0) {
return false;
}
// Return true if everything in the selection exists.
for (IResource resource : resources) {
if (resource.isPhantom()) {
return false;
}
}
return true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean isDeleteEnabled() {\n \t\tif (text == null || text.isDisposed())\n \t\t\treturn false;\n \t\treturn text.getSelectionCount() > 0\n \t\t\t|| text.getCaretPosition() < text.getCharCount();\n \t}",
"@Override\n \tpublic boolean canDelete() {\n \t\treturn false;\n \t}",
"public boolean isOkToDelete() {\r\n // TODO - implement User.isOkToDelete\r\n throw new UnsupportedOperationException();\r\n }",
"boolean hasDelete();",
"boolean hasDelete();",
"public boolean canDelete() throws GTClientException\n {\n return false;\n }",
"private void checkDeleteable() {\n \t\tboolean oldIsDeleteable = isDeleteable;\n \t\tisDeleteable = isDeleteEnabled();\n \t\tif (oldIsDeleteable != isDeleteable) {\n \t\t\tfireEnablementChanged(DELETE);\n \t\t}\n \t}",
"public boolean isItDelete() {\n\t\treturn false;\n\t}",
"public boolean isRemovalEnabled() {\r\n // Additional business logic can go here\r\n return (getContactSelection().getMinSelectionIndex() != -1);\r\n }",
"boolean hasForceDelete();",
"public final boolean isForDelete() {\n\t\treturn JsUtils.getNativePropertyBoolean(this, \"forDelete\");\n\t}",
"boolean hasDeletionProtection();",
"public boolean isDeleteMode() {\n return mIsDeleteMode;\n }",
"public boolean isVisualizeDeleteEnabled() {\n return visualizeDeleteEnabled;\n }",
"public boolean isIsDelete() {\n return isDelete;\n }",
"public boolean canBeDeleted() {\n\t\treturn System.currentTimeMillis() - dateTimeOfSubmission.getTime() < ACCEPT_CANCEL_TIME;\n\t}",
"private boolean checkDeleteButton(int cell, int xPos, int yPos) {\r\n int x1 = _cellStartX + CELL_SIZE_X + 18;\r\n int y1 = _cellStartY + (int) ((float) cell * (float) CELL_SIZE_Y / _textScale) - 3;\r\n int x2 = x1 + 16;\r\n int y2 = y1 + 16;\r\n\r\n x1 *= _textScale;\r\n y1 *= _textScale;\r\n x2 *= _textScale;\r\n y2 *= _textScale;\r\n\r\n if (xPos >= x1 && xPos <= x2) {\r\n if (yPos >= y1 && yPos <= y2) {\r\n boolean selected = _selectedList.get(_startCell + cell);\r\n _selectedList.set(_startCell + cell, !selected);\r\n return true;\r\n }\r\n }\r\n\r\n return false;\r\n\t}",
"public boolean canSelectionChange() {\n return true;\n }",
"public boolean canHandle(Object selection);",
"public boolean delete()\r\n\t{\n\t\tif ((this.argumentsAgainst.size() > 0) ||\r\n\t\t\t\t(this.argumentsFor.size() > 0) ||\r\n\t\t\t\t(this.relationships.size() > 0) ||\r\n\t\t\t\t(this.questions.size() > 0) ||\r\n\t\t\t\t(this.subDecisions.size() > 0))\r\n\t\t{\r\n\t\t\tMessageDialog.openError(new Shell(),\t\"Delete Error\",\t\"Can't delete when there are sub-elements.\");\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tRationaleDB db = RationaleDB.getHandle();\r\n\t\t\r\n//\t\t//are there any dependencies on this item?\r\n//\t\tif (db.getDependentAlternatives(this).size() > 0)\r\n//\t\t{\r\n//\t\t\tMessageDialog.openError(new Shell(),\t\"Delete Error\",\t\"Can't delete when there are depencencies.\");\r\n//\t\t\treturn true;\r\n//\t\t}\r\n\t\t\r\n\t\tm_eventGenerator.Destroyed();\r\n\t\t\r\n\t\tdb.deleteRationaleElement(this);\r\n\t\treturn false;\r\n\t\t\r\n\t}",
"public boolean hasDeleteAfterCompletion()\r\n\t{\r\n\t\treturn isDeleteAfterCompletion();\r\n\t}",
"public boolean isDeleted();",
"protected boolean beforeDelete() {\n if (DOCSTATUS_Drafted.equals(getDocStatus())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n\n }",
"boolean isDeleted();",
"public boolean delete() {\r\n \t\t// need to have a way to inform if delete did not happen\r\n \t\t// can't delete if there are dependencies...\r\n \t\tif ((this.argumentsAgainst.size() > 0)\r\n \t\t\t\t|| (this.argumentsFor.size() > 0)\r\n \t\t\t\t|| (this.relationships.size() > 0)\r\n \t\t\t\t|| (this.questions.size() > 0)\r\n \t\t\t\t|| (this.subDecisions.size() > 0)) {\r\n \t\t\tMessageDialog.openError(new Shell(), \"Delete Error\",\r\n \t\t\t\"Can't delete when there are sub-elements.\");\r\n \r\n \t\t\treturn true;\r\n \t\t}\r\n \r\n \t\tif (this.artifacts.size() > 0) {\r\n \t\t\tMessageDialog.openError(new Shell(), \"Delete Error\",\r\n \t\t\t\"Can't delete when code is associated!\");\r\n \t\t\treturn true;\r\n \t\t}\r\n \t\tRationaleDB db = RationaleDB.getHandle();\r\n \r\n \t\t// are there any dependencies on this item?\r\n \t\tif (db.getDependentAlternatives(this).size() > 0) {\r\n \t\t\tMessageDialog.openError(new Shell(), \"Delete Error\",\r\n \t\t\t\"Can't delete when there are depencencies.\");\r\n \t\t\treturn true;\r\n \t\t}\r\n \r\n \t\tm_eventGenerator.Destroyed();\r\n \r\n \t\tdb.deleteRationaleElement(this);\r\n \t\treturn false;\r\n \r\n \t}",
"public boolean isCategoryDeleteEnabled() {\n return categoryDeleteEnabled;\n }",
"private boolean actionDelete()\n {\n Debug.enter();\n onDeleteListener.onDelete();\n dismiss();\n Debug.leave();\n return true;\n }",
"@Override\r\n\tpublic boolean isCutoffDelete() throws NotesApiException {\n\t\treturn false;\r\n\t}",
"public boolean hasSelectionLimit()\n {\n return (this.getSelectionLimit() > 0L);\n }",
"Boolean allowDelete(Data target, String name);",
"private void cmd_deleteSelection(){\n\t\tm_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\t\tif (ADialog.ask(getWindowNo(), m_frame.getContainer(), \"DeleteSelection\"))\n\t\t{\t\n\t\t\tint records = deleteSelection(detail);\n\t\t\tsetStatusLine(Msg.getMsg(Env.getCtx(), \"Deleted\") + records, false);\n\t\t}\t\n\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\tbDelete.setSelected(false);\n\t\texecuteQuery();\n\t\t\n\t}",
"@Override\n\tpublic boolean isEnabled() {\n\t\treturn !getSelectedDeletables().isEmpty();\n\t}",
"public abstract boolean hasSelection();",
"public boolean getDelete() {\n\t\t\treturn delete.get();\n\t\t}",
"public boolean canBeDeleted() {\n\t\tif (!containsNoItems()) {\n\t\t\treturn false;\n\t\t}\n\n\t\tif (this.productGroups.size() > 0) {\n\t\t\tfor (int i = 0; i < this.productGroups\n\t\t\t\t\t.size(); i++) {\n\t\t\t\tif (!this.productGroups.get(i)\n\t\t\t\t\t\t.canBeDeleted()) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn true;\n\t}",
"public boolean canUndo() {\n return this.isUndoable;\n }",
"public boolean isDEL() {\n return DEL;\n }",
"public boolean delete() {\n return this.delete;\n }",
"public boolean canUndo();",
"public boolean canUndo();",
"boolean getDeletionProtection();",
"public boolean isDontDelete() {\n checkNotUnknown();\n return (flags & ATTR_DONTDELETE_ANY) == ATTR_DONTDELETE;\n }",
"boolean canRemove();",
"public boolean hasForceDelete() {\n return forceDelete_ != null;\n }",
"@DISPID(13)\n\t// = 0xd. The runtime will prefer the VTID if present\n\t@VTID(23)\n\tboolean deleted();",
"public boolean isDeleted() {\n\t\treturn _primarySchoolStudent.isDeleted();\n\t}",
"boolean hasDeleteLineage();",
"@DISPID(75)\r\n\t// = 0x4b. The runtime will prefer the VTID if present\r\n\t@VTID(80)\r\n\tboolean isDeleted();",
"private void checkSelection() {\n \t\tboolean oldIsSelection = isSelection;\n \t\tisSelection = text.getSelectionCount() > 0;\n \t\tif (oldIsSelection != isSelection) {\n \t\t\tfireEnablementChanged(COPY);\n \t\t\tfireEnablementChanged(CUT);\n \t\t}\n \t}",
"protected boolean deleted() {\n if (state.isSynced()) {\n this.state.setState(ENodeState.Deleted);\n return true;\n } else if (state.isUpdated()) {\n this.state.setState(ENodeState.Deleted);\n return true;\n }\n return false;\n }",
"@Override\n\tpublic int getIsDelete() {\n\t\treturn _dmGtStatus.getIsDelete();\n\t}",
"public Integer getIsdelete() {\n\t\treturn isdelete;\n\t}",
"public boolean isDeleteAfterCompletion()\r\n\t{\r\n\t\treturn deleteAfterCompletion;\r\n\t}",
"public static boolean canUndo() {\r\n\t\treturn undoCommands.isEmpty();\r\n\t}",
"@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean delete() {\n\t\treturn false;\n\t}",
"@Override\n \t\t\t\tpublic boolean isDeleted() {\n \t\t\t\t\treturn false;\n \t\t\t\t}",
"public boolean isMaybeDontDelete() {\n checkNotUnknown();\n return (flags & ATTR_DONTDELETE) != 0;\n }",
"public boolean canUndo()\n {\n if (undoableChanges == null || undoableChanges.size() > 0)\n return true;\n else\n return false;\n }",
"public boolean canUndo() {\n/* 834 */ return !Utils.isNullOrEmpty(getNextUndoAction());\n/* */ }",
"public boolean isDeleted() {\n return deleted != null;\n }",
"public boolean isDeleted()\r\n\t{\r\n\t\treturn deletedFlag;\r\n\t}",
"public boolean canUndo() {\n return statePointer > 0;\n }",
"boolean hasDeleteCharacteristic();",
"public boolean isDeleted() {\n return deleted;\n }",
"public boolean isKpiDeleteEnabled() {\n return kpiDeleteEnabled;\n }",
"public boolean hasForceDelete() {\n return forceDeleteBuilder_ != null || forceDelete_ != null;\n }",
"public boolean hasDontDelete() {\n checkNotUnknown();\n return (flags & ATTR_DONTDELETE_ANY) != 0;\n }",
"@Override\n public boolean delete()\n {\n return false;\n }",
"boolean doDelete(int index) {\n return (index >= deleteStart) && (index <= deleteEnd);\n }",
"@Override\n\tpublic void deleteSelected() {\n\n\t}",
"public boolean getDelete() {\n\t\treturn delete;\n\t}",
"boolean hasDeleteBlock();",
"public boolean isEditingEnabled() {\r\n // Additional business logic can go here\r\n return (getContactSelection().getMinSelectionIndex() != -1);\r\n }",
"@Override\n\tpublic boolean preDelete() {\n\t\treturn false;\n\t}",
"public boolean isDeleted()\r\n {\r\n return getSemanticObject().getBooleanProperty(swb_deleted);\r\n }",
"boolean hasDeleteBackUp();",
"public boolean isDeleted() {\n\t\treturn deleted;\n\t}",
"public Integer getIsdelete() {\n return isdelete;\n }",
"public static boolean isDelete(String command) {\r\n\t\tassert command != null;\r\n\t\tcommandType = Logic.determineCommandType(command);\r\n\t\tswitch (commandType) {\r\n\t\tcase DELETE:\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isNotDontDelete() {\n checkNotUnknown();\n return (flags & ATTR_DONTDELETE_ANY) == ATTR_NOTDONTDELETE;\n }",
"public boolean isDeleted() {\n return (this == RecordStatusEnum.DELETED);\n }",
"boolean hasDeleteMountPoint();",
"public boolean isDeleted() {\n\t\treturn getStatus() == STATUS_DELETED;\n\t}",
"public Integer getIsdelete() {\r\n return isdelete;\r\n }",
"public Boolean isDeleted() {\n\t\treturn this.deleted;\n\t\t\n\t}",
"@Override\r\n\tprotected boolean beforeDelete() {\r\n\t\t\r\n\t\tString valida = DB.getSQLValueString(null,\"SELECT DocStatus FROM C_Hes WHERE C_Hes_ID=\" + getC_Hes_ID());\r\n if (!valida.contains(\"DR\")){\r\n \t\r\n \tthrow new AdempiereException(\"No se puede Eliminar este documento por motivos de Auditoria\");\r\n\r\n }\r\n\t\t\r\n\t\treturn true;\r\n\t}",
"public java.lang.Boolean getDeleted();",
"public Boolean getIsdelete() {\r\n return isdelete;\r\n }",
"boolean hasDeleteFile();",
"public static Boolean confirmDeletion() {\n final AtomicReference<Boolean> reference = new AtomicReference<>(false);\n\n TopsoilNotification.showNotification(\n TopsoilNotification.NotificationType.VERIFICATION,\n \"Delete Table\",\n \"Do you really want to delete this table?\\n\"\n + \"This operation can not be undone.\"\n ).ifPresent(response -> {\n if (response == ButtonType.OK) {\n reference.set(true);\n }\n });\n\n return reference.get();\n }",
"public boolean hasDeleteStore() {\n return ((bitField0_ & 0x00002000) == 0x00002000);\n }",
"public boolean isDeleteButtonVisible() {\r\n\t\tif (_deleteButton == null)\r\n\t\t\treturn false;\r\n\t\telse\r\n\t\t\treturn _deleteButton.getVisible();\r\n\t}",
"public boolean isPortalDeleteEnabled() {\n return portalDeleteEnabled;\n }",
"private boolean canUndo() {\n return !frozen && !past.isEmpty();\n }",
"public boolean hasDeleteStore() {\n return ((bitField0_ & 0x00002000) == 0x00002000);\n }",
"protected boolean afterDelete() {\n if (!DOCSTATUS_Drafted.equals(getDocStatus())) {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n } \n \n //C_AllocationLine\n String sql = \"DELETE FROM C_AllocationLine \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PaymentAllocate\n sql = \"DELETE FROM C_PaymentAllocate \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_VALORPAGO\n sql = \"DELETE FROM C_VALORPAGO \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTVALORES\n sql = \"DELETE FROM C_PAYMENTVALORES \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTRET\n sql = \"DELETE FROM C_PAYMENTRET \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n return true;\n\n }",
"void setDeleteButtonEnabled(boolean isEnabled);",
"public boolean isMaybeNotDontDelete() {\n checkNotUnknown();\n return (flags & ATTR_NOTDONTDELETE) != 0;\n }"
]
| [
"0.7388833",
"0.7368956",
"0.70642203",
"0.69907284",
"0.69907284",
"0.69782686",
"0.6954585",
"0.6785953",
"0.6785592",
"0.6728333",
"0.67179626",
"0.66536677",
"0.66504383",
"0.65482473",
"0.65482074",
"0.6497099",
"0.64585763",
"0.64148796",
"0.64140993",
"0.6408848",
"0.6384713",
"0.63843787",
"0.63303757",
"0.6318579",
"0.6314903",
"0.6312578",
"0.6305646",
"0.62790626",
"0.6233159",
"0.6230629",
"0.62058794",
"0.6200076",
"0.61912465",
"0.6185094",
"0.6182775",
"0.6179756",
"0.61738694",
"0.61658144",
"0.61622626",
"0.61622626",
"0.61613965",
"0.6153444",
"0.6147677",
"0.6137651",
"0.6113147",
"0.61099327",
"0.6099551",
"0.6099322",
"0.60897094",
"0.60867506",
"0.6073452",
"0.60536444",
"0.6049496",
"0.6048099",
"0.6041606",
"0.6041606",
"0.6041606",
"0.6040758",
"0.60399485",
"0.60276985",
"0.6021796",
"0.60200846",
"0.6013633",
"0.60039294",
"0.59964705",
"0.59908485",
"0.598775",
"0.5986177",
"0.5978047",
"0.5976983",
"0.59747964",
"0.597414",
"0.59638655",
"0.59584165",
"0.5942295",
"0.59333354",
"0.5925378",
"0.5920197",
"0.59200764",
"0.59015095",
"0.5900592",
"0.5894108",
"0.5892923",
"0.58882344",
"0.5876435",
"0.5871489",
"0.585129",
"0.584676",
"0.58455837",
"0.5843997",
"0.5840868",
"0.5834773",
"0.5816912",
"0.58164054",
"0.5802709",
"0.5801991",
"0.57942003",
"0.5791795",
"0.5782463",
"0.57777894"
]
| 0.6716901 | 11 |
Returns whether the selection contains linked resources. | private boolean containsLinkedResource(IResource[] resources) {
for (IResource resource : resources) {
if (resource.isLinked()) {
return true;
}
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean isHasResources();",
"public boolean hasLink() {\n return !links.isEmpty();\n }",
"public boolean isSetResources() {\n return this.resources != null;\n }",
"public boolean isSetResources() {\n return this.resources != null;\n }",
"boolean hasResource();",
"public boolean containsRelations();",
"@Override\r\n\tpublic boolean isEnabled() {\r\n\t\tboolean result = false;\r\n\t\tif (getSelection().size() == 1) {\r\n\t\t\tif (getSelection().getFirstElement() instanceof IResource) {\r\n\t\t\t\tIResource resource = (IResource) getSelection().getFirstElement();\r\n\t\t\t\tString pomFileNames = AggregatedProperties.getPomFileNames(resource.getProject());\r\n\t\t\t\tStringTokenizer tkz = new StringTokenizer(pomFileNames, ConfigurationConstants.POM_FILES_SEPARATOR, false);\r\n\t\t\t\twhile (tkz.hasMoreTokens()) {\r\n\t\t\t\t\tif (resource.getName().equalsIgnoreCase(tkz.nextToken())) {\r\n\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"boolean hasStablesSelected();",
"public boolean hasNext() {\r\n\r\n\t\treturn counter < links.size();\r\n\t}",
"public boolean containsIncomingRelations();",
"boolean hasFeedItemSetLink();",
"@Override\n\tpublic boolean isUsedInSelectedLinks() {\n\t\treturn false;\n\t}",
"public boolean hasNext()\n {\n if (current.nLink != null)\n {\n return true;\n }\n else\n {\n return false;\n }\n }",
"public boolean isSetComparesource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(COMPARESOURCE$2) != 0;\r\n }\r\n }",
"protected boolean isReferenced() {\r\n return mReferenced || mUsers.size() > 0;\r\n }",
"public boolean hasNextLink() {\n return hasNextLink;\n }",
"protected boolean resourceExists() {\n\t\tIWorkspace workspace = ResourcesPlugin.getWorkspace();\n\t\tif (workspace == null)\n\t\t\treturn false;\n\t\treturn RodinDB.getTarget(workspace.getRoot(), this.getPath()\n\t\t\t\t.makeRelative(), true) != null;\n\t}",
"boolean hasResourceType();",
"public boolean shouldRenderRelated() {\r\n if (relatedRecipes != null) {\r\n return !this.relatedRecipes.isEmpty();\r\n } else {\r\n return false;\r\n }\r\n }",
"boolean hasReference();",
"public boolean complete() {\n return previousLink().isPresent();\n }",
"boolean hasRelation();",
"private boolean canDelete(IResource[] resources) {\r\n // allow only projects or only non-projects to be selected;\r\n // note that the selection may contain multiple types of resource\r\n if (!(containsOnlyProjects(resources) || containsOnlyNonProjects(resources))) {\r\n return false;\r\n }\r\n\r\n if (resources.length == 0) {\r\n return false;\r\n }\r\n // Return true if everything in the selection exists.\r\n for (IResource resource : resources) {\r\n if (resource.isPhantom()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public boolean hasNext()\n {\n if (curr_ci == null)\n return false;\n\n if (ready_for_fetch)\n // the last sibling is still waiting to be retrieved via next()\n return true;\n\n // Prefetch the next sibling object to make sure it isn't the\n // same as the original source object or a sibling we've already seen.\n do\n {\n sibling = advance();\n } while ((sibling != null) && prevobjs.contains(sibling));\n\n if (sibling == null)\n return false;\n else\n {\n ready_for_fetch = true;\n prevobjs.add(sibling);\n \n return true;\n }\n }",
"boolean hasIronSelected();",
"boolean hasAccountLink();",
"protected boolean isLinkedWithEditor() {\n return modes.get(BCOConstants.F_LINK_VIEW_TO_EDITOR);\n }",
"public boolean hasLink(L link) {\n return links.contains(link);\n }",
"private boolean isReference()\n {\n return countAttributes(REFERENCE_ATTRS) > 0;\n }",
"boolean isNilRequiredResources();",
"boolean isSetFurtherRelations();",
"public synchronized boolean isLoaded() {\n\t\treturn _resourceData != null;\n\t}",
"public boolean isShowLinksToUi() {\r\n return this.getDefaultGroup() != null;\r\n }",
"public boolean hasReferences() {\n\t\treturn this.refCounter > 0;\n\t}",
"public final boolean isHyperlink() {\n return hyperlink != null;\n }",
"private boolean containsOnlyNonProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // check for empty selection\r\n if (types == 0) {\r\n return false;\r\n }\r\n // note that the selection may contain multiple types of resource\r\n return (types & IResource.PROJECT) == 0;\r\n }",
"@Override\r\n\t\tpublic boolean hasNext() {\r\n\t\t\t\r\n\t\t\treturn currentNode.nextNode != null;\r\n\t\t}",
"public boolean isSetIntersectingRoadwayRef()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().find_attribute_user(INTERSECTINGROADWAYREF$20) != null;\r\n }\r\n }",
"boolean hasSrc();",
"boolean hasBracksSelected();",
"public boolean isReference() {\n AnnotatedBase comp = m_item.getSchemaComponent();\n return comp instanceof IReference && ((IReference)comp).getRef() != null;\n }",
"public boolean hasDisposableResources()\n {\n return this.disposableObjects.isEmpty();\n }",
"public boolean areIntersecting() {\n return intersection != null;\n }",
"boolean hasExternalAttributionModel();",
"public boolean hasExternalAddressbooks() throws RemoteException;",
"public boolean hasChildren()\n\t{\n\t\treturn !getChildren().isEmpty();\n\t}",
"boolean hasFeedItemTarget();",
"private boolean containsOnlyProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // note that the selection may contain multiple types of resource\r\n return types == IResource.PROJECT;\r\n }",
"public boolean hasLinkAttached()\n throws OculusException;",
"public boolean includes(LinkedPosition position) {\n\t\treturn includes(position.getDocument(), position.getOffset(), position.getLength());\n\t}",
"public boolean hasScannedAllies()\n\t{\n\t\treturn (lastscanround == br.curRound && !needToScanAllies);\n\t}",
"boolean hasChildren();",
"boolean isSetRequiredResources();",
"boolean hasUrl();",
"boolean hasUrl();",
"boolean hasUrl();",
"boolean hasUrl();",
"boolean hasUrl();",
"protected final boolean computeHasNext() {\n return this.getEnds().getGraph().getPredecessorEdges(this.getNext()).isEmpty();\n }",
"public boolean hasRelationships() {\n if (properties == null) {\n return false;\n }\n for (MetaProperty property : this.properties.values()) {\n if (property.isRelationship()) {\n return true;\n }\n }\n return false;\n }",
"boolean hasResidues();",
"public abstract boolean hasSelection();",
"public boolean hasVisibleItems();",
"public boolean linkLabels() { return link_labels_cb.isSelected(); }",
"private boolean getRelationsValid()\n {\n \n return __relationsValid;\n }",
"public boolean isSetLinkman() {\n return this.linkman != null;\n }",
"public boolean isMaybeSingleAllocationSite() {\n checkNotPolymorphicOrUnknown();\n return object_labels != null && newSet(getObjectSourceLocations()).size() == 1;\n }",
"public boolean hasRelation(String name) {\n \treturn relations.containsKey(name);\n }",
"boolean hasAccountLinkId();",
"public boolean hasIgnoredReferences() {\n\t\treturn !ignoredReferences.isEmpty();\n\t}",
"public boolean hasResponseLink() {\n return fieldSetFlags()[7];\n }",
"boolean hasNextNode()\r\n\t{\n\t\tif (getLink() == null) return false;\r\n\t\telse return true;\r\n\t}",
"public boolean hasLinkPanel(ItemStack page);",
"public boolean hasNext() { return (current != null && current.item != null); }",
"boolean hasHadithBookUrl();",
"public boolean hasRecursive() {\n return recursive_ != null;\n }",
"public boolean isManageVehiclesLinkPresent() {\r\n\t\treturn isElementPresent(manageVehiclesSideBar, SHORTWAIT);\r\n\t}",
"public boolean hasProductsRS() {\n return productsRSBuilder_ != null || productsRS_ != null;\n }",
"public boolean hasNext() {\n\t\tMemoryBlock dummyTail = new MemoryBlock(-1, -1); // Dummy for tail\n\t\tboolean hasNext = (current.next.block.equals(dummyTail));\n\t\treturn (!hasNext);\n\t}",
"public boolean containsContextNodes();",
"private boolean hasEscalatingResources(List<String> resources) {\n return !Collections.disjoint(resources, EscalatingResources.ESCALATING_RESOURCES);\n }",
"boolean hasContents();",
"boolean hasContents();",
"public boolean hasRecursive() {\n return recursiveBuilder_ != null || recursive_ != null;\n }",
"public boolean hasBeenExpanded(Object inNode)\n\t{\n\t\tObject parent = inNode;\n\t\twhile( parent != null)\n\t\t{\n\t\t\tString path = toUrl(inNode);\n\t\t\tif( getExpandedNodes().contains(path) )\n\t\t\t{\n\t\t\t\tparent = getWebTree().getModel().getParent(parent);\n\t\t\t\t//If we get to the root and it is selected still then we are ok!\n\t\t\t\tif( parent == null)\n\t\t\t\t{\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasNext() {\n return this.next != null;\n }",
"public final boolean isReferencedAtMostOnce() {\n return this.getReferences(false, true).size() == 0 && this.getReferences(true, false).size() <= 1;\r\n }",
"private boolean existsSubResource()\r\n {\r\n return ((subResource_ != null) && subResource_.exists());\r\n }",
"@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn (this.next != null);\n\t\t}",
"public boolean hasNext() {\n\t\treturn next_node == null;\n\t}",
"@Override\n\t\tpublic boolean hasNext() {\n\t\t\treturn nextNode != null;\n\t\t}",
"@DISPID(1611006048) //= 0x60060060. The runtime will prefer the VTID if present\n @VTID(123)\n boolean linkedExternalReferences();",
"private boolean getLinks() {\n return false;\n }",
"public boolean isSetSource()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n return get_store().count_elements(SOURCE$0) != 0;\r\n }\r\n }",
"public boolean empty()\n {\n return firstLink == null;\n }",
"public final boolean hasActorsSelected() {\n return (selectedActors.size() > 0);\n }",
"public boolean isVehiclesListLinkPathPresent() {\r\n\t\treturn isElementPresent(vehicleLinkPath, SHORTWAIT);\r\n\t}",
"public boolean isRenderable() {\n return vboIdList != null;\n }",
"protected boolean isValid() {\n return COLLECTION.getList().contains(this);\n }",
"private boolean checkIfHighlighted() {\n int i = 0;\n for (Node node : routeList) {\n if (node.getXPixels() != getHighlightGroup().getChildren().get(i).getTranslateX() ||\n node.getYPixels() != getHighlightGroup().getChildren().get(i).getTranslateY()) {\n return false;\n }\n i++;\n }\n return true;\n }"
]
| [
"0.65815264",
"0.6501193",
"0.6422693",
"0.6422693",
"0.6383934",
"0.63771355",
"0.62506145",
"0.6197532",
"0.617695",
"0.6026086",
"0.602483",
"0.59939414",
"0.5981271",
"0.5973625",
"0.59479576",
"0.5937494",
"0.59253186",
"0.59096855",
"0.5837651",
"0.58000094",
"0.5792472",
"0.57879287",
"0.57687145",
"0.57596266",
"0.57323855",
"0.5731067",
"0.57268757",
"0.57154477",
"0.56955767",
"0.56711936",
"0.56634814",
"0.56497127",
"0.5631252",
"0.5603819",
"0.5583303",
"0.5571862",
"0.55689096",
"0.5564754",
"0.5555592",
"0.55212975",
"0.55191016",
"0.5506636",
"0.5504468",
"0.55024827",
"0.5469514",
"0.54595554",
"0.5454163",
"0.5448643",
"0.5448426",
"0.5434639",
"0.5421677",
"0.54196995",
"0.5412693",
"0.5390086",
"0.5390086",
"0.5390086",
"0.5390086",
"0.5390086",
"0.53841996",
"0.5382048",
"0.5379434",
"0.5376129",
"0.5371034",
"0.53706956",
"0.5369901",
"0.536427",
"0.5362174",
"0.5357824",
"0.5357392",
"0.5355681",
"0.53493387",
"0.53475934",
"0.5342279",
"0.53349674",
"0.533478",
"0.5333108",
"0.532883",
"0.53232497",
"0.53191435",
"0.53161454",
"0.5310873",
"0.5307696",
"0.5307696",
"0.5306678",
"0.5289365",
"0.52885425",
"0.5283178",
"0.52759135",
"0.5275913",
"0.52750295",
"0.5274626",
"0.5272676",
"0.52706015",
"0.52693045",
"0.52657527",
"0.52599096",
"0.5259549",
"0.5248537",
"0.5246091",
"0.5243459"
]
| 0.72465336 | 0 |
Returns whether the selection contains only nonprojects. | private boolean containsOnlyNonProjects(IResource[] resources) {
int types = getSelectedResourceTypes(resources);
// check for empty selection
if (types == 0) {
return false;
}
// note that the selection may contain multiple types of resource
return (types & IResource.PROJECT) == 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean containsOnlyProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // note that the selection may contain multiple types of resource\r\n return types == IResource.PROJECT;\r\n }",
"public boolean isExcluded()\n {\n return project.isExcluded(this);\n }",
"boolean hasProject();",
"protected boolean isNonJavaProject(ILaunchConfiguration configuration) throws CoreException {\n\t\tIJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());\r\n\t\r\n\t\tboolean answer = false;\r\n\t\tString projectName = configuration.getAttribute(\r\n\t\t\t\tIJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,\r\n\t\t\t\t(String) null);\r\n\t\tif (projectName != null && projectName.trim().length() > 0) {\r\n\t\t\tIJavaProject javaProject = javaModel.getJavaProject(projectName);\r\n\t\t\t// IJavaProject javaProject =\r\n\t\t\t// JavaRuntime.getJavaProject(configuration);\r\n\t\t\tif (javaProject != null) {\r\n\t\t\t\t// lets see if it exists\r\n\t\t\t\tif (!javaProject.exists()) {\r\n\t\t\t\t\tanswer = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn answer;\r\n\t}",
"boolean isExcluded();",
"public boolean hasProjectDirExcluded() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public boolean hasProjectDirExcluded() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public boolean noDaySelected() {\n return selectedDays.size() == 0;\n }",
"public boolean noDaySelected() {\n return selectedDays.size() == 0;\n }",
"public boolean isNotIn() {\n return notIn;\n }",
"private boolean canDelete(IResource[] resources) {\r\n // allow only projects or only non-projects to be selected;\r\n // note that the selection may contain multiple types of resource\r\n if (!(containsOnlyProjects(resources) || containsOnlyNonProjects(resources))) {\r\n return false;\r\n }\r\n\r\n if (resources.length == 0) {\r\n return false;\r\n }\r\n // Return true if everything in the selection exists.\r\n for (IResource resource : resources) {\r\n if (resource.isPhantom()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"public boolean isSelectionEmpty()\n/* */ {\n/* 215 */ return this.selectedDates.isEmpty();\n/* */ }",
"public static boolean canPrune() {\n\t\tboolean result = false;\n\t\tint projectedTotal = 0;\n\t\t\n\t\tint i = 0;\n\t\twhile(i<jobsChosen){\n\t\t\tprojectedTotal += board[i][currentCombo[i]];\n\t\t\ti++;\n\t\t}\n\t\twhile(i<numPeople){\n\t\t\tprojectedTotal += bestPossibleCombination[i];\n\t\t\ti++;\n\t\t}\n\t\tif(projectedTotal<bestTotal){//Cant be greater than current Best Total\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}",
"public boolean skipTest() {\r\n if( client != null ) {\r\n Project project = client.getProject();\r\n if( project != null ) {\r\n if( ifProp != null && project.getProperty(ifProp) == null) {\r\n // skip if \"if\" property is not set\r\n result = true;\r\n return true;\r\n }\r\n // Allow a comma separated list of properties for \"unless\"\r\n // so after using a sequence of properties, each in an \"if\",\r\n // you can include the list in an \"unless\" to implement the\r\n // default.\r\n if( unlessProp != null) {\r\n StringTokenizer st = new StringTokenizer(unlessProp,\",\");\r\n while( st.hasMoreElements() ) {\r\n String prop = (String)st.nextElement();\r\n if( project.getProperty(prop) != null ) {\r\n // skip if an \"unless\" property is set\r\n result = true;\r\n return true;\r\n }\r\n }\r\n }\r\n }\r\n }\r\n return false;\r\n }",
"@Test\n public void projectIsNotSelected_doesNotTriggerListeners() {\n projectSelector.handleOpenProjectSelectionDialog();\n\n verifyNoMoreInteractions(projectSelectionListener);\n }",
"public boolean projectsPageNav() {\n\t\treturn hdrProjects.getText().equals(\"Projects\");\n\t}",
"public boolean isSelectOnly()\n\t{\n\t\treturn selectOnly;\n\t}",
"public boolean shouldDisplayProject ()\r\n {\r\n return displayProjectName_;\r\n }",
"public boolean isSelectionEmpty() {\n return selectionEmpty;\n }",
"public boolean canBeNonMatch() {\r\n return nonMatch;\r\n }",
"public boolean isSelectionEmpty() {\n\t\t\treturn tablecolselectmodel.isSelectionEmpty();\n\t\t}",
"public boolean isProjectionIncluded() {\n return geometry.almostZero(projectionDistance);\n }",
"public static boolean keepProjectsInSync() {\r\n\t\treturn ProjectUIPlugin.keepProjectsInSync();\r\n\t}",
"public boolean isMaskSelected() {\n return false;\n }",
"boolean hasIronSelected();",
"public boolean getProjectDirExcluded() {\n return projectDirExcluded_;\n }",
"public boolean isExcluded()\n {\n return excluded.booleanValue();\n }",
"public boolean isSelectorNeeded() {\n if (!m_selectChecked) {\n if (m_selectorType != NestingCustomBase.SELECTION_UNCHECKED) {\n \n // before reporting selector needed, make sure at least once child is going to be present\n for (int i = 0; i < m_values.size(); i++) {\n DataNode node = (DataNode)m_values.get(i);\n if (!node.isIgnored()) {\n m_selectNeeded = true;\n break;\n }\n }\n \n }\n m_selectChecked = true;\n }\n return m_selectNeeded;\n }",
"boolean isKeepSolutions();",
"public boolean isUnselected() {\n return UNSELECTED.equals(message);\n }",
"public boolean projectIsIn(Project in){\n\t\tfor( Project p : m_Projects){\n\t\t\tif(p.getName().equals(in.getName())) return true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean isProjectIdNull()\r\n\t{\r\n\t\treturn projectIdNull;\r\n\t}",
"public boolean airportIsBuilt() {\n\t\tif(projectsAvailable.isEmpty() && projectsActive.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"public boolean isSetExcludeVariantIds() {\r\n return this.excludeVariantIds != null;\r\n }",
"public boolean getProjectDirExcluded() {\n return projectDirExcluded_;\n }",
"public abstract boolean isDisable(Project project);",
"public boolean isSetProjectId() {\n return EncodingUtils.testBit(__isset_bitfield, __PROJECTID_ISSET_ID);\n }",
"public boolean isSetProjectId() {\n return EncodingUtils.testBit(__isset_bitfield, __PROJECTID_ISSET_ID);\n }",
"public boolean hasAssignedProject()\r\n {\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t\treturn (_assignedProject!=null);\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }",
"protected boolean selectionIsAppropriate(Element selection) {\n return selection.getName().equals(FormatType.EMPTY.getElementName());\n }",
"public boolean requiresSelectVarious() {\n\t\treturn false;\r\n\t}",
"public boolean isMaskSelected() {\n return (this.mActivity.getCameraAppUI().getCurrSelect() == null || this.mActivity.getCameraAppUI().getCurrSelect() == \"\") ? false : true;\n }",
"public boolean isIgnored() {\n return m_ignored;\n }",
"boolean hasNoUnions();",
"boolean getNoUnions();",
"public boolean isSkipTests()\n {\n return skipTests;\n }",
"public boolean hasNonSupportedStage() {\n return !VECTOR_SUPPORTED_STAGES.containsAll(mSupportedStages);\n }",
"public boolean isFalsey() {\n Entity e = null;\n if (parent != null) {\n e = parent.get(ContentType.EntityType, null);\n } else if (root != null) {\n e = root;\n }\n \n if (e != null) {\n \n if (isIndexSelector()) {\n if (!(e instanceof EntityList)) {\n return true;\n }\n EntityList el = (EntityList)e;\n return index.isFalsey(el);\n \n }\n \n Property prop = property;\n if (prop == null) {\n prop = e.getEntity().getEntityType().findProperty(tags);\n }\n if (prop != null) {\n return e.getEntity().isFalsey(prop);\n }\n }\n return true;\n }",
"public boolean containsNotOperator() {\r\n\t\tfor (int n = 0; n < elements.size(); ++n) {\r\n\t\t\tObject ob = elements.get(n);\r\n\t\t\tif (ob instanceof Operator) {\r\n\t\t\t\tif (((Operator) ob).isNot()) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isDontCare(){\n return hasDontCare;\n }",
"public boolean isSetOverrideAllocationProjectNumber() {\n return this.overrideAllocationProjectNumber != null;\n }",
"public boolean isSelectorType() {\n return m_selectorType != NestingCustomBase.SELECTION_UNCHECKED;\n }",
"public boolean vacia()\n {\n return this.repositorio.isEmpty();\n \n }",
"boolean isNotAllMedia();",
"@Test\n\tpublic void testNoopProject() {\n\t\tTag a = new Tag(A);\n\t\ttagService.create(a);\n\t\tTag b = tagService.create(new Tag(B));\n\t\tTag c = tagService.create(new Tag(C));\n\t\tIterable<Tag> values = tagService.find().matching(\n\t\t\t\tnew QueryBuilder<TagInformer>() {\n\n\t\t\t\t\tpublic QueryExpression createMatchingExpression(\n\t\t\t\t\t\t\tTagInformer object) {\n\t\t\t\t\t\treturn object.getText().differentFrom(null);\n\t\t\t\t\t}\n\t\t\t\t}).projectOn(new NoopProjectionBuilder<Tag, TagInformer>()).getAll();\n\t\tassertThat(values, IsCollectionContaining.hasItems(a, b, c));\n\t}",
"public boolean containsNoItems() {\n\t\treturn (this.items.size() == 0);\n\t}",
"boolean isNilSites();",
"private boolean CheckParkSelection() {\n\t\tif (Park_ComboBox.getSelectionModel().isEmpty()) {\n\t\t\tif (!Park_ComboBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPark_ComboBox.getStyleClass().add(\"error\");\n\t\t\tParkNote.setText(\"* Select park\");\n\t\t\treturn false;\n\t\t}\n\t\tPark_ComboBox.getStyleClass().remove(\"error\");\n\t\tParkNote.setText(\"*\");\n\t\treturn true;\n\t}",
"public boolean allDaysSelected() {\n return selectedDays.size() == 7;\n }",
"public boolean allDaysSelected() {\n return selectedDays.size() == 7;\n }",
"public boolean isSetIsneglect() {\n return __isset_bit_vector.get(__ISNEGLECT_ISSET_ID);\n }",
"public Builder setProjectDirExcluded(boolean value) {\n bitField0_ |= 0x00000002;\n projectDirExcluded_ = value;\n onChanged();\n return this;\n }",
"public boolean isSelectable(){\n\t\treturn (type != MONSTER_GOAL && type != MONSTER_ENTRANCE);\n\t}",
"boolean hasBracksSelected();",
"public Boolean isIgnored() {\n return ignored;\n }",
"public boolean hasIgnoredReferences() {\n\t\treturn !ignoredReferences.isEmpty();\n\t}",
"protected final boolean isLeaf() {\n return (getChildIds().isEmpty());\n }",
"public boolean noTarget()\n\t{\n\t\treturn getAggroListRP().isEmpty();\n\t}",
"@Override\n public boolean isRemoteProject() {\n return true;\n }",
"private boolean isThereLegalTilesNotColored(){\n\n\t\tArrayList<Tile> legalTiles=getAllLegalMoves(Game.getInstance().getCurrentPlayerColor());\n\t\tlegalTiles.removeAll(coloredTilesList);\n\t\tif(legalTiles.isEmpty()) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean isNotDontEnum() {\n checkNotUnknown();\n return (flags & ATTR_DONTENUM_ANY) == ATTR_NOTDONTENUM;\n }",
"public boolean isProjectOpen() {\n\t\treturn (projectFileIO != null);\n\t}",
"public boolean isEmpty() {\r\n\t\t\r\n\t\treturn repositories.isEmpty();\r\n\t}",
"public boolean validarNotas() {\n\t\treturn !notas.isEmpty();\n\t}",
"public boolean isSetWasNotGiven()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(WASNOTGIVEN$4) != 0;\n }\n }",
"public boolean isNonLivrer() {\n\t\treturn getStatut().equals(StatusBonPreparation.NON_LIVRER);\n\t}",
"boolean getNegated();",
"public boolean isMainProject() {\n return this.mIsMainProject;\n }",
"boolean isHiddenFromList();",
"@Test\n public void getProjectsWhenNoProjectInserted() throws InterruptedException {\n List<Project> actualProjects = LiveDataTestUtil.getValue(projectDao.getProjects());\n //Then : the retrieved list is empty\n assertTrue(actualProjects.isEmpty());\n }",
"public boolean isNotDontDelete() {\n checkNotUnknown();\n return (flags & ATTR_DONTDELETE_ANY) == ATTR_NOTDONTDELETE;\n }",
"public boolean onlyVisible()\n\t{\n\t\treturn visible;\n\t}",
"public static boolean isExcluded(RenderLayer layer) {\n\t\treturn layer.getDrawMode() != DrawMode.QUADS || EXCLUSIONS.contains(layer);\n\t}",
"public boolean hasSubQuery() {\r\n\t\tList list = allElements();\r\n\t\tint len = list.size();\r\n\t\tfor (int n = 0; n < len; ++n) {\r\n\t\t\tObject ob = list.get(n);\r\n\t\t\tif (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TQueryPlanType) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isNotPresent() {\n checkNotUnknown();\n return !isMaybePresent();\n }",
"public boolean nothing() {\n return nodesNumber() == 0 && edgesNumber() == 0 && nonDirectionalEdgesNumber() == 0;\n }",
"public boolean getIncluyeInformeAvance() {\n\t\treturn this.adjuntos.size() > 0;\n\t}",
"boolean canBeSkipped();",
"public boolean isSkipWeek() {\n return skipWeekCont > 1;\n }",
"public boolean getIsValid() {\n return projectName != null && packageName != null && !projectName.isEmpty() && !packageName.isEmpty();\n }",
"public boolean isNonEnzymaticPeptides() {\n return nonEnzymaticPeptides;\n }",
"public boolean hasSelectionLimit()\n {\n return (this.getSelectionLimit() > 0L);\n }",
"private boolean notLoaded(@NonNull PGMConfig.Group toPGM) {\n for (Config.Group group : PGM.get().getConfiguration().getGroups()) {\n if (group.getId().equals(toPGM.getId())) return false;\n }\n return true;\n }",
"@Override\n\tpublic boolean isEmpty() {\n\t\treturn (getSelection() == null);\n\t}",
"public boolean isSelectedReportedUndefinedConditionsCBox() {\n\t\treturn reportUndefinedConditionsCBox.isSelected();\n\t}",
"private boolean visibles() {\r\n return OPT(GO() && visible() && visibles());\r\n }",
"public boolean isPickVisible() {\n\t\treturn false;\n\t}",
"private Collection<EclipseProject> allProjects() {\n Collection<EclipseProject> all = new HashSet<EclipseProject>(selectedProjects);\n all.addAll(requiredProjects);\n return all;\n }",
"@Override\n public boolean isSkipTests() {\n return skipTests;\n }",
"public static boolean isEtsProjBladeProject(String etsProjId, Connection conn) throws SQLException, Exception {\n \t\t\tStringBuffer sb = new StringBuffer();\n \t\t\tint count = 0;\n \t\t\tsb.append(\"select count(ETS_PROJECT_ID) from BLADE.BLADE_PROJECTS\");\n \t\t\tsb.append(\" WHERE\");\n \t\t\tsb.append(\" ETS_PROJECT_ID = '\" + etsProjId + \"' \");\n \t\t\tsb.append(\" with ur\");\n \t\t\tcount = AmtCommonUtils.getRecCount(conn, sb.toString());\n \t\t\tif (count > 0) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\treturn false;\n\t\t}"
]
| [
"0.7137668",
"0.634442",
"0.6323033",
"0.6149113",
"0.6072694",
"0.5931473",
"0.59259045",
"0.57580954",
"0.57580954",
"0.5746849",
"0.5710398",
"0.56956136",
"0.56920147",
"0.56704277",
"0.56685054",
"0.5657592",
"0.5596958",
"0.559529",
"0.55871236",
"0.55695796",
"0.5553708",
"0.5538808",
"0.55076283",
"0.5458609",
"0.54471326",
"0.54024196",
"0.5398725",
"0.53787357",
"0.53763705",
"0.5369036",
"0.53683686",
"0.53678685",
"0.53668994",
"0.5347246",
"0.5322149",
"0.53212065",
"0.5316739",
"0.5316739",
"0.5300486",
"0.5293674",
"0.5280271",
"0.5273145",
"0.5259695",
"0.52522886",
"0.5239744",
"0.52290654",
"0.52258825",
"0.5220978",
"0.5199135",
"0.5173271",
"0.5172819",
"0.5171388",
"0.51688594",
"0.5160454",
"0.5145661",
"0.5143102",
"0.51320565",
"0.5127699",
"0.51269585",
"0.51269585",
"0.51251286",
"0.51190275",
"0.51057214",
"0.51025325",
"0.5070603",
"0.50536335",
"0.5050558",
"0.5043673",
"0.5034726",
"0.503068",
"0.50183773",
"0.5017315",
"0.50159913",
"0.5015409",
"0.50083524",
"0.50029147",
"0.4994519",
"0.49926633",
"0.49915943",
"0.49903998",
"0.49880517",
"0.49795127",
"0.4978071",
"0.49696973",
"0.495896",
"0.49528694",
"0.49516675",
"0.49487785",
"0.49351248",
"0.49317104",
"0.49275637",
"0.4922653",
"0.49210766",
"0.49202448",
"0.49198326",
"0.49165314",
"0.4916459",
"0.49133828",
"0.49098828",
"0.49078822"
]
| 0.79758734 | 0 |
Returns whether the selection contains only projects. | private boolean containsOnlyProjects(IResource[] resources) {
int types = getSelectedResourceTypes(resources);
// note that the selection may contain multiple types of resource
return types == IResource.PROJECT;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean containsOnlyNonProjects(IResource[] resources) {\r\n int types = getSelectedResourceTypes(resources);\r\n // check for empty selection\r\n if (types == 0) {\r\n return false;\r\n }\r\n // note that the selection may contain multiple types of resource\r\n return (types & IResource.PROJECT) == 0;\r\n }",
"boolean hasProject();",
"public boolean projectsPageNav() {\n\t\treturn hdrProjects.getText().equals(\"Projects\");\n\t}",
"public boolean hasAssignedProject()\r\n {\r\n \ttry{\r\n \t\t_lockObject.lock();\r\n \t\treturn (_assignedProject!=null);\r\n \t}finally{\r\n \t\t_lockObject.unlock();\r\n \t}\r\n }",
"public boolean isSetProjectId() {\n return EncodingUtils.testBit(__isset_bitfield, __PROJECTID_ISSET_ID);\n }",
"public boolean isSetProjectId() {\n return EncodingUtils.testBit(__isset_bitfield, __PROJECTID_ISSET_ID);\n }",
"public boolean projectIsIn(Project in){\n\t\tfor( Project p : m_Projects){\n\t\t\tif(p.getName().equals(in.getName())) return true;\n\t\t}\n\t\treturn false;\n\t}",
"public boolean shouldDisplayProject ()\r\n {\r\n return displayProjectName_;\r\n }",
"public boolean airportIsBuilt() {\n\t\tif(projectsAvailable.isEmpty() && projectsActive.isEmpty()) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}",
"protected boolean isNonJavaProject(ILaunchConfiguration configuration) throws CoreException {\n\t\tIJavaModel javaModel = JavaCore.create(ResourcesPlugin.getWorkspace().getRoot());\r\n\t\r\n\t\tboolean answer = false;\r\n\t\tString projectName = configuration.getAttribute(\r\n\t\t\t\tIJavaLaunchConfigurationConstants.ATTR_PROJECT_NAME,\r\n\t\t\t\t(String) null);\r\n\t\tif (projectName != null && projectName.trim().length() > 0) {\r\n\t\t\tIJavaProject javaProject = javaModel.getJavaProject(projectName);\r\n\t\t\t// IJavaProject javaProject =\r\n\t\t\t// JavaRuntime.getJavaProject(configuration);\r\n\t\t\tif (javaProject != null) {\r\n\t\t\t\t// lets see if it exists\r\n\t\t\t\tif (!javaProject.exists()) {\r\n\t\t\t\t\tanswer = true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn answer;\r\n\t}",
"public boolean isProjectOpen() {\n\t\treturn (projectFileIO != null);\n\t}",
"public static boolean keepProjectsInSync() {\r\n\t\treturn ProjectUIPlugin.keepProjectsInSync();\r\n\t}",
"private boolean canDelete(IResource[] resources) {\r\n // allow only projects or only non-projects to be selected;\r\n // note that the selection may contain multiple types of resource\r\n if (!(containsOnlyProjects(resources) || containsOnlyNonProjects(resources))) {\r\n return false;\r\n }\r\n\r\n if (resources.length == 0) {\r\n return false;\r\n }\r\n // Return true if everything in the selection exists.\r\n for (IResource resource : resources) {\r\n if (resource.isPhantom()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private Collection<EclipseProject> allProjects() {\n Collection<EclipseProject> all = new HashSet<EclipseProject>(selectedProjects);\n all.addAll(requiredProjects);\n return all;\n }",
"public boolean isExcluded()\n {\n return project.isExcluded(this);\n }",
"public boolean selectProject(String projectName){\n\t\ttry{\n\t\t\tAssert.assertTrue(CommonUtil.titleContains(\"Browse Projects\", Constants.EXPLICIT_WAIT_LOW), \"Browse Project Page title is not same.\");\n\t\t\tlogger.info(\"Browse Projects page is selected successfully.\");\n\t\t\t//allProjectsLink.click();\n\t\t\t//Assert.assertTrue(CommonUtil.visibilityOfElementLocated(\"//div[@id='none-panel' and @class='module inall active']\"));\n\t\t\tAssert.assertTrue(CommonUtil.searchAndClickFromList(allProjectList, projectName), \"Project is not selected successfully.\");\n\t\t\tlogger.info(projectName + \" is selected successfully.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"boolean hasIronSelected();",
"@Override\r\n\tpublic boolean isEnabled() {\r\n\t\tboolean result = false;\r\n\t\tif (getSelection().size() == 1) {\r\n\t\t\tif (getSelection().getFirstElement() instanceof IResource) {\r\n\t\t\t\tIResource resource = (IResource) getSelection().getFirstElement();\r\n\t\t\t\tString pomFileNames = AggregatedProperties.getPomFileNames(resource.getProject());\r\n\t\t\t\tStringTokenizer tkz = new StringTokenizer(pomFileNames, ConfigurationConstants.POM_FILES_SEPARATOR, false);\r\n\t\t\t\twhile (tkz.hasMoreTokens()) {\r\n\t\t\t\t\tif (resource.getName().equalsIgnoreCase(tkz.nextToken())) {\r\n\t\t\t\t\t\tresult = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"public boolean isProjectionIncluded() {\n return geometry.almostZero(projectionDistance);\n }",
"public boolean hasAtLeastOneReference(Project project);",
"public static boolean canPrune() {\n\t\tboolean result = false;\n\t\tint projectedTotal = 0;\n\t\t\n\t\tint i = 0;\n\t\twhile(i<jobsChosen){\n\t\t\tprojectedTotal += board[i][currentCombo[i]];\n\t\t\ti++;\n\t\t}\n\t\twhile(i<numPeople){\n\t\t\tprojectedTotal += bestPossibleCombination[i];\n\t\t\ti++;\n\t\t}\n\t\tif(projectedTotal<bestTotal){//Cant be greater than current Best Total\n\t\t\tresult = true;\n\t\t}\n\t\treturn result;\n\t}",
"public static boolean isEtsProjBladeProject(String etsProjId, Connection conn) throws SQLException, Exception {\n \t\t\tStringBuffer sb = new StringBuffer();\n \t\t\tint count = 0;\n \t\t\tsb.append(\"select count(ETS_PROJECT_ID) from BLADE.BLADE_PROJECTS\");\n \t\t\tsb.append(\" WHERE\");\n \t\t\tsb.append(\" ETS_PROJECT_ID = '\" + etsProjId + \"' \");\n \t\t\tsb.append(\" with ur\");\n \t\t\tcount = AmtCommonUtils.getRecCount(conn, sb.toString());\n \t\t\tif (count > 0) {\n \t\t\t\treturn true;\n \t\t\t}\n \t\t\treturn false;\n\t\t}",
"public boolean isSelectionEmpty()\n/* */ {\n/* 215 */ return this.selectedDates.isEmpty();\n/* */ }",
"public boolean isProjectIdNull()\r\n\t{\r\n\t\treturn projectIdNull;\r\n\t}",
"public boolean isMainProject() {\n return this.mIsMainProject;\n }",
"public boolean getProjectState(final Project project) {\n\t\tboolean active;\n\t\tif (project == null) {\n\t\t\tmainController.getNotificationAUI().showNotification(\"Es wurde kein projekt übergeben!\", true);\n\t\t\tnotificationAUI.showNotification(\"\", true);\n\t\t\tactive = false;\n\t\t} else {\n\t\t\tactive = project.isActive();\n\t\t}\n\t\treturn active;\n\t}",
"public boolean isFavoriteProject(ProjectDTO aProjectDTO) {\r\n\t\tboolean result = false;\r\n\t\tif (this.getUserPreferences().containsKey(\"FAVORITE_PROJECT\")) {\r\n\t\t\tString favoriteProjects = ((String) this.getUserPreferences().get(\r\n\t\t\t\t\t\"FAVORITE_PROJECT\"));\r\n\t\t\tresult = favoriteProjects.contains(aProjectDTO.getOid().toString());\r\n\t\t}\r\n\t\treturn result;\r\n\r\n\t}",
"boolean hasSelectedTransport()\n {\n for(JCheckBoxMenuItem item : transportMenuItems.values())\n {\n if(item.isSelected())\n return true;\n }\n\n return false;\n }",
"public boolean getIsValid() {\n return projectName != null && packageName != null && !projectName.isEmpty() && !packageName.isEmpty();\n }",
"public boolean isSelectionEmpty() {\n\t\t\treturn tablecolselectmodel.isSelectionEmpty();\n\t\t}",
"public boolean allDaysSelected() {\n return selectedDays.size() == 7;\n }",
"public boolean allDaysSelected() {\n return selectedDays.size() == 7;\n }",
"public WebElement isProjectInSummary(final String projectName) {\n return GuiInteractioner.searchTextInWebElementList(listedProjects, projectName);\n }",
"public boolean isMultiSelection()\n\t{\n\t\treturn this.isMultiple();\n\t}",
"public List getAvailableProjects (){\n\t\tList retValue = new ArrayList ();\n\t\tthis.setProcessing (true);\n\t\ttry {\n\t\t\tfor (Iterator it = getPersistenceManager().getExtent(Project.class, true).iterator();it.hasNext ();){\n\t\t\t\tretValue.add (it.next());\n\t\t\t}\n\t\t} finally {\n\t\t\tthis.setProcessing (false);\n\t\t}\n\t\treturn retValue;\n\t}",
"@Override\n public boolean isApplicable(Class<? extends AbstractProject> aClass) {\n return true;\n }",
"public boolean isSelectOnly()\n\t{\n\t\treturn selectOnly;\n\t}",
"public boolean isSetOverrideAllocationProjectNumber() {\n return this.overrideAllocationProjectNumber != null;\n }",
"public boolean isApplicable(Class<? extends AbstractProject> aClass) {\n\t\t\treturn true; // so that it will also be available for maven & other projects\n\t\t}",
"@Override\n\tpublic List<ProjectInfo> findAllProject() {\n\t\treturn sqlSession.selectList(\"cn.sep.samp2.project.findAllProject\");\n\t}",
"public boolean getProjectExternallyEdited()\r\n {\r\n return (m_projectExternallyEdited);\r\n }",
"public boolean isSelectorNeeded() {\n if (!m_selectChecked) {\n if (m_selectorType != NestingCustomBase.SELECTION_UNCHECKED) {\n \n // before reporting selector needed, make sure at least once child is going to be present\n for (int i = 0; i < m_values.size(); i++) {\n DataNode node = (DataNode)m_values.get(i);\n if (!node.isIgnored()) {\n m_selectNeeded = true;\n break;\n }\n }\n \n }\n m_selectChecked = true;\n }\n return m_selectNeeded;\n }",
"boolean isCitySelected();",
"private boolean CheckParkSelection() {\n\t\tif (Park_ComboBox.getSelectionModel().isEmpty()) {\n\t\t\tif (!Park_ComboBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPark_ComboBox.getStyleClass().add(\"error\");\n\t\t\tParkNote.setText(\"* Select park\");\n\t\t\treturn false;\n\t\t}\n\t\tPark_ComboBox.getStyleClass().remove(\"error\");\n\t\tParkNote.setText(\"*\");\n\t\treturn true;\n\t}",
"public boolean hasProjectDirExcluded() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"public boolean hasProjectDirExcluded() {\n return ((bitField0_ & 0x00000002) != 0);\n }",
"@Test\n public void projectIsNotSelected_doesNotTriggerListeners() {\n projectSelector.handleOpenProjectSelectionDialog();\n\n verifyNoMoreInteractions(projectSelectionListener);\n }",
"public boolean isMaskSelected() {\n return (this.mActivity.getCameraAppUI().getCurrSelect() == null || this.mActivity.getCameraAppUI().getCurrSelect() == \"\") ? false : true;\n }",
"@Override\n public boolean isRemoteProject() {\n return true;\n }",
"public boolean isApplied() {\n return selectedDatasetNumbers.size() > 1;\n }",
"public boolean isSelectionEmpty() {\n return selectionEmpty;\n }",
"List<EclipseProject> getProjects() {\n return getFlattenedProjects(selectedProjects);\n }",
"@Override\n public boolean equals(Object object) {\n if (!(object instanceof Project)) {\n return false;\n }\n Project other = (Project) object;\n if ((this.projId == null && other.projId != null) || (this.projId != null && !this.projId.equals(other.projId))) {\n return false;\n }\n return true;\n }",
"boolean hasBracksSelected();",
"public boolean createCmsDescriptorProjects() {\n final ProjectInfo mainData = collectMainPageInfo();\n\n try {\n\t\t\tmWizard.getContainer().run(true, false, new IRunnableWithProgress() {\n\t\t\t\t\n\t\t\t @Override\n\t\t\t public void run(IProgressMonitor monitor) throws InvocationTargetException,\n\t\t\t InterruptedException {\n\t\t\t \tcreateProjectAsync(monitor, mainData, null, true);\n\t\t\t }\n\t\t\t});\n\t\t} catch (InvocationTargetException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn false;\n\t\t}\n \n return true;\n }",
"public final boolean hasActorsSelected() {\n return (selectedActors.size() > 0);\n }",
"public boolean existProject(String projectName) {\n\t\treturn ajdtHandler.existProject(projectName);\n\t}",
"public abstract boolean hasSelection();",
"private static boolean addNewProject() {\n\t\tString[] options = new String[] {\"Ongoing\",\"Finished\",\"Cancel\"};\n\t\tint choice = JOptionPane.showOptionDialog(frame, \"Select new project type\" , \"Add new Project\", \n\t\t\t\tJOptionPane.DEFAULT_OPTION, JOptionPane.PLAIN_MESSAGE, null, options, options[2]);\n\t\t\n\t\tNewProjectDialog dialog;\n\t\t\n\t\tswitch(choice) {\n\t\tcase 0:\n\t\t\tdialog = new NewProjectDialog(\"o\");\n\t\t\tdialog.setVisible(true);\n\t\t\tbreak;\n\t\tcase 1:\n\t\t\tdialog = new NewProjectDialog(\"f\");\n\t\t\tdialog.setVisible(true);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\treturn true;\n\t}",
"public boolean shouldDisposeProjectFiles(File projectFile) {\n\n\t\tboolean shouldDispose = true;\n\n\t\tif (projectFile != null) {\n\n\t\t\t// getting the name of the project\n\t\t\tString projectName = Toolkit.getFileName(projectFile);\n\t\t\tString currentPrjName = \"\";\n\t\t\tFile handleProjectFile = null;\n\n\t\t\tif (projectName != null && !projectName.equals(\"\")) {\n\n\t\t\t\t// for each handle\n\t\t\t\tfor (SVGHandle hnd : Editor.getEditor().getHandlesManager()\n\t\t\t\t\t\t.getHandles()) {\n\n\t\t\t\t\t// getting the project file of this handle\n\t\t\t\t\thandleProjectFile = hnd.getScrollPane().getSVGCanvas()\n\t\t\t\t\t\t\t.getProjectFile();\n\n\t\t\t\t\tif (handleProjectFile != null) {\n\n\t\t\t\t\t\tcurrentPrjName = Toolkit.getFileName(handleProjectFile);\n\n\t\t\t\t\t\tif (currentPrjName != null\n\t\t\t\t\t\t\t\t&& currentPrjName.equals(projectName)) {\n\n\t\t\t\t\t\t\tshouldDispose = false;\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\n\t\treturn shouldDispose;\n\t}",
"public abstract KenaiProject[] getDashboardProjects(boolean onlyOpened);",
"public static boolean isEtsProjBladeProject(String etsProjId) throws SQLException, Exception {\n \t\t\tConnection conn = null;\n \t\t\tboolean flag = false;\n \t\t\ttry {\n \t\t\t\tconn = ETSDBUtils.getConnection();\n \t\t\t\tflag = isEtsProjBladeProject(etsProjId, conn);\n \t\t\t} finally {\n \t\t\t\tETSDBUtils.close(conn);\n \t\t\t}\n \t\t\treturn flag;\n \t\t}",
"public static boolean isProjectOrFolder(EntityType type){\r\n\t\treturn EntityType.project.equals(type)\r\n\t\t\t\t|| EntityType.folder.equals(type);\r\n\t}",
"public boolean isSomethingSelected() {\r\n \t\treturn graph.getSelectionCell() != null;\r\n \t}",
"@SuppressWarnings(\"rawtypes\")\n\t\tpublic boolean isApplicable( Class<? extends AbstractProject> aClass ) {\n\t\t\treturn true;\n\t\t}",
"public List<String> getProjects() {\r\n\t\treturn projects;\r\n\t}",
"public boolean getAdminProject()\r\n {\r\n return (m_adminProject);\r\n }",
"public boolean[] hasConflictsAndChanges(Project project);",
"public boolean isMultiSelection()\n {\n return multiSelection;\n }",
"public boolean getNewTaskStartIsProjectStart()\r\n {\r\n return (m_newTaskStartIsProjectStart);\r\n }",
"public boolean getProjectDirExcluded() {\n return projectDirExcluded_;\n }",
"public boolean hasSubQuery() {\r\n\t\tList list = allElements();\r\n\t\tint len = list.size();\r\n\t\tfor (int n = 0; n < len; ++n) {\r\n\t\t\tObject ob = list.get(n);\r\n\t\t\tif (ob instanceof TObject) {\r\n\t\t\t\tTObject tob = (TObject) ob;\r\n\t\t\t\tif (tob.getTType() instanceof TQueryPlanType) {\r\n\t\t\t\t\treturn true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isApplicable(Class<? extends AbstractProject> aClass) {\n return true;\n }",
"public boolean isApplicable(Class<? extends AbstractProject> aClass) {\n return true;\n }",
"public boolean isApplicable(Class<? extends AbstractProject> aClass) {\n return true;\n }",
"public boolean isSetSubset() {\n return this.subset != null;\n }",
"@Override\r\n\tpublic List<Project> findProject() {\n\t\treturn iSearchSaleRecordDao.findProject();\r\n\t}",
"public boolean getProjectDirExcluded() {\n return projectDirExcluded_;\n }",
"private boolean isCDISupportEnabled(String projectName){\n\t\topenProjectProperties(projectName);\n\t\tnew DefaultTreeItem(\"CDI (Context and Dependency Injection) Settings\").select();\n\t\tboolean toReturn = new LabeledCheckBox(\"CDI support:\").isChecked();\n\t\tnew OkButton().click();\n\t\tnew WaitWhile(new ShellWithTextIsAvailable(\"Properties for \"+projectName));\n\t\treturn toReturn;\n\t}",
"public boolean containsGraph( final ProjectVersionRef ref )\n {\n return getConnectionInternal().containsProject( params, ref );\n }",
"boolean hasBuild();",
"boolean isKeepSolutions();",
"public boolean isProjectExist(int id) throws EmployeeManagementException {\n\t\treturn projectDaoImpl.isProjectExist(id);\n\t}",
"List<Project> selectAll();",
"boolean hasStablesSelected();",
"public boolean exportAllProjectsToZip() {\n @SuppressWarnings(\"unchecked\")\n List<PlanProperties> ppList = em.createQuery(\"select p from PlanProperties p order by p.id\").getResultList();\n\n return exportPPListToZip(ppList);\n }",
"boolean hasArtilleryFactorySelected();",
"public boolean isMultiSelect() {\r\n return multiSelect;\r\n }",
"public Boolean isMultipleSelection() {\n return m_multipleSelection;\n }",
"@Override\r\n public boolean isAvailable() {\r\n if (getView() == null)\r\n return false;\r\n return getView().getSelectedUsers(true) != null || getView().getSelectedQueries(true) != null;\r\n }",
"public boolean isSetProduction_companies() {\n return this.production_companies != null;\n }",
"public boolean hasSelectionLimit()\n {\n return (this.getSelectionLimit() > 0L);\n }",
"public boolean isSetItems() {\n return this.items != null;\n }",
"@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Project)) {\r\n return false;\r\n }\r\n Project other = (Project) object;\r\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n return false;\r\n }\r\n return true;\r\n }",
"private boolean createProject() {\r\n ProjectOverviewerApplication app = (ProjectOverviewerApplication)getApplication();\r\n Projects projects = app.getProjects();\r\n String userHome = System.getProperty(\"user.home\");\r\n // master file for projects management\r\n File projectsFile = new File(userHome + \"/.hackystat/projectoverviewer/projects.xml\");\r\n \r\n // create new project and add it to the projects\r\n Project project = new Project();\r\n project.setProjectName(this.projectName);\r\n project.setOwner(this.ownerName);\r\n project.setPassword(this.password);\r\n project.setSvnUrl(this.svnUrl);\r\n for (Project existingProject : projects.getProject()) {\r\n if (existingProject.getProjectName().equalsIgnoreCase(this.projectName)) {\r\n return false;\r\n }\r\n }\r\n projects.getProject().add(project);\r\n \r\n try {\r\n // create the specific tm3 file and xml file for the new project\r\n File tm3File = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".tm3\");\r\n File xmlFile = new File(userHome + \r\n \"/.hackystat/projectoverviewer/\" + this.projectName + \".xml\");\r\n tm3File.createNewFile();\r\n \r\n // initialize the data for the file\r\n SensorDataCollector collector = new SensorDataCollector(app.getSensorBaseHost(), \r\n this.ownerName, \r\n this.password);\r\n collector.getRepository(this.svnUrl, this.projectName);\r\n collector.write(tm3File, xmlFile);\r\n } \r\n catch (IOException e) {\r\n e.printStackTrace();\r\n return false;\r\n }\r\n // write the projects.xml file with the new project added\r\n String packageName = \"org.hackystat.iw.projectoverviewer.jaxb.projects\";\r\n return XmlConverter.objectToXml(projects, projectsFile, packageName);\r\n }",
"public boolean noDaySelected() {\n return selectedDays.size() == 0;\n }",
"public boolean noDaySelected() {\n return selectedDays.size() == 0;\n }",
"public boolean isSetBrowse()\n {\n synchronized (monitor())\n {\n check_orphaned();\n return get_store().count_elements(BROWSE$2) != 0;\n }\n }",
"public boolean isRebuildEnabled() {\n if (!run.hasPermission(Item.BUILD)) {\n return false;\n }\n if (!run.getParent().isBuildable()) {\n return false;\n }\n\n return true;\n }",
"public boolean getInsertedProjectsLikeSummary()\r\n {\r\n return (m_insertedProjectsLikeSummary);\r\n }"
]
| [
"0.8013185",
"0.72905236",
"0.68406206",
"0.6414832",
"0.63377404",
"0.63377404",
"0.6323828",
"0.6167218",
"0.608094",
"0.60763943",
"0.6031156",
"0.60179704",
"0.5924169",
"0.5855984",
"0.583859",
"0.578902",
"0.57303005",
"0.5694206",
"0.568122",
"0.5673877",
"0.5660552",
"0.5644966",
"0.55708325",
"0.5567976",
"0.553415",
"0.54925",
"0.5478434",
"0.54686165",
"0.54609",
"0.5449125",
"0.54464865",
"0.54464865",
"0.5444771",
"0.54392713",
"0.54388195",
"0.5438469",
"0.54376936",
"0.53998774",
"0.5397091",
"0.53828067",
"0.53779244",
"0.5376667",
"0.53751206",
"0.5373494",
"0.53717065",
"0.53572345",
"0.5355039",
"0.5352181",
"0.5347827",
"0.53460413",
"0.5342835",
"0.53404444",
"0.53388834",
"0.53230804",
"0.53114456",
"0.53069574",
"0.528606",
"0.52849585",
"0.52556026",
"0.5246337",
"0.52360153",
"0.5224028",
"0.5220178",
"0.5218472",
"0.5210299",
"0.5203969",
"0.5191468",
"0.5169916",
"0.5169044",
"0.516532",
"0.51594317",
"0.51481205",
"0.5136986",
"0.5136986",
"0.5136986",
"0.51264644",
"0.51070327",
"0.5102158",
"0.5087343",
"0.5078875",
"0.5077672",
"0.5073769",
"0.507321",
"0.5071632",
"0.50706494",
"0.5062652",
"0.50555533",
"0.5050905",
"0.50491196",
"0.50460255",
"0.50395083",
"0.50273216",
"0.5027318",
"0.5021834",
"0.50188595",
"0.5011486",
"0.5011486",
"0.500844",
"0.5007408",
"0.4998992"
]
| 0.8130198 | 0 |
Asks the user to confirm a delete operation, where the selection contains only projects. Also remembers whether project content should be deleted. | private IResource[] getSelectedResourcesArray() {
List selection = getSelectedResources();
IResource[] resources = new IResource[selection.size()];
selection.toArray(resources);
return resources;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void removeSelectedAction() {\n\t\tfinal List<Project> selectedItems = selectionList.getSelectionModel().getSelectedItems();\n\t\tif (!selectedItems.isEmpty()) {\n\t\t\tfinal Project[] items = selectedItems.toArray(new Project[selectedItems.size()]);\n\t\t\tfinal Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\n\t\t\talert.initOwner(getWindow());\n\t\t\tif (selectedItems.size() > 1) {\n\t\t\t\talert.setTitle(String.format(\"Remove selected Projects from list? - %s items selected\",\n\t\t\t\t\t\tselectedItems.size()));\n\t\t\t} else {\n\t\t\t\talert.setTitle(\"Remove selected Project from list? - 1 item selected\");\n\t\t\t}\n\t\t\talert.setHeaderText(\"\"\"\n\t\t\t Are you sure you want to remove the selected projects?\n\t\t\t This will not remove any files from the project.\n\t\t\t \"\"\");\n\t\t\tfinal Optional<ButtonType> result = alert.showAndWait();\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\tfor (final Project p : items) {\n\t\t\t\t\tprojectService.deleteProject(p);\n\t\t\t\t\tprojectsObservable.remove(p);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(frame, \n\t\t\t\t\t\t\"Do you want to delete the selected projects?\\nThis action cannot be undone!\", \n\t\t\t\t\t\t\"Delete Selected\", JOptionPane.YES_NO_OPTION, JOptionPane.WARNING_MESSAGE);\n\t\t\t\tif(choice == 0){\n\t\t\t\t\tSystem.out.println(\"Delete\");\n\t\t\t\t\tString[] selected = sel.getSelected(); \n\t\t\t\t\tfor(int i=0;i<selected.length;i++) {\n\t\t\t\t\t\n\t\t\t\t\t\tint index = portfolio.findByCode(selected[i]);\n\t\t\t\t\t\tportfolio.remove(index, config.isUpdateDB());\n\t\t\t\t\t\tsel.remove(index);\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfpTable.setModel((TableModel) new ProjectTableModel(portfolio.getFinishedProjects()));\n\t\t\t\topTable.setModel((TableModel) new ProjectTableModel(portfolio.getOngoingProjects()));\n\t\t\t\ttoggleSaved(false);\n\t\t\t}",
"@DeleteMapping(\"/project\")\n public Object doDelete(@RequestParam(value = \"confirm\", defaultValue = \"false\") boolean confirm) {\n if (confirm)\n service.deleteAllProjects();\n return new ResponseTemplate(confirm, null);\n }",
"public void doDeleteconfirm ( RunData data)\n\t{\n\t\tSessionState state = ((JetspeedRunData)data).getPortletSessionState (((JetspeedRunData)data).getJs_peid ());\n\t\tSet deleteIdSet = new TreeSet();\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\tString[] deleteIds = data.getParameters ().getStrings (\"selectedMembers\");\n\t\tif (deleteIds == null)\n\t\t{\n\t\t\t// there is no resource selected, show the alert message to the user\n\t\t\taddAlert(state, rb.getString(\"choosefile3\"));\n\t\t}\n\t\telse\n\t\t{\n\t\t\tdeleteIdSet.addAll(Arrays.asList(deleteIds));\n\t\t\tList deleteItems = new Vector();\n\t\t\tList notDeleteItems = new Vector();\n\t\t\tList nonEmptyFolders = new Vector();\n\t\t\tList roots = (List) state.getAttribute(STATE_COLLECTION_ROOTS);\n\t\t\tIterator rootIt = roots.iterator();\n\t\t\twhile(rootIt.hasNext())\n\t\t\t{\n\t\t\t\tBrowseItem root = (BrowseItem) rootIt.next();\n\n\t\t\t\tList members = root.getMembers();\n\t\t\t\tIterator memberIt = members.iterator();\n\t\t\t\twhile(memberIt.hasNext())\n\t\t\t\t{\n\t\t\t\t\tBrowseItem member = (BrowseItem) memberIt.next();\n\t\t\t\t\tif(deleteIdSet.contains(member.getId()))\n\t\t\t\t\t{\n\t\t\t\t\t\tif(member.isFolder())\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(ContentHostingService.allowRemoveCollection(member.getId()))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tdeleteItems.add(member);\n\t\t\t\t\t\t\t\tif(! member.isEmpty())\n\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\tnonEmptyFolders.add(member);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tnotDeleteItems.add(member);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(ContentHostingService.allowRemoveResource(member.getId()))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tdeleteItems.add(member);\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\tnotDeleteItems.add(member);\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\tif(! notDeleteItems.isEmpty())\n\t\t\t{\n\t\t\t\tString notDeleteNames = \"\";\n\t\t\t\tboolean first_item = true;\n\t\t\t\tIterator notIt = notDeleteItems.iterator();\n\t\t\t\twhile(notIt.hasNext())\n\t\t\t\t{\n\t\t\t\t\tBrowseItem item = (BrowseItem) notIt.next();\n\t\t\t\t\tif(first_item)\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames = item.getName();\n\t\t\t\t\t\tfirst_item = false;\n\t\t\t\t\t}\n\t\t\t\t\telse if(notIt.hasNext())\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames += \", \" + item.getName();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tnotDeleteNames += \" and \" + item.getName();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\taddAlert(state, rb.getString(\"notpermis14\") + notDeleteNames);\n\t\t\t}\n\n\n\t\t\t/*\n\t\t\t\t\t//htripath-SAK-1712 - Set new collectionId as resources are not deleted under 'more' requirement.\n\t\t\t\t\tif(state.getAttribute(STATE_MESSAGE) == null){\n\t\t\t\t\t String newCollectionId=ContentHostingService.getContainingCollectionId(currentId);\n\t\t\t\t\t state.setAttribute(STATE_COLLECTION_ID, newCollectionId);\n\t\t\t\t\t}\n\t\t\t*/\n\n\t\t\t// delete item\n\t\t\tstate.setAttribute (STATE_DELETE_ITEMS, deleteItems);\n\t\t\tstate.setAttribute (STATE_DELETE_ITEMS_NOT_EMPTY, nonEmptyFolders);\n\t\t}\t// if-else\n\n\t\tif (state.getAttribute(STATE_MESSAGE) == null)\n\t\t{\n\t\t\tstate.setAttribute (STATE_MODE, MODE_DELETE_CONFIRM);\n\t\t\tstate.setAttribute(STATE_LIST_SELECTIONS, deleteIdSet);\n\t\t}\n\n\n\t}",
"public boolean deleteProject(String projectName, String userName, String password){\n\t\ttry{\n\t\t\t//Assert.assertTrue(CommonUtil.titleContains(\"Browse Projects\", Constants.EXPLICIT_WAIT_LOW), \"Browse Project Page title is not same.\");\n\t\t\t//logger.info(\"Browse Projects page is selected successfully.\");\n\t\t\t//allProjectsLink.click();\n\t\t\t//Assert.assertTrue(CommonUtil.visibilityOfElementLocated(\"//div[@id='none-panel' and @class='module inall active']\"));\n\t\t\tAssert.assertTrue(CommonUtil.searchTheTextInList(\".//*[@id='project-list']/descendant::a[contains(@id,'view-project-')]\", projectName), \"Project is not searched successfully.\");\n\t\t\tlogger.info(projectName + \" is Searched successfully.\");\n\t\t\t\n\t\t\tCommonUtil.navigateThroughXpath(\"//td[a[text()='\"+projectName+\"']]/following-sibling::td/descendant::a[contains(@id,'delete_project')]\");\n\t\t\tCommonUtil.implicitWait(Constants.IMPLICIT_WAIT_MEDIUM);\n\t\t\tif ( CommonUtil.getTitle().contains(\"Administrator Access\") ) {\n\t\t\t\tAssert.assertTrue( JiraAdministrationAuthenticatePage.getInstance().authenticateAdminPassword(userName, password), \"Jira Administrator is not authenticate successsfully.\" );\n\t\t\t\tCommonUtil.implicitWait(Constants.IMPLICIT_WAIT_MEDIUM);\n\t\t\t\tlogger.info(\"Administrator is authenticate successfully.\");\n\t\t\t}\n\t\t\tAssert.assertTrue(CommonUtil.getTextFromUIByXpath(\"//td/*[@class='formtitle']\").contains(\"Delete Project:\"), \"Delete project confirmation popup is not validated.\");\n\t\t\tlogger.info(\"Delete project confirmation popup is validated successfully.\");\n\t\t\tAssert.assertTrue(CommonUtil.getTextFromUIByXpath(\"//td/*[@class='formtitle']\").contains(projectName), \"Delete project name in popup is not validated.\");\n\t\t\tlogger.info(\"Delete project Name in confirmation popup is validated successfully.\");\n\t\t\tCommonUtil.navigateThroughXpath(\".//*[@id='delete_submit']\");\n\t\t\tCommonUtil.javaWait(Constants.JAVA_WAIT_MEDIUM);\n\t\t\t\n\t\t\t\n\t\t\tAssert.assertFalse(CommonUtil.searchTheTextInList(\".//*[@id='project-list']/descendant::a[contains(@id,'view-project-')]\", projectName), \"Project is still present After delete.\");\n\t\t\tlogger.info(projectName + \" is Deleted successfully.\");\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"private void delete() {\n\t\tComponents.questionDialog().message(\"Are you sure?\").callback(answeredYes -> {\n\n\t\t\t// if confirmed, delete the current product PropertyBox\n\t\t\tdatastore.delete(TARGET, viewForm.getValue());\n\t\t\t// Notify the user\n\t\t\tNotification.show(\"Product deleted\", Type.TRAY_NOTIFICATION);\n\n\t\t\t// navigate back\n\t\t\tViewNavigator.require().navigateBack();\n\n\t\t}).open();\n\t}",
"private void confirmDelete(){\n\t\tAlertDialog.Builder dialog = new AlertDialog.Builder(this);\n\t\tdialog.setIcon(R.drawable.warning);\n\t\tdialog.setTitle(\"Confirm\");\n\t\tdialog.setMessage(\"Are you sure you want to Delete Selected Bookmark(s).?\");\n\t\tdialog.setCancelable(false);\n\t\tdialog.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdeleteBookmark();\n\t\t\t}\n\t\t});\n\t\tdialog.setNegativeButton(\"CANCEL\", new DialogInterface.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t});\n\t\t\n\t\t// Pack and show\n\t\tAlertDialog alert = dialog.create();\n\t\talert.show();\n\t}",
"public void testProjectDelete() {\n \t\t// create the project\n \t\tIProject project = getProject(getUniqueString());\n \t\tensureExistsInWorkspace(project, true);\n \t\t// set some settings\n \t\tString qualifier = getUniqueString();\n \t\tString key = getUniqueString();\n \t\tString value = getUniqueString();\n \t\tIScopeContext context = new ProjectScope(project);\n \t\tPreferences node = context.getNode(qualifier);\n \t\tPreferences parent = node.parent().parent();\n \t\tnode.put(key, value);\n \t\tassertEquals(\"1.0\", value, node.get(key, null));\n \n \t\ttry {\n \t\t\t// delete the project\n \t\t\tproject.delete(IResource.FORCE | IResource.ALWAYS_DELETE_PROJECT_CONTENT, getMonitor());\n \t\t} catch (CoreException e) {\n \t\t\tfail(\"2.0\", e);\n \t\t}\n \n \t\ttry {\n \t\t\t// project pref should not exist\n \t\t\tassertTrue(\"3.0\", !parent.nodeExists(project.getName()));\n \t\t} catch (BackingStoreException e) {\n \t\t\tfail(\"3.1\", e);\n \t\t}\n \n \t\t// create a project with the same name\n \t\tensureExistsInWorkspace(project, true);\n \n \t\t// ensure that the preference value is not set\n \t\tassertNull(\"4.0\", context.getNode(qualifier).get(key, null));\n \t}",
"public String handleDelete()\n throws HttpPresentationException, webschedulePresentationException\n {\n String projectID = this.getComms().request.getParameter(PROJ_ID);\n System.out.println(\" trying to delete a project \"+ projectID);\n \n\t try {\n\t Project project = ProjectFactory.findProjectByID(projectID);\n String title = project.getProj_name();\n project.delete();\n this.getSessionData().setUserMessage(\"The project, \" + title +\n \", was deleted\");\n // Catch any possible database exception as well as the null pointer\n // exception if the project is not found and is null after findProjectByID\n\t } catch(Exception ex) {\n this.getSessionData().setUserMessage(projectID + \" Please choose a valid project to delete\");\n }\n // Redirect to the catalog page which will display the error message,\n // if there was one set by the above exception\n throw new ClientPageRedirectException(PROJECT_ADMIN_PAGE);\n }",
"private void actionDelete() {\r\n showDeleteDialog();\r\n }",
"@FXML\n private void confirmDeletionOfRecords(){\n ObservableList<Record> recordsToBeDeleted = tbvRecords.getSelectionModel().getSelectedItems();\n\n DBhandler db = new DBhandler();\n String title =\"Confirm delete\";\n String HeaderText = \"Record(s) will be permanently deleted\";\n String ContentText = \"Are you sure you want to delete this data?\";\n AlertHandler ah = new AlertHandler();\n\n if(recordsToBeDeleted.isEmpty()){\n ah.getTableError();\n }\n else{\n if (ah.getConfirmation(title, HeaderText, ContentText) == ButtonType.OK) {\n System.out.println(\"Ok pressed\");\n db.deleteRecordsFromDatabase(recordsToBeDeleted);\n populateRecords();\n } else {\n System.out.println(\"Cancel pressed\");\n }\n }}",
"public boolean deleteProject(Project p) {\n try {\n String delete = \"DELETE FROM PROJECTS WHERE PROJECT_ID = ?\";\n connection = ConnectionManager.getConnection();\n PreparedStatement ps = connection.prepareStatement(delete);\n ps.setString(1, p.getProjectId());\n\n ps.executeUpdate();\n ps.close();\n return true;\n } catch (SQLException sqle) {\n sqle.printStackTrace(); // for debugging\n return false;\n }\n }",
"private boolean canDelete(IResource[] resources) {\r\n // allow only projects or only non-projects to be selected;\r\n // note that the selection may contain multiple types of resource\r\n if (!(containsOnlyProjects(resources) || containsOnlyNonProjects(resources))) {\r\n return false;\r\n }\r\n\r\n if (resources.length == 0) {\r\n return false;\r\n }\r\n // Return true if everything in the selection exists.\r\n for (IResource resource : resources) {\r\n if (resource.isPhantom()) {\r\n return false;\r\n }\r\n }\r\n return true;\r\n }",
"private void cmd_deleteSelection(){\n\t\tm_frame.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));\n\t\tif (ADialog.ask(getWindowNo(), m_frame.getContainer(), \"DeleteSelection\"))\n\t\t{\t\n\t\t\tint records = deleteSelection(detail);\n\t\t\tsetStatusLine(Msg.getMsg(Env.getCtx(), \"Deleted\") + records, false);\n\t\t}\t\n\t\tm_frame.setCursor(Cursor.getDefaultCursor());\n\t\tbDelete.setSelected(false);\n\t\texecuteQuery();\n\t\t\n\t}",
"public void execute() {\n if (myItemSelection.getSize() > 0) {\n confirmationDialogbox = new ConfirmationDialogbox(constants.deleteRolesDialogbox(), patterns.deleteRolesWarn( myItemSelection.getSelectedItems().size()), constants.okButton(), constants.cancelButton());\n confirmationDialogbox.addCloseHandler(new CloseHandler<PopupPanel>(){\n public void onClose(CloseEvent<PopupPanel> event) {\n if(confirmationDialogbox.getConfirmation()){\n deleteSelectedItems();\n }\n }} );\n } else {\n if (myMessageDataSource != null) {\n myMessageDataSource.addWarningMessage(messages.noRoleSelected());\n }\n } \n \n }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the goal.\n deleteGoal();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n case R.id.delete_project:\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n builder.setTitle(\"Delete\");\n builder.setMessage(\"Do you really want to delete this project?\");\n\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n deleteProject();\n }\n });\n\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n\n AlertDialog alert = builder.create();\n alert.show();\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }",
"@FXML\n void confirmDelete () {\n\n// cycles through all Elements to be deleted\n for (Element element : app.deleteElements) {\n\n// if it is a Timeline, it removes it\n if (element instanceof Timeline) {\n app.timelines.remove(element);\n }\n\n// if it is an Event, it finds the relevant Timeline, then removes the Event\n if (element instanceof Event) {\n for (Timeline timeline : app.timelines) {\n if (timeline == ((Event) element).timeline) {\n timeline.events.remove(element);\n }\n }\n }\n }\n\n exitDeleteWindow();\n\n// creates a message for the user\n setMessage(\"Exited Delete Mode: \" + app.deleteElements.size() + \" elements deleted\", false);\n }",
"public void deleteProject(Long projectId);",
"public void deletePart()\n {\n ObservableList<Part> partRowSelected;\n partRowSelected = partTableView.getSelectionModel().getSelectedItems();\n if(partRowSelected.isEmpty())\n {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"Please select the Part you want to delete.\");\n alert.show();\n } else {\n int index = partTableView.getSelectionModel().getFocusedIndex();\n Part part = Inventory.getAllParts().get(index);\n alert.setAlertType(Alert.AlertType.CONFIRMATION);\n alert.setContentText(\"Are you sure you want to delete this Part?\");\n alert.showAndWait();\n ButtonType result = alert.getResult();\n if (result == ButtonType.OK) {\n Inventory.deletePart(part);\n }\n }\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg_course);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteCourse();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\r\n\tpublic int deleteProject(Map<String, Object> map) throws Exception {\n\t\treturn 0;\r\n\t}",
"void deleteProject(String projectKey);",
"@FXML\r\n private void deletePartAction() throws IOException {\r\n \r\n if (!partsTbl.getSelectionModel().isEmpty()) {\r\n Part selected = partsTbl.getSelectionModel().getSelectedItem();\r\n \r\n Alert message = new Alert(Alert.AlertType.CONFIRMATION);\r\n message.setTitle(\"Confirm delete\");\r\n message.setHeaderText(\" Are you sure you want to delete part ID: \" + selected.getId() + \", name: \" + selected.getName() + \"?\" );\r\n message.setContentText(\"Please confirm your selection\");\r\n \r\n Optional<ButtonType> response = message.showAndWait();\r\n if (response.get() == ButtonType.OK)\r\n {\r\n stock.deletePart(selected);\r\n partsTbl.setItems(stock.getAllParts());\r\n partsTbl.refresh();\r\n displayMessage(\"The part \" + selected.getName() + \" was successfully deleted\");\r\n }\r\n else {\r\n displayMessage(\"Deletion cancelled by user. Part not deleted.\");\r\n }\r\n }\r\n else {\r\n displayMessage(\"No part selected for deletion\");\r\n }\r\n }",
"private void deleteDialog() {\n\t\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\n\t\tbuilder.setTitle(getString(R.string.warmhint));\n\t\tbuilder.setMessage(getString(R.string.changequestion2));\n\t\tbuilder.setPositiveButton(getString(R.string.yes),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdeleteAllTag();\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\tToast.makeText(ArchermindReaderActivity.this,\n\t\t\t\t\t\t\t\tgetString(R.string.successdelete),\n\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.setNegativeButton(getString(R.string.no),\n\t\t\t\tnew OnClickListener() {\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tbuilder.show();\n\t}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteEmployee();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n public void onClickDelete() {\n new DeleteDialog(this.getActivity(), this).show();\n }",
"@FXML\n\tprivate void deleteButtonAction(ActionEvent clickEvent) {\n\t\t\n\t\tPart deletePartFromProduct = partListProductTable.getSelectionModel().getSelectedItem();\n\t\t\n\t\tif (deletePartFromProduct != null) {\n\t\t\t\n\t\t\tAlert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Pressing OK will remove the part from the product.\\n\\n\" + \"Are you sure you want to remove the part?\");\n\t\t\n\t\t\tOptional<ButtonType> result = alert.showAndWait();\n\t\t\n\t\t\tif (result.isPresent() && result.get() == ButtonType.OK) {\n\t\t\t\n\t\t\t\tdummyList.remove(deletePartFromProduct);\n\n\t\t\t}\n\t\t}\n\t}",
"private void delete() {\n DialogInterface.OnClickListener dialogClickListener = new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n switch (which){\n case DialogInterface.BUTTON_POSITIVE:\n setResult(RESULT_OK, null);\n datasource.deleteContact(c);\n dbHelper.commit();\n finish();\n break;\n\n case DialogInterface.BUTTON_NEGATIVE:\n //Do Nothing\n break;\n }\n }\n };\n\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(getString(R.string.confirm_delete) + (c==null?\"\":c.getName()) + \"?\").setPositiveButton(getString(R.string.yes), dialogClickListener)\n .setNegativeButton(getString(R.string.no), dialogClickListener).show();\n }",
"@FXML\n\tprivate void deleteSelected(ActionEvent event) {\n\t\tint selectedIndex = taskList.getSelectionModel().getSelectedIndex();\n\t\tString task = taskList.getItems().get(selectedIndex);\n\t\ttaskList.getSelectionModel().clearSelection();\n\t\ttaskList.getItems().remove(task);\n\t\tchatView.setText(\"\");\n\t\ttaskList.getItems().removeAll();\n\t\tString task_split[] = task.split(\" \", 2);\n\t\tString removeTask = task_split[1];\n\t\tif (task.contains(\"due by\")) {\n\t\t\tString[] taskDate = task_split[1].split(\"\\\\s+\");\n\t\t\tSystem.out.println(taskDate);\n\t\t\tString end = taskDate[taskDate.length - 3];\n\t\t\tSystem.out.println(end);\n\t\t\tremoveTask = task_split[1].substring(0, task_split[1].indexOf(end)).trim();\n\t\t\tSystem.out.println(removeTask);\n\n\t\t}\n\t\tclient.removeTask(removeTask.replace(\"\\n\", \"\"));\n\t}",
"public void clickConfirmDeleteButton() {\n // GeneralUtilities.waitSomeSeconds(1);\n // validateElementText(titleConfirmDeleteToDo, \"Delete To-Do?\");\n // validateElementText(titleConfirmDeleteToDoDescription, \"Are you sure you'd like to delete these To-Dos? Once deleted, you will not be able to retrieve any documents uploaded on the comments in the selected To-Dos.\");\n // waitForCssValueChanged(divConfirmDeleteToDo, \"Div Confirm Delete ToDo\", \"display\", \"block\");\n //\n // hoverElement(buttonConfirmDeleteToDo, \"Button Confirm Delete ToDo\");\n waitForAnimation(divConfirmDeleteToDoAnimate, \"Div Confirm Delete ToDo Animation\");\n clickElement(buttonConfirmDeleteToDo, \"Button Confirm Delete ToDo\");\n waitForCssValueChanged(divConfirmDeleteToDo, \"Div Confirm Delete ToDo\", \"display\", \"none\");\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tAlertDialog.Builder alertDialog = new AlertDialog.Builder(mFragment.getActivity());\n\t\t\t\talertDialog.setTitle(mFragment.getResources().getString(R.string.confirm_deleting));\n\t\t\t\talertDialog.setMessage(mFragment.getResources().getString(R.string.are_you_sure_delete));\n\n\t\t\t\t// Setting Positive \"Yes\" Btn\n\t\t\t\talertDialog.setPositiveButton(mFragment.getResources().getString(R.string.yes),\n\t\t\t\t new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t \t\n\t\t\t\t \tTheMissApplication.getInstance().showProgressFullScreenDialog(mFragment.getActivity());\n\t\t\t\t \t\n\t\t\t\t\t\t\t\tpost.deleteInBackground(new DeleteCallback(){\n\n\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\tpublic void done(ParseException arg0) {\n\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\tTheMissApplication.getInstance().hideProgressDialog();\n\t\t\t\t\t\t\t\t\t\tif(arg0 == null){\n\t\t\t\t\t\t\t\t\t\t\tmFlaggedPicturesList.remove(flaggedPicture);\n\t\t\t\t\t\t\t\t\t\t\tFlaggedPicturesListCellAdapter.this.notifyDataSetChanged();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\n\t\t\t\t \n\t\t\t\t }\n\t\t\t\t });\n\t\t\t\t// Setting Negative \"NO\" Btn\n\t\t\t\talertDialog.setNegativeButton(\"NO\",\n\t\t\t\t new DialogInterface.OnClickListener() {\n\t\t\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t\t \t\t\t\t \n\t\t\t\t dialog.cancel();\n\t\t\t\t }\n\t\t\t\t });\n\n\t\t\t\t// Showing Alert Dialog\n\t\t\t\talertDialog.show();\n\t\t\t}",
"@FXML\r\n public void onDelete() {\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setTitle(\"Mensagem\");\r\n alert.setHeaderText(\"\");\r\n alert.setContentText(\"Deseja excluir?\");\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK) {\r\n AlunoModel alunoModel = tabelaAluno.getItems().get(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n\r\n if (AlunoDAO.executeUpdates(alunoModel, AlunoDAO.DELETE)) {\r\n tabelaAluno.getItems().remove(tabelaAluno.getSelectionModel().getSelectedIndex());\r\n alert(\"Excluido com sucesso!\");\r\n desabilitarCampos();\r\n } else {\r\n alert(\"Não foi possivel excluir\");\r\n }\r\n }\r\n }",
"Map<Project, Boolean> deleteBranch(List<Project> projects, Branch deletedBranch, ProgressListener progressListener);",
"public void showSucceedDeleteDialog() {\n\t\tString msg = getApplicationContext().getResources().getString(\n\t\t\t\tR.string.MSG_DLG_LABEL_DELETE_ITEM_SUCCESS);\n\t\tfinal AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\tthis);\n\t\talertDialogBuilder\n\t\t\t\t.setMessage(msg)\n\t\t\t\t.setCancelable(false)\n\t\t\t\t.setPositiveButton(\n\t\t\t\t\t\tgetApplicationContext().getResources().getString(\n\t\t\t\t\t\t\t\tR.string.MSG_DLG_LABEL_OK),\n\t\t\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t\tstartActivity(getIntent());\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\tAlertDialog alertDialog = alertDialogBuilder.create();\n\t\talertDialog.show();\n\n\t}",
"public void delete() throws Exception {\n\t\topenPrimaryButtonDropdown();\n\t\tgetControl(\"deleteButton\").click();\n\t}",
"public ConfirmDialogPage pressDeleteButton() {\n controls.getDeleteButton().click();\n return new ConfirmDialogPage();\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n builder.setMessage(R.string.delete_dialog_msg);\r\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Delete\" button, so delete the pet.\r\n// deletePet();\r\n }\r\n });\r\n builder.setNegativeButton(R.string.keep_editing, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n // User clicked the \"Cancel\" button, so dismiss the dialog\r\n // and continue editing.\r\n if (dialog != null) {\r\n dialog.dismiss();\r\n }\r\n }\r\n });\r\n\r\n // Create and show the AlertDialog\r\n AlertDialog alertDialog = builder.create();\r\n alertDialog.show();\r\n }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder to display a confirmation message about deleting the book\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.editor_activity_delete_message);\n builder.setPositiveButton(getString(R.string.editor_activity_delete_message_positive),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Delete\"\n deleteBook();\n }\n });\n\n builder.setNegativeButton(getString(R.string.editor_activity_delete_message_negative),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // User clicked \"Cancel\"\n if (dialogInterface != null)\n dialogInterface.dismiss();\n }\n });\n\n // Create and show the dialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the Product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteFav();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public void deleteTemporaryProject() throws CoreException{\n\t\tString versionName = DataManager.getProjectVersion();\n\t\tajdtHandler.deleteProject(versionName);\n\t\t\n\t\tif(versionName.contains(\"_Old\")){\n\t\t\tversionName = versionName.replace(\"_Old\", \"\");\n\t\t\tajdtHandler.deleteProject(versionName);\n\t\t}\n\t\t\n\t}",
"@Override\r\n\tpublic ResponseEntity<String> deleteProject(String authToken , int projectId) throws ManualException{\r\n\t\tSession session=sessionFactory.openSession();\r\n\t\t\r\n\t\tResponseEntity<String> responseEntity=new ResponseEntity<String>(HttpStatus.BAD_REQUEST);\r\n\t\t\r\n\t\t/* check for authToken of admin */\r\n\t\tsession.beginTransaction();\r\n\t\ttry{\r\n\t\t\tAuthTable authtable=session.get(AuthTable.class, authToken);\r\n\t\t\tUser adminUser=session.get(User.class, authtable.getUser().getEmpId());\r\n\t\t\tif(adminUser.getUsertype().equals(\"Admin\")){\t\r\n\t\t\t\t\r\n\t\t\t\t\t/* get The Project */\r\n\t\t\t\t\tString hql = \"FROM project where projectId= \"+projectId ;\r\n\t\t\t\t\tQuery query = session.createQuery(hql);\r\n\t\t\t\t\tProject returnedProject=(Project)query.list().get(0);\r\n\t\t\t\t\r\n\t\t\t\t\t/* get user of that Project */\r\n\t\t\t\t\thql = \"FROM user where projectId=\"+returnedProject.getProjectId() ;\r\n\t\t\t\t\tquery = session.createQuery(hql);\r\n\t\t\t\t\tList<User> users=(List<User>)query.list();\r\n\t\t\t\t\t\r\n\t\t\t\t\t/* Deleting project from users */\r\n\t\t\t\t\tfor(User user:users){\r\n\t\t\t\t\t\tuser.setProject(null);\r\n\t\t\t\t\t\tsession.persist(user);\r\n\t\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t/* delete from project table */\r\n\t\t\t\t\tif(returnedProject!=null){\r\n\t\t\t\t\t\tsession.delete(returnedProject);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t/* entry in operation table */\r\n\t\t\t\t\tOperationImpl operationImpl= new OperationImpl();\r\n\t\t\t\t\toperationImpl.addOperation(session, adminUser, \"Deleted Project \"+ returnedProject.getProjectName());\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.OK);\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.NOT_FOUND);\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tresponseEntity=new ResponseEntity<String>(HttpStatus.UNAUTHORIZED);\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch(Exception e){\r\n\t\t\tresponseEntity=null;\r\n\t\t}\r\n\t\tfinally{\r\n\t\t\tsession.getTransaction().commit();\r\n\t\t\tsession.close();\r\n\t\t\treturn responseEntity;\r\n\t\t}\r\n\t}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteAllBooks();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"void deleteDialog(){\r\n\t\tString title = getString(R.string.confirm);\r\n\t\tString message = getString(R.string.delete_message);\r\n\t\tString positive = getString(R.string.delete); \r\n\t\tString negative = getString(R.string.cancel);\r\n\t\t\r\n \tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\t \r\n \t// set the dialog title\r\n\t builder.setTitle(title);\r\n\t // set the dialog message\r\n\t builder.setMessage(message);\r\n\t\t\r\n\t // set positive button\r\n\t builder.setPositiveButton(positive, new DialogInterface.OnClickListener() {\r\n\t @Override\r\n\t public void onClick(DialogInterface dialog, int id) {\r\n\t \t\r\n\t \t// delete data from database if delete button clicked\r\n\t \tHomeActivity.dbPrograms.deleteData(ProgramID);\r\n\t \tToast.makeText(DetailProgramActivity.this, getString(R.string.success_delete), Toast.LENGTH_SHORT).show();\r\n\t \tgetSupportFragmentManager()\r\n\t\t\t\t.beginTransaction().\r\n\t\t\t\tremove(HomeActivity.programListFrag)\r\n\t\t\t\t.commit();\r\n\t \tfinish();\r\n\t }\r\n\t });\r\n\t \r\n\t // set negative button\r\n\t builder.setNegativeButton(negative, new DialogInterface.OnClickListener() {\r\n\t @Override\r\n\t public void onClick(DialogInterface dialog, int id) {\r\n\t \t// close dialog if cancel button clicked\r\n\t \tdialog.dismiss();\r\n\t }\r\n\t });\r\n\r\n\t // show dialog\r\n\t\tAlertDialog alert = builder.create();\r\n\t\talert.show();\r\n\t}",
"protected boolean afterDelete() {\n if (!DOCSTATUS_Drafted.equals(getDocStatus())) {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n } \n \n //C_AllocationLine\n String sql = \"DELETE FROM C_AllocationLine \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PaymentAllocate\n sql = \"DELETE FROM C_PaymentAllocate \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_VALORPAGO\n sql = \"DELETE FROM C_VALORPAGO \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTVALORES\n sql = \"DELETE FROM C_PAYMENTVALORES \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n //C_PAYMENTRET\n sql = \"DELETE FROM C_PAYMENTRET \"\n + \"WHERE c_payment_id = \"+getC_Payment_ID();\n \n DB.executeUpdate(sql, get_TrxName());\n \n return true;\n\n }",
"private void deleteButtonClicked(){\n\t\tif (theDialogClient != null) theDialogClient.dialogFinished(DialogClient.operation.DELETEING);\n\t\tdispose();\n\t}",
"private void showDeleteConfirmationDialog() {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the postivie and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the fruit.\n deleteFruit();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the fruit.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n\tpublic Integer delProject(ProjectInfo project) {\n\t\treturn sqlSession.update(\"cn.sep.samp2.project.delProject\", project);\n\t}",
"private void showDeleteDialog(String yesLabel, String noLabel, String messageText, final int parameterId){\n AlertDialog.Builder builder = new AlertDialog.Builder(new ContextThemeWrapper(this,R.style.AppTheme_Dialog));\n builder.setMessage(messageText)\n .setPositiveButton(yesLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n new DeleteAquariumTask(parameterId).execute();\n }\n })\n .setNegativeButton(noLabel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // Create the AlertDialog object and return it\n builder.create();\n builder.show();\n }",
"public String btn_confirm_delete_action()\n {\n //delete the accession\n getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().\n deleteSemental(\n getgermplasm$SementalSessionBean().getDeleteSemental());\n //refresh the list\n getgermplasm$SementalSessionBean().getPagination().deleteItem();\n getgermplasm$SementalSessionBean().getPagination().refreshList();\n getgermplasm$SemenGatheringSessionBean().setPagination(null);\n \n //show and hidde panels\n this.getMainPanel().setRendered(true);\n this.getAlertMessage().setRendered(false);\n MessageBean.setSuccessMessageFromBundle(\"delete_semental_success\", this.getMyLocale());\n \n return null;\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete products.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"protected boolean beforeDelete() {\n if (DOCSTATUS_Drafted.equals(getDocStatus())) {\n return true;\n } else {\n JOptionPane.showMessageDialog(null, \"El documento no se puede eliminar ya que no esta en Estado Borrador.\", \"Error\", JOptionPane.ERROR_MESSAGE);\n return false;\n }\n\n }",
"@Override\n public void onClick(View v) {\n builder.setMessage(\"Are you sure you want to delete this?\")\n .setTitle(\"Warning\");\n\n // Add the buttons\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked OK button\n Pokemon crtPokemon = database.PokemonDao().getEntries().get(index);\n database.PokemonDao().delete(crtPokemon);\n finish();\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User cancelled the dialog\n }\n });\n // 3. Get the AlertDialog from create()\n AlertDialog dialog = builder.create();\n dialog.show();\n\n }",
"public boolean delete() {\r\n \t\t// need to have a way to inform if delete did not happen\r\n \t\t// can't delete if there are dependencies...\r\n \t\tif ((this.argumentsAgainst.size() > 0)\r\n \t\t\t\t|| (this.argumentsFor.size() > 0)\r\n \t\t\t\t|| (this.relationships.size() > 0)\r\n \t\t\t\t|| (this.questions.size() > 0)\r\n \t\t\t\t|| (this.subDecisions.size() > 0)) {\r\n \t\t\tMessageDialog.openError(new Shell(), \"Delete Error\",\r\n \t\t\t\"Can't delete when there are sub-elements.\");\r\n \r\n \t\t\treturn true;\r\n \t\t}\r\n \r\n \t\tif (this.artifacts.size() > 0) {\r\n \t\t\tMessageDialog.openError(new Shell(), \"Delete Error\",\r\n \t\t\t\"Can't delete when code is associated!\");\r\n \t\t\treturn true;\r\n \t\t}\r\n \t\tRationaleDB db = RationaleDB.getHandle();\r\n \r\n \t\t// are there any dependencies on this item?\r\n \t\tif (db.getDependentAlternatives(this).size() > 0) {\r\n \t\t\tMessageDialog.openError(new Shell(), \"Delete Error\",\r\n \t\t\t\"Can't delete when there are depencencies.\");\r\n \t\t\treturn true;\r\n \t\t}\r\n \r\n \t\tm_eventGenerator.Destroyed();\r\n \r\n \t\tdb.deleteRationaleElement(this);\r\n \t\treturn false;\r\n \r\n \t}",
"@FXML private void handleAddProdDelete(ActionEvent event) {\n Part partDeleting = fxidAddProdSelectedParts.getSelectionModel().getSelectedItem();\n \n if (partDeleting != null) {\n //Display Confirm Box\n Alert confirmDelete = new Alert(Alert.AlertType.CONFIRMATION);\n confirmDelete.setHeaderText(\"Are you sure?\");\n confirmDelete.setContentText(\"Are you sure you want to remove the \" + partDeleting.getName() + \" part?\");\n Optional<ButtonType> result = confirmDelete.showAndWait();\n //If they click OK\n if (result.get() == ButtonType.OK) {\n //Delete the part.\n partToSave.remove(partDeleting);\n //Refresh the list view.\n fxidAddProdSelectedParts.setItems(partToSave);\n\n Alert successDelete = new Alert(Alert.AlertType.CONFIRMATION);\n successDelete.setHeaderText(\"Confirmation\");\n successDelete.setContentText(partDeleting.getName() + \" has been removed from product.\");\n successDelete.showAndWait();\n }\n } \n }",
"public void verifyGUIDeleteConfirmPopup() {\n try {\n String errorMessage = \"Can not test verify gui of delete confirm popup because ToDo list is empty \";\n boolean result = true;\n getLogger().info(\"Verify GUI Delete ToDo popup when click trash ToDo icon.\");\n boolean checkEmptyToDoListRow = checkListIsEmpty(eleToDoRowList);\n boolean checkEmptyToDoCompleteListRow = checkListIsEmpty(eleToDoCompleteRowList);\n // Check ToDo row list is empty\n if (checkEmptyToDoListRow && checkEmptyToDoCompleteListRow) {\n NXGReports.addStep(\"TestScript Failed: \" + errorMessage, LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n AbstractService.sStatusCnt++;\n return;\n }\n // Get id delete row\n String idRow = getIdRowDelete(checkEmptyToDoListRow, checkEmptyToDoCompleteListRow, eleToDoCheckboxRow, eleToDoCompleteCheckboxRow,\n eleToDoRowList, eleToDoCompleteRowList);\n //verify delete confirm icon\n clickElement(trashToDoBtnEle, \"Trash icon click\");\n //verify popup\n PopUpPage popUpPage = new PopUpPage(getLogger(), getDriver());\n result = popUpPage\n .verifyGUIPopUpDelete(categoryTitleEle, centerDeleteToDoDescriptionEle, cancelDeletedToDoButtonEle, deletedToDoButtonEle);\n if (!result) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n //verify close popup icon\n // Check row is delete out of list\n if (!checkEmptyToDoListRow) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoRowList, idRow);\n }\n if (!checkEmptyToDoCompleteListRow && result) {\n result = checkRowIsDeleteOutOfToDoList(eleToDoCompleteRowList, idRow);\n }\n Assert.assertFalse(result, \"Popup icon close does not work\");\n NXGReports.addStep(\"Close popup icon working correct\", LogAs.PASSED, null);\n } catch (AssertionError e) {\n AbstractService.sStatusCnt++;\n NXGReports.addStep(\"TestScript Failed: Verify gui of delete confirm popup in ToDo page\", LogAs.FAILED,\n new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n }\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deletePet();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the pet.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n public ActionButton createDeleteButton()\n {\n ActionButton button = super.createDeleteButton();\n if (button != null)\n {\n button.setScript(\"LABKEY.experiment.confirmDelete('\" + getSchema().getName() + \"', '\" + getQueryDef().getName() + \"', '\" + getSelectionKey() + \"', 'sample', 'samples')\");\n button.setRequiresSelection(true);\n }\n return button;\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttableObjects.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tableObjects.getItem(data);\r\n\t\t\t\t\t\t\t\tConfirmDialog.Factory df = new DefaultConfirmDialogFactory() {\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t\t\t\tpublic ConfirmDialog create(String caption, String message, String okCaption,\r\n\t\t\t\t\t\t\t\t\t\t\tString cancelCaption, String notOkCaption) {\r\n\r\n\t\t\t\t\t\t\t\t ConfirmDialog d = super.create(caption,message,okCaption, cancelCaption, notOkCaption\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t // Change the order of buttons\r\n\t\t\t\t\t\t\t\t Button ok = d.getOkButton();\r\n\t\t\t\t\t\t\t\t HorizontalLayout buttons = (HorizontalLayout) ok.getParent();\r\n\t\t\t\t\t\t\t\t buttons.removeComponent(ok);\r\n\t\t\t\t\t\t\t\t buttons.addComponent(ok,1);\r\n\t\t\t\t\t\t\t\t buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);\r\n\t\t\t\t\t\t\t\t return d;\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tConfirmDialog.setFactory(df);\t\t\r\n\t\t\t\t\t\t \tConfirmDialog.show(UI.getCurrent(), \"Delete Pack\", \"Are you sure delete all objects of this Pack ?\",\r\n\t\t\t\t\t\t \t \"Yes\", \"No\", new ConfirmDialog.Listener() {\r\n\r\n\t\t\t\t\t\t \t public void onClose(ConfirmDialog dialog) {\r\n\t\t\t\t\t\t \t if (dialog.isConfirmed()) {\r\n\r\n\t\t\t\t\t\t \t \t// Borramos el registro\r\n\t\t\t\t\t\t \t \ttry {\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tconexion = new Conexion();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tConnection con = conexion.getConnection();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tStatement statement = con.createStatement();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tObject rowId = tableObjects.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tInteger id = (Integer)tableObjects.getContainerProperty(rowId,\"IdObject\").getValue();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tString cadena = \"DELETE ObjectBYPacks WHERE IDpack =\" + String.valueOf(id); \r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.executeUpdate(cadena);\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tcon.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\ttableObjects.removeItem(rowId);\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\tnew Notification(\"Process OK\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t\"Object deleted\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.TRAY_NOTIFICATION, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t } catch (SQLException e) {\r\n\t\t\t\t\t\t \t \t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t \t \t\t \te.printStackTrace();\r\n\t\t\t\t\t\t \t \t\t \tnew Notification(\"Got an exception!\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\te.getMessage(),\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.ERROR_MESSAGE, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t \t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t}\r\n\t\t\t\t\t\t \t } \r\n\t\t\t\t\t\t \t }\r\n\t\t\t\t\t\t \t });\r\n\t\t\t\t\t\t\t\t}",
"private void showConfirmDeletionDialog(){\n //give builder our custom dialog fragment style\n new AlertDialog.Builder(this, R.style.dialogFragment_title_style)\n .setMessage(getString(R.string.powerlist_confirmRemoval))\n .setTitle(getString(R.string.powerList_confirmRemoval_title))\n .setPositiveButton(getString(R.string.action_remove),\n new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n myActionListener.userDeletingPowersFromList(\n PowerListActivity.this.adapter.getSelectedSpells());\n deleteButton.setVisibility(View.GONE);\n //tell adapter to switch selection mode off\n PowerListActivity.this.adapter.endSelectionMode();\n }\n })\n .setNegativeButton(getString(R.string.action_cancel), null)\n .show();\n }",
"public static Boolean confirmDeletion() {\n final AtomicReference<Boolean> reference = new AtomicReference<>(false);\n\n TopsoilNotification.showNotification(\n TopsoilNotification.NotificationType.VERIFICATION,\n \"Delete Table\",\n \"Do you really want to delete this table?\\n\"\n + \"This operation can not be undone.\"\n ).ifPresent(response -> {\n if (response == ButtonType.OK) {\n reference.set(true);\n }\n });\n\n return reference.get();\n }",
"private void delete(ActionEvent e){\r\n if (client != null){\r\n ConfirmBox.display(\"Confirm Deletion\", \"Are you sure you want to delete this entry?\");\r\n if (ConfirmBox.response){\r\n Client.deleteClient(client);\r\n AlertBox.display(\"Delete Client\", \"Client Deleted Successfully\");\r\n // Refresh view\r\n refresh();\r\n \r\n }\r\n }\r\n }",
"@Path (\"project/{repositoryId}/{groupId}/{projectId}\")\n @DELETE\n @Produces ({ MediaType.APPLICATION_JSON, MediaType.APPLICATION_XML, MediaType.TEXT_PLAIN })\n @RedbackAuthorization (noPermission = true)\n ActionStatus deleteProject( @PathParam (\"groupId\") String groupId, @PathParam (\"projectId\") String projectId,\n @PathParam (\"repositoryId\") String repositoryId )\n throws ArchivaRestServiceException;",
"public void deleteFile() {\n\t\tif (JOptionPane.showConfirmDialog(desktopPane,\n\t\t\t\t\"Are you sure? this action is permanent!\") != JOptionPane.YES_OPTION)\n\t\t\treturn;\n\n\t\tEllowFile file = null;\n\t\tTreePath paths[] = getSelectionModel().getSelectionPaths();\n\t\tif (paths == null)\n\t\t\treturn;\n\t\tfor (TreePath path : paths) {\n\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) path\n\t\t\t\t\t.getLastPathComponent();\n\t\t\tfile = (EllowFile) node.getUserObject();\n\t\t\tEllowynProject project = file.parentProject;\n\t\t\tfile.deleteAll();\n\t\t\tif (!file.isProjectFile && project != null)\n\t\t\t\tproject.rebuild(); // don't rebuild the project if the project\n\t\t\t\t\t\t\t\t\t// itself is deleted\n\t\t\tdesktopPane.closeFrames(file);\n\t\t\tmodel.removeNodeFromParent(node);\n\t\t}\n\t}",
"private void showConfirmationDeleteDialog(\n DialogInterface.OnClickListener yesButtonClickListener) {\n // Create an AlertDialog.Builder and set the message, and click listeners\n // for the positive and negative buttons on the dialog.\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.are_you_sure);\n builder.setPositiveButton(R.string.yes, yesButtonClickListener);\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Keep editing\" button, so dismiss the dialog\n // and continue editing the Item.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public boolean delete()\r\n\t{\n\t\tif ((this.argumentsAgainst.size() > 0) ||\r\n\t\t\t\t(this.argumentsFor.size() > 0) ||\r\n\t\t\t\t(this.relationships.size() > 0) ||\r\n\t\t\t\t(this.questions.size() > 0) ||\r\n\t\t\t\t(this.subDecisions.size() > 0))\r\n\t\t{\r\n\t\t\tMessageDialog.openError(new Shell(),\t\"Delete Error\",\t\"Can't delete when there are sub-elements.\");\r\n\t\t\t\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tRationaleDB db = RationaleDB.getHandle();\r\n\t\t\r\n//\t\t//are there any dependencies on this item?\r\n//\t\tif (db.getDependentAlternatives(this).size() > 0)\r\n//\t\t{\r\n//\t\t\tMessageDialog.openError(new Shell(),\t\"Delete Error\",\t\"Can't delete when there are depencencies.\");\r\n//\t\t\treturn true;\r\n//\t\t}\r\n\t\t\r\n\t\tm_eventGenerator.Destroyed();\r\n\t\t\r\n\t\tdb.deleteRationaleElement(this);\r\n\t\treturn false;\r\n\t\t\r\n\t}",
"private void addConfirmDialog() {\n builder = UIUtil.getConfirmDialog(getContext(),\"You are about to delete data for this payment. proceed ?\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n boolean isDeleted = mydb.deletePayment(paymentId);\n if(isDeleted) {\n Bundle bundle = new Bundle();\n bundle.putString(\"orderId\", String.valueOf(orderId));\n FragmentViewPayments mfragment = new FragmentViewPayments();\n UIUtil.refreshFragment(mfragment,bundle, getFragmentManager());\n } else {\n Toast.makeText(getContext(),\"Error deleting data!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }",
"private void toDelete() {\n if(toCount()==0)\n {\n JOptionPane.showMessageDialog(rootPane,\"No paint detail has been currently added\");\n }\n else\n {\n String[] choices={\"Delete First Row\",\"Delete Last Row\",\"Delete With Index\"};\n int option=JOptionPane.showOptionDialog(rootPane, \"How would you like to delete data?\", \"Delete Data\", WIDTH, HEIGHT,null , choices, NORMAL);\n if(option==0)\n {\n jtModel.removeRow(toCount()-toCount());\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted first row\");\n }\n else if(option==1)\n {\n jtModel.removeRow(toCount()-1);\n JOptionPane.showMessageDialog(rootPane,\"Successfully deleted last row\");\n }\n else if(option==2)\n {\n toDeletIndex();\n }\n else\n {\n \n }\n }\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_all_products_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteAllProducts();\n }\n });\n builder.setNegativeButton(R.string.cancel, null);\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public boolean deleteClicked() {\n AsyncTaskDelete databaseDeletion = new AsyncTaskDelete();\n databaseDeletion.execute((int) Id);\n finish();\n return true;\n }",
"public void deleteProject(int projectId)\n throws InexistentProjectException, SQLException, NoSignedInUserException,\n InexistentDatabaseEntityException, UnauthorisedOperationException {\n User currentUser = getMandatoryCurrentUser();\n Project project = getMandatoryProject(projectId);\n guaranteeUserIsSupervisor(\n currentUser, project, \"delete project\", \"they are not the \" + \"supervisor\");\n commentRepository.deleteAllCommentsOfProject(projectId);\n projectRepository.deleteProject(projectId);\n support.firePropertyChange(\n ProjectChangeablePropertyName.DELETE_PROJECT.toString(), OLD_VALUE, NEW_VALUE);\n }",
"private void doExcluir() {\n ClearMsgsEvent.fire(this);\n if (Window.confirm(\"Tem certeza que deseja excluir o contato \" + contato.getNome() + \"?\")) {\n dispatcher\n .execute(new ExcluirContatoAction(contato), new AsyncCallback<ExcluirContatoResult>() {\n @Override\n public void onFailure(Throwable caught) {\n ShowMsgEvent\n .fire(CadastroContatoPresenter.this, \"Erro: \" + caught.getLocalizedMessage(),\n AlertType.ERROR);\n }\n\n @Override\n public void onSuccess(ExcluirContatoResult result) {\n if (result.isOk()) {\n doNovo();\n AtualizarListaDeContatosEvent.fire(CadastroContatoPresenter.this);\n }\n for (String msg : result.getMensagens()) {\n ShowMsgEvent.fire(CadastroContatoPresenter.this, msg,\n result.isOk() ? AlertType.SUCCESS : AlertType.ERROR);\n }\n }\n });\n }\n }",
"private void delete() {\n AltDatabase.getInstance().getAlts().remove(getCurrentAsEditable());\n if (selectedAccountIndex > 0)\n selectedAccountIndex--;\n updateQueried();\n updateButtons();\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n }\n\n\n switch (item.getItemId()) {\n case R.id.delete_all_:\n mProjectViewmodel.deleteAll();\n Toast.makeText(this, \"All projects deleted\", Toast.LENGTH_SHORT).show();\n\n default:\n return super.onOptionsItemSelected(item);\n\n }\n }",
"@Override\n public void actionPerformed(ActionEvent e) {\n String[] buttons = { \"Yes\", \"No\" };\n int returnValue = JOptionPane.showOptionDialog(frame, \"Are you sure you want to delete this user?\", \"Confirm Deletion\",\n JOptionPane.WARNING_MESSAGE, 0, null, buttons, buttons[1]);\n\n if (returnValue == 0) {\n Billboard billboard = billboardList.get(billboardJList.getSelectedIndex());\n\n Request deleteBillboard = Request.deleteBillboardReq(billboard.getBillboardName(), connector.session);\n\n Response response;\n\n try {\n response = deleteBillboard.Send(connector);\n } catch (IOException excep) {\n JOptionPane.showMessageDialog(null, \"Cannot delete billboard\");\n return;\n }\n\n // check status of response\n boolean status = response.isStatus();\n\n if (!status) {\n String errorMsg = (String) response.getData();\n JOptionPane.showMessageDialog(null, \"Cannot delete billboard. Error: \" + errorMsg);\n }\n\n if (status) {\n billboardList.remove(billboard);\n model.removeElement(billboard.getBillboardName());\n billboardJList.setModel(model);\n JOptionPane.showMessageDialog(null, \"Billboard successfully deleted.\");\n }\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == R.id.deleteEntrenador) {\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(this);\n // set title\n //String alert_title = getResources().getString(\"Confirmación\");\n String alert_title = (getResources().getString(R.string.confirmation));\n String alert_description = (getResources().getString(R.string.areYouSure));\n alertDialogBuilder.setTitle(alert_title);\n\n // set dialog message\n alertDialogBuilder\n .setMessage(alert_description)\n .setCancelable(false)\n .setPositiveButton(getResources().getString(R.string.yes),new DialogInterface.OnClickListener() {\n // Lo que sucede si se pulsa yes\n public void onClick(DialogInterface dialog,int id) {\n\n try {\n Client myUserClient = null;\n do {\n myUserClient = ClientsFromEntrenadorSuperAdmin.this.searchEntrenador(selectedEntrenador.getObjectId());\n if (myUserClient != null) {\n HashMap<String, Object> params = new HashMap<String, Object>();\n params.put(\"entrenadorId\", selectedEntrenador.getObjectId());\n ParseCloud.callFunction(\"deleteEntrenadorDependencies\", params);\n }\n }while(myUserClient != null);\n\n HashMap<String, Object> params = new HashMap<String, Object>();\n params.put(\"entrenadorId\", selectedEntrenador.getObjectId());\n ParseCloud.callFunction(\"deleteEntrenador\", params);\n\n } catch (ParseException e) {\n e.printStackTrace();\n } catch (java.text.ParseException e) {\n e.printStackTrace();\n }\n Intent i = new Intent(getApplicationContext(), SuperAdminDashboard.class);\n startActivity(i);\n finish();\n }\n\n\n })\n .setNegativeButton(getResources().getString(R.string.no),new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,int id) {\n // Si se pulsa no no hace nada\n dialog.cancel();\n }\n });\n\n // create alert dialog\n AlertDialog alertDialog = alertDialogBuilder.create();\n\n // show it\n alertDialog.show();\n }\n\n return super.onOptionsItemSelected(item);\n }",
"private void deleteComic() {\n AlertDialog.Builder builder = new AlertDialog.Builder(getContext());\n builder.setTitle(\"Delete Comic?\");\n builder.setMessage(\"Are you sure you want to delete this comic? This cannot be undone\");\n builder.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(dbHandler.deleteComic(comic.getComicID())) {\n //Success\n Toast.makeText(getContext(), \"Comic successfully deleted\", Toast.LENGTH_SHORT).show();\n mainActivity.loadViewCollectionFragment();\n } else {\n //Failure\n Toast.makeText(getContext(), \"Comic not deleted successfully. Please try again\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n builder.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n //Nothing needs to happen here\n }\n });\n builder.create().show();\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the pet.\n deleteBook();\n finish();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"private void deleteExec(){\r\n\t\tList<HashMap<String,String>> selectedDatas=ViewUtil.getSelectedData(jTable1);\r\n\t\tif(selectedDatas.size()<1){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Please select at least 1 item to delete\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint options = 1;\r\n\t\tif(selectedDatas.size() ==1 ){\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete this Item ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}else{\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete these \"+selectedDatas.size()+\" Items ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}\r\n\t\tif(options==1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(HashMap<String,String> map:selectedDatas){\r\n\t\t\t\r\n\t\t\tdiscountService.deleteDiscountByMap(NameConverter.convertViewMap2PhysicMap(map, \"Discount\"));\r\n\t\t}\r\n\t\tthis.initDatas();\r\n\t}",
"@RequestMapping(value = \"/project/{id}\", method = RequestMethod.DELETE)\n\tpublic Response deleteProject(@PathVariable Integer id) {\n\t\tResponse response = new Response();\n\t\ttry {\n\t\t\tBoolean isDelete = projectService.removeProjectData(id);\n\t\t\tif (isDelete) {\n\t\t\t\tresponse.setCode(CustomResponse.SUCCESS.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.SUCCESS.getMessage());\n\t\t\t} else {\n\t\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tresponse.setCode(CustomResponse.ERROR.getCode());\n\t\t\tresponse.setMessage(CustomResponse.ERROR.getMessage());\n\t\t\tlogger.error(\"error while project delete \", e);\n\t\t}\n\t\treturn response;\n\t}",
"public void deleteSelection() {\n deleteFurniture(Home.getFurnitureSubList(this.home.getSelectedItems())); \n }",
"@FXML\r\n void onActionDeletePart(ActionEvent event) {\r\n\r\n Part part = TableView2.getSelectionModel().getSelectedItem();\r\n if(part == null)\r\n return;\r\n\r\n //EXCEPTION SET 2 REQUIREMENT\r\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION);\r\n alert.setHeaderText(\"You are about to delete the product you have selected!\");\r\n alert.setContentText(\"Are you sure you wish to continue?\");\r\n\r\n Optional<ButtonType> result = alert.showAndWait();\r\n if (result.get() == ButtonType.OK){\r\n product.deleteAssociatedPart(part.getId());\r\n }\r\n }",
"@RequestMapping(value=\"/deleteproject/{id}\", method = RequestMethod.GET)\n\tpublic ModelAndView deleteProject(@PathVariable(\"id\") String projectId) {\n\n\t\tdreamHomeService.deleteProject(Integer.parseInt(projectId));\n\t\t//model.addObject(\"successMessage\",\"Project deleted successfully\");\n\t\treturn new ModelAndView(\"redirect:/project/homepage\");\n\n\t}",
"int deleteByExample(UserOperateProjectExample example);",
"private boolean actionDelete()\n {\n Debug.enter();\n onDeleteListener.onDelete();\n dismiss();\n Debug.leave();\n return true;\n }",
"@FXML\n private void handleDeletePerson() {\n //remove the client from the view\n int selectedIndex = informationsClients.getSelectionModel().getSelectedIndex();\n if (selectedIndex >= 0) {\n //remove the client from the database\n ClientManager cManager = new ClientManager();\n cManager.deleteClient(informationsClients.getSelectionModel().getSelectedItem().getId());\n informationsClients.getItems().remove(selectedIndex);\n } else {\n // Nothing selected.\n Alert alert = new Alert(AlertType.WARNING);\n alert.initOwner(mainApp.getPrimaryStage());\n alert.setTitle(\"Erreur : Pas de selection\");\n alert.setHeaderText(\"Aucun client n'a été selectionné\");\n alert.setContentText(\"Veuillez selectionnez un client.\");\n alert.showAndWait();\n }\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void buttonClick(ClickEvent event) {\n\t\t\t\t\t\t\t\tObject data = event.getButton().getData();\r\n\t\t\t\t\t\t\t\ttablePacks.select(data);\r\n\t\t\t\t\t\t\t\tItem itemClickEvent = tablePacks.getItem(data);\r\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\tConfirmDialog.Factory df = new DefaultConfirmDialogFactory() {\r\n\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t\t @Override\r\n\t\t\t\t\t\t\t\t\tpublic ConfirmDialog create(String caption, String message, String okCaption,\r\n\t\t\t\t\t\t\t\t\t\t\tString cancelCaption, String notOkCaption) {\r\n\r\n\t\t\t\t\t\t\t\t ConfirmDialog d = super.create(caption,message,okCaption, cancelCaption, notOkCaption\r\n\t\t\t\t\t\t\t\t );\r\n\t\t\t\t\t\t\t\t // Change the order of buttons\r\n\t\t\t\t\t\t\t\t Button ok = d.getOkButton();\r\n\t\t\t\t\t\t\t\t HorizontalLayout buttons = (HorizontalLayout) ok.getParent();\r\n\t\t\t\t\t\t\t\t buttons.removeComponent(ok);\r\n\t\t\t\t\t\t\t\t buttons.addComponent(ok,1);\r\n\t\t\t\t\t\t\t\t buttons.setComponentAlignment(ok, Alignment.MIDDLE_RIGHT);\r\n\t\t\t\t\t\t\t\t return d;\r\n\t\t\t\t\t\t\t\t }\r\n\r\n\t\t\t\t\t\t\t\t};\r\n\t\t\t\t\t\t\t\tConfirmDialog.setFactory(df);\t\t\r\n\t\t\t\t\t\t \tConfirmDialog.show(UI.getCurrent(), \"Delete Objects by Pack\", \"Are you sure delete objects of this pack ?\",\r\n\t\t\t\t\t\t \t \"Yes\", \"No\", new ConfirmDialog.Listener() {\r\n\r\n\t\t\t\t\t\t \t public void onClose(ConfirmDialog dialog) {\r\n\t\t\t\t\t\t \t if (dialog.isConfirmed()) {\r\n\r\n\t\t\t\t\t\t \t \t// Borramos el registro\r\n\t\t\t\t\t\t \t \ttry {\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tconexion = new Conexion();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tConnection con = conexion.getConnection();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tStatement statement = con.createStatement();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tObject rowId = tablePacks.getValue(); // get the selected rows id\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tInteger id = (Integer)tablePacks.getContainerProperty(rowId,\"IdPack\").getValue();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tString cadena = \"DELETE ObjectbyPacks WHERE idpack =\" + String.valueOf(id); \r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.executeUpdate(cadena);\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tstatement.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\tcon.close();\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\ttablePacks.removeItem(rowId);\r\n\r\n\t\t\t\t\t\t \t \t\t\t\t\tnew Notification(\"Process OK\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t\"Objects by Pack deleted\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.TRAY_NOTIFICATION, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t } catch (SQLException e) {\r\n\t\t\t\t\t\t \t \t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\t \t \t\t \te.printStackTrace();\r\n\t\t\t\t\t\t \t \t\t \tnew Notification(\"Got an exception!\",\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\te.getMessage(),\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\tNotification.Type.ERROR_MESSAGE, true)\r\n\t\t\t\t\t\t \t \t\t\t\t\t\t\t.show(Page.getCurrent());\r\n\t\t\t\t\t\t \t \t\t \t\r\n\t\t\t\t\t\t \t \t\t\t\t\t\r\n\t\t\t\t\t\t \t \t\t\t\t}\r\n\t\t\t\t\t\t \t } \r\n\t\t\t\t\t\t \t }\r\n\t\t\t\t\t\t \t });\r\n\r\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void deleteSelected() {\n\n\t}",
"@FXML\n private void deleteCategory()\n {\n CategoryFxModel selectedCategory = categoryTable.getSelectionModel().getSelectedItem();\n if(selectedCategory == null)\n {\n DialogsUtils.categoryNotSelectedDialog();\n }\n else\n {\n Optional<ButtonType> result = DialogsUtils.deleteCategoryConfirmationDialog();\n deleteCategoryWhenOkPressed(selectedCategory, result);\n }\n }",
"public void showDeleteConfirmationAlertDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n //builder.setTitle(\"AlertDialog\");\n builder.setMessage(R.string.income_deletion_confirmation);\n\n // add the buttons\n builder.setPositiveButton(R.string.yes, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n if (mIncome.getReceiptPic() != null) {\n if (!mIncome.getReceiptPic().equals(\"\")) {\n new File(mIncome.getReceiptPic()).delete();\n }\n }\n mDatabaseHandler.setPaymentLogEntryInactive(mIncome);\n //IncomeListFragment.incomeListAdapterNeedsRefreshed = true;\n setResult(MainActivity.RESULT_DATA_WAS_MODIFIED);\n IncomeViewActivity.this.finish();\n }\n });\n builder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n }\n });\n\n // create and show the alert mDialog\n mDialog = builder.create();\n mDialog.show();\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setMessage(R.string.delete_dialog_msg);\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the product.\n deleteProduct();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the product.\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tint subjectDatabaseID = subjectEntries.getSubjectAtListPosition(subjectSpinner.getSelectedItemPosition()).getDatabaseID();\n\t\t\t\t\n\t\t\t\tdeleteSelection(\n\t\t\t\t\t\twhatSpinner.getSelectedItemPosition(),\n\t\t\t\t\t\tsubjectDatabaseID,\n\t\t\t\t\t\twhenSpinner.getSelectedItemPosition());\n\t\t\t\tdialog.dismiss();\n\t\t\t}",
"@FXML\n\tprivate void handleDelete() {\n\t\tAlert alert = new Alert(Alert.AlertType.WARNING);\n\t\talert.getButtonTypes().clear();\n\t\talert.getButtonTypes().addAll(ButtonType.YES, ButtonType.NO);\n\t\talert.setHeaderText(lang.getString(\"deleteCustomerMessage\"));\n\t\talert.initOwner(stage);\n\t\talert.showAndWait()\n\t\t.filter(answer -> answer == ButtonType.YES)\n\t\t.ifPresent(answer -> {\n\t\t\tCustomer customer = customerTable.getSelectionModel().getSelectedItem();\n\t\t\tdeleteCustomer(customer);\n\t\t});\n\t}",
"private void confirmDeleteLog() {\n new AlertDialog.Builder(this)\n .setTitle(R.string.confirm_delete_log_title)\n .setMessage(R.string.confirm_delete_log_message)\n .setPositiveButton(R.string.btn_delete_log, (dialog, which) -> {\n service.deleteEntireAuditLog();\n dialog.dismiss();\n })\n .setNegativeButton(R.string.btn_cancel, (dialog, which) -> dialog.dismiss())\n .show();\n }",
"@FXML void onActionModifyProductRemovePart(ActionEvent event) {\n Part selectedPart = associatedPartTableView.getSelectionModel().getSelectedItem();\n Alert alert = new Alert(Alert.AlertType.CONFIRMATION, \"Do you want to delete this part?\");\n Optional<ButtonType> result = alert.showAndWait();\n if(result.isPresent() && result.get() == ButtonType.OK) {\n tmpAssociatedParts.remove(selectedPart);\n }\n }",
"@Override\n\tpublic Boolean DeleteProductProjectWithSuite(List<Integer> ids) {\n\t\treturn productProjectWithSuiteDAO.DeleteProductProjectWithSuite(ids);\n\t}",
"@Override\r\n public void confirmClicked(boolean result, int id) {\r\n if (result == true) {\r\n deleteSelectedWaypoints();\r\n }\r\n\r\n // reset the current gui screen to be ourselves now that we are done\r\n // with the GuiYesNo dialog\r\n this.mc.displayGuiScreen(this);\r\n }",
"private void showDeleteConfirmationDialog() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n\n // Set the message.\n builder.setMessage(R.string.delete_dialog_msg);\n\n // Handle the button clicks.\n builder.setPositiveButton(R.string.delete, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Delete\" button, so delete the book.\n deleteBook();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n // User clicked the \"Cancel\" button, so dismiss the dialog\n // and continue editing the book\n if (dialog != null) {\n dialog.dismiss();\n }\n }\n });\n\n // Create and show the AlertDialog\n AlertDialog alertDialog = builder.create();\n alertDialog.show();\n }",
"public static void deleteAndRevert(IProject[] projects)\n throws CoreException {\n if (projects != null) {\n for (IProject project : projects) {\n if (project != null) {\n RevertAction revertAction = new RevertAction();\n revertAction.setAsync(false);\n revertAction.selectionChanged(null,\n new StructuredSelection(project));\n revertAction.runAction(false);\n\n if (project != null && project.exists()) {\n project.refreshLocal(IResource.DEPTH_INFINITE, null);\n project.accept(new IResourceVisitor() {\n\n public boolean visit(IResource resource)\n throws CoreException {\n ResourceAttributes attrs = resource\n .getResourceAttributes();\n if (attrs != null) {\n attrs.setReadOnly(false);\n try {\n resource.setResourceAttributes(attrs);\n } catch (CoreException e) {\n }\n }\n return true;\n }\n });\n project.delete(true, true, null);\n }\n }\n }\n }\n }",
"public boolean deleteProject(Project project, boolean isUndoOrRedo) throws StorageException {\n\t\ttry {\n\t\t\tcontentResolver.delete(LocalStorageContentProvider.PROJECT_URI, \"_id =\\\"\" + project.get_Id() + \"\\\"\", null);\n\t\t} catch (Exception e) {\n\t\t\tthrow new StorageException();\n\t\t}\n\t\tif (!isUndoOrRedo) {\n\t\t\tthis.getProjectDeletedList().add(project);\n\t\t}\n\t\treturn true;\n\t}"
]
| [
"0.7443273",
"0.70665586",
"0.69377214",
"0.6698134",
"0.664316",
"0.66228086",
"0.64677984",
"0.63851446",
"0.6319353",
"0.6301522",
"0.62407106",
"0.6223951",
"0.6187936",
"0.6176771",
"0.6153872",
"0.61461514",
"0.6119932",
"0.6003282",
"0.59856504",
"0.59581655",
"0.59466803",
"0.59282184",
"0.5915868",
"0.5896294",
"0.58960676",
"0.5884956",
"0.5881065",
"0.587615",
"0.5875503",
"0.5865352",
"0.58631283",
"0.5862381",
"0.58595544",
"0.58435816",
"0.582829",
"0.58225083",
"0.5793623",
"0.57928836",
"0.5781404",
"0.57601726",
"0.57594335",
"0.5758751",
"0.5755915",
"0.5753871",
"0.57513577",
"0.5749884",
"0.5748725",
"0.57305175",
"0.57164216",
"0.5711543",
"0.57003254",
"0.5695422",
"0.56872046",
"0.568311",
"0.56784546",
"0.56771445",
"0.5676907",
"0.56759846",
"0.5658854",
"0.56460255",
"0.564451",
"0.56399226",
"0.56379765",
"0.56281286",
"0.5619175",
"0.561268",
"0.56117606",
"0.5600038",
"0.559813",
"0.5597083",
"0.558688",
"0.5586187",
"0.5583731",
"0.5577638",
"0.5577253",
"0.557513",
"0.5573021",
"0.55708665",
"0.5566883",
"0.5558831",
"0.5550907",
"0.55474",
"0.55455506",
"0.5545543",
"0.5543486",
"0.55340755",
"0.55324405",
"0.55293256",
"0.55281353",
"0.5524182",
"0.55135864",
"0.5511163",
"0.55111396",
"0.55047035",
"0.55003756",
"0.54980093",
"0.54961145",
"0.5491597",
"0.5491557",
"0.54849344",
"0.54835224"
]
| 0.0 | -1 |
Returns a bitmask containing the types of resources in the selection. | private int getSelectedResourceTypes(IResource[] resources) {
int types = 0;
for (IResource resource : resources) {
types |= resource.getType();
}
return types;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public final ArrayList<Class<? extends IResource>> getSelectableResourceTypes() {\n\treturn mSelectableResourceTypes;\n}",
"List<ResourceType> resourceTypes();",
"public List getResourceTypes(ResourceType resourceType);",
"public List<String> getResourceTypes(){\n\t\treturn jtemp.queryForList(\"SELECT resource_type_id||' '||resource_type_name FROM resource_type\", String.class);\n\t}",
"public List<ResourceBase> listTypes() throws ResourceException;",
"public Set<ResourceType> getAllResourceTypes() {\n parseExternalResources();\n Set<ResourceType> resourceTypes = new HashSet<ResourceType>();\n for (DatacollectionGroup group : externalGroupsMap.values()) {\n for (ResourceType rt : group.getResourceTypeCollection()) {\n if (!contains(resourceTypes, rt))\n resourceTypes.add(rt);\n }\n }\n return resourceTypes;\n }",
"public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypes()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType>(it, true);\r\n }",
"public List<Class<? extends Resource>> getAvailableTypes(OgemaLocale locale);",
"public static Collection<CheckNameResourceTypes> values() {\n return values(CheckNameResourceTypes.class);\n }",
"public List getResourceTypesByIdList(final Map idList);",
"List<CmdType> getSupportedTypes();",
"@objid (\"be13c135-d5bf-4f14-9794-2c2fbdc9e900\")\n <T extends ResourceType> List<T> getDefinedResourceType(java.lang.Class<T> filterClass);",
"@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }",
"public List<SecTyp> getAllTypes();",
"Collection<? extends Integer> getHasRestraintType();",
"@objid (\"5292c322-23d0-4a99-9d8c-234433b5b53c\")\n EList<ResourceType> getDefinedResourceType();",
"public synchronized static Set<String> getAvailableTypes() {\n populateCache();\n return Collections.unmodifiableSet(cache.keySet());\n }",
"String [] getSupportedTypes();",
"public List<Resource> getAvailableResources();",
"public IResourceType getType();",
"public static Map<String, List<?>> getResourcesPerType(SearchResponse resp) {\n\n\t\tMap<String, List<ObjectId>> idsOfEachType = new HashMap<String, List<ObjectId>>();\n\t\tresp.getHits().forEach( (h) -> {\n\t\t\tif(!idsOfEachType.containsKey(h.getType())) {\n\t\t\t\tidsOfEachType.put(h.getType(), new ArrayList<ObjectId>() {{ add(new ObjectId(h.getId())); }});\n\t\t\t} else {\n\t\t\t\tidsOfEachType.get(h.getType()).add(new ObjectId(h.getId()));\n\t\t\t}\n\t\t});\n\n\t\tMap<String, List<?>> resourcesPerType = new HashMap<String, List<?>>();\n\n\t\tfor(Entry<String, List<ObjectId>> e: idsOfEachType.entrySet()) {\n\t\t\tresourcesPerType.put(e.getKey() , DB.getRecordResourceDAO().getByIds(e.getValue()));\n\n\t\t}\n\n\t\treturn resourcesPerType;\n\t}",
"ImmutableList<SchemaOrgType> getLearningResourceTypeList();",
"public String getLBR_CollectionRegType();",
"Set<String> getBaseTypes();",
"@NotNull\n private Set<String> getAllResourceTypes(@NotNull final ResourceResolver resourceResolver) {\n Set<String> allResourceTypes = new LinkedHashSet<>(resourceTypeSet);\n if (inherited) {\n for (String resourceType : resourceTypeSet) {\n allResourceTypes.addAll(Utils.getSuperTypes(resourceType, resourceResolver));\n }\n }\n return allResourceTypes;\n }",
"int getResourcePatternsCount();",
"public ResultFormat[] getTypes() {\n\n if (types == null) {\n types = loadFormats();\n }\n return types.clone();\n }",
"public LegalValueSet getAllocationFormatChoices() {\n return BigrGbossData.getValueSetAsLegalValueSet(ArtsConstants.VALUE_SET_ALLOCATION_FORMAT);\n }",
"Map<ParameterInstance, SetType> getInstanceSetTypes();",
"private Map<String, PermissionType> getPermissionTypeMapForLabelToMaskChange() {\n\t\tMap<String, PermissionType> permissionTypeMap = new LinkedHashMap<String, PermissionType>();\n\n\t\tList<PermissionType> permissionTypes = permissionTypeRepo.findAll();\n\t\tfor (int i = 0; i < permissionTypes.size(); i++) {\n\t\t\tpermissionTypeMap.put(permissionTypes.get(i).getName(), permissionTypes.get(i));\n\t\t}\n\t\treturn permissionTypeMap;\n\t}",
"public int getResources(Type type) {\n \t\treturn resources[type.ordinal()];\n \t}",
"public List<PrimaryType> getResources() {\n return resources;\n }",
"public static synchronized Set getDescriptorClasses() {\n\tHashSet set = new HashSet();\n\n for (Enumeration e = registryModes.elements(); e.hasMoreElements();) {\n RegistryMode mode = (RegistryMode)e.nextElement();\n\n\t set.add(mode.descriptorClass);\n\t}\n\n\treturn set;\n }",
"public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypes(org.semanticwb.model.SWBModel model)\r\n {\r\n java.util.Iterator it=model.getSemanticObject().getModel().listInstancesOfClass(sclass);\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType>(it, true);\r\n }",
"long getCategoryBits();",
"public Set<MediaType> getSupportedMediaTypes();",
"public Set<String> getAvailableTypes() {\n return ApiSpecificationFactory.getTypes();\n }",
"@Override\n\tpublic List<PermitType> GetAllPermitTypes() {\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\t\tint count=1;\n\t\ttry {\n\t\t\tconnection = dataSource.getConnection();\n\t\t\tpreparedStatement = connection\n\t\t\t\t\t.prepareStatement(Queryconstants.getPermitTypes);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\t\t\tList<PermitType> permittypes = new ArrayList<PermitType>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\tPermitType permitType=new PermitType();\n\n\t\t\t\tpermitType.permitTypeId=resultSet.getInt(\"ID\");\n\t\t\t\tpermitType.permitTypeCode=resultSet.getString(\"permit_type_Code\");\n\t\t\t\tpermitType.permitTypeName=resultSet.getString(\"permit_type_Name\");\n\t\t\t\tpermitType.permitType=resultSet.getString(\"permit_type_code\");\n\t\t\t\tpermitType.permitFee=resultSet.getDouble(\"permit_fee\");\n\t\t\t\tpermitType.active=resultSet.getBoolean(\"active\");\n\t\t\t\tpermitType.respCode=200;\n\t\t\t\tpermitType.count=count;\n\t\t\t\tpermittypes.add(permitType);\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\treturn permittypes;\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tDBOperations.DisposeSql(connection, preparedStatement, resultSet);\n\t\t}\n\t}",
"UsedTypes getTypes();",
"public int[] getTypes(){\n int[] types={TYPE_STRING,TYPE_STRING,TYPE_STRING,TYPE_INT};\n return types;\n }",
"private Set<Glyph> retrieveFlags ()\r\n {\r\n Set<Glyph> foundFlags = new HashSet<>();\r\n\r\n for (Glyph glyph : getSystem().getInfo().getGlyphs()) {\r\n Shape shape = glyph.getShape();\r\n\r\n if (ShapeSet.Flags.contains(shape)) {\r\n if (glyph.getTranslations().contains(this)) {\r\n foundFlags.add(glyph);\r\n }\r\n }\r\n }\r\n\r\n return foundFlags;\r\n }",
"synchronized public Map<String, Set<String>> getTypes() {\n return Collections.unmodifiableMap(\n new HashSet<>(types.entrySet()).stream()\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> Collections.unmodifiableSet(new HashSet<>(e.getValue()))\n ))\n );\n }",
"public static IResource[] getResources(ISelection selection) {\r\n \t\t\r\n \t\tList tmp= new ArrayList();\r\n \r\n \t\tif (selection instanceof IStructuredSelection) {\r\n \t\t\r\n \t\t\tObject[] s= ((IStructuredSelection)selection).toArray();\r\n \t\t\t\t\r\n \t\t\tfor (int i= 0; i < s.length; i++) {\r\n \t\t\t\tObject o= s[i];\r\n \t\t\t\tif (o instanceof IResource) {\r\n \t\t\t\t\ttmp.add(o);\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t\tif (o instanceof IAdaptable) {\r\n \t\t\t\t\tIAdaptable a= (IAdaptable) o;\r\n \t\t\t\t\tObject adapter= a.getAdapter(IResource.class);\r\n \t\t\t\t\tif (adapter instanceof IResource)\r\n \t\t\t\t\t\ttmp.add(adapter);\r\n \t\t\t\t\tcontinue;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t\treturn (IResource[]) tmp.toArray(new IResource[tmp.size()]);\r\n \t}",
"EnumSet<ViewExecutionFlags> getFlags();",
"@Nonnull\n @Override\n public Set<ResourceType> list() {\n return getTables().stream()\n .map(Table::name)\n .map(String::toLowerCase)\n .map(LOWER_CASE_RESOURCE_NAMES::get)\n .filter(Objects::nonNull)\n .collect(Collectors.toSet());\n }",
"public List<Preference<MediaType>> getAcceptedMediaTypes() {\n // Lazy initialization with double-check.\n List<Preference<MediaType>> a = this.acceptedMediaTypes;\n if (a == null) {\n synchronized (this) {\n a = this.acceptedMediaTypes;\n if (a == null) {\n this.acceptedMediaTypes = a = new ArrayList<Preference<MediaType>>();\n }\n }\n }\n return a;\n }",
"public Set getResources() {\n/* 92 */ return Collections.unmodifiableSet(this.resources);\n/* */ }",
"boolean isApplicableForAllAssetTypes();",
"Collection<? extends Resource> getResources();",
"public List<Resource> findByType(ResourceType type) {\n\t\tMap<String, Object> typeFilter = new HashMap<>(1);\n\n\t\ttypeFilter.put(\"type\", new ValueParameter(type));\n\n\t\treturn this.filter(typeFilter);\n\t}",
"public Set getTypeSet()\n {\n Set set = new HashSet();\n\n Iterator it = attTypeList.keySet().iterator();\n while (it.hasNext())\n {\n // Get key\n Object attrName = it.next();\n Object type = attTypeList.get(attrName);\n set.add(type);\n }\n return set;\n }",
"boolean hasResourceType();",
"java.util.List<java.lang.String>\n getResourcePatternsList();",
"List<Type> getAllTypeList();",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();",
"@Override\r\n\tpublic Vector<Integer> getTypes() {\n\t\treturn this.types;\r\n\t}",
"public Type[] types();",
"public List<ScheduleResource> neededSpecificResources();",
"public static IResource[] getResources(ISelection selection) {\n \t\tArrayList tmp= internalGetResources(selection, IResource.class);\n \t\treturn (IResource[]) tmp.toArray(new IResource[tmp.size()]);\n \t}",
"IntegerResource installationType();",
"public String[] getTypes() {\n/* 388 */ return getStringArray(\"type\");\n/* */ }",
"public PowerTypes[] getValidPowerTypes();",
"@Override\n public GetLogLevelsByResourceTypesResult getLogLevelsByResourceTypes(GetLogLevelsByResourceTypesRequest request) {\n request = beforeClientExecution(request);\n return executeGetLogLevelsByResourceTypes(request);\n }",
"public List<Access> getTypeBounds() {\n return getTypeBoundList();\n }",
"public Collection<Integer> getIncludedTransportTypes();",
"@Override\n\tpublic List<Resources> selectByResByAreaId(String id,String type) {\n\t\tMap<String, Object> param = new HashMap<String, Object>();\n\t\tparam.put(\"id\", id);\n\t\tparam.put(\"type\", type);\n\t\treturn ResourcesMapper.selectByResByAreaId(param);\n\t}",
"public List<URI> getType();",
"public static Collection<RoleDefinitionType> values() {\n return values(RoleDefinitionType.class);\n }",
"public java.util.List<java.lang.Integer>\n getSupportedTripTypesValueList() {\n return java.util.Collections.unmodifiableList(supportedTripTypes_);\n }",
"@Override\r\n\tpublic List<Type> selectType() {\n\t\treturn gd.selectType();\r\n\t}",
"Class<? extends Resource> getResourceType();",
"public static Set<Type> getBiomeTypes() {\n\t\ttry {\n\t\t\tfinal Field accessor = ReflectionHelper.findField(BiomeDictionary.Type.class, \"byName\");\n\t\t\tif (accessor != null) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tfinal Map<String, BiomeDictionary.Type> stuff = (Map<String, BiomeDictionary.Type>) accessor.get(null);\n\t\t\t\treturn new ReferenceOpenHashSet<>(stuff.values());\n\t\t\t}\n\n\t\t\treturn ImmutableSet.of();\n\n\t\t} catch (final Throwable t) {\n\t\t\tthrow new RuntimeException(\"Cannot locate BiomeDictionary.Type table!\");\n\t\t}\n\n\t}",
"public List<CWLType> getTypes() {\n return types;\n }",
"private IResource[] getSelectedResourcesArray() {\r\n List selection = getSelectedResources();\r\n IResource[] resources = new IResource[selection.size()];\r\n selection.toArray(resources);\r\n return resources;\r\n }",
"ImmutableList<ResourceRequirement> getRequirements();",
"public int getContents( Resource.Type type );",
"List<? extends HasListBox> getAllDataTypes();",
"public java.lang.Integer getCableres() throws java.rmi.RemoteException;",
"public void setRegistyResourceSelectionType(int registyResourceSelectionType) {\n\t\tthis.registyResourceSelectionType = registyResourceSelectionType;\n\t}",
"List<Resource> resources();",
"BitSet selectLeafFlags();",
"BitSet selectLeafFlags();",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();",
"public ResourceType getResouceType() {\n return type;\n }",
"public Enumeration permissions();",
"String getResourceType();",
"public List<ResourceSelection> selectResourceSelection() {\n\n\t\tList<ResourceSelection> customers = new ArrayList<ResourceSelection>();\n\t\tConnection connection = null;\n\t\tPreparedStatement preparedStatement = null;\n\t\tResultSet resultSet = null;\n\n\t\ttry {\n\n\t\t\tconnection = (Connection) DBConnection.getConnection();\n\t\t\tString sql = \"select * from resource_selection\";\n\t\t\tpreparedStatement = (PreparedStatement) connection.prepareStatement(sql);\n\t\t\tresultSet = preparedStatement.executeQuery();\n\n\t\t\tResourceSelection customer = null;\n\t\t\twhile (resultSet.next()) {\n\n\t\t\t\tcustomer = new ResourceSelection();\n\n\t\t\t\tcustomer.setRank(resultSet.getString(\"rank\"));\n\t\t\t\tcustomer.setName(resultSet.getString(\"name\"));\n\t\t\t\tcustomer.setContainer_types(resultSet.getString(\"container_types\"));\n\t\t\t\tcustomer.setEnvironment_types(resultSet.getString(\"environment_types\"));\n\t\t\t\tcustomer.setHost_groups(resultSet.getString(\"host_groups\"));\n\t\t\t\tcustomer.setPlacement(resultSet.getString(\"placement\"));\n\t\t\t\tcustomer.setMinimum(resultSet.getString(\"minimum\"));\n\n\t\t\t\tcustomers.add(customer);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.error(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tresultSet.close();\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLOGGER.error(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\treturn customers;\n\t}",
"ResourceFilesType createResourceFilesType();",
"@GET\n\t@Path(\"types\")\n public Response getDeviceTypes() {\n List<DeviceType> deviceTypes;\n try {\n deviceTypes = DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes();\n return Response.status(Response.Status.OK).entity(deviceTypes).build();\n } catch (DeviceManagementException e) {\n String msg = \"Error occurred while fetching the list of device types.\";\n log.error(msg, e);\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();\n }\n }",
"@Generated\n @Selector(\"resourceFetchType\")\n @NInt\n public native long resourceFetchType();",
"List<ReportType> findTypes();",
"public int getNumberOf(ResType type) { return resources.get(type); }",
"@Model\n public Collection<String> choices2Act() {\n return applicationFeatureRepository.packageNamesContainingClasses(ApplicationMemberType.PROPERTY);\n }",
"public long getSupports();",
"public java.util.Enumeration getI13nActResourceSet() throws java.rmi.RemoteException, javax.ejb.FinderException;",
"private int buildEventTypeMask( String eventTypes )\n {\n // Check for the constants first as they are used internally.\n if ( eventTypes == EVENT_TYPE_SERVICE )\n {\n return MASK_SERVICE;\n }\n else if ( eventTypes == EVENT_TYPE_CONTROL )\n {\n return MASK_CONTROL;\n }\n else if ( eventTypes == EVENT_TYPE_CORE )\n {\n return MASK_CORE;\n }\n else if ( eventTypes.equals( \"*\" ) )\n {\n return MASK_ALL;\n }\n \n int mask = 0;\n StringTokenizer st = new StringTokenizer( eventTypes, \",\" );\n while ( st.hasMoreTokens() )\n {\n String eventType = st.nextToken();\n if ( eventType.equals( EVENT_TYPE_SERVICE ) )\n {\n mask |= MASK_SERVICE;\n }\n else if ( eventType.equals( EVENT_TYPE_CONTROL ) )\n {\n mask |= MASK_CONTROL;\n }\n else if ( eventType.equals( EVENT_TYPE_CORE ) )\n {\n mask |= MASK_CORE;\n }\n else\n {\n throw new IllegalArgumentException(\n \"Invalid permission eventType: \\\"\" + eventType + \"\\\"\" );\n }\n }\n \n return mask;\n }",
"public String getResourceType( )\r\n {\r\n return _strResourceType;\r\n }",
"String getAssetTypeRestriction();",
"public static Collection<AttributeType> findAll( )\n {\n return _dao.selectDocumentAttributeTypeList( );\n }",
"List<ResourceSkuRestrictions> restrictions();"
]
| [
"0.67719036",
"0.66974",
"0.61392486",
"0.6041471",
"0.58523107",
"0.57257855",
"0.55519086",
"0.5538311",
"0.54783946",
"0.5453613",
"0.54128",
"0.5391649",
"0.53020424",
"0.5298479",
"0.5276395",
"0.5246476",
"0.52027214",
"0.5120446",
"0.5106191",
"0.50938416",
"0.5072293",
"0.50632155",
"0.5035799",
"0.5029896",
"0.49944425",
"0.4983076",
"0.49627978",
"0.49603426",
"0.49354976",
"0.49190187",
"0.49186477",
"0.49050358",
"0.489084",
"0.48887807",
"0.48876005",
"0.48800105",
"0.48779446",
"0.48668393",
"0.48661673",
"0.4864004",
"0.48637635",
"0.48569226",
"0.48528406",
"0.48484898",
"0.48482874",
"0.483671",
"0.48181495",
"0.4815639",
"0.481477",
"0.48109615",
"0.48077157",
"0.4800741",
"0.4787165",
"0.47765887",
"0.47660345",
"0.4765263",
"0.4761986",
"0.47605264",
"0.47514084",
"0.47395003",
"0.47381446",
"0.4731502",
"0.4728329",
"0.47275084",
"0.4718993",
"0.47068226",
"0.46966216",
"0.46958256",
"0.46922225",
"0.46807012",
"0.46737543",
"0.46717438",
"0.4665035",
"0.46521422",
"0.46462712",
"0.46414384",
"0.46259296",
"0.46216705",
"0.4621591",
"0.46154454",
"0.46154246",
"0.46154246",
"0.46138528",
"0.46017924",
"0.45990834",
"0.45901433",
"0.4588493",
"0.45842028",
"0.45833653",
"0.45796585",
"0.45789817",
"0.45757145",
"0.45659626",
"0.4564176",
"0.45567462",
"0.4550817",
"0.4541282",
"0.45348832",
"0.45262387",
"0.45181254"
]
| 0.6792566 | 0 |
/ (nonJavadoc) Method declared on IAction. | @Override
public void run() {
final IResource[] resources = getSelectedResourcesArray();
// WARNING: do not query the selected resources more than once
// since the selection may change during the run,
// e.g. due to window activation when the prompt dialog is dismissed.
// For more details, see Bug 60606 [Navigator] (data loss) Navigator
// deletes/moves the wrong file
Job deletionCheckJob = new Job(DELETE_SAFI_RESOURCES_JOB) {
/*
* (non-Javadoc)
*
* @see
* org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
*/
@Override
protected IStatus run(IProgressMonitor monitor) {
if (resources.length == 0)
return Status.CANCEL_STATUS;
scheduleDeleteJob(resources);
return Status.OK_STATUS;
}
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
*/
@Override
public boolean belongsTo(Object family) {
if (DELETE_SAFI_RESOURCES_JOB.equals(family)) {
return true;
}
return super.belongsTo(family);
}
};
deletionCheckJob.schedule();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"@Override\n public void action() {\n }",
"@Override\r\n\tpublic void action() {\n\t\t\r\n\t}",
"@Override\n\tpublic void action() {\n\n\t}",
"public abstract Action getAction();",
"@Override\n\tpublic void setAction() {\n\t}",
"public interface Action {\n\t\n\t/**\n\t * @return The action's printable value\n\t */\n\tpublic String toString();\n\n\tpublic Action actionClone();\n \t\n}",
"@Override\n\tpublic void newAction() {\n\t\t\n\t}",
"public void action() {\n action.action();\n }",
"public void createAction() {\n }",
"public void action() {\n }",
"@Override\r\n\tpublic void visit(SimpleAction action)\r\n\t{\n\t\t\r\n\t}",
"public void a_Action(){}",
"public abstract void onAction();",
"@Override\n\tpublic String getAction() {\n\t\treturn action;\n\t}",
"public A getAction() {\r\n\t\treturn action;\r\n\t}",
"@Override\r\n\t\tpublic void action()\r\n\t\t{\r\n// throw new UnsupportedOperationException(\"Not supported yet.\");\r\n\t\t}",
"abstract public void performAction();",
"public void performAction();",
"public abstract void action();",
"public abstract void action();",
"public abstract void action();",
"public abstract void action();",
"public void doAction(){}",
"public void performAction() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"@Override\n public void accept(Action action) {\n }",
"@Override\r\n protected void doActionDelegate(int actionId)\r\n {\n \r\n }",
"@Override\n\tpublic void onActionStart(int action) {\n\t\t\n\t}",
"public int getAction()\n {\n return m_action;\n }",
"Action createAction();",
"Action createAction();",
"Action createAction();",
"@Override\n\tpublic void handleAction(Action action, Object sender, Object target) {\n\t\t\n\t}",
"@Override\n\tpublic void action() {\n\t\tSystem.out.println(\"action now!\");\n\t}",
"public Action getAction() {\n\treturn action;\n }",
"public interface IAction {\n\n /**\n * Executes this action.\n *\n * @param time The current time in the animation\n */\n void execute(double time);\n\n /**\n * Returns a description of this action.\n *\n * @return The description as a String\n */\n String toString();\n\n /**\n * Gets this action's duration.\n *\n * @return The duration\n */\n Posn getDuration();\n\n /**\n * Gets this actions' type.\n *\n * @return The type\n */\n ActionType getType();\n\n /**\n * Gets the name of this action's shape.\n *\n * @return The name\n */\n String getShapeName();\n\n /**\n * Creates the part of the description that most\n * heavily relies on the type of Action this is.\n *\n * @return The description.\n */\n String getDescription();\n\n /**\n * Creates the description needed to be compatible with svg files.\n *\n * @param speed The speed of the animation.\n * @return The SVG description.\n */\n String getSVGDescription(double speed);\n}",
"interface Action {\n /**\n * Executes the action. Called upon state entry or exit by an automaton.\n */\n void execute();\n }",
"@Override\n public String getAction() {\n return null;\n }",
"String getOnAction();",
"private void setAction(String action)\r\n/* 46: */ {\r\n/* 47: 48 */ this.action = action;\r\n/* 48: */ }",
"public void setAction(String action) { this.action = action; }",
"@Override\r\n\tpublic Message doAction() {\n\t\treturn null;\r\n\t}",
"public int getAction() {\n return action_;\n }",
"public int getAction() {\n return action;\n }",
"public void toSelectingAction() {\n }",
"public void executeAction( String actionInfo );",
"public void takeAction(BoardGameController.BoardBugAction action)\n {\n\n }",
"public interface Action {\n\n /** Containing custom action. */\n void action();\n}",
"public void setAction(String action);",
"public String getAction() {\n return action;\n }",
"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 int getAction() {\n\t\treturn action;\n\t}",
"public String getAction() {\n return this.action;\n }",
"public Action getAction() {\n return action;\n }",
"public synchronized void applyAction(int action) {\n\n }",
"private void act() {\n\t\tmyAction.embodiment();\n\t}",
"@Override\n public void onAction(RPObject player, RPAction action) {\n }",
"String getAction();",
"String getAction();",
"public String getAction () {\n return action;\n }",
"protected abstract void action(Object obj);",
"@Override\r\n public void actionPerformed( ActionEvent e )\r\n {\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 }",
"public void act() \n {\n // Add your action code here.\n }",
"public interface TriggerAction {\n\t\tpublic void click();\n\t}",
"public int getAction() {\n return action_;\n }",
"public String getAction() {\r\n\t\treturn action;\r\n\t}",
"@Override\r\n\tpublic void execute(ActionContext ctx) {\n\t\t\r\n\t}",
"public interface ICreateAction extends IAction{\r\n\t\r\n\t\r\n}",
"public String getAction() {\n\t\treturn action.get();\n\t}",
"@Override\n\tpublic void createAction(Model m) {\n\t\t\n\t}",
"@Override\r\n public void initAction() {\n \r\n }",
"public void initiateAction() {\r\n\t\t// TODO Auto-generated method stub\t\r\n\t}",
"public String getAction() {\n return action;\n }",
"public String getAction() {\n return action;\n }",
"public String getAction() {\n return action;\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\r\n\tpublic void initActions() {\n\t\t\r\n\t}",
"public abstract ActionInMatch act();",
"public void actionOffered();",
"@Override\n \tpublic void addActions() {\n \t\t\n \t}",
"@Override\n public void act() {\n }",
"public interface ICommandDisplayAction extends IAction{\r\n\r\n\t \r\n\t\r\n\tpublic void displayPallet() ;\r\n\r\n\tpublic void displayArena();\r\n\t\r\n\tpublic void displayComponent(String componentIntanceName) ;\r\n\t\r\n\tpublic void displayChain( ) ;\r\n}",
"@Override\n\tpublic Action getAction(int i) {\n\t\treturn this.actions.get(i);\n\t}",
"@Override\n\tpublic void showAction(int id) {\n\t\t\n\t}",
"public interface UIAction {\n}",
"public String getAction() {\n\t\treturn action;\n\t}",
"public String getAction() {\n\t\treturn action;\n\t}",
"public String getAction() {\n\t\treturn action;\n\t}",
"public String getAction() {\n\t\treturn action;\n\t}",
"int getAction();",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\n\t\t}"
]
| [
"0.81562597",
"0.81562597",
"0.81562597",
"0.80996215",
"0.8047148",
"0.7898596",
"0.76949763",
"0.7652237",
"0.7600415",
"0.75714034",
"0.75182235",
"0.74942404",
"0.74825466",
"0.74474895",
"0.7442278",
"0.7437897",
"0.7437006",
"0.74259895",
"0.7412704",
"0.7380249",
"0.73226035",
"0.73226035",
"0.73226035",
"0.73226035",
"0.7316899",
"0.7308052",
"0.73015124",
"0.727923",
"0.7278097",
"0.72748727",
"0.7255862",
"0.7255862",
"0.7255862",
"0.7239816",
"0.7228269",
"0.7181059",
"0.71758825",
"0.7174674",
"0.71592623",
"0.71380395",
"0.71272385",
"0.7111758",
"0.71114683",
"0.7105815",
"0.7087247",
"0.70780087",
"0.7077492",
"0.70654875",
"0.7015858",
"0.70143497",
"0.69985294",
"0.69908744",
"0.69908744",
"0.69895214",
"0.69753635",
"0.6973782",
"0.69717985",
"0.6971235",
"0.6968665",
"0.69655734",
"0.69655734",
"0.6959511",
"0.69545144",
"0.6950157",
"0.69498366",
"0.69498366",
"0.69498366",
"0.69498366",
"0.69498366",
"0.69498366",
"0.69498366",
"0.69498366",
"0.69439596",
"0.69366616",
"0.6927287",
"0.69253135",
"0.69252855",
"0.69147664",
"0.69037646",
"0.6900913",
"0.68994087",
"0.6875306",
"0.6875306",
"0.6875306",
"0.68749857",
"0.68749857",
"0.6874511",
"0.68691957",
"0.6869014",
"0.68636",
"0.6846462",
"0.68406004",
"0.6839074",
"0.6821836",
"0.6818676",
"0.68079",
"0.68079",
"0.68079",
"0.68079",
"0.68057084",
"0.68031937"
]
| 0.0 | -1 |
Schedule a job to delete the resources to delete. | private void scheduleDeleteJob(final IResource[] resourcesToDelete) {
// use a non-workspace job with a runnable inside so we can avoid
// periodic updates
Job deleteJob = new Job(DELETE_SAFI_RESOURCES_JOB) {
@Override
public IStatus run(final IProgressMonitor monitor) {
try {
final DeleteResourcesOperation op = new DeleteResourcesOperation(resourcesToDelete,
"Delete Resources Operation", deleteContent);
// op.setModelProviderIds(getModelProviderIds());
// If we are deleting projects and their content, do not
// execute the operation in the undo history, since it cannot be
// properly restored. Just execute it directly so it won't be
// added to the undo history.
if (deleteContent && containsOnlyProjects(resourcesToDelete)) {
// We must compute the execution status first so that any user prompting
// or validation checking occurs. Do it in a syncExec because
// we are calling this from a Job.
WorkbenchJob statusJob = new WorkbenchJob("Status checking") { //$NON-NLS-1$
/*
* (non-Javadoc)
*
* @see
* org.eclipse.ui.progress.UIJob#runInUIThread(org.eclipse.core.runtime.
* IProgressMonitor)
*/
@Override
public IStatus runInUIThread(IProgressMonitor monitor) {
return op.computeExecutionStatus(monitor);
}
};
statusJob.setSystem(true);
statusJob.schedule();
try {// block until the status is ready
statusJob.join();
} catch (InterruptedException e) {
// Do nothing as status will be a cancel
}
if (statusJob.getResult().isOK()) {
return op.execute(monitor, WorkspaceUndoUtil.getUIInfoAdapter(null));
}
return statusJob.getResult();
}
return PlatformUI.getWorkbench().getOperationSupport().getOperationHistory().execute(op,
monitor, WorkspaceUndoUtil.getUIInfoAdapter(null));
} catch (ExecutionException e) {
if (e.getCause() instanceof CoreException) {
return ((CoreException) e.getCause()).getStatus();
}
return new Status(IStatus.ERROR, AsteriskDiagramEditorPlugin.ID, e.getMessage(), e);
}
}
/*
* (non-Javadoc)
*
* @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)
*/
@Override
public boolean belongsTo(Object family) {
if (DELETE_SAFI_RESOURCES_JOB.equals(family)) {
return true;
}
return super.belongsTo(family);
}
};
deleteJob.setUser(true);
deleteJob.schedule();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteJob(String jobId);",
"void deleteByJobId(Long jobId);",
"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 deleteRecord() {\n\n new BackgroundDeleteTask().execute();\n }",
"@Override\n\t@Transactional\n\tpublic void deleteJob(String jobId) {\n\n\t}",
"private void runWithoutJobId() {\n if (numJobsToDelete.isPresent() && numJobsToDelete.get() <= 0) {\n handleBadRequest(ERROR_NON_POSITIVE_JOBS_TO_DELETE);\n return;\n }\n int defaultedDaysOld = daysOld.orElse(DEFAULT_DAYS_OLD);\n // Only generate the detailed response payload if there aren't too many jobs involved.\n boolean verbose =\n numJobsToDelete.isPresent() && (numJobsToDelete.get() <= DEFAULT_MAX_NUM_JOBS_TO_DELETE);\n StringBuilder payload = new StringBuilder();\n\n // Since findEligibleJobsByJobName returns only a certain number of jobs, we must loop through\n // until we find enough, requesting deletion as we go.\n int numJobsProcessed = 0;\n DateTime cutoffDate = clock.nowUtc().minusDays(defaultedDaysOld);\n Optional<String> cursor = Optional.empty();\n do {\n Optional<Integer> numJobsToRequest =\n Optional.ofNullable(\n numJobsToDelete.isPresent() ? numJobsToDelete.get() - numJobsProcessed : null);\n EligibleJobResults batch =\n mapreduceEntityCleanupUtil.findEligibleJobsByJobName(\n jobName.orElse(null), cutoffDate, numJobsToRequest, force.orElse(false), cursor);\n cursor = batch.cursor();\n // Individual batches can come back empty if none of the returned jobs meet the requirements\n // or if all jobs have been exhausted.\n if (!batch.eligibleJobs().isEmpty()) {\n String payloadChunk = requestDeletion(batch.eligibleJobs(), verbose);\n if (verbose) {\n payload.append(payloadChunk);\n }\n numJobsProcessed += batch.eligibleJobs().size();\n }\n // Stop iterating when all jobs have been exhausted (cursor is absent) or enough have been\n // processed.\n } while (cursor.isPresent()\n && (!numJobsToDelete.isPresent() || (numJobsProcessed < numJobsToDelete.get())));\n\n if (numJobsProcessed == 0) {\n logger.atInfo().log(\n \"No eligible jobs found with name '%s' older than %d days old.\",\n jobName.orElse(\"(any)\"), defaultedDaysOld);\n payload.append(\"No eligible jobs found\");\n } else {\n logger.atInfo().log(\"A total of %d job(s) processed.\", numJobsProcessed);\n payload.append(String.format(\"A total of %d job(s) processed\", numJobsProcessed));\n }\n response.setPayload(payload.toString());\n }",
"@Path(\"/api/job/delete\")\n\t@POST\n\t@ApiOperation(value = \"Delete the job\", notes = \"User can delete a job on his appliance.User with role Customer Admin or Customer User is allowed.\", response = ApiResponseDTO.class)\n\t@ApiResponses({ @ApiResponse(code = 200, message = \"The job with the given serial number has been deleted\") })\n\t@Transactional(rollbackFor = { NotAuthorizeException.class, CustomerNotFoundException.class,\n\t\t\tNodeNotFoundException.class, BaseException.class })\n\t@RequestMapping(value = \"/api/job/delete\", method = RequestMethod.POST)\n\t@PreAuthorize(\"hasAnyAuthority('Customer User','Customer Admin')\")\n\tpublic ApiResponseDTO deleteJob(\n\t\t\t@ApiParam(name = \"Job task object\", value = \"Job task object that needs to be deleted\", required = true) @Valid @RequestBody JobDeleteRequestDTO jobTaskDTO,\n\t\t\tHttpServletRequest request)\n\t\t\tthrows NotAuthorizeException, JobNotFoundException, BaseException, ValidationException {\n\t\tlogger.debug(\"Started JobsController.deleteJob() \");\n\t\tString message = null;\n\t\tString statusCode = HttpStatus.OK.toString();\n\t\tString uri = null;\n\t\tString jobName = null;\n\t\t// verify user associated with requested appliance\n\t\tString loginCustomerId = getLoggedInUserCustomerID(SecurityContextHolder.getContext().getAuthentication());\n\t\tString roleName = getLoggedInUserRoleName(SecurityContextHolder.getContext().getAuthentication());\n\t\tString loggedInEmail = getLoggedInUserEmail(SecurityContextHolder.getContext().getAuthentication());\n\t\tString userQAuthToken = getLoggedInUserAuthToken(SecurityContextHolder.getContext().getAuthentication());\n\t\tUser loggedInUser = userService.findUserByEmail(loggedInEmail);\n\n\t\t// User is associated with appliance\n\t\tif (!isCustomerAllowed(jobTaskDTO.getSerialNumber(), loginCustomerId)) {\n\t\t\tlogger.info(\"Appliance {} not owned by user {}\", jobTaskDTO.getSerialNumber(), loggedInUser.getName());\n\t\t\tthrow new NotAuthorizeException(environment.getProperty(\"job.delete.operation.notallowed\"));\n\t\t}\n\n\t\tJob job = createJobTaskDTOToJob(jobTaskDTO);\n\n\t\t// Customer admin can delete jobs created by himself and his\n\t\t// organization user jobs\n\t\tif (roleName.equalsIgnoreCase(ServicesConstants.CUSTOMER_ADMIN) && !isCustomerAllowedForJob(job, loginCustomerId)) {\n\t\t\tlogger.info(\"Job {} not owned by user {}\", job.getName(), loggedInUser.getName());\n\t\t\tthrow new NotAuthorizeException(environment.getProperty(\"job.delete.operation.notallowed\"));\n\t\t}\n\n\t\t// if user role is customer_user verify job owned by himself\n\t\tif (roleName.equalsIgnoreCase(ServicesConstants.CUSTOMER_USER)\n\t\t\t\t&& !isUserAllowedForJob(job, \"\" + loggedInUser.getId())) {\n\t\t\tlogger.info(\"Job {} not owned by user {}\", job.getName(), loggedInUser.getName());\n\t\t\tthrow new NotAuthorizeException(environment.getProperty(\"job.delete.operation.notallowed\"));\n\t\t}\n\n\t\tif (jobTaskDTO.getJobApiType() != null || !jobTaskDTO.getJobApiType().isEmpty()) {\n\t\t\tif (jobTaskDTO.getJobApiType().equalsIgnoreCase(MARATHON.toString())) {\n\t\t\t\turi = formatString(marathonUrl, MARATHON_V2_APPS);\n\t\t\t\tjobName = CHARACTER_SINGLE_FRONT_SLASH + jobTaskDTO.getAppId();\n\t\t\t} else if (jobTaskDTO.getJobApiType().equalsIgnoreCase(CHRONOS.toString())) {\n\t\t\t\turi = formatString(chronosUrlPrefix, CHRONOS_SCHEDULER_JOB);\n\t\t\t\tjobName = jobTaskDTO.getAppId();\n\t\t\t}\n\t\t\ttry {\n Node node = nodeService.findNodeBySerialNumber(jobTaskDTO.getSerialNumber());\n String nodeName=null;\n if(node != null){\n \tnodeName = node.getName();\n }\n\t\t\t\tjob.setIsDeleted(YES.toString());\n\t\t\t\tjobService.removeJob(job);\n\n\t\t\t\tboolean isDeletedSuccess = false;\n\n\t\t\t\tWSServerJobResponse wsServerJobResponse = JobsClient.deleteJob(websocketServerUrl,\n\t\t\t\t\t\tjobTaskDTO.getSerialNumber(), jobName, uri, loggedInUser.getUserName(), userQAuthToken);\n\t\t\t\tJobRetVal jobRetVal = JobsClient.convertWebsocketServerResponse(wsServerJobResponse,\n\t\t\t\t\t\tCHRONOS.toString());\n\t\t\t\tif (jobRetVal != null && jobRetVal.getStatus() != null\n\t\t\t\t\t\t&& jobRetVal.getStatus().equalsIgnoreCase(statusCode)\n\t\t\t\t\t\t|| jobRetVal != null && jobRetVal.getStatus() != null\n\t\t\t\t\t\t\t\t&& jobRetVal.getStatus().equalsIgnoreCase(HttpStatus.NO_CONTENT.toString())) {\n\t\t\t\t\tmessage = formatString(jobTaskDTO.getAppId(), JOB_DELETE_SUCCESS);\n\t\t\t\t\tisDeletedSuccess = true;\n\t\t\t\t} else {\n\t\t\t\t\tisDeletedSuccess = false;\n\t\t\t\t\tmessage = formatString(jobTaskDTO.getAppId(), JOB_NOT_DELETE_SUCCESS);\n\t\t\t\t\tstatusCode = HttpStatus.ACCEPTED.toString();\n\t\t\t\t\tjob.setIsDeleted(NO.toString());\n\t\t\t\t\tjobService.updateJob(job);\n\n\t\t\t\t}\n\t\t\t\tif (isDeletedSuccess == true) {\n\t\t\t\t\tjobService.deleteJob(job);\n\t\t\t\t}\n\t\t\t\tlogger.info(environment.getProperty(\"job.delete.sucess\"),loggedInUser.getUserName(),nodeName);\n\t\t\t} catch (JobNotFoundException e) {\n\t\t\t\tlogger.error(e.getMessage());\n\t\t\t\tthrow new JobNotFoundException(e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tlogger.error(\"Deleting a job failed with message {} \" + environment.getProperty(\"job.api.notnull\"));\n\t\t\tthrow new ValidationException(environment.getProperty(\"job.api.notnull\"));\n\t\t}\n\t\tApiResponseDTO response = new ApiResponseDTO(message, Integer.parseInt(statusCode));\n\t\tlogger.debug(\"Started JobsController.deleteJob() \");\n\t\treturn response;\n\t}",
"Boolean deleteJob(String jobName, String groupName) throws GWTJahiaServiceException;",
"@Override\n\tpublic void delete(Long id) {\n\t\tlog.debug(\"Request to delete Jobs : {}\", id);\n\t\tjobsRepository.deleteById(id);\n\t}",
"@Delete\n void delete(Task... task);",
"public void deleteAll() {\n new Thread(new DeleteAllRunnable(dao)).start();\n }",
"public void delete(BatchJob batchJob) {\r\n\t\tdao.delete(batchJob);\r\n\t}",
"Integer deleteAllCompletedJobs() throws GWTJahiaServiceException;",
"public void deleteJob(ConfigProperties cprop){\n\t\tjobs.remove(cprop.getProperty(\"PROJ.id\"));\n\t\tjlog.info(\"Delete Job \"+cprop.getProperty(\"PROJ.id\"));\n\t}",
"@Test\n\tpublic void testDeleteSchedules() throws Exception {\n\t\tString[] multipleAppIds = TestDataSetupHelper.generateAppIds(5);\n\t\tassertDeleteSchedules(multipleAppIds, 5, 0);\n\n\t\t// Test multiple applications each having multiple recurring schedule, no specific date schedules\n\t\tassertDeleteSchedules(multipleAppIds, 0, 5);\n\n\t\t// Test multiple applications each having multiple specific date and multiple recurring schedule \n\t\tassertDeleteSchedules(multipleAppIds, 5, 5);\n\n\t}",
"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}",
"@POST\n @Path(\"/jobs/delete\")\n @Produces(MediaType.APPLICATION_JSON)\n @Consumes(MediaType.APPLICATION_JSON)\n public Response deleteJobs(String body) {\n log.info(\"API Delete Jobs received \" + body);\n JSONArray retVals = new JSONArray();\n String jobId;\n JSONObject params = Utils.getRequestParameters(request);\n try {\n JSONArray input_jobs = new JSONArray(body);\n for (int i = 0; i < input_jobs.length(); i++) {\n jobId = input_jobs.getString(i);\n try {\n log.info(\"Deleting job : \" + jobId);\n params.put(\"ids\", new JSONArray().put(jobId));\n JSONObject ret = Utils.deleteHelper(params);\n retVals.put(ret);\n } catch (Exception e) {\n JSONObject ret = new JSONObject();\n ret.put(\"error\", \"Job with the id \" + jobId + \" FAILED: \" + e.getMessage());\n ret.put(\"deleted\", false);\n retVals.put(ret);\n }\n }\n return Response.status(200).entity(retVals.toString()).build();\n }\n catch(Exception e) {\n e.printStackTrace();\n return Response.status(500).entity(retVals.toString()).build();\n }\n }",
"int deleteByExample(ScheduleCriteria example);",
"void afterDelete(T resource);",
"@Path(\"/schedule\")\n @DELETE\n public Response cancelStorageReportSchedule(){\n log.debug(\"Cancelling all scheduled storage reports\");\n\n try {\n String responseText = resource.cancelStorageReportSchedule();\n return responseOk(responseText);\n } catch (Exception e) {\n return responseBad(e);\n }\n }",
"@DELETE\n @Path(\"/job/{id}\")\n @Produces(MediaType.APPLICATION_JSON)\n public Response deleteJobEndpoint(@PathParam(\"id\") String jobId) {\n log.info(\"API Delete Job received \" + jobId);\n JSONObject ret = Utils.deleteJob(jobId);\n return Response.status(500).entity(ret.toString()).build();\n }",
"@DeleteMapping(\"/job-bids/{id}\")\n @Timed\n public ResponseEntity<Void> deleteJobBid(@PathVariable Long id) {\n log.debug(\"REST request to delete JobBid : {}\", id);\n\n jobBidRepository.deleteById(id);\n jobBidSearchRepository.deleteById(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"public void deleteAll(TypedProperties globalProps, String jobName) throws MegatronException {\n log.info(\"Deleting log job (including mail jobs): \" + jobName);\n deleteInternal(globalProps, jobName, true);\n }",
"public void delete(TypedProperties globalProps, String jobName) throws MegatronException {\n log.info(\"Deleting log job: \" + jobName);\n deleteInternal(globalProps, jobName, false);\n }",
"@Test\n public void _05deleteJob() throws ApiException {\n OCRJobResponse response = api.deleteJob(ocrJob.getJobId());\n Assert.assertNotNull(response);\n Assert.assertNotNull(response.getJob());\n Assert.assertEquals(OCRJobResponse.StatusEnum.DELETED, response.getStatus());\n }",
"public void deleteJob(String jobInstancId) {\n JobWrapper jobWrapper = jobs.remove(jobInstancId);\n if (jobWrapper != null) {\n LOGGER.info(\"delete job instance with job id {}\", jobInstancId);\n jobWrapper.cleanup();\n getJobConfDb().deleteJob(jobInstancId);\n }\n }",
"private void deleteResource() {\n }",
"public List<ProgramScheduled> deleteProgramScheduleById(int scheduleId);",
"@RequestMapping(value = \"/delete/{favJobId}\", method = RequestMethod.DELETE)\n\tpublic void deleteFavouriteJob(@PathVariable Long favJobId) {\n\t\ttry {\n\t\t\tfavJobService.deleteFavouriteJob(favJobId);\n\t\t} catch(Exception e) {\n\t\t\t//TODO: Exception to be handle\n\t\t}\n\t}",
"public void deleteTask(Integer tid);",
"public abstract void delete(Iterable<Long> ids);",
"@Override\n public CompletableFuture<Void> deleteForcefully() {\n return delete(true);\n }",
"void deleteTask(int id);",
"@Test\n\tpublic void deletingScheduleIntervalWorks() throws Exception {\n\t\tResource floatRes = new Resource();\n\t\tfloatRes.setName(\"scheduleTest\");\n\t\tfloatRes.setType(FloatResource.class);\n\t\t// floatRes.setDecorating(Boolean.TRUE);\n\t\tFloatSchedule schedule = createTestSchedule();\n\n\t\tfloatRes.getSubresources().add(schedule);\n\t\tResource meter1 = unmarshal(sman.toXml(meter), Resource.class);\n\t\tmeter1.getSubresources().add(floatRes);\n\t\tsman.applyXml(marshal(meter1), meter, true);\n\t\t\n\t\tschedule.getEntry().clear();\n\t\tschedule.setStart(2L);\n\t\tschedule.setEnd(3L);\n\n\t\tsman.applyXml(marshal(meter1), meter, true);\n\n\t\tSchedule ogemaSchedule = (Schedule) meter.getSubResource(\"scheduleTest\").getSubResource(\"data\");\n\n\t\tassertEquals(2, ogemaSchedule.getValues(0).size());\n\t\tassertEquals(42, ogemaSchedule.getValues(0).get(0).getValue().getFloatValue(), 0);\n\t\tassertEquals(44, ogemaSchedule.getValues(0).get(1).getValue().getFloatValue(), 0);\n\t}",
"public static void deleteAzkabanJob(String sessionId, AzkabanProjectConfig azkabanProjectConfig)\n throws IOException {\n log.info(\"Deleting Azkaban project for: \" + azkabanProjectConfig.getAzkabanProjectName());\n\n // Delete project\n AzkabanAjaxAPIClient.deleteAzkabanProject(sessionId, azkabanProjectConfig);\n }",
"DeleteWorkerResult deleteWorker(DeleteWorkerRequest deleteWorkerRequest);",
"@DeleteMapping(\"/at-job-applications/{id}\")\n @Timed\n public ResponseEntity<Void> deleteAtJobApplications(@PathVariable Long id) {\n log.debug(\"REST request to delete AtJobApplications : {}\", id);\n atJobApplicationsRepository.delete(id);\n return ResponseEntity.ok().headers(HeaderUtil.createEntityDeletionAlert(ENTITY_NAME, id.toString())).build();\n }",
"@Test(groups={\"broken\"})\n\tpublic void triggerCompleteDeletesJob() throws SchedulerException,\n\t\t\tInterruptedException {\n\n\t\tScheduler sched = null;\n\t\ttry {\n\t\t\t\n\t\t\tSchedulerFactory schedFact = new org.quartz.impl.StdSchedulerFactory(); \n\t\t\tsched = schedFact.getScheduler(); \n\t\t\t\n//\t\t\tsched.getListenerManager().addTriggerListener(\n//\t new TriggerListener() {\n//\n//\t @Override\n//\t public String getName() {\n//\t return \"Unit Test Trigger Listener\";\n//\t }\n//\n//\t\t\t\t\t\t@Override\n//\t\t\t\t\t\tpublic void triggerFired(Trigger trigger,\n//\t\t\t\t\t\t\t\tJobExecutionContext context) {\n//\t\t\t\t\t\t\tlog.debug(\"working on a new job\"); \n//\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t@Override\n//\t\t\t\t\t\tpublic boolean vetoJobExecution(Trigger trigger,\n//\t\t\t\t\t\t\t\tJobExecutionContext context) {\n//\t\t\t\t\t\t\treturn false;\n//\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t@Override\n//\t\t\t\t\t\tpublic void triggerMisfired(Trigger trigger) {\n//\t\t\t\t\t\t\tlog.debug(\"ignoring misfire event\"); \n//\t\t\t\t\t\t}\n//\n//\t\t\t\t\t\t@Override\n//\t\t\t\t\t\tpublic void triggerComplete(\n//\t\t\t\t\t\t\t\tTrigger trigger,\n//\t\t\t\t\t\t\t\tJobExecutionContext context,\n//\t\t\t\t\t\t\t\tCompletedExecutionInstruction triggerInstructionCode) {\n//\t\t\t\t\t\t\tjobFinished.set(true);\n//\t\t\t\t\t\t}\n//\t \n//\t }, EverythingMatcher.allTriggers()\n//\t );\n//\t\t\t\n//\t\t\tsched.getListenerManager().addJobListener(\n//\t\t\t\t\tnew AgaveJobCleanupListener(), EverythingMatcher.allJobs());\n//\t\t\t\n//\t\t\t\n\t\t\tString jobUuid = \"12345\";\n\n\t\t\tJobDetail jobDetail = org.quartz.JobBuilder.newJob(StagingWatch.class)\n\t\t\t\t\t.usingJobData(\"uuid\", jobUuid)\n\t\t\t\t\t.withIdentity(jobUuid, \"demoWorkers\")\n\t\t\t\t\t.build();\n\n\t\t\tSimpleTrigger trigger = (SimpleTrigger) newTrigger()\n\t\t\t\t\t.withIdentity(jobUuid, \"demoWorkers\")\n\t\t\t\t\t.build();\n\t\t\t\n\t\t\tsched.scheduleJob(jobDetail, trigger);\n\t\t\tsched.start();\n\t\t\t\n\t\t\tThread.sleep(3000);\n\t\t\t\n//\t\t\tString summary = null;\n//\t\t\twhile (sched.getMetaData().getNumberOfJobsExecuted() == 0) {\n//\t\t\t\tif (!StringUtils.equals(summary, sched.getMetaData().getSummary())) {\n//\t\t\t\t\tSystem.out.println(sched.getMetaData().getSummary());\n//\t\t\t\t\tsummary = sched.getMetaData().getSummary();\n//\t\t\t\t}\n//\t\t\t\t//System.out.println(sched.getJobDetail(jobDetail.getKey()));\n//\t\t\t};\n\t\t\t\n\t\t\tAssert.assertEquals(sched.getMetaData().getNumberOfJobsExecuted(), 1,\n\t\t\t\t\t\"Incorrect number of jobs executed.\");\n\n\t\t\tAssert.assertFalse(sched.checkExists(jobDetail.getKey()),\n\t\t\t\t\t\"Job should be deleted immediately after it fires.\");\n\n\t\t\tAssert.assertFalse(sched.checkExists(trigger.getKey()),\n\t\t\t\t\t\"Trigger should be deleted immediately after it fires.\");\n\t\t} finally {\n\t\t\tif (sched != null) {\n\t\t\t\ttry {\n\t\t\t\t\tsched.clear();\n\t\t\t\t\tsched.shutdown(false);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tlog.error(\n\t\t\t\t\t\t\t\"Failed to shtudown and clear scheduler after test.\",\n\t\t\t\t\t\t\te);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t}",
"@Override\n\tpublic void delete(List<Long> ids) {\n\t}",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete PerSubmit : {}\", id);\n perSchedulerRepository.deleteById(id);\n perSubmitSearchRepository.deleteById(id);\n }",
"@Override\r\n\tprotected void delete(Milestone schedule, String reason, RequestContext context) throws ResponseException {\n\t\t\r\n\t}",
"public void delete(String jobId, String userId) throws DatabaseException, IllegalArgumentException;",
"@Override\n\tpublic void deleteInBatch(Iterable<Audit> entities) {\n\t\t\n\t}",
"public void deleteSchedule(int idx) throws Exception {\n\t\t// delete schedule information from DB. \n\t\tConnection conn = null;\n Statement stmt = null;\n \n try {\n conn = DefaultConnectionFactory.create().getConnection();\n stmt = conn.createStatement();\n \n StringBuilder sql = new StringBuilder();\n sql.append(\" DELETE FROM SCHEDULE_TABLE WHERE SCHE_IDX=\").append(idx);\n \n stmt.executeUpdate(sql.toString());\n\n } finally {\n if (stmt != null) {\n try {\n stmt.close();\n } catch (Exception e) { }\n }\n if (conn != null) {\n try {\n conn.close();\n } catch (Exception e) { }\n }\n }\n\t}",
"@Override\r\n public void run() {\r\n final IResource[] resources = getSelectedResourcesArray();\r\n // WARNING: do not query the selected resources more than once\r\n // since the selection may change during the run,\r\n // e.g. due to window activation when the prompt dialog is dismissed.\r\n // For more details, see Bug 60606 [Navigator] (data loss) Navigator\r\n // deletes/moves the wrong file\r\n\r\n Job deletionCheckJob = new Job(DELETE_SAFI_RESOURCES_JOB) {\r\n\r\n /*\r\n * (non-Javadoc)\r\n * \r\n * @see\r\n * org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)\r\n */\r\n @Override\r\n protected IStatus run(IProgressMonitor monitor) {\r\n if (resources.length == 0)\r\n return Status.CANCEL_STATUS;\r\n scheduleDeleteJob(resources);\r\n return Status.OK_STATUS;\r\n }\r\n\r\n /*\r\n * (non-Javadoc)\r\n * \r\n * @see org.eclipse.core.runtime.jobs.Job#belongsTo(java.lang.Object)\r\n */\r\n @Override\r\n public boolean belongsTo(Object family) {\r\n if (DELETE_SAFI_RESOURCES_JOB.equals(family)) {\r\n return true;\r\n }\r\n return super.belongsTo(family);\r\n }\r\n };\r\n\r\n deletionCheckJob.schedule();\r\n\r\n }",
"public void scheduleJobs();",
"@CrossOrigin\n\t@RequestMapping(value=\"/deleteJob\", method= RequestMethod.POST)\n\tpublic JSONObject deleteJob(@RequestBody StatusRequestBodyMessage requestBody, @RequestHeader HttpHeaders headers) {\n\t\tHeadersManager.setHeaders(headers);\n\t\ttry {\n\t\t String jobId = requestBody.jobId;\n\t\t \n\t\t SimpleResultSet res = new SimpleResultSet();\n\t\t LoggerRestClient logger = LoggerRestClient.getInstance(log_prop);\n\t \tLoggerRestClient.easyLog(logger, \"Status Service\", \"deleteJob start\", \"JobId\", jobId);\n\t \tLocalLogger.logToStdOut(\"Status Service deleteJob start JobId=\" + jobId);\n\t\t try {\n\t\t \tJobTracker tracker = this.getTracker();\n\t\t \ttracker.deleteJob(jobId);\n\t\t\t res.setSuccess(true);\n\t\t\t \n\t\t } catch (Exception e) {\n\t\t \tres.setSuccess(false);\n\t\t \tres.addRationaleMessage(SERVICE_NAME, \"deleteJob\", e);\n\t\t\t LoggerRestClient.easyLog(logger, \"Status Service\", \"deleteJob exception\", \"message\", e.toString());\n\t\t\t LocalLogger.logToStdOut(\"Status Service deleteJob exception message=\"+ e.toString());\n\t\t } \n\t\t \n\t\t return res.toJson();\n\t\t \n\t\t} finally {\n\t \tHeadersManager.clearHeaders();\n\t }\n\t}",
"@Override\n public CompletableFuture<Void> delete() {\n return delete(false);\n }",
"@Override\n public void delete(Long id) {\n log.debug(\"Request to delete JobTitle : {}\", id);\n jobTitleRepository.deleteById(id);\n }",
"private void runWithJobId() {\n if (jobName.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_NAME);\n return;\n }\n if (numJobsToDelete.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_NUMBER_OF_JOBS);\n return;\n }\n if (daysOld.isPresent()) {\n handleBadRequest(ERROR_BOTH_JOB_ID_AND_DAYS_OLD);\n return;\n }\n response.setPayload(requestDeletion(ImmutableSet.of(jobId.get()), true /* verbose */));\n }",
"@DELETE(\"pomodorotasks\")\n Call<PomodoroTask> pomodorotasksDelete(\n @Body PomodoroTask pomodoroTask\n );",
"public void deleteJobDataFiles(Job job) throws IOException {\n\t\tCore.deleteJobFiles(job, httpMethodExecutor);\n\t}",
"@Override\n\tpublic SchedulerJobEntity deleteJob(SchedulerJobEntity jobEntity) throws SchedulerException, GenericSchedulerException {\n\n\t\tJobKey jobKey = new JobKey(jobEntity.getJobName(), jobEntity.getJobGroup());\n\t\tJobDetail jobDetail = scheduler.getJobDetail(jobKey);\n\t\tif (jobDetail == null) {\n\t\t\tthrow new GenericSchedulerException(\"jobDetail cannot be found\");\n\t\t} else if (!scheduler.checkExists(jobKey)) {\n\t\t\tthrow new GenericSchedulerException(\"jobKey does not exist\");\n\t\t} else {\n\t\t\tscheduler.deleteJob(jobKey);\n\t\t\tschedulerRepository.deleteById(jobEntity.getId());\n\n\t\t\treturn jobEntity;\n\t\t}\n\t}",
"@Scheduled(cron = \"${scheduled.jobs.remove.blob.contents.document.cron}\")\n @SchedulerLock(name = \"RemoveBlobContentsFromUploadedDocuments\",\n lockAtLeastFor = \"PT4H\", lockAtMostFor = \"PT4H\") //midnight job so lock for 4 hours\n @Transactional(propagation = Propagation.REQUIRES_NEW)\n public void removeBlobContentsFromUploadedDocuments() {\n val dateTimeToCompare = LocalDateTime.now().minusHours(24);\n LockAssert.assertLocked();\n val records = this.documentRepository.findAllByPenRequestPenRequestStatusCodeInAndFileSizeGreaterThanAndDocumentDataIsNotNull(Arrays.asList(PenRequestStatusCode.MANUAL.toString(), PenRequestStatusCode.ABANDONED.toString()), 0);\n if (!records.isEmpty()) {\n for (val document : records) {\n if(document.getPenRequest().getStatusUpdateDate().isBefore(dateTimeToCompare)){\n document.setDocumentData(null); // empty the document data.\n document.setFileSize(0);\n }\n }\n this.documentRepository.saveAll(records);\n }\n\n }",
"void deleteQueue();",
"public void deleteDraft(final Artifact artifact, final Calendar deletedOn,\n final Boolean enqueueEvents);",
"public void delete(Long[] ids) throws ProcessingException;",
"@Test\n @OperateOnDeployment(\"server\")\n public void shouldDeleteResourcesByIds() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(200).when().delete(\n getBaseTestUrl() + \"/1/tags/delete/json/ids;1;3;\");\n // Then then the resources should be deleted\n given().header(\"Authorization\", \"Bearer access_token\").expect().body(\"size\", equalTo(1)).and().expect().body(\"items.item.name\",\n hasItem(\"Concept\")).and().expect().body(\"items.item.name\", not(hasItem(\"Task\"))).and().expect().body(\"items.item.name\",\n not(hasItem(\"Reference\"))).when().get(getBaseTestUrl() + \"/1/tags/get/json/all?expand=\" +\n \"{\\\"branches\\\":[{\\\"trunk\\\":{\\\"name\\\":\\\"tags\\\"}}]})\");\n }",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void delete();",
"public void doDelete() throws Exception\r\n\t\t{\r\n\t\tmyRouteGroup.delete();\r\n\t\t}",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/schedulers\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionScheduler();",
"@Override\r\n\tpublic void batchDelete(String[] ids) {\n\t\tfor(int i=0;i<ids.length;i++)\r\n\t\t\tdelete(ids[i]);\t\r\n\t}",
"@PreDestroy\n\tprivate void fini() throws Exception {\n\t\tListQueuesResult result = amazonSQSClient.listQueues();\n\t\tfor (String queueURL : result.getQueueUrls()) {\n\t\t\tamazonSQSClient.deleteQueue(queueURL);\n\t\t}\n\t}",
"@Override\n\tpublic void delete(String[] ids) throws Exception {\n\t\t\n\t}",
"void schedule(ScheduledJob job);",
"@Override\n\tpublic void deleteFromCloud() {\n\t\tfor (CustomerRequest r: mPendingRequests) {\n\t\t\tr.deleteFromCloud();\n\t\t}\n\n\t\t// We keep the orders in the cloud for later analytics\n\n\t\tsuper.deleteFromCloud();\n\t}",
"protected void delete () {\n OleThreadRequest request = \n new OleThreadRequest(DELETE,\n 0, 0, 0, 0);\n synchronized (this) {\n messagesWaiting.add(request);\n notify();\n }\n while (!request.finished) { \n synchronized(request) {\n try {\n request.wait(POLL_FOR_RESULT_HEARTBEAT);\n }\n catch (InterruptedException e) { \n }\n } \n }\n }",
"void deleteByProjectId(Long projectId);",
"default void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteQueuedResourceMethod(), responseObserver);\n }",
"void delete(String resourceGroupName, String dataControllerName, Context context);",
"private final void deleteRecipe() {\n \tnew DeleteRecipeTask().execute();\n }",
"public com.google.common.util.concurrent.ListenableFuture<com.google.longrunning.Operation>\n deleteQueuedResource(com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getDeleteQueuedResourceMethod(), getCallOptions()), request);\n }",
"Completable deleteAsync(String resourceGroupName, String serverName, String failoverGroupName);",
"private void closeDelete() throws IOException, InterruptedException {\n for (Map.Entry<String, Map<String, Set<String>>> path : this.filterColumnToValueMappingForDelete\n .entrySet()) {\n deleteExecution(path.getKey());\n createEmptyMetadataFile(path.getKey());\n }\n }",
"public void deleteAll() {\n tasks = new ArrayList<>();\n }",
"void disjoinJob(long jobId, long joinedJobId);",
"@Synchronized\r\n public void cleanTransferModelRecordsPeriodically() {\r\n try {\r\n ArrayList<Long> arrayList = getTransferModelsListIds();\r\n ArrayList<String> arrayListToDelete = new ArrayList<>();\r\n if (!arrayList.isEmpty() && arrayList.size() > 20) {\r\n for (int i = 19; i < arrayList.size(); i++) {\r\n arrayListToDelete.add(arrayList.get(i) + \"\");\r\n }\r\n String[] itemIds = arrayListToDelete.toArray(new String[arrayListToDelete.size()]);\r\n if (itemIds != null && itemIds.length > 0) {\r\n databaseHandler.getWritableDatabase();\r\n databaseHandler.deleteData(TableTransferModel.TABLE_NAME, TableTransferModel.id + \"=?\", itemIds);\r\n }\r\n }\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n FirebaseCrashlytics.getInstance().recordException(e);\r\n }\r\n }",
"@DELETE\n @ApiOperation(\"Forcefully stops a process and its all children\")\n @javax.ws.rs.Path(\"/{id}/cascade\")\n @WithTimer\n public void killCascade(@ApiParam @PathParam(\"id\") UUID instanceId) {\n PartialProcessKey processKey = PartialProcessKey.from(instanceId);\n processManager.killCascade(processKey);\n }",
"public void removeJob(int jNo);",
"public void deletePaths(TimeUnit unit, long time) throws Exception {\n log.info(\"Starting Full Path Delete\");\n log.info(format(\"read_units=%d, write_units=%d, queue_size=%d, scan_threads=%d, delete_threads=%d\", scanLimit, deleteLimit, queueSize, scanThreads, deleteThreads));\n \n executor = Executors.newFixedThreadPool(scanThreads+deleteThreads);\n \n log.info(format(\"Scanning for items older than: %d (ms)\", unit.toMillis(time)));\n \n for (int i = 0; i < scanThreads; i++) {\n PathScannerTask scanner = new PathScannerTask(db, scanLimiter, queue, queueSize, unit.toMillis(time));\n \n tasks.add(scanner);\n Future scanFuture = executor.submit(scanner);\n \n futures.add(scanFuture);\n scanFutures.add(scanFuture);\n }\n \n processDelete();\n }",
"void cancelAllSimulations(String jobId);",
"public void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getDeleteQueuedResourceMethod(), getCallOptions()),\n request,\n responseObserver);\n }",
"public abstract void onDelete(final ResourceType type, final Integer... resources);",
"public void enqueueDeleteDraftEvents(final Artifact artifact,\n final Calendar deletedOn);",
"@DELETE\n public void delete() {\n }",
"@DELETE\n public void delete() {\n }",
"public static void main(String[] args) {\n\t\tJobDao dj = new JobDao();\r\n\t\tdj.delete(4);\r\n\t\t\r\n\t}",
"@Scheduled(\n fixedDelayString = \"${entities.cleanup.rate}\"\n )\n @Transactional\n public void cleanup() {\n log.info(\"cleanup execution\");\n appSessionRepository.deleteByCreatedAtBefore(LocalDateTime.now()\n .minus(Period.ofDays(applicationConfig.getEntities().getCleanup().getDays())));\n tanRepository.deleteByCreatedAtBefore(LocalDateTime.now()\n .minus(Period.ofDays(applicationConfig.getEntities().getCleanup().getDays())));\n }",
"@RequestMapping(value = DELETE_JOBS, method = DELETE)\n @ResponseBody\n @ResponseStatus(ACCEPTED)\n public ResponseEntity<String> deleteJobs(@RequestBody KeyGroupDescriptionDTO keyGroupDescriptionDTO, HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse) {\n return quartzService.deleteJobs(keyGroupDescriptionDTO, getCookie(httpServletRequest, X_AUTH_TOKEN));\n }",
"@HTTP(\n method = \"DELETE\",\n path = \"/apis/config.openshift.io/v1/schedulers\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Status> deleteCollectionScheduler(\n @QueryMap DeleteCollectionScheduler queryParameters);",
"void delete(boolean force, IProgressMonitor monitor)\n\t\t\tthrows RodinDBException;",
"@Transactional\n\tpublic void deleteBatch(List<Integer> ids) {\n\t\temployeeMapper.deleteBatch(ids);\n\t}",
"boolean deleteWorkingSchedule(Long workingScheduleId);",
"public StatusInfo deleteScheduleRequest(@WebParam(name = \"scheduleRequestId\") String scheduleRequestId,\n @WebParam(name = \"contextInfo\") ContextInfo contextInfo)\n throws DoesNotExistException,\n InvalidParameterException,\n MissingParameterException,\n OperationFailedException,\n PermissionDeniedException;",
"Completable deleteAsync(String resourceGroupName, String accountName, String assetName, String filterName);"
]
| [
"0.68955934",
"0.65041316",
"0.6458005",
"0.6268821",
"0.6183391",
"0.5850381",
"0.58096224",
"0.5649567",
"0.5645095",
"0.5634832",
"0.562616",
"0.55953276",
"0.55944556",
"0.55384576",
"0.5516042",
"0.5512085",
"0.5500916",
"0.5481018",
"0.5408383",
"0.53938293",
"0.5359998",
"0.53512824",
"0.53508186",
"0.53421366",
"0.53363115",
"0.53229225",
"0.5317416",
"0.5316509",
"0.531396",
"0.5312015",
"0.5268877",
"0.5258284",
"0.5254618",
"0.523991",
"0.5224187",
"0.5203432",
"0.51808596",
"0.51742655",
"0.5172274",
"0.5160029",
"0.5155276",
"0.5153994",
"0.5138515",
"0.5136407",
"0.5134519",
"0.5122268",
"0.5103011",
"0.50773704",
"0.5070237",
"0.5070092",
"0.50667936",
"0.50617355",
"0.50586027",
"0.50448745",
"0.50416464",
"0.5040889",
"0.50372976",
"0.5027784",
"0.50276345",
"0.50276345",
"0.50276345",
"0.50276345",
"0.50276345",
"0.50276345",
"0.502542",
"0.5022089",
"0.50151",
"0.5013639",
"0.5008073",
"0.500081",
"0.49971214",
"0.49969175",
"0.49967903",
"0.4995818",
"0.49941292",
"0.49854538",
"0.49830735",
"0.49806216",
"0.49731082",
"0.49641994",
"0.49593025",
"0.49552307",
"0.49499747",
"0.49373496",
"0.49341673",
"0.49321812",
"0.49297255",
"0.49286097",
"0.4924753",
"0.49231198",
"0.49231198",
"0.49201038",
"0.49138963",
"0.4909667",
"0.49087575",
"0.49072766",
"0.49056455",
"0.4905572",
"0.49007687",
"0.4900692"
]
| 0.6757599 | 1 |
Returns the model provider ids that are known to the client that instantiated this operation. | public String[] getModelProviderIds() {
return modelProviderIds;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setModelProviderIds(String[] modelProviderIds) {\r\n this.modelProviderIds = modelProviderIds;\r\n }",
"modelProvidersI getProvider();",
"public Vector getServiceIds() throws ServiceException {\n return namingService.getServiceIds();\n }",
"public Collection<Provider> getProviders() {\n if (providers != null) {\n return new ArrayList<>(providers);\n } else {\n return new ArrayList<>();\n }\n }",
"public String getProviderId() {\n\t\treturn providerId;\n\t}",
"public String getProviderId() {\n\t\treturn providerId;\n\t}",
"public XCN[] getAdministeringProvider() {\r\n \tXCN[] retVal = this.getTypedField(10, new XCN[0]);\r\n \treturn retVal;\r\n }",
"public abstract List getProviders();",
"public String getProviderID() {\n return PROVIDER_ID;\n }",
"private List<AuthUI.IdpConfig> getProvider() {\n List<AuthUI.IdpConfig> providers = Arrays.asList(\n new AuthUI.IdpConfig.FacebookBuilder().setPermissions(Arrays.asList(\"email\")).build(),\n new AuthUI.IdpConfig.GoogleBuilder().build(),\n new AuthUI.IdpConfig.TwitterBuilder().build());\n\n return providers;\n }",
"public ArrayList<String> DFGetProviderList() {\n return DFGetAllProvidersOf(\"\");\n }",
"public int getProviderCount() {\n return providersPanel.getComponentCount();\n }",
"public java.lang.String getProviderId() {\n java.lang.Object ref = providerId_;\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 providerId_ = s;\n return s;\n }\n }",
"public java.lang.String getProviderId() {\n java.lang.Object ref = providerId_;\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 providerId_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"DataProviders retrieveProviders() throws RepoxException;",
"DataProviders retrieveProviders() throws RepoxException;",
"public ProviderIdentity getProviderIdentity() {\n\t\treturn this.providerIdentity;\n\t}",
"ImmutableList<SchemaOrgType> getProviderList();",
"public int getAdministeringProviderReps() {\r\n \treturn this.getReps(10);\r\n }",
"Set<ServiceProducer> getAllServiceProviders();",
"public com.google.protobuf.ByteString\n getProviderIdBytes() {\n java.lang.Object ref = providerId_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n providerId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String[] getOIDs()\n {\n return SUPPORTED_OIDS;\n }",
"public Long [] getAlgManagedIds() {\n return this.AlgManagedIds;\n }",
"int getProviderCount() {\n return mNoOfProviders;\n }",
"@Id\n\t@Column(name = \"provider_id\")\n\t@GeneratedValue(strategy = GenerationType.IDENTITY)\n\tpublic java.lang.Integer getProviderId() {\n\t\treturn providerId;\n\t}",
"public Long [] getCapManagedIds() {\n return this.CapManagedIds;\n }",
"public int[] getUserIds() {\n return this.mInjector.getUserManager().getUserIds();\n }",
"public com.google.protobuf.ByteString\n getProviderIdBytes() {\n java.lang.Object ref = providerId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n providerId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public String[] getIDs() {\n return impl.getIDs();\n }",
"@NonNull\n @SuppressWarnings(\"MixedMutabilityReturnType\")\n public static List<AdvertisingIdProviderInfo> getAdvertisingIdProviders(\n @NonNull Context context) {\n PackageManager packageManager = context.getPackageManager();\n List<ServiceInfo> serviceInfos =\n AdvertisingIdUtils.getAdvertisingIdProviderServices(packageManager);\n if (serviceInfos.isEmpty()) {\n return Collections.emptyList();\n }\n\n Map<String, String> activityMap = getOpenSettingsActivities(packageManager);\n ServiceInfo highestPriorityServiceInfo =\n AdvertisingIdUtils.selectServiceByPriority(serviceInfos, packageManager);\n\n List<AdvertisingIdProviderInfo> providerInfos = new ArrayList<>();\n for (ServiceInfo serviceInfo : serviceInfos) {\n String packageName = serviceInfo.packageName;\n\n AdvertisingIdProviderInfo.Builder builder =\n AdvertisingIdProviderInfo.builder()\n .setPackageName(packageName)\n .setHighestPriority(serviceInfo == highestPriorityServiceInfo);\n String activityName = activityMap.get(packageName);\n if (activityName != null) {\n builder.setSettingsIntent(\n new Intent(OPEN_SETTINGS_ACTION).setClassName(packageName, activityName));\n }\n providerInfos.add(builder.build());\n }\n return providerInfos;\n }",
"public int[] getIDs(){\r\n\t\tint[] id = new int[Config.MAX_CLIENTS];\r\n\t\tfor(int i=0; i< Config.MAX_CLIENTS;i++){\r\n\t\t\tid[i] = clients[i].getID();\r\n\t\t}\r\n\t\treturn id;\r\n\t}",
"public java.lang.String[] getServerIds() {\r\n return serverIds;\r\n }",
"public SortedSet<String> getAvailableDataProviders() {\n if (allAvailableProviders == null) {\n populateAvailableProviders();\n }\n\n SortedSet<String> providers = new TreeSet<String>();\n for (Provider p : allAvailableProviders) {\n providers.add(p.getName());\n }\n\n return providers;\n }",
"@Override\n\tpublic List<String> getConnectorIds() {\n\t\treturn connectorIds;\n\t}",
"public String getProvider() {\r\n return provider;\r\n }",
"public String getProvider() {\n\t\treturn provider;\n\t}",
"public static List<Integer> getAllWidgetIds(Context ctx) {\r\n List<Integer> ids = new ArrayList<Integer>();\r\n\r\n AppWidgetManager awm = AppWidgetManager.getInstance(ctx);\r\n List<AppWidgetProviderInfo> appWidgetProviderInfos = awm.getInstalledProviders();\r\n\r\n for (AppWidgetProviderInfo appWidgetProviderInfo : appWidgetProviderInfos) {\r\n int[] subset = awm.getAppWidgetIds(appWidgetProviderInfo.provider);\r\n for (int i : subset) {\r\n ids.add(i);\r\n }\r\n }\r\n\r\n return ids;\r\n }",
"public EI getProviderTrackingID() { \r\n\t\tEI retVal = this.getTypedField(4, 0);\r\n\t\treturn retVal;\r\n }",
"public String getProvider() {\n return provider;\n }",
"public static String[] getAvailableIDs();",
"@GetMapping(\"/provider-commands\")\n @Transactional\n public List<ProviderCommand> getAllProviderCommands() {\n List<ProviderCommand> commands = providerCommandService.findAll();\n List<ProviderCommand> fakeProviders = new ArrayList<>();\n for (final ProviderCommand command:commands){\n final ProviderCommand pCommand = getLocalProviderCommand(command.getId());\n for(SecurityParams param:command.getSecurityParams()){\n param.getId();\n }\n for(SecurityParams param:command.getServiceSecurity().getSecurityParams()){\n param.getId();\n }\n fakeProviders.add(pCommand);\n// break;\n }\n return fakeProviders;\n }",
"void setProvider(modelProvidersI IDProvider);",
"public List<TemplateAvailabilityProvider> getProviders()\n/* */ {\n/* 107 */ return this.providers;\n/* */ }",
"List<PolicyEngineFeatureApi> getFeatureProviders();",
"public List<ClientSystem> getAssociatedSystems() {\n\t\treturn registeredSystems;\n\t}",
"List<String> getPolicyControllerIds();",
"@JsonProperty(\"provider_id\")\n public String getProviderId() { return _providerId; }",
"public Collection getAvailableRefParameters(String serviceProviderCode, String themeName, ParameterModel model,\r\n\t\t\tString callerID) throws AAException, RemoteException;",
"public Map<ServiceType, IdentifiedService> getIdentifiedServices() {\n return identifiedServices;\n }",
"public List<Partner> getPartners() {\n\t\tList<Partner> sharedPartners = new ArrayList<Partner>();\n\t\tfor(FederationConfiguration config : federationConfigurations) {\n\t\t\tsharedPartners.add(config.getPartner());\n\t\t}\n\t\treturn sharedPartners;\n\t}",
"@Override\n\tpublic Object[] getIds() {\n\t\treturn null;\n\t}",
"private Collection<MarketDataProvider> getActiveMarketDataProviders()\n {\n populateProviderList();\n return providersByPriority;\n }",
"public List<String> getAnnotations() {\n return applicationIdentifiers;\n }",
"public String getProvider() {\n\t\treturn this.provider;\n\t}",
"public static java.lang.String[] getAvailableIDs() { throw new RuntimeException(\"Stub!\"); }",
"public ProvidedObject[] getProvidedObjects() {\n\t\treturn result instanceof Provider ? ((Provider) result)\n\t\t\t\t.getProvidedObjects() : new ProvidedObject[0];\n\t}",
"public List<String> getPlotIds() {\n return Identifiable.getIds(getPlotList());\n }",
"@Override\n\tpublic String[] getIds() {\n\t\treturn null;\n\t}",
"public String getIds() {\n return ids;\n }",
"public String getIds() {\n return ids;\n }",
"public String getProvider() {\n return mProvider;\n }",
"public RemoteIdentities remoteIdentities() {\n return this.remoteIdentities;\n }",
"public Collection<String> getPhaseProviders() {\n List<String> phaseProviders = new ArrayList<String>();\n for (IMixinPlatformAgent agent : this.agents) {\n String phaseProvider = agent.getPhaseProvider();\n if (phaseProvider != null) {\n phaseProviders.add(phaseProvider);\n }\n }\n return phaseProviders;\n }",
"public EI getPsl4_ProviderTrackingID() { \r\n\t\tEI retVal = this.getTypedField(4, 0);\r\n\t\treturn retVal;\r\n }",
"public Vector getServiceIds(String serviceType) throws ServiceException {\n return namingService.getServiceIds(serviceType);\n }",
"TrustedIdProviderInner innerModel();",
"public List<Class<?>> getAllModelServices() {\n\t\treturn ModelClasses.findModelClassesWithInterface(IServiceType.class);\n\t}",
"public List<Provider> getProName() {\n\t\treturn userDao.getProName();\r\n\t}",
"private static String[] getModelNames() {\n\t\treturn getConfiguration().getString(MODELS).split(\"\\\\|\");\n\t}",
"public List<K> getSavedIds() {\n if (dbObjects.length > 0 && dbObjects[0] instanceof JacksonDBObject) {\n throw new UnsupportedOperationException(\n \"Generated _id retrieval not supported when using stream serialization\");\n }\n\n List<K> ids = new ArrayList<K>();\n for (DBObject dbObject : dbObjects) {\n ids.add(jacksonDBCollection.convertFromDbId(dbObject.get(\"_id\")));\n }\n\n return ids;\n }",
"public String getResourceIds() {\n return resourceIds;\n }",
"public int[] getObjectIds() {\n\t\t\treturn objects;\n\t\t}",
"@ApiModelProperty(required = true,\n value = \"An array of servicePointIds, representing NMIs, that this account is linked to\")\n @NotNull\n public List<String> getServicePointIds() {\n return servicePointIds;\n }",
"@objid (\"13e63a4b-fab3-4b16-b7f9-69b4d6187c94\")\n ProvidedInterface getProvider();",
"public String getIds() {\n return this.ids;\n }",
"public void setProviderId(String value) { _providerId = value; }",
"@Override public Collection<String> getServerIds() {\n return getTrackedBranches().getServerIds();\n }",
"public String getProvider() {\n return (String) getAttributeInternal(PROVIDER);\n }",
"public java.util.List<String> getIds() {\n return ids;\n }",
"public abstract Collection<FeedProvider> getVisibleFeedProviders();",
"private void getAllProviders() {\r\n InfoService.Util.getService().getAllProviders(new MethodCallback<List<CabProviderBean>>() {\r\n\r\n @Override public void onFailure(Method method, Throwable exception) {\r\n viewProviderTable.setText(6, 0, \"Error could not connect to load data\" + exception);\r\n\r\n }\r\n\r\n @Override public void onSuccess(Method method, List<CabProviderBean> response) {\r\n\r\n updateDeleteTable(response);\r\n }\r\n\r\n });\r\n }",
"public Map<String, Object> getIds() {\n return ids;\n }",
"Set<II> getIds();",
"public static Set<Integer> getAppids() {\n return APP_IDS.ids;\n }",
"public Collection getPersistedObjectIds() {\n if (_payload != PAYLOAD_OIDS_WITH_ADDS) {\n if (_payload == PAYLOAD_OIDS)\n throw new UserException(s_loc.get(\"no-added-oids\"));\n throw new UserException(s_loc.get(\"extent-only-event\"));\n }\n return (_addIds == null) ? Collections.EMPTY_LIST : _addIds;\n }",
"public String getImageResourceIds(){\n return imageResourceIds;\n }",
"@Override\r\n\tpublic String[] getClientNames() {\r\n\t\treturn initData.clientNames;\r\n\t}",
"public String[] getClientNames() {\n return clientNames;\n }",
"List<ProviderCommandRequest> findAll();",
"Collection<LocatorIF> getItemIdentifiers();",
"public String getPartIdList() {\n return (String)ensureVariableManager().getVariableValue(\"PartIdList\");\n }",
"@ServiceMethod(returns = ReturnType.SINGLE)\n List<OperationsDefinitionInner> listByProviderRegistration(String providerNamespace);",
"public com.google.protobuf.ByteString\n getProviderBytes() {\n java.lang.Object ref = provider_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n provider_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@JsonProperty(\"providerID\")\n public String getProviderID() {\n return providerID;\n }",
"public String getProviderClassName();",
"public java.lang.String getProviderType() {\n return this._providerType;\n }",
"public com.google.protobuf.ByteString\n getProviderBytes() {\n java.lang.Object ref = provider_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n provider_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"String getControllerAuthorties(String clientId);",
"private int getAuthenticators() {\n return (android.os.Build.VERSION.SDK_INT >= Build.VERSION_CODES.R)\n ? BIOMETRIC_STRONG | DEVICE_CREDENTIAL\n : BIOMETRIC_WEAK | DEVICE_CREDENTIAL;\n }",
"private void populateAvailableProviders() {\n allAvailableProviders = new HashSet<Provider>();\n\n DataType dataType = DataType.valueOfIgnoreCase(this.dataType);\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n ProviderType providerType = provider.getProviderType(dataType);\n if (providerType != null) {\n allAvailableProviders.add(provider);\n }\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the list of providers.\", e);\n }\n }"
]
| [
"0.6274897",
"0.62235516",
"0.5872691",
"0.57898647",
"0.5770759",
"0.5770759",
"0.5756453",
"0.57441217",
"0.5740701",
"0.5718284",
"0.5708549",
"0.562429",
"0.5604596",
"0.5525873",
"0.550956",
"0.550956",
"0.5503951",
"0.549505",
"0.5482373",
"0.5472885",
"0.54447",
"0.5426513",
"0.54135305",
"0.5411737",
"0.53749526",
"0.53748053",
"0.5369733",
"0.5368041",
"0.53526914",
"0.5352187",
"0.5336281",
"0.5329484",
"0.53270435",
"0.5287442",
"0.52709264",
"0.52689207",
"0.52522135",
"0.5226285",
"0.52226645",
"0.5213933",
"0.52094024",
"0.520751",
"0.5201057",
"0.51882935",
"0.5184179",
"0.5161632",
"0.51479423",
"0.5116627",
"0.510653",
"0.5088781",
"0.50671285",
"0.50655603",
"0.5059324",
"0.5058671",
"0.50579464",
"0.50474685",
"0.5045597",
"0.5044479",
"0.50422686",
"0.50422686",
"0.5032224",
"0.50249183",
"0.5024171",
"0.5023476",
"0.50055885",
"0.4977539",
"0.4970724",
"0.4968927",
"0.49665785",
"0.49613646",
"0.4959635",
"0.49481747",
"0.49461585",
"0.4939316",
"0.4937934",
"0.4936034",
"0.4931596",
"0.4931413",
"0.49286613",
"0.492377",
"0.49165386",
"0.49151623",
"0.4910883",
"0.49078166",
"0.4903221",
"0.48863164",
"0.4878558",
"0.4872378",
"0.48715377",
"0.48697844",
"0.48603106",
"0.4858741",
"0.4853495",
"0.48533043",
"0.48496392",
"0.48477256",
"0.48448148",
"0.48402685",
"0.48362204",
"0.48258564"
]
| 0.8463934 | 0 |
Sets the model provider ids that are known to the client that instantiated this operation. Any potential side effects reported by these models during validation will be ignored. | public void setModelProviderIds(String[] modelProviderIds) {
this.modelProviderIds = modelProviderIds;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void setProvider(modelProvidersI IDProvider);",
"public String[] getModelProviderIds() {\r\n return modelProviderIds;\r\n }",
"public void setProviderId(String value) { _providerId = value; }",
"void updateProviders(List<Provider> providers) {\n this.providers = providers;\n }",
"@Override\r\n\tpublic void setModelId(int modelId) {\n\r\n\t}",
"@Override\n\tpublic void setIds(String[] ids) {\n\t\t\n\t}",
"protected abstract void setClueModels();",
"modelProvidersI getProvider();",
"void setModelInfo(int modelId, int chainCount);",
"public void setProviderId(String providerId) {\n\t\tthis.providerId = providerId;\n\t}",
"public Builder setProviderId(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n providerId_ = value;\n onChanged();\n return this;\n }",
"public void setProviderContext(Context providerContext) {\r\n mProviderContext = providerContext;\r\n }",
"Update withIdProvider(String idProvider);",
"public void setModel(RequestServerForService m) { this.model = m; }",
"public void setProvider(String value) { _provider = value; }",
"protected void setProvider() {\n fs.getClient().setKeyProvider(cluster.getNameNode().getNamesystem()\n .getProvider());\n }",
"public void updateIdentities() {\n // get a list of the internal conversation addresses\n ArrayList<String> addresses = new ArrayList<>();\n for (int i = 0; i < size(); i++)\n addresses.add(get(i).getFromAddress());\n\n // retrieve and set the identities of the internal addresses\n ArrayList<String> identities = retrieveIdentities(addresses);\n for (int i = 0; i < size(); i++)\n get(i).setIdentity(identities.get(i));\n }",
"@Override\r\n\tpublic Provider editProvider(Provider provider) {\n\t\treturn providerRepository.save(provider);\r\n\t}",
"public void setModelId(long modelId);",
"interface WithIdProvider {\n /**\n * Specifies the idProvider property: The URL of this trusted identity provider..\n *\n * @param idProvider The URL of this trusted identity provider.\n * @return the next definition stage.\n */\n Update withIdProvider(String idProvider);\n }",
"public void setTradeIds(Iterable<? extends ObjectIdentifiable> tradeIds) {\n if (tradeIds == null) {\n _tradeIds = null;\n } else {\n _tradeIds = new ArrayList<ObjectIdentifier>();\n for (ObjectIdentifiable tradeId : tradeIds) {\n _tradeIds.add(tradeId.getObjectId());\n }\n }\n }",
"private void registerProviders(ClientBuilder clientBuilder, Class<?>[] providers) {\n\n for (Class<?> filter : providers) {\n clientBuilder.register(filter);\n }\n }",
"public void resetInfoIds()\n\t{\n\t\tthis.resetSuggestedIds();\n\t\tthis.resetFreeIds();\n\t}",
"protected void prepareSave() {\r\n EObject cur;\r\n for (Iterator<EObject> iter = getAllContents(); iter.hasNext();) {\r\n cur = iter.next();\r\n \r\n EStructuralFeature idAttr = cur.eClass().getEIDAttribute();\r\n if (idAttr != null && !cur.eIsSet(idAttr)) {\r\n cur.eSet(idAttr, EcoreUtil.generateUUID());\r\n }\r\n }\r\n }",
"public void modelsChanged(IModelProviderEvent event);",
"@Override\n public void setClientId(int clientId) {\n _entityCustomer.setClientId(clientId);\n }",
"public Builder clearProviderId() {\n \n providerId_ = getDefaultInstance().getProviderId();\n onChanged();\n return this;\n }",
"private void setSewarageApplicationIdgenIds(SewerageConnectionRequest request) {\n\t\tList<String> applicationNumbers = new ArrayList<>();\n\t\tif (request.getSewerageConnection().getApplicationStatus() != null && request.isDisconnectRequest()) {\n\t\t\tapplicationNumbers = getIdList(request.getRequestInfo(),\n\t\t\t\t\trequest.getSewerageConnection().getTenantId(), config.getSewerageDisconnectionIdGenName(),\n\t\t\t\t\tconfig.getSewerageDisconnectionIdGenFormat(), 1);\n\t\t} else {\n\t\t\tapplicationNumbers = getIdList(request.getRequestInfo(),\n\t\t\t\t\trequest.getSewerageConnection().getTenantId(), config.getSewerageApplicationIdGenName(),\n\t\t\t\t\tconfig.getSewerageApplicationIdGenFormat(), 1);\n\t\t}\n\t\tif (CollectionUtils.isEmpty(applicationNumbers) || applicationNumbers.size() != 1) {\n\t\t\tMap<String, String> errorMap = new HashMap<>();\n\t\t\terrorMap.put(\"IDGEN ERROR \",\n\t\t\t\t\t\"The Id of SewerageConnection returned by idgen is not equal to number of SewerageConnection\");\n\t\t\tthrow new CustomException(errorMap);\n\t\t}\n\t\trequest.getSewerageConnection().setApplicationNo(applicationNumbers.listIterator().next());\n\t}",
"private void setClient(ClientImpl model) {\n if (client == null) {\n this.client = model;\n }\n }",
"@objid (\"a3188449-2f95-4e02-a233-e2e48fa5e5b0\")\n void setProvider(ProvidedInterface value);",
"public void setModels(ArrayList<TodoListModel> models) {\n this.models = models;\n }",
"public interface IModelProviderListener {\n\n /**\n\t * Notifies the listener that models have been changed in the model\n\t * provider.\n\t *\n\t * @param event\n\t * the event that specifies the type of change\n\t */\n public void modelsChanged(IModelProviderEvent event);\n}",
"public void setProvider(String provider) {\n\t\tthis.provider = provider;\n\t}",
"public void setProvider(String provider) {\n\t\tthis.provider = provider;\n\t}",
"public void setIds(String ids) {\n this.ids = ids;\n }",
"void registerForTypes(EntityApiProvider<A, C> provider, EntityType<?>... entityTypes);",
"public void setServerIds(java.lang.String[] serverIds) {\r\n this.serverIds = serverIds;\r\n }",
"void setServerNegotiatedValues(Long id, \n\t\t\t\t NegotiableCapabilitySet negotiatedValues)\n\tthrows RemoteException;",
"@Override\n\t\tpublic void setModel(int model) {\n\t\t\t\n\t\t}",
"@Override\n public synchronized void assignModels() {\n if ( userRecordService != null )\n for ( ChannelsUser user : userRecordService.getAllEnabledUsers() ) {\n CollaborationModel collaborationModel = user.getCollaborationModel();\n if ( collaborationModel == null )\n user.setCollaborationModel( getDefaultModel( user ) );\n else {\n String uri = collaborationModel.getUri();\n if ( collaborationModel.isRetired() ) {\n // User was connected to an old production plan\n user.setCollaborationModel( findProductionModel( uri ) );\n\n } else if ( collaborationModel.isProduction() && user.isDeveloperOrAdmin( uri ) )\n // Plan was put in production\n user.setCollaborationModel( findDevelopmentModel( uri ) );\n }\n }\n\n }",
"TrustedIdProvider refresh();",
"public void setCapManagedIds(Long [] CapManagedIds) {\n this.CapManagedIds = CapManagedIds;\n }",
"public void set(Object[] newContents) {\r\n\t\tAssert.isNotNull(newContents);\r\n\t\tdata.clear();\r\n\t\tdata.addAll(Arrays.asList(newContents));\r\n\r\n\t\tIConcurrentModelListener[] listeners = getListeners();\r\n\t\tfor (IConcurrentModelListener listener : listeners) {\r\n\t\t\tlistener.setContents(newContents);\r\n\t\t}\r\n\t}",
"@Override\r\n public void setModel(String model) {\n }",
"@Override\n\tpublic void setModel(TenantsEntity model) {\n\t\t\n\t}",
"@Test\n\tvoid setIamProviderForTest() {\n\t\tnew UserOrgResource().setIamProvider(new IamProvider[] { Mockito.mock(IamProvider.class) });\n\t}",
"void set(Model model);",
"Provider updateProvider(Provider prov) throws RepoxException;",
"Provider updateProvider(Provider prov) throws RepoxException;",
"public void setModelUri(URI modelUri) {\n\t\tScopingProviderHelper.getInstance().setModelUri(modelUri);\n\t}",
"void setSignatureProviderId(java.lang.String signatureProviderId);",
"public void setProvider(String value) {\n setAttributeInternal(PROVIDER, value);\n }",
"@JsonSetter(\"callerId\")\r\n public void setCallerId (CallerIdModel value) { \r\n this.callerId = value;\r\n }",
"private void populateAvailableProviders() {\n allAvailableProviders = new HashSet<Provider>();\n\n DataType dataType = DataType.valueOfIgnoreCase(this.dataType);\n try {\n for (Provider provider : DataDeliveryHandlers.getProviderHandler()\n .getAll()) {\n\n ProviderType providerType = provider.getProviderType(dataType);\n if (providerType != null) {\n allAvailableProviders.add(provider);\n }\n }\n } catch (RegistryHandlerException e) {\n statusHandler.handle(Priority.PROBLEM,\n \"Unable to retrieve the list of providers.\", e);\n }\n }",
"public void setSelectionProvider(final SelectionProvider selectionProvider) {\n\t\tthis.selectionProvider = selectionProvider;\n\t}",
"@Accessor(qualifier = \"Customers\", type = Accessor.Type.SETTER)\n\tpublic void setCustomers(final Collection<B2BCustomerModel> value)\n\t{\n\t\tgetPersistenceContext().setPropertyValue(CUSTOMERS, value);\n\t}",
"@JsonSetter(\"product_identifiers\")\n public void setProductIdentifiers (ProductIdentifiers value) { \n this.productIdentifiers = value;\n }",
"private void updateIdpActivations(ExecutionContext executionContext, String id, int providerIndex) {\n identityProviderActivationService.deactivateIdpOnAllTargets(executionContext, id);\n\n ActivationTarget[] targets = getActivationsTarget(providerIndex);\n if (targets.length > 0) {\n identityProviderActivationService.activateIdpOnTargets(executionContext, id, targets);\n }\n }",
"int updateByPrimaryKeySelective(Providers record);",
"public Builder setProviderIdBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n providerId_ = value;\n onChanged();\n return this;\n }",
"public void setProviderRef(ContentProvider provider) {\n if (providerRef != null) {\n Log.w(\n TAG,\n String.format(\n \"Reference to Provider instance \" + \"with authority %s already set\", authority));\n }\n providerRef = new WeakReference<>(provider);\n }",
"public void setProvider(String provider) {\r\n this.provider = provider == null ? null : provider.trim();\r\n }",
"@SideOnly(Side.CLIENT)\n public static void initModels() {\n }",
"public Gel_BioInf_Models.VirtualPanel.Builder setGeneIds(java.util.List<java.lang.String> value) {\n validate(fields()[4], value);\n this.geneIds = value;\n fieldSetFlags()[4] = true;\n return this; \n }",
"public void setC_BPartner_ID (int C_BPartner_ID);",
"public void setProviderUrl(String providerUrl) {\r\n this.providerUrl = providerUrl;\r\n }",
"public void setDrivesProvider(DrivesProvider provider) {\r\n\t\tif (Threading.isInitialized()) throw new IllegalStateException(ERROR_ALREADY_INITIALIZED);\r\n\t\tdrivesProvider = provider;\r\n\t}",
"public void setTradeProviderKey(Identifier tradeProviderKey) {\n this._tradeProviderKey = tradeProviderKey;\n }",
"public ProviderServices(\n ProviderFactory componentProviderFactory,\n Set<Class<?>> providers,\n Set<?> providerInstances) {\n this(ConstrainedToType.class, componentProviderFactory, providers, providerInstances);\n }",
"private void populateProviderList()\n {\n synchronized(activeProvidersByName) {\n if(ModuleManager.getInstance() != null) {\n List<ModuleURN> providerUrns = ModuleManager.getInstance().getProviders();\n for(ModuleURN providerUrn : providerUrns) {\n String providerName = providerUrn.providerName();\n if(providerUrn.providerType().equals(MDATA) && !providerName.equals(MarketDataCoreModuleFactory.IDENTIFIER) && !activeProvidersByName.containsKey(providerName)) {\n List<ModuleURN> instanceUrns = ModuleManager.getInstance().getModuleInstances(providerUrn);\n if(!instanceUrns.isEmpty()) {\n ModuleURN instanceUrn = instanceUrns.get(0);\n ModuleInfo info = ModuleManager.getInstance().getModuleInfo(instanceUrn);\n if(info.getState() == ModuleState.STARTED) {\n ModuleProvider provider = new ModuleProvider(providerName,\n AbstractMarketDataModule.getFeedForProviderName(providerName));\n SLF4JLoggerProxy.debug(this,\n \"Creating market data provider proxy for {}\",\n providerName);\n addProvider(provider);\n }\n }\n }\n }\n }\n }\n }",
"public static void setProvider(String providerName) {\n provider = providerName;\n logger.debug(\"Provider set to : \" + providerName);\n }",
"public void setModel(RegionModel newModel) {\n\t\tmodel = newModel;\n\t}",
"protected void setKids(ArrayList<Contact> kids){\n this.kids = kids;\n }",
"@Override\r\n protected void setValueFromId(EObject object, EReference eReference, String ids) {\r\n \r\n super.setValueFromId(object, eReference, ((QNameURIHandler) uriHandler)\r\n .convertQNameToUri(ids));\r\n }",
"public void setRoomSharingModel(RoomSharingModel model) {\n \tif (model==null) {\n \t\tsetPattern(null); setManagerIds(null);\n \t} else {\n \t\tsetPattern(model.getPreferences());\n \t\tsetManagerIds(model.getManagerIds());\n \t}\n }",
"@Override\r\n\tpublic List<ModelObject> getNewProviders(SessionObject needer, List<ModelObject> newProviders, ModelObject rule) throws EngineException {\r\n\t\t// Get property name and permitted values\r\n\t\tString propertyName = (String) rule.getPropertyValue(RULE_PROPERTY_NAME);\r\n\t\tList<?> permittedValues = rule.getListPropertyValue(RULE_PROPERTY_PERMITTED_VALUES);\r\n\t\t\r\n\t\t// If not fully specified, skip filtering\r\n\t\tif (propertyName.length() == 0 || permittedValues.size() == 0) {\r\n\t\t\treturn newProviders;\r\n\t\t}\r\n\t\t\r\n\t\t// Check for parent provider flag\r\n\t\tboolean useParent = ((Boolean) rule.getPropertyValue(RULE_PROPERTY_ON_PARENT)).booleanValue();\r\n\t\tList<ModelObject> filteredProviders = new ArrayList<ModelObject>();\r\n\t\t\r\n\t\tfor(ModelObject newProvider : newProviders) {\r\n\t\t\t// Check provider parent if appropriate\r\n\t\t\tif (useParent) {\r\n\t\t\t\t// Compare candidate value against permitted values to determine validity\r\n\t\t\t\tObject value = newProvider.getPropertyValue(propertyName); \r\n\t\t\t\tif (permittedValues.contains(value)) {\r\n\t\t\t\t\tfilteredProviders.add(newProvider);\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t// Else check child providers (any child satisfying the comparison is sufficient)\r\n\t\t\telse {\r\n\t\t\t\tList<?> childProviderIds = newProvider.getListPropertyValue(Constants.PROVIDER_LIST);\r\n\t\t\t\tfor(Object childProviderId : childProviderIds) {\r\n\t\t\t\t\tModelObject childProvider = needer.getSession().getKnowledgeBase().getModelObject(childProviderId);\r\n\t\t\t\t\tObject value = childProvider.getPropertyValue(propertyName); \r\n\t\t\t\t\t// Compare candidate child provider value against permitted values to determine validity\r\n\t\t\t\t\tif (permittedValues.contains(value)) {\r\n\t\t\t\t\t\tfilteredProviders.add(newProvider);\t\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\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\t// Return filtered provider list\r\n\t\treturn filteredProviders;\r\n\t}",
"TrustedIdProvider apply();",
"void assignAuthorisationsToCustomer(CustomerModel customer);",
"private void initModelEntities(final Collection<String> strategiesElems_) {\n\t\tthis.strategies = new ArrayList<String>();\n\t\tfinal Iterator<String> iteStrategies = strategiesElems_.iterator();\n\t\twhile (iteStrategies.hasNext()) {\n\t\t\tfinal String strategyElement = iteStrategies.next();\n\t\t\tthis.strategies.add(strategyElement);\n\t\t}\n\t}",
"public void setMarketDataProvider(MarketDataProvider marketDataProvider) {\r\n this.marketDataProvider = marketDataProvider;\r\n }",
"public org.ga4gh.models.CallSet.Builder setVariantSetIds(java.util.List<java.lang.String> value) {\n validate(fields()[3], value);\n this.variantSetIds = value;\n fieldSetFlags()[3] = true;\n return this; \n }",
"public abstract void setPaymentTypes(java.util.Set paymentTypes);",
"public void setPoolPartyRequests(\n final PoolPartyRequest[] thePoolPartyRequests) {\n poolPartyRequests = thePoolPartyRequests;\n }",
"public void setProviderRegionId(String id) {\n providerRegionId = id;\n }",
"public void reInitializeModels () {\n this.model = new ModelManager(getTypicalAddressBook(), new UserPrefs());\n this.expectedModel = new ModelManager(model.getAddressBook(), new UserPrefs());\n }",
"public void setIds(String ids) {\n this.ids = ids == null ? null : ids.trim();\n }",
"public void setIds(String ids) {\n this.ids = ids == null ? null : ids.trim();\n }",
"TrustedIdProvider.Update update();",
"public synchronized static void loadModels() throws SchemaProviderException {\n if (logger.isDebugEnabled()) {\n logger.debug(\"Loading OXM Models\");\n }\n\n for (SchemaVersion oxmVersion : translator.getSchemaVersions().getVersions()) {\n DynamicJAXBContext jaxbContext = nodeIngestor.getContextForVersion(oxmVersion);\n if (jaxbContext != null) {\n loadModel(oxmVersion.toString(), jaxbContext);\n }\n }\n }",
"@Override\n public boolean initialize() {\n ExecutionContext executionContext = GraviteeContext.getExecutionContext();\n\n boolean found = true;\n int idx = 0;\n\n while (found) {\n String type = environment.getProperty(\"security.providers[\" + idx + \"].type\");\n found = (type != null);\n if (found && !notStorableIDPs.contains(type)) {\n if (idpTypeNames.contains(type.toUpperCase())) {\n logger.info(\"Upsert identity provider config [{}]\", type);\n String id = environment.getProperty(\"security.providers[\" + idx + \"].id\");\n if (id == null) {\n id = type;\n }\n\n String formattedId = IdGenerator.generate(id);\n try {\n identityProviderService.findById(formattedId);\n } catch (IdentityProviderNotFoundException e) {\n formattedId = createIdp(executionContext, formattedId, IdentityProviderType.valueOf(type.toUpperCase()), idx);\n }\n // always update\n updateIdp(executionContext, formattedId, idx);\n\n // update idp activations\n updateIdpActivations(executionContext, formattedId, idx);\n } else {\n logger.info(\"Unknown identity provider [{}]\", type);\n }\n }\n idx++;\n }\n return true;\n }",
"public ModelItemProviderAdapterFactory() {\n\t\tsupportedTypes.add(IEditingDomainItemProvider.class);\n\t\tsupportedTypes.add(IStructuredItemContentProvider.class);\n\t\tsupportedTypes.add(ITreeItemContentProvider.class);\n\t\tsupportedTypes.add(IItemLabelProvider.class);\n\t\tsupportedTypes.add(IItemPropertySource.class);\n\t}",
"public MicroRowEpoxyModel_ m5163id(Number... ids) {\n super.mo11721id(ids);\n return this;\n }",
"interface WithIdProvider {\n /**\n * Specifies the idProvider property: The URL of this trusted identity provider..\n *\n * @param idProvider The URL of this trusted identity provider.\n * @return the next definition stage.\n */\n WithCreate withIdProvider(String idProvider);\n }",
"protected void initializeAdapters() {\n\t\tEditingDomainCommandStack commandStack = new EditingDomainCommandStack();\n\t\tAdapterFactoryEditingDomain editingDomain = new AdapterFactoryEditingDomain(\n\t\t\t\tcreateAdapterFactory(), commandStack, getBehaviourDelegate()) {\n\t\t\tpublic boolean isReadOnly(IModel model) {\n\t\t\t\tURI user = SecurityUtil.getUser();\n\t\t\t\tif (user != null\n\t\t\t\t\t\t&& model.getModelSet() instanceof ISecureModelSet\n\t\t\t\t\t\t&& ((ISecureModelSet) model.getModelSet())\n\t\t\t\t\t\t\t\t.writeModeFor((IReference) model, user) == null) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn super.isReadOnly(model);\n\t\t\t}\n\t\t};\n\t\tcommandStack.setEditingDomain(editingDomain);\n\t\t// editingDomain\n\t\t// .setModelToReadOnlyMap(new java.util.WeakHashMap<IModel, Boolean>());\n\t}",
"public void setMarketDataProvider(MarketDataProvider marketDataProvider) {\n this.marketDataProvider = marketDataProvider;\n }",
"public void setProductIds(Set<Long> productIdsIn) {\n productIds = productIdsIn;\n }",
"public void setPetModel(PetModel[] param) {\n validatePetModel(param);\n\n localPetModelTracker = true;\n\n this.localPetModel = param;\n }",
"void setModel(Model model);",
"public void setNameProvider(NameProvider nameProvider2) {\n\t\tnameProvider = nameProvider2;\n\t}",
"void setRequiredResources(com.microsoft.schemas.crm._2011.contracts.ArrayOfRequiredResource requiredResources);"
]
| [
"0.6896758",
"0.6419171",
"0.570847",
"0.55558324",
"0.51997244",
"0.50123054",
"0.49468762",
"0.4897718",
"0.48870632",
"0.48816732",
"0.48682556",
"0.48598662",
"0.4822745",
"0.48090392",
"0.4808546",
"0.4803848",
"0.4799944",
"0.47675622",
"0.47540408",
"0.4721683",
"0.47027344",
"0.46979854",
"0.4693513",
"0.46925682",
"0.46825647",
"0.46753913",
"0.46447805",
"0.46407646",
"0.4640726",
"0.46398747",
"0.46276447",
"0.4616783",
"0.46148342",
"0.46148342",
"0.46113175",
"0.4598687",
"0.45920914",
"0.45808014",
"0.45776394",
"0.45767283",
"0.45629463",
"0.4535427",
"0.45339325",
"0.45328447",
"0.4529529",
"0.45288762",
"0.45276785",
"0.4526409",
"0.4526409",
"0.4521299",
"0.45125893",
"0.45118952",
"0.44943938",
"0.4490857",
"0.4482912",
"0.4480253",
"0.4474068",
"0.44732854",
"0.4457784",
"0.44501615",
"0.4449256",
"0.44352198",
"0.44337627",
"0.44320485",
"0.44136178",
"0.44090202",
"0.44085982",
"0.44060814",
"0.4399161",
"0.43988696",
"0.4397864",
"0.43915215",
"0.43912196",
"0.43860516",
"0.4379286",
"0.4372272",
"0.43708056",
"0.43683547",
"0.43666095",
"0.43664068",
"0.43656388",
"0.43650627",
"0.43603796",
"0.43577835",
"0.43491206",
"0.4347028",
"0.4347028",
"0.43467018",
"0.43444818",
"0.4340551",
"0.43399352",
"0.4333016",
"0.43314058",
"0.4330208",
"0.43283013",
"0.43252975",
"0.43142933",
"0.4311021",
"0.43094796",
"0.43078932"
]
| 0.78979945 | 0 |
Gets the test bed name. | public String getTestBedName() {
return testBedName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public String getTestname() {\n return testname;\n }",
"protected String getName() {\n return testClass.getName();\n }",
"@Override\n\t\tpublic String getTestName() {\n\t\t\treturn null;\n\t\t}",
"public String getTestName() {\n return testURL;\n }",
"public void setTestBedName(String testBedName) {\r\n\t\tthis.testBedName = testBedName;\r\n\t}",
"public String getTestDefinitionName() {\n return testdefinitionname;\n }",
"public java.lang.String getBed() {\r\n return localBed;\r\n }",
"private String getJiraTestCaseName() {\n String summary = issue.substring(issue.indexOf(\"summary\"), issue.indexOf(\"timetracking\"));\n name = summary.substring(summary.indexOf(\"TC\"));\n name = name.substring(0, name.indexOf(\"\\\",\"));\n return name;\n }",
"@VisibleForTesting\n String getSuiteName() {\n String suiteName = null;\n if (mModuleContext == null) {\n suiteName = TestSuiteInfo.getInstance().getName().toLowerCase();\n } else {\n List<String> testSuiteTags = mModuleContext.getConfigurationDescriptor().\n getSuiteTags();\n if (!testSuiteTags.isEmpty()) {\n if (testSuiteTags.size() >= 2) {\n CLog.i(\"More than 2 test-suite-tag are defined. test-suite-tag: \" +\n testSuiteTags);\n }\n suiteName = testSuiteTags.get(0).toLowerCase();\n CLog.i(\"Using %s from test suite tags to get value from dynamic config\", suiteName);\n } else {\n suiteName = TestSuiteInfo.getInstance().getName().toLowerCase();\n CLog.i(\"Using %s from TestSuiteInfo to get value from dynamic config\", suiteName);\n }\n }\n return suiteName;\n }",
"public String getTestSetName() {\n return this.testSetName;\n }",
"public String getName() {\r\n if (target != null) {\r\n return target.getName();\r\n }\r\n\r\n if (benchmark != null) {\r\n return benchmark.getName();\r\n }\r\n\r\n return \"\";\r\n }",
"public String getSampleName();",
"private String getJiraTestCaseComponent() {\n component = name.replace(\"TC - \", \"\");\n component = component.substring(0, component.indexOf(\":\"));\n return component;\n }",
"@Override\n\tpublic String toString() {\n\t\treturn name+\" : \"+test;\n\t}",
"protected String getMethodSpecificTestDataFileName() {\r\n StringBuffer result = new StringBuffer()\r\n .append(TESTDATA+\"/\")\r\n .append(getClassNameWithoutPackage())\r\n .append(\"_\")\r\n .append(getName())\r\n .append(\".xml\");\r\n return result.toString();\r\n }",
"public String getTestMethodName() {\n return m_testMethodName;\n }",
"protected String getDriverName() {\n\t\treturn driver.getName();\n\t}",
"String getStageName();",
"@Override\n public String getName() {\n writeline(\"/home/ubuntu/results/coverage/ZipArchiveEntry/ZipArchiveEntry_5_10.coverage\", \"9f48d6b7-640e-4370-9625-0cdc9bbeef0b\");\n return name == null ? super.getName() : name;\n }",
"protected String getTestName(File configFile, Properties configProps) {\n if (configProps.containsKey(TEST_NAME)) {\n return configProps.getProperty(TEST_NAME);\n } else {\n int lastSlash = configFile.getAbsolutePath().lastIndexOf('/');\n int secondToLastSlash = configFile.getAbsolutePath().lastIndexOf(\n '/', lastSlash - 1);\n return configFile.getAbsolutePath().substring(\n secondToLastSlash + 1, lastSlash);\n }\n }",
"public java.lang.String getName();",
"public String getTheName() {\n\t\treturn name.getText();\n\t}",
"public String getName() {\n return dtedDir + \"/\" + filename;\n }",
"public void testGetName_fixture24_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture24();\n\n\t\tString result = fixture.getName();\n\n\t\t// add additional test code here\n\t\tassertEquals(\"0123456789\", result);\n\t}",
"@Override\n\tpublic String getToolName() {\n\t\treturn name;\n\t}",
"public java.lang.StringBuilder getName()\n {\n return name_;\n }",
"public String getExerciseName()\n\t{\n\t\treturn this.exerciseName;\n\t}",
"java.lang.String getGameName();",
"java.lang.String getGameName();",
"@Test\n public void testGetName_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n\n String result = fixture.getName();\n\n assertEquals(\"\", result);\n }",
"public String getName() {\n int index = getSplitIndex();\n return path.substring(index + 1);\n }",
"public String getUnitName() throws Exception {\r\n return (String) getField(BaseAuditContestInterceptor.class, this, \"unitName\");\r\n }",
"@Override\n public String getFName() {\n\n if(this.fName == null){\n\n this.fName = TestDatabase.getInstance().getClientField(token, id, \"fName\");\n }\n return fName;\n }",
"public String[] getTestbedClassName() {\r\n\t\treturn testbedClassName;\r\n\t}",
"public void testGetName_fixture17_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture17();\n\n\t\tString result = fixture.getName();\n\n\t\t// add additional test code here\n\t\tassertEquals(\"An��t-1.0.txt\", result);\n\t}",
"public void testGetName_fixture12_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture12();\n\n\t\tString result = fixture.getName();\n\n\t\t// add additional test code here\n\t\tassertEquals(\"\", result);\n\t}",
"public String getNiceName()\n {\n String name = getBuildFile().getName();\n\n return Utility.replaceBadChars(name);\n }",
"public static String getName()\n {\n read_if_needed_();\n \n return _get_name;\n }",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"java.lang.String getName();",
"public String getBName() {\n\t\tif (getAbsoluteName)\n\t\t\treturn absoluteName;\n\t\telse\n\t\t\treturn shortName;\n\t}",
"public String getShortTestClassName()\r\n {\r\n return target.getClass().getSimpleName();\r\n }",
"@Override\n\tpublic String getNameById(int id) {\n\t\treturn testDao.getNameById(id);\n\t}",
"java.lang.String getDeskName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();",
"String getName();"
]
| [
"0.72242296",
"0.6688196",
"0.65236855",
"0.650075",
"0.64718777",
"0.64387864",
"0.64057857",
"0.62687296",
"0.62645286",
"0.6192612",
"0.61182517",
"0.60449505",
"0.60412234",
"0.597249",
"0.5970511",
"0.59138334",
"0.58945",
"0.5874779",
"0.5862504",
"0.58267444",
"0.5819519",
"0.58178276",
"0.5816868",
"0.5812495",
"0.58037746",
"0.58008605",
"0.57789415",
"0.5763866",
"0.5763866",
"0.57634044",
"0.5760252",
"0.57582587",
"0.57551974",
"0.57393014",
"0.5730025",
"0.57136995",
"0.5708483",
"0.57060266",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.56932926",
"0.5691829",
"0.5686925",
"0.56851405",
"0.5683818",
"0.5683211",
"0.5683211",
"0.5683211",
"0.5683211",
"0.5683211",
"0.5683211"
]
| 0.84114957 | 0 |
Sets the test bed name. | public void setTestBedName(String testBedName) {
this.testBedName = testBedName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void setTestName( String name ) {\n\t\ttestName = name;\n\t}",
"@Override\n\t\tpublic void setTestName(String name) {\n\t\t\t\n\t\t}",
"public void setTestname(String testname) {\n this.testname = testname;\n }",
"public static void setTestName(String rnTest)\n\t{\n\t\trnTestName = rnTest;\n\t\tlogger.info(\"set test case name\");\n\t\t\n\t}",
"public String getTestBedName() {\r\n\t\treturn testBedName; \r\n\t}",
"public void setTestSetName(String testSetName) {\n this.testSetName = testSetName;\n }",
"public void testSetName_fixture17_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture17();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"@Test\n public void testSetName_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n String name = \"\";\n\n fixture.setName(name);\n\n }",
"public void testSetName_fixture4_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture4();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture12_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture12();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }",
"public void testSetName_fixture24_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture24();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture23_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture23();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}",
"public void testSetName_fixture18_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture18();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String s) {\n this.name = s;\n }",
"public void testSetName_fixture14_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture14();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture5_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture5();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture28_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture28();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture16_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture16();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture27_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture27();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture25_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture25();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture19_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture19();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String name) {\n\t\tName = name;\n\t}",
"public void testSetName_fixture22_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture22();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setNameString(String s) {\n nameString = s;\r\n }",
"public void testSetName_fixture11_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture11();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture6_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture6();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"@Test\n public void testSetName_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n String name = \"\";\n\n fixture.setName(name);\n\n }",
"@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }",
"protected void setName(String name) {\n this._name = name;\n }",
"public void testSetName_fixture21_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture21();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture26_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture26();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"@Override\r\n\tpublic void setName(String name) {\n\t\tthis.name = name;\r\n\t}",
"public final void setName(String name) {_name = name;}",
"public void testSetName_fixture1_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture1();\n\t\tString name = \"\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String string) {\n\t\tthis.name = string;\n\t}",
"public void testSetName_fixture15_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture15();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"protected void setName(String name) {\n this.name = name;\n }",
"public void setName(java.lang.String value) {\n this.name = value;\n }",
"@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}",
"@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}",
"public void testSetName_fixture20_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture20();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"@Override\n\tpublic void setName( final String name )\n\t{\n\t\tsuper.setName( name );\n\t}",
"public void testSetName_fixture10_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture10();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String n) {\r\n name = n;\r\n }",
"public void setName(String name) {\r\n\t\t_name = name;\r\n\t}",
"public void setName(String value) {\n this.name = value;\n }",
"public void setName (String n){\n\t\tname = n;\n\t}",
"void setName(String name_);",
"protected void setName(String name) {\r\n this.name = name;\r\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"public void setName(String value) {\n\t\tname = value;\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String name){\r\n\t\tthis.name = name;\r\n\t}",
"public void testSetName_fixture13_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture13();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"protected void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}",
"@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\t}",
"public final void setName(String name) {\n\t\tthis.name = name;\n\t}",
"public void setName(String name) {\n \tthis.name = name;\n }",
"public void setName(String name) {\n \tthis.name = name;\n }",
"void setName(java.lang.String name);",
"void setName(java.lang.String name);",
"void setName(java.lang.String name);",
"public void setName(String name) {\n\t this.name = name;\n\t }",
"public void setName(String name){\n\t\tthis.name = name;\n\t}",
"public void setName(String name){\n\t\tthis.name = name;\n\t}",
"public void setName(String name){\n\t\tthis.name = name;\n\t}",
"public void testSetName_fixture7_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture7();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String name){\n \t\tthis.name = name;\n \t}",
"public void setName(String name) {\n _name = name;\n }",
"public void testSetName_fixture8_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture8();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setTestMethodName(String name) {\n m_testMethodName = name;\n }",
"public void setName (String n) {\n name = n;\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName( String name ) {\n this.name = name;\n }",
"public void setName(String name) {\n if (!name.isEmpty()) {\n this.name = name;\n }\n }",
"protected final void setName(final String name) {\n this.name = name;\n }",
"public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}",
"public void setName( final String name )\r\n {\r\n this.name = name;\r\n }",
"public void setName(final String name) {\n\t\tthis.name = name;\n\t}",
"public void setName(final String name) {\n\t\tthis.name = name;\n\t}",
"public void setName(final String name) {\n\t\tthis.name = name;\n\t}",
"public void setName(final String name) {\n\t\tthis.name = name;\n\t}",
"@Override\n\tpublic void setName(String name) {\n\t\tthis.name = name;\n\n\t}",
"public void setName(String name) {\n \tif (name==null)\n \t\tthis.name = \"\";\n \telse\n \t\tthis.name = name;\n\t}",
"public void testSetName_fixture9_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture9();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String name) {\r\n \t\tthis.name = name;\r\n \t}",
"public void setName(String name) {\n\t\t\tthis.name = name;\n\t\t}",
"public void setName(String name) {\n\t\t\tthis.name = name;\n\t\t}",
"public void setName( String name )\n {\n this.name = name;\n }",
"public void setName( String name )\n {\n this.name = name;\n }",
"public void setName(String nameIn) {\n name = nameIn;\n }"
]
| [
"0.73380744",
"0.7293722",
"0.70423144",
"0.6831214",
"0.6768243",
"0.6713411",
"0.6635295",
"0.6576948",
"0.65564865",
"0.65489537",
"0.65435094",
"0.6521177",
"0.6519317",
"0.65189433",
"0.6508629",
"0.65002745",
"0.6478668",
"0.6472921",
"0.6471191",
"0.64662015",
"0.644441",
"0.64360446",
"0.64263964",
"0.64258057",
"0.64049226",
"0.6401406",
"0.6395483",
"0.639343",
"0.6389285",
"0.6378837",
"0.6373422",
"0.63719136",
"0.63710594",
"0.63607305",
"0.63587815",
"0.6355512",
"0.63552725",
"0.6345877",
"0.6340866",
"0.6340866",
"0.6338768",
"0.63374174",
"0.63345605",
"0.63345605",
"0.63339704",
"0.63334095",
"0.6331276",
"0.6331199",
"0.6331026",
"0.6327733",
"0.6318025",
"0.6312057",
"0.63101286",
"0.6307771",
"0.6307771",
"0.6307052",
"0.63023365",
"0.63023365",
"0.63023365",
"0.6301968",
"0.6298976",
"0.62975174",
"0.62873435",
"0.62849134",
"0.62849134",
"0.62840044",
"0.62840044",
"0.62840044",
"0.6279599",
"0.6276417",
"0.6276417",
"0.6276417",
"0.6276016",
"0.6275176",
"0.6273093",
"0.6271323",
"0.62694824",
"0.62651795",
"0.62589025",
"0.62589025",
"0.62589025",
"0.62569326",
"0.62561816",
"0.6254192",
"0.62421894",
"0.62421894",
"0.62379885",
"0.6236234",
"0.6236234",
"0.6236234",
"0.6236234",
"0.62357837",
"0.6233229",
"0.6231961",
"0.62319136",
"0.623048",
"0.623048",
"0.62289906",
"0.62289906",
"0.6228055"
]
| 0.745167 | 0 |
Gets the testbed class name. | public String[] getTestbedClassName() {
return testbedClassName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected String getName() {\n return testClass.getName();\n }",
"public String getTestClassName()\r\n {\r\n return target.getClass().getName();\r\n }",
"public String getShortTestClassName()\r\n {\r\n return target.getClass().getSimpleName();\r\n }",
"public static String getTestCaseClassName() {\n\t\tStackTraceElement stackTraceElements[] = (new Throwable()).getStackTrace();\n\t\tfor (StackTraceElement e : stackTraceElements) {\n\t\t\tString s = e.toString();\n\t\t\tif (s.contains(\"com.textura.cpm.testsuites\")) {\n\t\t\t\tint endMethod = s.lastIndexOf('(');\n\t\t\t\tint beginMethod = s.lastIndexOf('c', endMethod);\n\t\t\t\tif (beginMethod < 0 || beginMethod >= endMethod) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t\tString caseName = s.substring(beginMethod, endMethod);\n\t\t\t\ttry {\n\t\t\t\t\tInteger.parseInt(caseName.substring(1));\n\t\t\t\t\treturn s;\n\t\t\t\t} catch (Exception a) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn \"\";\n\t}",
"java.lang.String getClassName();",
"public String getClassName() {\n\t\tString tmp = methodBase();\n\t\treturn tmp.substring(0, 1).toUpperCase()+tmp.substring(1);\n\t}",
"protected String getClassName() {\n return getDescriptedClass().getName();\n }",
"public String getClassname() {\n return classname;\n }",
"public String getTestBedName() {\r\n\t\treturn testBedName; \r\n\t}",
"private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf('.');\r\n\t\tif (index >= 0)\r\n\t\t\tclassname = classname.substring(index + 1);\r\n\t\treturn classname;\r\n\t}",
"public static String getClassName() {\n return CLASS_NAME;\n }",
"public String getClassname() {\n\t\treturn classname;\n\t}",
"public String getName() {\n // defaults to class name\n String className = getClass().getName();\n return className.substring(className.lastIndexOf(\".\")+1);\n }",
"private String getJiraTestCaseComponent() {\n component = name.replace(\"TC - \", \"\");\n component = component.substring(0, component.indexOf(\":\"));\n return component;\n }",
"String getClassName();",
"String getClassName();",
"String getClassName();",
"@Test\n public void testClassName() {\n TestClass testClass = new TestClass();\n logger.info(testClass.getClass().getCanonicalName());\n logger.info(testClass.getClass().getName());\n logger.info(testClass.getClass().getSimpleName());\n }",
"public String getTestname() {\n return testname;\n }",
"@ApiModelProperty(required = true, value = \"The programmatic location of the test.\")\n public String getClassname() {\n return classname;\n }",
"private static String getClassName() {\n\n\t\tThrowable t = new Throwable();\n\n\t\ttry {\n\t\t\tStackTraceElement[] elements = t.getStackTrace();\n\n\t\t\t// for (int i = 0; i < elements.length; i++) {\n\t\t\t//\n\t\t\t// }\n\n\t\t\treturn elements[2].getClass().getSimpleName();\n\n\t\t} finally {\n\t\t\tt = null;\n\t\t}\n\n\t}",
"public String getClassName();",
"public String getClassName(){\n\t\treturn targetClass.name;\n\t}",
"public String getClassname()\r\n {\r\n return m_classname;\r\n }",
"public String getName_Class() {\n\t\treturn name;\n\t}",
"public String getName()\n {\n return underlyingClass.getName();\n }",
"public String getName() {\n return className;\n }",
"java.lang.String getClass_();",
"java.lang.String getClass_();",
"public String getName() {\n\t\treturn className;\n\t}",
"public abstract String getClassName();",
"public final String toStringClassName() {\r\n \t\tString str = this.getClass().getName();\r\n \t\tint lastIx = str.lastIndexOf('.');\r\n \t\treturn str.substring(lastIx+1);\r\n \t}",
"public Class<?> getTestClass()\r\n {\r\n return target.getClass();\r\n }",
"protected String getName() {\n\t\tfinal String tmpName = getClass().getSimpleName();\n\t\tif (tmpName.length() == 0) {\n\t\t\t// anonymous class\n\t\t\treturn \"???\";//createAlgorithm(replanningContext).getClass().getSimpleName();\n\t\t}\n\n\t\treturn tmpName;\n\t}",
"public String getCurrentClassName () {\n String currentClass = getCurrentElement(ElementKind.CLASS);\n if (currentClass == null) return \"\";\n else return currentClass;\n }",
"@Override\n public String getClassName() {\n Object ref = className_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n className_ = s;\n return s;\n }\n }",
"public String getClassName()\n {\n return className;\n }",
"default String getCheckName() {\n return getClass().getSimpleName();\n }",
"public static String currentMethodName() {\n String fm = CURRENT_TEST.get();\n if (fm != null) {\n return fm;\n } else {\n return \"<no current test>\";\n }\n }",
"@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }",
"public String getClassName() {\r\n return className;\r\n }",
"public String getClassName()\n {\n return _className;\n }",
"public String getName() {\r\n \treturn this.getClass().getName();\r\n }",
"public String getTestName() {\n return testURL;\n }",
"public String getClassName() {\n return super.getClassName();\n }",
"abstract String getClassName();",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName() {\n return className;\n }",
"public String getClassName(){\n\t\treturn classname;\n\t}",
"public String getClassName()\n {\n return this.className;\n }",
"public Class getTestedClass() {\n\t\treturn Application.class;\n\t}",
"public String getTestDefinitionName() {\n return testdefinitionname;\n }",
"@Override\n\t\tpublic String getTestName() {\n\t\t\treturn null;\n\t\t}",
"public String getTestMethodName() {\n return m_testMethodName;\n }",
"public String getClassname(Class<?> aClass) {\n\t\tString result = aClass.getCanonicalName();\n\t\tif (result.endsWith(\"[]\")) {\n\t\t\tresult = result.substring(0, result.length() - 2);\n\t\t}\n\t\treturn result;\n\t}",
"public java.lang.String getClassName() {\n return this._className;\n }",
"public String getClassName() { return className; }",
"String getGeneratedClassName();",
"String getGeneratedClassName();",
"String getGeneratedClassName();",
"public String getTestSetName() {\n return this.testSetName;\n }",
"protected String getClassName() {\r\n return newName.getText();\r\n }",
"public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=java.lang.Thread s1=g1.tool.Tool s2=g1.TRocketmq1Application\n\t\treturn s2;\n\t}",
"String getLauncherClassName();",
"public String className() {\n\t\treturn className;\n\t}",
"public String getClassName() {\n Object ref = className_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n className_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"default String getClassName() {\n return declaringType().getClassName();\n }",
"public String getClassName() {\n return this.className;\n }",
"public String getClassName() {\n return this.className;\n }",
"public final String getName() {\n if (name == null) {\n name = this.getClass().getSimpleName().substring(3);\n }\n return name;\n }",
"public final String getName() {\n /// Since we plan to have only one wizard for each class, we use the name of the class.\n return this.getClass().getSimpleName();\n }",
"@VisibleForTesting\n String getSuiteName() {\n String suiteName = null;\n if (mModuleContext == null) {\n suiteName = TestSuiteInfo.getInstance().getName().toLowerCase();\n } else {\n List<String> testSuiteTags = mModuleContext.getConfigurationDescriptor().\n getSuiteTags();\n if (!testSuiteTags.isEmpty()) {\n if (testSuiteTags.size() >= 2) {\n CLog.i(\"More than 2 test-suite-tag are defined. test-suite-tag: \" +\n testSuiteTags);\n }\n suiteName = testSuiteTags.get(0).toLowerCase();\n CLog.i(\"Using %s from test suite tags to get value from dynamic config\", suiteName);\n } else {\n suiteName = TestSuiteInfo.getInstance().getName().toLowerCase();\n CLog.i(\"Using %s from TestSuiteInfo to get value from dynamic config\", suiteName);\n }\n }\n return suiteName;\n }",
"@DISPID(-2147417111)\n @PropGet\n java.lang.String className();",
"public String getShufflerClassName()\n {\n return (shuffler == null) ? null : shuffler.getClass().getCanonicalName();\n }",
"String getClassName() {\n return this.className;\n }",
"public String getTestClass(String testType) {\n\t\t// NOTE: we do some work here to achieve backward compatibility\n\t\t// with projects written for older versions of the BuildServer.\n\t\t// So, for example, the test class for public tests could\n\t\t// be defined as:\n\t\t// - \"quicktest=\" (original way)\n\t\t// - \"test.class.public=\" (current way)\n\t\t// - \"publictest=\", \"test.class.quick=\" (also allowed)\n\n\t\t// TODO Screw backwards compatibility; it's not that difficult to port\n\t\t// the test setups. Everything should use the \"current way\"\n\t\tList<String> testTypeWithAliases = new LinkedList<String>();\n\t\ttestTypeWithAliases.add(testType);\n\t\tString testTypeAlias = testTypePropertyAliases.get(testType);\n\t\tif (testTypeAlias != null)\n\t\t\ttestTypeWithAliases.add(testTypeAlias);\n\t\t\n\t\tString result = null;\n\t\tfor (Iterator<String> i = testTypeWithAliases.iterator(); i.hasNext(); ) {\n\t\t\ttestType = i.next();\n\t\t\t\n\t\t\tresult = getOptionalStringProperty(\n\t\t\t\t\tnew String[]{\n\t\t\t\t\t\t\tTestPropertyKeys.TESTCLASS_PREFIX + testType, // new way of specifying test class\n\t\t\t\t\t\t\ttestType + \"test\", // old way of specifying test class\n\t\t\t\t\t});\n\t\t\tif (result != null)\n\t\t\t\tbreak;\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"public String getClassName() {\n\t\treturn className;\n\t}",
"public String getClassName() {\n\t\treturn className;\n\t}",
"public String getClassName() throws NoSuchFieldException, IllegalAccessException {\n assertTargetNotNull();\n var targetField = targetInstance.getClass().getDeclaredField(targetName);\n targetField.setAccessible(true);\n var ob = targetField.get(targetInstance);\n return ob.getClass().getCanonicalName();\n }",
"public final String getDClassName() {\n return Descriptor.getDClassName(this.dclass);\n }",
"@Override\n public String getName() {\n return this.getClass().getSimpleName();\n }",
"public void testClassName() {\n\t\tClassName name = this.compiler.createClassName(\"test.Example\");\n\t\tassertEquals(\"Incorrect package\", \"generated.officefloor.test\", name.getPackageName());\n\t\tassertTrue(\"Incorrect class\", name.getClassName().startsWith(\"Example\"));\n\t\tassertEquals(\"Incorrect qualified name\", name.getPackageName() + \".\" + name.getClassName(), name.getName());\n\t}",
"protected String getTargetClassName() {\r\n return m_targetClassName;\r\n }",
"java.lang.String getInstanceName();",
"@Override\n public String getName() {\n final String name = getClass().getName();\n final int lastDollar = name.lastIndexOf('$');\n return name.substring(lastDollar + 1);\n }",
"@Override\r\n\t\tpublic String getClassName()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"public String getBaseClassName() {\n return className;\n }",
"public String getFullName() {\n return getAndroidPackage() + \"/\" + getInstrumentationClass();\n }",
"@Override\n\tpublic String getName() {\n\t\treturn portmodifytesting.class.getSimpleName();\n\t}",
"private String m56637b(Class cls) {\n return cls.getName();\n }",
"public String getClassName () { return _className; }",
"@Override\n public String getName() {\n return getDeclaringClass().getName();\n }",
"public String getClassificatioName() {\n return classificatioName;\n }",
"public String findPackageForTest(String testClassName);",
"@Override\n public String classFactoryName() {\n return Mirrors.findAnnotationMirror(element(), Factory.class)\n .flatMap(Mirrors::findAnnotationValue)\n .map(value -> value.getValue().toString()).orElse(null);\n }"
]
| [
"0.7972072",
"0.7586323",
"0.7445094",
"0.7353646",
"0.70559776",
"0.7036231",
"0.7007955",
"0.69785565",
"0.6920921",
"0.6857336",
"0.6806468",
"0.67981356",
"0.6796104",
"0.6765221",
"0.67315817",
"0.67315817",
"0.67315817",
"0.66783136",
"0.66579145",
"0.66412973",
"0.66229755",
"0.6599758",
"0.65625954",
"0.6554115",
"0.6487449",
"0.6486058",
"0.64352214",
"0.6397914",
"0.6397914",
"0.6373841",
"0.6296566",
"0.6292219",
"0.6273503",
"0.6255428",
"0.62264174",
"0.62148106",
"0.62084466",
"0.61872303",
"0.6184991",
"0.6184587",
"0.61801404",
"0.6172356",
"0.61546266",
"0.6153907",
"0.6149813",
"0.6142057",
"0.6134355",
"0.61343527",
"0.61343527",
"0.61343527",
"0.61343527",
"0.61343527",
"0.61343527",
"0.61326563",
"0.61180747",
"0.61090994",
"0.6105568",
"0.60993606",
"0.60795885",
"0.6078373",
"0.6074009",
"0.6069841",
"0.6067823",
"0.6067823",
"0.6067823",
"0.60661113",
"0.60610515",
"0.605857",
"0.6053184",
"0.6050333",
"0.6046359",
"0.604406",
"0.60419047",
"0.60419047",
"0.6007909",
"0.60035026",
"0.59736896",
"0.5970439",
"0.596984",
"0.5969355",
"0.5958682",
"0.59548527",
"0.59548527",
"0.59546864",
"0.5953224",
"0.59440947",
"0.5939522",
"0.5924066",
"0.5909035",
"0.59006953",
"0.5882426",
"0.58823407",
"0.58675784",
"0.5852807",
"0.58375657",
"0.58319336",
"0.58253723",
"0.58164036",
"0.5800792",
"0.5799103"
]
| 0.75991535 | 1 |
Sets the testbed class name. | public void setTestbedClassName(String[] testbedClassName) {
this.testbedClassName = testbedClassName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setName(String s) {\n\t\tclassName = s;\n\t}",
"@Override\n\t\tpublic void setTestName(String name) {\n\t\t\t\n\t\t}",
"protected void setTestName( String name ) {\n\t\ttestName = name;\n\t}",
"public static void setTestName(String rnTest)\n\t{\n\t\trnTestName = rnTest;\n\t\tlogger.info(\"set test case name\");\n\t\t\n\t}",
"protected String getName() {\n return testClass.getName();\n }",
"public void setTestname(String testname) {\n this.testname = testname;\n }",
"public void setTestSetName(String testSetName) {\n this.testSetName = testSetName;\n }",
"public void setClassName(String name)\n {\n _className = name;\n }",
"protected void setClassName(String name) {\r\n newName.setText(name);\r\n newName.setSelectionStart(0);\r\n newName.setSelectionStart(name.length());\r\n }",
"public void setClassName(String name) {\n this.className = name;\n }",
"public String[] getTestbedClassName() {\r\n\t\treturn testbedClassName;\r\n\t}",
"public void setClassname(String classname) {\n this.classname = classname;\n }",
"@org.junit.Test\n public void setName() {\n }",
"public void setClassName(String name) {\n\t\tlines.append(\".class public l2j/generated/\");\n\t\tlines.append(name);\n\t\tclassName = \"l2j/generated/\" + name;\n\t\tlines.append(\"\\n\");\n\n\t\t// stupid check\n\t\tif (dest.indexOf(name) == -1)\n\t\t\tthrow new IllegalStateException(\"Bad class name\");\n\t}",
"public void setTestMethodName(String name) {\n m_testMethodName = name;\n }",
"public void setClassName(String className) { this.className=className; }",
"@Test\n public void testSetName_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n String name = \"\";\n\n fixture.setName(name);\n\n }",
"@Override\r\n\t\tpublic void setClassName(String className)\r\n\t\t\t{\n\t\t\t\t\r\n\t\t\t}",
"@ApiModelProperty(required = true, value = \"The programmatic location of the test.\")\n public String getClassname() {\n return classname;\n }",
"@Before\n public void setNames() {\n super.setTestRobot(\"tkt.RedShift\");\n super.setEnemyRobot(\"sample.Tracker\");\n }",
"public void setClassname(String classname) {\n\t\tthis.classname = classname;\n\t}",
"public Builder setClassName(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n className_ = value;\n onChanged();\n return this;\n }",
"public void setClazzName(String clazz);",
"void setName(java.lang.String name);",
"void setName(java.lang.String name);",
"void setName(java.lang.String name);",
"private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }",
"public String getTestSetName() {\n return this.testSetName;\n }",
"public String getTestname() {\n return testname;\n }",
"public void testClassName() {\n\t\tClassName name = this.compiler.createClassName(\"test.Example\");\n\t\tassertEquals(\"Incorrect package\", \"generated.officefloor.test\", name.getPackageName());\n\t\tassertTrue(\"Incorrect class\", name.getClassName().startsWith(\"Example\"));\n\t\tassertEquals(\"Incorrect qualified name\", name.getPackageName() + \".\" + name.getClassName(), name.getName());\n\t}",
"public void setTestBedName(String testBedName) {\r\n\t\tthis.testBedName = testBedName;\r\n\t}",
"public String getTestClassName()\r\n {\r\n return target.getClass().getName();\r\n }",
"public void setName(String name) {\n\t\tName = name;\n\t}",
"public void testSetName_fixture5_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture5();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"@Test\n public void testSetName_1()\n throws Exception {\n LogicStep fixture = new LogicStep();\n fixture.setScript(\"\");\n fixture.setName(\"\");\n fixture.setOnFail(\"\");\n fixture.setScriptGroupName(\"\");\n fixture.stepIndex = 1;\n String name = \"\";\n\n fixture.setName(name);\n\n }",
"public void testSetName_fixture6_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture6();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String s) {\n\t\t\n\t\tname = s;\n\t}",
"protected void setName(String name) {\r\n this.name = name;\r\n }",
"@Test\r\n public void testSetfName() {\r\n System.out.println(\"setfName\");\r\n String fName = \"\";\r\n Student instance = new Student();\r\n instance.setfName(fName);\r\n \r\n }",
"public void setName(java.lang.String value) {\n this.name = value;\n }",
"public void setName(String s) {\n this.name = s;\n }",
"protected void setIntentClassName(Intent intent) {\n intent.setClassName(\n \"org.chromium.net.test.support\", \"org.chromium.net.test.EmbeddedTestServerService\");\n }",
"protected void setName(String name) {\n this.name = name;\n }",
"public void setClassName(String className) {\n this.className = className;\n }",
"void setName(String name_);",
"protected void setName(String name) {\n this._name = name;\n }",
"@Override\r\n public void setName(String name) {\n }",
"public void setName(String string) {\n\t\tthis.name = string;\n\t}",
"@Override\n\t\tpublic String getTestName() {\n\t\t\treturn null;\n\t\t}",
"public void setName(String value) {\n\t\tname = value;\n\t}",
"public void testSetName_fixture17_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture17();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String newname) {\n name=newname;\n }",
"public void setNameString(String s) {\n nameString = s;\r\n }",
"public final void setName(String name) {_name = name;}",
"public void testSetName_fixture26_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture26();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture18_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture18();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"@Test\n void setName() {\n }",
"public void setName(String newname)\n {\n name = newname;\n \n }",
"@Override\n public void setName(String name) {\n \n }",
"public String getTestBedName() {\r\n\t\treturn testBedName; \r\n\t}",
"public void testSetName_fixture27_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture27();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String value) {\n this.name = value;\n }",
"public void testSetName_fixture23_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture23();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture25_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture25();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void testSetName_fixture28_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture28();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}",
"@Override\n\tpublic void setName(String name) {\n\t\tsuper.setName(name);\n\t}",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"public void setName(String nm){\n\t\tname = nm;\n\t}",
"@Override\n public void setName(String name) {\n\n }",
"protected void setName(final String name) {\r\n\t\tthis.name = name;\r\n\t}",
"public void setName(String new_name){\n this.name=new_name;\n }",
"@Override\n public void setName(String name)\n {\n checkState();\n this.name = name;\n }",
"public void testSetName_fixture11_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture11();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String new_name) {\n\t\t_name = new_name;\n\t}",
"@Override\n\tpublic void setName( final String name )\n\t{\n\t\tsuper.setName( name );\n\t}",
"public void setClass (\r\n String strClass) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"@Test\n public void testSetName() {\n System.out.println(\"setName\");\n String name = \"Test\";\n Library instance = new Library();\n instance.setName(name);\n String result = instance.getName();\n assertEquals(name, result);\n }",
"public final void setName(java.lang.String name)\r\n\t{\r\n\t\tsetName(getContext(), name);\r\n\t}",
"void setMeasurementControllerClassName(String className);",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(String name) {\r\n this.name = name;\r\n }",
"public void setName(final String name);",
"public String getShortTestClassName()\r\n {\r\n return target.getClass().getSimpleName();\r\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"@Override\n public void setName(String name) {\n this.name = name;\n }",
"public static void set_SetName(String v) throws RuntimeException\n {\n UmlCom.send_cmd(CmdFamily.javaSettingsCmd, JavaSettingsCmd._setJavaSetNameCmd, v);\n UmlCom.check();\n \n _set_name = v;\n }",
"@Test\r\n public void testSetName() {\r\n\r\n }",
"public TestCase(String name) {\n\t\tsetName(name);\n\t}",
"@Override\n\tpublic void setName(String name) {\n\t\t\n\t}",
"@Test\n public void testSetProductName_1()\n throws Exception {\n Project fixture = new Project();\n fixture.setWorkloadNames(\"\");\n fixture.setName(\"\");\n fixture.setScriptDriver(ScriptDriver.SilkPerformer);\n fixture.setWorkloads(new LinkedList());\n fixture.setComments(\"\");\n fixture.setProductName(\"\");\n String productName = \"\";\n\n fixture.setProductName(productName);\n\n }",
"void setName(String name) {\r\n this.name = name;\r\n }",
"public void testSetName_fixture4_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture4();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}",
"public void setName(String string) {\n\t\t\n\t}",
"public TestCase(String name) {\n fName= name;\n }",
"protected final void setName(final String name) {\n this.name = name;\n }",
"@Test\n void setName() {\n\n }",
"public void testSetName_fixture15_1()\n\t\tthrows Exception {\n\t\tFolder fixture = getFixture15();\n\t\tString name = \"0123456789\";\n\n\t\tfixture.setName(name);\n\n\t\t// add additional test code here\n\t}"
]
| [
"0.69316024",
"0.6880945",
"0.6862441",
"0.6800897",
"0.6788997",
"0.6706271",
"0.6615386",
"0.64588165",
"0.6446639",
"0.6382791",
"0.637363",
"0.6308636",
"0.6297489",
"0.62692857",
"0.62484926",
"0.6212965",
"0.6188823",
"0.6117873",
"0.6113377",
"0.61079437",
"0.6082506",
"0.6051302",
"0.6046828",
"0.6041771",
"0.6041771",
"0.6041771",
"0.60131514",
"0.6003382",
"0.598056",
"0.5953595",
"0.59489006",
"0.59481007",
"0.59328574",
"0.5925854",
"0.5911339",
"0.5902608",
"0.5898517",
"0.58979475",
"0.5896036",
"0.5889034",
"0.588844",
"0.58779263",
"0.58767915",
"0.5870968",
"0.5866705",
"0.58654916",
"0.586288",
"0.5861755",
"0.58460844",
"0.5832635",
"0.5829404",
"0.5829113",
"0.5828777",
"0.5821959",
"0.5819679",
"0.58139515",
"0.5813786",
"0.5805109",
"0.5803752",
"0.580245",
"0.5801779",
"0.58016163",
"0.5801613",
"0.58012414",
"0.5779682",
"0.5776791",
"0.5776791",
"0.57747006",
"0.57747006",
"0.57718337",
"0.5761032",
"0.5757265",
"0.575387",
"0.5752605",
"0.5752432",
"0.57478225",
"0.5747457",
"0.5746306",
"0.5746001",
"0.57436764",
"0.5741893",
"0.5741713",
"0.5741713",
"0.5741713",
"0.574066",
"0.573929",
"0.57377017",
"0.57377017",
"0.57367224",
"0.57333404",
"0.5730432",
"0.5729286",
"0.5729245",
"0.572823",
"0.5726337",
"0.5725504",
"0.5725218",
"0.5724223",
"0.5723765",
"0.57190573"
]
| 0.7188525 | 0 |
TODO Handle item click | @Override public void onItemClick(View view, int position) {
UserDetails.chatWith = users.get(position).getUsername();
UserDetails.username = spu.getStringPreference(MainActivity.this,"Username");
UserDetails.password = spu.getStringPreference(MainActivity.this,"Password");
Intent i = new Intent(MainActivity.this,ChatActivity.class);
startActivity(i);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void itemClick(int pos) {\n }",
"@Override\n public void OnItemClick(int position) {\n }",
"@Override\n public void onItemClick(int pos) {\n }",
"void issuedClick(String item);",
"void clickItem(int uid);",
"abstract public void onSingleItemClick(View view);",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Log.w(TAG , \"POSITION : \" + position);\n\n itemClick(position);\n }",
"@Override\n public void onItemClicked(int itemPosition, Object dataObject) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\t\t\t\t\t\tint position, long id) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t}",
"@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n\n\t}",
"@Override\n public void onItemClick(View view, ListItem obj, int position) {\n }",
"@Override\n public void onItemClick(Nson parent, View view, int position) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n public void onClickItem(MeowBottomNavigation.Model item) {\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif (itemClicked != null)\n\t\t\t\t\titemClicked.OnItemClicked((BusinessType)item.getTag(), item);\n\t\t\t}",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\n\t}",
"void onChamaItemClicked(int position);",
"public void clickAddTopping(int itemIndex, ItemCart item);",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\r\n\t\t\t\t\t\tint position, long id) {\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\titemClickListener.Callback(itemInfo);\n\t\n\t\t\t}",
"@Override\r\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t\t\r\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\t}",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n public void onItemClick(View view, int position) {\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n\n\t}",
"@Override\n public void onClick(View view) {\n clickListener.onItemClicked(getBindingAdapterPosition());\n }",
"@Override\n public void onItemClick(View view, int position) {\n\n }",
"void onItemClick(int position);",
"@Override\n public void onClick(View v) {\n itemClickListener.itemClicked(movieId, v);\n }",
"void onClick(PropertyItem item);",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\n public void onItemClick(int position) {\n }",
"@Override\r\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\r\n\t\t\tlong id) {\n\r\n\t}",
"@Override\n public void onItemClick(View view, String data) {\n }",
"@Override\n\tpublic void onItemClick(Object o, int position) {\n\n\t}",
"void onItemClick(Note note);",
"@Override\n\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\tlong arg3) {\n\t\t\t\n\t\t}",
"@Override\n public boolean onMenuItemClick(MenuItem item) {\n return true;\n }",
"@Override\n public void onListItemClicked(int position) {\n\n }",
"@Override\n\t\t\t\t\t\t\t\tpublic void onClick(View arg0) {\n\t\t\t\t\t\t\t\t\tMainActivity sct = (MainActivity) act;\n\t\t\t\t\t\t\t\t\tsct.onItemClick(posit2, 11);\n\t\t\t\t\t\t\t\t}",
"@Override\n public void onItemClick(int pos, RvViewHolder holder) {\n }",
"@Override\n public void onClick(View view) {\n Log.d(TAG, \"Item clicked at position \" + getLayoutPosition());\n Log.d(TAG, \"Item clicked at position \" + getAdapterPosition());\n // this.selectOverlay.setVisibility(View.VISIBLE);\n this.leerClickedElementViewHolder.clickedElement(\n new ItemBT(this.nombreItemBT.getText().toString(),this.macItemBT.getText().toString(),this.isVinculado==TYPE_VINCULADO)\n );\n\n }",
"@Override\n public void OnItemClick(View view, int postion) {\n Intent intent = new Intent(MyPubishActivity.this, IndexDetailActivity.class);\n String entryId = String.valueOf(publishList.get(postion).getItem_id());\n intent.putExtra(\"entryId\", entryId);\n startActivity(intent);\n }",
"@Override\n public void onClick(View v) {\n listener.onItemClick(v, position);\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\t\t\t\t\tlong arg3) {\n\t\t\t}",
"@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tracks, getAdapterPosition());\n }",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\t\t\n\t}",
"@Override\n\tpublic void onItemClick(AdapterView<?> parent, View view, int position,\n\t\t\tlong id) {\n\n\t}",
"@Override\n public void onItemClick(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n Item item = (Item) mItems.get(arg2);\n Intent intent = new Intent(this, ItemDetailActivity.class);\n intent.putExtra(\"TITLE\", item.getTitle());\n intent.putExtra(\"DESCRIPTION\", item.getDescription());\n intent.putExtra(\"DATE\", item.getDate());\n intent.putExtra(\"LINK\", item.getLink());\n startActivity(intent);\n }",
"@Override\n public void onClick(View v) {\n this.itemClickListener.onItemClick(v, getLayoutPosition());\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n }",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\t\t\t}",
"void onItemClick(View view, int position);",
"public void onItemClick(View view, int position);",
"void onClick(View item, View widget, int position, int which);",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\n\t\t\t\t\tlong arg3) {\n\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> arg0, View arg1, int arg2,\r\n\t\t\t\t\tlong arg3) {\n\r\n\t\t\t}",
"@Override\n public void onItemClick(AdapterView<?> adapterView, View view, int i, long l) {\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View v, int pos, long id) {\n\t\t\t\tSystem.out.println(\"Selected \" + pos);\n\t\t\t}",
"@Override\n public void onItemClick(View view, int position){\n }",
"public void onClickNom(Personne item, int position);",
"@Override\n public boolean onActionItemClicked(ActionMode mode, MenuItem item) {\n\n\n return true;\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view,\n int position, long id) {\n Intent i = new Intent(CRA.this,\n SingleItemView.class);\n // Pass data \"name\" followed by the position\n i.putExtra(\"name\", ob.get(position).getString(\"name\")\n .toString());\n // Open SingleItemView.java Activity\n startActivity(i);\n }",
"@Override\r\n\t\t\tpublic void onItemClick(AdapterView<?> adapter, View view, int position,\r\n\t\t\t\t\tlong arg3) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void onItemClicked(RecyclerView recyclerView, int position, View v) {\n }",
"@Override\n\tpublic void viewItem() {\n\t\t\n\t}",
"@Override\n public void onClick(View v) {\n if (mListener != null){\n mListener.onItemClick(itemView, getLayoutPosition());\n }\n }",
"@Override\n public void onItemClick(BaseQuickAdapter adapter, View view, int position) {\n }",
"@Override\n public void onClick(View v) {\n if (listener != null)\n listener.onItemClick(itemView, getPosition());\n }",
"public void onItemClick(View view, int position) {\n\n }",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n selectItem(position);\n }",
"public interface ItemClickListener {\n void itemClicked(long feedItemId, View view);\n }",
"@Override\r\n public void onClick(View view) {\n Intent intent = new Intent(context, DetailActivity.class);\r\n intent.putExtra(\"item\", itemList.get(position));\r\n context.startActivity(intent);\r\n }",
"@Override\n public void onClick(View v) {\n customItemClickListener.onItemClick(inflatedView, holder.getAdapterPosition());\n }",
"@Override\n public void onClick(View view) {\n clearItemData();\n set_view_for(1);\n getSellMenuId();\n\n\n }",
"@Override\r\n\tpublic void clicked(ItemMenuIcon icon, Player p) {\n\t\t\r\n\t}",
"@Override\n public void onItemClick(AdapterView<?> parent, View view, int position, long id) {\n Toast.makeText(this, \"ITEM CLICKED\", Toast.LENGTH_SHORT).show();\n }",
"@Override\n public void onItemClick(View view, int position) {\n try {\n\n getItemInfo(view, position);\n\n } catch (Exception e) {\n\n }\n// String details=menuItems.get(position).getF1();\n// if(details!= null)\n// updateItemsDetails(details,view,position);\n\n\n }"
]
| [
"0.8194031",
"0.8038467",
"0.78200257",
"0.7738836",
"0.7697011",
"0.76394415",
"0.7593405",
"0.75824976",
"0.7565778",
"0.7565778",
"0.7565778",
"0.7565778",
"0.7565778",
"0.7544339",
"0.7514702",
"0.7469693",
"0.7469693",
"0.7452618",
"0.7443529",
"0.7439108",
"0.7439108",
"0.7439108",
"0.7438226",
"0.7430721",
"0.7430721",
"0.73992825",
"0.7392082",
"0.73437905",
"0.73437905",
"0.73218685",
"0.73218685",
"0.73168004",
"0.7311881",
"0.7298268",
"0.7284784",
"0.72788346",
"0.7266114",
"0.7261286",
"0.7253908",
"0.72409546",
"0.7238684",
"0.7226444",
"0.72191244",
"0.72191244",
"0.7213195",
"0.7213195",
"0.72095037",
"0.720348",
"0.7202143",
"0.7180523",
"0.7176758",
"0.71756107",
"0.71756107",
"0.71610093",
"0.7160606",
"0.715605",
"0.71504545",
"0.7143446",
"0.71431494",
"0.71401477",
"0.71243733",
"0.71022886",
"0.7101107",
"0.71005225",
"0.7099056",
"0.7098306",
"0.7092895",
"0.7090862",
"0.7071955",
"0.70710915",
"0.7070429",
"0.7066862",
"0.7066862",
"0.70530057",
"0.70415735",
"0.70411336",
"0.7036363",
"0.70339555",
"0.70339555",
"0.7026672",
"0.7013406",
"0.70086664",
"0.7006063",
"0.6962303",
"0.69587976",
"0.69560105",
"0.69471854",
"0.69392",
"0.69238293",
"0.69232357",
"0.6922399",
"0.69212306",
"0.6918971",
"0.6917012",
"0.690498",
"0.69048035",
"0.6888991",
"0.68556577",
"0.6844196",
"0.68309563",
"0.6826532"
]
| 0.0 | -1 |
Solo per testare l'applicazione senza i database | private void testDB(){
DB=new LinkedList<>();
DB.add(new Offer("ID1","AGV923","Nico","Leo","Salvo",""));
DB.add(new Offer("ID2","ADJ325","Tizio", "Caio", "Sempronio",""));
DB.add(new Offer("ID3","T56G2G","Antonella", "Daniele","",""));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testEsegui() throws MainException {\n System.out.println(\"esegui\");\n String SQLString = \"insert into infermieri (nome, cognome) values ('Luca', 'Massa')\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n boolean expResult = true;\n boolean result = instance.esegui(SQLString);\n assertEquals(expResult, result);\n }",
"@Test\r\n public void testToevoegenVriendschap() {\r\n try{\r\n accountDB.toevoegenAccount(account);\r\n accountDB.toevoegenAccount(vriend);\r\n vriendDB.toevoegenVriendschap(account.getLogin(), vriend.getLogin());\r\n \r\n Vriendschap ophaalVriendschap = vriendDB.zoekVriendschap(account.getLogin(), vriend.getLogin());\r\n Account ophaalAcc = accountDB.zoekAccountOpLogin(ophaalVriendschap.getAccountlogin());\r\n Account ophaalVriend = accountDB.zoekAccountOpLogin(ophaalVriendschap.getAccountvriendlogin());\r\n \r\n assertEquals(\"Defoort\", ophaalAcc.getNaam());\r\n assertEquals(\"Mieke\", ophaalAcc.getVoornaam());\r\n assertEquals(\"miekedefoort\", ophaalAcc.getLogin());\r\n assertEquals(\"wachtwoord123\", ophaalAcc.getPaswoord());\r\n assertEquals(\"[email protected]\", ophaalAcc.getEmailadres());\r\n assertEquals(Geslacht.V, ophaalAcc.getGeslacht());\r\n \r\n assertEquals(\"Petersen\", ophaalVriend.getNaam());\r\n assertEquals(\"Peter\", ophaalVriend.getVoornaam());\r\n assertEquals(\"peterpetersen\", ophaalVriend.getLogin());\r\n assertEquals(\"wachtwoord12345\", ophaalVriend.getPaswoord());\r\n assertEquals(\"[email protected]\", ophaalVriend.getEmailadres());\r\n assertEquals(Geslacht.M, ophaalVriend.getGeslacht());\r\n \r\n vriendDB.verwijderenVriendschap(account.getLogin(), vriend.getLogin());\r\n }catch(DBException ex){\r\n System.out.println(\"testToevoegenVriendschap - \" + ex);\r\n }\r\n }",
"@Test\r\n\tpublic void CT01ConsultarUsuario_com_sucesso() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\tUsuario resultadoObtido = null;\r\n\t\tDAOFactory mySQLFactory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);\r\n\t\tIUsuarioDAO iUsuarioDAO = mySQLFactory.getUsuarioDAO();\r\n\t\t// acao\r\n\t\tresultadoObtido = iUsuarioDAO.consulta(usuario.getRa());\r\n\t\t// verificacao\r\n\t\tassertTrue(resultadoObtido.equals(usuario));\r\n\t}",
"@Before\n public void inicializaBaseDatos() throws Exception {\n app = Helpers.fakeApplication(settings());\n databaseTester = new JndiDatabaseTester(\"DefaultDS\");\n IDataSet initialDataSet = new FlatXmlDataSetBuilder().build(new\n FileInputStream(\"test/resources/tareas_dataset_1.xml\"));\n databaseTester.setDataSet(initialDataSet);\n databaseTester.onSetup();\n }",
"@Test\n public void create1Test2() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.create1(true,true,true,true,true,true,true);\n Servizio servizio = manager.retriveById(5);\n assertNotNull(servizio,\"Should return true if create Servizio\");\n }",
"@Test\n public void create1Test1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.create1(false,false,false,false,false,false,false);\n Servizio servizio = manager.retriveById(5);\n assertNotNull(servizio,\"Should return true if create Servizio\");\n }",
"@Test\n public void create2Test() throws SQLException {\n manager = new TableServizioManager(mockDb);\n manager.create2(false,true,false,true,false,false,true);\n Servizio servizio = manager.retriveById(5);\n assertNotNull(servizio,\"Should return true if create Servizio\");\n }",
"public void firstTest() throws SQLException, ServicesException{\n Connection conn=getConnection();\n Statement stmt=conn.createStatement();\n Services servicios = Services.getInstance(\"h2-applicationconfig.properties\");\n PrestamoUsuario prestamo =null;\n try {\n //Insercion en BD\n stmt.execute(\"INSERT INTO ROLES(rol) values ('estudiante')\");\n stmt.execute(\"INSERT INTO USUARIOS (id,nombre,correo,contrasena) VALUES (124,'PEDRO PEREZ','[email protected]','1test1')\");\n stmt.execute(\"INSERT INTO ROLES_USUARIOS(USUARIOS_id,ROLES_rol) values (124,'estudiante')\");\n stmt.execute(\"INSERT INTO MODELOS (nombre,clase,vidaUtil,valor,seguro,foto) values ('modelo1','abcd',100,200000,true,null)\"); \n stmt.execute(\"INSERT INTO EQUIPOS (serial,nombre,placa,marca,descripcion,estado,subestados,proveedor,Modelos_nombre) VALUES (123,'Multimetro',456,'falsa','Equipo funcional y de buena calidad','activo','almacen','Leonardo Herrera','modelo1')\");\n stmt.execute(\"INSERT INTO PRESTAMOS (USUARIOS_id,EQUIPOS_serial,fechaExpedicion,fechaVencimiento,tipoPrestamo) VALUES (124,123,'2015-01-01 00:00:00',null,'prestamo diario')\");\n conn.commit();\n conn.close(); \n } catch (SQLException ex) {\n Logger.getLogger(DevolucionTest.class.getName()).log(Level.SEVERE, null, ex);\n conn.rollback();\n conn.close();\n }\n Set<PrestamoUsuario> prestamos = servicios.loadPrestamos();\n for (PrestamoUsuario p:prestamos){\n \n }\n }",
"@Test\n public void updateTest7() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }",
"@Test\n public void testProductos() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM productos\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table productos exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'productos' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test\r\n public void testVerwijderenVriendschap(){\r\n try{\r\n accountDB.toevoegenAccount(account);\r\n accountDB.toevoegenAccount(vriend);\r\n vriendDB.toevoegenVriendschap(account.getLogin(), vriend.getLogin());\r\n \r\n vriendDB.verwijderenVriendschap(account.getLogin(), vriend.getLogin());\r\n \r\n Vriendschap ophaalVriendschap = vriendDB.zoekVriendschap(account.getLogin(), vriend.getLogin());\r\n assertNull(ophaalVriendschap);\r\n \r\n }catch(DBException ex){\r\n System.out.println(\"testVerwijderenVriendschap - \" + ex);\r\n }\r\n }",
"private void criarConexao(){\n try{\n testeOpenHelper = new TesteOpenHelper(this);\n conexao = testeOpenHelper.getWritableDatabase();\n Toast.makeText(this,\"Conexao executada com sucesso\", Toast.LENGTH_SHORT).show();\n produtoRepositorio = new ProdutoRepositorio(conexao);\n }catch(SQLException e){\n AlertDialog.Builder dlg = new AlertDialog.Builder(this);\n dlg.setTitle(\"Erro\");\n dlg.setMessage(e.getMessage());\n dlg.setNeutralButton(\"Ok\", null);\n dlg.show();\n Toast.makeText(this,\"ERRO na conexao\", Toast.LENGTH_LONG).show();\n }\n }",
"@Test\n public void updateTest8() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCanoa(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCanoa() ,\"Should return true if update Servizio\");\n }",
"@Test\n public void testCorte_de_caja() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM corte_caja\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table corte_caja exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'corte_caja' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test\r\n\tpublic void testCheckLogininDB() {\r\n\t\tt1.checkLogininDB(\"one\", \"two\");\r\n\t\tt1.checkLogininDB(\"user\", \"two\");\r\n\t}",
"@Test\n public void testPrueba() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM prueba\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table prueba exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toYellow(\"[WARNING]\") + \" Table 'prueba' does not exist, needed by ServerTest!!\");\n System.out.println(Colors.toBlue(\"[INFO]\") + \" Table prueba will be created.\");\n try {\n conn.createStatement().executeUpdate(\"CREATE TABLE prueba (id INT AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(255))\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table prueba created.\");\n } catch (SQLException e1) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table prueba could not be created.\");\n System.out.println(Colors.toBlue(\"[INFO]\") + \" Create it manually by running: CREATE TABLE prueba (id INT AUTO_INCREMENT PRIMARY KEY, nombre VARCHAR(255))\");\n Assert.fail(e1.getMessage());\n }\n }\n }",
"@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testVerificaEmailJaCadastradoMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\t\n\t\tusuario.setNome(\"Eduardo\");\n\t\tList<Usuario> usuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t\tAssert.assertEquals(usuarios.get(0).getNome(), \"Eduardo Ayres\");\n\t\t\n\t\tusuario = new Usuario();\n\t\tusuario.setEmail(\"eduardo@\");\n\t\tusuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t}",
"@Test\r\n\tpublic void CT01ValidaConexao_com_sucesso() {\r\n\t\tassertNotNull(\"valida a conexao =>\", DAOFactory.criaConexao());\r\n\t}",
"@Test\r\n\tpublic void addToDb() {\r\n\t\tservice.save(opinion);\r\n\t\tassertNotEquals(opinion.getId(), 0);\r\n\t\tassertTrue(service.exists(opinion.getId()));\r\n\t}",
"@Test\n public void testObtenerControladorUsuario() throws Exception {\n System.out.println(\"obtenerControladorUsuario\");\n Fabrica instance = Fabrica.getInstance();\n IControladorUsuario icu = instance.obtenerControladorUsuario();\n \n //Damos de alta un cliente\n Date date = new Date(1988, 12, 05);\n DataDireccion direccion = new DataDireccion(\"Pedernal\",\"2145\",\"2\");\n icu.CargarDatosUsuario(\"Jose\",\"[email protected]\", \"pepe\", \"pepe123\",direccion,\"Villa\",date, \"/home/jose/d.png\");\n icu.altaUsuario();\n \n boolean existe = true;\n existe = icu.existeUsuario(\"pepe\",\"[email protected]\"); \n assertTrue(existe);\n \n DataDireccion dire = new DataDireccion(\"Rivera\",\"2000\",\"0\");\n String [] rutaImagen = {\"/home/jose/imagenes/a.png\",\"/home/jose/imagenes/b.png\"}; \n icu.seleccionarCategoria(\"Minutas\");\n \n icu.CargarDatosUsuario(\"elrey\",\"[email protected]\", \"El rey de las minutas\", \"elrey123\", dire, rutaImagen);\n icu.altaUsuario();\n existe = icu.existeUsuario(\"elrey\",\"[email protected]\"); \n assertTrue(existe);\n \n /*ArrayList<DataCliente> dcResult = icu.listarClientes();\n ArrayList<DataCliente> dcExpResult = new ArrayList<>();\n \n DataCliente dc = new DataCliente(\"Villa\", date,\"/home/jose/d.png\", \"pepe\", \"[email protected]\",\"Jose\", \"pepe123\", direccion);\n dcExpResult.add(dc);\n for(int x=0; x<dcResult.size(); x++)\n {\n \n assertTrue(dcExpResult.get(x).getApellido().equals(dcResult.get(x).getApellido()));\n assertTrue(dcExpResult.get(x).getMail().equals(dcResult.get(x).getMail()));\n assertTrue(dcExpResult.get(x).getRutaImagen().equals(dcResult.get(x).getRutaImagen()));\n }\n \n boolean exption = false;\n String [] rutaImagen = {\"/home/jose/imagenes/a.png\",\"/home/jose/imagenes/b.png\"}; \n try { \n icu.CargarDatosUsuario(\"elrey\",\"[email protected]\", \"El rey de las minutas\", \"elrey123\", direccion, rutaImagen);\n } catch (Exception ex) { \n exption = true;\n }\n assertTrue(exption);*/\n \n \n \n \n}",
"@Test\n\tpublic void testExistsDB() throws Exception {\n\t\tassertExists(\"The Rodin database should exist\", rodinDB);\n\t}",
"private void connectDatabase(){\n }",
"@Test\n public void testConnectionEchec() {\n try {\n dao.seConnecter(loginInvalide, mdpValide);\n Assert.fail(\"c'est pas normal...\");\n } catch (QualitException paramE) {\n Assert.assertEquals(\n QualitEnum.PROBLEME_IDENTIFICATION,\n paramE.getCodeErreur());\n }\n }",
"@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testLoginMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\tusuario.setEmail(\"[email protected]\");\n\t\tusuario.setSenha(\"admin\");\n\t\t\n\t\tusuario = usuarioService.login(usuario);\n\t\tAssert.assertEquals(usuario.getEmail(), \"[email protected]\");\n\t\tAssert.assertEquals(usuario.getSenha(), \"$2a$10$2Ew.Cha8uI6sat5ywCnA0elRRahr91v4amVoNV5G9nQwMCpI3jhvO\");\n\t}",
"@Test\r\n public void testRead() throws Exception {\r\n System.out.println(\"read\");\r\n int idbureau = 0;\r\n BureauDAO instance = new BureauDAO();\r\n instance.setConnection(dbConnect);\r\n Bureau obj = new Bureau(0,\"Test\",\"000000000\",\"\");\r\n Bureau expResult = instance.create(obj);\r\n idbureau=expResult.getIdbur();\r\n Bureau result = instance.read(idbureau);\r\n assertEquals(\"sigles différents\",expResult.getSigle(), result.getSigle());\r\n assertEquals(\"tel différents\",expResult.getTel(), result.getTel());\r\n //etc\r\n assertEquals(\"id différents\",expResult.getIdbur(),result.getIdbur());\r\n try{\r\n result=instance.read(0);\r\n fail(\"exception d'id inconnu non générée\");\r\n }\r\n catch(SQLException e){}\r\n instance.delete(result);\r\n }",
"@Before\n public void createDatabase() {\n dbService.getDdlInitializer()\n .initDB();\n kicCrud = new KicCrud();\n }",
"@Test\n public void testeCadastrarSenhaFraca(){\n String senha3 = \"12345\";\n TestToolsCadUser.preencherEclicar(this.mNome,this.mEmail, senha3, senha3);\n TestTools.checarToast(R.string.erro_cadastro_senha_invalida_Toast);\n }",
"private Conexao() {\r\n\t\ttry {\r\n\t\t\tconnection = DriverManager.getConnection(\"jdbc:hsqldb:mem:.\", \"sa\", \"\");\r\n\t\t\tnew LoadTables().creatScherma(connection);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"Erro ao conectar com o banco: \"+e.getMessage());\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"@Test\n public void testCaja() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM caja\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table caja exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'caja' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test\n public void useAppContext() {\n Context appContext = InstrumentationRegistry.getInstrumentation().getTargetContext();\n\n assertEquals(\"it.fmt.games.reversi.android\", appContext.getPackageName());\n\n AppDatabase dataSource = Room.databaseBuilder(ReversiApplication.getContext(),\n AppDatabase.class, \"played_matches.db\")\n .build();\n\n PlayedMatch match = new PlayedMatch();\n match.player1 = \"player1\";\n match.player2 = \"player1\";\n match.gameStatus = GameStatus.PLAYER1_WIN;\n match.date = new Date();\n match.player1Score = 20;\n match.player2Score = 1;\n match.winner = true;\n\n long id = dataSource.userDao().insert(match);\n Timber.i(\"match inserted with id %s \", id);\n dataSource.close();\n }",
"@Test\n public void testUsuarios() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM usuarios\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table usuarios exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'usuarios' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@Test\n\tpublic void testConsultarPorTipo() {\n\t\tList<Dispositivo> dispositivos = new ArrayList<Dispositivo>();\n\t\tint idTipo = 1;\n\t\ttry {\n\t\t\tdispositivos = dispositivoBL.consultarPorTipo(idTipo);\n\t\t\tassertTrue(dispositivos.size() > 0);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"@Test\n public void consegueAbrirBaseDados() {\n Context appContext = getTargetContext();\n\n BdItemsOpenHelper openHelper = new BdItemsOpenHelper(appContext);\n SQLiteDatabase bditems = openHelper.getReadableDatabase();\n assertTrue(bditems.isOpen());\n bditems.close();\n }",
"@ActionKey(\"db\")\n\tpublic void testDB() {\n\t\tUser user = User.dao.findById(1, \"qword_id\");\n\t\trenderText(\"data in database:\" + user.getStr(\"qword_id\"));\n\t\t\n\t}",
"@Test\n public void shouldConnectToDB()\n {\n assertTrue(DatabaseHelper.checkConnection());\n }",
"@Test\n public void testConsultarPelaChave() throws Exception {\n System.out.println(\"consultarPelaChave\");\n String chave = \"\";\n ConfiguracaoTransferencia result = instance.consultarPelaChave(chave);\n assertNotNull(result);\n }",
"@Test\n public void testAddprof_curso() {\n System.out.println(\"addprof_curso\");\n int codprof = 0;\n int codcurso = 0;\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.addprof_curso(codprof, codcurso);\n assertEquals(expResult, result);\n \n }",
"@Test\n @Ignore\n public void connectToDatabaseTest() throws SQLException {\n\n DBCConnection connection = new DBCConnection(\"jdbc:mariadb://mysql2.csse.canterbury.ac.nz/seng302-2018-team600-test\", \"seng302-team600\", \"TailspinElla4435\");\n List<String> result = connection.executeSanatizedStatement(\"SELECT * FROM Users WHERE username='ABC1234'\");\n Assert.assertEquals(\"| ABC1234 | Sweeny | null | Todd | password | 1 | 2018-05-16 23:31:22.0 | 1 |\", result.get(0));\n }",
"public static boolean testDaoLireOffrir() {\n boolean ok = true;\n ArrayList<Echantillon> lesEchantillons = new ArrayList<Echantillon>();\n try {\n lesEchantillons = daoOffrir.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des échantillons\");\n for (Echantillon unEchantillon: lesEchantillons){\n System.out.println(unEchantillon);\n }\n return ok;\n }",
"public static boolean testDaoLirePraticien() {\n boolean ok = true; \n ArrayList<Praticien> lesPraticiens = new ArrayList<Praticien>();\n try {\n lesPraticiens = daoPraticien.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des praticiens\");\n for (Praticien unPraticien: lesPraticiens){\n System.out.println(unPraticien);\n }\n return ok;\n \n }",
"private boolean inDatabase() {\r\n \t\treturn inDatabase(0, null);\r\n \t}",
"@Test\n public void testRepositoryControl(){\n String databaseUrl = \"jdbc:h2:mem:fivet_db\";\n\n //Connection source: autoclose with the try/catch\n try(ConnectionSource connectionSource = new JdbcConnectionSource(databaseUrl)){\n\n //Create table Persona\n TableUtils.createTableIfNotExists(connectionSource, Persona.class);\n //Create table Ficha\n TableUtils.createTableIfNotExists(connectionSource, Ficha.class);\n //Create table Control\n TableUtils.createTableIfNotExists(connectionSource, Control.class);\n //Insert Personas on the table\n Repository<Persona,Long> theRepoPersona = new RepositoryOrmLite<>(connectionSource,Persona.class);\n\n Repository<Ficha,Long> repoFicha = new RepositoryOrmLite<>(connectionSource,Ficha.class);\n //Repository Control\n Repository<Control,Long> repoControl = new RepositoryOrmLite<>(connectionSource,Control.class);\n\n //Instanciar a Duenio\n Persona duenio = new Persona(\"Gerald\",\"Lopez\",\"198221287\",\"Malleco 1204\",55222222,944707039,\"[email protected]\");\n\n if(!theRepoPersona.create(duenio)){\n Assertions.fail(\"Can't insert persona\");\n }\n\n //Instanciar una ficha\n Ficha ficha = new Ficha(123, ZonedDateTime.now(),\"Firulais\",\"Canino\",\"Rottweiler\", Sexo.MACHO,\"Negro\", Tipo.INTERNO,duenio);\n\n if(!repoFicha.create(ficha)){\n Assertions.fail(\"Can't create ficha\");\n }\n\n Ficha ficha1 = repoFicha.findById(1L);\n\n //Instanciar a Veterinario\n Persona vet = new Persona(\"Mauricio\",\"Contreras\",\"116002825\",\"Av Argentina 0351\",55111111,987654321,\"[email protected]\");\n\n if(!theRepoPersona.create(vet)){\n Assertions.fail(\"Can't insert persona\");\n }\n\n //Instancia of Control\n Control control = new Control(ZonedDateTime.now(),ZonedDateTime.now(),36,40,68,\"Dado de alta\",vet,ficha1);\n\n //Crear un control via repositorio\n if(!repoControl.create(control)){\n Assertions.fail(\"Can't create control\");\n }\n\n\n log.debug(\"Control: {}.\", Entity.toString(control));\n\n log.debug(\"Ficha: {}\",Entity.toString(ficha1));\n\n\n\n\n } catch (SQLException | IOException exception){\n throw new RuntimeException(exception);\n }\n\n\n }",
"@Test\n public void shouldCreateEpiDataTravel() {\n assertThat(DatabaseHelper.getEpiDataTravelDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataTravel(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataTravelDao().queryForAll().size(), is(1));\n }",
"public static void test()\n\t{\n\t Environment myDbEnvironment = null;\n\t Database myDatabase = null;\n\n\t /* OPENING DB */\n\n\t // Open Database Environment or if not, create one.\n\t EnvironmentConfig envConfig = new EnvironmentConfig();\n\t envConfig.setAllowCreate(true);\n\t myDbEnvironment = new Environment(new File(\"db/\"), envConfig);\n\n\t // Open Database or if not, create one.\n\t DatabaseConfig dbConfig = new DatabaseConfig();\n\t dbConfig.setAllowCreate(true);\n\t dbConfig.setSortedDuplicates(true);\n\t myDatabase = myDbEnvironment.openDatabase(null, \"schema\", dbConfig);\n\n\t Cursor cursor = null;\n\t /* GET <K,V > FROM DB */\n\t DatabaseEntry foundKey = new DatabaseEntry();\n\t DatabaseEntry foundData = new DatabaseEntry();\n\n\t cursor = myDatabase.openCursor(null, null);\n\t cursor.getFirst(foundKey, foundData, LockMode.DEFAULT);\n\n\t do {\n\t try {\n\t String keyString = new String(foundKey.getData(), \"UTF-8\");\n\t String dataString = new String(foundData.getData(), \"UTF-8\");\n\t System.out.println(\"<\" + keyString + \", \" + dataString + \">\");\n\t } catch (UnsupportedEncodingException e) {\n\t e.printStackTrace();\n\t }\n\t } while (cursor.getNext(foundKey, foundData, LockMode.DEFAULT) == OperationStatus.SUCCESS);\n\t if (cursor != null) cursor.close();\n\t System.out.println(\"-----\");\n\t \n\t if (myDatabase != null) myDatabase.close();\n\t if (myDbEnvironment != null) myDbEnvironment.close();\n\t}",
"public void testExecuteSQL() {\n\t\tsqlExecUtil.setDriver(\"com.mysql.jdbc.Driver\");\n\t\tsqlExecUtil.setUser(\"root\");\n\t\tsqlExecUtil.setPassword(\"\");\n\t\tsqlExecUtil.setUrl(\"jdbc:mysql://localhost/sysadmin?autoReconnect=true&useUnicode=true&characterEncoding=gb2312\");\n\t\tsqlExecUtil.setSqlText(\"select * from t_role\");\n\t\tsqlExecUtil.executeSQL();\n\t\t\n\t\tsqlExecUtil.setSqlText(\"select * from t_user\");\n\t\tsqlExecUtil.executeSQL();\n\t}",
"@Test\n\tpublic void sapHanaJDBCtest() {\n\t\tString model = \"sapHanaModel\";\n\t\timportHelper.importModelJDBC(PROJECT_NAME_JDBC, model, ConnectionProfileConstants.SAP_HANA, \"BQT1/TABLE/SMALLA,BQT1/TABLE/SMALLB\", false);\n\t\t\n\t\t// TODO temp till hana translator is not set automatically (updated checkImportedTablesInModel method)\n\t\tassertTrue(new ModelExplorer().containsItem(PROJECT_NAME_JDBC,model + \".xmi\", \"SMALLA\"));\n\t\tassertTrue(new ModelExplorer().containsItem(PROJECT_NAME_JDBC,model + \".xmi\", \"SMALLB\"));\n\t\t\n\t\tString vdb_name = \"Check_\" + model;\n\t\tVdbWizard.openVdbWizard()\n\t\t\t\t.setLocation(PROJECT_NAME_JDBC)\n\t\t\t\t.setName(vdb_name)\n\t\t\t\t.addModel(PROJECT_NAME_JDBC, model)\n\t\t\t\t.finish();\n\t\t\n\t\tVdbEditor.getInstance(vdb_name + \".vdb\").setModelTranslator(model + \".xmi\", model, \"hana\");\n\t\tVdbEditor.getInstance(vdb_name + \".vdb\").save();\n\t\t\n\t\tnew ModelExplorer().deployVdb(PROJECT_NAME_JDBC, vdb_name);\n\n\t\tTeiidJDBCHelper jdbcHelper = new TeiidJDBCHelper(teiidServer, vdb_name);\n\t\tString[] tables = new String[] { \"SMALLA\", \"SMALLB\" };\n\t\tfor (int i = 0; i < tables.length; i++) {\n\t\t\tString previewSQL = \"select * from \\\"\" + model + \"\\\".\\\"\" + tables[i] + \"\\\"\";\n\t\t\tassertTrue(jdbcHelper.isQuerySuccessful(previewSQL,true));\n\t\t}\t\t\n\t\t//checkImportedTablesInModel(model, \"SMALLA\", \"SMALLB\");\n\t}",
"@Test\n public void testVentas() {\n try {\n conn.createStatement().executeQuery(\"SELECT * FROM ventas\");\n System.out.println(Colors.toGreen(\"[OK]\") + \" Table ventas exists.\");\n } catch (SQLException e) {\n System.out.println(Colors.toRed(\"[FAIL]\") + \" Table 'ventas' does not exist.\");\n Assert.fail(e.getMessage());\n }\n }",
"@BeforeClass\n public static void setup() {\n getDatabase(\"mandarin\");\n }",
"public boolean inserisciAppuntamento(Appuntamento a) {\r\n\t\tboolean ret = false;\r\n\t\tStatement stmt;\r\n\t\tString query = \"INSERT INTO appuntamento(\tnome, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"cognome, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ora, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"descrizione, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"contatto, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"stato) \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"VALUES (\t'\" + a.getNome() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getCognome() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getData() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getOra() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getDescrizione() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getContatto() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getStato() + \"')\";\r\n\t\t\r\n\t\tif(!isConnected) {\r\n\t\t\tSystem.err.println(\"AppuntamentoManager.inserisciAppuntamento() - nessuna connessione al db attiva!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(a == null || a == APPUNTAMENTO_VUOTO || !verificaAppuntamento(a)) {\r\n\t\t\tSystem.err.println(\"AppuntamentoManager.inserisciAppuntamento() - l'Appuntamento passato non � valido.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\tstmt.executeUpdate(query);\r\n\t\t\tret = true;\r\n\t\t}\r\n\t\tcatch(SQLException ex) {\r\n\t\t\tSystem.err.print(\"SQLException: \");\r\n\t\t\tSystem.err.println(ex.getMessage());\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"@Before\n public void setUp() {\n DB.sql2o = new Sql2o(\"jdbc:postgresql://localhost:5432/hair_salon_test\", \"alexander\", \"1234\");\n }",
"@Test\n\tpublic void test() {\n\t\tmyPDO pdo = myPDO.getInstance();\n\t\tString sql = \"INSERT INTO `RESTAURANT` (`NUMRESTO`,`MARGE`,`NBSALLES`,`NBEMPLOYEE`,`ADRESSE`,`PAYS`,`NUMTEL`,`VILLE`,`CP`) VALUES (?,?,?,?,?,?,?,?,?)\";\n\t\tpdo.prepare(sql);\n\t\tObject[] data = new Object[9];\n\t\tdata[0] = null;\n\t\tdata[1] = 10;\n\t\tdata[2] = 2;\n\t\tdata[3] = 2;\n\t\tdata[4] = \"test\";\n\t\tdata[5] = \"France\";\n\t\tdata[6] = \"0656056560\";\n\t\tdata[7] = \"reims\";\n\t\tdata[8] = \"51100\";\n\t\tpdo.execute(data,true);\n\t}",
"@Test\n @Order(1)\n void TC_UTENTE_DAO_1()\n {\n\n /*creo uno username valido*/\n Utente utente = new Utente();\n utente.setUsername(\"utenteTest1\");\n utente.setPassword(\"password\");\n utente.setNome(\"Test\");\n utente.setCognome(\"Test\");\n utente.setNazionalità(\"italiana\");\n utente.setEmail(\"[email protected]\");\n UtenteDAO utenteDAO = new UtenteDAO();\n\n assertTrue(utenteDAO.doSave(utente));\n }",
"@Test\r\n public void testGGetContratistas() {\r\n System.out.println(\"getContratistas\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> result = instance.getContratistas();\r\n \r\n assertFalse(result.isEmpty());\r\n }",
"private void insertTestUsers() {\n\t\tinitDb();\n\t\tinsertUser(\"aaa\", \"11\");\n\t\tinsertUser(\"bbb\", \"22\");\n\t\tinsertUser(\"ccc\", \"33\");\n\t}",
"public void testExisteProjeto() {\n String nome = \"projetoNaoExistente\";\n assertFalse(ProjetoDAO.existeProjeto(nome));\n }",
"@Test(expected = QualitException.class)\n public void testConnectionEchecE() throws QualitException {\n dao.seConnecter(loginInvalide, mdpValide);\n }",
"@Test\n\tpublic void testConsultarTodos() {\n\t\tList<Dispositivo> dispositivos = new ArrayList<Dispositivo>();\n\t\ttry {\n\t\t\tdispositivos = dispositivoBL.consultarTodos();\n\t\t\tassertTrue(dispositivos.size() > 0);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void almacenoDatos(){\n BaseDatosSecundaria administrador= new BaseDatosSecundaria(this);\n SQLiteDatabase bdsecunadaria= administrador.getWritableDatabase();\n _valuesPedido.put(\"Producto\", this._productoNombre);\n _valuesPedido.put(\"Precio\",this._productoPrecio);\n _valuesPedido.put(\"Cantidad\",this._etAdquirir.getText().toString());\n _valuesPedido.put(\"Vendedor\",this.username);\n _valuesPedido.put(\"Id_Producto\",this._productoId);\n bdsecunadaria.insert(\"DATOS\",null,this._valuesPedido);\n bdsecunadaria.close();\n }",
"@Test\n\tvoid contextLoads() throws SQLException {\n\t\tSystem.out.println(resultadoDao.getConf_evaluacion(1));\n\n\t}",
"@Test\n public void testGetTabella_String() throws MainException, SQLException {\n System.out.println(\"getTabella\");\n String queryText = \"select * from infermieri\";\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n ADISysTableModel result = instance.getTabella(queryText);\n assertNotNull(result);\n queryText = \"select * from infermieri where id = -1\";\n result = instance.getTabella(queryText);\n assertTrue(result.getRowCount() == 0);\n }",
"private void openDatabase() {\r\n if ( connect != null )\r\n return;\r\n\r\n try {\r\n // Setup the connection with the DB\r\n String host = System.getenv(\"DTF_TEST_DB_HOST\");\r\n String user = System.getenv(\"DTF_TEST_DB_USER\");\r\n String password = System.getenv(\"DTF_TEST_DB_PASSWORD\");\r\n read_only = true;\r\n if (user != null && password != null) {\r\n read_only = false;\r\n }\r\n if ( user == null || password == null ) {\r\n user = \"guest\";\r\n password = \"\";\r\n }\r\n Class.forName(\"com.mysql.jdbc.Driver\"); // required at run time only for .getConnection(): mysql-connector-java-5.1.35.jar\r\n connect = DriverManager.getConnection(\"jdbc:mysql://\"+host+\"/qa_portal?user=\"+user+\"&password=\"+password);\r\n } catch ( Exception e ) {\r\n System.err.println( \"ERROR: DescribedTemplateCore.openDatabase() could not open database connection, \" + e.getMessage() );\r\n }\r\n }",
"public static void pesquisarTest() {\n\t\t\n\t\tlistaProfissional = profissionalDAO.lista();\n\n\t\t//user.setReceitas(new ArrayList<Receita>());\n\t\t\n\t\t\n\t\tSystem.out.println(\"Entrou PEsquisar ====\");\n\t\tSystem.out.println(listaProfissional);\n\n\t}",
"public void testCriaProjeto (){\n ProjetoDAO.criarProjeto(proj3);\n Projeto aux = ProjetoDAO.getProjetoByNome(\"proj3\");\n assertEquals(proj3.getNome(), aux.getNome());\n }",
"public static boolean testDaoLireLabo() {\n boolean ok = true;\n ArrayList<Labo> lesLabo = new ArrayList<Labo>();\n try {\n lesLabo = daoLabo.getAll();\n } catch (Exception ex) {\n ok = false;\n }\n System.out.println(\"liste des labos\");\n for (Labo unLabo: lesLabo){\n System.out.println(unLabo);\n }\n return ok;\n }",
"@Test\n public void testInserirUsuarioNovo() throws Exception {\n Usuario usu = new Usuario();\n usu.setNome(\"Fulano3\");\n usu.setSenha(\"abcde\");\n Long valorAleatorio = System.currentTimeMillis();\n String username = valorAleatorio.toString();\n usu.setUsername(username);\n usu.setEmail(\"[email protected]\");\n System.out.println(\"inserirUsuarioNovo\");\n boolean validado = new UsuarioDAO().inserir(usu);\n int idInserido = usu.getIdusuario();\n assertEquals(validado, true);\n //testExcluir();\n }",
"@Test\n public void testInsertDataWSSuccess() {\n try {\n \tProviderDAO providerDAO = new ProviderDAOImpl();\n \tProvider provider = new Provider();\n \tPersonDAO personDAO = new PersonDAOImpl();\n \tPerson person = new Person();\n \tperson = personDAO.getPersonById(\"1\");\n \tprovider = providerDAO.getProviderByPerson(person);\n \tString retVal = providerDAO.insertDataWS(provider);\n \t\n \tif (retVal != null) {\n \t\tAssert.assertTrue(true);\n \t\tSystem.out.println(\"[testInsertDataWSSuccess] - \" + retVal);\n \t} else {\n \t\tAssert.assertTrue(false);\n \t}\n\n } catch (Exception e) {\n Assert.assertFalse(false);\n }\n }",
"@Test(timeout = 4000)\n public void test45() throws Throwable {\n EvoSuiteFile evoSuiteFile0 = new EvoSuiteFile(\"/home/ubuntu/evosuite_readability_gen/projects/13_jdbacl\");\n FileSystemHandling.createFolder(evoSuiteFile0);\n MockPrintWriter mockPrintWriter0 = new MockPrintWriter(\"z}yVJPxVp_\");\n DefaultDBTable defaultDBTable0 = new DefaultDBTable();\n mockPrintWriter0.print(false);\n NameSpec nameSpec0 = NameSpec.IF_REPRODUCIBLE;\n SQLUtil.renderCreateTable(defaultDBTable0, true, nameSpec0, mockPrintWriter0);\n Boolean boolean0 = SQLUtil.mutatesDataOrStructure(\"selectwp.pr\");\n assertFalse(boolean0);\n assertNotNull(boolean0);\n }",
"@Test\n public void updateTest14() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }",
"@Test\n public void testRegistrar() throws Exception { \n long sufijo = System.currentTimeMillis();\n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(sufijo); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin());\n assertNotNull(usuarioRegistrado);\n }",
"@Test\n\t@DatabaseSetup(value = { \"/dataset/emptyDB.xml\", \"/dataset/test-topaze-catalogue-add-produit.xml\" })\n\tpublic void testAssocierTemplateValid() {\n\n\t\ttry {\n\t\t\tProduit produit = produitService.associerTemplate(\"REF_PRODUIT_B_TFSF\", \"Max\");\n\t\t\tassertEquals(\"Max\", produit.getXmlTemplatePath());\n\t\t\tassertEquals(\"Max\", produit.getXsdTemplatePath());\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.error(e);\n\t\t\tfail(\"Unexpected exception : \" + e.getMessage());\n\t\t}\n\t}",
"@Test\n public void updateTest1() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isCabina() ,\"Should return true if update Servizio\");\n }",
"public void addAppareil(Capteur capt) {\n Log.v(Constante.TAG, \"Fonction appelée -> addAppareil\");\n\n SQLiteDatabase db = this.getWritableDatabase();\n //Log.v(\"TEST\", \"SQLITE\");\n\n ContentValues values = new ContentValues();\n values.put(KEY_IDc, capt.getIdc());\n values.put(KEY_DESCRIPTION, capt.getNom());\n //values.put(KEY_ETATr, capt.getId());\n values.put(KEY_ETATd, capt.getEtat());\n //values.put(KEY_DEMANDE_TRAITEE, capt.getId());\n //values.put(KEY_PUISSc, capt.getId());\n values.put(KEY_PUISSa, capt.getConso());\n // Inserting Row\n db.insert(TABLE_LOGIN, null, values);\n //db.close(); // Closing database connection\n }",
"@Test\n public void testAutenticacion() {\n System.out.println(\"autenticacion\");\n Usuario usuario = new Usuario(1, \"[email protected]\", \"12345\", new Date(), true);//parametro in\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.autenticacion(usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de autenticaccion ha fallado\");\n }\n }",
"@Test\n public void updateTest6() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setBeach_volley(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isBeach_volley() ,\"Should return true if update Servizio\");\n }",
"@Test\r\n public void testBuscarUsuarios() {\r\n System.out.println(\"BuscarUsuarios\");\r\n Usuario pusuario = new Usuario(); \r\n pusuario.setUsuario(\"MSantiago\");\r\n \r\n BLUsuario instance = new BLUsuario();\r\n \r\n Usuario result = instance.BuscarUsuarios(pusuario); \r\n if(result == null) fail(\"La busqueda no ha retornado resultado.\");\r\n else\r\n {\r\n assertEquals(pusuario.getUsuario(),result.getUsuario());\r\n System.out.println(\"Se encontró el usuario.\");\r\n }\r\n\r\n \r\n }",
"@Test\n public void testObtenerid() {\n System.out.println(\"obtenerid\");\n String usuario = \"\";\n cursoDAO instance = new cursoDAO();\n int expResult = 0;\n int result = instance.obtenerid(usuario);\n assertEquals(expResult, result);\n \n }",
"@Test\n public void testEdit() {\n System.out.println(\"edit\");\n curso _curso = new curso();\n cursoDAO instance = new cursoDAO();\n boolean expResult = false;\n boolean result = instance.edit(_curso);\n assertEquals(expResult, result);\n \n }",
"@Test\n public void sucheSaeleBezT() throws Exception {\n System.out.println(\"sucheSaele nach Bezeichnung\");\n bezeichnung = \"Halle 1\";\n typ = \"\";\n plaetzeMin = null;\n ort = null;\n SaalDAO dao=DAOFactory.getSaalDAO();\n query = \"bezeichnung like '%\" + bezeichnung + \"%' \";\n explist = dao.find(query);\n System.out.println(query);\n List<Saal> result = SaalHelper.sucheSaele(bezeichnung, typ, plaetzeMin, ort);\n assertEquals(explist, result);\n \n }",
"@Test\n\tpublic void populatedDB() throws URISyntaxException{\n\t\tString pass;\n\t\t LoginController controller = new LoginController();\n\t\t \n\t\tpass = controller.gimmeSalt(\"PASSWORD\");\n pass = controller.hashBrowns(pass);\n\t\tdb.insertUser(\"TESTER\", pass, \"EMAIL\",666);\n\t\t\n\t\tdb.insertBusiness(\"Test1\",\"Somewhere\",7);\n\t\tdb.insertBusiness(\"Test2\",\"Somewhere\",8);\n\t\tdb.insertBusiness(\"Test3\",\"Somewhere\",9);\n\t\tlong start=12418*1000*60;\n\t\tlong end=912518*1000*60;\n\t\tdb.insertEvent(\"t1\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",1231);\n\t\t start=124118*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t2\",\"This is a tester\",start,end,\"Test1\",\"Somewhere\",674754);\n\t\t start=412418*1000*60;\n\t\tend=912518*1000*60;\n\t\tdb.insertEvent(\"t3\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",241254);\n\t\tdb.insertEvent(\"t4\",\"This is a tester\",start,end,\"Test2\",\"Somewhere\",5432);\n\t\t start=1924218*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t5\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",12);\n\t\t start=124318*1000*60;\n\t\t end=912518*1000*60;\n\t\tdb.insertEvent(\"t6\",\"This is a tester\",start,end,\"Test3\",\"Somewhere\",1241);\n\t\t\n\t\tdb.insertRelation(\"TESTER\",\"Test1\");\n\t\tdb.insertRelation( \"TESTER\",\"Test2\" );\n\t\tdb.insertRelation(\"TESTER\",\"Test3\");\n\t}",
"public static boolean conectarDB(){\n\t\tString servidor = \"jdbc:mysql://localhost:3306/sistemaprefectura\";\n\t\tString usuario = \"root\";\n\t\tString password = \"root\";\n\t\ttry {\n\t\t\tClass.forName(\"com.mysql.jdbc.Driver\");\n\t\t\tconexion = DriverManager.getConnection(servidor,usuario,password);\n\t\t\treturn true;\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\tSystem.out.println(\"Algo salio mal\");\n\t\t}\n\t\treturn false;\n\t}",
"public void testAgregarUsuarioRepetidoID()\n\t{\n\t\tsetupEscenario1();\n\t\tString asd = (\"INSERT INTO USUARIO (ID, CLAVE , EDAD, TIPO, NOMBRE) VALUES(123456,9999,40,'PAILA')\");\n\t\tString bien = \"\";\n\t\ttry\n\t\t{\n\t\t\tx.registrarUsuario(123456, 9999, \"pAOLA\", 0, \"U\", \"\");\n\t\t}\n\t\tcatch (Exception e)\n\t\t{\n\t\t\tbien = e.getMessage();\n\t\t\t// TODO: handle exception\n\t\t}\n\t\tassert ( \"ORA-00001: restricción única (ISIS2304131520.PK_USUARIO) violada\".equals(\tbien) );\n\n\t}",
"@Test\n public void z_topDown_TC03() {\n try {\n Intrebare intrebare = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"M\");\n Intrebare intrebare1 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"A\");\n Intrebare intrebare2 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"B\");\n Intrebare intrebare3 = appService.addNewIntrebare(\"Enunt?\", \"1) Raspuns1\", \"2) Raspuns2\", \"3) Raspuns3\",\n \"1\", \"C\");\n assertTrue(true);\n assertTrue(appService.exists(intrebare));\n assertTrue(appService.exists(intrebare1));\n assertTrue(appService.exists(intrebare2));\n assertTrue(appService.exists(intrebare3));\n\n try {\n ccir2082MV.evaluator.model.Test test = appService.createNewTest();\n assertTrue(test.getIntrebari().contains(intrebare));\n assertTrue(test.getIntrebari().contains(intrebare1));\n assertTrue(test.getIntrebari().contains(intrebare2));\n assertTrue(test.getIntrebari().contains(intrebare3));\n assertTrue(test.getIntrebari().size() == 5);\n } catch (NotAbleToCreateTestException e) {\n assertTrue(false);\n }\n\n Statistica statistica = appService.getStatistica();\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"Literatura\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"Literatura\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"M\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"M\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"A\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"A\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"B\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"B\")==1);\n\n assertTrue(statistica.getIntrebariDomenii().containsKey(\"C\"));\n assertTrue(statistica.getIntrebariDomenii().get(\"C\")==1);\n\n } catch (DuplicateIntrebareException | IntrebareValidatorFailedException e) {\n e.printStackTrace();\n assertTrue(false);\n } catch (NotAbleToCreateStatisticsException e) {\n assertTrue(false);\n }\n }",
"@Test\n public void updateTest9() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setCabina(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true, servizio.isCabina() ,\"Should return true if update Servizio\");\n }",
"@Test\n public void testGetTabella_PreparedStatement() throws MainException, SQLException {\n System.out.println(\"getTabella\");\n LinkingDb instance = new LinkingDb(new ConfigurazioneTO(\"jdbc:hsqldb:file:database/\",\n \"ADISysData\", \"asl\", \"\"));\n instance.connect();\n PreparedStatement stmt = instance.prepareStatement(\n \"select * from infermieri\");\n ADISysTableModel result = instance.getTabella(stmt);\n assertNotNull(result);\n }",
"@Test\n public void updateTest5() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setWifi(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isWifi() ,\"Should return true if update Servizio\");\n }",
"@Test\n\tvoid test1() throws SQLException {\n\t\tString username_1 = \"testtest1\";\n\t\tboolean actual_1 = database.isExistUser(username_1);\n\t\tboolean expected_1 = false;\n\t\tassertEquals(expected_1,actual_1);\n\t\t\n\t\tString username_2 = \"testtest4\";\n\t\tboolean actual_2 = database.isExistUser(username_2);\n\t\tboolean expected_2 = true;\n\t\tassertEquals(expected_2,actual_2);\n\t}",
"public static boolean testDaoCreateOffrir(Echantillon unEchantillon){\n boolean ok = true;\n try {\n daoOffrir.create(unEchantillon);\n } catch (Exception ex) {\n Logger.getLogger(TestDao.class.getName()).log(Level.SEVERE, null, ex);\n ok = false;\n }\n \n System.out.println(\"l'échantillon créé:\");\n System.out.println(unEchantillon);\n \n return ok; \n }",
"@Test\n public void shouldCreateEpiDataGathering() {\n assertThat(DatabaseHelper.getEpiDataGatheringDao().queryForAll().size(), is(0));\n\n Case caze = TestEntityCreator.createCase();\n TestEntityCreator.createEpiDataGathering(caze);\n\n // Assure that the burial has been successfully created\n assertThat(DatabaseHelper.getEpiDataGatheringDao().queryForAll().size(), is(1));\n }",
"private void conntest() {\n\t\tDatabaseDao ddao = null;\r\n\t\tString url;\r\n\r\n\t\tif (dbType.getValue().toString().toUpperCase()\r\n\t\t\t\t.equals((\"oracle\").toUpperCase())) {\r\n\t\t\turl = \"jdbc:oracle:thin:@\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tSystem.out.println(\"?\");\r\n\t\t\tddao = new OracleDaoImpl();\r\n\t\t} else {\r\n\t\t\turl = \"jdbc:mysql://\" + logTxtIp.getText() + \":\"\r\n\t\t\t\t\t+ logTxtPort.getText() + \"/\" + logTxtSdi.getText();\r\n\t\t\tddao = new MysqlDaoImpl();\r\n\t\t}\r\n\t\tSystem.out.println(url);\r\n\t\tString result = ddao.connection(url, logTxtId.getText(),\r\n\t\t\t\tlogTxtPw.getText());\r\n\t\tString resultSet;\r\n\t\tif (result.indexOf(\"오류\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"오류\"));\r\n\t\telse if (result.indexOf(\"ORA\") != -1)\r\n\t\t\tresultSet = result.substring(result.indexOf(\"ORA\"));\r\n\t\telse {\r\n\t\t\tresultSet = \"접속 테스트 성공\";\r\n\t\t}\r\n\t\tlogLblLogin.setText(resultSet);\r\n\t}",
"public void conectarABD() throws SQLException, Exception\r\n\t{\r\n\t\tString driver = config.getProperty( \"admin.db.driver\" );\r\n\t\tClass.forName( driver ).newInstance();\r\n\r\n\t\tString url = config.getProperty( \"admin.db.url\" );\r\n\t\tconexion = DriverManager.getConnection( url );\r\n\t\tverificarInvariante();\r\n\r\n\t}",
"@Test\n public void testDAM31901002() {\n // in this case, the boolean type is not supported by oracle db.\n // there is separate sql created to be executed for oracle database\n // however, the sql id that for oracle and other db are same.\n testDAM30802001();\n }",
"private void checkDataBase() {\n final Config dbConfig = config.getConfig(\"db\");\n\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"driver\")), \"db.driver is not set!\");\n checkArgument(!isNullOrEmpty(dbConfig.getString(\"url\")), \"db.url is not set!\");\n\n dbConfig.getString(\"user\");\n dbConfig.getString(\"password\");\n dbConfig.getObject(\"additional\");\n }",
"@Test\r\n\tpublic void testtraerCertificadosAdmin() {\n\t\tList<DatosDemandaAdmin> lista = despachoService\r\n\t\t\t\t.traerCertificadosAdmin();\r\n\t\tAssert.assertNotNull(lista);\r\n\t\tAssert.assertTrue(lista.size() > 0);\r\n\t}",
"@Test\n public void updateTest13() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setWifi(true);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(true , servizio.isWifi() ,\"Should return true if update Servizio\");\n }",
"@Test\n public void testConnectToDb() {\n System.out.println(\"connectToDb\");\n ClienteDAO instance = new ClienteDAO();\n instance.connectToDb();\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\r\n public void testloadExpenses_1() {\n fancyDatabase = new MyDatabase();\r\n expenseRepository = new ExpenseRepository(fancyDatabase);\r\n expenseRepository.loadExpenses();\r\n assertEquals(0,expenseRepository.getExpenses().size());\r\n }",
"@Test\r\n\t\t\tpublic void testEncuentraPrimeratabla() {\r\n\t\t\t\t//encontramos la tabla que se llama customers\r\n\t\t\t\tWebElement tabla= driver.findElement(By.xpath(\"//table[@id='customers']\"));\r\n\t\t\t\tSystem.out.println(tabla.getText());\t\r\n\t\t\t\tassertNotNull(tabla);\r\n\t\t\t}",
"@BeforeEach\n\tpublic void cadastrar() {\n\t\tescola = new Escola( null, \"Test School\", true);\n\t\tdiretor = new Diretor(escola, \"Rodrigo\", 1000, new GregorianCalendar(1998, Calendar.APRIL, 2));\n\t\t\n\t\t\n\t\tSala sala1 = new Sala(301, 20);\n\t\tSala sala2 = new Sala(304, 40);\n\t\t\n\t\tescola.addSala(sala1);\n\t\tescola.addSala(sala2);\n\t\t\n\t\tProfessor prof1 = new Professor(\"Barcelos\", Formacao.MESTRADO);\n\t\tProfessor prof2 = new Professor(\"Salvio\" , Formacao.ESPECIALIZACAO);\n\t\t\n\t\tList<Professor> professores = new ArrayList<>();\n\t\tprofessores.add(prof1);\n\t\tprofessores.add(prof2);\n\t\t\n\t\tescola.setProfessores(professores);\n\t\t\n\t\ttry {\n\t\t\t//escolaDao.cadastrar(escola);\n\t\t\tdiretorDao.cadastrar(diretor);\n\t\t\tdiretorDao.commit();\n\t\t} catch (CommitException e) {\n\t\t\te.printStackTrace();\n\t\t\tfail(\"Falha no teste\");\n\t\t}\n\t}",
"@Test(timeout = 4000)\n public void test062() throws Throwable {\n DBUtil.checkReadOnly(\"SELECT pronae,oid FROM pg_roc WHEE \", true);\n }",
"@Test\n public void updateTest3() throws SQLException {\n manager = new TableServizioManager(mockDb);\n Servizio servizio = manager.retriveById(2);\n servizio.setRistorante(false);\n manager.update(servizio);\n servizio = manager.retriveById(2);\n assertEquals(false, servizio.isRistorante() ,\"Should return true if update Servizio\");\n }",
"@Override\r\n public void setUp() throws Exception {\r\n super.setUp();\r\n\r\n dbOpenHelper = new DbOpenHelper(getContext());\r\n\r\n db = dbOpenHelper.getWritableDatabase();\r\n db.beginTransaction();\r\n dao = new ExtraPartsDAO(db);\r\n }"
]
| [
"0.6461398",
"0.64500326",
"0.62705606",
"0.62243813",
"0.6219471",
"0.6187594",
"0.61695576",
"0.6156621",
"0.6113121",
"0.6102615",
"0.60913694",
"0.6081486",
"0.60702395",
"0.6058651",
"0.60569066",
"0.60255736",
"0.6018997",
"0.6006594",
"0.6003805",
"0.600293",
"0.59975934",
"0.5986446",
"0.5968702",
"0.59624624",
"0.59590626",
"0.5940897",
"0.5935776",
"0.5930038",
"0.5925604",
"0.5924237",
"0.5909914",
"0.5908936",
"0.5907996",
"0.59041214",
"0.58999616",
"0.5894434",
"0.5887344",
"0.58785653",
"0.58735436",
"0.5873541",
"0.5869989",
"0.5868464",
"0.5850272",
"0.58458644",
"0.58399296",
"0.58373404",
"0.58258104",
"0.58252734",
"0.58215004",
"0.5820517",
"0.58186555",
"0.5817546",
"0.5806626",
"0.5800814",
"0.57998556",
"0.5790224",
"0.5789336",
"0.5784603",
"0.57815015",
"0.57808506",
"0.5779905",
"0.5778363",
"0.57740164",
"0.5764068",
"0.5762414",
"0.5762193",
"0.575797",
"0.5754317",
"0.5748826",
"0.5748366",
"0.5744536",
"0.57380456",
"0.5737096",
"0.573336",
"0.5732945",
"0.5731757",
"0.57293004",
"0.5726482",
"0.57250696",
"0.5721583",
"0.5721241",
"0.5712373",
"0.5707612",
"0.57040817",
"0.5701608",
"0.5700772",
"0.5700311",
"0.5693965",
"0.5693638",
"0.5682434",
"0.5680518",
"0.5676815",
"0.56755227",
"0.5675342",
"0.5673305",
"0.56673294",
"0.5659044",
"0.56486857",
"0.56479853",
"0.5646165",
"0.56461173"
]
| 0.0 | -1 |
do user registration using api call | private void userSignUp(final int id, String agentNm, String fName, String sta, String localG, String tow, String phoneNm, String fmMr, String cbRg, String memSiz, String cggNam, String cFarmZz, String fcRg, String inFarm, String riceVarr, String qttyHarr, String afRg,
String fertTldd, String noRzz, String qtyApll, String alRg, String szLoaa, String srcRicc, String qtyPdyRicc, String majByrss, String comSolcc, String qttyByy, String howMcc, String prcBb, String incDs,
String reasnn, String hwSpyy, String stRg, String ysSptrr, String fm1, String t11, String cstCs11, String fm2, String t22, String cstCs22, String fm3, String t33, String cstCs33, String infPrcc, String salesDmm,
String avgQtFcc, String whnCp, String whyCp, String whnEx, String whyExx, String mjCh, String adCh, String timSe, String othSe, String adInn) {
Call<ResponseBody> call = RetrofitClient2
.getInstance()
.getNaSurvey()
.submitResponse(agentNm, fName, sta, localG, tow, phoneNm, fmMr, cbRg, memSiz, cggNam, cFarmZz, fcRg, inFarm, riceVarr, qttyHarr, afRg, fertTldd, noRzz, qtyApll, alRg, szLoaa, srcRicc, qtyPdyRicc, majByrss, comSolcc, qttyByy, howMcc, prcBb, incDs, reasnn, hwSpyy, stRg, ysSptrr, fm1, t11, cstCs11,
fm2, t22, cstCs22, fm3, t33, cstCs33, infPrcc, salesDmm, avgQtFcc, whnCp, whyCp, whnEx, whyExx, mjCh, adCh, timSe, othSe, adInn);
call.enqueue(new Callback<ResponseBody>() {
@Override
public void onResponse(Call<ResponseBody> call, Response<ResponseBody> response) {
try {
JSONObject obj = new JSONObject(String.valueOf(response));
if (!obj.getBoolean("error")) {
//updating the status in sqlite
db.updateNameStatus(id, SurveyActivity.SYNC_STATUS_OK);
//sending the broadcast to refresh the list
context.sendBroadcast(new Intent(SurveyActivity.DATA_SAVED_BROADCAST));
}
} catch (JSONException e) {
e.printStackTrace();
}
}
@Override
public void onFailure(Call<ResponseBody> call, Throwable t) {
Map<String, String> params = new HashMap<>();
params.put("agentNm", agentNm);
params.put("fname", fName);
params.put("state", sta);
params.put("lga", localG);
params.put("town", tow);
params.put("phoneNm", phoneNm);
params.put("farmer", fmMr);
params.put("cogp", cbRg);
params.put("memsz", memSiz);
params.put("cgnam", cggNam);
params.put("cofmsz", cFarmZz);
params.put("frmcol", fcRg);
params.put("invfz", inFarm);
params.put("ricev", riceVarr);
params.put("qtyhv", qttyHarr);
params.put("apfert", afRg);
params.put("ysyld", fertTldd);
params.put("norz", noRzz);
params.put("qtyap", qtyApll);
params.put("aploa", alRg);
params.put("szloa", szLoaa);
params.put("srcric", srcRicc);
params.put("qtypdrc", qtyPdyRicc);
params.put("majby", majByrss);
params.put("comso", comSolcc);
params.put("qtby", qttyByy);
params.put("hwmch", howMcc);
params.put("pricbf", prcBb);
params.put("indcr", incDs);
params.put("rsn", reasnn);
params.put("hwspl", hwSpyy);
params.put("chsp", stRg);
params.put("yssptr", ysSptrr);
params.put("frm1", fm1);
params.put("to1", t11);
params.put("costc1", cstCs11);
params.put("frm2", fm2);
params.put("to2", t22);
params.put("costcs2", cstCs22);
params.put("frm3", fm3);
params.put("to3", t33);
params.put("costcs3", cstCs33);
params.put("infpr", infPrcc);
params.put("salsdm", salesDmm);
params.put("avqtf", avgQtFcc);
params.put("wncp", whnCp);
params.put("wycp", whyCp);
params.put("wnex", whnEx);
params.put("wyex", whyExx);
params.put("majch", mjCh);
params.put("addch", adCh);
params.put("timsl",timSe);
params.put("othsl",othSe);
params.put("adin",adInn);
return;
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void register_user() {\n\n\t\tHttpRegister post = new HttpRegister();\n\t\tpost.execute(Config.URL + \"/api/newuser\");\n\n\t}",
"@GET(Config.REGISTER) Call<User> registerUser(@QueryMap Map<String, String> body);",
"public void Register() {\n Url url = new Url();\n User user = new User(fname.getText().toString(), lname.getText().toString(), username.getText().toString(), password.getText().toString());\n Call<Void> registerUser = url.createInstanceofRetrofit().addNewUser(user);\n registerUser.enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n Toast.makeText(getActivity(), \"User Registered successfully\", Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n Toast.makeText(getActivity(), \"Error\" + t, Toast.LENGTH_SHORT).show();\n }\n });\n }",
"@POST\n @Path(\"/users/register\")\n public Response register(\n @Context HttpServletRequest request \n ,@Context HttpServletResponse response\n ,@Context ServletContext servletContext\n ,String raw\n ){\n try{\n log.debug(\"/register called\");\n// String raw=IOUtils.toString(request.getInputStream());\n mjson.Json x=mjson.Json.read(raw);\n \n Database2 db=Database2.get();\n for (mjson.Json user:x.asJsonList()){\n String username=user.at(\"username\").asString();\n \n if (db.getUsers().containsKey(username))\n db.getUsers().remove(username); // remove so we can overwrite the user details\n \n Map<String, String> userInfo=new HashMap<String, String>();\n for(Entry<String, Object> e:user.asMap().entrySet())\n userInfo.put(e.getKey(), (String)e.getValue());\n \n userInfo.put(\"level\", LevelsUtil.get().getBaseLevel().getRight());\n userInfo.put(\"levelChanged\", new SimpleDateFormat(\"yyyy-MM-dd\").format(new Date()));// nextLevel.getRight());\n \n db.getUsers().put(username, userInfo);\n log.debug(\"New User Registered (via API): \"+Json.newObjectMapper(true).writeValueAsString(userInfo));\n db.getScoreCards().put(username, new HashMap<String, Integer>());\n \n db.addEvent(\"New User Registered (via API)\", username, \"\");\n }\n \n db.save();\n return Response.status(200).entity(\"{\\\"status\\\":\\\"DONE\\\"}\").build();\n }catch(IOException e){\n e.printStackTrace();\n return Response.status(500).entity(\"{\\\"status\\\":\\\"ERROR\\\",\\\"message\\\":\\\"\"+e.getMessage()+\"\\\"}\").build(); \n }\n \n }",
"private void registerUser()\n {\n /*AuthService.createAccount takes a Consumer<Boolean> where the result will be true if the user successfully logged in, or false otherwise*/\n authService.createAccount(entryService.extractText(namedFields), result -> {\n if (result.isEmpty()) {\n startActivity(new Intent(this, DashboardActivity.class));\n } else {\n makeToast(result);\n formContainer.setAlpha(1f);\n progressContainer.setVisibility(View.GONE);\n progressContainer.setOnClickListener(null);\n }\n });\n }",
"private void registerUser() {\n\n // Get register name\n EditText mRegisterNameField = (EditText) findViewById(R.id.register_name_field);\n String nickname = mRegisterNameField.getText().toString();\n\n // Get register email\n EditText mRegisterEmailField = (EditText) findViewById(R.id.register_email_field);\n String email = mRegisterEmailField.getText().toString();\n\n // Get register password\n EditText mRegisterPasswordField = (EditText) findViewById(R.id.register_password_field);\n String password = mRegisterPasswordField.getText().toString();\n\n AccountCredentials credentials = new AccountCredentials(email, password);\n credentials.setNickname(nickname);\n\n if (DataHolder.getInstance().isAnonymous()) {\n credentials.setOldUsername(DataHolder.getInstance().getUser().getUsername());\n }\n\n sendRegistrationRequest(credentials);\n }",
"String registerUser(User user);",
"private void doRegister(){\n Map<String, String> mParams = new HashMap<>();\n mParams.put(\"account\", etPhone.getText().toString());\n mParams.put(\"password\", etPwd.getText().toString());\n mParams.put(\"code\", etValid.getText().toString());\n\n x.http().post(HttpUtils.getRequestParams(\"/teacher/v1/register\", mParams),\n\n new Callback.CommonCallback<String>() {\n @Override\n public void onSuccess(String result) {\n\n CustomProgress.hideDialog();\n LogUtil.d(\"\"+result);\n Response response = CommonUtil.checkResponse(result);\n if (response.isStatus()) {\n SharedPreferences shareAutoLogin = MyApplication.getInstance().getShareAutoLogin();\n SharedPreferences.Editor editor = shareAutoLogin.edit();\n editor.putBoolean(MyApplication.getInstance().AUTOLOGIN, true);\n editor.commit();\n MyApplication.getInstance().setShareApp(etPhone.getText().toString(), etPwd.getText().toString());\n User user = User.getUserFromJsonObj(response.getData().optJSONObject(\"data\"));\n User.setCurrentUser(user);\n MobclickAgent.onProfileSignIn(user.getNickName());\n\n // 登录环信\n if (!StringUtils.isEmpty(user.hxId) && !StringUtils.isEmpty(user.hxPwd))\n AppUtils.loginEmmobAndSaveInfo(user);\n\n // 极光推送设置别名\n JPushInterface.setAlias(RegisterActivity.this, user.getId() + \"\", new TagAliasCallback() {\n @Override\n public void gotResult(int i, String s, Set<String> set) {\n if (i == 0) {\n LogUtil.i(\"极光推送别名设置成功,别名:\" + s);\n }\n }\n });\n\n socketLogin(user.getToken());\n\n Intent intent = new Intent(RegisterActivity.this, CodeActivity.class);\n startActivity(intent);\n finish();\n } else {\n Toast.makeText(x.app(), response.getData().optString(\"message\"), Toast.LENGTH_SHORT).show();\n\n }\n }\n\n @Override\n public void onError(Throwable ex, boolean isOnCallback) {\n\n CustomProgress.hideDialog();\n\n if (ex instanceof HttpException) { // 网络错误\n HttpException httpEx = (HttpException) ex;\n int responseCode = httpEx.getCode();\n String responseMsg = httpEx.getMessage();\n String errorResult = httpEx.getResult();\n LogUtil.d(responseCode + \":\" + responseMsg);\n Toast.makeText(x.app(), x.app().getResources().getString(R.string.net_error), Toast.LENGTH_SHORT).show();\n } else { // 其他错误\n // ...\n }\n //Toast.makeText(x.app(), ex.getMessage(), Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onCancelled(CancelledException cex) {\n Toast.makeText(x.app(), \"cancelled\", Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onFinished() {\n\n }\n });\n\n }",
"UserRegistrationResponse registrationPost(RegistrationForm registrationForm);",
"@PostMapping(\"/signup\")\n public ResponseEntity<?> registerUser(@RequestBody RegistrationRequest registrationRequest){\n return userService.registerUser(registrationRequest);\n }",
"private void register(String username,String password){\n\n }",
"public UserAuthToken createUser(CreateUserRequest request);",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users\")\n Call<UserResource> registerUser(\n @retrofit2.http.Body UserResource userResource\n );",
"boolean userRegistration(UserDTO user) throws UserException,ConnectException;",
"@PostMapping(\"/register\")\n public ResponseEntity<Map<String, String>> registerUser(@RequestBody User user){ \n userService.registerUser(user);\n return new ResponseEntity<>(generateJWTTToken(user), HttpStatus.OK);\n }",
"@POST\n @Path(\"register\")\n @Produces(MediaType.APPLICATION_JSON)\n public JAXResult register(UserBE user){\n return null;\n }",
"public void register() {\n int index = requestFromList(getUserTypes(), true);\n if (index == -1) {\n guestPresenter.returnToMainMenu();\n return;\n }\n UserManager.UserType type;\n if (index == 0) {\n type = UserManager.UserType.ATTENDEE;\n } else if (index == 1) {\n type = UserManager.UserType.ORGANIZER;\n } else {\n type = UserManager.UserType.SPEAKER;\n }\n String name = requestString(\"name\");\n char[] password = requestString(\"password\").toCharArray();\n boolean vip = false;\n if(type == UserManager.UserType.ATTENDEE) {\n vip = requestBoolean(\"vip\");\n }\n List<Object> list = guestManager.register(type, name, password, vip);\n int id = (int)list.get(0);\n updater.addCredentials((byte[])list.get(1), (byte[])list.get(2));\n updater.addUser(id, type, name, vip);\n guestPresenter.printSuccessRegistration(id);\n }",
"private void doSignup(RoutingContext ctx){\n // Get Data from view\n JsonObject req = ctx.getBodyAsJson();\n String username = req.getString(\"username\");\n String password = req.getString(\"password\");\n\n GoogleAuthenticator authenticator = new GoogleAuthenticator();\n\n //Get Generate Key\n System.out.println(\" Calling Google Authenticator to generate AuthKey\");\n GoogleAuthenticatorKey authKey = authenticator.createCredentials();\n String key = authKey.getKey();\n System.out.println(\" Google Authenticator generated AuthKey\");\n\n //Store Data from Repository\n User user = new User(username,password,key);\n\n //send response to the user\n JsonObject res = new JsonObject().put(\"key\",key);\n ctx.response().setStatusCode(200).end(res.encode());\n }",
"User registration(User user);",
"@Override\n public RegisterBO register(UserRequest userRequest) {\n User user = new User().with(u -> u.email = userRequest.getEmail())\n .with(u -> u.username = userRequest.getEmail())\n .with(u -> u.preferredLanguages.add(new Locale(\"es\", \"CL\")))//TODO: revisar mas adelante\n .with(u -> u.password = userRequest.getPassword())\n .with(u -> u.fullName = userRequest.getFullName());\n if (userRequest.getPhone() != null)\n user.with(u -> u.mobilePhone = userRequest.getPhone().trim());\n\n // Se inicia el registro de usuario y objecto request\n UserRegistration registration = new UserRegistration();\n registration.applicationId = UUID.fromString(aplicationId);\n registration.verified = false;\n\n RegistrationRequest request = new RegistrationRequest(user, registration);\n\n // Uso el objeto ClientResponse para capturar respuesta\n ClientResponse<RegistrationResponse, Errors> response = getFusionAuthClient.register(null, request);\n\n // Traducto respuesta segun exito o error\n return registerTranslate.translate(response);\n }",
"Boolean startRegistration(FaceuserPojo faceuserPojo);",
"Boolean registerNewUser(User user);",
"private void registerUser(String number) {\n HashMap<String, String> parameters = new HashMap<>(); // for our app, we are using the verified phone number as parameters\n parameters.put(\"phone\", number);\n\n String apiKey = \"https://crtsapp.herokuapp.com/api/crts/auth/register/\"; // change this whenever you upload the project to some other backend service.\n JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(\n Request.Method.POST,\n apiKey,\n new JSONObject(parameters),\n response -> {\n try {\n if(response.getBoolean(\"success\")){\n // On successful registration, we will login the user subsequently.\n // Logging in the user will also help to get the information of the user\n // that can be stored in the local storage(Using SharedPreference) to fasten the App.\n loginUser(number);\n }else{\n Toast.makeText(MainActivity.this, \"Please click on Verify again\", Toast.LENGTH_SHORT).show();\n }\n } catch (JSONException jsonException) {\n jsonException.printStackTrace();\n }\n },\n error -> {\n\n NetworkResponse response = error.networkResponse;\n if(error instanceof ServerError && response!=null){\n try {\n String res = new String(response.data, HttpHeaderParser.parseCharset(response.headers, \"utf-8\"));\n JSONObject obj = new JSONObject(res);\n Toast.makeText(MainActivity.this, obj.getString(\"msg\"), Toast.LENGTH_SHORT).show();\n\n }catch (JSONException | UnsupportedEncodingException jsonException){\n jsonException.printStackTrace();\n }\n }\n }\n ){\n @Override\n public Map<String, String> getHeaders() {\n HashMap<String, String> headers = new HashMap<>();\n headers.put(\"Content-Type\", \"application/json\");\n return headers;\n }\n };\n\n // Adding a retry policy to ensure user can try again to login in case there is an issue with the backend.\n int socketTime = 5000; // 5sec time is given to register\n RetryPolicy retryPolicy = new DefaultRetryPolicy(socketTime,\n DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT);\n jsonObjectRequest.setRetryPolicy(retryPolicy);\n\n RequestQueue requestQueue = Volley.newRequestQueue(this);\n requestQueue.add(jsonObjectRequest);\n\n }",
"UserCreateResponse createUser(UserCreateRequest request);",
"private void registration() {\n\t\tif (ur_name.getText().length() > 0 && email.getText().length() > 0\r\n\t\t\t\t&& pass.getText().length() > 0\r\n\t\t\t\t&& re_pass.getText().length() > 0) {\r\n\t\t\tif (pass.getText().toString()\r\n\t\t\t\t\t.equalsIgnoreCase(re_pass.getText().toString())) {\r\n\t\t\t\tString postEntity = \"user_name=\" + ur_name.getText().toString()\r\n\t\t\t\t\t\t+ \"&email=\" + email.getText().toString() + \"&password=\"\r\n\t\t\t\t\t\t+ pass.getText().toString() + \"&gcm_id=\"\r\n\t\t\t\t\t\t+ GlobalDeclares.getGcmId();\r\n\t\t\t\tnew ServerUtilities(getApplicationContext(),\r\n\t\t\t\t\t\tGlobalDeclares.NEW_REGISTRATION, postEntity, delegate);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"Password does not match!\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\"You need to fill all the fields!\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t}\r\n\r\n\t}",
"@Override\n public void performRegister(final String name, final String email, final String gender, final String password){\n\n mAuth.createUserWithEmailAndPassword(email.toLowerCase(),password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n User user = new User();\n user.setName(name);\n user.setEmail(email.toLowerCase());\n user.setGender(gender);\n user.setPassword(password);\n FirebaseDatabase.getInstance().getReference(\"Users\")\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(context, \"Authentication Success.\",\n Toast.LENGTH_LONG).show();\n view.redirectToLogin();\n } else {\n Toast.makeText(context, \"Authentication Failed.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n } else {\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(context, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }",
"public AuthResponse registerAccount(Account acc){\n Call<AuthResponse> call = endpoints.registerAcc(acc);\n AuthResponse serverResponse = null;\n try {\n serverResponse = call.execute().body();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return serverResponse;\n }",
"public boolean SignUp(String username,String password,String realname) throws IOException, JSONException {\n OkHttpClient client = new OkHttpClient();\n RequestBody body = new FormBody.Builder()\n .add(\"user_id\",\"\")\n .add(\"user_code\", username)\n .add(\"user_pwd\", password)\n .add(\"user_name\", realname)\n .add(\"user_birthday\",\"\").build();\n String PcPath = \"http://www.mypc.com:8080\";\n String url=PcPath+\"/permission/user/useradd\";\n Request request = new Request.Builder().url(url).post(body).addHeader(\"Cookie\",this.jid).build();\n final Call call = client.newCall(request);\n Response response = call.execute();\n String responseData = response.body().string();\n JSONObject jsonObject = new JSONObject(responseData);\n int id = jsonObject.getInt(\"status\");\n if (id == 200) {\n return true;\n }\n return false;\n }",
"@ApiOperation(value = \" Registration information \", tags = \"Register\")\n\n\t@PostMapping(\"/register\")\n\tpublic String addUser(@RequestParam String emailId,@RequestParam String name,@RequestParam String passwd) throws Exception\n\t{\n\t \n\t\tif(emailId!=null && !\"\".equals(emailId))\n\t\t{\n\t\t\tUser userObj=userservice.fetchByUserEmailId(emailId);\n\t\t\t\n\t\t\tif(userObj!=null) {\n\t\t return \"User with \"+emailId+\" is already exist\";\n\t\t }\n\t\t\t \n\t\t\t\n\t\t}\n\t\t User user =new User(name,emailId,passwd);\n\t\t\n\t\t // genrate 4 digit otp number\n\t\t int myotp=(int)(Math.random() * (8015)) + 2085;\n\t \t\tboolean status=emailservice.SendEmail(\"Otp is \"+myotp , emailId) ;\n\t if(!status)\n\t {\n\t \t return \"Not sending Mail\";\n\t } \n\t LocalTime time=LocalTime.now(); \n\t LocalDate date=LocalDate.now();\n\t user.setOtp(myotp);\n \t user.setActive(false);\n \t user.setLocalDate(date);\n \t user.setLocalTime(time);\n\t userservice.addUser(user);\n\t \n\t\treturn \"verification Start.....\";\n\t}",
"@Override\r\n\tpublic void postRequest(Request request, Response response) {\r\n\t\tcreateUser(request, response);\r\n\t}",
"@OnClick(R.id.register_button)\n public void register () {\n InputMethodManager imm = (InputMethodManager) context\n .getSystemService(Context.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromInputMethod(usernameField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(passwordField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(confirmField.getWindowToken(), 0);\n imm.hideSoftInputFromInputMethod(emailField.getWindowToken(), 0);\n\n\n\n\n String username = usernameField.getText().toString();\n String password = passwordField.getText().toString();\n String confirm = confirmField.getText().toString();\n String email = emailField.getText().toString();\n String avatarBase64 = \"string\";\n\n if (username.isEmpty() || password.isEmpty() || confirm.isEmpty() || email.isEmpty()) {\n\n Toast.makeText(context, R.string.field_empty, Toast.LENGTH_LONG).show();\n } else if(!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n\n Toast.makeText(context, R.string.provide_vaild_email, Toast.LENGTH_SHORT).show();\n\n } else if (!password.equals(confirm)) {\n\n Toast.makeText(context, R.string.passwords_dont_match, Toast.LENGTH_SHORT).show();\n } else {\n\n registerButton.setEnabled(false);\n spinner.setVisibility(VISIBLE);\n }\n Account account = new Account(email, username, avatarBase64, password);\n RestClient restClient = new RestClient();\n restClient.getApiService().register(account).enqueue(new Callback<Void>() {\n @Override\n public void onResponse(Call<Void> call, Response<Void> response) {\n\n if (response.isSuccessful()) {\n Toast.makeText(context, R.string.registration_successful, Toast.LENGTH_LONG).show();\n //This will run if everything comes back good and sets the users token and expiration\n// User regUser = response.body();\n// UserStore.getInstance().setToken(regUser.getToken());\n// UserStore.getInstance().setTokenExpiration(regUser.getExpiration());\n\n //This will set up the flow of the application to show the next view upon successful registration\n Flow flow = PeoplemonApplication.getMainFlow();\n flow.goBack();\n } else {\n\n //This will return if the user has entered info but they have registered before\n resetView();\n Toast.makeText(context, R.string.registration_failed + \": \" + response.code(), Toast.LENGTH_LONG).show();\n }\n }\n @Override\n public void onFailure(Call<Void> call, Throwable t) {\n\n //This will show up if the data didn't come back from the server correctly or there is a timeout.\n resetView();\n Toast.makeText(context, R.string.registration_failed, Toast.LENGTH_LONG).show();\n }\n });\n }",
"public long registerUserProfile(User user);",
"Retrofit register(String identity, Retrofit retrofit);",
"protected abstract void registerUser(Map<String, String> registrationInfo);",
"public abstract User register(User data);",
"@PostMapping(value = \"/users\")\n\tpublic <T> ResponseEntity<?> registerProcess(@RequestBody User user) {\t\n\t\tLoginResponse registerResponse = new LoginResponse();\n\t\ttry {\n\n\t\t\tuser.setUserId(userDelegate.fetchUserId(user.getEmail()));\n\t\t\tregisterResponse = userDelegate.register(user);\n\t\t\treturn responseUtil.successResponse(registerResponse);\n\t\t\t\n\t\t} catch(ApplicationException e){\t\n\t\treturn responseUtil.errorResponse(e);\n\t}\n\t\t\n\t}",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users/cuentas\")\n Call<UserResource> registerUserCuentas(\n @retrofit2.http.Body UserResource userResource\n );",
"private void sendRegistrationRequestToServer() {\r\n\t\tnew ServerAsyncTask(ApplicationConstant.appurl\r\n\t\t\t\t+ ApplicationConstant.registrationRequestType + \"&userid=62\"\r\n\t\t\t\t+ \"&email=\" + emailAddress.getText().toString().trim()\r\n\t\t\t\t+ \"&firstname=\" + firstName.getText().toString().trim()\r\n\t\t\t\t+ \"&lastname=\" + lastName.getText().toString().trim()\r\n\t\t\t\t+ \"&password=\" + password.getText().toString().trim()\r\n\t\t\t\t+ \"&roles=1\" + \"access=20\", context, new ResponseCallback() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccessRecieve(Object object) {\r\n\r\n\t\t\t\tloadingProgress.setVisibility(View.GONE);\r\n\t\t\t\tshowToastMessage(\"Successfully register on app\");\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onErrorRecieve(Object object) {\r\n\r\n\t\t\t\tloadingProgress.setVisibility(View.GONE);\r\n\t\t\t\tshowToastMessage((String) object);\r\n\t\t\t}\r\n\t\t}, ApplicationConstant.registrationRequestType).execute();\r\n\r\n\t}",
"private void checkUserRegister() {\n console.log(\"aschschjcvshj\", mStringCountryCode + mStringMobileNO);\n console.log(\"asxasxasxasx_token\",\"Register here!!!!!\");\n mUtility.hideKeyboard(RegisterActivity.this);\n mUtility.ShowProgress(\"Please Wait..\");\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"mobile_number\", mStringMobileNO);\n Call<VoLoginData> mLogin = mApiService.checkUserAlreadyRegistered(params);\n mLogin.enqueue(new Callback<VoLoginData>() {\n @Override\n public void onResponse(Call<VoLoginData> call, Response<VoLoginData> response) {\n mUtility.HideProgress();\n VoLoginData mLoginData = response.body();\n // If not register then send detail with otp.\n if (mLoginData != null && mLoginData.getResponse().equalsIgnoreCase(\"false\")) {\n Intent mIntent = new Intent(RegisterActivity.this, VerifyRegisterAccount.class);\n mIntent.putExtra(\"intent_username\", mStringUsername);\n mIntent.putExtra(\"intent_account_name\", mStringAccountName);\n mIntent.putExtra(\"intent_email\", mStringEmail);\n mIntent.putExtra(\"intent_mobileno\", mStringMobileNO);\n mIntent.putExtra(\"intent_password\", mStringPassword);\n mIntent.putExtra(\"intent_fcm_token\", mStringDevicesUIDFCMToken);\n mIntent.putExtra(\"intent_country_code\", mStringCountryCode);\n mIntent.putExtra(\"intent_is_from_signup\", true);\n startActivity(mIntent);\n } else if (mLoginData != null && mLoginData.getResponse().equalsIgnoreCase(\"true\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_already_register, mStringMobileNO), getResources().getString(R.string.str_ok));\n } else {\n if (mLoginData != null && mLoginData.getMessage() != null && !mLoginData.getMessage().equalsIgnoreCase(\"\"))\n showMessageRedAlert(mRelativeLayoutMain, mLoginData.getMessage(), getResources().getString(R.string.str_ok));\n }\n }\n\n @Override\n public void onFailure(Call<VoLoginData> call, Throwable t) {\n mUtility.HideProgress();\n console.log(\"asxasxasx\",new Gson().toJson(call.request().body()));\n t.printStackTrace();\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_server_error_try_again), getResources().getString(R.string.str_ok));\n }\n });\n }",
"Task<Void> signUp(String email, String password);",
"private void callRegisterByEmailToGoogleFirebase(){\n mFirebaseAuth = FirebaseAuth.getInstance();\n\n String userEmail = mEmailAddress.getText().toString();\n String userPassword = mPassword.getText().toString();\n\n // create the user with email and password\n mFirebaseAuth.createUserWithEmailAndPassword(userEmail,userPassword).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n showBottomSnackBar(\"Corresponding Firebase User Created\");\n }else{\n showBottomSnackBar(\"Firebase User Creation Fails\");\n }\n\n replaceActivity(MainActivity.class, null);\n }\n });\n\n }",
"@Override\n protected Void doInBackground(Void... params) {\n ServerUtilities.register(context, name, email, regId);\n return null;\n }",
"private void registerForEmail(final String email, final String name, final String facebookId, final String token, final String imageUrl, final boolean isFb){\n// String url = Router.User.getWIthEmailComplete(email);\n// JSONObject params = new JSONObject();\n// try {\n// params.put(\"name\",name);\n// params.put(\"isFb\",isFb);\n// params.put(\"token\",token);\n// params.put(\"email\",email);\n// params.put(\"profilepic\",imageUrl);\n// params.put(\"facebookId\",facebookId);\n// } catch (JSONException e) {e.printStackTrace();}\n// JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, url, params, new Response.Listener<JSONObject>() {\n//\n// @Override\n// public void onResponse(JSONObject jsonObject) {\n// try {\n// JSONObject result = jsonObject.getJSONObject(\"result\");\n// String userId = result.getString(\"userId\");\n// userMain.userId = userId;\n// userMain.token = token;\n// userMain.email = email;\n// userMain.authProvider = (isFb)?\"facebook\":\"google\";\n// updateLoginTokens();\n// userMain.saveUserDataLocally();\n//\n// loginWithUserId(userId);\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// }, new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError volleyError) {\n// Log.e(\"ERROR\",\"error in registerForEmail\");\n// }\n// });\n// MainApplication.getInstance().getRequestQueue().add(jsonObjectRequest);\n }",
"private void register() {\n RegisterModel registerModel = new RegisterModel(edtEmail.getText().toString(),\n edtPaswd.getText().toString(),\n edtDisplayName.getText().toString());\n\n Response.Listener<RegisterApiResponse> responseListener = new Response.Listener<RegisterApiResponse>() {\n @Override\n public void onResponse(RegisterApiResponse response) {\n if (response.isSuccess()) login();\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String errorMsg = \"An error occurred\";\n String err = (error.getMessage() == null) ? errorMsg : error.getMessage();\n Log.d(TAG, err);\n error.printStackTrace();\n\n if (err.matches(AppConstants.CONNECTION_ERROR) || err.matches(AppConstants.TIMEOUT_ERROR)) {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n } else if (err.matches(\".*Duplicate entry .* for key 'name_UNIQUE'.*\")) {\n edtDisplayName.setError(\"username taken\");\n edtDisplayName.requestFocus();\n } else if (err.matches(\".*The email has already been taken.*\")) {\n edtEmail.setError(\"email taken\");\n edtEmail.requestFocus();\n } else {\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n }\n };\n\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_login));\n RegistrationRequests registerRequest =\n RegistrationRequests.register(this, registerModel, responseListener, errorListener);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(registerRequest);\n progressDialog.show();\n }",
"@PostMapping(path = \"/register\")\n public @ResponseBody\n String registerUser( @RequestBody TaiKhoan user) {\n // Admin admin = mAdminDao.findByToken(token);\n //if (admin != null) {\n TaiKhoan taiKhoan = mTaiKhoanDao.save(new TaiKhoan(user.getTentk(), user.getMatkhau(), user.getGmail(), user.getSdt(),user.getCmt(),user.getTypeuser(),user.getAnh()));\n if (taiKhoan != null) return AC_REGISTER_SUCESS;\n else return AC_REGISTER_NO_SUCESS;\n //} else return AC_REGISTER_NO_SUCESS;\n }",
"private void sendRegistrationIdToBackend()\n {\n\tLog.d(Globals.TAG, \"REGISTER USERID: \" + regid);\n\tString name = ((EditText)findViewById(R.id.name_edittext)).getText().toString();\n\tnew AsyncTask<String, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(String... params)\n\t {\n\t\tString msg = \"\";\n\t\ttry\n\t\t{\n\t\t Bundle data = new Bundle();\n\t\t data.putString(\"name\", params[0]);\n\t\t data.putString(\"action\", \"com.antoinecampbell.gcmdemo.REGISTER\");\n\t\t String id = Integer.toString(msgId.incrementAndGet());\n\t\t gcm.send(Globals.GCM_SENDER_ID + \"@gcm.googleapis.com\", id, Globals.GCM_TIME_TO_LIVE, data);\n\t\t msg = \"Sent registration\";\n\t\t}\n\t\tcatch (IOException ex)\n\t\t{\n\t\t msg = \"Error :\" + ex.getMessage();\n\t\t}\n\t\treturn msg;\n\t }\n\n\t @Override\n\t protected void onPostExecute(String msg)\n\t {\n\t\tToast.makeText(context, msg, Toast.LENGTH_SHORT).show();\n\t }\n\t}.execute(name);\n }",
"private void login() {\n RegistrationRequests.LoginModel loginModel = new RegistrationRequests.LoginModel(\n edtEmail.getText().toString(), edtPaswd.getText().toString(), true);\n\n final Context context = this;\n Response.Listener<RegistrationRequests.LoginApiResponse> responseListener = new Response.Listener<RegistrationRequests.LoginApiResponse>() {\n @Override\n public void onResponse(RegistrationRequests.LoginApiResponse response) {\n Log.d(TAG, \"login: \" + response.toString());\n if (response.getId() != 0) {\n Accounts.checkNewAccount(context, response.getId());\n //stores JWT token\n PrefUtil.putString(context, AppConstants.SESSION_TOKEN, response.getSessionToken());\n PrefUtil.putInt(context, AppConstants.USER_ID, response.getId());\n PrefUtil.putString(context, AppConstants.USER_NAME, response.getUsername());\n PrefUtil.putLong(context, AppConstants.LAST_LOGIN_DATE, Calendar.getInstance().getTimeInMillis());\n addToUsers(response.getId(), edtDisplayName.getText().toString());\n }\n }\n };\n\n Response.ErrorListener errorListener = new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n progressDialog.cancel();\n if (error != null) {\n String err = (error.getMessage() == null) ? \"error message null\" : error.getMessage();\n Log.d(TAG, err);\n AlertDialog.Builder alertDialog = new AlertDialog.Builder(RegisterActivity.this);\n alertDialog.setTitle(getString(R.string.error_title_signup));\n alertDialog.setMessage(getString(R.string.error_message_network)).setCancelable(false)\n .setPositiveButton(getString(R.string.dialog_ok), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.cancel();\n }\n });\n alertDialog.show();\n }\n }\n };\n\n progressDialog.setMessage(getString(R.string.progress_dialog_message_login));\n RegistrationRequests loginRequest =\n RegistrationRequests.login(this, loginModel, responseListener, errorListener);\n if (loginRequest != null) loginRequest.setTag(CANCEL_TAG);\n VolleyRequest.getInstance(this.getApplicationContext()).addToRequestQueue(loginRequest);\n }",
"private void registerUser(final String name,final String product, final String email,\r\n final String phone,final String quantity,final String price, final String address) {\n String tag_string_req = \"req_register\";\r\n\r\n String url = Config.TEST_ADDORDER_URL;\r\n\r\n StringRequest strReq = new StringRequest(Request.Method.POST,\r\n url, new Response.Listener<String>() {\r\n\r\n @Override\r\n public void onResponse(String response) {\r\n Log.d(TAG, \"Register Response: \" + response.toString());\r\n Order r=new Order(name, product, quantity, price);\r\n mIReminderAdded.onOkClick(r);\r\n dismiss();\r\n\r\n }\r\n }, new Response.ErrorListener() {\r\n\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n Log.e(TAG, \"Registration Error: \" + error.getMessage());\r\n mIReminderAdded.onDismissClick();\r\n }\r\n }) {\r\n\r\n @Override\r\n protected Map<String, String> getParams() {\r\n // Posting parameters to login url\r\n\r\n Map<String, String> params = new HashMap<String, String>();\r\n params.put(\"name\", name);\r\n params.put(\"product\", product);\r\n params.put(\"email\", email);\r\n params.put(\"phone\", phone);\r\n params.put(\"quantity\", quantity);\r\n params.put(\"price\", price);\r\n params.put(\"address\", address);\r\n\r\n return params;\r\n }\r\n\r\n };\r\n\r\n // Adding request to request queue\r\n MyApplication.getInstance().addToRequestQueue(strReq, tag_string_req);\r\n }",
"public void registrationPost(String regID){\n String type = \"android\";\n String name = LoginActivity.username;\n Callback<Events> callback = new Callback<Events>() {\n\n @Override\n public void success(Events serverResponse, Response response2) {\n if(serverResponse.getResponseCode() == 0){\n BusProvider.getInstance().post(produceEventServerResponse(serverResponse));\n }else{\n BusProvider.getInstance().post(produceErrorEvent(serverResponse.getResponseCode(),\n serverResponse.getMessage()));\n }\n }\n\n @Override\n public void failure(RetrofitError error) {\n if(error != null ){\n Log.e(TAG, error.getMessage());\n error.printStackTrace();\n }\n BusProvider.getInstance().post(produceErrorEvent(-200,error.getMessage()));\n }\n };\n communicatorInterface.postRegistration(regID, type, name, callback);\n }",
"public ManResponseBean registerUser(UserRegisterForm bean) throws Exception {\n String url = \"/services/RegisterUser\";\n /*\n * UserId SecurePassword SecurePin PinPayment PinAmount PinMenu PinPG\n * PinPGRate Name LeadId EmailNotify etc ReturnUrl TermsAgree Email\n * Language\n */\n NameValuePair[] params = {\n new NameValuePair(\"UserId\", bean.getUserId()),\n new NameValuePair(\"SecurePassword\", bean.getSecurePassword()),\n new NameValuePair(\"SecurePin\", bean.getSecurePin()),\n new NameValuePair(\"PinPayment\", bean.getPinPayment()),\n new NameValuePair(\"PinAmount\", bean.getPinAmount()),\n new NameValuePair(\"PinMenu\", bean.getPinMenu()),\n new NameValuePair(\"PinPG\", bean.getPinPG()),\n new NameValuePair(\"PinPGRate\", bean.getPinPGRate()),\n new NameValuePair(\"FirstName\", bean.getFirstName()),\n new NameValuePair(\"LastName\", bean.getLastName()),\n new NameValuePair(\"Name\", bean.getFirstName() + \" \"\n + bean.getLastName()),\n new NameValuePair(\"LeadId\", bean.getLeadId()),\n new NameValuePair(\"EmailNotify\", bean.getEmailNotify()),\n new NameValuePair(\"etc\", bean.getEtc()),\n new NameValuePair(\"ReturnUrl\", bean.getReturnUrl()),\n new NameValuePair(\"TermsAgree\", bean.getTermsAgree()),\n new NameValuePair(\"Question\", bean.getQuestion()),\n new NameValuePair(\"Answer\", bean.getAnswer()),\n new NameValuePair(\"Language\", bean.getLanguage()),\n new NameValuePair(\"Email\", bean.getEmail()) };\n ManResponseBean response = handlePOSTRequest(url, params, null);\n return response;\n }",
"private void registerUserOnServer() throws IOException {\r\n\t\tdataSending.sendMessage(Server.REGISTER+\" \"+userName, Long.toString(userModel.ID));\r\n\t}",
"private void register() {\r\n if (mName.getText().length() == 0) {\r\n mName.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mEmail.getText().length() == 0) {\r\n mEmail.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() == 0) {\r\n mPassword.setError(\"please fill this field\");\r\n return;\r\n }\r\n if (mPassword.getText().length() < 6) {\r\n mPassword.setError(\"password must have at least 6 characters\");\r\n return;\r\n }\r\n\r\n\r\n final String email = mEmail.getText().toString();\r\n final String password = mPassword.getText().toString();\r\n final String name = mName.getText().toString();\r\n\r\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\r\n @Override\r\n public void onComplete(@NonNull Task<AuthResult> task) {\r\n if (!task.isSuccessful()) {\r\n Snackbar.make(view.findViewById(R.id.layout), \"sign up error\", Snackbar.LENGTH_SHORT).show();\r\n } else {\r\n String uid = FirebaseAuth.getInstance().getCurrentUser().getUid();\r\n\r\n //Saves the user's info in the database\r\n Map<String, Object> mNewUserMap = new HashMap<>();\r\n mNewUserMap.put(\"email\", email);\r\n mNewUserMap.put(\"name\", name);\r\n\r\n FirebaseDatabase.getInstance().getReference().child(\"users\").child(uid).updateChildren(mNewUserMap);\r\n }\r\n }\r\n });\r\n\r\n }",
"void registerUser(User newUser);",
"@Override\n public void fromWXRegister(Map<String, Object> data, String token, final IBaseModel.OnCallbackListener listener) {\n RequestBody body = RequestBody.create(MediaType.parse(\"application/json;charset=UTF-8\"),\n GsonUtils.parseToJson(data));\n final Request request = new Request.Builder()\n .url(\"URL\")\n .header(\"Authorization\", token)\n .post(body)//默认就是GET请求,可以不写\n .build();\n HttpProvider.getOkHttpClient().newCall(request).enqueue(new Callback() {\n @Override\n public void onFailure(Call call, IOException e) {\n Log.d(\"onFailure: \", e.getMessage());\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n if (response.isSuccessful()) {\n delayedExecuteCallback(response.body().string(), new TypeToken<ResponseEntity<UserInfoEntity>>() {\n }.getType(), listener);\n } else {\n delayedExecuteCallback(null, new TypeToken<ResponseEntity<UserInfoEntity>>() {\n }.getType(), listener);\n }\n }\n });\n\n /* HttpProvider.doPost(URL, data, new HttpProvider.ResponseCallback() {\n @Override\n public void callback(String responseText) {\n delayedExecuteCallback(responseText, new TypeToken<ResponseEntity<UserInfoEntity>>() {\n }.getType(), listener);\n }\n });*/\n }",
"private void registerUser() {\n displayLoader();\n JSONObject request = new JSONObject();\n try {\n request.put(\"firstname\",firstName);\n request.put(\"lastname\",lastName);\n if (isTutor) {\n request.put(\"tutor\", 1);\n } else {\n request.put(\"tutor\", 0);\n }\n request.put(\"username\", username);\n request.put(\"email\", email);\n request.put(\"password\", password);\n request.put(\"School\",university);\n request.put(\"Department\",major);\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n JsonObjectRequest jsArrayRequest = new JsonObjectRequest\n (Request.Method.POST, register_url, request, new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n pDialog.dismiss();\n try {\n System.out.println();\n //Check if user got registered successfully\n if (response.getInt(KEY_STATUS) == 0) {\n //Set the user session\n //session.loginUser(username,fullName);\n Toast.makeText(getApplicationContext(),\n \"Registration Successful\", Toast.LENGTH_SHORT).show();\n\n Log.i(TAG, \"onResponse: \"+response.toString());\n navigateToNextPage();\n\n }else {\n\n Log.i(TAG, \"onResponse: \"+request.toString());\n// String message= request.getString(\"message\");\n Toast.makeText(getApplicationContext(),\n \"Registration Successful\", Toast.LENGTH_SHORT).show();\n\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n pDialog.dismiss();\n\n Log.i(TAG, \"onErrorResponse: \"+error.getMessage());\n //Display error message whenever an error occurs\n Toast.makeText(getApplicationContext(),\n \"Unable to register. Please try after some time\", Toast.LENGTH_SHORT).show();\n\n }\n });\n\n // Access the RequestQueue through your singleton class.\n MySingleton.getInstance(this).addToRequestQueue(jsArrayRequest);\n }",
"@RequestMapping(value = \"/reg.htm\",method = RequestMethod.POST)\r\n\tpublic String register(User user,BindingResult result,ModelMap map,HttpSession session,HttpServletResponse response) throws IOException {\r\n\t\t\r\n\t\t\tuserService.addUser(user);\r\n\t\t\treturn \"regSuccess\";\t\r\n\t\t}",
"private void register(final Context context, final RegistrationParams params, final InternalRegistrationListener listener) {\n if (getLoginRestClient() != null) {\n params.initial_device_display_name = context.getString(R.string.login_mobile_device);\n mLoginRestClient.register(params, new UnrecognizedCertApiCallback<Credentials>(mHsConfig) {\n @Override\n public void onSuccess(Credentials credentials) {\n if (TextUtils.isEmpty(credentials.userId)) {\n listener.onRegistrationFailed(ERROR_EMPTY_USER_ID);\n } else {\n // Initiate login process\n Collection<MXSession> sessions = Matrix.getMXSessions(context);\n boolean isDuplicated = false;\n\n for (MXSession existingSession : sessions) {\n Credentials cred = existingSession.getCredentials();\n isDuplicated |= TextUtils.equals(credentials.userId, cred.userId) && TextUtils.equals(credentials.homeServer, cred.homeServer);\n }\n\n if (null == mHsConfig) {\n listener.onRegistrationFailed(\"null mHsConfig\");\n } else {\n if (!isDuplicated) {\n mHsConfig.setCredentials(credentials);\n MXSession session = Matrix.getInstance(context).createSession(mHsConfig);\n Matrix.getInstance(context).addSession(session);\n }\n\n listener.onRegistrationSuccess();\n }\n }\n }\n\n @Override\n public void onAcceptedCert() {\n register(context, params, listener);\n }\n\n @Override\n public void onTLSOrNetworkError(final Exception e) {\n listener.onRegistrationFailed(e.getLocalizedMessage());\n }\n\n @Override\n public void onMatrixError(MatrixError e) {\n if (TextUtils.equals(e.errcode, MatrixError.USER_IN_USE)) {\n // user name is already taken, the registration process stops here (new user name should be provided)\n // ex: {\"errcode\":\"M_USER_IN_USE\",\"error\":\"User ID already taken.\"}\n Log.d(LOG_TAG, \"User name is used\");\n listener.onRegistrationFailed(MatrixError.USER_IN_USE);\n } else if (TextUtils.equals(e.errcode, MatrixError.UNAUTHORIZED)) {\n // happens while polling email validation, do nothing\n } else if (null != e.mStatus && e.mStatus == 401) {\n try {\n RegistrationFlowResponse registrationFlowResponse = JsonUtils.toRegistrationFlowResponse(e.mErrorBodyAsString);\n setRegistrationFlowResponse(registrationFlowResponse);\n } catch (Exception castExcept) {\n Log.e(LOG_TAG, \"JsonUtils.toRegistrationFlowResponse \" + castExcept.getLocalizedMessage(), castExcept);\n }\n listener.onRegistrationFailed(ERROR_MISSING_STAGE);\n } else if (TextUtils.equals(e.errcode, MatrixError.RESOURCE_LIMIT_EXCEEDED)) {\n listener.onResourceLimitExceeded(e);\n } else {\n listener.onRegistrationFailed(\"\");\n }\n }\n });\n }\n }",
"@PostMapping(\"/process_register\")\n public String processRegistration(User user,Model model)\n throws SignatureException, NoSuchAlgorithmException, InvalidKeyException{\n\n //checking if user exists\n if(userService.existByLogin(user.getLogin())) {\n model.addAttribute(\"error\", true);\n return \"registerForm\";\n }\n\n model.addAttribute(\"user\", user);\n //saving user\n /* userRepository.save(user);*/\n userService.saveUser(user, Sha512.generateSalt().toString());\n return \"registerSuccessful\";\n }",
"private void register(HttpServletRequest req, HttpServletResponse resp) {\n\t\tString nickname=req.getParameter(\"nickname\");\n\t\tString password=req.getParameter(\"password\");\n\t\tString gender=req.getParameter(\"gender\");\n\t\tdouble salary=Double.parseDouble(req.getParameter(\"salary\"));\n\t\t\n\t\t//可以首先怕段昵称是否已经被使用,如果已经被使用,则不允许注册\n\t\t\t//获取服务对象\n\t\tIEmpService service =new EmpService();\n\t\t\t//调用判断用户名是否存在的方法\n\t\tif(service.findEmpByNickname(nickname)==1) {\n\t\t\t//把提示信息调入请求域中\n\t\t\t\treq.setAttribute(\"RegistFail\", \"用户名已经被注册\");\n\t\t\t//请求转发\n\t\t\ttry {\n\t\t\t\treq.getRequestDispatcher(\"/register\").forward(req, resp);\n\t\t\t} catch (ServletException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (IOException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}else {\n\t\t\t//调用注册的方法\n\t\t\ttry{\n\t\t\t\tEmp emp =new Emp(null,nickname,password,gender,salary);\n\t\t\t\tservice.regist(emp);\n\t\t\t\tresp.getWriter().write(\"注册成功, 即将跳转到登录页面\");\n\t\t\t\tresp.setHeader(\"refresh\", \"3;url=/zjj/Login.jsp\");\n\n\t\t\t}catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\t\n\t}",
"private void addUserToFireBase() {\n Storage storage = new Storage(activity);\n RetrofitInterface retrofitInterface = RetrofitClient.getRetrofit().create(RetrofitInterface.class);\n Call<String> tokenCall = retrofitInterface.addUserToFreebase(RetrofitClient.FIREBASE_ENDPOINT + \"/\" + storage.getUserId() + \"/\" + storage.getFirebaseToken(), storage.getAccessToken());\n tokenCall.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n if (response.isSuccessful()) {\n\n Toast.makeText(activity, \"Firebase success!\", Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(activity, \"Failed to add you in Firebase!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }",
"@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\n\t\t\t\t\t\taController.register(context, email, regId);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}",
"@WebMethod public Pertsona register(String izena, String abizena1, String abizena2, String erabiltzaileIzena, String pasahitza, String telefonoa, String emaila, LocalDate jaiotzeData, String mota) throws UserAlreadyExist;",
"@Override\n\t\t\tprotected String doInBackground(String... params) {\n\t\t\t\tHashMap<String,String> data=new HashMap<String,String>();\n\t\t\t\t\n\t\t\t\tdata.put(\"username\",params[0]);\n\t\t\t\tdata.put(\"password\", params[1]);\n\t\t\t\tdata.put(\"regid\", params[2]);\n\t\t\t\t\t\t\t\t\n\t\t\t\tString result=ruc.sendPostRequest(REGISTER_URL, data);\n\t\t\t\t\n\t\t\t\tif(isNetworkAvailable()==false)\n\t\t\t\t{\n\t\t\t\t\tresult=\"Maaf, anda sedang tidak terhubung ke jaringan.\";\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}",
"public RegisterResult register(RegisterRequest r) throws DBException, IOException\n {\n try\n {\n idGenerator = UUID.randomUUID();\n String personID = idGenerator.toString();\n User newUser = new User(\n r.getUserName(),\n r.getPassword(),\n r.getEmail(),\n r.getFirstName(),\n r.getLastName(),\n r.getGender(),\n personID\n );\n userDao.postUser(newUser);\n commit(true);\n login = new LoginService();\n\n LoginRequest loginRequest = new LoginRequest(r.getUserName(), r.getPassword());\n LoginResult loginResult = login.loginService(loginRequest);\n login.commit(true);\n\n fill = new FillService();\n FillRequest fillRequest = new FillRequest(r.getUserName(), 4);\n FillResult fillResult = fill.fill(fillRequest);\n fill.commit(true);\n\n\n result.setAuthToken(loginResult.getAuthToken());\n result.setUserName(loginResult.getUserName());\n result.setPersonID(loginResult.getPersonID());\n result.setSuccess(loginResult.isSuccess());\n\n\n if( !loginResult.isSuccess() || !fillResult.isSuccess() )\n {\n throw new DBException(\"Login failed\");\n }\n\n }\n catch(DBException ex)\n {\n result.setSuccess(false);\n result.setMessage(\"Error: \" + ex.getMessage());\n commit(false);\n }\n return result;\n }",
"public void creatUser(String name, String phone, String email, String password);",
"private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}",
"@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"administrators\")\n Call<Void> createUser(\n @retrofit2.http.Body UserBody userBody\n );",
"public void register(final RegisterCallback callback, User user) {\n final String urlRegister = mUrl + ENDPOINT_REGISTER;\n mRequestQueue.add(new JsonObjectRequest(Request.Method.POST, urlRegister, user.toJSON(), new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n boolean success = response.optBoolean(\"success\", false);\n if (success) {\n callback.registerSuccess();\n } else {\n callback.registerError(RegisterCallback.Error.EMAIL_TAKEN);\n }\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n String jsonData = new String(error.networkResponse.data);\n try {\n JSONObject jsonObject = new JSONObject(jsonData);\n String message = jsonObject.optString(\"message\");\n if (message == null) {\n callback.registerError(RegisterCallback.Error.UNKNOWN);\n } else if (message.endsWith(\"email address\")) {\n callback.registerError(RegisterCallback.Error.INVALID_EMAIL_ADDRESS);\n } else {\n callback.registerError(RegisterCallback.Error.INVALID_PASSWORD);\n }\n } catch (JSONException e) {\n callback.registerError(RegisterCallback.Error.UNKNOWN);\n }\n }\n }));\n }",
"private void handleRegister(Business business) {\n\n Call<String> call = rtfBase.register(business); //we get id\n call.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n if(response.code() == 200)\n {\n // business.setId(response.body());\n // Toast.makeText(RegisterNewBusiness.this, \"registered successfully\",Toast.LENGTH_LONG).show();\n\n connectToApp(business);\n\n\n }\n if(response.code() == 400)\n {\n Toast.makeText(RegisterNewBusiness.this, \"you already registered\",Toast.LENGTH_LONG).show();\n\n }\n if(response.code() == 404)\n {\n Toast.makeText(RegisterNewBusiness.this, \"something wrong\",Toast.LENGTH_LONG).show();\n\n }\n }\n\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n Toast.makeText(RegisterNewBusiness.this, t.getMessage(),Toast.LENGTH_LONG).show();\n }\n });\n }",
"public static RegisterResult register(RegisterRequest r) {\n\n User new_user = new User(UUID.randomUUID().toString(), r.userName, r.password, r.email,\n r.firstName, r.lastName, r.gender);\n\n RegisterResult result = new RegisterResult();\n\n User test_user = UserDao.getUser(r.userName);\n if (test_user != null && !test_user.userName.equals(\"\"))\n {\n result.message = \"Error: Username already taken by another user\";\n result.success = false;\n return result;\n }\n\n result.authToken = UUID.randomUUID().toString();\n AuthTokenDao.updateToken(r.userName, result.authToken);\n\n Person p = new Person(new_user.personID, r.userName, r.firstName, r.lastName, r.gender);\n PersonDao.addPerson(p);\n\n result.userName = r.userName;\n result.personID = new_user.personID;\n UserDao.addUser(new_user);\n\n // Generate 4 generations of ancestry\n GenerateData.generateGenerations(r.userName, 4);\n\n result.success = true;\n\n return result;\n }",
"User register(String firstName, String lastName, String username, String email) throws UserNotFoundException, EmailExistException, UsernameExistsException, MessagingException;",
"@Test\n public void testUserNotifiedOnRegistrationSubmission() throws Exception {\n ResponseEntity<String> response = registerUser(username, password);\n assertNotNull(userService.getUser(username));\n assertEquals(successUrl, response.getHeaders().get(\"Location\").get(0));\n }",
"void signUp(SignUpRequest signupRequest);",
"private void sendToServer(User register) {\r\n RegisterServiceAsync registerServiceAsync = GWT.create(RegisterService.class);\r\n AsyncCallback<String> asyncCallback = new AsyncCallback<String>() {\r\n public void onSuccess(String result) {\r\n if (result != null) {\r\n String[] tmp = result.split(\"_\");\r\n \r\n int value = Integer.parseInt(tmp[0]);\r\n if (value == User.OK) {\r\n RootPanel.get(\"content\").clear();\r\n String[] href = Window.Location.getHref().split(\"#\");\r\n String linker = href[0].contains(\"?\") ? \"&\" : \"?\";\r\n getEntry().showDialogBox(\"ActivationLink\", href[0] + linker + \"activationCode=\" + tmp[1]);\r\n History.newItem(\"welcome\");\r\n } else {\r\n if (value >= User.PASSWORD_FAULT) {\r\n value -= User.PASSWORD_FAULT;\r\n }\r\n if (value >= User.USERNAME_FAULT) {\r\n value -= User.USERNAME_FAULT; \r\n registerInvalid(User.USERNAME_FAULT);\r\n }\r\n if (value >= User.EMAIL_FORMAT) {\r\n value -= User.EMAIL_FORMAT;\r\n registerInvalid(User.EMAIL_FORMAT);\r\n }\r\n if (value >= User.GEBURTSTAG_AGE) {\r\n value -= User.GEBURTSTAG_AGE;\r\n registerInvalid(User.GEBURTSTAG_AGE);\r\n }\r\n if (value >= User.GEBURTSTAG_FORMAT) {\r\n value -= User.GEBURTSTAG_FORMAT;\r\n registerInvalid(User.GEBURTSTAG_FORMAT);\r\n }\r\n if (value >= User.GEBURTSTAG_FAULT) {\r\n value -= User.GEBURTSTAG_FAULT;\r\n registerInvalid(User.GEBURTSTAG_FAULT);\r\n }\r\n submit.setEnabled(true);\r\n }\r\n } else {\r\n submit.setEnabled(true);\r\n }\r\n }\r\n \r\n public void onFailure(Throwable caught) {\r\n registerInvalid(0);\r\n System.out.println(caught);\r\n }\r\n };\r\n registerServiceAsync.register(register, asyncCallback);\r\n }",
"private void userSignup(String email, String password) {\n String url = \"https://7e69edce-af20-4c49-9ad9-5697df4e8a20.mock.pstmn.io\";\n StringRequest request = new StringRequest(Request.Method.POST, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n// Log.i(\"LOG\", \"onResponse: \" + response);\n onSignupClicked.onClicked(response);\n dismiss();\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n// Toast.makeText(getContext(), error.toString(), Toast.LENGTH_SHORT).show();\n Log.i(\"LOG\", \"onErrorResponse: \" + error.toString());\n }\n }) {\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n\n params.put(\"username\", email);\n params.put(\"password\", password);\n return params;\n }\n };\n\n request.setRetryPolicy(new DefaultRetryPolicy(15000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES,\n DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\n\n RequestQueue requestQueue = Volley.newRequestQueue(getContext());\n requestQueue.add(request);\n }",
"@PostMapping(value = \"/register\") \n\t public RegisterResponseDto\t usersRegister(@RequestBody RegistrationDto registrationDto) {\n\t LOGGER.info(\"usersRegster method\");\n\t return\t userService.usersRegister(registrationDto); \n\t }",
"UserDTO registerUser(UserRegistrationDTO registrationDTO);",
"private void registerUser(HttpServletRequest request, HttpServletResponse response){\n String firstName = request.getParameter(\"firstName\");\n String lastName = request.getParameter(\"lastName\");\n String address = request.getParameter(\"address\");\n String email = request.getParameter(\"email\");\n String shipAddress = request.getParameter(\"shipAddress\");\n int role = Integer.parseInt(request.getParameter(\"role\"));\n User user = new User(firstName,lastName,address,email,shipAddress,role);\n userServices.addUser(user);\n try {\n request.getRequestDispatcher(\"/home\").forward(request,response);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void register() {\n\n //Displaying a progress dialog\n final ProgressDialog loading = ProgressDialog.show(this, \"Registering\",\n \"Please wait...\", false, false);\n\n\n //Getting user data\n// username = editTextUsername.getText().toString().trim();\n// password = editTextPassword.getText().toString().trim();\n// phone = editTextPhone.getText().toString().trim();\n\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n loading.dismiss();\n confirmOtp();\n }\n }, 3000);\n\n\n //Again creating the string request\n// StringRequest stringRequest = new StringRequest(Request.Method.POST, Config.REGISTER_URL,\n// new Response.Listener<String>() {\n// @Override\n// public void onResponse(String response) {\n// loading.dismiss();\n// try {\n// //Creating the json object from the response\n// JSONObject jsonResponse = new JSONObject(response);\n//\n// //If it is success\n// if(jsonResponse.getString(Config.TAG_RESPONSE).equalsIgnoreCase(\"Success\")){\n// //Asking user to confirm otp\n// confirmOtp();\n// }else{\n// //If not successful user may already have registered\n// Toast.makeText(BusinessRegistration.this, \"Username or Phone number already registered\", Toast.LENGTH_LONG).show();\n// }\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// },\n// new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError error) {\n// loading.dismiss();\n// Toast.makeText(BusinessRegistration.this, error.getMessage(), Toast.LENGTH_LONG).show();\n// }\n// }) {\n// @Override\n// protected Map<String, String> getParams() throws AuthFailureError {\n// Map<String, String> params = new HashMap<>();\n// //Adding the parameters to the request\n// params.put(Config.KEY_USERNAME, username);\n// params.put(Config.KEY_PASSWORD, password);\n// params.put(Config.KEY_PHONE, phone);\n// return params;\n// }\n// };\n\n //Adding request the the queue\n// requestQueue.add(stringRequest);\n }",
"public void signUp(UserSignUpRequest userSignUpRequest) {\n apiInterface.signUp(\n userSignUpRequest\n )\n .subscribeOn(Schedulers.io())\n .observeOn(AndroidSchedulers.mainThread())\n .subscribe(\n new Observer<Response<ResponseBody>>() {\n @Override\n public void onSubscribe(Disposable d) {\n\n }\n\n @Override\n public void onNext(Response<ResponseBody> responseBodyResponse) {\n if (responseBodyResponse.code() == 201) {\n try {\n //noinspection ConstantConditions\n saveUserData(\n new Gson().fromJson(\n responseBodyResponse.body().string(),\n UserData.class\n )\n );\n } catch (IOException e) {\n e.printStackTrace();\n }\n mutableLiveDataSignUpResult.postValue(\n new Event<>(\n new Result(\n Enums.Result.SUCCESS, \"\"\n )\n )\n );\n } else {\n mutableLiveDataSignUpResult.postValue(\n new Event<>(\n new Result(\n Enums.Result.FAIL,\n getErrorMessage(responseBodyResponse.errorBody())\n )\n )\n );\n }\n }\n\n @Override\n public void onError(Throwable e) {\n mutableLiveDataSignUpResult.postValue(\n new Event<>(\n new Result(\n Enums.Result.FAIL,\n getErrorMessage(e)\n )\n )\n );\n }\n\n @Override\n public void onComplete() {\n\n }\n }\n );\n }",
"@Override\n protected void onActivityResult(\n final int requestCode,\n final int resultCode,\n final Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode != FRAMEWORK_REQUEST_CODE) {\n return;\n }\n\n final String toastMessage;\n final AccountKitLoginResult loginResult = AccountKit.loginResultWithIntent(data);\n if (loginResult == null || loginResult.wasCancelled())\n {\n toastMessage = \"Cancelled\";\n Toast.makeText(RegisterUser.this,toastMessage,Toast.LENGTH_SHORT).show();\n }\n else if (loginResult.getError() != null) {\n Toast.makeText(RegisterUser.this,\"Error\",Toast.LENGTH_SHORT).show();\n } else {\n final AccessToken accessToken = loginResult.getAccessToken();\n if (accessToken != null) {\n\n AccountKit.getCurrentAccount(new AccountKitCallback<Account>() {\n @Override\n public void onSuccess(final Account account) {\n String phoneNumber = account.getPhoneNumber().toString();\n\n if(phoneNumber.length()==14)\n phoneNumber = phoneNumber.substring(3);\n\n newUserRegistration(phoneNumber);\n progressBar.setVisibility(View.VISIBLE);\n }\n\n @Override\n public void onError(final AccountKitError error) {\n }\n });\n } else {\n toastMessage = \"Unknown response type\";\n Toast.makeText(RegisterUser.this, toastMessage, Toast.LENGTH_SHORT).show();\n }\n }\n }",
"public void register (String username, String password) throws JSONException {\n view.showProgressBar();\n model.signUp(username, password);\n }",
"private void userRegister(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n\t\tString name=request.getParameter(\"name\");\r\n\t\tString loginid=request.getParameter(\"loginid\");\r\n\t\tString pwd=request.getParameter(\"pwd\");\r\n\t\tString email=request.getParameter(\"email\");\r\n\t\tString addr=request.getParameter(\"address\");\r\n\t\tString phno=request.getParameter(\"phno\");\r\n\t\tUser u=new User(name,loginid,pwd,email,addr,phno);\r\n\t\tUserFunctions uf=new UserFunctionsImpl();\r\n\t\tString username=uf.register(u);\r\n\t\tRequestDispatcher dispatcher = request.getRequestDispatcher(\"successregi.jsp\");\r\n\t\trequest.setAttribute(\"name\", username); \r\n dispatcher.forward(request, response);\r\n\t}",
"private void CreateUserAccount(final String lname, String lemail, String lpassword, final String lphone, final String laddress, final String groupid, final String grouppass ){\n mAuth.createUserWithEmailAndPassword(lemail,lpassword).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n //account creation successful\n showMessage(\"Account Created\");\n //after user account created we need to update profile other information\n updateUserInfo(lname, pickedImgUri,lphone, laddress, groupid, grouppass, mAuth.getCurrentUser());\n }\n else{\n //account creation failed\n showMessage(\"Account creation failed\" + task.getException().getMessage());\n regBtn.setVisibility(View.VISIBLE);\n loadingProgress.setVisibility(View.INVISIBLE);\n\n }\n }\n });\n }",
"public void registerUser(View view) {\n this.closeKeyboard();\n this.validator.validate();\n if (this.validator.hasNoErrors()) {\n User user = createUser();\n RealmUser registeredUser = registerUserDetails(user);\n //TODO register on server.\n if (registeredUser != null) {\n new MockUserRegistrationService().registerUser(user.getFirstName(), user.getLastName(), user.getEmail(), user.getInsuranceProvider(), user.getInsurancePlan());\n doOnRegistrationSuccess();\n }\n }\n }",
"public PersonajeVO registUsr(String texto, String pass, String mail,String idGCM,String lat, String lng, String url) {\t\t\n\t\tLog.d(TAG, \"Register() en API\");\n\t\tLog.d(TAG, url);\n\t\tPersonajeVO person = null;\n\t\tUsuarioVO dev = new UsuarioVO();\n\t\tdev.setUsername(texto);\n\t\tdev.setPass(pass);\n\t\tdev.setEmail(mail);\n\t\tdev.setIdGCM(idGCM);\n\t\tdev.setLatitud(Double.parseDouble(lat));\n\t\tdev.setLongitud(Double.parseDouble(lng));\n Gson gson = new GsonBuilder().create();\n \n\t\tHttpClient httpClient = new DefaultHttpClient();\n\t\thttpClient = WebServiceUtils.getHttpClient();\n\t\t\n\t\tHttpPost post = new HttpPost(url);\n\t\tHttpResponse response;\n\t\tStringEntity params;\n\t\t\n\t\ttry {\n\t\t\tparams = new StringEntity(gson.toJson(dev));\n\t post.addHeader(\"content-type\", MediaType.API_USER);\n\t post.setEntity(params);\n\t\t\tresponse = httpClient.execute(post);\n\t\t\tHttpEntity entity = response.getEntity();\n\t\t\tReader reader = new InputStreamReader(entity.getContent());\n\t\t\tperson = gson.fromJson(reader, PersonajeVO.class);\n\t\t} catch (UnsupportedEncodingException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}catch (ClientProtocolException 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} catch (NullPointerException e){\n\t\t\tLog.d(TAG, \"Register No valido\");\n\t\t\tperson = new PersonajeVO();\n\t\t\tperson.setNombre(\"\");\n\t\t}\n\t\t\n\t\treturn person;\n\t\t\n\t}",
"public void register()\n {\n String n = nameProperty.getValue();\n if (n == null || n.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String p = passwordProperty.getValue();\n if (p == null || p.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String e = emailProperty.getValue();\n if (e == null || e.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String ph = phoneProperty.getValue();\n if (ph == null || ph.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (ph.length() != 8)\n {\n throw new IllegalArgumentException(\"Invalid phone number\");\n }\n try\n {\n Integer.parseInt(ph);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid phone number\", ex);\n }\n String t = titleProperty.getValue();\n if (t == null || t.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String a = authorProperty.getValue();\n if (a == null || a.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n String y = yearProperty.getValue();\n if (y == null || y.isEmpty())\n {\n throw new IllegalArgumentException(\"Field cannot be empty\");\n }\n if (y.length() != 4)\n {\n throw new IllegalArgumentException(\"Invalid year\");\n }\n try\n {\n Integer.parseInt(y);\n }\n catch (NumberFormatException ex)\n {\n throw new IllegalArgumentException(\"Invalid year\", ex);\n }\n\n try\n {\n\n model.registerUser(n, p, e, ph, t, a, y);\n\n }\n catch (Exception e1)\n {\n\n e1.printStackTrace();\n }\n\n }",
"public void register(RegistrationDTO p) throws UserExistException {\n userLogic.register((Person) p);\n }",
"@Test\n\tpublic void registerUserTest() throws RemoteException, NoSuchAlgorithmException, InvalidKeySpecException, IOException, InvalidKeyException, SignatureException, NoSuchPaddingException, IllegalBlockSizeException, BadPaddingException, UnrecoverableKeyException, KeyStoreException, CertificateException {\n\t\t\n\t\t// Creation of the server\n\t\tPasswordManager pm = new PasswordManager(8080);\n\n\t\t// Normal register\n\t\tString response = pm.registerUser(DatatypeConverter.printBase64Binary(cliPubKey.getEncoded()), \n\t\t\t\tDigitalSignature.getSignature(cliPubKey.getEncoded(),cliPrivKey));\n\n\t\t// Analyse the correctness of the answer\n\t\tAssert.assertNotSame(response, \"Error: Could not validate signature.\");\n\t}",
"CreateUserResult createUser(CreateUserRequest createUserRequest);",
"private void registerUser(final String name, final String email,\n final String password, final String mobile, final String spinner) {\n // Tag used to cancel the request\n String tag_string_req = \"req_register\";\n\n pDialog.setMessage(\"Registering ...\");\n showDialog();\n\n StringRequest strReq = new StringRequest(Method.POST,\n AppConfig.URL_REGISTER, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n Log.d(TAG, \"Register Response: \" + response);\n hideDialog();\n\n try {\n JSONObject jObj = new JSONObject(response);\n boolean error = jObj.getBoolean(\"error\");\n if (!error) {\n // User successfully stored in MySQL\n // Now store the user in sqlite\n String uid = jObj.getString(\"uid\");\n\n JSONObject user = jObj.getJSONObject(\"user\");\n String name = user.getString(\"name\");\n String email = user.getString(\"email\");\n String created_at = user\n .getString(\"created_at\");\n String mobile =user.getString(\"mobile\");\n\n // Inserting row in users table\n db.addUser(name, email, mobile, uid, created_at);\n\n Toast.makeText(getApplicationContext(), \"User successfully registered. Try login now!\", Toast.LENGTH_LONG).show();\n\n // Launch login activity\n Intent intent = new Intent(\n RegisterActivity.this,\n LoginActivity.class);\n startActivity(intent);\n finish();\n } else {\n\n // Error occurred in registration. Get the error\n // message\n String errorMsg = jObj.getString(\"error_msg\");\n Toast.makeText(getApplicationContext(),\n errorMsg, Toast.LENGTH_LONG).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(TAG, \"Registration Error: \" + error.getMessage());\n Toast.makeText(getApplicationContext(),\n error.getMessage(), Toast.LENGTH_LONG).show();\n hideDialog();\n }\n }) {\n\n @Override\n protected Map<String, String> getParams() {\n // Posting params to register url\n Map<String, String> params = new HashMap<>();\n params.put(\"name\", name);\n params.put(\"email\", email);\n params.put(\"password\", password);\n params.put(\"mobile\", mobile);\n params.put(\"spinner\",spinner);\n\n return params;\n }\n\n };\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(strReq, tag_string_req);\n}",
"private boolean requestNewAccount() {\n\t\tServerAPITask userTasks = new ServerAPITask();\n\t\tString uName = usernameField.getText().toString();\n\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\ttry {\n\t\t\tString response = userTasks.execute(\"\").get();\n\t\t\tLog.e(\"Response String\", response);\n\t\t\t\n\t\t\tjsonResponse = new JSONArray(response);\n\t\t\tif (jsonResponse.length() > 0) {\n\t\t\t\tToast.makeText(this.getContext(), \"The username already exists\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tuserTasks = new ServerAPITask();\n\t\t\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/create/\" + uName);\n\t\t\t\t\n\t\t\t\tString createResp = userTasks.execute(\"\").get();\n\t\t\t\tLog.e(\"Create Response\", createResp);\n\t\t\t\tJSONObject cObj = new JSONObject(createResp);\n\t\t\t\t\n\t\t\t\tString success = cObj.getString(\"success\");\n\t\t\t\tif (success.equals(\"false\")) {\n\t\t\t\t\tToast.makeText(this.getContext(), \"The username already exists\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t\telse if (success.equals(\"true\")) {\t\t\t\t\t\n\t\t\t\t\tuserTasks = new ServerAPITask();\n\t\t\t\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\t\t\t\t\n\t\t\t\t\tcreateResp = userTasks.execute(\"\").get();\n\t\t\t\t\tLog.e(\"Get User ID\", createResp);\n\t\t\t\t\t\n\t\t\t\t\tjsonResponse = new JSONArray(createResp);\n\t\t\t\t\tJSONObject jsObj = jsonResponse.getJSONObject(0);\n\t\t\t\t\t\n\t\t\t\t\tif (jsObj == null) {\n\t\t\t\t\t\tToast.makeText(this.getContext(), \"An error occurred while retrieving user\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tString _user_id = jsObj.getString(\"_id\");\n\t\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USER_ID_KEY, _user_id);\n\t\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USERNAME_KEY, uName);\n\t\t\t\t\t}\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\treturn true;\n\t}",
"private void makeRegisterRequest(String name, String mobile,\n String email, String password) {\n\n final SweetAlertDialog loading=new SweetAlertDialog(RegisterActivity.this,SweetAlertDialog.PROGRESS_TYPE);\n loading.setCancelable(false);\n loading.setTitleText(\"Loading...\");\n\n loading.getProgressHelper().setBarColor(getResources().getColor(R.color.green));\n\n loading.show();\n\n String refercode=et_refer.getText().toString();\n\n // Tag used to cancel the request\n String tag_json_obj = \"json_register_req\";\n\n Map<String, String> params = new HashMap<String, String>();\n\n params.put(\"user_name\", name);\n params.put(\"user_mobile\", mobile);\n params.put(\"user_email\", email);\n params.put(\"password\", password);\n if(!refercode.isEmpty()){\n params.put(\"referal_code\",refercode);\n }\n CustomVolleyJsonRequest jsonObjReq = new CustomVolleyJsonRequest(Request.Method.POST,\n BaseURL.REGISTER_URL, params, new Response.Listener<JSONObject>() {\n\n @Override\n public void onResponse(JSONObject response) {\n Log.d(TAG, response.toString());\n\n try {\n loading.dismiss();\n Boolean status = response.getBoolean(\"responce\");\n if (status) {\n\n String msg = response.getString(\"message\");\n Toast.makeText(RegisterActivity.this, \"\" + msg, Toast.LENGTH_SHORT).show();\n\n Intent i = new Intent(RegisterActivity.this, LoginActivity.class);\n startActivity(i);\n\n if(!f)\n {\n finish();\n }\n btn_register.setEnabled(false);\n\n } else {\n String error = response.getString(\"error\");\n btn_register.setEnabled(true);\n Toast.makeText(RegisterActivity.this, \"\" + error, Toast.LENGTH_SHORT).show();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n loading.dismiss();\n }\n }\n }, new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n VolleyLog.d(TAG, \"Error: \" + error.getMessage());\n if (error instanceof TimeoutError || error instanceof NoConnectionError) {\n Toast.makeText(RegisterActivity.this, getResources().getString(R.string.connection_time_out), Toast.LENGTH_SHORT).show();\n loading.dismiss();\n }\n }\n });\n\n // Adding request to request queue\n AppController.getInstance().addToRequestQueue(jsonObjReq, tag_json_obj);\n }",
"@Override\n protected String doInBackground(Void... v) {\n HashMap<String,String> params=new HashMap<>();\n params.put(Config.KEY_FIRST_NAME,fn);\n params.put(Config.KEY_MIDDLE_NAME,mn);\n params.put(Config.KEY_LAST_NAME,ln);\n params.put(Config.KEY_AADHAR,aadhar);\n params.put(Config.KEY_DOB,dd+\"-\"+mm+\"-\"+yyyy);\n params.put(Config.KEY_STATE,state);\n params.put(Config.KEY_DISTRICT,ditrict);\n params.put(Config.KEY_ADDRESS1,add1);\n params.put(Config.KEY_ADDRESS2,add2);\n params.put(Config.KEY_GENDER,gender);\n params.put(Config.KEY_EMAIL,email);\n params.put(Config.KEY_USERNAME,username);\n params.put(Config.KEY_PASSWORD,pwd);\n\n RequestHandler rh=new RequestHandler();\n String res=rh.SendPostRequest(Config.URL_USER_REGISTRATION,params);\n return res;\n }",
"@Test\n public void aTestRegister() {\n given()\n .param(\"username\", \"playlist\")\n .param(\"password\", \"playlist\")\n .post(\"/register\")\n .then()\n .statusCode(201);\n }",
"public void registerUser(String email, String password){\n fbAuth.createUserWithEmailAndPassword(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 Log.d(TAG, \"createUserWithEmail:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n updateUI(user);\n Toast.makeText(Signup.this, \"Registration success.\",\n Toast.LENGTH_SHORT).show();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(Signup.this, \"Registration failed.\",\n Toast.LENGTH_SHORT).show();\n }\n\n // ...\n }\n });\n }",
"@Test(priority=1, dataProvider=\"User Details\")\n\t\tpublic void registration(String firstname,String lastname,String emailAddress,\n\t\t\t\tString telephoneNum,String address1,String cityName,String postcodeNum,\n\t\t\t\tString country,String zone,String pwd,String confirm_pwd) throws Exception{\n\t\t\t\n\t\t\thomePage = new HomePage(driver);\n//'**********************************************************\t\t\t\n//Calling method to click on 'Create Account' link\n\t\t\tregistraionPageOC = homePage.clickCreateAccount();\n//'**********************************************************\t\t\t\n//Calling method to fill user details in Registration page and verify account is created\n\t\t\tregistraionPageOC.inputDetails(firstname,lastname,emailAddress,telephoneNum,address1,cityName,postcodeNum,country,zone,pwd,confirm_pwd);\n\t\t\ttry{\n\t\t\tAssert.assertEquals(\"Your Account Has Been Created!\", driver.getTitle(),\"Titles Not Matched: New Account Not Created\");\n\t\t\textentTest.log(LogStatus.PASS, \"Registration: New User Account is created\");\n\t\t\t}catch(Exception e){\n\t\t\t\textentTest.log(LogStatus.FAIL, \"Registration is not successful\");\n\t\t\t}\n\t\t}",
"@Override\n public void onClick(View v) {\n\n String name = fullname.getText().toString();\n String emailx = email.getText().toString();\n String password1 = password.getText().toString();\n String password2 = password_conf.getText().toString();\n progressDialog.setMessage(\"sign up your data\");\n showDialog();\n\n\n userdata = new UserData(name,emailx,password1,password2);\n Call<UserData> call = createUser.createUser(userdata);\n call.enqueue(new Callback<UserData>() {\n @Override\n public void onResponse(Call<UserData> call, Response<UserData> response) {\n if(response.isSuccessful()){\n Toast.makeText(RegisterActivity.this,\"Sign Up Success\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(getApplicationContext(), LoginActivity.class);\n startActivity(intent);\n finish();\n hideDialog();\n } else {\n Toast.makeText(getApplicationContext(),response.message(), Toast.LENGTH_LONG).show();\n hideDialog();\n }\n }\n\n @Override\n public void onFailure(Call<UserData> call, Throwable t) {\n Toast.makeText(getApplicationContext(), \"Error Connection\", Toast.LENGTH_LONG).show();\n hideDialog();\n }\n });\n }",
"@PostMapping(value = \"/registration\")\n public @ResponseBody\n ResponseEntity<Object> register(@RequestParam(\"firstName\") String firstName,\n @RequestParam(\"lastName\") String lastName,\n @RequestParam(\"username\") String username,\n @RequestParam(\"password\") String password) {\n\n Person person = personService.getPersonByCredentials(username);\n\n String securePassword = HashPasswordUtil.hashPassword(password);\n\n if (person == null) {\n\n person = new Person(username, securePassword, firstName, lastName, PersonType.USER);\n\n try {\n personService.add(person);\n } catch (IllegalArgumentException e) {\n logger.error(e.getMessage());\n }\n person = personService.getPersonByCredentials(username);\n\n ServletRequestAttributes attr = (ServletRequestAttributes) RequestContextHolder.currentRequestAttributes();\n HttpSession session = attr.getRequest().getSession(true); // true == allow create\n session.setAttribute(\"user\", username);\n session.setAttribute(\"userId\", person.getId());\n\n return ResponseEntity.status(HttpStatus.OK).body(null);\n } else {\n return ResponseEntity.status(HttpStatus.FORBIDDEN).body(null);\n }\n\n }",
"public static void createUser(User user) {\n URL url = null;\n HttpURLConnection connection = null;\n final String methodPath = \"/entities.credential/\";\n try {\n Gson gson = new Gson();\n String stringUserJson = gson.toJson(user);\n url = new URL(BASE_URI + methodPath);\n // open connection\n connection = (HttpURLConnection) url.openConnection();\n // set time out\n connection.setReadTimeout(10000);\n connection.setConnectTimeout(15000);\n // set connection method to POST\n connection.setRequestMethod(\"POST\");\n // set the output to true\n connection.setDoOutput(true);\n // set length of the data you want to send\n connection.setFixedLengthStreamingMode(stringUserJson.getBytes().length);\n // add HTTP headers\n connection.setRequestProperty(\"Content-Type\", \"application/json\");\n\n // send the POST out\n PrintWriter out = new PrintWriter(connection.getOutputStream());\n out.print(stringUserJson);\n out.close();\n Log.i(\"error\", new Integer(connection.getResponseCode()).toString());\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n connection.disconnect();\n }\n }"
]
| [
"0.846383",
"0.7819855",
"0.7796031",
"0.75085175",
"0.73858374",
"0.73287296",
"0.73091656",
"0.72695947",
"0.71899587",
"0.71084964",
"0.7073496",
"0.70568603",
"0.7049231",
"0.7024614",
"0.7013409",
"0.69765437",
"0.696608",
"0.69591933",
"0.69569826",
"0.6915108",
"0.6906408",
"0.6898912",
"0.6895569",
"0.6858657",
"0.68483806",
"0.68140626",
"0.6813438",
"0.6810428",
"0.68093705",
"0.6781053",
"0.6777258",
"0.6766215",
"0.67310035",
"0.6723875",
"0.6721969",
"0.6719277",
"0.6695771",
"0.6684918",
"0.6664274",
"0.6655788",
"0.6653418",
"0.6643158",
"0.66200876",
"0.66136944",
"0.66114837",
"0.66089106",
"0.66009027",
"0.65984255",
"0.6597186",
"0.65836906",
"0.65799844",
"0.6574422",
"0.6572562",
"0.65685797",
"0.6561531",
"0.65580827",
"0.6550731",
"0.65361464",
"0.65331197",
"0.65330654",
"0.6528084",
"0.65181935",
"0.65092635",
"0.64914525",
"0.64793754",
"0.6471964",
"0.6471338",
"0.6470919",
"0.6468394",
"0.64667475",
"0.64665866",
"0.64608294",
"0.64588463",
"0.6458351",
"0.6456744",
"0.64490557",
"0.64452547",
"0.64427125",
"0.6441635",
"0.6438858",
"0.64314586",
"0.6429943",
"0.6428939",
"0.6428137",
"0.6426982",
"0.641252",
"0.6398283",
"0.63898116",
"0.63819385",
"0.6381332",
"0.6380624",
"0.6372864",
"0.6371054",
"0.63698214",
"0.63617635",
"0.63578403",
"0.6357835",
"0.6356695",
"0.63506085",
"0.63447183"
]
| 0.6896403 | 22 |
Get connection from SQL DataSource | private Connection getConnection() throws SQLException{
return ds.getConnection();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private synchronized Connection getConnection() throws SQLException {\n return datasource.getConnection();\r\n }",
"public Connection getConnection() {\n try {\n return dataSource.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n return null;\n }\n }",
"public static DataSource MySqlConn() throws SQLException {\n\t\t\n\t\t/**\n\t\t * check if the database object is already defined\n\t\t * if it is, return the connection, \n\t\t * no need to look it up again\n\t\t */\n\t\tif (MySql_DataSource != null){\n\t\t\treturn MySql_DataSource;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t/**\n\t\t\t * This only needs to run one time to get the database object\n\t\t\t * context is used to lookup the database object in MySql\n\t\t\t * MySql_Utils will hold the database object\n\t\t\t */\n\t\t\tif (context == null) {\n\t\t\t\tcontext = new InitialContext();\n\t\t\t}\n\t\t\tContext envContext = (Context)context.lookup(\"java:/comp/env\");\n\t\t\tMySql_DataSource = (DataSource)envContext.lookup(\"jdbc/customers\");\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t return MySql_DataSource;\n\t}",
"public Connection getConnection() throws SQLServerException\n {\n return dataSource.getConnection();\n }",
"public Connection getSQLConnection() throws SQLException {\n WorkReportSQLApplication app = adaptersAPI.getJaxRsApplication(WorkReportSQLApplication.class);\n return app.dataSource.getConnection();\n }",
"public Connection getConnection() throws SQLException {\r\n return dataSource.getConnection();\r\n }",
"public Connection getConnection() throws SQLException{\n return ds.getConnection();\n }",
"public static DataSource getDataSource(){\n try {\n Context context = new InitialContext();\n DataSource ds = (DataSource) context.lookup(\"jdbc/oracle\");\n return ds;\n } catch (NamingException ex) {\n Logger.getLogger(DataSourceBean.class.getName()).log(Level.SEVERE, null, ex);\n return null;\n }\n }",
"private DataSource dereference() throws SQLException\n {\n\tObject jndiName = this.getJndiName();\n\tHashtable jndiEnv = this.getJndiEnv();\n\ttry\n\t {\n\t\tInitialContext ctx;\n\t\tif (jndiEnv != null)\n\t\t ctx = new InitialContext( jndiEnv );\n\t\telse\n\t\t ctx = new InitialContext();\n\t\tif (jndiName instanceof String)\n\t\t return (DataSource) ctx.lookup( (String) jndiName );\n\t\telse if (jndiName instanceof Name)\n\t\t return (DataSource) ctx.lookup( (Name) jndiName );\n\t\telse\n\t\t throw new SQLException(\"Could not find ConnectionPoolDataSource with \" +\n\t\t\t\t\t \"JNDI name: \" + jndiName);\n\t }\n\tcatch( NamingException e )\n\t {\n\t\t//e.printStackTrace();\n\t\tif ( logger.isLoggable( MLevel.WARNING ) )\n\t\t logger.log( MLevel.WARNING, \"An Exception occurred while trying to look up a target DataSource via JNDI!\", e );\n\t\tthrow SqlUtils.toSQLException( e ); \n\t }\n }",
"public Connection getConnection() {\n try {\n return ds.getConnection();\n } catch (SQLException e) {\n System.err.println(\"Error while connecting to database: \" + e.toString());\n }\n return null;\n }",
"public static Connection getConnection()\n {\n if (ds == null) {\n try {\n initCtx = new InitialContext();\n envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n ds = (DataSource) envCtx.lookup(dbName);\n }\n catch (javax.naming.NamingException e) {\n Logger.log(Logger.ERROR, \"A problem occurred while retrieving a DataSource object\");\n Logger.log(Logger.ERROR, e.toString());\n }\n }\n\n Connection dbCon = null;\n try {\n dbCon = ds.getConnection();\n }\n catch (java.sql.SQLException e) {\n Logger.log(Logger.ERROR, \"A problem occurred while connecting to the database.\");\n Logger.log(Logger.ERROR, e.toString());\n }\n return dbCon;\n }",
"public static Connection getConnection() {\n Connection conn = null;\n\n try {\n DataSource dataSource = (DataSource) new InitialContext().lookup(\"jdbc/library\");\n conn = dataSource.getConnection();\n } catch (SQLException | NamingException e) {\n LOG.error(e.getMessage(), e);\n }\n return conn;\n }",
"public static DataSource getDataSource() throws SQLException {\n return getDataSource(FxContext.get().getDivisionId(), true);\n }",
"public Connection getConnection() throws SQLException {\r\n if (user != null) {\r\n return dataSource.getConnection(user, password);\r\n } else {\r\n return dataSource.getConnection();\r\n }\r\n }",
"public Connection getConnection() throws SQLServerException\n {\n return ds.getConnection();\n }",
"@Override\n\tpublic DataSource getDataSource() {\n\t\tif(this.dataSource == null) {\n\t\t\ttry {\n\t\t\t\tInitialContext initialContext = new InitialContext();\n\t\t\t\tthis.dataSource = (DataSource) initialContext.lookup(\"java:comp/env/jdbc/DefaultDB\");\n\t\t\t} catch(NamingException e){\n\t\t\t\tthrow new IllegalStateException(e);\n\t\t\t}\n\t\t}\n\t\treturn this.dataSource;\n\t}",
"@Override\n\tpublic Connection getConnection() throws SQLException {\n\t\tConnection conn;\n\t\tconn = ConnectionFactory.getInstance().getConnection();\n\t\treturn conn;\n\t}",
"public DataSource getDataSource(CConnection connection)\n\t{\n\t\t//throw new UnsupportedOperationException(\"Not supported/implemented\");\n\t\tif (m_ds != null)\n\t\t\treturn m_ds;\n\t\t\n\t\t//org.postgresql.ds.PGPoolingDataSource ds = new org.postgresql.ds.PGPoolingDataSource();\n\t\torg.postgresql.jdbc3.Jdbc3PoolingDataSource ds = new org.postgresql.jdbc3.Jdbc3PoolingDataSource();\n\t\tds.setDataSourceName(\"CompiereDS\");\n\t\tds.setServerName(connection.getDbHost());\n\t\tds.setDatabaseName(connection.getDbName());\n\t\tds.setUser(connection.getDbUid());\n\t\tds.setPassword(connection.getDbPwd());\n\t\tds.setPortNumber(connection.getDbPort());\n\t\tds.setMaxConnections(50);\n\t\tds.setInitialConnections(20);\n\t\t\n\t\t//new InitialContext().rebind(\"DataSource\", source);\t\t\n\t\tm_ds = ds;\n\t\t\n\t\treturn m_ds;\n\t}",
"public String getConnection();",
"String getDataSource();",
"public int getDatasource() throws java.rmi.RemoteException;",
"public Connection getConnection() throws ClassNotFoundException, SQLException\n\t{\n\t /* Class.forName(\"org.postgresql.Driver\");*/\n\t\tcon=dataSource.getConnection();\n\t\treturn con;\t\n\t}",
"public Connection getConnection() {\r\n try {\r\n Class.forName(\"com.microsoft.sqlserver.jdbc.SQLServerDriver\");\r\n String url = \"jdbc:sqlserver://localhost:1433;databaseName=NMCNPM;user=sa;password=12345\";\r\n// Class.forName(resourceBundle.getString(\"driverName\"));\r\n// String url = resourceBundle.getString(\"url\");\r\n Connection connection = DriverManager.getConnection(url);\r\n return connection;\r\n } catch (SQLException | ClassNotFoundException e) {\r\n return null;\r\n }\r\n }",
"@Override\n public Connection getConnection() throws SQLException {\n\t\tif (transactionProvider == null)\n\t\t\treturn delegate.getConnection();\n\t\tif (xaConnection == null)\n\t\t\txaConnection = delegate.getXAConnection();\n\t\tenlistResource(xaConnection.getXAResource());\n\t\tConnection connection = xaConnection.getConnection();\n\t\treturn connection;\n }",
"Connection getConnection() throws SQLException;",
"Connection getConnection() throws SQLException;",
"private static Connection getConnection(){\n Connection conn = THREAD_CONNECTION.get();\n if(conn == null){\n try {\n conn = DATA_SOURCE.getConnection();\n } catch (SQLException e) {\n e.printStackTrace();\n LOGGER.error(\"getConnection error\", e);\n throw new RuntimeException(e);\n } finally {\n THREAD_CONNECTION.set(conn);\n }\n }\n AssertUtil.notNull(conn);\n return conn;\n }",
"private Connection getConnection() throws SQLException {\n OracleDataSource ods = new OracleDataSource();\n ods.setURL(url);\n ods.setUser(user);\n ods.setPassword(password);\n\n // Creates a physical connection to the database.\n return ods.getConnection();\n }",
"public String getDatasource()\r\n\t{\r\n\t\treturn _dataSource;\r\n\t}",
"@Override\n public Connection getConnection() throws SQLException\n {\n return connection;\n }",
"public Connection getConnection();",
"public Connection getConnection();",
"public Connection getConnection();",
"protected Connection getConnection() throws DAOException {\n\t\ttry {\n\t\t\treturn source.getConnection();\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\t}",
"public static Connection getDbConnection() throws SQLException {\n return getDbConnection(FxContext.get().getDivisionId());\n }",
"public DataSource getDataSource()\n\t{\n\t\tLOGGER.info(\"Getting DataSource object\");\n\t\treturn this.dataSource;\n\t}",
"private Connection getConnection() {\n if (_connection != null) return _connection;\n\n Element ncElement = getNetcdfElement();\n \n //See if we can get the database connection from a JNDI resource.\n String jndi = ncElement.getAttributeValue(\"jndi\");\n if (jndi != null) {\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n DataSource ds = (DataSource) envCtx.lookup(jndi);\n _connection = ds.getConnection();\n } catch (Exception e) {\n String msg = \"Failed to get database connection from JNDI: \" + jndi;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n }\n return _connection;\n }\n\n //Make the connection ourselves.\n String connectionString = ncElement.getAttributeValue(\"connectionString\");\n String dbUser = ncElement.getAttributeValue(\"dbUser\");\n String dbPassword = ncElement.getAttributeValue(\"dbPassword\");\n String jdbcDriver = ncElement.getAttributeValue(\"jdbcDriver\");\n \n try {\n Class.forName(jdbcDriver);\n _connection = DriverManager.getConnection(connectionString, dbUser, dbPassword);\n } catch (Exception e) {\n String msg = \"Failed to get database connection: \" + connectionString;\n _logger.error(msg, e);\n throw new TSSException(msg, e);\n } \n \n return _connection;\n }",
"public static Connection getHikariConnection() {\n ConnectionPool connectionPool = new ConnectionPool();\n connectionPool.getResource();\n connectionPool.getConfig();\n try {\n return dataSource.getConnection();\n } catch (SQLException exception) {\n exception.printStackTrace();\n }\n return null;\n }",
"@Override\n public DataSource getDataSource() {\n\n // PostgreSQL does not provide connection pool (as of version 42.1.3) so make one using Apache Commons DBCP \n ds = new BasicDataSource();\n\n // max number of active connections\n Integer maxTotal = AtsSystemProperties.getPropertyAsNumber(\"dbcp.maxTotal\");\n if (maxTotal == null) {\n maxTotal = 8;\n } else {\n log.info(\"Max number of active connections is \"\n + maxTotal);\n }\n ds.setMaxTotal(maxTotal);\n\n // wait time for new connection\n Integer maxWaitMillis = AtsSystemProperties.getPropertyAsNumber(\"dbcp.maxWaitMillis\");\n if (maxWaitMillis == null) {\n maxWaitMillis = 60 * 1000;\n } else {\n log.info(\"Connection creation wait is \"\n + maxWaitMillis\n + \" msec\");\n }\n ds.setMaxWaitMillis(maxWaitMillis);\n\n String logAbandoned = System.getProperty(\"dbcp.logAbandoned\");\n if (logAbandoned != null && (\"true\".equalsIgnoreCase(logAbandoned))\n || \"1\".equalsIgnoreCase(logAbandoned)) {\n String removeAbandonedTimeoutString = System.getProperty(\"dbcp.removeAbandonedTimeout\");\n int removeAbandonedTimeout = (int) ds.getMaxWaitMillis() / (2 * 1000);\n if (!StringUtils.isNullOrEmpty(removeAbandonedTimeoutString)) {\n removeAbandonedTimeout = Integer.parseInt(removeAbandonedTimeoutString);\n }\n log.info(\n \"Will log and remove abandoned connections if not cleaned in \"\n + removeAbandonedTimeout\n + \" sec\");\n // log not closed connections\n ds.setLogAbandoned(true); // issue stack trace of not closed connection\n ds.setAbandonedUsageTracking(true);\n ds.setLogExpiredConnections(true);\n ds.setRemoveAbandonedTimeout(removeAbandonedTimeout);\n ds.setRemoveAbandonedOnBorrow(true);\n ds.setRemoveAbandonedOnMaintenance(true);\n ds.setAbandonedLogWriter(new PrintWriter(System.err));\n }\n ds.setValidationQuery(\"SELECT 1\");\n ds.setDriverClassName(getDriverClass().getName());\n ds.setUsername(user);\n ds.setPassword(password);\n ds.setUrl(getURL());\n return ds;\n }",
"public static Connection GetConnection() throws SQLException {\n return connectionPool.getConnection();\n }",
"public final Connection getConnection() throws SQLException {\n\t\tString[] threadCredentials = (String[]) this.threadBoundCredentials.get();\n\t\tif (threadCredentials != null) {\n\t\t\treturn doGetConnection(threadCredentials[0], threadCredentials[1]);\n\t\t}\n\t\telse {\n\t\t\treturn doGetConnection(this.username, this.password);\n\t\t}\n\t}",
"private Connection getConnection() throws SQLException, ClassNotFoundException {\n return connectionBuilder.getConnection();\n }",
"protected DataSource getDataSource() {\n\t\treturn dataSource;\n\t}",
"public synchronized String getDataSource(){\n\t\treturn dataSource;\n\t}",
"InstrumentedConnection getConnection();",
"public static ConnectionSource getSource() {\n try {\n return new JdbcConnectionSource(CONNECTION_STRING);\n } catch (final SQLException e) {\n throw new RuntimeException(e);\n }\n }",
"public java.sql.Connection connect(String jndiName){\n\t InitialContext ctx = null;\n\t javax.sql.DataSource ds = null;\n\t java.sql.Connection conn = null;\n\t \n\t\ttry {\n\t\t\tctx = new InitialContext();\n\t\t\t\n\t\t\tif(jndiName.equalsIgnoreCase(\"jndi_crm\")){\n\t\t\t\tds = (DataSource) ctx.lookup(\"java:\"+this.jndiBIB);\n\t\t\t}\n\t\t} catch (NamingException e) {\n\t\t\t\n\t\t\te.getMessage();\n\t\t\te.printStackTrace();\n\t\t}\t\t\t\n\t\ttry {\n\t\t\tconn= ds.getConnection();\n\t\t} catch (SQLException e) {\n\t\t\te.getMessage();\n\t\t\te.printStackTrace();\n\t\t}\n\t\tthis.connection = conn;\n\t\t\n\t\treturn conn;\n\t}",
"private Connection getConnection() throws Exception {\n\n\t\tContext initCtx = new InitialContext();\n\t\tContext envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n\t\tDataSource ds = (DataSource) envCtx.lookup(\"jdbc/TestDB\");\n\n\t\treturn ds.getConnection();\n\t}",
"String getConnectionAlias();",
"String getConnectionAlias();",
"public DataSourcePool() throws NamingException, \r\n SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {\r\n InitialContext ctx = new InitialContext();\r\n //DataSource ds =(DataSource)ctx.lookup(\"java:jboss/jdbc/webapp\");\r\n DataSource ds =(DataSource)ctx.lookup(\"java:jboss/datasources/WebApp\");\r\n connection = ds.getConnection();\r\n }",
"public DataSource getDatasource() {\n return datasource;\n }",
"public ConnectionPoolDataSource createPoolDataSource(CConnection connection);",
"public ConnectionPoolDataSource createPoolDataSource(CConnection connection);",
"@Nonnull\n Connection getConnection() throws SQLException;",
"protected IXConnection getConnection() {\n return eloCmisConnectionManager.getConnection(this.getCallContext());\n }",
"public Connection getConnection() throws SQLException {\n return null;\r\n }",
"public Connection connection()\n {\n String host = main.getConfig().getString(\"db.host\");\n int port = main.getConfig().getInt(\"db.port\");\n String user = main.getConfig().getString(\"db.user\");\n String password = main.getConfig().getString(\"db.password\");\n String db = main.getConfig().getString(\"db.db\");\n\n MysqlDataSource dataSource = new MysqlDataSource();\n dataSource.setServerName(host);\n dataSource.setPort(port);\n dataSource.setUser(user);\n if (password != null ) dataSource.setPassword(password);\n dataSource.setDatabaseName(db);\n Connection connection = null;\n try\n {\n connection = dataSource.getConnection();\n }\n catch (SQLException sqlException)\n {\n sqlException.printStackTrace();\n }\n return connection;\n }",
"public\n Connection getConnection();",
"public Connection getConnection(){\n try {\n return connectionFactory.getConnection(); // wird doch schon im Konstruktor von TodoListApp aufgerufen ???\n } catch (SQLException e) {\n e.printStackTrace();\n throw new RuntimeException(e);\n }\n }",
"public Connection getConnection() throws SQLException {\n String connectionUrl = \"jdbc:postgresql://\" + url + \":\" + port + \"/\" + database;\n return DriverManager.getConnection(connectionUrl, SISOBProperties.getDataBackendUsername(), SISOBProperties.getDataBackendPassword());\n }",
"protected Connection getConnection() {\r\n\t\treturn getProcessor().getConnection();\r\n\t}",
"public IDatabaseConnection getConnection() {\n try {\n DatabaseConnection databaseConnection = new DatabaseConnection(getDataSource().getConnection());\n editConfig(databaseConnection.getConfig());\n return databaseConnection;\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"String getConnection();",
"String getConnection();",
"String getConnection();",
"String getConnection();",
"public GcJdbcConnectionBean connectionBean() throws SQLException;",
"public static Connection getDataSourceConnection(String datasourceName) throws DiagnoseException {\r\n Connection con = null;\r\n String errorMsg = \"Unable to find or connect to [\" + datasourceName + \"]\";\r\n try {\r\n DataSource ds = (DataSource) (new InitialContext().lookup(datasourceName));\r\n con = ds.getConnection();\r\n } catch (ClassCastException e) {\r\n throw new DiagnoseException(errorMsg, e);\r\n } catch (NamingException e) {\r\n throw new DiagnoseException(errorMsg, e);\r\n } catch (SQLException e) {\r\n throw new DiagnoseException(errorMsg, e);\r\n }\r\n return con;\r\n }",
"public static Connection getCon()throws SQLException{\n\n//\tSystem.out.println(\"创建了一个Connection....\");\n//\tConnection con= null;\n//\ttry {\n//\t\tClass.forName(jdbcName);\n//\t\tcon = DriverManager.getConnection(dburl, dbUserName, dbPassword);\n//\t}catch (Exception e){\n//\t\te.printStackTrace();\n//\t}\n\n\treturn dataSource.getConnection();\n}",
"public Connection getConnection() throws SQLException {\r\n return connection;\r\n }",
"public Connection getConnection() throws SQLException {\n\t\tif (connection == null) {\n\t\t\tconnection = ConnectBDD.jdbcConnexion();\n\t\t}\n\t\treturn connection;\n\t}",
"public Connection getConnection(){\n try{\n if(connection == null || connection.isClosed()){\n connection = FabricaDeConexao.getConnection();\n return connection;\n } else return connection;\n } catch (SQLException e){throw new RuntimeException(e);}\n }",
"public Connection getConnection() throws SQLException {\n\t\treturn null;\n\t}",
"InstrumentedConnectionProvider getConnectionProvider();",
"public final Connection getConnection() throws SQLException {\n\t\treturn this.ds != null ? this.ds.getConnection() : DriverManager\n\t\t\t\t.getConnection(this.url);\n\t}",
"public String getDataSource() {\n return dataSource;\n }",
"private Connection getConnection() throws JobReportingException\n {\n LOG.debug(\"Connecting to database host {}, port {}, name {} ...\", jobDatabaseHost, jobDatabasePortString, jobDatabaseName);\n\n final PGSimpleDataSource dbSource = new PGSimpleDataSource();\n dbSource.setServerNames(new String[]{jobDatabaseHost});\n dbSource.setDatabaseName(jobDatabaseName);\n dbSource.setUser(jobDatabaseUsername);\n dbSource.setPassword(jobDatabasePassword);\n dbSource.setApplicationName(appName);\n\n try {\n dbSource.setPortNumbers(new int[]{Integer.parseInt(jobDatabasePortString)});\n return dbSource.getConnection();\n } catch (final NumberFormatException ex){\n LOG.error(FAILED_TO_CONNECT_INVALID_PORT, jobDatabaseName, jobDatabasePortString, ex);\n throw new JobReportingException(ex.getMessage(), ex);\n }catch (final SQLTransientException ex) {\n LOG.error(FAILED_TO_CONNECT, jobDatabaseHost+\" / \"+jobDatabasePortString+\" / \"+jobDatabaseName, ex);\n throw new JobReportingTransientException(ex.getMessage(), ex);\n } catch (final SQLException ex) {\n LOG.error(FAILED_TO_CONNECT, jobDatabaseHost+\" / \"+jobDatabasePortString+\" / \"+jobDatabaseName, ex);\n\n // Declare error code for issues like not enough connections, memory, disk, etc.\n final String CONNECTION_EXCEPTION = \"08\";\n final String INSUFFICIENT_RESOURCES = \"53\";\n\n if (isSqlStateIn(ex, CONNECTION_EXCEPTION, INSUFFICIENT_RESOURCES, POSTGRES_OPERATOR_FAILURE_CODE_PREFIX)) {\n throw new JobReportingTransientException(ex.getMessage(), ex);\n } else {\n throw new JobReportingException(ex.getMessage(), ex);\n }\n }\n }",
"@Override\n\tpublic DataSource getDataSource() {\t\t\n\t\treturn dataSource;\n\t}",
"protected Connection createConnection() throws SQLException {\n return this.dataSourceUtils.getConnection();\n }",
"public Connection getConnection() throws SQLException {\n\t\treturn Database.getConnection();\n\t}",
"public static Connection getConnection() {\n\t\ttry {\n\t\t\treturn DBUtil.getInstance().ds.getConnection();\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\n\t}",
"protected static Connection getConnection(String jndiName) throws DataSourceLookupException, DataAccessException {\n\t\tif (jndiName == null) {\n\t\t\tlogger.log(Level.FATAL, \"Input JNDI name was null. JNDI=[null]\");\n\t\t\tthrow new DataSourceLookupException(\"DataSource lookup failed. JNDI=[null]\");\n\t\t}\n\t\ttry {\n\t\t\tContext context = new InitialContext();\n\t\t\tDataSource dataSource = (DataSource) context.lookup(jndiName);\n\t\t\tif (dataSource == null) {\n\t\t\t\tlogger.log(Level.FATAL, \"Context data source lookup returned null. JNDI=[\" + jndiName + \"]\");\n\t\t\t\tthrow new DataSourceLookupException(\"No data source. See server logs for details.\");\n\t\t\t} else {\n\t\t\t\treturn dataSource.getConnection();\n\t\t\t}\n\t\t} catch (NamingException e) {\n\t\t\tlogger.log(Level.FATAL, \"DataSource lookup failed. JNDI=[\" + jndiName + \"]\", e);\n\t\t\tthrow new DataSourceLookupException(\"DataSource lookup failed. See server logs for details.\", e);\n\t\t} catch (SQLException e) {\n\t\t\tlogger.log(Level.FATAL, \"No connection. JNDI=[\" + jndiName + \"]\", e);\n\t\t\tthrow new DataAccessException(\"No connection. See server logs for details.\", e);\n\t\t}\n\t}",
"public static Connection getConnection() {\n \t\treturn connPool.getConnection();\n \t}",
"public static Connection createConnection() throws SQLException, NamingException {\n DATA_SOURCE.init();\n return DATA_SOURCE.getConnection();\n }",
"@Override\n public String getDataSource()\n {\n return dataSource;\n }",
"public static MyConnection getConnection() throws SQLException{\n\t\treturn MyConnection.getConnection();\n\t}",
"public DataSource getDataSource() {\n\t\treturn this.dataSource;\n\t}",
"public String getConnection()\n {\n return this.connection;\n }",
"public int getDatasource() throws java.rmi.RemoteException, javax.ejb.CreateException, javax.ejb.FinderException, javax.naming.NamingException {\n return (((Integer) __getCache(\"datasource\")).intValue());\n }",
"public synchronized Connection getConnection() throws SQLException {\n/* 158 */ return getConnection(true, false);\n/* */ }",
"private DataSource() {\n Connection tmpConn = null;\n while(tmpConn == null) {\n try {\n tmpConn = DriverManager.getConnection(CONNECTION_STRING);\n } catch(SQLException e) {\n print(\"Couldn't connect to \" + DB_NAME + \" database: \" + e.getMessage());\n print(\"Trying again in three seconds...\");\n try {\n Thread.sleep(3000);\n } catch(InterruptedException ie) {}\n }\n }\n conn = tmpConn;\n }",
"public DataSource getDataSource() {\n\t\treturn dataSource;\n\t}",
"public DataSource getDataSource() {\n return _dataSource;\n }",
"public abstract Connection getConnection();",
"public Connection getConnection() {\n\t// register the JDBC driver\n\ttry {\n\t Class.forName(super.driver);\n\t} catch (ClassNotFoundException e) {\n\t e.printStackTrace();\n\t}\n \n\t// create a connection\n\tConnection connection = null;\n\ttry {\n\t connection = DriverManager.getConnection (super.jdbc_url,super.getu(), super.getp());\n\t} catch (SQLException e) {\n\t e.printStackTrace();\n\t}\n\treturn connection;\n }",
"public static Connection getConnection() throws SQLException {\n\t\t// Create a connection reference var\n\t\tConnection con = null;\n\n\t\t// Int. driver obj from our dependency, connect w/ JDBC\n\t\tDriver postgresDriver = new Driver();\n\t\tDriverManager.registerDriver(postgresDriver);\n\n\t\t// Get database location/credentials from environmental variables\n\t\tString url = System.getenv(\"db_url\");\n\t\tString username = System.getenv(\"db_username\");\n\t\tString password = System.getenv(\"db_password\");\n\t\t\n\t\t// Connect to db and assign to con var.\n\t\tcon = DriverManager.getConnection(url, username, password);\n\n\t\t// Return con, allowing calling class/method etc to use the connection\n\t\treturn con;\n\t}",
"public DatabaseConnector() {\n String dbname = \"jdbc/jobs\";\n\n try {\n ds = (DataSource) new InitialContext().lookup(\"java:comp/env/\" + dbname);\n } catch (NamingException e) {\n System.err.println(dbname + \" is missing: \" + e.toString());\n }\n }",
"public static Connection getConnection() {\n\t\treturn null;\r\n\t}",
"public EODataSource queryDataSource();"
]
| [
"0.767723",
"0.7590657",
"0.7540497",
"0.74176264",
"0.73921204",
"0.7376173",
"0.73610425",
"0.72718537",
"0.72059816",
"0.7172834",
"0.7122725",
"0.71157277",
"0.70883644",
"0.7083429",
"0.70736045",
"0.7045057",
"0.70440245",
"0.7004399",
"0.6998577",
"0.6981277",
"0.69575953",
"0.695221",
"0.6935122",
"0.69169116",
"0.6895311",
"0.6895311",
"0.6886444",
"0.68850905",
"0.68777937",
"0.68620634",
"0.68470156",
"0.68470156",
"0.68470156",
"0.6843572",
"0.6832601",
"0.6830308",
"0.6822278",
"0.6793616",
"0.67924476",
"0.6786307",
"0.6773619",
"0.6763199",
"0.67604125",
"0.6754919",
"0.6754428",
"0.6749306",
"0.67405885",
"0.6735761",
"0.6725297",
"0.6725297",
"0.67207295",
"0.6719057",
"0.67174995",
"0.67174995",
"0.67144424",
"0.6709842",
"0.6706455",
"0.6701627",
"0.6701203",
"0.6700595",
"0.6692232",
"0.6691989",
"0.66901374",
"0.6681386",
"0.6681386",
"0.6681386",
"0.6681386",
"0.66779107",
"0.66706735",
"0.6658049",
"0.6652093",
"0.66508174",
"0.66327983",
"0.6632158",
"0.66292924",
"0.6618499",
"0.66143817",
"0.6608268",
"0.6604517",
"0.6602732",
"0.6601218",
"0.65902686",
"0.65828353",
"0.6581084",
"0.65691406",
"0.6566952",
"0.6562874",
"0.65584373",
"0.6554126",
"0.6549199",
"0.65393436",
"0.6519934",
"0.6516027",
"0.6508634",
"0.6506614",
"0.6503577",
"0.65016407",
"0.6494374",
"0.6493888",
"0.64914274"
]
| 0.74185425 | 3 |
Initialize DataSource class Only use one connection for this application, prevent memory leaks | public static Connection createConnection() throws SQLException, NamingException {
DATA_SOURCE.init();
return DATA_SOURCE.getConnection();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private DataSource() {\n Connection tmpConn = null;\n while(tmpConn == null) {\n try {\n tmpConn = DriverManager.getConnection(CONNECTION_STRING);\n } catch(SQLException e) {\n print(\"Couldn't connect to \" + DB_NAME + \" database: \" + e.getMessage());\n print(\"Trying again in three seconds...\");\n try {\n Thread.sleep(3000);\n } catch(InterruptedException ie) {}\n }\n }\n conn = tmpConn;\n }",
"synchronized void initDataSource()\n throws SQLException\n {\n if (_isStarted)\n return;\n \n _isStarted = true;\n \n for (int i = 0; i < _driverList.size(); i++) {\n DriverConfig driver = _driverList.get(i);\n \n driver.initDataSource(_isTransactional, _isSpy);\n }\n \n try {\n if (_isTransactional && _tm == null) {\n Object obj = new InitialContext().lookup(\"java:comp/TransactionManager\");\n \n if (obj instanceof TransactionManager)\n _tm = (TransactionManager) obj;\n }\n } catch (NamingException e) {\n throw new SQLExceptionWrapper(e);\n }\n }",
"public void init() {\n\r\n\t\ttry {\r\n\r\n\t\t\t//// 등록한 bean 에 있는 datasource를 가져와서 Connection을 받아온다\r\n\t\t\tcon = ds.getConnection();\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\r\n\t}",
"void init() throws ConnectionPoolDataSourceException;",
"private DatabaseConnectionService() {\n ds = new HikariDataSource();\n ds.setMaximumPoolSize(20);\n ConfigProperties configProperties = ConfigurationLoader.load();\n if (configProperties == null) {\n throw new RuntimeException(\"Unable to read the config.properties.\");\n }\n ds.setDriverClassName(configProperties.getDatabaseDriverClassName());\n ds.setJdbcUrl(configProperties.getDatabaseConnectionUrl());\n ds.addDataSourceProperty(\"user\", configProperties.getDatabaseUsername());\n ds.addDataSourceProperty(\"password\", configProperties.getDatabasePassword());\n ds.setAutoCommit(false);\n }",
"private void initConnection() {\n\t\tMysqlDataSource ds = new MysqlDataSource();\n\t\tds.setServerName(\"localhost\");\n\t\tds.setDatabaseName(\"sunshine\");\n\t\tds.setUser(\"root\");\n\t\tds.setPassword(\"sqlyella\");\n\t\ttry {\n\t\t\tConnection c = ds.getConnection();\n\t\t\tSystem.out.println(\"Connection ok\");\n\t\t\tthis.setConn(c);\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}",
"@Override\n\tprotected void initDataSource() {\n\t}",
"@Bean(destroyMethod = \"close\")\n\tpublic DataSource dataSource() {\n\t\tHikariConfig config = Utils.getDbConfig(dataSourceClassName, url, port, \"postgres\", user, password);\n\n try {\n\t\t\tlogger.info(\"Configuring datasource {} {} {}\", dataSourceClassName, url, user);\n config.setMinimumIdle(0);\n\t\t\tHikariDataSource ds = new HikariDataSource(config);\n\t\t\ttry {\n\t\t\t\tString dbExist = \"SELECT datname FROM pg_catalog.pg_database WHERE lower(datname) = lower('\"+databaseName+\"')\";\n\t\t\t\tPreparedStatement statementdbExist = ds.getConnection().prepareStatement(dbExist);\n\t\t\t\tif(statementdbExist.executeQuery().next()) {\n\t\t\t\t\tstatementdbExist.close();\n\t\t\t\t\tds.close();\n\t\t\t\t\tthis.dataBaseExist = true;\n\t\t\t\t} else {\n\t\t\t\t\tstatementdbExist.close();\n\t\t\t\t\tString sql = \"CREATE DATABASE \" + databaseName;\n\t\t\t\t\tPreparedStatement statement = ds.getConnection().prepareStatement(sql);\n\t\t\t\t\tstatement.executeUpdate();\n\t\t\t\t\tstatement.close();\n\t\t\t\t\tds.close();\n\t\t\t\t}\n\t\t\t} catch (SQLException e) {\n\t\t\t\tlogger.error(\"ERROR Configuring datasource SqlException {} {} {}\", e);\n\t\t\t\tthis.dataBaseExist = true;\n\t\t\t} catch (Exception ee) {\n\t\t\t\tthis.dataBaseExist = true;\n\t\t\t\tlogger.debug(\"ERROR Configuring datasource catch \", ee);\n\t\t\t}\n\t\t\tHikariConfig config2 = Utils.getDbConfig(dataSourceClassName, url, port, databaseName, user, password);\n\t\t\treturn new HikariDataSource(config2);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(\"ERROR in database configuration \", e);\n\t\t} finally {\n\t\t\t\n\t\t}\n\t\treturn null;\n\t}",
"public Pool() {\n\t\t// inicializaDataSource();\n\t}",
"public void init() {\n\n try {\n Context initCtx = new InitialContext();\n Context envCtx = (Context) initCtx.lookup(\"java:comp/env\");\n ds = (DataSource) envCtx.lookup(\"jdbc/QuotingDB\");\n// dbCon = ds.getConnection();\n }\n catch (javax.naming.NamingException e) {\n System.out.println(\"A problem occurred while retrieving a DataSource object\");\n System.out.println(e.toString());\n }\n\n }",
"public static boolean initDatasource() {\n // first we locate the driver\n String pgDriver = \"org.postgresql.Driver\";\n try {\n ls.debug(\"Looking for Class : \" + pgDriver);\n Class.forName(pgDriver);\n } catch (Exception e) {\n ls.fatal(\"Cannot find postgres driver (\" + pgDriver + \")in class path\", e);\n return false;\n }\n\n try{ \n String url = \"jdbc:postgresql://inuatestdb.cctm7tiltceo.us-west-2.rds.amazonaws.com:5432/inua?user=inua&password=jw8s0F4\";\n dsUnPooled =DataSources.unpooledDataSource(url);\n dsPooled = DataSources.pooledDataSource(dsUnPooled);\n \n poolInit = true;\n }\n catch (Exception e){ \n ls.fatal(\"SQL Exception\",e);\n System.out.println(\"initDataSource\" + e);\n return false;\n }\n \n return true;\n}",
"@Override\n public DataSource getDataSource() {\n\n // PostgreSQL does not provide connection pool (as of version 42.1.3) so make one using Apache Commons DBCP \n ds = new BasicDataSource();\n\n // max number of active connections\n Integer maxTotal = AtsSystemProperties.getPropertyAsNumber(\"dbcp.maxTotal\");\n if (maxTotal == null) {\n maxTotal = 8;\n } else {\n log.info(\"Max number of active connections is \"\n + maxTotal);\n }\n ds.setMaxTotal(maxTotal);\n\n // wait time for new connection\n Integer maxWaitMillis = AtsSystemProperties.getPropertyAsNumber(\"dbcp.maxWaitMillis\");\n if (maxWaitMillis == null) {\n maxWaitMillis = 60 * 1000;\n } else {\n log.info(\"Connection creation wait is \"\n + maxWaitMillis\n + \" msec\");\n }\n ds.setMaxWaitMillis(maxWaitMillis);\n\n String logAbandoned = System.getProperty(\"dbcp.logAbandoned\");\n if (logAbandoned != null && (\"true\".equalsIgnoreCase(logAbandoned))\n || \"1\".equalsIgnoreCase(logAbandoned)) {\n String removeAbandonedTimeoutString = System.getProperty(\"dbcp.removeAbandonedTimeout\");\n int removeAbandonedTimeout = (int) ds.getMaxWaitMillis() / (2 * 1000);\n if (!StringUtils.isNullOrEmpty(removeAbandonedTimeoutString)) {\n removeAbandonedTimeout = Integer.parseInt(removeAbandonedTimeoutString);\n }\n log.info(\n \"Will log and remove abandoned connections if not cleaned in \"\n + removeAbandonedTimeout\n + \" sec\");\n // log not closed connections\n ds.setLogAbandoned(true); // issue stack trace of not closed connection\n ds.setAbandonedUsageTracking(true);\n ds.setLogExpiredConnections(true);\n ds.setRemoveAbandonedTimeout(removeAbandonedTimeout);\n ds.setRemoveAbandonedOnBorrow(true);\n ds.setRemoveAbandonedOnMaintenance(true);\n ds.setAbandonedLogWriter(new PrintWriter(System.err));\n }\n ds.setValidationQuery(\"SELECT 1\");\n ds.setDriverClassName(getDriverClass().getName());\n ds.setUsername(user);\n ds.setPassword(password);\n ds.setUrl(getURL());\n return ds;\n }",
"public DataSourceFactory() {}",
"@Bean\r\n\tpublic DataSource getDataSource() {\r\n\t\tfinal HikariDataSource dataSource = new HikariDataSource();\r\n\t\t/*\r\n\t\t * The Following is the Oracle Database Configuration With Hikari Datasource\r\n\t\t */\r\n\t\tdataSource.setMaximumPoolSize(maxPoolSize);\r\n\t\tdataSource.setMinimumIdle(minIdleTime);\r\n\t\tdataSource.setDriverClassName(driver);\r\n\t\tdataSource.setJdbcUrl(url);\r\n\t\tdataSource.addDataSourceProperty(\"user\", userName);\r\n\t\tdataSource.addDataSourceProperty(\"password\", password);\r\n\t\tdataSource.addDataSourceProperty(\"cachePrepStmts\", cachePrepareStmt);\r\n\t\tdataSource.addDataSourceProperty(\"prepStmtCacheSize\", prepareStmtCacheSize);\r\n\t\tdataSource.addDataSourceProperty(\"prepStmtCacheSqlLimit\", prepareStmtCacheSqlLimit);\r\n\t\tdataSource.addDataSourceProperty(\"useServerPrepStmts\", useServerPrepareStmt);\r\n\t\treturn dataSource;\r\n\t}",
"static public DataSource getDataSource(Context appContext) {\n // As per\n // http://goo.gl/clVKsG\n // we can rely on the application context never changing, so appContext is only\n // used once (during initialization).\n if (ds == null) {\n //ds = new InMemoryDataSource();\n //ds = new GeneratedDataSource();\n ds = new CacheDataSource(appContext, 20000);\n }\n \n return ds;\n }",
"private DataSource initializeDataSourceFromSystemProperty() {\n DriverManagerDataSource dataSource = new DriverManagerDataSource();\n dataSource.setDriverClassName(System.getProperty(PropertyName.JDBC_DRIVER, PropertyDefaultValue.JDBC_DRIVER));\n dataSource.setUrl(System.getProperty(PropertyName.JDBC_URL, PropertyDefaultValue.JDBC_URL));\n dataSource.setUsername(System.getProperty(PropertyName.JDBC_USERNAME, PropertyDefaultValue.JDBC_USERNAME));\n dataSource.setPassword(System.getProperty(PropertyName.JDBC_PASSWORD, PropertyDefaultValue.JDBC_PASSWORD));\n\n return dataSource;\n }",
"public DataSourcePool() throws NamingException, \r\n SQLException, InstantiationException, IllegalAccessException, ClassNotFoundException {\r\n InitialContext ctx = new InitialContext();\r\n //DataSource ds =(DataSource)ctx.lookup(\"java:jboss/jdbc/webapp\");\r\n DataSource ds =(DataSource)ctx.lookup(\"java:jboss/datasources/WebApp\");\r\n connection = ds.getConnection();\r\n }",
"private SupplierDaoJdbc(DataSource dataSource) {\n SupplierDaoJdbc.dataSource = dataSource;\n }",
"public DataSourceConnectionManager(DataSource dataSource) {\n this.dataSource = requireNonNull(dataSource, \"DataSource for a database is undefined.\");\n }",
"@BeforeAll\n public static void setupDataSource() {\n dataSource = new SingleConnectionDataSource();\n dataSource.setUrl(\"jdbc:postgresql://localhost:5432/integral-project-test\");\n dataSource.setUsername(\"postgres\");\n dataSource.setPassword(\"postgres1\");\n dataSource.setAutoCommit(false);\n }",
"public static DataSource MySqlConn() throws SQLException {\n\t\t\n\t\t/**\n\t\t * check if the database object is already defined\n\t\t * if it is, return the connection, \n\t\t * no need to look it up again\n\t\t */\n\t\tif (MySql_DataSource != null){\n\t\t\treturn MySql_DataSource;\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t/**\n\t\t\t * This only needs to run one time to get the database object\n\t\t\t * context is used to lookup the database object in MySql\n\t\t\t * MySql_Utils will hold the database object\n\t\t\t */\n\t\t\tif (context == null) {\n\t\t\t\tcontext = new InitialContext();\n\t\t\t}\n\t\t\tContext envContext = (Context)context.lookup(\"java:/comp/env\");\n\t\t\tMySql_DataSource = (DataSource)envContext.lookup(\"jdbc/customers\");\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t return MySql_DataSource;\n\t}",
"@BeforeClass\n\tpublic static void setupDataSource() {\n\t\tdataSource = new SingleConnectionDataSource();\n\t\tdataSource.setUrl(\"jdbc:postgresql://localhost:5432/nationalpark\");\n\t\tdataSource.setUsername(\"postgres\");\n\t\tdataSource.setPassword(\"postgres1\");\n\t\t/* The following line disables autocommit for connections\n\t\t * returned by this DataSource. This allows us to rollback\n\t\t * any changes after each test */\n\t\tdataSource.setAutoCommit(false);\n\t}",
"@BeforeClass\n\tpublic static void setupDataSource() {\n\t\tdataSource = new SingleConnectionDataSource();\n\t\tdataSource.setUrl(\"jdbc:postgresql://localhost:5432/campground\");\n\t\tdataSource.setUsername(\"postgres\");\n\t\tdataSource.setPassword(\"postgres1\");\n\t\t/* The following line disables autocommit for connections\n\t\t * returned by this DataSource. This allows us to rollback\n\t\t * any changes after each test */\n\t\tdataSource.setAutoCommit(false);\n\n\t}",
"public PoolNYCH() {\n\t\tinicializarDataSource();\n\t}",
"private void init() {\n DatabaseInitializer databaseInitializer = new DatabaseInitializer();\n try {\n for (int i = 0; i < DEFAULT_POOL_SIZE; i++) {\n ProxyConnection connection = new ProxyConnection(databaseInitializer.getConnection());\n connections.put(connection);\n }\n } catch (InterruptedException e) {\n logger.log(Level.ERROR, e);\n }\n }",
"public static PoolingDataSource setupDataSource() {\n\t\tPoolingDataSource pds = new PoolingDataSource();\n\t\tpds.setUniqueName(\"jdbc/jbpm-ds\");\n\t\tpds.setClassName(\"bitronix.tm.resource.jdbc.lrc.LrcXADataSource\");\n\t\tpds.setMaxPoolSize(5);\n\t\tpds.setAllowLocalTransactions(true);\n\t\tpds.getDriverProperties().put(\"user\", \"jbpm6_user\");\n\t\tpds.getDriverProperties().put(\"password\", \"jbpm6_pass\");\n\t\tpds.getDriverProperties().put(\"url\", \"jdbc:mysql://localhost:3306/jbpm6\");\n\t\tpds.getDriverProperties().put(\"driverClassName\", \"com.mysql.jdbc.Driver\");\n\t\tpds.init();\n\t\treturn pds;\n\t}",
"public DataBaseConnector()\n {\n dataSource = new SQLServerDataSource();\n dataSource.setServerName(\"EASV-DB2\");\n dataSource.setPortNumber(1433);\n dataSource.setDatabaseName(\"AutistMovies\");\n dataSource.setUser(\"CS2017A_15\");\n dataSource.setPassword(\"Bjoernhart1234\");\n }",
"public TemporaryDataSource(DataSource dataSource){\n\t\tthis.ds = dataSource;\n\t}",
"@Bean(destroyMethod = \"shutdown\")\n public DataSource dataSource() {\n log.debug(\"test\");\n log.debug(\"Configuring Datasource\");\n if (propertyResolver.getProperty(\"url\") == null && propertyResolver.getProperty(\"databaseName\") == null) {\n log.error(\"Your database connection pool configuration is incorrect! The application\" +\n \"cannot start. Please check your Spring profile, current profiles are: {}\",\n Arrays.toString(environment.getActiveProfiles()));\n\n throw new ApplicationContextException(\"Database connection pool is not configured correctly\");\n }\n HikariConfig config = new HikariConfig();\n if (propertyResolver.getProperty(\"url\") != null) {\n config.setDataSourceClassName(propertyResolver.getProperty(\"dataSourceClassName\"));\n config.addDataSourceProperty(\"url\", propertyResolver.getProperty(\"url\"));\n } else {\n config.setDriverClassName(propertyResolver.getProperty(\"driverClassName\"));\n config.setJdbcUrl(propertyResolver.getProperty(\"jdbcUrl\"));\n }\n\n config.setInitializationFailFast(true);\n config.setConnectionTestQuery(propertyResolver.getProperty(\"connectionTestQuery\"));\n config.setUsername(propertyResolver.getProperty(\"username\"));\n config.setPassword(propertyResolver.getProperty(\"password\"));\n config.setIdleTimeout(getIdleTimeout());\n config.setMaxLifetime(getMaxLife());\n config.setMaximumPoolSize(getMaxPoolSize());\n\n if (StringUtils.isBlank(config.getPassword())\n || StringUtils.containsIgnoreCase(config.getPassword(), \"secret\")\n || StringUtils.startsWith(config.getPassword(), \"'\")) {\n return null;\n }\n\n return new HikariDataSource(config);\n }",
"public void initConnection() throws SQLException{\n\t\tuserCon = new UserDBHandler(\"jdbc:mysql://127.0.0.1:3306/users\", \"admin\", \"admin\");\n\t\tproductCon = new ProductDBHandler(\"jdbc:mysql://127.0.0.1:3306/products\", \"admin\", \"admin\");\n\t}",
"public void init(BeeDataSourceConfig config) throws SQLException {\r\n if (poolState.get() == POOL_UNINIT) {\r\n checkProxyClasses();\r\n if (config == null) throw new SQLException(\"Configuration can't be null\");\r\n poolConfig = config.check();//why need a copy here?\r\n\r\n poolName = !isBlank(config.getPoolName()) ? config.getPoolName() : \"FastPool-\" + poolNameIndex.getAndIncrement();\r\n commonLog.info(\"BeeCP({})starting....\", poolName);\r\n\r\n poolMaxSize = poolConfig.getMaxActive();\r\n connFactory = poolConfig.getConnectionFactory();\r\n connectionTestTimeout = poolConfig.getConnectionTestTimeout();\r\n connectionTester = new SQLQueryTester(poolConfig.isDefaultAutoCommit(), poolConfig.getConnectionTestSQL());\r\n defaultMaxWaitNanos = MILLISECONDS.toNanos(poolConfig.getMaxWait());\r\n delayTimeForNextClearNanos = MILLISECONDS.toNanos(poolConfig.getDelayTimeForNextClear());\r\n connectionTestInterval = poolConfig.getConnectionTestInterval();\r\n createInitConnections(poolConfig.getInitialSize());\r\n\r\n if (poolConfig.isFairMode()) {\r\n poolMode = \"fair\";\r\n transferPolicy = new FairTransferPolicy();\r\n conUnCatchStateCode = transferPolicy.getCheckStateCode();\r\n } else {\r\n poolMode = \"compete\";\r\n transferPolicy = new CompeteTransferPolicy();\r\n conUnCatchStateCode = transferPolicy.getCheckStateCode();\r\n }\r\n\r\n exitHook = new ConnectionPoolHook();\r\n Runtime.getRuntime().addShutdownHook(exitHook);\r\n borrowSemaphoreSize = poolConfig.getBorrowSemaphoreSize();\r\n borrowSemaphore = new Semaphore(borrowSemaphoreSize, poolConfig.isFairMode());\r\n idleSchExecutor.setKeepAliveTime(15, SECONDS);\r\n idleSchExecutor.allowCoreThreadTimeOut(true);\r\n idleCheckSchFuture = idleSchExecutor.scheduleAtFixedRate(new Runnable() {\r\n public void run() {// check idle connection\r\n closeIdleTimeoutConnection();\r\n }\r\n }, 1000, config.getIdleCheckTimeInterval(), TimeUnit.MILLISECONDS);\r\n\r\n registerJmx();\r\n commonLog.info(\"BeeCP({})has startup{mode:{},init size:{},max size:{},semaphore size:{},max wait:{}ms,driver:{}}\",\r\n poolName,\r\n poolMode,\r\n connArray.length,\r\n config.getMaxActive(),\r\n borrowSemaphoreSize,\r\n poolConfig.getMaxWait(),\r\n poolConfig.getDriverClassName());\r\n\r\n poolState.set(POOL_NORMAL);\r\n this.setDaemon(true);\r\n this.setName(\"PooledConnectionAdd\");\r\n this.start();\r\n } else {\r\n throw new SQLException(\"Pool has initialized\");\r\n }\r\n }",
"@Override\n public void setDataSource(DataSource dataSource) {\n }",
"@Override\n public void setDataSource(DataSource dataSource) {\n }",
"@Override\n public void setDataSource(DataSource dataSource) {\n }",
"public ConnectorDataSource() {\n super(CONNECTOR_BEAN_NAME, CONNECTOR_TABLE_NAME);\n }",
"public static void InitializeDatabase() throws SQLException {\n dataSource = new SQLiteConnectionPoolDataSource();\n dataSource.setUrl(\"jdbc:sqlite:application.db\");\n\n // Optional Configuration Settings\n org.sqlite.SQLiteConfig config = new org.sqlite.SQLiteConfig();\n config.enforceForeignKeys(true);\n config.enableLoadExtension(true);\n dataSource.setConfig(config);\n\n connectionPool = dataSource.getPooledConnection();\n }",
"public static void initialize() {\r\n\t\tif (!connectionByProjectIdMap.isEmpty()) {\r\n\t\t\tcloseAllMsiDb();\r\n\t\t\tconnectionByProjectIdMap.clear();\r\n\t\t}\r\n\t\tif (udsDbConnection != null) {\r\n\t\t\tinitializeUdsDb();\r\n\t\t}\r\n\t}",
"@Bean\r\n public DataSource dataSource() {\r\n String message = messageSource.getMessage(\"begin\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.source\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n DriverManagerDataSource dataSource = new DriverManagerDataSource();\r\n dataSource.setDriverClassName(propDatabaseDriver);\r\n dataSource.setUrl(propDatabaseUrl);\r\n dataSource.setUsername(propDatabaseUserName);\r\n dataSource.setPassword(propDatabasePassword);\r\n\r\n message = messageSource.getMessage(\"end\", null, \"locale not found\", Locale.getDefault())\r\n + \" \" + messageSource.getMessage(\"config.data.source\", null, \"locale not found\", Locale.getDefault());\r\n logger.info(message);\r\n return dataSource;\r\n }",
"public DatabaseConnector() {\n HikariConfig config = new HikariConfig();\n config.setJdbcUrl(\"jdbc:postgresql://localhost:5547/go_it_homework\");\n config.setUsername(\"postgres\");\n config.setPassword(\"Sam@64hd!+4\");\n this.ds = new HikariDataSource(config);\n ds.setMaximumPoolSize(5);\n }",
"private synchronized static void initializeConnection()\n throws ReferenceDataSourceInitializationException {\n\n if (config == null || factoryClassName == null) {\n throw new ReferenceDataSourceInitializationException(\n \"Could not initialize connection, config or factoryClassName is not set, \"\n + \"configureDataFactoryMethod must be called first!!!! \");\n }\n\n try {\n\n AbstractReferenceDataFactory refDataFactory = AbstractReferenceDataFactory.instantiate(factoryClassName);\n logger.finer(\"AbstractReferenceDataFactory instantiated from: \" + factoryClassName);\n\n referenceDataSourceInstance = refDataFactory.getReferenceDataSource(config);\n logger.fine(\"ReferenceDataSource initialzed from: \" + config);\n\n } catch (Exception e) {\n logger.severe(\"Could not instantiate AbstractReferenceDataFactory from \" + factoryClassName);\n throw new ReferenceDataSourceInitializationException(\"Could not instantiate AbstractReferenceDataFactory from \" + factoryClassName, e);\n }\n\n }",
"@Override\n\tpublic void setDataSource(DataSource dataSource) {\n\t}",
"public DataSource(Context context) {\n dbHelper = new MySQLiteHelper(context);\n database = dbHelper.getWritableDatabase();\n dbHelper.close();\n }",
"private ConnectionPool() {\r\n\t\tResourceManagerDB resourceManager = ResourceManagerDB.getInstance();\r\n\t\tthis.driver = resourceManager.getValue(ParameterDB.DRIVER_DB);\r\n\t\tthis.url = resourceManager.getValue(ParameterDB.URL_DB);\r\n\t\tthis.user = resourceManager.getValue(ParameterDB.USER_DB);\r\n\t\tthis.password = resourceManager.getValue(ParameterDB.PASSWORD_DB);\r\n\t\tthis.poolsize = Integer.parseInt(resourceManager.getValue(ParameterDB.POOLSIZE_DB));\r\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n DBHandler = DBConnection.getConnection();\n }",
"@Override\r\n protected boolean isUseDataSource() {\r\n return true;\r\n }",
"@Test\n\tvoid contextLoads() throws SQLException {\n\t\tSystem.out.println(dataSource.getClass());\n\n\t\t// 获得连接\n\t\t/*\n\t\t 异常:\n\t\t \tThe last packet sent successfully to the server was 0 milliseconds ago. The driver has not received any packets from the server.\n\t\t */\n\t\tConnection connection = dataSource.getConnection();\n\n\t\tSystem.out.println(connection);\n\n\t\t// 关闭\n\t\tconnection.close();\n\t}",
"public static void init()\n {\n try\n {\n // The newInstance() call is a work around for some broken Java implementations\n Class.forName(\"com.mysql.jdbc.Driver\").newInstance();\n\n // Create a new configuration object\n BoneCPConfig config = new BoneCPConfig();\n\n // Setup the configuration\n config.setJdbcUrl(\"jdbc:mysql://cs304.c0mk5mvcjljr.us-west-2.rds.amazonaws.com/cs304\"); // jdbc url specific to your database, eg jdbc:mysql://127.0.0.1/yourdb\n config.setUsername(\"cs304\");\n config.setPassword(\"ubccs304\");\n config.setConnectionTestStatement(\"SELECT 1\");\n config.setConnectionTimeout(10, TimeUnit.SECONDS);\n config.setMinConnectionsPerPartition(5);\n config.setMaxConnectionsPerPartition(10);\n config.setPartitionCount(1);\n\n // Setup the connection pool\n _pool = new BoneCP(config);\n\n // Log\n LogManager.getLogger(DatabasePoolManager.class).info(\"Database configuration initialized\");\n }\n catch (Exception ex)\n {\n // Log\n LogManager.getLogger(DatabasePoolManager.class).fatal(\"Could not initialize Database configuration\", ex);\n }\n\n }",
"@Bean\n public DataSource dataSource() {\n List<String> dataSourceNames = Arrays.asList(\"BasicDbcpPooledDataSourceCreator\",\n \"TomcatJdbcPooledDataSourceCreator\", \"HikariCpPooledDataSourceCreator\",\n \"TomcatDbcpPooledDataSourceCreator\");\n \n DataSourceConfig dbConfig = new DataSourceConfig(dataSourceNames);\n DataSource hikariDataSource = connectionFactory().dataSource(dbConfig);\n// DataSource myConnection = DataSourceBuilder.create()\n// \t\t\t\t\t\t .type(HikariDataSource.class)\n// \t\t\t\t\t\t .driverClassName(com.sap.db.jdbc.Driver.class.getName())\n// \t\t\t\t\t\t .url(hostname)\n// \t\t\t\t\t\t .username(username)\n// \t\t\t\t\t\t .password(password)\n// \t\t\t\t\t\t .build();\n// \n// try {\n//\t\t\tmyConnection.getConnection().setSchema(schemaname);\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 cloudFoundryDataSourceConfigLogger.info(\"Detected Host name is : \" + this.hostname);\n cloudFoundryDataSourceConfigLogger.info(\"Detected port name is : \" + this.port);\n cloudFoundryDataSourceConfigLogger.info(\"Detected DB name is : \" + this.dbname);\n cloudFoundryDataSourceConfigLogger.info(\"Detected User name is : \" + this.username);\n \n return hikariDataSource;\n \n }",
"private void initialize() {\n try {\n Class.forName(\"org.postgresql.Driver\");\n } catch (ClassNotFoundException e) {\n LOGGER.error(\"DB: Unable to find sql driver.\", e);\n throw new AppRuntimeException(\"Unable to find sql driver\", e);\n }\n\n DbCred cred = getDbCred();\n this.connection = getConnection(cred);\n this.isInitialized.set(Boolean.TRUE);\n }",
"@Bean\n\tpublic DataSource dataSource () {\n\t\treturn DataSourceBuilder.create()\n\t\t\t\t\t\t\t\t.url(\"jdbc:mysql://localhost:3306/sillibus\")\n\t\t\t\t\t\t\t\t.username(\"root\")\n\t\t\t\t\t\t\t\t.password(\"root\")\n\t\t\t\t\t\t\t\t.driverClassName(databaseDriver)\n\t\t\t\t\t\t\t\t.build();\n\t}",
"public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }",
"public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }",
"public void setDataSource(DataSource dataSource) {\n this.dataSource = dataSource;\n }",
"public WebDataSource() {}",
"@Override\n\tpublic DataSource getDataSource() {\t\t\n\t\treturn dataSource;\n\t}",
"private void init() throws SQLException, MalformedURLException {\n\t\tconnection = connect();\n\t\tstmt = connection.createStatement();\n\t\tstmt.setQueryTimeout(30);\n\t}",
"public void setDataSource(BasicDataSource dataSource) {\n this.dataSource = dataSource;\n }",
"@Autowired\n public void setDataSource( DataSource dataSource ) {\n this.simpleJdbcTemplate = new SimpleJdbcTemplate( dataSource );\n }",
"public CommonDataSource(){\n }",
"@Override\n\tpublic DataSource getDataSource() {\n\t\tif(this.dataSource == null) {\n\t\t\ttry {\n\t\t\t\tInitialContext initialContext = new InitialContext();\n\t\t\t\tthis.dataSource = (DataSource) initialContext.lookup(\"java:comp/env/jdbc/DefaultDB\");\n\t\t\t} catch(NamingException e){\n\t\t\t\tthrow new IllegalStateException(e);\n\t\t\t}\n\t\t}\n\t\treturn this.dataSource;\n\t}",
"@Bean(name=\"dataSource\")\n\tpublic DataSource getDataSource() {\n\t\tBasicDataSource dataSource = new BasicDataSource();\n\t\tdataSource.setDriverClassName(\"com.mysql.jdbc.Driver\");\n\t\tdataSource.setUrl(\"jdbc:mysql://localhost:3306/elearningforum\");\n\t\tdataSource.setUsername(\"root\");\n\t\tdataSource.setPassword(\"\");\n\t\tdataSource.addConnectionProperty(\"useUnicode\", \"yes\");\n\t\tdataSource.addConnectionProperty(\"characterEncoding\", \"UTF-8\");\n\t\treturn dataSource;\n\t}",
"private void init() {\r\n\t\tif (cn == null) {\r\n\t\t\ttry {\r\n\t\t\t\tcn = new XGConnection(url,login,passwd); // Etape 2 : r�cup�ration de la connexion\r\n\t\t\t} catch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\ttry {\r\n\t\t\t\t\tTimeUnit.MINUTES.sleep(1);\r\n\t\t\t\t} catch (InterruptedException e2) {\r\n\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\te2.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcn.close();// lib�rer ressources de la m�moire.\r\n\t\t\t\t} catch (SQLException e1) {\r\n\t\t\t\t\te1.printStackTrace();\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private DBConnection() \n {\n initConnection();\n }",
"public void setDataSource( DataSource dataSource) {\n\t\tthis.dataSource = dataSource;\n\t}",
"public ConnectionPoolDataSource createPoolDataSource(CConnection connection);",
"public ConnectionPoolDataSource createPoolDataSource(CConnection connection);",
"protected DataSource getDataSource() {\n\t\treturn dataSource;\n\t}",
"public synchronized void setDataSource(String dataSource){\n\t\tthis.dataSource=dataSource;\n\t}",
"public void setDataSource(DataSource dataSource) {\n\t\tthis.dataSource = dataSource; // Sets the current object this of the class's attribute dataSource eqal to the object of datasource\n\t\tthis.jdbcTemplateObject = new JdbcTemplate(dataSource); // Instantiation of the JDBCTemplateObject class which takes in the object of datasource to set up data synchronization\n\t\t\n\t}",
"@Bean(destroyMethod = \"close\")\n public HikariDataSource dataSource() {\n HikariDataSource dataSource = new HikariDataSource();\n config.setJdbcUrl(\"jdbc:mysql://projects-db.ewi.tudelft.nl/projects_oopp5353\");\n config.setUsername(\"pu_oopp5353\");\n config.setPassword(\"WZijSwzXlaBG\");\n // config.setJdbcUrl(\"jdbc:mysql://localhost:3306/reserve\");\n // config.setUsername(\"user\");\n // config.setPassword(\"password\");\n HikariDataSource ds = new HikariDataSource(config);\n return ds;\n }",
"@Bean\n public DataSource dataSource() {\n DriverManagerDataSource dataSource = new DriverManagerDataSource();\n dataSource.setDriverClassName(env.getRequiredProperty(DRIVER_CLASS_NAME));\n dataSource.setUrl(env.getRequiredProperty(DATABASE_URL));\n dataSource.setUsername(env.getRequiredProperty(DATABASE_USERNAME));\n dataSource.setPassword(env.getRequiredProperty(DATABASE_PASSWORD));\n\n return dataSource;\n }",
"public void setDataSource(DataSource dataSource) {\n\t\tthis.dataSource = dataSource;\n\t\tthis.jdbcTemplate = new JdbcTemplate(dataSource);\n\t}",
"private void loadDataSource(String name) throws DriverException {\r\n Service.DATASOURCES.put(name, new Pool(name));\r\n }",
"public static ConnectionSource cs() {\n String dbName = \"pegadaian\";\n String dbUrl = \"jdbc:mysql://localhost:3306/\" + dbName;\n String user = \"root\";\n String pass = \"catur123\";\n\n //inisiasi sumber koneksi\n ConnectionSource csInit = null;\n try {\n csInit = new JdbcConnectionSource(dbUrl, user, pass);\n } catch (SQLException ex) {\n Logger.getLogger(Koneksi.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n //kembalikan hasil koneksi\n return csInit;\n\n }",
"@Bean(name = \"dataSource\")\n\tpublic DataSource dataSource() {\n\t\tEmbeddedDatabaseBuilder builder = new EmbeddedDatabaseBuilder();\n\t\tEmbeddedDatabase db = builder.setType(EmbeddedDatabaseType.HSQL).addScript(\"db/create-db.sql\").addScript(\"db/insert-data.sql\").build();\n\t\treturn db;\n\t}",
"@Bean(name = \"dataSource\")\n\tpublic DataSource getDataSource() {\n\t\tDriverManagerDataSource dataSource = new DriverManagerDataSource();\n\t\tdataSource.setDriverClassName(\"com.mysql.cj.jdbc.Driver\");\n\t\tdataSource.setUrl(\"jdbc:mysql://localhost:3306/test_db\");\n\t\tdataSource.setUsername(\"root\");\n\t\tdataSource.setPassword(\"password\");\n\t\treturn dataSource;\n\t}",
"private void initPool() throws SQLException {\n\t\tint POOL_SIZE = 90;\n\t\tthis.connectionPool = new LinkedBlockingQueue<>(POOL_SIZE);\n\t\tfor(int i = 0; i < POOL_SIZE; i++) {\n\t\t\tConnection con = DriverManager.getConnection(dburl, user, password);\n\t\t\tconnectionPool.offer(con);\n\t\t}\n\t}",
"private DataSource createDataSource(final String url) {\n // DataSource Setup with apache commons \n BasicDataSource dataSource = new BasicDataSource();\n dataSource.setDriverClassName(\"org.hsqldb.jdbcDriver\");\n dataSource.setUrl(url);\n dataSource.setUsername(\"sa\");\n dataSource.setPassword(\"\");\n\n return dataSource;\n }",
"public JNDIConnector(DataSource dataSource) {\n this.dataSource = dataSource;\n }",
"public static void init() throws SQLException{\n dbController = DBController.getInstance();\n billingController = BillingController.getInstance();\n employeeController = EmployeeController.getInstance();\n customerServiceController = CustomerServiceController.getInstance();\n parkingController = ParkingController.getInstance();\n orderController = OrderController.getInstance();\n subscriptionController = SubscriptionController.getInstance();\n customerController = CustomerController.getInstance();\n reportController = ReportController.getInstance();\n complaintController = ComplaintController.getInstance();\n robotController = RobotController.getInstance();\n }",
"private void initPerRequestState() {\n if (this.trendValueDao == null) {\n this.trendValueDao = new MetricTrendValueDataSource();\n }\n }",
"public DBManager(){\r\n connect(DBConstant.driver,DBConstant.connetionstring);\r\n }",
"private DataSource.Factory buildDataSourceFactory() {\n return ((DemoApplication) getApplication()).buildDataSourceFactory();\n }",
"public OracleDataSourceFactory()\n {\n super();\n System.out.println(\"Constructed OracleDataSourceFactory\");\n }",
"public void Initialize() throws DBException {\n // Divide jndi and url\n StringTokenizer st = new StringTokenizer(m_dbURL, \",\");\n m_jndiName \t= st.nextToken();\n m_dbURL \t= st.nextToken();\n \n if (m_jndiName != null) {\n try {\n Context ctx = new InitialContext();\n s_ds = (DataSource) ctx.lookup(m_jndiName); \n } catch (Exception e) {\n System.out.println(\"err\"+e);\n SystemLog.getInstance().getErrorLog().error(\"ERR,HSQLDBTomCTRL,getInit-JNDI,\" + e, e);\n }\n }\n\t \n\t\t//\t\tLoad class incase faliure\n\t\t try {\n\t\t\tClass.forName(\"org.hsqldb.jdbcDriver\");\t\t\t\n\t\t} catch (ClassNotFoundException e1) {\t\t\t\n\t\t\te1.printStackTrace();\n\t\t}\t\t\n\t}",
"static public void setDataSource(DataSource source) {\n ds = source;\n }",
"@Override\r\n public void initialize(URL url, ResourceBundle rb) {\r\n // TODO\r\n dc= new mysqlconnect();\r\n populateTableView();\r\n \r\n \r\n\r\n //populateTableView();\r\n }",
"private void initializeDatasourceConnection(ConnectionInfo connectionInfo){\n Connection connection = null;\n\n InitialContext ctx;\n try {\n ctx = new InitialContext();\n } catch (NamingException e) {\n throw new RuntimeException(e);\n }\n try {\n DataSource ds = (DataSource) ctx.lookup(connectionInfo.getDataSource());\n try {\n \ttry {\n\t \tif(connectionInfo.getConnectionProperties() != null &&\n\t \t connectionInfo.getConnectionProperties().getUserName() != null &&\n\t \t connectionInfo.getConnectionProperties().getPassword() != null ) {\n\t \t\tconnection = ds.getConnection(connectionInfo.getConnectionProperties().getUserName(), connectionInfo.getConnectionProperties().getPassword());\n\t \t} else {\n\t \t\tconnection = ds.getConnection();\n\t \t}\n \t}catch(Exception e) {\n \t\tconnection = ds.getConnection();\n \t}\n\n if (connection == null) {\n throw new RuntimeException(\"Could not obtain a Connection from DataSource\");\n }\n connection.setAutoCommit(false);\n setConnection(connection);\n } catch (SQLException e) {\n throw new RuntimeException(e);\n }\n } catch (NamingException e) {\n throw new RuntimeException(e);\n }\n }",
"@Override\r\n protected void connect() {\r\n try {\r\n this.setDatabase();\r\n } catch (SQLException e) {\r\n Log.w(NoteTraitDataSource.class.getName(), \"Error setting database.\");\r\n }\r\n }",
"public synchronized String getDataSource(){\n\t\treturn dataSource;\n\t}",
"@Bean\n public DataSource dataSource() {\n HikariConfig hikariConfig = new HikariConfig();\n hikariConfig.setDriverClassName(environment.getProperty(\"jdbc.driver\"));\n hikariConfig.setJdbcUrl(environment.getProperty(\"jdbc.url\"));\n hikariConfig.setUsername(environment.getProperty(\"jdbc.user\"));\n hikariConfig.setPassword(environment.getProperty(\"jdbc.password\"));\n hikariConfig.setMaximumPoolSize(Integer.parseInt(\n Objects.requireNonNull(environment.getProperty(\"jdbc.availableConnections\"))));\n return new HikariDataSource(hikariConfig);\n }",
"public void setDataSource(DataSource dataSource) {\n\t\tthis.dataSource = dataSource;\n\t}",
"@Override\n public void initialize(URL url, ResourceBundle rb) {\n try {\n con=DBConncet.DBConnection.pmartConnection();\n } catch (SQLException ex) {\n Logger.getLogger(QuanLySreenController.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"private void setUpConnection(DataBaseProps dataBaseConfig) {\n\t\tHikariConfig hikariConfig = new HikariConfig();\r\n\t\thikariConfig.setDriverClassName(dataBaseConfig.getDriverName());\r\n\t\thikariConfig.setJdbcUrl(dataBaseConfig.getUrl());\r\n\t\thikariConfig.setUsername(dataBaseConfig.getUsername());\r\n\t\thikariConfig.setPassword(dataBaseConfig.getPassword());\r\n\t\thikariConfig.setMaximumPoolSize(maximumPoolSize);\r\n\t\thikariConfig.setValidationTimeout(validationTimeout);\r\n\t\thikariConfig.setConnectionTimeout(connectionTimeout);\r\n\t\thikariConfig.setIdleTimeout(idleTimeout);\r\n\t\thikariConfig.setMinimumIdle(minimumIdle);\r\n\t\tHikariDataSource dataSource = new HikariDataSource(hikariConfig);\r\n\t\tthis.jdbcTemplate = new NamedParameterJdbcTemplate(dataSource);\r\n\t}",
"public void setPoolDataSource(ConnectionPoolDataSource poolDataSource)\n throws SQLException\n {\n DriverConfig driver;\n \n if (_driverList.size() > 0)\n driver = _driverList.get(0);\n else\n driver = createDriver();\n \n driver.setPoolDataSource(poolDataSource);\n }",
"@Override\n public void setDataSource(@Qualifier(\"dataSource\") DataSource dataSource) {\n super.setDataSource(dataSource);\n }",
"public JdbcDao(DataSource dataSource) {\n\t\tsuper();\n\t\tthis.setDataSource(dataSource);\n\t}",
"public DataSource getDataSource(CConnection connection)\n\t{\n\t\t//throw new UnsupportedOperationException(\"Not supported/implemented\");\n\t\tif (m_ds != null)\n\t\t\treturn m_ds;\n\t\t\n\t\t//org.postgresql.ds.PGPoolingDataSource ds = new org.postgresql.ds.PGPoolingDataSource();\n\t\torg.postgresql.jdbc3.Jdbc3PoolingDataSource ds = new org.postgresql.jdbc3.Jdbc3PoolingDataSource();\n\t\tds.setDataSourceName(\"CompiereDS\");\n\t\tds.setServerName(connection.getDbHost());\n\t\tds.setDatabaseName(connection.getDbName());\n\t\tds.setUser(connection.getDbUid());\n\t\tds.setPassword(connection.getDbPwd());\n\t\tds.setPortNumber(connection.getDbPort());\n\t\tds.setMaxConnections(50);\n\t\tds.setInitialConnections(20);\n\t\t\n\t\t//new InitialContext().rebind(\"DataSource\", source);\t\t\n\t\tm_ds = ds;\n\t\t\n\t\treturn m_ds;\n\t}",
"@Autowired(required = false)\n\tpublic void setDataSource(DataSource dataSource) {\n\t\tsimpleJdbcTemplate = new JdbcTemplate(dataSource);\n\t\tsimpleJdbcInsert = new SimpleJdbcInsert(dataSource);\n\t\tnamedParameterJdbcOperations = new NamedParameterJdbcTemplate(dataSource);\n\t\tthis.dialect = getDialect(dataSource);\n\t}",
"public DatabaseConnector() {\n String dbname = \"jdbc/jobs\";\n\n try {\n ds = (DataSource) new InitialContext().lookup(\"java:comp/env/\" + dbname);\n } catch (NamingException e) {\n System.err.println(dbname + \" is missing: \" + e.toString());\n }\n }",
"void init() throws ConnectionPoolException {\r\n\t\tfreeConnection = new ArrayBlockingQueue<Connection>(poolsize);\r\n\t\tbusyConnection = new ArrayBlockingQueue<Connection>(poolsize);\r\n\t\ttry {\r\n\t\t\tClass.forName(driver);\r\n\t\t\tfor(int i = 0; i < poolsize; i++){\r\n\t\t\t\tConnection connection = DriverManager.getConnection(url, user, password);\r\n\t\t\t\tfreeConnection.add(connection);\r\n\t\t\t}\r\n\t\t\tflag = true;\r\n\t\t} catch (ClassNotFoundException e) {\r\n\t\t\tlogger.error(ErrorMessageDAO.ERROR_DB_DRIVER + e);\r\n\t\t\tthrow new ConnectionPoolException(ErrorMessageDAO.ERROR_DB_DRIVER);\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(ErrorMessageDAO.ERROR_SQL + e);\r\n\t\t\tthrow new ConnectionPoolException(ErrorMessageDAO.ERROR_SQL);\r\n\t\t}\r\n\t}"
]
| [
"0.77058804",
"0.7396967",
"0.7342783",
"0.7067675",
"0.702878",
"0.6998761",
"0.69788927",
"0.6977865",
"0.69003236",
"0.6827667",
"0.67940426",
"0.67579025",
"0.6702939",
"0.66567534",
"0.6652391",
"0.66512907",
"0.6632766",
"0.6629172",
"0.6621739",
"0.6592448",
"0.65921056",
"0.6579109",
"0.65764743",
"0.65515107",
"0.65397143",
"0.65210253",
"0.6516971",
"0.65057886",
"0.6501374",
"0.6495989",
"0.64801997",
"0.6470832",
"0.6470832",
"0.6470832",
"0.64571816",
"0.6456088",
"0.6447377",
"0.6447314",
"0.6440238",
"0.6434715",
"0.64270747",
"0.6423071",
"0.6421446",
"0.6398896",
"0.63916934",
"0.63480496",
"0.6323184",
"0.63130563",
"0.6303636",
"0.63018024",
"0.6269657",
"0.6269657",
"0.6269657",
"0.62654597",
"0.6260101",
"0.6235329",
"0.6234761",
"0.6224036",
"0.6223636",
"0.6213853",
"0.62118626",
"0.6206804",
"0.61981916",
"0.6198177",
"0.6194965",
"0.6194965",
"0.61943233",
"0.6188522",
"0.61783004",
"0.6178054",
"0.6176439",
"0.6174881",
"0.616591",
"0.6160083",
"0.6152109",
"0.61447954",
"0.61393243",
"0.61234933",
"0.61122304",
"0.61010325",
"0.6098369",
"0.6096765",
"0.6096711",
"0.60964644",
"0.6095461",
"0.60954523",
"0.6094692",
"0.6091195",
"0.6089307",
"0.6087017",
"0.60834163",
"0.60784495",
"0.60764515",
"0.6070594",
"0.6050068",
"0.6048499",
"0.6045521",
"0.6030755",
"0.6029114",
"0.602604",
"0.60172194"
]
| 0.0 | -1 |
Created by Dan on 7/5/2017. | @Repository
@Transactional
public interface PointOfInterestDao extends CrudRepository<PointOfInterest, Integer> {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"private stendhal() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"public final void mo51373a() {\n }",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"protected boolean func_70814_o() { return true; }",
"private void poetries() {\n\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n public void init() {\n }",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"private void init() {\n\n\t}",
"@Override\n void init() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n public void init() {}",
"public void mo4359a() {\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\tpublic void init() {}",
"private void kk12() {\n\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"private void strin() {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\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\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"public final void mo91715d() {\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"public void method_4270() {}",
"public void m23075a() {\n }",
"protected MetadataUGWD() {/* intentionally empty block */}",
"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 init() {\n\t}",
"Consumable() {\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override public int describeContents() { return 0; }",
"@Override\n public void initialize() { \n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\n public int retroceder() {\n return 0;\n }",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"public void mo21877s() {\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}"
]
| [
"0.59149843",
"0.581384",
"0.5761767",
"0.5692374",
"0.5685024",
"0.5625592",
"0.56062794",
"0.55744267",
"0.55744267",
"0.55606234",
"0.55453545",
"0.55214417",
"0.5517024",
"0.55128443",
"0.5508119",
"0.5490769",
"0.5442314",
"0.54374576",
"0.5437257",
"0.54336375",
"0.5428723",
"0.5417294",
"0.5417294",
"0.5417294",
"0.5417294",
"0.5417294",
"0.54087883",
"0.5402943",
"0.54012233",
"0.5394044",
"0.53779805",
"0.53779805",
"0.53761804",
"0.53676385",
"0.53676385",
"0.53676385",
"0.53676385",
"0.53676385",
"0.53676385",
"0.53650075",
"0.536499",
"0.5347358",
"0.5345203",
"0.5333867",
"0.53318906",
"0.53181195",
"0.5316854",
"0.53124535",
"0.53038174",
"0.530066",
"0.52990204",
"0.5294057",
"0.52914643",
"0.52839017",
"0.52839017",
"0.52773166",
"0.5276543",
"0.52718395",
"0.52591646",
"0.52591646",
"0.52591646",
"0.5258073",
"0.5256482",
"0.5256482",
"0.5253868",
"0.5253868",
"0.5253868",
"0.5251686",
"0.5247747",
"0.5236178",
"0.5236178",
"0.5236178",
"0.523568",
"0.5228235",
"0.52227676",
"0.52226967",
"0.52191293",
"0.52190274",
"0.52183473",
"0.5217625",
"0.5217625",
"0.5217625",
"0.5217625",
"0.5217625",
"0.5217625",
"0.5217625",
"0.52163094",
"0.5216289",
"0.5213083",
"0.5210762",
"0.52034384",
"0.5197533",
"0.5196983",
"0.5190806",
"0.5187049",
"0.51852095",
"0.5180126",
"0.5180126",
"0.5172558",
"0.5166527",
"0.5163603"
]
| 0.0 | -1 |
Creates an instance of the class StartUp. | public StartUp(){
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n protected void startUp() {\n }",
"public void initialize() {\n\n getStartUp();\n }",
"public void startup(){}",
"public LocalAppLauncher() {\n }",
"public ApplicationCreator() {\n }",
"public StartupHandler(){\r\n\t\tloadGameFiles();\r\n\t\tnew Engine();\r\n\t}",
"public MainEntryPoint() {\r\n\r\n }",
"private DeploymentFactoryInstaller() {\n }",
"private Instantiation(){}",
"public PSFUDApplication()\n {\n loadSnapshot();\n }",
"public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}",
"private PSStartServerFactory() {\n if(instance == null)\n instance = new PSStartServerFactory();\n }",
"public abstract void startup();",
"public Activator() {\r\n\t}",
"Start createStart();",
"public App() {\n\t\tLog.d(\"App\", \"App created\");\n\t\tinstance = this;\n\t}",
"public static void init() {\n try {\n createInstances();\n } catch (Exception e) {\n logger.error(\"Failed to instantiate classes.\", e);\n throw new RuntimeException(\"Failed to create instances.\", e);\n }\n }",
"public static void main(String[] args) throws IOException {\n \n CreateInstance createInstance = new CreateInstance();\n\n try {\n createInstance.init(args);\n Flavor flavor = createInstance.getFlavor();\n createInstance.createInstance(flavor);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n createInstance.close();\n }\n }",
"public void startup() {\n\t\tstart();\n }",
"public void launchStartupScreen() {\n\t\tnew StartUpScreen(this);\n\t}",
"public FrostDeployer() {\n\n }",
"public void start() {\n SetupGUI setup = new SetupGUI();\n }",
"@Override\n public void startup() {\n }",
"public Launcher()\n {\n // Loading (or creating) the preferences file\n // TODO: handle read/create file failed (maybe with an error popup?)\n boolean settingsLoaded = settings.checkAndLoad();\n\n if (!settingsLoaded) {\n System.exit(-10);\n }\n\n LoginController loginController = configureController(new LoginController());\n configureController(new ContactsController());\n configureController(new ConversationsController());\n\n /**\n * --------------------------\n * Event listeners\n * --------------------------\n */\n eventManager.attach(MvcEvent.WINDOW_CLOSING, new SaveOnExitListener());\n\n\n /**\n * --------------------------\n * Running the application\n * --------------------------\n */\n loginController.displayLogin();\n }",
"synchronized public void start() throws IOException, InterruptedException {\n createInstanceFromConfig(true);\n }",
"public void startExt(String[] args) throws InstantiationException {\n\t\t\n\t\tif (ExtStatus == INITIALIZED){\n\t\t\t\n\t\t\tExtStatus = STARTING;\n\t\t\t\n\t\t\textObj.startComponent(args);\n\t\t\t\n\t\t\tExtStatus = STARTED;\n\t\t}\n\t\telse\n\t\t\tthrow new InstantiationException(\"Extension has not been instantiated yet!\");\n\t}",
"public static void start() {\n\t\t\n\t\ttestEmptyConstructors();\n\t\ttestConstructors();\n\n\t}",
"public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}",
"public MainEntry() {\n\t\tthis.taskController = new Controller();\n\t}",
"public static final void prepareInstance() {\r\n prepareInstance(new XmlFactory());\r\n }",
"public static Setup getInstance () {\n return SetupHolder.INSTANCE;\n }",
"public static void main(String[] args) throws FactoryException {\n MainUI ui = new MainUI();\n ui.initialize();\n ui.start();\n }",
"public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }",
"private StandaloneMigrationLauncher()\r\n {\r\n // does nothing\r\n }",
"private void initializeStartup()\n {\n /* Turn off Limelight LED when first started up so it doesn't blind drive team. */\n m_limelight.turnOffLED();\n\n /* Start ultrasonics. */\n m_chamber.startUltrasonics();\n }",
"public View runStartUp() {\r\n Controller contr = new Controller();\r\n contr.addObserver(InspectionStatsView.getObserver());\r\n Logger firstLogger = new FileLogger();\r\n return new View(contr, firstLogger);\r\n }",
"public Main() {\n\t\tsuper();\n\t}",
"public Start() {\n }",
"public War()\n {\n start();\n }",
"public Application()\n {\n newsFeed = new NewsFeed();\n test = new Test();\n \n makeDummies();\n display();\n displayShortSummary();\n runTest();\n }",
"private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}",
"public AddonInstaller() {\n \n }",
"private void start() {\r\n\t\t// Clear the log file.\r\n\t\tBPCC_Logger.clearLogFile();\r\n\t\t\r\n\t\t// Initialize BPCC_Util static fields.\r\n\t\tBPCC_Util.initStaticFields();\r\n\t\t\r\n\t\t// Set logging level desired for test.\r\n\t\tBPCC_Util.setLogLevel(LogLevelEnum.DEBUG);\r\n\t\t\r\n\t\t// Initialize class global variables.\r\n\t\tinitVars();\r\n\t\t\r\n\t\tcreateAndShowGUI();\r\n\t}",
"private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n\t\tnew StartClass();\n\t}",
"private Main() {\n\n super();\n }",
"public Launcher() {\n this((java.lang.System[]) null);\n Launcher$$init$S();\n }",
"Run createRun();",
"void startup();",
"void startup();",
"public DefaultApplication() {\n\t}",
"public Bootstrap() {\r\n\t\t//Create or load UserList\r\n\t\tuserList = new CopyOnWriteArrayList<User>();\r\n\t\ttry {\r\n\t\t\tuserList = importUserList();\r\n\t\t} catch (FileNotFoundException e){\r\n\t\t\t\r\n\t\t} catch (IOException | ClassNotFoundException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.ip_adresse = StaticFunctions.loadPeerIp();\t\t\t//Load ip-address\r\n\t\t\r\n\t\t//Create a new Zone\r\n\t\tcreateZone(new Point(0.0, 0.0), new Point(1.0, 1.0));\t//initialize zone\r\n\t}",
"public void doMyStartupStuff() {\n System.out.println(\"init method\");\n }",
"public static AdminRecord initialize() {\n if (Logger.isTraceOn(Logger.TT_CORE, 9) || Logger.isDebugLoggingActivatedByCommandLine()) {\n Logger.log(Logger.DEBUG, Logger.MSG_CORE_STARTUPINITIALIZATION, \"initialize()\");\n printEfaInfos(false, false, true, false, false);\n }\n AdminRecord newlyCreatedAdminRecord = null;\n iniScreenSize();\n iniMainDirectory();\n iniEfaBaseConfig();\n iniLanguageSupport();\n iniUserDirectory();\n iniLogging();\n iniSplashScreen(true);\n iniEnvironmentSettings();\n iniDirectories();\n iniEfaSec();\n boolean createNewAdmin = iniAdmins();\n Object[] efaFirstSetup = iniEfaFirstSetup(createNewAdmin);\n CustSettings cust = (efaFirstSetup != null ? (CustSettings) efaFirstSetup[0] : null);\n iniEfaConfig(cust);\n iniEfaRunning();\n iniEfaTypes(cust);\n iniCopiedFiles();\n iniAllDataFiles();\n iniRemoteEfaServer();\n iniEmailSenderThread();\n iniGUI();\n iniChecks();\n if (createNewAdmin && efaFirstSetup != null) {\n return (AdminRecord) efaFirstSetup[1];\n }\n return null;\n }",
"public SwerveAutoTest() {\n // Initialize base classes.\n // All via self-construction.\n\n // Initialize class members.\n // All via self-construction.\n }",
"public Main() {\r\n\t}",
"public JawaBotApp_Poh() {\n JawaBotApp_Poh.instance = this; // TODO: make private, use getInstance only.\n //Thread.dumpStack(); /// Where is this constructor called?\n }",
"public Main() {\n\t\tsuper();\n\t\tInitScreen screen = new InitScreen();\n\t\tpushScreen(screen);\n\t\tUiApplication.getUiApplication().repaint();\n\t}",
"public static void main(String[] args) {\n\t\tTestST st2 = TestST.getInstance();\r\n\t}",
"public ExecutionFactoryImpl() {\n\t\tsuper();\n\t}",
"public static void init() {\n\n\t\tsnapshot = new SnapshotService();\n\t\tlog.info(\"App init...\");\n\t}",
"@Before\n\tpublic void seUp() throws Exception {\n\t\ta1=new App();\n\t}",
"public ProfileSetupActivity() {\n }",
"Klassenstufe createKlassenstufe();",
"public ApplicationTest() {\n\t\t/*\n\t\t * This constructor should not be modified. Any initialization code should be\n\t\t * placed in the setUp() method instead.\n\t\t */\n\n\t}",
"public FirstRun( ) {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}",
"public static void setupClass() throws Exception {\n Console.setOut(new PrintStream(System.out));\n final CountDownLatch latch = new CountDownLatch(1);\n SwingUtilities.invokeLater(() -> {\n new JFXPanel(); // initializes JavaFX environment\n Console.setOut(new PrintStream(System.out));\n latch.countDown();\n });\n\n if (!latch.await(5L, TimeUnit.SECONDS)) {\n throw new ExceptionInInitializerError();\n }\n }",
"@Override\n public void onCreate() {\n\n createApplicationFolders();\n\n m_logger = LogManager.getLogger();\n\n m_logger.verbose(\"in onCreate\");\n\n s_instance = this;\n\n if (BuildConfig.DEBUG) {\n ButterKnife.setDebug(true);\n m_logger.debug(\"Butter Knife initialized in debug mode.\");\n }\n\n initConfigurationFile();\n\n super.onCreate();\n }",
"private void initInstance() {\n init$Instance(true);\n }",
"public DemonstrationApp()\n {\n // Create Customers of all 3 types\n s = new Senior(\"alice\", \"123 road\", 65, \"555-5555\", 1);\n a = new Adult(\"stacy\", \"123 lane\", 65, \"555-1111\", 2);\n u = new Student(\"bob\", \"123 street\", 65, \"555-3333\", 3);\n \n //Create an account for each customer \n ca = new CheckingAccount(s,1,0);\n sa = new SavingsAccount(a,2,100);\n sav = new SavingsAccount(u,3,1000);\n \n //Create a bank\n b = new Bank();\n \n //Create a date object\n date = new Date(2019, 02, 12);\n }",
"public static void main(String[] args) {\n\t\tFirstUserApp obj=new FirstUserApp();\n\t\t\n\n\t}",
"private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }",
"private void startUp () {\n NativeMethodBroker.loadLibrary(false);\n try {\n start_up();\n } catch (UnsatisfiedLinkError e) {\n try {\n NativeMethodBroker.loadLibrary(true);\n NativeMethodBroker.traceln(AX_PROGRESS, \"There apparently were problems \" +\n \"in initially loading JavaContainer.dll. \" +\n \"It appears to be ok now. Error message \" +\n \"was \" + e.getMessage());\n start_up();\n } catch (UnsatisfiedLinkError e2) {\n NativeMethodBroker.traceln(AX_ERROR, fatalErrorMessage +\n \" Error message was: \" + e2.getMessage());\n // Really should exit here.\n // System.exit(-1);\n }\n }\n }",
"@BeforeClass\n public static void startUp() {\n // \"override\" parent startUp\n resourceInitialization();\n }",
"public static void main(String[] args) {\n TestApp testApp=new TestApp();\r\n testApp.startApp();\r\n }",
"public static void main(String[] args)\n {\n new Launcher();\n }",
"public Main() {\n \n \n }",
"@BeforeAll\n static void initClass() {\n // start the program\n server = MpSecurityClientMain.startTheServer();\n }",
"@Override\n\tpublic void startUp() {\n\t\tSystem.out.println(\"disk startup!\");\n\n\t}",
"private static Object createStandaloneTester() {\n List<URL> urls = new ArrayList<>();\n for (String path : Splitter.on(':').split(System.getProperty(\"java.class.path\"))) {\n\n // A small hack is needed since we didn't make example application under different groupId and not prefixed\n // the artifactId with something special (cdap- and hive-)\n // Check for io/cdap/cdap\n if (path.contains(\"/io/cdap/cdap/\")) {\n String artifactFile = Paths.get(path).getFileName().toString();\n if (!artifactFile.startsWith(\"cdap-\") && !artifactFile.startsWith(\"hive-\")) {\n continue;\n }\n }\n\n try {\n urls.add(Paths.get(path).toUri().toURL());\n } catch (MalformedURLException e) {\n throw Throwables.propagate(e);\n }\n }\n\n ClassLoader classLoader = new MainClassLoader(urls.toArray(new URL[urls.size()]), null);\n try {\n Class<?> clz = classLoader.loadClass(StandaloneTester.class.getName());\n Constructor<?> constructor = clz.getConstructor(Object[].class);\n return constructor.newInstance((Object) new Object[0]);\n } catch (Exception e) {\n throw Throwables.propagate(e);\n }\n }",
"public XMLRunnable__Atom_Site__Start createXMLRunnable__Atom_Site__Start() {\n \t\treturn new XMLRunnable__Atom_Site__Start();\n \t}",
"public Setup(String name) {\n super(name);\n }",
"void start() throws TestFailed\n {\n this.startSkeletons();\n }",
"public Main() {}",
"public Instance() {\n }",
"public static synchronized void constructInstance()\n {\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, false );\n\n if ( ourInstance != null )\n {\n throw new IllegalStateException( myName + \" Already Constructed\" );\n }\n ourInstance = new ElbowSubsystem();\n\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, true );\n }",
"public SetupDatabase() {\n }",
"public void init() {\n\t\tregisterFunctions();\n\t\t\t\t\n\t\t//Start it\n\t\tconsole.startUserConsole();\n\t}",
"public ParkingApp() {\n runApp();\n }",
"@PostConstruct\r\n\tpublic void doMyStartUpStuff() {\r\n\t\t\r\n\t\tSystem.out.println(\"TennisCoach : -> Inside of doMyStartUpStuff()\");\r\n\t}",
"public static void main(String[] args) throws IOException, ClassNotFoundException, InstantiationException, IllegalAccessException, IllegalArgumentException, InvocationTargetException, NoSuchMethodException, SecurityException {\n\t\t\n\t\t\n\t\tString className=loadFromProperties();\n\t\tClass auto=Class.forName(className);\n\t\t\n\t\tConstructor con=auto.getDeclaredConstructor();\n\t con.setAccessible(true); \n\t\tObject bmw=con.newInstance();\n\t Method getMethod = bmw.getClass().getMethod(\"getInstance\");\n\t \n\t IAutoMobileFactory instance=(IAutoMobileFactory)getMethod.invoke(bmw);\n\t IAutoMobile automobile=instance.make();\n\t automobile.start();\n\t automobile.stop();\n\n\t\n\t}",
"@PostConstruct // bcoz of java 9 and higher version i need to download jar file\r\n\tpublic void doMyStartupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyStrtupStuff()\");\r\n\t}",
"public static ExecutionFactory init() {\n\t\ttry {\n\t\t\tExecutionFactory theExecutionFactory = (ExecutionFactory)EPackage.Registry.INSTANCE.getEFactory(ExecutionPackage.eNS_URI);\n\t\t\tif (theExecutionFactory != null) {\n\t\t\t\treturn theExecutionFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new ExecutionFactoryImpl();\n\t}",
"Instance createInstance();",
"public synchronized void startup() {\n\n if (mThread == null) {\n mThread = new CounterThread();\n new Thread(mThread).start();\n }\n Log.d(TAG, \"startup\");\n }",
"private Supervisor() {\r\n\t}",
"public static void main(String[] args) {\n\n Create createList = new Create();\n createList.create();\n\n }",
"private FireWeaponScreenFactory() {\n\t}",
"DDTestBase() {\r\n\t\t//TODO Change to get APP_BASE_DIR from properties? (currently passed in as JVM arg)\r\n\t super(APP_NAME, APP_BASE_DIR);\r\n\t setup();\r\n }",
"public Facade() {\n\t\tinitResources();\n\t}"
]
| [
"0.65579796",
"0.6395239",
"0.62089896",
"0.6130389",
"0.6077849",
"0.60562485",
"0.60515803",
"0.6042338",
"0.6033026",
"0.59444237",
"0.586897",
"0.5853767",
"0.58232343",
"0.58008474",
"0.5787633",
"0.57808965",
"0.577722",
"0.57736623",
"0.57445496",
"0.5725679",
"0.5716313",
"0.5710075",
"0.57083094",
"0.57029873",
"0.5678167",
"0.5669317",
"0.5664198",
"0.5660234",
"0.56592596",
"0.5656257",
"0.5649817",
"0.56467396",
"0.5629913",
"0.56282675",
"0.56209934",
"0.5616402",
"0.5616256",
"0.56128126",
"0.5609176",
"0.5598939",
"0.5586528",
"0.5584471",
"0.55798876",
"0.55749196",
"0.5561164",
"0.55458623",
"0.55434763",
"0.553708",
"0.5535272",
"0.5535272",
"0.551839",
"0.5514809",
"0.5511264",
"0.5507965",
"0.55029356",
"0.54993993",
"0.54979813",
"0.5497439",
"0.54874766",
"0.5487338",
"0.54623246",
"0.5451686",
"0.54430765",
"0.54392827",
"0.5437631",
"0.54316884",
"0.54292303",
"0.5428337",
"0.5423268",
"0.54226446",
"0.54154015",
"0.54148746",
"0.5413638",
"0.5413487",
"0.5411076",
"0.54064363",
"0.5405624",
"0.5405349",
"0.5404755",
"0.5395627",
"0.5381796",
"0.53777605",
"0.53773296",
"0.5354982",
"0.535205",
"0.53514135",
"0.5350946",
"0.5342492",
"0.5340986",
"0.5329033",
"0.53286856",
"0.5328481",
"0.53272635",
"0.53209585",
"0.53209496",
"0.5316221",
"0.53159326",
"0.5312263",
"0.5309433",
"0.5300845"
]
| 0.77117145 | 0 |
Runs the startup procedure. | public View runStartUp() {
Controller contr = new Controller();
contr.addObserver(InspectionStatsView.getObserver());
Logger firstLogger = new FileLogger();
return new View(contr, firstLogger);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void startup() {\n\t\tstart();\n }",
"public void startup(){}",
"public abstract void startup();",
"void startup();",
"void startup();",
"@Override\n public void startup() {\n }",
"public void startup()\n\t{\n\t\t; // do nothing\n\t}",
"private void startUp () {\n NativeMethodBroker.loadLibrary(false);\n try {\n start_up();\n } catch (UnsatisfiedLinkError e) {\n try {\n NativeMethodBroker.loadLibrary(true);\n NativeMethodBroker.traceln(AX_PROGRESS, \"There apparently were problems \" +\n \"in initially loading JavaContainer.dll. \" +\n \"It appears to be ok now. Error message \" +\n \"was \" + e.getMessage());\n start_up();\n } catch (UnsatisfiedLinkError e2) {\n NativeMethodBroker.traceln(AX_ERROR, fatalErrorMessage +\n \" Error message was: \" + e2.getMessage());\n // Really should exit here.\n // System.exit(-1);\n }\n }\n }",
"private void initialize() {\n if (!stopped.get()) {\n \tSystem.out.printf(\"Starting Red5 with args: %s\\n\", Arrays.toString(commandLineArgs));\n // start\n try {\n\t\t\t\tBootstrap.main(commandLineArgs);\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n }\n }",
"@Override\n public void run() {\n startup();\n }",
"private void initializeStartup()\n {\n /* Turn off Limelight LED when first started up so it doesn't blind drive team. */\n m_limelight.turnOffLED();\n\n /* Start ultrasonics. */\n m_chamber.startUltrasonics();\n }",
"public void initialize() {\n\n getStartUp();\n }",
"public void startup() {\n neutral();\n }",
"public void start() {\n\t\tstartFilesConfig(true);\n\t\tstartSpamFilterTest(false);\n\t}",
"public void doMyStartupStuff() {\n System.out.println(\"init method\");\n }",
"public void startUp() {\n\t\t/* Language of App */\n\t\t\n\t\t/* Init Icons */\n\t\tPaintShop.initIcons(display);\n\t\t/* Init all components */\n\t\tinitComponents();\n\t\t\n\t\t\n\t}",
"private static void startup( String path )\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tStandardizerServerSettings.initializeSettings();\r\n\r\n\t\t\tStandardizerServerConfig.read( path );\r\n\r\n\t\t\tStandardizerServerLogger.initialize();\r\n\r\n\t\t\tStandardizerServerSessionImpl.initialize();\r\n\r\n\t\t\tStandardizerServerBootstrap bootstrap =\r\n\t\t\t\tnew StandardizerServerBootstrapImpl();\r\n\r\n\t\t\tRegistry registry =\r\n\t\t\t\tLocateRegistry.createRegistry\r\n\t\t\t\t(\r\n\t\t\t\t\tStandardizerServerConfig.getRmiRegistryPort()\r\n\t\t\t\t);\r\n\r\n\t\t\tregistry.rebind( \"SpellingStandardizer\" , bootstrap );\r\n\r\n\t\t\tSystem.out.println\r\n\t\t\t(\r\n\t\t\t\tStandardizerServerSettings.getString\r\n\t\t\t\t(\r\n\t\t\t\t\t\"Standardizerserverstarted\"\r\n\t\t\t\t)\r\n\t\t\t);\r\n\t\t}\r\n\t\tcatch ( Exception e )\r\n\t\t{\r\n\t\t\tSystem.out.println\r\n\t\t\t(\r\n\t\t\t\tStandardizerServerSettings.getString\r\n\t\t\t\t(\r\n\t\t\t\t\t\"Standardizerserverstartupfailure\"\r\n\t\t\t\t)\r\n\t\t\t);\r\n\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t\tSystem.exit( 1 );\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void startUp() {\n\t\tSystem.out.println(\"disk startup!\");\n\n\t}",
"@Override\r\n\tpublic void startup() {\n\t\tif(!initialized)\r\n\t\t\tinitOperation();\r\n\t\tregisterMBean();\r\n\t}",
"public void startUp() {\n\t\twhile (startupSettings.getContinue()) {\n\t\t\tstartView.showLogo();\n\t\t\tthis.setupNewMatch();\n\t\t\tstartView.showNewMatchStarting();\n\t\t\tcurrentMatch.start();\n\t\t\tstartupSettings = startView.askNewStartupSettings();\n\t\t}\n\t\tthis.ending();\n\t}",
"private void start() {\n\n\t}",
"protected void doStartup()\r\n\t{\r\n\t\tthis.logger.info(Messages.getString(\"StartupProcessorImpl.2\")); //$NON-NLS-1$\r\n\r\n\t\tsetStartupResult(result.wait);\r\n\t\t\r\n\t\twhile (!result.allow.equals(allowProcessing()))\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tString samlID = this.identifierGenerator.generateSAMLID();\r\n\t\t\t\t\r\n\t\t\t\tElement requestDocument = buildRequest(samlID);\r\n\t\t\t\t\r\n\t\t\t\tTrustedESOERole trustedESOERole = this.metadata.getEntityRoleData(this.trustedESOEIdentifier, TrustedESOERole.class);\r\n\t\t\t\tString endpoint = trustedESOERole.getSPEPStartupServiceEndpoint(IMPLEMENTED_BINDING);\r\n\t\t\t\t\r\n\t\t\t\tthis.logger.debug(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.3\"), endpoint) ); //$NON-NLS-1$\r\n\t\t\t\t\r\n\t\t\t\tElement responseDocument = this.wsClient.spepStartup(requestDocument, endpoint);\r\n\t\t\t\t\r\n\t\t\t\tthis.logger.debug(Messages.getString(\"StartupProcessorImpl.4\")); //$NON-NLS-1$\r\n\r\n\t\t\t\tprocessResponse(responseDocument, samlID);\r\n\t\t\t\t\r\n\t\t\t\tsetStartupResult(result.allow);\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tcatch (WSClientException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.5\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (MarshallerException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.6\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (SignatureValueException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.7\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (ReferenceValueException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.8\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (UnmarshallerException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.9\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (SPEPInitializationException e)\r\n\t\t\t{\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.10\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (Exception e)\r\n\t\t\t{\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tsetStartupResult(result.fail);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.11\"), e.getMessage())); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tThread.sleep(this.startupRetryInterval*1000);\r\n\t\t\t\tthis.logger.error(MessageFormat.format(Messages.getString(\"StartupProcessorImpl.30\"), this.startupRetryInterval) ); //$NON-NLS-1$\r\n\t\t\t}\r\n\t\t\tcatch (InterruptedException e)\r\n\t\t\t{\r\n\t\t\t\t// Ignore\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tthis.logger.debug(Messages.getString(\"StartupProcessorImpl.33\")); //$NON-NLS-1$\r\n\t\t\r\n\t}",
"protected void startup() {\n\t\tsynchronized (this) {\n\t\t\tstartTime = Utilities.getTime();\n\n\t\t\t// Start sets (and their containers' maintenance threads).\n\t\t\tfor (int i = 0; i < sets.length; i++) {\n\t\t\t\tsets[i].startup();\n\t\t\t}\n\n\t\t\tproducerThreadPool.start(this, builders);\n\n\t\t\tpayerThread.start();\n\n\t\t\t// Allow shutdown\n\t\t\tshutdownMutex.release();\n\t\t}\n\t}",
"public void start()\n/* 354: */ {\n/* 355:434 */ onStartup();\n/* 356: */ }",
"public void doMyStartupStuff() {\r\n\t\tSystem.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n\t}",
"public void startup() {\n /* Schedule the cleanup task to delete old logs */\n if (scheduler != null) {\n logger.info(\"Starting log cleanup with a period of {} ms.\", retentionCheckMs);\n scheduler.schedule(\"kafka-log-retention\", new Runnable() {\n @Override\n public void run() {\n cleanupLogs();\n }\n }, InitialTaskDelayMs, retentionCheckMs, TimeUnit.MILLISECONDS);\n logger.info(\"Starting log flusher with a default period of {} ms.\", flushCheckMs);\n scheduler.schedule(\"kafka-log-flusher\", new Runnable() {\n @Override\n public void run() {\n flushDirtyLogs();\n }\n }, InitialTaskDelayMs, flushCheckMs, TimeUnit.MILLISECONDS);\n scheduler.schedule(\"kafka-recovery-point-checkpoint\", new Runnable() {\n @Override\n public void run() {\n checkpointRecoveryPointOffsets();\n }\n }, InitialTaskDelayMs, flushCheckpointMs, TimeUnit.MILLISECONDS);\n }\n if (cleanerConfig.enableCleaner)\n cleaner.startup();\n }",
"public void start() {\n\t\t\n\t}",
"public void start() {\n\t\t\n\t}",
"private void start() {\r\n\t\t// Clear the log file.\r\n\t\tBPCC_Logger.clearLogFile();\r\n\t\t\r\n\t\t// Initialize BPCC_Util static fields.\r\n\t\tBPCC_Util.initStaticFields();\r\n\t\t\r\n\t\t// Set logging level desired for test.\r\n\t\tBPCC_Util.setLogLevel(LogLevelEnum.DEBUG);\r\n\t\t\r\n\t\t// Initialize class global variables.\r\n\t\tinitVars();\r\n\t\t\r\n\t\tcreateAndShowGUI();\r\n\t}",
"public void init() {\n\t\tregisterFunctions();\n\t\t\t\t\n\t\t//Start it\n\t\tconsole.startUserConsole();\n\t}",
"void start() throws TestFailed\n {\n this.startSkeletons();\n }",
"@Override\n protected void startUp() {\n }",
"public void start() {\r\n\t\tdiscoverTopology();\r\n\t\tsetUpTimer();\r\n\t}",
"public void start() {\n\n\t}",
"@PostConstruct\r\n\tpublic void doMyStartUpStuff() {\r\n\t\t\r\n\t\tSystem.out.println(\"TennisCoach : -> Inside of doMyStartUpStuff()\");\r\n\t}",
"@PostConstruct\n\tpublic void doMyStartupStfff() {\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyStartupStuff\");\n\t}",
"public void start()\n {\n uploadDataFromFile();\n menu.home();\n home();\n }",
"@PostConstruct // bcoz of java 9 and higher version i need to download jar file\r\n\tpublic void doMyStartupStuff() {\r\n\t\tSystem.out.println(\">> TennisCoach: inside of doMyStrtupStuff()\");\r\n\t}",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n System.setProperty(\"coherence.distributed.threads.min\", \"4\");\n\n AbstractFunctionalTest._startup();\n }",
"static void startJavaTrainer() {\n initializeMap();\n promptUser();\n startProgram();\n }",
"public void start()\n {\n }",
"public void start() {}",
"public void start() {}",
"public void start() {\n\t\tSystem.out.println(\"BMW Slef-----start\");\n\t}",
"public void start() {\n\t\tSystem.out.println(\"BMW start method\");\n\t}",
"public void start() {\r\n\t\tsetupWWD();\r\n\t\tsetupStatusBar();\r\n\t\tsetupViewControllers();\r\n\t\tsetupSky();\r\n\t\t//setupAnnotationToggling();\r\n\r\n\t\t// Center the application on the screen.\r\n\t\tWWUtil.alignComponent(null, this, AVKey.CENTER);\r\n\t\t\r\n\t\tgetLayerEnableCmd().run(); // Enable/disable the desired layers.\r\n\t}",
"public void startup() throws Exception\n {\n //\n // instantiate the runtime root application block\n //\n\n synchronized( m_state )\n {\n if( !isStartable() ) return;\n if( getLogger().isDebugEnabled() )\n {\n getLogger().debug( \"application assembly\" );\n }\n\n try\n {\n setState( ASSEMBLY );\n m_model.assemble();\n }\n catch( Exception e )\n {\n setState( INITIALIZED );\n final String error =\n \"Cannot assemble application due to exception.\";\n throw new KernelException( error, e );\n }\n catch( Throwable e )\n {\n setState( INITIALIZED );\n final String error =\n \"Cannot assemble application due to throwable.\";\n throw new KernelRuntimeException( error, e );\n }\n\n if( getLogger().isDebugEnabled() )\n {\n getLogger().debug( \"application deployment\" );\n }\n\n try\n {\n setState( DEPLOYMENT );\n m_model.commission();\n }\n catch( Exception e )\n {\n setState( INITIALIZED );\n final String error =\n \"Cannot deploy application.\";\n throw new KernelException( error, e );\n }\n catch( Throwable e )\n {\n setState( INITIALIZED );\n final String error =\n \"Cannot deploy application.\";\n throw new KernelRuntimeException( error, e );\n }\n \n setState( STARTED );\n }\n }",
"@Override\r\n\tpublic void startup() {\n\t\t\r\n\t\tString wechatID = \"gh_f49bb9a333b3\";\r\n\t\tString Token = \"spotlight-wechat\";\r\n\t\t\r\n\t\tNoIOClient client = new NoIOClient(\"mg.protel.com.hk\",5010);\r\n\t\tclient.addCRouter(wechatID, Token,null,null);\r\n\t\t\r\n\t\tclient.startup();\r\n\r\n\t}",
"protected void start() {\n }",
"public void start()\r\n\t{\n\tSystem.out.println(\"normal start method\");\r\n\t}",
"public void startApp()\r\n\t{\n\t}",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n\n AbstractFunctionalTest._startup();\n }",
"@BeforeClass\n public static void _startup()\n {\n // this test requires local storage to be enabled\n System.setProperty(\"coherence.distributed.localstorage\", \"true\");\n\n AbstractFunctionalTest._startup();\n }",
"public void Start(){\n Registry registry = null;\n try{\n for(int i=0;i<nsize;i++){\n registry= LocateRegistry.getRegistry(this.ports[i]);\n PRMI stub = (PRMI) registry.lookup(\"DCMP\");\n System.out.println(\"env calls Init to man \"+i);\n stub.InitHandler(new Request(this.id, -1, 'e'));\n D++;\n }\n\n } catch(Exception e){\n return;\n }\n return;\n }",
"public void start() {\n\t\tSystem.out.println(\"开启系统1\");\r\n\t}",
"@BeforeAll\n static void initClass() {\n // start the program\n server = MpSecurityClientMain.startTheServer();\n }",
"public void start() {\n\t\tSystem.out.println(\"BMW.........start!!!.\");\n\t}",
"private void run() {\n try {\n traceBeginAndSlog(\"InitBeforeStartServices\");\n SystemProperties.set(SYSPROP_START_COUNT, String.valueOf(this.mStartCount));\n SystemProperties.set(SYSPROP_START_ELAPSED, String.valueOf(this.mRuntimeStartElapsedTime));\n SystemProperties.set(SYSPROP_START_UPTIME, String.valueOf(this.mRuntimeStartUptime));\n EventLog.writeEvent((int) EventLogTags.SYSTEM_SERVER_START, Integer.valueOf(this.mStartCount), Long.valueOf(this.mRuntimeStartUptime), Long.valueOf(this.mRuntimeStartElapsedTime));\n if (System.currentTimeMillis() < 86400000) {\n Slog.w(TAG, \"System clock is before 1970; setting to 1970.\");\n SystemClock.setCurrentTimeMillis(86400000);\n }\n if (!SystemProperties.get(\"persist.sys.language\").isEmpty()) {\n SystemProperties.set(\"persist.sys.locale\", Locale.getDefault().toLanguageTag());\n SystemProperties.set(\"persist.sys.language\", \"\");\n SystemProperties.set(\"persist.sys.country\", \"\");\n SystemProperties.set(\"persist.sys.localevar\", \"\");\n }\n Binder.setWarnOnBlocking(true);\n PackageItemInfo.forceSafeLabels();\n SQLiteGlobal.sDefaultSyncMode = \"FULL\";\n SQLiteCompatibilityWalFlags.init((String) null);\n Slog.i(TAG, \"Entered the Android system server!\");\n int uptimeMillis = (int) SystemClock.elapsedRealtime();\n EventLog.writeEvent((int) EventLogTags.BOOT_PROGRESS_SYSTEM_RUN, uptimeMillis);\n if (!this.mRuntimeRestart) {\n MetricsLogger.histogram((Context) null, \"boot_system_server_init\", uptimeMillis);\n Jlog.d(30, \"JL_BOOT_PROGRESS_SYSTEM_RUN\");\n }\n SystemProperties.set(\"persist.sys.dalvik.vm.lib.2\", VMRuntime.getRuntime().vmLibrary());\n VMRuntime.getRuntime().clearGrowthLimit();\n VMRuntime.getRuntime().setTargetHeapUtilization(0.8f);\n Build.ensureFingerprintProperty();\n Environment.setUserRequired(true);\n BaseBundle.setShouldDefuse(true);\n Parcel.setStackTraceParceling(true);\n BinderInternal.disableBackgroundScheduling(true);\n BinderInternal.setMaxThreads(31);\n Process.setThreadPriority(-2);\n Process.setCanSelfBackground(false);\n Looper.prepareMainLooper();\n Looper.getMainLooper().setSlowLogThresholdMs(SLOW_DISPATCH_THRESHOLD_MS, SLOW_DELIVERY_THRESHOLD_MS);\n System.loadLibrary(\"android_servers\");\n if (Build.IS_DEBUGGABLE) {\n initZygoteChildHeapProfiling();\n }\n performPendingShutdown();\n createSystemContext();\n HwFeatureLoader.SystemServiceFeature.loadFeatureFramework(this.mSystemContext);\n this.mSystemServiceManager = new SystemServiceManager(this.mSystemContext);\n this.mSystemServiceManager.setStartInfo(this.mRuntimeRestart, this.mRuntimeStartElapsedTime, this.mRuntimeStartUptime);\n LocalServices.addService(SystemServiceManager.class, this.mSystemServiceManager);\n SystemServerInitThreadPool.get();\n traceEnd();\n try {\n traceBeginAndSlog(\"StartServices\");\n startBootstrapServices();\n startCoreServices();\n startOtherServices();\n SystemServerInitThreadPool.shutdown();\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n StrictMode.initVmDefaults(null);\n if (!this.mRuntimeRestart && !isFirstBootOrUpgrade()) {\n int uptimeMillis2 = (int) SystemClock.elapsedRealtime();\n MetricsLogger.histogram((Context) null, \"boot_system_server_ready\", uptimeMillis2);\n if (uptimeMillis2 > 60000) {\n Slog.wtf(SYSTEM_SERVER_TIMING_TAG, \"SystemServer init took too long. uptimeMillis=\" + uptimeMillis2);\n }\n }\n LogBufferUtil.closeLogBufferAsNeed(this.mSystemContext);\n if (!VMRuntime.hasBootImageSpaces()) {\n Slog.wtf(TAG, \"Runtime is not running with a boot image!\");\n }\n Looper.loop();\n throw new RuntimeException(\"Main thread loop unexpectedly exited\");\n } catch (Throwable th) {\n Slog.i(TAG, \"Finish_StartServices\");\n traceEnd();\n throw th;\n }\n } catch (Throwable th2) {\n traceEnd();\n throw th2;\n }\n }",
"public void start(){\n dbConnector = new DBConnector();\n tables = new HashSet<String>();\n tables.add(ALGORITHMS_TABLE);\n tables.add(DATA_STRUCTURES_TABLE);\n tables.add(SOFTWARE_DESIGN_TABLE);\n tables.add(USER_TABLE);\n }",
"public void start() {\n System.out.println(\"Machine started.\");\n }",
"public void start() {\n }",
"public void run() {\n Runtime.getRuntime().addShutdownHook(new MNOSManagerShutdownHook(this));\n\n OFNiciraVendorExtensions.initialize();\n\n this.startDatabase();\n\n try {\n final ServerBootstrap switchServerBootStrap = this\n .createServerBootStrap();\n\n this.setServerBootStrapParams(switchServerBootStrap);\n\n switchServerBootStrap.setPipelineFactory(this.pfact);\n final InetSocketAddress sa = this.ofHost == null ? new InetSocketAddress(\n this.ofPort) : new InetSocketAddress(this.ofHost,\n this.ofPort);\n this.sg.add(switchServerBootStrap.bind(sa));\n }catch (final Exception e){\n throw new RuntimeException(e);\n }\n\n }",
"@Override\n\tpublic void start() {\n\t\tSystem.out.println(\"TESLA has been started\");\n\t}",
"@Override\n protected final void startApplication() throws Exception {\n if (!checkSimulationDirectory()) {\n // There is no path and it is either not possible to set a path or the user aborted the corresponding dialog.\n System.exit(0);\n }\n \n MessageDialog.getInstance();\n \n try {\n SwingUtilities.invokeAndWait(() -> {\n try{\n initializeComponentContainer();\n } catch(Exception e){\n MessageDialog.getInstance().message(\"Exception while initializing component container: \" + e.getMessage());\n }\n });\n } catch (InterruptedException | InvocationTargetException e) {\n throw new Exception(\"Exception during startup.\", e);\n }\n createMainClass();\n }",
"public void starting();",
"@Override\n protected void setup() {\n // exception handling for invoke the main2();\n try {\n main2();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n // create central agent of the application\n try {\n AgentController Main = main1.createNewAgent(\"Main\",\"test.Main\",null);\n Main.start();\n } catch (StaleProxyException e) {\n e.printStackTrace();\n }\n try {\n showResualt();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }",
"@Override\n protected void startup() throws Throwable {\n\n\tsetTraceBase(baseDir);\n\n }",
"@Override\n\tpublic void start() {\n\t\tSystem.out.println(\"BMW -- start\");\n\t}",
"@Override\n public void firstApplicationStartup()\n {\n System.out.println(\"firstApplicationStartup\");\n \n }",
"public void start(){\n\t\tsuper.start();\n\t}",
"public static void start() {\n\t\t\n\t\ttestEmptyConstructors();\n\t\ttestConstructors();\n\n\t}",
"public void earlyStartup() {\r\n\t\ttry {\r\n\t\t\tearlyStartupInternal();\r\n\t\t} catch (Throwable t) {\r\n\t\t\tlogger.error(\"Unexpected Error\", t);\r\n\t\t}\r\n\t}",
"public void doMyStartupStuff(){\r\n System.out.println(\"TrackCoach: inside method doMyStartupStuff\");\r\n }",
"public void start() {\n System.out.println(\"start\");\n }",
"public void launchStartupScreen() {\n\t\tnew StartUpScreen(this);\n\t}",
"@Override\n public synchronized void start() {\n init();\n }",
"@Override\n\tpublic void earlyStartup() {\n\t}",
"public void run() {\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionStart();\n\n /**\n * create an archetype for the new application\n */\n executeArchetypeCommand();\n\n /**\n * Provide some delay to allow thread to create the archetype\n */\n splash = new SplashScreen();\n\n for (int i = 0; i < 7; i++) {\n updateStatus(i);\n try {\n Thread.sleep(500);\n } catch (InterruptedException ie) {\n ie.printStackTrace();\n }\n }\n\n hideSplashScreen();\n splash = null;\n\n /**\n * let the user the know what is going to happen\n */\n showExecutionEnd();\n }",
"public void start() {\n\n }",
"@Override\n\tpublic void start() {\n\t\t\tSystem.out.println(\"BMW --- strart\");\n\t}",
"public StartupHandler(){\r\n\t\tloadGameFiles();\r\n\t\tnew Engine();\r\n\t}",
"void launch();",
"void launch();",
"void launch();",
"@BeforeClass\n public static void startup()\n {\n _shutdown();\n }",
"public void startup() throws JyroException {\n\t\tClassLoader loader = java.lang.Thread.currentThread().getContextClassLoader();\n\t\tplatform = new JyroPlatform(name, home, loader, null);\n\t\tplatform.startup();\n\t\treturn;\n\t}",
"@Override\n public synchronized void startIT() {\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n Tracer.emitEvent(Tracer.Event.START.getId(), Tracer.Event.START.getType());\n }\n\n // Console Log\n Thread.currentThread().setName(\"APPLICATION\");\n if (COMPSs_VERSION == null) {\n LOGGER.warn(\"Starting COMPSs Runtime\");\n } else if (COMPSs_BUILDNUMBER == null) {\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION);\n } else if (COMPSs_BUILDNUMBER.endsWith(\"rnull\")) {\n COMPSs_BUILDNUMBER = COMPSs_BUILDNUMBER.substring(0, COMPSs_BUILDNUMBER.length() - 6);\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION + \" (build \" + COMPSs_BUILDNUMBER + \")\");\n } else {\n LOGGER.warn(\"Starting COMPSs Runtime v\" + COMPSs_VERSION + \" (build \" + COMPSs_BUILDNUMBER + \")\");\n }\n\n // Init Runtime\n if (!initialized) {\n // Application\n synchronized (this) {\n LOGGER.debug(\"Initializing components\");\n\n // Initialize object registry for bindings if needed\n // String lang = System.getProperty(COMPSsConstants.LANG);\n // if (lang != COMPSsConstants.Lang.JAVA.name() && oReg == null) {\n // oReg = new ObjectRegistry(this);\n // }\n\n // Initialize main runtime components\n td = new TaskDispatcher();\n ap = new AccessProcessor(td);\n\n // Initialize runtime tools components\n if (GraphGenerator.isEnabled()) {\n graphMonitor = new GraphGenerator();\n ap.setGM(graphMonitor);\n }\n if (RuntimeMonitor.isEnabled()) {\n runtimeMonitor = new RuntimeMonitor(ap, td, graphMonitor, Long.parseLong(System.getProperty(COMPSsConstants.MONITOR)));\n }\n\n // Log initialization\n initialized = true;\n LOGGER.debug(\"Ready to process tasks\");\n }\n } else {\n // Service\n String className = Thread.currentThread().getStackTrace()[2].getClassName();\n LOGGER.debug(\"Initializing \" + className + \"Itf\");\n try {\n td.addInterface(Class.forName(className + \"Itf\"));\n } catch (ClassNotFoundException cnfe) {\n ErrorManager.fatal(\"Error adding interface \" + className + \"Itf\", cnfe);\n }\n }\n\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n }\n\n }",
"public void start()\n {}",
"public static void main(String[] args){\n\t\tInitializeProgram startProgram = new InitializeProgram();\n\t\tstartProgram.runProgram();\n\t}",
"public void launch() throws NotBoundException, IOException\n\t{\n\t\t//call method to connect to server\t\t\n\t\tServerManager serverConnect = initialConnect();\t\n\t\n\t\t//get Setup menu from server\n\t\tSetUpMenu newSetup = new SetUpMenu(serverConnect);\n\t\tnewSetup.welcomeMenu();\n\t}",
"public synchronized void startup() {\n\n if (mThread == null) {\n mThread = new CounterThread();\n new Thread(mThread).start();\n }\n Log.d(TAG, \"startup\");\n }",
"public StartUp(){\r\n \r\n }",
"@Override\r\n\tpublic void start() {\n\t\tsuper.start();\r\n\t\t\r\n\t}",
"public void start() {\n io.println(\"Welcome to 2SAT-solver app!\\n\");\n String command = \"\";\n run = true;\n while (run) {\n while (true) {\n io.println(\"\\nType \\\"new\\\" to insert an CNF, \\\"help\\\" for help or \\\"exit\\\" to exit the application\");\n command = io.nextLine();\n if (command.equals(\"new\") || command.equals(\"help\") || command.equals(\"exit\")) {\n break;\n }\n io.println(\"Invalid command. Please try again.\");\n }\n switch (command) {\n case \"new\":\n insertNew();\n break;\n case \"help\":\n displayHelp();\n break;\n case \"exit\":\n io.println(\"Thank you for using this app.\");\n run = false;\n }\n\n }\n }",
"public void start(){\n }",
"public static void start(){\n mngr.getStpWds();\n mngr.getDocuments();\n mngr.calculateWeights();\n mngr.getInvertedIndex();\n mngr.getClusters();\n mngr.getCategories();\n mngr.getUserProfiles();\n mngr.makeDocTermMatrix();\n\n }",
"void doManualStart();",
"public void start() {\n\t\tinitializeComponents();\r\n\r\n\t\tint userChoice;\r\n\r\n\t\tdo {\r\n\t\t\t// Display start menu\r\n\t\t\tview.displayMainMenu();\r\n\r\n\t\t\t// Get users choice\r\n\t\t\tuserChoice = view.requestUserChoice();\r\n\r\n\t\t\t// Run the respective service\r\n\t\t\tswitch (userChoice) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tservice.register();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tservice.login();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tservice.forgotPassword();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tservice.logout();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tservice.displayAllUserInfo(); // Secret method\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"Invalid choice\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} while (userChoice != 4);\r\n\t}",
"void start() {\n }",
"@Override\r\n\tpublic void start() {\n\t\t\r\n\t}",
"public void startup() throws AMPException;"
]
| [
"0.83218676",
"0.781072",
"0.765929",
"0.7597331",
"0.7597331",
"0.73502445",
"0.72602504",
"0.6901464",
"0.6881629",
"0.6835028",
"0.67894316",
"0.6788075",
"0.6750065",
"0.6749255",
"0.6734439",
"0.6732111",
"0.6690465",
"0.66877127",
"0.6669537",
"0.6617671",
"0.661435",
"0.6604811",
"0.6580918",
"0.65757954",
"0.65557885",
"0.6552532",
"0.6512536",
"0.6512536",
"0.65111864",
"0.65020216",
"0.64959824",
"0.6489909",
"0.6484406",
"0.647703",
"0.6445019",
"0.6427487",
"0.64084667",
"0.6408387",
"0.6404055",
"0.6397807",
"0.6385767",
"0.63745266",
"0.63745266",
"0.6362101",
"0.6342234",
"0.6340199",
"0.63259625",
"0.6313682",
"0.63052136",
"0.6302137",
"0.62999964",
"0.6295522",
"0.6295522",
"0.62918967",
"0.6291705",
"0.62843394",
"0.6276941",
"0.6271271",
"0.62696785",
"0.6267593",
"0.62649786",
"0.62616014",
"0.62552863",
"0.6226445",
"0.62208927",
"0.6207911",
"0.61954886",
"0.61943305",
"0.6190389",
"0.6188247",
"0.6177379",
"0.61616683",
"0.6156406",
"0.6146489",
"0.6140079",
"0.6132788",
"0.6125889",
"0.61247474",
"0.6115842",
"0.6115606",
"0.6103356",
"0.61022854",
"0.61022854",
"0.61022854",
"0.61005276",
"0.6091696",
"0.60910153",
"0.6088116",
"0.6076916",
"0.60666794",
"0.6052447",
"0.6038095",
"0.6037752",
"0.6037416",
"0.603506",
"0.60333025",
"0.60326034",
"0.603116",
"0.6021269",
"0.6007011",
"0.59966725"
]
| 0.0 | -1 |
private static final Logger log = LoggerFactory.getLogger(AsyncService.class); | public AsyncService() {
super(2, 2);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface AsyncLogger {\n\n public void logMessage(String message);\n}",
"public void logMessage(AsyncLoggerConfig asyncLoggerConfig, LogEvent event) {\n/* 65 */ asyncLoggerConfig.callAppendersInCurrentThread(event);\n/* */ }",
"public void logMessage(AsyncLoggerConfig asyncLoggerConfig, LogEvent event) {\n/* 46 */ asyncLoggerConfig.callAppendersInBackgroundThread(event);\n/* */ }",
"public ServicioLogger() {\n }",
"@Override\n public void run() {\n logger.info(\"Servicing connection\");\n }",
"abstract public LoggingService getLoggingService();",
"@Override\n public void logs() {\n \n }",
"@Before(value = \"com.arpankarki.aop.aspect.AOPExpressions.forDaoPackageNoGetterSetter()\")\n\tpublic void logtoCloudAsync() {\n\t}",
"private static interface Service {}",
"public interface ClearcutLoggerApi\n{\n\n public abstract PendingResult logEventAsync(Context context, LogEventParcelable logeventparcelable);\n}",
"public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Lists nodes.\n * </pre>\n */\n default void listNodes(\n com.google.cloud.tpu.v2alpha1.ListNodesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListNodesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListNodesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the details of a node.\n * </pre>\n */\n default void getNode(\n com.google.cloud.tpu.v2alpha1.GetNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.Node> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a node.\n * </pre>\n */\n default void createNode(\n com.google.cloud.tpu.v2alpha1.CreateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getCreateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a node.\n * </pre>\n */\n default void deleteNode(\n com.google.cloud.tpu.v2alpha1.DeleteNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getDeleteNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Stops a node. This operation is only available with single TPU nodes.\n * </pre>\n */\n default void stopNode(\n com.google.cloud.tpu.v2alpha1.StopNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStopNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Starts a node.\n * </pre>\n */\n default void startNode(\n com.google.cloud.tpu.v2alpha1.StartNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getStartNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates the configurations of a node.\n * </pre>\n */\n default void updateNode(\n com.google.cloud.tpu.v2alpha1.UpdateNodeRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateNodeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists queued resources.\n * </pre>\n */\n default void listQueuedResources(\n com.google.cloud.tpu.v2alpha1.ListQueuedResourcesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListQueuedResourcesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListQueuedResourcesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets details of a queued resource.\n * </pre>\n */\n default void getQueuedResource(\n com.google.cloud.tpu.v2alpha1.GetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.QueuedResource>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a QueuedResource TPU instance.\n * </pre>\n */\n default void createQueuedResource(\n com.google.cloud.tpu.v2alpha1.CreateQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a QueuedResource TPU instance.\n * </pre>\n */\n default void deleteQueuedResource(\n com.google.cloud.tpu.v2alpha1.DeleteQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Resets a QueuedResource TPU instance\n * </pre>\n */\n default void resetQueuedResource(\n com.google.cloud.tpu.v2alpha1.ResetQueuedResourceRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getResetQueuedResourceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Generates the Cloud TPU service identity for the project.\n * </pre>\n */\n default void generateServiceIdentity(\n com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GenerateServiceIdentityResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateServiceIdentityMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists accelerator types supported by this API.\n * </pre>\n */\n default void listAcceleratorTypes(\n com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListAcceleratorTypesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAcceleratorTypesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets AcceleratorType.\n * </pre>\n */\n default void getAcceleratorType(\n com.google.cloud.tpu.v2alpha1.GetAcceleratorTypeRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.AcceleratorType>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAcceleratorTypeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists runtime versions supported by this API.\n * </pre>\n */\n default void listRuntimeVersions(\n com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.ListRuntimeVersionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListRuntimeVersionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a runtime version.\n * </pre>\n */\n default void getRuntimeVersion(\n com.google.cloud.tpu.v2alpha1.GetRuntimeVersionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.RuntimeVersion>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetRuntimeVersionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves the guest attributes for the node.\n * </pre>\n */\n default void getGuestAttributes(\n com.google.cloud.tpu.v2alpha1.GetGuestAttributesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.tpu.v2alpha1.GetGuestAttributesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetGuestAttributesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Simulates a maintenance event.\n * </pre>\n */\n default void simulateMaintenanceEvent(\n com.google.cloud.tpu.v2alpha1.SimulateMaintenanceEventRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSimulateMaintenanceEventMethod(), responseObserver);\n }\n }",
"@Service\npublic interface BugFetch {\n @Async\n void fetch(BugzillaConnector conn) throws InterruptedException;\n}",
"public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resource on a given Google Cloud project and region.\n * `AzureClient` resources hold client authentication\n * information needed by the Anthos Multicloud API to manage Azure resources\n * on your Azure subscription on your behalf.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureClient(\n com.google.cloud.gkemulticloud.v1.CreateAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureClient][google.cloud.gkemulticloud.v1.AzureClient] resource.\n * </pre>\n */\n default void getAzureClient(\n com.google.cloud.gkemulticloud.v1.GetAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureClient>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resources on a given Google Cloud project and region.\n * </pre>\n */\n default void listAzureClients(\n com.google.cloud.gkemulticloud.v1.ListAzureClientsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureClientsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureClientsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific [AzureClient][google.cloud.gkemulticloud.v1.AzureClient]\n * resource.\n * If the client is used by one or more clusters, deletion will\n * fail and a `FAILED_PRECONDITION` error will be returned.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureClient(\n com.google.cloud.gkemulticloud.v1.DeleteAzureClientRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureClientMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]\n * resource on a given Google Cloud Platform project and region.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureCluster(\n com.google.cloud.gkemulticloud.v1.CreateAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * </pre>\n */\n default void updateAzureCluster(\n com.google.cloud.gkemulticloud.v1.UpdateAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * </pre>\n */\n default void getAzureCluster(\n com.google.cloud.gkemulticloud.v1.GetAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureCluster>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster]\n * resources on a given Google Cloud project and region.\n * </pre>\n */\n default void listAzureClusters(\n com.google.cloud.gkemulticloud.v1.ListAzureClustersRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureClustersResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureClustersMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * Fails if the cluster has one or more associated\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resources.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureCluster(\n com.google.cloud.gkemulticloud.v1.DeleteAzureClusterRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureClusterMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Generates a short-lived access token to authenticate to a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster] resource.\n * </pre>\n */\n default void generateAzureAccessToken(\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.gkemulticloud.v1.GenerateAzureAccessTokenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGenerateAzureAccessTokenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a new [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool],\n * attached to a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void createAzureNodePool(\n com.google.cloud.gkemulticloud.v1.CreateAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool].\n * </pre>\n */\n default void updateAzureNodePool(\n com.google.cloud.gkemulticloud.v1.UpdateAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Describes a specific\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.\n * </pre>\n */\n default void getAzureNodePool(\n com.google.cloud.gkemulticloud.v1.GetAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureNodePool>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool]\n * resources on a given\n * [AzureCluster][google.cloud.gkemulticloud.v1.AzureCluster].\n * </pre>\n */\n default void listAzureNodePools(\n com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.ListAzureNodePoolsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListAzureNodePoolsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a specific\n * [AzureNodePool][google.cloud.gkemulticloud.v1.AzureNodePool] resource.\n * If successful, the response contains a newly created\n * [Operation][google.longrunning.Operation] resource that can be\n * described to track the status of the operation.\n * </pre>\n */\n default void deleteAzureNodePool(\n com.google.cloud.gkemulticloud.v1.DeleteAzureNodePoolRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteAzureNodePoolMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Returns information, such as supported Azure regions and Kubernetes\n * versions, on a given Google Cloud location.\n * </pre>\n */\n default void getAzureServerConfig(\n com.google.cloud.gkemulticloud.v1.GetAzureServerConfigRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.gkemulticloud.v1.AzureServerConfig>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetAzureServerConfigMethod(), responseObserver);\n }\n }",
"public void doLog() {\n SelfInvokeTestService self = (SelfInvokeTestService)context.getBean(\"selfInvokeTestService\");\n self.selfLog();\n //selfLog();\n }",
"public interface InternalAuditServiceAsync {\n\n\tvoid signIn(String userid, String password, AsyncCallback<Employee> callback);\n\n\tvoid fetchObjectiveOwners(AsyncCallback<ArrayList<Employee>> callback);\n\n\tvoid fetchDepartments(AsyncCallback<ArrayList<Department>> callback);\n\n\tvoid fetchRiskFactors(int companyID, AsyncCallback<ArrayList<RiskFactor>> callback);\n\n\tvoid saveStrategic(Strategic strategic, HashMap<String, String> hm, AsyncCallback<String> callback);\n\n\tvoid fetchStrategic(HashMap<String, String> hm, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid fetchRiskAssesment(HashMap<String, String> hm, AsyncCallback<ArrayList<RiskAssesmentDTO>> callback);\n\n\tvoid saveRiskAssesment(HashMap<String, String> hm, ArrayList<StrategicDegreeImportance> strategicRisks,\n\t\t\tArrayList<StrategicRiskFactor> arrayListSaveRiskFactors, float resultRating, AsyncCallback<String> callback);\n\n\tvoid sendBackStrategic(Strategic strategics, AsyncCallback<String> callback);\n\n\tvoid declineStrategic(int startegicId, AsyncCallback<String> callback);\n\n\tvoid fetchStrategicAudit(AsyncCallback<ArrayList<StrategicAudit>> callback);\n\n\tvoid fetchDashBoard(HashMap<String, String> hm, AsyncCallback<ArrayList<DashBoardDTO>> callback);\n\n\tvoid fetchFinalAuditables(AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid checkDate(Date date, AsyncCallback<Boolean> callback);\n\n\tvoid fetchSchedulingStrategic(HashMap<String, String> hm, AsyncCallback<ArrayList<StrategicDTO>> callback);\n\n\tvoid fetchSkills(AsyncCallback<ArrayList<Skills>> callback);\n\n\tvoid saveJobTimeEstimation(JobTimeEstimationDTO entity, ArrayList<SkillUpdateData> updateForSkills,\n\t\t\tAsyncCallback<Boolean> callback);\n\n\tvoid fetchJobTime(int jobId, AsyncCallback<JobTimeEstimationDTO> callback);\n\n\tvoid fetchEmployees(AsyncCallback<ArrayList<Employee>> callback);\n\n\tvoid fetchResourceUseFor(int jobId, AsyncCallback<ArrayList<ResourceUse>> callback);\n\n\tvoid fetchEmployeesByDeptId(ArrayList<Integer> depIds, AsyncCallback<ArrayList<Employee>> asyncCallback);\n\n\tvoid saveJobAndAreaOfExpertiseState(ArrayList<JobAndAreaOfExpertise> state, AsyncCallback<Void> callback);\n\n\tvoid fetchCheckBoxStateFor(int jobId, AsyncCallback<ArrayList<JobAndAreaOfExpertise>> callback);\n\n\tvoid saveCreatedJob(JobCreationDTO job, AsyncCallback<String> callback);\n\n\tvoid fetchCreatedJobs(boolean getEmpRelation, boolean getSkillRelation,\n\t\t\tAsyncCallback<ArrayList<JobCreationDTO>> asyncCallback);\n\n\tvoid getEndDate(Date value, int estimatedWeeks, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchEmployeesWithJobs(AsyncCallback<ArrayList<JobsOfEmployee>> callback);\n\n\tvoid updateEndDateForJob(int jobId, String startDate, String endDate, AsyncCallback<JobCreation> asyncCallback);\n\n\tvoid getMonthsInvolved(String string, String string2, AsyncCallback<int[]> callback);\n\n\tvoid fetchAllAuditEngagement(int loggedInEmployee, AsyncCallback<ArrayList<AuditEngagement>> callback);\n\n\tvoid fetchCreatedJob(int jobId, AsyncCallback<JobCreation> callback);\n\n\tvoid updateAuditEngagement(AuditEngagement e, String fieldToUpdate, AsyncCallback<Boolean> callback);\n\n\tvoid syncAuditEngagementWithCreatedJobs(int loggedInEmployee, AsyncCallback<Void> asyncCallback);\n\n\tvoid saveRisks(ArrayList<RiskControlMatrixEntity> records, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid sendEmail(String body, String sendTo, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid fetchAuditEngagement(int selectedJobId, AsyncCallback<AuditEngagement> asyncCallback);\n\n\tvoid fetchRisks(int auditEngId, AsyncCallback<ArrayList<RiskControlMatrixEntity>> asyncCallback);\n\n\t// void fetchEmpForThisJob(\n\t// int selectedJobId,\n\t// AsyncCallback<ArrayList<Object>> asyncCallback);\n\n\tvoid fetchEmployeeJobRelations(int selectedJobId, AsyncCallback<ArrayList<JobEmployeeRelation>> asyncCallback);\n\n\tvoid fetchJobs(AsyncCallback<ArrayList<JobCreation>> asyncCallback);\n\n\tvoid fetchEmployeeJobs(Employee loggedInEmployee, String reportingTab,\n\t\t\tAsyncCallback<ArrayList<JobCreation>> asyncCallback);\n\n\tvoid fetchJobExceptions(int jobId, AsyncCallback<ArrayList<Exceptions>> asyncCallbac);\n\n\tvoid fetchEmployeeExceptions(int employeeId, int jobId, AsyncCallback<ArrayList<Exceptions>> asyncCallbac);\n\n\tvoid sendException(Exceptions exception, Boolean sendMail, String selectedView, AsyncCallback<String> asyncCallbac);\n\n\tvoid saveAuditStepAndExceptions(AuditStep step, ArrayList<Exceptions> exs, AsyncCallback<Void> asyncCallback);\n\n\tvoid getSavedAuditStep(int selectedJobId, int auditWorkId, AsyncCallback<AuditStep> asyncCallback);\n\n\tvoid getSavedExceptions(int selectedJobId, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid saveAuditWork(ArrayList<AuditWork> records, AsyncCallback<Void> asyncCallback);\n\n\tvoid updateKickoffStatus(int auditEngId, Employee loggedInUser, AsyncCallback<Void> asyncCallback);\n\n\tvoid fetchAuditHeadExceptions(int auditHeadId, int selectedJob, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid fetchCreatedJob(int id, boolean b, boolean c, String string, AsyncCallback<JobCreationDTO> asyncCallback);\n\n\tvoid fetchAuditWorkRows(int selectedJobId, AsyncCallback<ArrayList<AuditWork>> asyncCallback);\n\n\tvoid fetchApprovedAuditWorkRows(int selectedJobId, AsyncCallback<ArrayList<AuditWork>> asyncCallback);\n\n\tvoid saveAuditNotification(int auditEngagementId, String message, String to, String cc, String refNo, String from,\n\t\t\tString subject, String filePath, String momoNo, String date, int status,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid logOut(AsyncCallback<String> asyncCallback);\n\n\tvoid selectYear(int year, AsyncCallback<Void> asyncCallback);\n\n\tvoid fetchNumberofPlannedJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberofInProgressJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberofCompletedJobs(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchJobsKickOffWithInaWeek(AsyncCallback<ArrayList<String>> asyncCallback);\n\n\tvoid fetchNumberOfAuditObservations(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsInProgress(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsImplemented(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchNumberOfExceptionsOverdue(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchEmployeesAvilbleForNext2Weeks(AsyncCallback<ArrayList<String>> asyncCallback);\n\n\tvoid fetchStrategicDepartments(int strategicId, AsyncCallback<ArrayList<StrategicDepartments>> asyncCallback);\n\n\tvoid fetchResourceIds(int strategicId, AsyncCallback<ArrayList<Integer>> asyncCallback);\n\n\tvoid fetchJobSoftSkills(int strategicId, AsyncCallback<ArrayList<Integer>> asyncCallback);\n\n\tvoid fetchReportSearchResult(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> department, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid fetchReportWithResourcesSearchResult(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> resources, ArrayList<String> department, AsyncCallback<ArrayList<JobCreation>> callback);\n\n\tvoid fetchStrategicDepartmentsMultiple(ArrayList<Integer> ids,\n\t\t\tAsyncCallback<ArrayList<StrategicDepartments>> callback);\n\n\tvoid exportAuditPlanningReport(ArrayList<ExcelDataDTO> excelDataList, String btn, AsyncCallback<String> callback);\n\n\tvoid fetchReportAuditScheduling(ArrayList<String> dept, ArrayList<String> domain, ArrayList<String> jobStatus,\n\t\t\tArrayList<String> responsiblePerson, ArrayList<String> dep, AsyncCallback<ArrayList<Strategic>> callback);\n\n\tvoid approveFinalAuditable(Strategic strategic, AsyncCallback<String> callback);\n\n\tvoid declineFinalAuditable(Strategic strategic, AsyncCallback<String> asyncCallback);\n\n\tvoid saveUser(Employee employee, AsyncCallback<String> asyncCallback);\n\n\tvoid updateUser(int previousHours, Employee employee, AsyncCallback<String> asyncCallback);\n\n\tvoid getStartEndDates(AsyncCallback<ArrayList<Date>> asyncCallback);\n\n\tvoid fetchNumberOfDaysBetweenTwoDates(Date from, Date to, AsyncCallback<Integer> asyncCallback);\n\n\tvoid saveCompany(Company company, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCompanies(AsyncCallback<ArrayList<Company>> asyncCallback);\n\n\tvoid updateStrategic(Strategic strategic, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteRisk(RiskControlMatrixEntity risk, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteAuditWork(int auditWorkId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCurrentYear(AsyncCallback<Integer> asyncCallback);\n\n\tvoid fetchEmployeesBySkillId(int jobId, AsyncCallback<ArrayList<Employee>> asyncCallback);\n\n\tvoid checkNoOfResourcesForSelectedSkill(int noOfResources, int skillId, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteException(int exceptionId, AsyncCallback<String> asyncCallback);\n\n\tvoid approveScheduling(AsyncCallback<String> asyncCallback);\n\n\tvoid fetchSelectedEmployee(int employeeId, AsyncCallback<Employee> asyncCallback);\n\n\tvoid fetchExceptionReports(ArrayList<String> div, ArrayList<String> domain, ArrayList<String> risk,\n\t\t\tArrayList<String> resources, ArrayList<String> jobs, ArrayList<String> auditees,\n\t\t\tArrayList<String> exceptionStatus, ArrayList<String> department, AsyncCallback<ArrayList<Exceptions>> asyncCallback);\n\n\tvoid exportJobTimeAllocationReport(ArrayList<JobTimeAllocationReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid exportAuditExceptionsReport(ArrayList<ExceptionsReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid exportAuditSchedulingReport(ArrayList<AuditSchedulingReportDTO> excelDataList, String btn,\n\t\t\tAsyncCallback<String> asyncCallback);\n\n\tvoid isScheduleApproved(AsyncCallback<Boolean> asyncCallback);\n\n\tvoid fetchDashboard(HashMap<String, String> hm, AsyncCallback<DashBoardNewDTO> asyncCallback);\n\n\tvoid updateUploadedAuditStepFile(int auditStepId, AsyncCallback<String> asyncCallback);\n\n\tvoid saveSelectedAuditStepIdInSession(int auditStepId, AsyncCallback<String> asyncCallback);\n\n\tvoid submitFeedBack(Feedback feedBack, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchProcessDTOs(AsyncCallback<ArrayList<ProcessDTO>> callback);\n\n\tvoid fetchSubProcess(int processId, AsyncCallback<ArrayList<SubProcess>> callback);\n\n\tvoid saveActivityObjectives(ArrayList<ActivityObjective> activityObjectives, int jobid, int status,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid saveRiskObjectives(ArrayList<RiskObjective> riskObjectives, int jobid, int status,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid saveExistingControls(ArrayList<SuggestedControls> suggestedControls, AsyncCallback<String> callback);\n\n\tvoid saveAuditWorkProgram(ArrayList<AuditProgramme> auditWorkProgramme, int selectedJobId,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchApprovedAuditProgrammeRows(int selectedJobId, AsyncCallback<ArrayList<AuditProgramme>> asyncCallback);\n\n\tvoid deleteRiskObjective(int riskId, int jobId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchJobStatus(int jobId, AsyncCallback<JobStatusDTO> asyncCallback);\n\n\tvoid fetchDashBoardListBoxDTOs(AsyncCallback<ArrayList<DashboardListBoxDTO>> callback);\n\n\tvoid savetoDo(ToDo todo, AsyncCallback<String> callback);\n\n\tvoid saveinformationRequest(InformationRequestEntity informationrequest, String filepath,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchEmailAttachments(AsyncCallback<ArrayList<String>> callback);\n\n\tvoid saveToDoLogs(ToDoLogsEntity toDoLogsEntity, AsyncCallback<String> callback);\n\n\tvoid saveInformationRequestLogs(InformationRequestLogEntity informationRequestLogEntity,\n\t\t\tAsyncCallback<String> callback);\n\n\tvoid fetchAuditStepExceptions(String id, AsyncCallback<ArrayList<String>> callback);\n\n\tvoid fetchAuditStepsProcerdure(String id, String mainFolder, AsyncCallback<ArrayList<String>> callback);\n\n\tvoid deleteAttachmentFile(String id, String mainFolder, String fileName, AsyncCallback<String> callback);\n\n\tvoid deleteUnsavedAttachemnts(String pathtodouploads, AsyncCallback<String> callback);\n\n\tvoid fetchAssignedFromToDos(AsyncCallback<ArrayList<ToDo>> callback);\n\n\tvoid fetchAssignedToToDos(AsyncCallback<ArrayList<ToDo>> callback);\n\n\tvoid fetchAssignedFromIRReLoad(AsyncCallback<ArrayList<InformationRequestEntity>> callback);\n\n\tvoid fetchJobExceptionWithImplicationRating(int jobId, int ImplicationRating,\n\t\t\tAsyncCallback<ArrayList<Exceptions>> callback);\n\n\tvoid fetchControlsForReport(int jobId, AsyncCallback<ArrayList<SuggestedControls>> callback);\n\n\tvoid fetchSelectedJob(int jobId, AsyncCallback<JobCreation> callback);\n\n\tvoid saveReportDataPopup(ArrayList<ReportDataEntity> listReportData12, AsyncCallback<String> callback);\n\n\tvoid fetchReportDataPopup(int jobId, AsyncCallback<ArrayList<ReportDataEntity>> callback);\n\n\tvoid saveAssesmentGrid(ArrayList<AssesmentGridEntity> listAssesment, int jobid, AsyncCallback<String> callback);\n\n\tvoid fetchAssesmentGrid(int jobId, AsyncCallback<ArrayList<AssesmentGridDbEntity>> callback);\n\n\tvoid deleteActivityObjective(int jobId, AsyncCallback<String> callback);\n\n\tvoid getNextYear(Date value, AsyncCallback<Date> asyncCallback);\n\n\tvoid readExcel(String subFolder, String mainFolder, AsyncCallback<ArrayList<SamplingExcelSheetEntity>> callback);\n\n\tvoid fetchAssignedToIRReLoad(AsyncCallback<ArrayList<InformationRequestEntity>> asyncCallback);\n\n\tvoid generateSamplingOutput(String populationSize, String samplingSize, String samplingMehod,\n\t\t\tArrayList<SamplingExcelSheetEntity> list, Integer auditStepId, AsyncCallback<ArrayList<SamplingExcelSheetEntity>> callback);\n\n\n\tvoid exportSamplingAuditStep(String samplingMehod, String reportFormat, ArrayList<SamplingExcelSheetEntity> list,\n\t\t\tInteger auditStepId, AsyncCallback<String> callback);\n\n\tvoid fetchDivision(AsyncCallback<ArrayList<Division>> asyncCallback);\n\n\tvoid fetchDivisionDepartments(int divisionID, AsyncCallback<ArrayList<Department>> asyncCallback);\n\n\tvoid fetchSavedSamplingReport(String folder, String auditStepId, AsyncCallback<String> callback);\n\n\tvoid fetchJobsAgainstSelectedDates(Date startDate, Date endDate, AsyncCallback<ArrayList<JobCreation>> callback);\n\n\tvoid fetchStrategicSubProcess(int id, AsyncCallback<StrategicSubProcess> asyncCallback);\n\n\tvoid fetchCompanyPackage(int companyId, AsyncCallback<String> asyncCallback);\n\n\tvoid fetchCompanyLogoPath(int companyID, AsyncCallback<String> asyncCallback);\n\n\tvoid updatePassword(Employee loggedInUser, AsyncCallback<String> asyncCallback);\n\n\tvoid validateRegisteredUserEmail(String emailID, AsyncCallback<Integer> asyncCallback);\n\n\tvoid sendPasswordResetEmail(String emailBody, String value, AsyncCallback<Boolean> asyncCallback);\n\n\tvoid resetPassword(Integer employeeID, String newPassword, AsyncCallback<String> asyncCallback);\n\n\tvoid upgradeSoftware(AsyncCallback<String> asyncCallback);\n\n\tvoid addDivision(String divisionName, AsyncCallback<String> asyncCallback);\n\n\tvoid addDepartment(int divisionID, String departmentName, AsyncCallback<String> asyncCallback);\n\n\tvoid editDivisionName(Division division, AsyncCallback<String> asyncCallback);\n\n\tvoid editDepartmentName(Department department, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteDivision(int divisionID, AsyncCallback<String> asyncCallback);\n\n\tvoid deleteDepartment(int departmentID, AsyncCallback<String> asyncCallback);\n\n\tvoid uploadCompanyLogo(String fileName, int companyID, AsyncCallback<String> callback);\n\n\tvoid fetchDegreeImportance(int companyID, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid saveDegreeImportance(ArrayList<DegreeImportance> arrayListDegreeImportance, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid deleteDegreeImportance(int degreeID, AsyncCallback<ArrayList<DegreeImportance>> asyncCallback);\n\n\tvoid saveRiskFactor(ArrayList<RiskFactor> arrayListRiskFacrors, AsyncCallback<ArrayList<RiskFactor>> asyncCallback);\n\n\tvoid deleteRiskFactor(int riskID, AsyncCallback<ArrayList<RiskFactor>> asyncCallback);\n\n\tvoid removeStrategicDegreeImportance(int id, AsyncCallback<String> asyncCallback);\n\n\tvoid removeStrategicRiskFactor(int id, AsyncCallback<String> callback);\n\n\tvoid fetchStrategicDuplicate(Strategic strategic, AsyncCallback<ArrayList<Strategic>> asyncCallback);\n\n}",
"private Service() {}",
"private LoggerSingleton() {\n\n }",
"private Logger() {\n\n }",
"public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Initializes a MetadataStore, including allocation of resources.\n * </pre>\n */\n default void createMetadataStore(\n com.google.cloud.aiplatform.v1.CreateMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific MetadataStore.\n * </pre>\n */\n default void getMetadataStore(\n com.google.cloud.aiplatform.v1.GetMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataStore>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists MetadataStores for a Location.\n * </pre>\n */\n default void listMetadataStores(\n com.google.cloud.aiplatform.v1.ListMetadataStoresRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListMetadataStoresResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListMetadataStoresMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a single MetadataStore and all its child resources (Artifacts,\n * Executions, and Contexts).\n * </pre>\n */\n default void deleteMetadataStore(\n com.google.cloud.aiplatform.v1.DeleteMetadataStoreRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteMetadataStoreMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an Artifact associated with a MetadataStore.\n * </pre>\n */\n default void createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Artifact.\n * </pre>\n */\n default void getArtifact(\n com.google.cloud.aiplatform.v1.GetArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Artifacts in the MetadataStore.\n * </pre>\n */\n default void listArtifacts(\n com.google.cloud.aiplatform.v1.ListArtifactsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListArtifactsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListArtifactsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Artifact.\n * </pre>\n */\n default void updateArtifact(\n com.google.cloud.aiplatform.v1.UpdateArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Artifact> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an Artifact.\n * </pre>\n */\n default void deleteArtifact(\n com.google.cloud.aiplatform.v1.DeleteArtifactRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteArtifactMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Artifacts.\n * </pre>\n */\n default void purgeArtifacts(\n com.google.cloud.aiplatform.v1.PurgeArtifactsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeArtifactsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a Context associated with a MetadataStore.\n * </pre>\n */\n default void createContext(\n com.google.cloud.aiplatform.v1.CreateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Context.\n * </pre>\n */\n default void getContext(\n com.google.cloud.aiplatform.v1.GetContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Contexts on the MetadataStore.\n * </pre>\n */\n default void listContexts(\n com.google.cloud.aiplatform.v1.ListContextsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListContextsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListContextsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Context.\n * </pre>\n */\n default void updateContext(\n com.google.cloud.aiplatform.v1.UpdateContextRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Context> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a stored Context.\n * </pre>\n */\n default void deleteContext(\n com.google.cloud.aiplatform.v1.DeleteContextRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteContextMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Contexts.\n * </pre>\n */\n default void purgeContexts(\n com.google.cloud.aiplatform.v1.PurgeContextsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeContextsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds a set of Artifacts and Executions to a Context. If any of the\n * Artifacts or Executions have already been added to a Context, they are\n * simply skipped.\n * </pre>\n */\n default void addContextArtifactsAndExecutions(\n com.google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.aiplatform.v1.AddContextArtifactsAndExecutionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddContextArtifactsAndExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds a set of Contexts as children to a parent Context. If any of the\n * child Contexts have already been added to the parent Context, they are\n * simply skipped. If this call would create a cycle or cause any Context to\n * have more than 10 parents, the request will fail with an INVALID_ARGUMENT\n * error.\n * </pre>\n */\n default void addContextChildren(\n com.google.cloud.aiplatform.v1.AddContextChildrenRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.AddContextChildrenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddContextChildrenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Remove a set of children contexts from a parent Context. If any of the\n * child Contexts were NOT added to the parent Context, they are\n * simply skipped.\n * </pre>\n */\n default void removeContextChildren(\n com.google.cloud.aiplatform.v1.RemoveContextChildrenRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.RemoveContextChildrenResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getRemoveContextChildrenMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves Artifacts and Executions within the specified Context, connected\n * by Event edges and returned as a LineageSubgraph.\n * </pre>\n */\n default void queryContextLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryContextLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryContextLineageSubgraphMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an Execution associated with a MetadataStore.\n * </pre>\n */\n default void createExecution(\n com.google.cloud.aiplatform.v1.CreateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific Execution.\n * </pre>\n */\n default void getExecution(\n com.google.cloud.aiplatform.v1.GetExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists Executions in the MetadataStore.\n * </pre>\n */\n default void listExecutions(\n com.google.cloud.aiplatform.v1.ListExecutionsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListExecutionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a stored Execution.\n * </pre>\n */\n default void updateExecution(\n com.google.cloud.aiplatform.v1.UpdateExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.Execution> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an Execution.\n * </pre>\n */\n default void deleteExecution(\n com.google.cloud.aiplatform.v1.DeleteExecutionRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteExecutionMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Purges Executions.\n * </pre>\n */\n default void purgeExecutions(\n com.google.cloud.aiplatform.v1.PurgeExecutionsRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getPurgeExecutionsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds Events to the specified Execution. An Event indicates whether an\n * Artifact was used as an input or output for an Execution. If an Event\n * already exists between the Execution and the Artifact, the Event is\n * skipped.\n * </pre>\n */\n default void addExecutionEvents(\n com.google.cloud.aiplatform.v1.AddExecutionEventsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.AddExecutionEventsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getAddExecutionEventsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Obtains the set of input and output Artifacts for this Execution, in the\n * form of LineageSubgraph that also contains the Execution and connecting\n * Events.\n * </pre>\n */\n default void queryExecutionInputsAndOutputs(\n com.google.cloud.aiplatform.v1.QueryExecutionInputsAndOutputsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryExecutionInputsAndOutputsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a MetadataSchema.\n * </pre>\n */\n default void createMetadataSchema(\n com.google.cloud.aiplatform.v1.CreateMetadataSchemaRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataSchema>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMetadataSchemaMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves a specific MetadataSchema.\n * </pre>\n */\n default void getMetadataSchema(\n com.google.cloud.aiplatform.v1.GetMetadataSchemaRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.MetadataSchema>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetMetadataSchemaMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists MetadataSchemas.\n * </pre>\n */\n default void listMetadataSchemas(\n com.google.cloud.aiplatform.v1.ListMetadataSchemasRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.ListMetadataSchemasResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListMetadataSchemasMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Retrieves lineage of an Artifact represented through Artifacts and\n * Executions connected by Event edges and returned as a LineageSubgraph.\n * </pre>\n */\n default void queryArtifactLineageSubgraph(\n com.google.cloud.aiplatform.v1.QueryArtifactLineageSubgraphRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.aiplatform.v1.LineageSubgraph>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getQueryArtifactLineageSubgraphMethod(), responseObserver);\n }\n }",
"public interface IndexService {\n @Async\n public void indexAll(String fileName);\n\n public void deleteDoc(String accession) throws Exception;\n\n public void clearIndex(boolean commit) throws IOException;\n\n public void copySourceFile(String jsonFileName) throws IOException;\n\n}",
"public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Returns a specific `Metrics Scope`.\n * </pre>\n */\n default void getMetricsScope(\n com.google.monitoring.metricsscope.v1.GetMetricsScopeRequest request,\n io.grpc.stub.StreamObserver<com.google.monitoring.metricsscope.v1.MetricsScope>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetMetricsScopeMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Returns a list of every `Metrics Scope` that a specific `MonitoredProject`\n * has been added to. The metrics scope representing the specified monitored\n * project will always be the first entry in the response.\n * </pre>\n */\n default void listMetricsScopesByMonitoredProject(\n com.google.monitoring.metricsscope.v1.ListMetricsScopesByMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<\n com.google.monitoring.metricsscope.v1.ListMetricsScopesByMonitoredProjectResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListMetricsScopesByMonitoredProjectMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Adds a `MonitoredProject` with the given project ID\n * to the specified `Metrics Scope`.\n * </pre>\n */\n default void createMonitoredProject(\n com.google.monitoring.metricsscope.v1.CreateMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateMonitoredProjectMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a `MonitoredProject` from the specified `Metrics Scope`.\n * </pre>\n */\n default void deleteMonitoredProject(\n com.google.monitoring.metricsscope.v1.DeleteMonitoredProjectRequest request,\n io.grpc.stub.StreamObserver<com.google.longrunning.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteMonitoredProjectMethod(), responseObserver);\n }\n }",
"public interface GreetingServiceAsync {\r\n\tvoid getAll( String type, AsyncCallback<HashMap<String, String>> callback );\r\n\tvoid delete(String id,AsyncCallback callback );\r\n\tvoid getById(String idData, AsyncCallback<PhotoClient> callback);\r\n\tvoid addProject(String proName,AsyncCallback callback);\r\n\tvoid getProjectList(AsyncCallback callback);\r\n\tvoid getFolderChildren(FileModel model, AsyncCallback<List<FileModel>> children);\r\n \r\n}",
"public interface AsynService {\n void asynMethod();\n}",
"public TaskServiceImpl() {}",
"public interface AsyncService {\n\n /**\n *\n *\n * <pre>\n * Creates a namespace, and returns the new namespace.\n * </pre>\n */\n default void createNamespace(\n com.google.cloud.servicedirectory.v1beta1.CreateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all namespaces.\n * </pre>\n */\n default void listNamespaces(\n com.google.cloud.servicedirectory.v1beta1.ListNamespacesRequest request,\n io.grpc.stub.StreamObserver<\n com.google.cloud.servicedirectory.v1beta1.ListNamespacesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListNamespacesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a namespace.\n * </pre>\n */\n default void getNamespace(\n com.google.cloud.servicedirectory.v1beta1.GetNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a namespace.\n * </pre>\n */\n default void updateNamespace(\n com.google.cloud.servicedirectory.v1beta1.UpdateNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Namespace>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a namespace. This also deletes all services and endpoints in\n * the namespace.\n * </pre>\n */\n default void deleteNamespace(\n com.google.cloud.servicedirectory.v1beta1.DeleteNamespaceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteNamespaceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates a service, and returns the new service.\n * </pre>\n */\n default void createService(\n com.google.cloud.servicedirectory.v1beta1.CreateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all services belonging to a namespace.\n * </pre>\n */\n default void listServices(\n com.google.cloud.servicedirectory.v1beta1.ListServicesRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListServicesResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListServicesMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets a service.\n * </pre>\n */\n default void getService(\n com.google.cloud.servicedirectory.v1beta1.GetServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getGetServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates a service.\n * </pre>\n */\n default void updateService(\n com.google.cloud.servicedirectory.v1beta1.UpdateServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Service>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes a service. This also deletes all endpoints associated with\n * the service.\n * </pre>\n */\n default void deleteService(\n com.google.cloud.servicedirectory.v1beta1.DeleteServiceRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteServiceMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Creates an endpoint, and returns the new endpoint.\n * </pre>\n */\n default void createEndpoint(\n com.google.cloud.servicedirectory.v1beta1.CreateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getCreateEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Lists all endpoints.\n * </pre>\n */\n default void listEndpoints(\n com.google.cloud.servicedirectory.v1beta1.ListEndpointsRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.ListEndpointsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getListEndpointsMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets an endpoint.\n * </pre>\n */\n default void getEndpoint(\n com.google.cloud.servicedirectory.v1beta1.GetEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Updates an endpoint.\n * </pre>\n */\n default void updateEndpoint(\n com.google.cloud.servicedirectory.v1beta1.UpdateEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.cloud.servicedirectory.v1beta1.Endpoint>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getUpdateEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Deletes an endpoint.\n * </pre>\n */\n default void deleteEndpoint(\n com.google.cloud.servicedirectory.v1beta1.DeleteEndpointRequest request,\n io.grpc.stub.StreamObserver<com.google.protobuf.Empty> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getDeleteEndpointMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Gets the IAM Policy for a resource\n * </pre>\n */\n default void getIamPolicy(\n com.google.iam.v1.GetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getGetIamPolicyMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Sets the IAM Policy for a resource\n * </pre>\n */\n default void setIamPolicy(\n com.google.iam.v1.SetIamPolicyRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.Policy> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getSetIamPolicyMethod(), responseObserver);\n }\n\n /**\n *\n *\n * <pre>\n * Tests IAM permissions for a resource (namespace, service or\n * service workload only).\n * </pre>\n */\n default void testIamPermissions(\n com.google.iam.v1.TestIamPermissionsRequest request,\n io.grpc.stub.StreamObserver<com.google.iam.v1.TestIamPermissionsResponse>\n responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(\n getTestIamPermissionsMethod(), responseObserver);\n }\n }",
"private ExtentLogger() {}",
"private Logger(){\n\n }",
"private Logger getLogger() {\n return LoggerFactory.getLogger(ApplicationManager.class);\n }",
"private JavaUtilLogHandlers() { }",
"public interface GreetingServiceAsync {\r\n \r\n public void getAvailableDatasets(AsyncCallback<Map<Integer,String> >datasetResults);\r\n public void loadDataset(int datasetId,AsyncCallback<DatasetInformation> asyncCallback);\r\n public void computeLineChart(int datasetId,AsyncCallback<LineChartResults> asyncCallback);\r\n public void computeSomClustering(int datasetId,int linkage,int distanceMeasure,AsyncCallback<SomClusteringResults> asyncCallback);\r\n public void computeHeatmap(int datasetId,List<String>indexer,List<String>colIndexer,AsyncCallback<ImgResult> asyncCallback );\r\n public void computePCA(int datasetId,int comI,int comII, AsyncCallback<PCAResults> asyncCallback);\r\n public void computeRank(int datasetId,String perm,String seed,String[] colGropNames,String log2, AsyncCallback<RankResult> asyncCallback);\r\n public void createRowGroup(int datasetId, String name, String color, String type, int[] selection, AsyncCallback<Boolean> asyncCallback);\r\n public void createColGroup(int datasetId, String name, String color, String type, String[] selection, AsyncCallback<Boolean> asyncCallback);\r\n public void createSubDataset(String name,int[] selection,AsyncCallback<Integer> asyncCallback);\r\n public void updateDatasetInfo(int datasetId, AsyncCallback<DatasetInformation> asyncCallback);\r\n public void activateGroups(int datasetId,String[] rowGroups,String[] colGroups, AsyncCallback<DatasetInformation> asyncCallback);\r\n\r\n \r\n public void saveDataset(int datasetId, String newName,AsyncCallback<Integer> asyncCallback);\r\n \r\n}",
"public void service() {\n\t}",
"public MyLogger () {}",
"@Async @Endpoint(\"http://0.0.0.0:8080\")\npublic interface AsyncEndpoint {\n\t\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler}.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @return {@code null}, since the request is processed asynchronously\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncsuccess\")\n\tString asyncSuccess(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler} which returns response \n\t * code that signifies a failure. This should invoke {@link AsyncHandler#onFailure(HttpResponse)} on the \n\t * provided callback.</p> \n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncfailure\")\n\tvoid asyncFailure(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} and {@link AsyncHandler} whose execution is \n\t * expected to fail with an exception and hence handled by the callback {@link AsyncHandler#onError(Exception)}.</p>\n\t * \n\t * <p>The error is caused by the deserializer which attempts to parse the response content, which is \n\t * not JSON, into the {@link User} model.</p> \n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which handles the results of the asynchronous request\n\t * \n\t * @since 1.3.4\n\t */\n\t@Deserialize(JSON)\n\t@GET(\"/asyncerror\")\n\tvoid asyncError(AsyncHandler<User> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request asynchronously using @{@link Async} but does not expect the response to be \n\t * handled using an {@link AsyncHandler}.</p>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/asyncnohandling\")\n\tvoid asyncNoHandling();\n\t\n\t/**\n\t * <p>Processes a successful execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onSuccess(HttpResponse, Object)} throws an exception.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onSuccess</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/successcallbackerror\")\n\tvoid asyncSuccessCallbackError(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Processes a failed execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onFailure(HttpResponse)} throws an exception.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onFailure</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@GET(\"/failurecallbackerror\")\n\tvoid asyncFailureCallbackError(AsyncHandler<String> asyncHandler);\n\t\n\t/**\n\t * <p>Processes an erroneous execution, but the user provided implementation of the callback \n\t * {@link AsyncHandler#onError(Exception)} throws an exception itself.</p>\n\t * \n\t * @param asyncHandler\n\t * \t\t\tthe {@link AsyncHandler} which is expected to throw an exception in <i>onError</i>\n\t * \n\t * @since 1.3.0\n\t */\n\t@Deserialize(JSON)\n\t@GET(\"/errorcallbackerror\")\n\tvoid asyncErrorCallbackError(AsyncHandler<User> asyncHandler);\n\t\n\t/**\n\t * <p>Sends a request <b>synchronously</b> by detaching the inherited @{@link Async} annotation.</p> \n\t * \n\t * @return the response string which indicated a synchronous request\n\t * \n\t * @since 1.3.0\n\t */\n\t@Detach(Async.class) \n\t@GET(\"/asyncdetached\")\n\tString asyncDetached();\n}",
"private Logger(){ }",
"private LogUtil() {\r\n /* no-op */\r\n }",
"protected static Logger log() {\n return LogSingleton.INSTANCE.value;\n }",
"private ServiceManage() {\r\n\t\tInitialThreads();\r\n\t}",
"public interface DBServiceAsync {\r\n\tvoid greetServer(String input, AsyncCallback<String> callback);\r\n\r\n\tvoid startDB(AsyncCallback<String> callback);\r\n\r\n\tvoid stopDB(AsyncCallback<String> callback);\r\n\r\n\tvoid createDB(AsyncCallback<String> callback);\r\n}",
"AWSStorageGatewayAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) {\n super(asyncClientParams, endpointDiscoveryEnabled);\n this.executorService = asyncClientParams.getExecutor();\n }",
"@Override\n protected Logger getLogger() {\n return LOGGER;\n }",
"public ServiceTask() {\n\t}",
"public Slf4jLogService() {\n this(System.getProperties());\n }",
"public StatusLogger getStatusLogger();",
"private Log() {\r\n\t}",
"void onServiceBegin(int taskCode);",
"public interface GenerateResourceServiceAsync {\n /**\n * {@link GenerateResourceServiceImpl#generateTSDPattern(long,boolean)}\n */\n void generateTSDPattern(long settingFileId, boolean isCreateFile, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#generateBehaviorPattern(long,boolean)}\n */\n void generateBehaviorPattern(long settingFileId, boolean isCreateFile, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#generateScenarioSet(long, boolean)}\n */\n void generateScenarioSet(long settingFileId, boolean isCreateFile, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#generateConcreteScenarioSet(long, byte[])}\n */\n void generateConcreteScenarioSet(long settingFileId, byte[] pattern, AsyncCallback<VMFile> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#getPartOfFileContent(long, long, long, long)}\n */\n void getPartOfFileContent(long projectId, long fileId, long startRecordOffset, long recordCount, AsyncCallback<byte[]> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#getPartOfFileContent(long, long, long, String)}\n */\n void getPartOfFileContent(long projectId, long fileId, long patternId, String generationHash, AsyncCallback<byte[]> callback) throws IllegalArgumentException;\n\n /**\n * {@link GenerateResourceServiceImpl#getSettingFileJobStatusList(long, long)}\n */\n void getSettingFileJobStatusList(long fileId, long projectId, AsyncCallback<List<JobStatusInfo>> callback) throws IllegalArgumentException;\n\n}",
"protected LoggerContext createContext(String name, URI configLocation) {\n/* 46 */ return new AsyncLoggerContext(name, null, configLocation);\n/* */ }",
"private ServiceGenerator() {\n }",
"public RevisorLogger getLogger();",
"void service() {\n System.out.println(\"Doing some work\");\n }",
"private void logIt(String msg) {\n\tSystem.out.println(\"PLATINUM-SYNC-LOG: \" + msg);\n}",
"@Override\n\tpublic void initLogger() {\n\t\t\n\t}",
"@Override\n\tpublic void autonomousPeriodic() {\n\t\tlogger.log();\n\t}",
"protected abstract ILogger getLogger();",
"abstract void initiateLog();",
"public interface AsyncService {\n\n /**\n * <pre>\n * Creates or removes asset group signals. Operation statuses are\n * returned.\n * </pre>\n */\n default void mutateAssetGroupSignals(com.google.ads.googleads.v14.services.MutateAssetGroupSignalsRequest request,\n io.grpc.stub.StreamObserver<com.google.ads.googleads.v14.services.MutateAssetGroupSignalsResponse> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getMutateAssetGroupSignalsMethod(), responseObserver);\n }\n }",
"AWSCodeStarNotificationsAsyncClient(AwsAsyncClientParams asyncClientParams, boolean endpointDiscoveryEnabled) {\n super(asyncClientParams, endpointDiscoveryEnabled);\n this.executorService = asyncClientParams.getExecutor();\n }",
"@Override\n\tpublic boolean isAsyncStarted() {\n\t\treturn false;\n\t}",
"public interface ClientServiceAsync {\n\t/**\n\t * Save a Client instance to the data store\n\t * @param c The client to be saved\n\t * @param cb The async callback\n\t */\n\tpublic void saveClient(Client c, AsyncCallback<Void> cb);\n\t\n\t/**\n\t * Load all the Client instances from the server\n\t * @param cb The async callback\n\t */\n\tpublic void getClients(AsyncCallback<List<Client>> cb);\n\t\n\t/**\n\t * Get a Client by id\n\t * @param id The client id\n\t * @param cb The async callback\n\t */\n\tpublic void getClient(String id, AsyncCallback<Client> cb);\n\n\t/**\n\t * Delete a list of clients from the data store\n\t * @param clients The list of clients to be deleted\n\t * @param cb The async callback\n\t */\n\tpublic void deleteClients(Collection<Client> clients, AsyncCallback<Void> cb);\n\t\n\tpublic void saveClients(Collection<Client> clients, AsyncCallback<Void> cb);\n}",
"public interface HomepageServiceAsync {\n\tpublic void getProtectionInformation(AsyncCallback<ProtectionInformationModel[]> callback);\n\n\tpublic void getRecentBackups(int backupType, int backupStatus,int top, AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getRecentBackupsByServerTime(int backupType, int backupStatus, String serverBeginDate, String serverEndDate, boolean needCatalogStatus, AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getVMRecentBackupsByServerTime(int backupType, int backupStatus, String serverBeginDate, String serverEndDate, boolean needCatalogStatus, BackupVMModel vmModel,AsyncCallback<RecoveryPointModel[]> callback);\n\t\n\tpublic void getBackupInforamtionSummary(AsyncCallback<BackupInformationSummaryModel> callback);\n\t\n\tpublic void updateProtectionInformation(AsyncCallback<ProtectionInformationModel[]> callback);\n\t\n\tpublic void getDestSizeInformation(BackupSettingsModel model,AsyncCallback<DestinationCapacityModel> callback);\n\t\n\tpublic void getNextScheduleEvent(int in_iJobType,AsyncCallback<NextScheduleEventModel> callback);\n\n\tpublic void getTrustHosts(\n\t\t\tAsyncCallback<TrustHostModel[]> callback);\n\n\tvoid becomeTrustHost(TrustHostModel trustHostModel,\n\t\t\tAsyncCallback<Boolean> callback);\n\n\tvoid checkBaseLicense(AsyncCallback<Boolean> callback);\n\n\tvoid getBackupInforamtionSummaryWithLicInfo(AsyncCallback<BackupInformationSummaryModel> callback);\n\t\n\tvoid getLocalHost(AsyncCallback<TrustHostModel> callback);\n\n\tvoid PMInstallPatch(PatchInfoModel in_patchinfoModel,\n\t\t\tAsyncCallback<Integer> callback);\n\t\n\tvoid PMInstallBIPatch(PatchInfoModel in_patchinfoModel,\n\t\t\tAsyncCallback<Integer> callback);//added by cliicy.luo\n\t\n\tvoid getVMBackupInforamtionSummaryWithLicInfo(BackupVMModel vm,\n\t\t\tAsyncCallback<BackupInformationSummaryModel> callback);\n\n\tvoid getVMBackupInforamtionSummary(BackupVMModel vm,\n\t\t\tAsyncCallback<BackupInformationSummaryModel> callback);\n\n\tvoid getVMProtectionInformation(BackupVMModel vmModel,\n\t\t\tAsyncCallback<ProtectionInformationModel[]> callback);\n\n\tvoid getVMNextScheduleEvent(BackupVMModel vmModel,\n\t\t\tAsyncCallback<NextScheduleEventModel> callback);\n\tpublic void getVMRecentBackups(int backupType, int backupStatus,int top,BackupVMModel vmModel, AsyncCallback<RecoveryPointModel[]> callback);\n\n\tvoid updateVMProtectionInformation(BackupVMModel vm,\n\t\t\tAsyncCallback<ProtectionInformationModel[]> callback);\n\n\tvoid getArchiveInfoSummary(AsyncCallback<ArchiveJobInfoModel> callback);\n\n\tvoid getLicInfo(AsyncCallback<LicInfoModel> callback);\n\n\tvoid getVMStatusModel(BackupVMModel vmModel,\n\t\t\tAsyncCallback<VMStatusModel[]> callback);\n\n\tvoid getConfiguredVM(AsyncCallback<BackupVMModel[]> callback);\n\n\tvoid getMergeJobMonitor(String vmInstanceUUID,\n\t\t\tAsyncCallback<MergeJobMonitorModel> callback);\n\n\tvoid pauseMerge(String vmInstanceUUID, AsyncCallback<Integer> callback);\n\n\tvoid resumeMerge(String vmInstanceUUID, AsyncCallback<Integer> callback);\n\n\tvoid getMergeStatus(String vmInstanceUUID,\n AsyncCallback<MergeStatusModel> callback);\n\n\tvoid getBackupSetInfo(String vmInstanceUUID, \n\t\t\tAsyncCallback<ArrayList<BackupSetInfoModel>> callback);\n\t\n\tpublic void getDataStoreStatus(String dataStoreUUID, AsyncCallback<DataStoreInfoModel> callback);\n\n\tvoid getVMDataStoreStatus(BackupVMModel vm, String dataStoreUUID,\n\t\t\tAsyncCallback<DataStoreInfoModel> callback);\n\t\n}",
"private Log() {\n }",
"public Service(int id)\r\n {\r\n this.id = id;\r\n \r\n logger = new Logger(this);\r\n }",
"private Logger getLogger() {\n return LoggingUtils.getLogger();\n }",
"public interface StakeServiceAsync {\n\tvoid sendStake(long uuid, int raceType, int horseNumber, int summ, AsyncCallback<Integer> callback);\n\t\n\tvoid getRaceResultfromDB(int raceId, AsyncCallback<List<Result>> callback);\n}",
"public interface AcnServiceAsync {\r\n\t\r\n\tvoid ordernarSequencia(Integer num1, Integer num2, AsyncCallback<Integer[]> callback) throws Exception;\r\n\t\r\n\tvoid recuperarListaPessoa(int quantidade, AsyncCallback<Map<String, List<Pessoa>>> callback);\r\n\t\r\n}",
"public void test() {\n String name = AddressService.class.getName();\n System.out.print(name + \"xxxx\");\n Logs.d(name);\n }",
"public Logger (){}",
"private ThreadUtil() {\n \n }",
"public LogService getLog() {\n\treturn log;\n }",
"AWSStorageGatewayAsyncClient(AwsAsyncClientParams asyncClientParams) {\n this(asyncClientParams, false);\n }",
"@Override\n public void log()\n {\n }",
"public MyLoggingFacade(Logger logger) {\n this.logger = logger;\n }",
"public interface PgStudioServiceAsync {\n\n\tvoid getConnectionInfoMessage(String connectionToken, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\t\n\tvoid getList(String connectionToken, DATABASE_OBJECT_TYPE type, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\n\tvoid getList(String connectionToken, int schema, ITEM_TYPE type, AsyncCallback<String> callback)\n \t\tthrows IllegalArgumentException;\n\n\tvoid getRangeDiffFunctionList(String connectionToken, String schema, String subType, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getTriggerFunctionList(String connectionToken, int schema, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid getItemObjectList(String connectionToken, int item, ITEM_TYPE type, ITEM_OBJECT_TYPE object, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getItemMetaData(String connectionToken, int item, ITEM_TYPE type, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getItemData(String connectionToken, int item, ITEM_TYPE type, int count, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getQueryMetaData(String connectionToken, String query, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid executeQuery(String connectionToken, String query, String queryType, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid dropItem(String connectionToken, int item, ITEM_TYPE type, boolean cascade, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid analyze(String connectionToken, int item, ITEM_TYPE type, boolean vacuum, boolean vacuumFull, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid renameItem(String connectionToken, int item, ITEM_TYPE type, String newName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid truncate(String connectionToken, int item, ITEM_TYPE type, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createIndex(String connectionToken, int item, String indexName, INDEX_TYPE indexType, boolean isUnique, boolean isConcurrently, ArrayList<String> columnList, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid dropItemObject(String connectionToken, int item, ITEM_TYPE type, String objectName, ITEM_OBJECT_TYPE objType, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid renameItemObject(String connectionToken, int item, ITEM_TYPE type, String objectName, ITEM_OBJECT_TYPE objType, String newObjectName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid renameSchema(String connectionToken, String oldSchema, String schema, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid dropSchema(String connectionToken, String schemaName, boolean cascade, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createSchema(String connectionToken, String schemaName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getExplainResult(String connectionToken, String query, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createView(String connectionToken, String schema, String viewName, String definition, String comment, boolean isMaterialized, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createColumn(String connectionToken, int item, String columnName, String datatype, String comment, boolean not_null, String defaultval, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createTable(String connectionToken, int schema, String tableName, boolean unlogged, boolean temporary, String fill, ArrayList<String> col_list, HashMap<Integer,String> commentLog, ArrayList<String> col_index, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createUniqueConstraint(String connectionToken, int item, String constraintName, boolean isPrimaryKey, ArrayList<String> columnList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createCheckConstraint(String connectionToken, int item, String constraintName, String definition, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createForeignKeyConstraint(String connectionToken, int item, String constraintName, ArrayList<String> columnList, String referenceTable, ArrayList<String> referenceList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\t\t\n\tvoid createSequence(String connectionToken, int schema, String sequenceName, boolean temporary, int increment, int minValue, int maxValue, int start, int cache, boolean cycle, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createFunction(String connectionToken, int schema, String functionName, String returns, String language, ArrayList<String> paramList, String definition, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createType(String connectionToken, String schema, String typeName, TYPE_FORM form, String baseType, String definition, ArrayList<String> attributeList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createForeignTable(String connectionToken, String schema, String tableName, String server, ArrayList<String> columns, HashMap<Integer, String> comments, ArrayList<String> options, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid refreshMaterializedView(String connectionToken, String schema, String viewName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createRule(String connectionToken, int item, ITEM_TYPE type, String ruleName, String event, String ruleType, String definition, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createTrigger(String connectionToken, int item, ITEM_TYPE type, String triggerName, String event, String triggerType, String forEach, String function, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid revoke(String connectionToken, int item, ITEM_TYPE type, String privilege, String grantee, boolean cascade, AsyncCallback<String> callback) \n\t\t\t\t\tthrows IllegalArgumentException;\n\t\t\t\n\tvoid grant(String connectionToken, int item, ITEM_TYPE type, ArrayList<String> privileges, String grantee, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid doLogout(String connectionToken, String source, AsyncCallback<Void> asyncCallback) throws IllegalArgumentException;\n\n\tvoid invalidateSession(AsyncCallback<Void> callback);\n\n}",
"public interface PgStudioServiceAsync {\n\n\tvoid getConnectionInfoMessage(String connectionToken, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\t\n\tvoid getList(String connectionToken, DATABASE_OBJECT_TYPE type, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\n\tvoid getList(String connectionToken, int schema, ITEM_TYPE type, AsyncCallback<String> callback)\n \t\tthrows IllegalArgumentException;\n\n\tvoid getRangeDiffFunctionList(String connectionToken, String schema, String subType, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getTriggerFunctionList(String connectionToken, int schema, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid getItemObjectList(String connectionToken, long item, ITEM_TYPE type, ITEM_OBJECT_TYPE object, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getItemMetaData(String connectionToken, long item, ITEM_TYPE type, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getItemData(String connectionToken, long item, ITEM_TYPE type, int count, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getQueryMetaData(String connectionToken, String query, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid executeQuery(String connectionToken, String query, String queryType, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid dropItem(String connectionToken, long item, ITEM_TYPE type, boolean cascade, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid analyze(String connectionToken, long item, ITEM_TYPE type, boolean vacuum, boolean vacuumFull, boolean reindex, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid renameItem(String connectionToken, long item, ITEM_TYPE type, String newName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid truncate(String connectionToken, long item, ITEM_TYPE type, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createIndex(String connectionToken, long item, String indexName, INDEX_TYPE indexType, boolean isUnique, boolean isConcurrently, ArrayList<String> columnList, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid dropItemObject(String connectionToken, long item, ITEM_TYPE type, String objectName, ITEM_OBJECT_TYPE objType, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid renameItemObject(String connectionToken, long item, ITEM_TYPE type, String objectName, ITEM_OBJECT_TYPE objType, String newObjectName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid renameSchema(String connectionToken, String oldSchema, String schema, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid dropSchema(String connectionToken, String schemaName, boolean cascade, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createSchema(String connectionToken, String schemaName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getExplainResult(String connectionToken, String query, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createView(String connectionToken, String schema, String viewName, String definition, String comment, boolean isMaterialized, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createColumn(String connectionToken, long item, String columnName, String datatype, String comment, boolean not_null, String defaultval, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createTable(String connectionToken, int schema, String tableName, boolean unlogged, boolean temporary, String fill, ArrayList<String> col_list, HashMap<Integer,String> commentLog, ArrayList<String> col_index, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createTableLike(String connectionToken, int schema, String tableName, String source, boolean defaults, boolean constraints, boolean indexes, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid createUniqueConstraint(String connectionToken, long item, String constraintName, boolean isPrimaryKey, ArrayList<String> columnList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createCheckConstraint(String connectionToken, long item, String constraintName, String definition, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createForeignKeyConstraint(String connectionToken, long item, String constraintName, ArrayList<String> columnList, String referenceTable, ArrayList<String> referenceList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\t\t\n\tvoid createSequence(String connectionToken, int schema, String sequenceName, boolean temporary, String increment, String minValue, String maxValue, String start, int cache, boolean cycle, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createFunction(String connectionToken, AlterFunctionRequest funcRequest, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createType(String connectionToken, String schema, String typeName, TYPE_FORM form, String baseType, String definition, ArrayList<String> attributeList, AsyncCallback<String> callback)\n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createForeignTable(String connectionToken, String schema, String tableName, String server, ArrayList<String> columns, HashMap<Integer, String> comments, ArrayList<String> options, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid refreshMaterializedView(String connectionToken, String schema, String viewName, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid createRule(String connectionToken, long item, ITEM_TYPE type, String ruleName, String event, String ruleType, String definition, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid createTrigger(String connectionToken, long item, ITEM_TYPE type, String triggerName, String event, String triggerType, String forEach, String function, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid revoke(String connectionToken, long item, ITEM_TYPE type, String privilege, String grantee, boolean cascade, AsyncCallback<String> callback) \n\t\t\t\t\tthrows IllegalArgumentException;\n\t\t\t\n\tvoid grant(String connectionToken, long item, ITEM_TYPE type, ArrayList<String> privileges, String grantee, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\n\tvoid getActivity(String connectionToken, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\n\tvoid configureRowSecurity(String connectionToken, long item, boolean hasRowSecurity, boolean forceRowSecurity, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\n\tvoid createPolicy(String connectionToken, long item, String policyName, String cmd, String role, String using, String withCheck, AsyncCallback<String> callback)\n\t throws IllegalArgumentException;\n\t\n\tvoid doLogout(String connectionToken, String source, AsyncCallback<Void> asyncCallback) throws IllegalArgumentException;\n\n\tvoid invalidateSession(AsyncCallback<Void> callback);\n\t\n\tvoid alterFunction(String connectionToken, AlterFunctionRequest alterFunctionRequest, AsyncCallback<String> asyncCallback) throws Exception;\n\t\n\tvoid incrementValue(String connectionToken, int schema, String sequenceName, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\t\n\tvoid alterSequence(String connectionToken, int schema, String sequenceName, String increment, String minValue, String maxValue, String start, int cache, boolean cycle, AsyncCallback<String> callback) \n\t\t\tthrows IllegalArgumentException;\n\t\n\tvoid changeSequenceValue(String connectionToken, int schema, String sequenceName, String value, AsyncCallback<String> asyncCallback);\n\n\tvoid restartSequence(String connectionToken, int schema, String sequenceName, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid resetSequence(String connectionToken, int schema, String sequenceName, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid getLanguageFullList(String connectionToken, DATABASE_OBJECT_TYPE type, AsyncCallback<String> callback) throws IllegalArgumentException;\n\t\n\tvoid getFunctionFullList(String connectionToken, int schema, ITEM_TYPE type, AsyncCallback<String> callback) throws IllegalArgumentException;\n\n\tvoid fetchDictionaryTemplates(String connectionToken, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\t\n\tvoid addDictionary(String connectionToken, int schema, String dictName, String template, String option, String comment, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid createFTSConfiguration(String connectionToken, String schemaName, String configurationName, String templateName, String parserName, String comments, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid getFTSTemplatesList(String connectionToken, AsyncCallback<String> callback) throws Exception;\n\t\n\tvoid getFTSParsersList(String connectionToken, AsyncCallback<String> callback) throws Exception;\n\t\n\tvoid alterFTSConfiguration(String connectionToken, String schemaName, String configurationName, String comments, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid dropFTSConfiguration(String connectionToken, String schemaName, String configurationName, boolean cascade, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid getFTSConfigurations(String connectionToken, String schemaName, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid fetchDictionaryDetails(String connectionToke, int schema, long id, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid alterDictionary(String connectionToken, int schema, String dictName, String newDictName, String options, String comments, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid createFTSMapping(String connectionToken, String schemaName, String configurationName, String tokenType, String dictionary, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid getFTSTokensList(String connectionToken, AsyncCallback<String> callback) throws Exception;\n\n\tvoid getFTSDictionariesList(String connectionToken, AsyncCallback<String> callback) throws Exception;\n\n\tvoid alterFTSMapping(String connectionToken, String schemaName, String configurationName, String tokenType, String oldDict, String newDict, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid dropFTSMapping(String connectionToken, String schemaName, String configurationName, String token, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid getFTSConfigurationDetails(String connectionToken, String schemaName, String configName, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid importData(String connectionToken, List<String> columnList, List<ArrayList<String>> dataRows, int schema, String tableId, String tableName, AsyncCallback<String> callback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid dropItemData(String connectionToken, int schema, String tableName,AsyncCallback<String> callback) throws IllegalArgumentException, DatabaseConnectionException, PostgreSQLException;\n\n\tvoid connectToDatabase(String connectionToken, String databaseName , AsyncCallback<Void> asyncCallback) throws IllegalArgumentException;\n\n\tvoid fetchDomainDetails(String connectionToken, long item, AsyncCallback<DomainDetails> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid addCheck(String connectionToken, int schema, String domainName, String checkName, String expression, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid dropCheck(String connectionToken, int schema, String domainName, String checkName, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n\tvoid alterDomain(String connectionToken, int schema, AlterDomainRequest request, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\n void createItemData(String connectionToken, int schema, String tableName, ArrayList<String>colNames, ArrayList<String> values, AsyncCallback<String> callback) throws IllegalArgumentException, DatabaseConnectionException, PostgreSQLException;\n\t\n\tvoid alterColumn(String connectionToken, long item, AlterColumnRequest command, AsyncCallback<String> asyncCallback) throws DatabaseConnectionException, PostgreSQLException;\n\t}",
"public MyLogs() {\n }",
"private ServiceGenerator() {\n }",
"private ServiceGenerator() {\n }",
"public interface SolrService {\n\n /**\n * Save index start.\n *\n * @param userId the user id\n */\n @Transactional\n void saveIndexStart(Long userId);\n\n /**\n * Queue index.\n *\n * @param personTotaraId the person totara id\n */\n @Transactional\n void queueIndex(Long personTotaraId);\n\n /**\n * Reindex search database future.\n *\n * @return the future\n */\n @Timed\n @Async\n Future<Integer> reindexSearchDatabase();\n\n /**\n * Find last index data index data.\n *\n * @return the index data\n */\n @Transactional(readOnly = true)\n IndexData findLastIndexData();\n\n /**\n * Fin last queued data index data.\n *\n * @return the index data\n */\n IndexData finLastQueuedData();\n\n /**\n * Update index.\n *\n * @param indexData the index data\n */\n @Transactional\n void updateIndex(IndexData indexData);\n}",
"public interface SysLogService extends CurdService<SysLog> {\n\n}",
"public void operationComplete(Future<Response> future) throws Exception {\n }",
"public static void main(String[] args) throws Exception {\n Service1 service1 = new Service1();\n ExecutorService service = Executors.newFixedThreadPool(10);\n Future<String> f1 = service.submit(service1);\n\n\n }",
"public void logData(){\n }",
"static CompletableFuture<String> callAsync(Api2 ignored) {\n return CompletableFuture.supplyAsync(() -> {\n System.out.println(\"supplyAsync thread =:\" + Thread.currentThread().getName());\n throw new RuntimeException(\"oops\");\n });\n }",
"void initializeLogging();",
"@Override\r\n public void onCreate() {\r\n Log.d(TAG, \"on service create\");\r\n }",
"public EPGUpdateService() {\n // Worker thread name which is only important for debugging\n super(\"EPGUpdateService\");\n }",
"protected abstract Logger getLogger();",
"private SparkeyServiceSingleton(){}",
"@GetMapping(\"/log-test\")\n public String logTest(){\n String name = \"Spring\";\n // System.out.println(\"name = \" + name);\n\n // 로그 레벨 낮은 레벨 --> 높은 레벨\n log.trace(\"trace log={}\", name);\n log.debug(\"debug log={}\", name);\n log.info(\"info log={}\", name);\n log.warn(\"warn log={}\", name);\n log.error(\"error log={}\", name);\n return \"ok\";\n }",
"protected AbstractLogger() {\n \n }",
"public void setLogService(LogService logService) {\r\n this.logService = logService;\r\n }",
"public ReceiveAlarmService() {\n gson = new GsonBuilder().setPrettyPrinting().create();\n database = new DBConnection();\n }",
"@Test\n public void orgApacheFelixEventadminAsyncToSyncThreadRatioTest() {\n // TODO: test orgApacheFelixEventadminAsyncToSyncThreadRatio\n }",
"private RecipleazBackendService() {\n }",
"public interface PatternServiceAsync {\n\tvoid get(String pattern, AsyncCallback<Pattern> callback);\n\n\tvoid storePattern(Pattern p, String name, AsyncCallback<String> callback);\n\n\tvoid getLatestPublic(AsyncCallback<List<String>> callback);\n}",
"public LogScrap() {\n\t\tconsumer = bin->Conveyor.LOG.debug(\"{}\",bin);\n\t}",
"@Override\n\tpublic void run() {\n\n\t\treceiveClients();\n\n\t\tbeginLogging();\n\t}",
"public static void main(String[] args) {\n\t\t\r\n\t\tGson gson = new GsonBuilder().serializeNulls().create();\r\n\t\t\r\n\t\tHttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor() ;\r\n\t\tloggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\r\n\t\t\r\n\t\tOkHttpClient okhttp = new OkHttpClient.Builder()\r\n\t\t\t\t.addInterceptor(loggingInterceptor)\r\n\t\t\t\t.build();\r\n\t\t\r\n\t\tRetrofit retrofit = new Retrofit.Builder()\r\n\t\t\t\t.baseUrl(\"https://jsonplaceholder.typicode.com/\")\r\n\t\t\t\t.addConverterFactory(GsonConverterFactory.create(gson))\r\n\t\t\t\t.client(okhttp)\r\n\t\t\t\t.build();\r\n\t\t\r\n\t\tLogAPI logAPI = retrofit.create(LogAPI.class);\r\n\t\t\r\n\t\tCall<LogDataModel> call = logAPI.getLog();\r\n\t\tcall.enqueue(new Callback<LogDataModel>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onFailure(Call<LogDataModel> call, Throwable t) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onResponse(Call<LogDataModel> call, Response<LogDataModel> response) {\r\n\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\tif(response.code() !=200) {\r\n\t\t\t\t\tSystem.out.println(\"Error in Connection\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tString value= \"\";\r\n\t\t\t\tvalue+=\"ID: \" + response.body().getId();\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Data: \\n \" + value);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t});\r\n\t}",
"public interface AppServiceAsync {\r\n void addBookmark(Bookmark bookmark, AsyncCallback<Long> callback);\r\n\r\n void deleteBookmark(Long id, AsyncCallback<Void> callback);\r\n\r\n void getBookmarks(AsyncCallback<List<Bookmark>> callback);\r\n\r\n void isLogged(String location, AsyncCallback<String> callback);\r\n}",
"public Service(){\n\t\t\n\t}"
]
| [
"0.65097904",
"0.6128837",
"0.6058971",
"0.6016643",
"0.59352934",
"0.5897541",
"0.581998",
"0.57373846",
"0.570946",
"0.57089245",
"0.56967187",
"0.5691596",
"0.56089056",
"0.5547226",
"0.5515382",
"0.54974765",
"0.54954696",
"0.54575324",
"0.5443115",
"0.5408842",
"0.5406914",
"0.5383394",
"0.53725386",
"0.53564554",
"0.53550154",
"0.5335627",
"0.5328036",
"0.5326747",
"0.53128153",
"0.5311519",
"0.528263",
"0.5278088",
"0.527475",
"0.5263636",
"0.5257197",
"0.5244574",
"0.523702",
"0.52341855",
"0.52338654",
"0.52238995",
"0.52189493",
"0.5214382",
"0.51996595",
"0.5192454",
"0.51885176",
"0.518108",
"0.51600087",
"0.5158807",
"0.5158442",
"0.51565474",
"0.51482135",
"0.5146984",
"0.51372576",
"0.5127638",
"0.5118188",
"0.51168436",
"0.5111133",
"0.510342",
"0.51025134",
"0.50967574",
"0.5095282",
"0.5095137",
"0.5094181",
"0.5079671",
"0.50685924",
"0.50669175",
"0.50608087",
"0.5053765",
"0.5052136",
"0.5049518",
"0.50460905",
"0.504488",
"0.50424755",
"0.5035374",
"0.5034904",
"0.5032701",
"0.5032701",
"0.5024983",
"0.5024418",
"0.50218225",
"0.5020728",
"0.5019257",
"0.4998374",
"0.4995995",
"0.498621",
"0.49838147",
"0.49832296",
"0.4981426",
"0.49797958",
"0.4976839",
"0.49710456",
"0.49704674",
"0.49624774",
"0.49581042",
"0.49560678",
"0.4951719",
"0.4947988",
"0.4947689",
"0.49436644",
"0.49412474"
]
| 0.62183374 | 1 |
TODO Autogenerated method stub | public static void main(String[] args) {
HashMap<Integer,String> map = new HashMap<Integer,String>();
map.put(5,"Five");
map.put(6,"Six");
map.put(7,"Seven");
map.put(8,"Eight");
map.put(9,"Nine");
map.put(1,"One");
map.put(6,"ten");
String text= map.get(6);
System.out.println(text);
for(Map.Entry<Integer, String> entry:map.entrySet()) {
int key = entry.getKey();
String value = entry.getValue();
System.out.println(key + ":"+value);
}
} | {
"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 |
Returns the module (file) of the innermost enclosing Starlark function on the call stack, or null if none of the active calls are functions defined in Starlark. The name of this function is intentionally horrible to make you feel bad for using it. | @Nullable
public static Module ofInnermostEnclosingStarlarkFunction(StarlarkThread thread) {
for (Debug.Frame fr : thread.getDebugCallStack().reverse()) {
if (fr.getFunction() instanceof StarlarkFunction) {
return ((StarlarkFunction) fr.getFunction()).getModule();
}
}
return null;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Closure findEnclosingFunction(){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.isFunction){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n return null;\n }",
"String getCaller();",
"private String getFunctionName() {\n StackTraceElement[] sts = Thread.currentThread().getStackTrace();\n if (sts == null) {\n return null;\n }\n for (StackTraceElement st : sts) {\n if (st.isNativeMethod()) {\n continue;\n }\n if (st.getClassName().equals(Thread.class.getName())) {\n continue;\n }\n if (st.getClassName().equals(LogUtils.this.getClass().getName())) {\n continue;\n }\n return \"[ \" + Thread.currentThread().getName() + \": \"\n + st.getFileName() + \":\" + st.getLineNumber() + \" \"\n + st.getMethodName() + \" ]\";\n }\n return null;\n }",
"@Nullable\n public static Class findCallerClass(int framesToSkip) {\n try {\n Class[] stack = MySecurityManager.INSTANCE.getStack();\n int indexFromTop = 1 + framesToSkip;\n return stack.length > indexFromTop ? stack[indexFromTop] : null;\n }\n catch (Exception e) {\n// LOG.warn(e);\n return null;\n }\n }",
"private String getCallerInfo() {\n Optional<StackWalker.StackFrame> frame = new CallerFinder().get();\n if (frame.isPresent()) {\n return frame.get().getClassName() + \" \" + frame.get().getMethodName();\n } else {\n return name;\n }\n }",
"private static String getCallingMethodInfo()\r\n\t{\r\n\t\tThrowable fakeException = new Throwable();\r\n\t\tStackTraceElement[] stackTrace = fakeException.getStackTrace();\r\n\r\n\t\tif (stackTrace != null && stackTrace.length >= 2)\r\n\t\t{\r\n\t\t\tStackTraceElement s = stackTrace[2];\r\n\t\t\tif (s != null)\r\n\t\t\t{\r\n\t\t\t\treturn s.getFileName() + \"(\" + s.getMethodName() + \":\" + s.getLineNumber() + \"):\";\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn null;\r\n\t}",
"protected FunctionDefinition getEnclosingFunction() {\n return enclosingFunction;\n }",
"public static String currentStack()\n {\n StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();\n StringBuilder sb = new StringBuilder(500);\n for (StackTraceElement ste : stackTrace)\n {\n sb.append(\" \").append(ste.getClassName()).append(\"#\").append(ste.getMethodName()).append(\":\").append(ste.getLineNumber()).append('\\n');\n }\n return sb.toString();\n }",
"private static StackTraceElement getCaller(int levels) {\n StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();\n return stackTrace[levels + 1];\n }",
"public ProgramModule getRootModule(String treeName);",
"public final Symbol top() {\n\t\ttry {\n\t\t\treturn opstack.top().getSymbol();\n\t\t} catch (BadTypeException | EmptyStackException e) {\n\t\t\tSystem.out.println(\"An exception has occurred, \"\n\t\t\t\t\t+ \"Maybe the stack has gone empty\");\n\t\t\treturn null;\n\t\t}\n\t}",
"public static String getCurrentMethodName() {\n\t\tStackTraceElement stackTraceElements[] = (new Throwable()).getStackTrace();\n\t\tString fullString = stackTraceElements[1].toString();\n\t\tint stringEnd = fullString.indexOf('(');\n\t\tString fullName = fullString.substring(0, stringEnd);\n\t\tint start = fullName.lastIndexOf('.') + 1;\n\t\tString methodName = fullName.substring(start);\n\n\t\treturn methodName;\n\t}",
"public static String getStackTrace() {\n Exception e = new Exception();\n return getStackTrace(e);\n }",
"private Stack<Class<?>> getCurrentStack() {\n if (getCallerClass != null) {\n final Stack<Class<?>> classes = new Stack<Class<?>>();\n int index = 2;\n Class<?> clazz = getCallerClass(index);\n while (clazz != null) {\n classes.push(clazz);\n clazz = getCallerClass(++index);\n }\n return classes;\n } else if (securityManager != null) {\n final Class<?>[] array = securityManager.getClasses();\n final Stack<Class<?>> classes = new Stack<Class<?>>();\n for (final Class<?> clazz : array) {\n classes.push(clazz);\n }\n return classes;\n }\n return new Stack<Class<?>>();\n }",
"public static String getCurrentMethodName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getMethodName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=getStackTrace s1=getCurrentMethodName s2=run\n\t\treturn s2;\n\t}",
"static String extractScope(final String stackFrame) {\n int startIndex = getStartIndex(stackFrame);\n final int dotIndex = Math.max(startIndex, stackFrame.indexOf('.', startIndex + 1));\n int lparIndex = stackFrame.indexOf('(', dotIndex);\n final String clsMethodText = stackFrame.substring(dotIndex + 1, lparIndex != -1 ? lparIndex : stackFrame.length());\n int methodStart = clsMethodText.indexOf('/');\n\n return methodStart == -1 ? clsMethodText : clsMethodText.substring(methodStart + 1) + \": \" + clsMethodText.substring(0, methodStart);\n }",
"@PerformanceSensitive\n public static Class<?> getCallerClass(final int depth) {\n return stackLocator.getCallerClass(depth + 1);\n }",
"public ProgramModule getRootModule(long treeID);",
"private static FrameInfo getLoggingFrame() {\n StackTraceElement[] stackTrace = Thread.currentThread().getStackTrace();\n StackTraceElement loggingFrame = null;\n /*\n * We need to dig through all the frames until we get to a frame that contains this class, then dig through all\n * frames for this class, to finally come to a point where we have the frame for the calling method.\n */\n // Skip stackTrace[0], which is getStackTrace() on Win32 JDK 1.6.\n for (int ix = 1; ix < stackTrace.length; ix++) {\n loggingFrame = stackTrace[ix];\n if (loggingFrame.getClassName().contains(CLASS_NAME)) {\n for (int iy = ix; iy < stackTrace.length; iy++) {\n loggingFrame = stackTrace[iy];\n if (!loggingFrame.getClassName().contains(CLASS_NAME)) {\n break;\n }\n }\n break;\n }\n }\n return new FrameInfo(loggingFrame.getClassName(), loggingFrame.getMethodName());\n }",
"private static String getTraceMethod(StackTraceElement[] stackTraceElements, int depth) {\n if ((null != stackTraceElements) && (stackTraceElements.length >= depth)) {\n StackTraceElement stackTraceElement = stackTraceElements[depth];\n if (null != stackTraceElement) {\n return stackTraceElement.getMethodName();\n }\n }\n return null;\n }",
"public static String getFullMethodPath () \t{\n\t\t\n\t\treturn Thread.currentThread().getStackTrace()[2].toString();\n\t}",
"@Test\n public void shouldReturnNullForAllSystemStack() {\n assertNull(\n CallerBasedSecurityManager.getLastCaller(\n Object.class,\n Object.class,\n Object.class\n ), \"No caller expected for all-system stack\"\n );\n }",
"public String getTopPackage() {\n return mActivityManager.getRunningTasks(1).get(0).topActivity.getPackageName();\n }",
"@SuppressWarnings(\"unchecked\")\n public static <T> Class<T> getCallerClass(int depth) {\n try {\n return (Class<T>) Class.forName(Thread.currentThread().getStackTrace()[depth + 2].getClassName());\n } catch (ClassNotFoundException e) {\n throw new RuntimeException(\"Something went wrong when finding calling class.\", e);\n }\n }",
"private static String getCallingMethod(int depth) {\n return getTraceMethod(Thread.currentThread().getStackTrace(), DEPTH_ADD + depth);\n }",
"public Class getCallerClass(Class myClass) {\n Class[] classContext = getClassContext();\n for (int i = 1; i < classContext.length; i++) {\n Class ste = classContext[i];\n if (ste != myClass && ste != CallerResolver.class) {\n return ste;\n }\n }\n return FhLogger.class;\n }",
"public static String getCurrentMethodName() {\n Exception e = new Exception();\n StackTraceElement trace = e.fillInStackTrace().getStackTrace()[1];\n String name = trace.getMethodName();\n String className = trace.getClassName();\n int line = trace.getLineNumber();\n return \"[CLASS:\" + className + \" - METHOD:\" + name + \" LINE:\" + line + \"]\";\n }",
"public ILocation top()\n {\n EmptyStackException ex = new EmptyStackException();\n if (top <= 0)\n {\n throw ex;\n }\n else\n {\n return stack.get(top - 1);\n }\n }",
"public static String getCurrentClassName(){\n\t\tString s2 = Thread.currentThread().getStackTrace()[2].getClassName();\n// System.out.println(\"s0=\"+s0+\" s1=\"+s1+\" s2=\"+s2);\n\t\t//s0=java.lang.Thread s1=g1.tool.Tool s2=g1.TRocketmq1Application\n\t\treturn s2;\n\t}",
"public File getCodeRoot( File dirPackage )\n\t{\n\t\tif( (dirPackage == null) || (!dirPackage.exists()) || (!dirPackage.isDirectory()) ) return null;\n\n\t\tString strPathFragment = this.packagename.replace( '.', File.separatorChar );\n\t\t//System.out.println( \"\\t strPathFragment \" + strPathFragment );\n\n\t\tif( dirPackage.getPath().endsWith( strPathFragment ) )\n\t\t{\n\t\t\tString[] strSplit = this.packagename.split( \"\\\\.\" );\n\t\t\tFile current = dirPackage;\n\t\t\tfor( int i=0; (i<strSplit.length) && (current != null); i++ ) current = current.getParentFile();\n\t\t\t//System.out.println( \"\\t returning \" + current.getPath() );\n\t\t\treturn current;\n\t\t}\n\t\telse return null;\n\t}",
"public Callgraph getCallgraph() {\n if (!isLoaded()) {\n throw new IllegalStateException(\"Error: The module is not loaded\");\n }\n\n return m_callgraph;\n }",
"int getLevelOfFunction();",
"private TypeBodyImpl getApparentType() {\n TypeBodyImpl enclosingType = getEnclosingTypeBody();\n while (enclosingType != null) {\n TypeBodyImpl superType = enclosingType;\n while (superType != null) {\n if (superType == method.getEnclosingTypeBody()) {\n // We've found the method on a superclass\n return enclosingType;\n }\n superType = superType.getSupertype() == null ? null : superType.getSupertype().getTypeBody();\n }\n // Not found on this type, so try the enclosing type\n enclosingType = enclosingType.getEnclosingTypeBody();\n }\n return null;\n }",
"public String getExtendedStackTrace() {\n return getExtendedStackTrace(null);\n }",
"public String getCurrentMethodName () {\n String currentMethod = getCurrentElement(ElementKind.METHOD);\n if (currentMethod == null) return \"\";\n else return currentMethod;\n }",
"@gw.internal.gosu.parser.ExtendedProperty\n public typekey.CalcRoutineParamName getRoot();",
"@VisibleForTesting\n public TaskStack getTopStack() {\n return this.mTaskStackContainers.getTopStack();\n }",
"public String getTopFragmentName() {\n\t\tBackStackEntry backStackEntry = this.getSupportFragmentManager()\n\t\t\t\t.getBackStackEntryAt(getBackStackCount() - 1);\n\t\tif (backStackEntry != null) {\n\t\t\treturn backStackEntry.getName();\n\t\t}\n\t\treturn null;\n\t}",
"public String getStack();",
"private FunctionProfile getParent(Thread thread, Function function) {\n if (!function.isCallPathFunction()) {\n return null;\n }\n\n Function parentFunction = parentMap.get(function);\n if (parentFunction == null) {\n String functionName = function.getName();\n String parentName = functionName.substring(0, functionName.lastIndexOf(\"=>\"));\n parentFunction = cubeDataSource.getFunction(parentName);\n parentMap.put(function, parentFunction);\n }\n FunctionProfile parent = thread.getFunctionProfile(parentFunction);\n return parent;\n }",
"public PackageDefinition getEnclosingPackage() {\n\t\tNameScope currentScope = scope;\n\t\twhile (currentScope.getScopeKind() != NameScopeKind.NSK_PACKAGE) currentScope = currentScope.getEnclosingScope();\n\t\treturn (PackageDefinition)currentScope;\n\t}",
"public String getEnclosingMethodOfOuterClass(){\n\t\treturn targetClass.outerMethod;\n\t}",
"URI location() {\n if (module.isNamed() && module.getLayer() != null) {\n Configuration cf = module.getLayer().configuration();\n ModuleReference mref\n = cf.findModule(module.getName()).get().reference();\n return mref.location().orElse(null);\n }\n return null;\n }",
"static public Call getCall(String module)\n {\n Pattern pattern = Pattern.compile(\"call\\\\{.*?\\\\}\");\n Matcher matcher = pattern.matcher(module);\n if(matcher.find())\n {\n return new Call(matcher.group(0));\n }\n else\n {\n return null;\n }\n }",
"@VisibleForTesting\n public TaskStack getTopStack() {\n if (DisplayContent.this.mTaskStackContainers.getChildCount() > 0) {\n return (TaskStack) DisplayContent.this.mTaskStackContainers.getChildAt(DisplayContent.this.mTaskStackContainers.getChildCount() - 1);\n }\n return null;\n }",
"public CallStackFrame[] getCallStack () {\n return getThread ().getCallStack ();\n }",
"public ElementHeader getCaller()\n {\n return caller;\n }",
"String getInizializedFunctionName();",
"public Directory popFromStack() {\n try {\n return directoryStack.pop();\n } catch (Exception e) {\n return null;\n }\n }",
"public StackTraceElement[] getCallerData() {\n return null;\n }",
"Optional<StackWalker.StackFrame> get() {\n return WALKER.walk((s) -> s.filter(this).findFirst());\n }",
"public String getStackTraceString() {\r\n\t\t// if there's no nested exception, there's no stackTrace\r\n\t\tif (nestedException_ == null)\r\n\t\t\treturn null;\r\n\r\n\t\tStringBuffer traceBuffer = new StringBuffer();\r\n\r\n\t\tif (nestedException_ instanceof WebAppException) {\r\n\r\n\t\t\ttraceBuffer.append(((WebAppException) nestedException_)\r\n\t\t\t\t\t.getStackTraceString());\r\n\t\t\ttraceBuffer.append(\"-------- nested by:\\n\");\r\n\t\t}\r\n\r\n\t\ttraceBuffer.append(stackTraceString_);\r\n\t\treturn traceBuffer.toString();\r\n\t}",
"synchronized Module getCurrentModule()\n {\n return m_modules.get(m_modules.size() - 1);\n }",
"public String getCheckpointName() {\n\t\tfor(FreeVar current : specification.getBindings())\n\t\t{\n\t\t\tif(current.isBound())\n\t\t\t{\n\t\t\t\treturn getTopLevelType(current.binding());\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"public int getCallStack() {\n\t\treturn this.callStack;\n\t}",
"public String getParentCall() {\n return parentCall;\n }",
"String getCalled();",
"public short getCalledFrom() {\r\n return calledFrom;\r\n }",
"public String getFunctionName() {\n\t\treturn null;\n\t}",
"public String getCurrentMethodSignature () {\n final Element[] elementPtr = new Element[] { null };\n try {\n getCurrentElement(ElementKind.METHOD, elementPtr);\n } catch (final java.awt.IllegalComponentStateException icse) {\n throw new java.awt.IllegalComponentStateException() {\n @Override\n public String getMessage() {\n icse.getMessage();\n return createSignature((ExecutableElement) elementPtr[0]);\n }\n };\n }\n if (elementPtr[0] != null) {\n return createSignature((ExecutableElement) elementPtr[0]);\n } else {\n return null;\n }\n }",
"Scope getEnclosingScope();",
"private static String[] traceAll(StackTraceElement[] stackTraceElements, int depth) {\n if (null == stackTraceElements) {\n return null;\n }\n if ((null != stackTraceElements) && (stackTraceElements.length >= depth)) {\n StackTraceElement source = stackTraceElements[depth];\n StackTraceElement caller = (stackTraceElements.length > (depth + 1))\n ? stackTraceElements[depth + 1]\n : ((stackTraceElements.length > depth) ? stackTraceElements[depth] : stackTraceElements[stackTraceElements.length - 1]);\n if (null != source) {\n if (null != caller) {\n String[] out = new String[8];\n out[0] = source.getFileName();\n out[1] = source.getMethodName();\n out[2] = Integer.toString(source.getLineNumber());\n out[3] = source.getClassName().substring(source.getClassName().lastIndexOf('.') + 1);\n out[4] = caller.getFileName();\n out[5] = caller.getMethodName();\n out[6] = Integer.toString(caller.getLineNumber());\n out[7] = caller.getClassName().substring(caller.getClassName().lastIndexOf('.') + 1);\n return out;\n }\n }\n }\n return null;\n }",
"public static String methodCaller(int callsBack) {\n if (callsBack < 0) {\n throw new IllegalArgumentException(\"only positive values are allowed\");\n }\n\n int modifycall = callsBack + 2;\n\n try {\n StackTraceElement[] stack = Thread.currentThread().getStackTrace();\n return stack[modifycall].getClassName() + \".\" + stack[modifycall].getMethodName();\n } catch (Exception e) {\n log.error(\"failed to call stacktrace\", e);\n }\n\n return UNKNOWN;\n }",
"public TaskStack getTopStackInWindowingMode(int windowingMode) {\n return getStack(windowingMode, 0);\n }",
"public E top()\n\tthrows EmptyStackException;",
"public static String currentMethodName() {\n String fm = CURRENT_TEST.get();\n if (fm != null) {\n return fm;\n } else {\n return \"<no current test>\";\n }\n }",
"public FrameworkMethod getParent() {\n return new FrameworkMethod(getMethod());\n }",
"public Expression getFunction()\n\t{\n\t\treturn function;\n\t}",
"@NonNull\n public String getStackTrace() {\n return requireNonNull(mStackTrace);\n }",
"@PerformanceSensitive\n public static Class<?> getCallerClass(final Class<?> anchor) {\n return stackLocator.getCallerClass(anchor);\n }",
"public String getForwardNode() {\r\n\t\ttry {\r\n\t\t\treturn path.getNextNode(procNode);\r\n\t\t} catch (Exception e) {return null; /* In case of an error!*/}\t\t\r\n\t}",
"private FunctInfo findFunction(String name) {\n FunctInfo li = (FunctInfo)localScope.getLambda(name);\n if (li != null) {\n return li;\n }\n return functionDefinitions.get(name);\n }",
"public Function getFunction()\n\t{\n\t\treturn function;\n\t}",
"public interface StackFrame {\n\t/**\n\t * Indicator for a Stack that grows negatively.\n\t */\n\tpublic final static int GROWS_NEGATIVE = -1;\n\t/**\n\t * Indicator for a Stack that grows positively.\n\t */\n\tpublic final static int GROWS_POSITIVE = 1;\n\t/**\n\t * Indicator for a unknown stack parameter offset\n\t */\n\tpublic static final int UNKNOWN_PARAM_OFFSET = (128 * 1024);\n\n\t/**\n\t * Get the function that this stack belongs to.\n\t * This could return null if the stack frame isn't part of a function.\n\t *\n\t * @return the function\n\t */\n\tpublic Function getFunction();\n\n\t/**\n\t * Get the size of this stack frame in bytes.\n\t *\n\t * @return stack frame size\n\t */\n\tpublic int getFrameSize();\n\n\t/**\n\t * Get the local portion of the stack frame in bytes.\n\t *\n\t * @return local frame size\n\t */\n\tpublic int getLocalSize();\n\n\t/**\n\t * Get the parameter portion of the stack frame in bytes.\n\t *\n\t * @return parameter frame size\n\t */\n\tpublic int getParameterSize();\n\n\t/**\n\t * Get the offset to the start of the parameters.\n\t *\n\t * @return offset\n\t */\n\tpublic int getParameterOffset();\n\n//\t/**\n//\t * Set the offset on the stack of the parameters.\n//\t *\n//\t * @param offset the start offset of parameters on the stack\n//\t */\n//\tpublic void setParameterOffset(int offset) throws InvalidInputException;\n\n\t/**\n\t * Returns true if specified offset could correspond to a parameter\n\t * @param offset\n\t */\n\tpublic boolean isParameterOffset(int offset);\n\n\t/**\n\t * Set the size of the local stack in bytes.\n\t *\n\t * @param size size of local stack\n\t */\n\tpublic void setLocalSize(int size);\n\n\t/**\n\t * Set the return address stack offset.\n\t * @param offset offset of return address.\n\t */\n\tpublic void setReturnAddressOffset(int offset);\n\n\t/**\n\t * Get the return address stack offset.\n\t *\n\t * @return return address offset.\n\t */\n\tpublic int getReturnAddressOffset();\n\n\t/**\n\t * Get the stack variable containing offset. This may fall in\n\t * the middle of a defined variable.\n\t *\n\t * @param offset offset of on stack to get variable.\n\t */\n\tpublic Variable getVariableContaining(int offset);\n\n\t/**\n\t * Create a stack variable. It could be a parameter or a local depending\n\t * on the direction of the stack.\n\t * <p><B>WARNING!</B> Use of this method to add parameters may force the function\n\t * to use custom variable storage. In addition, parameters may be appended even if the\n\t * current calling convention does not support them.\n\t * @throws DuplicateNameException if another variable(parameter or local) already\n\t * exists in the function with that name.\n\t * @throws InvalidInputException if data type is not a fixed length or variable name is invalid.\n\t * @throws VariableSizeException if data type size is too large based upon storage constraints.\n\t */\n\tpublic Variable createVariable(String name, int offset, DataType dataType, SourceType source)\n\t\t\tthrows DuplicateNameException, InvalidInputException;\n\n\t/**\n\t * Clear the stack variable defined at offset\n\t *\n\t * @param offset Offset onto the stack to be cleared.\n\t */\n\tpublic void clearVariable(int offset);\n\n\t/**\n\t * Get all defined stack variables.\n\t * Variables are returned from least offset (-) to greatest offset (+)\n\t *\n\t * @return an array of parameters.\n\t */\n\tpublic Variable[] getStackVariables();\n\n\t/**\n\t * Get all defined parameters as stack variables.\n\t *\n\t * @return an array of parameters.\n\t */\n\tpublic Variable[] getParameters();\n\n\t/**\n\t * Get all defined local variables.\n\t *\n\t * @return an array of all local variables\n\t */\n\tpublic Variable[] getLocals();\n\n\t/**\n\t * A stack that grows negative has local references negative and\n\t * parameter references positive. A positive growing stack has\n\t * positive locals and negative parameters.\n\t *\n\t * @return true if the stack grows in a negative direction.\n\t */\n\tpublic boolean growsNegative();\n}",
"public String getModuleName ()\n\n {\n\n // Returns moduleName when called.\n return moduleName;\n\n }",
"public String getCallingName() throws FrameException {\n try {\n byte data[] = (byte[])infoElements.get(new Integer(InfoElement.CALLING_NAME));\n return new String(data);\n } catch (Exception e) {\n throw new FrameException(e);\n }\n }",
"public String getBackwardNode() {\r\n\t\ttry {\r\n\t\t\treturn path.getPreviousNode(procNode);\r\n\t\t} catch (Exception e) {return null; /* In case of an error!*/}\r\n\t}",
"public FunctionInfo getFunction(String name) {\n/* 251 */ if (this.functions == null || this.functions.length == 0) {\n/* 252 */ System.err.println(\"No functions\");\n/* 253 */ return null;\n/* */ } \n/* */ \n/* 256 */ for (int i = 0; i < this.functions.length; i++) {\n/* 257 */ if (this.functions[i].getName().equals(name)) {\n/* 258 */ return this.functions[i];\n/* */ }\n/* */ } \n/* 261 */ return null;\n/* */ }",
"public TypeJavaSymbol outermostClass() {\n JavaSymbol symbol = this;\n JavaSymbol result = null;\n while (symbol.kind != PCK) {\n result = symbol;\n symbol = symbol.owner();\n }\n return (TypeJavaSymbol) result;\n }",
"public File getSourceFile() {\n if (getSources().size() > 0) {\n return ((FilePath) this.getSources().iterator().next()).getFile();\n } else {\n return null;\n }\n }",
"private static String getClassName() {\n\n\t\tThrowable t = new Throwable();\n\n\t\ttry {\n\t\t\tStackTraceElement[] elements = t.getStackTrace();\n\n\t\t\t// for (int i = 0; i < elements.length; i++) {\n\t\t\t//\n\t\t\t// }\n\n\t\t\treturn elements[2].getClass().getSimpleName();\n\n\t\t} finally {\n\t\t\tt = null;\n\t\t}\n\n\t}",
"protected String getCurrentTestedModuleFile() {\n\t\treturn null;\n\t}",
"public Scope getOuterMostEnclosingScope() {\n\t\tScope s = this;\n\t\twhile (s.getEnclosingScope() != null) {\n\t\t\ts = s.getEnclosingScope();\n\t\t}\n\t\treturn s;\n\t}",
"public TaskStack getSplitScreenPrimaryStack() {\n TaskStack stack = this.mTaskStackContainers.getSplitScreenPrimaryStack();\n if (stack == null || !stack.isVisible()) {\n return null;\n }\n return stack;\n }",
"TopLevelDecl getTopLevelDecl();",
"public GenericStack peek(){\n // checks if stack is empty\n if(top == null){\n System.out.println(\"Stack is empty.\");\n return null;\n //System.exit(0);\n }\n return top;\n }",
"protected CommandStack getCommandStack() {\n\t\tIEditorPart activeJRXMLEditor = SelectionHelper.getActiveJRXMLEditor();\n\t\tif (activeJRXMLEditor != null && activeJRXMLEditor instanceof JrxmlEditor) {\n\t\t\tJrxmlEditor editor = (JrxmlEditor)activeJRXMLEditor;\n\t\t\treturn (CommandStack)editor.getAdapter(CommandStack.class);\n\t\t}\n\t\treturn null;\n\t}",
"public Stack<Position> getReturnPath() {\n\t\treturn returnPath;\n\t}",
"@Nullable\n default String getContext() {\n String contextName =\n String.valueOf(execute(DriverCommand.GET_CURRENT_CONTEXT_HANDLE).getValue());\n return \"null\".equalsIgnoreCase(contextName) ? null : contextName;\n }",
"public String getCalledNumber() throws FrameException {\n try {\n byte data[] = (byte[])infoElements.get(new Integer(InfoElement.CALLED_NUMBER));\n return new String(data);\n } catch (Exception e) {\n throw new FrameException(e);\n }\n }",
"public StackOwnerAppender getStackOwnerAppender() {\n\t\t\treturn this.SOAppender;\n\t\t}",
"private OperandStack stack(){\n\t\treturn frame.getStack();\n\t}",
"private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }",
"private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }",
"private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }",
"private com.tangosol.coherence.Component get_Module()\n {\n return this.get_Parent().get_Parent();\n }",
"public static int getLineNumber() {\n return Thread.currentThread().getStackTrace()[2].getLineNumber();\n }",
"private String getClass( String format )\n {\n final Class clazz = StackIntrospector.getCallerClass( Logger.class );\n\n if( null == clazz )\n {\n return \"Unknown-class\";\n }\n else\n {\n // Found : the caller is the previous stack element\n String className = clazz.getName();\n\n // Handle optional format\n if( TYPE_CLASS_SHORT_STR.equalsIgnoreCase( format ) )\n {\n int pos = className.lastIndexOf( '.' );\n\n if( pos >= 0 )\n {\n className = className.substring( pos + 1 );\n }\n }\n\n return className;\n }\n }",
"protected String retrieveRbFile() {\r\n\t\tString className = this.getClass().getName();\r\n\t\tString packageName = this.getClass().getPackage().getName() + \".\";\r\n\t\treturn className.replaceFirst(packageName, \"\");\r\n\t}",
"public String getFullyQualifiedOuterClassName() {\n String outerClassNameWithInner = remove(getFullyQualifiedClassName(), getPackageName() + \".\");\n // get the outer class part only : Outer\n String outerClassNameOnly = substringBefore(outerClassNameWithInner, \".\");\n return getPackageName() + \".\" + outerClassNameOnly;\n }"
]
| [
"0.6600958",
"0.6336702",
"0.61776483",
"0.6049898",
"0.6046633",
"0.5988324",
"0.59564286",
"0.56154215",
"0.5582296",
"0.5577949",
"0.55256844",
"0.5498098",
"0.5440475",
"0.54060024",
"0.5383486",
"0.53468513",
"0.534457",
"0.53421056",
"0.5286504",
"0.524412",
"0.5222555",
"0.5195922",
"0.51930773",
"0.51884604",
"0.5183367",
"0.5163565",
"0.5099223",
"0.5089318",
"0.50670993",
"0.50639457",
"0.506197",
"0.5054499",
"0.5049273",
"0.50481814",
"0.5047829",
"0.50412065",
"0.5031766",
"0.50316644",
"0.49963954",
"0.4980057",
"0.49733782",
"0.49691388",
"0.495392",
"0.49436933",
"0.4942759",
"0.49050286",
"0.4884627",
"0.48616484",
"0.48586434",
"0.4840292",
"0.48138082",
"0.48124456",
"0.4808723",
"0.47997862",
"0.47876996",
"0.47688904",
"0.47569668",
"0.47349682",
"0.47159892",
"0.47118914",
"0.4708651",
"0.46877587",
"0.46804404",
"0.46681693",
"0.46562326",
"0.46460867",
"0.46332327",
"0.461448",
"0.4614117",
"0.46062836",
"0.46031588",
"0.4601101",
"0.45983362",
"0.45931754",
"0.45922196",
"0.4584048",
"0.45801502",
"0.45751908",
"0.4573664",
"0.4573174",
"0.45728144",
"0.45694607",
"0.4559227",
"0.4558135",
"0.45525563",
"0.45453382",
"0.45433843",
"0.45360363",
"0.45300123",
"0.4529038",
"0.4513335",
"0.45064935",
"0.45007104",
"0.45007104",
"0.45007104",
"0.45007104",
"0.45004943",
"0.44877625",
"0.44866627",
"0.44839522"
]
| 0.7482099 | 0 |
Returns a map in which each semanticsenabled FlagGuardedValue has been replaced by the value it guards. Disabled FlagGuardedValues are left in place, and should be treated as unavailable. The iteration order is unchanged. | private static ImmutableMap<String, Object> filter(
Map<String, Object> predeclared, StarlarkSemantics semantics) {
ImmutableMap.Builder<String, Object> filtered = ImmutableMap.builder();
for (Map.Entry<String, Object> bind : predeclared.entrySet()) {
Object v = bind.getValue();
if (v instanceof FlagGuardedValue) {
FlagGuardedValue fv = (FlagGuardedValue) bind.getValue();
if (fv.isObjectAccessibleUsingSemantics(semantics)) {
v = fv.getObject();
}
}
filtered.put(bind.getKey(), v);
}
return filtered.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Map<String, Boolean> getIsAssignmentOptionValidMap() {\n if (assignmentOptionValidMap == null) {\n assignmentOptionValidMap = new HashMap<String, Boolean>() {\n @Override\n public Boolean get(Object key) {\n return !(key == null || \"\".equals(key.toString().trim()) || countKeyOccurence(assignmentOptions, (String) key) > 1\n || isRedundant((String) key));\n }\n };\n }\n return assignmentOptionValidMap;\n }",
"@Override\n public Set<String> getNames() {\n // TODO(adonovan): for now, the resolver treats all predeclared/universe\n // and global names as one bucket (Scope.PREDECLARED). Fix that.\n // TODO(adonovan): opt: change the resolver to request names on\n // demand to avoid all this set copying.\n HashSet<String> names = new HashSet<>();\n for (Map.Entry<String, Object> bind : getTransitiveBindings().entrySet()) {\n if (bind.getValue() instanceof FlagGuardedValue) {\n continue; // disabled\n }\n names.add(bind.getKey());\n }\n return names;\n }",
"public final Map<String, String> m11969a() {\n Map<String, String> c = zzsl.m11979a(\"gms:phenotype:phenotype_flag:debug_disable_caching\", false) ? m11967c() : this.f10172f;\n if (c == null) {\n synchronized (this.f10171e) {\n c = this.f10172f;\n if (c == null) {\n c = m11967c();\n this.f10172f = c;\n }\n }\n }\n if (c != null) {\n return c;\n }\n return Collections.emptyMap();\n }",
"public static void registerFlag() {\n if (!enabled())\n return;\n\n WorldGuardFlagHook.registerFlag();\n }",
"public static int collectDefaults()\n/* */ {\n/* 131 */ int flags = 0;\n/* 132 */ for (Feature f : values()) {\n/* 133 */ if (f.enabledByDefault()) flags |= f.getMask();\n/* */ }\n/* 135 */ return flags;\n/* */ }",
"public void setPossibleLeaders(Map<Integer, Boolean> leadersAvailable) {\n\n\n lastPlayerState = playerState;\n playerState = PlayerState.LEADER;\n\n for (Map.Entry<Integer, Boolean> entry : leadersAvailable.entrySet()) {\n\n if(entry.getValue()){\n leaderCardsActivate.get(entry.getKey()).setDisable(false);\n }\n\n leaderCardsBurn.get(entry.getKey()).setDisable(false);\n }\n\n }",
"private static Map<String, FeatureGroupType> buildAvailableFeatureGroupMap(List<FeatureGroupType> featureGroups){\r\n\t\tMap<String, FeatureGroupType> featureMap = new HashMap<String, FeatureGroupType>();\r\n\t\tfor(FeatureGroupType feature : featureGroups){\r\n\t\t\tfeatureMap.put(feature.getExternalId(), feature);\r\n\t\t}\r\n\t\treturn featureMap;\r\n\t}",
"@Override\n\tpublic Map<IAlgo, Integer> recommandAlgosContained() {\n\t\treturn Collections.EMPTY_MAP;\n\t}",
"public Map<String, Object> state() {\n return Collections.unmodifiableMap(values);\n }",
"abstract protected boolean hasCompatValueFlags();",
"public Map<AdornedAtom, List<AdornedTgd>> adornedMap() {\n Map<AdornedAtom, List<AdornedTgd>> map = new HashMap<>();\n for(AdornedAtom p: adornedPredicates) {\n ArrayList<AdornedTgd> tgd = new ArrayList<>();\n for(AdornedTgd t : adornedRules) {\n if(t.getHead().equals(p)) {\n tgd.add(t);\n }\n }\n map.put(p, tgd);\n }\n\n return map;\n }",
"Map<String, Defines> getDefinesMap();",
"public Set<E> getActiveFlags();",
"public abstract Collection<Node> getGuardedSuccessors(Expression guard);",
"public /* synthetic */ Boolean lambda$isFaceDisabled$0$KeyguardUpdateMonitor(DevicePolicyManager devicePolicyManager, int i) {\n return Boolean.valueOf(!(devicePolicyManager == null || (devicePolicyManager.getKeyguardDisabledFeatures(null, i) & 128) == 0) || isSimPinSecure());\n }",
"public Iterable<Map.Entry<String,Double>> getConstants() {\r\n return Collections.unmodifiableMap(constants).entrySet();\r\n }",
"public List<Integer> GetPossibleValues()\n {\n return this._valuesToPut;\n }",
"public Map<String, Boolean> getIsAssignmentOptionOverridableMap() {\n if (assignmentOptionOverridableMap == null) {\n assignmentOptionOverridableMap = new HashMap<String, Boolean>() {\n @Override\n public Boolean get(Object key) {\n return mayOverrideOption((String) key, isDerivedAssignment);\n }\n };\n }\n return assignmentOptionOverridableMap;\n }",
"public Map<String, Collection<V>> asUnmodifiableMap() {\n return Collections.unmodifiableMap(map);\n }",
"public Map<K,V> getMap() {\n Map<K,V> results = new HashMap<K,V>(valueMap.size());\n\n synchronized(theLock) {\n for (Map.Entry<K,CacheableObject> entry : valueMap.entrySet()) {\n if (! isExpired(entry.getValue())) {\n results.put(entry.getKey(), entry.getValue().cachedObject);\n }\n }\n }\n\n return results;\n }",
"public Map<Permission,Set<String>> getGrantedPermissions() {\n return Collections.unmodifiableMap(grantedPermissions);\n }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"private Map<String,Boolean> copyMapFromPreferenceStore(){\n \tMap<String,Boolean> preferences = new HashMap<String,Boolean>();\n \tIPreferenceStore store = EMFTextEditUIPlugin.getDefault().getPreferenceStore();\n \tpreferences.put(ResourcePackageGenerator.GENERATE_PRINTER_STUB_ONLY_NAME,store.getBoolean(ResourcePackageGenerator.GENERATE_PRINTER_STUB_ONLY_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_ANTLR_SPEC_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_ANTLR_SPEC_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_PRINTER_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_PRINTER_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_PROXY_RESOLVERS_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_PROXY_RESOLVERS_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVER_FACTORY_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVER_FACTORY_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVERS_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVERS_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TREE_ANALYSER_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TREE_ANALYSER_NAME));\n \treturn preferences;\n }",
"static Map<String, Boolean> getUUIDMap(){\n\t\tMap<String, Boolean> m = new HashMap<String, Boolean>();\n\t\t\n\t\tm.put(Config.DYNAMIC_PROXIMITY_UUID, false);\n\t\tm.put(Config.STATIC_PROXIMITY_UUID, false);\n\t\t\n\t\treturn m;\n\t}",
"private void updateTrackingList(HashMap<String, ArrayList<Passenger>> pasGroupList, ArrayList<Passenger> individualList) {\n Iterator<String> iter = pasGroupList.keySet().iterator();\n while (iter.hasNext()) {\n String gName = iter.next();\n ArrayList<Passenger> group = pasGroupList.get(gName);\n groupReservedList.put(gName, new GroupOfPassenger(group, gName, group.get(1).isEconomy()));\n }\n\n for (Passenger k : individualList) {\n individualReservedList.put(k.getName(), k);\n }\n }",
"protected static Map<String, List<String>> mapOptions(\n Map<Scope.Builder.COMPILER, List<String>> options) {\n return options\n .entrySet()\n .stream()\n .collect(Collectors.toMap(e -> COMPILER_OPTIONS_MAP.get(e.getKey()), Map.Entry::getValue));\n }",
"public Map<String, YParameter> getEnablementParameters() {\n return _enablementParameters;\n }",
"synchronized public Map<String, Set<String>> getTypes() {\n return Collections.unmodifiableMap(\n new HashSet<>(types.entrySet()).stream()\n .collect(Collectors.toMap(\n Map.Entry::getKey,\n e -> Collections.unmodifiableSet(new HashSet<>(e.getValue()))\n ))\n );\n }",
"public Map<OneDoFJoint, OneDoFJointSensorValidityChecker> addJointSensorValidityCheckers(boolean enableLogging, JointDesiredOutputListReadOnly outputDataHolder, List<String> jointsToIgnore)\n {\n LinkedHashMap<OneDoFJoint, OneDoFJointSensorValidityChecker> validityCheckerMap = new LinkedHashMap<>();\n\n for (int i = 0; i < jointSensorDefinitions.size(); i++)\n {\n OneDoFJoint jointToCheck = jointSensorDefinitions.get(i);\n\n if (jointsToIgnore.contains(jointToCheck.getName()))\n continue;\n\n YoDouble position = outputJointPositions.get(jointToCheck);\n YoDouble velocity = outputJointVelocities.get(jointToCheck);\n YoDouble tau = outputJointTaus.get(jointToCheck);\n OneDoFJointSensorValidityChecker validityChecker = new OneDoFJointSensorValidityChecker(jointToCheck, outputDataHolder.getJointDesiredOutput(jointToCheck), position, velocity, tau, registry);\n if (enableLogging)\n validityChecker.setupForLogging();\n validityCheckerMap.put(jointToCheck, validityChecker);\n diagnosticModules.add(validityChecker);\n }\n\n return validityCheckerMap;\n }",
"public static int collectDefaults()\n {\n int flags = 0;\n for (JsonWriteFeature f : values()) {\n if (f.enabledByDefault()) {\n flags |= f.getMask();\n }\n }\n return flags;\n }",
"private Map<String, List<Integer>> generateOptionRanksMapping(List<FeedbackResponseAttributes> responses) {\n\n Map<FeedbackResponseAttributes, Integer> normalisedRankOfResponse = getNormalisedRankForEachResponse(responses);\n\n Map<String, List<Integer>> optionRanks = new HashMap<>();\n for (FeedbackResponseAttributes response : responses) {\n updateOptionRanksMapping(optionRanks, response.recipient, normalisedRankOfResponse.get(response));\n }\n\n return optionRanks;\n }",
"public Map<ExecutableElement, String> getReplacements() {\n return actualReplacements;\n }",
"private void makeGlbMap(Object gsd) {\n\t\tif(glbMap != null) return;\n\t\tglbMap = new HashMap<String, Integer>();\n\t\tField [] glbFields = gsd.getClass().getDeclaredFields();\n\t\tfor(int i=0; i<glbFields.length; i++) {\n\t\t\tObject object;\n\t\t\ttry {\n\t\t\t\tobject = glbFields[i].get(gsd);\n\t\t\t\tif(object == null) continue;\n\t\t\t\tString n = glbFields[i].getName();\n\t\t\t\tif(n != null && (object instanceof Var || object instanceof Group)) {\n\t\t\t\t\tif(store.containsKey(n)) {\n\t\t\t\t\t\tif(Config.DEBUG) System.out.println(\"Adding peristence Var \" + n);\n\t\t\t\t\t\tInteger v = i;\n\t\t\t\t\t\tglbMap.put(n, v);\n\t\t\t\t\t}\n\t\t\t\t} else if(n != null && (object instanceof Var [])) {\n\t\t\t\t\tif(store.containsKey(n)) {\n\t\t\t\t\t\tif(Config.DEBUG) System.out.println(\"Adding peristence Var \" + n + \"[]\");\n\t\t\t\t\t\tInteger v = i;\n\t\t\t\t\t\tglbMap.put(n, v);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} catch(IllegalArgumentException ex) {\n\t\t\t} catch (IllegalAccessException e) {\n\t\t\t}\n\t\t}\n\t}",
"io.dstore.values.BooleanValueOrBuilder getPredefinedValuesOrBuilder();",
"public Map<Integer, Integer> getAllSortedCommittedValues() {\n\n LinkedHashMap<Integer, Integer> sortedMap = new LinkedHashMap<>();\n variables.entrySet()\n .stream()\n .sorted(Map.Entry.comparingByKey())\n .forEachOrdered(x -> sortedMap.put(x.getKey(), x.getValue().getKey()));\n\n return sortedMap;\n }",
"public Collection getAllowedValues() {\n/* 40 */ return (Collection)this.allowedValues;\n/* */ }",
"private void generateMaps() {\r\n\t\tthis.tablesLocksMap = new LinkedHashMap<>();\r\n\t\tthis.blocksLocksMap = new LinkedHashMap<>();\r\n\t\tthis.rowsLocksMap = new LinkedHashMap<>();\r\n\t\tthis.waitMap = new LinkedHashMap<>();\r\n\t}",
"public java.util.List<java.lang.Integer> getDisabledReasonValueList() {\n return java.util.Collections.unmodifiableList(disabledReason_);\n }",
"private ArrayListMultimap<PreferencesTab, Labeled> getPrefsTabLabelMap() {\n ArrayListMultimap<PreferencesTab, Labeled> prefsTabLabelMap = ArrayListMultimap.create();\n for (PreferencesTab preferencesTab : preferenceTabs) {\n Node builder = preferencesTab.getBuilder();\n if (builder instanceof Parent) {\n Parent parentBuilder = (Parent) builder;\n scanLabeledControls(parentBuilder, prefsTabLabelMap, preferencesTab);\n }\n }\n return prefsTabLabelMap;\n }",
"private Map<Field, ValueRef> createFieldValueRefMap() {\n Map<Field, ValueRef> map = new IdentityHashMap<>(fields.size() + 1);\n map.put(NormalField.MISSING, new ValueRef(0, 0));\n return map;\n }",
"private Map<String, PermissionType> getPermissionTypeMapForLabelToMaskChange() {\n\t\tMap<String, PermissionType> permissionTypeMap = new LinkedHashMap<String, PermissionType>();\n\n\t\tList<PermissionType> permissionTypes = permissionTypeRepo.findAll();\n\t\tfor (int i = 0; i < permissionTypes.size(); i++) {\n\t\t\tpermissionTypeMap.put(permissionTypes.get(i).getName(), permissionTypes.get(i));\n\t\t}\n\t\treturn permissionTypeMap;\n\t}",
"@Override public Set<Tactics> bannedTactics() {\n Set<Tactics> banned = new HashSet<>(first.bannedTactics());\n banned.addAll(next.bannedTactics());\n return banned;\n }",
"public Map<String, AllowableFieldEntry> getFieldMap() {\n return fieldMap;\n }",
"E[] getCachedEnumValues();",
"private void initDefaultIslandData() {\n for (IslandProtectionAccessGroup accessLevel : IslandProtectionAccessGroup.values()) {\n protectionFlags.put(accessLevel, (BitSet) EmberIsles.getInstance().getDefaultProtectionFlags(accessLevel).clone());\n }\n }",
"public io.dstore.values.BooleanValueOrBuilder getPredefinedValuesOrBuilder() {\n return getPredefinedValues();\n }",
"private void fillCombos() {\r\n\t\tthis.combos = new LinkedHashMap<String, Boolean>();\r\n\t\t\r\n\t\tfor(int i = 0; i < this.comboNames.length; i++) {\r\n\t\t\tthis.combos.put(this.comboNames[i], true);\r\n\t\t}\r\n\t}",
"public Groups getFlaggedGroup() {\n return flaggedGroup;\n }",
"public Map<ExportGroup, Boolean> getRpExportGroupMap() {\n if (_rpExportGroupMap == null) {\n _rpExportGroupMap = new HashMap<ExportGroup, Boolean>();\n }\n \n return _rpExportGroupMap;\n }",
"public ImmutableMap<String, Object> getExportedGlobals() {\n ImmutableMap.Builder<String, Object> result = new ImmutableMap.Builder<>();\n for (Map.Entry<String, Object> entry : globals.entrySet()) {\n if (exportedGlobals.contains(entry.getKey())) {\n result.put(entry);\n }\n }\n return result.build();\n }",
"@Override\n public int hashCode() {\n return values.descriptor.hashCode() ^ values.hashCode();\n }",
"protected boolean getValidatedFlag() {\n createFlags();\n return flags[VALIDATED];\n }",
"public static Map<CacheMode, Long> cacheModeMapFor(long value) {\n if (value == 0) {\n return CACHE_MODE_ALL_ZEROS;\n }\n Map<CacheMode, Long> m = new HashMap<>();\n for (CacheMode cm : CacheMode.values()) {\n m.put(cm, value);\n }\n return m;\n }",
"@Override\n public void enableDisableDiscrete() {\n // empty bc mock\n }",
"private static Map<String, Set<String>> getReagentToPotionsTestCaseMap()\n\t{\n\t\t// Set up the potions manual for this particular test case.\n\t\tList<PotionInfo> potionsManual = getPotionsManual();\n\n\t\t// Build a reagent -> potions map from this potions manual.\n\t\tMap<String, Set<String>> map = PotionMaster.reagentToPotionsMap(potionsManual);\n\n\t\t// Check that the resulting map has exactly the right contents.\n\t\tif (!checkReagentToPotionsMapContents(map))\n\t\t{\n\t\t\tSystem.out.println(\"Incorrect map. Aborting test case.\");\n\t\t\tPotionInfo.printMap(map);\n\n\t\t\t// Kill the program.\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\treturn map;\n\t}",
"public Map<Object, Object> getGlobalMap() {\n return Collections.unmodifiableMap(globalMap);\n }",
"private static Map<String, FeatureType> buildAvailableFeatureMap(List<FeatureType> features){\r\n\t\tMap<String, FeatureType> featureMap = new HashMap<String, FeatureType>();\r\n\t\tfor(FeatureType feature : features){\r\n\t\t\tfeatureMap.put(feature.getExternalId(), feature);\r\n\t\t}\r\n\t\treturn featureMap;\r\n\t}",
"boolean getProbables();",
"Collection<String> getPossibleDefeatConditions();",
"public void incorporateBitMapInfo(final BitMap otherFlags) {\n _bitMap |= otherFlags.getBitMap(); // logical OR\n }",
"io.dstore.values.BooleanValue getPredefinedValues();",
"private void saveValues() {\n for (Map.Entry<EditText, Integer> e : mPrefKeys.entrySet()) {\n // If the field is disabled, add the DEACTIVATED marker to the value of the field\n if (e.getKey().isEnabled())\n Pref.put(this, e.getValue(), e.getKey().getText().toString());\n else\n Pref.put(this, e.getValue(), Data.DEACTIVATED_MARKER + e.getKey().getText().toString());\n }\n\n }",
"public Map<String, Boolean> getIsTypeOptionValidMap() {\n if (typeOptionValidMap == null) {\n typeOptionValidMap = new HashMap<String, Boolean>() {\n @Override\n public Boolean get(Object key) {\n return !(key == null || \"\".equals(key.toString().trim()) || countKeyOccurence(typeOptions, (String) key) > 1);\n }\n };\n }\n return typeOptionValidMap;\n }",
"public List<Boolean> getValues() {\r\n\t\treturn values;\r\n\t}",
"public HashMap<List<Integer>,Double> generateRewards(){\n\t\tHashMap<List<Integer>,Double> futRewards = new HashMap<List<Integer>,Double>();\n\t\tfor (List<Integer> state : this.states) {\n\t\t\tfutRewards.put(state,obtainReward(state));\n\t\t}\n\t\treturn futRewards;\n\t\t\n\t}",
"public java.util.List<java.lang.Integer>\n getRequestedValuesList() {\n return java.util.Collections.unmodifiableList(requestedValues_);\n }",
"private static Map<String, Set<String>> getPotionToReagentsTestCaseMap()\n\t{\n\t\t// Set up the potions manual for this particular test case.\n\t\tList<PotionInfo> potionsManual = getPotionsManual();\n\n\t\t// Build a potion -> reagents map from this potions manual.\n\t\tMap<String, Set<String>> map = PotionMaster.potionToReagentsMap(potionsManual);\n\n\t\t// Check that the resulting map has exactly the right contents.\n\t\tif (!checkPotionToReagentsMapContents(map))\n\t\t{\n\t\t\tSystem.out.println(\"Incorrect map. Aborting test case.\");\n\t\t\tPotionInfo.printMap(map);\n\n\t\t\t// Kill the program.\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\treturn map;\n\t}",
"protected void setValidatedFlag(boolean value) {\n createFlags();\n flags[VALIDATED] = value;\n }",
"@Test\n public void testDefensiveRolesForRegistrationStatus() throws Exception {\n DefaultPersonBizPolicyConsultant underTest = new DefaultPersonBizPolicyConsultant();\n Map<RegistrationStatus, List<Role>> statusRoleMap = new HashMap<RegistrationStatus, List<Role>>();\n\n underTest.setRolesForRegistrationStatus(statusRoleMap);\n assertEquals(Collections.<Role>emptyList(), underTest.getRolesForRegistrationStatus(PENDING));\n\n // Mutate the statusRoleMap\n statusRoleMap.put(PENDING, Arrays.asList(Role.ROLE_USER));\n\n // Verify that mutating the statusRoleMap doesn't mutate the state of the status role map held by the consultant\n assertEquals(Collections.<Role>emptyList(), underTest.getRolesForRegistrationStatus(PENDING));\n\n // Now, actually set the statusRoleMap\n underTest.setRolesForRegistrationStatus(statusRoleMap);\n assertEquals(Arrays.asList(Role.ROLE_USER), underTest.getRolesForRegistrationStatus(PENDING));\n\n // Verify that mutating the returned list doesn't mutate the state of the status role map held by the consultant\n underTest.getRolesForRegistrationStatus(PENDING).add(Role.ROLE_ADMIN);\n assertEquals(Arrays.asList(Role.ROLE_USER), underTest.getRolesForRegistrationStatus(PENDING));\n }",
"public int hashCode() {\n/* 69 */ int var1 = super.hashCode();\n/* 70 */ var1 = 31 * var1 + this.allowedValues.hashCode();\n/* 71 */ return var1;\n/* */ }",
"public Iterable<Boolean> getBooleans(String key);",
"private ArrayList<Location> getValidWithProbability(ArrayList<Map.Entry<Location, Integer>> validPair) {\n ArrayList<Location> valid = new ArrayList<>();\n if (isProbabilityEnabled) {\n validPair.sort(Map.Entry.comparingByValue());\n for (int i = validPair.size() - 1; i >= 0; i--) {\n valid.add(validPair.get(i).getKey());\n }\n } else {\n for (int i = 0; i < validPair.size(); i++) {\n valid.add(validPair.get(i).getKey());\n }\n }\n return valid;\n }",
"private Map<Good, Integer> initiateMarketplace() {\n Random noise = new Random();\n Map<Good, Integer> map = Collections.synchronizedMap(\n new EnumMap<Good, Integer>(Good.class));\n for (Good item : Good.values()) {\n if (item.getMinTech() <= techLevel) {\n Integer price = Math.max(item.getBasePrice()\n - (techLevel - item.getMinTech()) + alignment.getPriceChange()\n + noise.nextInt(5),\n 5);\n map.put(item, price);\n }\n }\n return map;\n }",
"@ZAttr(id=1153)\n public Map<String,Object> setGalGroupIndicatorEnabled(boolean zimbraGalGroupIndicatorEnabled, Map<String,Object> attrs) {\n if (attrs == null) attrs = new HashMap<String,Object>();\n attrs.put(Provisioning.A_zimbraGalGroupIndicatorEnabled, zimbraGalGroupIndicatorEnabled ? Provisioning.TRUE : Provisioning.FALSE);\n return attrs;\n }",
"private static <N extends Node> SortedMap<ImmutableContextSet, SortedSet<N>> createMap() {\n return new ConcurrentSkipListMap<>(ContextSetComparator.reverse());\n }",
"public Map<String, String> loggableMap() {\n final TreeMap<String, String> map = new TreeMap<>();\n for (final ConfigProperty cp : _properties.values()) {\n map.put(cp.getKey(), cp.loggableValue());\n }\n return map;\n }",
"public PolicyMap getPolicyMap();",
"public List getGroupToAccountMappings() {\n return Collections.unmodifiableList(groupToAccountMappers);\n }",
"public final /* synthetic */ Map mo33710j(List list) {\n HashMap hashMap = new HashMap();\n for (C2168bw next : this.f1705f.values()) {\n String str = next.f1693c.f1686a;\n if (list.contains(str)) {\n C2168bw bwVar = (C2168bw) hashMap.get(str);\n if ((bwVar == null ? -1 : bwVar.f1691a) < next.f1691a) {\n hashMap.put(str, next);\n }\n }\n }\n return hashMap;\n }",
"private HashMap getGradeRangeMap() {\n\t\tHashMap map = new HashMap();\n\t\tGradeRangeHelper grh;\n\t\tgrh = new GradeRangeHelper(\"Primary elementary\", \"DLESE:Primary elementary\", 0, 2);\n\t\tmap.put(grh.value, grh);\n\t\tgrh = new GradeRangeHelper(\"Intermediate elementary\", \"DLESE:Intermediate elementary\", 3, 5);\n\t\tmap.put(grh.value, grh);\n\t\tgrh = new GradeRangeHelper(\"Middle school\", \"DLESE:Middle school\", 6, 8);\n\t\tmap.put(grh.value, grh);\n\t\tgrh = new GradeRangeHelper(\"High school\", \"DLESE:High school\", 9, 12);\n\t\tmap.put(grh.value, grh);\n\t\treturn map;\n\t}",
"public Map getOperatorMap()// TODO tighten protection?\n\t{\n\t\treturn mComparisonOperatorMap; // TODO make unmodifiable?\n\t}",
"public SetupData getMapWithValues() {\n\tSetupData updatedMap = SetupData.create(setupDefinition);\n\n\tfor (String key : panels.keySet()) {\n\t FieldPanel panel = panels.get(key);\n\t FieldValue value = panel.getOption();\n\t if (value == null) {\n\t\tSpecsLogs.getLogger().warning(\"value is null.\");\n\t\t// No valid value for the table\n\t\tcontinue;\n\t }\n\t updatedMap.put(key, value);\n\t}\n\n\treturn updatedMap;\n }",
"public int[] updateMap() {\r\n\t\tint[] isObstacle = super.updateMap();\r\n\t\tsmap.setMap(map);\r\n\t\treturn isObstacle;\r\n\t}",
"private Map<String, DroneGuiState> getDroneGuiStates(Set<Drone> drones)\n\t{\n\t\t//generate the map containing the gui states\n\t\tMap<String, DroneGuiState> stateMap = new HashMap<>();\n\t\t//fill the map\n\t\tString key;\n\t\tDroneGuiState value;\n\t\tfor(Drone drone: drones){\n\t\t\t//get the ID, position and orientation of the drone\n\t\t\tkey = drone.getDroneID();\n\t\t\tVector position = drone.getPosition().deepCopy();\n\t\t\tVector velocity = drone.getVelocity().deepCopy();\n\t\t\tVector orientation = drone.getOrientation().deepCopy();\n\t\t\tvalue = new DroneGuiState() {\n\t\t\t\t@Override\n\t\t\t\tpublic Vector getPosition() {\n\t\t\t\t\treturn position;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Vector getVelocity() {\n\t\t\t\t\treturn velocity;\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic Vector getOrientation() {\n\t\t\t\t\treturn orientation;\n\t\t\t\t}\n\t\t\t};\n\n\t\t\t//add the key value pair\n\t\t\tstateMap.put(key, value);\n\t\t}\n\n\t\t//return the newly created hashMap\n\t\treturn stateMap;\n\t}",
"BidiMap<String, DictionarySimpleAttribute> getUnmodifiableAttributes() {\n\t\treturn UnmodifiableBidiMap.unmodifiableBidiMap(this.attributes);\n\t}",
"Set<Entry<K, V>> getRegisteredValues();",
"public Set<VertexBuffer.VertexAttribute> getEnabledAttributesAt(\n @EntityInstance int i, @IntRange(from = 0) int primitiveIndex) {\n int bitSet = nGetEnabledAttributesAt(mNativeObject, i, primitiveIndex);\n Set<VertexBuffer.VertexAttribute> requiredAttributes =\n EnumSet.noneOf(VertexBuffer.VertexAttribute.class);\n VertexBuffer.VertexAttribute[] values = sVertexAttributeValues;\n\n for (int j = 0; j < values.length; j++) {\n if ((bitSet & (1 << j)) != 0) {\n requiredAttributes.add(values[j]);\n }\n }\n\n requiredAttributes = Collections.unmodifiableSet(requiredAttributes);\n return requiredAttributes;\n }",
"private final Map<String, Object> m7134b() {\n HashMap hashMap = new HashMap();\n zzcf.zza zzco = this.f11698b.zzco();\n hashMap.put(\"v\", this.f11697a.zzawx());\n hashMap.put(\"gms\", Boolean.valueOf(this.f11697a.zzcm()));\n hashMap.put(\"int\", zzco.zzaf());\n hashMap.put(\"up\", Boolean.valueOf(this.f11700d.mo17775a()));\n hashMap.put(\"t\", new Throwable());\n return hashMap;\n }",
"public Map<Integer, String> getMacrosses() {\n\t\treturn Collections.unmodifiableMap(macrosses);\n\t}",
"public List<SpellingFlaggedToken> flaggedTokens() {\n return this.flaggedTokens;\n }",
"public io.dstore.values.BooleanValue getPredefinedValues() {\n return predefinedValues_ == null ? io.dstore.values.BooleanValue.getDefaultInstance() : predefinedValues_;\n }",
"public boolean isUnmapped(){\n\t\treturn testBitwiseFlag(4);\n\t}",
"public List<Cell> getFlaggedCells() {\n List<Cell> gameBoard = new ArrayList<Cell>();\n List<Cell> flaggedCells = new ArrayList<Cell>();\n for (Cell cell : gameBoard)\n if (cell.isFlagged())\n flaggedCells.add(cell);\n return flaggedCells;\n }",
"RegularImmutableBiMap(Map.Entry<?, ?>[] entriesToAdd) {\n/* 104 */ int n = entriesToAdd.length;\n/* 105 */ int tableSize = Hashing.closedTableSize(n, 1.2D);\n/* 106 */ this.mask = tableSize - 1;\n/* 107 */ ImmutableMapEntry[] arrayOfImmutableMapEntry1 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 108 */ ImmutableMapEntry[] arrayOfImmutableMapEntry2 = (ImmutableMapEntry[])createEntryArray(tableSize);\n/* 109 */ ImmutableMapEntry[] arrayOfImmutableMapEntry3 = (ImmutableMapEntry[])createEntryArray(n);\n/* 110 */ int hashCode = 0;\n/* */ \n/* 112 */ for (int i = 0; i < n; i++) {\n/* */ \n/* 114 */ Map.Entry<?, ?> entry = entriesToAdd[i];\n/* 115 */ K key = (K)entry.getKey();\n/* 116 */ V value = (V)entry.getValue();\n/* 117 */ CollectPreconditions.checkEntryNotNull(key, value);\n/* 118 */ int keyHash = key.hashCode();\n/* 119 */ int valueHash = value.hashCode();\n/* 120 */ int keyBucket = Hashing.smear(keyHash) & this.mask;\n/* 121 */ int valueBucket = Hashing.smear(valueHash) & this.mask;\n/* */ \n/* 123 */ ImmutableMapEntry<K, V> nextInKeyBucket = arrayOfImmutableMapEntry1[keyBucket];\n/* 124 */ for (ImmutableMapEntry<K, V> keyEntry = nextInKeyBucket; keyEntry != null; \n/* 125 */ keyEntry = keyEntry.getNextInKeyBucket()) {\n/* 126 */ checkNoConflict(!key.equals(keyEntry.getKey()), \"key\", entry, keyEntry);\n/* */ }\n/* 128 */ ImmutableMapEntry<K, V> nextInValueBucket = arrayOfImmutableMapEntry2[valueBucket];\n/* 129 */ for (ImmutableMapEntry<K, V> valueEntry = nextInValueBucket; valueEntry != null; \n/* 130 */ valueEntry = valueEntry.getNextInValueBucket()) {\n/* 131 */ checkNoConflict(!value.equals(valueEntry.getValue()), \"value\", entry, valueEntry);\n/* */ }\n/* 133 */ ImmutableMapEntry<K, V> newEntry = (nextInKeyBucket == null && nextInValueBucket == null) ? new ImmutableMapEntry.TerminalEntry<K, V>(key, value) : new NonTerminalBiMapEntry<K, V>(key, value, nextInKeyBucket, nextInValueBucket);\n/* */ \n/* */ \n/* */ \n/* 137 */ arrayOfImmutableMapEntry1[keyBucket] = newEntry;\n/* 138 */ arrayOfImmutableMapEntry2[valueBucket] = newEntry;\n/* 139 */ arrayOfImmutableMapEntry3[i] = newEntry;\n/* 140 */ hashCode += keyHash ^ valueHash;\n/* */ } \n/* */ \n/* 143 */ this.keyTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry1;\n/* 144 */ this.valueTable = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry2;\n/* 145 */ this.entries = (ImmutableMapEntry<K, V>[])arrayOfImmutableMapEntry3;\n/* 146 */ this.hashCode = hashCode;\n/* */ }",
"protected Set<Integer> getToReplace() {\r\n \r\n Set<Integer> toReplace = new HashSet<>();\r\n double distance;\r\n Individual a, b;\r\n \r\n for(int i = 0; i < this.P.size()-1; i++) {\r\n \r\n a = this.P.get(i);\r\n \r\n for(int j = i+1; j < this.P.size(); j++) {\r\n \r\n b = this.P.get(j);\r\n \r\n distance = this.getSquaredEuclideanDistance(a.vector, b.vector);\r\n \r\n if(distance < this.minDifference) {\r\n \r\n if(a.fitness < b.fitness) {\r\n toReplace.add(j);\r\n } else {\r\n toReplace.add(i);\r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n }\r\n \r\n \r\n return toReplace;\r\n \r\n }",
"@java.lang.Override\n public java.util.List<java.lang.Integer> getDisabledReasonValueList() {\n return disabledReason_;\n }",
"boolean derangement() {\n for (Map.Entry<Integer, Integer> e: _map.entrySet()) {\n if (e.getValue().equals(e.getKey())) {\n return false;\n }\n }\n return true;\n }",
"public Collection<Integer> getProgramCounterValues() {\n return Collections.unmodifiableSet(enteringPCValueAssignmentEdges.keySet());\n }",
"public Map getValidatorMap();"
]
| [
"0.48825806",
"0.4824611",
"0.47945413",
"0.46981874",
"0.4695111",
"0.46062416",
"0.45886227",
"0.4583899",
"0.45818722",
"0.4483426",
"0.44737867",
"0.44727102",
"0.4439882",
"0.44254085",
"0.44185364",
"0.44166154",
"0.44116512",
"0.43896574",
"0.43773136",
"0.43539894",
"0.4346507",
"0.43426058",
"0.43426058",
"0.43215853",
"0.43154758",
"0.43116304",
"0.4310985",
"0.430489",
"0.42907333",
"0.42865905",
"0.427728",
"0.4276068",
"0.42742696",
"0.42672864",
"0.42541093",
"0.4233476",
"0.42201126",
"0.42154542",
"0.41979316",
"0.4189141",
"0.4170472",
"0.4166746",
"0.4166194",
"0.41654402",
"0.41652983",
"0.4151923",
"0.41512012",
"0.41412693",
"0.41402394",
"0.4136789",
"0.41319245",
"0.41295016",
"0.4125808",
"0.41190833",
"0.4115839",
"0.41151068",
"0.41129923",
"0.41129437",
"0.41099262",
"0.41071314",
"0.41058367",
"0.41044226",
"0.4102734",
"0.4097784",
"0.40964523",
"0.4093371",
"0.40931782",
"0.40902403",
"0.40871283",
"0.4081067",
"0.40793532",
"0.40716162",
"0.40714803",
"0.40616566",
"0.40597162",
"0.405555",
"0.40550563",
"0.40533713",
"0.40471488",
"0.40455362",
"0.40421528",
"0.40356693",
"0.4032619",
"0.40304023",
"0.40292242",
"0.40264612",
"0.40250796",
"0.40244234",
"0.40217814",
"0.40176976",
"0.4017226",
"0.40158507",
"0.4013011",
"0.40094465",
"0.4005284",
"0.40042764",
"0.40010777",
"0.3994398",
"0.39914668",
"0.39815775"
]
| 0.58107287 | 0 |
Returns the value of a predeclared (or universal) binding in this module. | Object getPredeclared(String name) {
Object v = predeclared.get(name);
if (v != null) {
return v;
}
return Starlark.UNIVERSE.get(name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract int getBindingVariable();",
"Binding getBinding();",
"public Binding getBinding() {\n\t\treturn binding;\n\t}",
"public Binding getBinding() {\n return binding;\n }",
"@Override\n public int getBindingVariable() {\n return BR.data;\n }",
"@Override\n public int getBindingVariable() {\n return BR.data;\n }",
"public interface Binding {\n\n /**\n * Get the declared type of the variable\n * @return the declared type\n */\n\n public SequenceType getRequiredType();\n\n /**\n * Evaluate the variable\n * @param context the XPath dynamic evaluation context\n * @return the result of evaluating the variable\n */\n\n public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException;\n\n /**\n * Indicate whether the binding is local or global. A global binding is one that has a fixed\n * value for the life of a query or transformation; any other binding is local.\n * @return true if the binding is global\n */\n\n public boolean isGlobal();\n\n /**\n * If this is a local variable held on the local stack frame, return the corresponding slot number.\n * In other cases, return -1.\n * @return the slot number on the local stack frame\n */\n\n public int getLocalSlotNumber();\n\n /**\n * Get the name of the variable\n * @return the name of the variable, as a structured QName\n */\n\n public StructuredQName getVariableQName();\n\n}",
"public Object get(String name) {\n\t\tMap<?, ?> bindings = m_bindings.getBindings();\n\t\tif (bindings == null) {\n\t\t\tlog.info(\"get: no bindings!\");\n\t\t\treturn null;\n\t\t}\n\n\t\treturn bindings.get(name);\n\t}",
"public static List<VariableDeclaration> getBindingManagementVars()\n {\n return FrameworkDefs.bindingManagementVars; \n }",
"@NonNull\n public final AutoRef<TBinding> getBinding() throws ReferenceNullException {\n return AutoRef.of(_binding);\n }",
"public Object getValue(String name) {\n Object value = localScope.get(name);\n if ( value!=null ) {\n return value;\n }\n // if not found\n BFlatGUI.debugPrint(0, \"undefined variable \"+name);\n return null;\n }",
"public DCPList getBinding() {\n return binding;\n }",
"int getScopeValue();",
"public RequestedVariableHandler getRequestedVariableHandler(){\n\t\treturn requestedVariableHandler;\n\t}",
"public Binding getBinding() { \n\t\tif (myBinding == null) {\n\t\t\tmyBinding = new Binding();\n\t\t}\n\t\treturn myBinding;\n\t}",
"@Override\n protected String getBindingKey() {return _parms.bindingKey;}",
"@Nonnull\n SystemScriptBindings getBindings();",
"public IExpressionValue getUserDefinedVariable(String key);",
"public BindElements getBindAccess() {\n\t\treturn pBind;\n\t}",
"public Name getBindingClassName()\n {\n assert bindingClassName != null;\n return bindingClassName;\n }",
"public CFString value() {\n return lazyGlobalValue.value();\n }",
"public BindingElements getBindingAccess() {\n\t\treturn pBinding;\n\t}",
"public String getBindPhoneNum() {\n return bindPhoneNum;\n }",
"public abstract BindPredictor getBindPredictor();",
"Expression getBindingExpression();",
"@Override\r\n\tpublic String getBind_pension_ind() {\n\t\treturn super.getBind_pension_ind();\r\n\t}",
"public XtypeGrammarAccess.JvmLowerBoundAndedElements getJvmLowerBoundAndedAccess() {\n\t\treturn gaXtype.getJvmLowerBoundAndedAccess();\n\t}",
"public XtypeGrammarAccess.JvmLowerBoundAndedElements getJvmLowerBoundAndedAccess() {\n\t\treturn gaXtype.getJvmLowerBoundAndedAccess();\n\t}",
"public XtypeGrammarAccess.JvmLowerBoundAndedElements getJvmLowerBoundAndedAccess() {\r\n\t\treturn gaXtype.getJvmLowerBoundAndedAccess();\r\n\t}",
"@ReflectiveMethod(name = \"bp\", types = {})\n public String bp(){\n return (String) NMSWrapper.getInstance().exec(nmsObject);\n }",
"@Override\r\n\tpublic String getBind_house_ind() {\n\t\treturn super.getBind_house_ind();\r\n\t}",
"public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }",
"public IRubyObject getConstantAt(String name) {\n IRubyObject value = fetchConstant(name);\n \n return value == UNDEF ? resolveUndefConstant(getRuntime(), name) : value;\n }",
"public int getBinderySlotNumber() {\n return binderySlotNumber;\n }",
"@Override\r\n\tpublic String getBind_haofang_ind() {\n\t\treturn super.getBind_haofang_ind();\r\n\t}",
"public String bnd(String name) {\n\t\treturn bnd.get(name);\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 209,\n FQN=\"llvm::Module::getGlobalVariable\", NM=\"_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\")\n //</editor-fold>\n public GlobalVariable /*P*/ getGlobalVariable(StringRef Name) {\n return getGlobalVariable(Name, false);\n }",
"@Override\r\n\tpublic String getBind_fund_ind() {\n\t\treturn super.getBind_fund_ind();\r\n\t}",
"public String getBindingClass()\n {\n return bindingClass;\n }",
"String getVariable();",
"public Binding getBinding(int anIndex) { return getBindings(true).get(anIndex); }",
"@Override\r\n\tpublic String getBind_lufax_ind() {\n\t\treturn super.getBind_lufax_ind();\r\n\t}",
"public Variable getPrefixed(String methodName, String className, String unprefixedName, int ssaNum) {\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName, ssaNum);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName, ssaNum);\t\t\n\t\treturn v;\n\t}",
"IViewerBinding getBinding();",
"public int getMobileBind() {\n\t\t\treturn mobileBind;\n\t\t}",
"@Override\n public String getBinding(String name) {\n if (wrappedToStringContext != null && wrappedToStringContext.getBinding(name) != null)\n return wrappedToStringContext.getBinding(name);\n else\n return wrappedSerializationContext.getBinding(name);\n }",
"public String getBindAddress() {\n return agentConfig.getBindAddress();\n }",
"Binding<T> unqualified();",
"public BindingOperation getBindingOp() {\n return bindingOp;\n }",
"public java.lang.String[] getBindingKey() {\r\n return bindingKey;\r\n }",
"public synchronized KeyBinding getKeyBinding() {\r\n\t\tif (keyBinding == null){\r\n\t\t\tkeyBinding = new KeyBinding();\r\n\t\t}\r\n\t\treturn keyBinding;\r\n\t}",
"@Override\r\n\tpublic String getBind_trust_ind() {\n\t\treturn super.getBind_trust_ind();\r\n\t}",
"public String getVariable();",
"@Override\r\n\tpublic String getBind_annuity_ind() {\n\t\treturn super.getBind_annuity_ind();\r\n\t}",
"@Override\n protected DagNode evaluate(DagNode parent, Bindings bindings) {\n // type acts as storage for the status\n DagEdge bound = bindings.getBinding(_varName, getType());\n if (bound == null) {\n if (getType() == Bindings.LOCAL) {\n // first occurence of this var, bind the variable name\n // to the given node. This is on the application side, where new bindings\n // are only relevant in expandVars, which is why the DagEdge is not\n // important, but the node, to establish coreferences.\n bound = new DagEdge((short) -1, parent);\n bindings.bind(_varName, bound, getType());\n } else {\n logger.warn(\"Unknown binding during application of rule: \" + this);\n return parent;\n }\n }\n // Avoid unwanted coreferences for atomic nodes\n if (bound.getValue().newEdgesAreEmpty()) {\n return bound.getValue().cloneFS();\n }\n return bound.getValue();\n }",
"String getBindAddress() {\n return bindAddress;\n }",
"String getSourceVariablePart();",
"@Basic\n\t@Raw\n\t@Immutable\n\tpublic static double getVelocityLowerBound() {\n\t\treturn VELOCITYLOWERBOUND;\n\t}",
"String getVarDeclare();",
"@Override\n\tpublic Object get(String name, Scriptable start) {\n\t\tObject result = super.get(name, start);\n\t\tif(result == NOT_FOUND && unwrap().appliedBindings.size() > 0) {\n\t\t\tfor(XBLBinding binding : unwrap().appliedBindings) {\n\t\t\t\t// Check fields:\n\t\t\t\tXBLField field = binding.getField(name);\n\t\t\t\tif(field != null && field.getInitializer() != null) {\n\t\t\t\t\tFunction init = asFunction(field.getInitializer());\n\t\t\t\t\tfield.setInitializer(init);\n\t\t\t\t\tresult = init.call(Context.getCurrentContext(), getParentScope(), this, new Object[]{});\n\t\t\t\t\tput(name, this, result);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Check property getters:\n\t\t\t\tXBLProperty prop = binding.getProperty(name);\n\t\t\t\tif(prop != null && prop.getGetter() != null) {\n\t\t\t\t\tFunction getter = asFunction(prop.getGetter());\n\t\t\t\t\tprop.setGetter(getter);\n\t\t\t\t\tresult = getter.call(Context.getCurrentContext(), getParentScope(), this, new Object[]{});\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t// Check methods:\n\t\t\t\tXBLMethod method = binding.getMethod(name);\n\t\t\t\tif(method != null && method.getBody() != null) {\n\t\t\t\t\tresult = asFunction(method.getBody());\n\t\t\t\t\tmethod.setBody(result);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn convertReturnValue(result);\n\t}",
"public IBinder asBinder() {\n return this;\n }",
"public IBinder asBinder() {\n return this;\n }",
"public int getLocalPort() {\n if (state >= BOUND)\n return localPort;\n else\n return -1;\n }",
"@Override\n public com.gensym.util.Symbol getContainingModule() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.CONTAINING_MODULE_);\n return (com.gensym.util.Symbol)retnValue;\n }",
"String getTargetVariablePart();",
"public PyObject get(String name) {\n return null;\n }",
"public int getPortBase() {\r\n return pb;\r\n }",
"public Variable getPrefixed(String methodName, String className, String unprefixedName) {\n//\t\tSystem.out.println(\"symbolTable getPrefixed \" + methodName + \" \" + className + \" \" + n);\n\t\t\n\t\t// Search for a global variable first\n\t\tVariable v = get(className + \"_\" + unprefixedName);\n\t\tif (v == null) // This is not a global variable but a local one\n\t\t\tv = get(methodName + \"_\" + unprefixedName);\n\t\t\n\t\treturn v;\n\t}",
"public EMAPortSymbol getSourcePort() {\n if (isConstant())\n return constantEmaPortSymbol;\n return getPort(this.getSource());\n }",
"public String getSingleInputName()\n {\n return Iterables.getOnlyElement(analysis.getRequiredBindings());\n }",
"public boolean needsBinding(){\n\t\tArrayList<String> bindVars = getNeedBindingVars();\n\t\tif(bindVars.isEmpty())\n\t\t\treturn false;\n\t\telse return true;\n\t}",
"@Override\r\n\tpublic String getBind_wlt_ind() {\n\t\treturn super.getBind_wlt_ind();\r\n\t}",
"public java.lang.Integer getVar42() {\n return var42;\n }",
"public Integer value(State state) {\n return state.lookup(variableName);\n }",
"Variable getSourceVariable();",
"java.lang.String getVarValue();",
"public int getInPort() {\n return instance.getInPort();\n }",
"public int getInPort() {\n return instance.getInPort();\n }",
"@Override\r\n\tpublic String getBind_ewealth_ind() {\n\t\treturn super.getBind_ewealth_ind();\r\n\t}",
"public Object getGlobal(String name) {\n return globals.get(name);\n }",
"public ArrayList<String> getNeedBindingVars(){\n\t\tArrayList<String> vars = new ArrayList<String>();\n\t\tfor(int i=0; i<terms.size(); i++){\n\t\t\tTerm t = terms.get(i);\n\t\t\tSourceAttribute sa = source.getAttr(i);\n\t\t\tString var = t.getVar();\n\t\t\tif(t.needsBinding(sa.needsBinding())){\n\t\t\t\tif(t instanceof FunctionTerm){\n\t\t\t\t\tvars.addAll(t.getFunction().getNeedBindingVars());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tvars.add(var);\n\t\t\t}\n\t\t}\n\t\treturn vars;\n\t}",
"public String valueInTargetSlot() {\n return this.innerProperties() == null ? null : this.innerProperties().valueInTargetSlot();\n }",
"public ValueDecl lookupValue(Identifier name) {\n Pair<Integer, ValueDecl> entry = valueScope.get(name);\n if (entry == null) return null;\n return entry.getRight();\n }",
"public java.lang.Integer getVar42() {\n return var42;\n }",
"private Object readResolve() {\n return getApplication(name);\n }",
"public VariableBinding formVarbind(MetaData mdata) {\n VariableBinding vbind = null;\n if (mdata.m_oidValue != null) {\n vbind = new VariableBinding(new OID(mdata.m_oid), castOidType(mdata.m_oidType, mdata.m_oidValue));\n }\n return vbind;\n }",
"List<Exp> varBind() {\n List<Exp> lBind = new ArrayList<Exp>();\n for (int i = 0; i < size(); i++) {\n Exp f = get(i);\n if ((f.type == VALUES) || (f.isFilter() && f.size() > 0)) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND) {\n if (bind.isBindCst()) {\n // ?x = cst\n lBind.add(bind);\n } else {\n // filter has BIND\n // TODO: when there is a UNION, variables of BIND may not be all bound \n // so we cannot bind here\n //add(i, bind);\n //i++;\n }\n }\n }\n }\n return lBind;\n }",
"@Override\r\n\tpublic String getBind_orange_ind() {\n\t\treturn super.getBind_orange_ind();\r\n\t}",
"DirectVariableResolver getVariableResolver();",
"@Override\r\n\tpublic String getBind_health_ind() {\n\t\treturn super.getBind_health_ind();\r\n\t}",
"String getConstant();",
"public DagEdge getLvalBinding(DagEdge input, Bindings bindings) {\n if (_varName == null) {\n DagEdge current = bindings.getBinding(\"#\", Bindings.LOCAL);\n if (current != null) return current;\n return input;\n }\n DagEdge current = bindings.getBinding(_varName, getType());\n if (current == null && getType() == Bindings.GLOBAL) {\n // create a new global variable\n current = new DagEdge((short)-1, new DagNode());\n bindings.bind(_varName, current, getType());\n }\n if (current == null) {\n logger.warn(\"local variable not bound and used as lval \" + _varName);\n }\n return current;\n }",
"public static Object getBindingObject(String bindingValue) {\r\n\r\n\t\tFacesContext ctx = FacesContext.getCurrentInstance();\r\n\t\tApplication app = ctx.getApplication();\r\n\t\treturn app.createValueBinding(bindingValue).getValue(ctx);\r\n\t}",
"public String getVar() {\n\t\treturn state.get(PropertyKeys.var);\n\t}",
"@SuppressWarnings(\"unchecked\")\n public <T> Binding<T> getBinding(Key<T> key) {\n return (Binding<T>) bindings.get(key);\n }",
"String getDeclare();",
"public IPV getPV(){\n return pvMap.get(IPVWidgetModel.PROP_PVNAME);\n }",
"public Integer getBp_sp() {\r\n return bp_sp;\r\n }",
"public String getAxisBinding() {\n return this.axisBinding;\n }",
"@Override\r\n\tpublic String getBind_bill_ind() {\n\t\treturn super.getBind_bill_ind();\r\n\t}"
]
| [
"0.6445214",
"0.6047401",
"0.57702905",
"0.57381517",
"0.56712633",
"0.56712633",
"0.564605",
"0.5330774",
"0.5310496",
"0.524067",
"0.5223768",
"0.51845765",
"0.5132593",
"0.51160383",
"0.51125294",
"0.51117086",
"0.508599",
"0.50574744",
"0.50521713",
"0.5051424",
"0.50500697",
"0.49761415",
"0.4965317",
"0.49485028",
"0.49468505",
"0.49357975",
"0.49187657",
"0.49187657",
"0.49162456",
"0.49130902",
"0.49084538",
"0.4901066",
"0.48978874",
"0.48846048",
"0.48842096",
"0.4874953",
"0.4868602",
"0.48620516",
"0.48619738",
"0.4861532",
"0.48534313",
"0.48460975",
"0.4833195",
"0.47933486",
"0.4780222",
"0.47642004",
"0.47566193",
"0.47460318",
"0.47389948",
"0.4736574",
"0.473076",
"0.47249603",
"0.47101507",
"0.4707246",
"0.4702193",
"0.47021258",
"0.46927178",
"0.469209",
"0.4689827",
"0.4680874",
"0.46646774",
"0.46646774",
"0.4662126",
"0.46609077",
"0.46512416",
"0.46487042",
"0.46465036",
"0.46349594",
"0.46217933",
"0.46169192",
"0.4600963",
"0.4592519",
"0.45834568",
"0.4575682",
"0.45716575",
"0.4570119",
"0.45691127",
"0.45691127",
"0.45681942",
"0.45674887",
"0.45631912",
"0.45629805",
"0.45501736",
"0.4546929",
"0.45462653",
"0.45428166",
"0.45398825",
"0.4532769",
"0.4532541",
"0.45316654",
"0.45178947",
"0.45154378",
"0.45080885",
"0.4506903",
"0.45028532",
"0.44978344",
"0.44915622",
"0.44886568",
"0.44810545",
"0.44788373"
]
| 0.45827425 | 73 |
Returns a readonly view of this module's global bindings. The bindings are returned in a deterministic order (for a given sequence of initial values and updates). | public Map<String, Object> getGlobals() {
return Collections.unmodifiableMap(globals);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Iterator getBindings() {\r\n\t\treturn bindings == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(bindings.values());\r\n\t}",
"@Nonnull\n SystemScriptBindings getBindings();",
"public static List<VariableDeclaration> getBindingManagementVars()\n {\n return FrameworkDefs.bindingManagementVars; \n }",
"private Map<String, Object> collectGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n MethodLibrary.addBindingsToBuilder(envBuilder);\n Runtime.addConstantsToBuilder(envBuilder);\n return envBuilder.build();\n }",
"public BindState(Set<AccessPath> globalVariableNames) {\n this.stateOnLastFunctionCall = null;\n this.globalDefs =\n addVariables(PathCopyingPersistentTree.<String, BindingPoint>of(), globalVariableNames);\n this.localDefs = new PathCopyingPersistentTree<>();\n }",
"public BindElements getBindAccess() {\n\t\treturn pBind;\n\t}",
"public List<Identifier> getGlobalVars(){\n final List<Identifier> globs = new ArrayList<>();\n\n globalVariables.keySet().stream()\n .map(x -> new Identifier(Scope.GLOBAL, Type.VARIABLE, x, globalVariables.get(x)))\n .forEach(globs::add);\n\n return globs;\n }",
"public Map<String, Object> getTransitiveBindings() {\n // Can't use ImmutableMap.Builder because it doesn't allow duplicates.\n LinkedHashMap<String, Object> env = new LinkedHashMap<>();\n env.putAll(Starlark.UNIVERSE);\n env.putAll(predeclared);\n env.putAll(globals);\n return env;\n }",
"public ImmutableMap<String, Object> getExportedGlobals() {\n ImmutableMap.Builder<String, Object> result = new ImmutableMap.Builder<>();\n for (Map.Entry<String, Object> entry : globals.entrySet()) {\n if (exportedGlobals.contains(entry.getKey())) {\n result.put(entry);\n }\n }\n return result.build();\n }",
"public Map<String, Object> getBzlGlobals() {\n return bzlGlobals;\n }",
"List<Exp> varBind() {\n List<Exp> lBind = new ArrayList<Exp>();\n for (int i = 0; i < size(); i++) {\n Exp f = get(i);\n if ((f.type == VALUES) || (f.isFilter() && f.size() > 0)) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND) {\n if (bind.isBindCst()) {\n // ?x = cst\n lBind.add(bind);\n } else {\n // filter has BIND\n // TODO: when there is a UNION, variables of BIND may not be all bound \n // so we cannot bind here\n //add(i, bind);\n //i++;\n }\n }\n }\n }\n return lBind;\n }",
"public java.lang.String[] getBindingKey() {\r\n return bindingKey;\r\n }",
"public Map<String, Object> getGlobals() {\n return globals;\n }",
"public BindingElements getBindingAccess() {\n\t\treturn pBinding;\n\t}",
"protected List <Binding> getBindings(boolean doCreate)\n{\n List <Binding> bindings = (List)get(\"RibsBindings\");\n if(bindings==null && doCreate)\n put(\"RibsBindings\", bindings = new ArrayList());\n return bindings;\n}",
"public Map<Integer, String> getAllBindingNamespaces()\n {\n Map<Integer, String> allNs = new HashMap<Integer, String>();\n \n for (BindingExpression be : bindingExpressions)\n {\n if (be.getNamespaces() != null)\n {\n allNs.putAll(be.getNamespaces());\n }\n }\n \n return allNs;\n }",
"public authenticationlocalpolicy_vpnglobal_binding[] get_authenticationlocalpolicy_vpnglobal_bindings() throws Exception {\n\t\treturn this.authenticationlocalpolicy_vpnglobal_binding;\n\t}",
"public authenticationlocalpolicy_systemglobal_binding[] get_authenticationlocalpolicy_systemglobal_bindings() throws Exception {\n\t\treturn this.authenticationlocalpolicy_systemglobal_binding;\n\t}",
"public Map getActorStateVariables() {\r\n\t\treturn actorEnv.localBindings();\r\n\t}",
"public HashMap<IClassDefinition, BindingDatabase> getBindingMap(){\n return bindingMap;\n }",
"public DCPList getBinding() {\n return binding;\n }",
"public Map<Object, Object> getGlobalMap() {\n return Collections.unmodifiableMap(globalMap);\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 490,\n FQN=\"llvm::Module::getGlobalList\", NM=\"_ZN4llvm6Module13getGlobalListEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module13getGlobalListEv\")\n //</editor-fold>\n public SymbolTableList<GlobalVariable, Module> /*&*/ getGlobalList() {\n return GlobalList;\n }",
"public String getAllBindingNamespaceDeclarations() \t \n { \t \n return BindingExpression.getNamespaceDeclarations(getAllBindingNamespaces()); \t \n }",
"public java.util.List<com.google.api.HttpRule> getAdditionalBindingsList() {\n return java.util.Collections.unmodifiableList(\n instance.getAdditionalBindingsList());\n }",
"Binding getBinding();",
"public synchronized KeyBinding getKeyBinding() {\r\n\t\tif (keyBinding == null){\r\n\t\t\tkeyBinding = new KeyBinding();\r\n\t\t}\r\n\t\treturn keyBinding;\r\n\t}",
"private Map<String, Object> collectBzlGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n TopLevelBootstrap topLevelBootstrap =\n new TopLevelBootstrap(\n new FakeBuildApiGlobals(),\n new FakeSkylarkAttrApi(),\n new FakeSkylarkCommandLineApi(),\n new FakeSkylarkNativeModuleApi(),\n new FakeSkylarkRuleFunctionsApi(Lists.newArrayList(), Lists.newArrayList()),\n new FakeStructProviderApi(),\n new FakeOutputGroupInfoProvider(),\n new FakeActionsInfoProvider(),\n new FakeDefaultInfoProvider());\n AndroidBootstrap androidBootstrap =\n new AndroidBootstrap(\n new FakeAndroidSkylarkCommon(),\n new FakeApkInfoProvider(),\n new FakeAndroidInstrumentationInfoProvider(),\n new FakeAndroidDeviceBrokerInfoProvider(),\n new FakeAndroidResourcesInfoProvider(),\n new FakeAndroidNativeLibsInfoProvider());\n AppleBootstrap appleBootstrap = new AppleBootstrap(new FakeAppleCommon());\n ConfigBootstrap configBootstrap =\n new ConfigBootstrap(new FakeConfigSkylarkCommon(), new FakeConfigApi(),\n new FakeConfigGlobalLibrary());\n CcBootstrap ccBootstrap = new CcBootstrap(new FakeCcModule());\n JavaBootstrap javaBootstrap =\n new JavaBootstrap(\n new FakeJavaCommon(),\n new FakeJavaInfoProvider(),\n new FakeJavaProtoCommon(),\n new FakeJavaCcLinkParamsProvider.Provider());\n PlatformBootstrap platformBootstrap = new PlatformBootstrap(new FakePlatformCommon());\n PyBootstrap pyBootstrap =\n new PyBootstrap(new FakePyInfoProvider(), new FakePyRuntimeInfoProvider());\n RepositoryBootstrap repositoryBootstrap =\n new RepositoryBootstrap(new FakeRepositoryModule(Lists.newArrayList()));\n TestingBootstrap testingBootstrap =\n new TestingBootstrap(\n new FakeTestingModule(),\n new FakeCoverageCommon(),\n new FakeAnalysisFailureInfoProvider(),\n new FakeAnalysisTestResultInfoProvider());\n\n topLevelBootstrap.addBindingsToBuilder(envBuilder);\n androidBootstrap.addBindingsToBuilder(envBuilder);\n appleBootstrap.addBindingsToBuilder(envBuilder);\n ccBootstrap.addBindingsToBuilder(envBuilder);\n configBootstrap.addBindingsToBuilder(envBuilder);\n javaBootstrap.addBindingsToBuilder(envBuilder);\n platformBootstrap.addBindingsToBuilder(envBuilder);\n pyBootstrap.addBindingsToBuilder(envBuilder);\n repositoryBootstrap.addBindingsToBuilder(envBuilder);\n testingBootstrap.addBindingsToBuilder(envBuilder);\n\n return envBuilder.build();\n }",
"public ArrayList<String> getNeedBindingVars(){\n\t\tArrayList<String> vars = new ArrayList<String>();\n\t\tfor(int i=0; i<terms.size(); i++){\n\t\t\tTerm t = terms.get(i);\n\t\t\tSourceAttribute sa = source.getAttr(i);\n\t\t\tString var = t.getVar();\n\t\t\tif(t.needsBinding(sa.needsBinding())){\n\t\t\t\tif(t instanceof FunctionTerm){\n\t\t\t\t\tvars.addAll(t.getFunction().getNeedBindingVars());\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tvars.add(var);\n\t\t\t}\n\t\t}\n\t\treturn vars;\n\t}",
"private static class <init>\n implements ScopedBindingBuilder\n{\n\n public void asEagerSingleton()\n {\n }",
"public Map<String, String> getPointBindings() {\n return pointBindings;\n }",
"public Binding getBinding() {\n\t\treturn binding;\n\t}",
"public List<Dim> getGlobals(){\n\t\t\n\t\treturn null;\n\t}",
"public yandex.cloud.api.access.Access.ListAccessBindingsResponse listAccessBindings(yandex.cloud.api.access.Access.ListAccessBindingsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListAccessBindingsMethod(), getCallOptions(), request);\n }",
"Binding<T> shared();",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.access.Access.ListAccessBindingsResponse> listAccessBindings(\n yandex.cloud.api.access.Access.ListAccessBindingsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListAccessBindingsMethod(), getCallOptions()), request);\n }",
"private void registerBindings(){\t\t\n\t}",
"private void registerBindings(){\t\t\n\t}",
"public java.util.List<com.google.api.HttpRule> getAdditionalBindingsList() {\n return additionalBindings_;\n }",
"IIndexFragmentBinding[] findBindings(char[] name, boolean filescope, IndexFilter filter, IProgressMonitor monitor) throws CoreException;",
"public Binding getBinding() {\n return binding;\n }",
"public GlobalNode getGlobal() { return global; }",
"public void setBindings(Binding[] binds) {\n this.binds = binds;\n }",
"public void setBindings(Binding[] binds) {\n this.binds = binds;\n }",
"@Override\n public Set<String> getNames() {\n // TODO(adonovan): for now, the resolver treats all predeclared/universe\n // and global names as one bucket (Scope.PREDECLARED). Fix that.\n // TODO(adonovan): opt: change the resolver to request names on\n // demand to avoid all this set copying.\n HashSet<String> names = new HashSet<>();\n for (Map.Entry<String, Object> bind : getTransitiveBindings().entrySet()) {\n if (bind.getValue() instanceof FlagGuardedValue) {\n continue; // disabled\n }\n names.add(bind.getKey());\n }\n return names;\n }",
"public int getAdditionalBindingsCount() {\n return additionalBindings_.size();\n }",
"public Hashtable<String, TenantBindingType> getTenantBindings() {\n \t\treturn getTenantBindings(EXCLUDE_CREATE_DISABLED_TENANTS);\n \t}",
"public Object[] getGlobalResourceList() {\n return this.getList(AbstractGIS.INQUIRY_GLOBAL_RESOURCE_LIST);\n }",
"public Object getGlobal(String name) {\n return globals.get(name);\n }",
"public List<Function> getGlobalFunctions(String name);",
"private void applyBindings(Bindings bindings) {\n\t\tfor (Map.Entry<String, Object> binding : bindings.entrySet()) {\n\t\t\tluaState.pushJavaObject(binding.getValue());\n\t\t\tString variableName = binding.getKey();\n\t\t\tint lastDotIndex = variableName.lastIndexOf('.');\n\t\t\tif (lastDotIndex >= 0) {\n\t\t\t\tvariableName = variableName.substring(lastDotIndex + 1);\n\t\t\t}\n\t\t\tluaState.setGlobal(variableName);\n\t\t}\n\t}",
"public Binding getBinding() { \n\t\tif (myBinding == null) {\n\t\t\tmyBinding = new Binding();\n\t\t}\n\t\treturn myBinding;\n\t}",
"GlobalsType getGlobals();",
"public com.google.protobuf.ProtocolStringList\n getEnvList() {\n return env_.getUnmodifiableView();\n }",
"public abstract int getBindingVariable();",
"@Override\n public com.gensym.util.Symbol getContainingModule() throws G2AccessException {\n java.lang.Object retnValue = getAttributeValue (SystemAttributeSymbols.CONTAINING_MODULE_);\n return (com.gensym.util.Symbol)retnValue;\n }",
"void setBind() {\n for (int i = 1; i < size(); i++) {\n Exp f = get(i);\n if (f.isFilter() && f.size() > 0) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND\n // no bind (?x = ?y) in case of JOIN\n && (!Query.testJoin || bind.isBindCst())) {\n int j = i - 1;\n while (j > 0 && get(j).isFilter()) {\n j--;\n }\n if (j >= 0) {\n Exp g = get(j);\n if ((g.isEdge() || g.isPath())\n && (bind.isBindCst() ? g.bind(bind.first().getNode()) : true)) {\n bind.status(true);\n g.setBind(bind);\n }\n }\n }\n }\n }\n }",
"public String[] getLocalVariables() {\r\n return scope != null? scope.getLocalVariables() : null;\r\n }",
"public Local[] getRegisterLocals() {\n return registerLocals;\n }",
"@Override\n public Set<ModuleReference> findAll() {\n while (hasNextEntry()) {\n scanNextEntry();\n }\n return cachedModules.values().stream().collect(Collectors.toSet());\n }",
"public Hashtable<String, TenantBindingType> getTenantBindings(boolean includeDisabled) {\n \t\treturn includeDisabled ? allTenantBindings : enabledTenantBindings;\n \t}",
"IIndexFragmentBinding[] findBindings(char[][] names, IndexFilter filter, IProgressMonitor monitor) throws CoreException;",
"public int getAdditionalBindingsCount() {\n return instance.getAdditionalBindingsCount();\n }",
"Expression getBindingExpression();",
"IIndexFragmentBinding[] findBindings(Pattern[] patterns, boolean isFullyQualified, IndexFilter filter, IProgressMonitor monitor) throws CoreException;",
"public int getBindingCount() { List bindings = getBindings(false); return bindings!=null? bindings.size() : 0; }",
"private void addGetChildBindings() {\n\t\tthis.pathBindingClass.addImports(Binding.class, List.class);\n\t\tGMethod children = this.pathBindingClass.getMethod(\"getChildBindings\").returnType(\"List<Binding<?>>\")\n\t\t\t\t.addAnnotation(\"@Override\");\n\t\tchildren.body.line(\"List<Binding<?>> bindings = new java.util.ArrayList<Binding<?>>();\");\n\t\tfor (String foundSubBinding : this.foundSubBindings) {\n\t\t\tchildren.body.line(\"bindings.add(this.{}());\", foundSubBinding);\n\t\t}\n\t\tchildren.body.line(\"return bindings;\");\n\t}",
"public interface YCoolBindings {\n /**\n * The porpouse of this method is to store any bind, because depending on\n * the circunstances it can be caught by garbadge collector.\n * @param bind_name Binding name\n * @param bind Bind itself\n */\n public void yAddBind(String bind_name, ObservableValue<? extends Number> bind);\n\n /**\n * @param pivo The porcentage point of the object, for example, 0 is the\n * leftmost point of the object, 0.5 is the middle and 1 is the rightmost\n * point (it is not limited from 0 to 1, you can go further).\n * @return A DoubleBinding that is linked to the X location of the object, in\n * other words, whenever the X location of the object changes, the\n * DoubleBinding will change automaticaly with it. (this bind is linked to\n * the X location but the opposite is not true).\n */\n public DoubleBinding yTranslateXbind(double pivo);\n\n /**\n * @param pivo The porcentage point of the object, for example, 0 is the\n * upper point of the object, 0.5 is the middle and 1 is the bottom point (it\n * is not limited from 0 to 1, you can go further).\n * @return A DoubleBinding that is linked to the Y location of the object, in\n * other words, whenever the Y location of the object changes, the\n * DoubleBinding will change automaticaly with it. (this bind is linked to\n * the Y location but the opposite is not true).\n */\n public DoubleBinding yTranslateYbind(double pivo);\n\n /**\n * Links the X position of the object with an observable value, so whenever\n * it changes, the object's X position will change too.\n *\n * @param bind_name The name for this link.\n * @param X The observable value to link the object's X position.\n * @param pivo The porcentage point of the object, for example, 0 is the\n * leftmost point of the object, 0.5 is the middle and 1 is the rightmost\n * point (it is not limited from 0 to 1, you can go further).\n */\n public void yBindTranslateX(String bind_name, ObservableValue<? extends Number> X, double pivo);\n\n /**\n * Links the Y position of the object with an observable value, so whenever\n * it changes, the object's Y position will change too.\n *\n * @param bind_name The name for this link.\n * @param Y The observable value to link the object's Y position.\n * @param pivo The porcentage point of the object, for example, 0 is the\n * upper point of the object, 0.5 is the middle and 1 is the bottom point (it\n * is not limited from 0 to 1, you can go further).\n */\n public void yBindTranslateY(String bind_name, ObservableValue<? extends Number> Y, double pivo);\n\n /**\n * @param stroke_included If you want the stroke of the object to be part of\n * the new width, mark this as true.\n * @return A DoubleBinding that is linked to the width of the object, in\n * other words, whenever the width of the object changes, the DoubleBinding\n * will change automaticaly with it. (this bind is linked to the width but\n * the opposite is not true).\n */\n public DoubleBinding yWidthBind(boolean stroke_included);\n\n /**\n * @param stroke_included If you want the stroke of the object to be part of\n * the new height, mark this as true.\n * @return A DoubleBinding that is linked to the height of the object, in\n * other words, whenever the height of the object changes, the DoubleBinding\n * will change automaticaly with it. (this bind is linked to the height but\n * the opposite is not true).\n */\n public DoubleBinding yHeightBind(boolean stroke_included);\n\n /**\n * Links the width of the object with an observable value, so whenever it\n * changes, the object's width will change too.\n *\n * @param bind_name The name for this link.\n * @param width The observable value to link the object's width.\n * @param stroke_included If you want the stroke of the object to be part of\n * the new width, mark this as true.\n */\n public void yBindWidth(String bind_name, ObservableValue<? extends Number> width, boolean stroke_included);\n\n /**\n * Links the height of the object with an observable value, so whenever it\n * changes, the object's height will change too.\n *\n * @param bind_name The name for this link.\n * @param height The observable value to link the object's height.\n * @param stroke_included If you want the stroke of the object to be part of\n * the new height, mark this as true.\n */\n public void yBindHeight(String bind_name, ObservableValue<? extends Number> height, boolean stroke_included);\n\n /**\n * Breaks any bind created previously based on the name of the bind.\n * @param bind_name Name of the bind to be broken.\n */\n public void yUnbind(String bind_name);\n}",
"public void listAccessBindings(yandex.cloud.api.access.Access.ListAccessBindingsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.access.Access.ListAccessBindingsResponse> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAccessBindingsMethod(), responseObserver);\n }",
"synchronized List<Module> getModules()\n {\n return m_modules;\n }",
"public void listAccessBindings(yandex.cloud.api.access.Access.ListAccessBindingsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.access.Access.ListAccessBindingsResponse> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getListAccessBindingsMethod(), getCallOptions()), request, responseObserver);\n }",
"public List<String> getAngularVariables()\n {\n if (angularVariables == null)\n {\n angularVariables = new ArrayList<>();\n }\n return angularVariables;\n }",
"public PeerBuilder bindings(Bindings bindings) {\n\t\tthis.bindings = bindings;\n\t\treturn this;\n\t}",
"public DagEdge getLvalBinding(DagEdge input, Bindings bindings) {\n if (_varName == null) {\n DagEdge current = bindings.getBinding(\"#\", Bindings.LOCAL);\n if (current != null) return current;\n return input;\n }\n DagEdge current = bindings.getBinding(_varName, getType());\n if (current == null && getType() == Bindings.GLOBAL) {\n // create a new global variable\n current = new DagEdge((short)-1, new DagNode());\n bindings.bind(_varName, current, getType());\n }\n if (current == null) {\n logger.warn(\"local variable not bound and used as lval \" + _varName);\n }\n return current;\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 209,\n FQN=\"llvm::Module::getGlobalVariable\", NM=\"_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\")\n //</editor-fold>\n public GlobalVariable /*P*/ getGlobalVariable(StringRef Name) {\n return getGlobalVariable(Name, false);\n }",
"public Term bind(Term[] binding)\n {\n return this;\n }",
"public java.util.List<? extends com.google.api.HttpRuleOrBuilder> \n getAdditionalBindingsOrBuilderList() {\n return additionalBindings_;\n }",
"public List<GlobalStateDataControl> getGlobalStates( ) {\r\n\r\n return globalStatesDataControlList;\r\n }",
"public Map getENC()\n throws NamingException\n {\n // save context classloader\n Thread thread= Thread.currentThread();\n ClassLoader lastContextLoader= thread.getContextClassLoader();\n \n //set the classloader up as this webapp's loader\n thread.setContextClassLoader(getClassLoader());\n Map map = null;\n try\n {\n map = Util.flattenBindings ((Context)_initialCtx.lookup(\"java:comp\"), \"env\");\n }\n finally\n {\n //replace the classloader\n thread.setContextClassLoader(lastContextLoader);\n }\n \n return map;\n }",
"public com.google.api.HttpRule getAdditionalBindings(int index) {\n return additionalBindings_.get(index);\n }",
"public ParameterDefinitionGrammarAccess.ParamDefRepoImportElements getParamDefRepoImportAccess() {\n\t\treturn gaParameterDefinition.getParamDefRepoImportAccess();\n\t}",
"public BindingOperation getBindingOp() {\n return bindingOp;\n }",
"public List<AModule> getModules()\n\t{\n\t\treturn new ArrayList<>(modules.values());\n\t}",
"public void bind() {\n }",
"public ConcurrentMap<String, ServiceDef> getLocalRoutingTable() {\n return registry;\n }",
"String getBindAddress() {\n return bindAddress;\n }",
"public String[] getRegisters() {\r\n return scope != null? scope.getRegisters() : null;\r\n }",
"protected List<Object> getModules() {\n return new ArrayList<>();\n }",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> updateAccessBindings(\n yandex.cloud.api.access.Access.UpdateAccessBindingsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getUpdateAccessBindingsMethod(), getCallOptions()), request);\n }",
"public void executeBindings() {\n synchronized (this) {\n long j = this.aot;\n this.aot = 0;\n }\n }",
"public void executeBindings() {\n synchronized (this) {\n long j = this.aot;\n this.aot = 0;\n }\n }",
"public void executeBindings() {\n synchronized (this) {\n long j = this.aot;\n this.aot = 0;\n }\n }",
"public final PythonParser.global_stmt_return global_stmt() throws RecognitionException {\n PythonParser.global_stmt_return retval = new PythonParser.global_stmt_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token GLOBAL121=null;\n Token COMMA122=null;\n Token n=null;\n List list_n=null;\n\n PythonTree GLOBAL121_tree=null;\n PythonTree COMMA122_tree=null;\n PythonTree n_tree=null;\n RewriteRuleTokenStream stream_NAME=new RewriteRuleTokenStream(adaptor,\"token NAME\");\n RewriteRuleTokenStream stream_GLOBAL=new RewriteRuleTokenStream(adaptor,\"token GLOBAL\");\n RewriteRuleTokenStream stream_COMMA=new RewriteRuleTokenStream(adaptor,\"token COMMA\");\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:5: ( GLOBAL n+= NAME ( COMMA n+= NAME )* -> ^( GLOBAL[$GLOBAL, actions.makeNames($n)] ) )\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:7: GLOBAL n+= NAME ( COMMA n+= NAME )*\n {\n GLOBAL121=(Token)match(input,GLOBAL,FOLLOW_GLOBAL_in_global_stmt3265); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_GLOBAL.add(GLOBAL121);\n\n n=(Token)match(input,NAME,FOLLOW_NAME_in_global_stmt3269); if (state.failed) return retval; \n if ( state.backtracking==0 ) stream_NAME.add(n);\n\n if (list_n==null) list_n=new ArrayList();\n list_n.add(n);\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:22: ( COMMA n+= NAME )*\n loop59:\n do {\n int alt59=2;\n int LA59_0 = input.LA(1);\n\n if ( (LA59_0==COMMA) ) {\n alt59=1;\n }\n\n\n switch (alt59) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:850:23: COMMA n+= NAME\n \t {\n \t COMMA122=(Token)match(input,COMMA,FOLLOW_COMMA_in_global_stmt3272); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_COMMA.add(COMMA122);\n\n \t n=(Token)match(input,NAME,FOLLOW_NAME_in_global_stmt3276); if (state.failed) return retval; \n \t if ( state.backtracking==0 ) stream_NAME.add(n);\n\n \t if (list_n==null) list_n=new ArrayList();\n \t list_n.add(n);\n\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop59;\n }\n } while (true);\n\n\n\n // AST REWRITE\n // elements: GLOBAL\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n if ( state.backtracking==0 ) {\n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (PythonTree)adaptor.nil();\n // 851:4: -> ^( GLOBAL[$GLOBAL, actions.makeNames($n)] )\n {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:851:7: ^( GLOBAL[$GLOBAL, actions.makeNames($n)] )\n {\n PythonTree root_1 = (PythonTree)adaptor.nil();\n root_1 = (PythonTree)adaptor.becomeRoot(new Global(GLOBAL, GLOBAL121, actions.makeNames(list_n)), root_1);\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 if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }",
"public interface KeyBindingContext extends SoliloquyClass {\n /**\n * @return A List of the KeyBindings in this context\n */\n List<KeyBinding> bindings();\n\n /**\n * @return True, if and only if all lower contexts' bindings are blocked\n */\n boolean getBlocksAllLowerBindings();\n\n /**\n * @param blocksLowerBindings Sets whether all lower contexts' bindings are blocked\n */\n void setBlocksAllLowerBindings(boolean blocksLowerBindings);\n}",
"public void setGlobalVariables(GlobalVariables globalVariables);",
"public static FunctionRegistry get() {\n FunctionRegistry reg = get(ARQ.getContext());\n if ( reg == null ) {\n Log.warn(FunctionRegistry.class, \"Standard function registry should already have been initialized\");\n init();\n reg = get(ARQ.getContext());\n }\n\n return reg;\n }",
"public Binding getBinding(int anIndex) { return getBindings(true).get(anIndex); }",
"public Collection<Module> getModules() {\n\t\treturn this._modules.values();\n\t}",
"public static servicegroupbindings get(nitro_service service, String servicegroupname) throws Exception{\n\t\tservicegroupbindings obj = new servicegroupbindings();\n\t\tobj.set_servicegroupname(servicegroupname);\n\t\tservicegroupbindings response = (servicegroupbindings) obj.get_resource(service);\n\t\treturn response;\n\t}",
"@NonNull\n public final AutoRef<TBinding> getBinding() throws ReferenceNullException {\n return AutoRef.of(_binding);\n }"
]
| [
"0.65662545",
"0.6373434",
"0.6277839",
"0.6008182",
"0.60000557",
"0.5626408",
"0.5600074",
"0.55929476",
"0.5450332",
"0.54446805",
"0.5429208",
"0.54170424",
"0.5403247",
"0.53969496",
"0.5317704",
"0.52797",
"0.5251534",
"0.52092",
"0.5180869",
"0.51276195",
"0.51119393",
"0.51053774",
"0.5077586",
"0.49823692",
"0.49608177",
"0.4956662",
"0.49488974",
"0.4938055",
"0.49029356",
"0.48974335",
"0.48847157",
"0.4843578",
"0.4827628",
"0.48133945",
"0.48094836",
"0.4776662",
"0.4760431",
"0.4760431",
"0.4751433",
"0.47485727",
"0.4748433",
"0.4740667",
"0.47288057",
"0.47288057",
"0.4706964",
"0.46987128",
"0.46632233",
"0.46465743",
"0.4640435",
"0.46364394",
"0.4601634",
"0.45913926",
"0.45816624",
"0.45680663",
"0.4558882",
"0.45506114",
"0.4548687",
"0.45476383",
"0.4515793",
"0.4514324",
"0.4513262",
"0.45012668",
"0.44930366",
"0.44859532",
"0.4483581",
"0.4473226",
"0.44703838",
"0.44266412",
"0.44219413",
"0.4419689",
"0.44129047",
"0.4381528",
"0.4376864",
"0.43742278",
"0.43701228",
"0.43700188",
"0.43549198",
"0.4353965",
"0.43502498",
"0.4338777",
"0.43383145",
"0.43329954",
"0.43260115",
"0.43227395",
"0.43225235",
"0.43194047",
"0.43188146",
"0.43182683",
"0.4305556",
"0.43013105",
"0.43013105",
"0.43013105",
"0.42997724",
"0.4294837",
"0.4293973",
"0.42931005",
"0.4284387",
"0.42833287",
"0.42831388",
"0.42805654"
]
| 0.5484934 | 8 |
Returns a map of bindings that are exported (i.e. symbols declared using `=` and `def`, but not `load`). TODO(adonovan): whether bindings are exported should be decided by the resolver; nonexported bindings should never be added to the module. Delete this. | public ImmutableMap<String, Object> getExportedGlobals() {
ImmutableMap.Builder<String, Object> result = new ImmutableMap.Builder<>();
for (Map.Entry<String, Object> entry : globals.entrySet()) {
if (exportedGlobals.contains(entry.getKey())) {
result.put(entry);
}
}
return result.build();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Map<String, FileModule> getSymbolMap() {\n Map<String, FileModule> out = new LinkedHashMap<>();\n for (FileModule module : fileToModule.values()) {\n for (String symbol : module.importedNamespacesToSymbols.keySet()) {\n out.put(symbol, module);\n }\n }\n return out;\n }",
"private Map<String, Object> collectGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n MethodLibrary.addBindingsToBuilder(envBuilder);\n Runtime.addConstantsToBuilder(envBuilder);\n return envBuilder.build();\n }",
"public Map<Integer, String> getAllBindingNamespaces()\n {\n Map<Integer, String> allNs = new HashMap<Integer, String>();\n \n for (BindingExpression be : bindingExpressions)\n {\n if (be.getNamespaces() != null)\n {\n allNs.putAll(be.getNamespaces());\n }\n }\n \n return allNs;\n }",
"public Map<String, Object> getGlobals() {\n return Collections.unmodifiableMap(globals);\n }",
"public Map<String, Object> getTransitiveBindings() {\n // Can't use ImmutableMap.Builder because it doesn't allow duplicates.\n LinkedHashMap<String, Object> env = new LinkedHashMap<>();\n env.putAll(Starlark.UNIVERSE);\n env.putAll(predeclared);\n env.putAll(globals);\n return env;\n }",
"public HashMap<IClassDefinition, BindingDatabase> getBindingMap(){\n return bindingMap;\n }",
"public Iterator getBindings() {\r\n\t\treturn bindings == null ? EmptyStructures.EMPTY_ITERATOR : new ReadOnlyIterator(bindings.values());\r\n\t}",
"public Map<String, Set<String>> exportedPackagesToOpen() {\n return exportedPackagesToOpen;\n }",
"boolean hasExports() {\n return !exportedNamespacesToSymbols.isEmpty();\n }",
"public static void addNameBindings (Map<String, Object> namesToExport)\n\t{\n\t\tfor (Entry<String, Object> entry : namesToExport.entrySet ())\n\t\t{\n\t\t\tm_interpreter.set (entry.getKey (), entry.getValue ());\n\t\t}\n\t}",
"public Set getExports(Resource referenced) {\n \n \t\tMap exportsMap = getExportsMap(referenced);\n \n \t\tif (exportsMap != null) {\n \t\t\treturn Collections.unmodifiableSet(exportsMap.keySet());\n \t\t} else {\n \t\t\treturn Collections.EMPTY_SET;\n \t\t}\n \t}",
"public Map<String, Object> getGlobals() {\n return globals;\n }",
"@Override\n public Set<String> getNames() {\n // TODO(adonovan): for now, the resolver treats all predeclared/universe\n // and global names as one bucket (Scope.PREDECLARED). Fix that.\n // TODO(adonovan): opt: change the resolver to request names on\n // demand to avoid all this set copying.\n HashSet<String> names = new HashSet<>();\n for (Map.Entry<String, Object> bind : getTransitiveBindings().entrySet()) {\n if (bind.getValue() instanceof FlagGuardedValue) {\n continue; // disabled\n }\n names.add(bind.getKey());\n }\n return names;\n }",
"public Map<ExportGroup, Boolean> getRpExportGroupMap() {\n if (_rpExportGroupMap == null) {\n _rpExportGroupMap = new HashMap<ExportGroup, Boolean>();\n }\n \n return _rpExportGroupMap;\n }",
"@Transient\r\n\tpublic Map<String, Object> getLookups() {\r\n\t\tMap<String,Object> map = new HashMap<String,Object>();\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ID, getId());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_DOCUMENT, getRegistry().getDocument());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_NAME, getRegistry().getName());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_SURNAME, getRegistry().getSurname());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ALIAS, getRegistry().getAlias());\r\n return map;\r\n\t}",
"public static List<VariableDeclaration> getBindingManagementVars()\n {\n return FrameworkDefs.bindingManagementVars; \n }",
"@JsonProperty(\"exports\")\n public List<ExportBase> getExports() {\n return exports;\n }",
"@Nonnull\n SystemScriptBindings getBindings();",
"public Map getKeyMethodMap() {\r\n\t\tMap map = new HashMap();\r\n\r\n\t\tString pkg = this.getClass().getPackage().getName();\r\n\t\tResourceBundle methods = ResourceBundle.getBundle(pkg\r\n\t\t\t\t+ \".LookupMethods\");\r\n\r\n\t\tEnumeration keys = methods.getKeys();\r\n\r\n\t\twhile (keys.hasMoreElements()) {\r\n\t\t\tString key = (String) keys.nextElement();\r\n\t\t\tmap.put(key, methods.getString(key));\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}",
"public Map<String, Object> getBzlGlobals() {\n return bzlGlobals;\n }",
"Map<String, RemoteModule> allModulesByKey();",
"public Map<String, String> getPointBindings() {\n return pointBindings;\n }",
"public List<Module> unloadedButAvailableModules() {\n \t\tArrayList<Module> returned = new ArrayList<Module>();\n \t\treturned.addAll(_availableModules);\n \t\tfor (Enumeration<FlexoModule> e = loadedModules(); e.hasMoreElements();) {\n \t\t\treturned.remove(e.nextElement().getModule());\n \t\t}\n \t\treturn returned;\n \t}",
"private Map getExportsMap(Resource resource) {\n \t\treturn (Map) exports.get(resource);\n \t}",
"default Map<DependencyDescriptor, Set<DependencyDescriptor>> getDependencies() {\n return Collections.emptyMap();\n }",
"public Map getENC()\n throws NamingException\n {\n // save context classloader\n Thread thread= Thread.currentThread();\n ClassLoader lastContextLoader= thread.getContextClassLoader();\n \n //set the classloader up as this webapp's loader\n thread.setContextClassLoader(getClassLoader());\n Map map = null;\n try\n {\n map = Util.flattenBindings ((Context)_initialCtx.lookup(\"java:comp\"), \"env\");\n }\n finally\n {\n //replace the classloader\n thread.setContextClassLoader(lastContextLoader);\n }\n \n return map;\n }",
"public static HashMap<String, List<String>> getExtensionsFromBindings(\n String exp)\n {\n HashMap<String, List<String>> bindingsMap = \n new HashMap<>();\n bindingsMap.put(SYS, parseExpression(SYS_PREFIX, exp));\n bindingsMap.put(USER, parseExpression(USER_PREFIX, exp));\n return bindingsMap;\n }",
"@Override\n\t public Set<Symbol> getSymbols() {\n\t return Collections.unmodifiableSet(symbols);\n\t }",
"public Map<String, PackageDesc> getPackagesInstalled() {\n\teval(ANS + \"=pkg('list');\");\n\t// TBC: why ans=necessary??? without like pkg list .. bug? \n\tOctaveCell cell = get(OctaveCell.class, ANS);\n\tint len = cell.dataSize();\n\tMap<String, PackageDesc> res = new HashMap<String, PackageDesc>();\n\tPackageDesc pkg;\n\tfor (int idx = 1; idx <= len; idx++) {\n\t pkg = new PackageDesc(cell.get(OctaveStruct.class, 1, idx));\n\t res.put(pkg.name, pkg);\n\t}\n\treturn res;\n }",
"public Map<Object, Object> getGlobalMap() {\n return Collections.unmodifiableMap(globalMap);\n }",
"static Map<String, Handlers> getIntentMap()\n\t{\n\t\tMap<String, Handlers> h_map = new HashMap<>();\n\t\t\n\t\t\n\t\th_map.put (ADDRESS_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (ADDRESS_ASSOCIATE , Handlers.LINK_CREATE);\n\t\th_map.put (ADDRESS_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (EVENT_ADD , Handlers.NODE_CREATE_AND_LINK);\n\t\th_map.put (EVENT_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (GROUP_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_MEMBER_ADD , Handlers.LINK_CREATE);\n\t\th_map.put (GROUP_MEMBER_DELETE, Handlers.LINK_DELETE);\n\t\th_map.put (PERSON_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (PERSON_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (SUBSCRIPTION_ADD , Handlers.NODE_CREATE_AND_MULTILINK);\n\t\th_map.put (SUBSCRIPTION_DELETE, Handlers.NODE_DELETE);\n\t\th_map.put (USER_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (USER_REGISTER , Handlers.REGISTER_USER);\n\n\t\treturn h_map;\n\t}",
"private Collection getPackagesProvidedBy(BundlePackages bpkgs) {\n ArrayList res = new ArrayList();\n // NYI Improve the speed here!\n for (Iterator i = bpkgs.getExports(); i.hasNext();) {\n ExportPkg ep = (ExportPkg) i.next();\n if (ep.pkg.providers.contains(ep)) {\n res.add(ep);\n }\n }\n return res;\n }",
"public final Map<String, Object> getInternalMap() {\n\t\treturn values;\n\t}",
"public Collection<Module> getModules() {\n\t\treturn this._modules.values();\n\t}",
"public static Map<String, String> filterGlobalTypes(final String packageName,\n final Imports imports,\n final Map<String, String> packageGlobalTypes) {\n final Map<String, String> scopedGlobalTypes = new HashMap<String, String>();\n for (Map.Entry<String, String> e : packageGlobalTypes.entrySet()) {\n final String globalQualifiedType = e.getValue();\n final String globalPackageName = getPackageName(globalQualifiedType);\n final String globalTypeName = getTypeName(globalQualifiedType);\n\n if (globalPackageName.equals(packageName) || isImported(globalQualifiedType,\n imports)) {\n scopedGlobalTypes.put(e.getKey(),\n globalTypeName);\n }\n }\n return scopedGlobalTypes;\n }",
"@Override\n\tpublic String getBindingTypes() {\n\t\treturn null;\n\t}",
"public Map<Integer, String> getMacrosses() {\n\t\treturn Collections.unmodifiableMap(macrosses);\n\t}",
"public void backupBindings(TableRep bindings) throws RemoteException, Error;",
"public Collection<IRequestHandler<?>> getRegisteredValues() {\n return registry.values();\n }",
"public Map<InjectionSite, Injectable> getInjectionSites() {\n return injectionSites;\n }",
"public String getAllBindingNamespaceDeclarations() \t \n { \t \n return BindingExpression.getNamespaceDeclarations(getAllBindingNamespaces()); \t \n }",
"public HashMap<String, Fraction> getSymbolTable() {\n\n\t\treturn symbolTable;\n\t}",
"private Map<String, TestModuleHolder> getTestModules() {\n\t\treturn testModuleSupplier.get();\n\t}",
"private synchronized static Map getListeners() {\n\t\tif (registeredListeners == null) {\n\t\t\tregisteredListeners = Collections.synchronizedMap(new HashMap());\n\t\t}\n\t\treturn registeredListeners;\n\t}",
"public java.lang.String[] getBindingKey() {\r\n return bindingKey;\r\n }",
"public ImportsCollection()\n {\n normalImports = new HashMap();\n wildcardImports = new ArrayList();\n staticWildcardImports = new ArrayList(); \n staticImports = new HashMap();\n }",
"public Map getActorStateVariables() {\r\n\t\treturn actorEnv.localBindings();\r\n\t}",
"public Map<String, ModuleDTO> getModuleNameToDtoMap() {\n\t\treturn moduleNameToDtoMap;\n\t}",
"public Map getWebServiceModules() {\n Map map = new HashMap();\n\n // admin config context\n ConfigContext configCtx = AdminService.getAdminService().\n getAdminContext().getAdminConfigContext();\n\n CacheMgr mgr = CacheMgr.getInstance();\n\n // j2ee application\n Map apps = mgr.getJ2eeApplications();\n Collection aValues = apps.values();\n for (Iterator iter=aValues.iterator(); iter.hasNext();) {\n J2eeApplication app = (J2eeApplication) iter.next();\n\n // ejb bundles\n List ejbBundles = app.getEjbBundles();\n if (ejbBundles != null) {\n for (Iterator itr=ejbBundles.iterator(); itr.hasNext();) {\n String ejb = (String) itr.next();\n try {\n Map m = getEjbBundleInfo(configCtx, app.getName(), ejb);\n map.put(m.get(WebServiceInfoProvider.\n SUN_EJB_JAR_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n }\n\n // web bundles \n List webBundles = app.getWebBundles();\n if (webBundles != null) {\n for (Iterator itr=webBundles.iterator(); itr.hasNext();) {\n String web = (String) itr.next();\n try {\n Map m = getWebBundleInfo(configCtx, app.getName(), web);\n map.put(m.get(WebServiceInfoProvider.\n SUN_WEB_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n }\n }\n\n // stand alone ejb module\n Map ejbs = mgr.getEjbModules();\n Collection eValues = ejbs.values();\n for (Iterator iter=eValues.iterator(); iter.hasNext();) {\n String ejbMod = (String) iter.next();\n try {\n Map m = getEjbModuleInfo(configCtx, ejbMod);\n map.put(m.get(WebServiceInfoProvider.\n SUN_EJB_JAR_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n\n // stand alone web module\n Map webs = mgr.getWebModules();\n Collection wValues = webs.values();\n for (Iterator iter=wValues.iterator(); iter.hasNext();) {\n String webMod = (String) iter.next();\n\n try {\n Map m = getWebModuleInfo(configCtx, webMod);\n map.put(m.get(WebServiceInfoProvider.\n SUN_WEB_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n\n return map;\n }",
"private SymbolData[]\n\t\t\tmakeSymbolMap(Map<StandardSymbolData, JsName> symbolTable) {\n\t\tfinal Set<String> nameUsed = new HashSet<String>();\n\t\tfinal Map<JsName, Integer> nameToFragment = new HashMap<JsName, Integer>();\n\t\tfor (int i = 0; i < jsProgram.getFragmentCount(); i++) {\n\t\t\tfinal Integer fragId = i;\n\t\t\tnew JsVisitor() {\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsForIn x, JsContext ctx) {\n\t\t\t\t\tif (x.getIterVarName() != null) {\n\t\t\t\t\t\tnameUsed.add(x.getIterVarName().getIdent());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsFunction x, JsContext ctx) {\n\t\t\t\t\tif (x.getName() != null) {\n\t\t\t\t\t\tnameToFragment.put(x.getName(), fragId);\n\t\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsLabel x, JsContext ctx) {\n\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsNameOf x, JsContext ctx) {\n\t\t\t\t\tif (x.getName() != null) {\n\t\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsNameRef x, JsContext ctx) {\n\t\t\t\t\t// Obviously this isn't even that accurate. Some of them are\n\t\t\t\t\t// variable names, some of the are property. At least this\n\t\t\t\t\t// this give us a safe approximation. Ideally we need\n\t\t\t\t\t// the code removal passes to remove stuff in the scope\n\t\t\t\t\t// objects.\n\t\t\t\t\tif (x.isResolved()) {\n\t\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsParameter x, JsContext ctx) {\n\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void endVisit(JsVars.JsVar x, JsContext ctx) {\n\t\t\t\t\tnameUsed.add(x.getName().getIdent());\n\t\t\t\t\t// alcina - add classlits to name/fragment\n\t\t\t\t\tif (x.getName().getIdent().startsWith(\n\t\t\t\t\t\t\t\"com_google_gwt_lang_ClassLiteralHolder_\")) {\n\t\t\t\t\t\tnameToFragment.put(x.getName(), fragId);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}.accept(jsProgram.getFragmentBlock(i));\n\t\t}\n\t\t// TODO(acleung): This is a temp fix. Once we know this is safe. We\n\t\t// new to rewrite it to avoid extra ArrayList creations.\n\t\t// Or we should just consider serializing it as an ArrayList if\n\t\t// it is that much trouble to determine the true size.\n\t\tList<SymbolData> result = new ArrayList<SymbolData>();\n\t\tfor (Map.Entry<StandardSymbolData, JsName> entry : symbolTable\n\t\t\t\t.entrySet()) {\n\t\t\tStandardSymbolData symbolData = entry.getKey();\n\t\t\tsymbolData.setSymbolName(entry.getValue().getShortIdent());\n\t\t\tInteger fragNum = nameToFragment.get(entry.getValue());\n\t\t\tif (fragNum != null) {\n\t\t\t\tsymbolData.setFragmentNumber(fragNum);\n\t\t\t}\n\t\t\tif (nameUsed.contains(entry.getValue().getIdent())\n\t\t\t\t\t|| entry.getKey().isClass()) {\n\t\t\t\tresult.add(symbolData);\n\t\t\t}\n\t\t}\n\t\treturn result.toArray(new SymbolData[result.size()]);\n\t}",
"public Map<HandlerRegistryInfo, PhaseHandler> getHandlers() {\r\n return this.delegate.getHandlers();\r\n }",
"public Map<String, Set<String>> getDependencies() {\n return new HashMap<String, Set<String>>(dependencies);\n }",
"public void removeOwnKeyBindings() {\n getPolymerElement().removeOwnKeyBindings();\n }",
"public static String[] getHttpExportURLs() {\n\t\tif (xml == null) return new String[0];\n\t\treturn httpExportURLs;\n\t}",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.access.Access.ListAccessBindingsResponse> listAccessBindings(\n yandex.cloud.api.access.Access.ListAccessBindingsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getListAccessBindingsMethod(), getCallOptions()), request);\n }",
"public boolean hasExports(ImmutableNodeInst originalNode) {\n int startIndex = searchExportByOriginalPort(originalNode.nodeId, 0);\n if (startIndex >= exportIndexByOriginalPort.length) return false;\n ImmutableExport e = exportIndexByOriginalPort[startIndex];\n return e.originalNodeId == originalNode.nodeId;\n }",
"public java.util.Map<java.lang.String, java.security.cert.Extension> getExtensions() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: sun.security.x509.X509CRLEntryImpl.getExtensions():java.util.Map<java.lang.String, java.security.cert.Extension>, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.getExtensions():java.util.Map<java.lang.String, java.security.cert.Extension>\");\n }",
"default Map<DependencyDescriptor, Set<DependencyDescriptor>> getTestDependencies() {\n return Collections.emptyMap();\n }",
"protected List <Binding> getBindings(boolean doCreate)\n{\n List <Binding> bindings = (List)get(\"RibsBindings\");\n if(bindings==null && doCreate)\n put(\"RibsBindings\", bindings = new ArrayList());\n return bindings;\n}",
"public static IllegalAccessMaps generate(ModuleFinder finder) {\n Map<String, ModuleDescriptor> map = new HashMap<>();\n finder.findAll().stream()\n .map(ModuleReference::descriptor)\n .forEach(md -> md.packages().forEach(pn -> map.putIfAbsent(pn, md)));\n\n Map<String, Set<String>> concealedPackagesToOpen = new HashMap<>();\n Map<String, Set<String>> exportedPackagesToOpen = new HashMap<>();\n\n String rn = \"jdk8_packages.dat\";\n InputStream in = IllegalAccessMaps.class.getResourceAsStream(rn);\n if (in == null) {\n throw new InternalError(rn + \" not found\");\n }\n try (BufferedReader br = new BufferedReader(\n new InputStreamReader(in, UTF_8.INSTANCE)))\n {\n br.lines()\n .filter(line -> !line.isEmpty() && !line.startsWith(\"#\"))\n .forEach(pn -> {\n ModuleDescriptor descriptor = map.get(pn);\n if (descriptor != null && !isOpen(descriptor, pn)) {\n String name = descriptor.name();\n if (isExported(descriptor, pn)) {\n exportedPackagesToOpen.computeIfAbsent(name,\n k -> new HashSet<>()).add(pn);\n } else {\n concealedPackagesToOpen.computeIfAbsent(name,\n k -> new HashSet<>()).add(pn);\n }\n }\n });\n\n } catch (IOException ioe) {\n throw new UncheckedIOException(ioe);\n }\n\n return new IllegalAccessMaps(concealedPackagesToOpen, exportedPackagesToOpen);\n }",
"public List<AModule> getModules()\n\t{\n\t\treturn new ArrayList<>(modules.values());\n\t}",
"@SuppressWarnings(\"unchecked\")\n @Override\n public void unexport() {\n String protocolKey = null;\n String ipPort = url.getServerPortStr();\n\n Exporter<T> exporter = (Exporter<T>) exporterMap.remove(protocolKey);\n\n if (exporter != null) {\n exporter.destroy();\n }\n ProviderMessageRouter requestRouter = ipPort2RequestRouter.get(ipPort);\n\n if (requestRouter != null) {\n requestRouter.removeProvider(provider);\n }\n }",
"public List<Function> getGlobalFunctions(String name);",
"Map<String, Defines> getDefinesMap();",
"public List<Identifier> getGlobalVars(){\n final List<Identifier> globs = new ArrayList<>();\n\n globalVariables.keySet().stream()\n .map(x -> new Identifier(Scope.GLOBAL, Type.VARIABLE, x, globalVariables.get(x)))\n .forEach(globs::add);\n\n return globs;\n }",
"@Test\n public void hashcode() {\n final ValueFactory vf = SimpleValueFactory.getInstance();\n final MapBindingSet bSet = new MapBindingSet();\n bSet.addBinding(\"name\", vf.createLiteral(\"alice\"));\n\n final VisibilityBindingSet visSet = new VisibilityBindingSet(bSet);\n final int origHash = visSet.hashCode();\n\n // Add another binding to the binding set and grab the new hash code.\n bSet.addBinding(\"age\", vf.createLiteral(37));\n final int updatedHash = visSet.hashCode();\n\n // Show those hashes are different.\n assertNotEquals(origHash, updatedHash);\n }",
"@Override\n public Set<ModuleReference> findAll() {\n while (hasNextEntry()) {\n scanNextEntry();\n }\n return cachedModules.values().stream().collect(Collectors.toSet());\n }",
"private ImmutableSet<ImmutableSetMultimap<BindingWithoutComponent, Binding>> duplicateBindingSets(\n BindingGraph bindingGraph) {\n return groupBindingsByKey(bindingGraph).stream()\n .flatMap(bindings -> mutuallyVisibleSubsets(bindings).stream())\n .map(BindingWithoutComponent::index)\n .filter(duplicates -> duplicates.keySet().size() > 1)\n .collect(toImmutableSet());\n }",
"public static synchronized Collection<String> values() {\n\t\treturn ClassRegistry.dictionary.values();\n\t}",
"public List<String> getNotExportedSearchableFields() {\n return Collections.unmodifiableList(notExportedSearchableFields);\n }",
"public static boolean isSymbolLookupEnabled() {\n\t\tIPreferenceStore prefs = Activator.getDefault().getPreferenceStore();\n\t\treturn prefs.getBoolean(GHIDRA_SYMBOL_LOOKUP_ENABLED);\n\t}",
"public Map<String, Function> getGlobalFnMap() {\n return getGlobalFnMap(DEFAULT_LOCALE);\n }",
"public Set<String> getRegisteredFunctions();",
"private Map<String, TestModuleHolder> findTestModules() {\n\n\t\tMap<String, TestModuleHolder> testModules = new HashMap<>();\n\n\t\tClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);\n\t\tscanner.addIncludeFilter(new AnnotationTypeFilter(PublishTestModule.class));\n\t\tfor (BeanDefinition bd : scanner.findCandidateComponents(\"io.fintechlabs\")) {\n\t\t\ttry {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tClass<? extends TestModule> c = (Class<? extends TestModule>) Class.forName(bd.getBeanClassName());\n\t\t\t\tPublishTestModule a = c.getDeclaredAnnotation(PublishTestModule.class);\n\n\t\t\t\ttestModules.put(a.testName(), new TestModuleHolder(c, a));\n\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tlogger.error(\"Couldn't load test module definition: \" + bd.getBeanClassName());\n\t\t\t}\n\t\t}\n\n\t\treturn testModules;\n\t}",
"@Override\n\tpublic List<MavenDeployableDescriptor> getDeployableDescriptors() {\n\t\treturn descriptors;\n\t}",
"public Map<ModelObject, InjectionSite> getInjectionSiteMappings() {\n return injectionSiteMapping;\n }",
"public Collection getModulesNames() {\n\t\treturn modulesNames;\n\t}",
"public Map<String, Integer> getBungeeServerProtocols() {\n return get(\"bungee-servers\", Map.class, new HashMap<>());\n }",
"public List<Dim> getGlobals(){\n\t\t\n\t\treturn null;\n\t}",
"private boolean peekExportDeclaration() {\n return peek(TokenType.EXPORT);\n }",
"public Enumeration<FlexoModule> loadedModules() {\n \t\treturn new Vector<FlexoModule>(_modules.values()).elements();\n \t}",
"private static java.util.HashMap<Integer, Command> getMappings() {\n if (mappings == null) {\n synchronized (Command.class) {\n if (mappings == null) {\n mappings = new java.util.HashMap<Integer, Command>();\n }\n }\n }\n return mappings;\n }",
"public interface ExportedPackageHolder {\n\n /**\n * \n * @return the name of the package being exported\n */\n public String getPackageName();\n\n /**\n * \n * @return the <code>Version</code> that the package is exported at as a String.\n */\n public String getVersion();\n \n /**\n * \n * @return the {@link BundleHolder} that provides this <code>ExportedPackageHolder</code>\n */\n public BundleHolder getExportingBundle();\n \n /**\n * \n * @return A list {@link ImportedPackageHolder}s that are consuming this export\n */\n public List<ImportedPackageHolder> getConsumers();\n \n /**\n * Returns the directives for a header.\n * \n * @return a map containing the directives\n */\n Map<String, String> getDirectives();\n\n /**\n * Returns the attributes for a header.\n * \n * @return a map containing the attributes\n */\n Map<String, String> getAttributes();\n \n}",
"private Set<LECCModule> getDependeeModuleSet() {\r\n Set<LECCModule> dependeeModuleSet = new HashSet<LECCModule>();\r\n buildDependeeModuleSet(getModuleTypeInfo(), new HashSet<ModuleName>(), dependeeModuleSet);\r\n \r\n return dependeeModuleSet;\r\n }",
"public static Collection<IExport> getOcilExports(IScapContext ctx) throws OcilException {\r\n \tMap<String, List<String>> qMap = new HashMap<String, List<String>>();\r\n \tMap<String, Variables> vMap = new HashMap<String, Variables>();\r\n \tfor (RuleType rule : ctx.getSelectedRules()) {\r\n \t if (rule.isSetCheck()) {\r\n \t\tfor (CheckType check : rule.getCheck()) {\r\n \t\t addExports(check, ctx, qMap, vMap);\r\n \t\t}\r\n \t } else if (rule.isSetComplexCheck()) {\r\n \t\taddExports(rule.getComplexCheck(), ctx, qMap, vMap);\r\n \t }\r\n \t}\r\n \r\n \t//\r\n \t// Export variables and OCIL XML for each HREF in the context.\r\n \t//\r\n \tCollection<IExport> results = new ArrayList<IExport>();\r\n \tfor (Map.Entry<String, List<String>> entry : qMap.entrySet()) {\r\n \t String href = entry.getKey();\r\n \t try {\r\n \t\tIChecklist checklist = ctx.getOcil(href);\r\n \t\tIVariables vars = vMap.get(href);\r\n \t\tresults.add(new OcilExport(href, checklist, entry.getValue(), vars));\r\n \t } catch (NoSuchElementException e) {\r\n \t\tthrow new OcilException(e);\r\n \t }\r\n \t}\r\n \treturn results;\r\n }",
"synchronized boolean unregisterPackages(List exports, List imports, boolean force) {\n // Check if somebody other than ourselves use our exports\n if (!force) {\n for (Iterator i = exports.iterator(); i.hasNext(); ) {\n ExportPkg ep = (ExportPkg)i.next();\n Pkg p = ep.pkg;\n if (p.providers.contains(ep)) {\n for (Iterator ii = p.importers.iterator(); ii.hasNext(); ) {\n ImportPkg ip = (ImportPkg) ii.next();\n if (ep == ip.provider && ep.bpkgs != ip.bpkgs) {\n if (Debug.packages) {\n Debug.println(\"unregisterPackages: Failed to unregister, \" + ep +\n \" is still in use.\");\n }\n markAsZombies(exports);\n return false;\n }\n }\n\t}\n }\n }\n\n for (Iterator i = exports.iterator(); i.hasNext(); ) {\n ExportPkg ep = (ExportPkg)i.next();\n Pkg p = ep.pkg;\n if (Debug.packages) {\n Debug.println(\"unregisterPackages: unregister export - \" + ep);\n }\n p.removeExporter(ep);\n if (p.isEmpty()) {\n packages.remove(ep.name);\n }\n }\n\n for (Iterator i = imports.iterator(); i.hasNext(); ) {\n ImportPkg ip = (ImportPkg)i.next();\n Pkg p = ip.pkg;\n if (Debug.packages) {\n Debug.println(\"unregisterPackages: unregister import - \" + ip.pkgString());\n }\n p.removeImporter(ip);\n if (p.isEmpty()) {\n packages.remove(ip.name);\n }\n }\n return true;\n }",
"public void listAccessBindings(yandex.cloud.api.access.Access.ListAccessBindingsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.access.Access.ListAccessBindingsResponse> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getListAccessBindingsMethod(), responseObserver);\n }",
"public Map getProtocols();",
"public ConcurrentMap<String, ServiceDef> getLocalRoutingTable() {\n return registry;\n }",
"void index() {\n for (Binding<?> binding : bindings.values()) {\n index(binding);\n }\n }",
"public Hashtable<String, TenantBindingType> getTenantBindings() {\n \t\treturn getTenantBindings(EXCLUDE_CREATE_DISABLED_TENANTS);\n \t}",
"public static HashMap getInterfaces() {\n\t\treturn interfacehashmapAlreadyImpl;\r\n\t\t\r\n\t}",
"private HashSet < Symbol > getUsedSymbols ()\n {\n HashSet < Symbol > symbols = new HashSet < Symbol > ();\n for ( LeafNode l : this.regexNode.getTokenNodes () )\n {\n if ( l instanceof TokenNode )\n {\n TokenNode t = ( TokenNode ) l;\n symbols.add ( new DefaultSymbol ( t.getName () ) );\n }\n }\n return symbols;\n }",
"public yandex.cloud.api.access.Access.ListAccessBindingsResponse listAccessBindings(yandex.cloud.api.access.Access.ListAccessBindingsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getListAccessBindingsMethod(), getCallOptions(), request);\n }",
"public final List<DepFunction> getFunctions() {\n\t\treturn new LinkedList<>(this.functionMap.values());\n\t}",
"public BindState(Set<AccessPath> globalVariableNames) {\n this.stateOnLastFunctionCall = null;\n this.globalDefs =\n addVariables(PathCopyingPersistentTree.<String, BindingPoint>of(), globalVariableNames);\n this.localDefs = new PathCopyingPersistentTree<>();\n }",
"public Map<String, Script> getScriptsMap()\n\t{\n\t\treturn scripts;\n\t}",
"public String getEXPORT_IND() {\r\n return EXPORT_IND;\r\n }",
"public void clear(){\n\t\tMap<?, ?> bindings = m_bindings.getBindings();\n\t\tif (bindings == null) {\n\t\t\tif(log.isInfoEnabled()){\n\t\t\t\tlog.info(\"clear: no bindings!\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\t\tbindings.clear();\t\n\t\tm_bindings.remove();\t\t\n\t}",
"@Override\n\tpublic Map<String, FREFunction> getFunctions() \n\t{\n\t\tLog.d(TAG, \"Registering Extension Functions\");\n\t\tMap<String, FREFunction> functionMap = new HashMap<String, FREFunction>();\n\t\tfunctionMap.put(\"isInstalled\", new IsInstalledFunction());\n\t\tfunctionMap.put(\"shareText\", new ShareTextFunction());\n\t\tfunctionMap.put(\"shareImage\", new ShareImageFunction());\n\t\t// add other functions here\n\t\treturn functionMap;\t\n\t}"
]
| [
"0.61612",
"0.6067853",
"0.58225703",
"0.56969666",
"0.5670086",
"0.566255",
"0.55847424",
"0.55414766",
"0.5448002",
"0.5389605",
"0.53159654",
"0.5290154",
"0.5274019",
"0.52623904",
"0.5256594",
"0.5108667",
"0.5106463",
"0.50880206",
"0.50830823",
"0.50593597",
"0.5026775",
"0.50215495",
"0.49699062",
"0.49551716",
"0.49365786",
"0.4896802",
"0.48917776",
"0.4865928",
"0.47970065",
"0.4795118",
"0.47909644",
"0.4767096",
"0.47588477",
"0.4745913",
"0.47441614",
"0.47230572",
"0.47080085",
"0.4685055",
"0.46780065",
"0.46740076",
"0.4671836",
"0.4662732",
"0.46404648",
"0.46215943",
"0.4619852",
"0.4599152",
"0.45760655",
"0.4575742",
"0.456368",
"0.4546737",
"0.45420578",
"0.45302433",
"0.45125777",
"0.44938284",
"0.44934377",
"0.44837123",
"0.44836974",
"0.4474859",
"0.44697502",
"0.44612384",
"0.44609994",
"0.44576293",
"0.4456928",
"0.44514558",
"0.44500604",
"0.44430688",
"0.44366527",
"0.44323984",
"0.44151264",
"0.44142106",
"0.4413984",
"0.44052148",
"0.4404815",
"0.44033566",
"0.4403149",
"0.43952674",
"0.4393167",
"0.43798903",
"0.43752667",
"0.43750665",
"0.43671983",
"0.43656015",
"0.43639827",
"0.435945",
"0.43561682",
"0.4354527",
"0.43526268",
"0.43297556",
"0.43188334",
"0.43137062",
"0.43132716",
"0.43057188",
"0.43035656",
"0.4300526",
"0.4297197",
"0.42949975",
"0.42945188",
"0.42903268",
"0.42902824",
"0.42899624"
]
| 0.68185264 | 0 |
Implements the resolver's module interface. | @Override
public Set<String> getNames() {
// TODO(adonovan): for now, the resolver treats all predeclared/universe
// and global names as one bucket (Scope.PREDECLARED). Fix that.
// TODO(adonovan): opt: change the resolver to request names on
// demand to avoid all this set copying.
HashSet<String> names = new HashSet<>();
for (Map.Entry<String, Object> bind : getTransitiveBindings().entrySet()) {
if (bind.getValue() instanceof FlagGuardedValue) {
continue; // disabled
}
names.add(bind.getKey());
}
return names;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected interface Resolver {\n\n /**\n * Adjusts a module graph if necessary.\n *\n * @param classLoader The class loader to adjust.\n * @param target The targeted class for which a proxy is created.\n */\n void accept(@MaybeNull ClassLoader classLoader, Class<?> target);\n\n /**\n * An action to create a resolver.\n */\n enum CreationAction implements PrivilegedAction<Resolver> {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n @SuppressFBWarnings(value = \"REC_CATCH_EXCEPTION\", justification = \"Exception should not be rethrown but trigger a fallback.\")\n public Resolver run() {\n try {\n Class<?> module = Class.forName(\"java.lang.Module\", false, null);\n return new ForModuleSystem(Class.class.getMethod(\"getModule\"),\n module.getMethod(\"isExported\", String.class),\n module.getMethod(\"addExports\", String.class, module),\n ClassLoader.class.getMethod(\"getUnnamedModule\"));\n } catch (Exception ignored) {\n return NoOp.INSTANCE;\n }\n }\n }\n\n /**\n * A non-operational resolver for VMs that do not support the module system.\n */\n enum NoOp implements Resolver {\n\n /**\n * The singleton instance.\n */\n INSTANCE;\n\n /**\n * {@inheritDoc}\n */\n public void accept(@MaybeNull ClassLoader classLoader, Class<?> target) {\n /* do nothing */\n }\n }\n\n /**\n * A resolver for VMs that do support the module system.\n */\n @HashCodeAndEqualsPlugin.Enhance\n class ForModuleSystem implements Resolver {\n\n /**\n * The {@code java.lang.Class#getModule} method.\n */\n private final Method getModule;\n\n /**\n * The {@code java.lang.Module#isExported} method.\n */\n private final Method isExported;\n\n /**\n * The {@code java.lang.Module#addExports} method.\n */\n private final Method addExports;\n\n /**\n * The {@code java.lang.ClassLoader#getUnnamedModule} method.\n */\n private final Method getUnnamedModule;\n\n /**\n * Creates a new resolver for a VM that supports the module system.\n *\n * @param getModule The {@code java.lang.Class#getModule} method.\n * @param isExported The {@code java.lang.Module#isExported} method.\n * @param addExports The {@code java.lang.Module#addExports} method.\n * @param getUnnamedModule The {@code java.lang.ClassLoader#getUnnamedModule} method.\n */\n protected ForModuleSystem(Method getModule,\n Method isExported,\n Method addExports,\n Method getUnnamedModule) {\n this.getModule = getModule;\n this.isExported = isExported;\n this.addExports = addExports;\n this.getUnnamedModule = getUnnamedModule;\n }\n\n /**\n * {@inheritDoc}\n */\n @SuppressFBWarnings(value = \"REC_CATCH_EXCEPTION\", justification = \"Exception should always be wrapped for clarity.\")\n public void accept(@MaybeNull ClassLoader classLoader, Class<?> target) {\n Package location = target.getPackage();\n if (location != null) {\n try {\n Object module = getModule.invoke(target);\n if (!(Boolean) isExported.invoke(module, location.getName())) {\n addExports.invoke(module, location.getName(), getUnnamedModule.invoke(classLoader));\n }\n } catch (Exception exception) {\n throw new IllegalStateException(\"Failed to adjust module graph for dispatcher\", exception);\n }\n }\n }\n }\n }",
"public abstract void resolve();",
"void resolve();",
"@Override\r\n\tprotected void doResolve() {\n\r\n\t}",
"private interface CatalogResolver extends URIResolver, EntityResolver {\n @Override\n InputSource resolveEntity(String publicId, String systemId);\n }",
"public static interface Resolver {\n\t\t\n\t\t/**\n\t\t * Registers an injection manager with a resolver.\n\t\t * \n\t\t * The resolver can asynchronously update the relation to modify the\n\t\t * binding.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic void addInjection(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to lazily resolve an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to calculate its initial binding\n\t\t * when it is first accessed.\n\t\t * \n\t\t * The resolver must call back the manager to modify the resolved target.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic boolean resolve(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to remove an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to signify that the\n\t\t * component wants to force the resolution of the relation the next\n\t\t * access\n\t\t * \n\t\t */\n\t\tpublic boolean unresolve(RelationInjectionManager injection);\n\t\t\n\t}",
"public interface Module extends Pluggable {\n\t\n\t/**\n\t * Return the module type. Module type can be a value like Mywork, Support, Cowork, etc.\n\t * @return\n\t */\n\tModuleType type();\n\t\n\t/**\n\t * Return true if the module is in subscription. \n\t * @return true if the module is in subscription\n\t */\n\tboolean isOpened();\n\t\n\t/**\n\t * Return true if the module is enabled by a company administrator.\n\t * @return true if the module is enabled by a company administrator\n\t */\n\tboolean isEnabled();\n\t\n\t/**\n\t * Return the home page uri representing an entry point of module.\n\t * @return the home page uri\n\t */\n\tString home();\n\n\t/**\n\t * Return company and user option information like whether option configuration is provided and option configuration uri if any. \n\t * @return company and user option configuration information\n\t */\n\tModuleOption option();\n\t\n\t/**\n\t * Return volume configuration information\n\t * @return\n\t */\n\tModuleComponent volume();\n\t\n\t/**\n\t * Return statistics information\n\t * @return\n\t */\n\tModuleComponent statistics();\n\t\n\t/**\n\t * Return renderer\n\t */\n\tModuleRenderer render();\n\t\n}",
"@Override synchronized public void resolve()\n{\n if (isResolved()) return;\n\n RebaseMain.logD(\"START RESOLVE\");\n for (RebaseJavaFile jf : file_nodes) {\n RebaseMain.logD(\"FILE: \" + jf.getFile().getFileName());\n }\n\n clearResolve();\n\n RebaseJavaTyper jt = new RebaseJavaTyper(base_context);\n RebaseJavaResolver jr = new RebaseJavaResolver(jt);\n jt.assignTypes(this);\n jr.resolveNames(this);\n\n all_types = new HashSet<RebaseJavaType>(jt.getAllTypes());\n\n setResolved(true);\n}",
"public abstract String resolve();",
"public ResponseContainerModule() {\n\t\tsuper(TYPE_MODULE);\n\t}",
"public interface ResolvableModelicaNode extends ModelicaNode {\n /**\n * Tries to resolve the <b>declaration</b> of the referenced component.\n */\n ResolutionResult getResolutionCandidates();\n}",
"private void resolveExports(Contribution contribution, ModelResolver resolver, ProcessorContext context)\n throws ContributionResolveException {\n for (Export export : contribution.getExports()) {\n if (export instanceof DefaultExport) {\n // Initialize the default export's resolver\n export.setModelResolver(resolver);\n } else {\n extensionProcessor.resolve(export, resolver, context);\n } // end if\n } // end for\n\n }",
"public interface HomeModuleService extends ModuleCall{\n}",
"T resolve();",
"public interface MauModule {\r\n\t/**\r\n\t * Initializes the module and loads all the configurations and everything else that needs to be\r\n\t * loaded.\r\n\t * \r\n\t * @param plugin The hosting instance of Maussentials.\r\n\t */\r\n\tpublic void load(Maussentials plugin);\r\n\t\r\n\t/**\r\n\t * Unload the MauModule.\r\n\t */\r\n\tpublic void unload();\r\n\t\r\n\t/**\r\n\t * @return True, if the module is loaded. False otherwise.\r\n\t */\r\n\tpublic boolean isLoaded();\r\n\t\r\n\t/**\r\n\t * Get the list of module names that this module depends on.\r\n\t */\r\n\tpublic default String[] getDependencies() {\r\n\t\treturn new String[0];\r\n\t}\r\n}",
"Module createModule();",
"protected BackendModule(){ }",
"public abstract String getModuleName( );",
"public static interface Resolver\n {\n Constant resolve(Constant constOrig);\n }",
"public interface RelationInjectionManager extends FieldInterceptor {\n\n\t/**\n\t * The interface of the external resolver that is used to bind this field. \n\t * \n\t */\n\tpublic static interface Resolver {\n\t\t\n\t\t/**\n\t\t * Registers an injection manager with a resolver.\n\t\t * \n\t\t * The resolver can asynchronously update the relation to modify the\n\t\t * binding.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic void addInjection(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to lazily resolve an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to calculate its initial binding\n\t\t * when it is first accessed.\n\t\t * \n\t\t * The resolver must call back the manager to modify the resolved target.\n\t\t * \n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.addTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.removeTarget\n\t\t * @see fr.imag.adele.apam.apform.impl.InterfaceInjectionManager.substituteTarget\n\t\t * \n\t\t */\n\t\tpublic boolean resolve(RelationInjectionManager injection);\n\t\t\n\t\t/**\n\t\t * Request to remove an injection.\n\t\t * \n\t\t * This method is invoked by a injection manager to signify that the\n\t\t * component wants to force the resolution of the relation the next\n\t\t * access\n\t\t * \n\t\t */\n\t\tpublic boolean unresolve(RelationInjectionManager injection);\n\t\t\n\t} \n\n\t/**\n\t * The relation that is managed by this manager\n\t */\n\tpublic abstract RelationDeclaration getRelation();\n\t\n\t/**\n\t * The relation injection that is managed by this manager\n\t */\n\tpublic abstract RequirerInstrumentation getRelationInjection();\n\n\t\n /**\n * Get an XML representation of the state of this injection\n */\n public abstract Element getDescription();\n\n /**\n * The current state of the manager. \n * \n * A specific manager implementation can have dependencies on some platform services that may\n * become unavailable. In that case the translation from APAM action to platform actions is no\n * longer possible; \n */\n \n public abstract boolean isValid();\n \n\t/**\n\t * Adds a new target to this injection\n\t */\n\tpublic abstract void addTarget(Component target);\n\n\t/**\n\t * Removes a target from the injection\n\t * \n\t * @param target\n\t */\n\tpublic abstract void removeTarget(Component target);\n\n\n}",
"ModuleAssembly module( String name );",
"@Override\n public abstract boolean needsResolving();",
"RegistrationModule createRegistrationModule();",
"public interface RepoModule {\n void saveModule(Module module) throws Exception;\n void saveLocalObj(Collection<Module> modules) throws Exception;\n void updateFinalStatus(String vehicleNo) throws Exception;\n void updateFlag(String vehicleNo, String checkPointName) throws Exception;\n void deleteTableData()throws Exception;\n void deleteTableData(String vehicleNo) throws Exception;\n Set<Module> uploadModuleData(String userId) throws Exception;\n Integer checkDataInspections() throws Exception;\n List<String> getLocalVehicleList()throws Exception;\n List<Module> uploadData(String userId)throws Exception;\n Set<Module> selectAll()throws Exception;\n}",
"public interface ModuleService {\n\n /**\n * 获取所有模块信息\n * @return\n */\n List<Module> getAllModule();\n\n Show getModuleAndPart();\n\n List<Module> findModuleByPartId(int typeNum);\n\n /**\n * 添加模块\n * @param partId\n * @param name\n * @param description\n * @param photo\n * @return\n */\n Show addModule(int partId, String name, String description, String photo);\n\n /**\n * 模块图片上传至服务器\n * @param stream\n * @param path\n * @param file\n */\n void savepic(InputStream stream, String path, String file);\n\n /**\n * 修改模块名称\n * @param id\n * @param name\n * @return\n */\n Show changeModuleName(int id, String name);\n\n /**\n * 修改模块描述信息\n * @param id\n * @param description\n * @return\n */\n Show changeModuleDescription(int id, String description);\n\n /**\n * 修改模块图片信息\n * @param id\n * @param photo\n * @return\n */\n Show changeModulePhoto(int id, String photo);\n\n /**\n * 移除模块\n * @param id\n * @return\n */\n Show moveModule(int id);\n\n \n Module findModuleById(int moduleId);\n}",
"abstract protected T createModuleNode(NodeDescriptor node);",
"public interface IModuleRepo {\n\n /**\n * @return true if this repository has been initialized.\n */\n boolean isInitialized();\n\n /**\n * Initializes the repository.\n */\n void initialize(int shards, Integer shardIndex, File testsDir, Set<IAbi> abis,\n List<String> deviceTokens, List<String> testArgs, List<String> moduleArgs,\n Set<String> mIncludeFilters, Set<String> mExcludeFilters,\n MultiMap<String, String> metadataIncludeFilters,\n MultiMap<String, String> metadataExcludeFilters,\n IBuildInfo buildInfo);\n\n /**\n * @return a {@link LinkedList} of all modules to run on the device referenced by the given\n * serial.\n */\n LinkedList<IModuleDef> getModules(String serial, int shardIndex);\n\n /**\n * @return the number of shards this repo is initialized for.\n */\n int getNumberOfShards();\n\n /**\n * @return the modules which do not have token and have not been assigned to a device.\n */\n List<IModuleDef> getNonTokenModules();\n\n /**\n * @return the modules which have token and have not been assigned to a device.\n */\n List<IModuleDef> getTokenModules();\n\n /**\n * @return An array of all module ids in the repo.\n */\n String[] getModuleIds();\n\n /**\n * Clean up all internal references.\n */\n void tearDown();\n}",
"public interface Resolvable {\n\n /**\n * Returns the status of resolution. If completely resolved returns enum\n * value \"RESOLVED\", if not returns \"UNRESOLVED\", in case reference of\n * grouping/typedef is added to uses/type but it's not resolved\n * \"INTRA_FILE_RESOLVED\" is returned.\n *\n * @return status of resolution\n */\n ResolvableStatus getResolvableStatus();\n\n /**\n * Set the status of type/uses resolution. If completely resolved set enum\n * value \"RESOLVED\", if not set it to \"UNRESOLVED\", in case reference of\n * grouping/typedef is added to uses/type but it's not resolved\n * \"INTRA_FILE_RESOLVED\" should be set.\n *\n * @param resolvableStatus status of resolution\n */\n void setResolvableStatus(ResolvableStatus resolvableStatus);\n\n /**\n * Resolves the linking.\n *\n * @throws DataModelException data model exception\n */\n void resolve()\n throws DataModelException;\n}",
"private ModuleLoader() {\r\n }",
"public interface Request extends RegistryTask {\n\n}",
"@Override\n public void onModuleLoad() {\n }",
"public interface XModule extends ru.awk.spb.xonec.XOneC.XModule\r\n{\r\n}",
"public abstract Source load(ModuleName name);",
"public Resolver(Resolver parentResolver) {\n\t\tparent = parentResolver;\n\t\tstorage = new Slots();\n\t}",
"Module module() {\n return module;\n }",
"ModuleDefine createModuleDefine();",
"public interface ModuleCall {\n void initContext(Context context);\n}",
"public void resolve(Resolver resolver)\n {\n // get the .class structure\n byte[] ab = getBytes();\n\n // wipe any disassembled information -- we are going to go directly\n // after the constant pool portion of the binary .class structure\n if (isLoaded())\n {\n init();\n }\n\n try\n {\n ByteArrayReadBuffer in = new ByteArrayReadBuffer(ab);\n ByteArrayOutputStream out = new ByteArrayOutputStream((int) (ab.length * 1.25));\n ReadBuffer.BufferInput streamIn = in.getBufferInput();\n DataOutput streamOut = new DataOutputStream(out);\n\n // the portion of the .class structure before the pool\n int ofStart = 8;\n streamIn.setOffset(ofStart);\n out.write(ab, 0, ofStart);\n\n // the constant pool is in the middle (offset 8 bytes) of the .class\n int cConst = streamIn.readUnsignedShort();\n streamOut.writeShort(cConst);\n\n for (int i = 1; i < cConst; ++i)\n {\n Constant constant = null;\n int nTag = streamIn.readUnsignedByte();\n switch (nTag)\n {\n case CONSTANT_UTF8:\n constant = new UtfConstant();\n break;\n case CONSTANT_INTEGER:\n constant = new IntConstant();\n break;\n case CONSTANT_FLOAT:\n constant = new FloatConstant();\n break;\n case CONSTANT_LONG:\n constant = new LongConstant();\n ++i; // uses two constant slots\n break;\n case CONSTANT_DOUBLE:\n constant = new DoubleConstant();\n ++i; // uses two constant slots\n break;\n\n case CONSTANT_CLASS:\n case CONSTANT_STRING:\n case CONSTANT_METHODTYPE:\n case CONSTANT_MODULE:\n case CONSTANT_PACKAGE:\n streamOut.writeByte(nTag);\n streamOut.writeShort(streamIn.readUnsignedShort());\n break;\n\n case CONSTANT_FIELDREF:\n case CONSTANT_METHODREF:\n case CONSTANT_INTERFACEMETHODREF:\n case CONSTANT_NAMEANDTYPE:\n case CONSTANT_INVOKEDYNAMIC:\n streamOut.writeByte(nTag);\n streamOut.writeShort(streamIn.readUnsignedShort());\n streamOut.writeShort(streamIn.readUnsignedShort());\n break;\n\n case CONSTANT_METHODHANDLE:\n streamOut.writeByte(nTag);\n streamOut.writeByte(streamIn.readUnsignedByte());\n streamOut.writeShort(streamIn.readUnsignedShort());\n break;\n\n default:\n throw new IOException(\"Invalid constant tag \" + nTag);\n }\n\n if (constant != null)\n {\n constant.disassemble(streamIn, null);\n constant = resolver.resolve(constant);\n constant.assemble(streamOut, null);\n }\n }\n\n // the portion of the .class structure after the pool\n int ofStop = streamIn.getOffset();\n out.write(ab, ofStop, ab.length - ofStop);\n ab = out.toByteArray();\n }\n catch (IOException e)\n {\n throw new RuntimeException(\"Illegal .class structure!\\n\" + e.toString());\n }\n\n // store the new .class structure\n setBytes(ab);\n }",
"public interface ConnectionFactory {\r\n\r\n\tString testdir = System.getenv(\"SERVER_MODULES_DIR\");\r\n\tint timeout = 139;\r\n\tList<String> modules = Arrays.asList(\r\n/*\t\t\ttestdir + \"/mod_test.so\",\r\n\t\t\ttestdir + \"/mod_test_dict.so\",*/\r\n\t\t\t\"/usr/lib/rad/module/mod_pam.so\",\r\n/*\t\t\ttestdir + \"/mod_test_enum.so\",\r\n\t\t\ttestdir + \"/mod_test_list.so\",*/\r\n\t\t\t\"/usr/lib/rad/protocol/mod_proto_rad.so\",\r\n\t\t\t\"/usr/lib/rad/transport/mod_tls.so\",\r\n\t\t\t\"/usr/lib/rad/transport/mod_tcp.so\");\r\n\r\n\tpublic Connection createConnection() throws Exception;\r\n\tpublic String getDescription();\r\n}",
"ModuleRule createModuleRule();",
"public YadisResolver()\n {\n \n }",
"public XMLClassDescriptorResolverImpl() {\n super();\n _descriptorCache = new DescriptorCacheImpl();\n }",
"private SIModule(){}",
"LECCModule (ModuleName moduleName, ClassLoader foreignClassLoader, ProgramResourceRepository resourceRepository) {\r\n super (moduleName, foreignClassLoader);\r\n this.resourceRepository = resourceRepository;\r\n }",
"public interface FSProjectManager extends ProjectManager {\n}",
"private interface LoadStrategy {\n /**\n * Perform loading on the specified module.\n * \n * @param logger logs the process\n * @param moduleName the name of the process\n * @param moduleDef a module\n * @throws UnableToCompleteException\n */\n void load(TreeLogger logger, String moduleName, ModuleDef moduleDef)\n throws UnableToCompleteException;\n }",
"@Override\n public void onDiscovery(String typeName, ClassLoader classLoader, JavaModule module, boolean loaded) {\n }",
"public interface BlogLibTestMasterAppModule extends ApplicationModule {\r\n String helloMasterModule(String param);\r\n}",
"@Override\n\tpublic void prepareModule() throws Exception {\n\n\t}",
"@Override\n public String moduleName() {\n return MODULE_NAME;\n }",
"public void resolve() throws Exception\r\n\t\t{\r\n\t\tname = CollectionTools.getRawValue(name, this, true);\r\n\t\tdistributionAlgorithm = CollectionTools.getRawValue(distributionAlgorithm, this, true);\r\n\t\t\r\n\t\tfor(RouteGroupMember rgm : members)\r\n\t\t\t{\r\n\t\t\trgm.resolve();\r\n\t\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * We set the item parameters\r\n\t\t */\r\n\t\tmyRouteGroup.setName(name);\r\n\t\tmyRouteGroup.setDistributionAlgorithm(distributionAlgorithm);\r\n\t\tmyRouteGroup.setMembers(members);\r\n\t\t/*********/\r\n\t\t}",
"public Object fix(IModule module);",
"ModulePath getModulePath();",
"protected Object resolve(String roleName) throws ComponentException \n\t{\n\t\treturn lookup(roleName);\n\t}",
"public ResolveByExtension() {\n this.parsers = new HashMap<>();\n }",
"public abstract ModuleIps ips();",
"public interface RappelManager\r\n extends GenericManager<Rappel, Long>\r\n{\r\n\r\n public final static String SERVICE_NAME = \"RappelManager\";\r\n\r\n}",
"public interface Manager {\n\n}",
"public ProgramModule getModule(String treeName, String name);",
"protected abstract URL resolve(NamespaceId namesapace, String resource) throws IOException;",
"public Resolution resolve(Constraint localConstraint, LocalNode localModel) throws QueryException {\n // globalize the model\n Node modelNode = globalizeNode(localModel);\n if (!(modelNode instanceof URIReference)) throw new QueryException(\"Unexpected model type in constraint: (\" + modelNode.getClass() + \")\" + modelNode.toString());\n // convert the node to a URIReferenceImpl, which includes the Value interface\n URIReferenceImpl model = makeRefImpl((URIReference)modelNode);\n \n // check if this model is really on a remote server\n URI modelUri = model.getURI();\n testForLocality(modelUri);\n \n Answer ans = getModelSession(modelUri).query(globalizedQuery(localConstraint, model));\n return new AnswerResolution(session, ans, localConstraint);\n }",
"public interface ModuleReader extends Closeable\n{\n Optional<URI> find(String name) throws IOException;\n\n default Optional<InputStream> open(String name) throws IOException {\n Optional<URI> ouri = find(name);\n if (ouri.isPresent()) {\n return Optional.of(ouri.get().toURL().openStream());\n } else {\n return Optional.empty();\n }\n }\n\n default Optional<ByteBuffer> read(String name) throws IOException {\n Optional<InputStream> oin = open(name);\n if (oin.isPresent()) {\n try (InputStream in = oin.get()) {\n return Optional.of(ByteBuffer.wrap(in.readAllBytes()));\n }\n } else {\n return Optional.empty();\n }\n }\n\n default void release(ByteBuffer bb) {\n Objects.requireNonNull(bb);\n }\n Stream<String> list() throws IOException;\n void close() throws IOException;\n}",
"public interface LDMServesPlugin extends PrototypeRegistryService {\n\n /**\n * Equivalent to <code>((PlanningFactory) getFactory(\"planning\"))</code>.\n */\n PlanningFactory getFactory();\n\n /** @return the Requested Domain's LDM Factory.\n **/\n Factory getFactory(String domainName);\n\n /** @return the Requested Domain's LDM Factory.\n **/\n Factory getFactory(Class domainClass);\n\n /** @return the classloader to be used for loading classes for the LDM.\n * Domain Plugins should not use this, as they will have been themselves\n * loaded by this ClassLoader. Some infrastructure components which are\n * not loaded in the same way will require this for correct operation.\n **/\n ClassLoader getLDMClassLoader();\n\n /** The current agent's Address */\n MessageAddress getMessageAddress();\n \n UIDServer getUIDServer();\n\n /**\n * If the Delegator is used, this gets the real thing\n **/\n LDMServesPlugin getLDM();\n\n class Delegator implements LDMServesPlugin {\n private LDMServesPlugin ldm;\n Delegator() { }\n\n synchronized void setLDM(LDMServesPlugin ldm) {\n this.ldm = ldm;\n }\n\n public LDMServesPlugin getLDM() {\n return ldm != null ? ldm : this;\n }\n public void addPrototypeProvider(PrototypeProvider prov) {\n ldm.addPrototypeProvider(prov);\n }\n public void addPropertyProvider(PropertyProvider prov) {\n ldm.addPropertyProvider(prov);\n }\n public void addLatePropertyProvider(LatePropertyProvider lpp) {\n ldm.addLatePropertyProvider(lpp);\n }\n public void fillProperties(Asset anAsset) {\n ldm.fillProperties(anAsset);\n }\n public PropertyGroup lateFillPropertyGroup(Asset anAsset, Class pg, long time) {\n return ldm.lateFillPropertyGroup(anAsset, pg, time);\n }\n public int getPrototypeProviderCount() {\n return ldm.getPrototypeProviderCount();\n }\n public int getPropertyProviderCount() {\n return ldm.getPropertyProviderCount();\n }\n public PlanningFactory getFactory() {\n return ldm.getFactory();\n }\n public Factory getFactory(String domainName) {\n return ldm.getFactory(domainName);\n }\n public Factory getFactory(Class domainClass) {\n return ldm.getFactory(domainClass);\n }\n public ClassLoader getLDMClassLoader() {\n return ldm.getLDMClassLoader();\n }\n public MessageAddress getMessageAddress() {\n return ldm.getMessageAddress();\n }\n public UIDServer getUIDServer() {\n return ldm.getUIDServer();\n }\n\n //\n // set up a temporary prototype cache while bootstrapping\n //\n\n private HashMap _pcache;\n private HashMap pc() { /* must be called within synchronized */\n if (_pcache == null) {\n _pcache = new HashMap(13);\n }\n return _pcache;\n }\n\n // called by LDMContextTable to read out any cached prototypes into the real one\n synchronized HashMap flushTemporaryPrototypeCache() {\n HashMap c = _pcache;\n _pcache = null;\n return c;\n }\n\n public synchronized void cachePrototype(String aTypeName, Asset aPrototype) {\n if (ldm != null) {\n ldm.cachePrototype(aTypeName, aPrototype);\n } else {\n pc().put(aTypeName, aPrototype);\n }\n }\n public synchronized boolean isPrototypeCached(String aTypeName) {\n if (ldm != null) {\n return ldm.isPrototypeCached(aTypeName);\n } else {\n return (_pcache==null?false:_pcache.get(aTypeName)!=null);\n }\n }\n public synchronized Asset getPrototype(String aTypeName, Class anAssetClass) {\n if (ldm != null) {\n return ldm.getPrototype(aTypeName, anAssetClass);\n } else {\n return (Asset) (_pcache==null?null:_pcache.get(aTypeName)); /*no hint passed, since we've got no actual providers*/\n }\n }\n public synchronized Asset getPrototype(String aTypeName) {\n if (ldm != null) {\n return ldm.getPrototype(aTypeName);\n } else {\n return (Asset) (_pcache == null?null:_pcache.get(aTypeName));\n } \n }\n public synchronized int getCachedPrototypeCount() {\n if (ldm != null) {\n return ldm.getCachedPrototypeCount();\n } else {\n return (_pcache == null)?0:pc().size();\n }\n }\n }\n}",
"public interface ModulesController {\n\n public static final String MODULES_CONTROLLER_ATTRIBUTE_KEY =\n \"com.google.appengine.dev.modules_controller\";\n\n /**\n * Enum for tracking the state of a module (running/stopped).\n */\n public enum ModuleState {\n RUNNING,\n STOPPED;\n\n @Override\n public String toString() {\n return this.name().toLowerCase();\n }\n }\n\n /**\n * Returns all the known module names.\n */\n Iterable<String> getModuleNames();\n\n /**\n * Returns all known versions of the requested module.\n *\n * @throws ApiProxy.ApplicationException with error code {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not configured\n */\n Iterable<String> getVersions(String moduleName) throws ApiProxy.ApplicationException;\n\n /**\n * Returns the default version for a named module.\n *\n * @throws ApiProxy.ApplicationException with error code {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not configured\n */\n String getDefaultVersion(String moduleName) throws ApiProxy.ApplicationException;\n\n /**\n * Returns the number of instances for the requested module version.\n *\n * @throws ApiProxy.ApplicationException with error code {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not configured and {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_VERSION_VALUE}\n * if the requested version is not configured.\n */\n int getNumInstances(String moduleName, String version) throws ApiProxy.ApplicationException;\n\n /**\n * Sets the number of instances for the requested module version.\n *\n * @throws ApiProxy.ApplicationException with error code {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not configured and {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_VERSION_VALUE}\n * if the requested version is not configured for setting instances\n * {@link com.google.appengine.api.modules.ModulesServicePb.ModulesServiceError\n * .ErrorCode#INVALID_INSTANCES} if numInstances is not a legal value.\n */\n void setNumInstances(String moduleName, String version, int numInstances)\n throws ApiProxy.ApplicationException;\n\n\n /**\n * Returns the host name of the requested module version instance.\n *\n * @param moduleName the moduleName whose host we return.\n * @param version the version whose host we return.\n * @param instance the instance whose host we return or {@link com.google.appengine\n * .tools.development.LocalEnvironment#MAIN_INSTANCE}\n *\n * @throws ApiProxy.ApplicationException with error code {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not configured and {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_VERSION_VALUE}\n * if the requested version is not configured and {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_INSTANCES_VALUE}\n * if the requested instance is not configured.\n */\n String getHostname(String moduleName, String version, int instance)\n throws ApiProxy.ApplicationException;\n\n /**\n * Starts the requested module version.\n * @throws ApiProxy.ApplicationException {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not a configured manual scaling module and\n * {@link com.google.appengine.api.modules.ModulesServicePb.ModulesServiceError\n * .ErrorCode#INVALID_VERSION_VALUE} if the requested version is not configured or is not a\n * manual scaling module and {@link com.google.appengine.api.modules.ModulesServicePb\n * .ModulesServiceError.ErrorCode#UNEXPECTED_STATE} if the module instance is\n * not stopped and ready to be started.\n */\n void startModule(String moduleName, String version) throws ApiProxy.ApplicationException;\n\n /**\n * Stops the requested module version.\n * @throws ApiProxy.ApplicationException {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not a configured manual scaling module and\n * {@link com.google.appengine.api.modules.ModulesServicePb\n * .ModulesServiceError.ErrorCode#INVALID_VERSION_VALUE} if the requested\n * version is not configured or is not a manual scaling module and\n * {@link com.google.appengine.api.modules.ModulesServicePb.ModulesServiceError\n * .ErrorCode#UNEXPECTED_STATE} if the module instance is not running and ready to be stopped.\n */\n void stopModule(String moduleName, String version) throws ApiProxy.ApplicationException;\n\n /**\n * Returns the type of scaling in use for this module.\n *\n * @throws ApiProxy.ApplicationException with error code {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not configured\n */\n String getScalingType(String moduleName) throws ApiProxy.ApplicationException;\n\n /**\n * Returns the current state of this module.\n *\n * @throws ApiProxy.ApplicationException with error code {@link com.google.appengine.api\n * .modules.ModulesServicePb.ModulesServiceError.ErrorCode#INVALID_MODULE_VALUE} if\n * the requested module is not configured\n */\n ModuleState getModuleState(String moduleName) throws ApiProxy.ApplicationException;\n}",
"private LECCModule (ModuleName moduleName, ClassLoader foreignClassLoader, GeneratedCodeInfo generatedCodeInfo) {\r\n super (moduleName, foreignClassLoader, generatedCodeInfo);\r\n }",
"public interface HttpRequestResolutionHandler {\r\n \r\n /**\r\n * Resolves the incoming HTTP request to a URL\r\n * that identifies a content binary \r\n *\r\n * @param inetAddress IP address the transaction was sent from.\r\n * @param url The <code>URL</code> requested by the transaction.\r\n * @param request The HTTP message request;\r\n * i.e., the request line and subsequent message headers.\r\n * @param networkInterface The <code>NetworkInterface</code> the request\r\n * came on.\r\n *\r\n * @return URL of the content binary if a match is found,\r\n * null otherwise.\r\n * \r\n */\r\n public URL resolveHttpRequest(InetAddress inetAddress,\r\n URL url,\r\n String[] request,\r\n NetworkInterface networkInterface);\r\n \r\n}",
"public interface ModuleConfigurationProvider {\n ModuleConfiguration getConfiguration(Module module);\n}",
"private Resolve(Builder builder) {\n super(builder);\n }",
"public interface ModuleInterface\n{\n //~ Methods ////////////////////////////////////////////////////////////////\n\n void characterData(CMLStack xpath, char[] ch, int start, int length);\n\n void endDocument();\n\n void endElement(CMLStack xpath, String uri, String local, String raw);\n\n void inherit(ModuleInterface conv);\n\n CDOInterface returnCDO();\n\n void startDocument();\n\n void startElement(CMLStack xpath, String uri, String local, String raw,\n Attributes atts);\n}",
"public Module module() {\n ////\n return module;\n }",
"private FileType(ParameterResolver resolver){\r\n\t\tthis.resolver = resolver;\r\n\t}",
"public interface ModuleMapper extends CrudTemplate<Module> {\n}",
"public DcModule getModule();",
"Symbol resolve(String name);",
"FunDef resolve(\n Exp[] args,\n Validator validator,\n List<Conversion> conversions);",
"private CatalogResolver getCatalogResolver() {\n\n if (catalogResolver == null) {\n\n AntClassLoader loader;\n // Memory-Leak in line below\n loader = getProject().createClassLoader(Path.systemClasspath);\n\n try {\n Class<?> clazz = Class.forName(APACHE_RESOLVER, true, loader);\n\n // The Apache resolver is present - Need to check if it can\n // be seen by the catalog resolver class. Start by getting\n // the actual loader\n ClassLoader apacheResolverLoader = clazz.getClassLoader();\n\n // load the base class through this loader.\n Class<?> baseResolverClass\n = Class.forName(CATALOG_RESOLVER, true, apacheResolverLoader);\n\n // and find its actual loader\n ClassLoader baseResolverLoader\n = baseResolverClass.getClassLoader();\n\n // We have the loader which is being used to load the\n // CatalogResolver. Can it see the ApacheResolver? The\n // base resolver will only be able to create the ApacheResolver\n // if it can see it - doesn't use the context loader.\n clazz = Class.forName(APACHE_RESOLVER, true, baseResolverLoader);\n\n Object obj = clazz.newInstance();\n //\n // Success! The xml-commons resolver library is\n // available, so use it.\n //\n catalogResolver = new ExternalResolver(clazz, obj);\n } catch (Throwable ex) {\n //\n // The xml-commons resolver library is not\n // available, so we can't use it.\n //\n catalogResolver = new InternalResolver();\n if (getCatalogPath() != null\n && getCatalogPath().list().length != 0) {\n log(\"Warning: XML resolver not found; external catalogs\"\n + \" will be ignored\", Project.MSG_WARN);\n }\n log(\"Failed to load Apache resolver: \" + ex, Project.MSG_DEBUG);\n }\n }\n return catalogResolver;\n }",
"public interface HRServiceAppModule extends ApplicationModule {\r\n void updateDepartmentName(Integer departmentId, String departmentName);\r\n}",
"protected void initModules()\n {\n\n }",
"ModuleDefinition createModuleDefinition();",
"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 abstract void register();",
"@Override\n\tprotected void retractResolverSub(ConstraintNetwork metaVariable,\n\t\t\tConstraintNetwork metaValue) {\n\t\t\n\t}",
"private Object readResolve() {\n return getApplication(name);\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 PrimObject resolveObject(String name) {\n return findObject(importFor(name));\n }",
"public ResolvedHost()\n {\n \n }",
"public interface Resolver extends AdaptrisComponent {\r\n\r\n /**\r\n * Create facts for insertion into the Rule Engine\r\n * \r\n * @param msg the AdaptrisMessage\r\n * @return a list object which will be passed in to the rule engine.\r\n * @throws RuleException wrapping any underlying exception.\r\n */\r\n Object[] create(AdaptrisMessage msg) throws RuleException;\r\n\r\n /**\r\n * Result result of the rule engine to the AdaptrisMessage\r\n * <p>\r\n * This simply provides the objects previously created with\r\n * {@link #create(AdaptrisMessage)}, so it may have no meaning if your\r\n * concrete implementation maintains its own state.\r\n * </p>\r\n * \r\n * @param result the AdaptrisMessage\r\n * @param src the objects that were inserted into the rule engine.\r\n * @throws RuleException wrapping any underlying exception.\r\n */\r\n void resolve(Object[] src, AdaptrisMessage result) throws RuleException;\r\n}",
"ImplementationManager createManager();",
"PageResolver getPageResolver();",
"private void resolveImports(Contribution contribution, ModelResolver resolver, ProcessorContext context)\n throws ContributionResolveException {\n for (Import import_ : contribution.getImports()) {\n extensionProcessor.resolve(import_, resolver, context);\n } // end for\n }",
"@Remote\npublic interface ExplorerService {\n\n /**\n * Return a list of items for the specified Path. The Path can be either:-\n * - A Project Root (i.e. folder containing pom.xml and parent of folder containing kmodule.xml)\n * - Within a Project Package (i.e. folder within Project Root and src/main/resources)\n * - Within a Project but outside of a Package (i.e. between pom.xml and src/main/resources)\n * - Other\n * @param path\n * @return\n */\n ExplorerContent getContentInScope( final Path path );\n\n}",
"@Override\n\tpublic ModuleInfo getModule(String mac) throws HFModuleException {\n\t\tLog.d(\"HFModuleManager\", \"getModule\");\n//\t\tif (!this.isCloudChannelLive()) {\n//\t\t\tthrow new HFModuleException(HFModuleException.ERR_USER_OFFLINE,\n//\t\t\t\t\t\"User is not online\");\n//\t\t}\n\t\t\n\t\tModuleInfo mi = getHFModuleHelper().getRemoteModuleInfoByMac(mac);\n\t\tif (mi == null) {\n\t\t\tthrow new HFModuleException(\n\t\t\t\t\tHFModuleException.ERR_GET_REMOTE_MODULEINFO,\n\t\t\t\t\t\"get moduleinfo from remote err\");\n\t\t}\n\t\tif (mi.getModuleId() == null) {\n\t\t\treturn mi;\n\t\t}\n\t\t\n\t\tModuleIdPayload payload = new ModuleIdPayload();\n\t\tpayload.setModuleId(mi.getModuleId());\n\t\tModuleGetRequest request = new ModuleGetRequest(payload);\n\t\ttry {\n\t\t\tModuleInfoResponse response = cloudModuleManager.getModule(request);\n\t\t\tModuleInfo responseModuleInfo = response.getPayload();\n\t\t\tresponseModuleInfo.setLocalIp(mi.getLocalIp());\n\t\t\tgetHFModuleHelper().addRemoteModuleInfo(responseModuleInfo);\n\t\t\t\n\t\t\treturn responseModuleInfo;\n\t\t} catch (CloudException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\t\n\t\treturn mi;\n//\t\ttry {\n//\t\t\tString reqTemplate = \"{'PL':{'moduleId':'#moduleId#'},'CID':30031,'SID':'#SID#'}\";\n//\t\t\tString req = reqTemplate.replaceFirst(\"#moduleId#\", mi.getModuleId())\n//\t\t\t\t\t.replaceFirst(\"#SID#\", getsid());\n//\n//\t\t\tString rsp = HttpProxy.reqByHttpPost(req);\n//\t\t\tJSONObject jo = new JSONObject(rsp);\n//\n//\t\t\tif (jo.isNull(\"RC\")) {\n//\t\t\t\tthrow new HFModuleException(\n//\t\t\t\t\t\tHFModuleException.ERR_GET_REMOTE_MODULEINFO,\n//\t\t\t\t\t\t\"get moduleinfo from remote err\");\n//\t\t\t}\n//\t\t\tif (jo.getInt(\"RC\") == 1) {\n//\t\t\t\tJSONObject rspPL = jo.getJSONObject(\"PL\");\n//\t\t\t\tModuleInfo rspInfo = new ModuleInfo();\n//\t\t\t\trspInfo.fromJson(rspPL);\n//\n//\t\t\t\tif (mi != null) {\n//\t\t\t\t\trspInfo.setLocalIp(mi.getLocalIp());\n//\t\t\t\t}\n//\t\t\t\tgetHFModuleHelper().addRemoteModuleInfo(mi);\n//\t\t\t\treturn rspInfo;\n//\t\t\t} else {\n//\t\t\t\treturn mi;\n//\t\t\t}\n//\t\t} catch (JSONException e) {\n//\t\t\treturn mi;\n//\t\t}\n\t}",
"public CatalogResolver getResolver() {\n return resolver;\n }",
"@Override\n public String visit(ModuleDeclaration n, Object arg) {\n return null;\n }",
"public abstract void resolve(Event e);",
"@Override\n\tpublic ModelAndView resolverView(PageContainer pContainer) throws Exception{\n\t\treturn null;\n\t}",
"public interface Model {\n /**\n * {@code Predicate} that always evaluate to true\n */\n Predicate<Module> PREDICATE_SHOW_ALL_MODULES = unused -> true;\n\n /**\n * Replaces user prefs data with the data in {@code userPrefs}.\n */\n void setUserPrefs(ReadOnlyUserPrefs userPrefs);\n\n /**\n * Returns the user prefs.\n */\n ReadOnlyUserPrefs getUserPrefs();\n\n /**\n * Returns the user prefs' GUI settings.\n */\n GuiSettings getGuiSettings();\n\n /**\n * Sets the user prefs' GUI settings.\n */\n void setGuiSettings(GuiSettings guiSettings);\n\n /**\n * Returns the user prefs' mod book file path.\n */\n Path getModBookFilePath();\n\n /**\n * Sets the user prefs' mod book file path.\n */\n void setModBookFilePath(Path modBookFilePath);\n\n /**\n * Replaces mod book data with the data in {@code modBook}.\n */\n void setModBook(ReadOnlyModBook modBook);\n\n /**\n * Returns the ModBook\n */\n ReadOnlyModBook getModBook();\n\n /**\n * Returns true if a module with the same identity as {@code module} exists in the mod book.\n */\n boolean hasModule(Module module);\n\n /**\n * Deletes the given module.\n * The module must exist in the mod book.\n */\n void deleteModule(Module module);\n\n /**\n * Adds the given module.\n * {@code module} must not already exist in the mod book.\n */\n void addModule(Module module);\n\n /**\n * Gets the requested module based on given modCode.\n *\n * @param modCode Used to find module.\n * @return Module.\n * @throws CommandException If module does not exist.\n */\n Module getModule(ModuleCode modCode) throws CommandException;\n\n /**\n * Deletes the Exam from the specified module's lessons list.\n */\n void deleteExam(Module module, Exam target);\n\n /**\n * Deletes the Lesson from the specified module's lessons list.\n */\n void deleteLesson(Module module, Lesson target);\n\n /**\n * Checks if a module has the lesson\n */\n boolean moduleHasLesson(Module module, Lesson lesson);\n\n /**\n * Adds a lesson to a module.\n */\n void addLessonToModule(Module module, Lesson lesson);\n\n /**\n * Checks if a module has the lesson\n */\n boolean moduleHasExam(Module module, Exam exam);\n\n /**\n * Adds a lesson to a module.\n */\n void addExamToModule(Module module, Exam exam);\n\n /**\n * Replaces the {@code target} Exam with {@code newExam} from the specified module's exams list.\n */\n void setExam(Module module, Exam target, Exam newExam);\n\n /**\n * Replaces the {@code target} Exam with {@code newLesson} from the specified module's lessons list.\n */\n void setLesson(Module module, Lesson target, Lesson newLesson);\n\n /**\n * Replaces the given module {@code target} with {@code editedModule}.\n * {@code target} must exist in the mod book.\n * The module identity of {@code editedModule} must not be the same as another existing module in the mod book.\n */\n void setModule(Module target, Module editedModule);\n\n /**\n * Returns an unmodifiable view of the filtered module list\n */\n ObservableList<Module> getFilteredModuleList();\n\n /**\n * Updates the filter of the filtered module list to filter by the given {@code predicate}.\n *\n * @throws NullPointerException if {@code predicate} is null.\n */\n void updateFilteredModuleList(Predicate<Module> predicate);\n}",
"@Override\r\n public Class<? extends SdlRouterService> defineLocalSdlRouterClass() {\n return com.lz.proxytestdemo.sdlapp.SdlRouterService.class;\r\n }",
"public interface DispersionDataSource {\n\n}",
"public interface Middleware extends Component {\r\n\t/**\r\n\t * Register a specified link in the registry service of the middleware under a specified name. This link becomes\r\n\t * available to be remotely retrieved with the <tt>retrieve</tt> method.\r\n\t * \r\n\t * @param linkName the link name in URL format\r\n\t * @param link the link object to be registered\r\n\t * \r\n\t * @throws RemoteException TODO\r\n\t * @throws MalformedURLException TODO\r\n\t */\r\n\tvoid register(String linkName, Link link) throws CCAException;\r\n\t/**\r\n\t * Retrieve a registered link under a specified name at a specified location.\r\n\t * \r\n\t * @param linkName the name under which the link has been registered\r\n\t * @param locationName the location from where the link is retrieved \r\n\t * \r\n\t * @return the link object registered under the specified name\r\n\t * \r\n\t * @throws RemoteException TODO\r\n\t * @throws MalformedURLException TODO\r\n\t */\r\n\tLink retrieve(String linkName, String locationName) throws CCAException;\r\n\t/**\r\n\t * Uncode a coded datatype object. The specified datatype must have been coded with the \r\n\t * <tt>externalize</tt> method of this middleware. This method should use the \r\n\t * <tt>readExternal</tt> method of the Datatype interface.\r\n\t * \r\n\t * @param arg the coded datatype to be uncoded\r\n\t * \r\n\t * @return an uncoded datatype object.\r\n\t * \r\n\t * @throws IOException if the <tt>readExternal</tt> method throws an exception.\r\n\t */\r\n\tDatatype internalize(Datatype arg) throws CCAException;\r\n\t/**\r\n\t * Uncode an array of specified datatypes. It invokes the <tt>internalize(Datatype)</tt> method for each\r\n\t * Datatype object of the array.\r\n\t * \r\n\t * @param args the array of Datatype objects to be uncoded\r\n\t * \r\n\t * @return the array of datatype objects, with its members uncoded\r\n\t * \r\n\t * @throws IOException if <tt>internalize(Datatype)</tt> throws an exception\r\n\t */\r\n\tDatatype[] internalize(Datatype[] args) throws CCAException;\r\n\t/**\r\n\t * Code an uncoded datatype object. The specified datatype is put in the appropriate format\r\n\t * to be transmitted through this middleware. It can be uncoded with the \r\n\t * <tt>internalize</tt> method of this middleware. This method should use the \r\n\t * <tt>writeExternal</tt> method of the Datatype interface.\r\n\t * \r\n\t * @param arg the uncoded datatype to be coded\r\n\t * \r\n\t * @return a new coded datatype object\r\n\t * \r\n\t * @throws IOException if the <tt>writeExternal</tt> method throws an exception.\r\n\t */\r\n\tDatatype externalize(Datatype arg) throws IOException;\r\n\t/**\r\n\t * Code an array of specified datatypes. It invokes the <tt>externalize(Datatype)</tt> method for each\r\n\t * Datatype object of the array.\r\n\t * \r\n\t * @param args the array of Datatype objects to be coded\r\n\t * \r\n\t * @return the array of coded objects\r\n\t * \r\n\t * @throws IOException if <tt>externalize(Datatype)</tt> throws an exception\r\n\t */\r\n\tDatatype[] externalize(Datatype[] args) throws IOException;\r\n}",
"public ModuleInfo() {\r\n this.types = new ArrayList<>();\r\n this.typeByName = new HashMap<>();\r\n }"
]
| [
"0.70174503",
"0.66677076",
"0.6307434",
"0.6058096",
"0.6043398",
"0.6001448",
"0.5824893",
"0.5793242",
"0.5749425",
"0.5715988",
"0.5639798",
"0.5635092",
"0.55861336",
"0.5527013",
"0.5513363",
"0.5479189",
"0.5471069",
"0.5451799",
"0.54365814",
"0.5396383",
"0.5383227",
"0.53770137",
"0.5374009",
"0.53579813",
"0.53579044",
"0.5351799",
"0.5336896",
"0.53329206",
"0.53302616",
"0.5324662",
"0.53199714",
"0.5306591",
"0.5292784",
"0.52904814",
"0.5288323",
"0.5260227",
"0.52569664",
"0.5247999",
"0.52227676",
"0.5221222",
"0.5195257",
"0.5191653",
"0.5177767",
"0.5175818",
"0.5173425",
"0.5166261",
"0.5147658",
"0.51378757",
"0.5124839",
"0.5111852",
"0.51043606",
"0.5102515",
"0.51005524",
"0.5098981",
"0.50904727",
"0.5089802",
"0.508212",
"0.5074435",
"0.5063506",
"0.50631016",
"0.5063067",
"0.5056671",
"0.50507283",
"0.50421697",
"0.5041275",
"0.5034858",
"0.50321496",
"0.50295097",
"0.50218993",
"0.50200325",
"0.5016588",
"0.5015573",
"0.49928504",
"0.4991304",
"0.4987293",
"0.49765712",
"0.49756122",
"0.49755365",
"0.49729526",
"0.49548694",
"0.49536514",
"0.49509487",
"0.49466336",
"0.49394482",
"0.49330348",
"0.49241254",
"0.49230355",
"0.49227956",
"0.49210143",
"0.49158573",
"0.4914393",
"0.49058753",
"0.48879552",
"0.4887532",
"0.4882321",
"0.48804167",
"0.48550117",
"0.48509148",
"0.4849085",
"0.4846641",
"0.48460826"
]
| 0.0 | -1 |
Returns a new map containing the predeclared (including universal) and global bindings of this module. TODO(adonovan): eliminate; clients should explicitly choose getPredeclared or getGlobals. | public Map<String, Object> getTransitiveBindings() {
// Can't use ImmutableMap.Builder because it doesn't allow duplicates.
LinkedHashMap<String, Object> env = new LinkedHashMap<>();
env.putAll(Starlark.UNIVERSE);
env.putAll(predeclared);
env.putAll(globals);
return env;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Map<String, Object> collectGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n MethodLibrary.addBindingsToBuilder(envBuilder);\n Runtime.addConstantsToBuilder(envBuilder);\n return envBuilder.build();\n }",
"public Map<String, Object> getGlobals() {\n return Collections.unmodifiableMap(globals);\n }",
"public ImmutableMap<String, Object> getExportedGlobals() {\n ImmutableMap.Builder<String, Object> result = new ImmutableMap.Builder<>();\n for (Map.Entry<String, Object> entry : globals.entrySet()) {\n if (exportedGlobals.contains(entry.getKey())) {\n result.put(entry);\n }\n }\n return result.build();\n }",
"public Map<String, Object> getGlobals() {\n return globals;\n }",
"public Map<Object, Object> getGlobalMap() {\n return Collections.unmodifiableMap(globalMap);\n }",
"Map<String, FileModule> getSymbolMap() {\n Map<String, FileModule> out = new LinkedHashMap<>();\n for (FileModule module : fileToModule.values()) {\n for (String symbol : module.importedNamespacesToSymbols.keySet()) {\n out.put(symbol, module);\n }\n }\n return out;\n }",
"public Map<String, Object> getBzlGlobals() {\n return bzlGlobals;\n }",
"public Map<String, Function> getGlobalFnMap() {\n return getGlobalFnMap(DEFAULT_LOCALE);\n }",
"Map<String, Defines> getDefinesMap();",
"GlobalsType getGlobals();",
"public Map<Integer, Coord> getGlobalMap(){\n\t\tif(mapExists){\r\n\t\t\tMap<Integer, Coord> realCoordMap = new HashMap<Integer, Coord>();\r\n\t\t\tfor(Map.Entry<Integer, Coord> c : this.globalMap.entrySet()){\r\n\t\t\t\t//core.Debug.p(\"c: id\" + c.getKey() + \", v:\" + c.getValue().toString() + \", r:\"+ realCoord(c.getValue()).toString());\r\n\t\t\t\trealCoordMap.put(c.getKey(), realCoord(c.getValue()));\r\n\t\t\t}\r\n\t\t\treturn realCoordMap;\r\n\t\t}\r\n\t\telse return null;\r\n\t}",
"public List<Dim> getGlobals(){\n\t\t\n\t\treturn null;\n\t}",
"@Override\n public Map<String, XPathValue> getGlobalMetaMap() {\n return null;\n }",
"void initGlobals(EvalContext context, HashMap globals)\n throws EvaluationException\n {\n if (predefined != null)\n predefined.initGlobals(context, globals);\n\n for (int g = 0, G = declarations.size(); g < G; g++)\n {\n if (declarations.get(g) instanceof ModuleImport) {\n ModuleImport mimport = (ModuleImport) declarations.get(g);\n ModuleContext module = mimport.imported;\n // recursive descent to imported modules.\n // CAUTION lock modules to avoid looping on circular imports\n // Hmmm well, circular imports are no more allowed anyway...\n if (globals.get(module) == null) { // not that beautiful but\n globals.put(module, module);\n module.initGlobals(context, globals);\n globals.remove(module);\n }\n }\n }\n \n // Globals added by API in context are not declared: do it first\n for (Iterator iter = globalMap.values().iterator(); iter.hasNext();) {\n GlobalVariable var = (GlobalVariable) iter.next();\n XQValue init = (XQValue) globals.get(var.name);\n \n if(init == null)\n continue;\n // unfortunately required:\n init = init.bornAgain();\n // check the type if any\n if(var.declaredType != null)\n init = init.checkTypeExpand(var.declaredType, context, \n false, true);\n context.setGlobal(var, init);\n }\n \n //\n for (int g = 0, G = declarations.size(); g < G; g++)\n {\n if (!(declarations.get(g) instanceof GlobalVariable))\n continue;\n GlobalVariable var = (GlobalVariable) declarations.get(g);\n XQType declaredType = var.declaredType;\n curInitVar = var;\n if (var.init != null) {\n XQValue v = var.init.eval(null, context);\n try { // expand with type checking\n v = v.checkTypeExpand(declaredType, context, false, true);\n if (v instanceof ErrorValue)\n context.error(Expression.ERRC_BADTYPE,\n var.init, \n ((ErrorValue) v).getReason());\n }\n catch (XQTypeException tex) {\n context.error(var, tex);\n }\n context.setGlobal(var, v);\n curInitVar = null;\n }\n\n QName gname = var.name;\n // is there a value specified externally? \n // use the full q-name of the variable\n // (possible issue if $local:v allowed in modules)\n Object initValue = globals.get(gname);\n XQValue init = null;\n if(initValue instanceof ResultSequence) {\n ResultSequence seq = (ResultSequence) initValue;\n init = seq.getValues();\n }\n else \n init = (XQValue) initValue;\n\n // glitch for compatibility: if $local:var, look for $var\n if (init == null && \n gname.getNamespaceURI() == NamespaceContext.LOCAL_NS) {\n QName redName = IQName.get((gname.getLocalPart()));\n init = (XQValue) globals.get(redName);\n }\n if (init == null) {\n // - System.err.println(\"no extern init for \"+global.name);\n continue;\n }\n init = init.bornAgain(); // in case several executions\n if (declaredType != null) {\n try { // here we can promote: it helps with string values\n init =\n init.checkTypeExpand(declaredType, context, true,\n true);\n if (init instanceof ErrorValue)\n context.error(Expression.ERRC_BADTYPE, var,\n ((ErrorValue) init).getReason());\n }\n catch (XQTypeException tex) {\n context.error(var, tex);\n }\n }\n context.setGlobal(var, init);\n }\n }",
"public final Map<String, String> m11969a() {\n Map<String, String> c = zzsl.m11979a(\"gms:phenotype:phenotype_flag:debug_disable_caching\", false) ? m11967c() : this.f10172f;\n if (c == null) {\n synchronized (this.f10171e) {\n c = this.f10172f;\n if (c == null) {\n c = m11967c();\n this.f10172f = c;\n }\n }\n }\n if (c != null) {\n return c;\n }\n return Collections.emptyMap();\n }",
"public List<Identifier> getGlobalVars(){\n final List<Identifier> globs = new ArrayList<>();\n\n globalVariables.keySet().stream()\n .map(x -> new Identifier(Scope.GLOBAL, Type.VARIABLE, x, globalVariables.get(x)))\n .forEach(globs::add);\n\n return globs;\n }",
"private Map<String, TestModuleHolder> getTestModules() {\n\t\treturn testModuleSupplier.get();\n\t}",
"Map<String, Constant> getConstantMap();",
"public Map getENC()\n throws NamingException\n {\n // save context classloader\n Thread thread= Thread.currentThread();\n ClassLoader lastContextLoader= thread.getContextClassLoader();\n \n //set the classloader up as this webapp's loader\n thread.setContextClassLoader(getClassLoader());\n Map map = null;\n try\n {\n map = Util.flattenBindings ((Context)_initialCtx.lookup(\"java:comp\"), \"env\");\n }\n finally\n {\n //replace the classloader\n thread.setContextClassLoader(lastContextLoader);\n }\n \n return map;\n }",
"private Map<String,Boolean> copyMapFromPreferenceStore(){\n \tMap<String,Boolean> preferences = new HashMap<String,Boolean>();\n \tIPreferenceStore store = EMFTextEditUIPlugin.getDefault().getPreferenceStore();\n \tpreferences.put(ResourcePackageGenerator.GENERATE_PRINTER_STUB_ONLY_NAME,store.getBoolean(ResourcePackageGenerator.GENERATE_PRINTER_STUB_ONLY_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_ANTLR_SPEC_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_ANTLR_SPEC_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_PRINTER_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_PRINTER_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_PROXY_RESOLVERS_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_PROXY_RESOLVERS_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVER_FACTORY_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVER_FACTORY_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVERS_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TOKEN_RESOLVERS_NAME));\n \tpreferences.put(ResourcePackageGenerator.OVERRIDE_TREE_ANALYSER_NAME,store.getBoolean(ResourcePackageGenerator.OVERRIDE_TREE_ANALYSER_NAME));\n \treturn preferences;\n }",
"private Map<String, Object> collectBzlGlobals() {\n ImmutableMap.Builder<String, Object> envBuilder = ImmutableMap.builder();\n TopLevelBootstrap topLevelBootstrap =\n new TopLevelBootstrap(\n new FakeBuildApiGlobals(),\n new FakeSkylarkAttrApi(),\n new FakeSkylarkCommandLineApi(),\n new FakeSkylarkNativeModuleApi(),\n new FakeSkylarkRuleFunctionsApi(Lists.newArrayList(), Lists.newArrayList()),\n new FakeStructProviderApi(),\n new FakeOutputGroupInfoProvider(),\n new FakeActionsInfoProvider(),\n new FakeDefaultInfoProvider());\n AndroidBootstrap androidBootstrap =\n new AndroidBootstrap(\n new FakeAndroidSkylarkCommon(),\n new FakeApkInfoProvider(),\n new FakeAndroidInstrumentationInfoProvider(),\n new FakeAndroidDeviceBrokerInfoProvider(),\n new FakeAndroidResourcesInfoProvider(),\n new FakeAndroidNativeLibsInfoProvider());\n AppleBootstrap appleBootstrap = new AppleBootstrap(new FakeAppleCommon());\n ConfigBootstrap configBootstrap =\n new ConfigBootstrap(new FakeConfigSkylarkCommon(), new FakeConfigApi(),\n new FakeConfigGlobalLibrary());\n CcBootstrap ccBootstrap = new CcBootstrap(new FakeCcModule());\n JavaBootstrap javaBootstrap =\n new JavaBootstrap(\n new FakeJavaCommon(),\n new FakeJavaInfoProvider(),\n new FakeJavaProtoCommon(),\n new FakeJavaCcLinkParamsProvider.Provider());\n PlatformBootstrap platformBootstrap = new PlatformBootstrap(new FakePlatformCommon());\n PyBootstrap pyBootstrap =\n new PyBootstrap(new FakePyInfoProvider(), new FakePyRuntimeInfoProvider());\n RepositoryBootstrap repositoryBootstrap =\n new RepositoryBootstrap(new FakeRepositoryModule(Lists.newArrayList()));\n TestingBootstrap testingBootstrap =\n new TestingBootstrap(\n new FakeTestingModule(),\n new FakeCoverageCommon(),\n new FakeAnalysisFailureInfoProvider(),\n new FakeAnalysisTestResultInfoProvider());\n\n topLevelBootstrap.addBindingsToBuilder(envBuilder);\n androidBootstrap.addBindingsToBuilder(envBuilder);\n appleBootstrap.addBindingsToBuilder(envBuilder);\n ccBootstrap.addBindingsToBuilder(envBuilder);\n configBootstrap.addBindingsToBuilder(envBuilder);\n javaBootstrap.addBindingsToBuilder(envBuilder);\n platformBootstrap.addBindingsToBuilder(envBuilder);\n pyBootstrap.addBindingsToBuilder(envBuilder);\n repositoryBootstrap.addBindingsToBuilder(envBuilder);\n testingBootstrap.addBindingsToBuilder(envBuilder);\n\n return envBuilder.build();\n }",
"public Map<String, ZAttrHandler> getVarMap() {\r\n if (attrMap==null) attrMap = new ZAttrHandlerMapper(this).map();\r\n return attrMap;\r\n }",
"private Map getImportsMap(Resource resource) {\n \t\treturn (Map) imports.get(resource);\n \t}",
"public Map<String,String> getCompilerDefine(Configuration config)\n {\n \tMap<String,String> list = config.getCompilerDefine();\n return list;\n }",
"public final Map<String, Object> getInternalMap() {\n\t\treturn values;\n\t}",
"public Map<String, PhiFunction> copyAddPhiMap(){\n Map<String, PhiFunction> current_phi_map = this.ssa_stack.peek();\n Map<String, PhiFunction> new_phi_map = new HashMap<String, PhiFunction>();\n for(PhiFunction phi : current_phi_map.values()){\n new_phi_map.put(phi.id, (PhiFunction)phi.clone());\n }\n this.ssa_stack.push(new_phi_map);\n return new_phi_map;\n }",
"public final synchronized Map<String, PlugInBean> m104s() {\n return null;\n }",
"public Map<String, INode> getNodeMap() {\n\n return Collections.unmodifiableMap(nodeMap);\n }",
"private static Map<String,String> getEnvVars() {\n return new TreeMap<>(System.getenv());\n }",
"static Map<String, Handlers> getIntentMap()\n\t{\n\t\tMap<String, Handlers> h_map = new HashMap<>();\n\t\t\n\t\t\n\t\th_map.put (ADDRESS_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (ADDRESS_ASSOCIATE , Handlers.LINK_CREATE);\n\t\th_map.put (ADDRESS_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (EVENT_ADD , Handlers.NODE_CREATE_AND_LINK);\n\t\th_map.put (EVENT_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (GROUP_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (GROUP_MEMBER_ADD , Handlers.LINK_CREATE);\n\t\th_map.put (GROUP_MEMBER_DELETE, Handlers.LINK_DELETE);\n\t\th_map.put (PERSON_ADD , Handlers.NODE_CREATE);\n\t\th_map.put (PERSON_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (SUBSCRIPTION_ADD , Handlers.NODE_CREATE_AND_MULTILINK);\n\t\th_map.put (SUBSCRIPTION_DELETE, Handlers.NODE_DELETE);\n\t\th_map.put (USER_DELETE , Handlers.NODE_DELETE);\n\t\th_map.put (USER_REGISTER , Handlers.REGISTER_USER);\n\n\t\treturn h_map;\n\t}",
"public final synchronized Map<String, PlugInBean> m76E() {\n return null;\n }",
"public Map<Integer, Integer> getLocalCache() {\n return localCache;\n }",
"public Map getKeyMethodMap() {\r\n\t\tMap map = new HashMap();\r\n\r\n\t\tString pkg = this.getClass().getPackage().getName();\r\n\t\tResourceBundle methods = ResourceBundle.getBundle(pkg\r\n\t\t\t\t+ \".LookupMethods\");\r\n\r\n\t\tEnumeration keys = methods.getKeys();\r\n\r\n\t\twhile (keys.hasMoreElements()) {\r\n\t\t\tString key = (String) keys.nextElement();\r\n\t\t\tmap.put(key, methods.getString(key));\r\n\t\t}\r\n\r\n\t\treturn map;\r\n\t}",
"private static ImmutableMap<String, Object> filter(\n Map<String, Object> predeclared, StarlarkSemantics semantics) {\n ImmutableMap.Builder<String, Object> filtered = ImmutableMap.builder();\n for (Map.Entry<String, Object> bind : predeclared.entrySet()) {\n Object v = bind.getValue();\n if (v instanceof FlagGuardedValue) {\n FlagGuardedValue fv = (FlagGuardedValue) bind.getValue();\n if (fv.isObjectAccessibleUsingSemantics(semantics)) {\n v = fv.getObject();\n }\n }\n filtered.put(bind.getKey(), v);\n }\n return filtered.build();\n }",
"@Contract(value = \" -> new\", pure = true)\n @Nonnull\n public static <K, V> Map<K, V> createSoftMap() {\n return Maps.newSoftHashMap();\n }",
"@Override\r\n\tpublic Integer[] getDynamicMapVariables() {\n\t\treturn null;\r\n\t}",
"@Override\r\n\tpublic Integer[] getDynamicMapVariables() {\n\t\treturn null;\r\n\t}",
"public Map<Integer, String> getMacrosses() {\n\t\treturn Collections.unmodifiableMap(macrosses);\n\t}",
"private HashMap getRuntimeImport() {\n \t\tURL url = InternalBootLoader.class.getProtectionDomain().getCodeSource().getLocation();\n \t\tString path = InternalBootLoader.decode(url.getFile());\n \t\tFile base = new File(path);\n \t\tif (!base.isDirectory())\n \t\t\tbase = base.getParentFile(); // was loaded from jar\n \n \t\t// find the plugin.xml (need to search because in dev mode\n \t\t// we can have some extra directory entries)\n \t\tFile xml = null;\n \t\twhile (base != null) {\n \t\t\txml = new File(base, BOOT_XML);\n \t\t\tif (xml.exists())\n \t\t\t\tbreak;\n \t\t\tbase = base.getParentFile();\n \t\t}\n \t\tif (xml == null)\n \t\t\tthrow new RuntimeException(Policy.bind(\"error.boot\")); //$NON-NLS-1$\n \n \t\ttry {\n \t\t\treturn getImport(xml.toURL(), RUNTIME_PLUGIN_ID);\n \t\t} catch (MalformedURLException e) {\n \t\t\treturn null;\n \t\t}\n \t}",
"protected Map<String, String> getVarMap() {\n\t\treturn myVarMap;\n\t}",
"java.util.Map<java.lang.String, java.lang.String>\n getVarsMap();",
"private Map<String, C0148k> m471c() {\n HashMap hashMap = new HashMap();\n try {\n Class.forName(\"com.google.android.gms.ads.AdView\");\n C0148k kVar = new C0148k(\"com.google.firebase.firebase-ads\", \"0.0.0\", \"binary\");\n hashMap.put(kVar.mo326a(), kVar);\n C0135c.m449h().mo273b(\"Fabric\", \"Found kit: com.google.firebase.firebase-ads\");\n } catch (Exception unused) {\n }\n return hashMap;\n }",
"public Map<String, Object> getVariables();",
"public Map<String, BsonDocument> getLocalSchemaMap() {\n return localSchemaMap;\n }",
"private Map<Integer, MessageEncoder> initialiseMap() {\n Map<Integer, MessageEncoder> composerMap = new HashMap<>();\n composerMap.put(AC35MessageType.BOAT_ACTION.getCode(), new BoatActionEncoder());\n composerMap.put(AC35MessageType.REQUEST.getCode(), new RequestEncoder());\n composerMap.put(AC35MessageType.COLOUR.getCode(), new ColourEncoder());\n\n return Collections.unmodifiableMap(composerMap);\n }",
"public Map<String,ASTNode> getVariableMap() {\n \tif (variableMap != null)\n \t\treturn variableMap;\n \treturn variableMap = new VariableMap(this);\n }",
"protected Map<String, Function> getFuncMap() {\n\t\treturn myFuncMap;\n\t}",
"private HashMap pc() {\n if (_pcache == null) {\n _pcache = new HashMap(13);\n }\n return _pcache;\n }",
"public Map getProperties()\n {\n // Lazy compute properties\n if (properties == null)\n {\n ObjectNode parent = objectNode.getParent();\n if (parent == null)\n {\n this.properties = declaredPropertyMap;\n }\n else\n {\n Map properties = new HashMap();\n properties.putAll(parent.getObject().getProperties());\n properties.putAll(declaredPropertyMap);\n this.properties = properties;\n }\n\n //\n this.unmodifiableProperties = Collections.unmodifiableMap(properties);\n }\n\n //\n return unmodifiableProperties;\n }",
"public Map getNamespaceMap() {\n/* 130 */ return this.nsMap;\n/* */ }",
"public Map<Integer, String> getAllBindingNamespaces()\n {\n Map<Integer, String> allNs = new HashMap<Integer, String>();\n \n for (BindingExpression be : bindingExpressions)\n {\n if (be.getNamespaces() != null)\n {\n allNs.putAll(be.getNamespaces());\n }\n }\n \n return allNs;\n }",
"@VisibleForTesting\n public ImmutableCollection<String> getDefines() {\n return ccCompilationContext.getDefines();\n }",
"@Override\n public Set<String> getNames() {\n // TODO(adonovan): for now, the resolver treats all predeclared/universe\n // and global names as one bucket (Scope.PREDECLARED). Fix that.\n // TODO(adonovan): opt: change the resolver to request names on\n // demand to avoid all this set copying.\n HashSet<String> names = new HashSet<>();\n for (Map.Entry<String, Object> bind : getTransitiveBindings().entrySet()) {\n if (bind.getValue() instanceof FlagGuardedValue) {\n continue; // disabled\n }\n names.add(bind.getKey());\n }\n return names;\n }",
"public Map<String, String> getPrefixMap() {\n\t\treturn Collections.unmodifiableMap(prefixToURIMap);\n\t}",
"public Map getStandardClasses() {\n return standardClasses;\n }",
"public Map<String, ModuleDTO> getModuleNameToDtoMap() {\n\t\treturn moduleNameToDtoMap;\n\t}",
"public ConcurrentMap<String, ServiceDef> getLocalRoutingTable() {\n return registry;\n }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"Map<String, String> getAllAsMap() {\n return Collections.unmodifiableMap(settings);\n }",
"private void lazyInitializeMap() {\n if (gestureSenderToGestureListener == null) {\n gestureSenderToGestureListener = new HashMap<Class<? extends IInputProcessor>, IGestureEventListener[]>();\n }\n }",
"public static Map<String, String> filterGlobalTypes(final String packageName,\n final Imports imports,\n final Map<String, String> packageGlobalTypes) {\n final Map<String, String> scopedGlobalTypes = new HashMap<String, String>();\n for (Map.Entry<String, String> e : packageGlobalTypes.entrySet()) {\n final String globalQualifiedType = e.getValue();\n final String globalPackageName = getPackageName(globalQualifiedType);\n final String globalTypeName = getTypeName(globalQualifiedType);\n\n if (globalPackageName.equals(packageName) || isImported(globalQualifiedType,\n imports)) {\n scopedGlobalTypes.put(e.getKey(),\n globalTypeName);\n }\n }\n return scopedGlobalTypes;\n }",
"public Hashtable getBuiltInTypes() {\n Hashtable toReturn = (Hashtable)fBuiltInTypes.clone();\n Enumeration xml11Keys = fXML11BuiltInTypes.keys();\n while (xml11Keys.hasMoreElements()) {\n Object key = xml11Keys.nextElement();\n toReturn.put(key, fXML11BuiltInTypes.get(key));\n }\n return toReturn;\n }",
"public Map<String, String> mo9339b() {\n HashMap hashMap = new HashMap();\n hashMap.put(\"sdk_version\", AppLovinSdk.VERSION);\n hashMap.put(\"build\", String.valueOf(131));\n if (!((Boolean) this.f2745b.mo10202a(C1096c.f2507eM)).booleanValue()) {\n hashMap.put(AppLovinWebViewActivity.INTENT_EXTRA_KEY_SDK_KEY, this.f2745b.mo10246t());\n }\n C1200b c = this.f2745b.mo10189O().mo10261c();\n hashMap.put(InMobiNetworkValues.PACKAGE_NAME, C1277l.m3044d(c.f2980c));\n hashMap.put(TapjoyConstants.TJC_APP_VERSION_NAME, C1277l.m3044d(c.f2979b));\n hashMap.put(TapjoyConstants.TJC_PLATFORM, \"android\");\n hashMap.put(\"os\", C1277l.m3044d(VERSION.RELEASE));\n return hashMap;\n }",
"public Map getActorStateVariables() {\r\n\t\treturn actorEnv.localBindings();\r\n\t}",
"@Transient\r\n\tpublic Map<String, Object> getLookups() {\r\n\t\tMap<String,Object> map = new HashMap<String,Object>();\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ID, getId());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_DOCUMENT, getRegistry().getDocument());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_NAME, getRegistry().getName());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_SURNAME, getRegistry().getSurname());\r\n map.put(ICommercialAlias.TARGET_REGISTRY_ALIAS, getRegistry().getAlias());\r\n return map;\r\n\t}",
"public ImportsCollection()\n {\n normalImports = new HashMap();\n wildcardImports = new ArrayList();\n staticWildcardImports = new ArrayList(); \n staticImports = new HashMap();\n }",
"public Map<ColumnInfo, ColumnInfo> getLocalForeignColumnInfoMap() {\n return _localForeignColumnInfoMap;\n }",
"Map<String, RemoteModule> allModulesByKey();",
"public java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status> getSystemMap() {\n return internalGetSystem().getMap();\n }",
"public HashMap<IClassDefinition, BindingDatabase> getBindingMap(){\n return bindingMap;\n }",
"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 LocalVariables locals(){\n\t\treturn frame.getLocals();\n\t}",
"private Map<String, TestModuleHolder> findTestModules() {\n\n\t\tMap<String, TestModuleHolder> testModules = new HashMap<>();\n\n\t\tClassPathScanningCandidateComponentProvider scanner = new ClassPathScanningCandidateComponentProvider(false);\n\t\tscanner.addIncludeFilter(new AnnotationTypeFilter(PublishTestModule.class));\n\t\tfor (BeanDefinition bd : scanner.findCandidateComponents(\"io.fintechlabs\")) {\n\t\t\ttry {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tClass<? extends TestModule> c = (Class<? extends TestModule>) Class.forName(bd.getBeanClassName());\n\t\t\t\tPublishTestModule a = c.getDeclaredAnnotation(PublishTestModule.class);\n\n\t\t\t\ttestModules.put(a.testName(), new TestModuleHolder(c, a));\n\n\t\t\t} catch (ClassNotFoundException e) {\n\t\t\t\tlogger.error(\"Couldn't load test module definition: \" + bd.getBeanClassName());\n\t\t\t}\n\t\t}\n\n\t\treturn testModules;\n\t}",
"public Map initMap(){\n\t\tif (map == null){\n\t\t\tmap = createMap();\n\t\t}\n\t\treturn map;\n\t}",
"public java.util.Map<java.lang.String, ch.epfl.dedis.proto.StatusProto.Response.Status> getSystemMap() {\n return internalGetSystem().getMap();\n }",
"public Iterable<Map.Entry<String,Double>> getConstants() {\r\n return Collections.unmodifiableMap(constants).entrySet();\r\n }",
"public Map ensureColumnMap()\n {\n Map mapColumns = m_mapColumns;\n if (mapColumns == null)\n {\n m_mapColumns = mapColumns = new HashMap();\n }\n return mapColumns;\n }",
"private static java.util.HashMap<Integer, Command> getMappings() {\n if (mappings == null) {\n synchronized (Command.class) {\n if (mappings == null) {\n mappings = new java.util.HashMap<Integer, Command>();\n }\n }\n }\n return mappings;\n }",
"default Map<String, Object> getProperties()\r\n {\r\n return emptyMap();\r\n }",
"default Map<DependencyDescriptor, Set<DependencyDescriptor>> getDependencies() {\n return Collections.emptyMap();\n }",
"public Map<String, Script> getScriptsMap()\n\t{\n\t\treturn scripts;\n\t}",
"public final ClassMap getBaseClassMap()\n {\n return baseClassMap;\n }",
"private Globals() {\n\n\t}",
"public java.util.Collection<VariableInfo> getLocalVariables(){\n\t\tjava.util.Collection<VariableInfo> variables = new java.util.ArrayList<VariableInfo>();\n\n\t\treturn variables;\n\t}",
"public Map<String, String> getFuncNameMap() {\n\t\treturn funcNameMap;\n\t}",
"public Map<ExportGroup, Boolean> getRpExportGroupMap() {\n if (_rpExportGroupMap == null) {\n _rpExportGroupMap = new HashMap<ExportGroup, Boolean>();\n }\n \n return _rpExportGroupMap;\n }",
"public Map<String, String> getEnvironment();",
"private void LoadCoreValues()\n\t{\n\t\tString[] reservedWords = \t{\"program\",\"begin\",\"end\",\"int\",\"if\",\"then\",\"else\",\"while\",\"loop\",\"read\",\"write\"};\n\t\tString[] specialSymbols = {\";\",\",\",\"=\",\"!\",\"[\",\"]\",\"&&\",\"||\",\"(\",\")\",\"+\",\"-\",\"*\",\"!=\",\"==\",\"<\",\">\",\"<=\",\">=\"};\n\t\t\n\t\t//Assign mapping starting at a value of 1 for reserved words\n\t\tfor (int i=0;i<reservedWords.length;i++)\n\t\t{\n\t\t\tcore.put(reservedWords[i], i+1);\n\t\t}\n\t\t//Assign mapping for special symbols\n\t\tfor (int i=0; i<specialSymbols.length; i++)\n\t\t{\t\n\t\t\tcore.put(specialSymbols[i], reservedWords.length + i+1 );\n\t\t}\n\t}",
"@Override\n public Map<String, Class> getDictionary() {\n synchronized (mapper) {\n LinkedHashMap<String, Class> dictionary = new LinkedHashMap<>();\n mapper.fillDictionary(null, dictionary);\n return dictionary;\n }\n }",
"public IntToIntMap getStaticMap() {\n return staticMap;\n }",
"public Map getWebServiceModules() {\n Map map = new HashMap();\n\n // admin config context\n ConfigContext configCtx = AdminService.getAdminService().\n getAdminContext().getAdminConfigContext();\n\n CacheMgr mgr = CacheMgr.getInstance();\n\n // j2ee application\n Map apps = mgr.getJ2eeApplications();\n Collection aValues = apps.values();\n for (Iterator iter=aValues.iterator(); iter.hasNext();) {\n J2eeApplication app = (J2eeApplication) iter.next();\n\n // ejb bundles\n List ejbBundles = app.getEjbBundles();\n if (ejbBundles != null) {\n for (Iterator itr=ejbBundles.iterator(); itr.hasNext();) {\n String ejb = (String) itr.next();\n try {\n Map m = getEjbBundleInfo(configCtx, app.getName(), ejb);\n map.put(m.get(WebServiceInfoProvider.\n SUN_EJB_JAR_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n }\n\n // web bundles \n List webBundles = app.getWebBundles();\n if (webBundles != null) {\n for (Iterator itr=webBundles.iterator(); itr.hasNext();) {\n String web = (String) itr.next();\n try {\n Map m = getWebBundleInfo(configCtx, app.getName(), web);\n map.put(m.get(WebServiceInfoProvider.\n SUN_WEB_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n }\n }\n\n // stand alone ejb module\n Map ejbs = mgr.getEjbModules();\n Collection eValues = ejbs.values();\n for (Iterator iter=eValues.iterator(); iter.hasNext();) {\n String ejbMod = (String) iter.next();\n try {\n Map m = getEjbModuleInfo(configCtx, ejbMod);\n map.put(m.get(WebServiceInfoProvider.\n SUN_EJB_JAR_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n\n // stand alone web module\n Map webs = mgr.getWebModules();\n Collection wValues = webs.values();\n for (Iterator iter=wValues.iterator(); iter.hasNext();) {\n String webMod = (String) iter.next();\n\n try {\n Map m = getWebModuleInfo(configCtx, webMod);\n map.put(m.get(WebServiceInfoProvider.\n SUN_WEB_XML_LOCATION_PROP_NAME), m);\n } catch (RepositoryException re) { }\n }\n\n return map;\n }",
"public static Map<String, Namespace> getImportedNamespaces(Module module) {\n\t\tNamespace namespace = context.getNamespaceByUri(module.getNamespace());\n\t\t//TODO do we need to enforce this to be notNull ?\n\t\tif (namespace == null)\n\t\t\treturn new HashMap<String, Namespace>();\n\t\tMap<String, Namespace> importedNamespaces = NamespaceUtil.getImportedNamespaces(namespace);\n\t\tif (importedNamespaces.size() == 0) {\n\t\t\t//otherwise try the project namespace\n\t\t\tProject project = context.getProject();\n\t\t\tnamespace = context.getNamespaceByUri(project.getNamespace());\n\t\t\timportedNamespaces = NamespaceUtil.getImportedNamespaces(namespace);\n\t\t}\n\t\treturn importedNamespaces;\n\t}",
"public Map<ComponentId, CHILD> getComponentMap() {\n return Collections.unmodifiableMap(producerById);\n }",
"Map<String, Field> extensionFieldsMap() {\n Map<String, Field> extensionsForType = new LinkedHashMap<>();\n for (Field field : extensionFields) {\n extensionsForType.put(field.qualifiedName(), field);\n }\n return extensionsForType;\n }",
"private static <K, V> Map<K, V> newHashMap() {\n return new HashMap<K, V>();\n }",
"public static LinkedHashMap<String,Class<?>> getNodeAttributesMap() {\r\n\t\tLinkedHashMap<String, Class<?>> map= new LinkedHashMap<String, Class<?>>();\r\n\t\tmap.put(uri, String.class);\r\n//\t\tmap.put(canonicalName, String.class);\r\n//\t\tmap.put(category , String.class);\r\n\t\tmap.put(scope,String.class);\r\n\t\tmap.put(segment,String.class);\r\n//\t\tmap.put(numInteractionEdges,Integer.class);\r\n//\t\tmap.put(numSubsumptionEdges,Integer.class);\r\n\t\tmap.put(timestamp,String.class);\r\n\t\tmap.put(modificationDate,String.class);\r\n\t\tmap.put(marked,Boolean.class);\r\n\t\tmap.put(nodeTypeURI, String.class);\r\n\t\t\r\n\t\tmap.put(GO_BIOLOGICAL_PROCESS, List.class);\r\n\t\tmap.put(GO_CELLULAR_COMPONENT, List.class);\r\n\t\tmap.put(GO_MOLECULAR_FUNCTION, List.class);\r\n\t\t\r\n\t\t//GO\r\n//\t\tmap.put(AddGOAnnotations.GO_BIOLOGICAL_PROCESS, String.class);\r\n//\t\tmap.put(AddGOAnnotations.GO_CELLURAL_COMPONENT, String.class);\r\n//\t\tmap.put(AddGOAnnotations.GO_MOLECULAR_FUNCTION, String.class);\r\n\t\t\r\n\t\treturn map;\r\n\t}",
"public final ClassMap getUsedClassMap()\n {\n return useClassMap;\n }",
"public Map<String, Object> context() {\n return unmodifiableMap(context);\n }",
"private VariableMap getParamMappingAsVariableMap() {\n paramValueEncodings.put(fileNameToIndex.keySet().toString(), \" FileNames\");\n paramValueEncodings.put(functionNameToIndex.keySet().toString(), \" FunctionNames\");\n paramValueEncodings.put(typeToIndex.keySet().toString(), \" Types\");\n\n VariableMap preInversedMap = new VariableMap(paramValueEncodings);\n ImmutableMap<String, String> inversedMap = preInversedMap.getNewNameToOriginalNameMap();\n return new VariableMap(inversedMap);\n }",
"public Map<String, Object> getInfoMap() {\n\t\tMap<String, Object> paramMap = new HashMap<String, Object>();\n\t\tthis.putInMap(paramMap);\n\t\treturn paramMap;\n\t}"
]
| [
"0.75185513",
"0.7381287",
"0.7087605",
"0.6964801",
"0.67389977",
"0.6351512",
"0.63010466",
"0.6222221",
"0.6168294",
"0.5953611",
"0.59169734",
"0.57709646",
"0.5590402",
"0.55886",
"0.5528551",
"0.54763806",
"0.54310757",
"0.53972125",
"0.5390892",
"0.53702384",
"0.5340242",
"0.5324026",
"0.52997",
"0.52884173",
"0.5243433",
"0.5227491",
"0.5199326",
"0.5194421",
"0.51857316",
"0.5155104",
"0.5133726",
"0.5132854",
"0.51223624",
"0.5121654",
"0.5121099",
"0.5115934",
"0.5115934",
"0.51148707",
"0.5099974",
"0.5098556",
"0.5091314",
"0.5084157",
"0.507714",
"0.5075898",
"0.507562",
"0.5066474",
"0.50645113",
"0.5064182",
"0.50564",
"0.50484616",
"0.5031688",
"0.5031073",
"0.50300556",
"0.5028321",
"0.5022644",
"0.49993503",
"0.49759683",
"0.49757165",
"0.49757165",
"0.49724534",
"0.49641216",
"0.4960624",
"0.49590006",
"0.4942003",
"0.4941213",
"0.49306822",
"0.4920133",
"0.49189857",
"0.49144384",
"0.49124995",
"0.4899617",
"0.48970327",
"0.48943126",
"0.48890084",
"0.48849818",
"0.48651034",
"0.48650756",
"0.48618224",
"0.4861149",
"0.48521122",
"0.48491573",
"0.4844228",
"0.4843451",
"0.48428926",
"0.48396534",
"0.48377973",
"0.48343563",
"0.4833931",
"0.48335287",
"0.48322615",
"0.48244783",
"0.48238915",
"0.48195654",
"0.481746",
"0.48153198",
"0.48149613",
"0.4807888",
"0.48069435",
"0.4804443",
"0.48018557"
]
| 0.6796732 | 4 |
Returns the value of the specified global variable, or null if not bound. Does not look in the predeclared environment. | public Object getGlobal(String name) {
return globals.get(name);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getGlobalVariableValue() {\r\n return globalVariableValue;\r\n }",
"public Object getValue(String name) {\n Object value = localScope.get(name);\n if ( value!=null ) {\n return value;\n }\n // if not found\n BFlatGUI.debugPrint(0, \"undefined variable \"+name);\n return null;\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 209,\n FQN=\"llvm::Module::getGlobalVariable\", NM=\"_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getGlobalVariableENS_9StringRefEb\")\n //</editor-fold>\n public GlobalVariable /*P*/ getGlobalVariable(StringRef Name) {\n return getGlobalVariable(Name, false);\n }",
"T get(GlobalVariableMap globalVariableMap);",
"@Override\n\tpublic Integer visitGlobal_var_decl(ClangParser.Global_var_declContext ctx)\n {\n \treturn null;\n }",
"private Variable getVariable(String varName){\r\n\t\tif(contains(varName)){\r\n\t\t\treturn scopeVariables.get(varName);\r\n\t\t}else{\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"public AbstractVariable getVariable () {\n try {\n RemoteStackVariable rsv = thread.getCurrentFrame ().getLocalVariable (\"this\"); // NOI18N\n return new ToolsVariable (\n (ToolsDebugger) getDebugger (),\n rsv.getName (),\n rsv.getValue (),\n rsv.getType ().toString ()\n );\n } catch (Exception e) {\n return null;\n }\n }",
"GlobalsType getGlobals();",
"String getVariable();",
"public GlobalNode getGlobal() { return global; }",
"java.lang.String getVarValue();",
"public IExpressionValue getUserDefinedVariable(String key);",
"public java.lang.Short getGlobalVariableType() {\r\n return globalVariableType;\r\n }",
"public void setGlobalVariableValue(java.lang.String globalVariableValue) {\r\n this.globalVariableValue = globalVariableValue;\r\n }",
"public static final String getVar(final Str varNum) {\n try {\n return p().sysVars[varNum.ordinal()];\n } catch (final Exception t) {\n return \"\";\n }\n }",
"public abstract int getBindingVariable();",
"public static int checkGlobal(Token t) {\n for (int i = 0; i < global1.size(); i++) {\n\n if (t.instanc.equals(global1.get(i).instanc)) {\n return 1;\n }\n }\n support.error(\"This variable is not defined: \" + t.instanc + \": \" + t.lineNum);\n return -1;\n }",
"private static String stringValue(String key) {\n String value = context.envString(toEnvvar(key));\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n value = System.getProperty(key);\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n value = context.configString(key);\n if(!isNullOrEmpty(value)) {\n return value;\n }\n\n return null;\n }",
"public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }",
"public Value lookup (String name){\n Closure exist = find_var(name);\n return exist.getValues().get(name);\n }",
"public String getVariable();",
"protected boolean isGlobalVariable(String string) {\n\t\treturn string.charAt(0) == '@';\n\t}",
"public final GlobalVariable global_variable() throws RecognitionException {\r\n GlobalVariable globalVariable = null;\r\n\r\n\r\n Token GLOBAL_VARIABLE7=null;\r\n Token LINKAGE8=null;\r\n Type derived_type9 =null;\r\n\r\n Constant initializer10 =null;\r\n\r\n String section11 =null;\r\n\r\n int align12 =0;\r\n\r\n\r\n\r\n String name;\r\n String linkage = null;\r\n boolean isThreadLocal = false;\r\n boolean isConstant = false;\r\n Type type = null; \r\n Constant initializer = null;\r\n String section = null;\r\n int align = -1;\r\n\r\n try {\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:70:5: ( GLOBAL_VARIABLE '=' ( LINKAGE )? ( 'thread_local' )? ( 'global' | 'constant' ) derived_type ( initializer ( ',' section )? ( ',' align )? )? )\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:71:5: GLOBAL_VARIABLE '=' ( LINKAGE )? ( 'thread_local' )? ( 'global' | 'constant' ) derived_type ( initializer ( ',' section )? ( ',' align )? )?\r\n {\r\n GLOBAL_VARIABLE7=(Token)match(input,GLOBAL_VARIABLE,FOLLOW_GLOBAL_VARIABLE_in_global_variable261); \r\n\r\n name = (GLOBAL_VARIABLE7!=null?GLOBAL_VARIABLE7.getText():null); name = name.substring(1, name.length());\r\n\r\n match(input,47,FOLLOW_47_in_global_variable270); \r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:72:9: ( LINKAGE )?\r\n int alt6=2;\r\n int LA6_0 = input.LA(1);\r\n\r\n if ( (LA6_0==LINKAGE) ) {\r\n alt6=1;\r\n }\r\n switch (alt6) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:72:10: LINKAGE\r\n {\r\n LINKAGE8=(Token)match(input,LINKAGE,FOLLOW_LINKAGE_in_global_variable273); \r\n\r\n linkage = (LINKAGE8!=null?LINKAGE8.getText():null);\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:73:5: ( 'thread_local' )?\r\n int alt7=2;\r\n int LA7_0 = input.LA(1);\r\n\r\n if ( (LA7_0==86) ) {\r\n alt7=1;\r\n }\r\n switch (alt7) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:73:6: 'thread_local'\r\n {\r\n match(input,86,FOLLOW_86_in_global_variable285); \r\n\r\n isThreadLocal= true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:5: ( 'global' | 'constant' )\r\n int alt8=2;\r\n int LA8_0 = input.LA(1);\r\n\r\n if ( (LA8_0==67) ) {\r\n alt8=1;\r\n }\r\n else if ( (LA8_0==58) ) {\r\n alt8=2;\r\n }\r\n else {\r\n NoViableAltException nvae =\r\n new NoViableAltException(\"\", 8, 0, input);\r\n\r\n throw nvae;\r\n\r\n }\r\n switch (alt8) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:6: 'global'\r\n {\r\n match(input,67,FOLLOW_67_in_global_variable297); \r\n\r\n }\r\n break;\r\n case 2 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:74:17: 'constant'\r\n {\r\n match(input,58,FOLLOW_58_in_global_variable301); \r\n\r\n isConstant = true;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n pushFollow(FOLLOW_derived_type_in_global_variable311);\r\n derived_type9=derived_type();\r\n\r\n state._fsp--;\r\n\r\n\r\n type = derived_type9;\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:76:5: ( initializer ( ',' section )? ( ',' align )? )?\r\n int alt11=2;\r\n int LA11_0 = input.LA(1);\r\n\r\n if ( (LA11_0==BINARY_OP||LA11_0==BOOLEAN||LA11_0==CONVERSION_OP||LA11_0==FLOATING_POINT||LA11_0==HEX||LA11_0==INTEGER||LA11_0==NULL||LA11_0==46||LA11_0==49||LA11_0==56||(LA11_0 >= 65 && LA11_0 <= 66)||LA11_0==68||(LA11_0 >= 92 && LA11_0 <= 93)) ) {\r\n alt11=1;\r\n }\r\n else if ( (LA11_0==GLOBAL_VARIABLE) ) {\r\n int LA11_2 = input.LA(2);\r\n\r\n if ( (LA11_2==GLOBAL_VARIABLE||LA11_2==44||(LA11_2 >= 60 && LA11_2 <= 61)) ) {\r\n alt11=1;\r\n }\r\n }\r\n switch (alt11) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:76:6: initializer ( ',' section )? ( ',' align )?\r\n {\r\n pushFollow(FOLLOW_initializer_in_global_variable320);\r\n initializer10=initializer();\r\n\r\n state._fsp--;\r\n\r\n\r\n initializer = initializer10;\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:77:7: ( ',' section )?\r\n int alt9=2;\r\n int LA9_0 = input.LA(1);\r\n\r\n if ( (LA9_0==44) ) {\r\n int LA9_1 = input.LA(2);\r\n\r\n if ( (LA9_1==SECTION) ) {\r\n alt9=1;\r\n }\r\n }\r\n switch (alt9) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:77:8: ',' section\r\n {\r\n match(input,44,FOLLOW_44_in_global_variable332); \r\n\r\n pushFollow(FOLLOW_section_in_global_variable334);\r\n section11=section();\r\n\r\n state._fsp--;\r\n\r\n\r\n section = section11;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:79:7: ( ',' align )?\r\n int alt10=2;\r\n int LA10_0 = input.LA(1);\r\n\r\n if ( (LA10_0==44) ) {\r\n alt10=1;\r\n }\r\n switch (alt10) {\r\n case 1 :\r\n // D:\\\\workspace\\\\s\\\\JLLVM_b\\\\src\\\\cn\\\\edu\\\\sjtu\\\\jllvm\\\\VMCore\\\\Parser\\\\LLVM.g:79:8: ',' align\r\n {\r\n match(input,44,FOLLOW_44_in_global_variable355); \r\n\r\n pushFollow(FOLLOW_align_in_global_variable357);\r\n align12=align();\r\n\r\n state._fsp--;\r\n\r\n\r\n align = align12;\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n }\r\n\r\n\r\n globalVariable = valueFactory.createGlobalVariable(name, linkage, isThreadLocal, isConstant, type, \r\n initializer, section, align);\r\n\r\n }\r\n catch (RecognitionException re) {\r\n reportError(re);\r\n recover(input,re);\r\n }\r\n\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n return globalVariable;\r\n }",
"private Variable findVariable(String varToFind){\r\n\t\tScope curScope = this;\r\n\t\twhile (curScope!=null) {\r\n\t\t\tif(curScope.contains(varToFind)){\r\n\t\t\t\treturn curScope.getVariable(varToFind);\r\n\t\t\t}else{\r\n\t\t\t\tcurScope = curScope.parent;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public Double getVariable(Object var) {\n Double val = constraints.get(var);\n if (val == null)\n return 0.0;\n else\n return val;\n }",
"public boolean isGlobal();",
"public Integer lookupVariable(final String variableName) {\n if (isLocalVariable(variableName)) {\n return this.variables.get(variableName);\n } else {\n if (this.parent != null) {\n return this.parent.lookupVariable(variableName);\n } else {\n throw new InterpreterException(\"Variable \" + variableName + \" is not defined.\");\n }\n }\n }",
"static boolean env_var_value(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"env_var_value\")) return false;\n boolean r;\n Marker m = enter_section_(b);\n r = consumeToken(b, \"env\");\n r = r && consumeTokens(b, 0, L_PAREN, STRING, R_PAREN);\n exit_section_(b, m, null, r);\n return r;\n }",
"Var getVar();",
"private GradsVariable findVar(Variable v2) {\n List<GradsVariable> vars = gradsDDF.getVariables();\n String varName = v2.getFullName();\n for (GradsVariable var : vars) {\n if (var.getName().equals(varName)) {\n return var;\n }\n }\n\n return null; // can't happen?\n }",
"protected Sequence actuallyEvaluate(XPathContext context, Component<GlobalVariable> target) throws XPathException {\n final Controller controller = context.getController();\n assert controller != null;\n final Bindery b = controller.getBindery(getPackageData());\n //System.err.println(\"EVAL GV \" + this + \" \" + getVariableQName().getDisplayName() + \" in slot \" + getBinderySlotNumber());\n\n try {\n // This is the first reference to a global variable; try to evaluate it now.\n // But first check for circular dependencies.\n setDependencies(this, context);\n\n // Set a flag to indicate that the variable is being evaluated. This is designed to prevent\n // (where possible) the same global variable being evaluated several times in different threads\n boolean go = b.setExecuting(this);\n if (!go) {\n // some other thread has evaluated the variable while we were waiting\n return b.getGlobalVariable(getBinderySlotNumber());\n }\n\n Sequence value = getSelectValue(context, target);\n if (indexed) {\n value = controller.getConfiguration().obtainOptimizer().makeIndexedValue(value.iterate());\n }\n return b.saveGlobalVariableValue(this, value);\n\n } catch (XPathException err) {\n b.setNotExecuting(this);\n if (err instanceof XPathException.Circularity) {\n String errorCode;\n if (getPackageData().getHostLanguage() == Configuration.XSLT) {\n errorCode = \"XTDE0640\";\n } else if (getPackageData().getXPathVersion() >= 30) {\n errorCode = \"XQDY0054\";\n } else {\n errorCode = \"XQST0054\";\n }\n err.setErrorCode(errorCode);\n err.setXPathContext(context);\n // Detect it more quickly the next time (in a pattern, the error is recoverable)\n SingletonClosure closure = new SingletonClosure(new ErrorExpression(err), context);\n b.setGlobalVariable(this, closure);\n err.setLocation(getLocation());\n throw err;\n } else {\n throw err;\n }\n }\n }",
"public Variable getVariable() {\r\n\t\tObject ob = elementAt(0);\r\n\t\tif (size() == 1 && ob instanceof Variable) {\r\n\t\t\treturn (Variable) ob;\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"public java.lang.String getVarValue() {\n java.lang.Object ref = varValue_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n varValue_ = s;\n }\n return s;\n }\n }",
"public String getVar() {\n\t\treturn state.get(PropertyKeys.var);\n\t}",
"public IRubyObject getConstantAt(String name) {\n IRubyObject value = fetchConstant(name);\n \n return value == UNDEF ? resolveUndefConstant(getRuntime(), name) : value;\n }",
"public Double visitVariable(simpleCalcParser.VariableContext ctx){\n\t\tString varname = ctx.x.getText();\n\t\tDouble d = env.get(varname);\n\t\tif (d==null){\n\t\t\tSystem.err.println(\"Variable \" + varname + \" is not defined. \\n\");\n\t\t\tSystem.exit(-1);\n\t\t}\n\t \treturn d;\n \t}",
"public Variable getVariable(String name);",
"public static String _process_globals() throws Exception{\nreturn \"\";\n}",
"public static String _process_globals() throws Exception{\nreturn \"\";\n}",
"public static String _process_globals() throws Exception{\nreturn \"\";\n}",
"public static String _process_globals() throws Exception{\nreturn \"\";\n}",
"public String getVar()\n {\n return var;\n }",
"protected String getVar(String variable) {\n\t\treturn myVarMap.get(variable);\n\t}",
"public RequestedVariableHandler getRequestedVariableHandler(){\n\t\treturn requestedVariableHandler;\n\t}",
"Node getVariable();",
"Object getFieldConfigValue(String collectionName,String fieldName,String variable) {\n HashMap<String,Object> field = getFieldConfig(collectionName,fieldName);\n if (field == null) return null;\n return field.containsKey(variable) ? field.get(variable) : null;\n }",
"public String getVar () {\n\t\treturn var;\n\t}",
"private boolean putGlobVar(String name){\n if(get(name) != null) return false;\n return globalVariables.putIfAbsent(name, name) == null;\n }",
"int getGlobalIndex(int localIndex) {\r\n return local2globalIndex[localIndex];\r\n }",
"String getVarDeclare();",
"public GlobalIdEntry getGlobalIdEntry(String globalId);",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public void defineVariable(final GlobalVariable variable) {\n globalVariables.define(variable.name(), new IAccessor() {\n public IRubyObject getValue() {\n return variable.get();\n }\n \n public IRubyObject setValue(IRubyObject newValue) {\n return variable.set(newValue);\n }\n });\n }",
"public interface Binding {\n\n /**\n * Get the declared type of the variable\n * @return the declared type\n */\n\n public SequenceType getRequiredType();\n\n /**\n * Evaluate the variable\n * @param context the XPath dynamic evaluation context\n * @return the result of evaluating the variable\n */\n\n public ValueRepresentation evaluateVariable(XPathContext context) throws XPathException;\n\n /**\n * Indicate whether the binding is local or global. A global binding is one that has a fixed\n * value for the life of a query or transformation; any other binding is local.\n * @return true if the binding is global\n */\n\n public boolean isGlobal();\n\n /**\n * If this is a local variable held on the local stack frame, return the corresponding slot number.\n * In other cases, return -1.\n * @return the slot number on the local stack frame\n */\n\n public int getLocalSlotNumber();\n\n /**\n * Get the name of the variable\n * @return the name of the variable, as a structured QName\n */\n\n public StructuredQName getVariableQName();\n\n}",
"public double getVariable(String nam) {\r\n Double val=variables.get(nam);\r\n\r\n return (val==null ? 0 : val.doubleValue());\r\n }",
"public String variable()\n\t{\n\t\treturn _var;\n\t}",
"public Variable findVariable(String shortName) {\n if (shortName == null)\n return null;\n return memberHash.get(shortName);\n }",
"public CFString value() {\n return lazyGlobalValue.value();\n }",
"public String getVar() {\n\t\treturn _var;\n\t}",
"public java.lang.String getVarValue() {\n java.lang.Object ref = varValue_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n varValue_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public List<Identifier> getGlobalVars(){\n final List<Identifier> globs = new ArrayList<>();\n\n globalVariables.keySet().stream()\n .map(x -> new Identifier(Scope.GLOBAL, Type.VARIABLE, x, globalVariables.get(x)))\n .forEach(globs::add);\n\n return globs;\n }",
"public static String extractVariable(String s) {\n Matcher matcher = VARS_RE.matcher(s);\n return matcher.find() ? matcher.group(1) : null;\n }",
"public Symbol findEntryGlobal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null)\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}",
"public void processGlobalVariable(String name, String value) {\n\t\tif (isGlobalVariable(name)) {\n\t\t\tgraphLayout.getGlobalVariables().put(removeFirstChar(name), value);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Field \" + name\n\t\t\t\t\t+ \" does not have a '@' as prefix. Delete it or add an @.\");\n\t\t}\n\t}",
"void envVariableQueried(String key, @Nullable String value, String consumer);",
"public ValueDecl lookupValue(Identifier name) {\n Pair<Integer, ValueDecl> entry = valueScope.get(name);\n if (entry == null) return null;\n return entry.getRight();\n }",
"public boolean getVal(String str){\n if(!variables.containsKey(str)){\n System.out.println(\"the variable you are trying to access does not exist\");\n return false;\n }\n stack.push(variables.get(str));\n return true;\n }",
"int getScopeValue();",
"private boolean smem_variable_get(smem_variable_key variable_id, ByRef<Long> variable_value) throws SQLException\n {\n final PreparedStatement var_get = db.var_get;\n \n var_get.setInt(1, variable_id.ordinal());\n try(ResultSet rs = var_get.executeQuery())\n {\n if(rs.next())\n {\n variable_value.value = rs.getLong(0 + 1);\n return true;\n }\n else\n {\n return false;\n }\n }\n }",
"public IVariable getVariable(Integer id) {\n return null;\n }",
"@Override\n public T get(ResolveContext context) {\n T dv = defaultValue == null ? null : defaultValue.resolve(context);\n\n String paramName = name.toString();\n if (context.userParameters != null && context.userParameters.containsKey(paramName)) {\n Object value = context.userParameters.get(paramName);\n if (dv == null) {\n //noinspection unchecked\n return (T) value;\n }\n if (dv instanceof Boolean && value instanceof String) {\n //noinspection unchecked\n return (T) (Object) \"true\".equals(value);\n }\n //noinspection unchecked\n return (T) DefaultGroovyMethods.asType(value, dv.getClass());\n } else if (dv != null) {\n return dv;\n } else if (required) {\n throw new MissingVariableException(name);\n } else {\n return null;\n }\n }",
"DirectVariableResolver getVariableResolver();",
"protected Object LOADVAR(final Frame cf, final int varScope, final int pos){\n\t\treturn CodeBlock.isMaxArg2(pos) ? LOADVARMODULE(cf, varScope) : LOADVARSCOPED(cf, varScope, pos);\n\t}",
"@Override\n\tpublic ServerServices upstreamGlobalVarsInit() throws Exception {\n\t\treturn null;\n\t}",
"public String getVariable()\n {\n return this.strVariable;\n }",
"public GlobalVariable() {\n }",
"boolean check (Env env) {\n if (Env.find (env, nameOfVar) != null) {\n return true;\n } else {\n System.err.println (\"Semantic error: The variable \\\"\" \n + nameOfVar + \"\\\" was used but was not declared!\");\n return false;\n }\n }",
"Variable resolve(String name) {\n Scope scope = this;\n while (scope != null) {\n if (scope.variables.containsKey(name)) {\n return scope.variables.get(name);\n }\n scope = scope.parent;\n }\n throw new IllegalArgumentException(\"Unresolved variable: \" + name);\n }",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/include/llvm/IR/Module.h\", line = 372,\n FQN=\"llvm::Module::getNamedGlobal\", NM=\"_ZN4llvm6Module14getNamedGlobalENS_9StringRefE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/AsmWriter.cpp -nm=_ZN4llvm6Module14getNamedGlobalENS_9StringRefE\")\n //</editor-fold>\n public GlobalVariable /*P*/ getNamedGlobal(StringRef Name) {\n return getGlobalVariable(new StringRef(Name), true);\n }",
"public String getProperty(String key) {\n\t\treturn Optional.ofNullable(env.get(key)).orElseGet(()->\"\");\n\t}",
"@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 223,\n FQN=\"llvm::Module::getOrInsertGlobal\", NM=\"_ZN4llvm6Module17getOrInsertGlobalENS_9StringRefEPNS_4TypeE\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getOrInsertGlobalENS_9StringRefEPNS_4TypeE\")\n //</editor-fold>\n public Constant /*P*/ getOrInsertGlobal(StringRef Name, Type /*P*/ Ty) {\n // See if we have a definition for the specified global already.\n GlobalVariable /*P*/ GV = dyn_cast_or_null_GlobalVariable(getNamedValue(new StringRef(Name)));\n if (!(GV != null)) {\n // Nope, add it\n GlobalVariable /*P*/ New = /*NEW_EXPR [GlobalVariable::new]*/GlobalVariable.$new_GlobalVariable((type$ptr<?> New$Mem)->{\n return new GlobalVariable(/*Deref*/this, Ty, false, GlobalVariable.LinkageTypes.ExternalLinkage, \n (Constant /*P*/ )null, new Twine(Name));\n });\n return New; // Return the new declaration.\n }\n \n // If the variable exists but has the wrong type, return a bitcast to the\n // right type.\n Type /*P*/ GVTy = GV.getType();\n PointerType /*P*/ PTy = PointerType.get(Ty, GVTy.getPointerAddressSpace());\n if (GVTy != PTy) {\n return ConstantExpr.getBitCast(GV, PTy);\n }\n \n // Otherwise, we just found the existing function or a prototype.\n return GV;\n }",
"public void testLocalVarDefResolve() throws Exception {\n BashVarDef varDef = assertIsValidVarDef();\n Assert.assertTrue(BashPsiUtils.findNextVarDefFunctionDefScope(varDef) != null);\n Assert.assertNull(varDef.getReference().resolve());\n }",
"public Variable get(String rootName) {\n//\t\tSystem.out.println(\"symbolTable get \"+n);\n\t\tNameSSA ssa = name.get(rootName);\t\n//\t\tSystem.out.println(\"ssa \" + ssa);\n\t\tif (ssa != null) \n\t\t\treturn var.get(ssa.current());\n\t\telse\n\t\t\treturn null;\n\t}",
"public boolean getUseGlobalService();",
"public Object getStateValue(final String stateVariableName) {\n //Preconditions\n assert stateVariableName != null : \"stateVariableName must not be null\";\n assert !stateVariableName.isEmpty() : \"stateVariableName must not be empty\";\n\n synchronized (stateVariableDictionary) {\n if (stateVariableDictionary.isEmpty() && !stateValueBindings.isEmpty()) {\n // lazy population of the state value dictionary from the persistent state value bindings\n stateValueBindings.stream().forEach((stateValueBinding) -> {\n stateVariableDictionary.put(stateValueBinding.getVariableName(), stateValueBinding);\n });\n }\n final StateValueBinding stateValueBinding = stateVariableDictionary.get(stateVariableName);\n if (stateValueBinding == null) {\n return null;\n } else {\n return stateValueBinding.getValue();\n }\n }\n }",
"String getBbgGlobalId();",
"public Variable get(String rootName, int ssaNum) {\n\t\treturn var.get(rootName + \"_\" + ssaNum);\n\t}",
"public Sequence getSelectValue(XPathContext context, Component target) throws XPathException {\n if (select == null) {\n throw new AssertionError(\"*** No select expression for global variable $\" +\n getVariableQName().getDisplayName() + \"!!\");\n } else if (select instanceof Literal) {\n // fast path for constant global variables\n return ((Literal)select).getValue();\n } else {\n try {\n XPathContextMajor c2 = context.newCleanContext();\n c2.setOrigin(this);\n if (target == null || target.getDeclaringPackage().isRootPackage()) {\n ManualIterator mi = new ManualIterator(context.getController().getGlobalContextItem());\n c2.setCurrentIterator(mi);\n } else {\n c2.setCurrentIterator(null);\n }\n if (getStackFrameMap() != null) {\n c2.openStackFrame(getStackFrameMap());\n }\n c2.setCurrentComponent(target);\n int savedOutputState = c2.getTemporaryOutputState();\n c2.setTemporaryOutputState(StandardNames.XSL_VARIABLE);\n c2.setCurrentOutputUri(null);\n Sequence result;\n if (indexed) {\n result = c2.getConfiguration().makeSequenceExtent(select, FilterExpression.FILTERED, c2);\n } else {\n result = SequenceExtent.makeSequenceExtent(select.iterate(c2));\n }\n c2.setTemporaryOutputState(savedOutputState);\n return result;\n } catch (XPathException e) {\n if (!getVariableQName().hasURI(NamespaceConstant.SAXON_GENERATED_VARIABLE)) {\n e.setIsGlobalError(true);\n }\n throw e;\n }\n }\n }",
"public static String getEnvironmentVariableValue(String strVariable) {\r\n return System.getenv(strVariable);\r\n }",
"public String getBbgGlobalId() {\n Object ref = bbgGlobalId_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n bbgGlobalId_ = s;\n }\n return s;\n }\n }",
"public Map<String, Object> getGlobals() {\n return globals;\n }",
"public DagEdge getLvalBinding(DagEdge input, Bindings bindings) {\n if (_varName == null) {\n DagEdge current = bindings.getBinding(\"#\", Bindings.LOCAL);\n if (current != null) return current;\n return input;\n }\n DagEdge current = bindings.getBinding(_varName, getType());\n if (current == null && getType() == Bindings.GLOBAL) {\n // create a new global variable\n current = new DagEdge((short)-1, new DagNode());\n bindings.bind(_varName, current, getType());\n }\n if (current == null) {\n logger.warn(\"local variable not bound and used as lval \" + _varName);\n }\n return current;\n }",
"public void setGlobalVariableType(java.lang.Short globalVariableType) {\r\n this.globalVariableType = globalVariableType;\r\n }",
"private int getEnvironment() {\n\n if (ServiceBaseGlobal.env != null) {\n return ServiceBaseGlobal.env.getValue();\n }\n return ProjectUtil.Environment.dev.getValue();\n }",
"private static String getEnvironVar(String env) {\r\n \treturn System.getenv(env);\r\n }",
"public void addGlobalVariable(int adr, int x){\n initInstructions.add(\"# adding a global variable\");\n initInstructions.add(\"li $a0, \" + x);\n initInstructions.add(\"sw $a0, \" + adr + \"($gp)\");\n initInstructions.add(\"# end of adding a global variable\");\n }",
"public VarType getVar(MappingType mapping, DocType doc) {\n\t\treturn getVar(mapping, doc.getId());\n\t}",
"public static final String getSystemString(String key) {\n\t\tString value = null;\n\t\ttry {\n\t\t\tvalue = System.getProperty(key);\n\t\t} catch (NullPointerException e) {\n\n\t\t\tif (THROW_ON_LOAD_FAILURE)\n\t\t\t\tthrow e;\n\t\t}\n\t\treturn value;\n\t}",
"public String[] getLocalVariables() {\r\n return scope != null? scope.getLocalVariables() : null;\r\n }",
"public String getBbgGlobalId() {\n Object ref = bbgGlobalId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n bbgGlobalId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }"
]
| [
"0.63694865",
"0.60724753",
"0.5863205",
"0.5822656",
"0.5800912",
"0.5622417",
"0.55242985",
"0.5498693",
"0.5431673",
"0.54043764",
"0.53888255",
"0.5381924",
"0.5323151",
"0.52836716",
"0.5172998",
"0.51606923",
"0.51555187",
"0.5146857",
"0.5130776",
"0.5120425",
"0.5109533",
"0.510592",
"0.50902396",
"0.50877637",
"0.507599",
"0.50728196",
"0.5055289",
"0.5049271",
"0.5017043",
"0.5009067",
"0.49908862",
"0.49392024",
"0.49358478",
"0.49294588",
"0.49288085",
"0.49249458",
"0.49130043",
"0.48781246",
"0.48781246",
"0.48781246",
"0.48781246",
"0.48642525",
"0.4862231",
"0.4856376",
"0.4855922",
"0.48553568",
"0.48468682",
"0.48249525",
"0.48185918",
"0.48159602",
"0.47713932",
"0.4770921",
"0.4770921",
"0.47441158",
"0.47421676",
"0.471895",
"0.47182366",
"0.4715241",
"0.4714886",
"0.47049692",
"0.47038487",
"0.47030038",
"0.47002906",
"0.46950236",
"0.4692452",
"0.46853864",
"0.46852645",
"0.46818346",
"0.46719015",
"0.46700338",
"0.46453753",
"0.4642312",
"0.46291694",
"0.46214887",
"0.4620234",
"0.46192178",
"0.46177167",
"0.46110877",
"0.4610739",
"0.46076474",
"0.46022928",
"0.46000704",
"0.459672",
"0.45964962",
"0.45927477",
"0.45879865",
"0.4582941",
"0.45736605",
"0.45686638",
"0.45612085",
"0.45535567",
"0.45533425",
"0.45520043",
"0.4551611",
"0.4549156",
"0.45465723",
"0.45442662",
"0.4537081",
"0.45268038",
"0.4526292"
]
| 0.5869349 | 2 |
Updates a global binding in the module environment. | public void setGlobal(String name, Object value) {
Preconditions.checkNotNull(value, "Module.setGlobal(%s, null)", name);
globals.put(name, value);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BindState updateBinding(AccessPath ap, CFAEdge edge, List<AbstractState> otherStates) {\n if (ap.startFromGlobal()) {\n return addGlobalBinding(ap, edge, otherStates);\n } else {\n return addLocalBinding(ap, edge, otherStates);\n }\n }",
"private void changeBinding(InstanceBinding binding) {\r\n\t\t\r\n\t}",
"private void applyBindings(Bindings bindings) {\n\t\tfor (Map.Entry<String, Object> binding : bindings.entrySet()) {\n\t\t\tluaState.pushJavaObject(binding.getValue());\n\t\t\tString variableName = binding.getKey();\n\t\t\tint lastDotIndex = variableName.lastIndexOf('.');\n\t\t\tif (lastDotIndex >= 0) {\n\t\t\t\tvariableName = variableName.substring(lastDotIndex + 1);\n\t\t\t}\n\t\t\tluaState.setGlobal(variableName);\n\t\t}\n\t}",
"private void updateBinding(){\n\t\tif(propertiesObj == null)\n\t\t\treturn;\n\n\t\tif(txtBinding.getText().trim().length() == 0)\n\t\t\treturn;\n\n\t\tif(propertiesObj instanceof QuestionDef)\n\t\t\t((QuestionDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof OptionDef)\n\t\t\t((OptionDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof FormDef)\n\t\t\t((FormDef)propertiesObj).setVariableName(txtBinding.getText());\n\t\telse if(propertiesObj instanceof PageDef){\n\t\t\ttry{\n\t\t\t\t((PageDef)propertiesObj).setPageNo(Integer.parseInt(txtBinding.getText()));\n\t\t\t}catch(Exception ex){\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tformChangeListener.onFormItemChanged(propertiesObj);\n\t}",
"private void registerBindings(){\t\t\n\t}",
"private void registerBindings(){\t\t\n\t}",
"public final void setBinding(@Nullable TBinding binding) {\n // if we already had a binding\n try (AutoRef<TBinding> oldBinding = AutoRef.of(_binding);\n AutoRef<Context> context = AutoRef.of(oldBinding.get().getRoot().getContext())) {\n // notify the derived class that the current binding is being unset\n onBindingUnset(context, oldBinding);\n } catch (ReferenceNullException ignored) { }\n // set the new binding\n _binding = new WeakReference<>(binding);\n // if the new binding is not null\n try (AutoRef<TBinding> newBinding = AutoRef.of(_binding);\n AutoRef<Context> context = AutoRef.of(newBinding.get().getRoot().getContext())) {\n // set the values contained within the value repository\n for (int key : _values.keySet()) {\n newBinding.get().setVariable(key, _values.get(key));\n }\n // notify the derived class of the new binding being set\n onBindingSet(context, newBinding);\n // execute the binding's pending changes\n _binding.get().executePendingBindings();\n } catch (ReferenceNullException ignored) {}\n }",
"public final void bind(App app)\n\t{\n\t\tthis.app = app;\n\t}",
"public void bind() {\n }",
"public BindState(Set<AccessPath> globalVariableNames) {\n this.stateOnLastFunctionCall = null;\n this.globalDefs =\n addVariables(PathCopyingPersistentTree.<String, BindingPoint>of(), globalVariableNames);\n this.localDefs = new PathCopyingPersistentTree<>();\n }",
"public void doBind(){\n\t\tboolean isBound = settings.getBoolean(\"isBound\", false);\n\t\tif(!isBound){\n \t\ti = new Intent(context, LocationService.class);\n \t\tcontext.bindService(i, SpeedConnection, Context.BIND_AUTO_CREATE);\n \t\tcontext.startService(i);\n \t\teditor.putBoolean(\"isBound\", true);\n \t\teditor.apply();\n \t}\n\t}",
"public void executeBindings() {\n synchronized (this) {\n long j = this.aot;\n this.aot = 0;\n }\n }",
"public void executeBindings() {\n synchronized (this) {\n long j = this.aot;\n this.aot = 0;\n }\n }",
"public void executeBindings() {\n synchronized (this) {\n long j = this.aot;\n this.aot = 0;\n }\n }",
"public void executeBindings() {\n synchronized (this) {\n long j = this.f10778f;\n this.f10778f = 0;\n }\n }",
"public void setBindings(Binding[] binds) {\n this.binds = binds;\n }",
"public void setBindings(Binding[] binds) {\n this.binds = binds;\n }",
"public void setBinding(Binding binding) {\r\n\t \tthis.binding = binding;\r\n\t }",
"protected void onBindingSet(@NonNull AutoRef<Context> context, @NonNull AutoRef<TBinding> binding) {\n }",
"void setBind() {\n for (int i = 1; i < size(); i++) {\n Exp f = get(i);\n if (f.isFilter() && f.size() > 0) {\n Exp bind = f.first();\n if (bind.type() == OPT_BIND\n // no bind (?x = ?y) in case of JOIN\n && (!Query.testJoin || bind.isBindCst())) {\n int j = i - 1;\n while (j > 0 && get(j).isFilter()) {\n j--;\n }\n if (j >= 0) {\n Exp g = get(j);\n if ((g.isEdge() || g.isPath())\n && (bind.isBindCst() ? g.bind(bind.first().getNode()) : true)) {\n bind.status(true);\n g.setBind(bind);\n }\n }\n }\n }\n }\n }",
"protected abstract void bind();",
"protected abstract void bind();",
"public static synchronized void setGlobalContext(Context newGlobalContext) {\n assert newGlobalContext != null;\n assert singletonPhoneUtils == null; // Should not yet be created\n // Not supposed to change the owner app\n assert globalContext == null || globalContext == newGlobalContext;\n\n globalContext = newGlobalContext;\n }",
"public yandex.cloud.api.operation.OperationOuterClass.Operation updateAccessBindings(yandex.cloud.api.access.Access.UpdateAccessBindingsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getUpdateAccessBindingsMethod(), getCallOptions(), request);\n }",
"private void bindObject() {\n }",
"private boolean bindNewVariable(String name, Obj value) {\n if (name.equals(\"_\")) return true;\n \n // Bind the variable.\n return mScope.define(mIsMutable, name, value);\n }",
"public void updateAccessBindings(yandex.cloud.api.access.Access.UpdateAccessBindingsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getUpdateAccessBindingsMethod(), getCallOptions()), request, responseObserver);\n }",
"public void updateAccessBindings(yandex.cloud.api.access.Access.UpdateAccessBindingsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getUpdateAccessBindingsMethod(), responseObserver);\n }",
"private void addExtraBindings() {\n }",
"public void setGlobalVariables(GlobalVariables globalVariables);",
"private static class <init>\n implements ScopedBindingBuilder\n{\n\n public void asEagerSingleton()\n {\n }",
"void update(Env world) throws Exception;",
"private void bind()\n {\n /* Cancel unbind */\n cancelUnbind();\n\n /* Bind to the Engagement service if not already done or being done */\n if (mEngagementService == null && !mBindingService)\n {\n mBindingService = true;\n mContext.bindService(EngagementAgentUtils.getServiceIntent(mContext), mServiceConnection,\n BIND_AUTO_CREATE);\n }\n }",
"public void newValueBinding(BGMEvent e);",
"public void mergeGlobal() {\n if (global == null) return;\n // merge global nodes.\n Set set = Collections.singleton(GlobalNode.GLOBAL);\n global.replaceBy(set, true);\n nodes.remove(global);\n unifyAccessPaths(new LinkedHashSet(set));\n if (VERIFY_ASSERTIONS) {\n verifyNoReferences(global);\n }\n global = null;\n }",
"protected void bind(EvaluationContext context) {\n this.context = context;\n }",
"public com.google.common.util.concurrent.ListenableFuture<yandex.cloud.api.operation.OperationOuterClass.Operation> updateAccessBindings(\n yandex.cloud.api.access.Access.UpdateAccessBindingsRequest request) {\n return io.grpc.stub.ClientCalls.futureUnaryCall(\n getChannel().newCall(getUpdateAccessBindingsMethod(), getCallOptions()), request);\n }",
"public void bind()\r\n\t{\r\n\t\tVector3f color;\r\n\r\n\t\tcolor = ambient;\r\n\t\tglColorMaterial(GL_FRONT_AND_BACK, GL_AMBIENT);\r\n\t\tglColor4f(color.x, color.y, color.z, transparency);\r\n\r\n\t\tcolor = diffuse;\r\n\t\tglColorMaterial(GL_FRONT_AND_BACK, GL_DIFFUSE);\r\n\t\tglColor4f(color.x, color.y, color.z, transparency);\r\n\r\n\t\tcolor = specular;\r\n\t\tglColorMaterial(GL_FRONT_AND_BACK, GL_SPECULAR);\r\n\t\tglColor4f(color.x, color.y, color.z, transparency);\r\n\r\n\t\tif (texture != null)\r\n\t\t{\r\n\t\t\ttexture.bind();\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tglBindTexture(GL_TEXTURE_2D, 0);\r\n\t\t}\r\n\t}",
"@Override\n\tpublic void bind() {\n\t\t\n\t}",
"public void bind(String name, Object obj)\r\n {\r\n if (logger.isInfoEnabled()) {\r\n logger.info(\"Static JNDI binding: [\" + name + \"] = [\" + jndiObjectToString(obj) + \"]\");\r\n }\r\n this.boundObjects.put(name, obj);\r\n }",
"protected int updateBinding(Object value, int position) {\n if(value != null) {\n ExtendedType<?> extendedType = context.getAdapter().getExtendedTypes().getRegisteredType(value.getClass());\n bindings[position].include(++position, value, extendedType);\n }\n return position;\n }",
"void addNewBindPath(String path);",
"public void executeBindings() {\n long l10;\n long l11;\n long l12;\n Button button;\n long l13;\n li$b li$b;\n li$a li$a;\n boolean bl2;\n int n10;\n int n11;\n long l14;\n long l15;\n Object object;\n boolean bl3;\n Object object2;\n long l16;\n long l17;\n li li2;\n block18: {\n block17: {\n block16: {\n boolean bl4;\n li2 = this;\n synchronized (this) {\n l17 = this.m;\n this.m = l16 = 0L;\n }\n object2 = this.g;\n bl3 = this.h;\n object = this.f;\n l15 = 9;\n long l18 = l17 & l15;\n l14 = l18 == l16 ? 0 : (l18 < l16 ? -1 : 1);\n n11 = 8;\n n10 = 0;\n if (l14 == false) break block16;\n if (object2 != null) {\n bl4 = ((VersionInfo)object2).isForceUpdate();\n object2 = ((VersionInfo)object2).getNoticeLine();\n } else {\n bl2 = false;\n object2 = null;\n bl4 = false;\n li$a = null;\n }\n if (l14 != false) {\n long l19 = bl4 ? (long)32 : (long)16;\n l17 |= l19;\n }\n if (!bl4) break block17;\n l14 = n11;\n break block18;\n }\n bl2 = false;\n object2 = null;\n }\n l14 = 0;\n }\n long l20 = 10;\n long l21 = l17 & l20;\n long l22 = l21 == l16 ? 0 : (l21 < l16 ? -1 : 1);\n if (l22 != false) {\n if (l22 != false) {\n l21 = bl3 ? 128L : (long)64;\n l17 |= l21;\n }\n if (bl3) {\n n11 = 0;\n li$b = null;\n }\n n10 = n11;\n }\n if ((bl3 = (l13 = (l21 = l17 & (long)12) - l16) == 0L ? 0 : (l13 < 0L ? -1 : 1)) && object != null) {\n li$b = li2.k;\n if (li$b == null) {\n li2.k = li$b = new li$b();\n }\n li$b = li$b.b((c$a)object);\n li$a = li2.l;\n if (li$a == null) {\n li2.l = li$a = new li$a();\n }\n object = li$a.b((c$a)object);\n } else {\n object = null;\n n11 = 0;\n li$b = null;\n }\n if (bl3) {\n li2.a.setOnClickListener((View.OnClickListener)object);\n button = li2.b;\n button.setOnClickListener((View.OnClickListener)li$b);\n }\n if (bl3 = (l12 = (l11 = l17 & l15) - l16) == 0L ? 0 : (l12 < 0L ? -1 : 1)) {\n li2.a.setVisibility((int)l14);\n button = li2.j;\n u.n((TextView)button, (String)object2, null, null);\n object2 = li2.e;\n object2.setVisibility((int)l14);\n }\n if (bl2 = (l10 = (l17 &= (l11 = (long)10)) - l16) == 0L ? 0 : (l10 < 0L ? -1 : 1)) {\n object2 = li2.c;\n object2.setVisibility(n10);\n }\n }",
"public void changeEnvironmentTypeToGlobal() {\n this.setEnvironmentType(EnvironmentTypesList.getGlobalEnvironmentType());\n\n }",
"private void automaticBinding() {\n if (SensorReaderService.isRunning()){\n doBindService();\n } else{\n startSensingService();\n doBindService();\n }\n if (v != null) {\n v.vibrate(500);\n }\n }",
"public void bind() {GLES20.glBindFramebuffer(GLES20.GL_FRAMEBUFFER, mFrameBufferHandle[0]);}",
"void doAccelBindService() {\n\t\tbindService(accelIntentDelay, accelConnection, Context.BIND_AUTO_CREATE);\n\t\taccelIsBound = true;\n\t}",
"Binding<T> shared();",
"public void bind(String name, Object obj) {\n\t\tif (log.isInfoEnabled()) {\n\t\t\tlog.info(\"Static JNDI binding: [\" + name + \"] = [\" + obj + \"]\");\n\t\t}\n\t\tthis.boundObjects.put(name, obj);\n\t}",
"public void addBinding(WbBinding binding)\n {\n _bindingList.add(binding);\n }",
"public void newBinding(BGMEvent e);",
"public static void addNameBindings (Map<String, Object> namesToExport)\n\t{\n\t\tfor (Entry<String, Object> entry : namesToExport.entrySet ())\n\t\t{\n\t\t\tm_interpreter.set (entry.getKey (), entry.getValue ());\n\t\t}\n\t}",
"public interface YCoolBindings {\n /**\n * The porpouse of this method is to store any bind, because depending on\n * the circunstances it can be caught by garbadge collector.\n * @param bind_name Binding name\n * @param bind Bind itself\n */\n public void yAddBind(String bind_name, ObservableValue<? extends Number> bind);\n\n /**\n * @param pivo The porcentage point of the object, for example, 0 is the\n * leftmost point of the object, 0.5 is the middle and 1 is the rightmost\n * point (it is not limited from 0 to 1, you can go further).\n * @return A DoubleBinding that is linked to the X location of the object, in\n * other words, whenever the X location of the object changes, the\n * DoubleBinding will change automaticaly with it. (this bind is linked to\n * the X location but the opposite is not true).\n */\n public DoubleBinding yTranslateXbind(double pivo);\n\n /**\n * @param pivo The porcentage point of the object, for example, 0 is the\n * upper point of the object, 0.5 is the middle and 1 is the bottom point (it\n * is not limited from 0 to 1, you can go further).\n * @return A DoubleBinding that is linked to the Y location of the object, in\n * other words, whenever the Y location of the object changes, the\n * DoubleBinding will change automaticaly with it. (this bind is linked to\n * the Y location but the opposite is not true).\n */\n public DoubleBinding yTranslateYbind(double pivo);\n\n /**\n * Links the X position of the object with an observable value, so whenever\n * it changes, the object's X position will change too.\n *\n * @param bind_name The name for this link.\n * @param X The observable value to link the object's X position.\n * @param pivo The porcentage point of the object, for example, 0 is the\n * leftmost point of the object, 0.5 is the middle and 1 is the rightmost\n * point (it is not limited from 0 to 1, you can go further).\n */\n public void yBindTranslateX(String bind_name, ObservableValue<? extends Number> X, double pivo);\n\n /**\n * Links the Y position of the object with an observable value, so whenever\n * it changes, the object's Y position will change too.\n *\n * @param bind_name The name for this link.\n * @param Y The observable value to link the object's Y position.\n * @param pivo The porcentage point of the object, for example, 0 is the\n * upper point of the object, 0.5 is the middle and 1 is the bottom point (it\n * is not limited from 0 to 1, you can go further).\n */\n public void yBindTranslateY(String bind_name, ObservableValue<? extends Number> Y, double pivo);\n\n /**\n * @param stroke_included If you want the stroke of the object to be part of\n * the new width, mark this as true.\n * @return A DoubleBinding that is linked to the width of the object, in\n * other words, whenever the width of the object changes, the DoubleBinding\n * will change automaticaly with it. (this bind is linked to the width but\n * the opposite is not true).\n */\n public DoubleBinding yWidthBind(boolean stroke_included);\n\n /**\n * @param stroke_included If you want the stroke of the object to be part of\n * the new height, mark this as true.\n * @return A DoubleBinding that is linked to the height of the object, in\n * other words, whenever the height of the object changes, the DoubleBinding\n * will change automaticaly with it. (this bind is linked to the height but\n * the opposite is not true).\n */\n public DoubleBinding yHeightBind(boolean stroke_included);\n\n /**\n * Links the width of the object with an observable value, so whenever it\n * changes, the object's width will change too.\n *\n * @param bind_name The name for this link.\n * @param width The observable value to link the object's width.\n * @param stroke_included If you want the stroke of the object to be part of\n * the new width, mark this as true.\n */\n public void yBindWidth(String bind_name, ObservableValue<? extends Number> width, boolean stroke_included);\n\n /**\n * Links the height of the object with an observable value, so whenever it\n * changes, the object's height will change too.\n *\n * @param bind_name The name for this link.\n * @param height The observable value to link the object's height.\n * @param stroke_included If you want the stroke of the object to be part of\n * the new height, mark this as true.\n */\n public void yBindHeight(String bind_name, ObservableValue<? extends Number> height, boolean stroke_included);\n\n /**\n * Breaks any bind created previously based on the name of the bind.\n * @param bind_name Name of the bind to be broken.\n */\n public void yUnbind(String bind_name);\n}",
"public void setGlobalVariables(GlobalVariables globalVariables) {\n this.globalVariables = globalVariables;\n }",
"public static List<VariableDeclaration> getBindingManagementVars()\n {\n return FrameworkDefs.bindingManagementVars; \n }",
"protected void insertBindingUpdateActivities(String plink, Map<String,Binding> addyMap, Node addInitHere, Node addUpdateHere){\n\t\tif (addyMap.containsKey(plink)){\n\t\t\tBinding bind = addyMap.get(plink);\n\t\t\taddInitHere.appendChild(initArrayVar(bind, bind));\n\t\t\taddUpdateHere.appendChild(getNextBinding(plink));\n\t\t\tfor (String dependentPlink: bind.getDependentPlinks()){\n\t\t\t\tif (addyMap.containsKey(dependentPlink)){\n\t\t\t\t\taddInitHere.appendChild(initArrayVar(addyMap.get(dependentPlink),bind));\n\t\t\t\t\taddUpdateHere.appendChild(getNextBinding(dependentPlink));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void update() {\n\t\tthis.binder_Inventario.clear();\n\t}",
"private Binding updateBindingWithMaterializedNodes(Binding binding) {\n\t\tBinding lastMaterialized = searchLastMaterializedBinding(binding);\t\n\t\tif (lastMaterialized == binding){\n\t\t\treturn binding;\n\t\t}\n\t\t\n\t\tBindingMap materializedBinding = BindingFactory.create(lastMaterialized);\t\n\t\t\n\t\tfor (Var var : toUpdateVars) {\n\t\t\tNode_Literal nodeId = (Node_Literal) binding.get(var);\n\t\t\tNode materializedNode;\n\t\t\t\n\t\t\tif ((materializedNode=idToMaterializedNodesCache.get(nodeId))!=null){\n\t\t\t\tmaterializedBinding.add(var, materializedNode);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tmaterializedBinding.add(var, toResolveIdMap.get(nodeId));\n\t\t\t\tidToMaterializedNodesCache.put(nodeId, toResolveIdMap.get(nodeId));\n\t\t\t}\n\t\t}\n\t\treturn materializedBinding;\n\t}",
"protected void fixateBindings()\r\n\t\t\t\tthrows IllegalArgumentException, IllegalAccessException,\r\n\t\t\t\tNoSuchFieldException, SecurityException {\n\t\t\tfor (Field field : getClass().getDeclaredFields()) {\r\n\t\t\t\t// relax private fields for reflection only\r\n\t\t\t\tfield.setAccessible(true);\r\n\t\t\t\t// search local -> global -> default for set value\r\n\t\t\t\tfield.set(this, evaluateField(field));\r\n\t\t\t}\r\n\t\t}",
"@Override\n\tpublic void rebind () {\n\t\tsetParams(Param.Texture, u_texture0);\n\t\tsetParams(Param.ViewportInverse, viewportInverse);\n\t\tendParams();\n\t}",
"private void rebind() {\n\t\tnotaryServers = Client.locateNotaries();\n\t\tconnectToUsers();\n\t\t//lookUpUsers();\n\n\t}",
"public void bind()\n {\n glBindTexture(GL_TEXTURE_2D, texture);\n }",
"@GuardedBy(\"mLock\")\n private void bindLocked() {\n // No need to bind if service is binding or has already been bound.\n if (mBinding || mService != null) {\n return;\n }\n\n mBinding = true;\n // mContext.bindServiceAsUser() calls into ActivityManagerService which it may already\n // hold the lock and had called into PowerManagerService, which holds a lock.\n // That would create a deadlock. To solve that, putting it on a handler.\n mAttentionHandler.post(() -> {\n final Intent serviceIntent = new Intent(\n AttentionService.SERVICE_INTERFACE).setComponent(\n mComponentName);\n // Note: no reason to clear the calling identity, we won't have one in a handler.\n mContext.bindServiceAsUser(serviceIntent, mConnection,\n Context.BIND_AUTO_CREATE, UserHandle.CURRENT);\n\n });\n }",
"public void bindAll(GL2 gl) throws OpenGLException\n\t{\t\t\n\t\t/* Save state and adjust viewport if this is the first bind. */\n\t\tif (!mIsBound)\n\t\t{\n\t\t\tgl.glPushAttrib(GL2.GL_COLOR_BUFFER_BIT | GL2.GL_VIEWPORT_BIT);\n\t\t\tgl.glGetIntegerv(GL2.GL_FRAMEBUFFER_BINDING, mPreviousBinding, 0);\n\t\t\tgl.glBindFramebuffer(GL2.GL_FRAMEBUFFER, getHandle());\n\t\t\tgl.glViewport(0, 0, mWidth, mHeight);\n\t\t\tmIsBound = true;\n\t\t}\n\t\t\n\t\t/* Set draw buffers to all color attachments. */\n\t\tint bindings[] = new int[getColorTextureCount()];\n\t\t\n\t\tfor (int i = 0; i < getColorTextureCount(); ++i)\n\t\t{\n\t\t\tbindings[i] = GL2.GL_COLOR_ATTACHMENT0 + i;\n\t\t}\n\t\t\n\t\tgl.glDrawBuffers(getColorTextureCount(), bindings, 0);\n\n\t\t/* Make sure it worked. */\n\t\tOpenGLException.checkOpenGLError(gl);\n\t}",
"@Nonnull\n SystemScriptBindings getBindings();",
"public void importExternal(Block block, Map<Integer,Integer> binding) {\r\n\t\tint freeSlot = numSlots();\r\n\t\t\r\n\t\t// First, sanity check that all input variables are bound\r\n\t\tHashMap<Integer,Integer> nbinding = new HashMap<Integer,Integer>();\r\n\t\tfor(int i=0;i!=block.numInputs;++i) {\r\n\t\t\tInteger target = binding.get(i);\r\n\t\t\tif(target == null) {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Input not mapped by input\");\r\n\t\t\t}\r\n\t\t\tnbinding.put(i,target);\r\n\t\t\tfreeSlot = Math.max(target+1,freeSlot);\r\n\t\t}\r\n\t\t\r\n\t\t// Second, determine binding for temporary variables\t\t\r\n\t\tfor(int i=block.numInputs;i!=block.numSlots();++i) {\r\n\t\t\tnbinding.put(i,i+freeSlot);\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\t// Third, determine relabelling\r\n\t\tHashMap<String,String> labels = new HashMap<String,String>();\r\n\t\t\r\n\t\tfor (Entry s : block) {\r\n\t\t\tif (s.code instanceof Code.Label) {\r\n\t\t\t\tCode.Label l = (Code.Label) s.code;\r\n\t\t\t\tlabels.put(l.label, freshLabel());\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Finally, apply the binding and relabel any labels as well.\r\n\t\tfor(Entry s : block) {\r\n\t\t\tCode ncode = s.code.remap(nbinding).relabel(labels);\r\n\t\t\tappend(ncode,s.attributes());\r\n\t\t}\r\n\t}",
"public void updateModule (final double timestep);",
"public yandex.cloud.api.operation.OperationOuterClass.Operation setAccessBindings(yandex.cloud.api.access.Access.SetAccessBindingsRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getSetAccessBindingsMethod(), getCallOptions(), request);\n }",
"void doBindService() {\r\n\r\n bindService(new Intent(MainActivity.this, CurrentLocationUtil.class),\r\n connection, // ServiceConnection object\r\n Context.BIND_AUTO_CREATE); // Create service if not\r\n\r\n isBound = true;\r\n\r\n }",
"public void yUnbind(String bind_name);",
"public void setBindingOp(BindingOperation bindingOp) {\n this.bindingOp = bindingOp;\n }",
"public void rebind(String name, Remote ref) throws RemoteException;",
"public static void addNameBinding (String name, Object javaObject)\n\t{\n\t\tm_interpreter.set (name, javaObject);\n\t}",
"public void addBinding(int binding, ZEPipelineBindType bindType, int arrayCount, String[] shaderStages);",
"public void bind(String name, Remote ref) throws RemoteException, AlreadyBoundException;",
"public static void setGwmod(Object gwmod) {\n\t\t\n\t}",
"public void bind() {\n if (isTextureLoaded()) {\n glBindTexture(GL_TEXTURE_2D, texId.getId());\n } else {\n System.err.println(\"[Error] texture::bind() Binding a unloaded texture.\");\n }\n }",
"public void setAccessBindings(yandex.cloud.api.access.Access.SetAccessBindingsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ClientCalls.asyncUnaryCall(\n getChannel().newCall(getSetAccessBindingsMethod(), getCallOptions()), request, responseObserver);\n }",
"void initGlobals(EvalContext context, HashMap globals)\n throws EvaluationException\n {\n if (predefined != null)\n predefined.initGlobals(context, globals);\n\n for (int g = 0, G = declarations.size(); g < G; g++)\n {\n if (declarations.get(g) instanceof ModuleImport) {\n ModuleImport mimport = (ModuleImport) declarations.get(g);\n ModuleContext module = mimport.imported;\n // recursive descent to imported modules.\n // CAUTION lock modules to avoid looping on circular imports\n // Hmmm well, circular imports are no more allowed anyway...\n if (globals.get(module) == null) { // not that beautiful but\n globals.put(module, module);\n module.initGlobals(context, globals);\n globals.remove(module);\n }\n }\n }\n \n // Globals added by API in context are not declared: do it first\n for (Iterator iter = globalMap.values().iterator(); iter.hasNext();) {\n GlobalVariable var = (GlobalVariable) iter.next();\n XQValue init = (XQValue) globals.get(var.name);\n \n if(init == null)\n continue;\n // unfortunately required:\n init = init.bornAgain();\n // check the type if any\n if(var.declaredType != null)\n init = init.checkTypeExpand(var.declaredType, context, \n false, true);\n context.setGlobal(var, init);\n }\n \n //\n for (int g = 0, G = declarations.size(); g < G; g++)\n {\n if (!(declarations.get(g) instanceof GlobalVariable))\n continue;\n GlobalVariable var = (GlobalVariable) declarations.get(g);\n XQType declaredType = var.declaredType;\n curInitVar = var;\n if (var.init != null) {\n XQValue v = var.init.eval(null, context);\n try { // expand with type checking\n v = v.checkTypeExpand(declaredType, context, false, true);\n if (v instanceof ErrorValue)\n context.error(Expression.ERRC_BADTYPE,\n var.init, \n ((ErrorValue) v).getReason());\n }\n catch (XQTypeException tex) {\n context.error(var, tex);\n }\n context.setGlobal(var, v);\n curInitVar = null;\n }\n\n QName gname = var.name;\n // is there a value specified externally? \n // use the full q-name of the variable\n // (possible issue if $local:v allowed in modules)\n Object initValue = globals.get(gname);\n XQValue init = null;\n if(initValue instanceof ResultSequence) {\n ResultSequence seq = (ResultSequence) initValue;\n init = seq.getValues();\n }\n else \n init = (XQValue) initValue;\n\n // glitch for compatibility: if $local:var, look for $var\n if (init == null && \n gname.getNamespaceURI() == NamespaceContext.LOCAL_NS) {\n QName redName = IQName.get((gname.getLocalPart()));\n init = (XQValue) globals.get(redName);\n }\n if (init == null) {\n // - System.err.println(\"no extern init for \"+global.name);\n continue;\n }\n init = init.bornAgain(); // in case several executions\n if (declaredType != null) {\n try { // here we can promote: it helps with string values\n init =\n init.checkTypeExpand(declaredType, context, true,\n true);\n if (init instanceof ErrorValue)\n context.error(Expression.ERRC_BADTYPE, var,\n ((ErrorValue) init).getReason());\n }\n catch (XQTypeException tex) {\n context.error(var, tex);\n }\n }\n context.setGlobal(var, init);\n }\n }",
"public void bind(GL gl) {\n\tgl.glBindTexture(target, textureID);\n }",
"protected void onBind()\n\t{\n\t}",
"public void update(Main main);",
"public static native void update(int a, int b);",
"public final void setBinding(Binding binding) {\n Assert.state(binding == null || this.binding == null, \"binding already set\");\n this.binding = binding;\n }",
"public void addEnvironmentBindings(NSMutableDictionary<String, String> env)\n {\n // JAVA_HOME\n String userSetting = Application.configurationProperties()\n .getProperty(SUBSYSTEM_PREFIX + JAVA_HOME_KEY);\n if (userSetting != null)\n {\n env.takeValueForKey(userSetting, JAVA_HOME_KEY);\n }\n\n // ANT_HOME\n addFileBinding(\n env,\n ANT_HOME_KEY,\n SUBSYSTEM_PREFIX + ANT_HOME_KEY,\n \"ant\");\n\n // Add JAVA_HOME/bin to path\n Object javaHomeObj = env.valueForKey(JAVA_HOME_KEY);\n if (javaHomeObj != null)\n {\n String path = javaHomeObj.toString()\n + System.getProperty(\"file.separator\") + \"bin\";\n File javaBinDir = new File(path);\n if (javaBinDir.exists())\n {\n path = javaBinDir.getAbsolutePath();\n // Handle the fact that Windows variants often use \"Path\"\n // instead of \"PATH\"\n String pathKey = PATH_KEY2;\n Object valueObj = env.valueForKey(pathKey);\n if (valueObj == null)\n {\n pathKey = PATH_KEY1;\n valueObj = env.valueForKey(pathKey);\n }\n if (valueObj != null)\n {\n path = path + System.getProperty(\"path.separator\")\n + valueObj.toString();\n }\n env.takeValueForKey(path, pathKey);\n }\n else\n {\n log.error(\n \"no bin directory found in JAVA_HOME: \" + javaHomeObj);\n }\n }\n\n\n // Add ANT_HOME/bin to path\n Object antHomeObj = env.valueForKey(ANT_HOME_KEY);\n if (antHomeObj != null)\n {\n String path = antHomeObj.toString()\n + System.getProperty(\"file.separator\") + \"bin\";\n File antBinDir = new File(path);\n if (antBinDir.exists())\n {\n path = antBinDir.getAbsolutePath();\n // Handle the fact that Windows variants often use \"Path\"\n // instead of \"PATH\"\n String pathKey = PATH_KEY2;\n Object valueObj = env.valueForKey(pathKey);\n if (valueObj == null)\n {\n pathKey = PATH_KEY1;\n valueObj = env.valueForKey(pathKey);\n }\n if (valueObj != null)\n {\n path = path + System.getProperty(\"path.separator\")\n + valueObj.toString();\n }\n env.takeValueForKey(path, pathKey);\n }\n else\n {\n log.error(\"no bin directory found in ANT_HOME: \" + antHomeObj);\n }\n }\n }",
"public void setBindingKey(java.lang.String[] bindingKey) {\r\n this.bindingKey = bindingKey;\r\n }",
"public Module update(Module other) {\n\t\tHashtable funcs = new Hashtable();\n\t\tputCopies(funcs, this.functions.elements());\n\t\tputCopies(funcs, other.functions.elements());\n\t\treturn new Module(/*this.index, */funcs);\n\t}",
"protected void updateWorld(World world) {\r\n\t\tthis.world = world;\r\n\t\tsetup(); //Call setup again to re assign certain variables that depend\r\n\t\t\t\t // on the world\r\n\t\tbufferWorld(); //Buffer the new world\r\n\t}",
"private void updateVars()\n {\n\n }",
"@Override\n public void binding(String exchangeName, String queueName, String bindingKey, ByteBuffer buf) {\n synchronized (this) {\n try {\n Exchange exchange = _virtualHost.getExchangeRegistry().getExchange(exchangeName);\n if (exchange == null) {\n _logger.error(\"Unknown exchange: \" + exchangeName + \", cannot bind queue : \" + queueName);\n return;\n }\n\n AMQQueue queue = _virtualHost.getQueueRegistry().getQueue(new AMQShortString(queueName));\n if (queue == null) {\n _logger.error(\"Unknown queue: \" + queueName + \", cannot be bound to exchange: \" + exchangeName);\n } else {\n FieldTable argumentsFT = null;\n if (buf != null) {\n argumentsFT = new FieldTable(org.wso2.org.apache.mina.common.ByteBuffer.wrap(buf), buf.limit());\n }\n\n BindingFactory bf = _virtualHost.getBindingFactory();\n\n Map<String, Object> argumentMap = FieldTable.convertToMap(argumentsFT);\n\n boolean isBindingAlreadyPresent = true;\n if (bf.getBinding(bindingKey, queue, exchange, argumentMap) == null) {\n //for direct exchange do an additional check to see if a binding is\n //already added to default exchange. We do not need duplicates as default\n //exchange is an direct exchange\n if (exchange.getName().equals(AMQPUtils.DIRECT_EXCHANGE_NAME)) {\n Exchange testExchange = _virtualHost.getExchangeRegistry().getExchange(\n AMQPUtils.DEFAULT_EXCHANGE_NAME);\n if (bf.getBinding(bindingKey, queue, testExchange,\n argumentMap) == null) {\n isBindingAlreadyPresent = false;\n }\n } else {\n isBindingAlreadyPresent = false;\n }\n }\n if(!isBindingAlreadyPresent) {\n if(_logger.isDebugEnabled()) {\n _logger.debug(\"Binding Sync - Added Binding: (Exchange: \"\n + exchange.getNameShortString() + \", Queue: \" + queueName\n + \", Routing Key: \" + bindingKey + \", Arguments: \" + argumentsFT + \")\");\n }\n bf.restoreBinding(bindingKey, queue, exchange, argumentMap);\n }\n }\n } catch (AMQException e) {\n throw new RuntimeException(e);\n }\n }\n }",
"@Override\n\tpublic void enterStart(AplusplusParser.StartContext ctx) {\n\t\tglobalScope = new GlobalScope();\n\t\tcurrentScope = globalScope;\n\t\tsaveScope(ctx, currentScope);\n\t}",
"public void update(GlobalState gs, Robot focus) {\n\n switch (gs.camMode) {\n \n // First person mode \n case 1:\n setFirstPersonMode(gs, focus);\n break;\n \n // Default mode \n default:\n setDefaultMode(gs);\n }\n }",
"public void setAccessBindings(yandex.cloud.api.access.Access.SetAccessBindingsRequest request,\n io.grpc.stub.StreamObserver<yandex.cloud.api.operation.OperationOuterClass.Operation> responseObserver) {\n io.grpc.stub.ServerCalls.asyncUnimplementedUnaryCall(getSetAccessBindingsMethod(), responseObserver);\n }",
"public static MemberMemberBinding memberBind(Member member, Iterable<MemberBinding> bindings) { throw Extensions.todo(); }",
"public MapExecutionScope bind(Type type, Object binding) {\n return bind(Key.get(type), binding);\n }",
"protected void bind( final Name name, Object object, final boolean rebind )\n throws NamingException\n {\n if ( isSelf( name ) )\n {\n throw new InvalidNameException( \"Failed to bind self\" );\n }\n\n if ( 1 == name.size() )\n {\n boolean alreadyBound;\n try\n {\n localLookup( name );\n alreadyBound = true;\n }\n catch ( final NamingException ne )\n {\n alreadyBound = false;\n }\n\n if ( !rebind && alreadyBound )\n {\n throw new NameAlreadyBoundException( name.get( 0 ) );\n }\n else\n {\n if ( object instanceof Referenceable )\n {\n object = ( (Referenceable) object ).getReference();\n }\n\n // Call getStateToBind for using any state factories\n final Name atom = name.getPrefix( 1 );\n object = m_namespace.getStateToBind( object, atom, this, getRawEnvironment() );\n\n doLocalBind( name, object );\n }\n }\n else\n {\n final Context context = lookupSubContext( getPathName( name ) );\n if ( rebind )\n {\n context.rebind( getLeafName( name ), object );\n }\n else\n {\n context.bind( getLeafName( name ), object );\n }\n }\n }",
"public void doBindService() {\n\r\n\t\tIntent serviceIntent = new Intent(MainActivity.this, LocalService.class);\r\n\r\n\t\tstartService(serviceIntent);\r\n\t\t// bindService(serviceIntent, mServiceConnection, 0);\r\n\t\tbindService(serviceIntent, mServiceConnection, BIND_AUTO_CREATE);\r\n\r\n\t\tmIsBound = true;\r\n\t}",
"public int bind(IModel model, Map<String, Object> variableBindings,\n boolean isIterative) throws CannotMatchException;",
"public void bind(Nifty nifty, Screen screen) {\n\t\tthis.nifty = nifty;\n\t\tthis.screen = screen;\n\t}",
"public void setName(String name)\n {\n _name = name;\n \n WbBinding binding = new WbBinding();\n binding.setClass(Named.class);\n binding.addValue(\"value\", name);\n \n _bindingList.add(binding);\n }"
]
| [
"0.60711336",
"0.6069187",
"0.60312706",
"0.55954975",
"0.5581824",
"0.5581824",
"0.55265486",
"0.55088395",
"0.54956996",
"0.54946744",
"0.5265173",
"0.5221691",
"0.5221691",
"0.5221691",
"0.52160573",
"0.5214468",
"0.5214468",
"0.52098054",
"0.5204908",
"0.5182339",
"0.51763165",
"0.51763165",
"0.5143887",
"0.5140064",
"0.51217985",
"0.50957",
"0.5095031",
"0.5086714",
"0.50525856",
"0.5051628",
"0.50414765",
"0.50138986",
"0.50049394",
"0.5002407",
"0.49894553",
"0.49864376",
"0.49607995",
"0.49461865",
"0.49321958",
"0.49222532",
"0.49060795",
"0.48933557",
"0.48868343",
"0.48823693",
"0.48710662",
"0.48607525",
"0.48514602",
"0.48463485",
"0.4846195",
"0.4841325",
"0.48097923",
"0.48084632",
"0.47951853",
"0.4792031",
"0.47790372",
"0.4771659",
"0.47611162",
"0.4760441",
"0.47544572",
"0.47536597",
"0.47261092",
"0.4707066",
"0.47045216",
"0.47027525",
"0.4699697",
"0.469771",
"0.46951175",
"0.46839815",
"0.46802375",
"0.46756613",
"0.467049",
"0.46682283",
"0.46631998",
"0.46525553",
"0.46457395",
"0.46446308",
"0.46434957",
"0.4640713",
"0.4635122",
"0.4632223",
"0.46315953",
"0.4624633",
"0.4621644",
"0.461882",
"0.46064693",
"0.46050382",
"0.4604548",
"0.4600515",
"0.45986214",
"0.45936808",
"0.45936716",
"0.45924312",
"0.45836186",
"0.4573179",
"0.45680323",
"0.45675892",
"0.45563877",
"0.45541105",
"0.45526838",
"0.45508844"
]
| 0.55721754 | 6 |
Test to ensure that http method type takes precedence over anything else. | @Test
public void testHttpMethodPriorityVsUnknown() {
this.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);
this.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);
this.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);
final List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),
this.requestDefinitions.get(0), this.requestDefinitions.get(2));
Collections.sort(this.requestDefinitions, this.comparator);
Assert.assertEquals(expected, this.requestDefinitions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasHttpMethod();",
"String getHttpMethod();",
"String getHttpMethod();",
"public HTTPRequestMethod getMethod();",
"public void setMethod(HTTPMethod method);",
"public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }",
"public void setHttpMethod(int httpMethod) {\n method = httpMethod;\n }",
"public HttpMethod getMethod()\r\n/* 44: */ {\r\n/* 45: 78 */ return HttpMethod.valueOf(this.servletRequest.getMethod());\r\n/* 46: */ }",
"Collection<HttpMethod> getMinimalSupportedHttpMethods();",
"@Test\n\tpublic void testHttpMethodPriorityVsOtherAttributes() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(0).setAccept(MediaType.HTML);\n\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(1).setAccept(MediaType.UNKNOWN);\n\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(2).setAccept(MediaType.HTML);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"private void setRequestMethod() {\n switch (type) {\n case GET:\n try {\n connection.setRequestMethod(GET);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as GET successfully\");\n LOG.severe(e.toString());\n }\n break;\n case POST:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(POST);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as POST successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PUT:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PUT);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PUT successfully\");\n LOG.severe(e.toString());\n }\n break;\n case DELETE:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(DELETE);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as DELETE successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PATCH:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PATCH);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PATCH successfully\");\n LOG.severe(e.toString());\n }\n break;\n }\n }",
"public boolean hasHttpMethod() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }",
"public boolean hasHttpMethod() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"@Test\n public void reqTypeTest() {\n // TODO: test reqType\n }",
"public String getHttpMethod() {\n return httpMethod;\n }",
"private boolean isSupportedMethod(String sHTTPMethod) {\n return Arrays.asList(SUPPORTED_METHODS).contains(sHTTPMethod.toUpperCase());\n }",
"public HttpMethod getMethod()\r\n/* 29: */ {\r\n/* 30:56 */ return this.method;\r\n/* 31: */ }",
"public void setReqMethod(java.lang.String value) {\n this.req_method = value;\n }",
"@Test\n @OperateOnDeployment(\"server\")\n public void shouldFailToGetResourceWhenHttpMethodIncorrect() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(400).when().put(\n getBaseTestUrl() + \"/1/category/get/json/1\");\n }",
"private void setControlsForMethodType ( String methodType ) {\n \t\tif (getCurrentTestType().equalsIgnoreCase(JAX_RS) &&\n \t\t\t\t(methodType.equalsIgnoreCase(GET) ||\n \t\t\t\t methodType.equalsIgnoreCase(OPTIONS))) {\n \t\t\tbodyText.setEnabled(false);\n \t\t\ttreeRequestBody.getTree().setEnabled(false);\n \t\t} else {\n \t\t\tbodyText.setEnabled(true);\n \t\t\ttreeRequestBody.getTree().setEnabled(true);\n \t\t}\n \t}",
"protected boolean methodForbidden() {\n return methodToTest.getName().equals(\"getClassNull\")\n || methodToTest.getName().startsWith(\"isA\")\n || methodToTest.getName().equals(\"create\")\n || methodToTest.getName().equals(\"getTipString\")\n || methodToTest.getName().equals(\"toString\");\n }",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\n\t}",
"public String getHttpMethod() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n httpMethod_ = s;\n }\n return s;\n }\n }",
"public String getHttpmethod() {\n return httpmethod;\n }",
"@Ignore\n @Test\n public void testPostDisambiguatesOnContentType() throws ClientProtocolException, IOException\n {\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", xml, ContentType.APPLICATION_XML_TYPE), \"xml\");\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", json, ContentType.APPLICATION_JSON_TYPE), \"json\");\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", text, ContentType.TEXT_PLAIN_TYPE), \"text\");\n }",
"public Builder setHttpMethod(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n httpMethod_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkProtocol() {\n\t\tboolean flag = oTest.checkProtocol();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn false;\r\n\t}",
"@Override\n\tprotected Set<RequestTypeEnum> provideAllowableRequestTypes() {\n\t\treturn Collections.singleton(RequestTypeEnum.POST);\n\t}",
"public String getRequestMethod(){\n return this.requestMethod;\n }",
"MethodType getMethodType();",
"public void setRequestMethod(String requestMethod){\n this.requestMethod = requestMethod;\n }",
"public interface RequestType {\n String GET = \"GET\";\n String POST = \"POST\";\n String UPDATE = \"UPDATE\";\n String DELETE = \"DELETE\";\n String DEFAULT = \"DEFAULT\";\n}",
"public void setHttpmethod(String httpmethod) {\n this.httpmethod = httpmethod == null ? null : httpmethod.trim();\n }",
"public void setRequestMethod(int requestMethod) {\n this.requestMethod = requestMethod;\n }",
"public String getHttpMethod() {\n Object ref = httpMethod_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n httpMethod_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public static int httpMethodId(final String httpMethod) {\n if (startsWith(httpMethod, GET) || startsWith(httpMethod, HEAD)) {\n return 0;\n } else if (startsWith(httpMethod, POST) || startsWith(httpMethod, PUT)) {\n return 1;\n } else if (startsWith(httpMethod, CONNECT)) {\n return 2;\n } else if (startsWith(httpMethod, OPTIONS)) {\n return 3;\n } else {\n return -1;\n /**\n * No match...\n * Following methods are not implemented: ||\n * startsWith(httpMethod,\"TRACE\")\n */\n }\n }",
"@Override\n protected void validateResponseTypeParameter(String responseType, AuthorizationEndpointRequest request) {\n }",
"@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic void setHTTPMODE(HttpMethod httpmodel) {\n\t\tthis.httpmodel = httpmodel;\n\t}",
"ResourceMethod getMethodType();",
"@Test\n public void testHttp405NotAllowedMethod() {\n final NioEventLoopGroup bootGroup = new NioEventLoopGroup();\n final NioEventLoopGroup processGroup = new NioEventLoopGroup();\n final String json = \"{\\\"action\\\":\\\"ping\\\"}\";\n final ByteBuf content = Unpooled.copiedBuffer(json, StandardCharsets.UTF_8);\n\n final ChannelFuture serverChannel = runServer(bootGroup, processGroup);\n runClient(HttpMethod.PUT, content, uri);\n\n serverChannel.awaitUninterruptibly();\n bootGroup.shutdownGracefully();\n processGroup.shutdownGracefully();\n\n final String expected = \"{\\\"action\\\":\\\"error\\\",\\\"content\\\":\\\"Ping Pong server failure\\\",\\\"status\\\":\\\"405 Method Not Allowed\\\"}\";\n final String actual = buffer.toString();\n logger.info(\"Expected result: {}\", expected);\n logger.info(\"Actual result: {}\", actual);\n Assert.assertEquals(\"Hadn't processed the request: 405 Method Not Allowed\", expected, actual);\n }",
"public AmbiguousMethodException() {\n super();\n }",
"@Override\r\n\tprotected ResponseEntity<Object> handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException ex,\r\n\t\t\tHttpHeaders headers, HttpStatus status, WebRequest request) {\n\t\treturn super.handleHttpRequestMethodNotSupported(ex, headers, status, request);\r\n\t}",
"public static boolean isPost(String argRequestMethod) {\r\n\t\treturn HttpConstants.POST.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"private String computeMethodForRedirect(String initialMethod, String responseCode) {\n if (!HTTPConstants.HEAD.equalsIgnoreCase(initialMethod)) {\n return HTTPConstants.GET;\n }\n return initialMethod;\n }",
"@Nullable\n public static EHTTPMethod getHttpMethod (@Nonnull final HttpServletRequest aHttpRequest)\n {\n ValueEnforcer.notNull (aHttpRequest, \"HttpRequest\");\n\n final String sMethod = aHttpRequest.getMethod ();\n return EHTTPMethod.getFromNameOrNull (sMethod);\n }",
"public interface MethodsHttpUtils {\n HttpResponse doGet(String url, String mediaType) throws AppServerNotAvailableException, IOException;\n HttpResponse doPost(String url, String mediaType, String dataJson) throws UnsupportedEncodingException, ClientProtocolException, AppServerNotAvailableException;\n HttpResponse doDelete(String url, String mediaType) throws AppServerNotAvailableException;\n HttpResponse doPut(String url, String mediaType, String dataJson) throws AppServerNotAvailableException;\n}",
"public String getRequestMethod()\n {\n return requestMethod;\n }",
"@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }",
"@Override\n public HttpMethods getMethod() {\n return HttpMethods.EVAL;\n }",
"public com.google.protobuf.ByteString\n getHttpMethodBytes() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n httpMethod_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Nullable\n abstract Method getMethod();",
"@When(\"user calls {string} with {string} http request\")\n public void user_calls_with_http_request(String resource, String method) {\n System.out.println(\"When\");\n\n APIResourcesEnum apiresource=APIResourcesEnum.valueOf(resource);\n System.out.println(apiresource.getResource());\n\n\n if(method.equalsIgnoreCase(method))\n response=reqSpec.when().post(apiresource.getResource());\n else if(method.equalsIgnoreCase(method))\n response= reqSpec.when().get(apiresource.getResource());\n\n\n // throw new io.cucumber.java.PendingException();\n }",
"@Override\n\tpublic void checkType(final String type) {\n\t\tHttpUtils.checkToken(type,\"Type '%s' is not a valid token\",type);\n\t}",
"public io.confluent.developer.InterceptTest.Builder setReqMethod(java.lang.String value) {\n validate(fields()[6], value);\n this.req_method = value;\n fieldSetFlags()[6] = true;\n return this;\n }",
"public static boolean isGet(String argRequestMethod) {\r\n\t\treturn HttpConstants.GET.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"public Set<HttpMethod> getAllow()\r\n/* 137: */ {\r\n/* 138:209 */ String value = getFirst(\"Allow\");\r\n/* 139:210 */ if (value != null)\r\n/* 140: */ {\r\n/* 141:211 */ List<HttpMethod> allowedMethod = new ArrayList(5);\r\n/* 142:212 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 143:213 */ for (String token : tokens) {\r\n/* 144:214 */ allowedMethod.add(HttpMethod.valueOf(token));\r\n/* 145: */ }\r\n/* 146:216 */ return (Set)EnumSet.copyOf(allowedMethod);\r\n/* 147: */ }\r\n/* 148:219 */ return (Set)EnumSet.noneOf(HttpMethod.class);\r\n/* 149: */ }",
"void check()\n {\n checkUsedType(responseType);\n checkUsedType(requestType);\n }",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"@Override\n public ElementMatcher<TypeDescription> typeMatcher() {\n return named(\"com.google.api.client.http.HttpRequest\");\n }",
"public abstract boolean isAppropriateRequest(Request request);",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"Set<HttpMethod> optionsForAllow(URI url) throws RestClientException;",
"public static Method getMethod(String method) throws IllegalArgumentException {\n/* 119 */ return getMethod(method, false);\n/* */ }",
"public HttpMethod method() {\n return method;\n }",
"@Override\n public ServiceResponse allowedMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.allowedMethods(request, this.getTargetUrl());\n }",
"public Set<HttpMethod> getHttpMethodsToRetry() {\r\n if (configuration.getHttpMethodsToRetry() == null) {\r\n return null;\r\n }\r\n return configuration.getHttpMethodsToRetry().stream()\r\n .map(httpMethod -> HttpMethod.valueOf(httpMethod.toString()))\r\n .collect(Collectors.toSet());\r\n }",
"@Override\n protected String inferProtocol() {\n return \"http\";\n }",
"public HttpMethod getMethod() {\n return method;\n }",
"public com.google.protobuf.ByteString\n getHttpMethodBytes() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n httpMethod_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Test\n public void optionRequest() {\n str = METHOD_OPTION + URI_SAMPLE + \" \" + HTTP_VERSION + ENDL;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n assertEquals(request.getMethod(), HttpMethod.OPTIONS);\n assertEquals(request.getUrn(), \"www.site.ru/news.html\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getHeader(null), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(null), \"\");\n }",
"String getMethod();",
"String getMethod();",
"com.google.protobuf.ByteString\n getHttpMethodBytes();",
"@ExceptionHandler(HttpRequestMethodNotSupportedException.class)\r\n public ResponseEntity<DefaultErrorList> handlerMethodNotSupported(HttpRequestMethodNotSupportedException ex, HttpServletRequest request) {\r\n\t\tLOGGER.error(\"Error metodo HTTP no soportado para este endpoint, {}\", request.getRequestURL().toString());\r\n\t\treturn new ResponseEntity<DefaultErrorList>(new DefaultErrorList(new DefaultError\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(GeneralCatalog.GRAL001.getCode(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGeneralCatalog.GRAL001.getMessage(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGeneralCatalog.GRAL001.getLevelException().toString(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Metodo HTTP no soportado para este endpoint\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trequest.getRequestURL().toString()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)), HttpStatus.INTERNAL_SERVER_ERROR);\r\n }",
"public java.lang.String getReqMethod() {\n return req_method;\n }",
"private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }",
"@Test\n\tpublic void testMethodCRUDConfig() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\tfinal IntrospectionFullType queryType = getFullType(introspection, schemaConfig.getQueryTypeName());\n\t\tfinal IntrospectionFullType mutationType = getFullType(introspection, schemaConfig.getMutationTypeName());\n\t\tfinal String saveMethodName = schemaConfig.getMutationSavePrefix() + Entity7.class.getSimpleName();\n\t\tfinal String deleteMethodName = schemaConfig.getMutationDeletePrefix() + Entity8.class.getSimpleName();\n\t\tfinal String getByIdMethodName = schemaConfig.getQueryGetByIdPrefix() + Entity9.class.getSimpleName();\n\t\tfinal String getAllMethodName = schemaConfig.getQueryGetListPrefix() + Entity9.class.getSimpleName();\n\t\tfinal Optional<IntrospectionTypeField> optionalSaveMethod = getOptionalField(mutationType, saveMethodName);\n\t\tfinal Optional<IntrospectionTypeField> optionalDeleteMethod = getOptionalField(mutationType, deleteMethodName);\n\t\tfinal Optional<IntrospectionTypeField> optionalGetByIdMethod = getOptionalField(queryType, getByIdMethodName);\n\t\tfinal Optional<IntrospectionTypeField> optionalGetAllMethod = getOptionalField(queryType, getAllMethodName);\n\t\tAssert.assertFalse(Message.format(\"There shouldn't be a [{}] method.\", saveMethodName),\n\t\t\t\toptionalSaveMethod.isPresent());\n\t\tAssert.assertFalse(Message.format(\"There shouldn't be a [{}] method.\", deleteMethodName),\n\t\t\t\toptionalDeleteMethod.isPresent());\n\t\tAssert.assertFalse(Message.format(\"There shouldn't be a [{}] method.\", getByIdMethodName),\n\t\t\t\toptionalGetByIdMethod.isPresent());\n\t\tAssert.assertFalse(Message.format(\"There shouldn't be a [{}] method.\", getAllMethodName),\n\t\t\t\toptionalGetAllMethod.isPresent());\n\t}",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public HttpMethod method() {\n\t\treturn method;\n\t}",
"@ResponseStatus (HttpStatus.METHOD_NOT_ALLOWED)\n\t@ExceptionHandler (HttpRequestMethodNotSupportedException.class)\n\tpublic Result handleHttpRequestMethodNotSupportedException (HttpRequestMethodNotSupportedException e)\n\t{\n\t\treturn new Result ().failure (\"request_method_not_supported\");\n\t}",
"@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}",
"private boolean isAcceptable(final Method method) {\n return Modifier.isStatic(method.getModifiers())\n && Modifier.isPublic(method.getModifiers())\n && (method.getReturnType() == String.class || method.getReturnType().isAssignableFrom(List.class) || method\n .getReturnType().isArray() && method.getReturnType().getComponentType() == String.class);\n }",
"@Override\n public Type getType() {\n return Type.TypeRequest;\n }",
"@Override\r\n\tprotected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex,\r\n\t\t\tHttpHeaders headers, HttpStatus status, WebRequest request) {\n\t\treturn super.handleMethodArgumentNotValid(ex, headers, status, request);\r\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"public Builder setHttpMethodBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n httpMethod_ = value;\n onChanged();\n return this;\n }",
"public List<String> getSupportedMethods(Set<String> restParams) {\n //we try to avoid hardcoded mappings but the index api is the exception\n if (\"index\".equals(name) || \"create\".equals(name)) {\n List<String> indexMethods = Lists.newArrayList();\n for (String method : methods) {\n if (restParams.contains(\"id\")) {\n //PUT when the id is provided\n if (HttpPut.METHOD_NAME.equals(method)) {\n indexMethods.add(method);\n }\n } else {\n //POST without id\n if (HttpPost.METHOD_NAME.equals(method)) {\n indexMethods.add(method);\n }\n }\n }\n return indexMethods;\n }\n\n return methods;\n }",
"@Override\n\tpublic boolean supports(MethodParameter methodParameter, Type targetType,\n\t\t\tClass<? extends HttpMessageConverter<?>> converterType) {\n\t\tSystem.out.println(\"from Requestbodyaddvice support method\");\n\t\treturn false;\n\t}",
"public java.lang.String getReqMethod() {\n return req_method;\n }",
"Method getMethod();",
"Method getMethod();",
"interface LockssPostMethod extends HttpMethod {\n long getResponseContentLength();\n }",
"boolean isActionMethod(Method m) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n if (mapping==null)\n return false;\n if (mapping.value().length()==0) {\n warnInvalidActionMethod(m, \"Url mapping cannot be empty.\");\n return false;\n }\n if (Modifier.isStatic(m.getModifiers())) {\n warnInvalidActionMethod(m, \"method is static.\");\n return false;\n }\n Class<?>[] argTypes = m.getParameterTypes();\n for (Class<?> argType : argTypes) {\n if (!converterFactory.canConvert(argType)) {\n warnInvalidActionMethod(m, \"unsupported parameter '\" + argType.getName() + \"'.\");\n return false;\n }\n }\n Class<?> retType = m.getReturnType();\n if (retType.equals(void.class)\n || retType.equals(String.class)\n || Renderer.class.isAssignableFrom(retType)\n )\n return true;\n warnInvalidActionMethod(m, \"unsupported return type '\" + retType.getName() + \"'.\");\n return false;\n }",
"@Override\n\tpublic HttpRespModel methodDispatch(String method, String body) {\n\t\tSituationMethod requestMethod = SituationMethod.fromString(method);\n\t\tHttpRespModel respModel = new HttpRespModel();\n\t\t\n\t\t\n\t\tswitch (requestMethod) {\n\t\tcase AddMealSituationMethod:\n\t\t{\n\t\t\t//添加吃饭记录\n\t\t\trespModel = addMealSituationHandler(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase TodayMealSituationMethod:{\n\t\t\t//获取当天吃饭记录\n\t\t\trespModel = getTodayMealSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase AddSleepSituationMethod:{\n\t\t\t//添加睡觉情况记录\n\t\t\trespModel = addSleepSituation(body);\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\tcase TodaySleepSituationMethod:{\n\t\t\t//获取当天睡觉情况记录\n\t\t\trespModel = getTodaySleepSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase InterestCateList:{\n\t\t\t//获取兴趣分类列表\n\t\t\tInterestUtil util = new InterestUtil();\n\t\t\trespModel = util.getAllInterestList();\n\t\t\tbreak;\n\t\t}\n\t\tcase TodayInterestSituationMethod:{\n\t\t\trespModel = getTodayInterestSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase AddInterestSituationMethod:{\n\t\t\t//添加兴趣学习清理\n\t\t\trespModel = addInterestSituation(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase UnkonwnMethod:\n\t\tdefault:{\n\t\t\trespModel.setCode(RespError.urlMethodError);\n\t\t\trespModel.setMessage(\"对不起, method: \" + method + \"没有找到。\");\n\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\treturn respModel;\n\t}",
"public Method getMethod();",
"@Test\n public void testAssertObjectNoGetMethodsType() {\n // setup\n final NoGetMethodsType noGetMethodsType = new NoGetMethodsType(TEST);\n final ChangedProperty<String> jokerProperty = Property.change(NoGetMethodsType.PROPERTY, TEST + TEST);\n\n // method\n assertObject(EMPTY_STRING, noGetMethodsType, jokerProperty);\n }",
"protected abstract boolean isExpectedResponseCode(int httpStatus);"
]
| [
"0.70740944",
"0.6809038",
"0.6809038",
"0.67798126",
"0.67051345",
"0.6666607",
"0.6571061",
"0.64850014",
"0.64441115",
"0.6417054",
"0.6391798",
"0.63424903",
"0.63106936",
"0.63012534",
"0.6233475",
"0.6213034",
"0.61535615",
"0.6134703",
"0.60659873",
"0.6053533",
"0.60442966",
"0.60306686",
"0.5999489",
"0.5998587",
"0.59829205",
"0.5927899",
"0.5917773",
"0.58846813",
"0.5868888",
"0.5862995",
"0.5780997",
"0.57624906",
"0.5754254",
"0.57532287",
"0.57483405",
"0.5715961",
"0.5698256",
"0.56831974",
"0.5651928",
"0.5648144",
"0.5641824",
"0.56293535",
"0.5628124",
"0.5626725",
"0.56163377",
"0.5606315",
"0.5601955",
"0.55718845",
"0.55666643",
"0.55647033",
"0.5560003",
"0.55515015",
"0.5548907",
"0.5544036",
"0.552784",
"0.55204237",
"0.5511882",
"0.55007035",
"0.5478316",
"0.5477063",
"0.5468296",
"0.54610485",
"0.5459917",
"0.5458011",
"0.54539317",
"0.545058",
"0.54477733",
"0.5446627",
"0.5444968",
"0.54356945",
"0.543406",
"0.54280776",
"0.5423313",
"0.54171443",
"0.54171443",
"0.5356117",
"0.534612",
"0.53337544",
"0.5315316",
"0.5314565",
"0.53123003",
"0.53077644",
"0.5305818",
"0.52929556",
"0.5290386",
"0.52870286",
"0.5285413",
"0.5280068",
"0.5275841",
"0.52703583",
"0.52644575",
"0.52511984",
"0.52446383",
"0.52446383",
"0.5238608",
"0.52385676",
"0.5231106",
"0.5211732",
"0.5211042",
"0.52104974"
]
| 0.64279234 | 9 |
Test to ensure that http method type takes precedence over anything else. | @Test
public void testHttpMethodPriorityVsOtherAttributes() {
this.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);
this.requestDefinitions.get(0).setAccept(MediaType.HTML);
this.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);
this.requestDefinitions.get(1).setAccept(MediaType.UNKNOWN);
this.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);
this.requestDefinitions.get(2).setAccept(MediaType.HTML);
final List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),
this.requestDefinitions.get(0), this.requestDefinitions.get(2));
Collections.sort(this.requestDefinitions, this.comparator);
Assert.assertEquals(expected, this.requestDefinitions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasHttpMethod();",
"String getHttpMethod();",
"String getHttpMethod();",
"public HTTPRequestMethod getMethod();",
"public void setMethod(HTTPMethod method);",
"public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }",
"public void setHttpMethod(int httpMethod) {\n method = httpMethod;\n }",
"public HttpMethod getMethod()\r\n/* 44: */ {\r\n/* 45: 78 */ return HttpMethod.valueOf(this.servletRequest.getMethod());\r\n/* 46: */ }",
"Collection<HttpMethod> getMinimalSupportedHttpMethods();",
"@Test\n\tpublic void testHttpMethodPriorityVsUnknown() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"private void setRequestMethod() {\n switch (type) {\n case GET:\n try {\n connection.setRequestMethod(GET);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as GET successfully\");\n LOG.severe(e.toString());\n }\n break;\n case POST:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(POST);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as POST successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PUT:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PUT);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PUT successfully\");\n LOG.severe(e.toString());\n }\n break;\n case DELETE:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(DELETE);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as DELETE successfully\");\n LOG.severe(e.toString());\n }\n break;\n case PATCH:\n try {\n connection.setDoOutput(true);\n connection.setRequestMethod(PATCH);\n } catch (ProtocolException e) {\n LOG.severe(\"Could not set request as PATCH successfully\");\n LOG.severe(e.toString());\n }\n break;\n }\n }",
"public boolean hasHttpMethod() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"private void checkRequest(Request req) throws MethodNotAllowed, NotFound {\n if (!req.getHeader(\"Method\").equals(\"GET\") ||\n !req.getHeader(\"Version\").equals(\"HTTP/1.1\")) {\n throw new MethodNotAllowed();\n }\n if (req.getHeader(\"Path\").endsWith(\"/\")) {\n throw new NotFound();\n }\n }",
"public boolean hasHttpMethod() {\n return ((bitField0_ & 0x00000002) == 0x00000002);\n }",
"@Test\n public void reqTypeTest() {\n // TODO: test reqType\n }",
"public String getHttpMethod() {\n return httpMethod;\n }",
"private boolean isSupportedMethod(String sHTTPMethod) {\n return Arrays.asList(SUPPORTED_METHODS).contains(sHTTPMethod.toUpperCase());\n }",
"public HttpMethod getMethod()\r\n/* 29: */ {\r\n/* 30:56 */ return this.method;\r\n/* 31: */ }",
"public void setReqMethod(java.lang.String value) {\n this.req_method = value;\n }",
"@Test\n @OperateOnDeployment(\"server\")\n public void shouldFailToGetResourceWhenHttpMethodIncorrect() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(400).when().put(\n getBaseTestUrl() + \"/1/category/get/json/1\");\n }",
"private void setControlsForMethodType ( String methodType ) {\n \t\tif (getCurrentTestType().equalsIgnoreCase(JAX_RS) &&\n \t\t\t\t(methodType.equalsIgnoreCase(GET) ||\n \t\t\t\t methodType.equalsIgnoreCase(OPTIONS))) {\n \t\t\tbodyText.setEnabled(false);\n \t\t\ttreeRequestBody.getTree().setEnabled(false);\n \t\t} else {\n \t\t\tbodyText.setEnabled(true);\n \t\t\ttreeRequestBody.getTree().setEnabled(true);\n \t\t}\n \t}",
"protected boolean methodForbidden() {\n return methodToTest.getName().equals(\"getClassNull\")\n || methodToTest.getName().startsWith(\"isA\")\n || methodToTest.getName().equals(\"create\")\n || methodToTest.getName().equals(\"getTipString\")\n || methodToTest.getName().equals(\"toString\");\n }",
"@Override\n\tprotected HttpMethod requestMethod() {\n\t\treturn HttpMethod.POST;\n\t}",
"@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\n\t}",
"public String getHttpMethod() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n httpMethod_ = s;\n }\n return s;\n }\n }",
"public String getHttpmethod() {\n return httpmethod;\n }",
"@Ignore\n @Test\n public void testPostDisambiguatesOnContentType() throws ClientProtocolException, IOException\n {\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", xml, ContentType.APPLICATION_XML_TYPE), \"xml\");\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", json, ContentType.APPLICATION_JSON_TYPE), \"json\");\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", text, ContentType.TEXT_PLAIN_TYPE), \"text\");\n }",
"public Builder setHttpMethod(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n httpMethod_ = value;\n onChanged();\n return this;\n }",
"@Override\r\n\t@Test(groups = {\"function\",\"setting\"} ) \r\n\tpublic boolean checkProtocol() {\n\t\tboolean flag = oTest.checkProtocol();\r\n\t\tAssertion.verifyEquals(flag, true);\r\n\t\treturn false;\r\n\t}",
"@Override\n\tprotected Set<RequestTypeEnum> provideAllowableRequestTypes() {\n\t\treturn Collections.singleton(RequestTypeEnum.POST);\n\t}",
"public String getRequestMethod(){\n return this.requestMethod;\n }",
"MethodType getMethodType();",
"public void setRequestMethod(String requestMethod){\n this.requestMethod = requestMethod;\n }",
"public interface RequestType {\n String GET = \"GET\";\n String POST = \"POST\";\n String UPDATE = \"UPDATE\";\n String DELETE = \"DELETE\";\n String DEFAULT = \"DEFAULT\";\n}",
"public void setHttpmethod(String httpmethod) {\n this.httpmethod = httpmethod == null ? null : httpmethod.trim();\n }",
"public void setRequestMethod(int requestMethod) {\n this.requestMethod = requestMethod;\n }",
"public String getHttpMethod() {\n Object ref = httpMethod_;\n if (!(ref instanceof String)) {\n String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n httpMethod_ = s;\n return s;\n } else {\n return (String) ref;\n }\n }",
"public static int httpMethodId(final String httpMethod) {\n if (startsWith(httpMethod, GET) || startsWith(httpMethod, HEAD)) {\n return 0;\n } else if (startsWith(httpMethod, POST) || startsWith(httpMethod, PUT)) {\n return 1;\n } else if (startsWith(httpMethod, CONNECT)) {\n return 2;\n } else if (startsWith(httpMethod, OPTIONS)) {\n return 3;\n } else {\n return -1;\n /**\n * No match...\n * Following methods are not implemented: ||\n * startsWith(httpMethod,\"TRACE\")\n */\n }\n }",
"@Override\n protected void validateResponseTypeParameter(String responseType, AuthorizationEndpointRequest request) {\n }",
"@Override\n\t\tpublic String getMethod() {\n\t\t\treturn null;\n\t\t}",
"@Override\n\tpublic void setHTTPMODE(HttpMethod httpmodel) {\n\t\tthis.httpmodel = httpmodel;\n\t}",
"@Test\n public void testHttp405NotAllowedMethod() {\n final NioEventLoopGroup bootGroup = new NioEventLoopGroup();\n final NioEventLoopGroup processGroup = new NioEventLoopGroup();\n final String json = \"{\\\"action\\\":\\\"ping\\\"}\";\n final ByteBuf content = Unpooled.copiedBuffer(json, StandardCharsets.UTF_8);\n\n final ChannelFuture serverChannel = runServer(bootGroup, processGroup);\n runClient(HttpMethod.PUT, content, uri);\n\n serverChannel.awaitUninterruptibly();\n bootGroup.shutdownGracefully();\n processGroup.shutdownGracefully();\n\n final String expected = \"{\\\"action\\\":\\\"error\\\",\\\"content\\\":\\\"Ping Pong server failure\\\",\\\"status\\\":\\\"405 Method Not Allowed\\\"}\";\n final String actual = buffer.toString();\n logger.info(\"Expected result: {}\", expected);\n logger.info(\"Actual result: {}\", actual);\n Assert.assertEquals(\"Hadn't processed the request: 405 Method Not Allowed\", expected, actual);\n }",
"ResourceMethod getMethodType();",
"public AmbiguousMethodException() {\n super();\n }",
"@Override\r\n\tprotected ResponseEntity<Object> handleHttpRequestMethodNotSupported(HttpRequestMethodNotSupportedException ex,\r\n\t\t\tHttpHeaders headers, HttpStatus status, WebRequest request) {\n\t\treturn super.handleHttpRequestMethodNotSupported(ex, headers, status, request);\r\n\t}",
"public static boolean isPost(String argRequestMethod) {\r\n\t\treturn HttpConstants.POST.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"private String computeMethodForRedirect(String initialMethod, String responseCode) {\n if (!HTTPConstants.HEAD.equalsIgnoreCase(initialMethod)) {\n return HTTPConstants.GET;\n }\n return initialMethod;\n }",
"@Nullable\n public static EHTTPMethod getHttpMethod (@Nonnull final HttpServletRequest aHttpRequest)\n {\n ValueEnforcer.notNull (aHttpRequest, \"HttpRequest\");\n\n final String sMethod = aHttpRequest.getMethod ();\n return EHTTPMethod.getFromNameOrNull (sMethod);\n }",
"public interface MethodsHttpUtils {\n HttpResponse doGet(String url, String mediaType) throws AppServerNotAvailableException, IOException;\n HttpResponse doPost(String url, String mediaType, String dataJson) throws UnsupportedEncodingException, ClientProtocolException, AppServerNotAvailableException;\n HttpResponse doDelete(String url, String mediaType) throws AppServerNotAvailableException;\n HttpResponse doPut(String url, String mediaType, String dataJson) throws AppServerNotAvailableException;\n}",
"public String getRequestMethod()\n {\n return requestMethod;\n }",
"@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_ALLOWED);\n }\n }",
"@Override\n public HttpMethods getMethod() {\n return HttpMethods.EVAL;\n }",
"public com.google.protobuf.ByteString\n getHttpMethodBytes() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n httpMethod_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Nullable\n abstract Method getMethod();",
"@When(\"user calls {string} with {string} http request\")\n public void user_calls_with_http_request(String resource, String method) {\n System.out.println(\"When\");\n\n APIResourcesEnum apiresource=APIResourcesEnum.valueOf(resource);\n System.out.println(apiresource.getResource());\n\n\n if(method.equalsIgnoreCase(method))\n response=reqSpec.when().post(apiresource.getResource());\n else if(method.equalsIgnoreCase(method))\n response= reqSpec.when().get(apiresource.getResource());\n\n\n // throw new io.cucumber.java.PendingException();\n }",
"@Override\n\tpublic void checkType(final String type) {\n\t\tHttpUtils.checkToken(type,\"Type '%s' is not a valid token\",type);\n\t}",
"public io.confluent.developer.InterceptTest.Builder setReqMethod(java.lang.String value) {\n validate(fields()[6], value);\n this.req_method = value;\n fieldSetFlags()[6] = true;\n return this;\n }",
"public static boolean isGet(String argRequestMethod) {\r\n\t\treturn HttpConstants.GET.equalsIgnoreCase(argRequestMethod);\r\n\t}",
"public Set<HttpMethod> getAllow()\r\n/* 137: */ {\r\n/* 138:209 */ String value = getFirst(\"Allow\");\r\n/* 139:210 */ if (value != null)\r\n/* 140: */ {\r\n/* 141:211 */ List<HttpMethod> allowedMethod = new ArrayList(5);\r\n/* 142:212 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 143:213 */ for (String token : tokens) {\r\n/* 144:214 */ allowedMethod.add(HttpMethod.valueOf(token));\r\n/* 145: */ }\r\n/* 146:216 */ return (Set)EnumSet.copyOf(allowedMethod);\r\n/* 147: */ }\r\n/* 148:219 */ return (Set)EnumSet.noneOf(HttpMethod.class);\r\n/* 149: */ }",
"void check()\n {\n checkUsedType(responseType);\n checkUsedType(requestType);\n }",
"boolean isMoreSpecific (MethodType type) throws OverloadingAmbiguous {\r\n boolean status = false;\r\n\r\n try {\r\n for (int i = 0, size = arguments.size (); i < size; i++) {\r\n\tIdentifier this_arg = (Identifier) arguments.elementAt (i);\r\n\tIdentifier target_arg = (Identifier) type.arguments.elementAt (i);\r\n\r\n\tint type_diff = this_arg.type.compare (target_arg.type);\r\n\tif (type_diff == 0)\r\n\t continue;\r\n\telse if (type_diff > 0) {\r\n\t if (status == true) throw new OverloadingAmbiguous ();\r\n\t} else {\r\n\t if (i != 0) throw new OverloadingAmbiguous ();\r\n\t status = true;\r\n\t}\r\n }\r\n } catch (OverloadingAmbiguous ex) {\r\n throw ex;\r\n } catch (TypeMismatch ex) {\r\n throw new OverloadingAmbiguous ();\r\n }\r\n\r\n return status;\r\n }",
"@Override\n public ElementMatcher<TypeDescription> typeMatcher() {\n return named(\"com.google.api.client.http.HttpRequest\");\n }",
"public abstract boolean isAppropriateRequest(Request request);",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"Set<HttpMethod> optionsForAllow(URI url) throws RestClientException;",
"public static Method getMethod(String method) throws IllegalArgumentException {\n/* 119 */ return getMethod(method, false);\n/* */ }",
"@Override\n public ServiceResponse allowedMethods(final ServiceRequest request) throws SOAPException {\n return this.soapClient.allowedMethods(request, this.getTargetUrl());\n }",
"public Set<HttpMethod> getHttpMethodsToRetry() {\r\n if (configuration.getHttpMethodsToRetry() == null) {\r\n return null;\r\n }\r\n return configuration.getHttpMethodsToRetry().stream()\r\n .map(httpMethod -> HttpMethod.valueOf(httpMethod.toString()))\r\n .collect(Collectors.toSet());\r\n }",
"public HttpMethod method() {\n return method;\n }",
"@Override\n protected String inferProtocol() {\n return \"http\";\n }",
"public HttpMethod getMethod() {\n return method;\n }",
"public com.google.protobuf.ByteString\n getHttpMethodBytes() {\n Object ref = httpMethod_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n httpMethod_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"@Test\n public void optionRequest() {\n str = METHOD_OPTION + URI_SAMPLE + \" \" + HTTP_VERSION + ENDL;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n assertEquals(request.getMethod(), HttpMethod.OPTIONS);\n assertEquals(request.getUrn(), \"www.site.ru/news.html\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getHeader(null), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(null), \"\");\n }",
"String getMethod();",
"String getMethod();",
"com.google.protobuf.ByteString\n getHttpMethodBytes();",
"@ExceptionHandler(HttpRequestMethodNotSupportedException.class)\r\n public ResponseEntity<DefaultErrorList> handlerMethodNotSupported(HttpRequestMethodNotSupportedException ex, HttpServletRequest request) {\r\n\t\tLOGGER.error(\"Error metodo HTTP no soportado para este endpoint, {}\", request.getRequestURL().toString());\r\n\t\treturn new ResponseEntity<DefaultErrorList>(new DefaultErrorList(new DefaultError\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t(GeneralCatalog.GRAL001.getCode(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGeneralCatalog.GRAL001.getMessage(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGeneralCatalog.GRAL001.getLevelException().toString(),\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"Metodo HTTP no soportado para este endpoint\",\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\trequest.getRequestURL().toString()\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t)), HttpStatus.INTERNAL_SERVER_ERROR);\r\n }",
"public java.lang.String getReqMethod() {\n return req_method;\n }",
"private boolean isPreflight(HttpServletRequest request) {\n return request.getMethod().equals(\"OPTIONS\");\n }",
"@Test\n\tpublic void testMethodCRUDConfig() {\n\t\tfinal IntrospectionResult introspection = getIntrospection();\n\t\tfinal IntrospectionFullType queryType = getFullType(introspection, schemaConfig.getQueryTypeName());\n\t\tfinal IntrospectionFullType mutationType = getFullType(introspection, schemaConfig.getMutationTypeName());\n\t\tfinal String saveMethodName = schemaConfig.getMutationSavePrefix() + Entity7.class.getSimpleName();\n\t\tfinal String deleteMethodName = schemaConfig.getMutationDeletePrefix() + Entity8.class.getSimpleName();\n\t\tfinal String getByIdMethodName = schemaConfig.getQueryGetByIdPrefix() + Entity9.class.getSimpleName();\n\t\tfinal String getAllMethodName = schemaConfig.getQueryGetListPrefix() + Entity9.class.getSimpleName();\n\t\tfinal Optional<IntrospectionTypeField> optionalSaveMethod = getOptionalField(mutationType, saveMethodName);\n\t\tfinal Optional<IntrospectionTypeField> optionalDeleteMethod = getOptionalField(mutationType, deleteMethodName);\n\t\tfinal Optional<IntrospectionTypeField> optionalGetByIdMethod = getOptionalField(queryType, getByIdMethodName);\n\t\tfinal Optional<IntrospectionTypeField> optionalGetAllMethod = getOptionalField(queryType, getAllMethodName);\n\t\tAssert.assertFalse(Message.format(\"There shouldn't be a [{}] method.\", saveMethodName),\n\t\t\t\toptionalSaveMethod.isPresent());\n\t\tAssert.assertFalse(Message.format(\"There shouldn't be a [{}] method.\", deleteMethodName),\n\t\t\t\toptionalDeleteMethod.isPresent());\n\t\tAssert.assertFalse(Message.format(\"There shouldn't be a [{}] method.\", getByIdMethodName),\n\t\t\t\toptionalGetByIdMethod.isPresent());\n\t\tAssert.assertFalse(Message.format(\"There shouldn't be a [{}] method.\", getAllMethodName),\n\t\t\t\toptionalGetAllMethod.isPresent());\n\t}",
"@Override\n public String getMethod() {\n return \"POST\";\n }",
"public HttpMethod method() {\n\t\treturn method;\n\t}",
"@ResponseStatus (HttpStatus.METHOD_NOT_ALLOWED)\n\t@ExceptionHandler (HttpRequestMethodNotSupportedException.class)\n\tpublic Result handleHttpRequestMethodNotSupportedException (HttpRequestMethodNotSupportedException e)\n\t{\n\t\treturn new Result ().failure (\"request_method_not_supported\");\n\t}",
"@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}",
"private boolean isAcceptable(final Method method) {\n return Modifier.isStatic(method.getModifiers())\n && Modifier.isPublic(method.getModifiers())\n && (method.getReturnType() == String.class || method.getReturnType().isAssignableFrom(List.class) || method\n .getReturnType().isArray() && method.getReturnType().getComponentType() == String.class);\n }",
"@Override\n public Type getType() {\n return Type.TypeRequest;\n }",
"@Override\r\n\tprotected ResponseEntity<Object> handleMethodArgumentNotValid(MethodArgumentNotValidException ex,\r\n\t\t\tHttpHeaders headers, HttpStatus status, WebRequest request) {\n\t\treturn super.handleMethodArgumentNotValid(ex, headers, status, request);\r\n\t}",
"@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}",
"public Builder setHttpMethodBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000002;\n httpMethod_ = value;\n onChanged();\n return this;\n }",
"public List<String> getSupportedMethods(Set<String> restParams) {\n //we try to avoid hardcoded mappings but the index api is the exception\n if (\"index\".equals(name) || \"create\".equals(name)) {\n List<String> indexMethods = Lists.newArrayList();\n for (String method : methods) {\n if (restParams.contains(\"id\")) {\n //PUT when the id is provided\n if (HttpPut.METHOD_NAME.equals(method)) {\n indexMethods.add(method);\n }\n } else {\n //POST without id\n if (HttpPost.METHOD_NAME.equals(method)) {\n indexMethods.add(method);\n }\n }\n }\n return indexMethods;\n }\n\n return methods;\n }",
"@Override\n\tpublic boolean supports(MethodParameter methodParameter, Type targetType,\n\t\t\tClass<? extends HttpMessageConverter<?>> converterType) {\n\t\tSystem.out.println(\"from Requestbodyaddvice support method\");\n\t\treturn false;\n\t}",
"public java.lang.String getReqMethod() {\n return req_method;\n }",
"Method getMethod();",
"Method getMethod();",
"boolean isActionMethod(Method m) {\n Mapping mapping = m.getAnnotation(Mapping.class);\n if (mapping==null)\n return false;\n if (mapping.value().length()==0) {\n warnInvalidActionMethod(m, \"Url mapping cannot be empty.\");\n return false;\n }\n if (Modifier.isStatic(m.getModifiers())) {\n warnInvalidActionMethod(m, \"method is static.\");\n return false;\n }\n Class<?>[] argTypes = m.getParameterTypes();\n for (Class<?> argType : argTypes) {\n if (!converterFactory.canConvert(argType)) {\n warnInvalidActionMethod(m, \"unsupported parameter '\" + argType.getName() + \"'.\");\n return false;\n }\n }\n Class<?> retType = m.getReturnType();\n if (retType.equals(void.class)\n || retType.equals(String.class)\n || Renderer.class.isAssignableFrom(retType)\n )\n return true;\n warnInvalidActionMethod(m, \"unsupported return type '\" + retType.getName() + \"'.\");\n return false;\n }",
"interface LockssPostMethod extends HttpMethod {\n long getResponseContentLength();\n }",
"@Override\n\tpublic HttpRespModel methodDispatch(String method, String body) {\n\t\tSituationMethod requestMethod = SituationMethod.fromString(method);\n\t\tHttpRespModel respModel = new HttpRespModel();\n\t\t\n\t\t\n\t\tswitch (requestMethod) {\n\t\tcase AddMealSituationMethod:\n\t\t{\n\t\t\t//添加吃饭记录\n\t\t\trespModel = addMealSituationHandler(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase TodayMealSituationMethod:{\n\t\t\t//获取当天吃饭记录\n\t\t\trespModel = getTodayMealSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase AddSleepSituationMethod:{\n\t\t\t//添加睡觉情况记录\n\t\t\trespModel = addSleepSituation(body);\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\tcase TodaySleepSituationMethod:{\n\t\t\t//获取当天睡觉情况记录\n\t\t\trespModel = getTodaySleepSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase InterestCateList:{\n\t\t\t//获取兴趣分类列表\n\t\t\tInterestUtil util = new InterestUtil();\n\t\t\trespModel = util.getAllInterestList();\n\t\t\tbreak;\n\t\t}\n\t\tcase TodayInterestSituationMethod:{\n\t\t\trespModel = getTodayInterestSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase AddInterestSituationMethod:{\n\t\t\t//添加兴趣学习清理\n\t\t\trespModel = addInterestSituation(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase UnkonwnMethod:\n\t\tdefault:{\n\t\t\trespModel.setCode(RespError.urlMethodError);\n\t\t\trespModel.setMessage(\"对不起, method: \" + method + \"没有找到。\");\n\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\treturn respModel;\n\t}",
"@Test\n public void testAssertObjectNoGetMethodsType() {\n // setup\n final NoGetMethodsType noGetMethodsType = new NoGetMethodsType(TEST);\n final ChangedProperty<String> jokerProperty = Property.change(NoGetMethodsType.PROPERTY, TEST + TEST);\n\n // method\n assertObject(EMPTY_STRING, noGetMethodsType, jokerProperty);\n }",
"public Method getMethod();",
"protected abstract boolean isExpectedResponseCode(int httpStatus);"
]
| [
"0.7073687",
"0.68086547",
"0.68086547",
"0.67779",
"0.67041826",
"0.66660285",
"0.6571647",
"0.6484811",
"0.64447343",
"0.6429679",
"0.6391727",
"0.6342672",
"0.6309639",
"0.6301402",
"0.6232114",
"0.6212533",
"0.61527824",
"0.613475",
"0.60651356",
"0.60537803",
"0.6044819",
"0.60313183",
"0.59997976",
"0.59979683",
"0.5982152",
"0.59267116",
"0.59168315",
"0.58855706",
"0.58685654",
"0.58642906",
"0.57798",
"0.5761168",
"0.57542425",
"0.575205",
"0.5749418",
"0.5715963",
"0.56975514",
"0.56817514",
"0.56507194",
"0.5648063",
"0.5642006",
"0.5628574",
"0.5628004",
"0.5627529",
"0.56177557",
"0.5605074",
"0.5600767",
"0.5571005",
"0.55663526",
"0.55634165",
"0.55594105",
"0.55502504",
"0.5549129",
"0.5543149",
"0.5527337",
"0.551963",
"0.5511338",
"0.54992753",
"0.54787",
"0.5476096",
"0.54673034",
"0.5459818",
"0.5459076",
"0.54571706",
"0.5454532",
"0.54505605",
"0.54476845",
"0.54471356",
"0.54469365",
"0.5436257",
"0.54332316",
"0.5428303",
"0.5423088",
"0.5414742",
"0.5414742",
"0.5356061",
"0.5347371",
"0.5332346",
"0.53145057",
"0.5313537",
"0.5311454",
"0.53068084",
"0.5306624",
"0.5291957",
"0.5289589",
"0.5286368",
"0.5286196",
"0.5279015",
"0.5276772",
"0.5269994",
"0.52638996",
"0.52498025",
"0.5242392",
"0.5242392",
"0.5237811",
"0.5237026",
"0.52306134",
"0.5211996",
"0.5209299",
"0.5208033"
]
| 0.6418232 | 10 |
Test to ensure that basic sorting uses HttpMethod first, followed by ContentType, and then Accept. | @Test
public void testDefinitionPriority() {
this.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);
this.requestDefinitions.get(0).setContentType(MediaType.UNKNOWN);
this.requestDefinitions.get(0).setAccept(MediaType.HTML);
this.requestDefinitions.get(1).setHttpMethod(HttpMethod.UNKNOWN);
this.requestDefinitions.get(1).setContentType(MediaType.HTML);
this.requestDefinitions.get(1).setAccept(MediaType.UNKNOWN);
this.requestDefinitions.get(2).setHttpMethod(HttpMethod.GET);
this.requestDefinitions.get(2).setContentType(MediaType.UNKNOWN);
this.requestDefinitions.get(2).setAccept(MediaType.UNKNOWN);
final List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(2),
this.requestDefinitions.get(1), this.requestDefinitions.get(0));
Collections.sort(this.requestDefinitions, this.comparator);
Assert.assertEquals(expected, this.requestDefinitions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n\tpublic void testHttpMethodPriorityVsUnknown() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"@Test\n\tpublic void testHttpMethodPriorityVsOtherAttributes() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(0).setAccept(MediaType.HTML);\n\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(1).setAccept(MediaType.UNKNOWN);\n\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(2).setAccept(MediaType.HTML);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"@Test(priority=5)\r\n\tpublic void validateHeader()\r\n\t{\r\n\t\tgiven()\r\n\t\t.get(\"https://reqres.in/api/users/2\")\r\n\t\t.then() \r\n\t \t.header(\"Content-Type\", containsString(\"application/json\")); \r\n\t\t//application/json; charset=utf-8 \r\n\t}",
"public void sort()\n {\n com.jayway.restassured.response.Response response= given().relaxedHTTPSValidation().when().get(\"http://18.222.188.206:3333/accounts?_sort=title&_order=asc\");\n response.then().assertThat().statusCode(200);\n System.out.println(\"The accounts that are sorted according to it's title is displayed below:\");\n response.prettyPrint();\n \n }",
"@Ignore\n @Test\n public void testPostDisambiguatesOnContentType() throws ClientProtocolException, IOException\n {\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", xml, ContentType.APPLICATION_XML_TYPE), \"xml\");\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", json, ContentType.APPLICATION_JSON_TYPE), \"json\");\n verifyOkResult(new PostRequestResult(\"post/bycontenttype\", text, ContentType.TEXT_PLAIN_TYPE), \"text\");\n }",
"@Test\n\tpublic void testPathPriorityByLength() {\n\n\t\tthis.requestDefinitions.get(0).setPathParts(new PathDefinition[1]);\n\t\tthis.requestDefinitions.get(1).setPathParts(new PathDefinition[3]);\n\t\tthis.requestDefinitions.get(2).setPathParts(new PathDefinition[2]);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(2), this.requestDefinitions.get(0));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"@Test\n\tpublic void testPathPriorityByWildCard() {\n\n\t\tthis.requestDefinitions.get(0).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(0).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(0).getPathParts()[0].setValue(\"a\");\n\t\tthis.requestDefinitions.get(0).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(0).getPathParts()[1].setValue(null);\n\n\t\tthis.requestDefinitions.get(1).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(1).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(1).getPathParts()[0].setValue(\"a\");\n\t\tthis.requestDefinitions.get(1).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(1).getPathParts()[1].setValue(\"a\");\n\n\t\tthis.requestDefinitions.get(2).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(2).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(2).getPathParts()[0].setValue(null);\n\t\tthis.requestDefinitions.get(2).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(2).getPathParts()[1].setValue(\"a\");\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"@Test\n public void VerifyContentTypeWithAssertThat(){\n given().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/employees/100\")\n .then().assertThat().statusCode(200)\n .and().contentType(ContentType.JSON);\n }",
"@Test\n public void sending_request_headers() {\n given()\n .baseUri(\"http://data.fixer.io/api\")\n .queryParam(\"access_key\", \"b406c5d0bd55d77d592af69a930f4feb\")\n .queryParam(\"Symbols\", \"USD\")\n .header(\"If-None-Match\", \"03a4545f530000f3491fbca200000001\")\n .header(\"If-Modified-Since\", \"Tue, 30 Jun 2020 01:01:25 GMT\").\n when()\n .get(\"/latest\").\n then()\n .log().all()\n .statusCode(200);\n }",
"@Test\n\tpublic void verifyHeader() {\n\t\t\tHeaders head = response.getHeaders();\n\t\t\tAssert.assertEquals(head.getValues(\"Content-Type\").toString(), \"[application/json; charset=utf-8]\");\n\t\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 }",
"public int compareTo(RequestMappingInfo other, HttpServletRequest request)\n/* */ {\n/* 244 */ if (HttpMethod.HEAD.matches(request.getMethod())) {\n/* 245 */ int result = this.methodsCondition.compareTo(other.getMethodsCondition(), request);\n/* 246 */ if (result != 0) {\n/* 247 */ return result;\n/* */ }\n/* */ }\n/* 250 */ int result = this.patternsCondition.compareTo(other.getPatternsCondition(), request);\n/* 251 */ if (result != 0) {\n/* 252 */ return result;\n/* */ }\n/* 254 */ result = this.paramsCondition.compareTo(other.getParamsCondition(), request);\n/* 255 */ if (result != 0) {\n/* 256 */ return result;\n/* */ }\n/* 258 */ result = this.headersCondition.compareTo(other.getHeadersCondition(), request);\n/* 259 */ if (result != 0) {\n/* 260 */ return result;\n/* */ }\n/* 262 */ result = this.consumesCondition.compareTo(other.getConsumesCondition(), request);\n/* 263 */ if (result != 0) {\n/* 264 */ return result;\n/* */ }\n/* 266 */ result = this.producesCondition.compareTo(other.getProducesCondition(), request);\n/* 267 */ if (result != 0) {\n/* 268 */ return result;\n/* */ }\n/* */ \n/* 271 */ result = this.methodsCondition.compareTo(other.getMethodsCondition(), request);\n/* 272 */ if (result != 0) {\n/* 273 */ return result;\n/* */ }\n/* 275 */ result = this.customConditionHolder.compareTo(other.customConditionHolder, request);\n/* 276 */ if (result != 0) {\n/* 277 */ return result;\n/* */ }\n/* 279 */ return 0;\n/* */ }",
"@Test\n public void parseEmail_returnsSortCommand() {\n assertParseSuccess(PARAM_EMAIL);\n }",
"@Test\n\tpublic void testValidateSortOrder() {\n\t\ttry {\n\t\t\tfor(String emptyValue : ParameterSets.getEmptyValues()) {\n\t\t\t\tAssert.assertNull(SurveyResponseValidators.validateSortOrder(emptyValue));\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tSurveyResponseValidators.validateSortOrder(\"Invalid value.\");\n\t\t\t\tfail(\"The survey response sort order was invalid.\");\n\t\t\t}\n\t\t\tcatch(ValidationException e) {\n\t\t\t\t// Passed.\n\t\t\t}\n\t\t\t\n\t\t\tSet<List<SortParameter>> permutations = \n\t\t\t\tgetUniqueSets(Arrays.asList(SortParameter.values()));\n\t\t\t\n\t\t\tfor(List<SortParameter> permutation : permutations) {\n\t\t\t\tint length = permutation.size();\n\t\t\t\tStringBuilder permutationStringBuilder = new StringBuilder();\n\t\t\t\t\n\t\t\t\tint count = 1;\n\t\t\t\tfor(SortParameter sortParameter : permutation) {\n\t\t\t\t\tpermutationStringBuilder.append(sortParameter.toString());\n\t\t\t\t\t\n\t\t\t\t\tif(count != length) {\n\t\t\t\t\t\tpermutationStringBuilder.append(InputKeys.LIST_ITEM_SEPARATOR);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString permutationString = permutationStringBuilder.toString();\n\t\t\t\t\n\t\t\t\tAssert.assertEquals(permutation, SurveyResponseValidators.validateSortOrder(permutationString));\n\t\t\t}\n\t\t}\n\t\tcatch(ValidationException e) {\n\t\t\tfail(\"A validation exception was thrown: \" + e.getMessage());\n\t\t}\n\t}",
"@Test(priority = 6)\n\tpublic void validateSortingFunctionality() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.clickCustomerReviews(locator);\n\t\tlog.info(\"Content is present\");\n\t\tlog.info(\"Starting Sorting functionality testing\");\n\t}",
"public int accept(HttpResponseProlog prolog, HttpHeaders headers);",
"private String doSortOrder(SlingHttpServletRequest request) {\n RequestParameter sortOnParam = request.getRequestParameter(\"sortOn\");\n RequestParameter sortOrderParam = request.getRequestParameter(\"sortOrder\");\n String sortOn = \"sakai:filename\";\n String sortOrder = \"ascending\";\n if (sortOrderParam != null\n && (sortOrderParam.getString().equals(\"ascending\") || sortOrderParam.getString()\n .equals(\"descending\"))) {\n sortOrder = sortOrderParam.getString();\n }\n if (sortOnParam != null) {\n sortOn = sortOnParam.getString();\n }\n return \" order by @\" + sortOn + \" \" + sortOrder;\n }",
"@Test\n public void test_sort_pagination() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_sort_pagination_req.xml\",\n \"PWDDIC_testSearch_sort_pagination_res.xml\");\n }",
"Collection<HttpMethod> getMinimalSupportedHttpMethods();",
"@Test\n\tpublic void testParseHeader() throws IOException {\n\t\tConfigurationManager config = new ConfigurationManager();\n\t\tcheckParseHeader(\"\", \"\", \"\", false, \"\");\n\t\tcheckParseHeader(\"PUT /reviewsearch\", \"PUT\", \"/reviewsearch\", false, \"\");\n\t\tcheckParseHeader(\"PULL /slackbot\", \"PULL\", \"/slackbot\", false, \"\");\n\t\tcheckParseHeader(\"GET /slackbot\", \"GET\", \"/slackbot\", false, \"\");\n\t\tcheckParseHeader(\"POST /slackbot\", \"POST\", \"/slackbot\", false, \"\");\n\t\tcheckParseHeader(\"POST /reviewsearch\", \"POST\", \"/reviewsearch\", false, \"\");\n\t\tcheckParseHeader(\"POST /reviewsearch?query=jumpers\", \"POST\", \"/reviewsearch\", true, \"query\");\n\t\tcheckParseHeader(\"POST /reviewsearch?query=jumpers&unknown=unknown\", \"POST\", \"/reviewsearch\", true, \"unknown\");\n\t\tcheckParseHeader(\"POST /reviewsearch?error\", \"POST\", \"/reviewsearch\", false, \"error\");\n\t\tcheckParseHeader(\"GET /reviewsearch?query=jumpers\", \"GET\", \"/reviewsearch\", true, \"query\");\n\t\tcheckParseHeader(\"GET /\", \"GET\", \"/\", false, \"\");\n\t\t\n\t}",
"@GET\n @Produces({ \"application/json\" })\n public abstract Response get(@QueryParam(\"sort\") String sort);",
"@Test\n public void testNoIfModifiedSinceHeader() throws Exception\n {\n HttpAction<HttpGet> first = get(\"/test.txt\");\n assertEquals(200, first.getResponse().getStatusLine().getStatusCode());\n assertEquals(\"SOMETHING\", first.getResponseContent());\n }",
"boolean hasHttpMethod();",
"@Test\n public void getSorteerAction() throws Exception {\n }",
"Set<HttpMethod> optionsForAllow(URI url) throws RestClientException;",
"@Test\n @OperateOnDeployment(\"server\")\n public void shouldFailToGetResourceWhenHttpMethodIncorrect() {\n given().header(\"Authorization\", \"Bearer access_token\").expect().statusCode(400).when().put(\n getBaseTestUrl() + \"/1/category/get/json/1\");\n }",
"@Test\n public void sortAlphabeticallyASC_ReturnTrue() {\n // Set SharedPreferences (Sort alphabetically, ASC)\n mSharedPreferences.edit()\n .putInt(Constants.SORT_TYPE_KEY, Constants.SORT_TYPE_ALPHABETICALLY)\n .putBoolean(Constants.SORT_FAVORITES_ON_TOP_KEY, false)\n .putInt(Constants.SORT_DIRECTION_KEY, Constants.SORT_DIRECTION_ASC)\n .commit();\n\n // Click first position in RecyclerView\n onView(withId(R.id.fragment_notelist_recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n // Check that clicked Note matches Note (2) title/text\n onView(withId(R.id.fragment_note_title_edittext))\n .check(matches(withText(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_2_TITLE))));\n onView(withId(R.id.fragment_note_text_edittext))\n .check(matches(withText(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_2_TEXT))));\n }",
"String getHttpMethod();",
"String getHttpMethod();",
"@Override\n\tpublic void accept_order() {\n\t\t\n\t}",
"@Test\n\tpublic void shouldReturnAllPagedDocumentsFilteredByDocumentTypeSortedByDefaultSort()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 15, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createTypeCriteriaObject(StringUtils.EMPTY, StringUtils.EMPTY, FILTER_BY_DOCUMENT_TYPE)));\n\n\t\tTestCase.assertEquals(15, result.getResults().size());\n\t}",
"@Test(priority = 7)\n\tpublic void validateSortingByDate() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.selectSortingDropdown(0, locator);\n\t\theroImg.validateDate(1, locator, validate);\n\t\tHeroImageProductPageFlow.selectSortingDropdown(1, locator);\n\t\theroImg.validateDate(2, locator, validate);\n\t\tlog.info(\"sorting is correct\");\n\t}",
"@Test(priority = 10)\n\tpublic void testGetAllClients2() {\n\t\tResponse response = given().header(\"Authorization\", \"Bad Token\").when().get(URL).then().extract().response();\n\n\t\tassertTrue(response.statusCode() == 401);\n\t\tassertTrue(response.asString().contains(\"Unauthorized\"));\n\n\t\tgiven().header(\"Authorization\", token).when().get(URL + \"/notAURL\").then().assertThat().statusCode(404);\n\n\t\tgiven().header(\"Authorization\", token).when().post(URL).then().assertThat().statusCode(405);\n\t}",
"boolean isSortResult();",
"private void orderItem(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"@Test\n public void parseCamelCase_returnsSortCommand() {\n assertParseSuccess(PARAM_CAMEL_CASE);\n }",
"@Test\n public void getWitheaders(){\n with().accept(ContentType.JSON)\n .when().get(\"http://34.223.219.142:1212/ords/hr/countries/US\")\n .then().statusCode(200);\n }",
"@Override\n public boolean accepts(HttpResponse response) {\n Header[] headers = response.getHeaders(HttpHeaders.CONTENT_TYPE);\n for (Header header : headers) {\n if (header != null && header.getValue().contains(NTLMConstants.CONTENT_TYPE_FOR_SPNEGO)) {\n return true;\n }\n }\n return false;\n }",
"@Test(priority=3)\n\tpublic void testSingleContent() {\n\t\t\n\t\tgiven()\n\t\t\n\t\t.when()\n\t\t\t.get(\"http://jsonplaceholder.typicode.com/posts/5\")\n\t\t\n\t\t.then()\n\t\t\t.statusCode(200)\n\t\t\t.body(\".title\", equalTo(\"nesciunt quas odio\"));\n\t\t\n\t}",
"public HttpMethod getMethod()\r\n/* 31: */ {\r\n/* 32:60 */ return HttpMethod.valueOf(this.httpRequest.getMethod());\r\n/* 33: */ }",
"Sort asc(QueryParameter parameter);",
"public Comparator<? super AcceptMediaTypeRange> comparator() {\n\t\treturn this.acceptMediaTypes.comparator();\n\t}",
"void onPositiveResult(@Nullable Sort sort, boolean isSortAsc, @Nullable ArrayList<String> selectedFilters);",
"@Test\n public void given_devEnvironmentWithParamFieldAndSort_when_callEndPointShowStudentAndSort_then_returnStatus200AndSortListStudent() throws Exception {\n List<Student> studentListSort = STUDENT_LIST.stream().sorted((student1, student2) -> student1.getName().compareTo(student2.getName())).collect(Collectors.toList());\n\n Mockito.when(studentRepo.findAll(ArgumentMatchers.any(Sort.class))).thenReturn(studentListSort);\n\n RequestBuilder request = MockMvcRequestBuilders\n .get(\"/students/sort\")\n .accept(MediaType.APPLICATION_JSON)\n .param(\"field\", \"name\")\n .param(\"sort\", \"ASC\");\n\n mockMvc.perform(request)\n .andExpect(status().isOk())\n .andExpect(content().json(gson.toJson(studentListSort)))\n .andDo(MockMvcResultHandlers.print())\n .andReturn();\n }",
"private void validatePreferHeader(ODataRequest request) throws ODataHandlerException {\n List<String> returnPreference = request.getHeaders(PREFER);\n if (null != returnPreference) {\n for (String preference : returnPreference) {\n if (preference.equals(RETURN_MINIMAL) || preference.equals(RETURN_REPRESENTATION)) {\n throw new ODataHandlerException(\"Prefer Header not supported: \" + preference,\n ODataHandlerException.MessageKeys.INVALID_PREFER_HEADER, preference);\n } \n }\n }\n }",
"@Test\n public void Task1() {\n given()\n .when()\n .get(\"https://httpstat.us/203\")\n .then()\n .statusCode(203)\n .contentType(ContentType.TEXT)\n ;\n }",
"public int compareTo(Object other) { return 404;}",
"@Given(\"^Header values for the api$\")\n\tpublic void header_values_for_the_api() throws Throwable {\n\t\tRestAssured.useRelaxedHTTPSValidation();\n\t\trequest.given()\n .contentType(ContentType.JSON)\n .baseUri(\"https://jsonplaceholder.typicode.com\");\n\t // throw new PendingException();\n\t}",
"@Test\n public void sortByCreationDateASC_ReturnTrue() {\n // Set SharedPreferences (Sort by Creation Date, ASC)\n mSharedPreferences.edit()\n .putInt(Constants.SORT_TYPE_KEY, Constants.SORT_TYPE_CREATION_DATE)\n .putBoolean(Constants.SORT_FAVORITES_ON_TOP_KEY, false)\n .putInt(Constants.SORT_DIRECTION_KEY, Constants.SORT_DIRECTION_ASC)\n .commit();\n\n // Click first position in RecyclerView\n onView(withId(R.id.fragment_notelist_recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n // Check that clicked Note matches Note (3) title/text\n onView(withId(R.id.fragment_note_title_edittext))\n .check(matches(withText(is(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_3_TITLE)))));\n// onView(withId(R.id.fragment_note_text_textview))\n// .check(matches(withText(is(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_3_TEXT)))));\n }",
"private void mimicSunRequestHeaders() {\n if (!isHeaderSet(method.getRequestHeader(\"Accept\"))) {\n setRequestProperty(\"Accept\", acceptHeader);\n }\n if (!isHeaderSet(method.getRequestHeader(\"Connection\"))) {\n setRequestProperty(\"Connection\", \"keep-alive\");\n }\n }",
"@SuppressWarnings(\"unchecked\")\n private static Map<String, String> sortHeaders( HttpServletRequest request ) {\n Map<String, String> sortedHeaders = new TreeMap<String, String>();\n Enumeration<String> attrEnum = request.getHeaderNames();\n while ( attrEnum.hasMoreElements() ) {\n String s = attrEnum.nextElement();\n sortedHeaders.put( s, request.getHeader( s ) );\n }\n return sortedHeaders;\n }",
"@Test\n public void test_read_input_and_sort() {\n\n }",
"public void testGetOrder() {\n }",
"@Test(priority = 8)\n\tpublic void validateSortingByRating() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.selectSortingDropdown(2, locator);\n\t\theroImg.validateStarRating(3, locator, validate);\n\t\tHeroImageProductPageFlow.selectSortingDropdown(3, locator);\n\t\theroImg.validateStarRating(4, locator, validate);\n\t\tlog.info(\"sorting is correct\");\n\t}",
"@Test\n void sortByDate() {\n }",
"@Test (priority = 1)\n public void sortAlphabetical(){\n\n for (int i = 0; i < allDepartments.getOptions().size()-1; i++) {\n String current = allDepartments.getOptions().get(i).getText();\n String next = allDepartments.getOptions().get(i+1).getText();\n\n System.out.println(\"comparing: \" + current + \" with \"+ next);\n\n Assert.assertTrue(current.compareTo(next)<=0);\n\n }\n }",
"@Test\r\n public void test_setContentType_Accuracy() {\r\n instance.setContentType(\"a\");\r\n assertEquals(\"incorrect value after setting\", \"a\", instance.getContentType());\r\n }",
"@Test\n public void headers() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.acceptFrame();// PING\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"c\", \"c3po\"));\n peer.sendFrame().ping(true, 1, 0);\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), true);\n connection.writePingAndAwaitPong();// Ensure that the HEADERS has been received.\n\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n Assert.assertEquals(Headers.of(\"c\", \"c3po\"), stream.takeHeaders());\n // verify the peer received what was expected\n MockHttp2Peer.InFrame synStream = peer.takeFrame();\n Assert.assertEquals(TYPE_HEADERS, synStream.type);\n MockHttp2Peer.InFrame ping = peer.takeFrame();\n Assert.assertEquals(TYPE_PING, ping.type);\n }",
"@Test\n public void testCompressionOrdinance() {\n Assert.assertTrue(((LZO.ordinal()) == 0));\n Assert.assertTrue(((GZ.ordinal()) == 1));\n Assert.assertTrue(((NONE.ordinal()) == 2));\n Assert.assertTrue(((SNAPPY.ordinal()) == 3));\n Assert.assertTrue(((LZ4.ordinal()) == 4));\n }",
"@Test\n\tprivate void get_all_headers() {\n\t\tRestAssured.baseURI = \"https://reqres.in\";\n\t\tRequestSpecification httpRequest = RestAssured.given();\n\t\tResponse response = httpRequest.request(Method.GET, \"/api/users?page=2\");\n\t\tHeaders headers = response.getHeaders();\n\t\tfor (Header header : headers) {\n\t\t\tSystem.out.println(header.getName() + \" \\t : \" + header.getValue());\n\t\t}\n\t}",
"@Override\n public boolean isCallbackOrderingPostreq(OFType type, String name) {\n return false;\n }",
"@Override\n public boolean isCallbackOrderingPostreq(OFType type, String name) {\n return false;\n }",
"@Test\n public void whensortByAllFieldsListOfUsersThenListSortedByAllFields() {\n SortUser sortUser = new SortUser();\n\n User sergey = new User(\"Sergey\", 25);\n User sergey2 = new User(\"Sergey\", 30);\n User anna = new User(\"Anna\", 23);\n User denis = new User(\"Denis\", 21);\n User anna2 = new User(\"Anna\", 20);\n\n List<User> list = new ArrayList<>();\n list.add(sergey);\n list.add(sergey2);\n list.add(anna);\n list.add(denis);\n list.add(anna2);\n\n List<User> methodReturns = sortUser.sortByAllFields(list);\n\n List<User> expected = new ArrayList<>();\n expected.add(anna2);\n expected.add(anna);\n expected.add(denis);\n expected.add(sergey);\n expected.add(sergey2);\n\n assertThat(methodReturns, is(expected));\n }",
"@Test\n public void parseRemark_returnsSortCommand() {\n assertParseSuccess(PARAM_REMARK);\n }",
"@Test\n public void testSort() {\n topScreenModel.setSortFieldAndFields(Field.LOCALITY, fields);\n\n FieldValue previous = null;\n\n // Test for ascending sort\n topScreenModel.refreshMetricsData();\n\n for (Record record : topScreenModel.getRecords()) {\n FieldValue current = record.get(Field.LOCALITY);\n if (previous != null) {\n assertTrue(current.compareTo(previous) < 0);\n }\n previous = current;\n }\n\n // Test for descending sort\n topScreenModel.switchSortOrder();\n topScreenModel.refreshMetricsData();\n\n previous = null;\n for (Record record : topScreenModel.getRecords()) {\n FieldValue current = record.get(Field.LOCALITY);\n if (previous != null) {\n assertTrue(current.compareTo(previous) > 0);\n }\n previous = current;\n }\n }",
"private boolean isValidContentType(String sHTTPRequest) {\n String sFileType = getFileExtension(sHTTPRequest);\n return Arrays.asList(SUPPORTED_FILE_TYPES).contains(sFileType);\n }",
"@Override\n\tpublic boolean isCallbackOrderingPostreq(OFType type, String name) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCallbackOrderingPostreq(OFType type, String name) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCallbackOrderingPostreq(OFType type, String name) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean isCallbackOrderingPostreq(OFType type, String name) {\n\t\treturn false;\n\t}",
"private boolean match(Type t, Type original) {\n\t\t\t\treturn original.getSort() == Type.METHOD && original.getSort() == t.getSort();\n\t\t\t}",
"@Test\n public void optionRequest() {\n str = METHOD_OPTION + URI_SAMPLE + \" \" + HTTP_VERSION + ENDL;\n request = new HttpRequest(str, IP_ADDRESS, HOST);\n assertEquals(request.getMethod(), HttpMethod.OPTIONS);\n assertEquals(request.getUrn(), \"www.site.ru/news.html\");\n assertEquals(request.getHeader(NONEXISTENT_VAR), \"\");\n assertEquals(request.getHeader(null), \"\");\n assertEquals(request.getParameter(NONEXISTENT_VAR), \"\");\n assertEquals(request.getParameter(null), \"\");\n }",
"public List<MediaType> getAccept()\r\n/* 87: */ {\r\n/* 88:148 */ String value = getFirst(\"Accept\");\r\n/* 89:149 */ return value != null ? MediaType.parseMediaTypes(value) : Collections.emptyList();\r\n/* 90: */ }",
"public String doSort();",
"@Override\n\t\tpublic boolean isCallbackOrderingPostreq(OFType type, String name) {\n\t\t\treturn false;\n\t\t}",
"@TestProperties(name = \"test the parameters sorting\")\n\tpublic void testEmptyInclude(){\n\t}",
"@Test\n\tpublic void shouldReturnPagedOpenDocumentsSortedByOpenAmountAsc()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 10, \"byOpenAmountAsc\"), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createFilterByCriteriaObject(DOCUMENT_STATUS_OPEN, StringUtils.EMPTY)));\n\n\t\tTestCase.assertEquals(10, result.getResults().size());\n\t\tfor (final B2BDocumentModel document : result.getResults())\n\t\t{\n\t\t\tTestCase.assertEquals(DocumentStatus.OPEN, document.getStatus());\n\t\t}\n\t}",
"@Test\r\n public void SortTest() {\r\n System.out.println(\"sort\");\r\n List<String> array = Arrays.asList(\"3\", \"2\", \"1\");\r\n List<String> expResult = Arrays.asList(\"1\",\"2\",\"3\");\r\n instance.sort(array);\r\n assertEquals(expResult,array);\r\n }",
"@Test\n\tpublic void testVersion() {\n\t\tassertEquals(\"HTTP/1.0\", myReply.getVersion());\n\t}",
"public String getMessageSort();",
"private void defaultAuthorShouldBeFound(String filter) throws Exception {\n restAuthorMockMvc.perform(get(\"/api/authors?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(author.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].firstName\").value(hasItem(DEFAULT_FIRST_NAME)))\n .andExpect(jsonPath(\"$.[*].lastName\").value(hasItem(DEFAULT_LAST_NAME)));\n\n // Check, that the count call also returns 1\n restAuthorMockMvc.perform(get(\"/api/authors/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_UTF8_VALUE))\n .andExpect(content().string(\"1\"));\n }",
"@Test\r\n\tpublic void testOrderPerform() {\n\t}",
"@Test\n public void sortAlphabeticallyDESC_ReturnTrue() {\n // Set SharedPreferences (Sort alphabetically, DESC)\n mSharedPreferences.edit()\n .putInt(Constants.SORT_TYPE_KEY, Constants.SORT_TYPE_ALPHABETICALLY)\n .putBoolean(Constants.SORT_FAVORITES_ON_TOP_KEY, false)\n .putInt(Constants.SORT_DIRECTION_KEY, Constants.SORT_DIRECTION_DESC)\n .commit();\n\n // Click first position in RecyclerView\n onView(withId(R.id.fragment_notelist_recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n // Check that clicked Note matches Note (1) title/text\n onView(withId(R.id.fragment_note_title_edittext))\n .check(matches(withText(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_1_TITLE))));\n onView(withId(R.id.fragment_note_text_edittext))\n .check(matches(withText(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_1_TEXT))));\n }",
"protected ComparisonResult compareBodies(byte []expectedBody, ContentType expectedContentType, byte []receivedBody, ContentType receivedContentType)\n {\n if (Arrays.equals(normalize(expectedBody),normalize(receivedBody)))\n {\n return ComparisonResult.MATCHES;\n }\n else\n {\n String diffMessage = createDiffMessage(normalize(expectedBody),expectedContentType,normalize(receivedBody),receivedContentType);\n return new ComparisonResult(false,diffMessage);\n }\n }",
"@Override\n\tpublic boolean isCallbackOrderingPostreq(org.projectfloodlight.openflow.protocol.OFType type, String name) {\n\t\treturn false;\n\t}",
"@Test\n\tpublic void shouldReturnAllPagedDocumentsSortedByDefaultSort()\n\t{\n\t\tfinal SearchPageData<B2BDocumentModel> result = pagedB2BDocumentDao.getAllPagedDocuments(\n\t\t\t\tcreatePageableData(0, 15, StringUtils.EMPTY), Collections.singletonList(AccountSummaryAddonUtils\n\t\t\t\t\t\t.createFilterByCriteriaObject(StringUtils.EMPTY, StringUtils.EMPTY)));\n\n\t\tTestCase.assertEquals(14, result.getResults().size());\n\t}",
"public Set<HttpMethod> getAllow()\r\n/* 137: */ {\r\n/* 138:209 */ String value = getFirst(\"Allow\");\r\n/* 139:210 */ if (value != null)\r\n/* 140: */ {\r\n/* 141:211 */ List<HttpMethod> allowedMethod = new ArrayList(5);\r\n/* 142:212 */ String[] tokens = value.split(\",\\\\s*\");\r\n/* 143:213 */ for (String token : tokens) {\r\n/* 144:214 */ allowedMethod.add(HttpMethod.valueOf(token));\r\n/* 145: */ }\r\n/* 146:216 */ return (Set)EnumSet.copyOf(allowedMethod);\r\n/* 147: */ }\r\n/* 148:219 */ return (Set)EnumSet.noneOf(HttpMethod.class);\r\n/* 149: */ }",
"@Test\n public void parseBirthday_returnsSortCommand() {\n assertParseSuccess(PARAM_BIRTHDAY);\n }",
"@Test\n public void readMultipleSetsOfResponseHeaders() throws Exception {\n peer.sendFrame().settings(new Settings());\n peer.acceptFrame();// ACK\n\n peer.acceptFrame();// SYN_STREAM\n\n peer.sendFrame().headers(false, 3, TestUtil.headerEntries(\"a\", \"android\"));\n peer.acceptFrame();// PING\n\n peer.sendFrame().headers(true, 3, TestUtil.headerEntries(\"c\", \"cola\"));\n peer.sendFrame().ping(true, 1, 0);// PONG\n\n peer.play();\n // play it back\n Http2Connection connection = connect(peer);\n Http2Stream stream = connection.newStream(TestUtil.headerEntries(\"b\", \"banana\"), true);\n stream.getConnection().flush();\n Assert.assertEquals(Headers.of(\"a\", \"android\"), stream.takeHeaders());\n connection.writePingAndAwaitPong();\n Assert.assertEquals(Headers.of(\"c\", \"cola\"), stream.trailers());\n // verify the peer received what was expected\n Assert.assertEquals(TYPE_HEADERS, peer.takeFrame().type);\n Assert.assertEquals(TYPE_PING, peer.takeFrame().type);\n }",
"@Test\r\n\tvoid testYearSort() {\r\n\t\tSortedList list = new SortedList(\"List\");\r\n\t\tToDoItem newItem1 = new ToDoItem(\"Item 1\", \"2/6/20\", 1, \"Body text 1\");\r\n\t\tToDoItem newItem2 = new ToDoItem(\"Item 2\", \"2/6/21\", 1, \"Body text 2\");\r\n\t\tToDoItem newItem3 = new ToDoItem(\"Item 3\", \"1/26/21\", 1, \"Body text 3\");\r\n\t\tlist.insert(newItem1);\r\n\t\tlist.insert(newItem2);\r\n\t\tlist.insert(newItem3);\r\n\r\n\t\tif (!list.getHead().getName().equals(\"Item 1\")) {\r\n\t\t\tfail(\"Year\");\r\n\t\t}\r\n\t\tif (!list.getHead().getNext().getName().equals(\"Item 3\")) {\r\n\t\t\tfail(\"Year\");\r\n\t\t}\r\n\t\tif (!list.getTail().getName().equals(\"Item 2\")) {\r\n\t\t\tfail(\"Year\");\r\n\t\t}\r\n\t}",
"@Test(timeout = TIMEOUT)\n public void testPublicMethods() {\n Class sortingClass = Sorting.class;\n Method[] methods = sortingClass.getMethods();\n String[] methodStrings = new String[methods.length];\n for (int i = 0; i < methods.length; i++) {\n methodStrings[i] = methods[i].toString();\n }\n String[] validMethodStrings = {\n \"public static void Sorting.insertionSort(java.lang.Object[],java.util.Comparator)\",\n \"public static void Sorting.cocktailSort(java.lang.Object[],java.util.Comparator)\",\n \"public static void Sorting.lsdRadixSort(int[])\",\n \"public static void Sorting.quickSort(java.lang.Object[],java.util.Comparator,java.util.Random)\",\n \"public static void Sorting.mergeSort(java.lang.Object[],java.util.Comparator)\",\n \"public final native void java.lang.Object.wait(long) throws java.lang.InterruptedException\",\n \"public final void java.lang.Object.wait(long,int) throws java.lang.InterruptedException\",\n \"public final void java.lang.Object.wait() throws java.lang.InterruptedException\",\n \"public boolean java.lang.Object.equals(java.lang.Object)\",\n \"public java.lang.String java.lang.Object.toString()\",\n \"public native int java.lang.Object.hashCode()\",\n \"public final native java.lang.Class java.lang.Object.getClass()\",\n \"public final native void java.lang.Object.notify()\",\n \"public final native void java.lang.Object.notifyAll()\"\n };\n Arrays.sort(methodStrings);\n Arrays.sort(validMethodStrings);\n assertArrayEquals(methodStrings, validMethodStrings);\n }",
"@Test\r\n public void test_getContentType_Accuracy() {\r\n assertEquals(\"incorrect default value\", null, instance.getContentType());\r\n instance.setContentType(\"a\");\r\n assertEquals(\"incorrect value after setting\", \"a\", instance.getContentType());\r\n }",
"@Test\n public void testEmptyResponseHeaderValidity() {\n assertFalse(\"Valid header on empty response.\", EMPTY.isHeaderValid());\n }",
"@Test\n public void testHttp200AuthorRequest() {\n final NioEventLoopGroup bootGroup = new NioEventLoopGroup(1);\n final NioEventLoopGroup processGroup = new NioEventLoopGroup();\n final String json = \"{\\\"action\\\":\\\"ping\\\"}\";\n final ByteBuf content = Unpooled.copiedBuffer(json, StandardCharsets.UTF_8);\n\n final ChannelFuture serverChannel = runServer(bootGroup, processGroup);\n runClient(HttpMethod.POST, content, \"/author\");\n\n serverChannel.awaitUninterruptibly();\n bootGroup.shutdownGracefully();\n processGroup.shutdownGracefully();\n\n final String expected = \"{\\\"action\\\":\\\"author\\\",\\\"content\\\":\\\"Dmitriy Shishmakov, https://github.com/DmitriySh\\\",\\\"status\\\":\\\"200 OK\\\"}\";\n final String actual = buffer.toString();\n logger.info(\"Expected result: {}\", expected);\n logger.info(\"Actual result: {}\", actual);\n Assert.assertEquals(\"Haven't received info about author\", expected, actual);\n }",
"@Test\n public void parseNumber_returnsSortCommand() {\n assertParseSuccess(PARAM_NUMBER);\n }",
"Results sortResults(FilterSpecifier.ListBy listBy, SortSpecifier sortspec) throws SearchServiceException;",
"protected boolean isHeadRequest(ActionInvocation actionInvocation) {\n return actionInvocation.method != null && HTTPMethod.HEAD.is(actionInvocation.method.httpMethod);\n }",
"@Test\n public void testOptions() throws Exception {\n\n HttpURLConnection result = HttpUtil.options(\"http://localhost:9090/ehcache/rest/doesnotexist/1\");\n assertEquals(200, result.getResponseCode());\n assertEquals(\"application/vnd.sun.wadl+xml\", result.getContentType());\n\n String responseBody = HttpUtil.inputStreamToText(result.getInputStream());\n assertNotNull(responseBody);\n assertTrue(responseBody.matches(\"(.*)GET(.*)\"));\n assertTrue(responseBody.matches(\"(.*)PUT(.*)\"));\n assertTrue(responseBody.matches(\"(.*)DELETE(.*)\"));\n assertTrue(responseBody.matches(\"(.*)HEAD(.*)\"));\n }",
"public HttpMethod getMethod()\r\n/* 44: */ {\r\n/* 45: 78 */ return HttpMethod.valueOf(this.servletRequest.getMethod());\r\n/* 46: */ }",
"@Test(groups = { TestGroup.REST_API, TestGroup.SANITY, TestGroup.CORE})\n\tpublic void assertCORSisEnabledAndWorking()\n\t{\n\t\tString validOriginUrl = \"http://localhost:4200\";\n\t\tString invalidOriginUrl1 = \"http://localhost:4201\";\n\t\tString invalidOriginUrl2 = \"http://example.com\";\n\t\tRestAssured.basePath = \"alfresco/api/-default-/public/authentication/versions/1\";\n\t\trestClient.configureRequestSpec().setBasePath(RestAssured.basePath);\n\n\t\tRestRequest request = RestRequest.simpleRequest(HttpMethod.OPTIONS, \"tickets\");\n\n\t\t// Don't specify header Access-Control-Request-Method\n\t\trestClient.configureRequestSpec().addHeader(\"Origin\", validOriginUrl);\n\t\trestClient.process(request);\n\t\trestClient.assertStatusCodeIs(HttpStatus.UNAUTHORIZED);\n\n\t\t// request not allowed method\n\t\trestClient.configureRequestSpec().addHeader(\"Access-Control-Request-Method\", \"PATCH\");\n\t\trestClient.configureRequestSpec().addHeader(\"Origin\", validOriginUrl);\n\t\trestClient.process(request);\n\t\trestClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);\n\n\t\t// request invalid method\n\t\trestClient.configureRequestSpec().addHeader(\"Access-Control-Request-Method\", \"invalid\");\n\t\trestClient.configureRequestSpec().addHeader(\"Origin\", validOriginUrl);\n\t\trestClient.process(request);\n\t\trestClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);\n\n\t\t// use invalidOriginUrl1 as origin\n\t\trestClient.configureRequestSpec().addHeader(\"Access-Control-Request-Method\", \"POST\");\n\t\trestClient.configureRequestSpec().addHeader(\"Origin\", invalidOriginUrl1);\n\t\trestClient.process(request);\n\t\trestClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);\n\n\t\t// use invalidOriginUrl2 as origin\n\t\trestClient.configureRequestSpec().addHeader(\"Origin\", invalidOriginUrl2);\n\t\trestClient.process(request);\n\t\trestClient.assertStatusCodeIs(HttpStatus.FORBIDDEN);\n\n\t\t// use validOriginUrl\n\t\trestClient.configureRequestSpec().addHeader(\"Access-Control-Request-Method\", \"POST\");\n\t\trestClient.configureRequestSpec().addHeader(\"Origin\", validOriginUrl);\n\t\trestClient.process(request);\n\n\t\trestClient.assertStatusCodeIs(HttpStatus.OK);\n\t\trestClient.assertHeaderValueContains(\"Access-Control-Allow-Origin\", validOriginUrl);\n\t\trestClient.assertHeaderValueContains(\"Access-Control-Allow-Credentials\", \"true\");\n\t\trestClient.assertHeaderValueContains(\"Access-Control-Max-Age\", \"10\");\n\t\trestClient.assertHeaderValueContains(\"Access-Control-Allow-Methods\", \"POST\");\n\t}"
]
| [
"0.7056274",
"0.696163",
"0.618279",
"0.61484075",
"0.59153664",
"0.55932766",
"0.5485424",
"0.54789776",
"0.54012793",
"0.53729206",
"0.5313751",
"0.530539",
"0.5294373",
"0.52926373",
"0.52665174",
"0.5243798",
"0.5155168",
"0.5146277",
"0.51452374",
"0.5137532",
"0.5063839",
"0.5048544",
"0.50400573",
"0.50128436",
"0.50124913",
"0.5011012",
"0.49927464",
"0.4981419",
"0.4981419",
"0.4972816",
"0.49628478",
"0.495966",
"0.49449375",
"0.49278733",
"0.49266905",
"0.49265662",
"0.49257725",
"0.4884702",
"0.48821974",
"0.48809302",
"0.486058",
"0.48416522",
"0.48245636",
"0.4818411",
"0.48134175",
"0.48065895",
"0.48064107",
"0.4802889",
"0.48023757",
"0.47885945",
"0.47795966",
"0.47789204",
"0.47774538",
"0.47728923",
"0.4771732",
"0.47684994",
"0.4731108",
"0.47127095",
"0.4706677",
"0.4702943",
"0.47019446",
"0.47019446",
"0.4687854",
"0.46803245",
"0.4679279",
"0.4676924",
"0.4669686",
"0.4669686",
"0.4669686",
"0.4669686",
"0.46633965",
"0.4660001",
"0.4644017",
"0.46412504",
"0.463274",
"0.4624532",
"0.46217152",
"0.46122527",
"0.4596867",
"0.45861414",
"0.4585107",
"0.4585076",
"0.45807683",
"0.45796213",
"0.45787546",
"0.4577087",
"0.45647126",
"0.4560799",
"0.45590636",
"0.45479053",
"0.45471385",
"0.45469245",
"0.45465323",
"0.45445925",
"0.4543229",
"0.4540785",
"0.45362025",
"0.4535959",
"0.45260894",
"0.45233068"
]
| 0.6156388 | 3 |
Test to ensure that path sorting will give the longer path a greater priority | @Test
public void testPathPriorityByLength() {
this.requestDefinitions.get(0).setPathParts(new PathDefinition[1]);
this.requestDefinitions.get(1).setPathParts(new PathDefinition[3]);
this.requestDefinitions.get(2).setPathParts(new PathDefinition[2]);
final List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),
this.requestDefinitions.get(2), this.requestDefinitions.get(0));
Collections.sort(this.requestDefinitions, this.comparator);
Assert.assertEquals(expected, this.requestDefinitions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@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\tpublic int compareTo(Node node) {\n\t\treturn minPath - node.minPath;\n\t}",
"public static void sortByPopular(){\n SORT_ORDER = POPULAR_PATH;\n }",
"protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}",
"public int compareTo(LexemePath o) {\n //比较有效文本长度\n if(this.payloadLength > o.payloadLength){\n return -1;\n }else if(this.payloadLength < o.payloadLength){\n return 1;\n }else{\n //比较词元个数,越少越好\n if(this.size() < o.size()){\n return -1;\n }else if (this.size() > o.size()){\n return 1;\n }else{\n //路径跨度越大越好\n if(this.getPathLength() > o.getPathLength()){\n return -1;\n }else if(this.getPathLength() < o.getPathLength()){\n return 1;\n }else {\n //根据统计学结论,逆向切分概率高于正向切分,因此位置越靠后的优先\n if(this.pathEnd > o.pathEnd){\n return -1;\n }else if(pathEnd < o.pathEnd){\n return 1;\n }else{\n //词长越平均越好\n if(this.getXWeight() > o.getXWeight()){\n return -1;\n }else if(this.getXWeight() < o.getXWeight()){\n return 1;\n }else {\n //词元位置权重比较\n if(this.getPWeight() > o.getPWeight()){\n return -1;\n }else if(this.getPWeight() < o.getPWeight()){\n return 1;\n }\n \n }\n }\n }\n }\n }\n return 0;\n }",
"@Override\r\n @Test\r\n @ConditionalIgnore(condition = IgnoreTreeAnchor.class)\r\n public void testAlsoSelectPreviousAscending() {\r\n super.testAlsoSelectPreviousAscending();\r\n }",
"public void setUsePathForClickSort(boolean usePath) {\r\n\t\tif (usePath) \r\n\t\t\t_sortPathDir=TreeBuffer.SORT_ASC;\t\r\n\t\telse\r\n\t\t\t_sortPathDir=TreeBuffer.SORT_ANY;\t\t\r\n\t}",
"@Override\n public int compareTo(@NotNull SourceFile that) {\n if (this.absolutePath == null || that.absolutePath == null) {\n return ComparisonChain.start().compare(this.path, that.path).result();\n } else {\n return ComparisonChain.start().compare(this.absolutePath, that.absolutePath).result();\n }\n }",
"public void testCompareViaSort() throws Exception {\n\n String correctlySortedNames[] = {\n \"0000_aaa\",\n \"0000_bbb\",\n \"1111DC_U_022107_L99_Sum.lsm\",\n \"6325DC_U_022107_L0_Sum.lsm\",\n \"6325DC_U_022107_L1_Sum.lsm\",\n \"6325DC_U_022107_L2_Sum.lsm\",\n \"6325DC_U_022107_L8_Sum.lsm\",\n \"6325DC_U_022107_L9_Sum.lsm\",\n \"6325DC_U_022107_L10_Sum.lsm\",\n \"6325DC_U_022107_L11_Sum.lsm\",\n \"6325DC_U_022107_L20_Sul.lsm\",\n \"6325DC_U_022107_L20_Sum.lsm\",\n \"6325DC_U_022107_L20_Sun.lsm\",\n \"6325DC_U_022107_L21_Sum.lsm\",\n \"6325DC_U_022107_L22_Sum.lsm\",\n \"6325DC_U_022107_L99_Sum.lsm\",\n \"6325DC_U_022107_L111_Sum.lsm\",\n \"6325DC_U_022107_L222_Sum.lsm\",\n \"7777DC_U_022107_L22_Sum.lsm\",\n \"9999_aaa\",\n \"9999_bbb\" \n };\n\n FileTarget[] targets = new FileTarget[correctlySortedNames.length];\n\n int index = 0;\n for (String name : correctlySortedNames) {\n int reverseOrder = targets.length - 1 - index;\n File file = new File(name);\n targets[reverseOrder] = new FileTarget(file);\n index++;\n }\n\n Arrays.sort(targets, new LNumberComparator());\n\n index = 0;\n for (FileTarget target : targets) {\n assertEquals(\"name \" + index + \" of \" + targets.length +\n \" was not sorted correctly\",\n correctlySortedNames[index], target.getName());\n index++;\n }\n }",
"@Test (priority = 1)\n public void sortAlphabetical(){\n\n for (int i = 0; i < allDepartments.getOptions().size()-1; i++) {\n String current = allDepartments.getOptions().get(i).getText();\n String next = allDepartments.getOptions().get(i+1).getText();\n\n System.out.println(\"comparing: \" + current + \" with \"+ next);\n\n Assert.assertTrue(current.compareTo(next)<=0);\n\n }\n }",
"@Test\r\n public void testVeryShortPath() {\r\n int[][] path =\r\n {{1, 0},\r\n {0, 0}};\r\n assertEquals(1, RecursiveMethods.maxPathLength(path));\r\n }",
"@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }",
"@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }",
"@Test\n public void priorityTest() {\n // TODO: test priority\n }",
"public int compareTo(AppFile aAF)\n{\n if(_priority!=aAF._priority) return _priority>aAF._priority? -1 : 1;\n return _file.compareTo(aAF._file);\n}",
"public int compareTo(\n Path that\n ) {\n final Path left;\n final Path right;\n final int toCompare;\n if(this.size == that.size) {\n toCompare = this.size;\n left = this;\n right = that;\n } else if (this.size > that.size) {\n toCompare = that.size;\n left = this.getPrefix(toCompare);\n right = that;\n } else { // this.size < that.size\n toCompare = this.size;\n left = this;\n right = that.getPrefix(toCompare);\n }\n if(toCompare > 1) {\n int value = left.parent.compareTo(right.parent);\n if(value != 0) return value;\n } \n if(toCompare > 0) {\n int value = left.base.compareTo(right.base);\n if(value != 0) return value;\n }\n return this.size - that.size;\n }",
"@Test\r\n public void testVeryVeryShortPath() {\r\n int[][] path =\r\n {{1}};\r\n assertEquals(1, RecursiveMethods.maxPathLength(path));\r\n }",
"@Test\n\tpublic void testPathPriorityByWildCard() {\n\n\t\tthis.requestDefinitions.get(0).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(0).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(0).getPathParts()[0].setValue(\"a\");\n\t\tthis.requestDefinitions.get(0).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(0).getPathParts()[1].setValue(null);\n\n\t\tthis.requestDefinitions.get(1).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(1).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(1).getPathParts()[0].setValue(\"a\");\n\t\tthis.requestDefinitions.get(1).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(1).getPathParts()[1].setValue(\"a\");\n\n\t\tthis.requestDefinitions.get(2).setPathParts(new PathDefinition[2]);\n\t\tthis.requestDefinitions.get(2).getPathParts()[0] = new PathDefinition();\n\t\tthis.requestDefinitions.get(2).getPathParts()[0].setValue(null);\n\t\tthis.requestDefinitions.get(2).getPathParts()[1] = new PathDefinition();\n\t\tthis.requestDefinitions.get(2).getPathParts()[1].setValue(\"a\");\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"public static IPath getComparablePath(IPath path) {\r\n\t\tif (path == null)\r\n\t\t\treturn null;\r\n\t\t\r\n\t\tif (HostOS.IS_WIN32) {\r\n\t\t\treturn new Path(path.toOSString().toLowerCase());\r\n\t\t}\r\n\t\t\r\n\t\treturn path;\r\n\t}",
"public void sortPaths(List<String> paths){\n //System.out.println(\"Received LIST: \"+Arrays.toString(paths.toArray()));\n Collections.sort(paths, new Comparator<String>() {\n\n @Override\n public int compare(String o1, String o2) {\n int s1 = Integer.valueOf(o1.substring(1));\n int s2 = Integer.valueOf(o2.substring(1));\n return s2-s1;\n }\n\n });\n //System.out.println(\"AFTER SORTING LIST: \"+Arrays.toString(paths.toArray()));\n }",
"public void testSortedList() {\r\n List<InfoNode> sortedList = MapUtils.sortByDistance(exampleList, node3.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node1);\r\n assertTrue(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertFalse(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, node1.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node3);\r\n assertFalse(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertTrue(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, \" \");\r\n assertTrue(sortedList.equals(exampleList));\r\n }",
"@Test\n public void testCompareLess() {\n System.out.println(\"compare\");\n FileNameComparator instance = new FileNameComparator();\n int expResult = -1;\n int result = instance.compare(testFileA, testFileB);\n Assert.assertEquals(expResult, result);\n }",
"@Override\n public int compare(TuplePathCost tpc1, TuplePathCost tpc2) {\n if (tpc1.getCost().compareTo(tpc2.getCost()) < 0) return -1;\n // else if (tpc1.getCost() < tpc2.getCost()) return - 1;\n else if (tpc1.getCost().compareTo(tpc2.getCost()) > 0) return 1;\n else return 0;\n }",
"Comparator<String> getPatternComparator(String path);",
"@Override\n public int compareTo(JBurgPatternMatcher other)\n {\n Vector<PathElement> this_path = this.generateAccessPath();\n Vector<PathElement> other_path = other.generateAccessPath();\n \n int result = this_path.size() - other_path.size();\n \n for ( int i = 0; i < this_path.size() && result == 0; i++ )\n result = this_path.elementAt(i).compareTo(other_path.elementAt(i));\n\n return result;\n }",
"private void performUnloadPathRecheck() {\r\n\t\trecheckUnloadPath = false;\r\n\t\tTile oldTile = gameMap.get(myRC.getLocation());\r\n\t\tTile actTile;\r\n\t\t\r\n\t\t/* cut where path is not accessible */\r\n\t\tfor (MapLocation loc : path) {\r\n\t\t\tactTile = gameMap.get(loc);\r\n\t\t\tif (actTile.totalHeight - oldTile.totalHeight > WORKER_MAX_HEIGHT_DELTA) {\r\n\t\t\t\tpath = path.subList(0, path.indexOf(loc));\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\toldTile = actTile;\r\n\t\t}\r\n\t\t\r\n\t\t/* cut where we can unload */\r\n\t\tpath.add(0, myRC.getLocation());\r\n\t\tif (path.size() >= 2)\r\n\t\t\tif (gameMap.get(path.get(path.size() - 1)).totalHeight - \r\n\t\t\t\tgameMap.get(path.get(path.size() - 2)).totalHeight >= WORKER_MAX_HEIGHT_DELTA) {\r\n\t\t\t\t/* we can't unload at the end of the path. get to the end and drop it */\r\n\t\t\t\tpath.add(path.get(path.size() - 2));\r\n\t\t\t}\r\n\t\tpath.remove(0);\r\n//\t\tpath.add(0, myRC.getLocation());\r\n//\t\tint size = path.size();\r\n//\t\toldTile = gameMap.get(path.get(size - 1));\r\n//\t\twhile(size >= 2){\r\n//\t\t\tactTile = gameMap.get(path.get(size - 2));\r\n//\t\t\tif (gameMap.get(path.get(path.size() - 1)).totalHeight - gameMap.get(path.get(path.size() - 2)).totalHeight >= WORKER_MAX_HEIGHT_DELTA) {\r\n//\t\t\t\tpath.remove(size - 1);\r\n//\t\t\t\tsize--;\r\n//\t\t\t} else\r\n//\t\t\t\tbreak;\r\n//\t\t\toldTile = actTile;\r\n//\t\t}\r\n//\t\tpath.remove(0);\r\n\t}",
"public void sort () {\n\t\t\n\t\t// Clear iterator\n\t\titer = null;\n\t\t\n\t\tCollections.sort(this.pathObjects, new Comparator<PathObject>() {\n\t\t @Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t // -1 - less than, 1 - greater than, 0 - equal, all inversed for descending\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }\n\t\t});\n\t\t\n\t\titer = this.pathObjects.iterator();\n\t}",
"@Override\n public int compare(File o1, File o2) {\n if (desc) {\n return -o1.getFileName().compareTo(o2.getFileName());\n }\n return o1.getFileName().compareTo(o2.getFileName());\n }",
"@Test\n\tpublic void reorderIfOldestIsFirst() throws IOException {\n\t\tZonedDateTime now = ZonedDateTime.now();\n\n\t\tFile firstFile = File.createTempFile(\"junit\", null);\n\t\tFile secondFile = File.createTempFile(\"junit\", null);\n\t\tfirstFile.setLastModified(now.minus(1, ChronoUnit.DAYS).toEpochSecond());\n\t\tsecondFile.setLastModified(now.toEpochSecond());\n\n\t\tFileTuple firstTuple = new FileTuple(firstFile, firstFile);\n\t\tFileTuple secondTuple = new FileTuple(secondFile, secondFile);\n\n\t\tassertThat(COMPARATOR.compare(firstTuple, secondTuple)).isPositive();\n\t}",
"@Test\n public void testCompareGreater() {\n System.out.println(\"compare\");\n FileNameComparator instance = new FileNameComparator();\n int expResult = 1;\n int result = instance.compare(testFileB, testFileA);\n Assert.assertEquals(expResult, result);\n }",
"public int compareTo(Object arg) {\n\t\tFileSystem temp = (FileSystem) arg;\n\t\treturn(_mount.compareTo(temp.getMountPoint()));\n\t}",
"@Test\r\n void test_check_order_properly_increased_and_decreased() {\r\n graph.addVertex(\"A\");\r\n graph.addVertex(\"C\");\r\n graph.addVertex(\"D\");\r\n graph.addVertex(\"C\");\r\n if(graph.order() != 3) {\r\n fail();\r\n } \r\n graph.removeVertex(\"A\");\r\n graph.removeVertex(\"B\");\r\n graph.removeVertex(\"C\");\r\n if(graph.order() != 1) {\r\n fail();\r\n }\r\n \r\n }",
"@Test\n public void testCompareToLess() {\n assertTrue(o1.compareTo(o_test) < 0);\n }",
"@Test\n\tpublic void checkShortestRoute() {\n\t\tassertEquals(Trains.shortestRoute(\"A\",\"C\"), 9);\n\t\t//assertEquals(Trains.shortestRoute(\"B\",\"B\"), 9);\n\t}",
"@Test\r\n @Override\r\n @ConditionalIgnore(condition = IgnoreTreeDeferredIssue.class)\r\n public void testSortedAddDiscontinous() {\r\n super.testSortedAddDiscontinous();\r\n }",
"@Override\n protected Comparator<? super UsagesInFile> getRefactoringIterationComparator() {\n return new Comparator<UsagesInFile>() {\n @Override\n public int compare(UsagesInFile o1, UsagesInFile o2) {\n int result = comparePaths(o1.getFile(), o2.getFile());\n if (result != 0) {\n return result;\n }\n int imports1 = countImports(o1.getUsages());\n int imports2 = countImports(o2.getUsages());\n return imports1 > imports2 ? -1 : imports1 == imports2 ? 0 : 1;\n }\n\n private int comparePaths(PsiFile o1, PsiFile o2) {\n String path1 = o1.getVirtualFile().getCanonicalPath();\n String path2 = o2.getVirtualFile().getCanonicalPath();\n return path1 == null && path2 == null ? 0 : path1 == null ? -1 : path2 == null ? 1 : path1.compareTo(path2);\n }\n\n private int countImports(Collection<UsageInfo> usages) {\n int result = 0;\n for (UsageInfo usage : usages) {\n if (FlexMigrationUtil.isImport(usage)) {\n ++result;\n }\n }\n return result;\n }\n };\n }",
"@Test\n\tpublic void testLongPath() {\n\t\tPosition start = new Position(0,0);\n\t\tPosition end = new Position(20,10);\n\n\t\t// The distance should equal integer value of (20^2 + 10^2)*weight\n\t\tint distance = euclideanSquaredMetric.calculateCost(start, end);\n\t\tassertEquals(500*lateralDistanceWeight, distance);\n\t}",
"public boolean isPathAbsorbing(Path<T> path) {\n try { return cost(path) < 0.0; }\n catch(LinkNotFoundException | NodeNotFoundException e) { return true; }\n }",
"@Override\n\tpublic int compareTo(File pathname) {\n\t\treturn this.index - new IndexedFile(pathname.getAbsolutePath()).index;\n\t}",
"public int compare(String a, String b) {\n if (base.get(a) >= base.get(b)) {\n return -1;\n } else {\n return 1;\n } // returning 0 would merge keys\n }",
"protected static void sortPathsLeadingToNode(GraphNode node) {\r\n\t\tnode.pathsToThisNode.sort(new Comparator<WeightedPath<GraphNode, WeightedEdge>>() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic int compare(WeightedPath<GraphNode, WeightedEdge> o1, WeightedPath<GraphNode, WeightedEdge> o2) {\r\n\t\t\t\treturn ((Double) o1.getTotalWeight()).compareTo(o2.getTotalWeight());\r\n\t\t\t}\r\n\t\t});\r\n\t}",
"private void checkSorting()\n {\n long parentChangeCounter = this.parent.getChangeCount();\n if (this.sortedRecords == null || this.changeCounter != parentChangeCounter)\n {\n long start = System.currentTimeMillis();\n \n // perform sort\n this.sortedRecords = this.parent.cloneRecordList();\n Collections.sort(this.sortedRecords, this);\n \n // recalculate selected index\n recalculateSelectedIndex();\n\n this.changeCounter = parentChangeCounter;\n \n if (logger.isDebugEnabled())\n logger.debug(this.recordCount()+\" records sorted in \"+(System.currentTimeMillis()-start)+ \"ms (selectedIndex=\"+getSelectedRecordIndex()+\")\");\n }\n }",
"@Test\n\tpublic void testAscendingComparator() {\n\t\tList<MockWorker> mockWorkers = createMockWorkers(10);\n\t\tsetAscendingParallelWorkCapacity(mockWorkers);\n\t\tCollections.reverse(mockWorkers);\n\t\tList<WorkerLoadSnapshot> snapshots = createSnapshots(mockWorkers);\n\t\tRandom rng = new Random(-1L);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t\tList<MockWorker> unorderedList = new ArrayList<>(mockWorkers);\n\t\tCollections.shuffle(snapshots);\n\t\tsetAscendingParallelWorkCapacity(unorderedList);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t}",
"public int compare(String a, String b) {\n\t if (base.get(a) >= base.get(b)) {\n\t return -1;\n\t } else {\n\t return 1;\n\t } // returning 0 would merge keys\n\t }",
"public boolean isPriority()\r\n/* 49: */ {\r\n/* 50:47 */ return false;\r\n/* 51: */ }",
"@Override\r\n\tpublic int compareTo(FileBean bean) {\r\n\t\tif(this.getLocation().compareTo(bean.getLocation()) > 0){\r\n\t\t\treturn 1;\r\n\t\t}else if(this.getLocation().compareTo(bean.getLocation()) < 0){\r\n\t\t\treturn -1;\r\n\t\t} else{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}",
"private void findPath2(List<Coordinate> path) {\n List<Integer> cost = new ArrayList<>(); // store the total cost of each path\n // store all possible sequences of way points\n ArrayList<List<Coordinate>> allSorts = new ArrayList<>();\n int[] index = new int[waypointCells.size()];\n for (int i = 0; i < index.length; i++) {// generate the index reference list\n index[i] = i;\n }\n permutation(index, 0, index.length - 1);\n for (Coordinate o1 : originCells) {\n for (Coordinate d1 : destCells) {\n for (int[] ints1 : allOrderSorts) {\n List<Coordinate> temp = getOneSort(ints1, waypointCells);\n temp.add(0, o1);\n temp.add(d1);\n int tempCost = 0;\n for (int i = 0; i < temp.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = temp.get(i);\n graph.dijkstra(start);\n Coordinate end = temp.get(i + 1);\n graph.printPath(end);\n tempCost = tempCost + graph.getPathCost(end);\n if (graph.getPathCost(end) == Integer.MAX_VALUE) {\n tempCost = Integer.MAX_VALUE;\n break;\n }\n }\n cost.add(tempCost);\n allSorts.add(temp);\n }\n }\n }\n System.out.println(\"All sorts now have <\" + allSorts.size() + \"> items.\");\n List<Coordinate> best = allSorts.get(getMinIndex(cost));\n generatePath(best, path);\n setSuccess(path);\n }",
"public void testUptoSegment() {\n \tIPath anyPath = new Path(\"/first/second/third\");\r\n \r\n \tassertEquals(\"1.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"1.1\", new Path(\"/first\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"1.2\", new Path(\"/first/second\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"1.3\", new Path(\"/first/second/third\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"1.4\", new Path(\"/first/second/third\"), anyPath.uptoSegment(4));\r\n \r\n \t//Case 2, absolute path with trailing separator\r\n \tanyPath = new Path(\"/first/second/third/\");\r\n \r\n \tassertEquals(\"2.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"2.1\", new Path(\"/first/\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"2.2\", new Path(\"/first/second/\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"2.3\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"2.4\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(4));\r\n }",
"public static int compare(Path.Command a, Path.Command b) {\n if (a == null) {\n return (b == null) ? 0 : -1;\n } else if (b == null) {\n return 1;\n }\n\n for (int i = 0; i < a.getIndicesCount(); i++) {\n if (i >= b.getIndicesCount()) {\n return 1;\n }\n int r = Long.compare(a.getIndices(i), b.getIndices(i));\n if (r != 0) {\n return r;\n }\n }\n return (a.getIndicesCount() == b.getIndicesCount()) ? 0 : -1;\n }",
"@Test\n public void testRelativize_bothAbsolute() {\n assertRelativizedPathEquals(\"b/c\", pathService.parsePath(\"/a\"), \"/a/b/c\");\n assertRelativizedPathEquals(\"c/d\", pathService.parsePath(\"/a/b\"), \"/a/b/c/d\");\n }",
"public int compare(Entry o1, Entry o2) {\n\tString url1 = o1.getUrl();\n\tString url2 = o2.getUrl();\n\treturn StringUtil.compareToNullHigh(url1, url2);\n }",
"@Test\n\tpublic void compareToReturnsAPositiveNumberWhenUnitWithSmallerSymbolButLargerNameIsProvided() {\n\t\tDummyUnit unit = new DummyUnit(\"B\");\n\t\tunit.setName(\"a\");\n\t\tDummyUnit otherUnit = new DummyUnit(\"A\");\n\t\totherUnit.setName(\"b\");\n\t\tassertTrue(unit.compareTo(otherUnit) > 0);\n\t}",
"@Test(priority = 8)\n\tpublic void validateSortingByRating() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.selectSortingDropdown(2, locator);\n\t\theroImg.validateStarRating(3, locator, validate);\n\t\tHeroImageProductPageFlow.selectSortingDropdown(3, locator);\n\t\theroImg.validateStarRating(4, locator, validate);\n\t\tlog.info(\"sorting is correct\");\n\t}",
"@Override // java.util.Comparator\n public int compare(FinderPattern finderPattern, FinderPattern finderPattern2) {\n double estimatedModuleSize = (double) (finderPattern2.getEstimatedModuleSize() - finderPattern.getEstimatedModuleSize());\n if (estimatedModuleSize < 0.0d) {\n return -1;\n }\n return estimatedModuleSize > 0.0d ? 1 : 0;\n }",
"private void findBestPath(){\n\t\t// The method will try to find the best path for every starting point and will use the minimum\n\t\tfor(int start = 0; start < this.getDimension(); start++){\n\t\t\tfindBestPath(start);\t\n\t\t}\t\n\t}",
"@Override\n\tpublic int compareTo(AStarNode o) {\n\t\t\n\t\tint myExpectedTotalDistance = this.getDistanceSoFar() + this.expectedDistanceToGo;\n\t\tint theirExpectedTotalDistance = o.getDistanceSoFar() + o.expectedDistanceToGo;\n\t\t\n\t\tif(myExpectedTotalDistance < theirExpectedTotalDistance) {\n\t\t\treturn -1;\n\t\t}\n\t\telse if(myExpectedTotalDistance > theirExpectedTotalDistance) {\n\t\t\treturn 1;\n\t\t}\n\t\telse { // if tied, use just expected distance to go to resolve (greedy)\n\t\t\t\n\t\t\tif(this.expectedDistanceToGo < o.expectedDistanceToGo) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t\telse if(this.expectedDistanceToGo > o.expectedDistanceToGo) {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t\t\n\t\t\telse { // if STILL tied, just some conventions\n\t\t\t\t// always go UP over DOWN\n\t\t\t\tif(this.state.x < o.state.x) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse if(this.state.x > o.state.x) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if still tied, then LEFT over RIGHT\n\t\t\t\tif(this.state.y < o.state.y) {\n\t\t\t\t\treturn -1;\n\t\t\t\t}\n\t\t\t\telse if(this.state.y > o.state.y) {\n\t\t\t\t\treturn 1;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// if still tied, go with equal\n\t\t\t\treturn 0;\n\t\t\t}\n\t\t\t\n\t\t}\n\t}",
"void leastCostPaths() {\t\n\t\tfor( int k = 0; k < N; k++ )\n\t\t\tfor( int i = 0; i < N; i++ )\n\t\t\t\tif( defined[i][k] )\n\t\t\t\t\tfor( int j = 0; j < N; j++ )\n\t\t\t\t\t\tif( defined[k][j]\n\t\t\t\t\t\t\t\t&& (!defined[i][j] || c[i][j] > c[i][k]+c[k][j]) ) {\t\n\t\t\t\t\t\t\tpath[i][j] = path[i][k];\n\t\t\t\t\t\t\tc[i][j] = c[i][k]+c[k][j];\n\t\t\t\t\t\t\tdefined[i][j] = true;\n\t\t\t\t\t\t\tif( i == j && c[i][j] < 0 ) return; // stop on negative cycle\n\t\t\t\t\t\t}\n\t}",
"@Test\n public void f13OrderRULTest() {\n clickOn(\"#thumbnailTab\").moveBy(90, 200);\n scroll(50, VerticalDirection.UP).sleep(1000);\n\n scroll(50, VerticalDirection.DOWN).sleep(1000);\n clickOn(\"#sortAsset\").type(KeyCode.DOWN).type(KeyCode.ENTER);\n\n sleep(1000).moveBy(-90, 200).scroll(50, VerticalDirection.UP).sleep(1000);\n\n boolean isOrdered = true;\n double[] ruls = getRuls();\n\n //Check if the ascending ruls are ordered\n for (int i = 0; i < ruls.length - 1; i++) {\n if (ruls[i] > ruls[i + 1]) {\n isOrdered = false;\n break;\n }\n }\n\n sleep(1000).scroll(50, VerticalDirection.DOWN).sleep(1000);\n assertTrue(\"All RULs after sorting by ascending are ordered from smallest to largest.\", isOrdered);\n }",
"private boolean areCorrectlyOrdered( int i0, int i1 )\n {\n int n = commonLength( i0, i1 );\n \tif( text[i0+n] == STOP ){\n \t // The sortest string is first, this is as it should be.\n \t return true;\n \t}\n \tif( text[i1+n] == STOP ){\n \t // The sortest string is last, this is not good.\n \t return false;\n \t}\n \treturn (text[i0+n]<text[i1+n]);\n }",
"private void somethingIsWrongWithShellSort() {\n try {\n Sorting.shellsort(\n null, (new Zombie(null, 0, 0).getNameComparator()));\n fail(\"You didn't even throw the exception for the array.\");\n } catch (IllegalArgumentException e) {\n assertNotNull(\n \"Good job throwing the exception...but you need a message!\",\n e.getMessage());\n }\n try {\n Sorting.shellsort(horde, null);\n fail(\"You didn't even throw the exception for the comparator.\");\n } catch (IllegalArgumentException e) {\n assertNotNull(\n \"Good job throwing the exception...but you need a message!\",\n e.getMessage());\n }\n }",
"public int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}",
"public int secondaryOrderSort(Page p1, Page p2) {\n\t\t\t\treturn p1.getLocation().compareToIgnoreCase(p2.getLocation()) < 1 ? -1\n\t\t\t\t\t\t: p1.getLocation().compareToIgnoreCase(p2.getLocation()) > 1 ? 1 : 0;\n\t\t\t}",
"private boolean comparePathAttribute(String value, List<String> includePaths) {\n\t\treturn false;\r\n\t}",
"private int compareToHelper(T a, T b) {\n if (isMaxHeap) {\n // compareTo function should work as expected for a max-dHeap\n return a.compareTo(b);\n } else {\n // compareTo function should be return -1 if a > b, 1 if a < b and 0 if a == b for a\n // min-dHeap\n return -1 * a.compareTo(b);\n }\n }",
"private void externalSort() throws IOException{\n\t\t/*\n\t\t * Pass 0: internal sort\n\t\t */\n\t\t// Read in from child;Write out runs of B pages;\n\t\t\n\t\tint numPerRun = B * 4096 / (schema.size() * 4); // # of tuples per run given in Pass0\n\t\tboolean buildMore;\n\t\tint numRuns = 0;\n\t\tif(sortAttrsIndex == null) {\n\t\t\tthis.buildAttrsIndex();\n\t\t}\n\t\texComparator myComp = new exComparator();\n\t\tinternal = new PriorityQueue<Tuple>(myComp);\n\t\tdo {\n\t\t\tbuildMore = this.buildHeap(numPerRun);\n\t\t\tnumRuns++;\n\t\t\t\n\t\t\t// write out the (numRuns)th run\n\t\t\tTupleWriter TW;\n\t\t\tif(!buildMore && numRuns == 1) {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"sortResult\"));\n\t\t\t} else {\n\t\t\t\tTW = new TupleWriter(new FileOutputStream(tempsubdir + \"0_\" + numRuns));\n\t\t\t}\n\t\t\twhile(!internal.isEmpty()) {\n//\t\t\t\tSystem.out.println(internal.peek().data);\n\t\t\t\tTW.setNextTuple(internal.poll()); \n\t\t\t}\n\t\t\t// leftover, fill with zero and write out\n\t\t\tif(!TW.bufferEmpty()) { // TW would never know the end of writing\n\t\t\t\tTW.fillFlush(); \n\t\t\t}\n\t\t\tTW.close();\n\t\t\t// internal must be empty until this point\n\t\t}while (buildMore);\n\t\t\n\t\t/*\n\t\t * Pass 1 and any following\n\t\t */\n\t\tif(numRuns > 1) { // if numRuns generated in Pass 0 is 1 already, file sorted already, no need to merge\n\t\t\tthis.merge(numRuns, myComp);\n\t\t}\n\t\t\n\t}",
"public int compareTo(HGNode anotherItem) {\r\n \t\tSystem.out.println(\"HGNode, compare functiuon should never be called\");\r\n \t\tSystem.exit(1);\r\n \t\treturn 0;\r\n \t\t/*\r\n \t\tif (this.estTotalLogP > anotherItem.estTotalLogP) {\r\n \t\t\treturn -1;\r\n \t\t} else if (this.estTotalLogP == anotherItem.estTotalLogP) {\r\n \t\t\treturn 0;\r\n \t\t} else {\r\n \t\t\treturn 1;\r\n \t\t}*/\r\n \t\t\r\n \t}",
"@Test\r\n public void test8() {\r\n String s1 = \"Abc\";\r\n String s2 = \"abc\";\r\n String s3 = \"Abcd\";\r\n System.out.println(s1.compareTo(s2));\r\n System.out.println(s1.compareTo(s3));\r\n }",
"boolean isSortAscending();",
"private int purgeAscending(int lowIndex, int highIndex, RollingFileManager manager) {\n/* 266 */ int suffixLength = 0;\n/* */ \n/* 268 */ List<FileRenameAction> renames = new ArrayList<FileRenameAction>();\n/* 269 */ StringBuilder buf = new StringBuilder();\n/* 270 */ manager.getPatternProcessor().formatFileName(buf, Integer.valueOf(highIndex));\n/* */ \n/* 272 */ String highFilename = this.subst.replace(buf);\n/* */ \n/* 274 */ if (highFilename.endsWith(\".gz\")) {\n/* 275 */ suffixLength = 3;\n/* 276 */ } else if (highFilename.endsWith(\".zip\")) {\n/* 277 */ suffixLength = 4;\n/* */ } \n/* */ \n/* 280 */ int maxIndex = 0;\n/* */ int i;\n/* 282 */ for (i = highIndex; i >= lowIndex; i--) {\n/* 283 */ File toRename = new File(highFilename);\n/* 284 */ if (i == highIndex && toRename.exists()) {\n/* 285 */ maxIndex = highIndex;\n/* 286 */ } else if (maxIndex == 0 && toRename.exists()) {\n/* 287 */ maxIndex = i + 1;\n/* */ \n/* */ break;\n/* */ } \n/* 291 */ boolean isBase = false;\n/* */ \n/* 293 */ if (suffixLength > 0) {\n/* 294 */ File toRenameBase = new File(highFilename.substring(0, highFilename.length() - suffixLength));\n/* */ \n/* */ \n/* 297 */ if (toRename.exists()) {\n/* 298 */ if (toRenameBase.exists()) {\n/* 299 */ toRenameBase.delete();\n/* */ }\n/* */ } else {\n/* 302 */ toRename = toRenameBase;\n/* 303 */ isBase = true;\n/* */ } \n/* */ } \n/* */ \n/* 307 */ if (toRename.exists()) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* 312 */ if (i == lowIndex) {\n/* 313 */ if (!toRename.delete()) {\n/* 314 */ return -1;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ break;\n/* */ } \n/* */ \n/* */ \n/* 323 */ buf.setLength(0);\n/* 324 */ manager.getPatternProcessor().formatFileName(buf, Integer.valueOf(i - 1));\n/* */ \n/* 326 */ String lowFilename = this.subst.replace(buf);\n/* 327 */ String renameTo = lowFilename;\n/* */ \n/* 329 */ if (isBase) {\n/* 330 */ renameTo = lowFilename.substring(0, lowFilename.length() - suffixLength);\n/* */ }\n/* */ \n/* 333 */ renames.add(new FileRenameAction(toRename, new File(renameTo), true));\n/* 334 */ highFilename = lowFilename;\n/* */ } else {\n/* 336 */ buf.setLength(0);\n/* 337 */ manager.getPatternProcessor().formatFileName(buf, Integer.valueOf(i - 1));\n/* */ \n/* 339 */ highFilename = this.subst.replace(buf);\n/* */ } \n/* */ } \n/* 342 */ if (maxIndex == 0) {\n/* 343 */ maxIndex = lowIndex;\n/* */ }\n/* */ \n/* */ \n/* */ \n/* */ \n/* 349 */ for (i = renames.size() - 1; i >= 0; i--) {\n/* 350 */ Action action = (Action)renames.get(i);\n/* */ \n/* */ try {\n/* 353 */ if (!action.execute()) {\n/* 354 */ return -1;\n/* */ }\n/* 356 */ } catch (Exception ex) {\n/* 357 */ LOGGER.warn(\"Exception during purge in RollingFileAppender\", ex);\n/* 358 */ return -1;\n/* */ } \n/* */ } \n/* 361 */ return maxIndex;\n/* */ }",
"@Test\n\tpublic void keepYoungestFirst() throws IOException {\n\t\tZonedDateTime now = ZonedDateTime.now();\n\n\t\tFile firstFile = File.createTempFile(\"junit\", null);\n\t\tFile secondFile = File.createTempFile(\"junit\", null);\n\t\tfirstFile.setLastModified(now.toEpochSecond());\n\t\tsecondFile.setLastModified(now.minus(1, ChronoUnit.DAYS).toEpochSecond());\n\n\t\tFileTuple firstTuple = new FileTuple(firstFile, firstFile);\n\t\tFileTuple secondTuple = new FileTuple(secondFile, secondFile);\n\n\t\tassertThat(COMPARATOR.compare(firstTuple, secondTuple)).isNegative();\n\n\t}",
"public void testCompare() throws Exception {\n\n Object testData[][] = {\n { \"aaa\", \"bbb\", -1 },\n { \"aaa\", \"aaa\", 0 },\n { \"bbb\", \"aaa\", 1 },\n { \"aaa\", \"aaa_L1_bbb.lsm\", -1 },\n { \"aaa_L1_bbb.lsm\", \"aaa_L1_bbb.lsm\", 0 },\n { \"aaa_L1_bbb.lsm\", \"aaa\", 1 },\n { \"aaa_L1_bbb.lsm\", \"aaa_L10_bbb.lsm\", -1 },\n { \"aaa_L10_bbb.lsm\", \"aaa_L1_bbb.lsm\", 1 },\n { \"aaa_La_bbb.lsm\", \"aaa_L1_bbb.lsm\", 1 },\n { \"aaa_L2_bbb.lsm\", \"aaa_L10_bbb.lsm\", -1 }\n };\n\n LNumberComparator comparator = new LNumberComparator();\n\n for (Object[] testRow : testData) {\n String name1 = (String) testRow[0];\n String name2 = (String) testRow[1];\n File file1 = new File(name1);\n File file2 = new File(name2);\n int expectedResult = (Integer) testRow[2];\n int actualResult = comparator.compare(new FileTarget(file1),\n new FileTarget(file2));\n\n boolean isValid = ((expectedResult > 0) && (actualResult > 0)) ||\n ((expectedResult < 0) && (actualResult < 0)) ||\n ((expectedResult == 0) && (actualResult == 0));\n\n assertTrue(name1 + \" compared to \" + name2 +\n \" returned invalid result of \" + actualResult +\n \" (should have same sign as \" + expectedResult + \")\",\n isValid);\n }\n\n }",
"public void testCanonicalize() {\n \tassertEquals(\"//\", new Path(\"///////\").toString());\r\n \tassertEquals(\"/a/b/c\", new Path(\"/a/b//c\").toString());\r\n \tassertEquals(\"//a/b/c\", new Path(\"//a/b//c\").toString());\r\n \tassertEquals(\"a/b/c/\", new Path(\"a/b//c//\").toString());\r\n \r\n \t// Test collapsing single dots\r\n \tassertEquals(\"2.0\", \"/\", new Path(\"/./././.\").toString());\r\n \tassertEquals(\"2.1\", \"/a/b/c\", new Path(\"/a/./././b/c\").toString());\r\n \tassertEquals(\"2.2\", \"/a/b/c\", new Path(\"/a/./b/c/.\").toString());\r\n \tassertEquals(\"2.3\", \"a/b/c\", new Path(\"a/./b/./c\").toString());\r\n \r\n \t// Test collapsing double dots\r\n \tassertEquals(\"3.0\", \"/a/b\", new Path(\"/a/b/c/..\").toString());\r\n \tassertEquals(\"3.1\", \"/\", new Path(\"/a/./b/../..\").toString());\r\n }",
"@Test\n public void compareTo() {\n Road road1 = new Road(cityA, cityB, 0);\n Road road2 = new Road(cityA, cityC, 1);\n Road road3 = new Road(cityB, cityA, 2);\n Road road4 = new Road(cityA, cityB, 3);\n /**Test of reflexivity x = x*/\n assertEquals(0,road1.compareTo(road1)); \n \n /**Test of transitivity of < a<b & b<c => a<c*/\n assertTrue(road1.compareTo(road2) < 0);\n assertTrue(road2.compareTo(road3) < 0);\n assertTrue(road1.compareTo(road3) < 0);\n \n /**Test of transitivity of > */\n assertTrue(road3.compareTo(road2) > 0);\n assertTrue(road2.compareTo(road1) > 0);\n assertTrue(road3.compareTo(road1) > 0);\n \n /**Test of antisymmetry a<=b & b<=a => a=b*/\n assertTrue(road1.compareTo(road4) >= 0);\n assertTrue(road1.compareTo(road4) <= 0);\n assertEquals(0,road1.compareTo(road4));\n \n /**Test of symmetry a=b <=> b=a*/\n assertEquals(0,road1.compareTo(road4));\n assertEquals(0,road4.compareTo(road1));\n assertTrue(road1.compareTo(road4) == road4.compareTo(road1));\n /**Both symmetry tests fail since the length of road1 and road4\n * are unequal. As a result we should compare lengths aswell,\n * however in the current iteration of the program we do not\n * need to compare lengths for the program to run as intended*/\n }",
"public void testRelativize() throws Exception {\n\n Object[] test_values = {\n new String[]{\"/xml.apache.org\", \"/xml.apache.org/foo.bar\", \"foo.bar\"},\n new String[]{\"/xml.apache.org\", \"/xml.apache.org/foo.bar\", \"foo.bar\"},\n new String[]{\"/xml.apache.org\", \"/xml.apache.org/foo.bar\", \"foo.bar\"},\n };\n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test_path = tests[0];\n String test_abs_resource = tests[1];\n String expected = tests[2];\n\n String result = NetUtils.relativize(test_path, test_abs_resource);\n String message = \"Test \" +\n \" path \" + \"'\" + test_path + \"'\" +\n \" absoluteResource \" + \"'\" + test_abs_resource;\n assertEquals(message, expected, result);\n }\n }",
"@Override\n public int compareTo(final ModelFile o) {\n final ModelFile otherModelFile = ((ModelFile) o);\n return this.file.getFullPath().toString().compareTo(otherModelFile.file.getFullPath().toString());\n }",
"public void sortByLength()\n {\n boolean swapMade;//has a swap been made in the most recent pass?\n \n //repeat looking for swaps\n do\n {\n swapMade=false;//just starting this pass, so no swap yet\n \n //go through entire array. looking for swaps that need to be done\n for(int i = 0; i<currentRide-1; i++)\n {\n //if the other RideLines has less people\n if(rides[i].getCurrentPeople()<rides[i+1].getCurrentPeople())\n {\n // standard swap, using a temporary. swap with less people\n RideLines temp = rides[i];\n rides[i]=rides[i+1];\n rides[i+1]=temp;\n \n swapMade=true;//remember this pass made at least one swap\n }\n \n } \n }while(swapMade);//until no swaps were found in the most recent past\n \n redrawLines();//redraw the image\n \n }",
"public int compareTo(FilterMapping o)\n {\n if (this.depth < o.depth)\n return -1;\n else if (this.depth > o.depth)\n return 1;\n else if (this.priority < o.priority)\n return -1;\n else if (this.priority > o.priority)\n return 1;\n else\n return 0;\n }",
"private void sortLeaves() {\r\n\r\n\t\tboolean swapOccured;\r\n\r\n\t\tdo {\r\n\t\t\tswapOccured = false;\r\n\r\n\t\t\tfor(int index=0; index < this.treeNodes.length - 1; index++) {\r\n\t\t\t\tint currentLeaf = index;\r\n\t\t\t\tint nextLeaf = currentLeaf + 1;\r\n\t\t\t\tif(this.treeNodes[currentLeaf].getFrequency() > this.treeNodes[nextLeaf].getFrequency()) {\r\n\t\t\t\t\tswapLeaves(currentLeaf, nextLeaf);\r\n\t\t\t\t\tswapOccured=true;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\twhile(swapOccured);\r\n\t}",
"@SuppressWarnings(\"unchecked\")\n private void updateSuffixMin(RootListNode<K> t) {\n if (comparator == null) {\n while (t != null) {\n if (t.next == null) {\n t.suffixMin = t;\n } else {\n RootListNode<K> nextSuffixMin = t.next.suffixMin;\n if (((Comparable<? super K>) t.root.cKey).compareTo(nextSuffixMin.root.cKey) <= 0) {\n t.suffixMin = t;\n } else {\n t.suffixMin = nextSuffixMin;\n }\n }\n t = t.prev;\n }\n } else {\n while (t != null) {\n if (t.next == null) {\n t.suffixMin = t;\n } else {\n RootListNode<K> nextSuffixMin = t.next.suffixMin;\n if (comparator.compare(t.root.cKey, nextSuffixMin.root.cKey) <= 0) {\n t.suffixMin = t;\n } else {\n t.suffixMin = nextSuffixMin;\n }\n }\n t = t.prev;\n }\n }\n }",
"int getPriorityOrder();",
"public boolean topologicalOrderingRequired() {\n // ordering is important, as jobs need to be written out in\n // topological order for label based clustering\n return true;\n }",
"protected abstract Comparator<T> getFallbackComparator();",
"@Override\n public int compare(String left, String right) {\n return left.compareTo(right);\n }",
"private boolean expandsBefore(\n RolapCalculation calc1,\n RolapCalculation calc2)\n {\n final int solveOrder1 = calc1.getSolveOrder();\n final int solveOrder2 = calc2.getSolveOrder();\n if (solveOrder1 > solveOrder2) {\n return true;\n } else {\n return solveOrder1 == solveOrder2\n && calc1.getHierarchyOrdinal()\n < calc2.getHierarchyOrdinal();\n }\n }",
"public boolean requiresPropertyOrdering()\n/* */ {\n/* 377 */ return false;\n/* */ }",
"@Test\n public void testSort_intArr_IntComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"@Test\n public void testFail(){\n List<StoryPart> storyParts = new ArrayList<>();\n StoryPart a = new StoryPart(LocalTime.of(0, 2), null, null, StoryEvent.HALF_TIME_A_END, StoryTitle.create(\"halftime 1 end\"),\n StoryDescription.create(\"halftime 2 end\"));\n StoryPart b = new StoryPart(LocalTime.of(0, 3), null, GameMinute.create(\"2.\"), StoryEvent.GOAL, StoryTitle.create(\"Goal 2\"),\n StoryDescription.create(\"goal 2\"));\n StoryPart c = new StoryPart(LocalTime.of(0, 1), null, GameMinute.create(\"1.\"), StoryEvent.YELLOW_CARD,\n StoryTitle.create(\"yellow card 1\"), StoryDescription.create(\"yellow card 1\"));\n storyParts.add(a);\n storyParts.add(b);\n storyParts.add(c);\n\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortA = new ArrayList<>(storyParts);\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortB = new ArrayList<>(storyParts);\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortC = new ArrayList<>(storyParts);\n\n assertEquals(sortA.get(0), sortB.get(0));\n assertEquals(sortA.get(0), sortC.get(0));\n\n assertEquals(sortA.get(1), sortB.get(1));\n assertEquals(sortA.get(1), sortC.get(1));\n\n assertEquals(sortA.get(2), sortB.get(2));\n assertEquals(sortA.get(2), sortC.get(2));\n\n }",
"private static boolean isSorted(String[] a) {\n for (int i = 1; i < a.length; i++) {\n if (a[i].compareTo(a[i-1]) < 0) {\n \treturn false;\n }\n }\n return true;\n }",
"public void ensureOpenFiles()\n throws DataOrderingException;",
"@Test\n public void testShortestDistance2() {\n Vertex v1 = new Vertex(1, \"A\");\n Vertex v2 = new Vertex(2, \"B\");\n Vertex v3 = new Vertex(3, \"C\");\n\n Edge<Vertex> e1 = new Edge<>(v1, v2, 1);\n Edge<Vertex> e2 = new Edge<>(v2, v3, 1);\n Edge<Vertex> e3 = new Edge<>(v1, v3, 3);\n\n Graph<Vertex, Edge<Vertex>> g = new Graph<>();\n g.addVertex(v1);\n g.addVertex(v2);\n g.addVertex(v3);\n g.addEdge(e1);\n g.addEdge(e2);\n g.addEdge(e3);\n\n List<Vertex> expectedPath = new ArrayList<>();\n expectedPath.add(v1);\n expectedPath.add(v2);\n expectedPath.add(v3);\n\n assertTrue(g.edge(e1));\n assertTrue(g.vertex(v1));\n\n v1.updateName(\"test\");\n assertEquals(\"test\", v1.name());\n\n assertEquals(expectedPath, g.shortestPath(v1, v3));\n }",
"protected void sortResources()\n {\n PriorityComparator priorityComparator = new PriorityComparator();\n List<Resource> resources = getResources();\n Collections.sort(resources, priorityComparator);\n }",
"@Override\r\n public int compare(SGSystem arg0, SGSystem arg1) {\r\n if (arg0.priority < arg1.priority) {\r\n return -1;\r\n }\r\n if (arg0.priority > arg1.priority) {\r\n return 1;\r\n }\r\n else {\r\n return 0;\r\n }\r\n }",
"private static boolean getSorted(JobConf conf) {\n return conf.getBoolean(INPUT_SORT, false);\n }",
"public int compare (Object object1,Object object2)\r\n {\r\n Map map1 = (Map)object1;\r\n Map map2 = (Map)object2;\r\n\r\n /*Get sort info keys*/\r\n Map sortKeys = getSortKeys();\r\n\r\n String keyName = (String) sortKeys.get(\"name\");\r\n String keyDir = (String) sortKeys.get(\"dir\");\r\n\r\n String stringValue1 = (String) map1.get(keyName); \r\n String stringValue2 = (String) map2.get(keyName);\r\n\r\n boolean str1Empty = isEmpty(stringValue1);\r\n boolean str2Empty = isEmpty(stringValue2);\r\n \r\n /* \r\n * If both values are null or empty diff = 0\r\n * If first string is null or empty diff = -1\r\n * If second string is null or empty diff = 1\r\n * If both the strings are not empty then compare the strings\r\n */ \r\n int diff = str1Empty && str2Empty ? 0 : \r\n str1Empty ? -1 : \r\n str2Empty ? 1 : \r\n compareAnchorDataPart(stringValue1, stringValue2); \r\n \r\n /* If the direction is not ascending, then invert the sign of 'diff' value\r\n * */\r\n return \"ascending\".equals(keyDir)? diff : -diff ;\r\n }",
"@Override\r\n\t public int compare(Node o1, Node o2) {\n\t\tif (o1.downloadRate > o2.downloadRate)\r\n\t\t return 1;\r\n\t\tif (o1.downloadRate < o2.downloadRate)\r\n\t\t return -1;\r\n\t\t\r\n\t\treturn 0;\r\n\t }",
"@Test\n\tpublic void testDescendingComparator() {\n\t\tList<MockWorker> mockWorkers = createMockWorkers(10);\n\t\tsetAscendingParallelWorkCapacity(mockWorkers);\n\t\tList<WorkerLoadSnapshot> snapshots = createSnapshots(mockWorkers);\n\t\tRandom rng = new Random(-1L);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.descendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t\tList<MockWorker> unorderedList = new ArrayList<>(mockWorkers);\n\t\tCollections.shuffle(snapshots);\n\t\tsetAscendingParallelWorkCapacity(unorderedList);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.descendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t}",
"private int handleIncomparablePrimitives(Object x, Object y) {\n int xCost = getPrimitiveValueCost(x);\n int yCost = getPrimitiveValueCost(y);\n int res = Integer.compare(xCost, yCost);\n return ascending ? res : -res;\n }",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}",
"@Override\r\n\tpublic int compareTo(Node other) {\r\n\t\tfloat f = cost + heuristic;\r\n\t\tfloat otherF = other.cost + other.heuristic;\r\n\t\tif(f < otherF) return -1;\r\n\t\telse if(f > otherF) return 1;\r\n\t\telse return 0;\r\n\t}",
"@Override\n public int compare(SliceAction action1, SliceAction action2) {\n int priority1 = action1.getPriority();\n int priority2 = action2.getPriority();\n if (priority1 < 0 && priority2 < 0) {\n return 0;\n } else if (priority1 < 0) {\n return 1;\n } else if (priority2 < 0) {\n return -1;\n } else if (priority2 < priority1) {\n return 1;\n } else if (priority2 > priority1) {\n return -1;\n } else {\n return 0;\n }\n }"
]
| [
"0.60854274",
"0.60773516",
"0.5758138",
"0.57074714",
"0.5706894",
"0.5643439",
"0.5618193",
"0.55733275",
"0.5569511",
"0.55519956",
"0.5545245",
"0.55237436",
"0.55237436",
"0.55010223",
"0.5490224",
"0.54326",
"0.5404865",
"0.5379184",
"0.5374931",
"0.5352709",
"0.53439677",
"0.53392756",
"0.5325527",
"0.5324957",
"0.5309783",
"0.5261435",
"0.5256624",
"0.52556825",
"0.523928",
"0.5237291",
"0.5236308",
"0.51953286",
"0.518522",
"0.5157492",
"0.5136605",
"0.513384",
"0.5121633",
"0.5115076",
"0.5112122",
"0.51041484",
"0.5103606",
"0.5093631",
"0.50722563",
"0.50661004",
"0.5049814",
"0.50474346",
"0.5031669",
"0.5028539",
"0.50198627",
"0.500722",
"0.5000509",
"0.49974927",
"0.49945793",
"0.49809575",
"0.4979047",
"0.49789125",
"0.49779713",
"0.49776193",
"0.49576086",
"0.4954825",
"0.49541572",
"0.49541572",
"0.4951436",
"0.49447525",
"0.49418095",
"0.494092",
"0.4935975",
"0.49336272",
"0.49225843",
"0.49037862",
"0.4891758",
"0.48851383",
"0.4871714",
"0.48700538",
"0.48667106",
"0.48661634",
"0.48646358",
"0.4861877",
"0.4861093",
"0.48575547",
"0.48511225",
"0.4848853",
"0.4841956",
"0.48284858",
"0.4825536",
"0.4824236",
"0.48223275",
"0.48213765",
"0.48209462",
"0.48187885",
"0.48165682",
"0.4816402",
"0.48149905",
"0.48131105",
"0.4811944",
"0.4810242",
"0.48060513",
"0.4803384",
"0.47979563",
"0.47960708"
]
| 0.60630333 | 2 |
Test to ensure that path sorting will give parts with wild cards lower priority. | @Test
public void testPathPriorityByWildCard() {
this.requestDefinitions.get(0).setPathParts(new PathDefinition[2]);
this.requestDefinitions.get(0).getPathParts()[0] = new PathDefinition();
this.requestDefinitions.get(0).getPathParts()[0].setValue("a");
this.requestDefinitions.get(0).getPathParts()[1] = new PathDefinition();
this.requestDefinitions.get(0).getPathParts()[1].setValue(null);
this.requestDefinitions.get(1).setPathParts(new PathDefinition[2]);
this.requestDefinitions.get(1).getPathParts()[0] = new PathDefinition();
this.requestDefinitions.get(1).getPathParts()[0].setValue("a");
this.requestDefinitions.get(1).getPathParts()[1] = new PathDefinition();
this.requestDefinitions.get(1).getPathParts()[1].setValue("a");
this.requestDefinitions.get(2).setPathParts(new PathDefinition[2]);
this.requestDefinitions.get(2).getPathParts()[0] = new PathDefinition();
this.requestDefinitions.get(2).getPathParts()[0].setValue(null);
this.requestDefinitions.get(2).getPathParts()[1] = new PathDefinition();
this.requestDefinitions.get(2).getPathParts()[1].setValue("a");
final List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),
this.requestDefinitions.get(0), this.requestDefinitions.get(2));
Collections.sort(this.requestDefinitions, this.comparator);
Assert.assertEquals(expected, this.requestDefinitions);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@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 }",
"Comparator<String> getPatternComparator(String path);",
"@Test\n\tpublic void testPathPriorityByLength() {\n\n\t\tthis.requestDefinitions.get(0).setPathParts(new PathDefinition[1]);\n\t\tthis.requestDefinitions.get(1).setPathParts(new PathDefinition[3]);\n\t\tthis.requestDefinitions.get(2).setPathParts(new PathDefinition[2]);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(2), this.requestDefinitions.get(0));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"public static void sortByPopular(){\n SORT_ORDER = POPULAR_PATH;\n }",
"public void sortPaths(List<String> paths){\n //System.out.println(\"Received LIST: \"+Arrays.toString(paths.toArray()));\n Collections.sort(paths, new Comparator<String>() {\n\n @Override\n public int compare(String o1, String o2) {\n int s1 = Integer.valueOf(o1.substring(1));\n int s2 = Integer.valueOf(o2.substring(1));\n return s2-s1;\n }\n\n });\n //System.out.println(\"AFTER SORTING LIST: \"+Arrays.toString(paths.toArray()));\n }",
"@Test(priority = 8)\n\tpublic void validateSortingByRating() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.selectSortingDropdown(2, locator);\n\t\theroImg.validateStarRating(3, locator, validate);\n\t\tHeroImageProductPageFlow.selectSortingDropdown(3, locator);\n\t\theroImg.validateStarRating(4, locator, validate);\n\t\tlog.info(\"sorting is correct\");\n\t}",
"public void setUsePathForClickSort(boolean usePath) {\r\n\t\tif (usePath) \r\n\t\t\t_sortPathDir=TreeBuffer.SORT_ASC;\t\r\n\t\telse\r\n\t\t\t_sortPathDir=TreeBuffer.SORT_ANY;\t\t\r\n\t}",
"@Override\r\n @Test\r\n @ConditionalIgnore(condition = IgnoreTreeAnchor.class)\r\n public void testAlsoSelectPreviousAscending() {\r\n super.testAlsoSelectPreviousAscending();\r\n }",
"protected boolean\nshouldCompactPathLists()\n//\n////////////////////////////////////////////////////////////////////////\n{\n return true;\n}",
"@Test\n public void priorityTest() {\n // TODO: test priority\n }",
"@Test (priority = 1)\n public void sortAlphabetical(){\n\n for (int i = 0; i < allDepartments.getOptions().size()-1; i++) {\n String current = allDepartments.getOptions().get(i).getText();\n String next = allDepartments.getOptions().get(i+1).getText();\n\n System.out.println(\"comparing: \" + current + \" with \"+ next);\n\n Assert.assertTrue(current.compareTo(next)<=0);\n\n }\n }",
"public void testCompareViaSort() throws Exception {\n\n String correctlySortedNames[] = {\n \"0000_aaa\",\n \"0000_bbb\",\n \"1111DC_U_022107_L99_Sum.lsm\",\n \"6325DC_U_022107_L0_Sum.lsm\",\n \"6325DC_U_022107_L1_Sum.lsm\",\n \"6325DC_U_022107_L2_Sum.lsm\",\n \"6325DC_U_022107_L8_Sum.lsm\",\n \"6325DC_U_022107_L9_Sum.lsm\",\n \"6325DC_U_022107_L10_Sum.lsm\",\n \"6325DC_U_022107_L11_Sum.lsm\",\n \"6325DC_U_022107_L20_Sul.lsm\",\n \"6325DC_U_022107_L20_Sum.lsm\",\n \"6325DC_U_022107_L20_Sun.lsm\",\n \"6325DC_U_022107_L21_Sum.lsm\",\n \"6325DC_U_022107_L22_Sum.lsm\",\n \"6325DC_U_022107_L99_Sum.lsm\",\n \"6325DC_U_022107_L111_Sum.lsm\",\n \"6325DC_U_022107_L222_Sum.lsm\",\n \"7777DC_U_022107_L22_Sum.lsm\",\n \"9999_aaa\",\n \"9999_bbb\" \n };\n\n FileTarget[] targets = new FileTarget[correctlySortedNames.length];\n\n int index = 0;\n for (String name : correctlySortedNames) {\n int reverseOrder = targets.length - 1 - index;\n File file = new File(name);\n targets[reverseOrder] = new FileTarget(file);\n index++;\n }\n\n Arrays.sort(targets, new LNumberComparator());\n\n index = 0;\n for (FileTarget target : targets) {\n assertEquals(\"name \" + index + \" of \" + targets.length +\n \" was not sorted correctly\",\n correctlySortedNames[index], target.getName());\n index++;\n }\n }",
"public void sort () {\n\t\t\n\t\t// Clear iterator\n\t\titer = null;\n\t\t\n\t\tCollections.sort(this.pathObjects, new Comparator<PathObject>() {\n\t\t @Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t // -1 - less than, 1 - greater than, 0 - equal, all inversed for descending\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }\n\t\t});\n\t\t\n\t\titer = this.pathObjects.iterator();\n\t}",
"public SortSpecification getSortSpecification(String s, boolean flag) {\n return null;\r\n }",
"public void verifySortByPatternActivity() {\n\t\tcloseInstIcon();\n\t\tAssert.assertTrue(isElementPresent(AUDIO_ICON), \"Sort by pattern Activity is not being displayed\");\n\t}",
"@TestProperties(name = \"test the parameters sorting\")\n\tpublic void testEmptyInclude(){\n\t}",
"@Test\n public void test_read_input_and_sort() {\n\n }",
"public void testSortedList() {\r\n List<InfoNode> sortedList = MapUtils.sortByDistance(exampleList, node3.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node1);\r\n assertTrue(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertFalse(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, node1.getTitle());\r\n assertTrue(sortedList.size() == 2);\r\n assertTrue(sortedList.get(0) == node2);\r\n assertTrue(sortedList.get(1) == node3);\r\n assertFalse(sortedList.contains(node1));\r\n assertTrue(sortedList.contains(node2));\r\n assertTrue(sortedList.contains(node3));\r\n\r\n sortedList = MapUtils.sortByDistance(exampleList, \" \");\r\n assertTrue(sortedList.equals(exampleList));\r\n }",
"@Test\n\tpublic void testDefinitionPriority() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(0).setContentType(MediaType.UNKNOWN);\n\t\tthis.requestDefinitions.get(0).setAccept(MediaType.HTML);\n\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(1).setContentType(MediaType.HTML);\n\t\tthis.requestDefinitions.get(1).setAccept(MediaType.UNKNOWN);\n\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(2).setContentType(MediaType.UNKNOWN);\n\t\tthis.requestDefinitions.get(2).setAccept(MediaType.UNKNOWN);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(2),\n\t\t\t\tthis.requestDefinitions.get(1), this.requestDefinitions.get(0));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"@Test(priority = 6)\n\tpublic void validateSortingFunctionality() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.clickCustomerReviews(locator);\n\t\tlog.info(\"Content is present\");\n\t\tlog.info(\"Starting Sorting functionality testing\");\n\t}",
"@Test\n public void testFail(){\n List<StoryPart> storyParts = new ArrayList<>();\n StoryPart a = new StoryPart(LocalTime.of(0, 2), null, null, StoryEvent.HALF_TIME_A_END, StoryTitle.create(\"halftime 1 end\"),\n StoryDescription.create(\"halftime 2 end\"));\n StoryPart b = new StoryPart(LocalTime.of(0, 3), null, GameMinute.create(\"2.\"), StoryEvent.GOAL, StoryTitle.create(\"Goal 2\"),\n StoryDescription.create(\"goal 2\"));\n StoryPart c = new StoryPart(LocalTime.of(0, 1), null, GameMinute.create(\"1.\"), StoryEvent.YELLOW_CARD,\n StoryTitle.create(\"yellow card 1\"), StoryDescription.create(\"yellow card 1\"));\n storyParts.add(a);\n storyParts.add(b);\n storyParts.add(c);\n\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortA = new ArrayList<>(storyParts);\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortB = new ArrayList<>(storyParts);\n Collections.shuffle(storyParts);\n storyParts.sort(new StoryPartTimeLineComparator());\n List<StoryPart> sortC = new ArrayList<>(storyParts);\n\n assertEquals(sortA.get(0), sortB.get(0));\n assertEquals(sortA.get(0), sortC.get(0));\n\n assertEquals(sortA.get(1), sortB.get(1));\n assertEquals(sortA.get(1), sortC.get(1));\n\n assertEquals(sortA.get(2), sortB.get(2));\n assertEquals(sortA.get(2), sortC.get(2));\n\n }",
"private boolean comparePathAttribute(String value, List<String> includePaths) {\n\t\treturn false;\r\n\t}",
"@Test\n\tpublic void testSortSpecialChars() throws SortException {\n\t\tString[] inputArr = new String[] { \"@$#\", \"&*(\", \"^%&\", \"!^&^\" };\n\t\tList<String> arrayList = sortApplication.sortSpecialChars(inputArr);\n\t\tassertEquals(\"!^&^\", arrayList.get(0));\n\t\tassertEquals(\"&*(\", arrayList.get(1));\n\t\tassertEquals(\"@$#\", arrayList.get(2));\n\t\tassertEquals(\"^%&\", arrayList.get(3));\n\t}",
"private void somethingIsWrongWithShellSort() {\n try {\n Sorting.shellsort(\n null, (new Zombie(null, 0, 0).getNameComparator()));\n fail(\"You didn't even throw the exception for the array.\");\n } catch (IllegalArgumentException e) {\n assertNotNull(\n \"Good job throwing the exception...but you need a message!\",\n e.getMessage());\n }\n try {\n Sorting.shellsort(horde, null);\n fail(\"You didn't even throw the exception for the comparator.\");\n } catch (IllegalArgumentException e) {\n assertNotNull(\n \"Good job throwing the exception...but you need a message!\",\n e.getMessage());\n }\n }",
"@Test\n\tpublic void testSortSimpleSpecialChars() throws SortException {\n\t\tString[] inputArr = new String[] { \"*oranges\", \"a^pples\", \"a!pples\", \"feb*\", \"feb%\" };\n\t\tList<String> arrayList = sortApplication.sortSimpleSpecialChars(inputArr);\n\t\tassertEquals(\"*oranges\", arrayList.get(0));\n\t\tassertEquals(\"a!pples\", arrayList.get(1));\n\t\tassertEquals(\"a^pples\", arrayList.get(2));\n\t\tassertEquals(\"feb%\", arrayList.get(3));\n\t\tassertEquals(\"feb*\", arrayList.get(4));\n\n\t}",
"@Test\n\tpublic void testHttpMethodPriorityVsUnknown() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"@VTID(28)\n boolean getSortUsingCustomLists();",
"public boolean isPathAbsorbing(Path<T> path) {\n try { return cost(path) < 0.0; }\n catch(LinkNotFoundException | NodeNotFoundException e) { return true; }\n }",
"@Override\n public int compareTo(JBurgPatternMatcher other)\n {\n Vector<PathElement> this_path = this.generateAccessPath();\n Vector<PathElement> other_path = other.generateAccessPath();\n \n int result = this_path.size() - other_path.size();\n \n for ( int i = 0; i < this_path.size() && result == 0; i++ )\n result = this_path.elementAt(i).compareTo(other_path.elementAt(i));\n\n return result;\n }",
"@Override\n protected Comparator<? super UsagesInFile> getRefactoringIterationComparator() {\n return new Comparator<UsagesInFile>() {\n @Override\n public int compare(UsagesInFile o1, UsagesInFile o2) {\n int result = comparePaths(o1.getFile(), o2.getFile());\n if (result != 0) {\n return result;\n }\n int imports1 = countImports(o1.getUsages());\n int imports2 = countImports(o2.getUsages());\n return imports1 > imports2 ? -1 : imports1 == imports2 ? 0 : 1;\n }\n\n private int comparePaths(PsiFile o1, PsiFile o2) {\n String path1 = o1.getVirtualFile().getCanonicalPath();\n String path2 = o2.getVirtualFile().getCanonicalPath();\n return path1 == null && path2 == null ? 0 : path1 == null ? -1 : path2 == null ? 1 : path1.compareTo(path2);\n }\n\n private int countImports(Collection<UsageInfo> usages) {\n int result = 0;\n for (UsageInfo usage : usages) {\n if (FlexMigrationUtil.isImport(usage)) {\n ++result;\n }\n }\n return result;\n }\n };\n }",
"public void testUrlsWithPrefixes() throws Exception {\n SubTreeArticleIterator artIter = createSubTreeIter();\n Pattern pat = getPattern(artIter);\n\n assertNotMatchesRE(pat, \"http://www.wrong.com/2012/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/PDF/article.pdf\");\n // the RE is more permissive now to handle three different flavors of plugin - SourcePlugin, DirSourcePlugin and DeliveredSourcePlugin\n assertMatchesRE(pat, \"http://www.example.com/1066/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/PDF/article.pdf\");\n assertNotMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.wrong!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/PDF/article.pdf\");\n assertNotMatchesRE(pat, \"http://www.example.com/2012/HDX_Y/more/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/PDF/article.pdf\");\n assertNotMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/PDF/article.pdf\");\n assertNotMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/article.pdf\");\n assertNotMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/PDF/article.wrong\");\n assertNotMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/wrong/article.pdf\");\n assertNotMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/wrong/PDF/article.pdf\");\n assertMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/PDF/article.pdf\");\n assertMatchesRE(pat, \"http://www.example.com/2012/DIFF-STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=3/ART=2012_53/BodyRef/PDF/article.pdf\");\n assertMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=23/VOL=2012.2/ISU=8/ART=2012_23/BodyRef/PDF/article.pdf\");\n // DirSourcePlugin\n assertMatchesRE(pat, \"http://www.example.com/2012_1/STUFF_07-26-12.zip!/JOU=23/VOL=2012.2/ISU=8/ART=2012_23/BodyRef/PDF/article.pdf\");\n // DeliveredSourcePlugin\n assertMatchesRE(pat, \"http://www.example.com/2012/HD1_3/JOU=23.zip!/JOU=23/VOL=2012.2/ISU=8/ART=2012_23/BodyRef/PDF/article.pdf\");\n assertMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=23/VOL=2012.2/ISU=8/ART=2012_23/BodyRef/PDF/article.pdf\");\n assertMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=2/VOL=2012.3/ISU=2-3/ART=2012_53/BodyRef/PDF/random_article.pdf\");\n \n assertMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/BSE=0304/BOK=978-3-540-35043-9/CHP=10_10.1007BFb0103161/BodyRef/PDF/978-3-540-35043-9_Chapter_10.pdf\");\n assertMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/BSE=8913/BOK=978-94-6265-114-2/PRT=1/CHP=7_10.1007978-94-6265-114-2_7/BodyRef/PDF/978-94-6265-114-2_Chapter_7.pdf\");\n assertMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/BOK=978-981-10-0886-3/PRT=4/CHP=12_10.1007978-981-10-0886-3_12/BodyRef/PDF/978-981-10-0886-3_Chapter_12.pdf\");\n assertMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/BOK=978-981-10-0886-3/CHP=1_10.1007978-981-10-0886-3_1/BodyRef/PDF/978-981-10-0886-3_Chapter_1.pdf\");\n // but not other pdfs\n assertNotMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=40273/VOL=2016.34/ISU=9/ART=430/MediaObjects/40273_2016_430_MOESM2_ESM.pdf\");\n assertNotMatchesRE(pat, \"http://www.example.com/2012/STUFF_07-26-12.zip!/JOU=12919/VOL=2016.10/ISU=S6/ART=6/12919_2016_6_CTS.pdf\");\n }",
"@Test\n\tpublic void checkShortestRoute() {\n\t\tassertEquals(Trains.shortestRoute(\"A\",\"C\"), 9);\n\t\t//assertEquals(Trains.shortestRoute(\"B\",\"B\"), 9);\n\t}",
"public void testGenreSort() {\n sorter.inssortGenre();\n list = sorter.getLibrary();\n assertEquals(list.get(0).getGenre(), \"Hip-Hop\");\n assertEquals(list.get(1).getGenre(), \"R&B\");\n assertEquals(list.get(2).getGenre(), \"Rock\");\n }",
"public static void main(String[] args) {\n \t\tsortTest(\"\");\n \t\tsortTest(\"A\");\n \t\tsortTest(\"HE\");\n \t\tsortTest(\"HEA\");\n \t\tsortTest(\"HEAPS\");\n \t\tsortTest(\"HEAPSORT\");\n\t\tsortTest(\"HEAPSORTEXAMPLE\");\n\t\tsortTest(\"QUICK\");\n\t\tsortTest(\"QUICKS\");\n\t\tsortTest(\"QUICKSO\");\n\t\tsortTest(\"QUICKSORT\");\n\t\tsortTest(\"QUICKSORTEXAMPLE\");\n\n\t\tsortTest(\"bottomupmergesortconsistsofasequenceofpassesoverthewholearray\");\n\t\tsortTest(\"thefirststepinastudyofcomplexityistoestablishamodelofcomputation.generally,researchersstrivetounderstandthesimplestmodelrelevanttoaproblem.\");\n }",
"@Test\n\tpublic void testSortAllNumFlagOn() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortAllWithNumFlagOn(inputArr1);\n\t\tassertEquals(\"#B@n@n0\", arrayList.get(0));\n\t\tassertEquals(\"20 B*anana\", arrayList.get(1));\n\t\tassertEquals(\"100 B*anana\", arrayList.get(2));\n\t\tassertEquals(\"P3@r\", arrayList.get(3));\n\t\tassertEquals(\"p3@R\", arrayList.get(4));\n\t}",
"@Test\n\tpublic void testSortAll() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortAll(inputArr1);\n\t\tassertEquals(\"#B@n@n0\", arrayList.get(0));\n\t\tassertEquals(\"100 B*anana\", arrayList.get(1));\n\t\tassertEquals(\"20 B*anana\", arrayList.get(2));\n\t\tassertEquals(\"P3@r\", arrayList.get(3));\n\t\tassertEquals(\"p3@R\", arrayList.get(4));\n\t}",
"protected void sortResources()\n {\n PriorityComparator priorityComparator = new PriorityComparator();\n List<Resource> resources = getResources();\n Collections.sort(resources, priorityComparator);\n }",
"public boolean higherpres(char oprt) {\r\n\t\tif(oprt == '+'|| oprt =='-') {\r\n\t\t\tif((char)opt.peek() == '*' || (char)opt.peek() == '/' ) {\r\n\t\t\t\treturn true;\r\n\t\t\t}else {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}else if (oprt == '/'|| oprt =='*') {\r\n\t\t\tif((char)opt.peek() == '+' || (char)opt.peek() == '-' ) {\r\n\t\t\t\treturn false;\r\n\t\t\t}else {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public static void main(String[] args) {\r\n String s = \"test\";\r\n String s1 = \"etst\";\r\n boolean result = sort(s, s1);\r\n System.out.println(result);\r\n }",
"public void sort() {\r\n\t\tCollections.sort(parts);\r\n\t}",
"private static void sortHelperMSD(String[] asciis, int start, int end, int index) {\n // Optional MSD helper method for optional MSD radix sort\n return;\n }",
"@Override\n public void sortCurrentList(FileSortHelper sort) {\n }",
"@Test\n public void testSort_intArr_IntComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"private static boolean isIgnorePath(String aPath)\n {\n if (aPath.startsWith(\"/sun\")) return true;\n if (aPath.startsWith(\"/apple\")) return true;\n if (aPath.startsWith(\"/com/sun\")) return true;\n if (aPath.startsWith(\"/com/apple\")) return true;\n if (aPath.startsWith(\"/com/oracle\")) return true;\n if (aPath.startsWith(\"/java/applet\")) return true;\n if (aPath.startsWith(\"/java/awt/dnd\")) return true;\n if (aPath.startsWith(\"/java/awt/im\")) return true;\n if (aPath.startsWith(\"/java/awt/peer\")) return true;\n if (aPath.startsWith(\"/java/beans\")) return true;\n if (aPath.startsWith(\"/java/lang/model\")) return true;\n if (aPath.startsWith(\"/java/nio/channels\")) return true;\n if (aPath.startsWith(\"/java/security\")) return true;\n if (aPath.startsWith(\"/java/util/concurrent\")) return true;\n if (aPath.startsWith(\"/java/util/Spliterators\")) return true;\n if (aPath.startsWith(\"/javax/crypto\")) return true;\n if (aPath.startsWith(\"/javax/net\")) return true;\n if (aPath.startsWith(\"/javax/security\")) return true;\n if (aPath.startsWith(\"/javax/accessibility\")) return true;\n if (aPath.startsWith(\"/javax/imageio\")) return true;\n if (aPath.startsWith(\"/javax/print\")) return true;\n if (aPath.startsWith(\"/javax/sound\")) return true;\n if (aPath.startsWith(\"/javax/swing/b\")) return true;\n if (aPath.startsWith(\"/javax/swing/colorchooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/event\")) return true;\n if (aPath.startsWith(\"/javax/swing/filechooser\")) return true;\n if (aPath.startsWith(\"/javax/swing/plaf\")) return true;\n if (aPath.startsWith(\"/javax/swing/text\")) return true;\n if (aPath.startsWith(\"/javax/swing/tree\")) return true;\n if (aPath.startsWith(\"/javax/swing/undo\")) return true;\n if (aPath.startsWith(\"/jdk\")) return true;\n if (aPath.startsWith(\"/org/omg\")) return true;\n if (aPath.startsWith(\"/org/w3c\")) return true;\n if (aPath.startsWith(\"/META-INF\")) return true;\n\n // If inner class, return false\n if (aPath.contains(\"$\"))\n return true;\n\n // Return true\n return false;\n }",
"private boolean isSortOrderAscending() {\n \t\tString sortOrder = (String) arguments.get(SORT_ORDER);\n \t\treturn !DESCENDING.equals(sortOrder);\n \t}",
"protected abstract Comparator<T> getFallbackComparator();",
"boolean isSortAscending();",
"@Override\n public int compare(String o1, String o2) {\n int d1 = countChars(o1, '.');\n int d2 = countChars(o2, '.');\n if (d1 != d2) {\n return d1 > d2 ? 1 : -1;\n }\n\n // The less the stars the better: postgresql.org is more specific than *.*.postgresql.org\n int s1 = countChars(o1, '*');\n int s2 = countChars(o2, '*');\n if (s1 != s2) {\n return s1 < s2 ? 1 : -1;\n }\n\n // The longer the better: postgresql.org is more specific than sql.org\n int l1 = o1.length();\n int l2 = o2.length();\n if (l1 != l2) {\n return l1 > l2 ? 1 : -1;\n }\n\n return 0;\n }",
"public void testUptoSegment() {\n \tIPath anyPath = new Path(\"/first/second/third\");\r\n \r\n \tassertEquals(\"1.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"1.1\", new Path(\"/first\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"1.2\", new Path(\"/first/second\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"1.3\", new Path(\"/first/second/third\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"1.4\", new Path(\"/first/second/third\"), anyPath.uptoSegment(4));\r\n \r\n \t//Case 2, absolute path with trailing separator\r\n \tanyPath = new Path(\"/first/second/third/\");\r\n \r\n \tassertEquals(\"2.0\", Path.EMPTY, anyPath.uptoSegment(0));\r\n \tassertEquals(\"2.1\", new Path(\"/first/\"), anyPath.uptoSegment(1));\r\n \tassertEquals(\"2.2\", new Path(\"/first/second/\"), anyPath.uptoSegment(2));\r\n \tassertEquals(\"2.3\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(3));\r\n \tassertEquals(\"2.4\", new Path(\"/first/second/third/\"), anyPath.uptoSegment(4));\r\n }",
"@Test\n public void testShellSort() throws Exception {\n int[] list = new int[]{49, 38, 65, 97, 76, 13, 27, 49, 55, 4};\n LogUtils.d(list);\n A_10_4_to_10_5.shellSort(list);\n LogUtils.d(list);\n }",
"@Test\n public void testRevisedWildcardAndPartition() {\n Path filePath = new Path(\"hdfs:///w/x/y/z.csv\");\n ImplicitColumnManager implictColManager = new ImplicitColumnManager(\n fixture.getOptionManager(),\n standardOptions(filePath));\n\n ScanLevelProjection scanProj = ScanLevelProjection.build(\n RowSetTestUtils.projectList(SchemaPath.DYNAMIC_STAR,\n ScanTestUtils.partitionColName(8)),\n Lists.newArrayList(implictColManager.projectionParser()));\n\n List<ColumnProjection> cols = scanProj.columns();\n assertEquals(2, cols.size());\n assertTrue(scanProj.columns().get(0) instanceof UnresolvedWildcardColumn);\n assertTrue(scanProj.columns().get(1) instanceof PartitionColumn);\n }",
"@Test\n public void sortAlphabeticallyASC_ReturnTrue() {\n // Set SharedPreferences (Sort alphabetically, ASC)\n mSharedPreferences.edit()\n .putInt(Constants.SORT_TYPE_KEY, Constants.SORT_TYPE_ALPHABETICALLY)\n .putBoolean(Constants.SORT_FAVORITES_ON_TOP_KEY, false)\n .putInt(Constants.SORT_DIRECTION_KEY, Constants.SORT_DIRECTION_ASC)\n .commit();\n\n // Click first position in RecyclerView\n onView(withId(R.id.fragment_notelist_recyclerview))\n .perform(RecyclerViewActions.actionOnItemAtPosition(0, click()));\n\n // Check that clicked Note matches Note (2) title/text\n onView(withId(R.id.fragment_note_title_edittext))\n .check(matches(withText(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_2_TITLE))));\n onView(withId(R.id.fragment_note_text_edittext))\n .check(matches(withText(StringUtil.setFirstCharUpperCase(TestHelper.NOTE_2_TEXT))));\n }",
"@Test(priority = 7)\n\tpublic void validateSortingByDate() {\n\t\tlog = Logger.getLogger(HeroImageProducttestscripts.class);\n\t\tLogReport.getlogger();\n\t\tlogger = extent.startTest(\"Validating the Sorting functionality\");\n\t\tHeroImageProductPageFlow.selectSortingDropdown(0, locator);\n\t\theroImg.validateDate(1, locator, validate);\n\t\tHeroImageProductPageFlow.selectSortingDropdown(1, locator);\n\t\theroImg.validateDate(2, locator, validate);\n\t\tlog.info(\"sorting is correct\");\n\t}",
"@Test\r\n public void testGetShapesSortedByOriginDistance() {\r\n List<Shape> expectedOutput = new ArrayList<Shape>();\r\n expectedOutput.add(circle);\r\n expectedOutput.add(square);\r\n expectedOutput.add(rectangle);\r\n expectedOutput.add(triangle);\r\n expectedOutput.add(regularPolygon);\r\n List<Shape> actualOutput = screen.sortShape(SortType.ORIGIN_DISTANCE);\r\n assertEquals(expectedOutput, actualOutput);\r\n }",
"public boolean isPriority()\r\n/* 49: */ {\r\n/* 50:47 */ return false;\r\n/* 51: */ }",
"public void sortMatches();",
"@Test\n void testFromSortOrderTextWithProperties(SoftAssertions softly) {\n SortOrdersTextProperties properties = SortOrdersTextProperties.builder()\n .sortOrderArgsSeparator(\"::\")\n .caseSensitiveValue(\"cs\")\n .caseInsensitiveValue(\"cis\")\n .nullIsFirstValue(\"nif\")\n .nullIsLastValue(\"nil\")\n .build();\n\n SortOrder actual = SortOrder.fromSortOrderText(\"::asc::cis::nif\", properties);\n SortOrder expected = new SortOrder(null, true, true, true);\n softly.assertThat(actual).isEqualTo(expected);\n\n actual = SortOrder.fromSortOrderText(\"field1\", properties);\n expected = new SortOrder(\"field1\", true, true, false);\n softly.assertThat(actual).isEqualTo(expected);\n\n actual = SortOrder.fromSortOrderText(\"field2::desc\", properties);\n expected = new SortOrder(\"field2\", false, true, false);\n softly.assertThat(actual).isEqualTo(expected);\n\n actual = SortOrder.fromSortOrderText(\"field3::desc::cs\", properties);\n expected = new SortOrder(\"field3\", false, false, false);\n softly.assertThat(actual).isEqualTo(expected);\n\n actual = SortOrder.fromSortOrderText(\"field4::desc::cs::nif\", properties);\n expected = new SortOrder(\"field4\", false, false, true);\n softly.assertThat(actual).isEqualTo(expected);\n\n actual = SortOrder.fromSortOrderText(\"::desc\", properties);\n expected = new SortOrder(null, false, true, false);\n softly.assertThat(actual).isEqualTo(expected);\n }",
"@Override\n public int compare(FileNameExtensionFilter ext1, FileNameExtensionFilter ext2)\n {\n return ext1.getDescription().toLowerCase().compareTo(ext2.getDescription().toLowerCase());\n }",
"private boolean containsWildcard(final String min) {\n return min.contains(\"*\")\r\n || min.contains(\"+\")\r\n || min.contains(\"%\")\r\n || min.contains(\"_\");\r\n }",
"@Test\n\tpublic void testSortCapitalSpecialChars() throws SortException {\n\t\tString[] input = new String[] { \"F**\", \"!F*\", \")JD\", \"$GA\", \"*DE\" };\n\t\tList<String> arrayList = sortApplication.sortCapitalSpecialChars(input);\n\t\tassertEquals(\"!F*\", arrayList.get(0));\n\t\tassertEquals(\"$GA\", arrayList.get(1));\n\t\tassertEquals(\")JD\", arrayList.get(2));\n\t\tassertEquals(\"*DE\", arrayList.get(3));\n\t\tassertEquals(\"F**\", arrayList.get(4));\n\t}",
"@Test\n\tpublic void testSortSimpleNumbersSpecialCharsWithNumFlagOn() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortSimpleNumbersSpecialCharsWithNumFlagOn(inputArr3);\n\t\tassertEquals(\"&23jan\", arrayList.get(0));\n\t\tassertEquals(\"20 m!n\", arrayList.get(1));\n\t\tassertEquals(\"100 pea*s\", arrayList.get(2));\n\t\tassertEquals(\"chief) 24\", arrayList.get(3));\n\t\tassertEquals(\"jer100 *\", arrayList.get(4));\n\t}",
"@Test\n public void testCompareLess() {\n System.out.println(\"compare\");\n FileNameComparator instance = new FileNameComparator();\n int expResult = -1;\n int result = instance.compare(testFileA, testFileB);\n Assert.assertEquals(expResult, result);\n }",
"@Test\r\n public void testGetShapesSortedByArea() {\r\n List<Shape> expectedOutput = new ArrayList<Shape>();\r\n expectedOutput.add(regularPolygon);\r\n expectedOutput.add(triangle);\r\n expectedOutput.add(rectangle);\r\n expectedOutput.add(square);\r\n expectedOutput.add(circle);\r\n List<Shape> actualOutput = screen.sortShape(SortType.AREA); \r\n assertEquals(expectedOutput, actualOutput);\r\n }",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[3].compareTo(arg1[3]);\r\n\t\t\t\t\t}",
"@Test\n public void testCrazyPatterns() {\n assertEquals(\"java\\\\.\\\\{.*\\\\}\\\\.Array\", glob2Pattern(\"java.{**}.Array\").pattern());\n assertEquals(\"java\\\\./.*<>\\\\.Array\\\\$1\", glob2Pattern(\"java./**<>.Array$1\").pattern());\n assertEquals(\"\\\\+\\\\^\\\\$\", glob2Pattern(\"+^$\").pattern());\n }",
"@Test\n public void testSort_intArr_IntComparator_half() {\n IntComparator comparator = IntComparatorAsc.getInstance();\n int[] expResult = ASC_CHECK_HALF_SORT_ARRAY;\n sorter.sort(data, 0, 8, comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"static Vector __common__(CommandOption option_, Paths[] pathss_,\r\n boolean sort_, Shell shell_)\r\n {\r\n option_.sort = sort_;\r\n Vector v_ = new Vector(); // store Directory\r\n for (int i=0; i<pathss_.length; i++) {\r\n // append \"*\" if a path ends with \"/\"\r\n if (pathss_[i].paths != null && option_.expand)\r\n // expand used here??\r\n for (int j=0; j<pathss_[i].paths.length; j++) {\r\n String path_ = pathss_[i].paths[j];\r\n if (path_.length() > 1 && path_.charAt(path_.length()-1)\r\n == '/')\r\n pathss_[i].paths[j] = path_ + \"*\";\r\n }\r\n Directory[] tmp_ = Common.resolveOnePaths(pathss_[i], option_,\r\n shell_);\r\n \r\n if (tmp_ == null) continue;\r\n for (int j=0; j<tmp_.length; j++) {\r\n v_.addElement(tmp_[j]);\r\n }\r\n }\r\n return v_;\r\n }",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[2].compareTo(arg1[2]);\r\n\t\t\t\t\t}",
"@Test\n public void testSort_intArr_IntegerComparator_Desc_half() {\n IntComparator comparator = IntComparatorDesc.getInstance();\n int[] expResult = DESC_CHECK_HALF_CHECK_ARRAY;\n sorter.sort(data, 0, 8, (Comparator<Integer>) comparator);\n assertArrayEquals(\"Error testing class: \" + className, expResult, data);\n }",
"public Map findAvailableSorters(INavigatorContentDescriptor theSource);",
"boolean getPathPatternSupported();",
"public void testSortJarList() throws Exception {\n\t\tjsystem.launch();\n\t\tScenarioUtils.createAndCleanScenario(jsystem, jsystem.getCurrentScenario());\n\t\tString txt = jsystem.sortJarList();\n\t\tvalidateJarList(txt, 2);\n\t}",
"public void sortStringArray() {\n\t\tSystem.out.println(\"PROPERY BELONGS TO ONLY CHILD CLASS!!\");\n\t}",
"@Test\n\tpublic void testSortNumbersSpecialCharsWithNumFlagOn() throws SortException {\n\t\tList<String> arrayList = sortApplication.sortNumbersSpecialCharsWithNumFlagOn(inputArr5);\n\t\tassertEquals(\"#%356\", arrayList.get(0));\n\t\tassertEquals(\"1 &(*\", arrayList.get(1));\n\t\tassertEquals(\"22#%!\", arrayList.get(2));\n\t\tassertEquals(\"33 *&@\", arrayList.get(3));\n\t\tassertEquals(\"50 @\", arrayList.get(4));\n\t\tassertEquals(\"68!\", arrayList.get(5));\n\t}",
"protected void prepareOrderBy(String query, QueryConfig config) {\n }",
"@Test\r\n public void test8() {\r\n String s1 = \"Abc\";\r\n String s2 = \"abc\";\r\n String s3 = \"Abcd\";\r\n System.out.println(s1.compareTo(s2));\r\n System.out.println(s1.compareTo(s3));\r\n }",
"public String sortOriginOrReturn();",
"@Override\r\n\t\tpublic int compare(String arg0, String arg1) {\n\t\t\treturn arg0.compareTo(arg1);\r\n\t\t}",
"@Test\n\tpublic void testSortStringsSimple() throws SortException {\n\t\tString[] inputArr = new String[] { \"nicholas\", \"jerry\", \"zackary\", \"arthur\", \"benny\" };\n\t\tList<String> arrayList = sortApplication.sortStringsSimple(inputArr);\n\t\tassertEquals(\"arthur\", arrayList.get(0));\n\t\tassertEquals(\"benny\", arrayList.get(1));\n\t\tassertEquals(\"jerry\", arrayList.get(2));\n\t\tassertEquals(\"nicholas\", arrayList.get(3));\n\t\tassertEquals(\"zackary\", arrayList.get(4));\n\t}",
"public final void testSortCriteria() throws Exception\n {\n Vector vect = new Vector();\n final long modifier = 100;\n long sdArr[][] = { { 0, 10 }, { 0, 12 }, { 0, 8 }, { -5, 20 }, { -5, 13 }, { -5, 15 }, { -5, -7 }, { 2, 10 },\n { 2, 8 }, { 2, 2 }, { 12, 14 }, { -5, 5 }, { 10, 2 } };\n long sorted[][] = { { -5, -7 }, { 10, 2 }, { 2, 2 }, { -5, 5 }, { 0, 8 }, { 2, 8 }, { 0, 10 }, { 2, 10 },\n { 0, 12 }, { -5, 13 }, { 12, 14 }, { -5, 15 }, { -5, 20 } };\n\n patchArray(sdArr, modifier);\n patchArray(sorted, modifier);\n\n for (int i = 0; i < sdArr.length; i++)\n {\n vect.addElement(new RecordingImplMock(new Date(sdArr[i][0]), sdArr[i][1]));\n }\n RecordingList recordingList = new RecordingListImpl(vect);\n Comparator comparator = new Comparator();\n\n RecordingList newList = recordingList.sortRecordingList(comparator);\n\n assertNotNull(\"recordingList returned null\", newList);\n\n // check results\n LocatorRecordingSpec lrs = null;\n RecordingRequest req = null;\n\n int i = newList.size();\n for (i = 0; i < newList.size(); i++)\n {\n req = (RecordingRequest) newList.getRecordingRequest(i);\n lrs = (LocatorRecordingSpec) req.getRecordingSpec();\n assertEquals(\"sort criteria is wrong\", sorted[i][1], lrs.getDuration());\n }\n }",
"@Override\n\tpublic int compareTo(Node node) {\n\t\treturn minPath - node.minPath;\n\t}",
"@Test\n\tpublic void testHttpMethodPriorityVsOtherAttributes() {\n\n\t\tthis.requestDefinitions.get(0).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(0).setAccept(MediaType.HTML);\n\n\t\tthis.requestDefinitions.get(1).setHttpMethod(HttpMethod.GET);\n\t\tthis.requestDefinitions.get(1).setAccept(MediaType.UNKNOWN);\n\n\t\tthis.requestDefinitions.get(2).setHttpMethod(HttpMethod.UNKNOWN);\n\t\tthis.requestDefinitions.get(2).setAccept(MediaType.HTML);\n\n\t\tfinal List<RequestDefinition> expected = Arrays.asList(this.requestDefinitions.get(1),\n\t\t\t\tthis.requestDefinitions.get(0), this.requestDefinitions.get(2));\n\n\t\tCollections.sort(this.requestDefinitions, this.comparator);\n\t\tAssert.assertEquals(expected, this.requestDefinitions);\n\t}",
"@Test\n public void f13OrderRULTest() {\n clickOn(\"#thumbnailTab\").moveBy(90, 200);\n scroll(50, VerticalDirection.UP).sleep(1000);\n\n scroll(50, VerticalDirection.DOWN).sleep(1000);\n clickOn(\"#sortAsset\").type(KeyCode.DOWN).type(KeyCode.ENTER);\n\n sleep(1000).moveBy(-90, 200).scroll(50, VerticalDirection.UP).sleep(1000);\n\n boolean isOrdered = true;\n double[] ruls = getRuls();\n\n //Check if the ascending ruls are ordered\n for (int i = 0; i < ruls.length - 1; i++) {\n if (ruls[i] > ruls[i + 1]) {\n isOrdered = false;\n break;\n }\n }\n\n sleep(1000).scroll(50, VerticalDirection.DOWN).sleep(1000);\n assertTrue(\"All RULs after sorting by ascending are ordered from smallest to largest.\", isOrdered);\n }",
"public void step3(){\n\n Collections.sort(names,(String a, String b) -> a.compareTo(b));\n }",
"public void setPriorityFiles(List<String> files);",
"public void testCanonicalize() {\n \tassertEquals(\"//\", new Path(\"///////\").toString());\r\n \tassertEquals(\"/a/b/c\", new Path(\"/a/b//c\").toString());\r\n \tassertEquals(\"//a/b/c\", new Path(\"//a/b//c\").toString());\r\n \tassertEquals(\"a/b/c/\", new Path(\"a/b//c//\").toString());\r\n \r\n \t// Test collapsing single dots\r\n \tassertEquals(\"2.0\", \"/\", new Path(\"/./././.\").toString());\r\n \tassertEquals(\"2.1\", \"/a/b/c\", new Path(\"/a/./././b/c\").toString());\r\n \tassertEquals(\"2.2\", \"/a/b/c\", new Path(\"/a/./b/c/.\").toString());\r\n \tassertEquals(\"2.3\", \"a/b/c\", new Path(\"a/./b/./c\").toString());\r\n \r\n \t// Test collapsing double dots\r\n \tassertEquals(\"3.0\", \"/a/b\", new Path(\"/a/b/c/..\").toString());\r\n \tassertEquals(\"3.1\", \"/\", new Path(\"/a/./b/../..\").toString());\r\n }",
"Sort asc(QueryParameter parameter);",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic int compare(String[] arg0, String[] arg1) {\n\t\t\t\t\t\treturn arg0[1].compareTo(arg1[1]);\r\n\t\t\t\t\t}",
"public int compareTo(AppFile aAF)\n{\n if(_priority!=aAF._priority) return _priority>aAF._priority? -1 : 1;\n return _file.compareTo(aAF._file);\n}",
"public String doSort();",
"@Test\r\n public void SortTest() {\r\n System.out.println(\"sort\");\r\n List<String> array = Arrays.asList(\"3\", \"2\", \"1\");\r\n List<String> expResult = Arrays.asList(\"1\",\"2\",\"3\");\r\n instance.sort(array);\r\n assertEquals(expResult,array);\r\n }",
"@Test\n\tpublic void testAscendingComparator() {\n\t\tList<MockWorker> mockWorkers = createMockWorkers(10);\n\t\tsetAscendingParallelWorkCapacity(mockWorkers);\n\t\tCollections.reverse(mockWorkers);\n\t\tList<WorkerLoadSnapshot> snapshots = createSnapshots(mockWorkers);\n\t\tRandom rng = new Random(-1L);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t\tList<MockWorker> unorderedList = new ArrayList<>(mockWorkers);\n\t\tCollections.shuffle(snapshots);\n\t\tsetAscendingParallelWorkCapacity(unorderedList);\n\t\tCollections.shuffle(snapshots, rng);\n\t\tCollections.sort(snapshots, WorkerLoadSnapshot.ascendingComparator());\n\t\tfor (PairIterator.Pair<MockWorker, WorkerLoadSnapshot> pair\n\t\t\t\t: PairIterator.iterable(mockWorkers, snapshots)) {\n\t\t\tassertSame(pair.getLeft(), pair.getRight().getWorker());\n\t\t}\n\t}",
"@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }",
"@Override\n\t\t public int compare(PathObject lhs, PathObject rhs) {\n\t\t return Double.compare(lhs.getClassProbability(), rhs.getClassProbability()); // Use double compare to safely handle NaN and Infinity\n\t\t }",
"private static void sort(String[] a, int lo, int hi, int d) { \n if (hi <= lo + CUTOFF) {\n insertion(a, lo, hi, d);\n return;\n }\n int lt = lo;\n int gt = hi;\n int v = charAt(a[lo], d);\n int i = lo + 1;\n while (i <= gt) {\n int t = charAt(a[i], d);\n if (t < v) {\n \texch(a, lt++, i++);\n }\n else if (t > v) {\n \texch(a, i, gt--);\n }\n else {\n \ti++;\n }\n }\n //a[lo..lt-1] < v = a[lt..gt] < a[gt+1..hi]. \n sort(a, lo, lt-1, d);\n if (v >= 0) sort(a, lt, gt, d+1);\n sort(a, gt+1, hi, d);\n }",
"public void stringSelectionSort() {\n int nextMin;\n\n for (int i = 0; i < StringList.length - 1; i++) {\n nextMin = i;\n for (int j = i + 1; j < StringList.length; j++) {\n if (StringList[j].compareTo(StringList[nextMin]) < 0)\n nextMin = j;\n }\n if (nextMin != i)\n swapSelectionStrings(StringList, i, nextMin);\n }\n }",
"@Override\n\tpublic String sort(String content) {\n\t\treturn null;\n\t}"
]
| [
"0.62824863",
"0.6015238",
"0.5960595",
"0.57146513",
"0.5471172",
"0.54697883",
"0.5418352",
"0.51727045",
"0.5148038",
"0.5074766",
"0.50677794",
"0.5062157",
"0.49795875",
"0.4962613",
"0.4942323",
"0.49168313",
"0.4905748",
"0.48971912",
"0.48964572",
"0.488276",
"0.48795214",
"0.48615423",
"0.4859135",
"0.4858213",
"0.485339",
"0.4852673",
"0.48475894",
"0.48329243",
"0.4829013",
"0.48198956",
"0.48139483",
"0.4810066",
"0.48052162",
"0.47878137",
"0.47811368",
"0.47786883",
"0.47775197",
"0.47706673",
"0.47705892",
"0.47694772",
"0.47673967",
"0.4762803",
"0.47557205",
"0.47540346",
"0.4753745",
"0.47528002",
"0.47527605",
"0.47493863",
"0.47462103",
"0.47430724",
"0.47362658",
"0.47343928",
"0.4733326",
"0.4724277",
"0.47210023",
"0.47135958",
"0.47064656",
"0.4706401",
"0.469829",
"0.46975446",
"0.46913087",
"0.46836293",
"0.4666027",
"0.46604437",
"0.46603134",
"0.46589813",
"0.46585485",
"0.465228",
"0.465228",
"0.465228",
"0.46405926",
"0.46371117",
"0.46357647",
"0.46352646",
"0.4632488",
"0.4608065",
"0.46022487",
"0.459903",
"0.45981595",
"0.45937678",
"0.45907494",
"0.4585649",
"0.45829988",
"0.4579801",
"0.45773554",
"0.45773163",
"0.45771003",
"0.45760512",
"0.45699936",
"0.4569693",
"0.4569693",
"0.4566305",
"0.45658216",
"0.45566422",
"0.45565432",
"0.45417696",
"0.45417696",
"0.45413104",
"0.45364258",
"0.4530748"
]
| 0.6639164 | 0 |
TODO Autogenerated method stub | @Override
public void configure() throws Exception {
ProducerTemplate camelTemplate = getContext().createProducerTemplate();
CamelHelper.getInstance().setHttpCamelTemplate(camelTemplate);
//endpoint 설정
from("jetty:http://0.0.0.0:9999"+"/testApi")
.routeId("HTTP_TEST_API")
.process(testProcessor)
;
} | {
"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 |
Test of findUsuario method, of class UsuarioJpaController. | @Test
public void testFindUsuario_Integer() {
System.out.println("findUsuario");
Integer id = 1;
String user = "[email protected]";
UsuarioJpaController instance = new UsuarioJpaController(emf);
Usuario expResult = instance.findUsuario(user);
Usuario result = instance.findUsuario(id);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
if (!result.equals(expResult)) {
fail("El test de busqueda por usuario ha fallado");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testFindUsuario_String() {\n System.out.println(\"findUsuario\");\n Integer user = 1;\n Usuario usuario = new Usuario(1, \"[email protected]\", \"12345\", new Date(), true);\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.findUsuario(user);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de busqueda por id ha fallado\");\n }\n }",
"@Test\r\n public void testCreateUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n UsuarioEntity buscado = usuarioLogic.createUsuario(entity);\r\n Assert.assertNotNull(buscado);\r\n \r\n buscado = em.find(UsuarioEntity.class, entity.getId());\r\n Assert.assertEquals(entity, buscado);\r\n }",
"@Test\n public void testAutenticacion() {\n System.out.println(\"autenticacion\");\n Usuario usuario = new Usuario(1, \"[email protected]\", \"12345\", new Date(), true);//parametro in\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.autenticacion(usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de autenticaccion ha fallado\");\n }\n }",
"@Test\n\tvoid shouldFindUserWithCorrectId() throws Exception {\n\t\tUser user = this.userService.findUser(\"antonio98\").orElse(null);\n\t\tAssertions.assertThat(user.getUsername()).isEqualTo(\"antonio98\");\n\t}",
"Usuario findById(long id);",
"@Test\r\n\tpublic void CT01ConsultarUsuario_com_sucesso() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\tUsuario resultadoObtido = null;\r\n\t\tDAOFactory mySQLFactory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);\r\n\t\tIUsuarioDAO iUsuarioDAO = mySQLFactory.getUsuarioDAO();\r\n\t\t// acao\r\n\t\tresultadoObtido = iUsuarioDAO.consulta(usuario.getRa());\r\n\t\t// verificacao\r\n\t\tassertTrue(resultadoObtido.equals(usuario));\r\n\t}",
"public Usuario findUserByCodigo(Integer codigo) {\n Usuario user = null;\n try {\n// user = (Usuario) this.em.createNamedQuery(\"Usuario.findByCodigo\")\n// .setParameter(\"codigo\", codigo)\n// .getSingleResult();\n\n if (this.em.isOpen()) {\n Query query = this.em.createNamedQuery(\"Usuario.findByCodigo\")\n .setParameter(\"codigo\", codigo);\n\n user = (Usuario) query.getSingleResult();\n }\n } catch (Exception e) {\n// e.printStackTrace();\n }\n\n return user;\n }",
"public Usuario findbyIdUsuario(Long idUsr){\n\t\t\t\t em.getTransaction().begin();\n\t\t\t\t Usuario u= em.find(Usuario.class, idUsr);\n\t\t\t\t em.getTransaction().commit();\n\t\t\t\t return u;\n\t\t\t }",
"@Override\n\tpublic UsuariosEntity findById(String ciUsuario) {\n\t\treturn iUsuarios.findById(ciUsuario).orElseThrow(null);\n\t}",
"@Override\r\n\tpublic Usuario encontrarUsuario(Long id) throws Exception {\n\t\treturn iUsuario.findById(id).orElseThrow(() -> new Exception(\"Error\"));\r\n\r\n\t}",
"@Repository\npublic interface UsuarioRepository extends JpaRepository<EUsuario, Long> {\n\t\n\t/**\n\t * Buscar por ID\n\t * \n\t * @param usuarioId\n\t * @return EUsuario\n\t */\n\tpublic EUsuario findById(long usuarioId);\n\t\n\t/**\n\t * Buscar por nome ou parcial\n\t * \n\t * @param nome\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByNome(String nome);\n\t\n\t/**\n\t * Buscar por login\n\t * \n\t * @param login\n\t * @return EUsuario\n\t */\n\tpublic EUsuario findByLogin(String login);\n\t\n\t/**\n\t * Buscar por Cargo\n\t * \n\t * @param cargo\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByCargo(String cargo);\n\t\n\t/**\n\t * Buscar por Nivel de Acesso\n\t * \n\t * @param nivelAcesso\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByNivelAcesso(int nivelAcesso);\n\t\n\t/**\n\t * Executa query no banco\n\t * \n\t * @param query\n\t * @return List<EUsuario>\n\t */\n\t@Query(\"SELECT u FROM EUsuario u WHERE u.nome LIKE :query\")\n\tpublic List<EUsuario> findByQuery(@Param(\"query\") String query);\n\t\n}",
"@Test\n public void testFindBySsoId() {\n LOGGER.info(\"findBySsoId\");\n String ssoId = \"sam\";\n AppUser result = userRepo.findBySsoId(ssoId);\n assertNotNull(result);\n }",
"AuditoriaUsuario find(Object id);",
"public List<Usuario> findAllUsuarios ();",
"@Override\r\n\tpublic Usuario findById(Usuario t) {\n\t\treturn null;\r\n\t}",
"@RequestMapping(value = \"/getUsuarioById/{usuarioId}\", method = RequestMethod.GET)\r\n public @ResponseBody Usuario getUsuario(@PathVariable(\"usuarioId\") String usuarioId) {\r\n return this.usuarioRepository.findUsuarioByUsername(usuarioId);\r\n }",
"@Test\n\tvoid shouldFindUserWithCorrectUsername() throws Exception {\n\t\tUser user = this.userService.findUserByUsername(\"antonio98\");\n\t\tAssertions.assertThat(user.getUsername()).isEqualTo(\"antonio98\");\n\t}",
"@RequestMapping(value = \"/{idusuario}\", \n\t method = RequestMethod.GET, \n\t headers=\"Accept=application/json\"\n\t ) \n\tpublic Usuario getUsuario(@PathVariable Long idusuario){\n\t\tSystem.out.println(idusuario);\n\t\treturn usuariorepository.findOne(idusuario);\n\t}",
"@Test\n public void testRegistrar() throws Exception { \n long sufijo = System.currentTimeMillis();\n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(sufijo); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin());\n assertNotNull(usuarioRegistrado);\n }",
"@Test\r\n public void testDGetByUserName() {\r\n System.out.println(\"getByUserName\");\r\n \r\n String userName = \"admin\";\r\n UsuarioDao instance = new UsuarioDao();\r\n Usuario result = instance.getByUserName(userName);\r\n \r\n assertNotNull(result);\r\n }",
"@Test\n public void testFindUserById() {\n System.out.println(\"findUserById\");\n long userId = testUsers.get(0).getId();\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n User expResult = testUsers.get(0);\n User result = instance.findUserById(userId);\n assertEquals(expResult.getEmail(), result.getEmail());\n }",
"List<Usuario> findAll();",
"@Test\n\tpublic void testFindUserById() throws Exception {\n\t\tSqlSession sqlSession = factory.openSession();\n\t\tUser user = sqlSession.selectOne(\"com.wistron.meal.user.findUserById\",3);\n\t\tSystem.out.println(user);\n\t\tsqlSession.close();\n\t\t\n\t}",
"@Test\r\n public void testUpdateUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = dataUs.get(0);\r\n UsuarioEntity nuevo = factory.manufacturePojo(UsuarioEntity.class);\r\n nuevo.setId(entity.getId());\r\n \r\n usuarioLogic.updateUsuario(nuevo);\r\n \r\n UsuarioEntity buscado = em.find(UsuarioEntity.class, entity.getId());\r\n \r\n Assert.assertEquals(nuevo.getId(), buscado.getId());\r\n }",
"@Override\n\tpublic Usuario findById(Integer id) {\n\t\treturn usuarioRepository.getById(id);\n\t}",
"List<UsuarioEntity> findByTipoUsuario(TipoUsuario tipoUsuario);",
"@Test\r\n public void testDeleteUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = dataUs.get(0);\r\n usuarioLogic.deleteUsuario(entity.getId());\r\n UsuarioEntity deleted = em.find(UsuarioEntity.class, entity.getId());\r\n Assert.assertNull(deleted);\r\n }",
"@Override\n\tpublic Usuario buscarPorId(int id){\n\t\treturn em.find(Usuario.class, id);\n\t}",
"@Override\n\tpublic Optional<Login> findbyId(long usuario) {\n\t\treturn this.loginDao.findById(usuario);\n\t}",
"@Test\r\n public void testEGet_int() {\r\n System.out.println(\"get\");\r\n \r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n Usuario obj = instance.getByUserName(\"admin\");\r\n \r\n int usuarioId = obj.getId();\r\n \r\n Usuario result = instance.get(usuarioId);\r\n \r\n assertEquals(usuarioId, result.getId());\r\n }",
"@Override\r\n\tpublic Usuario findById(int id) {\n\t\treturn null;\r\n\t}",
"public UsuarioDTO consultarUsuario(String idUsuario);",
"public Usuario findByIdCad(String idCad);",
"@Override\n public Optional<Usuario> buscaPorNombre(String nombre){\n return usuarioRepository.buscaPorNombre(nombre);\n }",
"@Test\n\t public void testRetrieveById(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.find(Users.class,\"a1234567\")).thenReturn(user);\n\t\t\t\tUsers savedUser = userDao.retrieveById(\"a1234567\");\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing retrieveById:.\",se);\n\t\t }\n\t }",
"public Usuario getUsuarioByID (int idUsuario) {\n Usuario usuario = null;\n Transaction trns = null;\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n trns = session.beginTransaction();\n String queryString = \"from Usuario where id_usuario = :idToFind\";\n Query query = session.createQuery(queryString);\n query.setInteger(\"idToFind\", idUsuario);\n usuario = (Usuario) query.uniqueResult();\n } catch (RuntimeException e){\n e.printStackTrace();\n } finally {\n session.flush();\n session.close();\n } \n\n return usuario;\n }",
"@Test\n\tpublic void testFindByFirstName() throws Exception {\n\t\tOptional<User> user = users.findByUsername(\"agooniaOn\");\n\t\tassert user.isPresent();\n\t\tassert user.get().equals(ago);\n\t}",
"@Override\n\t@Transactional(readOnly = true)\n\tpublic SeguUsuario findByNombreUsuario(String nombreUsuario) {\n\t\treturn usuarioDao.findByNombreUsuario(nombreUsuario);\n\t}",
"@GetMapping(\"/usuarios/{id}\")\n\t public ResponseEntity<Usuario> get(@PathVariable Integer id) {\n\t try {\n\t \tUsuario usuarios = service.get(id);\n\t return new ResponseEntity<Usuario>(usuarios, HttpStatus.OK);\n\t } catch (NoSuchElementException e) {\n\t return new ResponseEntity<Usuario>(HttpStatus.NOT_FOUND);\n\t } \n\t }",
"@Override\n\tpublic Usuario findByName(String name) {\n\t\treturn null;\n\t}",
"public UsuarioDTO consultarUsuario(String idAfiliado);",
"@Test\r\n\tpublic void CT06ConsultarUsuarioPorDados() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\t// acao\r\n\t\ttry {\r\n\t\t\tSystem.out.println(usuario.getRa());\r\n\t\t\tSystem.out.println(usuario.getNome());\r\n\t\t} catch (Exception e) {\r\n\t\t\tassertEquals(\"Dados inválidos\", e.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n\tpublic User buscarUsuario(Long id) {\n\t\treturn repository.findOne(id);\n\t}",
"@Override\r\n\tpublic Usuario findById(String id) {\n\t\treturn em.find(Usuario.class,id);\r\n\t}",
"@Test\n public void getComentarioTest() {\n ComentarioEntity entity = data.get(0);\n ComentarioEntity nuevaEntity = comentarioPersistence.find(dataLibro.get(0).getId(), entity.getId());\n Assert.assertNotNull(nuevaEntity);\n Assert.assertEquals(entity.getNombreUsuario(), nuevaEntity.getNombreUsuario());\n }",
"@Test\r\n public void testBuscarUsuarios() {\r\n System.out.println(\"BuscarUsuarios\");\r\n Usuario pusuario = new Usuario(); \r\n pusuario.setUsuario(\"MSantiago\");\r\n \r\n BLUsuario instance = new BLUsuario();\r\n \r\n Usuario result = instance.BuscarUsuarios(pusuario); \r\n if(result == null) fail(\"La busqueda no ha retornado resultado.\");\r\n else\r\n {\r\n assertEquals(pusuario.getUsuario(),result.getUsuario());\r\n System.out.println(\"Se encontró el usuario.\");\r\n }\r\n\r\n \r\n }",
"@Test\n public void testConsultarUsuarios() {\n System.out.println(\"consultarUsuarios\");\n BibliotecarioController instance = new BibliotecarioController();\n List<Usuario> expResult = new UsuariosList().getUsuarios();\n List<Usuario> result = instance.consultarUsuarios();\n assertEquals(expResult, result);\n }",
"@Test\n\tpublic void shouldFindUserWithGivenId() throws UserNotFoundException\n\t{\n\t\tUserProfile user = new UserProfile();\n\t\tuser.setId(1);\n\t\t\n\t\twhen(userDao.findUserById(user.getId())).thenReturn(user);\n\t\t\n\t\tassertEquals(user, userService.findUserById(user.getId()));\n\t}",
"@Test\n void find() {\n UserEntity userEntity = new UserEntity();\n userEntity.setId(2);\n userEntity.setFirstName(\"pippo\");\n userEntity.setLastName(\"pluto\");\n UserEntity save = repository.save(userEntity);\n\n List<UserEntity> all = repository.findAll();\n Assert.isTrue(3 == all.size());\n }",
"@Override\n\tpublic Usuario findById(Long id) {\n\t\treturn null;\n\t}",
"public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }",
"public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }",
"@Repository\npublic interface UsuariosPerfilRepository extends JpaRepository<UsuarioPerfil, Integer> {\n\n\tUsuario findByUsername(String username);\t\n\n}",
"@RequestMapping(value = \"/find/{id}\", method = RequestMethod.GET)\n @ResponseBody\n public ResponseEntity findUser(@PathVariable long id) {\n User user = userService.findById(id);\n if (user == null) {\n return new ResponseEntity(HttpStatus.NO_CONTENT);\n }\n return new ResponseEntity(user, HttpStatus.OK);\n }",
"@Test\n void findById() {\n when(ownerRepository.findById(anyLong())).thenReturn(Optional.of(returnOwner));\n\n Owner owner = service.findById(1L);\n\n assertNotNull(owner);\n }",
"@Override\n\tpublic SeguUsuario findById(Long id) {\n\t\treturn usuarioDao.findById(id).orElse(null);\n\t}",
"@Test\n public void testEliminarCliente() throws Exception {\n long sufijo = System.currentTimeMillis(); \n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(Long.valueOf(sufijo)); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n servicio.eliminarCliente(usuario.getLogin()); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin()); \n assertNull(usuarioRegistrado); \n }",
"@Test\n public void testFindByUsername() {\n\n }",
"@Test\r\n\tpublic void CT05ConsultarLivroComNomeNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNome_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome inválido\", e.getMessage());\r\n\t\t}\r\n\t}",
"@Test\n public void testFindByLogin() throws Exception {\n String userName = String.valueOf(databaseTester.getConnection().createDataSet().getTable(\"User\")\n .getValue(0, \"login\"));\n// User user = jdbcUserDao.findByLogin(userName);\n// assertNotNull(\"Should find user by login\", user);\n }",
"@Test\n\tpublic void FindUserByUsername() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\t\t\n\t\tString username = user.getUsername();\n\t\tUser user4 = userRepository.findByUsername(username);\n\t\n\t\tassertThat(user4).isNotNull();\n\t\tassertThat(user4).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t\t\n\t}",
"public User findUserById(int id);",
"@Override\n\t@Transactional\n\tpublic UserDetails searchUser(String email) {\n\t\ttry {\t\n\t\t\t\n\t\t\tQuery qUser = manager.createQuery(\"from Usuario where email = :email and ativo = :ativo\")\n\t\t\t\t\t.setParameter(\"email\", email)\n\t\t\t\t\t.setParameter(\"ativo\", true);\n\t\t\tList<Usuario> usuarios = qUser.getResultList();\n\t\t\t\n\t\t\t\n\t\t\tQuery qAcess = manager.createQuery(\"from Acesso where usuario.id = :id and acesso = :acesso\")\n\t\t\t\t\t.setParameter(\"id\", usuarios.get(0).getId())\n\t\t\t\t\t.setParameter(\"acesso\", true);\n\t\t\tList<Acesso> acessos = qAcess.getResultList();\n\t\t\n\t\t\t/*\n\t\t\tAcesso acesso = new Acesso();\n\t\t\tUsuario usuario = new Usuario();\n\t\t\t\n\t\t\tusuario.setNome(\"Daniel\");\n\t\t\tusuario.setEmail(\"\");\n\t\t\tacesso.setSenha(\"$2a$10$jdQpiR35ZZVdrFQYUW7q/evtl1Xr6ED3y.pIzukdgzvF0PIBtrmzS\");\n\t\t\tacesso.setAcesso(true);\n\t\t\tacesso.setUsuario(usuario);\n\t\t\t\t\t\n\t\t\treturn new UsuarioDetails(acesso.getUsuario().getNome(), acesso.getUsuario().getEmail(), acesso.getSenha(), acesso.isAcesso());\n\t\t\t*/\n\t\t\treturn new UsuarioDetails(acessos.get(0).getUsuario().getNome(), acessos.get(0).getUsuario().getEmail(), acessos.get(0).getSenha(), acessos.get(0).isAcesso());\n\t\n\t\t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t} finally {\n\t\t\t// TODO: handle finally clause\n\t\t\tmanager.close();\n\t\t}\n\t}",
"@Transactional\npublic interface UsuarioRepository extends JpaRepository<Usuario, Long> {\n Usuario findByUuid(String uuid);\n}",
"@Override\n\tpublic Usuario find(Long id) {\n\t\treturn null;\n\t}",
"public Usuario findUserById(Integer id){\n\t\treturn usuarios.findById(id);\n\t}",
"@Test\r\n public void testGetIdUsuario() {\r\n System.out.println(\"getIdUsuario\");\r\n Usuario instance = new Usuario();\r\n Integer expResult = null;\r\n Integer result = instance.getIdUsuario();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Usuario listarPorId(Usuario entidad) throws Exception {\n\t\tList<Usuario> lista = new ArrayList<>();\n\n\t\tQuery query = entityManager.createQuery(\"from Usuario c where c.id = ?1\");\n\t\tquery.setParameter(1, entidad.getId());\n\n\t\tlista = (List<Usuario>) query.getResultList();\n\n\t\tUsuario Usuario = new Usuario();\n\n\t\t// Nos aseguramos que exista un valor para retornar\n\t\tif (lista != null && !lista.isEmpty()) {\n\t\t\tUsuario = lista.get(0);\n\t\t}\n\n\t\treturn Usuario;\n\t}",
"public Usuario find(Usuario usuario) throws HibernateException{\n\n\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\ttry {\n\t\t\tCriteria cri = session.createCriteria(usuario.getClass())\n\t\t\t\t\t.add(Restrictions.eq(\"login\", usuario.getLogin()))\n\t\t\t\t\t.add(Restrictions.eq(\"senha\", usuario.getSenha()));\n\t\t\t\n\t\t\tlogger.info(\"Validando usuario e senha.\");\n\t\t\t// consulta na base se o usuario existe\n\t\t\tuser = (Usuario) cri.uniqueResult();\n\t\t\tif (user != null && usuario.getLogin().equals(user.getLogin())\n\t\t\t\t\t && usuario.getSenha().equals(user.getSenha())) {\n\t\t\t\tlogger.info(\"Usuario logado...\");\n\t\t\t\treturn user;\n\t\t\t} else {\n\t\t\t\tlogger.info(\"Usuario ou senha invalidos.\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}",
"@Test\n\tpublic void shouldFindUserByLogin()\n\t{\n\t\tUserProfile user = new UserProfile();\n\t\tuser.setId(100);\n\t\tuser.setLogin(\"testUser\");\n\t\twhen(userDao.findUserByLogin(user.getLogin())).thenReturn(user);\n\t\t\n\t\tassertEquals(user, userService.findUserByLogin(user.getLogin()));\n\t}",
"@Test\r\n\tpublic void CT05CadastrarUsuarioComNomeNulo() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNomeNulo();\r\n\t\t\tfail(\"deveria lançar uma exceção\");\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome invalido\", e.getMessage());\r\n\t\t}\r\n\t}",
"public CompradorEntity findByUsuario(String usuario) {\r\n TypedQuery query = em.createQuery(\"Select e From CompradorEntity e where e.usuario = :usuario\", CompradorEntity.class);\r\n\r\n query = query.setParameter(\"usuario\", usuario);\r\n\r\n List<CompradorEntity> sameUsuario = query.getResultList();\r\n CompradorEntity result;\r\n if (sameUsuario == null) {\r\n result = null;\r\n } else if (sameUsuario.isEmpty()) {\r\n result = null;\r\n } else {\r\n result = sameUsuario.get(0);\r\n }\r\n\r\n return result;\r\n }",
"@RequestMapping(value = \"/getUsuarioByEmail/{usuarioEmail}\", method = RequestMethod.GET)\r\n public @ResponseBody Usuario getUsuarioByEmail(@PathVariable(\"usuarioEmail\") String usuarioEmail) {\r\n return this.usuarioRepository.findUsuarioByEmail(usuarioEmail);\r\n }",
"@Test\n public void testGetUserByUID_Found() throws Exception {\n User user = new User();\n user.setUserUID(123);\n user.setUsername(\"resetme\");\n user.setPasswordTemporary(false);\n\n when(userService.getUserByUID(123)).thenReturn(user);\n\n mockMvc.perform(get(\"/api/users/123\").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk());\n\n verify(userService, times(1)).getUserByUID(anyLong());\n }",
"@Test\n void findByUsername_userPresent_test() {\n // arrange\n UserEntity expectedEntity = UserEntity.builder()\n .withId(1L)\n .withUsername(\"MaxMust\")\n .withFirstname(\"Max\")\n .withLastname(\"Mustermann\")\n .withEmail(\"[email protected]\")\n .build();\n\n // act\n Optional<UserEntity> foundUser = userRepository.findByUsername(\"MaxMust\");\n\n // assert\n assertThat(foundUser).isNotEmpty();\n assertThat(foundUser.get()).isEqualTo(expectedEntity);\n }",
"public Usuario verificarDatos(String usuario, String password) throws Exception{\n Usuario us = new Usuario(usuario, password);\n try {\n Session session = HibernateUtil.getSessionFactory().openSession();\n String hql = \"from Usuario where usuario = '\" + usuario\n + \"' and password = '\" + password + \"'\";\n Query query = session.createQuery(hql);\n \n if(!query.list().isEmpty()) {\n us = (Usuario) query.list().get(0);\n } \n } catch (Exception e){\n throw e;\n }\n return us;\n /*\n desde el if se cambia\n query.setParameter(\"usuario\", usuario);\n query.setParameter(\"password\", password);\n us = (Usuario) query.uniqueResult();\n \n \n */\n }",
"@Test\n\tpublic void test() throws Exception {\n\n\t\tUser pruk = new User();\n\t\tpruk.setId(1);\n\t\tpruk.setName(\"Pruk\");\n\t\tpruk.setEmail(\"[email protected]\");\n\t\tgiven(this.userRepository.findById(1)).willReturn(Optional.of(pruk));\n\t\t\n\t\tMvcResult result = this.mvc.perform(get(\"/user/1\").accept(MediaType.APPLICATION_JSON))\n\t\t\t\t.andExpect(status().isOk()).andReturn();\n\n\t\tString resultJson = result.getResponse().getContentAsString();\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tUserResponse response = mapper.readValue(resultJson, UserResponse.class);\n\t\tassertEquals(1, response.getId());\n\t\tassertEquals(\"[email protected]\",response.getEmail());\n\t\tassertEquals(\"Pruk\",response.getName());\n\n\n\t}",
"@Test\n\tvoid shouldFindUserWithIncorrectId() throws Exception {\n\t\tUser user = this.userService.findUser(\"antonio98\").orElse(null);\n\t\tAssertions.assertThat(user.getUsername()).isNotEqualTo(\"fernando98\");\n\t}",
"@Test\r\n public void testGGetContratistas() {\r\n System.out.println(\"getContratistas\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> result = instance.getContratistas();\r\n \r\n assertFalse(result.isEmpty());\r\n }",
"@Test\n public void testFindUserByFilter() {\n System.out.println(\"findUserByFilter\");\n String filter = \"adrian\";\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n List<User> result = instance.findUserByFilter(filter);\n assertEquals(1, result.size());\n assertEquals(\"adrian\", result.get(0).getUsername());\n }",
"public User findById(int userId);",
"public interface UsuarioCrud extends CrudRepository<Usuario, Long> {\r\n\r\n\t}",
"@Test\n public void testSysUser() {\n\n SysUser user = sysUserService.findByUsername(\"admin\");\n System.out.println(\"user: \" + user);\n }",
"@RequestMapping(value = \"/usuarioasignado/{idusuario}\", \n\t method = RequestMethod.GET, \n\t headers=\"Accept=application/json\"\n\t ) \n\tpublic UsuarioAsignado getUsuarioAsignado(@PathVariable Long idusuario){\n\t\tSystem.out.println(idusuario);\n\t\treturn usuarioAsignadoRepository.findOne(idusuario);\n\t}",
"public List<Usuario> listarUsuario() {\n \n List<Usuario> lista = usuarioDAO.findAll();\n return lista;\n \n \n\n }",
"public Usuario obtenerUsuario(int id) {\n return this.usuarioFacade.find(id);\n }",
"@Test\n public void getEmpleadoTest() {\n EmpleadoEntity entity = data.get(0);\n EmpleadoEntity resultEntity = empleadoLogic.getEmpleado(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNombreEmpleado(), resultEntity.getNombreEmpleado());\n Assert.assertEquals(entity.getNombreUsuario(), resultEntity.getNombreUsuario());\n }",
"User findUserById(Long id) throws Exception;",
"public Usuario findByNick(String nick){\n\t\t\t\t\t\tList<Usuario> listado;\n\t\t\t\t\t\tUsuario u=null;\n\t\t\t\t\t\tlistado =findAllUsuarios();\n\t\t\t\t\t\tem.getTransaction().begin();\n\t\t\t\t\t\tfor (Usuario us:listado){\n\t\t\t\t\t\t\tif (us.getNick().equals(nick)){\n\t\t\t\t\t\t\t\tu=us;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tem.getTransaction().commit();\n\t\t\t\t\t\treturn u;\n\t\t\t\t\t}",
"@Test\n public void createComentarioTest() {\n PodamFactory factory = new PodamFactoryImpl();\n ComentarioEntity nuevaEntity = factory.manufacturePojo(ComentarioEntity.class);\n ComentarioEntity resultado = comentarioPersistence.create(nuevaEntity);\n\n Assert.assertNotNull(resultado);\n\n ComentarioEntity entity = em.find(ComentarioEntity.class, resultado.getId());\n\n Assert.assertEquals(nuevaEntity.getNombreUsuario(), entity.getNombreUsuario());\n \n }",
"@Test\r\n public void testFind() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n MonitoriaEntity nuevaEntity = persistence.find(entity.getId());\r\n Assert.assertNotNull(nuevaEntity);\r\n Assert.assertEquals(entity.getId(), nuevaEntity.getId());\r\n Assert.assertEquals(entity.getIdMonitor(), nuevaEntity.getIdMonitor());\r\n Assert.assertEquals(entity.getTipo(), nuevaEntity.getTipo());\r\n \r\n }",
"@Test\r\n @Ignore\r\n public void testFindPaciente() {\r\n System.out.println(\"findPaciente\");\r\n String termo = \"\";\r\n EnfermeiroDaoImpl instance = new EnfermeiroDaoImpl();\r\n List<Enfermeiro> expResult = null;\r\n List<Enfermeiro> result = instance.findPaciente(termo);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Test\n public void findByIdTest() {\n }",
"@Test\n public void findByIdTest() {\n }",
"@Test\r\n\tpublic void CT01CadastrarUsuarioComDadosValidos() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\tUsuario usuario = new Usuario();\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comDadosValidos();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tfail(\"nao deve falhar\");\r\n\t\t}\r\n\t}",
"@RequestMapping(value = \"/consultarusuario\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public CommonsResponse finduser(@RequestParam String usuario, @RequestParam String llave_seguridad, HttpServletRequest request)\n {\n CommonsResponse response = new CommonsResponse();\n try\n {\n logger.debug(\"Se valida la licencia si puede consumir los procesos.\");\n GatewayBaseBean.validateLicenceToWS(llave_seguridad, webUtils.getClientIp(request));\n response.setResponse(userServices.findUser(usuario));\n }\n catch (ParamsException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.error(\"Parametros de Licencia Errados WS [consultarusuario], key[\"+llave_seguridad+\"].\", ex);\n return response;\n }\n catch (LicenseException ex)\n {\n response.toLicenceWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode(), llave_seguridad);\n logger.error(\"Parametros de Licencia Errados WS [consultarusuario].\", ex);\n return response;\n }\n catch (ServiceException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.warn(\"Error de Servicio WS [consultarusuario].\", ex);\n return response;\n }\n catch (Exception ex)\n {\n logger.error(\"Error Generico en WS [consultarusuario].\", ex);\n GatewayBaseBean.matchToResponses(response);\n return response;\n }\n logger.info(\"Se retorna respuesta efectiva del WS [consultarusuario].\");\n return response.toOk();\n }",
"public interface ParametrageAppliRepository extends CrudRepository<ParametresAppliDTO, Integer> {\n /**\n * This method will find an User instance in the database by its email.\n * Note that this method is not implemented and its working code will be\n * automatically generated from its signature by Spring Data JPA.\n */\n\n public ParametresAppliDTO findByTypeEnvironnement(int idTypeEnvironement);\n\n\n}",
"@Test\n public void testAutenticacionGoogle() {\n System.out.println(\"autenticacionGoogle\");\n Usuario usuario = new Usuario(1, \"[email protected]\", \"1\", new Date(), true);;\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.autenticacionGoogle(usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"The test case is a prototype.\");\n }\n }",
"@Test\n\tpublic void getOwnerByIdTest() throws Exception {\n\t\tmockMvc.perform(get(\"/owner/4\"))\n\t\t.andExpect(status().isOk())\n\t\t.andExpect(content().contentType(contentType))\n\t\t.andExpect(jsonPath(\"$.id\", is(4)))\n\t\t.andExpect(jsonPath(\"$.firstName\", is(\"Harold\")))\n\t\t.andExpect(jsonPath(\"$.lastName\", is(\"Davis\")))\n\t\t.andExpect(jsonPath(\"$.city\", is(\"Windsor\")))\n\t\t.andExpect(jsonPath(\"$.address\", is(\"563 Friendly St.\")))\n\t\t.andExpect(jsonPath(\"$.telephone\", is(\"6085553198\")));\n\t}",
"User findByUsername(String username) throws DataAccessException;"
]
| [
"0.7587799",
"0.72525066",
"0.72473514",
"0.7129614",
"0.7074805",
"0.70224684",
"0.69820523",
"0.6967543",
"0.686236",
"0.6858243",
"0.6812534",
"0.67546934",
"0.67413616",
"0.6698422",
"0.6583436",
"0.65754485",
"0.6572667",
"0.6565002",
"0.65492016",
"0.65482223",
"0.6542783",
"0.6541865",
"0.6540348",
"0.65393287",
"0.6524479",
"0.65135926",
"0.651085",
"0.6502972",
"0.6497741",
"0.64904064",
"0.64894176",
"0.64455336",
"0.64411163",
"0.6439063",
"0.6410288",
"0.6397687",
"0.6389749",
"0.6376733",
"0.6374027",
"0.63739425",
"0.6357718",
"0.6341565",
"0.6316246",
"0.63094616",
"0.63048685",
"0.6302623",
"0.6299441",
"0.6297689",
"0.62749183",
"0.6274048",
"0.6266903",
"0.6266903",
"0.6266054",
"0.6264028",
"0.625799",
"0.62570477",
"0.6250175",
"0.62475884",
"0.62394136",
"0.62287194",
"0.6223144",
"0.6211371",
"0.6205921",
"0.6200118",
"0.61963767",
"0.619611",
"0.6188803",
"0.6180522",
"0.61621237",
"0.6154853",
"0.61385554",
"0.61273694",
"0.6102566",
"0.6096589",
"0.6085357",
"0.6075915",
"0.60724723",
"0.60532475",
"0.6040098",
"0.6029764",
"0.6022723",
"0.6018747",
"0.60164404",
"0.6014704",
"0.6011069",
"0.60051453",
"0.60009384",
"0.5999452",
"0.5993567",
"0.59912425",
"0.5990707",
"0.5985215",
"0.5973443",
"0.5973443",
"0.5964814",
"0.59633404",
"0.59630686",
"0.59588563",
"0.5955513",
"0.5953772"
]
| 0.75905055 | 0 |
Test of findUsuario method, of class UsuarioJpaController. | @Test
public void testFindUsuario_String() {
System.out.println("findUsuario");
Integer user = 1;
Usuario usuario = new Usuario(1, "[email protected]", "12345", new Date(), true);
UsuarioJpaController instance = new UsuarioJpaController(emf);
Usuario expResult = instance.findUsuario(usuario.getIdUsuario());
Usuario result = instance.findUsuario(user);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
if (!result.equals(expResult)) {
fail("El test de busqueda por id ha fallado");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testFindUsuario_Integer() {\n System.out.println(\"findUsuario\");\n Integer id = 1;\n String user = \"[email protected]\";\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(user);\n Usuario result = instance.findUsuario(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de busqueda por usuario ha fallado\");\n }\n }",
"@Test\r\n public void testCreateUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n UsuarioEntity buscado = usuarioLogic.createUsuario(entity);\r\n Assert.assertNotNull(buscado);\r\n \r\n buscado = em.find(UsuarioEntity.class, entity.getId());\r\n Assert.assertEquals(entity, buscado);\r\n }",
"@Test\n public void testAutenticacion() {\n System.out.println(\"autenticacion\");\n Usuario usuario = new Usuario(1, \"[email protected]\", \"12345\", new Date(), true);//parametro in\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.autenticacion(usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de autenticaccion ha fallado\");\n }\n }",
"@Test\n\tvoid shouldFindUserWithCorrectId() throws Exception {\n\t\tUser user = this.userService.findUser(\"antonio98\").orElse(null);\n\t\tAssertions.assertThat(user.getUsername()).isEqualTo(\"antonio98\");\n\t}",
"Usuario findById(long id);",
"@Test\r\n\tpublic void CT01ConsultarUsuario_com_sucesso() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\tUsuario resultadoObtido = null;\r\n\t\tDAOFactory mySQLFactory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);\r\n\t\tIUsuarioDAO iUsuarioDAO = mySQLFactory.getUsuarioDAO();\r\n\t\t// acao\r\n\t\tresultadoObtido = iUsuarioDAO.consulta(usuario.getRa());\r\n\t\t// verificacao\r\n\t\tassertTrue(resultadoObtido.equals(usuario));\r\n\t}",
"public Usuario findUserByCodigo(Integer codigo) {\n Usuario user = null;\n try {\n// user = (Usuario) this.em.createNamedQuery(\"Usuario.findByCodigo\")\n// .setParameter(\"codigo\", codigo)\n// .getSingleResult();\n\n if (this.em.isOpen()) {\n Query query = this.em.createNamedQuery(\"Usuario.findByCodigo\")\n .setParameter(\"codigo\", codigo);\n\n user = (Usuario) query.getSingleResult();\n }\n } catch (Exception e) {\n// e.printStackTrace();\n }\n\n return user;\n }",
"public Usuario findbyIdUsuario(Long idUsr){\n\t\t\t\t em.getTransaction().begin();\n\t\t\t\t Usuario u= em.find(Usuario.class, idUsr);\n\t\t\t\t em.getTransaction().commit();\n\t\t\t\t return u;\n\t\t\t }",
"@Override\n\tpublic UsuariosEntity findById(String ciUsuario) {\n\t\treturn iUsuarios.findById(ciUsuario).orElseThrow(null);\n\t}",
"@Override\r\n\tpublic Usuario encontrarUsuario(Long id) throws Exception {\n\t\treturn iUsuario.findById(id).orElseThrow(() -> new Exception(\"Error\"));\r\n\r\n\t}",
"@Repository\npublic interface UsuarioRepository extends JpaRepository<EUsuario, Long> {\n\t\n\t/**\n\t * Buscar por ID\n\t * \n\t * @param usuarioId\n\t * @return EUsuario\n\t */\n\tpublic EUsuario findById(long usuarioId);\n\t\n\t/**\n\t * Buscar por nome ou parcial\n\t * \n\t * @param nome\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByNome(String nome);\n\t\n\t/**\n\t * Buscar por login\n\t * \n\t * @param login\n\t * @return EUsuario\n\t */\n\tpublic EUsuario findByLogin(String login);\n\t\n\t/**\n\t * Buscar por Cargo\n\t * \n\t * @param cargo\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByCargo(String cargo);\n\t\n\t/**\n\t * Buscar por Nivel de Acesso\n\t * \n\t * @param nivelAcesso\n\t * @return List<EUsuario>\n\t */\n\tpublic List<EUsuario> findByNivelAcesso(int nivelAcesso);\n\t\n\t/**\n\t * Executa query no banco\n\t * \n\t * @param query\n\t * @return List<EUsuario>\n\t */\n\t@Query(\"SELECT u FROM EUsuario u WHERE u.nome LIKE :query\")\n\tpublic List<EUsuario> findByQuery(@Param(\"query\") String query);\n\t\n}",
"@Test\n public void testFindBySsoId() {\n LOGGER.info(\"findBySsoId\");\n String ssoId = \"sam\";\n AppUser result = userRepo.findBySsoId(ssoId);\n assertNotNull(result);\n }",
"AuditoriaUsuario find(Object id);",
"public List<Usuario> findAllUsuarios ();",
"@Override\r\n\tpublic Usuario findById(Usuario t) {\n\t\treturn null;\r\n\t}",
"@RequestMapping(value = \"/getUsuarioById/{usuarioId}\", method = RequestMethod.GET)\r\n public @ResponseBody Usuario getUsuario(@PathVariable(\"usuarioId\") String usuarioId) {\r\n return this.usuarioRepository.findUsuarioByUsername(usuarioId);\r\n }",
"@Test\n\tvoid shouldFindUserWithCorrectUsername() throws Exception {\n\t\tUser user = this.userService.findUserByUsername(\"antonio98\");\n\t\tAssertions.assertThat(user.getUsername()).isEqualTo(\"antonio98\");\n\t}",
"@RequestMapping(value = \"/{idusuario}\", \n\t method = RequestMethod.GET, \n\t headers=\"Accept=application/json\"\n\t ) \n\tpublic Usuario getUsuario(@PathVariable Long idusuario){\n\t\tSystem.out.println(idusuario);\n\t\treturn usuariorepository.findOne(idusuario);\n\t}",
"@Test\n public void testRegistrar() throws Exception { \n long sufijo = System.currentTimeMillis();\n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(sufijo); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin());\n assertNotNull(usuarioRegistrado);\n }",
"@Test\r\n public void testDGetByUserName() {\r\n System.out.println(\"getByUserName\");\r\n \r\n String userName = \"admin\";\r\n UsuarioDao instance = new UsuarioDao();\r\n Usuario result = instance.getByUserName(userName);\r\n \r\n assertNotNull(result);\r\n }",
"@Test\n public void testFindUserById() {\n System.out.println(\"findUserById\");\n long userId = testUsers.get(0).getId();\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n User expResult = testUsers.get(0);\n User result = instance.findUserById(userId);\n assertEquals(expResult.getEmail(), result.getEmail());\n }",
"List<Usuario> findAll();",
"@Test\r\n public void testUpdateUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = dataUs.get(0);\r\n UsuarioEntity nuevo = factory.manufacturePojo(UsuarioEntity.class);\r\n nuevo.setId(entity.getId());\r\n \r\n usuarioLogic.updateUsuario(nuevo);\r\n \r\n UsuarioEntity buscado = em.find(UsuarioEntity.class, entity.getId());\r\n \r\n Assert.assertEquals(nuevo.getId(), buscado.getId());\r\n }",
"@Test\n\tpublic void testFindUserById() throws Exception {\n\t\tSqlSession sqlSession = factory.openSession();\n\t\tUser user = sqlSession.selectOne(\"com.wistron.meal.user.findUserById\",3);\n\t\tSystem.out.println(user);\n\t\tsqlSession.close();\n\t\t\n\t}",
"@Override\n\tpublic Usuario findById(Integer id) {\n\t\treturn usuarioRepository.getById(id);\n\t}",
"List<UsuarioEntity> findByTipoUsuario(TipoUsuario tipoUsuario);",
"@Test\r\n public void testDeleteUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = dataUs.get(0);\r\n usuarioLogic.deleteUsuario(entity.getId());\r\n UsuarioEntity deleted = em.find(UsuarioEntity.class, entity.getId());\r\n Assert.assertNull(deleted);\r\n }",
"@Override\n\tpublic Usuario buscarPorId(int id){\n\t\treturn em.find(Usuario.class, id);\n\t}",
"@Override\n\tpublic Optional<Login> findbyId(long usuario) {\n\t\treturn this.loginDao.findById(usuario);\n\t}",
"@Test\r\n public void testEGet_int() {\r\n System.out.println(\"get\");\r\n \r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n Usuario obj = instance.getByUserName(\"admin\");\r\n \r\n int usuarioId = obj.getId();\r\n \r\n Usuario result = instance.get(usuarioId);\r\n \r\n assertEquals(usuarioId, result.getId());\r\n }",
"@Override\r\n\tpublic Usuario findById(int id) {\n\t\treturn null;\r\n\t}",
"public UsuarioDTO consultarUsuario(String idUsuario);",
"public Usuario findByIdCad(String idCad);",
"@Override\n public Optional<Usuario> buscaPorNombre(String nombre){\n return usuarioRepository.buscaPorNombre(nombre);\n }",
"@Test\n\t public void testRetrieveById(){\n\t\t try{\n\t\t\t Users user = BaseData.getUsers();\n\t\t\t\twhen(entityManager.find(Users.class,\"a1234567\")).thenReturn(user);\n\t\t\t\tUsers savedUser = userDao.retrieveById(\"a1234567\");\n\t\t\t\tassertNotNull(savedUser);\n\t\t\t\tassertTrue(savedUser.getFirstName().equals(\"MerchandisingUI\"));\n\t\t }catch(DataAcessException se){\n\t\t\t logger.error(\"error at service layer while testing retrieveById:.\",se);\n\t\t }\n\t }",
"public Usuario getUsuarioByID (int idUsuario) {\n Usuario usuario = null;\n Transaction trns = null;\n Session session = HibernateUtil.getSessionFactory().openSession();\n try {\n trns = session.beginTransaction();\n String queryString = \"from Usuario where id_usuario = :idToFind\";\n Query query = session.createQuery(queryString);\n query.setInteger(\"idToFind\", idUsuario);\n usuario = (Usuario) query.uniqueResult();\n } catch (RuntimeException e){\n e.printStackTrace();\n } finally {\n session.flush();\n session.close();\n } \n\n return usuario;\n }",
"@Test\n\tpublic void testFindByFirstName() throws Exception {\n\t\tOptional<User> user = users.findByUsername(\"agooniaOn\");\n\t\tassert user.isPresent();\n\t\tassert user.get().equals(ago);\n\t}",
"@Override\n\t@Transactional(readOnly = true)\n\tpublic SeguUsuario findByNombreUsuario(String nombreUsuario) {\n\t\treturn usuarioDao.findByNombreUsuario(nombreUsuario);\n\t}",
"@GetMapping(\"/usuarios/{id}\")\n\t public ResponseEntity<Usuario> get(@PathVariable Integer id) {\n\t try {\n\t \tUsuario usuarios = service.get(id);\n\t return new ResponseEntity<Usuario>(usuarios, HttpStatus.OK);\n\t } catch (NoSuchElementException e) {\n\t return new ResponseEntity<Usuario>(HttpStatus.NOT_FOUND);\n\t } \n\t }",
"@Override\n\tpublic Usuario findByName(String name) {\n\t\treturn null;\n\t}",
"public UsuarioDTO consultarUsuario(String idAfiliado);",
"@Test\r\n\tpublic void CT06ConsultarUsuarioPorDados() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\t// acao\r\n\t\ttry {\r\n\t\t\tSystem.out.println(usuario.getRa());\r\n\t\t\tSystem.out.println(usuario.getNome());\r\n\t\t} catch (Exception e) {\r\n\t\t\tassertEquals(\"Dados inválidos\", e.getMessage());\r\n\t\t}\r\n\t}",
"@Override\n\tpublic User buscarUsuario(Long id) {\n\t\treturn repository.findOne(id);\n\t}",
"@Override\r\n\tpublic Usuario findById(String id) {\n\t\treturn em.find(Usuario.class,id);\r\n\t}",
"@Test\n public void getComentarioTest() {\n ComentarioEntity entity = data.get(0);\n ComentarioEntity nuevaEntity = comentarioPersistence.find(dataLibro.get(0).getId(), entity.getId());\n Assert.assertNotNull(nuevaEntity);\n Assert.assertEquals(entity.getNombreUsuario(), nuevaEntity.getNombreUsuario());\n }",
"@Test\r\n public void testBuscarUsuarios() {\r\n System.out.println(\"BuscarUsuarios\");\r\n Usuario pusuario = new Usuario(); \r\n pusuario.setUsuario(\"MSantiago\");\r\n \r\n BLUsuario instance = new BLUsuario();\r\n \r\n Usuario result = instance.BuscarUsuarios(pusuario); \r\n if(result == null) fail(\"La busqueda no ha retornado resultado.\");\r\n else\r\n {\r\n assertEquals(pusuario.getUsuario(),result.getUsuario());\r\n System.out.println(\"Se encontró el usuario.\");\r\n }\r\n\r\n \r\n }",
"@Test\n public void testConsultarUsuarios() {\n System.out.println(\"consultarUsuarios\");\n BibliotecarioController instance = new BibliotecarioController();\n List<Usuario> expResult = new UsuariosList().getUsuarios();\n List<Usuario> result = instance.consultarUsuarios();\n assertEquals(expResult, result);\n }",
"@Test\n\tpublic void shouldFindUserWithGivenId() throws UserNotFoundException\n\t{\n\t\tUserProfile user = new UserProfile();\n\t\tuser.setId(1);\n\t\t\n\t\twhen(userDao.findUserById(user.getId())).thenReturn(user);\n\t\t\n\t\tassertEquals(user, userService.findUserById(user.getId()));\n\t}",
"@Test\n void find() {\n UserEntity userEntity = new UserEntity();\n userEntity.setId(2);\n userEntity.setFirstName(\"pippo\");\n userEntity.setLastName(\"pluto\");\n UserEntity save = repository.save(userEntity);\n\n List<UserEntity> all = repository.findAll();\n Assert.isTrue(3 == all.size());\n }",
"@Override\n\tpublic Usuario findById(Long id) {\n\t\treturn null;\n\t}",
"@Repository\npublic interface UsuariosPerfilRepository extends JpaRepository<UsuarioPerfil, Integer> {\n\n\tUsuario findByUsername(String username);\t\n\n}",
"public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }",
"public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }",
"@RequestMapping(value = \"/find/{id}\", method = RequestMethod.GET)\n @ResponseBody\n public ResponseEntity findUser(@PathVariable long id) {\n User user = userService.findById(id);\n if (user == null) {\n return new ResponseEntity(HttpStatus.NO_CONTENT);\n }\n return new ResponseEntity(user, HttpStatus.OK);\n }",
"@Test\n void findById() {\n when(ownerRepository.findById(anyLong())).thenReturn(Optional.of(returnOwner));\n\n Owner owner = service.findById(1L);\n\n assertNotNull(owner);\n }",
"@Override\n\tpublic SeguUsuario findById(Long id) {\n\t\treturn usuarioDao.findById(id).orElse(null);\n\t}",
"@Test\n public void testEliminarCliente() throws Exception {\n long sufijo = System.currentTimeMillis(); \n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(Long.valueOf(sufijo)); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n servicio.eliminarCliente(usuario.getLogin()); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin()); \n assertNull(usuarioRegistrado); \n }",
"@Test\n public void testFindByUsername() {\n\n }",
"@Test\r\n\tpublic void CT05ConsultarLivroComNomeNulo() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\t@SuppressWarnings(\"unused\")\r\n\t\t\tUsuario usuario;\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNome_nulo();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome inválido\", e.getMessage());\r\n\t\t}\r\n\t}",
"@Test\n public void testFindByLogin() throws Exception {\n String userName = String.valueOf(databaseTester.getConnection().createDataSet().getTable(\"User\")\n .getValue(0, \"login\"));\n// User user = jdbcUserDao.findByLogin(userName);\n// assertNotNull(\"Should find user by login\", user);\n }",
"@Test\n\tpublic void FindUserByUsername() {\n\n\t\tUser user = new User(\"moviewatcher\", \"$2a$10$37jGlxDwJK4mRpYqYvPmyu8mqQJfeQJVSdsyFY5UNAm9ckThf2Zqa\", \"USER\");\n\t\tuserRepository.save(user);\n\t\t\n\t\tString username = user.getUsername();\n\t\tUser user4 = userRepository.findByUsername(username);\n\t\n\t\tassertThat(user4).isNotNull();\n\t\tassertThat(user4).hasFieldOrPropertyWithValue(\"username\", \"moviewatcher\");\n\t\t\n\t}",
"public User findUserById(int id);",
"@Override\n\t@Transactional\n\tpublic UserDetails searchUser(String email) {\n\t\ttry {\t\n\t\t\t\n\t\t\tQuery qUser = manager.createQuery(\"from Usuario where email = :email and ativo = :ativo\")\n\t\t\t\t\t.setParameter(\"email\", email)\n\t\t\t\t\t.setParameter(\"ativo\", true);\n\t\t\tList<Usuario> usuarios = qUser.getResultList();\n\t\t\t\n\t\t\t\n\t\t\tQuery qAcess = manager.createQuery(\"from Acesso where usuario.id = :id and acesso = :acesso\")\n\t\t\t\t\t.setParameter(\"id\", usuarios.get(0).getId())\n\t\t\t\t\t.setParameter(\"acesso\", true);\n\t\t\tList<Acesso> acessos = qAcess.getResultList();\n\t\t\n\t\t\t/*\n\t\t\tAcesso acesso = new Acesso();\n\t\t\tUsuario usuario = new Usuario();\n\t\t\t\n\t\t\tusuario.setNome(\"Daniel\");\n\t\t\tusuario.setEmail(\"\");\n\t\t\tacesso.setSenha(\"$2a$10$jdQpiR35ZZVdrFQYUW7q/evtl1Xr6ED3y.pIzukdgzvF0PIBtrmzS\");\n\t\t\tacesso.setAcesso(true);\n\t\t\tacesso.setUsuario(usuario);\n\t\t\t\t\t\n\t\t\treturn new UsuarioDetails(acesso.getUsuario().getNome(), acesso.getUsuario().getEmail(), acesso.getSenha(), acesso.isAcesso());\n\t\t\t*/\n\t\t\treturn new UsuarioDetails(acessos.get(0).getUsuario().getNome(), acessos.get(0).getUsuario().getEmail(), acessos.get(0).getSenha(), acessos.get(0).isAcesso());\n\t\n\t\t}catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t\tthrow new RuntimeException(e);\t\t\n\t\t} finally {\n\t\t\t// TODO: handle finally clause\n\t\t\tmanager.close();\n\t\t}\n\t}",
"@Transactional\npublic interface UsuarioRepository extends JpaRepository<Usuario, Long> {\n Usuario findByUuid(String uuid);\n}",
"public Usuario findUserById(Integer id){\n\t\treturn usuarios.findById(id);\n\t}",
"@Override\n\tpublic Usuario find(Long id) {\n\t\treturn null;\n\t}",
"@Test\r\n public void testGetIdUsuario() {\r\n System.out.println(\"getIdUsuario\");\r\n Usuario instance = new Usuario();\r\n Integer expResult = null;\r\n Integer result = instance.getIdUsuario();\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"@Override\n\t@SuppressWarnings(\"unchecked\")\n\tpublic Usuario listarPorId(Usuario entidad) throws Exception {\n\t\tList<Usuario> lista = new ArrayList<>();\n\n\t\tQuery query = entityManager.createQuery(\"from Usuario c where c.id = ?1\");\n\t\tquery.setParameter(1, entidad.getId());\n\n\t\tlista = (List<Usuario>) query.getResultList();\n\n\t\tUsuario Usuario = new Usuario();\n\n\t\t// Nos aseguramos que exista un valor para retornar\n\t\tif (lista != null && !lista.isEmpty()) {\n\t\t\tUsuario = lista.get(0);\n\t\t}\n\n\t\treturn Usuario;\n\t}",
"public Usuario find(Usuario usuario) throws HibernateException{\n\n\t\tsession = HibernateUtil.getSessionFactory().openSession();\n\t\ttry {\n\t\t\tCriteria cri = session.createCriteria(usuario.getClass())\n\t\t\t\t\t.add(Restrictions.eq(\"login\", usuario.getLogin()))\n\t\t\t\t\t.add(Restrictions.eq(\"senha\", usuario.getSenha()));\n\t\t\t\n\t\t\tlogger.info(\"Validando usuario e senha.\");\n\t\t\t// consulta na base se o usuario existe\n\t\t\tuser = (Usuario) cri.uniqueResult();\n\t\t\tif (user != null && usuario.getLogin().equals(user.getLogin())\n\t\t\t\t\t && usuario.getSenha().equals(user.getSenha())) {\n\t\t\t\tlogger.info(\"Usuario logado...\");\n\t\t\t\treturn user;\n\t\t\t} else {\n\t\t\t\tlogger.info(\"Usuario ou senha invalidos.\");\n\t\t\t\treturn null;\n\t\t\t}\n\t\t\t\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\t}",
"@Test\n\tpublic void shouldFindUserByLogin()\n\t{\n\t\tUserProfile user = new UserProfile();\n\t\tuser.setId(100);\n\t\tuser.setLogin(\"testUser\");\n\t\twhen(userDao.findUserByLogin(user.getLogin())).thenReturn(user);\n\t\t\n\t\tassertEquals(user, userService.findUserByLogin(user.getLogin()));\n\t}",
"@Test\r\n\tpublic void CT05CadastrarUsuarioComNomeNulo() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = new Usuario();\r\n\t\t\r\n\t\ttry {\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comNomeNulo();\r\n\t\t\tfail(\"deveria lançar uma exceção\");\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tassertEquals(\"Nome invalido\", e.getMessage());\r\n\t\t}\r\n\t}",
"public CompradorEntity findByUsuario(String usuario) {\r\n TypedQuery query = em.createQuery(\"Select e From CompradorEntity e where e.usuario = :usuario\", CompradorEntity.class);\r\n\r\n query = query.setParameter(\"usuario\", usuario);\r\n\r\n List<CompradorEntity> sameUsuario = query.getResultList();\r\n CompradorEntity result;\r\n if (sameUsuario == null) {\r\n result = null;\r\n } else if (sameUsuario.isEmpty()) {\r\n result = null;\r\n } else {\r\n result = sameUsuario.get(0);\r\n }\r\n\r\n return result;\r\n }",
"@RequestMapping(value = \"/getUsuarioByEmail/{usuarioEmail}\", method = RequestMethod.GET)\r\n public @ResponseBody Usuario getUsuarioByEmail(@PathVariable(\"usuarioEmail\") String usuarioEmail) {\r\n return this.usuarioRepository.findUsuarioByEmail(usuarioEmail);\r\n }",
"@Test\n public void testGetUserByUID_Found() throws Exception {\n User user = new User();\n user.setUserUID(123);\n user.setUsername(\"resetme\");\n user.setPasswordTemporary(false);\n\n when(userService.getUserByUID(123)).thenReturn(user);\n\n mockMvc.perform(get(\"/api/users/123\").contentType(MediaType.APPLICATION_JSON)).andExpect(status().isOk());\n\n verify(userService, times(1)).getUserByUID(anyLong());\n }",
"@Test\n void findByUsername_userPresent_test() {\n // arrange\n UserEntity expectedEntity = UserEntity.builder()\n .withId(1L)\n .withUsername(\"MaxMust\")\n .withFirstname(\"Max\")\n .withLastname(\"Mustermann\")\n .withEmail(\"[email protected]\")\n .build();\n\n // act\n Optional<UserEntity> foundUser = userRepository.findByUsername(\"MaxMust\");\n\n // assert\n assertThat(foundUser).isNotEmpty();\n assertThat(foundUser.get()).isEqualTo(expectedEntity);\n }",
"public Usuario verificarDatos(String usuario, String password) throws Exception{\n Usuario us = new Usuario(usuario, password);\n try {\n Session session = HibernateUtil.getSessionFactory().openSession();\n String hql = \"from Usuario where usuario = '\" + usuario\n + \"' and password = '\" + password + \"'\";\n Query query = session.createQuery(hql);\n \n if(!query.list().isEmpty()) {\n us = (Usuario) query.list().get(0);\n } \n } catch (Exception e){\n throw e;\n }\n return us;\n /*\n desde el if se cambia\n query.setParameter(\"usuario\", usuario);\n query.setParameter(\"password\", password);\n us = (Usuario) query.uniqueResult();\n \n \n */\n }",
"@Test\n\tpublic void test() throws Exception {\n\n\t\tUser pruk = new User();\n\t\tpruk.setId(1);\n\t\tpruk.setName(\"Pruk\");\n\t\tpruk.setEmail(\"[email protected]\");\n\t\tgiven(this.userRepository.findById(1)).willReturn(Optional.of(pruk));\n\t\t\n\t\tMvcResult result = this.mvc.perform(get(\"/user/1\").accept(MediaType.APPLICATION_JSON))\n\t\t\t\t.andExpect(status().isOk()).andReturn();\n\n\t\tString resultJson = result.getResponse().getContentAsString();\n\t\tObjectMapper mapper = new ObjectMapper();\n\t\tUserResponse response = mapper.readValue(resultJson, UserResponse.class);\n\t\tassertEquals(1, response.getId());\n\t\tassertEquals(\"[email protected]\",response.getEmail());\n\t\tassertEquals(\"Pruk\",response.getName());\n\n\n\t}",
"@Test\n\tvoid shouldFindUserWithIncorrectId() throws Exception {\n\t\tUser user = this.userService.findUser(\"antonio98\").orElse(null);\n\t\tAssertions.assertThat(user.getUsername()).isNotEqualTo(\"fernando98\");\n\t}",
"@Test\r\n public void testGGetContratistas() {\r\n System.out.println(\"getContratistas\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> result = instance.getContratistas();\r\n \r\n assertFalse(result.isEmpty());\r\n }",
"@Test\n public void testFindUserByFilter() {\n System.out.println(\"findUserByFilter\");\n String filter = \"adrian\";\n UserServiceImpl instance = new UserServiceImpl(passwordService);\n List<User> result = instance.findUserByFilter(filter);\n assertEquals(1, result.size());\n assertEquals(\"adrian\", result.get(0).getUsername());\n }",
"public User findById(int userId);",
"public interface UsuarioCrud extends CrudRepository<Usuario, Long> {\r\n\r\n\t}",
"@Test\n public void testSysUser() {\n\n SysUser user = sysUserService.findByUsername(\"admin\");\n System.out.println(\"user: \" + user);\n }",
"@RequestMapping(value = \"/usuarioasignado/{idusuario}\", \n\t method = RequestMethod.GET, \n\t headers=\"Accept=application/json\"\n\t ) \n\tpublic UsuarioAsignado getUsuarioAsignado(@PathVariable Long idusuario){\n\t\tSystem.out.println(idusuario);\n\t\treturn usuarioAsignadoRepository.findOne(idusuario);\n\t}",
"public List<Usuario> listarUsuario() {\n \n List<Usuario> lista = usuarioDAO.findAll();\n return lista;\n \n \n\n }",
"public Usuario obtenerUsuario(int id) {\n return this.usuarioFacade.find(id);\n }",
"@Test\n public void getEmpleadoTest() {\n EmpleadoEntity entity = data.get(0);\n EmpleadoEntity resultEntity = empleadoLogic.getEmpleado(entity.getId());\n Assert.assertNotNull(resultEntity);\n Assert.assertEquals(entity.getId(), resultEntity.getId());\n Assert.assertEquals(entity.getNombreEmpleado(), resultEntity.getNombreEmpleado());\n Assert.assertEquals(entity.getNombreUsuario(), resultEntity.getNombreUsuario());\n }",
"User findUserById(Long id) throws Exception;",
"public Usuario findByNick(String nick){\n\t\t\t\t\t\tList<Usuario> listado;\n\t\t\t\t\t\tUsuario u=null;\n\t\t\t\t\t\tlistado =findAllUsuarios();\n\t\t\t\t\t\tem.getTransaction().begin();\n\t\t\t\t\t\tfor (Usuario us:listado){\n\t\t\t\t\t\t\tif (us.getNick().equals(nick)){\n\t\t\t\t\t\t\t\tu=us;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tem.getTransaction().commit();\n\t\t\t\t\t\treturn u;\n\t\t\t\t\t}",
"@Test\n public void createComentarioTest() {\n PodamFactory factory = new PodamFactoryImpl();\n ComentarioEntity nuevaEntity = factory.manufacturePojo(ComentarioEntity.class);\n ComentarioEntity resultado = comentarioPersistence.create(nuevaEntity);\n\n Assert.assertNotNull(resultado);\n\n ComentarioEntity entity = em.find(ComentarioEntity.class, resultado.getId());\n\n Assert.assertEquals(nuevaEntity.getNombreUsuario(), entity.getNombreUsuario());\n \n }",
"@Test\r\n public void testFind() throws Exception {\r\n MonitoriaEntity entity = data.get(0);\r\n MonitoriaEntity nuevaEntity = persistence.find(entity.getId());\r\n Assert.assertNotNull(nuevaEntity);\r\n Assert.assertEquals(entity.getId(), nuevaEntity.getId());\r\n Assert.assertEquals(entity.getIdMonitor(), nuevaEntity.getIdMonitor());\r\n Assert.assertEquals(entity.getTipo(), nuevaEntity.getTipo());\r\n \r\n }",
"@Test\r\n @Ignore\r\n public void testFindPaciente() {\r\n System.out.println(\"findPaciente\");\r\n String termo = \"\";\r\n EnfermeiroDaoImpl instance = new EnfermeiroDaoImpl();\r\n List<Enfermeiro> expResult = null;\r\n List<Enfermeiro> result = instance.findPaciente(termo);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Test\n public void findByIdTest() {\n }",
"@Test\n public void findByIdTest() {\n }",
"@Test\r\n\tpublic void CT01CadastrarUsuarioComDadosValidos() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\tUsuario usuario = new Usuario();\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comDadosValidos();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tfail(\"nao deve falhar\");\r\n\t\t}\r\n\t}",
"public interface ParametrageAppliRepository extends CrudRepository<ParametresAppliDTO, Integer> {\n /**\n * This method will find an User instance in the database by its email.\n * Note that this method is not implemented and its working code will be\n * automatically generated from its signature by Spring Data JPA.\n */\n\n public ParametresAppliDTO findByTypeEnvironnement(int idTypeEnvironement);\n\n\n}",
"@RequestMapping(value = \"/consultarusuario\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n public CommonsResponse finduser(@RequestParam String usuario, @RequestParam String llave_seguridad, HttpServletRequest request)\n {\n CommonsResponse response = new CommonsResponse();\n try\n {\n logger.debug(\"Se valida la licencia si puede consumir los procesos.\");\n GatewayBaseBean.validateLicenceToWS(llave_seguridad, webUtils.getClientIp(request));\n response.setResponse(userServices.findUser(usuario));\n }\n catch (ParamsException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.error(\"Parametros de Licencia Errados WS [consultarusuario], key[\"+llave_seguridad+\"].\", ex);\n return response;\n }\n catch (LicenseException ex)\n {\n response.toLicenceWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode(), llave_seguridad);\n logger.error(\"Parametros de Licencia Errados WS [consultarusuario].\", ex);\n return response;\n }\n catch (ServiceException ex)\n {\n response.toParamsWarn(messageSource, KEY_ERRORS_GENERIC + ex.getCode());\n logger.warn(\"Error de Servicio WS [consultarusuario].\", ex);\n return response;\n }\n catch (Exception ex)\n {\n logger.error(\"Error Generico en WS [consultarusuario].\", ex);\n GatewayBaseBean.matchToResponses(response);\n return response;\n }\n logger.info(\"Se retorna respuesta efectiva del WS [consultarusuario].\");\n return response.toOk();\n }",
"@Test\n public void testAutenticacionGoogle() {\n System.out.println(\"autenticacionGoogle\");\n Usuario usuario = new Usuario(1, \"[email protected]\", \"1\", new Date(), true);;\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.autenticacionGoogle(usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"The test case is a prototype.\");\n }\n }",
"@Test\n\tpublic void getOwnerByIdTest() throws Exception {\n\t\tmockMvc.perform(get(\"/owner/4\"))\n\t\t.andExpect(status().isOk())\n\t\t.andExpect(content().contentType(contentType))\n\t\t.andExpect(jsonPath(\"$.id\", is(4)))\n\t\t.andExpect(jsonPath(\"$.firstName\", is(\"Harold\")))\n\t\t.andExpect(jsonPath(\"$.lastName\", is(\"Davis\")))\n\t\t.andExpect(jsonPath(\"$.city\", is(\"Windsor\")))\n\t\t.andExpect(jsonPath(\"$.address\", is(\"563 Friendly St.\")))\n\t\t.andExpect(jsonPath(\"$.telephone\", is(\"6085553198\")));\n\t}",
"@Override\r\n\tpublic ResponseBean<UsuarioEntity> obtenerPorId(Integer id) {\n\t\treturn null;\r\n\t}"
]
| [
"0.7590762",
"0.725385",
"0.7247701",
"0.7128966",
"0.7074386",
"0.7021726",
"0.6980966",
"0.69675165",
"0.68626845",
"0.6857804",
"0.68132377",
"0.67545664",
"0.67413133",
"0.6698098",
"0.65830237",
"0.6576439",
"0.65721285",
"0.65659773",
"0.65503407",
"0.6547661",
"0.65426487",
"0.65416306",
"0.6540049",
"0.65400285",
"0.6524764",
"0.6513206",
"0.6510678",
"0.6503291",
"0.64968467",
"0.6490103",
"0.648925",
"0.6445557",
"0.64406407",
"0.6437956",
"0.6410547",
"0.63970876",
"0.6388598",
"0.6375915",
"0.6375027",
"0.6372758",
"0.6357365",
"0.6341201",
"0.6316453",
"0.6309637",
"0.6304061",
"0.6301758",
"0.62990373",
"0.62979996",
"0.62760967",
"0.6273893",
"0.62676895",
"0.62660724",
"0.62660724",
"0.6264253",
"0.6257351",
"0.6256678",
"0.6249628",
"0.6247229",
"0.623827",
"0.622827",
"0.6223402",
"0.6211345",
"0.62048644",
"0.62019336",
"0.61960965",
"0.61959076",
"0.6188865",
"0.6181022",
"0.6160899",
"0.61545396",
"0.6138193",
"0.61261564",
"0.61021394",
"0.60971487",
"0.60856396",
"0.60753894",
"0.6072597",
"0.60520744",
"0.60398775",
"0.6028709",
"0.60228735",
"0.6021923",
"0.6015907",
"0.60157794",
"0.6010878",
"0.6004461",
"0.6000555",
"0.5999398",
"0.5992822",
"0.59922886",
"0.5989977",
"0.5984796",
"0.5974144",
"0.5974144",
"0.5965065",
"0.59641963",
"0.596282",
"0.59587014",
"0.5955696",
"0.5953607"
]
| 0.758761 | 1 |
Test of autenticacion method, of class UsuarioJpaController. | @Test
public void testAutenticacion() {
System.out.println("autenticacion");
Usuario usuario = new Usuario(1, "[email protected]", "12345", new Date(), true);//parametro in
UsuarioJpaController instance = new UsuarioJpaController(emf);
Usuario expResult = instance.findUsuario(usuario.getIdUsuario());
Usuario result = instance.autenticacion(usuario);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
if (!result.equals(expResult)) {
fail("El test de autenticaccion ha fallado");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testAutenticacionGoogle() {\n System.out.println(\"autenticacionGoogle\");\n Usuario usuario = new Usuario(1, \"[email protected]\", \"1\", new Date(), true);;\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.autenticacionGoogle(usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"The test case is a prototype.\");\n }\n }",
"@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testLoginMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\tusuario.setEmail(\"[email protected]\");\n\t\tusuario.setSenha(\"admin\");\n\t\t\n\t\tusuario = usuarioService.login(usuario);\n\t\tAssert.assertEquals(usuario.getEmail(), \"[email protected]\");\n\t\tAssert.assertEquals(usuario.getSenha(), \"$2a$10$2Ew.Cha8uI6sat5ywCnA0elRRahr91v4amVoNV5G9nQwMCpI3jhvO\");\n\t}",
"@Test\r\n\tpublic void CT01ConsultarUsuario_com_sucesso() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\tUsuario resultadoObtido = null;\r\n\t\tDAOFactory mySQLFactory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);\r\n\t\tIUsuarioDAO iUsuarioDAO = mySQLFactory.getUsuarioDAO();\r\n\t\t// acao\r\n\t\tresultadoObtido = iUsuarioDAO.consulta(usuario.getRa());\r\n\t\t// verificacao\r\n\t\tassertTrue(resultadoObtido.equals(usuario));\r\n\t}",
"@Test\r\n public void findUserByAuthorizationValid() {\r\n\r\n // login as testUser\r\n TestUtil.login(\"testUser\", ApplicationAccessControlConfig.GROUP_CUSTOMER);\r\n\r\n UserRegistrationEto userRegistrationEto = new UserRegistrationEto();\r\n\r\n userRegistrationEto.setUsername(\"testUser\");\r\n userRegistrationEto.setPassword(\"123456\");\r\n userRegistrationEto.setEmail(\"[email protected]\");\r\n userRegistrationEto.setUserRoleId(0L);\r\n\r\n this.usermanagement.saveUser(userRegistrationEto);\r\n\r\n UserEto savedUserFromDB = this.usermanagement.findUserByAuthorization();\r\n\r\n assertThat(savedUserFromDB).isNotNull();\r\n assertThat(savedUserFromDB.getUsername()).isEqualTo(\"testUser\");\r\n assertThat(savedUserFromDB.getEmail()).isEqualTo(\"[email protected]\");\r\n assertThat(savedUserFromDB.getUserRoleId()).isEqualTo(0L);\r\n\r\n TestUtil.logout();\r\n }",
"@Test\n public void testAdicionarUsuario() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.post(\"/grupo/adicionarUsuario\")\n .param(\"idUsuario\", \"1\"))\n .andExpect(status().is3xxRedirection())\n .andExpect(view().name(\"redirect:grupo/criarUsuario?usuarioAdicionado\"));\n }",
"@Then(\"^o usuario se loga no aplicativo cetelem$\")\n\tpublic void verificaSeUsuarioLogadoComSucesso() throws Throwable {\n\t\tAssert.assertTrue(login.validaSeLoginSucesso());\n\n\t}",
"@Test\n public void testRegistrar() throws Exception { \n long sufijo = System.currentTimeMillis();\n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(sufijo); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin());\n assertNotNull(usuarioRegistrado);\n }",
"@Test\n public void t01_buscaAdmin() throws Exception {\n Usuario admin;\n admin = usuarioServico.login(\"administrador\", \".Ae12345\");\n assertNotNull(admin);\n }",
"protected void accionUsuario() {\n\t\t\r\n\t}",
"@Test\r\n public void testCreateUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = factory.manufacturePojo(UsuarioEntity.class);\r\n UsuarioEntity buscado = usuarioLogic.createUsuario(entity);\r\n Assert.assertNotNull(buscado);\r\n \r\n buscado = em.find(UsuarioEntity.class, entity.getId());\r\n Assert.assertEquals(entity, buscado);\r\n }",
"public void altaUsuario();",
"@Test\n public void testFindUsuario_Integer() {\n System.out.println(\"findUsuario\");\n Integer id = 1;\n String user = \"[email protected]\";\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(user);\n Usuario result = instance.findUsuario(id);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de busqueda por usuario ha fallado\");\n }\n }",
"@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testVerificaEmailJaCadastradoMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\t\n\t\tusuario.setNome(\"Eduardo\");\n\t\tList<Usuario> usuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t\tAssert.assertEquals(usuarios.get(0).getNome(), \"Eduardo Ayres\");\n\t\t\n\t\tusuario = new Usuario();\n\t\tusuario.setEmail(\"eduardo@\");\n\t\tusuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t}",
"@Test\n\tvoid validLoginTest() throws Exception {\n\t\tUser userObj = new User();\n\t\tuserObj.setUsername(\"sivass\");\n\t\tuserObj.setPassword(\"Siva123@\");\n\n\t\tUserInfo userInfo = new UserInfo();\n\t\tuserInfo.setRole(\"C\");\n\t\tuserInfo.setUserId(10);\n\t\tString userJson = new ObjectMapper().writeValueAsString(userObj);\n\t\twhen(userService.loginValidation(any(String.class), any(String.class))).thenReturn(userInfo);\n\t\tmockMvc.perform(post(\"/vegapp/v1/users/login\").contentType(MediaType.APPLICATION_JSON).content(userJson))\n\t\t\t\t.andExpect(status().isOk()).andExpect(jsonPath(\"$.role\").value(\"C\"))\n\t\t\t\t.andExpect(jsonPath(\"$.userId\").value(10));\n\t}",
"@Test\n public void testActualizar() {\n System.out.println(\"actualizar\");\n usuarioController.crear(usuario1);\n int codigo = 1;\n Usuario usuario = usuario1;\n usuario.setEstado(\"desactivado\");\n boolean expResult = true;\n boolean result = usuarioController.actualizar(codigo, usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n public void wrongUsernamePassword() {\n assertEquals(false, testBase.signIn(\"user2\", \"testPassword\"));\n }",
"@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"@Test\n public void existingUserOK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"secret\", 0); \n //Then\n assertThat(result, is(true));\n }",
"@Override\n\tpublic boolean autentica(String senha) {\n\t\treturn false;\n\t}",
"@Test\n\tpublic void testAuthenticateUserOK() {\n\t\tgiven(userRepository.findByLogin(anyString())).willReturn(new UserBuilder(USER_RETURNED).build());\n\n\t\t// make the service call\n\t\ttry {\n\t\t\tassertThat(authService.authenticateUser(USER)).isEqualTo(USER_RETURNED);\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Error testing authenticateUser: \" + e.getMessage());\n\t\t}\t\n\t}",
"@Test\r\n public void testCLogin() {\r\n System.out.println(\"login\");\r\n \r\n String userName = \"admin\";\r\n String contraseña = \"admin\";\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n \r\n Usuario result = instance.login(userName, contraseña);\r\n \r\n assertNotNull(result);\r\n }",
"@Test\n public void testFindUsuario_String() {\n System.out.println(\"findUsuario\");\n Integer user = 1;\n Usuario usuario = new Usuario(1, \"[email protected]\", \"12345\", new Date(), true);\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.findUsuario(user);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de busqueda por id ha fallado\");\n }\n }",
"boolean registrarUsuario(Usuario usuario) throws Exception;",
"@Test\n public void postNuevaTareaDevuelveListaConTarea() throws Exception {\n Usuario usuario = new Usuario(\"[email protected]\");\n usuario.setId(1L);\n\n when(usuarioService.findById(1L)).thenReturn(usuario);\n\n this.mockMvc.perform(post(\"/usuarios/1/tareas/nueva\")\n .param(\"titulo\", \"Estudiar examen MADS\"))\n .andExpect(status().is3xxRedirection())\n .andExpect(redirectedUrl(\"/usuarios/1/tareas\"));\n }",
"@Test\n public void testInserirUsuarioNovo() throws Exception {\n Usuario usu = new Usuario();\n usu.setNome(\"Fulano3\");\n usu.setSenha(\"abcde\");\n Long valorAleatorio = System.currentTimeMillis();\n String username = valorAleatorio.toString();\n usu.setUsername(username);\n usu.setEmail(\"[email protected]\");\n System.out.println(\"inserirUsuarioNovo\");\n boolean validado = new UsuarioDAO().inserir(usu);\n int idInserido = usu.getIdusuario();\n assertEquals(validado, true);\n //testExcluir();\n }",
"@Order(1)\n\t@Test\n\tpublic void Attempt_LoginSuccess() throws AuthException\n\t{\n\t\t//Test to make certain we login correctly.\n\t\tString user = \"null\", pass = \"andVoid\";\n\t\tboolean expected = true, actual = as.authenticateUser(user, pass);\n\t\tassertEquals(expected,actual,\"This is the correct login credentials for the System Admin\");\n\t}",
"@Test\n public void testActualizar2() {\n System.out.println(\"actualizar\");\n usuarioController.crear(usuario1);\n int codigo = 2;\n Usuario usuario = usuario1;\n usuario.setEstado(\"desactivado\");\n boolean expResult = false;\n boolean result = usuarioController.actualizar(codigo, usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n public void correctSignIn() {\n assertEquals(true, testBase.signIn(\"testName\", \"testPassword\"));\n }",
"@Test\r\n public void testIniciarSesion() {\r\n System.out.println(\"iniciarSesion\");\r\n String usuario = \"\";\r\n String contrasenia = \"\";\r\n Usuario instance = new Usuario();\r\n instance.iniciarSesion(usuario, contrasenia);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"@Test\n public void nonExistingUser() {\n boolean result = auth.authenticateUser(\"Spiderman\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"public User validarUsuario(String email, String password) throws BLException;",
"@Test\n public void testCreateUserAdmin() {\n Set<Role> roles = new HashSet<>();\n roles.add(roleRepo.findRoleByRolename(\"ROLE_ADMIN\"));\n\n User admin = new User(\"Админ\", \"Админыч\", \"[email protected]\", 45, \"admin\", roles);\n em.persist(admin);\n\n Assert.isTrue(userRepo.findUserByEmail(\"[email protected]\").isEnabled(), \"User not find in DB\");\n }",
"@Test\n @Order(1)\n void TC_UTENTE_DAO_1()\n {\n\n /*creo uno username valido*/\n Utente utente = new Utente();\n utente.setUsername(\"utenteTest1\");\n utente.setPassword(\"password\");\n utente.setNome(\"Test\");\n utente.setCognome(\"Test\");\n utente.setNazionalità(\"italiana\");\n utente.setEmail(\"[email protected]\");\n UtenteDAO utenteDAO = new UtenteDAO();\n\n assertTrue(utenteDAO.doSave(utente));\n }",
"@Test\n public void testConsultarUsuarios() {\n System.out.println(\"consultarUsuarios\");\n BibliotecarioController instance = new BibliotecarioController();\n List<Usuario> expResult = new UsuariosList().getUsuarios();\n List<Usuario> result = instance.consultarUsuarios();\n assertEquals(expResult, result);\n }",
"public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }",
"public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }",
"@Test\n\tvoid shouldFindUserWithCorrectId() throws Exception {\n\t\tUser user = this.userService.findUser(\"antonio98\").orElse(null);\n\t\tAssertions.assertThat(user.getUsername()).isEqualTo(\"antonio98\");\n\t}",
"@Test\r\n public void testAlterarDados() {\r\n System.out.println(\"alterarDados\");\r\n \r\n String nome = \"nomee\";\r\n String username = \"usernamee\";\r\n String email = \"[email protected]\";\r\n String password = \"passwordd\";\r\n \r\n CentroExposicoes ce = new CentroExposicoes();\r\n AlterarUtilizadorController instance = new AlterarUtilizadorController(ce);\r\n \r\n Utilizador uti = new Utilizador(\"nome\", \"username\", \"[email protected]\", \"password\");\r\n ce.getRegistoUtilizadores().addUtilizador(uti);\r\n instance.getUtilizador(uti.getEmail());\r\n \r\n boolean expResult = true;\r\n boolean result = instance.alterarDados(nome, username, email, password);\r\n \r\n assertEquals(expResult, result);\r\n }",
"@Given(\"^El usuario quiere acceder al sistema$\")\n\tpublic void El_usuario_quiere_acceder_al_sistema() throws Throwable {\n\t\tdao = new DAOPersona();\n\t p=new Persona(\"Carlos\", \"Delgado\", \"carlitos93\", \"[email protected]\", \"a1Zs7s2DM\", \"Calle Jane Doe\", \"0\", \"photo\", false, null, null, null);\n\t assert(true);\n\t}",
"@Test\n public void noUser() {\n assertEquals(false, testBase.signIn(\"wrong\", \"false\"));\n }",
"private boolean correctUser() {\n // TODO mirar si l'usuari es unic a la base de dades\n return true;\n }",
"@Test\r\n\tpublic void CT01CadastrarUsuarioComDadosValidos() {\r\n\t\ttry {\r\n\t\t\t// cenario\r\n\t\t\tUsuario usuario = new Usuario();\r\n\t\t\t// acao\r\n\t\t\tusuario = ObtemUsuario.comDadosValidos();\r\n\t\t} catch (RuntimeException e) {\r\n\t\t\t// verificacao\r\n\t\t\tfail(\"nao deve falhar\");\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void registerUserTest4() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass1234\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(userService.existsByEmail(ArgumentMatchers.anyString())).thenReturn(false);\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(400)).andExpect(status().reason(passwordsNoMatch));\n\t}",
"@Test\n public void testPasswordHasNumbersAndLetters() {\n registerUser(username, \"123456789\");\n assertNull(userService.getUser(username));\n }",
"@Test\r\n public void testUpdateUsuario() throws Exception \r\n {\r\n UsuarioEntity entity = dataUs.get(0);\r\n UsuarioEntity nuevo = factory.manufacturePojo(UsuarioEntity.class);\r\n nuevo.setId(entity.getId());\r\n \r\n usuarioLogic.updateUsuario(nuevo);\r\n \r\n UsuarioEntity buscado = em.find(UsuarioEntity.class, entity.getId());\r\n \r\n Assert.assertEquals(nuevo.getId(), buscado.getId());\r\n }",
"public void testLogin() throws Exception {\n super.login();\n }",
"@Test\r\n public void testGGetContratistas() {\r\n System.out.println(\"getContratistas\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> result = instance.getContratistas();\r\n \r\n assertFalse(result.isEmpty());\r\n }",
"@Test\n\tvoid shouldFindUserWithCorrectUsername() throws Exception {\n\t\tUser user = this.userService.findUserByUsername(\"antonio98\");\n\t\tAssertions.assertThat(user.getUsername()).isEqualTo(\"antonio98\");\n\t}",
"@Test\r\n public void testGetUtilizador() {\r\n System.out.println(\"getUtilizador\");\r\n CentroExposicoes ce = new CentroExposicoes();\r\n \r\n AlterarUtilizadorController instance = new AlterarUtilizadorController(ce);\r\n instance.getUtilizador(\"[email protected]\");\r\n }",
"@Test\n @Transactional\n void createAutorWithExistingId() throws Exception {\n autor.setId(1L);\n AutorDTO autorDTO = autorMapper.toDto(autor);\n\n int databaseSizeBeforeCreate = autorRepository.findAll().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n restAutorMockMvc\n .perform(post(ENTITY_API_URL).contentType(MediaType.APPLICATION_JSON).content(TestUtil.convertObjectToJsonBytes(autorDTO)))\n .andExpect(status().isBadRequest());\n\n // Validate the Autor in the database\n List<Autor> autorList = autorRepository.findAll();\n assertThat(autorList).hasSize(databaseSizeBeforeCreate);\n }",
"@Test\r\n\tpublic void testUserLogin() throws Exception {\n\t}",
"@Test\n public void testActualizar3() {\n System.out.println(\"actualizar\");\n int codigo = 2;\n Usuario usuario = usuario1;\n usuario.setEstado(\"desactivado\");\n boolean expResult = false;\n boolean result = usuarioController.actualizar(codigo, usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void registerUserTest2() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(true);\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(400)).andExpect(status().reason(usernameTaken));\n\t}",
"public LoginModel autenticar(String username, String senha) throws Exception {\n LoginModel usuario = null;\n try {\n usuario = LoginDAO.DoLogin(username, senha);\n } catch (SQLException ex) {\n Logger.getLogger(LoginService.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n if (usuario != null) {\n\treturn usuario;\n }\n\n // Usuario nao existe ou senha esta incorreta\n return null;\n }",
"@WithMockUser(username = \"admin\", authorities = {\"ADMIN\"})\n @Test\n @DisplayName(\"Allowed get books requests for ADMIN role \")\n void getByAdmin() throws Exception {\n mockMvc.perform(get(\"/books\").with(csrf())).andExpect(status().isOk());\n }",
"@Test\n\tpublic void getLoginUnauth() throws Exception {\n\t\tmockMvc.perform(MockMvcRequestBuilders.post(\"/login\")\n\t\t\t\t.with(SecurityMockMvcRequestPostProcessors.user(\"unauthorized\").password(\"NA\")))\n\t\t\t\t.andExpect(MockMvcResultMatchers.status().isFound())\n\t\t\t\t.andExpect(MockMvcResultMatchers.header().string(\"Location\", Matchers.containsString(\"/login?error\")));\n\t}",
"@Given(\"^El usuario va a acceder al sistema$\")\n\tpublic void El_usuario_va_a_acceder_al_sistema() throws Throwable {\n\t\tdao = new DAOPersona();\n\t p=new Persona(\"carlitos93\", \"a1Zs8s2DS\");\n\t assert(true);\n\t}",
"@PostMapping(\"/login\")\n public ResponseEntity<JwtDTO> login(@Valid @RequestBody LoginUser loginUsuario, BindingResult bindingResult){\n \tSystem.out.println(\"usuario login \"+ loginUsuario.getNombreUsuario()+\" contraseña \"+ loginUsuario.getPassword());\n if(bindingResult.hasErrors())\n return new ResponseEntity(new Mensaje(\"campos vacíos o email inválido\"), HttpStatus.BAD_REQUEST);\n Authentication authentication = authenticationManager.authenticate(\n new UsernamePasswordAuthenticationToken(loginUsuario.getNombreUsuario(), loginUsuario.getPassword())\n );\n SecurityContextHolder.getContext().setAuthentication(authentication);\n String jwt = jwtProvider.generateToken(authentication);\n UserDetails userDetails = (UserDetails) authentication.getPrincipal();\n System.out.println(\"usuario que esta: \"+ userDetails.getUsername());\n System.out.println(\"privilegios: \"+ userDetails.getAuthorities());\n String idUser=iRepoUser.findByNombreUsuario(loginUsuario.getNombreUsuario()).get().getId_usuario()+\"\";\n System.out.println(\"id enviado es : \"+ idUser);\n JwtDTO jwtDTO = new JwtDTO(jwt, userDetails.getUsername(), userDetails.getAuthorities(),idUser);\n \n return new ResponseEntity<JwtDTO>(jwtDTO, HttpStatus.OK);\n }",
"@Test\n public void testPrestarEjemplar() {\n System.out.println(\"prestarEjemplar\");\n Ejemplar ejemplar = new EjemplaresList().getEjemplares().get(1);\n Usuario usuario = new UsuariosList().getUsuarios().get(0);\n BibliotecarioController instance = new BibliotecarioController();\n Ejemplar result = instance.prestarEjemplar(ejemplar, usuario);\n Ejemplar expResult = ejemplar;\n expResult.setUsuarioId(usuario);\n \n assertEquals(expResult, result);\n\n }",
"@Test\n void registerUser() throws Exception{\n\n final RegisterDto registerDto = new RegisterDto(\"[email protected]\", \"password\", \"John\", \"Doe\", \"2018\", \"Marnixplaats 18\", \"Antwerpen\", \"Antwerpen\", \"Belgium\");\n\n mockMvc.perform(post(\"/api/security/register\")\n .contentType(MediaType.APPLICATION_JSON_VALUE)\n .content(objectMapper.writeValueAsString(registerDto))).andExpect(status().isOk());\n\n final Users users = userService.findByUsername(\"[email protected]\");\n\n assertThat(users.getUsername()).isEqualTo(\"[email protected]\");\n assertThat(users.getFirstname()).isEqualTo(\"John\");\n assertThat(users.getLastname()).isEqualTo(\"Doe\");\n assertThat(users.getPostcode()).isEqualTo(\"2018\");\n assertThat(users.getAddress()).isEqualTo(\"Marnixplaats 18\");\n assertThat(users.getCity()).isEqualTo(\"Antwerpen\");\n assertThat(users.getProvince()).isEqualTo(\"Antwerpen\");\n assertThat(users.getCountry()).isEqualTo(\"Belgium\");\n\n }",
"Usuario validarUsuario(Usuario usuario) throws Exception;",
"@Test\n\tpublic void testAuthenticateAdminAccountSuccessfully() {\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.authenticateAdminAccount(USERNAME1);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\t\tassertNotNull(user);\n\t\tassertNotEquals(0, user.getToken());\n\t}",
"@Test\n void retrieveByEmailPasswordTest() {\n Admin retrieved = adminJpa.retrieveByEmailPassword(\"[email protected]\", \"Ciao1234.\");\n assertEquals(\"[email protected]\", retrieved.getEmail());\n }",
"@Override\n\tpublic void crearUsuario(UsuarioEntity Usuario) {\n\t\treposUsuarios.save(Usuario);\n\t}",
"@BeforeEach\n\t public void setUser() {\n\t\tpasswordEncoder=new BCryptPasswordEncoder();\n\t\tuser=new AuthUser();\n\t\tuser.setId(1L);\n\t\tuser.setFirstName(\"Mohammad\");\n\t\tuser.setLastName(\"Faizan\");\n\t\tuser.setEmail(\"[email protected]\");\n\t\tuser.setPassword(passwordEncoder.encode(\"faizan@123\"));\n\t\tuser.setAccountNonExpired(true);\n\t\tuser.setAccountNonLocked(true);\n\t\tuser.setCredentialsNonExpired(true);\n\t\tuser.setEnabled(true);\n\t\tSet<Role> roles=new HashSet<>();\n\t\tRole role=new Role();\n\t\trole.setId(1L);\n\t\trole.setName(\"USER\");\n\t\troles.add(role);\n\t\tuser.setRoles(roles);\n\t\t\n\t}",
"@Test\n public void testConfirmationEmail() throws Exception {\n User user = new User(username, password);\n user = userService.save(user);\n String token = registerController.generateUserToken(user);\n assert !user.isEnabled();\n\n String response = restTemplate.getForObject(url + \"/token/\" + token, String.class);\n user = userService.getUser(username);\n assert user.isEnabled();\n }",
"@Before\n public void setup() throws Exception {\n this.mvc = webAppContextSetup(webApplicationContext).build();\n userRepository.deleteAll();\n //roleRepository.deleteAll();\n User joe = new User(\"joe\", \"1234\", \"admin\");\n User andy = new User(\"andy\", \"1234\", \"admin\");\n //roleRepository.save(new Role(\"ROLE_ADMIN\"));\n //roleRepository.save(new Role(\"ROLE_USER\"));\n userRepository.save(joe);\n userRepository.save(andy);\n Mockito.when(userRepository.findByUsername(joe.getUsername())).thenReturn(joe);\n Mockito.when(userRepository.findByUsername(andy.getUsername())).thenReturn(andy);\n }",
"@Test\n\tpublic void createUsersServiceTestKo_pwdNull() {\n\t\tUserDto user = null;\n\t\tDate now = Calendar.getInstance().getTime();\n\t\tList<Profil> listProfils = profilService.findAll();\n\t\ttry {\n\t\t\t//insert users\n\t\t\t\tuser = new UserDto();\n\t\t\t\tuser.setProfil(listProfils.get(0));\n\t\t\t\tuser.setModificationDate(now);\n\t\t\t\tuser.setCreationDate(now);\n\t\t\t\tuser.setFirstname(\"firstname\");\n\t\t\t\tuser.setEmail(\"email\");\n\t\t\t\tuser.setUserLastname(\"last name\");\n\t\t\t\tuserService.createUser(user);\n\t\t\t\tfail();\n\t\t} catch (HangTechnicalException e) {\n\t\t\te.printStackTrace();\n\t\t\tassertThat(\"Erro while saving user\", equalTo(e.getMessage()));\n\t\t\tassertTrue(e.getCause().getCause() instanceof NullPointerException);\n\t\t} \n\t}",
"@Test\n\tpublic void authenticateTest() {\n\t\t\n\t\tassertEquals(true, true);\n\n\t}",
"@Test\r\n\tpublic void CT06ConsultarUsuarioPorDados() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\t// acao\r\n\t\ttry {\r\n\t\t\tSystem.out.println(usuario.getRa());\r\n\t\t\tSystem.out.println(usuario.getNome());\r\n\t\t} catch (Exception e) {\r\n\t\t\tassertEquals(\"Dados inválidos\", e.getMessage());\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void createUsersServiceTestOk() {\n\t\tUserDto user = null;\n\t\tDate now = Calendar.getInstance().getTime();\n\t\tString password;\n\t\tString email;\n\t\tList<Profil> listProfils = profilService.findAll();\n\t\t\n\t\ttry {\n\t\t\t//insert users\n\t\t\tfor (int i = 0; i < 10; i++) {\n\t\t\t\tpassword = new String(\"Password\"+i);\n\t\t\t\tuser = new UserDto();\n\t\t\t\temail = new String(\"email\"+i+\"@example.com\");\n\t\t\t\tuser.setEmail(email);\n\t\t\t\tuser.setFirstname(\"firstname\" + i);\n\t\t\t\tuser.setModificationDate(now);\n\t\t\t\tuser.setCreationDate(now);\n\t\t\t\tuser.setUserLastname(\"lastname\" + i);\n\t\t\t\tuser.setProfil(listProfils.get(0));\n\t\t\t\tuser.setPassword(password);\n\t\t\t\tuserService.createUser(user);\n\t\t\t\t//check authentication\n\t\t\t\t//boolean isauthok = userDao.authenticate(email, password);\n\t\t\t\tassertNotNull(userService.authenticate(email, password));\n\t\t\t}\n\t\t\t//Check insertion \n\t\t\tList<User> listUsers = this.userService.findAll();\n\t\t\tassertThat(10, equalTo(listUsers.size()));\n\n\t\t} catch (HibernateException he) {\n\t\t\the.printStackTrace();\n\t\t\tfail();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tfail();\n\t\t}\n\t}",
"@WithMockUser(username = \"guest\", authorities = {\"GUEST\"})\n @Test\n @DisplayName(\"Allowed get books requests for GUEST role \")\n void getBooksByGuest() throws Exception {\n mockMvc.perform(get(\"/books\").with(csrf())).andExpect(status().isOk());\n }",
"@Test\n public void processRegistration() throws Exception {\n String newUserName = \"goodusername\";\n long numberOfExpectedUsers = userRepository.count() + 1;\n mockMvc.perform(post(RegistrationController.BASE_URL)\n .contentType(MediaType.APPLICATION_FORM_URLENCODED)\n .param(userNameField, newUserName)\n .param(passwordField, samplePasswordValue)\n .param(verifyPasswordField, samplePasswordValue))\n .andExpect(view().name(SearchController.REDIRECT + IndexController.URL_PATH_SEPARATOR))\n .andExpect(status().is3xxRedirection());\n long updatedNumberOfUsers = userRepository.count();\n assertEquals(numberOfExpectedUsers, updatedNumberOfUsers);\n }",
"@Test\n public void loginSuccessWithGoodCredentials() {\n Mockito.when(accountService.getAuthenticatedUser()).thenReturn(Mono.just(account));\n //Mockito.when(userDetailsService.findByUsername(eq(\"jukka\"))).thenReturn(Mono.just(account.toUserDetails()));\n \n client\n .post().uri(\"/login\")\n .header(\"Authorization\", \"Basic \" + utils.createAuthenticationToken(\"jukka\", \"jukka\"))\n .exchange()\n .expectStatus()\n .isOk()\n .expectHeader()\n .contentType(APPLICATION_JSON)\n .expectBody()\n .jsonPath(\"$.id\").isEqualTo(\"oidasajfdlihfaidh\")\n .jsonPath(\"$.name\").isEqualTo(\"Jukka Riekkonen\")\n .jsonPath(\"$.username\").isEqualTo(\"jukka\")\n .jsonPath(\"$.password\").doesNotExist();\n }",
"@Test\r\n public void testAgregar() {\r\n System.out.println(\"agregar\");\r\n Integer idUsuario = null;\r\n String nombre = \"\";\r\n String apellido = \"\";\r\n String usuario = \"\";\r\n String genero = \"\";\r\n String contrasenia = \"\";\r\n String direccion = \"\";\r\n Usuario instance = new Usuario();\r\n instance.agregar(idUsuario, nombre, apellido, usuario, genero, contrasenia, direccion);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"@Test\r\n\tpublic void acreditar() {\r\n\t}",
"@Test\n\tpublic void registerUserTest3() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(userService.existsByEmail(ArgumentMatchers.anyString())).thenReturn(true);\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(400)).andExpect(status().reason(emailTaken));\n\t}",
"@Test\n\tpublic void registerUserTest1() throws Exception {\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).characterEncoding(\"UTF-8\")).andDo(print()).andExpect(status().is(400));\n\n\t}",
"@Test\n public void test_create_user_and_login_success() {\n try {\n TokenVO firstTokenVO = authBO.createUser(\"createduser1\",\"createdpassword1\");\n Assert.assertNotNull(firstTokenVO);\n Assert.assertNotNull(firstTokenVO.getBearer_token());\n Assert.assertTrue(firstTokenVO.getCoachId() > 1);\n String firstToken = firstTokenVO.getBearer_token();\n\n TokenVO secondTokenVO = authBO.login(\"createduser1\", \"createdpassword1\");\n Assert.assertNotNull(secondTokenVO);\n Assert.assertNotNull(secondTokenVO.getBearer_token());\n Assert.assertTrue(secondTokenVO.getCoachId() > 1);\n Assert.assertTrue(secondTokenVO.getBearer_token() != firstTokenVO.getBearer_token());\n Assert.assertTrue(secondTokenVO.getCoachId() == firstTokenVO.getCoachId());\n } catch (AuthException e) {\n System.err.println(e.getMessage());\n Assert.assertTrue(e.getMessage().equalsIgnoreCase(\"\"));\n } catch (Exception e) {\n e.printStackTrace();\n Assert.fail(e.getMessage());\n }\n }",
"@Test\n\tpublic void testCreateUser(){\n\t\trepository.createUser(expectedUser);\n\t\tSystem.out.println(\"#########################>User inserted into database<#########################\");\n\t\tUser actualUser = repository.findByUsername(\"vgeorga\");\n\t\tassertEquals(expectedUser.getUsername(), actualUser.getUsername());\n\t}",
"private void authenticateAction() {\n if (requestModel.getUsername().equals(\"superuser\")\n && requestModel.getPassword().equals(\"\")) {\n Collection<Webres> webres = getAllWebres();\n proceedWhenAuthenticated(new User(null, null, null, \"superuser\", \"\", null) {\n @Override\n public Collection<Webres> getAllowedResources() {\n return webres;\n }\n @Override\n public ActionController getDefaultController() {\n return ActionController.EMPLOYEES_SERVLET;\n }\n });\n return;\n }\n \n // try to authenticate against other credentials from the database\n Optional<User> u = getUserByCredentials(requestModel.getUsername(), requestModel.getPassword()); \n if (u.isPresent()) {\n proceedWhenAuthenticated(u.get());\n return;\n }\n \n // report authentication failed\n LOG.log(Level.INFO, \"{0} Authentication failed. Login: {1}, Password: {2}\", new Object[]{httpSession.getId(), requestModel.getUsername(), requestModel.getPassword()});\n SignInViewModel viewModel = new SignInViewModel(true);\n renderSignInView(viewModel);\n }",
"@Test\n public void getUser() throws Exception {\n String tokenLisa = authenticationService.authorizeUser(userCredentialsLisa);\n User lisa = service.getUser(tokenLisa, \"1\");\n User peter = service.getUser(tokenLisa, \"2\");\n\n assertNotNull(lisa);\n assertNotNull(peter);\n\n\n String tokenPeter = authenticationService.authorizeUser(userCredentialsPeter);\n lisa = service.getUser(tokenPeter, \"1\");\n peter = service.getUser(tokenPeter, \"2\");\n\n assertNull(lisa);\n assertNotNull(peter);\n }",
"@Test\n\tpublic void testAuthenticateUserNullLogin() {\n\t\t\n\t\tThrowable thrown = catchThrowable(() -> { authService.authenticateUser(new UserBuilder(USER).login(null).build()); } );\n\t\tassertThat(thrown).isNotNull().isInstanceOf(IllegalArgumentException.class).hasMessageContaining(\"Missing login and/or password\");\n\t}",
"@Test\n public void testCreateUserUser() {\n Set<Role> roles = new HashSet<>();\n roles.add(roleRepo.findRoleByRolename(\"ROLE_USER\"));\n\n User user = new User(\"Юзер\", \"Обыкнвениус\", \"[email protected]\",22, \"user\", roles);\n em.persist(user);\n\n Assert.notNull(userRepo.findUserByEmail(\"[email protected]\"), \"User is not find in DB\");\n }",
"public boolean autentica(int senha) {\n\t\tif(this.senha == senha) {\n\t\treturn true;\n\t\t} else {\n\t\treturn false;\n\t\t}\n\t}",
"@Test\n\tpublic void registerUserTest5() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(userService.existsByEmail(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(roleService.findByType(ArgumentMatchers.any(RoleType.class))).thenReturn(Optional.ofNullable(null));\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(500));\n\t}",
"@Test\r\n\tpublic void CT03ObtemUsuarioDAO_com_sucesso() {\r\n\t\tassertTrue(DAOFactory.getUsuarioDAO() instanceof DAOUsuario);\r\n\t}",
"@Test\n\t@WithMockUser(username = \"testuser\", password = \"testpass\", authorities = \"ROLE_USER\")\n\tpublic void getCurrentUserTest2() throws Exception {\n\t\tmockMvc.perform(get(\"/api/auth/currentUser\")).andDo(print()).andExpect(status().is(200)).andExpect(content().string(containsString(\"testuser\")));\n\t}",
"@Test\n public void wrongPassword() {\n assertEquals(false, testBase.signIn(\"testName\", \"false\"));\n }",
"@Test\n public void testRegisterUser() throws AuthenticationException, IllegalAccessException {\n facade.registerUser(\"fiske\", \"JuiceIsLoose123/\");\n assertEquals(\"fiske\", facade.getVeryfiedUser(\"fiske\", \"JuiceIsLoose123/\").getUserName(), \"Expects user exist after register\");\n }",
"@Test\n public void testBuscar2() {\n System.out.println(\"buscar\");\n usuarioController.crear(usuario1);\n int codigo = 0;\n Usuario expResult = null;\n Usuario result = usuarioController.buscar(codigo);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n // fail(\"The test case is a prototype.\");\n }",
"@Test\r\n public void testGuardarUsuario() {\r\n System.out.println(\"GuardarUsuario\");\r\n Usuario pusuario = new Usuario();\r\n pusuario.setCodigo(1);\r\n pusuario.setNroDocumento(\"93983454\");\r\n pusuario.setNombre(\"Maria\");\r\n pusuario.setApellidoPaterno(\"Estrada\");\r\n pusuario.setApellidoMaterno(\"Perez\");\r\n pusuario.setUsuario(\"MEstrada\");\r\n pusuario.setContrasenha(\"Estrada9829\");\r\n pusuario.setConfirmContrasenha(\"Estrada9829\");\r\n pusuario.setEmail(\"[email protected]\");\r\n pusuario.setFechaIngreso(new Date(2012, 8, 21));\r\n pusuario.setCargo(\"Vendedor\");\r\n Rol rol1 = new Rol();\r\n rol1.setCodigoRol(1);\r\n rol1.setDescripcionRol(\"Vendedor\");\r\n pusuario.setRol(rol1);\r\n \r\n \r\n BLUsuario instance = new BLUsuario();\r\n Result expResult = new Result(ResultType.Ok, \"El usuario ha sido registrado correctamente.\", null);\r\n Result result = instance.GuardarUsuario(pusuario);\r\n \r\n System.out.println(result.getMensaje());\r\n assertEquals(expResult.getDetalleMensaje(), result.getDetalleMensaje());\r\n assertEquals(expResult.getMensaje(), result.getMensaje()); \r\n assertEquals(expResult.getTipo(), result.getTipo()); \r\n }",
"@Test\r\n public void testEGet_int() {\r\n System.out.println(\"get\");\r\n \r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n Usuario obj = instance.getByUserName(\"admin\");\r\n \r\n int usuarioId = obj.getId();\r\n \r\n Usuario result = instance.get(usuarioId);\r\n \r\n assertEquals(usuarioId, result.getId());\r\n }",
"@Test\n public void testFindByUsername() {\n\n }",
"@Test\n\tpublic void testLoginAdminAccountSuccessfully() {\n\t\tassertEquals(2, adminAccountService.getAllAdminAccounts().size());\n\n\t\tAdminAccount user = null; \n\t\ttry {\n\t\t\tuser = adminAccountService.loginAdminAccount(USERNAME2, PASSWORD2);\n\t\t} catch (InvalidInputException e) {\n\t\t\tfail();\n\t\t}\n\n\t\tassertNotNull(user);\t\t\t\n\t\tassertEquals(USERNAME2, user.getUsername());\n\t\tassertEquals(PASSWORD2, user.getPassword());\n\t\tassertEquals(NAME2, user.getName());\n\t}",
"@Test\n public void testSaveEditUserCommandModel() throws Exception {\n BCryptPasswordEncoder encoder = new BCryptPasswordEncoder();\n User user = new User();\n user.setUsername(\"Tephon\");\n user.setPassword(\"password\");\n \n \n ArrayList<String> authority1 = new ArrayList();\n authority1.add(\"ROLE_USER\");\n \n User existingUser = userServiceLayer.createUser(user);\n \n EditUserCommandModel commandModel = new EditUserCommandModel();\n commandModel.setId(existingUser.getId());\n commandModel.setUsername(\"Cheesy\");\n commandModel.setPassword(\"provolone1\");\n commandModel.setAuthorities(authority1);\n \n \n User userFromModel = userWebServices.saveEditUserCommandModel(commandModel, \"Tephon\");\n \n assert userFromModel.getId() != 0;\n assert userFromModel.getUsername().equals(\"Cheesy\");\n\n }",
"@Test\n public void testCreateOnBehalfUser() throws Exception {\n String password = \"abcdef\";\n VOUserDetails result = idService\n .createOnBehalfUser(customer.getOrganizationId(), password);\n checkCreatedUser(result, customer, password, false);\n }",
"@PostMapping(value=\"/usuarios\")\n\t@Transactional //gera transacao no banco de dados\n\tpublic String cria(@RequestBody @Valid NovoUsuarioRequest request) {\n\t\tUsuario novoUsuario = request.toUsuario();\n\t\tmanager.persist(novoUsuario);//insere no banco de dados\n\t\treturn novoUsuario.toString();\n\t}",
"@Test\n public void loginAsEmptyUser(){\n Assert.assertEquals(createUserChecking.creationChecking(\"\",\"\"),\"APPLICATION ERROR #11\");\n log.info(\"Empty login and email were typed\");\n }",
"@Override\n public boolean validacionLogin(UsuarioDto usuarioDto) {\n HashMap<String, Object> params = new HashMap<>();\n params.put(\"NOMBRE_USUARIO\", usuarioDto.getNombre());\n params.put(\"PASS\", usuarioDto.getContracena());\n IntegerDto data = (IntegerDto) executeList(IntegerDto.class, \"PRC_VALIDAR_LOGIN\", params).get(0);\n return data.getData() != 0;\n }"
]
| [
"0.697209",
"0.66444504",
"0.65236133",
"0.64539665",
"0.6438664",
"0.6358757",
"0.63410455",
"0.62810194",
"0.62510264",
"0.621502",
"0.61623937",
"0.6118223",
"0.6106992",
"0.6102824",
"0.60832626",
"0.6032976",
"0.60307217",
"0.6029245",
"0.60169876",
"0.6014734",
"0.59842944",
"0.59731007",
"0.5956152",
"0.5940202",
"0.5932092",
"0.5924782",
"0.5924271",
"0.5920661",
"0.59197557",
"0.59111893",
"0.5901872",
"0.5897181",
"0.58820814",
"0.58763534",
"0.5875172",
"0.5875172",
"0.5873296",
"0.58615726",
"0.5856689",
"0.58374107",
"0.5833548",
"0.5826414",
"0.5820187",
"0.5812965",
"0.5809361",
"0.58017254",
"0.579302",
"0.5787615",
"0.57842815",
"0.57693446",
"0.57628787",
"0.5744399",
"0.5743926",
"0.57408726",
"0.57383454",
"0.57236636",
"0.57095385",
"0.5706581",
"0.5700655",
"0.56961983",
"0.56941664",
"0.5685819",
"0.56840754",
"0.5678307",
"0.56740665",
"0.5659419",
"0.5655989",
"0.56500065",
"0.5649746",
"0.5642685",
"0.5642504",
"0.5633416",
"0.56306493",
"0.5624837",
"0.56228596",
"0.5620685",
"0.56203926",
"0.5618814",
"0.5618452",
"0.5617053",
"0.56161505",
"0.5608752",
"0.5607312",
"0.56049955",
"0.55803293",
"0.55761427",
"0.55729836",
"0.5571913",
"0.5567925",
"0.5567803",
"0.5567165",
"0.5563942",
"0.5563641",
"0.55612874",
"0.5560495",
"0.5557136",
"0.55552036",
"0.5548297",
"0.55459845",
"0.55347705"
]
| 0.80539453 | 0 |
Test of autenticacionGoogle method, of class UsuarioJpaController. | @Test
public void testAutenticacionGoogle() {
System.out.println("autenticacionGoogle");
Usuario usuario = new Usuario(1, "[email protected]", "1", new Date(), true);;
UsuarioJpaController instance = new UsuarioJpaController(emf);
Usuario expResult = instance.findUsuario(usuario.getIdUsuario());
Usuario result = instance.autenticacionGoogle(usuario);
assertEquals(expResult, result);
// TODO review the generated test code and remove the default call to fail.
if (!result.equals(expResult)) {
fail("The test case is a prototype.");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testAutenticacion() {\n System.out.println(\"autenticacion\");\n Usuario usuario = new Usuario(1, \"[email protected]\", \"12345\", new Date(), true);//parametro in\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.autenticacion(usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de autenticaccion ha fallado\");\n }\n }",
"@Override\n\t\t\t\t\tpublic boolean loginWithGoogle(String userName, String password) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n Log.d(LGN, \"Resultado de Solicitud\");\n super.onActivityResult(requestCode, resultCode, data);\n try {\n Log.d(LGN, \"onActivityResult: \" + requestCode);\n if (requestCode == GOOGLE_SIGNIN_REQUEST) {\n Log.d(LGN, \"Respuesta de Google\");\n GoogleSignInResult result = Auth.GoogleSignInApi.getSignInResultFromIntent(data);\n Log.d(LGN, result.getStatus() + \"\");\n Log.d(LGN, resultCode + \"\");\n Log.d(LGN, data + \"\");\n if (result.isSuccess()) {\n Log.d(LGN, \"Respuesta Buena\");\n GoogleSignInAccount user = result.getSignInAccount();\n AuthCredential credential = GoogleAuthProvider.getCredential(user.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(LGN, \"Login con Google correcta: \" + task.isSuccessful());\n if (task.isSuccessful()) {\n isNew = task.getResult().getAdditionalUserInfo().isNewUser();\n Log.d(LGN, \"Antiguedad: \" + (isNew ? \"Nuevo\" : \"Antiguo\"));\n if (isNew) {\n Log.d(LGN, \"Es nuevo\");\n FirebaseUser currentUser = FirebaseAuth.getInstance().getCurrentUser();\n uid = currentUser.getUid();\n\n for (UserInfo profile : currentUser.getProviderData()) {\n correo = profile.getEmail();\n }\n\n Usuario usuario = new Usuario();\n usuario.setNombre(currentUser.getDisplayName());\n usuario.setCorreo(correo);\n usuario.setExp(0);\n usuario.setMonedas(0);\n usuario.setAvatar(currentUser.getPhotoUrl() != null ? currentUser.getPhotoUrl().toString() : null);\n\n DatabaseReference usuarioData = FirebaseDatabase.getInstance().getReference(\"usuario\");\n usuarioData.child(currentUser.getUid()).setValue(usuario)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n createColecciones(uid);\n Log.d(LGN, \"Usuario con Google Creado\");\n Toast.makeText(LoginActivity.this, \"Usuario Creado\", Toast.LENGTH_SHORT).show();\n } else {\n Log.d(LGN, \"Error en la creacion\");\n Log.e(LGN, \"onFailure\", task.getException());\n }\n }\n });\n\n /* Intent home = new Intent(LoginActivity.this, AvatarActivity.class);\n startActivity(home);\n finish();*/\n\n } else {\n Log.d(LGN, \"Es antiguo\");\n }\n } else {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(LGN, \"Login con Google incorrecta:\", task.getException());\n Toast.makeText(LoginActivity.this, \"Autenticacion Fallida.\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } else {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(LGN, \"Sesion con Google Errada!\");\n }\n } else if (FACEBOOK_SIGNIN_REQUEST == requestCode) {\n Log.d(LGN, \"Respuesta de Facebook\");\n mCallbackManager.onActivityResult(requestCode, resultCode, data);\n }\n } catch (Throwable t) {\n try {\n loginPanel.setVisibility(View.VISIBLE);\n progressBar.setVisibility(View.GONE);\n Log.e(TAG, \"onThrowable: \" + t.getMessage(), t);\n if (getApplication() != null)\n Toast.makeText(getApplication(), t.getMessage(), Toast.LENGTH_LONG).show();\n } catch (Throwable x) {\n }\n }\n }",
"public User validateLogInGoogle(String idTokenString) {\n\t\ttry {\n\t\t\tGoogleIdToken idToken = verifier.verify(idTokenString);\n\t\t\tif (idToken != null) {\n\t\t\t\tPayload payload = idToken.getPayload();\n\n\t\t\t\tString userId = payload.getSubject();\n\t\t\t\tString email = payload.getEmail();\n\t\t\t\tLong expirationTime = payload.getExpirationTimeSeconds();\n\n\t\t\t\t// TODO: sacar las validacinoes de usuario a otra funcion\n\t\t\t\tUser user = repo.getUserByEmail(email, true);\n\t\t\t\tif (user == null) {\n\t\t\t\t\t// Si no existe el usuario, se crea en base de datos\n\t\t\t\t\tuser = new User();\n\n\t\t\t\t\tuser.setEmail(email);\n\t\t\t\t\tuser.setFullName(email);\n\t\t\t\t\tuser.setRoles(Arrays.asList(Constants.ROLE_USER));\n\n\t\t\t\t\tAuthUser authUser = new AuthUser();\n\t\t\t\t\tauthUser.setLastIdToken(idTokenString);\n\t\t\t\t\tauthUser.setProvider(Constants.OAUTH_PROVIDER_GOOGLE);\n\t\t\t\t\tauthUser.setUserId(userId);\n\t\t\t\t\tauthUser.setExpirationLastIdToken(expirationTime);\n\n\t\t\t\t\tuser.setAuth(authUser);\n\n\t\t\t\t\t// Se guarda el usuario con el auth puesto\n\t\t\t\t\trepo.createUser(user);\n\t\t\t\t} else {\n\t\t\t\t\t//Verificamos que no este desactivado el usuario\n\t\t\t\t\tif(!user.isActive()) {\n\t\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.NOT_ACCEPTABLE,\n\t\t\t\t\t\t\t\t\"El usuario esta desactivado.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Si el usuario existe, verifica que inicia sesion con Auth\n\t\t\t\t\tif (user.getAuth() != null) {\n\t\t\t\t\t\t// Verificamos los datos\n\t\t\t\t\t\tif (!user.getAuth().getProvider().equals(Constants.OAUTH_PROVIDER_GOOGLE)) {\n\t\t\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\t\t\t\"El usuario no tiene asociado este metodo de inicio de sesion.\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif (!user.getAuth().getUserId().equals(userId)) {\n\t\t\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\t\t\t\"El inicio de sesion de Google no corresponde al usuario.\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Si sale todo bien, actualizamos los datos\n\t\t\t\t\t\tuser.getAuth().setExpirationLastIdToken(expirationTime);\n\t\t\t\t\t\tuser.getAuth().setLastIdToken(idTokenString);\n\t\t\t\t\t\trepo.createUser(user);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// Si no tiene el Auth, no se dejara iniciar sesion.\n\t\t\t\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST,\n\t\t\t\t\t\t\t\t\"El usuario no tiene asociado este metodo de inicio de sesion.\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn user;\n\n\t\t\t} else {\n\t\t\t\t// El token es invalido, nos e pude verificar con el proveedor\n\t\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST, \"Token invalido.\");\n\t\t\t}\n\n\t\t} catch (GeneralSecurityException | IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tthrow new ResponseStatusException(HttpStatus.BAD_REQUEST);\n\t\t}\n\n\t}",
"private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n Toast.makeText(this, getResources().getString(R.string.autenticandoseGoogle) + \" \" + acct.getId(), Toast.LENGTH_SHORT).show();\n\n showProgressDialog();\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticadoGoogle), Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n updateUI(user);\n finish();\n } else {\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.autenticacionFallida), Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n hideProgressDialog();\n\n\n }\n });\n }",
"@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testLoginMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\tusuario.setEmail(\"[email protected]\");\n\t\tusuario.setSenha(\"admin\");\n\t\t\n\t\tusuario = usuarioService.login(usuario);\n\t\tAssert.assertEquals(usuario.getEmail(), \"[email protected]\");\n\t\tAssert.assertEquals(usuario.getSenha(), \"$2a$10$2Ew.Cha8uI6sat5ywCnA0elRRahr91v4amVoNV5G9nQwMCpI3jhvO\");\n\t}",
"public void reAuthenticateUser(User regUser){\n System.out.println(\"Authenticating Google User from DB\");\n UserWithRoles authUser = new UserWithRoles(regUser);\n Authentication authentication = new UsernamePasswordAuthenticationToken(\n authUser, authUser.getPassword(), authUser.getAuthorities()\n );\n SecurityContextHolder.getContext().setAuthentication(authentication);\n }",
"@Test\n public void testRegistrar() throws Exception { \n long sufijo = System.currentTimeMillis();\n Usuario usuario = new Usuario(\"Alexander\" + String.valueOf(sufijo), \"alex1.\", TipoUsuario.Administrador); \n usuario.setDocumento(sufijo); \n usuario.setTipoDocumento(TipoDocumento.CC);\n servicio.registrar(usuario); \n Usuario usuarioRegistrado =(Usuario) servicioPersistencia.findById(Usuario.class, usuario.getLogin());\n assertNotNull(usuarioRegistrado);\n }",
"@RequestMapping(value=\"/googleLogin\", method=RequestMethod.POST, consumes=MediaType.APPLICATION_FORM_URLENCODED_VALUE)\n\tpublic @ResponseBody Object verifyGoogleToken(@RequestParam String googleToken) {\n\t\ttry {\n\t\t\tString email = userService.verifyGoogleToken(googleToken);\n\t\t\tSystem.out.println(\"Response from google: email - \" + email);\n\t\t\tif(email.length() > 0) {\n\t\t\t\t long now = new Date().getTime();\n\t\t\t\t long expires = now + 86400000;\n\t\t\t\t try {\n\t\t\t\t\t UserProfile up = userService.getUserByEmail(email);\n\t\t\t\t\t System.out.println(\"USER FOUND: \" + up.toString());\n\t\t\t\t\t String s = Jwts.builder().setSubject(up.getUserName()).setIssuer(\"UxP-Gll\").setExpiration(new Date(expires)).setHeaderParam(\"user\", up).signWith(SignatureAlgorithm.HS512, key).compact();\n\t\t\t\t\t return userService.getUserByUserName(up.getUserName(), s);\n\t\t\t\t } catch (Exception e) {\n\t\t\t\t\t return Collections.singletonMap(\"error\", \"no account found for email: \" + email); \n\t\t\t\t }\n\t\t\t\t \n\t\t\t} else {\n\t\t\t\treturn Collections.singletonMap(\"error\", \"bad response from google\");\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t\treturn Collections.singletonMap(\"error\", \"token could not be validated\");\n\t\t}\n\t}",
"private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n //inicio de sesion exitoso\n //Recuperacion de los datos del usuario logueado\n FirebaseUser user = mAuth.getCurrentUser();\n //llamado a la vista inicial de usuario autenticado\n startActivity(new Intent(Login.this,Principal.class));\n finish();\n\n } else {\n // Fallo el inicio de sesion con firebase.\n Toast.makeText(Login.this, R.string.errorInicioSesion,\n Toast.LENGTH_SHORT).show();\n\n }\n\n }\n });\n }",
"private void onSucessGoogleLogin(GoogleSignInResult result) {\n\n GoogleSignInAccount account = result.getSignInAccount();\n\n mUser = new UserModel();\n mUser.createUser(Objects.requireNonNull(account).getIdToken(), account.getDisplayName(), account.getEmail(), Objects.requireNonNull(account.getPhotoUrl()).toString(), account.getPhotoUrl());\n// SessionManager.getInstance().createUser(mUser);\n if (mUser.getIdToken() != null) {\n AuthCredential credential = GoogleAuthProvider.getCredential(mUser.getIdToken(), null);\n firebaseAuthWithGoogle(credential);\n }\n\n\n }",
"public void UserSignInMethod(){\n // Passing Google Api Client into Intent.\n Intent AuthIntent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n startActivityForResult(AuthIntent, REQUEST_SIGN_IN_CODE);\n }",
"private void configureGoogleSignIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n googleApiClient = new GoogleApiClient.Builder(getApplicationContext()).enableAutoManage(this, new GoogleApiClient.OnConnectionFailedListener() {\n @Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Toast.makeText(LoginActivity.this, \"Error\", Toast.LENGTH_LONG).show();\n }\n }).addApi(Auth.GOOGLE_SIGN_IN_API, gso).build();\n }",
"private void signInWithGoogle() {\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void googleSignIn() {\n\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"private void signInFeature() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n Button signInButton = (Button) findViewById(R.id.login_button);\n signInButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n signIn();\n }\n });\n }",
"public interface IGoogle {\n void onInitAOuth(SignInButton signInButton, GoogleSignInOptions gso, GoogleApiClient googleApiClient);\n\n void onStartAOuth();\n\n void onActivityResult(int requestCode, int resultCode, Intent data);\n\n void onSignInAOth();\n\n void onSignOutAOth();\n\n void onRevokeAccess();\n}",
"private void signInWithGoogle() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, ConstantValue.GOOGLE_SIGN_IN);\n }",
"boolean registrarUsuario(Usuario usuario) throws Exception;",
"@Test\n public void testAdicionarUsuario() throws Exception {\n mockMvc.perform(MockMvcRequestBuilders.post(\"/grupo/adicionarUsuario\")\n .param(\"idUsuario\", \"1\"))\n .andExpect(status().is3xxRedirection())\n .andExpect(view().name(\"redirect:grupo/criarUsuario?usuarioAdicionado\"));\n }",
"@Test\r\n public void findUserByAuthorizationValid() {\r\n\r\n // login as testUser\r\n TestUtil.login(\"testUser\", ApplicationAccessControlConfig.GROUP_CUSTOMER);\r\n\r\n UserRegistrationEto userRegistrationEto = new UserRegistrationEto();\r\n\r\n userRegistrationEto.setUsername(\"testUser\");\r\n userRegistrationEto.setPassword(\"123456\");\r\n userRegistrationEto.setEmail(\"[email protected]\");\r\n userRegistrationEto.setUserRoleId(0L);\r\n\r\n this.usermanagement.saveUser(userRegistrationEto);\r\n\r\n UserEto savedUserFromDB = this.usermanagement.findUserByAuthorization();\r\n\r\n assertThat(savedUserFromDB).isNotNull();\r\n assertThat(savedUserFromDB.getUsername()).isEqualTo(\"testUser\");\r\n assertThat(savedUserFromDB.getEmail()).isEqualTo(\"[email protected]\");\r\n assertThat(savedUserFromDB.getUserRoleId()).isEqualTo(0L);\r\n\r\n TestUtil.logout();\r\n }",
"public final void signInWithGoogle() {\n ActivityResult.startGoogleLogin(activity, googleApiClient);\n }",
"private void googleSignIn() {\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, SIGN_IN);\n }",
"@Test\n public void correctSignIn() {\n assertEquals(true, testBase.signIn(\"testName\", \"testPassword\"));\n }",
"@Test\n void retrieveByEmailPasswordTest() {\n Admin retrieved = adminJpa.retrieveByEmailPassword(\"[email protected]\", \"Ciao1234.\");\n assertEquals(\"[email protected]\", retrieved.getEmail());\n }",
"@Test\n\t@DatabaseSetup(type = DatabaseOperation.CLEAN_INSERT, value = {DATASET_USUARIOS}, connection = \"dataSource\")\n\t@DatabaseTearDown(DATASET_CENARIO_LIMPO)\n\tpublic void testVerificaEmailJaCadastradoMustPass(){\n\t\tUsuario usuario = new Usuario();\n\t\t\n\t\tusuario.setNome(\"Eduardo\");\n\t\tList<Usuario> usuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t\tAssert.assertEquals(usuarios.get(0).getNome(), \"Eduardo Ayres\");\n\t\t\n\t\tusuario = new Usuario();\n\t\tusuario.setEmail(\"eduardo@\");\n\t\tusuarios = usuarioService.find(usuario);\n\t\tAssert.assertEquals(usuarios.size(), 1);\n\t}",
"@Override\n\tpublic boolean autentica(String senha) {\n\t\treturn false;\n\t}",
"@Test\r\n\tpublic void CT01ConsultarUsuario_com_sucesso() {\r\n\t\t// cenario\r\n\t\tUsuario usuario = ObtemUsuario.comDadosValidos();\r\n\t\tUsuario resultadoObtido = null;\r\n\t\tDAOFactory mySQLFactory = DAOFactory.getDAOFactory(DAOFactory.MYSQL);\r\n\t\tIUsuarioDAO iUsuarioDAO = mySQLFactory.getUsuarioDAO();\r\n\t\t// acao\r\n\t\tresultadoObtido = iUsuarioDAO.consulta(usuario.getRa());\r\n\t\t// verificacao\r\n\t\tassertTrue(resultadoObtido.equals(usuario));\r\n\t}",
"@Test\n\tpublic void registerUserTest4() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass1234\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(userService.existsByEmail(ArgumentMatchers.anyString())).thenReturn(false);\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(400)).andExpect(status().reason(passwordsNoMatch));\n\t}",
"private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\n .addOnSuccessListener(this, authResult -> {\n FirebaseUser user = mAuth.getCurrentUser();\n googleSignIn = 1;\n startActivity(new Intent(LoginActivity.this, HomeMainActivity.class));\n finish();\n })\n .addOnFailureListener(this, e -> Toast.makeText(LoginActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show());\n }",
"public void altaUsuario();",
"@Then(\"^o usuario se loga no aplicativo cetelem$\")\n\tpublic void verificaSeUsuarioLogadoComSucesso() throws Throwable {\n\t\tAssert.assertTrue(login.validaSeLoginSucesso());\n\n\t}",
"private void signIn(){\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, Constants.RC_SIGN_IN);\n\n }",
"@Test\n\tpublic void associarDesassociarUsuarioAoGrupo(){\n\t\t\n\t\tincluirGrupoPage.incluirGrupoBuilder(nomeGrupo, \"Feito pra testar associacao\");\n\n\t\tincluirUsuarioPage.inserirUsuarioBuilder(nomeLogin, nomeUsuario, \"[email protected]\",\n\t\t\t\t\"12304560\", \"061\", \"Claro DF\", \"Rafael\");\n\t\t\n\t\tloginPage.acessarPage();\n\t\t\n\t\tutil.clicaNoMenuAdministracao();\n\t\t\n\t\tassociarUsuarioPage.associar(nomeUsuario + \" (\" + nomeLogin + \")\", nomeGrupo);\n\t\t\n\t\tincluirUsuarioPage.validanoBanco(nomeLogin, nomeUsuario, \"[email protected]\",\n\t\t\t\t\"12304560\", \"061\", \"Claro DF\", \"Rafael\");\n\t\t\n\t\tincluirGrupoPage.verificaSeGrupoExisteNoBanco(nomeGrupo);\n\t\t\n\t\tassociarUsuarioPage.desassociar(nomeUsuario + \" (\" + nomeLogin + \")\", nomeGrupo);\n\t\t\n\t\twait.until(ExpectedConditions.visibilityOfElementLocated(By.className(\"jGrowl-message\")));\n\t\tString mensagem = driver.findElement(By.className(\"jGrowl-message\")).getText(); // captura a mensagem de sucesso\n\t\t\n\t\tAssert.assertEquals(\"Operação Realizada com Sucesso !\", mensagem);\n\t}",
"@Test\n public void getUser() throws Exception {\n String tokenLisa = authenticationService.authorizeUser(userCredentialsLisa);\n User lisa = service.getUser(tokenLisa, \"1\");\n User peter = service.getUser(tokenLisa, \"2\");\n\n assertNotNull(lisa);\n assertNotNull(peter);\n\n\n String tokenPeter = authenticationService.authorizeUser(userCredentialsPeter);\n lisa = service.getUser(tokenPeter, \"1\");\n peter = service.getUser(tokenPeter, \"2\");\n\n assertNull(lisa);\n assertNotNull(peter);\n }",
"private void doSignup(RoutingContext ctx){\n // Get Data from view\n JsonObject req = ctx.getBodyAsJson();\n String username = req.getString(\"username\");\n String password = req.getString(\"password\");\n\n GoogleAuthenticator authenticator = new GoogleAuthenticator();\n\n //Get Generate Key\n System.out.println(\" Calling Google Authenticator to generate AuthKey\");\n GoogleAuthenticatorKey authKey = authenticator.createCredentials();\n String key = authKey.getKey();\n System.out.println(\" Google Authenticator generated AuthKey\");\n\n //Store Data from Repository\n User user = new User(username,password,key);\n\n //send response to the user\n JsonObject res = new JsonObject().put(\"key\",key);\n ctx.response().setStatusCode(200).end(res.encode());\n }",
"private void setupGoogleSignin() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleApiClient with access to the Google Sign-In API and the\n // options specified by gso.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }",
"private void attemptCreateAccountWithGoogle() {\n // Configure sign-in to request the user's ID, email address, and basic profile. ID and\n // basic profile are included in DEFAULT_SIGN_IN.\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n if (mGoogleApiClient == null) {\n // Build a GoogleApiClient with access to GoogleSignIn.API and the options above.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, this)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n }\n\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(mGoogleApiClient);\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"@Test\n\tpublic void registerUserTest3() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(userService.existsByEmail(ArgumentMatchers.anyString())).thenReturn(true);\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(400)).andExpect(status().reason(emailTaken));\n\t}",
"private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n fbAuth.signInWithCredential(credential)\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(TAG, \"signInWithCredential:success\");\n FirebaseUser user = fbAuth.getCurrentUser();\n UserModel userModel=new UserModel();\n userModel.setEmail(user.getEmail());\n userModel.setDisplayName(user.getDisplayName());\n userModel.setPhotoUrl(user.getPhotoUrl().toString());\n userModel.setUid(user.getUid());\n UserFBDB userFBDB = new UserFBDB();\n userFBDB.save(userModel);\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n Exception ex=task.getException();\n signupWithGoogleBtn.setVisibility(View.VISIBLE);\n mProgress.setVisibility(View.INVISIBLE);\n Toast.makeText(SignupActivity.this, \"Authentication failed.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // ...\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"singn\", e.getMessage());\n }\n });\n }",
"@Test\n public void testPasswordHasNumbersAndLetters() {\n registerUser(username, \"123456789\");\n assertNull(userService.getUser(username));\n }",
"@Test\n\tpublic void registerUserTest2() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(true);\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(400)).andExpect(status().reason(usernameTaken));\n\t}",
"@Test\r\n public void testGetUtilizador() {\r\n System.out.println(\"getUtilizador\");\r\n CentroExposicoes ce = new CentroExposicoes();\r\n \r\n AlterarUtilizadorController instance = new AlterarUtilizadorController(ce);\r\n instance.getUtilizador(\"[email protected]\");\r\n }",
"protected void accionUsuario() {\n\t\t\r\n\t}",
"@SuppressWarnings(\"UnusedDeclaration\")\n boolean authorizeUser(\n String userName,\n int verificationCode,\n int window)\n throws GoogleAuthenticatorException;",
"boolean authorizeUser(String userName, int verificationCode)\n throws GoogleAuthenticatorException;",
"@Test\n public void testConfirmationEmail() throws Exception {\n User user = new User(username, password);\n user = userService.save(user);\n String token = registerController.generateUserToken(user);\n assert !user.isEnabled();\n\n String response = restTemplate.getForObject(url + \"/token/\" + token, String.class);\n user = userService.getUser(username);\n assert user.isEnabled();\n }",
"@Test\r\n\tpublic void testUserLogin() throws Exception {\n\t}",
"private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mFirebaseAuth.signInWithCredential(credential)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser user = mFirebaseAuth.getCurrentUser();\n //Toast.makeText(SignInActivity.this, R.string.sign_in_successful, Toast.LENGTH_SHORT).show();\n hideSignInWithGoogleLoadingIndicator();\n returnToCallingActivity();\n } else {\n // If sign in fails, display a message to the user.\n Log.w(DEBUG_TAG, \"signInWithCredential:failure\", task.getException());\n Toast.makeText(SignInActivity.this, R.string.failed_to_sign_in_with_credentials, Toast.LENGTH_SHORT).show();\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n }\n }\n });\n }",
"private void signInMethod() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\n }",
"private void setGoogleLoginSetting() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(R.string.default_web_client_id))\n .requestEmail()\n .build();\n\n mAuth = FirebaseAuth.getInstance();\n googleSignInClient = GoogleSignIn.getClient(this, gso);\n\n googleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this, new GoogleApiClient.OnConnectionFailedListener() {\n @Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n Log.d(Constant.TAG, \"Login fail\");\n }\n })\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n // auto login\n GoogleSignInAccount account = GoogleSignIn.getLastSignedInAccount(this);\n if(account!=null)\n firebaseAuthWithGoogle(account);\n }",
"@Test\n\tpublic void registerUserTest1() throws Exception {\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).characterEncoding(\"UTF-8\")).andDo(print()).andExpect(status().is(400));\n\n\t}",
"@Test\n public void existingUserOK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"secret\", 0); \n //Then\n assertThat(result, is(true));\n }",
"@Test\n public void noUser() {\n assertEquals(false, testBase.signIn(\"wrong\", \"false\"));\n }",
"@Override\n public void manejarLogin() {\n loginPresenter.validarLogin(etxtEmail.getText().toString(),etxtPass.getText().toString());\n }",
"@Test\n public void ValidLoginTest() throws Exception {\n openDemoSite(driver).typeAuthInfo(loginEmail, \"Temp1234%\").signInByClick();\n }",
"private void firebaseAuthWithGoogle(GoogleSignInAccount acct) {\n\n AuthCredential credential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(credential)\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(TAG, \"signInWithCredential:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n mGoogleSignInClient.signOut();\n updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"signInWithCredential:failure\", task.getException());\n //Snackbar.make(findViewById(R.id.main_layout), \"Authentication Failed.\", Snackbar.LENGTH_SHORT).show();\n updateUI(null);\n }\n\n // ...\n }\n });\n }",
"public User validarUsuario(String email, String password) throws BLException;",
"@Test\n public void wrongUsernamePassword() {\n assertEquals(false, testBase.signIn(\"user2\", \"testPassword\"));\n }",
"@Test\n public void existingUserNOT_OK_PW() {\n boolean result = auth.authenticateUser(\"Ole\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"@Test\n\tpublic void testAuthenticateUserOK() {\n\t\tgiven(userRepository.findByLogin(anyString())).willReturn(new UserBuilder(USER_RETURNED).build());\n\n\t\t// make the service call\n\t\ttry {\n\t\t\tassertThat(authService.authenticateUser(USER)).isEqualTo(USER_RETURNED);\n\t\t} catch (Exception e) {\n\t\t\tfail(\"Error testing authenticateUser: \" + e.getMessage());\n\t\t}\t\n\t}",
"@Test\n public void testRegisterUser() throws AuthenticationException, IllegalAccessException {\n facade.registerUser(\"fiske\", \"JuiceIsLoose123/\");\n assertEquals(\"fiske\", facade.getVeryfiedUser(\"fiske\", \"JuiceIsLoose123/\").getUserName(), \"Expects user exist after register\");\n }",
"private void configureGoogleSignIn() {\n // Configure sign-in to request the user's ID, email address, and basic\n // profile. ID and basic profile are included in DEFAULT_SIGN_IN.\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n mGoogleSignInClient = GoogleSignIn.getClient(this, gso);\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\n // Set the dimensions of the sign-in button.\n// googleSignInButton = findViewById(R.id.sign_in_button);\n// googleSignInButton.setSize(SignInButton.SIZE_STANDARD);\n// googleSignInButton.setOnClickListener(this);\n\n btn_google_login = navigationView.getHeaderView(1).findViewById(R.id.btn_google_login);\n btn_google_login.setOnClickListener(this);\n }",
"private void initFBGoogleSignIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(WEB_CLIENT_ID)\n .requestEmail()\n .build();\n\n Context context = getContext();\n mGoogleApiClient = new GoogleApiClient.Builder(context)\n .enableAutoManage(getActivity(), new GoogleApiClient.OnConnectionFailedListener() {\n @Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n mGoogleSignInTextView.setText(connectionResult.getErrorMessage());\n }\n }).addApi(Auth.GOOGLE_SIGN_IN_API, gso).build();\n }",
"@Test\n public void testUserNotifiedOnRegistrationSubmission() throws Exception {\n ResponseEntity<String> response = registerUser(username, password);\n assertNotNull(userService.getUser(username));\n assertEquals(successUrl, response.getHeaders().get(\"Location\").get(0));\n }",
"private void signIn() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestEmail()\n .build();\n\n // Build a GoogleSignInClient with the options specified by gso.\n GoogleSignInClient mGoogleSignInClient = GoogleSignIn.getClient(getActivity(), gso);\n\n // Starting the intent prompts the user to select a Google account to sign in with\n Intent signInIntent = mGoogleSignInClient.getSignInIntent();\n startActivityForResult(signInIntent, RC_SIGN_IN);\n }",
"@Test\n public void nonExistingUser() {\n boolean result = auth.authenticateUser(\"Spiderman\", \"fido\", 0); \n //Then\n assertThat(result, is(false));\n }",
"@Test\r\n public void testIniciarSesion() {\r\n System.out.println(\"iniciarSesion\");\r\n String usuario = \"\";\r\n String contrasenia = \"\";\r\n Usuario instance = new Usuario();\r\n instance.iniciarSesion(usuario, contrasenia);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"@Test\n public void processRegistration() throws Exception {\n String newUserName = \"goodusername\";\n long numberOfExpectedUsers = userRepository.count() + 1;\n mockMvc.perform(post(RegistrationController.BASE_URL)\n .contentType(MediaType.APPLICATION_FORM_URLENCODED)\n .param(userNameField, newUserName)\n .param(passwordField, samplePasswordValue)\n .param(verifyPasswordField, samplePasswordValue))\n .andExpect(view().name(SearchController.REDIRECT + IndexController.URL_PATH_SEPARATOR))\n .andExpect(status().is3xxRedirection());\n long updatedNumberOfUsers = userRepository.count();\n assertEquals(numberOfExpectedUsers, updatedNumberOfUsers);\n }",
"@Test\n public void testFindUsuario_String() {\n System.out.println(\"findUsuario\");\n Integer user = 1;\n Usuario usuario = new Usuario(1, \"[email protected]\", \"12345\", new Date(), true);\n UsuarioJpaController instance = new UsuarioJpaController(emf);\n Usuario expResult = instance.findUsuario(usuario.getIdUsuario());\n Usuario result = instance.findUsuario(user);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n if (!result.equals(expResult)) {\n fail(\"El test de busqueda por id ha fallado\");\n }\n }",
"public String guardarUsuario() {\n\t\terror=\"\";\n\t\tUsuario nuevoUsuario = new Usuario();\n\t\tnuevoUsuario.setPassword(password);\n\t\tnuevoUsuario.setEmail(email);\n\t\tTokenGenerator miToken = new TokenGenerator();\n\t\tnuevoUsuario.setToken(miToken.generateToken());\n\t\t\n\t\tif(usuarioService.validaUsuarioEmail(nuevoUsuario)==true && usuarioService.validaUsuarioPassword(nuevoUsuario)==true && usuarioService.contraseñasComunes(nuevoUsuario)==true) {\n\t\t\terror=null;\n\t\t\tusuarioService.guardarUsuario(nuevoUsuario);//se guarda usuairo\n\t\t\tUsuario usuarioDb = usuarioService.buscarUsuarioPorEmailyContraseña(nuevoUsuario.getEmail(), nuevoUsuario.getPassword());\n\t\t\tif (usuarioDb != null) {\n\t\t\t\tString accion = \"Usuario \"+ usuarioDb.getEmail() + \" registrado.\";\n\t\t\t\tauditoriaService.registrarAuditoria(usuarioDb,accion);\n\t\t\t}\n\t\t\terror=\"Se envio un correo a su cuenta.\";\n\t\t\treturn \"index\";\n\t\t}\n\t\tUsuario usuarioDb = usuarioService.buscarUsuarioPorEmailyContraseña(nuevoUsuario.getEmail(), nuevoUsuario.getPassword());\n\t\tif(usuarioDb==null) {\n\t\t\tString accion = \"Error al registrar usuario \"+email;\n\t\t\tauditoriaService.registrarAuditoria(usuarioDb,accion);\n\t\t}\n\t\terror=\"Email o Contraseña no validos\";\n\t\treturn \"registro\";\n\t}",
"@Test\r\n public void testGetEmail() {\r\n user = userFactory.getUser(\"C\");\r\n assertEquals(\"[email protected]\", user.getEmail());\r\n }",
"public interface IGoogleServices {\n void signIn();\n void signOut();\n void changeUser();\n boolean isConnected();\n boolean isConnecting();\n}",
"@Test\n public void t01_buscaAdmin() throws Exception {\n Usuario admin;\n admin = usuarioServico.login(\"administrador\", \".Ae12345\");\n assertNotNull(admin);\n }",
"@WithMockUser(username = \"guest\", authorities = {\"GUEST\"})\n @Test\n @DisplayName(\"Allowed get books requests for GUEST role \")\n void getBooksByGuest() throws Exception {\n mockMvc.perform(get(\"/books\").with(csrf())).andExpect(status().isOk());\n }",
"private void FirebaseGoogleAuth(GoogleSignInAccount acct) {\n if (acct != null) {\n AuthCredential authCredential = GoogleAuthProvider.getCredential(acct.getIdToken(), null);\n mAuth.signInWithCredential(authCredential).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Toast.makeText(MainActivity.this, \"Successful\", Toast.LENGTH_SHORT).show();\n FirebaseUser user = mAuth.getCurrentUser();\n\n updateUI(user);\n\n } else {\n Toast.makeText(MainActivity.this, \"Failed\", Toast.LENGTH_SHORT).show();\n updateUI(null);\n }\n }\n });\n }\n else{\n Toast.makeText(MainActivity.this, \"acc failed\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Test\r\n public void testCLogin() {\r\n System.out.println(\"login\");\r\n \r\n String userName = \"admin\";\r\n String contraseña = \"admin\";\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n \r\n Usuario result = instance.login(userName, contraseña);\r\n \r\n assertNotNull(result);\r\n }",
"private void configureSignup() {\n\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(this.getResources().getString(R.string.web_client_id))\n .requestEmail().build();\n\n // Build a GoogleApiClient with access to GoogleSignIn.API and the options above.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n\n mGoogleApiClient.connect();\n }",
"@Override\n public void onLoginGoogle(Activity activity, final ILoginModelListener modelListener) {\n if (NetworkUtils.isNetworkAvailable(activity)){\n GoogleSignInClient mGoogleSignInClient;\n GoogleApiClient googleApiClient;\n GoogleSignInOptions googleSignInOptions= GoogleSignInOptionUtils.getGoogleSignInOptions(activity);\n\n mGoogleSignInClient = GoogleSignIn.getClient(activity,googleSignInOptions);\n\n googleApiClient = new GoogleApiClient.Builder(activity)\n .enableAutoManage((FragmentActivity) activity, new GoogleApiClient.OnConnectionFailedListener() {\n @Override\n public void onConnectionFailed(@NonNull ConnectionResult connectionResult) {\n modelListener.onLoginFailed(\"No Internet\");\n }\n\n })\n\n .build();\n Intent signInIntent = Auth.GoogleSignInApi.getSignInIntent(googleApiClient);\n activity.startActivityForResult(signInIntent, LoginActivity.REQUEST_CODE_GOOGLE);\n\n } else {\n modelListener.onLoginFailed(\"No Internet! Please check your connect\");\n }\n }",
"@Test\n public void testActualizar() {\n System.out.println(\"actualizar\");\n usuarioController.crear(usuario1);\n int codigo = 1;\n Usuario usuario = usuario1;\n usuario.setEstado(\"desactivado\");\n boolean expResult = true;\n boolean result = usuarioController.actualizar(codigo, usuario);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n //fail(\"The test case is a prototype.\");\n }",
"@Query(\"SELECT * FROM USERS_TABLE\")\n List<UsersEntity>checkUsernameAndPassword();",
"@Test\n public void loginWithEmptyEmail(){\n String rand=random.getNewRandomName()+\"_auto\";\n Assert.assertEquals(createUserChecking.creationChecking(rand,\"\"),\"APPLICATION ERROR #1200\");\n log.info(\"Empty email and login \"+ rand+\" were typed\");\n }",
"@Test\n\tvoid validRegisterTest() throws Exception {\n\t\tUser userObj = new User();\n\t\tuserObj.setName(\"Siva Murugan\");\n\t\tuserObj.setEmail(\"[email protected]\");\n\t\tuserObj.setGender(\"M\");\n\t\tuserObj.setMobileNumber(9878909878L);\n\t\tuserObj.setRole(\"C\");\n\t\tuserObj.setUsername(\"sivanew\");\n\t\tuserObj.setPassword(\"Siva123@\");\n\t\tString userJson = new ObjectMapper().writeValueAsString(userObj);\n\t\twhen(userService.registerUser(any(User.class))).thenReturn(true);\n\t\tmockMvc.perform(post(\"/vegapp/v1/users/register\").contentType(MediaType.APPLICATION_JSON).content(userJson))\n\t\t\t\t.andExpect(status().isOk()).andExpect(content().string(\"true\"));\n\t}",
"@Test\r\n public void testAgregar() {\r\n System.out.println(\"agregar\");\r\n Integer idUsuario = null;\r\n String nombre = \"\";\r\n String apellido = \"\";\r\n String usuario = \"\";\r\n String genero = \"\";\r\n String contrasenia = \"\";\r\n String direccion = \"\";\r\n Usuario instance = new Usuario();\r\n instance.agregar(idUsuario, nombre, apellido, usuario, genero, contrasenia, direccion);\r\n // TODO review the generated test code and remove the default call to fail.\r\n }",
"@Test\n\tpublic void registerUserTest7() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(userService.existsByEmail(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tRole role = new Role();\n\t\trole.setType(RoleType.USER);\n\t\tMockito.when(roleService.findByType(ArgumentMatchers.any(RoleType.class))).thenReturn(Optional.of(role));\n\t\tUser user = new User();\n\t\tMockito.when(userService.save(ArgumentMatchers.any(User.class), ArgumentMatchers.anyBoolean())).thenReturn(user);\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(201)).andExpect(content().json(objectMapper.writeValueAsString(user)));\n\t}",
"@Category({ Critical.class })\n\t@Test\n\tpublic void gmailLoginShouldBeSuccessful() {\n\t\tSignInPage signInPage = WebUtils.gotoSignInPage(driver);\n\t\t// 2. Click to gmail\n\t\tsignInPage.accessGmailPage(driver);\n\t\t// 3. Input user name\n\t\tsignInPage.fillInUsername(driver, \"[email protected]\");\n\t\t// 4. Click next\n\t\tsignInPage.clickNextUser(driver);\n\t\t// 5. Input password\n\t\tSignInPage.fillInPassword(driver, \"nga123456789\");\n\t\t// 6. Click passwordNext\n\t\tEmailHomepage emailHomepage = signInPage.clickNextPass(driver);\n\t\t// 7. verify Inbox\n\t\tAssert.assertTrue(\"Sign in successfully\", emailHomepage.isElementExist(driver));\n\t\t// 8.Click profile Button\n\t\tsignInPage = emailHomepage.signOut(driver);\n\t}",
"private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}",
"@Given(\"^El usuario quiere acceder al sistema$\")\n\tpublic void El_usuario_quiere_acceder_al_sistema() throws Throwable {\n\t\tdao = new DAOPersona();\n\t p=new Persona(\"Carlos\", \"Delgado\", \"carlitos93\", \"[email protected]\", \"a1Zs7s2DM\", \"Calle Jane Doe\", \"0\", \"photo\", false, null, null, null);\n\t assert(true);\n\t}",
"@Test\n public void wrongPassword() {\n assertEquals(false, testBase.signIn(\"testName\", \"false\"));\n }",
"@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n //startActivity(new Intent(MainActivity.this, VentanaInicio.class));\n Intent intent = new Intent(getApplicationContext(), VentanaInicio.class);\n\n intent.putExtra(\"string_usuario\", email);\n\n startActivity(intent);\n //finish es para que no pueda volver a la pantalla anterior\n finish();\n }\n //Si no\n else {\n Toast.makeText(MainActivity.this, \"No se pudo iniciar la sesión, compruebe los datos\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Test\n public void shouldLogin() {\n }",
"@Test\n\tpublic void registerUserTest6() throws Exception {\n\t\tSignUpRequest signUpRequest = new SignUpRequest(\"Marko\", \"Troskot\", \"MTro\", \"[email protected]\", \"pass123\", \"pass123\");\n\n\t\tMockito.when(userService.existsByUsername(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tMockito.when(userService.existsByEmail(ArgumentMatchers.anyString())).thenReturn(false);\n\t\tRole role = new Role();\n\t\trole.setType(RoleType.USER);\n\t\tMockito.when(roleService.findByType(ArgumentMatchers.any(RoleType.class))).thenReturn(Optional.of(role));\n\t\tMockito.when(userService.save(ArgumentMatchers.any(User.class), ArgumentMatchers.anyBoolean())).thenReturn(null);\n\n\t\tmockMvc.perform(post(\"/api/auth/signup\").contentType(MediaType.APPLICATION_JSON).content(objectMapper.writeValueAsString(signUpRequest)).characterEncoding(\"UTF-8\"))\n\t\t\t\t.andDo(print()).andExpect(status().is(400)).andExpect(status().reason(notSuccessful));\n\t}",
"@Test\r\n public void testGGetContratistas() {\r\n System.out.println(\"getContratistas\");\r\n \r\n UsuarioDao instance = new UsuarioDao();\r\n List<Usuario> result = instance.getContratistas();\r\n \r\n assertFalse(result.isEmpty());\r\n }",
"@Test\n public void testLoggedInUser() throws IOException {\n Map<String, Object> attr = new HashMap<>();\n String id = \"123\";\n attr.put(\"com.google.appengine.api.users.UserService.user_id_key\", id);\n helper.setEnvEmail(\"[email protected]\")\n .setEnvAttributes(attr)\n .setEnvAuthDomain(\"example.com\")\n .setEnvIsLoggedIn(true)\n .setUp();\n\n ArgumentCaptor<String> captor = ArgumentCaptor.forClass(String.class);\n\n HttpServletRequest request = mock(HttpServletRequest.class);\n HttpServletResponse response = mock(HttpServletResponse.class);\n\n StringWriter stringWriter = new StringWriter();\n PrintWriter writer = new PrintWriter(stringWriter);\n writer.flush();\n when(response.getWriter()).thenReturn(writer);\n\n assertNull(ofy().load().type(UserObject.class).id(id).now());\n\n new LoginRegistrationServlet().doGet(request, response);\n writer.flush();\n\n verify(response, atLeast(1)).sendRedirect(captor.capture());\n assertEquals(\"/home\", captor.getValue());\n\n UserObject result = ofy().load().type(UserObject.class).id(id).now();\n\n assertEquals(result.getId(), id);\n assertEquals(result.getUsername(), \"test\");\n assertEquals(result.getEmail(), \"[email protected]\");\n assertEquals(result.getProfilePicUrl(), \"\");\n }",
"@Test\n public void testUserCanBeRegistered() {\n assert username.length() > 3 && username.length() < 16;\n registerUser(username, password);\n assertNotNull(userService.getUser(username));\n }",
"@Override\n protected void afterAuthenticating() {\n }",
"@Test\n\tpublic void emailExistsAuth() {\n\t\tassertTrue(service.emailExists(\"[email protected]\"));\n\t}",
"@Test\n\tvoid shouldFindUserWithCorrectId() throws Exception {\n\t\tUser user = this.userService.findUser(\"antonio98\").orElse(null);\n\t\tAssertions.assertThat(user.getUsername()).isEqualTo(\"antonio98\");\n\t}",
"@Order(1)\n\t@Test\n\tpublic void Attempt_LoginSuccess() throws AuthException\n\t{\n\t\t//Test to make certain we login correctly.\n\t\tString user = \"null\", pass = \"andVoid\";\n\t\tboolean expected = true, actual = as.authenticateUser(user, pass);\n\t\tassertEquals(expected,actual,\"This is the correct login credentials for the System Admin\");\n\t}",
"@Test\n\t void testEmail() {\n\t\tString expected=\"[email protected]\";\n\t\tString actual=user.getEmail();\n\t\tassertEquals(expected, actual);\n\t}"
]
| [
"0.69067657",
"0.61842865",
"0.59811205",
"0.590054",
"0.58423233",
"0.58364064",
"0.57571286",
"0.574605",
"0.57158613",
"0.5703752",
"0.56660134",
"0.5638214",
"0.5630151",
"0.56290954",
"0.5628625",
"0.5622821",
"0.561155",
"0.56107354",
"0.5596532",
"0.5577363",
"0.5576274",
"0.5569926",
"0.5550308",
"0.55398345",
"0.5532693",
"0.55316234",
"0.5530607",
"0.5513299",
"0.5510019",
"0.54818463",
"0.54644823",
"0.545277",
"0.5443113",
"0.5436312",
"0.54340565",
"0.5432374",
"0.54283684",
"0.54262865",
"0.54220426",
"0.54200566",
"0.5391506",
"0.5384975",
"0.5384371",
"0.538239",
"0.5377616",
"0.5368196",
"0.53625387",
"0.53512174",
"0.5348769",
"0.5341237",
"0.5326546",
"0.53197354",
"0.53119874",
"0.530589",
"0.53041035",
"0.52995783",
"0.5298919",
"0.5294787",
"0.5289613",
"0.528754",
"0.5285231",
"0.52817804",
"0.52693045",
"0.5259701",
"0.52593017",
"0.52486753",
"0.5220333",
"0.52142906",
"0.5213709",
"0.5213654",
"0.5212399",
"0.52113533",
"0.51988536",
"0.5187183",
"0.51868534",
"0.5183963",
"0.5181028",
"0.5178437",
"0.5175891",
"0.5165823",
"0.51643693",
"0.514572",
"0.5133413",
"0.5127448",
"0.51261693",
"0.5124628",
"0.5123518",
"0.5118472",
"0.5114299",
"0.5111115",
"0.511002",
"0.5109461",
"0.510817",
"0.5104703",
"0.50996387",
"0.5092795",
"0.509227",
"0.509079",
"0.50881815",
"0.50870603"
]
| 0.819306 | 0 |
Add (+,+), (, +), (, ), (+, ) to quadrants | public void run() {
GCanvas gc = this.getGCanvas();
this.setSize(1000,1000);
GOval wheel = new GOval(100, 100, 800, 800);
this.add(wheel);
GLine horzline = new GLine(105,500, 895, 500);
this.add(horzline);
GLine vertline = new GLine(500,105, 500, 895);
this.add(vertline);
GLabel Quad1 = new GLabel("(+,+)", 700, 100);
Quad1.setFont("Arial-PLAIN-28");
this.add(Quad1);
GLabel Quad2 = new GLabel("(-,+)", 300, 100);
Quad2.setFont("Arial-PLAIN-28");
this.add(Quad2);
GLabel Quad3 = new GLabel("(-,-)", 300, 900);
Quad3.setFont("Arial-PLAIN-28");
this.add(Quad3);
GLabel Quad4 = new GLabel("(+,-)", 700, 900);
Quad4.setFont("Arial-PLAIN-28");
this.add(Quad4);
//TwoPi
GLabel TwoPiShow = new GLabel("2π");
GOval twopi = new GOval(890, 490, 20,20);
this.add(twopi);
twopi.setFilled(true);
twopi.setFillColor(Color.BLACK);
TwoPiShow.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(TwoPiShow, 915, 510);
GLabel TwoPiSin = new GLabel("(0)");
TwoPiSin.setFont("Arial-PLAIN-18");
TwoPiSin.setColor(Color.GREEN);
GLabel TwoPiCos = new GLabel("(1)");
TwoPiCos.setFont("Arial-PLAIN-18");
TwoPiCos.setColor(Color.BLUE);
GLabel TwoPiTan = new GLabel("(0)");
TwoPiTan.setFont("Arial-PLAIN-18");
TwoPiTan.setColor(Color.RED);
GLabel TwoPiSec = new GLabel("(1)");
TwoPiSec.setFont("Arial-PLAIN-18");
TwoPiSec.setColor(Color.CYAN);
GLabel TwoPiCsc = new GLabel("(undefined)");
TwoPiCsc.setFont("Arial-PLAIN-18");
TwoPiCsc.setColor(Color.ORANGE);
/*
Make Mouse Listener Thing for:
Sin(2pi) = 0
Cos(2pi) = 1
*/
//Zero
GLabel Zero = new GLabel("0");
Zero.setFont("Arial-PLAIN-18");
this.add(Zero, 915, 495);
/*
Make Mouse Listener Thing for:
Or I guess make a button to show these:
Sin(0) = 0
Cos(0) = 1
Tan(0)
Sec(0)
Csc(0)
Cot(0)
Mouse Scroll Over --> show that:
Tan = (sin)/(cos)
Sec = 1/(cos)
Cot = 1/(tan)
Csc = 1/(sin)
*/
// Quad 1
//Pi6
GLabel Pi6Show = new GLabel("(π/6)");
GOval Pi6 = new GOval(840, 300, 20,20);
this.add(Pi6);
Pi6.setFilled(true);
Pi6.setFillColor(Color.BLACK);
Pi6Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(Pi6Show, 860, 300);
GLabel Pi6Sin = new GLabel("(1/2)");
Pi6Sin.setFont("Arial-PLAIN-18");
Pi6Sin.setColor(Color.GREEN);
GLabel Pi6Cos = new GLabel("(√3/2)");
Pi6Cos.setFont("Arial-PLAIN-18");
Pi6Cos.setColor(Color.BLUE);
GLabel Pi6Tan = new GLabel("(√3/3)");
Pi6Tan.setFont("Arial-PLAIN-18");
Pi6Tan.setColor(Color.RED);
GLabel Pi6Cot = new GLabel("(√3)");
Pi6Cot.setFont("Arial-PLAIN-18");
Pi6Cot.setColor(Color.MAGENTA);
GLabel Pi6Csc = new GLabel("2");
Pi6Csc.setFont("Arial-PLAIN-18");
Pi6Csc.setColor(Color.CYAN);
GLabel Pi6Sec = new GLabel("(2√3/3)");
Pi6Sec.setFont("Arial-PLAIN-18");
Pi6Sec.setColor(Color.ORANGE);
/*
Make Mouse Listener Thing for:
Sin(pi/6) = 1/2
Cos(pi/6) = sqrt(3)/2
*/
//Pi4
GLabel Pi4Show = new GLabel("(π/4)");
GOval Pi4 = new GOval(770, 200, 20,20);
this.add(Pi4);
Pi4.setFilled(true);
Pi4.setFillColor(Color.BLACK);
Pi4Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(Pi4Show, 800, 200);
GLabel Pi4Sin = new GLabel("(√2/2)");
Pi4Sin.setFont("Arial-PLAIN-18");
Pi4Sin.setColor(Color.GREEN);
GLabel Pi4Cos = new GLabel("(√2/2)");
Pi4Cos.setFont("Arial-PLAIN-18");
Pi4Cos.setColor(Color.blue);
GLabel Pi4Tan = new GLabel("1");
Pi4Cos.setFont("Arial-PLAIN-18");
Pi4Cos.setColor(Color.RED);
GLabel Pi4Sec = new GLabel("(2√2/2)");
Pi4Cos.setFont("Arial-PLAIN-18");
Pi4Cos.setColor(Color.ORANGE);
GLabel Pi4Csc = new GLabel("(2√2/2)");
Pi4Cos.setFont("Arial-PLAIN-18");
Pi4Cos.setColor(Color.CYAN);
//Pi3
GLabel Pi3Show = new GLabel("(π/3)");
GOval Pi3 = new GOval(650, 120, 20,20);
this.add(Pi3);
Pi3.setFilled(true);
Pi3.setFillColor(Color.BLACK);
Pi3Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(Pi3Show, 670, 120);
GLabel Pi3Sin = new GLabel("(√3/2)");
Pi3Sin.setFont("Arial-PLAIN-18");
Pi3Sin.setColor(Color.GREEN);
GLabel Pi3Cos = new GLabel("(1/2)");
Pi3Cos.setFont("Arial-PLAIN-18");
Pi3Cos.setColor(Color.BLUE);
GLabel Pi3Tan = new GLabel("(√3)");
Pi3Tan.setFont("Arial-PLAIN-18");
Pi3Tan.setColor(Color.RED);
GLabel Pi3Sec = new GLabel("2");
Pi3Sec.setFont("Arial-PLAIN-18");
Pi3Sec.setColor(Color.ORANGE);
GLabel Pi3Csc = new GLabel("(2√3/3)");
Pi3Csc.setFont("Arial-PLAIN-18");
Pi3Csc.setColor(Color.CYAN);
//Pi2
GLabel Pi2Show = new GLabel("(π/2)");
GOval Pi2 = new GOval(490, 90, 20,20);
this.add(Pi2);
Pi2.setFilled(true);
Pi2.setFillColor(Color.BLACK);
Pi2Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(Pi2Show, 490, 90);
GLabel Pi2Sin = new GLabel("(1)");
Pi2Sin.setFont("Arial-PLAIN-18");
Pi2Sin.setColor(Color.GREEN);
GLabel Pi2Cos = new GLabel("(0)");
Pi2Cos.setFont("Arial-PLAIN-18");
Pi2Cos.setColor(Color.BLUE);
GLabel Pi2Tan = new GLabel("(undefined)");
Pi2Tan.setFont("Arial-PLAIN-18");
Pi2Tan.setColor(Color.RED);
GLabel Pi2Sec = new GLabel("(undefined)");
Pi2Sec.setFont("Arial-PLAIN-18");
Pi2Sec.setColor(Color.ORANGE);
GLabel Pi2Csc = new GLabel("(1)");
Pi2Csc.setFont("Arial-PLAIN-18");
Pi2Csc.setColor(Color.CYAN);
// Quad 2
//2Pi3
GLabel TwoPi3Show = new GLabel("(2π/3)");
GOval TwoPi3 = new GOval(340, 115, 20,20);
this.add(TwoPi3);
TwoPi3.setFilled(true);
TwoPi3.setFillColor(Color.BLACK);
TwoPi3Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(TwoPi3Show, 285, 125);
GLabel TwoPi3Sin = new GLabel("(√3/2)");
TwoPi3Sin.setFont("Arial-PLAIN-18");
TwoPi3Sin.setColor(Color.GREEN);
GLabel TwoPi3Cos = new GLabel("(-1/2)");
TwoPi3Cos.setFont("Arial-PLAIN-18");
TwoPi3Cos.setColor(Color.BLUE);
GLabel TwoPi3Tan = new GLabel("(-√3)");
TwoPi3Tan.setFont("Arial-PLAIN-18");
Pi2Tan.setColor(Color.RED);
GLabel TwoPi3Sec = new GLabel("(-2)");
TwoPi3Sec.setFont("Arial-PLAIN-18");
TwoPi3Sec.setColor(Color.ORANGE);
GLabel TwoPi3Csc = new GLabel("(2√3/3)");
TwoPi3Csc.setFont("Arial-PLAIN-18");
TwoPi3Csc.setColor(Color.CYAN);
//3Pi4
GLabel ThreePi4Show = new GLabel("(3π/4)");
GOval ThreePi4 = new GOval(225, 190, 20,20);
this.add(ThreePi4);
ThreePi4.setFilled(true);
ThreePi4.setFillColor(Color.BLACK);
ThreePi4Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(ThreePi4Show, 160, 205);
GLabel ThreePi4Sin = new GLabel("(√2/2)");
ThreePi4Sin.setFont("Arial-PLAIN-18");
ThreePi4Sin.setColor(Color.GREEN);
GLabel ThreePi4Cos = new GLabel("(-√2/2)");
ThreePi4Cos.setFont("Arial-PLAIN-18");
ThreePi4Cos.setColor(Color.BLUE);
GLabel ThreePi4Tan = new GLabel("(-1)");
ThreePi4Tan.setFont("Arial-PLAIN-18");
ThreePi4Tan.setColor(Color.RED);
GLabel ThreePi4Sec = new GLabel("(-2√2/2)");
ThreePi4Sec.setFont("Arial-PLAIN-18");
ThreePi4Sec.setColor(Color.ORANGE);
GLabel ThreePi4Csc = new GLabel("(2√3/3)");
ThreePi4Csc.setFont("Arial-PLAIN-18");
ThreePi4Csc.setColor(Color.CYAN);
//5Pi6
GLabel FivePi6Show = new GLabel("(5π/6)");
GOval FivePi6 = new GOval(135, 290, 20,20);
this.add(FivePi6);
FivePi6.setFilled(true);
FivePi6.setFillColor(Color.BLACK);
FivePi6Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(FivePi6Show, 80, 310);
GLabel FivePi6Sin = new GLabel("(1/2)");
FivePi6Sin.setFont("Arial-PLAIN-18");
FivePi6Sin.setColor(Color.GREEN);
GLabel FivePi6Cos = new GLabel("(-√3/2)");
FivePi6Cos.setFont("Arial-PLAIN-18");
FivePi6Cos.setColor(Color.BLUE);
GLabel FivePi6Tan = new GLabel("(-√3/3)");
FivePi6Tan.setFont("Arial-PLAIN-18");
FivePi6Tan.setColor(Color.RED);
GLabel FivePi6Sec = new GLabel("(-2√2/2)");
FivePi6Sec.setFont("Arial-PLAIN-18");
FivePi6Sec.setColor(Color.ORANGE);
GLabel FivePi6Csc = new GLabel("(2)");
FivePi6Csc.setFont("Arial-PLAIN-18");
FivePi6Csc.setColor(Color.CYAN);
//Pi
GLabel PiShow = new GLabel("π");
GOval pi = new GOval(90, 490, 20,20);
this.add(pi);
pi.setFilled(true);
pi.setFillColor(Color.BLACK);
PiShow.setFont("Arial-PLAIN-22");
//Make into Mouse Listener
this.add(PiShow, 75, 510);
GLabel PiSin = new GLabel("(0)");
PiSin.setFont("Arial-PLAIN-18");
PiSin.setColor(Color.GREEN);
GLabel PiCos = new GLabel("(-1)");
PiCos.setFont("Arial-PLAIN-18");
PiCos.setColor(Color.BLUE);
GLabel PiTan = new GLabel("(0)");
PiTan.setFont("Arial-PLAIN-18");
PiTan.setColor(Color.RED);
GLabel PiSec = new GLabel("(-1)");
PiSec.setFont("Arial-PLAIN-18");
PiSec.setColor(Color.ORANGE);
GLabel PiCsc = new GLabel("(undefined)");
PiCsc.setFont("Arial-PLAIN-18");
PiCsc.setColor(Color.CYAN);
//Quad 3
//7Pi6
GLabel SevenPi6Show = new GLabel("(7π/6)");
GOval SevenPi6 = new GOval(145, 680, 20,20);
this.add(SevenPi6);
SevenPi6.setFilled(true);
SevenPi6.setFillColor(Color.BLACK);
SevenPi6Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(SevenPi6Show, 90, 690);
GLabel SevenPi6Sin = new GLabel("(-1/2)");
SevenPi6Sin.setFont("Arial-PLAIN-18");
SevenPi6Sin.setColor(Color.GREEN);
GLabel SevenPi6Cos = new GLabel("(-√3/2)");
SevenPi6Cos.setFont("Arial-PLAIN-18");
SevenPi6Cos.setColor(Color.BLUE);
GLabel SevenPi6Tan = new GLabel("(√3/3)");
SevenPi6Tan.setFont("Arial-PLAIN-18");
SevenPi6Tan.setColor(Color.RED);
GLabel SevenPi6Sec = new GLabel("(-2√3/3)");
SevenPi6Sec.setFont("Arial-PLAIN-18");
SevenPi6Sec.setColor(Color.ORANGE);
GLabel SevenPi6Csc = new GLabel("(-2)");
SevenPi6Csc.setFont("Arial-PLAIN-18");
SevenPi6Csc.setColor(Color.CYAN);
//5Pi4
GLabel FivePi4Show = new GLabel("(5π/4)");
GOval FivePi4 = new GOval(205, 780, 20,20);
this.add(FivePi4);
FivePi4.setFilled(true);
FivePi4.setFillColor(Color.BLACK);
FivePi4Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(FivePi4Show, 150, 790);
GLabel FivePi4Sin = new GLabel("(-√2/2)");
FivePi4Sin.setFont("Arial-PLAIN-18");
FivePi4Sin.setColor(Color.GREEN);
GLabel FivePi4Cos = new GLabel("(-√2/2)");
FivePi4Cos.setFont("Arial-PLAIN-18");
FivePi4Cos.setColor(Color.BLUE);
GLabel FivePi4Tan = new GLabel("(1)");
FivePi4Tan.setFont("Arial-PLAIN-18");
FivePi4Tan.setColor(Color.RED);
GLabel FivePi4Csc = new GLabel("(-2√2/2)");
FivePi4Csc.setFont("Arial-PLAIN-18");
FivePi4Csc.setColor(Color.CYAN);
GLabel FivePi4Sec = new GLabel("(-2√2/2)");
FivePi4Sec.setFont("Arial-PLAIN-18");
FivePi4Sec.setColor(Color.ORANGE);
//4Pi3
GLabel FourPi3Show = new GLabel("(4π/3)");
GOval FourPi3 = new GOval(335, 860, 20,20);
this.add(FourPi3);
FourPi3.setFilled(true);
FourPi3.setFillColor(Color.BLACK);
FourPi3Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(FourPi3Show, 275, 870);
GLabel FourPi3Sin = new GLabel("(-√3/2)");
FourPi3Sin.setFont("Arial-PLAIN-18");
FourPi3Sin.setColor(Color.GREEN);
GLabel FourPi3Cos = new GLabel("(-1/2)");
FourPi3Cos.setFont("Arial-PLAIN-18");
FourPi3Cos.setColor(Color.blue);
GLabel FourPi3Tan = new GLabel("(√3)");
FourPi3Cos.setFont("Arial-PLAIN-18");
FourPi3Cos.setColor(Color.RED);
GLabel FourPi3Sec = new GLabel("(-2)");
FourPi3Cos.setFont("Arial-PLAIN-18");
FourPi3Cos.setColor(Color.ORANGE);
GLabel FourPi3Csc = new GLabel("(-2√3/3)");
FourPi3Cos.setFont("Arial-PLAIN-18");
FourPi3Cos.setColor(Color.CYAN);
/*
//TwoPi
GLabel TwoPiShow = new GLabel("2π");
GOval twopi = new GOval(890, 490, 20,20);
this.add(twopi);
twopi.setFilled(true);
twopi.setFillColor(Color.BLACK);
TwoPiShow.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(TwoPiShow, 915, 510);
*/
//3Pi2
GLabel ThreePi2Show = new GLabel("(3π/2)");
GOval ThreePi2 = new GOval(490, 890, 20,20);
this.add(ThreePi2);
ThreePi2.setFilled(true);
ThreePi2.setFillColor(Color.BLACK);
ThreePi2Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(ThreePi2Show, 480, 890);
GLabel ThreePi2Sin = new GLabel("(-1)");
ThreePi2Sin.setFont("Arial-PLAIN-18");
ThreePi2Sin.setColor(Color.GREEN);
GLabel ThreePi2Cos = new GLabel("(0)");
ThreePi2Cos.setFont("Arial-PLAIN-18");
ThreePi2Cos.setColor(Color.BLUE);
GLabel ThreePi2Tan = new GLabel("(undefined)");
ThreePi2Tan.setFont("Arial-PLAIN-18");
ThreePi2Tan.setColor(Color.RED);
GLabel ThreePi2Cot = new GLabel("(0)");
ThreePi2Cot.setFont("Arial-PLAIN-18");
ThreePi2Cot.setColor(Color.MAGENTA);
GLabel ThreePi2Csc = new GLabel("(-1)");
ThreePi2Csc.setFont("Arial-PLAIN-18");
ThreePi2Csc.setColor(Color.CYAN);
GLabel ThreePi2Sec = new GLabel("(undefined)");
ThreePi2Sec.setFont("Arial-PLAIN-18");
ThreePi2Sec.setColor(Color.ORANGE);
//FivePi3
GLabel FivePi3Show = new GLabel("(5π/3)");
GOval FivePi3 = new GOval(655, 855, 20,20);
this.add(FivePi3);
FivePi3.setFilled(true);
FivePi3.setFillColor(Color.BLACK);
FivePi3Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(FivePi3Show, 685, 865);
GLabel FivePi3Sin = new GLabel("(-√3/2)");
FivePi3Sin.setFont("Arial-PLAIN-18");
FivePi3Sin.setColor(Color.GREEN);
GLabel FivePi3Cos = new GLabel("(1/2)");
FivePi3Cos.setFont("Arial-PLAIN-18");
FivePi3Cos.setColor(Color.BLUE);
GLabel FivePi3Tan = new GLabel("(-√3)");
FivePi3Tan.setFont("Arial-PLAIN-18");
FivePi3Tan.setColor(Color.RED);
GLabel FivePi3Csc = new GLabel("(-2√3/3)");
FivePi3Csc.setFont("Arial-PLAIN-18");
FivePi3Csc.setColor(Color.CYAN);
GLabel FivePi3Sec = new GLabel("2");
FivePi3Sec.setFont("Arial-PLAIN-18");
FivePi3Sec.setColor(Color.ORANGE);
//SevenPi4
GLabel SevenPi4Show = new GLabel("(7π/4)");
GOval SevenPi4 = new GOval(785, 760, 20,20);
this.add(SevenPi4);
SevenPi4.setFilled(true);
SevenPi4.setFillColor(Color.BLACK);
SevenPi4Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(SevenPi4Show, 810, 770);
GLabel SevenPi4Sin = new GLabel("(-√2/2)");
SevenPi4Sin.setFont("Arial-PLAIN-18");
SevenPi4Sin.setColor(Color.GREEN);
GLabel SevenPi4Cos = new GLabel("(√2/2)");
SevenPi4Cos.setFont("Arial-PLAIN-18");
FivePi3Cos.setColor(Color.BLUE);
GLabel SevenPi4Tan = new GLabel("(-1)");
SevenPi4Tan.setFont("Arial-PLAIN-18");
SevenPi4Tan.setColor(Color.RED);
GLabel SevenPi4Csc = new GLabel("(-2√2/2)");
SevenPi4Csc.setFont("Arial-PLAIN-18");
SevenPi4Csc.setColor(Color.CYAN);
GLabel SevenPi4Sec = new GLabel("(2√2/2)");
SevenPi4Sec.setFont("Arial-PLAIN-18");
SevenPi4Sec.setColor(Color.ORANGE);
//ElevenPi6
GLabel ElevenPi6Show = new GLabel("(11π/4)");
GOval ElevenPi6 = new GOval(855, 660, 20,20);
this.add(ElevenPi6);
ElevenPi6.setFilled(true);
ElevenPi6.setFillColor(Color.BLACK);
SevenPi4Show.setFont("Arial-PLAIN-18");
//Make into Mouse Listener
this.add(ElevenPi6Show, 885, 670);
GLabel ElevenPi6Sin = new GLabel("(-1/2)");
ElevenPi6Sin.setFont("Arial-PLAIN-18");
ElevenPi6Sin.setColor(Color.GREEN);
GLabel ElevenPi6Cos = new GLabel("(√3/2)");
ElevenPi6Cos.setFont("Arial-PLAIN-18");
ElevenPi6Cos.setColor(Color.BLUE);
GLabel ElevenPi6Tan = new GLabel("(-√3/3)");
ElevenPi6Tan.setFont("Arial-PLAIN-18");
ElevenPi6Tan.setColor(Color.RED);
GLabel ElevenPi6Csc = new GLabel("(-2)");
ElevenPi6Csc.setFont("Arial-PLAIN-18");
ElevenPi6Csc.setColor(Color.CYAN);
GLabel ElevenPi6Sec = new GLabel("(2√3/3)");
ElevenPi6Sec.setFont("Arial-PLAIN-18");
ElevenPi6Sec.setColor(Color.ORANGE);
//Now add mouse listeners and lines
// Add buttons (action listeners) too with sin, cos, tan, sec, csc, cot
//And then a key listener for a quiz
/*
Pi6.addMouseMotionListener(
new MouseMotionListener() {
@Override
public void mouseDragged(MouseEvent e) { }
@Override
public void mouseMoved(MouseEvent e) {
GLine LinePi6 = new GLine(400, 400, 840, 300);
LinePi6.setColor(Color.GREEN);
canvas.add(LinePi6);
}
}
);
*/
JButton buttonSin = new JButton("Sin(x)");
this.add(buttonSin, SOUTH);
JButton buttonCos = new JButton("Cos(x)");
this.add(buttonCos, SOUTH);
JButton buttonTan = new JButton("Tan(x)");
this.add(buttonTan, SOUTH);
JButton buttonCot = new JButton("Cot(x)");
this.add(buttonCos, SOUTH);
JButton buttonCsc = new JButton("Csc(x)");
this.add(buttonCsc, SOUTH);
JButton buttonSec = new JButton("Sec(x)");
this.add(buttonSec, SOUTH);
buttonSin.getParent().revalidate();
buttonSin.addActionListener(
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
GCanvas canvas = TrigWheel.this.getGCanvas();
canvas.add(Pi6Sin, 900, 300);
canvas.add(Pi4Sin,840, 200);
canvas.add(Pi3Sin,710, 120);
canvas.add(Pi2Sin, 530, 90);
canvas.add(TwoPiSin,955, 510);
canvas.add(TwoPi3Sin, 235, 125);
canvas.add(ThreePi4Sin,100, 205);
canvas.add(FivePi6Sin,40, 300);
canvas.add(PiSin,35, 510);
canvas.add(FourPi3Sin, 215, 870);
canvas.add(FivePi4Sin,90, 790);
canvas.add(SevenPi6Sin,40, 690);
canvas.add(FivePi3Sin, 740, 865);
canvas.add(SevenPi4Sin,860, 770);
canvas.add(ElevenPi6Sin,935, 670);
}
}
);
buttonCos.addActionListener(
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
GCanvas canvas = TrigWheel.this.getGCanvas();
canvas.add(Pi6Cos, 900, 300);
canvas.add(Pi4Cos,840, 200);
canvas.add(Pi3Cos,710, 120);
canvas.add(Pi2Cos, 530, 90);
canvas.add(TwoPiCos,955, 510);
canvas.add(TwoPi3Cos, 235, 125);
canvas.add(ThreePi4Cos,100, 205);
canvas.add(FivePi6Cos,40, 300);
canvas.add(PiCos,35, 510);
canvas.add(FourPi3Cos, 215, 870);
canvas.add(FivePi4Cos,90, 790);
canvas.add(SevenPi6Cos,40, 690);
canvas.add(FivePi3Cos, 740, 865);
canvas.add(SevenPi4Cos,860, 770);
canvas.add(ElevenPi6Cos,935, 670);
}
}
);
buttonTan.addActionListener(
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
GCanvas canvas = TrigWheel.this.getGCanvas();
canvas.add(Pi6Tan, 900, 300);
canvas.add(Pi4Tan,840, 200);
canvas.add(Pi3Tan,710, 120);
canvas.add(Pi2Tan, 530, 90);
canvas.add(TwoPiTan,955, 510);
canvas.add(TwoPi3Tan, 235, 125);
canvas.add(ThreePi4Tan,100, 205);
canvas.add(FivePi6Tan,40, 300);
canvas.add(PiTan,35, 510);
canvas.add(FourPi3Tan, 215, 870);
canvas.add(FivePi4Tan,90, 790);
canvas.add(SevenPi6Tan,40, 690);
canvas.add(FivePi3Tan, 740, 865);
canvas.add(SevenPi4Tan,860, 770);
canvas.add(ElevenPi6Tan,935, 670);
}
}
);
buttonSec.addActionListener(
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
GCanvas canvas = TrigWheel.this.getGCanvas();
canvas.add(Pi6Sec, 900, 300);
canvas.add(Pi4Sec,840, 200);
canvas.add(Pi3Sec,720, 120);
canvas.add(Pi2Sec, 530, 90);
canvas.add(TwoPiSec,955, 510);
canvas.add(TwoPi3Sec, 235, 125);
canvas.add(ThreePi4Sec,90, 205);
canvas.add(FivePi6Sec,40, 290);
canvas.add(PiSec,35, 510);
canvas.add(FourPi3Sec, 215, 870);
canvas.add(FivePi4Sec,80, 790);
canvas.add(SevenPi6Sec,40, 670);
canvas.add(FivePi3Sec, 740, 865);
canvas.add(SevenPi4Sec,860, 770);
canvas.add(ElevenPi6Sec,935, 670);
}
}
);
buttonCsc.addActionListener(
new ActionListener() {
@Override
public void actionPerformed(ActionEvent e) {
GCanvas canvas = TrigWheel.this.getGCanvas();
canvas.add(Pi6Csc, 900, 300);
canvas.add(Pi4Csc,840, 200);
canvas.add(Pi3Csc,720, 120);
canvas.add(Pi2Csc, 530, 90);
canvas.add(TwoPiCsc,890, 480);
canvas.add(TwoPi3Csc, 215, 125);
canvas.add(ThreePi4Csc,90, 205);
canvas.add(FivePi6Csc,40, 300);
canvas.add(PiCsc,35, 490);
canvas.add(FourPi3Csc, 215, 870);
canvas.add(FivePi4Csc,80, 790);
canvas.add(SevenPi6Csc,40, 680);
canvas.add(FivePi3Csc, 740, 865);
canvas.add(SevenPi4Csc,860, 770);
canvas.add(ElevenPi6Csc,935, 670);
}
}
);
/*
Pi6.addMouseListener(
new MouseListener() {
@Override
public void mousePressed(MouseEvent e) {
}
@Override
public void mouseReleased(MouseEvent e) {}
@Override
public void mouseEntered(MouseEvent e) {}
@Override
public void mouseExited(MouseEvent e) {}
@Override
public void mouseClicked(MouseEvent e) {}
}
);
*/
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void AddQuad(Quadruple quad)\n {\n Quadruple.add(nextQuad, quad);\n nextQuad++;\n }",
"public Quadrat(Point a, Point b, Point c, Point d){\r\n\t\tsuper(a,b,c,d);\r\n\t}",
"void addTriangle(int vertexIndex1, int vertexIndex2, int vertexIndex3);",
"private QuadTree<Point> quadrant(Point p) {\n int quad = quadrant(x(p), y(p), _nodeOrigin[0], _nodeOrigin[1]);\n switch (quad) {\n case 1:\n return _northEast;\n case 2:\n return _northWest;\n case 3:\n return _southWest;\n default:\n return _southEast;\n }\n }",
"public Quadrato (double ax, double ay, double bx, double by, double cx, double cy, double dx, double dy) {\n\t\tsuper(ax, ay, bx, by, cx, cy, dx, dy);\n\t\tif (!this.verificaValidita()) {\n\t\t\tthis.valido = false;\n\t\tfor (int i = 0 ; i < 4 ; i++) { \n\t\t\tthis.vertici[i].impostaX(Double.NaN);\n\t\t\tthis.vertici[i].impostaY(Double.NaN);\n\t\t\t}\n\t\t}\n\t}",
"private QuadTree<Point> quadrant(double x, double y) {\n int quad = quadrant(x, y, _nodeOrigin[0], _nodeOrigin[1]);\n switch (quad) {\n case 1:\n return _northEast;\n case 2:\n return _northWest;\n case 3:\n return _southWest;\n default:\n return _southEast;\n }\n }",
"protected void traducir(QuadrupleIF quadruple) {\n\r\n\t\tString operando1 = quadruple.getResult().toString();\r\n\t\tsetInstruccion(String.format(\"%s /%s\", \"BR\", operando1));\r\n\t}",
"private ShapeDrawable addPointToShapeDrawablePath_quad(float x, float y, float x_next, float y_next, android.graphics.Path path){\n path.quadTo(x,y,(x_next+x)/2,(y_next+y)/2);\n\n // make local copy of path and store in new ShapeDrawable\n android.graphics.Path currPath = new android.graphics.Path(path);\n\n ShapeDrawable shapeDrawable = new ShapeDrawable();\n //shapeDrawable.getPaint().setColor(Color.MAGENTA);\n float[] color = {40,100,100};\n shapeDrawable.getPaint().setColor(Color.HSVToColor(color));\n shapeDrawable.getPaint().setStyle(Paint.Style.STROKE);\n shapeDrawable.getPaint().setStrokeWidth(10);\n shapeDrawable.getPaint().setStrokeJoin(Paint.Join.ROUND);\n shapeDrawable.getPaint().setStrokeCap(Paint.Cap.ROUND);\n shapeDrawable.getPaint().setPathEffect(new CornerPathEffect(30));\n shapeDrawable.getPaint().setAntiAlias(true); // set anti alias so it smooths\n shapeDrawable.setIntrinsicHeight(displayManager.getHeight());\n shapeDrawable.setIntrinsicWidth(displayManager.getWidth());\n shapeDrawable.setBounds(0, 0, displayManager.getWidth(), displayManager.getHeight());\n\n shapeDrawable.setShape(new PathShape(currPath,displayManager.getWidth(),displayManager.getHeight()));\n\n return shapeDrawable;\n }",
"PlusExpr (Expr l, Expr r) {\n leftOperand = l;\n rightOperand = r;\n }",
"public void zeichneQuadrate(){\n for (int i=0; i<10;i++)\n rect (50+i*25,50,25,25);\n }",
"@Override\r\n\tpublic int plus(int left, int right) {\n\t\treturn left + right; \r\n\t\t//return 0;\r\n\t}",
"@Test\n public void test() {\n Assert.assertEquals(11, beautifulQuadruples(1, 2, 3, 8));\n }",
"public Point3D plus(Point3D summand) {\n\t\tPoint3D copy = new Point3D(this);\n\t\tcopy.homogenize();\n\t\tPoint3D subCopy = new Point3D(summand);\n\t\tsubCopy.homogenize();\n\n\t\tcopy.x += subCopy.x;\n\t\tcopy.y += subCopy.y;\n\t\tcopy.z += subCopy.z;\t\t\n\t\t\n\t\treturn copy;\n\t}",
"public void bPlus (View v) {\n oneSigle('+', \"+\");\n }",
"public Rule itAdd()\n \t{\n \t\treturn sequence(expr(), SP_COMMA/*oneOrMore(sequence(SP_COMMA, expr())), optional(SP_COMMA), eos()*/);\n \t}",
"public void addition() {\n\t\t x = 5;\n\t\t y = 11;\n\t\t z = 16;\n\t\t System.out.println(\"5 + 11 = \"+z);\n\t}",
"public void enfoncerPlus() {\n\t\ttry {\n\t\t\tthis.op = new Plus();\n\t\t\tif (!raz) {\n\t\t\t\tthis.pile.push(valC);\n\t\t\t}\n\t\t\tint a = this.pile.pop(); int b = this.pile.pop();\n\t\t\tthis.valC = this.op.eval(b,a);\n\t\t\tthis.pile.push(this.valC);\n\t\t\tthis.raz = true;\n\t\t}\n\t\tcatch (EmptyStackException e) {\n\t\t\tSystem.out.println(\"Erreur de syntaxe : Saisir deux operandes avant de saisir un operateur\");\n\t\t}\n\t}",
"public static int quadrant(double x, double y) {\n int quadrant = 0; // variable quadrant is initialized\n if (x > 0 && y > 0){ // code for quadrant 1\n quadrant = 1;\n } else if (x < 0 && y < 0){ //code for quadrant 3 \n quadrant = 3;\n } else if (x < 0 && y > 0){ //code for quadrant 2\n quadrant = 2;\n } else { // defaulted to quadrant 4\n quadrant = 4;\n }\n return quadrant; \n\t}",
"void visit(PlusExpression expression);",
"private void addToQ(Cell c, boolean fill) {\n addRow(c, fill); // in that case, it will add all the possible arcs\n addColumn(c, fill); // columna\n// addMatrix(c, fill);\n }",
"public vec3 plus(vec3 arg) {\r\n\t\tvec3 tmp = new vec3();\r\n\t\ttmp.add(this, arg);\r\n\t\treturn tmp;\r\n\t}",
"public void changePolyAdd() {\n this.changePoly(this.aadd, this.badd, this.cadd, this.dadd, this.yadd);\n }",
"@Override\r\n\tpublic int plus(int x, int y) {\n\t\treturn x + y;\r\n\t}",
"Expression addExpression() throws SyntaxException {\r\n\t\tToken first = t;\r\n\t\tExpression e0 = multExpression();\r\n\t\twhile(isKind(OP_PLUS, OP_MINUS)) {\r\n\t\t\tToken op = consume();\r\n\t\t\tExpression e1 = multExpression();\r\n\t\t\te0 = new ExpressionBinary(first,e0,op,e1);\r\n\t\t}\r\n\t\treturn e0;\r\n\t}",
"BaseNumber add(BaseNumber operand);",
"public Vector4d add(double x, double y, double z, double w) {\n\t\tthis.x += x; this.y += y; this.z += z; this.w += w;\n\t\treturn this;\n\t}",
"@Override\r\n public String toString() {\r\n return String.format(\"%s:\\n%s\", \"Coordinates of Quadrilateral are\", getCoordinatesAsString());\r\n }",
"@Override\r\n\tpublic vec3 plus(ShaderVar var) {\n\t\treturn null;\r\n\t}",
"@Test\n public void add() {\n float[] dest = new float[10]; \n float[] a = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] b = new float[] {2.0f, 1.0f, 6.0f, 3.0f, 4.0f, 5.0f};\n float[] expect = new float[] {4.003f, 10.004f, 8.005f, 10.006f};\n Vec4f.add(dest, 4, a, 2, b, 1);\n assertTrue(Vec4f.epsilonEquals(dest, 4, expect, 0, 1E-6f));\n \n float[] a2 = new float[] {1.001f, 2.002f, 3.003f, 4.004f, 5.005f, 6.006f}; \n float[] b2 = new float[] {2.0f, 1.0f, 6.0f, 3.0f, 4.0f, 5.0f};\n float[] expect2 = new float[] {4.003f, 10.004f, 8.005f, 10.006f};\n Vec4f.add(a2, 2, b2, 1);\n assertTrue(Vec4f.epsilonEquals(a2, 2, expect2, 0, 1E-6f));\n \n float[] dest3 = new float[4]; \n float[] a3 = new float[] {3.003f, 4.004f, 5.005f, 6.006f}; \n float[] b3 = new float[] {1.0f, 6.0f, 3.0f, 4.0f};\n float[] expect3 = new float[] {4.003f, 10.004f, 8.005f, 10.006f};\n Vec4f.add(dest3, a3, b3);\n assertTrue(Vec4f.epsilonEquals(dest3,expect3, 1E-6f));\n \n float[] a4 = new float[] {3.003f, 4.004f, 5.005f, 6.006f}; \n float[] b4 = new float[] {1.0f, 6.0f, 3.0f, 4.0f};\n float[] expect4 = new float[] {4.003f, 10.004f, 8.005f, 10.006f};\n Vec4f.add(a4, b4);\n //System.out.println(\"a=\"+Vec4f.toString(a, 2));\n assertTrue(Vec4f.epsilonEquals(a4,expect4, 1E-6f));\n }",
"private void createVertices(int iX, int iY, int iXO, int iYO, int num, int increment) {\n int y = iY;\n if (num == 0 && increment == 0) {\n BracketNode last = new BracketNode(\"\", iX, y - 20, iXO, 20);\n nodes.add(last);\n getChildren().addAll(new Line(iX, iY, iX + iXO, iY), last);\n last.setName(currentBracket.getBracket().get(location));\n bracketMap.put(last, location);\n nodeMap.put(location, last);\n } else {\n ArrayList<BracketNode> aNodeList = new ArrayList<>();\n for (int i = 0; i < num; i++) {\n Point2D tl = new Point2D(iX, y);\n Point2D tr = new Point2D(iX + iXO, y);\n Point2D bl = new Point2D(iX, y + iYO);\n Point2D br = new Point2D(iX + iXO, y + iYO);\n BracketNode nTop = new BracketNode(\"\", iX, y - 20, iXO, 20);\n aNodeList.add(nTop);\n nodes.add(nTop);\n BracketNode nBottom = new BracketNode(\"\", iX, y + (iYO - 20), iXO, 20);\n aNodeList.add(nBottom);\n nodes.add(nBottom);\n Line top = new Line(tl.getX(), tl.getY(), tr.getX(), tr.getY());\n Line bottom = new Line(bl.getX(), bl.getY(), br.getX(), br.getY());\n Line right = new Line(tr.getX(), tr.getY(), br.getX(), br.getY());\n getChildren().addAll(top, bottom, right, nTop, nBottom);\n isTop = !isTop;\n y += increment;\n }\n ArrayList<Integer> tmpHelp = helper(location, num);\n for (int j = 0; j < aNodeList.size(); j++) {\n //System.out.println(currentBracket.getBracket().get(tmpHelp.get(j)));\n aNodeList.get(j).setName(currentBracket.getBracket().get(tmpHelp.get(j)));\n bracketMap.put(aNodeList.get(j), tmpHelp.get(j));\n nodeMap.put(tmpHelp.get(j), aNodeList.get(j));\n //System.out.println(bracketMap.get(aNodeList.get(j)));\n }\n }\n\n }",
"public void addPoint(double x, double y, double z);",
"Plus createPlus();",
"Plus createPlus();",
"Plus createPlus();",
"public abstract Vector4fc add(float x, float y, float z, float w);",
"public void addTo(Vector3 addition) {\n\t\tthis.x += addition.x;\n\t\tthis.y += addition.y;\n\t\tthis.z += addition.z;\n\t}",
"@Override\n public String getNotation() {\n return \"+\";\n }",
"void addEdge(int x, int y);",
"public MvtPlus() {\r\n\t\tsuper('+');\r\n\t}",
"void Print()\n {\n int quadLabel = 1;\n String separator;\n\n System.out.println(\"CODE\");\n\n Enumeration<Quadruple> e = this.Quadruple.elements();\n e.nextElement();\n\n while (e.hasMoreElements())\n {\n Quadruple nextQuad = e.nextElement();\n String[] quadOps = nextQuad.GetOps();\n System.out.print(quadLabel + \": \" + quadOps[0]);\n for (int i = 1; i < nextQuad.GetQuadSize(); i++)\n {\n System.out.print(\" \" + quadOps[i]);\n if (i != nextQuad.GetQuadSize() - 1)\n {\n System.out.print(\",\");\n } else System.out.print(\"\");\n }\n System.out.println(\"\");\n quadLabel++;\n }\n }",
"protected static int addCigarElements(final List<CigarElement> dest, int pos, final int start, final int end, final CigarElement elt) {\n final int length = Math.min(pos + elt.getLength() - 1, end) - Math.max(pos, start) + 1;\n if ( length > 0 )\n dest.add(new CigarElement(length, elt.getOperator()));\n return pos + elt.getLength();\n }",
"public void paint(java.awt.Graphics g) {\n super.paint(g);\n // only update the quadrants if pond has a value\n if( pond != null) {\n pond.updateQuads(canvas);\n }\n }",
"@Override\n public Expression asExpression(TokenValue<?> token, Deque<Value<Expression>> next) {\n Additive op = token.getValue(); // + | -\n // + is always followed by an argument\n Expression arg = next.pollFirst().getTarget(); // b argument\n Term<Additive> term = new Term<>(op, arg);\n return term;\n }",
"public void addQuantity(int x, int y, int z, double q) {\r\n\t\tquantity[x][y][z] += q;\r\n\t\tif(quantity[x][y][z] < 0) quantity[x][y][z] = 0;\r\n\t}",
"public void triangulo() {\n fill(0);\n stroke(255);\n strokeWeight(5);\n triangle(width/2, 50, height+100, 650, 350, 650);\n //(width/2, height-100, 350, 150, 900, 150);\n }",
"public void addVertex();",
"public void polyAdd(double a2, double b2, double c2, double d2, double y2) {\n this.polyadd = (this.y + y2) + \" = \" + (this.a + a2)\n + \"x^3 + \" + (this.b + b2) + \"x^2 + \"\n + (this.c + c2) + \"x + \" + (this.d + d2);\n this.aadd = (this.a + a2);\n this.badd = (this.b + b2);\n this.cadd = (this.c + c2);\n this.dadd = (this.d + d2);\n this.yadd = (this.y + y2);\n }",
"public String toString () {\n return \"(+ \" + leftOperand + \" \" + rightOperand + \")\";\n }",
"@FXML\r\n private void crearTriangulo(ActionEvent event) {\n \r\n double x[] = {100, 150, 50};\r\n double y[] = {100, 210, 210, 50};\r\n \r\n g.setFill(Color.GOLD);\r\n g.fillPolygon(x, y, 3);\r\n }",
"AngleAdd createAngleAdd();",
"private boolean inOneQuadrant(double x, double y,\n double llx, double lly,\n double urx, double ury) {\n boolean horCond = llx < x == urx < x;\n boolean verCond = lly < y == ury < y;\n return horCond && verCond;\n }",
"public GameBoardQuadrant(float minRads, float maxRads) {\n setMinRads(minRads);\n setMaxRads(maxRads);\n\n isOn = false;\n\n onColour = new float[4];\n offColour = new float[4];\n setOnColour(0, 0, 0, 1); // default to black\n setOffColour(0, 0, 0, 1); // default to black\n\n generateCircleCoords();\n generateDrawOrder();\n\n vertexCount = circleCoords.length / COORDS_PER_VERTEX;\n\n // initialize vertex byte buffer for shape coordinates\n ByteBuffer bb = ByteBuffer.allocateDirect(\n // (# of coordinate vlues * 4 bytes per short)\n circleCoords.length * 4);\n bb.order(ByteOrder.nativeOrder());\n vertexBuffer = bb.asFloatBuffer();\n vertexBuffer.put(circleCoords);\n vertexBuffer.position(0);\n\n // initialize byte buffer for the draw list\n ByteBuffer dlb = ByteBuffer.allocateDirect(\n // # of coordinate values * 2 bytes per short\n drawOrder.length * 2);\n dlb.order(ByteOrder.nativeOrder());\n drawListBuffer = dlb.asShortBuffer();\n drawListBuffer.put(drawOrder);\n drawListBuffer.position(0);\n\n int vertexShader = SimonGLRenderer.loadShader(GLES20.GL_VERTEX_SHADER, vertexShaderCode);\n int fragmentShader = SimonGLRenderer.loadShader(GLES20.GL_FRAGMENT_SHADER, fragmentShaderCode);\n\n // create empty OpenGL ES program\n mProgram = GLES20.glCreateProgram();\n\n // add the vertex shader to program\n GLES20.glAttachShader(mProgram, vertexShader);\n\n // add the fragment shader\n GLES20.glAttachShader(mProgram, fragmentShader);\n\n // create opengl es program executable\n GLES20.glLinkProgram(mProgram);\n }",
"private Formula (Clause c, ImList<Clause> r) {\n\t\t//System.out.println(\"Test1\"+r.toString());\n\t\t//System.out.println(\"Test1\"+c);\n\t\tclauses=r.add(c);\n\t\t//System.out.println(\"Test2\"+clauses.toString());\n\t\tcheckRep();\n\t}",
"@Override\n\tpublic Void visit(Plus plus) {\n\t\tprintIndent(plus.token.getText());\n\t\tindent++;\n\t\tplus.left.accept(this);\n\t\tplus.right.accept(this);\n\t\tindent--;\n\t\treturn null;\n\t}",
"private void clearNonUsedQuadruples() {\n expandedQuadruples.removeIf(expandedQuadruple -> expandedQuadruple.getLevel() != 0);\n }",
"public Snippet visit(PlusExpression n, Snippet argu) {\n\t\t Snippet _ret= new Snippet(\"\",\"\",null,false);\n\t\t Snippet f0 = n.identifier.accept(this, argu);\n\t\t n.nodeToken.accept(this, argu);\n\t\t Snippet f2 = n.identifier1.accept(this, argu);\n\t\t _ret.returnTemp = f0.returnTemp+\" + \"+f2.returnTemp;\n\t return _ret;\n\t }",
"public void union(Shape s);",
"private String addSpaces(String expr) {\n\t\tString output = \"\";\n\t\tString prev = \" \";\n\n\t\tfor(Character c : expr.trim().toCharArray()) {\n\t\t\tif(!areSameType(prev, c.toString()) || isOperator(prev) || \n\t\t\t\t\t(isMatrix(c.toString()) && isMatrix(prev))) \n\t\t\t\toutput += \" \";\n\t\t\toutput += c;\n\t\t\tprev = c.toString();\n\t\t}\n\n\t\treturn output;\n\t}",
"public Complex Plus (Complex z) {\nreturn new Complex(u+z.u,v+z.v);\n\n}",
"public ImmutableQuadIso(final T first, final T second, final T third, final T fourth) {\n super(first, second, third, fourth);\n }",
"@Override\n\tpublic void visit(Addition arg0) {\n\t\t\n\t}",
"@Override\r\n protected void setPositionType(Collection<? extends Geometry> adds)\r\n {\n }",
"public void quadTest()\n\t{\n\t\tint index = 0, lim = 3;\n\t\tboolean quads = false;\n\t\t\n\t\twhile (index<=lim && (!quads))\n\t\t{\n\t\t\tif ((intRep[index] == intRep[index+1]) &&\n\t\t\t\t(intRep[index] == intRep[index+2]) &&\n\t\t\t\t(intRep[index] == intRep[index+3]) )\n\t\t\t{\n\t\t\t\tquads = true;\n\t\t\t\thandScore = 70000;\n\t\t\t\thandScore += 100 * intRep[index];\n\t\t\t}\n\t\t\telse index++;\n\t\t}\n\t}",
"public vec3 plus(float arg) {\r\n\t\tvec3 tmp = new vec3();\r\n\t\ttmp.add(this, arg);\r\n\t\treturn tmp;\r\n\t}",
"public QuadTree (Set2D inSet, double llx, double lly, double urx, double ury) {\n\t\tthis(llx, lly, urx, ury);\n\t\tint id;\n\t\tSet2DIterator iterator = inSet.iterator(llx, lly, urx, ury);\n\t\twhile (iterator.hasNext()) {\n\t\t\tid = iterator.next();\n\t\t\tthis.add(id, inSet.x(id), inSet.y(id));\n\t\t}\n\t}",
"public final void rule__AstExpressionAdditive__OperatorAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2946:1: ( ( '+' ) | ( '-' ) )\n int alt17=2;\n int LA17_0 = input.LA(1);\n\n if ( (LA17_0==28) ) {\n alt17=1;\n }\n else if ( (LA17_0==29) ) {\n alt17=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 17, 0, input);\n\n throw nvae;\n }\n switch (alt17) {\n case 1 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2947:1: ( '+' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2947:1: ( '+' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2948:1: '+'\n {\n before(grammarAccess.getAstExpressionAdditiveAccess().getOperatorPlusSignKeyword_1_1_0_0()); \n match(input,28,FOLLOW_28_in_rule__AstExpressionAdditive__OperatorAlternatives_1_1_06365); \n after(grammarAccess.getAstExpressionAdditiveAccess().getOperatorPlusSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2955:6: ( '-' )\n {\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2955:6: ( '-' )\n // ../org.caltoopia.frontend.ui/src-gen/org/caltoopia/frontend/ui/contentassist/antlr/internal/InternalCal.g:2956:1: '-'\n {\n before(grammarAccess.getAstExpressionAdditiveAccess().getOperatorHyphenMinusKeyword_1_1_0_1()); \n match(input,29,FOLLOW_29_in_rule__AstExpressionAdditive__OperatorAlternatives_1_1_06385); \n after(grammarAccess.getAstExpressionAdditiveAccess().getOperatorHyphenMinusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"boolean isAdditionAllowed();",
"public aqo(World paramaqu, Entity paramwv, double paramDouble1, double paramDouble2, double paramDouble3, float paramFloat, boolean paramBoolean1, boolean paramBoolean2, List<BlockPosition> paramList)\r\n/* 31: */ {\r\n/* 32: 48 */ this(paramaqu, paramwv, paramDouble1, paramDouble2, paramDouble3, paramFloat, paramBoolean1, paramBoolean2);\r\n/* 33: 49 */ this.j.addAll(paramList);\r\n/* 34: */ }",
"void addTriangle(AbstractTriangle t);",
"@Override\n public Tuple3<Long, Double, Double> add(Tuple3<Long, Double, Double> tuple, Tuple3<Long, Double, Double> acc) {\n acc.f0 = tuple.f0;\n acc.f1 += tuple.f1;\n acc.f2 += tuple.f2;\n return acc;\n }",
"void add(int vertex);",
"@Override\n public Float plus(Float lhs, Float rhs) {\n\t\n\tfloat res = lhs + rhs;\n\treturn res;\t\n }",
"public void orientation(Double ...coords);",
"public void addJoinPoints() {\n\t\tJoinPoint j1 = new JoinPoint(svgLine.getXY(0));\r\n\t\tJoinPoint j2 = new JoinPoint(svgLine.getXY(1));\r\n\t\tgetJoinPoints().add(j1);\r\n\t\tgetJoinPoints().add(j2);\r\n\t\tj1.setRadius(Math.min(j1.getRadius(), svgLine.getLength() / 2));\r\n\t\tj2.setRadius(Math.min(j2.getRadius(), svgLine.getLength() / 2));\r\n\t}",
"@Override\n\tpublic void visit(Addition arg0) {\n\n\t}",
"Operands createOperands();",
"public abstract Deque<Operand> getOperands();",
"private static void addParsedQuads(ModelData modelData, ModelPos pos, Map<ModelPos, List<BakedQuad>> map, Set<String> quads, Set<String> ledQuads) {\n List<BakedQuad> bakedQuads = getQuads(modelData, quads, ledQuads, pos.getTransform());\n if (!bakedQuads.isEmpty()) {\n map.computeIfAbsent(pos, p -> new ArrayList<>()).addAll(bakedQuads);\n }\n }",
"public Vector3 addAndCreate(Vector3 addition) {\n\t\treturn new Vector3(addition.x + this.x, addition.y + this.y, addition.z + this.z);\n\t}",
"public void addVertices(int n);",
"public final void rule__AddExp__OpAlternatives_1_1_0() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1899:1: ( ( '+' ) | ( '-' ) )\n int alt14=2;\n int LA14_0 = input.LA(1);\n\n if ( (LA14_0==12) ) {\n alt14=1;\n }\n else if ( (LA14_0==13) ) {\n alt14=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 14, 0, input);\n\n throw nvae;\n }\n switch (alt14) {\n case 1 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1900:1: ( '+' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1900:1: ( '+' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1901:1: '+'\n {\n before(grammarAccess.getAddExpAccess().getOpPlusSignKeyword_1_1_0_0()); \n match(input,12,FOLLOW_12_in_rule__AddExp__OpAlternatives_1_1_04042); \n after(grammarAccess.getAddExpAccess().getOpPlusSignKeyword_1_1_0_0()); \n\n }\n\n\n }\n break;\n case 2 :\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1908:6: ( '-' )\n {\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1908:6: ( '-' )\n // ../uk.ac.kcl.inf.robotics.rigid_bodies.ui/src-gen/uk/ac/kcl/inf/robotics/ui/contentassist/antlr/internal/InternalRigidBodies.g:1909:1: '-'\n {\n before(grammarAccess.getAddExpAccess().getOpHyphenMinusKeyword_1_1_0_1()); \n match(input,13,FOLLOW_13_in_rule__AddExp__OpAlternatives_1_1_04062); \n after(grammarAccess.getAddExpAccess().getOpHyphenMinusKeyword_1_1_0_1()); \n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"@Override\n\tpublic void visit(AdditionListNode node) {\n\t\tstackPair.push(new Pair<>(\"+\", 2));\n\t\tnode.getNext().accept(this);\n\t}",
"void union(int [] parent, int x, int y)\n\t\t{\n\t\t\tint x_set_parent = find(parent, x);\n\t\t\tint y_set_parent = find(parent, y);\n\t\t\tparent[y_set_parent] = x_set_parent;\n\t\t}",
"public void changeQuadrant(Quadrant quadrant) {\n\n /* set state visited */\n quadrant.setVisited(true);\n\n /* check if enemies exist */\n Boolean enemiesleft = false;\n for (SpaceObject so : gameState.getSpaceobjects()){\n if (so instanceof EnemyShip){\n enemiesleft = true;\n break;\n }\n }\n if (!enemiesleft){\n gameState.getCurrentLevel().getCurrentquardant().setCleared(true);\n }\n\n gameState.setSpaceobjects(quadrant.getSpaceobjects());\n gameState.getCurrentLevel().setCurrentquardant(quadrant);\n\n }",
"public void addSegment()\n { \n Location tail = new Location();\n \n if(up)\n {\n tail.setA(list.get(0).getA());\n tail.setB(list.get(0).getB()+15);\n }\n else if(down)\n {\n tail.setA(list.get(0).getA());\n tail.setB(list.get(0).getB()-15);\n }\n else if(left)\n {\n tail.setA(list.get(0).getA()+15);\n tail.setB(list.get(0).getB());\n }\n else if(right)\n {\n tail.setA(list.get(0).getA()-15);\n tail.setB(list.get(0).getB());\n } \n \n ArrayList<Location> temp = new ArrayList<Location>();\n \n \n temp.add(tail);\n \n for(int i=0 ; i<list.size() ; i++)\n {\n temp.add(list.get(i));\n }\n list = temp; \n }",
"@Override\n protected Double[] getCorners(){\n return new Double[]{\n //leftmost point\n getXPos(), getYPos(),\n //rightmost point\n getXPos() + getWidth(), getYPos(),\n //middle point\n getXPos() + getWidth() / 2, getYPos() + getHeight() * getThirdTriangleYPoint(pointUp)\n };\n }",
"@UML(identifier=\"geometryOperand\", obligation=MANDATORY, specification=ISO_19143)\n Collection<? extends ScopedName> getGeometryOperands();",
"public void addEdge(int start, int end);",
"private void addInt() {\n this.polyAddSolve();\n this.iaa = this.aadd * (1.0 / 4.0);\n this.iba = this.badd * (1.0 / 3.0);\n this.ica = this.cadd * (1.0 / 2.0);\n this.ida = this.dadd;\n String int1 = null, int2 = \"\", int3 = \"\", int4 = \"\";\n int inta = 0, intb = 0, intc = 0, intd = 0;\n if (this.adddegree == 3) {\n int1 = \"Sf(x) = \" + this.iaa + \"x^4 \";\n if (this.badd == 0) {\n intb = 1;\n } else {\n if (this.badd > 0) {\n int2 = \"+ \" + this.iba + \"x^3 \";\n\n } else {\n int2 = \"- \" + -this.iba + \"x^3 \";\n }\n }\n if (this.cadd == 0) {\n intc = 1;\n } else {\n if (this.cadd > 0) {\n int3 = \"+ \" + this.ica + \"x^2 \";\n } else {\n int3 = \"- \" + -this.ica + \"x^2 \";\n }\n }\n if (this.dadd == 0) {\n intd = 1;\n } else {\n if (this.dadd > 0) {\n int4 = \"+ \" + this.ida + \"x \";\n } else {\n int4 = \"- \" + -this.ida + \"x \";\n }\n }\n if (intb == 0 && intc == 0 && intd == 0) {\n this.addintegral = int1 + int2 + int3 + int4 + \"+ C\";\n }\n if (intb == 0 && intc == 0 && intd == 1) {\n this.addintegral = int1 + int2 + int3 + \"+ C\";\n }\n if (intb == 0 && intc == 1 && intd == 1) {\n this.addintegral = int1 + int2 + \"+ C\";\n }\n if (intb == 1 && intc == 1 && intd == 1) {\n this.addintegral = int1 + \"+ C\";\n }\n if (intb == 1 && intc == 0 && intd == 0) {\n this.addintegral = int1 + int3 + int4 + \"+ C\";\n }\n if (intb == 1 && intc == 0 && intd == 1) {\n this.addintegral = int1 + int3 + \"+ C\";\n }\n if (intb == 1 && intc == 1 && intd == 0) {\n this.addintegral = int1 + int4 + \"+ C\";\n }\n\n }\n if (this.adddegree == 2) {\n int1 = \"Sf(x) = \" + this.iba + \"x^3 \";\n if (this.cadd == 0) {\n intc = 1;\n } else {\n if (this.cadd > 0) {\n int2 = \"+ \" + this.ica + \"x^2 \";\n } else {\n int2 = \"- \" + -this.ica + \"x^2 \";\n }\n }\n\n if (this.dadd == 0) {\n intd = 1;\n } else {\n if (this.dadd > 0) {\n int3 = \"+ \" + this.ida + \"x \";\n } else {\n int3 = \"- \" + -this.ida + \"x \";\n }\n }\n if (intc == 0 && intd == 0) {\n this.addintegral = int1 + int2 + int3 + \"+ C\";\n }\n if (intc == 0 && intd == 1) {\n this.addintegral = int1 + int2 + \"+ C\";\n }\n if (intc == 1 && intd == 0) {\n this.addintegral = int1 + int3 + \"+ C\";\n }\n if (intc == 1 && intd == 1) {\n this.addintegral = int1 + \"+ C\";\n }\n }\n if (this.adddegree == 1) {\n int1 = \"Sf(x) = \" + this.ica + \"x^2 \";\n if (this.ida == 0) {\n intd = 1;\n\n } else {\n if (this.ida > 0) {\n int2 = \"+ \" + this.ida + \"x \";\n } else {\n int2 = \"- \" + -this.ida + \"x \";\n }\n }\n if (intd == 0) {\n this.addintegral = int1 + int2 + \"+ C\";\n } else {\n this.addintegral = int1 + int2 + \"+ C\";\n }\n\n }\n if (this.adddegree == 0) {\n this.addintegral = \"Sf(x) = \" + this.ida + \"x + C\";\n }\n }",
"OperandList createOperandList();",
"public final void rule__OpAdd__Alternatives() throws RecognitionException {\n\n \t\tint stackSize = keepStackSize();\n \n try {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1953:1: ( ( '+' ) | ( '-' ) )\n int alt8=2;\n int LA8_0 = input.LA(1);\n\n if ( (LA8_0==23) ) {\n alt8=1;\n }\n else if ( (LA8_0==24) ) {\n alt8=2;\n }\n else {\n if (state.backtracking>0) {state.failed=true; return ;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 8, 0, input);\n\n throw nvae;\n }\n switch (alt8) {\n case 1 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1954:1: ( '+' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1954:1: ( '+' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1955:1: '+'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \n }\n match(input,23,FOLLOW_23_in_rule__OpAdd__Alternatives4123); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpAddAccess().getPlusSignKeyword_0()); \n }\n\n }\n\n\n }\n break;\n case 2 :\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1962:6: ( '-' )\n {\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1962:6: ( '-' )\n // ../org.xtext.lwc.instances.ui/src-gen/org/xtext/lwc/instances/ui/contentassist/antlr/internal/InternalInstances.g:1963:1: '-'\n {\n if ( state.backtracking==0 ) {\n before(grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \n }\n match(input,24,FOLLOW_24_in_rule__OpAdd__Alternatives4143); if (state.failed) return ;\n if ( state.backtracking==0 ) {\n after(grammarAccess.getOpAddAccess().getHyphenMinusKeyword_1()); \n }\n\n }\n\n\n }\n break;\n\n }\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n }\n finally {\n\n \trestoreStackSize(stackSize);\n\n }\n return ;\n }",
"public void add(Polygon p) {\n for (int i = 0; i < p.size(); i++)\n add(p.get(i).xyz.x, p.get(i).xyz.y, p.get(i).xyz.z);\n }",
"public void union(int p, int q) {\n int pRoot = getRoot(p);\n int qRoot = getRoot(q);\n nodes[pRoot] = qRoot;\n }",
"void setAdjForFourthType() {\n matrixOfSquares[0][0].setCardinalSquare(null, matrixOfSquares[1][0] , null, matrixOfSquares[0][1]);\n matrixOfSquares[0][1].setCardinalSquare(null, matrixOfSquares[1][1] , matrixOfSquares[0][0], matrixOfSquares[0][2]);\n matrixOfSquares[0][2].setCardinalSquare(null,matrixOfSquares[1][2] , matrixOfSquares[0][1], null);\n matrixOfSquares[1][0].setCardinalSquare(matrixOfSquares[0][0], matrixOfSquares[2][0], null, null );\n matrixOfSquares[1][1].setCardinalSquare(matrixOfSquares[0][1], matrixOfSquares[2][1], null, matrixOfSquares[1][2] );\n matrixOfSquares[1][2].setCardinalSquare(matrixOfSquares[0][2] , null, matrixOfSquares[1][1], matrixOfSquares[1][3]);\n matrixOfSquares[1][3].setCardinalSquare(null, matrixOfSquares[2][3], matrixOfSquares[1][2], null);\n matrixOfSquares[2][0].setCardinalSquare(matrixOfSquares[1][0],null, null, matrixOfSquares[2][1] );\n matrixOfSquares[2][1].setCardinalSquare(matrixOfSquares[1][1], null, matrixOfSquares[2][0], matrixOfSquares[2][2] );\n matrixOfSquares[2][2].setCardinalSquare(null, null, matrixOfSquares[2][1], matrixOfSquares[2][3] );\n matrixOfSquares[2][3].setCardinalSquare(matrixOfSquares[1][3], null, matrixOfSquares[2][2], null);\n\n }",
"public static String newVertex(ArrayList<Integer> moves) {\n String new1 = \"[\";\n for(int j = 0; j < moves.size(); j++) {\n new1 += moves.get(j).toString();\n if(j != moves.size() - 1) {\n new1 += \", \";\n }\n }\n new1 += \"]\";\n return new1;\n }",
"public void addSquare(Square square) {\n\t\t\n\t}",
"private void setVertices(){\n \tdouble[] xs = new double[numOfSides];\n \tdouble[] ys = new double[numOfSides];\n \tif (numOfSides%2==1){\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(2*i*Math.PI/numOfSides);\n \t\t\tys[i]=radius*Math.sin(2*i*Math.PI/numOfSides);\n \t\t\t}\n \t}\n \telse{\n \t\tdouble start=Math.PI/numOfSides;\n \t\tfor (int i=0; i<numOfSides; i++){\n \t\t\txs[i]=radius*Math.cos(start+2*i*(Math.PI)/numOfSides);\n \t\t\tys[i]=radius*Math.sin(start+2*i*(Math.PI)/numOfSides);\n \t\t\t}\n \t}\n \tsetXLocal(xs);\n \tsetYLocal(ys);\n }",
"protected void boxOfMortys() {\n Triple pos1, pos2, pos3, pos4, pos5, pos6, pos7, pos8, col1, col2, col3, col4;\n\n pos1 = new Triple(-10, -10, 0);\n pos2 = new Triple(110, -10, 0);\n pos3 = new Triple(110, -10, 120);\n pos4 = new Triple(-10, -10, 120);\n pos5 = new Triple(-10, 110, 0);\n pos6 = new Triple(110, 110, 0);\n pos7 = new Triple(110, 110, 120);\n pos8 = new Triple(-10, 110, 120);\n\n // Front Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos2, 1, 0),\n new Vertex(pos3, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos3, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Left Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos1, 0, 0),\n new Vertex(pos5, 1, 0),\n new Vertex(pos8, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos8, 1, 1),\n new Vertex(pos4, 0, 1),\n new Vertex(pos1, 0, 0),\n 22 ) );\n\n // Right Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos2, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos3, 0, 1),\n new Vertex(pos2, 0, 0),\n 22 ) );\n\n // Back Triangles\n frozenSoups.addTri( new Triangle(new Vertex(pos5, 0, 0),\n new Vertex(pos6, 1, 0),\n new Vertex(pos7, 1, 1),\n 22 ) );\n\n frozenSoups.addTri( new Triangle(new Vertex(pos7, 1, 1),\n new Vertex(pos8, 0, 1),\n new Vertex(pos5, 0, 0),\n 22 ) );\n\n // Top Triangles\n// frozenSoups.addTri( new Triangle(new Vertex(pos4, 0, 0),\n// new Vertex(pos3, 0, 1),\n// new Vertex(pos7, 1, 1),\n// 20 ) );\n\n// frozenSoups.addTri( new Triangle(new Vertex(pos7, 0, 0),\n// new Vertex(pos8, 1, 0),\n// new Vertex(pos4, 1, 1),\n// 20 ) );\n }",
"private void jetBinopExprStr(){\n\t\tBinopExpr binopExpr = (BinopExpr) rExpr;\n\t\tValue op1 = binopExpr.getOp1();\n\t\tValue op2 = binopExpr.getOp2();\n\t\tZ3Type op1Z3Type = Z3MiscFunctions.v().z3Type(op1.getType());\n\t\tZ3Type op2Z3Type = Z3MiscFunctions.v().z3Type(op2.getType());\n\t\tStringBuilder sb = new StringBuilder();\n\t\t\n\t\tBinopExprType binopType = Z3MiscFunctions.v().getBinopExprType(binopExpr);\n\t\tswitch(binopType){\n\t\t//[start]ADD\n\t\tcase ADD:\n\t\t\t//add_expr = immediate \"+\" immediate;\n\t\t\t//immediate = constant | local;\n\t\t\t//only Int, Real, String can ADD\n\t\t\t//Exceptional Cases: \"084\" + 42; we exclude them\n\t\t\tassert((op1Z3Type == Z3Type.Z3String && op2Z3Type == Z3Type.Z3String) ||\n\t\t\t\t\t(op1Z3Type != Z3Type.Z3String && op2Z3Type != Z3Type.Z3String));\n\t\t\tif(op1Z3Type == Z3Type.Z3String ){\n\t\t\t\t//( Concat \"te\" y1 )\n\t\t\t\tsb.append(\"( Concat \");\n\t\t\t}else{\n\t\t\t\t//(+ 2 i2)\n\t\t\t\tsb.append(\"(+ \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\" )\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end]ADD\n\t\tcase AND:\n\t\t\t//and_expr = immediate \"&\" immediate;\n\t\t\t//TODO\n\t\t\t//assert(false) : \"AND Expr\";\n\t\t\tbreak;\n\t\t//[start] DIV\n\t\tcase DIV:\n\t\t\t//div_expr = immediate \"/\" immediate;\n\t\t\t//(div a b) integer division\n\t\t\t//(/ a b) float division\n\t\t\tif(op1Z3Type == Z3Type.Z3Real || op2Z3Type == Z3Type.Z3Real){\n\t\t\t\tsb.append(\"(/ \");\n\t\t\t}else{\n\t\t\t\tsb.append(\"(div \");\n\t\t\t}\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] DIV\n\t\t//[start] EQ\n\t\tcase EQ:\n\t\t\t//eq_expr = immediate \"==\" immediate;\n\t\t\t//b = r1 == r2\n\t\t\t//(assert (= b (= r1 r2)))\n\t\t\tsb.append(\"(= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] EQ\n\t\t//[start] GE\n\t\tcase GE:\n\t\t\t//ge_expr = immediate \">=\" immediate;\n\t\t\t//b = r1 >= r2\n\t\t\t//(assert (= b (>= r1 r2)))\n\t\t\tsb.append(\"(>= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GE\n\t\t//[start] GT\n\t\tcase GT:\n\t\t\t//gt_expr = immediate \">\" immediate;\n\t\t\t//b = r1 > r2\n\t\t\t//(assert (= b (> r1 r2)))\n\t\t\tsb.append(\"(> \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] GT\n\t\t//[start] LE\n\t\tcase LE:\n\t\t\t//le_expr = immediate \"<=\" immediate;\n\t\t\t//b = r1 <= r2\n\t\t\t//(assert (= b (<= r1 r2)))\n\t\t\tsb.append(\"(<= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LE\n\t\t//[start] LT\n\t\tcase LT:\n\t\t\t//lt_expr = immediate \"<\" immediate;\n\t\t\t//b = r1 < r2\n\t\t\t//(assert (= b (< r1 r2)))\n\t\t\tsb.append(\"(< \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] LT\n\t\t//[start] MUL\n\t\tcase MUL:\n\t\t\t//mul_expr = immediate \"*\" immediate;\n\t\t\t//(* op1 op2)\n\t\t\tsb.append(\"(* \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] MUL\n\t\t//[start] NE\n\t\tcase NE:\n\t\t\t//ne_expr = immediate \"!=\" immediate;\n\t\t\t//(not (= op1 op2))\n\t\t\tsb.append(\"(not (= \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\"))\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] NE\n\t\tcase OR:\n\t\t\t//or_expr = immediate \"|\" immediate;\n\t\t\t//TODO\n\t\t\tassert(false) : \"OR Expr\";\n\t\t\tbreak;\n\t\t//[start] REM\n\t\tcase REM:\n\t\t\t//rem_expr = immediate \"%\" immediate;\n\t\t\t//(rem op1 op2)\n\t\t\tsb.append(\"(rem \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] REM\n\t\t//[start] SUB\n\t\tcase SUB:\n\t\t\t//sub_expr = immediate \"-\" immediate;\n\t\t\t//(- op1 op2)\n\t\t\tsb.append(\"(- \");\n\t\t\tif(op1 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op1, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op1.toString());\n\t\t\t}\n\t\t\tsb.append(\" \");\n\t\t\tif(op2 instanceof Local){\n\t\t\t\tsb.append(fileGenerator.getRenameOf(op2, false, this.stmtIdx));\n\t\t\t}else{\n\t\t\t\tsb.append(op2.toString());\n\t\t\t}\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t\tbreak;\n\t\t//[end] SUB\n\t\t}\n\t}",
"T visit(Addition node);",
"private static boolean same3Gradients(int[] coords, int r) {\n double n1 = (r + 1) - r;\n double n2 = (r + 2) - (r + 1);\n\n double d1 = coords[r + 1] - coords[r];\n double d2 = coords[r + 2] - coords[r + 1];\n\n // These cases are when we have Q on the same line or column.\n // This is something that will never happen, because of the nqueens Solver's constraints.\n // if (d1 == 0 && d2 == 0) {\n // return n1 == n2;\n // } else if (n1 == 0) {\n // if (n2 == 0)\n // return d1 == d2\n // return false;\n // }\n\n return Math.abs(n1 / d1 - n2 / d2) < 1e-99;\n }"
]
| [
"0.62534416",
"0.552041",
"0.55142844",
"0.5513317",
"0.5349595",
"0.5330959",
"0.517171",
"0.5153969",
"0.51088",
"0.5074954",
"0.50685656",
"0.50004226",
"0.4981287",
"0.49499106",
"0.4936521",
"0.49318323",
"0.4917562",
"0.4870055",
"0.48469564",
"0.4844887",
"0.48443374",
"0.48375827",
"0.48335338",
"0.48291576",
"0.48244777",
"0.47882873",
"0.47439277",
"0.47286478",
"0.47120267",
"0.4707582",
"0.46816465",
"0.46769032",
"0.46769032",
"0.46769032",
"0.46763858",
"0.46261275",
"0.4621138",
"0.46016988",
"0.4600433",
"0.45966667",
"0.45932174",
"0.4581384",
"0.45748317",
"0.45646748",
"0.4555005",
"0.45536947",
"0.45513484",
"0.4544238",
"0.45361027",
"0.45249584",
"0.45190763",
"0.45183408",
"0.45177698",
"0.45101318",
"0.45077017",
"0.45041722",
"0.44975534",
"0.4497021",
"0.44944248",
"0.44853333",
"0.44763982",
"0.44747594",
"0.4469883",
"0.44650397",
"0.44590747",
"0.44571492",
"0.44569448",
"0.4452809",
"0.4449952",
"0.4444748",
"0.44420692",
"0.44314787",
"0.44305974",
"0.44289744",
"0.4428597",
"0.4417014",
"0.4415392",
"0.44121346",
"0.44028723",
"0.44007072",
"0.43986833",
"0.43924356",
"0.43876192",
"0.43865395",
"0.4385669",
"0.43846878",
"0.43817016",
"0.43764332",
"0.4376005",
"0.4369507",
"0.4365871",
"0.4365162",
"0.4364813",
"0.4360881",
"0.4359604",
"0.43520498",
"0.4347979",
"0.4347887",
"0.43452272",
"0.434422",
"0.43385503"
]
| 0.0 | -1 |
delete any samples that exist in the database but have had their checkboxes unchecked by the user on the ASM Module Info screen. MR6976 | private Map deleteSamples(SecurityInfo securityInfo, String module) throws Exception {
Map returnValue = new HashMap();
//get the existing sample ids for the ASM module
AsmData asmInfo = new AsmData();
asmInfo.setAsm_id(module);
IcpOperationHome home = (IcpOperationHome) EjbHomes.getHome(IcpOperationHome.class);
IcpOperation icp = home.create();
asmInfo = (AsmData) icp.getAsmData(asmInfo, securityInfo, true, false);
Iterator frozenIterator = ApiFunctions.safeList(asmInfo.getFrozen_samples()).iterator();
Iterator paraffinIterator = ApiFunctions.safeList(asmInfo.getParaffin_samples()).iterator();
List existingSampleIds = new ArrayList();
SampleData sample;
while (frozenIterator.hasNext()) {
sample = (SampleData)frozenIterator.next();
existingSampleIds.add(sample.getSample_id());
}
while (paraffinIterator.hasNext()) {
sample = (SampleData)paraffinIterator.next();
existingSampleIds.add(sample.getSample_id());
}
//for each existing sample, if it has not been checked off on the front end it is a candidate
//for deletion. Build a list of candidate ids and if it's not empty pass the list off to
//BtxPerformerSampleOperation for deletion. That class will enforce any business rules that
//ensure the samples can truly be deleted. We simply need to check for errors and if any
//ocurred pass them back to the user.
List samplesToDelete = new ArrayList();
Iterator existingIterator = existingSampleIds.iterator();
while (existingIterator.hasNext()) {
String sampleId = (String)existingIterator.next();
//if the state is disabled, this is a sample that wasn't allowed to be unchecked
//so it is not a candidate for deletion. We cannot check the "present"<sample_id>
//parameter because disabled controls do not have their values passed in the request
String state = ApiFunctions.safeString(request.getParameter("present" + sampleId + "state"));
if (state.indexOf("disabled") < 0) {
//otherwise, see if there is a parameter indicating the sample is checked. If not,
//this sample is a candidate for deletion. Frozen and paraffin samples have
//slightly different parameter names, so get them both
String frozenCheck = ApiFunctions.safeString(request.getParameter("present" + sampleId));
String paraffinCheck = ApiFunctions.safeString(request.getParameter("pfin_present" + sampleId));
if (ApiFunctions.isEmpty(frozenCheck) && ApiFunctions.isEmpty(paraffinCheck)) {
samplesToDelete.add(sampleId);
}
}
}
if (samplesToDelete.size() > 0) {
Timestamp now = new Timestamp(System.currentTimeMillis());
BtxDetailsDeleteSamples btxDetails = new BtxDetailsDeleteSamples();
btxDetails.setBeginTimestamp(now);
btxDetails.setLoggedInUserSecurityInfo(securityInfo);
List sampleList = new ArrayList();
Iterator sampleIterator = samplesToDelete.iterator();
while (sampleIterator.hasNext()) {
com.ardais.bigr.javabeans.SampleData sampleData = new com.ardais.bigr.javabeans.SampleData();
sampleData.setSampleId((String)sampleIterator.next());
sampleData.setConsentId(asmInfo.getCase_id());
sampleList.add(sampleData);
}
btxDetails.setSampleDatas(sampleList);
//note - I spoke with Gail about providing a default reason for deleting the samples,
//and she requested that we leave the reason blank. Most of the time it's because the
//samples were created in error, but there are occasionally other reasons (i.e. the
//sample was broken).
btxDetails = (BtxDetailsDeleteSamples)Btx.perform(btxDetails, "iltds_sample_deleteSamples");
//if any errors were returned, add them to the errors list
BtxActionErrors actionErrors = btxDetails.getActionErrors();
if (actionErrors != null && actionErrors.size() > 0) {
Iterator errorIterator = actionErrors.get();
MessageResources messages = (MessageResources)servletCtx.getAttribute(Globals.MESSAGES_KEY);
while (errorIterator.hasNext()) {
BtxActionError error = (BtxActionError)errorIterator.next();
String message = messages.getMessage(error.getKey(), error.getValues());
//because these messages are shown in plain text, strip off the <li> and </li> tags
message = StringUtils.replace(message,"<li>"," ");
message = StringUtils.replace(message,"</li>"," ");
errors.add(message.trim());
}
}
else {
//no errors occurred, so return a map of deleted sample ids
Iterator iterator = samplesToDelete.iterator();
String sampleId;
while (iterator.hasNext()) {
sampleId = (String)iterator.next();
returnValue.put(sampleId, sampleId);
}
}
}
return returnValue;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void deleteAllRealTestCode() {\n\n\t myDataBase.delete(\"tbl_TestCode\", \"TestCode\" + \" != ?\",\n\t new String[] { \"1\" });\n\t }",
"public void clear_data() {\n\n for(Map.Entry<Integer,ArrayList<Integer>> entry : to_refer_each_item.entrySet()) {\n\n ArrayList<Integer> list = entry.getValue();\n\n for (int i = 0; i < list.size(); i++) {\n CheckBox c = (CheckBox) findViewById(list.get(i));\n if (c.isChecked()) {\n c.setChecked(false);\n }\n }\n }\n }",
"private void deleteTestDataSet() {\n LOG.info(\"deleting test data set...\");\n try {\n Statement stmt = _conn.createStatement();\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_person\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_employee\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_payroll\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_address\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_contract\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_category\");\n stmt.executeUpdate(\"DELETE FROM tc8x_pks_project\");\n } catch (Exception e) {\n LOG.error(\"deleteTestDataSet: exception caught\", e);\n }\n }",
"public void removeCheckedStudents(View v)\n {\n for(Student aStudent: studentsList)\n {\n if(aStudent.isDeletable()) {\n //myDBHelper.removeStudent(aStudent);\n //studentAdapter.remove(aStudent);\n myDBHelper.removeStudent(aStudent);\n //adapter.remove(aTeacher);\n //\n studentsList = myDBHelper.getAllStudents();\n //Instantiated an adapter\n studentAdapter = new StudentAdapter(this, R.layout.activity_list_item, studentsList);\n ListView listTeachers = (ListView) findViewById(R.id.lstStudentsView);\n listTeachers.setAdapter(studentAdapter);\n studentAdapter.notifyDataSetChanged();\n }\n }\n if(studentsList.isEmpty())\n btnEdit.setEnabled(false);\n imgStudentImage.setImageResource(R.mipmap.noimgavail);\n //clear all fields\n txtFirstName.setText(\"\");\n txtLastName.setText(\"\");\n txtAge.setText(\"\");\n txtYear.setText(\"\");\n }",
"@Override\n\tpublic boolean deleteAll(int bno) {\n\t\treturn false;\n\t}",
"private static void deletePackageExamples(CmsBean cmsBean) throws Exception {\n }",
"public void clearCounterexamples(Set<ARGState> toRemove) {\n\n counterexamples.keySet().removeAll(toRemove);\n }",
"private static boolean deleteSelectedShows(List<String> clickedResults)\n {\n int check = 0;\n for (String s : clickedResults)\n {\n ShowDAO.removeShow(Integer.parseInt(s));\n check += 1;\n }\n\n if(check > 0)\n {\n return true;\n }\n return false;\n }",
"private void DeleteBurnInsOnPreviousSamples() {\n\t\tif (gibbs_sample_num <= num_gibbs_burn_in + 1 && gibbs_sample_num >= 2){\n\t\t\tgibbs_samples_of_bart_trees[gibbs_sample_num - 2] = null;\n\t\t}\n\t}",
"public void desmarcarTodos() {\n for (InputCheckbox checkbox : l_campos)\n {\n checkbox.setChecked(false);\n }\n }",
"int deleteByExample(RepStuLearningExample example);",
"public void cabDeselectAll() {\n ListView lv = getListView();\n int vCnt = lv.getCount();\n \n for (int i = 0; i < vCnt; i++) {\n \tlv.setItemChecked(i, false);\n }\n \n selectedListItems.clear();\n redrawListView();\n }",
"public void removeAll(){\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_GAS_SENSOR, null, null);\n // db.delete(DatabaseHelper.TAB_USERS_GROUP, null, null);\n }",
"int deleteAllComponents(RecordSet inputRecords);",
"public void deleteAllState() {\n\r\n SQLiteDatabase db2 = this.getWritableDatabase();\r\n db2.delete(TABLE_SOS2, null, null);\r\n /*\r\n Cursor cursor = db.rawQuery(selectQuery, null);\r\n\r\n // looping through all rows and adding to list\r\n if (cursor.moveToFirst()) {\r\n do {\r\n String id = cursor.getString(0);\r\n String name = cursor.getString(1);\r\n String phone = cursor.getString(2);\r\n //Log.e(\"DEBUG\", \"ID= \" + id+\" NAME= \"+name+\" PHONE= \"+phone);\r\n if (id == null || name == null || phone == null){\r\n return;\r\n }\r\n deleteData(Integer.parseInt(id));\r\n\r\n } while (cursor.moveToNext());\r\n }*/\r\n }",
"public void deselectAll()\n {\n }",
"int deleteByExample(WfCfgModuleCatalogExample example);",
"void deleteAllCopiedComponent(RecordSet compRs);",
"void clearFeatures();",
"public static void deleteRam(String value){\r\n try {\r\n \r\n if(singleton.ram == 0){\r\n resetTableRam();\r\n }\r\n\r\n ResultSet rs = null;\r\n Statement stmt = singleton.conn.createStatement();\r\n \r\n for( int i=0; i<home_RegisterUser.panelRam.getComponentCount();i++) {\r\n if( home_RegisterUser.panelRam.getComponent(i) instanceof JCheckBox){\r\n JCheckBox checkBox = (JCheckBox)home_RegisterUser.panelRam.getComponent(i);\r\n if(checkBox.getToolTipText().equals(value)) {\r\n if(checkBox.getActionCommand().contains(\"ramType\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND tipo = '\"+value+\"'\");\r\n }else if(checkBox.getActionCommand().contains(\"ramCap\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND capacidad = \"+Integer.parseInt(value)+\"\");\r\n }else if(checkBox.getActionCommand().contains(\"ramVel\")){\r\n singleton.ram = 1;\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart AND velocidad = \"+Integer.parseInt(value)+\"\");\r\n }\r\n }\r\n }\r\n }\r\n if(rs!=null){\r\n while(rs.next()){\r\n for(int i=0; i<singleton.dtm.getRowCount();i++){\r\n if(Integer.parseInt(singleton.dtm.getValueAt(i, 0).toString())==rs.getInt(\"codigo\")){\r\n singleton.dtm.removeRow(i);\r\n }\r\n }\r\n }\r\n }\r\n \r\n if(singleton.dtm.getRowCount() == 0){\r\n singleton.ram = 0;\r\n resetTableRam();\r\n rs = stmt.executeQuery(\"SELECT *,r.tipo,r.capacidad,r.velocidad FROM articulos a,ram r WHERE a.codigo = r.codart\");\r\n while(rs.next()){\r\n int stock = rs.getInt(\"stock\");\r\n String stock2;\r\n if(stock>0){\r\n stock2 = \"Esta en Stock\";\r\n }else{\r\n stock2 = \"No esta en Stock\";\r\n }\r\n singleton.dtm.addRow(getArrayDeObjectosRam(rs.getInt(\"codigo\"),rs.getString(\"nombre\"),rs.getString(\"fabricante\"),rs.getFloat(\"precio\"),stock2,rs.getString(\"tipo\"),rs.getInt(\"capacidad\"),rs.getInt(\"velocidad\")));\r\n }\r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.err.println(\"SQL Error: \"+ex);\r\n }catch(Exception ex){\r\n System.err.println(\"Error: \"+ex);\r\n }\r\n }",
"@Override\n\tpublic boolean deleteAll() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean deleteAll() {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean deleteAll() {\n\t\treturn false;\n\t}",
"private void deleteAllBooks() {\n int rowsDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n // Update the message for the Toast\n String message;\n if (rowsDeleted == 0) {\n message = getResources().getString(R.string.inventory_delete_books_failed).toString();\n } else {\n message = getResources().getString(R.string.inventory_delete_books_successful).toString();\n }\n // Show toast\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }",
"public void deleteAllExistedTodoItems() {\n waitForVisibleElement(createToDoBtnEle, \"createTodoBtn\");\n getLogger().info(\"Try to delete all existed todo items.\");\n try {\n Boolean isInvisible = findNewTodoItems();\n System.out.println(\"isInvisible: \" + isInvisible);\n if (isInvisible) {\n Thread.sleep(smallTimeOut);\n waitForClickableOfElement(todoAllCheckbox);\n getLogger().info(\"Select all Delete mail: \");\n System.out.println(\"eleTodo CheckboxRox is: \" + eleToDoCheckboxRow);\n todoAllCheckbox.click();\n waitForClickableOfElement(btnBulkActions);\n btnBulkActions.click();\n deleteTodoSelectionEle.click();\n waitForCssValueChanged(deteleConfirmForm, \"Delete confirm form\", \"display\", \"block\");\n waitForClickableOfElement(deleteTodoBtn);\n waitForTextValueChanged(deleteTodoBtn, \"Delete Todo Btn\", \"Delete\");\n deleteTodoBtn.click();\n waitForCssValueChanged(deteleConfirmForm, \"Delete confirm form\", \"display\", \"none\");\n getLogger().info(\"Delete all Todo items successfully\");\n NXGReports.addStep(\"Delete all Todo items\", LogAs.PASSED, null);\n } else {\n getLogger().info(\"No items to delele\");\n NXGReports.addStep(\"Delete all Todo items\", LogAs.PASSED, null);\n }\n } catch (Exception e) {\n AbstractService.sStatusCnt++;\n e.printStackTrace();\n NXGReports.addStep(\"Delete all Todo items\", LogAs.FAILED, new CaptureScreen(CaptureScreen.ScreenshotOf.BROWSER_PAGE));\n\n }\n\n }",
"private void deleteAllPets() {\n// int rowsDeleted = getContentResolver().delete(ArtistsContracts.GenderEntry.CONTENT_URI, null, null);\n// Log.v(\"CatalogActivity\", rowsDeleted + \" rows deleted from pet database\");\n }",
"@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2013-12-30 12:32:47.222 -0500\", hash_original_method = \"0FC7F7395F602EA6BDC8C8831D80FE6E\", hash_generated_method = \"039E305D22D1CDB49DB823CD35120623\")\n \npublic void clearAll() {\n // Called on the UI thread.\n postMessage(Message.obtain(null, CLEAR_ALL));\n }",
"int deleteByExample(XdSpxxExample example);",
"public void deleteAll() {\n\t\t\n\t}",
"protected abstract boolean deleteCheckedFiles();",
"@Override\n\tpublic void deleteAllStudents() {\n\t\t\n\t}",
"public void deleteAll()\n\t{\n\t}",
"public void deleteAll()\n\t{\n\t}",
"public void deleteAll();",
"public void deleteallWishlist() {\n db = helper.getWritableDatabase();\n db.execSQL(\"delete from \" + DatabaseConstant.TABLE_NAME_WISHLIST);\n db.close();\n }",
"public void deleteAll();",
"public void deleteAll();",
"public void deleteAll();",
"private boolean deleteAllData(Bike bike){\n try(Connection con = DatabaseConnector.getConnection();\n PreparedStatement ps = con.prepareStatement(DELETE_DATA)){\n \n ps.setInt(1, bike.getBikeId());\n ps.executeUpdate();\n return true;\n }catch(Exception e){\n System.out.println(\"Exception: \" + e);\n }\n return false;\n }",
"public boolean deleteAllHighScoreRows(){\n db = helper.getWritableDatabase();\n int ifSuccess = db.delete(SQLHelper.DB_TABLE_SCORES, null, null); // Clear table\n db.close();\n return (ifSuccess != 0);\n }",
"public void deleteAll() {\n\n\t}",
"public void cleanAfterSample() {\n if(previousResult != null) {\n previousResult.cleanAfterSample();\n }\n samplerContext.clear();\n }",
"public void deleteLUC() {\r\n/* 135 */ this._has_LUC = false;\r\n/* */ }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.del_bkmarks) {\n\n final Button bkdeletebtn=(Button)findViewById(R.id.bkmrk_delete_btn);\n final Button bkcancelbtn=(Button)findViewById(R.id.bkmrk_cancel_btn);\n\n bkcancelbtn.setVisibility(View.VISIBLE);\n bkdeletebtn.setVisibility(View.VISIBLE);\n\n\n Myapp2.setCheckboxShown(true);\n //bkMarkList.deferNotifyDataSetChanged();\n bkMarkList.setAdapter(adapter);\n\n\n bkcancelbtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n Myapp2.setCheckboxShown(false);\n //checkboxShown=false;\n bkcancelbtn.setVisibility(View.GONE);\n bkdeletebtn.setVisibility(View.GONE);\n\n bkMarkList.setAdapter(adapter);\n }\n });\n\n\n\n bkdeletebtn.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n for(int i=0;i<Myapp2.getChecks().size();i++){\n\n if(Myapp2.getChecks().get(i)==1){\n\n int index=i+1;\n\n //remove items from the list here for example from ArryList\n Myapp2.getChecks().remove(i);\n PgNoOfBkMarks.remove(i);\n paraName.remove(i);\n SuraName.remove(i);\n //similarly remove other items from the list from that particular postion\n SharedPreferences settings = PreferenceManager.getDefaultSharedPreferences(getApplicationContext());\n SharedPreferences.Editor editor =settings.edit();\n\n editor.remove(\"bookmark_\"+index);\n editor.putInt(\"bookmark_no\",settings.getInt(\"bookmark_no\",0)-1);\n editor.apply();\n\n\n\n i--;\n }\n }\n Myapp2.setCheckboxShown(false);\n bkcancelbtn.setVisibility(View.GONE);\n bkdeletebtn.setVisibility(View.GONE);\n bkMarkList.setAdapter(adapter);\n }\n });\n\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }",
"@Test\n public void deleteRecipeIngredient_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedIngredient = testDatabase.addRecipeIngredient(recipeIngredient);\n testDatabase.deleteRecipeIngredients(returnedIngredient);\n ArrayList<RecipeIngredient> allIngredients = testDatabase.getAllRecipeIngredients(returnedRecipe);\n boolean deleted = true;\n if(allIngredients != null){\n for(int i = 0; i < allIngredients.size(); i++){\n if(allIngredients.get(i).getIngredientID() == returnedIngredient){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeIngredient - Deletes From Database\", true, deleted);\n }",
"@BeforeEach\n\tpublic void cleanDataBase()\n\t{\n\t\taddRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t\t\n\t\tdomRepo.deleteAll()\n\t\t.as(StepVerifier::create) \n\t\t.verifyComplete();\n\t}",
"@Test\n public void deleteRecipeDirections_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedDirection1 = testDatabase.addRecipeDirection(recipeDirection1);\n int returnedDirection2 = testDatabase.addRecipeDirection(recipeDirection2);\n testDatabase.deleteRecipeDirections(returnedRecipe);\n ArrayList<RecipeDirection> allDirections = testDatabase.getAllRecipeDirections(returnedRecipe);\n boolean deleted1 = true;\n boolean deleted2 = true;\n if(allDirections != null){\n for(int i = 0; i < allDirections.size(); i++){\n if(allDirections.get(i).getKeyID() == returnedDirection1){\n deleted1 = false;\n }\n if(allDirections.get(i).getKeyID() == returnedDirection2){\n deleted2 = false;\n }\n }\n }\n assertEquals(\"deleteRecipeDirections - Deleted Direction1\", true, deleted1);\n assertEquals(\"deleteRecipeDirections - Deleted Direction2\", true, deleted2);\n }",
"void deleteChains() {\n\t\tif (!params.isDebug()) {\n\t\t\tfor (File deleteCandidate : toDelete) {\n\t\t\t\tdeleteCandidate.delete();\n\t\t\t\t\n\t\t\t\ttry (DirectoryStream<Path> directoryStream = Files.newDirectoryStream(deleteCandidate.toPath())) {\n\t\t\t\t\tfor (Path path : directoryStream) {\n\t\t\t\t\t\tif (!path.getFileName().toString().endsWith(\"_SCWRLed.pdb\")) {\n\t\t\t\t\t\t\tpath.toFile().delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ex) {\n\t\t\t\t\tex.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean deleteAll() {\n // Set where and whereArgs to null here.\n return database.delete(DATABASE_TABLE, null, null) > 0;\n }",
"@Test\n public void deleteRecipeCategory_Deletes(){\n int returnedRecipe = testDatabase.addRecipe(testRecipe);\n int returnedCategory = testDatabase.addRecipeCategory(recipeCategory);\n testDatabase.deleteRecipeCategory(returnedCategory);\n ArrayList<RecipeCategory> allCategories = testDatabase.getAllRecipeCategories(returnedRecipe);\n boolean deleted = true;\n if(allCategories != null){\n for(int i = 0; i < allCategories.size(); i++){\n if(allCategories.get(i).getCategoryID() == returnedCategory){\n deleted = false;\n }\n }\n }\n assertEquals(\"deleteRecipeCategory - Deletes From Database\", true, deleted);\n }",
"@Test\n public void shouldDeleteAllDataInDatabase(){\n }",
"@Override\r\n public void deleteCopAnalysis(String copAnalysisIDs) throws DataAccessException {\r\n LOG.debug(\"method deleteCopAnalysis start!\");\r\n hibernateTemplate.bulkUpdate(CustomerConstant.BATCH_REMOVE_COPANALY_HQL + copAnalysisIDs);\r\n LOG.debug(\"method deleteCopAnalysis end!\");\r\n }",
"private void clearOneTest() {\n corpus.clear();\n Factory.deleteResource(corpus);\n Factory.deleteResource(learningApi);\n controller.remove(learningApi);\n controller.cleanup();\n Factory.deleteResource(controller);\n }",
"void deleteAll();",
"void deleteAll();",
"void deleteAll();",
"void clearTypedFeatures();",
"public void deleteAllStocks(){\n this.open();\n database.execSQL(\"DELETE FROM \" + SQLiteHelper.TABLE_STOCK);\n this.close();\n }",
"private void deleteResidualFile()\n\t{\n\t\tFile[] trainingSetFileName = directoryHandler.getTrainingsetDir().listFiles();\n\t\ttry\n\t\t{\n\t\t\tfor (int i = 1; i < nu; i++) trainingSetFileName[i].delete();\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"private void unsetMultipleChecks() {\r\n\r\n checkNemenyi.setEnabled(false);\r\n checkShaffer.setEnabled(false);\r\n checkBergman.setEnabled(false);\r\n\r\n }",
"private void deleteAllBooks() {\n int booksDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", booksDeleted + getString(R.string.all_deleted));\n }",
"@Override\r\n\tpublic void removeAll() {\r\n\t\tunregister();\r\n\t\taudioFile = null; // pas de Samples\r\n\t\tsection.setSection(0, 0);\r\n\t\tsel.setSelection(0, 0);\r\n\t\t// will issue repaint()\r\n\t\taudioDataChanged();\r\n\t\tnotifyAudioChangeListeners();\r\n\t}",
"void deleteExam(Module module, Exam target);",
"private void deletePhones() {\n //pobieramy id wybranych pozycji i w petli je usuwamy\n long[] checkedItemIds = listView.getCheckedItemIds();\n for (long id:checkedItemIds) {\n ResolverHelper.deleteData((int)id,this.getContentResolver());\n }\n }",
"private void unsetOneAllChecks() {\r\n\r\n checkIman.setEnabled(false);\r\n checkBonferroni.setEnabled(false);\r\n checkHolm.setEnabled(false);\r\n checkHochberg.setEnabled(false);\r\n checkHommel.setEnabled(false);\r\n checkHolland.setEnabled(false);\r\n checkRom.setEnabled(false);\r\n checkFinner.setEnabled(false);\r\n checkLi.setEnabled(false);\r\n\r\n }",
"public void removeEntry(ActionEvent event) {\n\t\tnewReport2.removeSample(table.getSelectionModel().getSelectedItem());\n\t\ttable.getItems().removeAll(table.getSelectionModel().getSelectedItem());\n\t\tif(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber())!=-1) {\n\t\t\tconclusionNumbers1.remove(conclusionNumbers1.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber()));\n\t\t}\n\t\telse {\n\t\t\tconclusionNumbers2.remove(conclusionNumbers2.indexOf(table.getSelectionModel().getSelectedItem().getSampleNumber()));\n\t\t}\n\t}",
"public void unSelectCheckBoxes(){\n fallSemCheckBox.setSelected(false);\n springSemCheckBox.setSelected(false);\n summerSemCheckBox.setSelected(false);\n allQtrCheckBox.setSelected(false);\n allMbaCheckBox.setSelected(false);\n allHalfCheckBox.setSelected(false);\n allCampusCheckBox.setSelected(false);\n allHolidayCheckBox.setSelected(false);\n fallSemCheckBox.setSelected(false);\n// allTraTrbCheckBox.setSelected(false);\n }",
"void unsetValueSampledData();",
"public void deleteBitesFromallBitesFromFile(int bitsQuantity) {\r\n for (int i = 0; i < bitsQuantity; i++)\r\n this.allBitesFromFile.remove(0);\r\n }",
"int deleteByExample(CptDataStoreExample example);",
"public void removeAll()\r\n {\n db = this.getWritableDatabase(); // helper is object extends SQLiteOpenHelper\r\n db.execSQL(\"drop table \"+\"campaing\");\r\n db.execSQL(\"drop table \"+\"cafe\");\r\n db.execSQL(\"drop table \"+\"points\");\r\n\r\n db.close ();\r\n }",
"@Override\n\tpublic void removeAll() throws SystemException {\n\t\tfor (StepDefsCompositeStepDefDBE stepDefsCompositeStepDefDBE : findAll()) {\n\t\t\tremove(stepDefsCompositeStepDefDBE);\n\t\t}\n\t}",
"public void deleteGeneratedFiles();",
"private void deleteExec(){\r\n\t\tList<HashMap<String,String>> selectedDatas=ViewUtil.getSelectedData(jTable1);\r\n\t\tif(selectedDatas.size()<1){\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Please select at least 1 item to delete\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tint options = 1;\r\n\t\tif(selectedDatas.size() ==1 ){\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete this Item ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}else{\r\n\t\t\toptions = JOptionPane.showConfirmDialog(null, \"Are you sure to delete these \"+selectedDatas.size()+\" Items ?\", \"Info\",JOptionPane.YES_NO_OPTION);\r\n\t\t}\r\n\t\tif(options==1){\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tfor(HashMap<String,String> map:selectedDatas){\r\n\t\t\t\r\n\t\t\tdiscountService.deleteDiscountByMap(NameConverter.convertViewMap2PhysicMap(map, \"Discount\"));\r\n\t\t}\r\n\t\tthis.initDatas();\r\n\t}",
"public void cleanSlate(View view) {\n Log.d(LOG, \"in cleanSlate\");\r\n dbh.deleteAllData();\r\n Log.d(LOG, \"all data deleted\");\r\n }",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"int logicalDeleteByExample(@Param(\"example\") DashboardGoodsExample example);",
"@After\n public void removeEverything() {\n\n ds.delete(uri1);\n ds.delete(uri2);\n ds.delete(uri3);\n\n System.out.println(\"\");\n }",
"@Test(groups = { \"Interactive\" })\n public void testRemove() {\n String defaultBlocks = \"[[1,1,1,\\\"Green\\\",[]],[1,1,2,\\\"Green\\\",[\\\"S\\\"]],[1,1,3,\\\"Red\\\",[\\\"S\\\"]],[1,1,4,\\\"Green\\\",[]]]\";\n ContextValue context = getContext(defaultBlocks);\n LogInfo.begin_track(\"testMoreActions\");\n runFormula(executor, \"(: remove)\", context, x -> real(x.allItems).size() == 2 && x.selected.size() == 2);\n runFormula(executor, \"(:for * (: remove))\", context, x -> x.selected.size() == 2 && real(x.allItems).size() == 0);\n runFormula(executor, \"(:for (color green) (: remove))\", context,\n x -> x.selected.size() == 2 && real(x.allItems).size() == 1);\n\n LogInfo.end_track();\n }",
"public void removeAllData() {\n dbHelper.removeAllData(db);\n }",
"public void deleteAllFromDB() {\r\n for (int i = 0; i < uploads.size(); i++) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n }\r\n super.getBasebo().remove(uploads);\r\n }",
"int deleteByExample(PaasCustomAutomationRecordExample example);",
"private void deleteAllQuestionInputTextAreas() {\n UIComponent panel = FacesContext.getCurrentInstance().getViewRoot().findComponent(\"tabsView:tabViewTasksSettings:viewEditPerformanceAppraisalSettingForm:questionsPerformanceAppraisalPanel\");\n panel.getChildren().clear();\n }",
"public void removeModelWithThisSound(String sound) {\n ArrayList<String> modelsToDelete = new ArrayList<>();\n\n for (SVMmodel mod : svmModels.values()) {\n boolean delete = mod.containsSound(sound);\n\n if (delete) {\n modelsToDelete.add(mod.getName());\n boolean a = svmModels.remove(mod.getName(), mod);\n\n String filePath = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).getPath() + \"/A-Cube/Models/\" + mod.getName();\n File fileToDelete = new File(filePath);\n if (fileToDelete.exists()) {\n fileToDelete.delete();\n }\n\n Log.d(TAG, \"SVMmodel removed: \"+mod.getName()+\" \"+a);\n\n for (Configuration conf : configurations) {\n if (conf.hasModel() && conf.getModel().equals(mod)) {\n conf.setModel(null);\n }\n }\n }\n }\n }",
"int deleteByExample(UTbInvCategoryExample example);",
"@DISPID(27)\n\t// = 0x1b. The runtime will prefer the VTID if present\n\t@VTID(38)\n\tvoid resetTestSet(boolean deleteRuns);",
"@Test\r\n\t\tpublic void testDeleteAll() {\n\t\t\ttestingSet = new IntegerSet(); \r\n\t\t\ttestingSet.insertAll(list1); \r\n\t\t\ttestingSet.deleteAll();\r\n\t\t\t// after data is deleted set should be empty \r\n\t\t\tassertTrue(testingSet.isEmpty());\r\n\t\t}",
"public static boolean removeMRFilesInteractivelyFromDB( ArrayList entries_todelete ) {\n \n// String reply = \"bogus\";\n boolean status;\n \n General.showOutput(\"Entries to delete: [\" + entries_todelete.size() + \"]\");\n General.showOutput(\"Entries to delete: \" + entries_todelete.toString() );\n \n General.showWarning(\"answering yes to the following question will lead to\");\n General.showWarning(\"deleting work that might not be recovered!\");\n \n String prompt = \"Delete ALL the MR files for the above entries from the DB?\";\n if ( Strings.getInputBoolean( in, prompt ) ) {\n General.showOutput(\"Deleting the annotated MR files listed above.\");\n status = removeMRFilesFromDB( entries_todelete );\n if ( ! status ) {\n General.showError(\"in MRAnnotate.removeMRFilesInteractively found:\");\n General.showError(\"Deleting the annotated MR files failed.\");\n return false;\n }\n }\n return true;\n }",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Override\n\tpublic void deleteAll() {\n\t\t\n\t}",
"@Test(priority = 15)\n public void unselectCheckboxesTest() {\n driver.findElement(By.xpath(\"//label[@class='label-checkbox'][1]/input\")).click();\n driver.findElement(By.xpath(\"//label[@class='label-checkbox'][3]/input\")).click();\n assertFalse(driver.findElement(By.xpath(\"//label[@class='label-checkbox'][1]/input\"))\n .isSelected());\n assertFalse(driver.findElement(By.xpath(\"//label[@class='label-checkbox'][3]/input\"))\n .isSelected());\n }"
]
| [
"0.5985693",
"0.59621835",
"0.5930949",
"0.5764042",
"0.5750801",
"0.57187283",
"0.5637931",
"0.5612583",
"0.560667",
"0.5605228",
"0.556948",
"0.5541938",
"0.5522307",
"0.5498883",
"0.5482166",
"0.54809326",
"0.54491407",
"0.54272825",
"0.5418361",
"0.54154885",
"0.5391113",
"0.5391113",
"0.5391113",
"0.5368101",
"0.53522694",
"0.53414816",
"0.5326436",
"0.5309944",
"0.530871",
"0.5298617",
"0.5298002",
"0.5295479",
"0.5295479",
"0.5283251",
"0.52786094",
"0.5276043",
"0.5276043",
"0.5276043",
"0.52753186",
"0.527296",
"0.52726406",
"0.52675056",
"0.52549535",
"0.52519304",
"0.5245385",
"0.52446836",
"0.5244612",
"0.5244286",
"0.5238074",
"0.52363193",
"0.52335644",
"0.5232171",
"0.52276707",
"0.52260935",
"0.52260935",
"0.52260935",
"0.5222666",
"0.52130324",
"0.52009076",
"0.51880604",
"0.518151",
"0.51810443",
"0.5173526",
"0.5169661",
"0.5165693",
"0.5160623",
"0.51591516",
"0.51568466",
"0.51519734",
"0.5133512",
"0.5133084",
"0.5132336",
"0.5131702",
"0.5109066",
"0.51088333",
"0.51060385",
"0.51060385",
"0.51060385",
"0.51060385",
"0.51010054",
"0.50968313",
"0.5095335",
"0.50925523",
"0.50919586",
"0.5091927",
"0.50836563",
"0.50755584",
"0.5070561",
"0.5070338",
"0.50690037",
"0.50627685",
"0.50612706",
"0.50612706",
"0.50612706",
"0.50612706",
"0.50612706",
"0.50612706",
"0.50612706",
"0.50612706",
"0.5057737"
]
| 0.67876744 | 0 |
create the fixative dropdown changed to use ARTS for MR 4435 | private void retry(AsmData asmData) throws IOException, ServletException {
LegalValueSet fixatives = BigrGbossData.getValueSetAsLegalValueSet(ArtsConstants.VALUE_SET_TYPE_OF_FIXATIVE);
request.setAttribute("fixatives", fixatives);
// new fields that pass in ARTS codes for MR 4435
LegalValueSet sampleFormatDetail = BigrGbossData.getValueSetAsLegalValueSet(ArtsConstants.VALUE_SET_SAMPLE_FORMAT_DETAIL);
request.setAttribute("sampleFormat", sampleFormatDetail);
LegalValueSet minThickness = BigrGbossData.getValueSetAsLegalValueSet(ArtsConstants.VALUE_SET_PARAFFIN_DIMENSIONS);
request.setAttribute("minThickness", minThickness);
LegalValueSet maxThickness = BigrGbossData.getValueSetAsLegalValueSet(ArtsConstants.VALUE_SET_PARAFFIN_DIMENSIONS);
request.setAttribute("maxThickness", maxThickness);
LegalValueSet widthAcross = BigrGbossData.getValueSetAsLegalValueSet(ArtsConstants.VALUE_SET_PARAFFIN_DIMENSIONS);
request.setAttribute("widthAcross", widthAcross);
LegalValueSet paraffinFeatureSet = BigrGbossData.getValueSetAsLegalValueSet(ArtsConstants.VALUE_SET_PARAFFIN_FEATURE);
request.setAttribute("paraffinFeatureSet", paraffinFeatureSet);
//set the changed sample vectors
request.setAttribute("hours", FormLogic.getHourIntVector());
request.setAttribute("minutes", FormLogic.getMinuteIntVector());
request.setAttribute("organ", asmData.getTissue_type());
request.setAttribute("otherTissue", asmData.getOther_tissue());
request.setAttribute("moduleLetter", asmData.getModule_letter());
request.setAttribute("asmInfo", asmData);
request.setAttribute("myRetry", errors);
//MR6976 - for every sample on the ASM, populate it's statuses. If this isn't done,
//the jsp will incorrectly allow the user to uncheck samples that have progressed
//beyond the ASMPRESENT stage.
SampleData sampleData;
Iterator frozenIterator = asmData.getFrozen_samples().iterator();
while (frozenIterator.hasNext()) {
sampleData = (SampleData)frozenIterator.next();
if (sampleData.isExists()) {
sampleData.setStatuses(FormLogic.getStatusValuesForSample(sampleData.getSample_id()));
}
}
Iterator paraffinIterator = asmData.getParaffin_samples().iterator();
while (paraffinIterator.hasNext()) {
sampleData = (SampleData)paraffinIterator.next();
if (sampleData.isExists()) {
sampleData.setStatuses(FormLogic.getStatusValuesForSample(sampleData.getSample_id()));
}
}
servletCtx.getRequestDispatcher("/hiddenJsps/iltds/asm/asmModuleInfo.jsp").forward(
request,
response);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void add(){\r\n ArrayAdapter<String> adp3 = new ArrayAdapter<String>(this, android.R.layout.simple_dropdown_item_1line, list);\r\n adp3.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n txtAuto3.setThreshold(1);\r\n txtAuto3.setAdapter(adp3);\r\n }",
"private List<String> build() {\n List<String> ags = new ArrayList<>();\n ags.add(\"European Union Chromosome 3 Arabidopsis Sequencing Consortium\");\n ags.add(\"Institute for Genomic Research\");\n ags.add(\"Kazusa DNA Research Institute\");\n return ags;\n }",
"@Override\n\tpublic void showAirlines() {\n\t\tArrayList<Airline> airlines = Singleton.AirlineRegistDao().findAll();\n\t\tairlineOptions = \"\";\n\t\tfor (Airline airline : airlines) {\n\t\t\tairlineOptions += String.format(\"<li role=\\\"presentation\\\"> <a role=\\\"menuitem\\\" tabindex=\\\"-1\\\" href=javascript:void(0)>%s</a> </li>\\n\", airline.getName());\n\n\t\t}\n\t\tSystem.out.println(airlineOptions);\n\t}",
"private void tampil_kereta() {\n kereta_combo.addItem (\"Argo Parahyangan\");\n kereta_combo.addItem (\"Argo Jati\");\n kereta_combo.addItem (\"Bangun Karta\");\n kereta_combo.addItem (\"Bima\");\n kereta_combo.addItem (\"Kahuripan\");\n kereta_combo.addItem (\"Lodaya\"); \n kereta_combo.addItem (\"Sembari\");\n kereta_combo.addItem (\"Turangga\");\n \n }",
"private void add() {\n \t\r\n\tArrayAdapter<String> adp=new ArrayAdapter<String>(this,\r\n\t\tandroid.R.layout.simple_dropdown_item_1line,li);\r\n\t \t\r\n\tadp.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\r\n\tauto.setThreshold(1);\r\n\tauto.setAdapter(adp);\r\n\tsp.setAdapter(adp);\r\n\t\r\n }",
"public void fillSpecChoices(List ChoiceMenu) {\n\n ChoiceMenu.add(\"Quadratic Koch Island 1 pg. 13\"); /* pg. 13 */\n ChoiceMenu.add(\"Quadratic Koch Island 2 pg. 14\"); /* pg. 14 */\n ChoiceMenu.add(\"Island & Lake Combo. pg. 15\"); /* pg.15 */\n ChoiceMenu.add(\"Koch Curve A pg. 16\");\n ChoiceMenu.add(\"Koch Curve B pg. 16\");\n ChoiceMenu.add(\"Koch Curve C pg. 16\");\n ChoiceMenu.add(\"Koch Curve D pg. 16\");\n ChoiceMenu.add(\"Koch Curve E pg. 16\");\n ChoiceMenu.add(\"Koch Curve F pg. 16\");\n ChoiceMenu.add(\"Mod of Snowflake pg. 14\");\n ChoiceMenu.add(\"Dragon Curve pg. 17\");\n ChoiceMenu.add(\"Hexagonal Gosper Curve pg. 19\");\n ChoiceMenu.add(\"Sierpinski Arrowhead pg. 19\");\n ChoiceMenu.add(\"Peano Curve pg. 18\");\n ChoiceMenu.add(\"Hilbert Curve pg. 18\");\n ChoiceMenu.add(\"Approx of Sierpinski pg. 18\");\n ChoiceMenu.add(\"Tree A pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 25\");\n ChoiceMenu.add(\"Tree C pg. 25\");\n ChoiceMenu.add(\"Tree D pg. 25\");\n ChoiceMenu.add(\"Tree E pg. 25\");\n ChoiceMenu.add(\"Tree B pg. 43\");\n ChoiceMenu.add(\"Tree C pg. 43\");\n ChoiceMenu.add(\"Spiral Tiling pg. 70\");\n ChoiceMenu.add(\"BSpline Triangle pg. 20\");\n ChoiceMenu.add(\"Snake Kolam pg. 72\");\n ChoiceMenu.add(\"Anklets of Krishna pg. 73\");\n\n /*-----------\n Color examples \n -----------*/\n ChoiceMenu.add(\"Color1, Koch Curve B\");\n ChoiceMenu.add(\"Color2, Koch Curve B\");\n ChoiceMenu.add(\"Color X, Spiral Tiling\");\n ChoiceMenu.add(\"Color Center, Spiral Tiling\");\n ChoiceMenu.add(\"Color Spokes, Spiral Tiling\");\n ChoiceMenu.add(\"Color, Quad Koch Island 1\");\n ChoiceMenu.add(\"Color, Tree E\");\n ChoiceMenu.add(\"Color, Mod of Snowflake\");\n ChoiceMenu.add(\"Color, Anklets of Krishna\");\n ChoiceMenu.add(\"Color, Snake Kolam\");\n\n ChoiceMenu.add(\"Simple Branch\");\n\n\n }",
"public Abbreviations() {\n this.abbreviations = new HashMap<>();\n }",
"private void initializeOrganFilterComboBox() {\n organFilterComboBox.setItems(organs);\n organFilterComboBox.getItems()\n .addAll(organString, \"Liver\", \"Kidneys\", \"Heart\", \"Lungs\", \"Intestines\",\n \"Corneas\", \"Middle Ear\", \"Skin\", \"Bone\", \"Bone Marrow\", \"Connective Tissue\");\n organFilterComboBox.getSelectionModel().select(0);\n }",
"void setupRender() {\n List<Predmet> predmets = adminService.findAllPredmetsForPredavac(predavac);\n\n // create a SelectModel from my izlistaj of colors\n predmetSelectModel = selectModelFactory.create(predmets, \"name\");\n }",
"private JComboBox<ValueLabelItem> buildImplicitDestTypes() {\r\n ValueLabelItem[] destTypes = new ValueLabelItem[]{\r\n new ValueLabelItem(Destination.TYPE_XYZ,\r\n messageBundle.getString(\r\n \"viewer.utilityPane.action.dialog.goto.type.xyz.label\")),\r\n new ValueLabelItem(Destination.TYPE_FITH,\r\n messageBundle.getString(\r\n \"viewer.utilityPane.action.dialog.goto.type.fith.label\")),\r\n new ValueLabelItem(Destination.TYPE_FITR,\r\n messageBundle.getString(\r\n \"viewer.utilityPane.action.dialog.goto.type.fitr.label\")),\r\n new ValueLabelItem(Destination.TYPE_FIT,\r\n messageBundle.getString(\r\n \"viewer.utilityPane.action.dialog.goto.type.fit.label\")),\r\n new ValueLabelItem(Destination.TYPE_FITB,\r\n messageBundle.getString(\r\n \"viewer.utilityPane.action.dialog.goto.type.fitb.label\")),\r\n new ValueLabelItem(Destination.TYPE_FITBH,\r\n messageBundle.getString(\r\n \"viewer.utilityPane.action.dialog.goto.type.fitbh.label\")),\r\n new ValueLabelItem(Destination.TYPE_FITBV,\r\n messageBundle.getString(\r\n \"viewer.utilityPane.action.dialog.goto.type.fitbv.label\")),\r\n new ValueLabelItem(Destination.TYPE_FITBV,\r\n messageBundle.getString(\r\n \"viewer.utilityPane.action.dialog.goto.type.fitbv.label\")),\r\n };\r\n return new JComboBox<>(destTypes);\r\n }",
"protected void createAttributeChoices(Panel panel) {\n panel.add(new Label(\"Fill\"));\n fFillColor = createColorChoice(\"FillColor\");\n panel.add(fFillColor);\n\n //panel.add(new Label(\"Text\"));\n //fTextColor = createColorChoice(\"TextColor\");\n //panel.add(fTextColor);\n\n panel.add(new Label(\"Pen\"));\n fFrameColor = createColorChoice(\"FrameColor\");\n panel.add(fFrameColor);\n\n panel.add(new Label(\"Arrow\"));\n CommandChoice choice = new CommandChoice();\n fArrowChoice = choice;\n choice.addItem(new ChangeAttributeCommand(\"none\", \"ArrowMode\", new Integer(PolyLineFigure.ARROW_TIP_NONE), fView));\n choice.addItem(new ChangeAttributeCommand(\"at Start\", \"ArrowMode\", new Integer(PolyLineFigure.ARROW_TIP_START), fView));\n choice.addItem(new ChangeAttributeCommand(\"at End\", \"ArrowMode\", new Integer(PolyLineFigure.ARROW_TIP_END), fView));\n choice.addItem(new ChangeAttributeCommand(\"at Both\", \"ArrowMode\", new Integer(PolyLineFigure.ARROW_TIP_BOTH), fView));\n panel.add(fArrowChoice);\n\n panel.add(new Label(\"Font\"));\n fFontChoice = createFontChoice();\n panel.add(fFontChoice);\n }",
"public void presetABCDEF() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n pollOptions.add(\"D\");\n pollOptions.add(\"E\");\n pollOptions.add(\"F\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }",
"void setupRender() {\n List<Predmet> predmets = adminService.findAllPredmetsForPredavac(predavac);\n // create a SelectModel from my izlistaj of colors\n predmetSelectModel = selectModelFactory.create(predmets, \"name\");\n years = adminService.getYears();\n// List<Aktivnost> activities = adminService.getActivities(1, 2015);\n }",
"private String create_amplicon_variant_38columns() {\n String outputVariant;\n outputVariant = join(delimiter,\n sample,\n gene,\n chr,\n startPosition,\n endPosition,\n refAllele,\n varAllele,\n\n totalCoverage,\n variantCoverage,\n referenceForwardCount,\n referenceReverseCount,\n variantForwardCount,\n variantReverseCount,\n genotype,\n frequency == 0 ? 0 : new DecimalFormat(\"0.0000\").format(frequency),\n bias,\n pmean == 0 ? 0 : new DecimalFormat(\"0.0\").format(pmean),\n pstd,\n qual == 0 ? 0 : new DecimalFormat(\"0.0\").format(qual),\n qstd,\n mapq == 0 ? 0 : new DecimalFormat(\"0.0\").format(mapq),\n qratio == 0 ? 0 : new DecimalFormat(\"0.000\").format(qratio),\n hifreq == 0 ? 0 : new DecimalFormat(\"0.0000\").format(hifreq),\n extrafreq == 0 ? 0 : new DecimalFormat(\"0.0000\").format(extrafreq),\n\n shift3,\n msi == 0 ? 0 : new DecimalFormat(\"0.000\").format(msi),\n msint,\n nm > 0 ? new DecimalFormat(\"0.0\").format(nm) : 0,\n hicnt,\n hicov,\n leftSequence, rightSequence,\n region,\n varType,\n goodVariantsCount,\n totalVariantsCount,\n noCoverage,\n ampliconFlag\n );\n return outputVariant;\n }",
"public static void showAgendaOptions() {\n System.out.println(new StringJoiner(\"\\n\")\n .add(\"*************************\")\n .add(\"1- View all scheduled RDVs\")\n .add(\"2- Add a new RDV\")\n .add(\"3- Show all RDVs between 2 dates (sorted).\")\n .add(\"4- Show all RDVs of a certain participant between 2 dates.\")\n .add(\"5- Remove an RDV\")\n .add(\"6- Return to the previous menu.\")\n .add(\"*************************\")\n );\n }",
"public void generateMenu () \n {\n mCoffeeList = mbdb.getCoffeeMenu();\n for(int i =0;i<mCoffeeList.size();i++){\n coffeeTypeCombo.addItem(mCoffeeList.get(i).toString());\n }\n mWaffleList = mbdb.getWaffleMenu();\n for(int j =0;j<mWaffleList.size();j++){\n waffleTypeCombo.addItem(mWaffleList.get(j).toString());\n }\n }",
"public final void mo2800a(fzm fzm) {\n synchronized (this.f20399d) {\n if (this.f20408n != go.aD) {\n return;\n }\n fzo fzo = fzm.f4856a;\n View view = (View) this.f20399d.f4840b.get(fzo);\n if (view == null) {\n return;\n }\n for (fzs a : this.f20407m) {\n a.mo1436a(fzo);\n }\n if (fzm.f4858c.isEmpty()) {\n return;\n }\n fzp fzp = (fzp) this.f20404j.get(fzm);\n if (fzp == null) {\n String str = f20395i;\n String valueOf = String.valueOf(fzo);\n StringBuilder stringBuilder = new StringBuilder(String.valueOf(valueOf).length() + 52);\n stringBuilder.append(\"Category \");\n stringBuilder.append(valueOf);\n stringBuilder.append(\" does not have a selected option available.\");\n bli.m863a(str, stringBuilder.toString());\n return;\n }\n String str2 = f20395i;\n String valueOf2 = String.valueOf(fzo);\n StringBuilder stringBuilder2 = new StringBuilder(String.valueOf(valueOf2).length() + 32);\n stringBuilder2.append(\"Expanding options for category: \");\n stringBuilder2.append(valueOf2);\n bli.m863a(str2, stringBuilder2.toString());\n View fzw = new fzw(getContext(), fzm.f4858c, fzp, new gbk(this, fzm));\n LinearLayout[] linearLayoutArr = new LinearLayout[]{fzw};\n hii.m3172a(hir.PORTRAIT, this.f20405k.f6228a, linearLayoutArr);\n addView(fzw, new FrameLayout.LayoutParams(-1, -1));\n fzw.setAlpha(0.0f);\n this.f20408n = go.aE;\n fzz fzz = this.f20406l;\n Animator a2 = fzz.m2441a((View) jqk.m13102c(fzw));\n Animator animator = fzz.f4939c;\n View ironView = fzz.f4941e.getIronView();\n if (ironView != null) {\n animator = new AnimatorSet();\n animator.play(fzz.f4939c).with(fzz.m2443b(ironView));\n }\n Animator animatorSet = new AnimatorSet();\n animatorSet.play(animator).before(a2).with(fzz.m2446b(view, true)).with(fzz.m2445a(view, true));\n fzz = this.f20406l;\n a2 = fzz.m2443b((View) jqk.m13102c(fzw));\n animator = fzz.f4940d;\n View ironView2 = fzz.f4941e.getIronView();\n if (ironView2 != null) {\n animator = new AnimatorSet();\n animator.play(fzz.f4940d).with(fzz.m2441a(ironView2));\n }\n Animator animatorSet2 = new AnimatorSet();\n animatorSet2.play(a2).before(animator).with(fzz.m2446b(view, false)).with(fzz.m2445a(view, false));\n this.f20401f = animatorSet2;\n animatorSet.addListener(new gbo(this));\n animatorSet.start();\n this.f20400e = fzw;\n for (gbj gbj : this.f20397b) {\n switch (fzo.ordinal()) {\n case 2:\n hgo hgo = gbj.f5022a;\n if (!(hgo.f17820e || ((Boolean) hgo.f17821f.mo2860b()).booleanValue())) {\n gbj.f5022a.f17826k.m10933a(gbj.f5022a.f17816a.getResources().getString(R.string.raw_output_tutorial_title), gbj.f5022a.f17816a.getResources().getString(R.string.raw_output_tutorial_body), new hhg(gbj));\n break;\n }\n case 5:\n if (gbj.f5022a.f17818c.mo2084b() && !gbj.f5022a.m11817d()) {\n gbj.f5022a.f17826k.m10933a(gbj.f5022a.f17816a.getResources().getString(R.string.micro_tutorial_title), gbj.f5022a.f17816a.getResources().getString(R.string.micro_tutorial_body), new hhf(gbj));\n break;\n }\n default:\n break;\n }\n }\n }\n }",
"@FXML\n public void initialize(){\n floorSelect.getItems().addAll(\"All\", \"4\", \"3\", \"2\", \"1\", \"G\", \"L1\", \"L2\");\n }",
"private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown9() {\n return build_f_ListDropDown9();\n }",
"public void makeDropDowns() {\n\t\tString[] hoursArray = new String[24];\n\t\tObservableList<Object> hours = FXCollections.observableArrayList();\n\t\tfor (int i = 0; i < hoursArray.length; i++) {\n\t\t\thoursArray[i] = i + \"\";\n\t\t\t\n\t\t\t//Formats the hours to always have two digits\n\t\t\tif (i < 10)\n\t\t\t\thoursArray[i] = \"0\" + i;\n\t\t\t\n\t\t\thours.add(hoursArray[i]);\n\t\t}\n\t\thourDropDown.setItems(hours);\n\n\t\t// Make the minuteDropDown box\n\t\tString[] minutesArray = new String[12];\n\t\tObservableList<Object> minutes = FXCollections.observableArrayList();\n\t\tfor (int i = 0; i < minutesArray.length; i++) {\n\t\t\tminutesArray[i] = i * 5 + \"\";\n\t\t\t\n\t\t\t//Formats the minutes to always have two digits\n\t\t\tif ((i * 5) < 10)\n\t\t\t\tminutesArray[i] = \"0\" + minutesArray[i];\n\t\t\t\n\t\t\tminutes.add(minutesArray[i]);\n\t\t}\n\t\tminuteDropDown.setItems(minutes);\n\t}",
"public void presetABCDE() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n pollOptions.add(\"D\");\n pollOptions.add(\"E\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }",
"public void editarArtista() {\n\t\tArrayList<String> listString = new ArrayList<>();\r\n\t\tArrayList<ArtistaMdl> listArtista = new ArrayList<>();\r\n\t\tString[] possibilities = pAController.getArtista();\r\n\t\tfor (String s : possibilities) {\r\n\t\t\tString text = s.replaceAll(\".*:\", \"\");\r\n\t\t\tlistString.add(text);\r\n\t\t\tif (s.contains(\"---\")) {\r\n\t\t\t\tArtistaMdl artista = new ArtistaMdl();\r\n\t\t\t\tartista.setNome(listString.get(1));\r\n\t\t\t\tlistArtista.add(artista);\r\n\t\t\t\tlistString.clear();\r\n\t\t\t}\r\n\t\t}\r\n\t\tString[] possibilities2 = new String[listArtista.size()];\r\n\t\tfor (int i = 0; i < listArtista.size(); i++) {\r\n\t\t\tpossibilities2[i] = listArtista.get(i).getNome();\r\n\t\t}\r\n\t}",
"@Override\n public void buildArma() {\n this.personaje.setArma(new Arma(\"Lanza\", 'A', 9));\n }",
"public static void showPreviousOptions() {\r\n\t\tGameOptions.bagValue.select(Main.bagValue);\r\n\t\tGameOptions.nilValueTextField.setText(Main.nilValue);\r\n\t\tGameOptions.doubleNilValueTextField.setText(Main.doubleNilValue);\r\n\t\tGameOptions.winScoreTextField.setText(Main.winScore);\r\n\t\tGameOptions.loseScoreTextField.setText(Main.loseScore);\r\n\t}",
"public void presetABC() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }",
"public void presetABCD() {\n pollOptions.clear();\n pollOptions.add(\"A\");\n pollOptions.add(\"B\");\n pollOptions.add(\"C\");\n pollOptions.add(\"D\");\n CreatePollLogic.reDrawOptionList(optionContainer, pollOptions, optionArea);\n }",
"private void fixMenus() {\n\t\tfixFileOption();\n\t\tfixDelayOption();\n\t\tfixFormatOption();\n\t\tfixHelpOption();\n\t\t\n\t}",
"public Option[] SetBreedDropDownData(){\n List<BreedDTO> instDTOList = this.getgermplasm$SementalSessionBean().getGermplasmFacadeRemote().getAllBreeds();\n ArrayList<Option> allOptions = new ArrayList<Option>();\n Option[] allOptionsInArray;\n Option option;\n //Crear opcion titulo\n option = new Option(null,\" -- \"+BundleHelper.getDefaultBundleValue(\"drop_down_default\",getMyLocale())+\" --\");\n allOptions.add(option);\n //Crear todas las opciones del drop down\n for(BreedDTO instDTO : instDTOList){\n option = new Option(instDTO.getBreedId(), instDTO.getName().trim());\n allOptions.add(option);\n }\n //Sets the elements in the SingleSelectedOptionList Object\n allOptionsInArray = new Option[allOptions.size()];\n return allOptions.toArray(allOptionsInArray);\n }",
"public void fillPLComboBox(){\n\t\tmonths.add(\"Select\");\n\t\tmonths.add(\"Current Month\");\n\t\tmonths.add(\"Last Month\");\n\t\tmonths.add(\"Last 3 Months\");\n\t\tmonths.add(\"View All\");\n\t}",
"private void prefil_demo_values() {\n //Dont forget to look at \"Controller.connect()\" method\n //\n MY_SQL = false;\n DATE_FORMAT = \"yy/MM/dd\";\n String quality = \"1702860-ST110\";\n jComboBoxQuality.addItem(quality);\n jComboBoxQuality.setSelectedItem(quality);\n String testCode = \"10194\";\n jComboBoxTestCode.addItem(testCode);\n jComboBoxTestCode.setSelectedItem(testCode);\n //\n String testName = \"ML\";\n jComboBoxTestName.addItem(testName);\n jComboBoxTestName.setSelectedItem(testName);\n //\n }",
"private void drawOptions() {\n RadioGroup rgpOptions = (RadioGroup) findViewById(R.id.rgpOptions);\n rgpOptions.removeAllViews();\n int lastId = 0;\n for (int i = 0; i < criteriaList.get(currentCriteria).getOptionList().size(); i++) {\n RadioButton rdbtn = new RadioButton(this);\n lastId = i;\n rdbtn.setId(i);\n rdbtn.setText(criteriaList.get(currentCriteria).getOptionList().get(i).getDescription());\n rdbtn.setAllCaps(true);\n rdbtn.setTextSize(18);\n rgpOptions.addView(rdbtn);\n }\n RadioButton rdbtn = new RadioButton(this);\n rdbtn.setId(lastId + 1);\n rdbtn.setText(\"No lo se\");\n rdbtn.setAllCaps(true);\n rdbtn.setTextSize(18);\n rgpOptions.addView(rdbtn);\n rgpOptions.check(rdbtn.getId());\n }",
"public void editOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Modify Actors |\");\n System.out.println(\"\\t\\t| [2] Modify Rating |\");\n System.out.println(\"\\t\\t| [3] Modify Actors & Rating |\");\n System.out.println(\"\\t\\t| [4] Back To Menu |\");\n System.out.println(\"\\t\\t===================================\");\n System.out.print(\"\\t\\t Input the option number : \");\n }",
"@FXML\n void selectType() {\n \t//hide all errors\n \thideErrors();\n \t//get countries from /type/metadata.txt\n \t//Reset range string\n T3_startYear_ComboBox.setValue(\"\");\n T3_endYear_ComboBox.setValue(\"\");\n //update country list\n String type = T3_type_ComboBox.getValue(); // getting type\n countries.clear();\n for (String country: DatasetHandler.getCountries(type)){\n countries.add(country);\n }\n T3_country_ComboBox.setValue(\"\");\n //clearing the StartYear and EndYear values and lists\n }",
"public void flavorChosen()\n {\n changeSubtotalTextField();\n }",
"private void populateFullname() {\n dataBaseHelper = new DataBaseHelper(this);\n List<String> lables = dataBaseHelper.getFN();\n ArrayAdapter<String> dataAdapter = new ArrayAdapter<String>(this,\n android.R.layout.simple_spinner_item, lables);\n dataAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n fullname.setAdapter(dataAdapter);\n\n }",
"private void popupModify2te() {\n\t\tRolle rolle = (Rolle) this;\n\t\taufzugschacht.mainFrameShowOptionsFrame(rolle.getRolle2teUmschlingung(), true);\n\t}",
"public void updateDropDownList(String newName) {\r\n selectDatasetList.clear();\r\n selectDatasetList.addItem(\"Select Dataset\");\r\n selectSubDatasetList.clear();\r\n\r\n selectSubDatasetList.addItem(\"Select Sub-Dataset\");\r\n selectSubDatasetList.setVisible(false);\r\n getDatasetsList(newName);//get available dataset names\r\n SelectionManager.Busy_Task(false, true);\r\n }",
"@Override\n public void onItemSelected(AdapterView<?> parentView, View selectedItemView, int position, long id) {\n spnDistrict.setAdapter(C.getArrayAdapter(\"select ZIlLAID||'-'||ZILLANAMEENG DistName from Zilla where DIVID='\" + Global.Left(spnDiv.getSelectedItem().toString(), 2) + \"'\"));// Global.Left(spnDiv.getSelectedItem().toString(),2)\n spnDistrict.setSelection(DivzillaSelect(\"zilla\"));\n\n\n }",
"private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown55() {\n return build_f_ListDropDown55();\n }",
"private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu11() {\n return build_f_DropDownMenu11();\n }",
"void diagramSelection(DynamicTable table, String line, int product) {\n\n float longDif = longitudeMaxO - longitudeMinO;\n float latDif = latitudeMaxO - latitudeMinO;\n\n if (longDif > latDif){\n areaDifference = longDif;\n } else {\n areaDifference = latDif;\n }\n areaDifference = ec.ceiling(areaDifference,0);\n\n //................FLOOR VALUE - ........................\n float latitudeMin = ec.floor(latitudeMinO,0);\n float longitudeMin = ec.floor(longitudeMinO,0);\n\n //................CEILING ......................\n float latitudeMax = ec.ceiling(latitudeMaxO,0);\n float longitudeMax = ec.ceiling(longitudeMaxO,0);\n\n // ....... Initialize the value of the areadifference ARRAY[] .............\n for (int tf = 0; tf < sc.MAX1; tf++) {\n if ((tf+1) == areaDifference) {\n trueFalse[tf] = \"true\";\n } else {\n trueFalse[tf] = \"\";\n } // if (tf == areaDifference)\n } // for int tf\n\n //................CREATE SELECT BOXES.................\n Select tableSelect = new Select(sc.TABLESIZE +\n \"\\\" onChange=\\\"updateMenus(this); updatePTable(this); \" +\n \"writeIt(plongitudewest.value,platitudenorth.value,ptable.value)\");\n tableSelect.addOption(new Option(\" \" +\n \" \" +\n \" \" +\n \" \"));\n tableSelect.addOption(new Option(\"\"));\n tableSelect.addOption(new Option(\"\"));\n\n Select blockSelect = new Select(sc.BLOCKSIZE);\n blockSelect.addOption(new Option(\" \" +\n \" \" +\n \" \" +\n \" \"));\n blockSelect.addOption(new Option(\"\"));\n blockSelect.addOption(new Option(\"\"));\n if (dbg) System.out.println(\"blocksize <br>\");\n\n //................IF STATEMENT for DIAGRAM................\n\n if ( (product == INVEN) || (product == MEANS) ) { // inventories, means\n\n //................DIAGRAM:................\n String latNJavaScript = \"\\\" onChange=\\\"writeIt(\" + sc.LONGITUDEWEST +\n \".value,\" + sc.LATITUDENORTH + \".value,ptable.value);\\\"\\n\";\n String latSJavaScript = \"\\\" onFocus=\\\"this.blur()\";\n String lonWJavaScript = \"\\\" onChange=\\\"writeIt(\" + sc.LONGITUDEWEST +\n \".value,\" + sc.LATITUDENORTH + \".value,ptable.value);\\\"\\n\";\n String lonEJavaScript = \"\\\" onFocus=\\\"this.blur()\";\n\n table.addRow(ec.latlonRangeInput(\n \"Select Top right Corner\",\n 6,\n new Float (latitudeMin).toString(),\n new Float (latitudeMax).toString(),\n new Float (longitudeMin).toString(),\n new Float (longitudeMax).toString(),\n \"<b><font color=green>N</font></b>\", \"<b>S</b>\",\n \"<b><font color=green>W</font></b>\", \"<b>E</b>\",\n latNJavaScript, latSJavaScript,\n latNJavaScript, latSJavaScript,\n \"\"));\n //BREAKS\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n //TABLE SIZE input box\n //TextField txt2 = new TextField(sc.TABLESIZE, 10, 10, \"\");\n table.addRow(ec.cr2ColRow(\n \" \" +\n \" \" +\n chFSize(\"Table Size:<br><i>(degrees square)</i>\",\"-1\"),\n tableSelect.toHTML()));\n\n //BLOCK SIZE Size input box\n //txt2 = new TextField(sc.BLOCKSIZE, 10, 10, \"\");\n table.addRow(ec.cr2ColRow(\n \" \" +\n \" \" +\n chFSize(\"Block Size: <br><i>(minutes square)</i>\",\"-1\"),\n blockSelect.toHTML()));\n //BREAKS\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n if (dbg) System.out.println(\"blockSelect = \" + blockSelect + \"<br>\");\n\n } else { // ROSES, HISTO, SCATT, TIMES\n\n //................DIAGRAM:................\n table.addRow(ec.latlonRangeInput(\n \"Enter Range Selection\",\n 6,\n new Float (latitudeMin).toString(),\n new Float (latitudeMax).toString(),\n new Float (longitudeMin).toString(),\n new Float (longitudeMax).toString(),\n \"<b><font color=green>N</font></b>\",\n \"<b><font color=green>S</font></b>\",\n \"<b><font color=green>W</font></b>\",\n \"<b><font color=green>E</font></b>\",\n \"\", \"\", \"\", \"\", \"\"));\n table.addRow(ec.crSpanColsRow(\"<br>\",2));\n\n } // if ((product == 1) ...\n }",
"public String getName()\r\n {\n return \"arctan2\";\r\n }",
"private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown44() {\n return build_f_ListDropDown44();\n }",
"public void populateQualityCombo() {\n\n // Making a list of poster qualities\n List<KeyValuePair> qualityList = new ArrayList<KeyValuePair>() {{\n\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w92, \"Thumbnail\\t[ 92x138 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w154, \"Tiny\\t\\t\\t[ 154x231 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w185, \"Small\\t\\t[ 185x278 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w342, \"Medium\\t\\t[ 342x513 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w500, \"Large\\t\\t[ 500x750 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_w780, \"xLarge\\t\\t[ 780x1170 ]\"));\n add(new KeyValuePair(Constants.MEDIA_QUALITY_original, \"xxLarge\\t\\t[ HD ]\"));\n }};\n\n // Converting the list to an observable list\n ObservableList<KeyValuePair> obList = FXCollections.observableList(qualityList);\n\n // Filling the ComboBox\n cbPosterQuality.setItems(obList);\n\n // Setting the default value for the ComboBox\n cbPosterQuality.getSelectionModel().select(preferences.getInt(\"mediaQuality\", 3));\n }",
"private String create_amplicon_variant_40columns() {\n String outputVariant;\n String hifreq_f = hifreq == 0\n ? \"0\"\n : new DecimalFormat(\"0.0000\").format(hifreq);\n nm = nm > 0 ? nm : 0;\n String nm_f = nm == 0\n ? \"0\"\n : new DecimalFormat(\"0.0\").format(nm);\n\n outputVariant = join(delimiter,\n sample,\n gene,\n chr,\n startPosition,\n endPosition,\n refAllele,\n varAllele,\n\n totalCoverage,\n variantCoverage,\n referenceForwardCount,\n referenceReverseCount,\n variantForwardCount,\n variantReverseCount,\n genotype,\n getRoundedValueToPrint(\"0.0000\", frequency),\n bias,\n getRoundedValueToPrint(\"0.0\", pmean),\n pstd,\n getRoundedValueToPrint(\"0.0\", qual),\n qstd,\n\n getRoundedValueToPrint(\"0.00000\", pvalue),\n oddratio,\n\n getRoundedValueToPrint(\"0.0\", mapq),\n getRoundedValueToPrint(\"0.000\", qratio),\n hifreq_f,\n getRoundedValueToPrint(\"0.0000\", extrafreq),\n\n shift3,\n getRoundedValueToPrint(\"0.000\", msi),\n msint,\n nm_f,\n hicnt,\n hicov,\n leftSequence, rightSequence,\n region,\n varType,\n goodVariantsCount,\n totalVariantsCount,\n noCoverage,\n ampliconFlag\n );\n return outputVariant;\n }",
"public TDropListItem getSwitcherFac();",
"public void remplireListeOptions(){\r\n bddOptions.add(\"id\");\r\n bddOptions.add(\"EnvoieMail\");\r\n bddOptions.add(\"MailPeriode\");\r\n bddOptions.add(\"PeriodeJour\");\r\n bddOptions.add(\"PeriodeHeure\");\r\n bddOptions.add(\"PeriodeLun\");\r\n bddOptions.add(\"PeriodeMar\");\r\n bddOptions.add(\"PeriodeMerc\");\r\n bddOptions.add(\"PeriodeJeu\");\r\n bddOptions.add(\"PeriodeVen\");\r\n bddOptions.add(\"PeriodeSam\");\r\n bddOptions.add(\"PeriodeDim\");\r\n }",
"private void setUpLgaSpinner(List<String> lgas) {\n\n ArrayAdapter lgaAdapter = new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, lgas);\n lgaAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n lgaAdapter.notifyDataSetChanged();\n mLgaSpinner.setAdapter(lgaAdapter);\n\n mLgaSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long l) {\n mLga = (String) parent.getItemAtPosition(position);\n// Toast.makeText(ProductsActivity.this, \"state: \" + mState + \" lga: \" + mLga, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n }\n });\n }",
"public static void initalize(){\n //Add all of the commands here by name and id\n autonomousChooser.addDefault(\"Base Line\", 0);\n // addOption(String name, int object)\n\n SmartDashboard.putData(\"Auto mode\", autonomousChooser);\n }",
"private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown53() {\n return build_f_ListDropDown53();\n }",
"public void init() {\n addStringOption(\"extractionId\", \"Extraction ID\", \"\");\n addStringOption(WORKFLOW_ID, \"Workflow ID\", \"\");\n addEditableComboBoxOption(LIMSConnection.WORKFLOW_LOCUS_FIELD.getCode(), \"Locus\", \"None\", SAMPLE_LOCI);\n addDateOption(\"date\", \"Date\", new Date());\n\n\n addComboBoxOption(RUN_STATUS, \"Reaction state\", STATUS_VALUES, STATUS_VALUES[0]);\n\n addLabel(\"\");\n addPrimerSelectionOption(PRIMER_OPTION_ID, \"Forward Primer\", DocumentSelectionOption.FolderOrDocuments.EMPTY, false, Collections.<AnnotatedPluginDocument>emptyList());\n addPrimerSelectionOption(PRIMER_REVERSE_OPTION_ID, \"Reverse Primer\", DocumentSelectionOption.FolderOrDocuments.EMPTY, false, Collections.<AnnotatedPluginDocument>emptyList());\n addPrimersButton = addButtonOption(ADD_PRIMER_TO_LOCAL_ID, \"\", \"Add primers to my local database\");\n\n\n List<OptionValue> cocktails = getCocktails();\n\n cocktailOption = addComboBoxOption(COCKTAIL_OPTION_ID, \"Reaction Cocktail\", cocktails, cocktails.get(0));\n\n updateCocktailOption(cocktailOption);\n\n cocktailButton = new ButtonOption(COCKTAIL_BUTTON_ID, \"\", \"Edit Cocktails\");\n cocktailButton.setSpanningComponent(true);\n addCustomOption(cocktailButton);\n Options.OptionValue[] cleanupValues = new OptionValue[] {new OptionValue(\"true\", \"Yes\"), new OptionValue(\"false\", \"No\")};\n ComboBoxOption cleanupOption = addComboBoxOption(\"cleanupPerformed\", \"Cleanup performed\", cleanupValues, cleanupValues[1]);\n StringOption cleanupMethodOption = addStringOption(\"cleanupMethod\", \"Cleanup method\", \"\");\n cleanupMethodOption.setDisabledValue(\"\");\n addStringOption(\"technician\", \"Technician\", \"\", \"May be blank\");\n cleanupOption.addDependent(cleanupMethodOption, cleanupValues[0]);\n TextAreaOption notes = new TextAreaOption(\"notes\", \"Notes\", \"\");\n addCustomOption(notes);\n\n labelOption = new LabelOption(LABEL_OPTION_ID, \"Total Volume of Reaction: 0uL\");\n addCustomOption(labelOption);\n }",
"private String getOptionsString()\r\n\t{\r\n\t\tString options = \"\";\r\n\t\t\r\n\t\tfor (JRadioButton button : buttons)\r\n\t\t{\r\n\t\t\toptions += (StringEscaper.escape(button.getText()) + \";\" + button.isSelected() + \".\");\r\n\t\t}\r\n\t\t\r\n\t\toptions = options.substring(0, options.length() - 1); // Trim off the trailing ,\r\n\t\t\r\n\t\treturn options;\r\n\t}",
"void setTvAttrib() {\r\n obj1.brandname = \"PANASONIC\"; //setting brandname for obj1\r\n obj1.size = 65; //setting size for obj1\r\n vendor.add(obj1); //adding to arraylist vendor\r\n\r\n obj2.brandname = \"KELVIN\"; //setting brandname for obj2\r\n obj2.size = 51; //setting size for obj2\r\n vendor.add(obj2); //adding to arraylist vendor\r\n\r\n obj3.brandname = \"SONY\"; //setting size for obj2\r\n obj3.size = 42; //setting size for obj2\r\n vendor.add(obj3); //adding to arraylist vendor\r\n\r\n }",
"@FXML\n void selectCountry() {\n \t//hide all errors\n \thideErrors();\n \t//Getting start year and end year limits from /type/country/metadata.txt\n if (isComboBoxEmpty(T3_country_ComboBox.getValue())){\n //if nothing has been selected do nothing\n return;\n }\n String type = T3_type_ComboBox.getValue(); // getting type\n String country = T3_country_ComboBox.getValue(); // getting country\n //update ranges\n Pair<String,String> validRange = DatasetHandler.getValidRange(type,country);\n\n //update relevant menus\n\n int start = Integer.parseInt(validRange.getKey());\n int end = Integer.parseInt(validRange.getValue());\n //set up end list\n endOptions.clear();\n startOptions.clear();\n for (int i = start; i <= end ; ++i){\n endOptions.add(Integer.toString(i));\n startOptions.add(Integer.toString(i));\n }\n //set up comboBox default values and valid lists\n T3_startYear_ComboBox.setValue(Integer.toString(start));\n T3_endYear_ComboBox.setValue(Integer.toString(end));\n }",
"public void Loadata(){ // fill the choice box\n stats.removeAll(stats);\n String seller = \"Seller\";\n String customer = \"Customer\";\n stats.addAll(seller,customer);\n Status.getItems().addAll(stats);\n }",
"private void carregaComboUfs() {\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Inhumas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goianira\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"GO\", \"Goiânia\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"Campinas\"));\n\t\tlistaDeMunicipios.add(new Municipio(\"SP\", \"São José dos Campos\"));\n\t\t\n\t\t\n\t\tfor (Municipio municipio : listaDeMunicipios) {\n\t\t\tif(!listaDeUfs.contains(municipio.getUf())) {\n\t\t\t\tlistaDeUfs.add(municipio.getUf());\n\t\t\t}\n\t\t}\n\t\t\n\t\tcmbUfs.addItem(\"--\");\n\t\tfor (String uf : listaDeUfs) {\n\t\t\tcmbUfs.addItem(uf);\n\t\t}\n\t}",
"private void fillComboBox() {\n List<String> times = this.resultSimulation.getTimes();\n this.timesComboBox.getItems().addAll(times);\n this.timesComboBox.getSelectionModel().select(0);\n }",
"public void escolherequipa ()\n {\n if (idec != -1 && idev !=-1 && idec != idev)\n {\n ArrayList<String> equipaanotar = new ArrayList<String>();\n equipaanotar.add(nomeequipas.get(idec));\n equipaanotar.add(nomeequipas.get(idev));\n ddes.setAdapter(new ArrayAdapter<String>(this, android.R.layout.simple_spinner_dropdown_item, equipaanotar));\n }\n }",
"private void fillAdjective1a()\n {\n adjective1a.add(\"Epic\");\n adjective1a.add(\"Brilliant\");\n adjective1a.add(\"Mighty\");\n adjective1a.add(\"Great\");\n adjective1a.add(\"Wonderful\");\n adjective1a.add(\"Crazy\");\n adjective1a.add(\"Sparkling\");\n adjective1a.add(\"Shiny\");\n adjective1a.add(\"Lustful\");\n adjective1a.add(\"Precious\");\n\n }",
"public void dropdown(HttpServletRequest request, HttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> Entering... \");\n \n \t\t// Prepopulate all dropdown fields, set the global Constants to the\n \t\t// following\n \n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.SEXDISTRIBUTIONDROP,\n \t\t\t\tConstants.Dropdowns.ADD_BLANK);\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.AGEUNITSDROP, \"\");\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.VIRUSDROP, Constants.Dropdowns.ADD_BLANK);\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.VIRALTREATUNITSDROP, \"\");\n \t\tNewDropdownUtil.populateDropdown(request, Constants.Dropdowns.ADMINISTRATIVEROUTEDROP,\n \t\t\t\tConstants.Dropdowns.ADD_BLANK);\n \t}",
"public String getName()\r\n {\n return \"arctan\";\r\n }",
"private void initOptionsMenu() {\n final Function<Float, Void> changeAlpha = new Function<Float, Void>() {\n @Override\n public Void apply(Float input) {\n skyAlpha = Math.round(input);\n return null;\n }\n };\n\n final Function<Float, Void> changeMaxConfidence = new Function<Float, Void>() {\n @Override\n public Void apply(Float input) {\n options.confidenceThreshold = input;\n return null;\n }\n };\n\n bottomSheet = findViewById(R.id.option_menu);\n bottomSheet.setVisibility(View.VISIBLE);\n bottomSheet\n .withSlider(\"Alpha\", ALPHA_MAX, skyAlpha, changeAlpha, 1f)\n .withSlider(\"Confidence Threshold\", 1, options.confidenceThreshold, changeMaxConfidence);\n }",
"private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown66() {\n return build_f_ListDropDown66();\n }",
"private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu55() {\n return build_f_DropDownMenu55();\n }",
"void populateProductLineTabs() {\n ArrayList<ItemType> typeNames = new ArrayList<ItemType>();\n\n for (ItemType typeValue : ItemType.values()) {\n typeNames.add(typeValue);\n }\n System.out.println(\"type array size = \" + typeNames.size());\n\n for (int i = 0; i < typeNames.size(); i++) {\n choiceType.getItems().add(i, typeNames.get(i));\n }\n choiceType.getSelectionModel().selectFirst();\n }",
"@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetSupportMenuInflater().inflate(R.menu.activity_display_selected_scripture,\n \t\t\t\tmenu);\n \t\treturn true;\n \t}",
"private void setupChangeVoice() {\n\t\tFestivalVoice[] voices={FestivalVoice.Kiwi, FestivalVoice.British, FestivalVoice.American};\n\t\tfinal JComboBox voice_chooser = new JComboBox(voices);\n\t\tvoice_chooser.setFont(new Font(\"Arial\", Font.PLAIN, 20));\n\t\tvoice_chooser.setForeground(Color.BLACK);\n\t\tvoice_chooser.setBackground(Color.WHITE);\n\n\t\t//set shown item to be the current voice\n\t\tvoice_chooser.setSelectedItem(parent_frame.getFestival().getFestivalVoice());\n\t\tvoice_chooser.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\tif((FestivalVoice)voice_chooser.getSelectedItem()!=null){\n\t\t\t\t\tparent_frame.getFestival().setFestivalVoice((FestivalVoice)voice_chooser.getSelectedItem());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tvoice_chooser.setBounds(919, 600, 154, 40);\n\t\tadd(voice_chooser);\n\t}",
"protected JMenuBar createDropDownMenu()\r\n {\r\n\r\n // Setup menu Items String values that are shared\r\n setSharedMenuItemStrings();\r\n // Make a new Action Trigger, as it is generic and used in many places.\r\n ActionTrigger actionTrigger = new ActionTrigger();\r\n // Add\tall the Horizontal elements\r\n JMenuBar result = new JMenuBar();\r\n\r\n // to the button group - Set the Fraction Decimal Visible as being\r\n // selected below.\r\n com.hgutil.data.Fraction.setShowAsFraction(false);\r\n\r\n // Create two individual check button menu items, and add\r\n ButtonGroup fractionGroup = new ButtonGroup();\r\n HGMenuItem fractionCheck =\r\n new HGMenuItem(\r\n HGMenuListItem.JCHECKBOXMNUITEM,\r\n getString(\"WatchListTableModule.edit_menu.fractions_on_text\"),\r\n fractionCmd,\r\n null,\r\n KeyEvent.VK_F,\r\n InputEvent.CTRL_MASK,\r\n fractionGroup,\r\n false);\r\n HGMenuItem decimalCheck =\r\n new HGMenuItem(\r\n HGMenuListItem.JCHECKBOXMNUITEM,\r\n getString(\"WatchListTableModule.edit_menu.decimals_on_text\"),\r\n decimalCmd,\r\n null,\r\n KeyEvent.VK_D,\r\n InputEvent.CTRL_MASK,\r\n fractionGroup,\r\n true);\r\n JMenu viewColumnNumbers =\r\n HGMenuItem.makeMenu(\r\n getString(\"WatchListTableModule.edit_menu.view_columns_fields_as\"),\r\n 'C',\r\n new Object[] { fractionCheck, decimalCheck },\r\n actionTrigger);\r\n\r\n // Lets build a Menu List of Columns that we can either \r\n // view or not view\r\n // Build Check Boxes, for all Items, except the Symbol Column\r\n HGMenuItem[] columnsChecks = new HGMenuItem[StockData.columns.length];\r\n for (int k = 1; k < StockData.columns.length; k++)\r\n {\r\n columnsChecks[k] =\r\n new HGMenuItem(\r\n HGMenuListItem.JCHECKBOXMNUITEM,\r\n StockData.columns[k].getTitle(),\r\n null,\r\n null,\r\n 0,\r\n 0,\r\n null,\r\n true,\r\n new ColumnKeeper(StockData.columns[k]));\r\n }\r\n\r\n // Add in the Viewing menu\r\n JMenu viewColumns =\r\n HGMenuItem.makeMenu(getString(\"WatchListTableModule.edit_menu.view_columns_text\"), 'V', columnsChecks, null);\r\n\r\n JMenu insertRows =\r\n HGMenuItem.makeMenu(\r\n getString(\"WatchListTableModule.edit_menu.view_insert_row_text\"),\r\n 'I',\r\n new Object[] { insertBeforeCmd, insertAfterCmd },\r\n actionTrigger);\r\n\r\n JMenu editMenu = null;\r\n editMenu =\r\n HGMenuItem.makeMenu(\r\n getString(\"WatchListTableModule.edit_menu.title\"),\r\n 'E',\r\n new Object[] {\r\n viewColumns,\r\n viewColumnNumbers,\r\n null,\r\n insertRows,\r\n deleteRowCmd,\r\n null,\r\n addNewWatchListCmd,\r\n deleteWatchListCmd,\r\n renameListCmd,\r\n null,\r\n printListCmd,\r\n null,\r\n tableProps },\r\n actionTrigger);\r\n\r\n // Add the Edit Menu to the result set the Alignment and return the MenuBar\r\n result.add(editMenu);\r\n result.setAlignmentX(JMenuBar.LEFT_ALIGNMENT);\r\n return result;\r\n }",
"public String getDESC_ARAB() {\r\n return DESC_ARAB;\r\n }",
"private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu22() {\n return build_f_DropDownMenu22();\n }",
"private void transformVariatesToView() {\n\n //GCP-4378 NEW SCHEMA CHANGES - indexoutofboundsexception\n if (factorsDtoTrial != null && factorsDtoTrial.size() > 0) {\n // transform Variate list to Constants\n List<Constant> constantsData = new ArrayList<Constant>();\n Integer numeroDeInstancias = factorsDtoTrial.get(0).getSizeLevels();\n for (Variate variate : variatesDtoConstants) {\n for (int i = 0; i < numeroDeInstancias; i++) {\n ibfb.domain.core.Constant constant = ConverterDTOtoDomain.getConstant(variate);\n // TODO ajustar estructura para que se recupere los datos tipo numero sin el .0\n // if(variate.getDtype().equals(\"N\")){\n // constant.setValue(DecimalUtils.getValueAsString((Double)variate.getDataObject(i)));\n // }else{\n // constant.setValue(variate.getDataObject(i));\n constant.setValue(DecimalUtils.getValueAsString(variate.getDataObject(i)));\n // }\n constant.setInstance(i + 1);\n // constant.setOunitid(variate.getOunitidObject(i));\n constant.setVariateId(variate.getVariatid());\n constant.setStudyId(variate.getStudyid());\n constants.add(constant);\n }\n }\n }\n\n Comparator<Constant> constantComparator = new Comparator<Constant>() {\n\n @Override\n public int compare(Constant o1, Constant o2) {\n return o1.getInstance().compareTo(o2.getInstance());\n }\n };\n\n Collections.sort(constants, constantComparator);\n\n // transform Variate list to Variate(from view)\n for (Variate variate : variatesDTO) {\n ibfb.domain.core.Variate variateToAdd = ConverterDTOtoDomain.getVariate(variate);\n variates.add(variateToAdd);\n }\n\n\n workbookStudy.setConstants(constants);\n workbookStudy.setConstantsData(constants);\n\n workbookStudy.setVariates(variates);\n workbookStudy.setVariatesData(variates);\n }",
"private void populateRegionFilterComboBox() {\n Collection<String> uniqueRegions = new TreeSet<>();\n for (ReceiverRecord record : records) {\n uniqueRegions.add(record.getRegion());\n }\n regionFilterComboBox.getItems().removeAll(regionFilterComboBox.getItems());\n regionFilterComboBox.getItems().add(regionString);\n regionFilterComboBox.getItems().addAll(uniqueRegions);\n regionFilterComboBox.getSelectionModel().select(0);\n }",
"private static void printSortMovieMenu() {\n\t\tprintln(\"Movie Sorting Options:\");\n\t\tprintln(\"\\tTA: Title Ascending (A-Z)\");\n\t\tprintln(\"\\tTD: Title Descending (Z-A)\");\n\t\tprintln(\"\\tYA: Year Ascending\");\n\t\tprintln(\"\\tYD: Year Descending\");\n\t}",
"private static JMenu getConvertMenu(final EnvironmentFrame frame) {\n\t\tfinal Environment environment = frame.getEnvironment();\n\t\tfinal JMenu menu = new JMenu(\"Convert\");\n\t\tfinal Serializable object = environment.getObject();\n\n\t\tfinal boolean isTuring = TuringChecker.check(object);\n\t\tif (isTuring) {\n\t\t\treturn getConvertMenu(frame, 0);\n\t\t}\n\n\t\tif (FSAAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew NFAToDFAAction((edu.duke.cs.jflap.automata.fsa.FiniteStateAutomaton) object, environment));\n\t\t}\n\t\tif (FSAAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew MinimizeTreeAction((edu.duke.cs.jflap.automata.fsa.FiniteStateAutomaton) object, environment));\n\t\t}\n\n\t\tif (ConvertFSAToGrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu, new ConvertFSAToGrammarAction(\n\t\t\t\t\t(edu.duke.cs.jflap.gui.environment.AutomatonEnvironment) environment));\n\t\t}\n\t\tif (ConvertPDAToGrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu, new ConvertPDAToGrammarAction(\n\t\t\t\t\t(edu.duke.cs.jflap.gui.environment.AutomatonEnvironment) environment));\n\t\t}\n\n\t\tif (FSAAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew ConvertFSAToREAction((edu.duke.cs.jflap.gui.environment.AutomatonEnvironment) environment));\n\t\t}\n\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu, new ConvertCFGLL((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu, new ConvertCFGLR((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew ConvertRegularGrammarToFSA((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\t\tif (GrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew GrammarTransformAction((edu.duke.cs.jflap.gui.environment.GrammarEnvironment) environment));\n\t\t}\n\n\t\tif (RegularAction.isApplicable(object)) {\n\t\t\taddItem(menu, new REToFSAAction((edu.duke.cs.jflap.gui.environment.RegularEnvironment) environment));\n\t\t}\n\n\t\tif (AutomatonAction.isApplicable(object)) {\n\t\t\taddItem(menu, new CombineAutomaton((edu.duke.cs.jflap.gui.environment.AutomatonEnvironment) environment));\n\t\t}\n\n\t\tif (TuringToUnrestrictGrammarAction.isApplicable(object)) {\n\t\t\taddItem(menu, new TuringToUnrestrictGrammarAction(\n\t\t\t\t\t(edu.duke.cs.jflap.gui.environment.AutomatonEnvironment) environment));\n\t\t}\n\n\t\tif (FSAAction.isApplicable(object)) {\n\t\t\taddItem(menu,\n\t\t\t\t\tnew AddTrapStateToDFAAction((edu.duke.cs.jflap.gui.environment.AutomatonEnvironment) environment));\n\t\t}\n\n\t\treturn menu;\n\t}",
"private void buildComboBoxes() {\n buildCountryComboBox();\n buildDivisionComboBox();\n }",
"protected void initializer() {\n\t\tselect = new DBSelect();\n\t\ttry {\n\t\t\tselect.setDriverName(\"com.ibm.as400.access.AS400JDBCDriver\");\n\t\t\tselect.setUrl(\"jdbc:as400://192.168.101.14\");\n\t\t\tselect.setCommand(\n\t\t\t\"SELECT DISTINCT artitda.codaat, articulo.descma, articulo.des1ma, articulo.des2ma, articulo.unvema, SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) as departamento, SUBSTR(VARCHAR(ARTITDA.CODAAT), 3, 2) as lineaseccion, costos.coslllca, artitda.prevat, artitda.impuat as impuesto, articulo.empvma as empaque, articulo.povema as descuentoempaque, articulo.deemma as descuentoempleado, articulo.esrema, articulo.fecama \t\t\tFROM SISTEMA.ARTICULO as articulo inner join COMPRAS.LMLCA03 as costos on (articulo.codama = costos.artillca) inner join COMPRAS.ARTITDA as artitda on (articulo.codama = artitda.codaat) \t\t\tWHERE artitda.codaat IN (SELECT articulo.codama FROM SISTEMA.ARTICULO as articulo, COMPRAS.ARTITDA as artitda \t\t\tWHERE (CAST (ARTITDA.TIENAT AS SMALLINT) = 3) AND (ARTICULO.ESREMA = 'V') AND (ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) = '90') OR (ARTITDA.CODAAT < 3500000)) and (articulo.codama = artitda.codaat) )\"); \n\t\t\t\t//\"SELECT * FROM COMPRAS.ARTITDA, SISTEMA.ARTICULO WHERE (COMPRAS.ARTITDA.CODAAT = SISTEMA.ARTICULO.CODAMA) AND (CAST (COMPRAS.ARTITDA.TIENAT AS SMALLINT) = 3) AND (SISTEMA.ARTICULO.ESREMA = 'V') AND (COMPRAS.ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(COMPRAS.ARTITDA.CODAAT), 1, 2) = '90') OR (COMPRAS.ARTITDA.CODAAT < 3500000))\");\n\t\t\t//\"SELECT count(*) FROM SISTEMA.ARTICULO as articulo inner join COMPRAS.ARTITDA as artitda on (articulo.codama = artitda.codaat) WHERE (CAST (ARTITDA.TIENAT AS SMALLINT) = 3) AND (ARTICULO.ESREMA = 'V') AND (ARTITDA.EXACAT <> 0) AND ((SUBSTR(VARCHAR(ARTITDA.CODAAT), 1, 2) = '90') OR (ARTITDA.CODAAT < 3500000))\"\t\t\t\n\t\t\t//DBParameterMetaData parmMetaData = select.getParameterMetaData();\n\t\t} catch (SQLException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}",
"@Override\n\t\t\tpublic void itemStateChanged(ItemEvent e) {\n\t\t\t\tAntennaDrawable selectedAntenna = (AntennaDrawable) jComboBox1.getSelectedItem();\n\t\t\t\tZyskField.setText(selectedAntenna.getGain());\n\t\t\t\tMinZyskField.setText(selectedAntenna.getMinGain());\n\t\t\t\tCzestotliwoscField.setText(selectedAntenna.getFrequency());\n\t\t\t\tKatField.setText(selectedAntenna.getAngle());\n\t\t\t}",
"private org.gwtbootstrap3.client.ui.DropDownMenu get_f_DropDownMenu73() {\n return build_f_DropDownMenu73();\n }",
"private void populateAltitudes()\r\n {\r\n for(int i=0; i<9; i++)\r\n {\r\n cboAltitude.addItem(aryAltitudes[i]);\r\n }\r\n }",
"private void menuArmadura(){\n System.out.println(\"Escolha o local em que queira colocar a uma armadura:\");\n System.out.println(\"1 - Cabeça\");\n System.out.println(\"2 - Tronco\");\n System.out.println(\"3 - Pernas\");\n System.out.println(\"4 - Pés\");\n System.out.println(\"0 - Sair\");\n }",
"private void RenderCombo()\r\n\t{\r\n\t\tSystem.out.println(\"Setup\");\r\n\t\tList<ProductionOrder> productionOrders = null;\r\n\t\t\t\t\r\n \ttry {\r\n \t\tproductionOrders = this.getProductionOrderService().findProductionOrders(); \r\n \t\tif(productionOrders==null)\r\n \t\t\tSystem.out.println(\"productoinOrders is null\");\r\n\t \t_productionOrderSelect = null;\r\n\t \t_productionOrderSelect = new GenericSelectModel<ProductionOrder>(productionOrders,ProductionOrder.class,\"FormattedDocNo\",\"id\",_access);\r\n\t \tif(_productionOrderSelect==null){\r\n\t \t\tSystem.out.println(\"Setuprender productionOrderselect is null\");\r\n\t \t}\r\n \t}\r\n \tcatch(Exception e)\r\n \t{\r\n \t\t\r\n \t}\r\n \tfinally {\r\n \t\t\r\n \t}\r\n\t}",
"protected void initialize() {\n \tif (temp.equalsIgnoreCase(\"RRR\")) {\n\t\t\tauto = AutoSelect.RightRightRight;\n\t\t}else if (temp.equalsIgnoreCase(\"RRL\")) {\n\t\t\tauto = AutoSelect.RightRightLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"RLR\")) {\n\t\t\tauto = AutoSelect.RightLeftRight;\n\t\t}else if (temp.equalsIgnoreCase(\"RLL\")) {\n\t\t\tauto = AutoSelect.RightLeftLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"LRR\")) {\n\t\t\tauto = AutoSelect.LeftRightRight;\n\t\t}else if (temp.equalsIgnoreCase(\"LRL\")) {\n\t\t\tauto = AutoSelect.LeftRightLeft;\n\t\t}else if (temp.equalsIgnoreCase(\"LLR\")) {\n\t\t\tauto = AutoSelect.LeftLeftRight;\n\t\t}else {\n\t\t\tauto = AutoSelect.LeftLeftLeft;\n\t\t}\n \t\n \tDriverStation.reportError(\"------------------------------------------------\", false);\n \tDriverStation.reportError(\"-------------------AutonomousMid----------------\", false);\n \tDriverStation.reportError(\"------------------\" + auto + \"--------------\", false);\n \tDriverStation.reportError(\"------------------------------------------------\", false);\n }",
"private void cargaLista() {\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Aclaracion\", \"Aclaracion\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revision\", \"Revision\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Revocatoria\", \"Revocatoria\"));\n this.getTipoApelacionSelecionada().add(new SelectItem(\"Subsidiaria\", \"Subsidiaria\"));\n \n }",
"private void updateEnumDropDowns( final DSLDropDown source ) {\n\n //Copy selections in UI to data-model, used to drive dependent drop-downs\n updateSentence();\n\n final int sourceIndex = dropDownWidgets.indexOf( source );\n for ( DSLDropDown dd : dropDownWidgets ) {\n if ( dropDownWidgets.indexOf( dd ) > sourceIndex ) {\n dd.refreshDropDownData();\n }\n }\n\n //Copy selections in UI to data-model again, as updating the drop-downs\n //can lead to some selected values being cleared when dependent drop-downs\n //are used.\n updateSentence();\n }",
"public OSDarkLAFComboBoxEditor()\r\n {\r\n super();\r\n editor.setBorder(OSDarkLAFBorders.getComboEditorBorder());\r\n }",
"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 }",
"public AVIFORS()\n {\n super();\n\n spellType = O2SpellType.AVIFORS;\n branch = O2MagicBranch.TRANSFIGURATION;\n\n flavorText = new ArrayList<String>()\n {{\n add(\"However, mastering a Transfiguration spell such as \\\"Avifors\\\" can be both rewarding and useful.\");\n }};\n\n text = \"Turns target entity in to a bird.\";\n }",
"private void populateGUI(TideParameters tideParameters) {\n\n if (tideParameters.getMinPeptideLength() != null) {\n minPepLengthTxt.setText(tideParameters.getMinPeptideLength() + \"\");\n }\n if (tideParameters.getMaxPeptideLength() != null) {\n maxPepLengthTxt.setText(tideParameters.getMaxPeptideLength() + \"\");\n }\n if (tideParameters.getMinPrecursorMass() != null) {\n minPrecursorMassTxt.setText(tideParameters.getMinPrecursorMass() + \"\");\n }\n if (tideParameters.getMaxPrecursorMass() != null) {\n maxPrecursorMassTxt.setText(tideParameters.getMaxPrecursorMass() + \"\");\n }\n if (tideParameters.getMonoisotopicPrecursor() != null) {\n if (tideParameters.getMonoisotopicPrecursor()) {\n monoPrecursorCmb.setSelectedIndex(0);\n } else {\n monoPrecursorCmb.setSelectedIndex(1);\n }\n }\n if (tideParameters.getClipNtermMethionine() != null) {\n if (tideParameters.getClipNtermMethionine()) {\n removeMethionineCmb.setSelectedIndex(0);\n } else {\n removeMethionineCmb.setSelectedIndex(1);\n }\n }\n// if (tideParameters.getMinVariableModificationsPerPeptide() != null) {\n// minPtmsPerPeptideTxt.setText(tideParameters.getMinVariableModificationsPerPeptide() + \"\");\n// }\n if (tideParameters.getMaxVariableModificationsPerPeptide() != null) {\n maxPtmsPerPeptideTxt.setText(tideParameters.getMaxVariableModificationsPerPeptide() + \"\");\n }\n if (tideParameters.getMaxVariableModificationsPerTypePerPeptide() != null) {\n maxVariablePtmsPerTypeTxt.setText(tideParameters.getMaxVariableModificationsPerTypePerPeptide() + \"\");\n }\n if (tideParameters.getDigestionType() != null) {\n enzymeTypeCmb.setSelectedItem(tideParameters.getDigestionType());\n }\n if (tideParameters.getPrintPeptides() != null) {\n if (tideParameters.getPrintPeptides()) {\n peptideListCmb.setSelectedIndex(0);\n } else {\n peptideListCmb.setSelectedIndex(1);\n }\n }\n if (tideParameters.getDecoyFormat() != null) {\n decoyFormatCombo.setSelectedItem(tideParameters.getDecoyFormat());\n }\n if (tideParameters.getKeepTerminalAminoAcids() != null) {\n keepTerminalAaCombo.setSelectedItem(tideParameters.getKeepTerminalAminoAcids());\n }\n if (tideParameters.getDecoySeed() != null) {\n decoySeedTxt.setText(tideParameters.getDecoySeed() + \"\");\n }\n if (tideParameters.getRemoveTempFolders() != null) {\n if (tideParameters.getRemoveTempFolders()) {\n removeTempFoldersCmb.setSelectedIndex(0);\n } else {\n removeTempFoldersCmb.setSelectedIndex(1);\n }\n }\n if (tideParameters.getComputeExactPValues() != null) {\n if (tideParameters.getComputeExactPValues()) {\n exactPvalueCombo.setSelectedIndex(0);\n } else {\n exactPvalueCombo.setSelectedIndex(1);\n }\n }\n if (tideParameters.getComputeSpScore() != null) {\n if (tideParameters.getComputeSpScore()) {\n spScoreCombo.setSelectedIndex(0);\n } else {\n spScoreCombo.setSelectedIndex(1);\n }\n }\n if (tideParameters.getMinSpectrumMz() != null) {\n minSpectrumMzTxt.setText(tideParameters.getMinSpectrumMz() + \"\");\n }\n if (tideParameters.getMaxSpectrumMz() != null) {\n maxSpectrumMzTxt.setText(tideParameters.getMaxSpectrumMz() + \"\");\n }\n if (tideParameters.getMinSpectrumPeaks() != null) {\n minPeaksTxt.setText(tideParameters.getMinSpectrumPeaks() + \"\");\n }\n if (tideParameters.getSpectrumCharges() != null) {\n chargesCombo.setSelectedItem(tideParameters.getSpectrumCharges());\n }\n if (tideParameters.getRemovePrecursor() != null) {\n if (tideParameters.getRemovePrecursor()) {\n removePrecursorPeakCombo.setSelectedIndex(0);\n } else {\n removePrecursorPeakCombo.setSelectedIndex(1);\n }\n }\n if (tideParameters.getRemovePrecursorTolerance() != null) {\n removePrecursorPeakToleranceTxt.setText(\"\" + tideParameters.getRemovePrecursorTolerance());\n }\n if (tideParameters.getUseFlankingPeaks() != null) {\n if (tideParameters.getUseFlankingPeaks()) {\n useFlankingCmb.setSelectedIndex(0);\n } else {\n useFlankingCmb.setSelectedIndex(1);\n }\n }\n if (tideParameters.getUseNeutralLossPeaks() != null) {\n if (tideParameters.getUseNeutralLossPeaks()) {\n useNeutralLossCmb.setSelectedIndex(0);\n } else {\n useNeutralLossCmb.setSelectedIndex(1);\n }\n }\n if (tideParameters.getMzBinWidth() != null) {\n mzBinWidthTxt.setText(\"\" + tideParameters.getMzBinWidth());\n }\n if (tideParameters.getMzBinOffset() != null) {\n mzBinOffsetTxt.setText(\"\" + tideParameters.getMzBinOffset());\n }\n if (tideParameters.getNumberOfSpectrumMatches() != null) {\n numberMatchesTxt.setText(\"\" + tideParameters.getNumberOfSpectrumMatches());\n }\n if (tideParameters.getTextOutput()) {\n outputFormatCombo.setSelectedItem(\"Text\");\n } else if (tideParameters.getSqtOutput()) {\n outputFormatCombo.setSelectedItem(\"SQT\");\n } else if (tideParameters.getPepXmlOutput()) {\n outputFormatCombo.setSelectedItem(\"pepxml\");\n } else if (tideParameters.getMzidOutput()) {\n outputFormatCombo.setSelectedItem(\"mzIdentML\");\n } else if (tideParameters.getPinOutput()) {\n outputFormatCombo.setSelectedItem(\"Percolator input file\");\n }\n }",
"private void setUpSelect(){\n\t\tEPFuncion fun = new EPFuncion();\n\t\tEPPropiedad pro = new EPPropiedad();\n\t\tArrayList<EPExpresion> exps = new ArrayList<>();\n\t\t//seteamos la propiedad de la funcion.\n\t\tpro.setNombre(\"a1.p1\");\n\t\tpro.setPseudonombre(\"\");\n\t\t//metemos la propiedad en la funcion.\n\t\texps.add(pro);\n\t\tfun.setExpresiones(exps);\n\t\t//seteamos la funcion con el resto de valores.\n\t\tfun.setNombreFuncion(\"f1\");\n\t\tfun.setPseudonombre(\"fun1\");\n\t\t//metemos la funcion en la lista del select.\n\t\texpresionesSelect.add(fun);\n\t\t//seteamos el resto de propiedades.\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p2\");\n\t\tpro.setPseudonombre(\"pro2\");\n\t\texpresionesSelect.add(pro);\n\t\tpro = new EPPropiedad();\n\t\tpro.setNombre(\"a1.p3\");\n\t\tpro.setPseudonombre(\"pro3\");\n\t\texpresionesSelect.add(pro);\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.main);\n selection = (TextView)findViewById(R.id.con_str);\n editor = (AutoCompleteTextView) findViewById(R.id.editor);\n editor.addTextChangedListener(this);\n editor.setAdapter(new ArrayAdapter<String>(this,android.R.layout.simple_dropdown_item_1line,items)); \n }",
"private JComboBox<String> makeRaceCombo()\n {\n // Build the box with label\n _raceCombo = new JComboBox<String>(Race.RACE_LIST);\n _raceCombo.setEditable(false);\n _raceCombo.setBackground(Color.WHITE);\n return _raceCombo;\n }",
"private void setupChangeSpeed() {\n\t\tFestivalSpeed[] speeds={FestivalSpeed.slow, FestivalSpeed.normal, FestivalSpeed.fast};\n\t\tfinal JComboBox speed_chooser = new JComboBox(speeds);\n\t\tspeed_chooser.setFont(new Font(\"Arial\", Font.PLAIN, 20));\n\t\tspeed_chooser.setForeground(Color.BLACK);\n\t\tspeed_chooser.setBackground(Color.WHITE);\n\n\t\t//set shown item to be the current speed\n\t\tspeed_chooser.setSelectedItem(parent_frame.getFestival().getFestivalSpeed());\n\t\tspeed_chooser.addActionListener(new ActionListener() {\n\t\t\t@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tinput_from_user.requestFocusInWindow();//gets focus back to the spell here field\n\t\t\t\tif((FestivalSpeed)speed_chooser.getSelectedItem()!=null){\n\t\t\t\t\tparent_frame.getFestival().setFestivalSpeed((FestivalSpeed)speed_chooser.getSelectedItem());\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tspeed_chooser.setBounds(919, 658, 154, 40);\n\t\tadd(speed_chooser);\n\t}",
"public ActionForward dropdown(ActionMapping mapping, ActionForm form, HttpServletRequest request,\n \t\t\tHttpServletResponse response) throws Exception {\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction dropdown> ... \");\n \n \t\t// blank out the FORMDATA Constant field\n \t\tViralTreatmentForm viralTreatmentForm = (ViralTreatmentForm) form;\n \t\trequest.getSession().setAttribute(Constants.FORMDATA, viralTreatmentForm);\n \n \t\t// setup dropdown menus\n \t\tthis.dropdown(request, response);\n \n \t\tSystem.out.println(\"<ViralTreatmentPopulateAction> exiting... \");\n \n \t\treturn mapping.findForward(\"submitViralTreatment\");\n \t}",
"public void updatAttackArmies(){\n\t\t\n\t\tfinal String s = attackToComboBox.getSelectedItem().toString();\n\t\tCountry country = MainPlayScreen.this.game.getBoard().getCountryByName(s);\n\t\t\t\n\t\tfinal int armies = MainPlayScreen.this.game.countryArmies.get(country);\n\t\tSystem.out.println(s + \" Defender Armies: \" + armies);\n\t\t\n\t\tif( armies == 1){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t}// end of if statement\n\t\t\n\t\telse if( armies == 2){\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\t\n\t\t} // end of else if statement\n\t\t\n\t\telse{\n\t\t\tnumberOfArmies[5].removeAllItems();\n\t\t\tnumberOfArmies[5].addItem(1);\n\t\t\tnumberOfArmies[5].addItem(2);\n\t\t\tnumberOfArmies[5].addItem(3);\n\t\t\t\n\t\t}// end of else statement\n\t\tnumberOfArmies[5].repaint();\n\t}",
"public pansiyon() {\n initComponents();\n for (int i =1900; i <2025; i++) {\n \n cmbkayıtyılı.addItem(Integer.toString(i));\n \n }\n for (int i =1900; i <2025; i++) {\n \n cmbayrılısyılı.addItem(Integer.toString(i));\n \n }\n }",
"private org.gwtbootstrap3.client.ui.ListDropDown get_f_ListDropDown71() {\n return build_f_ListDropDown71();\n }",
"void createEqualizerControls();",
"public AVADA_KEDAVRA()\n {\n spellType = O2SpellType.AVADA_KEDAVRA;\n branch = O2MagicBranch.DARK_ARTS;\n\n flavorText = new ArrayList<String>()\n {{\n add(\"The Killing Curse\");\n add(\"There was a flash of blinding green light and a rushing sound, as though a vast, invisible something was soaring through the air — instantaneously the spider rolled over onto its back, unmarked, but unmistakably dead\");\n add(\"\\\"Yes, the last and worst. Avada Kedavra. ...the Killing Curse.\\\" -Bartemius Crouch Jr (disguised as Alastor Moody)\");\n }};\n\n text = \"Cause direct damage to a living thing, possibly killing it.\";\n }",
"public void transformSelectedArmyForceToSelectedTerritory() {\n selectedTerritoryByPlayer.getConquerArmyForce().uniteArmies(selectedArmyForce);\n }",
"private void setTEMswitchesFromRunner(){\n\t\t//\n\t\tint nfeed =0;\n\t\tint avlnflg =0; \n\t\tint baseline =0;\t\t\n\t\tif(nfeedjrb[1].isSelected()){\n\t\t\tnfeed =1;\n\t\t}\n\t\tif(avlnjrb[1].isSelected()){\n\t\t\tavlnflg =1;\n\t\t}\n\t\tif(baselinejrb[1].isSelected()){\n\t\t\tbaseline =1;\n\t\t}\n\t\tTEM.runcht.cht.getBd().setBaseline(baseline); \t \n TEM.runcht.cht.getBd().setAvlnflg(avlnflg);\n TEM.runcht.cht.getBd().setNfeed(nfeed);\n \n //\n if (envmodulejrb[0].isSelected())\n \tTEM.runcht.cht.setEnvmodule(false);\n if (envmodulejrb[1].isSelected())\n \tTEM.runcht.cht.setEnvmodule(true);\n\n if (ecomodulejrb[0].isSelected())\n \tTEM.runcht.cht.setEcomodule(false);\n if (ecomodulejrb[1].isSelected())\n \tTEM.runcht.cht.setEcomodule(true);\n \n if (dslmodulejrb[0].isSelected())\n \tTEM.runcht.cht.setDslmodule(false);\n if (dslmodulejrb[1].isSelected())\n \tTEM.runcht.cht.setDslmodule(true);\n\n if (dsbmodulejrb[0].isSelected())\n \tTEM.runcht.cht.setDsbmodule(false);\n if (dsbmodulejrb[1].isSelected())\n \tTEM.runcht.cht.setDsbmodule(true);\n\t}",
"private void rebuildIDSComboBox(){\n\t\tfinal List<OWLNamedIndividual> IDSes = ko.getIDSes();\n\t\t\n\t\tcomboBox.setModel(new DefaultComboBoxModel() {\n\t\t\t@Override\n\t\t\tpublic Object getElementAt(int index){\n\t\t\t\treturn IDSes.get(index);\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic int getSize(){\n\t\t\t\treturn IDSes.size();\n\t\t\t}\n\t\t});\n\t\t\n\t}"
]
| [
"0.5510179",
"0.55050325",
"0.5385734",
"0.536664",
"0.5218124",
"0.51876324",
"0.5170106",
"0.5129404",
"0.5122177",
"0.51162404",
"0.51134527",
"0.507466",
"0.5069854",
"0.5067576",
"0.5049968",
"0.5029629",
"0.5029524",
"0.50155133",
"0.50096875",
"0.5008094",
"0.50056064",
"0.49762198",
"0.4975617",
"0.49675846",
"0.49602085",
"0.49544275",
"0.49471277",
"0.49439812",
"0.4932562",
"0.49280018",
"0.49144417",
"0.49142933",
"0.49120748",
"0.49038398",
"0.49017036",
"0.48930648",
"0.4881695",
"0.4881429",
"0.48676664",
"0.48671997",
"0.48661333",
"0.48561227",
"0.48551905",
"0.4840844",
"0.48393524",
"0.4833383",
"0.48310477",
"0.48280698",
"0.48243293",
"0.48228937",
"0.48215175",
"0.4811299",
"0.4810868",
"0.48098844",
"0.48034582",
"0.4793595",
"0.47922868",
"0.4788498",
"0.47872293",
"0.4783016",
"0.47768193",
"0.4774716",
"0.47639114",
"0.4757828",
"0.47220775",
"0.47217432",
"0.47192812",
"0.471831",
"0.47182816",
"0.471439",
"0.47127327",
"0.471124",
"0.47083277",
"0.47069865",
"0.47063908",
"0.46980357",
"0.46975935",
"0.4690254",
"0.46894148",
"0.4687392",
"0.46868154",
"0.46858096",
"0.46837932",
"0.4682412",
"0.46800172",
"0.4676729",
"0.46745673",
"0.46731186",
"0.46729168",
"0.46706384",
"0.4669075",
"0.46676597",
"0.46639436",
"0.4657272",
"0.4655413",
"0.46546397",
"0.4653981",
"0.46519947",
"0.46489397",
"0.46487594",
"0.46472004"
]
| 0.0 | -1 |
Heart Rate Service (Service UUID: 0x180D) callback | public interface HeartRateServiceCallback {
/**
* Read Heart Rate Measurement's Client Characteristic Configuration success callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param clientCharacteristicConfigurationAndroid {@link ClientCharacteristicConfigurationAndroid}
* @param argument callback argument
*/
void onHeartRateMeasurementClientCharacteristicConfigurationReadSuccess(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @NonNull Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @NonNull Integer characteristicInstanceId
, @NonNull Integer descriptorInstanceId
, @NonNull ClientCharacteristicConfigurationAndroid clientCharacteristicConfigurationAndroid
, @Nullable Bundle argument);
/**
* Read Heart Rate Measurement's Client Characteristic Configuration error callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param status one of {@link BLEConnection#onDescriptorRead(BluetoothGatt, BluetoothGattDescriptor, int)} 3rd parameter, {@link org.im97mori.ble.constants.ErrorCodeAndroid#UNKNOWN}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#CANCEL}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#BUSY}
* @param argument callback argument
*/
void onHeartRateMeasurementClientCharacteristicConfigurationReadFailed(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, @Nullable Integer descriptorInstanceId
, int status
, @Nullable Bundle argument);
/**
* Read Heart Rate Measurement's Client Characteristic Configuration timeout callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param timeout timeout(millis)
* @param argument callback argument
*/
void onHeartRateMeasurementClientCharacteristicConfigurationReadTimeout(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, @Nullable Integer descriptorInstanceId
, long timeout
, @Nullable Bundle argument);
/**
* Start Heart Rate Measurement notificate success callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param argument callback argument
*/
void onHeartRateMeasurementNotificateStartSuccess(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, @NonNull Integer descriptorInstanceId
, @Nullable Bundle argument);
/**
* Start Heart Rate Measurement notificate error callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param status one of {@link BLEConnection#onDescriptorWrite(BluetoothGatt, BluetoothGattDescriptor, int)} 3rd parameter, {@link org.im97mori.ble.constants.ErrorCodeAndroid#UNKNOWN}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#CANCEL}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#BUSY}
* @param argument callback argument
*/
void onHeartRateMeasurementNotificateStartFailed(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, @Nullable Integer descriptorInstanceId
, int status
, @Nullable Bundle argument);
/**
* Start Heart Rate Measurement notificate timeout callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param timeout timeout(millis)
* @param argument callback argument
*/
void onHeartRateMeasurementNotificateStartTimeout(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, @Nullable Integer descriptorInstanceId
, long timeout
, @Nullable Bundle argument);
/**
* Stop Heart Rate Measurement notificate success callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param argument callback argument
*/
void onHeartRateMeasurementNotificateStopSuccess(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, @NonNull Integer descriptorInstanceId
, @Nullable Bundle argument);
/**
* Stop Heart Rate Measurement notificate error callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param status one of {@link BLEConnection#onDescriptorWrite(BluetoothGatt, BluetoothGattDescriptor, int)} 3rd parameter, {@link org.im97mori.ble.constants.ErrorCodeAndroid#UNKNOWN}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#CANCEL}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#BUSY}
* @param argument callback argument
*/
void onHeartRateMeasurementNotificateStopFailed(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, @Nullable Integer descriptorInstanceId
, int status
, @Nullable Bundle argument);
/**
* Stop Heart Rate Measurement notificate timeout callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param descriptorInstanceId task target descriptor incetanceId
* @param timeout timeout(millis)
* @param argument callback argument
*/
void onHeartRateMeasurementNotificateStopTimeout(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, @Nullable Integer descriptorInstanceId
, long timeout
, @Nullable Bundle argument);
/**
* Heart Rate Measurement notified callback
*
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param heartRateMeasurementAndroid {@link org.im97mori.ble.characteristic.u2a37.HeartRateMeasurementAndroid}
*/
void onHeartRateMeasurementNotified(@NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @NonNull Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @NonNull Integer characteristicInstanceId
, @NonNull HeartRateMeasurementAndroid heartRateMeasurementAndroid);
/**
* Read Body Sensor Location success callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param bodySensorLocationAndroid {@link BodySensorLocationAndroid}
* @param argument callback argument
*/
void onBodySensorLocationReadSuccess(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @NonNull Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @NonNull Integer characteristicInstanceId
, @NonNull BodySensorLocationAndroid bodySensorLocationAndroid
, @Nullable Bundle argument);
/**
* Read Body Sensor Location error callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param status one of {@link BLEConnection#onCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, int)} 3rd parameter, {@link org.im97mori.ble.constants.ErrorCodeAndroid#UNKNOWN}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#CANCEL}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#BUSY}
* @param argument callback argument
*/
void onBodySensorLocationReadFailed(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, int status
, @Nullable Bundle argument);
/**
* Read Body Sensor Location timeout callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param timeout timeout(millis)
* @param argument callback argument
*/
void onBodySensorLocationReadTimeout(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, long timeout
, @Nullable Bundle argument);
/**
* Write Heart Rate Control Point success callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param heartRateControlPointAndroid {@link HeartRateControlPointAndroid}
* @param argument callback argument
*/
void onHeartRateControlPointWriteSuccess(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @NonNull Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @NonNull Integer characteristicInstanceId
, @NonNull HeartRateControlPointAndroid heartRateControlPointAndroid
, @Nullable Bundle argument);
/**
* Write Heart Rate Control Point error callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param status one of {@link BLEConnection#onCharacteristicRead(BluetoothGatt, BluetoothGattCharacteristic, int)} 3rd parameter, {@link org.im97mori.ble.constants.ErrorCodeAndroid#UNKNOWN}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#CANCEL}, {@link org.im97mori.ble.constants.ErrorCodeAndroid#BUSY}
* @param argument callback argument
*/
void onHeartRateControlPointWriteFailed(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, int status
, @Nullable Bundle argument);
/**
* Write Heart Rate Control Point timeout callback
*
* @param taskId task id
* @param bluetoothDevice BLE device
* @param serviceUUID service {@link UUID}
* @param serviceInstanceId task target service incetanceId {@link BluetoothGattService#getInstanceId()}
* @param characteristicUUID characteristic {@link UUID}
* @param characteristicInstanceId task target characteristic incetanceId {@link BluetoothGattCharacteristic#getInstanceId()}
* @param timeout timeout(millis)
* @param argument callback argument
*/
void onHeartRateControlPointWriteTimeout(@NonNull Integer taskId
, @NonNull BluetoothDevice bluetoothDevice
, @NonNull UUID serviceUUID
, @Nullable Integer serviceInstanceId
, @NonNull UUID characteristicUUID
, @Nullable Integer characteristicInstanceId
, long timeout
, @Nullable Bundle argument);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getHeartRate();",
"@Override\n public void heartRate(int valueHr, int timestamp) {\n }",
"public void heartBeat();",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.d(\"ALARMA\", \"alarma\");\n AlarmUtils.scheduleAlarmHeartRate();\n BleDevice device = new BleDevice(new DeviceManager().getDevice().getMacAddress());\n\n device.connect();\n /*\n while(!device.readSteps(new StepsListener() {\n @Override\n public void onStepsRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n }\n })){\n }\n */\n\n while(!device.readHeartRate(new HeartRateListener() {\n @Override\n public void onHeartRateRead(int value) {\n Log.d(\"ALARMA\", value+\"\");\n\n Measurement measurement = new Measurement(new SessionManager().getId(), value, currentTimeMillis()/1000);\n new ApiHelper().uploadHeartRateMeasure(measurement, new SessionManager().getJWT());\n }\n }));\n }",
"@Override\n public void onServicesDiscovered(BluetoothGatt gatt, int status) {\n\n if(status == BluetoothGatt.GATT_SUCCESS) {\n\n // call for the HR reading\n characteristicHr = gatt.getService(AppConstants.HEART_RATE_SERVICE_UUID).getCharacteristic(AppConstants.HEART_RATE_MEASUREMENT_UUID);\n gatt.setCharacteristicNotification(characteristicHr, true);\n descriptorHr = characteristicHr.getDescriptor(AppConstants.CLIENT_CHARACTERISTIC_CONFIG_UUID);\n descriptorHr.setValue(\n BluetoothGattDescriptor.ENABLE_NOTIFICATION_VALUE);\n gatt.writeDescriptor(descriptorHr);\n\n }\n }",
"public static int measureHeartRate() {\n\t\treturn HeartRateSensor.getRate(currentRate);\n\t}",
"pb4server.DealHeartAskReq getDealHeartAskReq();",
"@Override\n public void heartRateInterval(int valueHri, int timestamp) {\n }",
"public int getHeartRate() {\n if (extraCase_ == 5) {\n return (Integer) extra_;\n }\n return 0;\n }",
"public int getHeartRate() {\n if (extraCase_ == 5) {\n return (Integer) extra_;\n }\n return 0;\n }",
"public void sendHearBeat() {\n try {\n JSONObject jsonObject = new JSONObject();\n jsonObject.put(\"type\", WsMessage.MessageType.HEART_BEAT_REQ);\n this.wsManager.sendMessage(WsMessage.MessageType.HEART_BEAT_REQ, jsonObject.toString());\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"boolean hasHeartBeatMsg();",
"private void setHeartRateMonitor()\n {\n\n Calendar cal = Calendar.getInstance();\n Date now = new Date();\n cal.setTime(now);\n\n long alarm_time = cal.getTimeInMillis();\n\n// if(cal.before(Calendar.getInstance()))\n// alarm_time += 60*1000;\n\n AlarmManager alarmManager = (AlarmManager) getSystemService(Context.ALARM_SERVICE);\n\n Intent intent = new Intent(this, HeartRateMonitor.class);\n\n PendingIntent pendingIntent = PendingIntent.getBroadcast(this, HEART_RATE_MONITOR_REQUEST_CODE, intent,PendingIntent.FLAG_UPDATE_CURRENT);\n\n alarmManager.setRepeating(AlarmManager.RTC_WAKEUP, alarm_time,90000, pendingIntent);\n\n Log.i(\"hrmonitor\",\"hrmonitor alarm set\");\n }",
"boolean hasHeartBeatResponse();",
"HeartBeat.Res getHeartBeatRes();",
"HeartBeat.Req getHeartBeatReq();",
"public void gainHealth()\n\t{\n\t\tSystem.out.println(\"1 heart gained\");\n\t}",
"@Override\n\tpublic void setEnableHeartBeat(boolean arg0) {\n\n\t}",
"private void processHeartRateData(SensorEvent event){\n //interval between two data entry should be min SENSOR_DATA_MIN_INTERVAL\n if ((event.timestamp - lastUpdatePPG) < SENSOR_DATA_MIN_INTERVAL_NANOS) {\n return;\n }\n lastUpdatePPG = event.timestamp;\n long timestamp = Util.getStartTime() + event.timestamp/Const.NANOS_TO_MILLIS;\n savePPGData(event.values[0], timestamp);\n\n\n }",
"public void sendHeartbeat();",
"private void beat() {\n\t\t\tSystem.out.println(\"Heart beating\");\n\t\t}",
"public void sendHeartBeat(String internalAppId) {\n\t\t// PUT on /vnfr/<vnfr_id>/app/<app_id>/heartbeat\n\t\tString webServiceUrl = serviceProfile.getServiceApiUrl()+\"/\"+internalAppId+\"/heartbeat\";\n\t\tlogger.info(\"sending heartbeat to EMM \"+ webServiceUrl);\n\t\t\n\t\tResponseEntity<Void> response = restTemplate.exchange(webServiceUrl, HttpMethod.PUT,\n null, Void.class);\n\t\tVoid body = response.getBody();\n\t\tlogger.info(\"response :\"+ response);\n\t}",
"@Override\n public void channelActive(ChannelHandlerContext ctx) throws Exception {\n ctx.fireChannelActive();\n\n ctx.executor().scheduleAtFixedRate(new Runnable() {\n @Override\n public void run() {\n log.info(\"send heart beat\");\n HeartBeat heartBeat = new HeartBeat();\n ctx.writeAndFlush(heartBeat);\n }\n }, 0, 5, TimeUnit.SECONDS);\n }",
"edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse getHeartBeatResponse();",
"public void mo33398h() {\n String str = \"com.tencent.android.tpush.service.channel.heartbeatIntent.pullup\";\n String str2 = \"TpnsChannel\";\n try {\n if (this.f23285A == null) {\n IntentFilter intentFilter = new IntentFilter();\n intentFilter.addAction(\"android.intent.action.SCREEN_ON\");\n intentFilter.addAction(\"android.intent.action.SCREEN_OFF\");\n intentFilter.addAction(\"android.intent.action.USER_PRESENT\");\n intentFilter.addAction(str);\n C6973b.m29776f().registerReceiver(this.f23292L, intentFilter);\n this.f23285A = PendingIntent.getBroadcast(C6973b.m29776f(), 0, new Intent(str), 134217728);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23282q > f23278m) {\n f23282q = f23278m;\n }\n if (XGPushConfig.isForeignWeakAlarmMode(C6973b.m29776f())) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"schedulePullUpHeartbeat WaekAlarmMode heartbeatinterval: \");\n sb.append(f23280o);\n sb.append(\" ms\");\n C6864a.m29305f(str2, sb.toString());\n f23282q = f23280o;\n }\n f23282q = C7055h.m30166a(C6973b.m29776f(), \"com.tencent.android.xg.wx.HeartbeatIntervalMs\", f23282q);\n long j = currentTimeMillis + ((long) f23282q);\n mo33391b(true);\n C7045d.m30117a().mo34149a(0, j, this.f23285A);\n } catch (Throwable th) {\n C6864a.m29302d(str2, \"scheduleHeartbeat error\", th);\n }\n }",
"private void onFullBattery() {\n\n }",
"@Override\n\tpublic void run() {\n\n\t\tprogressivNumber++;\n\t\tStoRMStatus status = detective.haveaLook();\n\t\tstatus.setPulseNumber(progressivNumber);\n\t\tHEALTH_LOG.debug(\"*** HEARTHBEAT ***\");\n\t\tHEALTH_LOG.info(status.toString());\n\t}",
"default void onMissedHeartBeat(SessionID sessionID) {\n }",
"public static String getHeartRateValue() {\n return heartRateValue;\n }",
"public void triggerHeartBeat() {\n\t\tif (this.postman==null) return;\n\t\tthis.postman.sendHeartBeatAt = 0;\n\t}",
"private void m29985m() {\n String str = \"com.tencent.android.tpush.service.channel.heartbeatIntent\";\n String str2 = \"TpnsChannel\";\n try {\n if (this.f23299z == null) {\n C6973b.m29776f().registerReceiver(new BroadcastReceiver() {\n public void onReceive(Context context, Intent intent) {\n C7005b.m29964a().m29983k();\n }\n }, new IntentFilter(str));\n this.f23299z = PendingIntent.getBroadcast(C6973b.m29776f(), 0, new Intent(str), 134217728);\n }\n long currentTimeMillis = System.currentTimeMillis();\n if (f23279n > f23278m) {\n f23279n = f23278m;\n }\n if (XGPushConfig.isForeignWeakAlarmMode(C6973b.m29776f())) {\n StringBuilder sb = new StringBuilder();\n sb.append(\"scheduleHeartbeat WaekAlarmMode heartbeatinterval: \");\n sb.append(f23280o);\n sb.append(\" ms\");\n C6864a.m29305f(str2, sb.toString());\n f23279n = f23280o;\n }\n f23279n = C7055h.m30166a(C6973b.m29776f(), \"com.tencent.android.xg.wx.HeartbeatIntervalMs\", f23279n);\n C7045d.m30117a().mo34149a(0, currentTimeMillis + ((long) f23279n), this.f23299z);\n } catch (Throwable th) {\n C6864a.m29302d(str2, \"scheduleHeartbeat error\", th);\n }\n }",
"public void onIBeaconServiceConnect();",
"public boolean hasHeartBeatResponse() {\n return msgCase_ == 4;\n }",
"edu.usfca.cs.dfs.StorageMessages.HeartBeat getHeartBeatMsg();",
"public boolean hasHeartBeatResponse() {\n return msgCase_ == 4;\n }",
"@Override\n public void onSensorChanged(SensorEvent event) {\n if (timerFlag) {\n sendInfo(\"heart\", (sim_flag ? bpm/sim_scale : bpm));\n timerFlag = false;\n\n HR_i++;\n if(HR_i>9) {\n HR_i = 0;\n over = true;\n }\n\n if (over)\n {\n HeartRateAvg = 0;\n for (int i=0;i<10;i++)\n {\n HeartRateAvg = HeartRateAvg + HeartRate[i];\n }\n HeartRateAvg = HeartRateAvg/10;\n if ((bpm>HeartRateAvg*1.3 || bpm<HeartRateAvg*0.7) && !sendAttackFlag && sendAttackFlagCnt>15)\n {\n sendInfo(\"attack\",0);\n sendAttackFlag = true;\n Toast.makeText(getApplicationContext(), \"HeartAttack\", Toast.LENGTH_SHORT).show();\n }\n sendAttackFlagCnt++;\n if (sendAttackFlag) {\n sendAttackFlagCnt++;\n if (sendAttackFlagCnt>10)\n {\n sendAttackFlagCnt=0;\n sendAttackFlag = false;\n }\n }\n }\n HeartRate[HR_i] = bpm;\n sendInfo (\"avg\", HeartRateAvg);\n }\n\n // Update the accelerometer\n if (flag) {\n if (event.sensor.getType() == Sensor.TYPE_ACCELEROMETER) {\n final float alpha = (float) 0.8;\n // Isolate the force of gravity with the low-pass filter.\n gravity[0] = alpha * gravity[0] + (1 - alpha) * event.values[0];\n gravity[1] = alpha * gravity[1] + (1 - alpha) * event.values[1];\n gravity[2] = alpha * gravity[2] + (1 - alpha) * event.values[2];\n\n // Remove the gravity contribution with the high-pass filter.\n linear_acceleration[0] = event.values[0] - gravity[0];\n linear_acceleration[1] = event.values[1] - gravity[1];\n linear_acceleration[2] = event.values[2] - gravity[2];\n\n totAcc = Math.sqrt(linear_acceleration[0] * linear_acceleration[0] +\n linear_acceleration[1] * linear_acceleration[1] +\n linear_acceleration[2] * linear_acceleration[2]);\n\n fallAcc = linear_acceleration[2];\n }\n\n // Update the heart rate\n if (event.sensor.getType() == Sensor.TYPE_HEART_RATE) {\n bpm = event.values[0];\n if (sim_flag)\n bpm = bpm/sim_scale;\n\n String message = String.valueOf ((int) bpm) + \" bpm\";\n heart.setText(message);\n }\n\n flag = false;\n\n FallCounter = ((totAcc > threshold) ? FallCounter + 1 : 0);\n\n if (FallCounter == 5 && !detected) {\n fallDetectionAction();\n }\n }\n }",
"public void onServiceConnected();",
"public Builder setHeartRate(int value) {\n extraCase_ = 5;\n extra_ = value;\n onChanged();\n return this;\n }",
"default void onHeartBeatTimeout(SessionID sessionID) {\n }",
"public interface ConnectWuliHeartBeatInterface {\n void wuliHeartBeat();\n}",
"@Override\n public void channelRead(final ChannelHandlerContext ctx, final Object msg) throws Exception {\n MessageProto.Message message = (MessageProto.Message) msg;\n if (message.getLength() != 2 && message.getAction() == ActionType.HEARTBEAT_REQ) {\n logger.debug(\"Receive client heart beat message\");\n ctx.writeAndFlush(buildHeartBeat());\n logger.debug(\"Send heart beat message to client\");\n } else {\n ctx.fireChannelRead(msg);\n }\n }",
"void onStateChange(BluetoothService.BTState state);",
"private void startHeartbeats() {\r\n\t\tClientProperties props = ClientProperties.getInstance();\r\n\t\tint heartbeatInterval = Integer.parseInt(props.getProperty(ClientProperties.HEARTBEAT_INTERVAL));\r\n\t\theartbeatProducer.startHeartbeats(heartbeatInterval);\r\n\t}",
"float getFrequency() throws InterruptedException, ConnectionLostException;",
"@Override\n\tprotected void handleServiceConnected()\n\t{\n\t\t\n\t}",
"@Override\n public void onReceive(Context context, Intent intent) {\n int heartRateWatch = intent.getIntExtra(LiveRecordingActivity.HEART_RATE, -1);\n String s = String.valueOf(heartRateWatch) + \" [BPM]\" ;\n hrTextView.setText(s);\n\n if (hasPlot) {\n // Plot the graph\n xyPlotSeriesList.updateSeries(HR_PLOT_WATCH, heartRateWatch);\n XYSeries hrWatchSeries = new SimpleXYSeries(xyPlotSeriesList.getSeriesFromList(HR_PLOT_WATCH), SimpleXYSeries.ArrayFormat.XY_VALS_INTERLEAVED, HR_PLOT_WATCH);\n LineAndPointFormatter formatterPolar = xyPlotSeriesList.getFormatterFromList(HR_PLOT_WATCH);\n heartRatePlot.clear();\n heartRatePlot.addSeries(hrWatchSeries, formatterPolar);\n heartRatePlot.redraw();\n // And add HR value to HR ArrayList\n hrDataArrayList.add(heartRateWatch);\n hrTimes.add(System.currentTimeMillis()-initialTime);\n }\n }",
"@Override\r\n\tpublic void receiveSunshine() {\r\n\r\n\t\tthis.batteryToLoad.charge(0.1d);\r\n\t}",
"public boolean hasHeartBeatMsg() {\n return msgCase_ == 3;\n }",
"@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tmsgService = ((MyService.MsgBinder) service).getService();\n\t\t\t// recieve callback progress\n\t\t\tmsgService.SetOnProgressListner(new OnProgressListner() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onProgress(int progress) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tmProgressBar.setProgress(progress);\n\t\t\t\t}\n\t\t\t});\n\t\t}",
"public int getHealthGain();",
"public boolean hasHeartBeatMsg() {\n return msgCase_ == 3;\n }",
"protected void checkHealth(MonitoredService module) {\n if (!isActive()) {\n return;\n }\n final ModuleOutputDevice moduleLog = ModuleOutputDeviceFarm.getDevice(this, ModuleLoggerMessage.LOG_OUTPUT_TYPE);\n moduleLog.associate(\"Processing heart-beat for '\" + module + \"' module\");\n moduleLog.actionBegin();\n // service is active for the moment, process module's heart-beat\n try {\n moduleLog.out(\"Saving heart-beat of module \", module.toString());\n storage.saveHeartBeat(module);\n moduleLog.out(\"Getting config updates for module \", module.toString());\n final Map<String, ConfiguredVariableItem> updated\n = configurationService.getUpdatedVariables(module, module.getConfiguration());\n if (!updated.isEmpty()) {\n moduleLog.out(\"Updating module configuration.\");\n module.configurationChanged(updated);\n }\n moduleLog.actionEnd();\n } catch (Throwable t) {\n LOG.error(\"Can't process heartbeat for module '{}'\", module, t);\n moduleLog.actionFail();\n }\n }",
"public BluetoothService(Activity activity){\n mActivity = activity;\n\n mUserWarningService = new UserWarningService(mActivity.getApplicationContext());\n\n\n/*\n float [][] testdata ={{1},{2},{6},{4},{5},{6},{7},{8},{9},{10}};\n float f1 = Mean(testdata, 0,10);\n float f2 = Var(testdata, 0,10);\n float f3 = Rms(testdata, 0,10);\n float f4 = Skew(testdata, 0,10);\n int x = 1;\n\n */\n }",
"public interface OnRSSISuccessListener {\r\n public void onSuccess(int rssi);\r\n}",
"private void connect() {\n // after 10 seconds its connected\n new Handler().postDelayed(\n new Runnable() {\n public void run() {\n Log.d(TAG, \"Bluetooth Low Energy device is connected!!\");\n // Toast.makeText(getApplicationContext(),\"Connected!\",Toast.LENGTH_SHORT).show();\n stateService = Constants.STATE_SERVICE.CONNECTED;\n startForeground(Constants.NOTIFICATION_ID_FOREGROUND_SERVICE, prepareNotification());\n }\n }, 10000);\n\n }",
"void onHisNotify();",
"public HeartBeat.Res getHeartBeatRes() {\n if (rspCase_ == 5) {\n return (HeartBeat.Res) rsp_;\n }\n return HeartBeat.Res.getDefaultInstance();\n }",
"int getHappiness();",
"public void hasHeartPower(){\n shipVal.setHealth(shipVal.getHealth()+1);\n updateHearts(new ImageView(cacheHeart));\n score_val += 1000;\n }",
"private void createNewPersonHeartRate() throws RepositoryException\n {\n instanceFeatureOfInterestHeart = valueFactory.createURI(hexoskin, \"Person_Heart_\" + currentPid);\n\n // create an instance of the heart rate sensor class\n instanceObservationHeartRate = valueFactory.createURI(hexoskin, \"Hexoskin_Model_A_Heart_Rate_Observation_v1_\"\n + currentPid);\n instanceSensingDeviceHeartRate = valueFactory.createURI(hexoskin,\n \"Hexoskin_Model_A_Heart_Rate_Sensing_Device_v1_\" + currentPid);\n instanceSensorInputHeartBeart = valueFactory.createURI(hexoskin, \"Heart_Beat_\" + currentPid);\n instanceHeartRateProperty = valueFactory.createURI(hexoskin, \"Heart_Rate_Property_\" + currentPid);\n instanceSensingHeartRate = valueFactory.createURI(hexoskin, \"Heart_Rate_Sensing_\" + currentPid);\n instanceSensorOutputHeartRate = valueFactory.createURI(hexoskin, \"Hexoskin_Model_A_Heart_Rate_Output_v1_\"\n + currentPid);\n instanceMeasurementCapabilityHeartRate = valueFactory.createURI(hexoskin,\n \"Hexoskin_Model_A_Heart_Rate_Measurement_Capability_v1_\" + currentPid);\n\n // currentPerson is a natural person, has a body, the body has a heart,\n // the heart if a feature of interest\n repoConn.add(instanceSensingDeviceHeartRate, RDFS.SUBCLASSOF, classSensingDeviceHeartRate);\n repoConn.add(instanceFeatureOfInterestHeart, RDFS.SUBCLASSOF, classFeatureOfInterestHeart);\n repoConn.add(instanceObservationHeartRate, RDFS.SUBCLASSOF, classObservationHeartRate);\n repoConn.add(instanceSensorInputHeartBeart, RDFS.SUBCLASSOF, classSensorInputHeartRate);\n repoConn.add(instanceHeartRateProperty, RDFS.SUBCLASSOF, classHeartRateProperty);\n repoConn.add(instanceSensingHeartRate, RDFS.SUBCLASSOF, classSensingHeartRate);\n repoConn.add(instanceSensorOutputHeartRate, RDFS.SUBCLASSOF, classSensorOutputHeartRate);\n repoConn.add(instanceMeasurementCapabilityHeartRate, RDFS.SUBCLASSOF, classMeasurementCapabilityHeartRate);\n\n repoConn.add(instanceFeatureOfInterestHeart, propertyHasPropertyHeartRate, instanceHeartRateProperty);\n\n repoConn.add(instanceObservationHeartRate, propertyObservationResultHeartRate, instanceSensorOutputHeartRate);\n repoConn.add(instanceObservationHeartRate, propertyIncludesEventHeartRate, instanceSensorInputHeartBeart);\n repoConn.add(instanceObservationHeartRate, propertyObservedByHeartRate, instanceSensingDeviceHeartRate);\n repoConn.add(instanceObservationHeartRate, propertySensingMethodUsedHeartRate, instanceSensingHeartRate);\n repoConn.add(instanceObservationHeartRate, propertyObservedPropertyHeartRate, instanceFeatureOfInterestHeart);\n repoConn.add(instanceObservationHeartRate, propertyFeatureOfInterestHeart, instanceFeatureOfInterestHeart);\n\n repoConn.add(instanceSensorInputHeartBeart, propertyIsProxyForHeartRate, instanceHeartRateProperty);\n\n repoConn.add(instanceSensorOutputHeartRate, propertyIsProducedByHeartRateSensor, instanceSensingDeviceHeartRate);\n\n repoConn.add(instanceSensingDeviceHeartRate, propertyDetectsHeartRate, instanceSensorInputHeartBeart);\n repoConn.add(instanceSensingDeviceHeartRate, propertyObservesHeartRate, instanceHeartRateProperty);\n repoConn.add(instanceSensingDeviceHeartRate, propertyHasMeasurementCapabilityHeartRate,\n instanceMeasurementCapabilityHeartRate);\n repoConn.add(instanceSensingDeviceHeartRate, propertyImplementsHeartRate, instanceSensingHeartRate);\n\n repoConn.add(instanceMeasurementCapabilityHeartRate, propertyForPropertyHeartRate, instanceHeartRateProperty);\n }",
"@Override\n public void onConnectionStateChange(BluetoothGatt gatt, int status,\n int newState) {\n Log.i(\"onConnectionStateChange\", \"The connection status has changed. status:\" + status + \" newState:\" + newState + \"\");\n try {\n if(status == BluetoothGatt.GATT_SUCCESS) {\n switch (newState) {\n // Has been connected to the device\n case BluetoothProfile.STATE_CONNECTED:\n Log.i(\"onConnectionStateChange\", \"Has been connected to the device\");\n if(_ConnectionStatus == ConnectionStatus.Connecting) {\n _ConnectionStatus = ConnectionStatus.Connected;\n try {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnConnected();\n if (gatt.getDevice().getBondState() == BluetoothDevice.BOND_BONDED){\n //Url : https://github.com/NordicSemiconductor/Android-DFU-Library/blob/release/dfu/src/main/java/no/nordicsemi/android/dfu/DfuBaseService.java\n Log.i(\"onConnectionStateChange\",\"Waiting 1600 ms for a possible Service Changed indication...\");\n // Connection successfully sleep 1600ms, the connection success rate will increase\n Thread.sleep(1600);\n }\n } catch (Exception e){}\n // Discover service\n gatt.discoverServices();\n }\n break;\n // The connection has been disconnected\n case BluetoothProfile.STATE_DISCONNECTED:\n Log.i(\"onConnectionStateChange\", \"The connection has been disconnected\");\n if(_ConnectionStatus == ConnectionStatus.Connected) {\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n Close();\n _ConnectionStatus = ConnectionStatus.DisConnected;\n break;\n /*case BluetoothProfile.STATE_CONNECTING:\n Log.i(\"onConnectionStateChange\", \"Connecting ...\");\n _ConnectionStatus = ConnectionStatus.Connecting;\n break;\n case BluetoothProfile.STATE_DISCONNECTING:\n Log.i(\"onConnectionStateChange\", \"Disconnecting ...\");\n _ConnectionStatus = ConnectionStatus.DisConnecting;\n break;*/\n default:\n Log.e(\"onConnectionStateChange\", \"newState:\" + newState);\n break;\n }\n }else {\n Log.i(\"onConnectionStateChange\", \"GATT error\");\n Close();\n if(_ConnectionStatus == ConnectionStatus.Connecting\n && _Timeout - (new Date().getTime() - _ConnectStartTime.getTime()) > 0) {\n Log.i(\"Connect\", \"Gatt Error! Try to reconnect (\"+_ConnectIndex+\")...\");\n _ConnectionStatus = ConnectionStatus.DisConnected;\n Connect(); // Connect\n }else {\n _ConnectionStatus = ConnectionStatus.DisConnected;\n if (_PeripheryBluetoothServiceCallBack != null)\n _PeripheryBluetoothServiceCallBack.OnDisConnected();\n }\n }\n }catch (Exception ex){\n Log.e(\"onConnectionStateChange\", ex.toString());\n }\n super.onConnectionStateChange(gatt, status, newState);\n }",
"void reportHeartbeatRpcSuccess();",
"void notify(HorseFeverEvent e);",
"public void onUaCallRinging(UserAgent ua)\n { \n }",
"public void startRecording() {\n heartRateBroadcastReceiver = new HeartRateBroadcastReceiver();\n LocalBroadcastManager.getInstance(activity).registerReceiver(heartRateBroadcastReceiver, new IntentFilter(LiveRecordingActivity.ACTION_RECEIVE_HEART_RATE));\n }",
"@Override\r\n\t\tpublic void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\ttry {\r\n\t\t\t\tmSpiderX = SpiderX.Stub.asInterface(service);\r\n\t\t\t\tif(mSpiderX != null && spiderCallback != null){\r\n\t\t\t\t\tmSpiderX.setSpiderCallBack(spiderCallback);\r\n\t\t\t\t}\r\n\t\t\t\tfor(EventBus handler:mEventBus){\r\n\t\t\t\t\thandler.onEvent(TYPE_SERVICEBINDER_SUCESS,\"\",\"\");\r\n\t\t\t\t}\r\n\t\t\t} catch (RemoteException e) {\r\n\t\t\t\tLog.d(TAG, \" \"+e);\r\n\t\t\t}\r\n\t\t}",
"public interface IRequestHeartBeatBiz {\n interface OnRequestListener{\n void success(List<UserInformationBean> userInformation);\n void failed();\n }\n void requestData(String uuid, OnRequestListener requestListener);\n}",
"public void accept()\n { ua.accept();\n changeStatus(UA_ONCALL);\n if (ua_profile.hangup_time>0) automaticHangup(ua_profile.hangup_time); \n printOut(\"press 'enter' to hangup\"); \n }",
"edu.usfca.cs.dfs.StorageMessages.HeartBeatResponseOrBuilder getHeartBeatResponseOrBuilder();",
"public interface HeartRateView {\n void currentHeartRate(int heartRate);\n void currentCalories(int currentCalories);\n void currentAvgHeartRate(int avgHeartRate);\n void currentHrMaxPercentage(int hrMaxPercentage);\n}",
"@Override\n public void onServiceConnected(ComponentName componentName, IBinder service) {\n mNanoBLEService = ((NanoBLEService.LocalBinder) service).getService();\n\n //initialize bluetooth, if BLE is not available, then finish\n if (!mNanoBLEService.initialize()) {\n finish();\n }\n\n //Start scanning for devices that match DEVICE_NAME\n final BluetoothManager bluetoothManager =\n (BluetoothManager) getSystemService(Context.BLUETOOTH_SERVICE);\n mBluetoothAdapter = bluetoothManager.getAdapter();\n mBluetoothLeScanner = mBluetoothAdapter.getBluetoothLeScanner();\n if(mBluetoothLeScanner == null){\n finish();\n Toast.makeText(NewScanActivity.this, \"Please ensure Bluetooth is enabled and try again\", Toast.LENGTH_SHORT).show();\n }\n mHandler = new Handler();\n if (SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null) != null) {\n preferredDevice = SettingsManager.getStringPref(mContext, SettingsManager.SharedPreferencesKeys.preferredDevice, null);\n scanPreferredLeDevice(true);\n } else {\n scanLeDevice(true);\n }\n }",
"private void sendFitDataSync(final Context context){\n final Date date = new Date();\n HandlerThread ht = new HandlerThread(\"HeartThread\", android.os.Process.THREAD_PRIORITY_BACKGROUND);\n ht.start();\n Handler h = new Handler(ht.getLooper());\n h.post(new Runnable() {\n @Override\n public void run() {\n GoogleApiClient mGoogleAPIClient = new GoogleApiClient.Builder(context)\n .addConnectionCallbacks(new GoogleApiClient.ConnectionCallbacks() {\n @Override\n public void onConnected(Bundle bundle) {\n Log.d(\"Heart\", \"Connected\");\n }\n\n @Override\n public void onConnectionSuspended(int i) {\n\n }\n })\n .addApi(Wearable.API).build();\n mGoogleAPIClient.blockingConnect(10, TimeUnit.SECONDS);\n /* Sync msg & time to handheld */\n WearableSendSync.sendSyncToDevice(mGoogleAPIClient, WearableSendSync.START_ACTV_SYNC, date);\n WearableSendSync.sendSyncToDevice(mGoogleAPIClient, WearableSendSync.START_HIST_SYNC, date);\n WearableSendSync.sendDailyNotifFileWrapper(mGoogleAPIClient);\n\n }\n });\n }",
"public edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse getHeartBeatResponse() {\n if (msgCase_ == 4) {\n return (edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse) msg_;\n }\n return edu.usfca.cs.dfs.StorageMessages.HeartBeatResponse.getDefaultInstance();\n }",
"@Override\n public void onServicesDiscovered(BluetoothGatt gatt, int status) {\n Log.i(\"onServicesDiscovered\", \"Obtaining device service information ......\");\n if (status == BluetoothGatt.GATT_SUCCESS) {\n try{\n String messages = \"-------------- (\"+Periphery.getAddress()+\")Service Services information : --------------------\\n\";\n List<BluetoothGattService> serviceList = gatt.getServices();\n messages += \"Total:\"+serviceList.size()+\"\\n\";\n for (int i = 0; i < serviceList.size(); i++) {\n BluetoothGattService theService = serviceList.get(i);\n BLEGattServiceList.add(new BLEGattService(theService));\n\n String serviceName = theService.getUuid().toString();\n String msg = \"---- Service UUID:\"+serviceName+\" -----\\n\";\n // Each Service contains multiple features\n List<BluetoothGattCharacteristic> characterList = theService.getCharacteristics();\n msg += \"Characteristic UUID List:\\n\";\n for (int j = 0; j < characterList.size(); j++) {\n BluetoothGattCharacteristic theCharacter = characterList.get(j);\n msg += \"(\"+(j+1)+\"):\"+theCharacter.getUuid()+\"\\n\";\n //msg += \" --> Value:\"+ StringConvertUtil.bytesToHexString(theCharacter.getValue())+\"\\n\";\n }\n msg += \"\\n\\n\";\n messages += msg;\n }\n messages += \"-------------- (\"+Periphery.getAddress()+\")--------------------\\n\";\n Log.i(\"onServicesDiscovered\", messages);\n }catch (Exception ex){\n Log.e(\"onServicesDiscovered\", \"Exception:\" + ex.toString());\n }\n }\n if (_PeripheryBluetoothServiceCallBack!=null){\n _PeripheryBluetoothServiceCallBack.OnServicesed(BLEGattServiceList);\n }\n super.onServicesDiscovered(gatt, status);\n }",
"public interface ScanCallBack {\n void getDevices(final BluetoothDevice bluetoothDevice, final int rssi);\n}",
"@Override\r\n public String toString() {\r\n return \"Heart\";\r\n }",
"@Override\r\n\tpublic void onHeartbeat(int result)\r\n\t{\n\t\tif (result == AirtalkeeAccount.ACCOUNT_RESULT_ERR_SINGLE)\r\n\t\t{\r\n\t\t\tAirServices.iOperator.putString(KEY_PWD, \"\");\r\n\t\t}\r\n\t\tif (accountListener != null)\r\n\t\t{\r\n\t\t\taccountListener.onMmiHeartbeatException(result);\r\n\t\t}\r\n\t}",
"public HeartBeat.Res getHeartBeatRes() {\n return instance.getHeartBeatRes();\n }",
"private void execServiceHandler( Message msg ) {\n \tswitch ( msg.what ) {\n\t\t\tcase BluetoothService.WHAT_READ:\n\t\t\t\texecHandlerRead( msg );\n break;\n case BluetoothService.WHAT_WRITE:\n\t\t\t\texecHandlerWrite( msg );\n break;\n\t\t\tcase BluetoothService.WHAT_STATE_CHANGE:\n\t\t\t\texecHandlerChange( msg );\n break;\n case BluetoothService.WHAT_DEVICE_NAME:\n\t\t\t\texecHandlerDevice( msg );\n break;\n case BluetoothService.WHAT_FAILED:\n\t\t\t\texecHandlerFailed( msg );\n break;\n\t\t\tcase BluetoothService.WHAT_LOST:\n\t\t\t\texecHandlerLost( msg );\n break;\n }\n\t}",
"public void heartBeat() throws InterruptedException {\n // 1) schedule the heartbeat on one thread in pool\n synchronized (txnBatchLock) {\n try {\n callWithTimeout(new CallRunner<Void>() {\n @Override\n public Void call() throws Exception {\n try {\n LOG.info(\"Sending heartbeat on batch \" + txnBatch);\n txnBatch.heartbeat();\n } catch (StreamingException e) {\n LOG.warn(\"Heartbeat error on batch \" + txnBatch, e);\n }\n return null;\n }\n });\n } catch (InterruptedException e) {\n throw e;\n } catch (Exception e) {\n LOG.warn(\"Unable to send heartbeat on Txn Batch \" + txnBatch, e);\n // Suppressing exceptions as we don't care for errors on heartbeats\n }\n }\n }",
"private void sendHeartbeats() {\n\t\tHashSet<InetAddress> addresses = new HashSet<>(nodes.keySet());\n\t\t\n for (InetAddress addr : addresses) {\n\t\t\t// Take the mutex to ensure that no modifications are made to nodes\n\t\t\t// or channels while checking this node\n\t\t\tmutexLock.lock();\n\n // Check if the last heartbeat was responded to\n if (!nodes.containsKey(addr)) {\n mutexLock.unlock();\n continue;\n }\n\n NodeStatus node = nodes.get(addr);\n if (!(node.getLastResponse() == heartbeat.get())) {\n\n if (node.isAvailable()) {\n node.setAvailable(false);\n System.out.println(\"[\" + System.currentTimeMillis() + \" :: Node at \" + addr + \" is not available\");\n }\n }\n\n // Send the new heartbeat\n if (!channels.containsKey(addr)) {\n mutexLock.unlock();\n continue;\n }\n\n HeartbeatRequestMessage hrm = new HeartbeatRequestMessage(heartbeat.get()+1);\n SocketChannel channel = channels.get(addr);\n byte[] message = hrm.serialize();\n\n try {\n channel.write(ByteBuffer.wrap(message));\n } catch (ClosedChannelException cce) {\n channels.remove(addr);\n } catch (IOException e) {\n // Do something?\n }\n\n\t\t\t// Release the mutex\n\t\t\tmutexLock.unlock();\n }\n\n heartbeat.getAndIncrement();\n lastHeartbeatTime = System.currentTimeMillis();\n }",
"void getTicker(String pair,HibtcApiCallback<Object> callback);",
"public void onServiceConnected() {\r\n\t\tapiEnabled = true;\r\n\r\n\t\t// Display the list of calls\r\n\t\tupdateList();\r\n }",
"void reportHeartbeat();",
"public abstract void onPingReceived(byte[] data);",
"private void scheduleHeartBeatThread() {\n if (scheduler == null) {\n scheduler = Executors.newSingleThreadScheduledExecutor(\n Threads.createDaemonThreadFactory(\"program-heart-beat\"));\n scheduler.scheduleAtFixedRate(\n () -> {\n Map<String, String> properties = new HashMap<>();\n properties.put(ProgramOptionConstants.PROGRAM_RUN_ID, GSON.toJson(programRunId));\n properties.put(ProgramOptionConstants.HEART_BEAT_TIME,\n String.valueOf(System.currentTimeMillis()));\n // publish as heart_beat type, so it can be handled appropriately at receiver\n programStatePublisher.publish(Notification.Type.PROGRAM_HEART_BEAT, properties);\n LOG.trace(\"Sent heartbeat for program {}\", programRunId);\n }, heartBeatIntervalSeconds,\n heartBeatIntervalSeconds, TimeUnit.SECONDS);\n }\n }",
"public interface WeatherServiceCallback {\n void serviceSuccess(Channel channel);\n void serviceFailure(Exception exception);\n}",
"public interface WeatherServiceCallback {\n void serviceSuccess(Channel channel);\n void serviceFailure(Exception exception);\n}",
"public interface WeatherServiceCallback {\n void serviceSuccess(Channel channel);\n void serviceFailure(Exception exception);\n}",
"@ServiceMethod(returns = ReturnType.SINGLE)\n public void getHealthStatus() {\n getHealthStatusAsync().block();\n }",
"private void requestThread() {\n while (true) {\n long elapsedMillis = System.currentTimeMillis() - lastHeartbeatTime;\n long remainingMillis = heartbeatMillis - elapsedMillis;\n if (remainingMillis <= 0) {\n sendHeartbeats();\n } else {\n try {\n Thread.sleep(Math.max(remainingMillis, 3));\n } catch (InterruptedException e) {\n }\n }\n }\n }",
"public interface WeatherServiceCallback {\n void serviceSuccess(Channel channel);\n\n void serviceFailure(Exception exception);\n}",
"public void onUaCallAccepted(UserAgent ua)\n { changeStatus(UA_ONCALL);\n if (ua_profile.hangup_time>0) automaticHangup(ua_profile.hangup_time); \n }",
"void onServiceBegin(int taskCode);",
"private void monitorHBase() {\n if (hadoopRetrieveService == null) {\n return;\n }\n // logger.info(\"Checking Hbase health status ...\");\n List<PVTypeInfo> pvInfos = new ArrayList<>(aaRetrieveService.getAllPVInfo());\n if (pvInfos.isEmpty()) {\n // logger.info(\"No archving PV.\");\n return;\n }\n // Use the first PV for the checking\n String pv = pvInfos.get(0).getPvName();\n Calendar end = Calendar.getInstance();\n end.setTime(new Date());\n end.add(Calendar.YEAR, -10);\n Calendar start = Calendar.getInstance();\n start.setTime(end.getTime());\n start.add(Calendar.MINUTE, -30);\n try {\n hadoopRetrieveService.getData(pv, new Timestamp(start.getTime().getTime()),\n new Timestamp(end.getTime().getTime()), PostProcessing.FIRSTSAMPLE, 60, false, 1.0);\n } catch (IOException e) {\n logger.warn(\"HBase is down.\");\n hadoopRetrieveService = null;\n scheduledService.scheduleAtFixedRate(() -> reInitializeHBase(), 1000,\n SiteConfigUtil.getHbaseCheckingInterval(), TimeUnit.MILLISECONDS);\n }\n }",
"edu.usfca.cs.dfs.StorageMessages.HeartBeatOrBuilder getHeartBeatMsgOrBuilder();",
"@Override\r\n\tpublic void getHealth() {\n\t\t\r\n\t}",
"int getBeat();",
"@Override\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\t}",
"public void onIceConnected();"
]
| [
"0.7582189",
"0.6946416",
"0.6768623",
"0.657519",
"0.65630805",
"0.65460855",
"0.64089763",
"0.635418",
"0.6287055",
"0.627599",
"0.6234617",
"0.6138246",
"0.6130381",
"0.60721713",
"0.6056683",
"0.6049911",
"0.5957314",
"0.5892161",
"0.58697253",
"0.58389413",
"0.57971835",
"0.57241434",
"0.5714404",
"0.5703071",
"0.56814986",
"0.56776035",
"0.56708515",
"0.56662977",
"0.5645058",
"0.5635536",
"0.56256956",
"0.55791694",
"0.5569409",
"0.5569013",
"0.55573297",
"0.55211514",
"0.5507468",
"0.5495925",
"0.54910773",
"0.5428501",
"0.54176956",
"0.5406512",
"0.54038846",
"0.53731155",
"0.53536284",
"0.5350441",
"0.5349663",
"0.5328572",
"0.532626",
"0.5318382",
"0.5317756",
"0.5308607",
"0.5287557",
"0.52637756",
"0.5261888",
"0.52603686",
"0.52574104",
"0.52475166",
"0.5246897",
"0.5201673",
"0.51993555",
"0.5182409",
"0.5181423",
"0.51668096",
"0.51573265",
"0.5154771",
"0.51468605",
"0.5137629",
"0.5122134",
"0.51130056",
"0.5107049",
"0.50938284",
"0.5093155",
"0.5092181",
"0.50888723",
"0.50778985",
"0.5076864",
"0.5075072",
"0.5052119",
"0.5047715",
"0.5045948",
"0.5029899",
"0.5025621",
"0.5020701",
"0.5015168",
"0.5011579",
"0.5010156",
"0.5010156",
"0.5010156",
"0.49988428",
"0.49843568",
"0.4982653",
"0.49808306",
"0.49781626",
"0.49721506",
"0.4949597",
"0.49349347",
"0.49247566",
"0.49175045",
"0.4911924"
]
| 0.6637766 | 3 |
called after camera intent finished | @Override
public void onActivityResult(int requestCode, int resultCode, Intent intent) {
//photo taken from cam
if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {
if (_mImageUri != null) {
showTakenPhoto();
}
}
//photo chosen
if (requestCode == REQUEST_IMAGE_PICK && resultCode == RESULT_OK) {
_mImageUri = intent.getData();
try {
_bitmap = MediaStore.Images.Media.getBitmap(
getContentResolver(), _mImageUri);
ImageView imageView = (ImageView) findViewById(R.id.uploadedImage);
assert _bitmap != null;
String[] filePathColumn = {MediaStore.Images.Media.DATA};
Cursor cursor = getContentResolver().query(
_mImageUri, filePathColumn, null, null, null);
cursor.moveToFirst();
int columnIndex = cursor.getColumnIndex(filePathColumn[0]);
String filePath = cursor.getString(columnIndex);
cursor.close();
rotateImage(filePath);
imageView.setImageBitmap(scaleBitmap(_bitmap, 350));
_uploadButton.setEnabled(true);
} catch (FileNotFoundException e) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void cameraIntent() {\n startActivityForResult(new Intent(\"android.media.action.IMAGE_CAPTURE\"), 1);\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent intent)\n {\n if(requestCode==REQUEST_IMAGE_CAPTURE && resultCode==RESULT_OK)\n {\n mCurFaceImg.process();\n }\n super.onActivityResult(requestCode, resultCode, intent);\n }",
"public void onResume() {\n if (mCamera == null) {\n obtainCameraOrFinish();\n }\n }",
"@Override\n public void imageFromCamera() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n }\n }",
"public void onLaunchCamera(View view) {\n Intent intent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\n\n data.insertAnImage(OptionID.get(alg), null);\n Cursor imageCursor = data.getImageData(OptionID.get(alg));\n imageCursor.moveToNext();\n intent.putExtra(MediaStore.EXTRA_OUTPUT, Uri.fromFile(new File(getPhotoFileUri(imageCursor.getString(0))))); // set the image file name\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }",
"private void takePhotoCompleted() {\n if (MyDebug.LOG)\n Log.d(TAG, \"takePhotoCompleted\");\n // need to set jpeg_todo to false before calling onCompleted, as that may reenter CameraController to take another photo (if in auto-repeat burst mode) - see testTakePhotoRepeat()\n synchronized (background_camera_lock) {\n jpeg_todo = false;\n }\n checkImagesCompleted();\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n\n if (resultCode == Activity.RESULT_OK) {\n\n if (requestCode == REQUEST_CAMERA) {\n\n onCaptureImageResult(data);\n\n }\n\n }\n\n }",
"@Override\n public void onFinish() {\n if (camera == null)\n return;\n\n Camera.Parameters parameters = camera.getParameters();\n parameters.setFocusAreas(null);\n if (supportedFocusModes == null)\n supportedFocusModes = getSupportedFocusModes(parameters);\n if (supportedFocusModes.get(FOCUS_CONTINUOUS_PICTURE)) {\n parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_PICTURE);\n } else if (supportedFocusModes.get(FOCUS_CONTINUOUS_VIDEO)) {\n parameters.setFocusMode(Camera.Parameters.FOCUS_MODE_CONTINUOUS_VIDEO);\n }\n camera.setParameters(parameters);\n }",
"@Override\n public void onCameraPreviewStopped() {\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == ACTIVITY_START_CAMERA_APP && resultCode == RESULT_OK){\n /*//Todo: Mensaje para mostrar al usuario al capturar la fotografia\n// Toast.makeText(this,\"Picture taken successfully\",Toast.LENGTH_LONG).show();\n\n //Todo: Se crea el objeto Bundle con el nombre extras\n Bundle extras = data.getExtras();\n //Todo: Devuelve el bundle que contenga el intent\n Bitmap photoCaptureBitmap = (Bitmap) extras.get(\"data\");\n //Todo: Se asigna a mPhotoCapturedImageView el valor que contenga el Bitmap photoCaptureBitmap\n mPhotoCapturedImageView.setImageBitmap(photoCaptureBitmap);\n*/\n //Bitmap photoCaptureBitmap = BitmapFactory.decodeFile(mImageFileLocation);\n //mPhotoCapturedImageView.setImageBitmap(photoCaptureBitmap);\n rotateImage(setReduceImageSize());\n }\n }",
"@Override\n public void startCameraIntent() {\n Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(cameraIntent, PICK_FROM_CAMERA_REQUEST_CODE);\n }",
"private void cameraIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(context.getPackageManager()) != null) {\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,\n Uri.fromFile(photoFile));\n ((MessageActivity) context).startActivityForResult(takePictureIntent, CAMERA_REQUEST);\n }\n }\n }",
"public void openCamera(View view) {\n //do something here\n dispatchTakePictureIntent();\n\n }",
"public void onCameraOpened() {\n openCameraCommon();\n initializeControlByIntent();\n new Thread() {\n public void run() {\n try {\n Thread.sleep(500);\n PhotoModule.this.mIsCameraOpened = true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n }.start();\n }",
"private void dispatchTakePictureIntent() { // to camera\n\n // must be\n StrictMode.VmPolicy.Builder builder = new StrictMode.VmPolicy.Builder();\n StrictMode.setVmPolicy(builder.build());\n\n //stworzenie nazwy pliku dla nowego zdjęcia, bedzie nadpisywana za każdym razem\n File outFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES), \"example.jpg\");\n\n //zapisanie ścieżki do nowego zdjęcia z aparatu\n mCameraFileName = outFile.toString();\n Uri outUri = Uri.fromFile(outFile);\n Intent intent = new Intent();\n intent.setAction(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outUri);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(intent, REQUEST_IMAGE_CAPTURE);\n } else {\n Toast.makeText(this, \"External storage not available\", Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n protected void onResume() {\n super.onResume();\n cameraView.start();\n }",
"public void onLaunchCamera() {\n takePic.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // create Intent to take a picture and return control to the calling application\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(Driver_License_Scan.this, \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }\n });\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n try {\n\n // camera photo\n if (requestCode == REQUEST_IMAGE_CAPTURE && resultCode == RESULT_OK) {\n imageUri = Uri.fromFile(new File(mCameraFileName)); //zwraca zdjęcie z aparatu jako ścieszkę uri\n Log.d(TAG, \"onActivityResult: imageUri z aparatu: \" + imageUri);\n }\n\n // save picture to imageBitmap from taken mageUri from camera\n imageBitmap = MediaStore.Images.Media.getBitmap(this.getContentResolver(), imageUri);\n imageViewOfPhotoFromCamera.setImageBitmap(imageBitmap); // set imageBitmap in image View\n Log.d(TAG, \"onActivityResult, imageBitmap SAVED and set in imageView\");\n\n } catch (Exception e) {\n Log.d(TAG, \"onActivityResult, ERROr, imageBitmap NOT saved because e: \" + e);\n }\n }",
"public void obtainCameraOrFinish() {\n mCamera = getCameraInstance();\n if (mCamera == null) {\n Toast.makeText(VideoCapture.getSelf(), \"Fail to get Camera\", Toast.LENGTH_LONG).show();\n VideoCapture.getSelf().finish();\n }\n }",
"public void onLaunchCamera(View view) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Create a File reference to access to future access\n /*photoFile = getPhotoFileUri(photoFileName);\n\n // wrap File object into a content provider\n // required for API >= 24\n // See https://guides.codepath.com/android/Sharing-Content-with-Intents#sharing-files-with-api-24-or-higher\n Uri fileProvider = FileProvider.getUriForFile(this, \"com.codepath.fileprovider\", photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);*/\n\n // If you call startActivityForResult() using an intent that no app can handle, your app will crash.\n // So as long as the result is not null, it's safe to use the intent.\n if (intent.resolveActivity(getPackageManager()) != null) {\n // Start the image capture intent to take photo\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.android.fileprovider\",\n photoFile);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(intent, CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE);\n }\n }\n }",
"private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent ( MediaStore.ACTION_IMAGE_CAPTURE );\n //dam bao chi co mot hoat dodng camera\n if (takePictureIntent.resolveActivity ( getPackageManager () ) != null) {\n // tao file ma anh gui den\n File photoFile = null;\n try {\n photoFile = createImageFile ();\n } catch (IOException ex) {\n //ERROR\n }\n // neu co file gui anh vao photoFIle\n if (photoFile != null) {\n pathToFile = photoFile.getAbsolutePath ();\n Uri photoURI = FileProvider.getUriForFile ( this ,\n \"com.example.diem_danh_sv.fileprovider\" ,\n photoFile );\n takePictureIntent.putExtra ( MediaStore.EXTRA_OUTPUT , photoURI );\n startActivityForResult ( takePictureIntent , REQUEST_ID_IMAGE_CAPTURE );\n }\n }\n }",
"public void sendIntentToCamera() {\n\t\tIntent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n\t\t\n\t\t// Send the intent with id 2\n\t\tstartActivityForResult(i, 2);\n\t}",
"@Override\r\n public void onClick(View v) {\n Intent pictureIntent = new Intent(\r\n android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\r\n startActivityForResult(pictureIntent, TAKE_AVATAR_CAMERA_REQUEST);\r\n UtilSettings.this\r\n .removeDialog(AVATAR_DIALOG_ID);\r\n\r\n\r\n }",
"@Override\n public Mat onCameraFrame(CameraBridgeViewBase.CvCameraViewFrame inputFrame) {\n /*apply image effects to new frame*/\n Mat mat= hangman.decapitate(inputFrame);\n\n /*check if users clicked the capture button and if external storage is writable for save it*/\n if(isToSaveBitmap && isExternalStorageWritable()){\n isToSaveBitmap=false;\n Bitmap bmp;\n try {\n bmp = Bitmap.createBitmap(mat.cols(), mat.rows(), Bitmap.Config.ARGB_8888);\n Utils.matToBitmap(mat, bmp);\n File dir = getAlbumStorageDir(\"hangman\");\n String path =dir.getPath()+File.separator+ \"hangman\" +System.currentTimeMillis() + \".JPG\";\n File capture= new File(path);\n\n OutputStream out = null;\n try {\n capture.createNewFile();\n out = new FileOutputStream(capture);\n bmp.compress(Bitmap.CompressFormat.JPEG, 90, out);\n out.flush();\n\n /*Inform the media store that a new image was saved*/\n ContentValues values = new ContentValues();\n values.put(MediaStore.Images.Media.DATE_TAKEN, System.currentTimeMillis());\n values.put(MediaStore.Images.Media.MIME_TYPE, \"image/jpeg\");\n values.put(MediaStore.MediaColumns.DATA, path);\n getBaseContext().getContentResolver().insert(MediaStore.Images.Media.EXTERNAL_CONTENT_URI, values);\n\n /*if app was called with intent image capture */\n if(intentImageCapture){\n Intent result = new Intent(\"com.example.RESULT_ACTION\");\n result.setData(Uri.fromFile(capture));\n result.putExtra(Intent.EXTRA_STREAM,capture);\n result.setType(\"image/jpg\");\n setResult(Activity.RESULT_OK, result);\n finish();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n finally {\n try {\n out.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n catch (CvException e) {\n Log.e(\"Exception\", e.getMessage());\n e.printStackTrace();\n }\n }\n return mat;\n }",
"@Override\n public void onPictureTaken(byte[] bytes, Camera camera) {\n Intent intent = new Intent(getActivity(), ShowCaptureActivity.class);\n intent.putExtra(\"capture\", bytes);\n startActivity(intent);\n return;\n }",
"private void takePicture() {\n\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, REQUEST_CAMERA);\n\n }",
"public void takePictureFromCamera() {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(intent, CAMERA_REQUEST_CODE);\n\n }",
"private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }",
"public void onCameraPressed(View view) {\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\r\n\r\n // create a file handle for the phoot that will be taken\r\n this.photoFile = getFileForPhoto(this.filename);\r\n Uri fileProvider = FileProvider.getUriForFile(PersonDetailsActivity.this, \"com.example.labtest1\", this.photoFile);\r\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileProvider);\r\n\r\n // Try to open the camera app\r\n if (intent.resolveActivity(getPackageManager()) != null) {\r\n startActivityForResult(intent, TAKE_PHOTO_ACTIVITY_REQUEST_CODE);\r\n }\r\n }",
"@Override\n\t\t protected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tCameraActivity.setCameraOverlay(result, true);\n\t\t\t\tCameraActivity.taking_picture = false;\n\t\t }",
"@Override\n public void onClick(View v) {\n Cam.takePicture(shutterCallback, null, mPicture);\n// Cam.takePicture();\n }",
"private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Ensure there is a camera activity to handle the intent\n if(takePictureIntent.resolveActivity(getPackageManager()) != null) {\n //Create file where photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n }catch (IOException e){\n //Error occured while creating the file\n System.out.println(\"Exception in dispatch: \" + e.toString());\n }\n //continue only if the file was created correctly\n if(photoFile != null){\n photoUri = FileProvider.getUriForFile(\n this, \"com.example.android.fileprovider\", photoFile\n );\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoUri);\n startActivityForResult(takePictureIntent, CAMERA_REQUEST);\n }\n }\n }",
"private void openCamera() {\n Intent intent=new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // intent.setAction(Intent.ACTION_PICK);\n // intent.putExtra(MediaStore.EXTRA_OUTPUT,Image_uri);\n startActivityForResult(intent, camera_image_code);\n\n }",
"@Override\n\tpublic void onCameraViewStopped() {\n\n\t}",
"@Override\n protected void onPause() {\n super.onPause();\n releaseCamera();\n }",
"protected void startCamera() {\n profileImageCaptured = new File(\n Environment.getExternalStorageDirectory() + \"/\" + \"temp.png\");\n if (profileImageCaptured.exists())\n profileImageCaptured.delete();\n\n outputFileUri = Uri.fromFile(profileImageCaptured);\n Intent intent = new Intent(\n android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, outputFileUri);\n intent.putExtra(\"return-data\", true);\n startActivityForResult(intent, CAMERA_REQUEST);\n\n }",
"public void onClick(View v) {\n Intent i = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(i, cameraData);\n }",
"private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }",
"@Override\r\n public void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.custom_cameraactivity);\r\n mCamera = getCameraInstance();\r\n mCameraPreview = new CameraPreview(this, mCamera);\r\n FrameLayout preview = (FrameLayout) findViewById(R.id.camera_preview);\r\n preview.addView(mCameraPreview);\r\n\r\n Bundle extras = getIntent().getExtras();\r\n looc = extras.getString(\"coor\");\r\n\r\n Button captureButton = (Button) findViewById(R.id.button_capture);\r\n captureButton.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n mCamera.takePicture(null, null, mPicture);\r\n // havent try to use doinbackgroud test first\r\n\r\n }\r\n });\r\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode,\n Intent data) {\n if (requestCode == CAMERA_REQUEST_CODE && resultCode == RESULT_OK) {\n bitmap = (Bitmap) data.getExtras().get(\"data\");\n imageView.setImageBitmap(bitmap);\n callCloudVision(bitmap, feature);\n }\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n Log.e(TAG, \"onCreate\");\n\n IntentFilter filter = new IntentFilter();\n filter.addAction(END_CAMERA_ACTIVITY_BROADCAST);\n filter.addAction(GET_CAPTURE_RESULT_DATA_BROADCAST);\n registerReceiver(mReceiver, filter);\n\t\t\n Intent it = this.getIntent();\n if(it != null){\n deviceId = it.getIntExtra(\"cameraID\", -1);\n }\n Log.e(TAG, \"CAMERA_ID = \" + deviceId);\n\n Intent localIntent;\n localIntent = new Intent();\n localIntent.setAction(Intent.ACTION_MAIN);\n\t\tlocalIntent.setClassName(\"com.mediatek.stereocamera\",\"com.mediatek.stereocamera.StereoCamera\");\n localIntent.putExtra(\"cameraID\",deviceId);\n localIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n // Gionee zhangke 20160422 modify for CR01673305 start\n try {\n startActivityForResult(localIntent, 0);\n } catch (Exception e) {\n Log.e(TAG, \"ActivityNotFoundException\");\n Log.v(TAG, Log.getStackTraceString(e));\n }\n ((AutoMMI) getApplication()).recordResult(TAG, \"\", \"0\");\n\n }",
"void imFinished();",
"@Override\n protected void onPause() {\n ReleaseCamera();\n super.onPause();\n }",
"@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\tIntent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); \n\t\t startActivityForResult(cameraIntent, CAMERA_REQUEST); \n\t\t\t\t\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tmediaManager.onActivityResult(requestCode, resultCode, data);\n\t}",
"void onCaptureCompleted(CaptureRequest request, TotalCaptureResult result);",
"public void onFinish() {\n Intent intent = getIntent();\n String name = intent.getStringExtra(\"name\");\n String Uname = intent.getStringExtra(\"Uname\");\n String vehicle = intent.getStringExtra(\"vehicle\");\n int points = intent.getIntExtra(\"points\", 0);\n Intent intent2 = new Intent(MatchedActivity.this, UserAreaActivity.class);\n intent2.putExtra(\"name\", name);\n intent2.putExtra(\"vehicle\", vehicle);\n intent2.putExtra(\"Uname\", Uname);\n intent2.putExtra(\"points\", points);\n\n MatchedActivity.this.startActivity(intent2);\n }",
"private void pickFromCamera() {\n Intent startCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startCamera.putExtra(MediaStore.EXTRA_OUTPUT, uriImage);\n startActivityForResult(startCamera, IMAGE_PICK_CAMERA_CODE);\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.camera_view);\n\n setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);\n context = this;\n Log.i(TAG, \"Activity called\");\n try {\n restaurant = new JSONObject(SessionManager.getRestaurant(context));\n restaurentId = restaurant.getString(\"id\");\n JSONObject offer = new JSONObject(SessionManager.getOffer(context));\n offerId = offer.getString(\"id\");\n\n } catch (JSONException e) {\n Log.i(\"Exception:\", \"Exception:\" + e.getMessage());\n e.printStackTrace();\n }\n\n questionMark = (ImageView) findViewById(R.id.questonMarkBtn);\n isStatus = false;\n questionMark.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View arg0) {\n\n Intent intent = new Intent(context, PhotoTips.class);\n startActivity(intent);\n }\n });\n cameraLiveView = (CameraLiveView) findViewById(R.id.camera_live_view);\n cameraLiveView.setShutterCallback(shutterCallback);\n cameraLiveView.setRawCallback(rawCallback);\n cameraLiveView.setJpegCallback(jpegCallback);\n\n captureBtn = (Button) findViewById(R.id.cameraCaptureBtn);\n uploadBtn = (Button) findViewById(R.id.uploadBtn);\n cancelBtn = (Button) findViewById(R.id.retakeBtn);\n\n captureBtn.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View arg0) {\n cameraLiveView.takePicture();\n }\n });\n\n uploadBtn.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View arg0) {\n String filename = android.text.format.DateFormat.format(\"yyyyMMddhhmmss\", new java.util.Date()).toString()+\".jpeg\";\n Log.i(\"File Name\", \"file name is :\" + filename);\n String url = AndroidUtil.BASE_URL + \"/receipts?appkey=\" + ApplicationController.APP_ID + \n \t\t\"&locale=\"+AndroidUtil.LOCALE_HEADER_VALUE;\n// String url = getString(R.string.http_url) + \"/receipts?appkey=\" + ApplicationController.APP_ID + \n// \t\t\"&locale=\"+getString(R.string.locale_header_value);\n new SubmitReceiptTask().execute(url, getExternalCacheDir() + \"/receipt_upload_aroma.jpeg\", filename);\n }\n\n });\n\n cancelBtn.setOnClickListener(new OnClickListener() {\n\n @Override\n public void onClick(View arg0) {\n cancelPreviewImage();\n }\n });\n\n }",
"public void camara(){\n Intent fotoPick = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);\n String fecha = new SimpleDateFormat(\"yyyy_MM_dd_HH_mm_ss\").format(new Date());\n Uri uriSavedImage=Uri.fromFile(new File(getExternalFilesDir(Environment.DIRECTORY_DCIM),\"inmueble_\"+id+\"_\"+fecha+\".jpg\"));\n fotoPick.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);\n startActivityForResult(fotoPick,TAKE_PICTURE);\n\n }",
"@Override\n public void OnActivityResultReceived(int requestCode, int resultCode, Intent data) {\n\n }",
"public boolean handleActivityResult (int requestCode, int resultCode, Intent data) {\n boolean result = false;\n if (Activity.RESULT_OK != resultCode || null == mResultHandler) {\n return result;\n }\n\n Log.i(\"InputBoardManager#handleActivityResult, \"\n + \"mMediaInputHelper is null(\" + (null == mMediaInputHelper));\n switch (requestCode) {\n case REQ_INPUT_LOC:\n final double lat = data.getExtras().getDouble(\"target_lat\");\n final double lon = data.getExtras().getDouble(\"target_lon\");\n mResultHandler.onLocationInputted(lat, lon, null);\n result = true;\n break;\n case REQ_INPUT_VIDEO:\n if (null != mMediaInputHelper) {\n String[] videoPath = new String[2];\n try {\n mMediaInputHelper.handleVideoResult(\n mContext,\n data,\n PHOTO_SEND_WIDTH, PHOTO_SEND_HEIGHT,\n PHOTO_THUMBNAIL_WIDTH, PHOTO_THUMBNAIL_HEIGHT,\n videoPath);\n mResultHandler.onVideoInputted(videoPath[0], videoPath[1]);\n result = true;\n }\n catch (Exception e) {\n e.printStackTrace();\n Toast.makeText(mContext, e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n break;\n case REQ_INPUT_PHOTO:\n \tif(data != null){\n \tUri mImageCaptureUri = data.getData();\n// \tif( Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){\n// \t\tFile f = MediaInputHelper.makeOutputMediaFile(MediaInputHelper.MEDIA_TYPE_IMAGE, \".jpg\");\n// \t\toutputUri = Uri.fromFile(f);\n// \t}\n// \tLog.i(\"--mImageCaptureUri--\" + mImageCaptureUri);\n// \tdoCrop(mImageCaptureUri,outputUri);\t\n \t outputfilename = Database.makeLocalFilePath(UUID.randomUUID().toString(), \"jpg\");\n \t mContext.startActivityForResult(new Intent().setData(mImageCaptureUri).setClass(mContext, ImagePreviewActivity.class).putExtra(ImagePreviewActivity.OUTPUTPATH, outputfilename), REQ_INPUT_DOODLE);\n \t}else{\n if (null != mMediaInputHelper) {\n String[] photoPath = new String[2];\n if (mMediaInputHelper.handleImageResult(\n mContext,\n data,\n PHOTO_SEND_WIDTH, PHOTO_SEND_HEIGHT,\n PHOTO_THUMBNAIL_WIDTH, PHOTO_THUMBNAIL_HEIGHT,\n photoPath)) {\n outputfilename = Database.makeLocalFilePath(UUID.randomUUID().toString(), \"jpg\");\n mContext.startActivityForResult(\n new Intent(mContext, BitmapPreviewActivity.class)\n .putExtra(BitmapPreviewActivity.EXTRA_MAX_WIDTH, PHOTO_SEND_WIDTH)\n .putExtra(BitmapPreviewActivity.EXTRA_MAX_HEIGHT, PHOTO_SEND_HEIGHT)\n .putExtra(BitmapPreviewActivity.EXTRA_BACKGROUND_FILENAME, photoPath[0])\n .putExtra(BitmapPreviewActivity.EXTRA_OUTPUT_FILENAME, outputfilename),\n REQ_INPUT_DOODLE\n );\n }\n }\n \t}\n\n result = true; \n break;\n case REQ_INPUT_CROP:\n if (null != mMediaInputHelper) {\n \t//Log.i(\"--after crop data --\" + data.getData());\n \t//针对部分4.4机型返回的intent(data)为空,重新传进之前的Uri\n \tif(data.getData() == null){\n \t\tdata = new Intent();\n \t\tdata.setData( outputUri);\n \t}\n String[] photoPath = new String[2];\n boolean istrue =mMediaInputHelper.handleImageResult(\n mContext,\n data,\n PHOTO_SEND_WIDTH, PHOTO_SEND_HEIGHT,\n PHOTO_THUMBNAIL_WIDTH, PHOTO_THUMBNAIL_HEIGHT,\n photoPath);\n if (istrue) {\n outputfilename = Database.makeLocalFilePath(UUID.randomUUID().toString(), \"jpg\");\n mContext.startActivityForResult(\n new Intent(mContext, BitmapPreviewActivity.class)\n .putExtra(BitmapPreviewActivity.EXTRA_MAX_WIDTH, PHOTO_SEND_WIDTH)\n .putExtra(BitmapPreviewActivity.EXTRA_MAX_HEIGHT, PHOTO_SEND_HEIGHT)\n .putExtra(BitmapPreviewActivity.EXTRA_BACKGROUND_FILENAME, photoPath[0])\n .putExtra(BitmapPreviewActivity.EXTRA_OUTPUT_FILENAME, outputfilename),\n REQ_INPUT_DOODLE\n );\n }\n }\n result = true;\n break;\n case REQ_INPUT_DOODLE: {\n String[] photoPath = new String[2];\n photoPath[0] = outputfilename;\n\n // generate thumbnail\n File f = MediaInputHelper.makeOutputMediaFile(MediaInputHelper.MEDIA_TYPE_THUMNAIL, \".jpg\");\n if (f != null) {\n photoPath[1] = f.getAbsolutePath();\n Bitmap thumbnail = BmpUtils.decodeFile(photoPath[0],\n PHOTO_THUMBNAIL_WIDTH, PHOTO_THUMBNAIL_HEIGHT);\n Log.i(\"--photo[0]--\" + photoPath[0]);\n Log.i(\"--photo[1]--\" + photoPath[1]);\n try {\n FileOutputStream fos = new FileOutputStream(photoPath[1]);\n thumbnail.compress(Bitmap.CompressFormat.JPEG, 90, fos);\n fos.close();\n } catch (java.io.IOException e) {\n e.printStackTrace();\n }\n }\n\n mResultHandler.onPhotoInputted(photoPath[0], photoPath[1]);\n result = true;\n break;\n }\n case REQ_INPUT_PHOTO_FOR_DOODLE:\n \tif(data != null){\n \t\tUri mImageCaptureUri2 = data.getData();\n// \t\tif( Build.VERSION.SDK_INT >= Build.VERSION_CODES.KITKAT && Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED)){\n// \t\tFile f = MediaInputHelper.makeOutputMediaFile(MediaInputHelper.MEDIA_TYPE_IMAGE, \".jpg\");\n// \t\toutputUri2 = Uri.fromFile(f);\n// \t}\n// \t\tdoCrop_doodle(mImageCaptureUri2,outputUri2);\n \t\t outputfilename = Database.makeLocalFilePath(UUID.randomUUID().toString(), \"jpg\");\n \t mContext.startActivityForResult(new Intent().setData(mImageCaptureUri2)\n \t\t\t .setClass(mContext, ImagePreviewActivity.class)\n \t\t\t .putExtra(ImagePreviewActivity.OUTPUTPATH, outputfilename)\n \t\t\t .putExtra(ImagePreviewActivity.ISDOODLE, true), REQ_INPUT_PHOTO_FOR_DOODLE_CROP);\n \t}else {\n if (null != mMediaInputHelper) {\n \tLog.i(\"--mLastImageUri\" + mMediaInputHelper.getLastImageUri());\n \tFile f = MediaInputHelper.makeOutputMediaFile(MediaInputHelper.MEDIA_TYPE_IMAGE, \".jpg\");\n \t\toutputUri2 = Uri.fromFile(f);\n \tdoCrop_doodle(mMediaInputHelper.getLastImageUri(), outputUri2);\n// String[] photoPath = new String[2];\n// if (mMediaInputHelper.handleImageResult(\n// mContext,\n// data,\n// PHOTO_SEND_WIDTH, PHOTO_SEND_HEIGHT,\n// PHOTO_THUMBNAIL_WIDTH, PHOTO_THUMBNAIL_HEIGHT,\n// photoPath)) {\n// outputfilename = Database.makeLocalFilePath(UUID.randomUUID().toString(), \"jpg\");\n// mContext.startActivityForResult(\n// new Intent(mContext, DoodleActivity.class)\n// .putExtra(DoodleActivity.EXTRA_MAX_WIDTH, PHOTO_SEND_WIDTH)\n// .putExtra(DoodleActivity.EXTRA_MAX_HEIGHT, PHOTO_SEND_HEIGHT)\n// .putExtra(DoodleActivity.EXTRA_BACKGROUND_FILENAME, photoPath[0])\n// .putExtra(DoodleActivity.EXTRA_OUTPUT_FILENAME, outputfilename),\n// REQ_INPUT_DOODLE\n// );\n// }\n }\n \t}\n \t\n result = true;\n break;\n case REQ_INPUT_PHOTO_FOR_DOODLE_CROP:\n if (null != mMediaInputHelper) {\n \tLog.i(\"--after crop data --\" + data.getData());\n \t//针对部分4.4机型返回的intent(data)为空,重新传进之前的Uri\n \tif(data.getData() == null){\n \t\tdata = new Intent();\n \t\tdata.setData( outputUri2);\n \t}\n String[] photoPath = new String[2];\n if (mMediaInputHelper.handleImageResult(\n mContext,\n data,\n PHOTO_SEND_WIDTH, PHOTO_SEND_HEIGHT,\n PHOTO_THUMBNAIL_WIDTH, PHOTO_THUMBNAIL_HEIGHT,\n photoPath)) {\n outputfilename = Database.makeLocalFilePath(UUID.randomUUID().toString(), \"jpg\");\n mContext.startActivityForResult(\n new Intent(mContext, DoodleActivity.class)\n .putExtra(DoodleActivity.EXTRA_MAX_WIDTH, PHOTO_SEND_WIDTH)\n .putExtra(DoodleActivity.EXTRA_MAX_HEIGHT, PHOTO_SEND_HEIGHT)\n .putExtra(DoodleActivity.EXTRA_BACKGROUND_FILENAME, photoPath[0])\n .putExtra(DoodleActivity.EXTRA_OUTPUT_FILENAME, outputfilename),\n REQ_INPUT_DOODLE\n );\n }\n }\n \tresult = true;\n break;\n default:\n break;\n }\n\n Log.i(\"InputBoardManager#handleActivityResult, handle result is \" + result);\n return result;\n }",
"public void onPostExecute(ResizeBundle result) {\n JpegPictureCallback.this.saveFinalPhoto(result.jpegData, name, result.exif, cameraProxy);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (requestCode == CAMERA_CAPTURE_IMAGE_REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n // successfully captured the image\n // display it in image view\n Utils.previewCapturedImage(this, realm, Integer.valueOf(station.getId()));\n //Toast.makeText(getApplicationContext(),intent.getStringExtra(\"id_station\"), Toast.LENGTH_SHORT).show();\n } else if (resultCode == RESULT_CANCELED) {\n // user cancelled Image capture\n Toast.makeText(getApplicationContext(),\n \"User cancelled image capture\", Toast.LENGTH_SHORT)\n .show();\n } else {\n // failed to capture image\n Toast.makeText(getApplicationContext(),\n \"Sorry! Failed to capture image\", Toast.LENGTH_SHORT)\n .show();\n }\n }\n }",
"private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(getPackageManager()) != null) {\n // Create the File where the photo should go\n File photoFile = null;\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(this,\n \"com.example.android.fileprovider\",\n photoFile);\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takePictureIntent, REQUEST_IMAGE_CAPTURE);\n }\n }\n }",
"@Override\n public void run() {\n Log.d(TAG, \"run: \" + pictureFile.getAbsolutePath());\n startActivity(new Intent(PlaceOrderNextActivity.this, PlaceOrderFinalActivity.class)\n .putExtra(\"audioData\", getIntent().getStringExtra(\"audioData\"))\n .putExtra(\"distId\", getIntent().getStringExtra(\"distId\"))\n .putExtra(\"dist\", distModel)\n .putExtra(\"imagePath\", pictureFile.getAbsolutePath())\n .putExtra(\"orderType_id\", getIntent().getStringExtra(\"orderType_id\"))\n .putExtra(\"orderType_fees\", getIntent().getStringExtra(\"orderType_fees\"))\n .putExtra(\"OrderAudioLength\", getIntent().getIntExtra(\"OrderAudioLength\", 0))\n .putExtra(\"imageFrom\", FLAG_CAMERA));//1-camera, 0-gallery\n overridePendingTransition(R.anim.enter_right, android.R.anim.fade_out);\n\n }",
"void onPictureCompleted();",
"protected void cameraClicked() {\n\t\tif (this.pictureFromCameraString != null\n\t\t\t\t&& !\"\".equals(this.pictureFromCameraString)) {\n\t\t\timageAvailable();\n\t\t} else {\n\t\t\timageUnavailable();\n\t\t}\n\t\tthis.cameraIsActive = true;\n\t\tthis.camera.addStyleDependentName(\"highlighted\");\n\t\tthis.upload.removeStyleDependentName(\"highlighted\");\n\t\tthis.inputPanel.setWidget(this.cameraPanel);\n\t\tgetCameraPictureNative();\n\t}",
"@Override\n public void run() {\n preview.startAnimation(fadein);\n //Launch camera layout\n camera_linear.startAnimation(fadein);\n //Launch capture button\n captureButton.startAnimation(fadein);\n //Make these components visible\n preview.setVisibility(View.VISIBLE);\n captureButton.setVisibility(View.VISIBLE);\n camera_linear.setVisibility(View.VISIBLE);\n //Create onClickListener for the capture button\n captureButton.setOnClickListener(\n new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n // get an image from the camera\n if(cameraRecorder.getSafeToTakePicture()) {\n Log.i(\"Taking Picture: \", \"Safe\");\n captureButton.setImageResource(R.drawable.kids_ui_record_anim_alt_mini);\n mCamera.takePicture(null, null, mPicture);\n cameraRecorder.setSafeToTakePicture(false);\n }\n\n else {\n Log.i(\"Taking Picture: \", \"Unsafe\");\n }\n }\n }\n );\n\n }",
"@Override\n public void onClick(View arg0) {\n if (arg0.getId() == R.id.fab) {\n takePicture();\n /* try {\n//use standard intent to capture an image\n Intent captureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n//we will handle the returned data in onActivityResult\n startActivityForResult(captureIntent, CAMERA_CAPTURE);\n } catch(ActivityNotFoundException anfe){\n//display an error message\n String errorMessage = \"Whoops - your device doesn't support capturing images!\";\n Toast toast = Toast.makeText(getActivity(), errorMessage, Toast.LENGTH_SHORT);\n toast.show();\n }*/\n }\n\n }",
"public void camera(){\n System.out.println(\"I am taking pictures...\");\r\n }",
"void cameraClosed();",
"public void onPause() {\n releaseCamera();\n }",
"private void dispatchTakePictureIntent() {\n Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n // Ensure that there's a camera activity to handle the intent\n if (takePictureIntent.resolveActivity(context.getPackageManager()) != null) {\n // Create the File where the photo should go\n try {\n photoFile = createImageFile();\n } catch (IOException ex) {\n // Error occurred while creating the File\n Log.e(TAG, \"error.\");\n }\n // Continue only if the File was successfully created\n if (photoFile != null) {\n takePictureIntent.putExtra(MediaStore.EXTRA_OUTPUT,\n Uri.fromFile(photoFile));\n ((Activity) context).startActivityForResult(takePictureIntent, REQUEST_TAKE_PHOTO);\n }\n }\n else {\n Toast toast = Toast.makeText(context, \"Sorry, no camera app found.\", Toast.LENGTH_SHORT);\n toast.show();\n }\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n Log.e(TAG, \"onOpened\");\n cameraDevice = camera;\n createCameraPreview();\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n Log.e(TAG, \"onOpened\");\n cameraDevice = camera;\n createCameraPreview();\n }",
"private void captureImage() {\n //Information about intents: http://developer.android.com/reference/android/content/Intent.html\n //Basically used to start up activities or send data between parts of a program\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n //Obtains the unique URI which sets up and prepares the image file to be taken, where it is to be placed,\n //and errors that may occur when taking the image.\n fileUri = getOutputMediaFileUri(MEDIA_TYPE_IMAGE);\n //Stores this information in the Intent (which can be usefully passed on to the following Activity)\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n // start the image capture Intent (opens up the camera application)\n startActivityForResult(intent, CAMERA_CAPTURE_IMAGE_REQUEST_CODE);\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\tif (requestCode == CAMERA_PIC_REQUEST\n\t\t&& resultCode == Activity.RESULT_OK) {\n\t Bitmap picture = (Bitmap) data.getExtras().get(\"data\");\n\t ivMemberPicture.setImageBitmap(picture);\n\t pictureTaken = true;\n\t}\n }",
"public void onCamera();",
"@Override\n public void onOpened(CameraDevice camera) {\n Log.e(TAG, \"onOpened\");\n mCameraDevice = camera;\n startPreview();\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }",
"@Override\n public void onOpened(CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }",
"@Override\n public void onPictureTaken(byte[] data, Camera camera) {\n System.out.println(\"picturex\");\n\n File mediaStorageDir = new File(\n Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES),\n \"Aloah\");\n\n if (!mediaStorageDir.exists()) {\n if (!mediaStorageDir.mkdirs()) {\n System.out.println(\"failed to create directory\");\n return;\n }\n }\n\n File pictureFile = new File(mediaStorageDir.getPath() +\n File.separator + \"photo\" + System.currentTimeMillis() + \".png\");\n\n try {\n FileOutputStream fos = new FileOutputStream(pictureFile);\n fos.write(data);\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n attachMetaData(pictureFile);\n\n System.out.println(\"Path taken photo: \" + pictureFile.getAbsolutePath());\n String path = pictureFile.getAbsolutePath();\n\n\n Intent intentResult = new Intent();\n intentResult.putExtra(PHOTO_PATH, path);\n setResult(RESULT_OK, intentResult);\n finish();\n\n// try {\n// FileOutputStream stream = new FileOutputStream(file);\n// bitmap.compress(Bitmap.CompressFormat.PNG, 50, stream);\n// stream.close();\n//\n// System.out.println(\"picturex added to downloads\");\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n }",
"public void mudaFoto(View view){\n Intent tirarFoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(tirarFoto, TIRAR_FOTO);\n }",
"private void handleCaptureCompleted(CaptureResult result) {\n if (MyDebug.LOG)\n Log.d(TAG, \"capture request completed\");\n test_capture_results++;\n modified_from_camera_settings = false;\n\n handleRawCaptureResult(result);\n\n if (previewBuilder != null) {\n previewBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_CANCEL);\n String saved_flash_value = camera_settings.flash_value;\n if (use_fake_precapture_mode && fake_precapture_torch_performed) {\n camera_settings.flash_value = \"flash_off\";\n }\n // if not using fake precapture, not sure if we need to set the ae mode, but the AE mode is set again in Camera2Basic\n camera_settings.setAEMode(previewBuilder, false);\n // n.b., if capture/setRepeatingRequest throw exception, we don't call the take_picture_error_cb.onError() callback, as the photo should have been taken by this point\n try {\n capture();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to cancel autofocus after taking photo\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n }\n if (use_fake_precapture_mode && fake_precapture_torch_performed) {\n // now set up the request to switch to the correct flash value\n camera_settings.flash_value = saved_flash_value;\n camera_settings.setAEMode(previewBuilder, false);\n }\n previewBuilder.set(CaptureRequest.CONTROL_AF_TRIGGER, CameraMetadata.CONTROL_AF_TRIGGER_IDLE); // ensure set back to idle\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to start preview after taking photo\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n preview_error_cb.onError();\n }\n }\n fake_precapture_torch_performed = false;\n\n if (burst_type == BurstType.BURSTTYPE_FOCUS && previewBuilder != null) { // make sure camera wasn't released in the meantime\n if (MyDebug.LOG)\n Log.d(TAG, \"focus bracketing complete, reset manual focus\");\n camera_settings.setFocusDistance(previewBuilder);\n try {\n setRepeatingRequest();\n } catch (CameraAccessException e) {\n if (MyDebug.LOG) {\n Log.e(TAG, \"failed to set focus distance\");\n Log.e(TAG, \"reason: \" + e.getReason());\n Log.e(TAG, \"message: \" + e.getMessage());\n }\n e.printStackTrace();\n }\n }\n final Activity activity = (Activity) context;\n activity.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n if (MyDebug.LOG)\n Log.d(TAG, \"processCompleted UI thread call checkImagesCompleted()\");\n synchronized (background_camera_lock) {\n done_all_captures = true;\n if (MyDebug.LOG)\n Log.d(TAG, \"done all captures\");\n }\n checkImagesCompleted();\n }\n });\n }",
"public void takePicture()\n {\n\n Intent cameraIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n\n startActivityForResult(cameraIntent, TAKE_PHOTO_CODE);\n }",
"@Override \n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data); \n\t\tif (requestCode == RESULT_TAKE_PHOTOE && resultCode == Activity.RESULT_OK) { \n\n\t\t\tString pathCamera = data.getStringExtra(\"pathCamera\");\n\t\t\tBitmap bitmap = CommandTools.convertToBitmap(pathCamera, 100, 100);\n\n\t\t\tbase64 = CommandTools.bitmapToBase64(bitmap);\n\t\t\tmHandler.sendEmptyMessage(0x0013);\n\t\t}else if (requestCode == RESULT_LOAD_IMAGE && resultCode == RESULT_OK && null != data) { \n\t\t\tUri result = data == null || resultCode != RESULT_OK ? null : data.getData();\n\n\t\t\tBitmap bitmap = CommandTools.getBitmapFromUri(ServerMainActivity.this, result);\n\t\t\tbase64 = CommandTools.bitmapToBase64(bitmap);\n\t\t\tmHandler.sendEmptyMessage(0x0013);\n\t\t}\n\t}",
"@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tsuper.onActivityResult(requestCode, resultCode, data);\n\t\tif (requestCode == camera.IMAGE_CAPTURE) {\n\n\t\t\tif (resultCode == RESULT_OK){\n\t\t\t\tCommon.PATH=BitmapUtils.getAbsoluteImagePath(Preview.this, camera.getImageUri());\n\t\t\t\tIntent intent = new Intent(Preview.this,Preview.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\n\t\t\t}\n\t\n\t}",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n FrontCameraVerificationActivity.this.finish();\n }",
"private void captureImage() {\n String imagename = \"urPics.jpg\";\n File file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES) + File.separator + imagename);\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n FileUri = Uri.fromFile(file);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, FileUri);\n // start the image capture Intent\n startActivityForResult(intent, REQUEST_CODE_CAMERA);\n }",
"private void clickpic() {\n if (getApplicationContext().getPackageManager().hasSystemFeature(\n PackageManager.FEATURE_CAMERA)) {\n // Open default camera\n Intent intent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n intent.putExtra(MediaStore.EXTRA_OUTPUT, fileUri);\n\n // start the image capture Intent\n startActivityForResult(intent, 100);\n\n\n } else {\n Toast.makeText(getApplication(), \"Camera not supported\", Toast.LENGTH_LONG).show();\n }\n }",
"@Override\n\tpublic void videoComplete() {\n\t\t\n\t}",
"public void onLoginCompleted() {\r\n\t\tLog.d(TAG, \"Login was completed\");\r\n\t\t/* Transition to the gridview which will hold the images */\r\n\t\tIntent viewAllImages = new Intent(this,ImageGridView.class);\r\n this.startActivityForResult(viewAllImages, 0);\r\n\t}",
"@Nullable\r\n @Override\r\n public View onCreateView(LayoutInflater inflater,ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_camera , container, false);\r\n\r\n mSurfaceView = view.findViewById(R.id.surfaceView);\r\n mSurfaceHolder = mSurfaceView.getHolder();\r\n\r\n if(ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.CAMERA) != PackageManager.PERMISSION_GRANTED){\r\n ActivityCompat.requestPermissions(getActivity(), new String[] {Manifest.permission.CAMERA}, CAMERA_REQUEST_CODE);\r\n } else{\r\n mSurfaceHolder.addCallback(this);\r\n mSurfaceHolder.setType(SurfaceHolder.SURFACE_TYPE_PUSH_BUFFERS);\r\n }\r\n\r\n Button mLogout = view.findViewById(R.id.logout);\r\n Button mCapture = view.findViewById(R.id.capture);\r\n Button mFindUsers = view.findViewById(R.id.findUsers);\r\n\r\n mLogout.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n logOut();\r\n }\r\n });\r\n mFindUsers.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n findUsers();\r\n }\r\n });\r\n mCapture.setOnClickListener(new View.OnClickListener() {\r\n @Override\r\n public void onClick(View v) {\r\n captureImage();\r\n }\r\n });\r\n\r\n jpegCallback = new Camera.PictureCallback(){\r\n @Override\r\n public void onPictureTaken(byte[] data, Camera camera) {\r\n Bitmap decodeBitmap = BitmapFactory.decodeByteArray(data, 0, data.length);\r\n //creates the temporary file and gets the path\r\n String filePath= tempFileImage(getActivity(),decodeBitmap,\"name\");\r\n Intent intent = new Intent(getActivity(), ShowCaptureActivity.class);\r\n\r\n //passes the file path string with the intent\r\n intent.putExtra(\"path\", filePath);\r\n\r\n startActivity(intent);\r\n\r\n }\r\n };\r\n\r\n return view;\r\n }",
"void onCaptureEnd();",
"@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tToast.makeText(context, \"Capture completed!\", Toast.LENGTH_SHORT).show();\n\t\t\tloadingAlert.dismiss();\n\t\t\t((SpectroActivity)spectroFragment.getActivity()).updateLibraryFiles();\n\t\t}",
"public void openCamera() {\n \n\n }",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n\n if (requestCode == CAPTURE_IMAGE_ACTIVITY_REQUEST_CODE) {\n if (resultCode == RESULT_OK) {\n\n Bitmap bp = (Bitmap) data.getExtras().get(\"data\");\n //iv.setImageBitmap(bp);\n storeImage(bp);\n\n Intent inte = new Intent(this, ScanResults.class);\n startActivity(inte);\n\n } else if (resultCode == RESULT_CANCELED) {\n // User cancelled the image capture\n } else {\n // Image capture failed, advise user\n }\n }\n\n\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n System.out.println(\"SONO IN FUNZIONE: onActivityResult\");\n\n if (requestCode == 1001)\n {\n\n if (resultCode == Activity.RESULT_OK)\n {\n System.out.println(\"SONO IN FUNZIONE: onActivityResult - dentro i due if\");\n\n galleryAddPic();\n\n //ora vorrei tentare di inviare l'immagine ricevuta\n String path_e_nome_foto = currentImageUri.toString();\n System.out.println(\"PROVA NOME FOTO: \" + path_e_nome_foto);\n // path_e_nome_foto mi si presenterà così:\n // file:///storage/sdcard/Pictures/Tuxuri/TUX_20150428_190207.jpg\n //quindi voglio togliere i primi 7 caratteri di quella stringa\n path_e_nome_foto = path_e_nome_foto.substring(7);\n\n Path = path_e_nome_foto;\n System.out.println(\"PROVA NOME FOTO: \" + path_e_nome_foto);\n\n\n }\n else if (resultCode == Activity.RESULT_CANCELED) {\n // User cancelled the image capture\n } else\n {\n // Image capture failed, advise user\n }\n }\n\n Pass (Path);\n }",
"@Override\n protected void onResume() {\n super.onResume();\n cameraLiveView.onResume();\n }",
"@Override\n public void onOpened(@NonNull CameraDevice camera) {\n cameraDevice = camera;\n createCameraPreview();\n }",
"public void onFinish() {\n\n }",
"@Override\n public void onClick(View view) {\n Intent takeFoto = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n if(takeFoto.resolveActivity(getPackageManager()) != null){\n File photoFile = null;\n try{\n photoFile = createImageFile();\n } catch (IOException ex) {\n Log.d(\"FALLO\",\"TOMAR FOTO\");\n }\n if(photoFile != null) {\n Uri photoURI = FileProvider.getUriForFile(getApplicationContext(), \"com.B3B.farmbros.android.fileprovider\", photoFile);\n takeFoto.putExtra(MediaStore.EXTRA_OUTPUT, photoURI);\n startActivityForResult(takeFoto, REQUEST_IMAGE_SAVE);\n }\n }\n }",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\treleaseCamera();\n\t}",
"@Override\n public void onClick(View v) {\n startActivity(new Intent(getActivity(), CameraActivity.class));\n }",
"public void onFinish() {\n }",
"@Override\n public void onVideoEnd() {\n super.onVideoEnd();\n }",
"@Override\n public void onOpened(@NonNull CameraDevice camera) {\n mCameraDevice = camera;\n createCameraPreview();\n }",
"public void toTakeAPicture(View view) {\n requestCameraPermissions();\n Intent launchCamera = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);\n startActivityForResult(launchCamera, Constants.CAM_REQUEST);\n\n\n\n }",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n if (resultCode == RESULT_OK) {\n if (requestCode == CAMERA_CAPTURE_IMAGE_PREVIEW) {\n previewCapturedImage();\n }\n } else if (resultCode == RESULT_CANCELED) {\n // user cancelled Image capture\n Toast.makeText(this, \"Image capture cancelled.\", Toast.LENGTH_LONG).show();\n } else {\n // failed to capture image\n Toast.makeText(getApplicationContext(), \"Image capture failed.\", Toast.LENGTH_LONG).show();\n }\n }"
]
| [
"0.7136372",
"0.6943413",
"0.69216263",
"0.69183713",
"0.6916481",
"0.69127744",
"0.68979347",
"0.6891996",
"0.68654144",
"0.6810539",
"0.674436",
"0.66809404",
"0.66675735",
"0.66637343",
"0.6593785",
"0.6576912",
"0.6566068",
"0.65596217",
"0.6532391",
"0.65264785",
"0.65258986",
"0.65255296",
"0.6520545",
"0.6517811",
"0.6515874",
"0.648205",
"0.6475204",
"0.64674497",
"0.64545465",
"0.6449077",
"0.64383763",
"0.6427103",
"0.6416407",
"0.641287",
"0.6404353",
"0.6399547",
"0.63841563",
"0.63786787",
"0.63769215",
"0.6366565",
"0.6363399",
"0.63615155",
"0.63536",
"0.6349516",
"0.63460773",
"0.6341191",
"0.63391274",
"0.63206834",
"0.63199216",
"0.6316248",
"0.6298504",
"0.62927794",
"0.6279186",
"0.6276156",
"0.62734395",
"0.627209",
"0.6267437",
"0.6266026",
"0.6264397",
"0.6263705",
"0.6254927",
"0.6248121",
"0.6232859",
"0.6227491",
"0.6200669",
"0.6200669",
"0.6195171",
"0.61926365",
"0.61883384",
"0.6185489",
"0.6176645",
"0.6176645",
"0.6160941",
"0.6157304",
"0.6153857",
"0.6150788",
"0.6149444",
"0.614753",
"0.6146578",
"0.6145806",
"0.6136128",
"0.6127103",
"0.6126099",
"0.6122991",
"0.6115625",
"0.61132646",
"0.6111579",
"0.6107956",
"0.61079043",
"0.6107768",
"0.6103261",
"0.60915285",
"0.6090925",
"0.60833716",
"0.6082507",
"0.60788727",
"0.60772187",
"0.6075283",
"0.60726523",
"0.6071579"
]
| 0.6474181 | 27 |
Called when the activity is first created. | @Override
public void onCreate(Bundle savedInstanceState)
{
super.onCreate(savedInstanceState);
setContentView(R.layout.side);
Button t=(Button)findViewById(R.id.text2);
t.setText("Events");
t.setTypeface(null, 0);
setListAdapter(new ArrayAdapter(this, R.layout.simplelistitem, Eventtypes));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n initData();\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }",
"@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }",
"protected void onCreate() {\n }",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tLog.e(TAG, \"onActivityCreated-------\");\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle arg0) {\n\t\tsuper.onActivityCreated(arg0);\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tinitData(savedInstanceState);\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitView();\r\n\t}",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\tsetview();\r\n\t}",
"@Override\n public void onCreate()\n {\n\n super.onCreate();\n }",
"@Override\n public void onCreate() {\n initData();\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tLogUtil.d(TAG, \"onActivityCreated---------\");\n\t\tinitData(savedInstanceState);\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onCreate() {\n super.onCreate();\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n }",
"@Override\n\tpublic void onActivityCreated(@Nullable Bundle savedInstanceState) {\n\t\tinitView();\n\t\tinitListener();\n\t\tinitData();\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }",
"@Override\n\tpublic void onActivityCreated(Activity activity, Bundle savedInstanceState)\n\t{\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}",
"protected void onFirstTimeLaunched() {\n }",
"@Override\n public void onActivityCreated(@Nullable Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n initData(savedInstanceState);\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle bundle) {\n }",
"@Override\n public void onCreate() {\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tsetupTextviews();\n\t\tsetupHorizontalScrollViews();\n\t\tsetupHorizontalSelectors();\n\t\tsetupButtons();\n\t}",
"@Override\n public void onCreate() {\n\n }",
"@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t\t\r\n\t\tinitViewPager();\r\n\t\t\r\n\t\tinitView();\r\n\r\n\t\tinitCursor();\r\n\t\t\r\n\t\tinithuanxin(savedInstanceState);\r\n\t\r\n \r\n\t}",
"public void onCreate() {\n }",
"@Override\n\tpublic void onCreate() {\n\t\tLog.i(TAG, \"onCreate\");\n\t\tsuper.onCreate();\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsetContentView(R.layout.caifushi_record);\n\t\tsuper.onCreate(savedInstanceState);\n\t\tinitview();\n\t\tMyApplication.getInstance().addActivity(this);\n\t\t\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_recent_activity);\n\t\tsetTitleFromActivityLabel(R.id.title_text);\n\t\tsetupStartUp();\n\t}",
"@Override\n\tpublic void onCreate() {\n\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t\tgetLocation();\n\n\t\tregisterReceiver();\n\n\t}",
"@Override\n public void onActivityCreated(Activity activity, Bundle savedInstanceState) {\n eventManager.fire(Event.ACTIVITY_ON_CREATE, activity);\n }",
"@Override\n public void onCreate()\n {\n\n\n }",
"@Override\n\tprotected void onCreate() {\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tAnnotationProcessor.processActivity(this);\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n if (!KramPreferences.hasStartedAppBefore(this)) {\n // First time app is started\n requestFirstHug();\n HugRequestService.scheduleHugRequests(this);\n KramPreferences.putHasStartedAppBefore(this);\n }\n\n setContentView(R.layout.activity_main);\n initMonthView(savedInstanceState);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.act_myinfo);\n\t\tinitView();\n\t\tinitEvents();\n\n\t}",
"public void onCreate();",
"public void onCreate();",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.auth_activity);\n connectVariablesToViews();\n listenToFields();\n WorkSpace.authorizationCompleted = false;\n }",
"@Override\n public void onCreate() {\n Log.d(TAG, TAG + \" onCreate\");\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) \r\n\t{\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\t\r\n\t\t// Get a reference to the tranistbuddy model.\r\n\t\tTransitBuddyApp app = (TransitBuddyApp)this.getApplicationContext();\r\n\t\tmModel = app.getTransitBuddyModel();\r\n\t\tmSettings = app.getTransitBuddySettings();\r\n\t\t\r\n\t\tsetTitle( getString(R.string.title_prefix) + \" \" + mSettings.getSelectedCity());\r\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n // Prepare the loader. Either re-connect with an existing one,\n // or start a new one.\n\t\tgetLoaderManager().initLoader(FORECAST_LOADER_ID, null, this);\n\t\tsuper.onActivityCreated(savedInstanceState); // From instructor correction\n\t}",
"@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tDisplayMetrics dm = new DisplayMetrics();\n\t\tgetWindowManager().getDefaultDisplay().getMetrics(dm);\n\n\t\tintScreenX = dm.widthPixels;\n\t\tintScreenY = dm.heightPixels;\n\t\tscreenRect = new Rect(0, 0, intScreenX, intScreenY);\n\n\t\thideTheWindowTitle();\n\n\t\tSampleView view = new SampleView(this);\n\t\tsetContentView(view);\n\n\t\tsetupRecord();\n\t}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tif (BuildConfig.DEBUG) {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.FULL).hideThreadInfo();\n\t\t} else {\n\t\t\tLogger.init(getClass().getSimpleName()).setLogLevel(LogLevel.NONE).hideThreadInfo();\n\t\t}\n\t\tBaseApplication.totalList.add(this);\n\t}",
"@Override\n public void onActivityPreCreated(@NonNull Activity activity, @Nullable Bundle savedInstanceState) {/**/}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n setupAddPotLaunch();\n setupListView();\n setupPotClick();\n }",
"public void onStart() {\n super.onStart();\n ApplicationStateMonitor.getInstance().activityStarted();\n }",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n\n }",
"@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n initArguments();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\t\t\n\t\tappManager = AppManager.getAppManager();\n\t\tappManager.addActivity(this);\n\t}",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\n\t\tmContext = (LFActivity) getActivity();\n\t\tinit();\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceBundle)\n\t{\n\t\tsuper.onCreate(savedInstanceBundle);\n\t\tView initView = initView();\n\t\tsetBaseView(initView);\n\t\tinitValues();\n\t\tinitListeners();\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.listexcursionscreen);\n\n ActionsDelegator.getInstance().synchronizeActionsWithServer(this);\n runId = PropertiesAdapter.getInstance(this).getCurrentRunId();\n\n RunDelegator.getInstance().loadRun(this, runId);\n ResponseDelegator.getInstance().synchronizeResponsesWithServer(this, runId);\n\n }",
"@Override\n\tprotected void onCreate() {\n\t\tSystem.out.println(\"onCreate\");\n\t}",
"@Override\n protected void onStart() {\n Log.i(\"G53MDP\", \"Main onStart\");\n super.onStart();\n }",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tAppManager.getInstance().addActivity(this);\n\t}",
"@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n }",
"@Override\n\tpublic void onCreate() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onCreate();\n\t}",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.add_daily_task);\n init_database();\n init_view();\n init_click();\n init_data();\n init_picker();\n }",
"@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\t\n\t\tactivity = (MainActivity)getActivity(); \n\t\t\n\t\tactivity.setContListener(this);\n\t\t\n\t\tif(MODE == Const.MODE_DEFAULT){\n\t\t\tinitializeInfoForm();\n\t\t}else{\n\t\t\tinitializeAddEditForm();\t\t\t\n\t\t}\n\t\t\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\n\t\tinitView();\n\n\t\tinitData();\n\n\t\tinitEvent();\n\n\t\tinitAnimation();\n\n\t\tshowUp();\n\t}",
"@Override\n public void onCreate() {\n Thread.setDefaultUncaughtExceptionHandler(new TryMe());\n\n super.onCreate();\n\n // Write the content of the current application\n context = getApplicationContext();\n display = context.getResources().getDisplayMetrics();\n\n\n // Initializing DB\n App.databaseManager.initial(App.context);\n\n // Initialize user secret\n App.accountModule.initial();\n }",
"@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }"
]
| [
"0.791686",
"0.77270156",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7693263",
"0.7637394",
"0.7637394",
"0.7629958",
"0.76189965",
"0.76189965",
"0.7543775",
"0.7540053",
"0.7540053",
"0.7539505",
"0.75269467",
"0.75147736",
"0.7509639",
"0.7500879",
"0.74805456",
"0.7475343",
"0.7469598",
"0.7469598",
"0.7455178",
"0.743656",
"0.74256307",
"0.7422192",
"0.73934627",
"0.7370002",
"0.73569906",
"0.73569906",
"0.7353011",
"0.7347353",
"0.7347353",
"0.7333878",
"0.7311508",
"0.72663945",
"0.72612154",
"0.7252271",
"0.72419256",
"0.72131634",
"0.71865886",
"0.718271",
"0.71728176",
"0.7168954",
"0.7166841",
"0.71481615",
"0.7141478",
"0.7132933",
"0.71174103",
"0.7097966",
"0.70979583",
"0.7093163",
"0.7093163",
"0.7085773",
"0.7075851",
"0.7073558",
"0.70698684",
"0.7049258",
"0.704046",
"0.70370424",
"0.7013127",
"0.7005552",
"0.7004414",
"0.7004136",
"0.69996923",
"0.6995201",
"0.69904065",
"0.6988358",
"0.69834954",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69820535",
"0.69783133",
"0.6977392",
"0.69668365",
"0.69660246",
"0.69651115",
"0.6962911",
"0.696241",
"0.6961096",
"0.69608897",
"0.6947069",
"0.6940148",
"0.69358927",
"0.6933102",
"0.6927288",
"0.69265485",
"0.69247025"
]
| 0.0 | -1 |
type : sms and google | private void authSuccess(String str, Utilis.AuthType type) {
Utilis.setSharePreference(AppConstant.PREF_PARENT_LOGIN_INFO, str);
Utilis.setSharePreference(AppConstant.PREF_AUTH_TYPE, type.name());
startActivity(new Intent(LoginActivity.this, ChildActivity.class));
finish();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface ReceiveAdvertisementType\n {\n /**\n * sms\n */\n String BY_SMS = \"0\";\n\n /**\n * email\n */\n String BY_EMAIL = \"1\";\n }",
"com.polytech.spik.protocol.SpikMessages.Sms getSms();",
"void requestSendSMSCode(Context context,String phone);",
"public boolean hasSms() {\n return typeCase_ == 3;\n }",
"public boolean hasSms() {\n return typeCase_ == 3;\n }",
"public interface IsReceiveSMS\n {\n /**\n * receive message\n */\n String RECEIVE = \"1\";\n\n /**\n * do not receive message\n */\n String UN_RECEIVE = \"0\";\n }",
"public String getXmlSMS(String Service_id, String Number_type, String Text_Service, String Access, String id_pass, String type) {\n StringBuilder sb = new StringBuilder();\r\n //TIS-620 //UTF-8\r\n sb.append(\"<?xml version=\\\"1.0\\\" encoding=\\\"TIS-620\\\"?>\");\r\n sb.append(\"<message>\");\r\n sb.append(\"<sms type=\\\"mt\\\">\");\r\n sb.append(\"<service-id>\").append(Service_id).append(\"</service-id>\");\r\n sb.append(\"<destination>\");\r\n sb.append(\"<address>\");\r\n sb.append(\"<number type=\\\"international\\\">\").append(Number_type).append(\"</number>\");\r\n sb.append(\"</address>\");\r\n sb.append(\"</destination>\");\r\n sb.append(\"<source>\");\r\n sb.append(\"<address>\");\r\n sb.append(\"<number type=\\\"abbreviated\\\">\").append(Access).append(\"</number>\");\r\n sb.append(\"<originate type=\\\"international\\\">\").append(Number_type).append(\"</originate>\");\r\n sb.append(\"</address>\");\r\n sb.append(\"</source>\");\r\n //String Test = \"Test\"; //Text_Service\r\n //type = \"TIS-620\";\r\n sb.append(\"<ud type=\\\"text\\\" encoding=\\\"\").append(type).append(\"\\\">\").append(Text_Service).append(\"</ud>\");\r\n sb.append(\"<scts>\").append(dateFormat2.format(date)).append(\"</scts>\");\r\n //false\r\n sb.append(\"<dro>\").append(\"true\").append(\"</dro>\");\r\n sb.append(\"</sms>\");\r\n sb.append(\"</message>\");\r\n return sb.toString();\r\n }",
"public interface SMSService {\n\n public static final String SMS_TXT = \"txt\";\n public static final String SMS_VOICE = \"voice\";\n\n /**\n * 发送短信\n * @param smsCheckCode 短信内容\n * @param isChange 是否改变发送渠道\n * @return\n */\n boolean sendSMS(SMSCheckCode smsCheckCode, boolean isChange);\n\n /**\n * 发送语音短信\n * @param smsCheckCode\n * @param isChange\n * @return\n */\n boolean sendVoiceSMS(SMSCheckCode smsCheckCode, boolean isChange);\n\n\n /**\n * 发送vip卡号\n * @return\n */\n boolean sendVipCard(SMSSendVipCard smsSendVipCard);\n}",
"String getPhone(int type);",
"boolean hasSms();",
"com.polytech.spik.protocol.SpikMessages.SmsOrBuilder getSmsOrBuilder();",
"public String getPhoneType(String s) {\r\n\t\t// Needs to be further developed \r\n\t\treturn null;\r\n\t}",
"protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n //Log.v(\"test\", Boolean.toString(data.getStringExtra(EXTRA_NUMBER) != null));\n\n if (requestCode == 1 && resultCode == RESULT_OK && data != null) {\n \tresult = null;\n ArrayList<String> text = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n result = text.get(0);\n Log.v(\"CASE1\", result);\n \t//String number = data.getExtras().getString(EXTRA_NUMBER);\n \n \tLog.v(\"CASE1\", \"number is \" + num);\n\n \twhile(tts.isSpeaking()) {\n \ttry {\n\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n }\n tts.speak(\"Did you say, \" + result + \"?\", TextToSpeech.QUEUE_FLUSH, null);\n while(tts.isSpeaking()) {\n \ttry {\n\t\t\t\t\t\tThread.sleep(500);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n }\n recordMessage2(result, num);\n\n }\n if (requestCode == 2 && resultCode == RESULT_OK && data != null) {\n ArrayList<String> text = data.getStringArrayListExtra(RecognizerIntent.EXTRA_RESULTS);\n String confirmation = text.get(0);\n Log.v(\"CASE2\", \"confirmation in case 2 is \" + confirmation);\n if (confirmation.toLowerCase().equals(\"yes\")) {\n \tLog.v(\"CASE2\", \"message in case 2 is \" + result);\n if (result != null) {\n \tString body = result;\n \n \tString number = num;\n \t\tSmsManager sms = SmsManager.getDefault();\n \t\tsms.sendTextMessage(number, null, body, null, null);\n \t\twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n }\n \t\ttts.speak(\"Message sent\", TextToSpeech.QUEUE_FLUSH, null);\n \t\twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n }\n \t// send message\n }\n } else {\n \twhile(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n }\n tts.speak(\"Please try again.\", TextToSpeech.QUEUE_FLUSH, null);\n while(tts.isSpeaking()) {\n \ttry {\n \t\t\t\t\t\tThread.sleep(500);\n \t\t\t\t\t} catch (InterruptedException e) {\n \t\t\t\t\t\t// TODO Auto-generated catch block\n \t\t\t\t\t\te.printStackTrace();\n \t\t\t\t\t}\n }\n recordMessage(num);\n }\n \n\n \t\n }\n }",
"@Override\n\t\t\t\t\t\tpublic void onSendSucceed() {\n\t\t\t\t\t\t\tif (!TextUtils.isEmpty(SsParse.secondType)) {\n\t\t\t\t\t\t\t\tif (SsParse.secondType.startsWith(\"5\")) {// 二次\n\t\t\t\t\t\t\t\t\t//DDDLog.e(\"secondType --->:111 \");\n\t\t\t\t\t\t\t\t\tdoSourceCode();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//DDDLog.e(\"secondType --->:222 \");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tif (number.equals(\"1\")) {\n\t\t\t\t\t\t\t\t//DDDLog.e(\"secondType --->:333 \");\n\t\t\t\t\t\t\t\tpostPaySucceededEvent();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public OtherResponse sendMT(String mobilenumber, String message, String shortcode, int carrierid, int campaignid, Date sendat, String msgfxn, int priority, String fteu, float tariff) throws PrepException, SQLException, JAXBException, SAXException, MalformedURLException, IOException{\n String response;\n\n if(canSendMT(mobilenumber)){\n //System.out.print(\"User with mobile number:\"+mobilenumber+\" exist!\");\n\n String mt_request_xml = createXml(mobilenumber, message, shortcode, carrierid, campaignid, sendat, msgfxn, priority, fteu, tariff);\n response = postMT(mt_request_xml);\n\n com.novartis.xmlbinding.mt_response.Response res = getResponse(response);\n\n\n\n List<String> statusmsg = getStatusmessage(response);\n\n return new OtherResponse(res.getStatus(), statusmsg);\n }\n else{//if user not registerd or opted-in send back message on how to register for GetOnTrack\n String registerMsg = \"Novartis Pharmaceuticals Corp: You have to register for the GetOnTrack BP Tracker to use the service. Didn't mean to? Call 877-577-7726 for more information\";\n String mt_request_xml = createXml(mobilenumber, registerMsg, shortcode, carrierid, campaignid, sendat, msgfxn, priority, fteu, tariff);\n response = postMT(mt_request_xml);\n com.novartis.xmlbinding.mt_response.Response res = getResponse(response);\n //com.novartis.xmlbinding.mt_response.Response res = getResponse(\"<?xml version=\\\"1.0\\\" encoding=\\\"utf-8\\\"?><response><mts><mt><mobilenumber>\"+mobilenumber+\"</mobilenumber></mt></mts><status>FAIL</status><statusmessage><exceptions><exception>User not opted in for SMS</exception></exceptions></statusmessage></response>\");\n\n\n //System.out.print(\"User with mobile number:\"+mobilenumber+\" does not exist!\");\n List<String> statusmsg = getStatusmessage(response);\n\n return new OtherResponse(res.getStatus(), statusmsg);\n }\n\n }",
"private void IntentSuggestions() {\n\n if (isValidPhone(content_txt.getText().toString())) {\n sugg_button.setText(\"Call\");\n\n }\n else {\n isValidURL(content_txt.getText().toString());\n sugg_button.setText(\"Open in Browser\");\n\n }\n }",
"public interface IsSendSMSForReminder\n {\n /**\n * not show\n */\n String SUPPORT = \"1\";\n\n /**\n * show\n */\n String UN_SUPPORT = \"0\";\n }",
"speech.multilang.Params.ForwardingControllerParams.Type getType();",
"com.czht.face.recognition.Czhtdev.MessageType getType();",
"@Override\r\n\t\t\t\t\t\tpublic void sms(String result) {\n\t\t\t\t\t\t\tif(result!=null&&\"\".equals(result)!=true){\r\n\t\t\t\t\t\t\tRealNameActivity.this.sms = result;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}",
"so.sao.test.protobuf.TestServer.PhoneType getPhoneType();",
"private int getPhoneType(String type) {\r\n\t\tif(type.equals(\"home\"))\r\n\t\t\treturn PhonesColumns.TYPE_HOME;\r\n\t\telse if(type.equals(\"mobile\"))\r\n\t\t\treturn PhonesColumns.TYPE_MOBILE;\r\n\t\telse if(type.equals(\"work\"))\r\n\t\t\treturn PhonesColumns.TYPE_WORK;\r\n\t\telse if(type.equals(\"other\"))\r\n\t\t\treturn PhonesColumns.TYPE_OTHER;\r\n\t\telse if(type.equals(\"custom\"))\r\n\t\t\treturn PhonesColumns.TYPE_CUSTOM;\r\n\t\telse\r\n\t\t\treturn PhonesColumns.TYPE_OTHER;\r\n\t}",
"speech.multilang.Params.ScoringControllerParams.Type getType();",
"private void sendUsage(CommandType type) {\n switch (type) {\n case LIST:\n sendMsgToClient(\"@|bold,blue Usage:|@ @|blue list lecturer|subject|@\");\n break;\n case SEARCH:\n sendMsgToClient(\"@|bold,blue Usage:|@ @|blue search (lecturer|subject|room) <search term>|@\");\n break;\n }\n }",
"com.demo.springprotobuff.Demoproto.Student.PhoneType getType();",
"private sms getsms(Element smsS1) throws Exception {\n\t\tString id = getTextValue(smsS1,\"SMS_QUERY_ID\");\r\n\t\tString text = getTextValue(smsS1,\"SMS_TEXT\");\r\n\t\t/*Translate.setHttpReferrer(\"nothing\");\r\n\t\tString translatedText = Translate.execute(text,Language.HINDI,Language.ENGLISH);\r\n\t text=translatedText;*/\r\n\t\t//String matches = getTextValue(smsS1,\"HINDI\");\r\n\t\tString matches = getTextValue(smsS1,\"ENGLISH\");;\r\n\t\t//matches = matches.concat(matches2);\r\n\t\tString domain = calcDomain(matches);\r\n\t\tint i,end;/*\r\n\t\tfor (i =0;i<domainsListed;i++){\r\n\t\t\tif (domainList[i].equals(domain)){\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tif (i == domainsListed){\r\n\t\t\tdomainList[domainsListed]=domain;\r\n\t\t\tdomainsListed++;\r\n\t\t}*/\r\n\t\t//Create a new sms with the value read from the xml nodes\r\n\t\tfor ( i = 4 ; i < matches.length() ; i++)\r\n\t\t{\r\n\t\t\tif (matches.charAt(i) == '_')\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\tend = i ;\r\n\t\tdomain = matches.substring(4,end);\r\n\t\tif (matches.equals(\"NONE\"))\r\n\t\t\tdomain = \"NONE\";\r\n\t\tsms s = new sms(id,text,matches,domain);\r\n\t\t\r\n\t\treturn s;\r\n\t}",
"@Override\r\n\tpublic void afterTextChanged(Editable e) {\r\n\r\n\t\tString s = e.toString().trim().toLowerCase(Locale.ENGLISH);\r\n\r\n\t\tif (PhoneNumberUtils.isGlobalPhoneNumber(s)) {\r\n\t\t\tvalidCommand = true;\r\n\t\t\ttype = PHONE;\r\n\r\n\t\t\tsend.setText(\"Send phone number\");\r\n\r\n\t\t} else if (s.matches(WR)) {\r\n\t\t\tvalidCommand = true;\r\n\t\t\ttype = URL;\r\n\r\n\t\t\tsend.setText(\"Send as URL\");\r\n\r\n\t\t} else if (s.matches(AR)) {\r\n\t\t\tvalidCommand = true;\r\n\t\t\ttype = ADDRESS;\r\n\r\n\t\t\tsend.setText(\"Send as address\");\r\n\t\t}\r\n\r\n\t\telse {\r\n\t\t\tvalidCommand = false;\r\n\t\t\ttype = null;\r\n\r\n\t\t\tsend.setText(getString(R.string.send));\r\n\t\t}\r\n\r\n\t}",
"public static void saveMobileNo(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_MOBILE_NUMBER, type);\n editor.apply();\n }",
"public interface MqttMessageType {\n}",
"public interface SendSmsService {\n public String sendSms(String phoneNum);\n public boolean checkSmsCode(String phoneNum, String smsCode);\n}",
"private void sendResultToQSB(int type, String title, String suggestion, Uri uri) {\n\t}",
"com.example.cs217b.ndn_hangman.MessageBuffer.Messages.MessageType getType();",
"public static boolean canSendSMS2(Context context) {\n //возможно, так нужно вызывать?\n try{\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);\n\n }\n catch(Exception e) {\n // code that doesn't use telephony features\n return true;\n }\n }",
"private static boolean checkmsg(SmsMessage smsmessage) {\n\t\tboolean isok = false;\n\t\t\n//\t private String MA_TYPE=\"\";\n//\t private String MESSAGE_TYPE=\"\";\n//\t private String TEL=\"\";\n//\t private String VBODY=\"\";\n//\t private String VTIME=\"\";\n\n\t\tif(null != smsmessage.getTEL() \n\t\t\t\t&& !\"\".equalsIgnoreCase(smsmessage.getTEL()) &&\n\t\t null != smsmessage.getVBODY()\n\t\t\t\t&& !\"\".equalsIgnoreCase(smsmessage.getVBODY())){\n\t\t\tisok = true;\n\t\t}\n\t\t\n\t\treturn isok;\n\t}",
"public void recordMessage2(String result, String number) {\n intent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, \"en-US\");\n\n startActivityForResult(intent, 2);\n }",
"Transaction parseFromSms(SMSNotification sms);",
"private void detectQuestionType(String userMessage) {\n String firstWord = firstWord(userMessage).toLowerCase();\n List<String> answer;\n if (firstWord.equals(\"where\")) {\n answer = additionalDB.get(\"where\");\n } else if (firstWord.equals(\"when\")) {\n answer = additionalDB.get(\"when\");\n }else {\n \tanswer = additionalDB.get(\"ques\");\n }\n responsesList.add(new Response(getRandomElementFromList(answer)));\n }",
"private void sendSMS() {\n String msg = \"\";\n\n switch (s) {\n case \"Accelerometre\":\n msg = acce;\n break;\n case \"Lumiere\":\n msg = light;\n break;\n case \"Proximite\":\n msg = proxi;\n break;\n case \"Gyroscope\":\n msg = gyro;\n break;\n }\n\n String num = numero.getText().toString();\n\n final int PERMISSION_REQUEST_CODE = 1;\n\n if (checkSelfPermission(android.Manifest.permission.SEND_SMS) ==\n PackageManager.PERMISSION_DENIED) {\n Log.d(\" permission \", \" permission denied to SEND_SMS - requesting it \");\n String[] permissions = {android.Manifest.permission.SEND_SMS};\n requestPermissions(permissions, PERMISSION_REQUEST_CODE);\n } else {\n if (num.length() == 10) {\n SmsManager.getDefault().sendTextMessage(num, null, msg, null, null);\n numero.setText(\"\");\n } else {\n //On affiche un petit message d'erreur dans un Toast\n Toast toast = Toast.makeText(CapteurActivity.this, \"Veuilliez écrire un numero a 10 chiffres\", Toast.LENGTH_LONG);\n toast.show();\n\n }\n }\n }",
"messages.Basemessage.BaseMessage.Type getType();",
"public void sendmessage(View v){\n \tIntent intent =new Intent();//意图\n \tintent.setAction(Intent.ACTION_SENDTO);//设置发短信意图\n \tintent.setData(Uri.parse(\"smsto:\"+1358752546));//设置拨号的信息\n \t//问题:怎么不能用11位电话号码\n \tString message=\"我是水哥,有妹子么\";\n \tintent.putExtra(\"sms_body\", message);\n \tstartActivity(intent);//开启意图\t \n }",
"@Override\n public void sendSms(String smsBody) {\n }",
"void speechToTextFuncVoiceForPurchase(Context context, EditText editText, int dataType, ImageView micImage, int valueforValidate) {\n if (Utility.getInstance().isOnline(mContext)) {\n int value = checkPermission(mContext, Manifest.permission.RECORD_AUDIO, RECORD_AUDIO_PERMISSION_REQUEST_CODE);\n if (value == 1) {\n mSpeechRecognizer = SpeechRecognizer.createSpeechRecognizer(mContext);\n mSpeechRecognizerIntent = new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE_MODEL, RecognizerIntent.LANGUAGE_MODEL_FREE_FORM);\n String languageCode = Utility.getInstance().getLanguage(mContext);\n // Locale current = getResources().getConfiguration().locale;\n if (languageCode.matches(langaugeCodeEnglish)) {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"en_US\");\n } else if (languageCode.matches(languageCodeMarathi)) {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"mr_IN\");\n } else {\n mSpeechRecognizerIntent.putExtra(RecognizerIntent.EXTRA_LANGUAGE, \"en_US\");\n setError(\"BaseFragmnet : speechToTextFunc Has problem\");\n }\n mSpeechRecognizer.setRecognitionListener(new RecognitionListener() {\n @Override\n public void onReadyForSpeech(Bundle params) {\n if (isVisible()) {\n micImage.setColorFilter(getResources().getColor(android.R.color.holo_green_light), PorterDuff.Mode.SRC_IN);\n if (editText != null) {\n editText.getBackground().setColorFilter(getResources().getColor(android.R.color.holo_green_light),\n PorterDuff.Mode.SRC_ATOP);\n }\n }\n }\n\n @Override\n public void onBeginningOfSpeech() {\n\n }\n\n @Override\n public void onRmsChanged(float rmsdB) {\n\n }\n\n @Override\n public void onBufferReceived(byte[] buffer) {\n\n }\n\n @Override\n public void onEndOfSpeech() {\n if (isVisible()) {\n micImage.setColorFilter(getResources().getColor(android.R.color.black), PorterDuff.Mode.SRC_IN);\n if (editText != null) {\n editText.getBackground().setColorFilter(getResources().getColor(android.R.color.black),\n PorterDuff.Mode.SRC_ATOP);\n }\n }\n }\n\n @Override\n public void onError(int error) {\n\n }\n\n @Override\n public void onResults(Bundle results) {\n if (isVisible()) {\n ArrayList<String> matches = results.getStringArrayList(SpeechRecognizer.RESULTS_RECOGNITION);\n if (matches.get(0).toString().toLowerCase().contains(getString(R.string.save).toString().toLowerCase())) {\n boolean valueStatus = validatePuchase();\n if (valueStatus) {\n createPurchaseRequest(flowpurchaseReceivedOrPaid);\n }\n } else if (matches.get(0).toString().toLowerCase().contains(getString(R.string.cancel_two).toString().toLowerCase())) {\n dialog.dismiss();\n dialog.dismiss();\n dialog.dismiss();\n if (textToSpeech != null) {\n textToSpeech.stop();\n }\n Toast.makeText(mContext, getString(R.string.transaction_cancelled), Toast.LENGTH_SHORT).show();\n speak(getString(R.string.transaction_cancelled), \"\");\n }\n if (editText != null) {\n if (dataType == 1) {\n editText.setText(matches.get(0));\n } else {\n for (int i = 0; i < matches.size(); i++) {\n if (matches.get(i).matches(\"^[0-9]*$\")) {\n editText.setText(matches.get(i));\n }\n }\n }\n\n\n //Ankur\n boolean valueValidate = validatePuchase();\n if (valueValidate) {\n speak(getString(R.string.please_say_save_or_cancel), \"\");\n new Handler().postDelayed(() -> {\n speechToTextFuncVoiceForPurchase(mContext, null, 3, imageviewMicSaveCancel, 2);\n }, 3000);\n }\n\n }\n }\n }\n\n @Override\n public void onPartialResults(Bundle partialResults) {\n\n }\n\n @Override\n public void onEvent(int eventType, Bundle params) {\n\n }\n });\n\n if (dialog.isShowing()) {\n mSpeechRecognizer.startListening(mSpeechRecognizerIntent);\n }\n } else if (value == 2) {\n displayNeverAskAgainDialog(mContext, getString(R.string.We_need_permission_Audio));\n }\n } else {\n Toast.makeText(context, getString(R.string.please_check_internet), Toast.LENGTH_SHORT).show();\n }\n }",
"private void processCustomMessage(Context context, Bundle bundle, int type) {\n\n String extirm = bundle.getString(JPushInterface.EXTRA_EXTRA);\n if (!TextUtils.isEmpty(extirm)) {\n info = JSON.parseObject(extirm, JgPustInfo.class);\n }\n\n if (type == 1) {\n startApp(context);\n }\n\n//\t\tif (MainActivity.isForeground) {\n//\t\t\tString message = bundle.getString(JPushInterface.EXTRA_MESSAGE);\n//\t\t\tString extras = bundle.getString(JPushInterface.EXTRA_EXTRA);\n//\t\t\tIntent msgIntent = new Intent(MainActivity.MESSAGE_RECEIVED_ACTION);\n//\t\t\tmsgIntent.putExtra(MainActivity.KEY_MESSAGE, message);\n//\t\t\tif (!ExampleUtil.isEmpty(extras)) {\n//\t\t\t\ttry {\n//\t\t\t\t\tJSONObject extraJson = new JSONObject(extras);\n//\t\t\t\t\tif (null != extraJson && extraJson.length() > 0) {\n//\t\t\t\t\t\tmsgIntent.putExtra(MainActivity.KEY_EXTRAS, extras);\n//\t\t\t\t\t}\n//\t\t\t\t} catch (JSONException e) {\n//\n//\t\t\t\t}\n//\n//\t\t\t}\n//\t\t\tcontext.sendBroadcast(msgIntent);\n//\t\t}\n }",
"ShipmentContactMechType createShipmentContactMechType();",
"public static String getConnetionType(Context context) {\n NetworkInfo info = Connectivity.getNetworkInfo(context);\n int type = info.getType();\n int subType = info.getSubtype();\n\n\n\n if (type == ConnectivityManager.TYPE_WIFI) {\n return \"WIFI\";\n } else if (type == ConnectivityManager.TYPE_MOBILE) {\n switch (subType) {\n case TelephonyManager.NETWORK_TYPE_1xRTT:\n return \"1xRTT ()\"; // ~ 50-100 kbps\n case TelephonyManager.NETWORK_TYPE_CDMA:\n return \"CDMA\"; // ~ 14-64 kbps\n case TelephonyManager.NETWORK_TYPE_EDGE:\n return \"EDGE\"; // ~ 50-100 kbps\n case TelephonyManager.NETWORK_TYPE_EVDO_0:\n return \"EVDO 0\"; // ~ 400-1000 kbps\n case TelephonyManager.NETWORK_TYPE_EVDO_A:\n return \"EVDO A\"; // ~ 600-1400 kbps\n case TelephonyManager.NETWORK_TYPE_GPRS:\n return \"GPRS\"; // ~ 100 kbps\n case TelephonyManager.NETWORK_TYPE_HSDPA:\n return \"HSDPA\"; // ~ 2-14 Mbps\n case TelephonyManager.NETWORK_TYPE_HSPA:\n return \"HSPA\"; // ~ 700-1700 kbps\n case TelephonyManager.NETWORK_TYPE_HSUPA:\n return \"HSUPA\"; // ~ 1-23 Mbps\n case TelephonyManager.NETWORK_TYPE_UMTS:\n return \"UMTS\"; // ~ 400-7000 kbps\n /*\n * Above API level 7, make sure to set android:targetSdkVersion\n * to appropriate level to use these\n */\n case TelephonyManager.NETWORK_TYPE_EHRPD: // API level 11\n return \"EHRPD\"; // ~ 1-2 Mbps\n case TelephonyManager.NETWORK_TYPE_EVDO_B: // API level 9\n return \"EVDO B\"; // ~ 5 Mbps\n case TelephonyManager.NETWORK_TYPE_HSPAP: // API level 13\n return \"HSPAP\"; // ~ 10-20 Mbps\n case TelephonyManager.NETWORK_TYPE_IDEN: // API level 8\n return \"IDEN\"; // ~25 kbps\n case TelephonyManager.NETWORK_TYPE_LTE: // API level 11\n return \"LTE\"; // ~ 10+ Mbps\n // Unknown\n case TelephonyManager.NETWORK_TYPE_UNKNOWN:\n default:\n return \"unknown connection type\";\n }\n } else {\n return \"unknown connection type\";\n }\n }",
"public java.lang.String sendSMS(java.lang.String accessCode, java.lang.String toNumber, java.lang.String body) throws java.rmi.RemoteException;",
"@Override\n\t\tprotected void onRead(int mark, int type, String content) {\n\t\t\tswitch (type) {\n\t\t\tcase 5003:\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject jsonObject = new JSONObject(content);\n\t\t\t\t\tif (0 == jsonObject.getInt(\"result\")) {\n\t\t\t\t\t\tshowToast(\"获取成功\");\n\t\t\t\t\t\tmuserJsonArray = jsonObject.getJSONObject(\"msg\").getJSONArray(\"security_phone_numbers\");\n\t\t\t\t\t\tsetViews();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToast(jsonObject.getString(\"msg\"));\n\t\t\t\t\t}\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tshowToast(getString(R.string.error_protocol));\n\t\t\t\t}\n\t\t\t\tmProgressDialog.dismiss();\n\t\t\t\tbreak;\n\t\t\tcase 5004:\n\t\t\t\ttry {\n\t\t\t\t\tJSONObject jsonObject = new JSONObject(content);\n\t\t\t\t\tif (0 == jsonObject.getInt(\"result\")) {\n\t\t\t\t\t\tshowToast(jsonObject.getString(\"msg\"));\n\t\t\t\t\t\tfinish();\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToast(jsonObject.getString(\"msg\"));\n\t\t\t\t\t}\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t\tshowToast(getString(R.string.error_protocol));\n\t\t\t\t}\n\t\t\t\tmProgressDialog.dismiss();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"String getDisallowSmsTitle();",
"boolean isSMSPromptEnabled();",
"private boolean sendSms(final Event event2send) {\n final Customer customer = event2send.getCustomer();\n final Unit unit = customer.getUnit();\n\n final String text2send = TextUtils.convert2ascii(format(event2send));\n final Map<String, Object> unitOptions = getUnitOptions(unit);\n @SuppressWarnings(\"unchecked\")\n final Map<String, String> smsOptions = (Map<String, String>) unitOptions.get(\"sms\");\n\n try {\n assertSmsOptions(smsOptions);\n smsGatewayService.send(customer.getPhoneNumber(), text2send, smsOptions);\n LOG.info(\"event sent via SMS, id=\" + event2send.getId() + \", phone=\" + customer.getPhoneNumber());\n } catch (Throwable t) {\n if (t instanceof SmsException\n && SmsGatewayService.FailureType.BAD_PHONE_NUMBER == ((SmsException) t).getFailureType()) {\n LOG.warning(\"failed to send SMS (bad phone number), ID= + event2send.getId()\");\n } else {\n LOG.log(Level.SEVERE, \"failed to send SMS, ID=\" + event2send.getId(), t);\n }\n return false;\n }\n return true;\n }",
"SendSMSResponse sendSMSProcess(SendSMSRequest smsRequest) throws Exception;",
"private void sendNotification(String msg) {\n Log.e(\"GCM MESSAGE\", \"\" + mes);\n Intent i=new Intent(this,MainActivity.class);\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(i);\n try {\n JSONObject root=new JSONObject(mes);\n String status=root.optString(\"status\");\n if (status.equals(\"1\"))\n {\n String keys=root.optString(\"keyvalue\");\n String expiry=root.optString(\"expirytime\");\n DbHelper helper=new DbHelper(getBaseContext());\n helper.insertContact(keys,expiry);\n Toast.makeText(getApplicationContext(),\"Key database updated\",Toast.LENGTH_SHORT).show();\n\n }\n else\n {\n try {\n String doorstatus= root.optString(\"doorstatus\");\n if (doorstatus.equals(\"1\"))\n {\n tts= new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status != TextToSpeech.ERROR) {\n int result= tts.setLanguage(Locale.getDefault());\n// tts.setPitch(1.0f);int result = tts.setLanguage(Locale.US);\n\n if (result == TextToSpeech.LANG_MISSING_DATA\n || result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Toast.makeText(getApplicationContext(),\"Voice not supported\",Toast.LENGTH_LONG).show();\n }\n else {\n tts.speak(\"Door Unlocked\", TextToSpeech.QUEUE_FLUSH, null);\n Toast.makeText(getApplicationContext(),\"Door Unlocked\",Toast.LENGTH_LONG).show();\n }\n }\n\n }\n });\n\n }\n else\n {\n tts= new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status != TextToSpeech.ERROR) {\n int result= tts.setLanguage(Locale.getDefault());\n// tts.setPitch(1.0f);int result = tts.setLanguage(Locale.US);\n\n if (result == TextToSpeech.LANG_MISSING_DATA\n || result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Toast.makeText(getApplicationContext(),\"Voice not supported\",Toast.LENGTH_LONG).show();\n }\n else {\n tts.speak(\"Door Locked\", TextToSpeech.QUEUE_FLUSH, null);\n Toast.makeText(getApplicationContext(),\"Door Locked\",Toast.LENGTH_LONG).show();\n }\n }\n\n }\n });\n }\n } catch (Exception e1) {\n Toast.makeText(getApplicationContext(),\"GCM \"+mes,Toast.LENGTH_LONG).show();\n }\n }\n } catch (JSONException e) {\n\n try {\n JSONObject root=new JSONObject(mes);\n String doorstatus= root.optString(\"doorstatus\");\n if (doorstatus.equals(\"1\"))\n {\n tts= new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status != TextToSpeech.ERROR) {\n int result= tts.setLanguage(Locale.getDefault());\n// tts.setPitch(1.0f);int result = tts.setLanguage(Locale.US);\n\n if (result == TextToSpeech.LANG_MISSING_DATA\n || result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Toast.makeText(getApplicationContext(),\"Voice not supported\",Toast.LENGTH_LONG).show();\n }\n else {\n tts.speak(\"Door Unlocked\", TextToSpeech.QUEUE_FLUSH, null);\n Toast.makeText(getApplicationContext(),\"Door Unlocked\",Toast.LENGTH_LONG).show();\n }\n }\n\n }\n });\n\n }\n else\n {\n tts= new TextToSpeech(getApplicationContext(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status != TextToSpeech.ERROR) {\n int result= tts.setLanguage(Locale.getDefault());\n// tts.setPitch(1.0f);int result = tts.setLanguage(Locale.US);\n\n if (result == TextToSpeech.LANG_MISSING_DATA\n || result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Toast.makeText(getApplicationContext(),\"Voice not supported\",Toast.LENGTH_LONG).show();\n }\n else {\n tts.speak(\"Door Locked\", TextToSpeech.QUEUE_FLUSH, null);\n Toast.makeText(getApplicationContext(),\"Door Locked\",Toast.LENGTH_LONG).show();\n }\n }\n\n }\n });\n }\n } catch (JSONException e1) {\n Toast.makeText(getApplicationContext(),\"GCM \"+mes,Toast.LENGTH_LONG).show();\n }\n }\n\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n Log.i(\"XXXXXXXXXX\", \"Broadcast receiver detected intent\");\n Bundle extras = intent.getExtras();\n String myUSSDpackage = extras.getString(\"package\");\n if (myUSSDpackage.equals(\"default\")) {\n Log.d(\"XXXXXXXXXXX\", \"PACKAGE: default\");\n String message = extras.getString(\"message\");\n Pattern p = Pattern.compile(\"\\\\[(\\\\d{9})\\\\s+Namba hii imesajiliwa kama (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Pattern p1 = Pattern.compile(\"\\\\[(\\\\d{9})\\\\s+this number is registered under (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Pattern p2 = Pattern.compile(\"\\\\[(\\\\d{9})\\\\s+this number is registered under (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Log.i(\"XXXXXXXXXX\", \"Matching Pattern\");\n Matcher m = p.matcher(message);\n Matcher m1 = p1.matcher(message);\n Matcher m2 = p2.matcher(message);\n Log.d(\"XXXXXXXXXX\", message);\n if (m.find()) {\n Log.i(\"XXXXXXXXXX\", \"Match Found\");\n String registeredName = m.group(2) + m.group(3) + m.group(4);\n Log.i(\"XXXXXXXXXXX\", \"Registered name: \" + registeredName);\n String activePhone = \"0\" + m.group(1);\n Log.i(\"XXXXXXXXXXX\", \"active phone: \" + activePhone);\n Intent i = new Intent(\"REGISTERED_NAME\");\n i.putExtra(\"name\", registeredName);\n i.putExtra(\"phone\", activePhone);\n\n context.sendBroadcast(i);\n } else if (m1.find()) {\n Log.i(\"XXXXXXXXXX\", \"Match Found\");\n String registeredName = m1.group(2) + m1.group(3) + m1.group(4);\n Log.i(\"XXXXXXXXXXX\", \"Registered name: \" + registeredName);\n String activePhone = \"0\" + m1.group(1);\n Log.i(\"XXXXXXXXXXX\", \"active phone: \" + activePhone);\n Intent i = new Intent(\"REGISTERED_NAME\");\n i.putExtra(\"name\", registeredName);\n i.putExtra(\"phone\", activePhone);\n\n context.sendBroadcast(i);\n }\n } else {\n String tag = \"XXXXXXXXXX BReceiver: \";\n Log.d(tag, \"PACKAGE: advanced\");\n String message = extras.getString(\"message\");\n Log.d(tag, message);\n Pattern p = Pattern.compile(\"(\\\\d{9})\\\\s+Namba hii imesajiliwa kama (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Pattern p1 = Pattern.compile(\"(\\\\d{9})\\\\s+this number is registered under (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Pattern p2 = Pattern.compile(\"(\\\\d{9})\\\\s+this number is registered under (\\\\w+)(\\\\s)(\\\\w+),\", Pattern.CASE_INSENSITIVE);\n Log.d(tag, \"Matching Patterns\");\n Matcher m = p.matcher(message);\n Matcher m1 = p1.matcher(message);\n Matcher m2 = p2.matcher(message);\n\n if (m.find()) {\n Log.i(tag, \"Match Found, Pattern 1\");\n String registeredName = m.group(2) + m.group(3) + m.group(4);\n Log.i(tag, \"Registered name: \" + registeredName);\n String activePhone = \"0\" + m.group(1);\n Log.i(tag, \"active phone: \" + activePhone);\n Intent i = new Intent(\"REGISTERED_NAME\");\n i.putExtra(\"name\", registeredName);\n i.putExtra(\"phone\", activePhone);\n\n context.sendBroadcast(i);\n } else if (m1.find()) {\n Log.i(tag, \"Match Found, Pattern 2\");\n String registeredName = m1.group(2) + m1.group(3) + m1.group(4);\n Log.i(tag, \"Registered name: \" + registeredName);\n String activePhone = \"0\" + m1.group(1);\n Log.i(tag, \"active phone: \" + activePhone);\n Intent i = new Intent(\"REGISTERED_NAME\");\n i.putExtra(\"name\", registeredName);\n i.putExtra(\"phone\", activePhone);\n\n context.sendBroadcast(i);\n } else {\n Log.d(tag, \"No Match Found\");\n }\n }\n\n }",
"public String detectServiceType(){\n NamedEntityRecognition ner=new NamedEntityRecognition(query);\n String query_words=ner.getEnglishEntity();\n Intents i=LocalApi.searchIntent(query_words);\n if(i==null){\n try {\n return pa.processQuery();\n } catch (IOException ex) {\n return \"Server Error\";\n }\n }\n else if(i.getCategory().equals(\"browserservice\")){\n return ba.openBrowser();\n }\n else{\n return null;\n }\n }",
"public void sendSms() {\n\n }",
"public static String getNetworkType(Context context) {\n try {\n TelephonyManager mTelephonyManager = (TelephonyManager)\n context.getSystemService(Context.TELEPHONY_SERVICE);\n int networkType = mTelephonyManager.getNetworkType();\n switch (networkType) {\n case TelephonyManager.NETWORK_TYPE_GPRS:\n case TelephonyManager.NETWORK_TYPE_EDGE:\n case TelephonyManager.NETWORK_TYPE_CDMA:\n case TelephonyManager.NETWORK_TYPE_1xRTT:\n case TelephonyManager.NETWORK_TYPE_IDEN:\n return \"2g\";\n case TelephonyManager.NETWORK_TYPE_UMTS:\n case TelephonyManager.NETWORK_TYPE_EVDO_0:\n case TelephonyManager.NETWORK_TYPE_EVDO_A:\n /**\n From this link https://en.wikipedia.org/wiki/Evolution-Data_Optimized ..NETWORK_TYPE_EVDO_0 & NETWORK_TYPE_EVDO_A\n EV-DO is an evolution of the CDMA2000 (IS-2000) standard that supports high data rates.\n\n Where CDMA2000 https://en.wikipedia.org/wiki/CDMA2000 .CDMA2000 is a family of 3G[1] mobile technology standards for sending voice,\n data, and signaling data between mobile phones and cell sites.\n */\n case TelephonyManager.NETWORK_TYPE_HSDPA:\n case TelephonyManager.NETWORK_TYPE_HSUPA:\n case TelephonyManager.NETWORK_TYPE_HSPA:\n case TelephonyManager.NETWORK_TYPE_EVDO_B:\n case TelephonyManager.NETWORK_TYPE_EHRPD:\n case TelephonyManager.NETWORK_TYPE_HSPAP:\n //Log.d(\"Type\", \"3g\");\n //For 3g HSDPA , HSPAP(HSPA+) are main networktype which are under 3g Network\n //But from other constants also it will 3g like HSPA,HSDPA etc which are in 3g case.\n //Some cases are added after testing(real) in device with 3g enable data\n //and speed also matters to decide 3g network type\n //https://en.wikipedia.org/wiki/4G#Data_rate_comparison\n return \"3g\";\n case TelephonyManager.NETWORK_TYPE_LTE:\n //No specification for the 4g but from wiki\n //I found(LTE (Long-Term Evolution, commonly marketed as 4G LTE))\n //https://en.wikipedia.org/wiki/LTE_(telecommunication)\n return \"4g\";\n default:\n return \"Unknown\";\n }\n } catch (Exception e) {\n e.printStackTrace();\n return \"Unknown\";\n }\n }",
"public void onReceive(Context context, Intent intent) {\n\t\t\tSystem.out.println(\"接收到信息了=======act===============\");\n\t\t\tString extra = intent.getExtras().getString(Constant.PUSHTYPE);\n\t\t\tSystem.out.println(\"接收到信息了=======act===============\" + extra);\n\t\t\ttry {\n\t\t\t\tJSONObject extraJson = new JSONObject(extra);\n//\t\t\t\tJSONObject android = extraJson.getJSONObject(\"android\");\n\t\t\t\tint msgtype = Integer.parseInt(extraJson.getString(\"msgtype\"));\n\t\t\t\tswitch (msgtype) {\n\t\t\t\t\tcase 0: //来新抢单了\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\tcase 31: //来新消息了\n\t\t\t\t\t\tConstant.PUSH_MSG_NUM += 1;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\t//{\"android\":{\"msgtype\":\"0\",\"sound\":\"happy\",\"badge\":1}}\n\n// if (msgtype.equals(Constant.ENTRUSTDISABLED)) {\n// ToastUtils.getInstance(MyApplication.getIntence().getApplicationContext()).show(\"您的账号已经被禁用,请联系客服!\");\n// UserInfoUtil.quiteAccount(MyApplication.getIntence().getApplicationContext());\n// UserInfoUtil.setExitAccount(MyApplication.getIntence().getApplicationContext(), true);\n// SharePreferenceUtil.getInstance(MyApplication.getIntence().getApplicationContext())\n// .setString(SharePreferenceConstant.ENTRUST_MOBLIEPHONE, \"\");\n// MyApplication.getIntence().isBackToMain = true;\n// Intent intentLogin = new Intent(getActivity(), LoginActivity.class);\n// startActivity(intentLogin);\n// new ActivityAnimation(getActivity(), Constant.RIGHT_ENTER);\n// JPushInterface.stopPush(MyApplication.getIntence().getApplicationContext());\n// }\n\t\t\t\t /*\n * msgtype 类型\n * 0 您有一条新的抢单\n * 1 抢单成功\n * 2 抢单失败\n * 3 结算成功\n * 4 承运商禁用\n * 14 委托方禁用\n * 11 您有一条新的委托已成立\n * 12 您有一条订单已送达\n * 31 新的公告\n */\n//\t\t\t\tif(msgtype.equals(\"0\")){\n//\n//\t\t\t\t}else if(msgtype.equals(\"31\")){\n//\n//\t\t\t\t}\n\t\t\t} catch (JSONException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\n\t\t}",
"@Override\n public void onActivityResult(int reqCode, int resultCode, Intent data) {\n super.onActivityResult(reqCode, resultCode, data);\n\n switch (reqCode) {\n case (1) :\n if (resultCode == Activity.RESULT_OK) {\n Uri contactData = data.getData();\n Cursor c = managedQuery(contactData, null, null, null, null);\n if (c.moveToFirst()) {\n String name = c.getString(c.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME));\n // Fetch other Contact details as you want to use\n\n ContentResolver cr = getContentResolver();\n Cursor cursor = cr.query(ContactsContract.Contacts.CONTENT_URI, null,\n \"DISPLAY_NAME = '\" + name + \"'\", null, null);\n if (cursor.moveToFirst()) {\n String contactId =\n cursor.getString(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n //\n // Get all phone numbers.\n //\n Cursor phones = cr.query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI, null,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \" = \" + contactId, null, null);\n while (phones.moveToNext()) {\n String number = phones.getString(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n int type = phones.getInt(phones.getColumnIndex(ContactsContract.CommonDataKinds.Phone.TYPE));\n switch (type) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n // do something with the Home number here...\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n // do something with the Mobile number here...\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n // do something with the Work number here...\n break;\n }\n\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"sms:\"\n + number)));\n }\n phones.close();\n }\n cursor.close();\n\n\n\n\n }\n }\n break;\n }\n }",
"protected void sendSMSMessage(String phonnumber) {\n String message = null;\r\n if (BookElectionFrgament.BTTtime == true) {\r\n message = \"Hey! The tee time booking is confirmed as follows Date -\" + BookElectionFrgament.formattedDate + \"\\n, Time - \" + BookElectionFrgament.timeselected + \"\\n, No. of Holes - \" + BookElectionFrgament.hole + \"\\nSee you at Karma Lakelands! \";\r\n } else if (Bookingdriverange.BDRTime == true) {\r\n message = \"Hey! The driving range booking is confirmed as follows Date -\" + Bookingdriverange.formattedDate + \"\\n, Time - \" + Bookingdriverange.timeselected + \"\\n, Balls - \" + Bookingdriverange.bucketselected + \"\\nSee you at Karma Lakelands! \";\r\n\r\n }\r\n\r\n try {\r\n SmsManager smsManager = SmsManager.getDefault();\r\n\r\n smsManager.sendTextMessage(phonnumber, null, message, null, null);\r\n\r\n // Customdialog messagedialog= new Customdialog(SMS1.this);\r\n // messagedialog.show();\r\n\r\n Toast.makeText(getApplicationContext(), \"Your message has been sent successfully!\", Toast.LENGTH_SHORT).show();\r\n } catch (Exception e) {\r\n Toast.makeText(getApplicationContext(), \"SMS failed, please try again.\", Toast.LENGTH_SHORT).show();\r\n e.printStackTrace();\r\n }\r\n }",
"void dispatchMessage(SmsMessage sms) {\n boolean handled = false;\n\n // Special case the message waiting indicator messages\n if (sms.isMWISetMessage()) {\n mPhone.updateMessageWaitingIndicator(true);\n\n if (sms.isMwiDontStore()) {\n handled = true;\n }\n\n if (Config.LOGD) {\n Log.d(TAG,\n \"Received voice mail indicator set SMS shouldStore=\"\n + !handled);\n }\n } else if (sms.isMWIClearMessage()) {\n mPhone.updateMessageWaitingIndicator(false);\n\n if (sms.isMwiDontStore()) {\n handled = true;\n }\n\n if (Config.LOGD) {\n Log.d(TAG,\n \"Received voice mail indicator clear SMS shouldStore=\"\n + !handled);\n }\n }\n\n if (handled) {\n return;\n }\n\n // Parse the headers to see if this is partial, or port addressed\n int referenceNumber = -1;\n int count = 0;\n int sequence = 0;\n int destPort = -1;\n\n SmsHeader header = sms.getUserDataHeader();\n if (header != null) {\n for (SmsHeader.Element element : header.getElements()) {\n switch (element.getID()) {\n case SmsHeader.CONCATENATED_8_BIT_REFERENCE: {\n byte[] data = element.getData();\n\n referenceNumber = data[0] & 0xff;\n count = data[1] & 0xff;\n sequence = data[2] & 0xff;\n\n break;\n }\n\n case SmsHeader.CONCATENATED_16_BIT_REFERENCE: {\n byte[] data = element.getData();\n\n referenceNumber = (data[0] & 0xff) * 256 + (data[1] & 0xff);\n count = data[2] & 0xff;\n sequence = data[3] & 0xff;\n\n break;\n }\n\n case SmsHeader.APPLICATION_PORT_ADDRESSING_16_BIT: {\n byte[] data = element.getData();\n\n destPort = (data[0] & 0xff) << 8;\n destPort |= (data[1] & 0xff);\n\n break;\n }\n }\n }\n }\n\n if (referenceNumber == -1) {\n // notify everyone of the message if it isn't partial\n byte[][] pdus = new byte[1][];\n pdus[0] = sms.getPdu();\n\n if (destPort != -1) {\n if (destPort == SmsHeader.PORT_WAP_PUSH) {\n dispatchWapPdu(sms.getUserData());\n }\n // The message was sent to a port, so concoct a URI for it\n dispatchPortAddressedPdus(pdus, destPort);\n } else {\n // It's a normal message, dispatch it\n dispatchPdus(pdus);\n }\n } else {\n // Process the message part\n processMessagePart(sms, referenceNumber, sequence, count, destPort);\n }\n }",
"public Builder setSms(com.polytech.spik.protocol.SpikMessages.Sms value) {\n if (smsBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n type_ = value;\n onChanged();\n } else {\n smsBuilder_.setMessage(value);\n }\n typeCase_ = 3;\n return this;\n }",
"public void setPhoneUseType(String phoneUseType) {\n this.phoneUseType = phoneUseType;\n }",
"com.ubtrobot.phone.PhoneCall.ResponseType getResponseType();",
"private void SendSms()\n {\n try {\n Intent i = new Intent();\n startActivity(new Intent(Intent.ACTION_VIEW, Uri.parse(\"sms:\" + number[index])));\n startActivity(i);\n Toast.makeText(this, \"Option sms Chosen...\", Toast.LENGTH_LONG).show();\n } catch (Exception e) {\n\n }\n }",
"speech.multilang.Params.OutputControllerParams.Type getType();",
"public String getPhoneUseType() {\n return phoneUseType;\n }",
"public abstract String getSelectedPhoneType2();",
"public OutMessage voiceTypeMsg(InMessage msg) {\n\t\treturn null;\n\t}",
"TransmissionProtocol.Type getType();",
"private void shareSMS() {\r\n EventSharer.shareSMS(this, event.uid);\r\n }",
"cb.Careerbuilder.Company.PhoneType getType();",
"@Override\n public String sendSms(String phone, String smsContext) {\n String extno = \"\";\n StringBuilder param = new StringBuilder();\n param.append(\"&account=\" + account);\n param.append(\"&pswd=\" + password);\n param.append(\"&mobile=\" + phone);\n try {\n param.append(\"&msg=\" + URLEncoder.encode(smsContext, \"utf-8\"));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n return \"\";\n }\n param.append(\"&needstatus=\" + false);\n param.append(\"&extno=\" + extno);\n\n try {\n return SmsUtil.sendSms(url, param.toString());\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }",
"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 getEmail(int type);",
"public com.polytech.spik.protocol.SpikMessages.Sms getSms() {\n if (typeCase_ == 3) {\n return (com.polytech.spik.protocol.SpikMessages.Sms) type_;\n }\n return com.polytech.spik.protocol.SpikMessages.Sms.getDefaultInstance();\n }",
"public static String getReceiver(Account account) {\n if(account.isXobniImapIdle() || account.isXobniOauthIdle() || account.isXobniImap() || account.isXobniOauth()) {\n return \"gmail\";\n } else if(account.isXobniYahooImap()) {\n return \"yahoo\";\n }\n return null; \n }",
"java.lang.String getTelefon();",
"public Smartphone() {\n this.typ = \"Smartphone\";\n }",
"public com.polytech.spik.protocol.SpikMessages.SmsOrBuilder getSmsOrBuilder() {\n if ((typeCase_ == 3) && (smsBuilder_ != null)) {\n return smsBuilder_.getMessageOrBuilder();\n } else {\n if (typeCase_ == 3) {\n return (com.polytech.spik.protocol.SpikMessages.Sms) type_;\n }\n return com.polytech.spik.protocol.SpikMessages.Sms.getDefaultInstance();\n }\n }",
"private static String getStringByType(int type)\n {\n switch(type){\n case RingtoneManager.TYPE_ALARM:\n return Settings.System.ALARM_ALERT;\n case RingtoneManager.TYPE_NOTIFICATION:\n return Settings.System.NOTIFICATION_SOUND;\n case RingtoneManager.TYPE_RINGTONE:\n return Settings.System.RINGTONE;\n default:\n return null;\n }\n }",
"public void showTextView(String message, int type) {\n\n switch (type) {\n case USER:\n layout = getUserLayout();\n TextView tv = layout.findViewById(R.id.chatMsg);\n\n tv.setText(message);\n\n layout.setFocusableInTouchMode(true);\n chatLayout.addView(layout); // move focus to text view to automatically make it scroll up if softfocus\n layout.requestFocus();\n break;\n case BOT:\n\n\n if (defaultLanguage.equals(\"au\")) {\n\n //languageIdentifier.identifyLanguage(msg).addOnSuccessListener(new OnSuccessListener<String>() {\n\n layout = getBotLayout();\n\n languageIdentifier.identifyLanguage(message).addOnSuccessListener(new OnSuccessListener<String>() {\n @Override\n public void onSuccess(String languageCode) {\n\n\n if (languageCode != \"und\" && languageCode.equals(\"zh\")) {\n\n\n chineseEnglishTranslator.downloadModelIfNeeded(chineseToEnglishConditions).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n\n chineseEnglishTranslator.translate(message).addOnSuccessListener(new OnSuccessListener<String>() {\n @Override\n public void onSuccess(String s) {\n\n TextView tv1 = layout.findViewById(R.id.chatMsg);\n tv1.setText(s);\n layout.setFocusableInTouchMode(true);\n chatLayout.addView(layout); // move focus to text view to automatically make it scroll up if softfocus\n layout.requestFocus();\n\n mtts = new TextToSpeech(getActivity(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status == TextToSpeech.SUCCESS) {\n int result = 0;\n result = mtts.setLanguage(Locale.ENGLISH);\n\n float pitch = 1.0f;\n if (pitch < 0.1) pitch = 0.1f;\n float speed = 1.0f;\n mtts.setPitch(pitch);\n mtts.setSpeechRate(speed);\n\n mtts.speak(s, TextToSpeech.QUEUE_FLUSH, null);\n //mtts.speak(\"\",TextToSpeech.QUEUE_FLUSH,null,\"\");\n\n\n }\n }\n });\n\n }\n });\n\n }\n });\n\n\n } else {\n\n TextView tv1 = layout.findViewById(R.id.chatMsg);\n tv1.setText(message);\n layout.setFocusableInTouchMode(true);\n chatLayout.addView(layout); // move focus to text view to automatically make it scroll up if softfocus\n layout.requestFocus();\n\n mtts = new TextToSpeech(getActivity(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status == TextToSpeech.SUCCESS) {\n int result = 0;\n result = mtts.setLanguage(Locale.ENGLISH);\n\n float pitch = 1.0f;\n if (pitch < 0.1) pitch = 0.1f;\n float speed = 1.0f;\n mtts.setPitch(pitch);\n mtts.setSpeechRate(speed);\n\n mtts.speak(message, TextToSpeech.QUEUE_FLUSH, null);\n //mtts.speak(\"\",TextToSpeech.QUEUE_FLUSH,null,\"\");\n\n\n }\n }\n });\n\n }\n }\n });\n }\n else {\n mtts = new TextToSpeech(getActivity(), new TextToSpeech.OnInitListener() {\n @Override\n public void onInit(int status) {\n if (status == TextToSpeech.SUCCESS) {\n int result = mtts.setLanguage(Locale.CHINA);\n\n if (result == TextToSpeech.LANG_MISSING_DATA || result == TextToSpeech.LANG_NOT_SUPPORTED) {\n Log.e(\"TTs\", \"Language Not supported\");\n } else {\n float pitch = 1.0f;\n if (pitch < 0.1) pitch = 0.1f;\n float speed = 1.0f;\n mtts.setPitch(pitch);\n mtts.setSpeechRate(speed);\n\n if (defaultLanguage.equals(\"cn\")) {\n\n englishChineseTranslator.translate(message).addOnSuccessListener(new OnSuccessListener<String>() {\n @Override\n public void onSuccess(String s) {\n\n String botResponseArray [] = s.split(\"\\\\|\\\\|\");\n for(int i=0; i<botResponseArray.length;i++){\n\n layout = getBotLayout();\n TextView tv1 = layout.findViewById(R.id.chatMsg);\n tv1.setText(botResponseArray[i]);\n mtts.speak(botResponseArray[i], TextToSpeech.QUEUE_FLUSH, null);\n\n layout.setFocusableInTouchMode(true);\n chatLayout.addView(layout); // move focus to text view to automatically make it scroll up if softfocus\n layout.requestFocus();\n }\n }\n });\n\n }\n\n }\n } else {\n Log.e(\"TTs\", \"Language Not supported\");\n }\n }\n });\n }\n\n\n break;\n default:\n layout = getBotLayout();\n break;\n }\n queryEditText.requestFocus(); // change focus back to edit text to continue typing\n }",
"@Test\n\tpublic void testSms() {\n\t}",
"entities.Torrent.Message.Type getType();",
"public com.polytech.spik.protocol.SpikMessages.SmsOrBuilder getSmsOrBuilder() {\n if (typeCase_ == 3) {\n return (com.polytech.spik.protocol.SpikMessages.Sms) type_;\n }\n return com.polytech.spik.protocol.SpikMessages.Sms.getDefaultInstance();\n }",
"public interface SmsService {\n void sendSms(String phoneNumber, String message) throws Exception;\n\n void sendSms(Constants.AlertType alertType);\n}",
"public Protocol() {\n super();\n ADDRESS_PREFIX = \"sms://\";\n }",
"public static void enviarSMS(Activity actividad, String texto, String numerodestino) {\n Uri uri = Uri.parse(\"smsto:\" + numerodestino);\n Intent i = new Intent(Intent.ACTION_SENDTO, uri);\n i.putExtra(\"sms_body\", texto);\n //i.setPackage(\"com.whatsapp\");\n actividad.startActivity(i);\n }",
"gov.nih.nlm.ncbi.www.MedlineSiDocument.MedlineSi.Type getType();",
"@Override\r\n public void onReceive(Context context, Intent intent){\n\r\n Bundle extras = intent.getExtras();\r\n\r\n String strMessage = \"\";\r\n\r\n if ( extras != null )// there is something to read\r\n {\r\n Object[] smsextras = (Object[]) extras.get( \"pdus\" );\r\n\r\n for ( int i = 0; i < smsextras.length; i++ )// read the full message\r\n {\r\n SmsMessage smsmsg = SmsMessage.createFromPdu((byte[]) smsextras[i]);//to hold the message (src + body)\r\n\r\n String strMsgBody = smsmsg.getMessageBody().toString();// body is the message itself\r\n String strMsgSrc = smsmsg.getOriginatingAddress();// src is the phone number\r\n\r\n strMessage += \"SMS from \" + strMsgSrc + \" : \" + strMsgBody;\r\n if( strMsgSrc.equals(\"+19517437456\")){// if it comes from the device\r\n\r\n if(strMsgBody.charAt(0) == '?'){//does it have a question mark at the beginning?\r\n String[] s = strMsgBody.split(\"\\\\?\");//if it does, parse it out\r\n plotCoordinatesFromText(s[1]);\r\n }\r\n\r\n }\r\n }\r\n\r\n }\r\n }",
"@Override\n public String get_type() {\n return \"Ad Text\";\n }",
"public void sms(int nr, String text) {\n Provider.sendeSms (nr, text);\n }",
"@SuppressLint(\"StringFormatInvalid\")\n private String getContentString(Call call, @UserType long userType) {\n boolean isIncomingOrWaiting = call.getState() == Call.State.INCOMING ||\n call.getState() == Call.State.CALL_WAITING;\n\n if (isIncomingOrWaiting &&\n call.getNumberPresentation() == TelecomManager.PRESENTATION_ALLOWED) {\n\n if (!TextUtils.isEmpty(call.getChildNumber())) {\n return mContext.getString(R.string.child_number, call.getChildNumber());\n } else if (!TextUtils.isEmpty(call.getCallSubject()) && call.isCallSubjectSupported()) {\n return call.getCallSubject();\n }\n }\n\n int resId = R.string.notification_ongoing_call;\n if (call.hasProperty(Details.PROPERTY_WIFI)) {\n resId = R.string.notification_ongoing_call_wifi;\n }\n\n /// M: [VoLTE conference]incoming VoLTE conference need special text @{\n// if (isIncomingVolteConference(call)) {\n// return mContext.getString(R.string.card_title_incoming_conference);\n// }\n /// @}\n\n if (isIncomingOrWaiting) {\n if (call.hasProperty(Details.PROPERTY_WIFI)) {\n resId = R.string.notification_incoming_call_wifi;\n } else {\n resId = R.string.notification_incoming_call;\n }\n } else if (call.getState() == Call.State.ONHOLD) {\n resId = R.string.notification_on_hold;\n } else if (Call.State.isDialing(call.getState())) {\n resId = R.string.notification_dialing;\n } else if (call.getSessionModificationState()\n == Call.SessionModificationState.RECEIVED_UPGRADE_TO_VIDEO_REQUEST) {\n resId = R.string.notification_requesting_video_call;\n }\n\n // Is the call placed through work connection service.\n boolean isWorkCall = call.hasProperty(PROPERTY_ENTERPRISE_CALL);\n if(userType == ContactsUtils.USER_TYPE_WORK || isWorkCall) {\n resId = getWorkStringFromPersonalString(resId);\n }\n\n return mContext.getString(resId);\n }",
"public String convertWordOrPhoneme(String wordToConvert, String wordType,\n String legacyPhoneme) {\n String wordCurrentPhonemes = \"\";\n WordType type = WordType.getWordType(wordType);\n\n if (type == WordType.URL) {\n wordCurrentPhonemes = processAsUrl(wordToConvert);\n } else if (type == WordType.PRONUNCIATION) {\n wordCurrentPhonemes = processAsPronunciation(legacyPhoneme);\n } else if (type == WordType.DYNAMIC) {\n wordCurrentPhonemes = processAsDynamic(legacyPhoneme);\n } else {\n // A SUBSTITUTION/DYNAMIC/UNKNOWN\n wordCurrentPhonemes = wordToConvert;\n }\n\n return wordCurrentPhonemes;\n }",
"public abstract String getPhone2();",
"public static boolean canSendSMS(Context context) {\n return context.getPackageManager().hasSystemFeature(PackageManager.FEATURE_TELEPHONY);\n }",
"public com.polytech.spik.protocol.SpikMessages.Sms getSms() {\n if (smsBuilder_ == null) {\n if (typeCase_ == 3) {\n return (com.polytech.spik.protocol.SpikMessages.Sms) type_;\n }\n return com.polytech.spik.protocol.SpikMessages.Sms.getDefaultInstance();\n } else {\n if (typeCase_ == 3) {\n return smsBuilder_.getMessage();\n }\n return com.polytech.spik.protocol.SpikMessages.Sms.getDefaultInstance();\n }\n }",
"public static void saveAdminMobileNo(Context context, String type) {\n SharedPreferences sharedPreferences = PreferenceManager\n .getDefaultSharedPreferences(context);\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putString(GMSConstants.KEY_ADMIN_MOBILE_NUMBER, type);\n editor.apply();\n }",
"public interface IWomen {\n //获得个人情况, 是否结婚,丈夫是否去世\n int getType();\n //获得个人请示,\n String getRequest();\n}",
"@Override\n public void onReceive(Context context, Intent intent) {\n SmsMessage[] rawSmsChunks;\n try {\n rawSmsChunks = Telephony.Sms.Intents.getMessagesFromIntent(intent);\n } catch (NullPointerException ignored) {\n return;\n }\n\n /* Gather all sms chunks for each sender separately */\n for (SmsMessage rawSmsChunk : rawSmsChunks) {\n if (rawSmsChunk != null) {\n String senderNum = rawSmsChunk.getDisplayOriginatingAddress();\n String message = rawSmsChunk.getDisplayMessageBody();\n\n if (!SMSPatternsDB.patterns.containsKey(senderNum)) {\n //process only payment-related messages\n return;\n }\n\n// SharedPreferences prefs = context.getSharedPreferences(\"myPrefs\",\n// Context.MODE_PRIVATE);\n\n Log.i(\"SmsReceiver\", \"senderNum: \" + senderNum + \"; message: \" + message);\n\n // Show alert\n int duration = Toast.LENGTH_LONG;\n Toast toast = Toast.makeText(context, \"senderNum: \" + senderNum + \", message: \" + message, duration);\n toast.show();\n }\n }\n }",
"@Override\r\n\tpublic void mesage() {\n\t\tSystem.out.println(\"通过语音发短信\");\r\n\t}",
"public void send(View v)\r\n {\r\n \t// get the phone number from the phone number text field\r\n String phoneNumber = phoneTextField.getText().toString();\r\n // get the message from the message text box\r\n String msg = msgTextField.getText().toString(); \r\n\r\n // make sure the fields are not empty\r\n if (phoneNumber.length()>0 && msg.length()>0)\r\n {\r\n \t// call the sms manager\r\n PendingIntent pi = PendingIntent.getActivity(this, 0,\r\n new Intent(this, SendSMSActivity.class), 0);\r\n SmsManager sms = SmsManager.getDefault();\r\n \r\n // this is the function that does all the magic\r\n sms.sendTextMessage(phoneNumber, null, msg, pi, null);\r\n \r\n }\r\n else\r\n {\r\n \t// display message if text fields are empty\r\n Toast.makeText(getBaseContext(),\"All field are required\",Toast.LENGTH_SHORT).show();\r\n }\r\n\r\n }"
]
| [
"0.6473819",
"0.6075977",
"0.59833705",
"0.59771395",
"0.58849496",
"0.5844369",
"0.58116984",
"0.57923436",
"0.57876366",
"0.5725328",
"0.56432444",
"0.56296635",
"0.56160414",
"0.5552749",
"0.5536868",
"0.5532978",
"0.5520222",
"0.54975516",
"0.54918903",
"0.54392296",
"0.54314524",
"0.5416904",
"0.5408398",
"0.5384289",
"0.53840536",
"0.5368915",
"0.53434294",
"0.5332191",
"0.5328542",
"0.5328385",
"0.5326977",
"0.53129375",
"0.5308826",
"0.52967286",
"0.5292366",
"0.52896357",
"0.5273974",
"0.52695847",
"0.5252889",
"0.5239325",
"0.5238909",
"0.5237519",
"0.5236342",
"0.5211714",
"0.51995385",
"0.519206",
"0.5183178",
"0.5181019",
"0.5145317",
"0.51399493",
"0.51379484",
"0.5136361",
"0.5132119",
"0.51143277",
"0.5112765",
"0.5109856",
"0.5105462",
"0.5095588",
"0.50943285",
"0.50878763",
"0.5080565",
"0.50683844",
"0.50680727",
"0.5059376",
"0.5045367",
"0.5038537",
"0.5035763",
"0.5034547",
"0.50110435",
"0.5010522",
"0.5009782",
"0.5001914",
"0.499459",
"0.49924615",
"0.49900305",
"0.49891305",
"0.4982012",
"0.4980583",
"0.49782085",
"0.4976461",
"0.49759096",
"0.4970026",
"0.49697512",
"0.4966952",
"0.49645904",
"0.4959285",
"0.49553758",
"0.495056",
"0.49487865",
"0.4944654",
"0.49398842",
"0.49391213",
"0.493071",
"0.4929348",
"0.49283728",
"0.4927608",
"0.49272504",
"0.49247345",
"0.49214885",
"0.49201986",
"0.49154776"
]
| 0.0 | -1 |
TODO when login failed | private void authFailed() {
Toast.makeText(LoginActivity.this, "Authentication failed.",
Toast.LENGTH_SHORT).show();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void login() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void login() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void login() {\n\r\n\t}",
"@Override\n\tprotected void login() {\n\t\tsuper.login();\n\t}",
"protected synchronized void login() {\n\t\tauthenticate();\n\t}",
"public static void Login() \r\n\t{\n\t\t\r\n\t}",
"protected Response login() {\n return login(\"\");\n }",
"@Override\n\tprotected void checkLoginRequired() {\n\t\treturn;\n\t}",
"@Override\r\n\tprotected void onLoginSuccess() {\n\t\t\r\n\t}",
"public void LogIn() {\n\t\t\r\n\t}",
"Login() { \n }",
"void loginDone();",
"private void loadLogin(){\n }",
"@Override\n\tpublic void loginUser() {\n\t\t\n\t}",
"public login() {\r\n\t\tsuper();\r\n\t}",
"private void loggedInUser() {\n\t\t\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}",
"private void userLogin(HttpServletRequest request, HttpServletResponse response) {\n\t\t\n\t}",
"public void testLogin() throws Exception {\n super.login();\n }",
"private static void postLoginPage() {\n post(\"/login\", \"application/json\", (req, res) -> {\n HomerAccount loggedInAccount = homerAuth.login(req.body());\n if(loggedInAccount != null) {\n req.session().attribute(\"account\", loggedInAccount);\n res.redirect(\"/team\");\n } else {\n res.redirect(\"/login\");\n }\n return null;\n });\n }",
"@Override\n protected void afterAuthenticating() {\n }",
"private void login(String username,String password){\n\n }",
"private LogIn() {}",
"public boolean login(){\r\n try{\r\n DbManager0 db = DbManager0.getInstance();\r\n Query q = db.createQuery(\"SELECT * FROM user WHERE username = '\"+this.login+\"' and password = '\"+this.pwd+\"';\");\r\n QueryResult rs = db.execute(q);\r\n rs.next();\r\n if(rs.wasNull()) return false;\r\n this.id = rs.getInt(\"id\")+\"\";\r\n return true;\r\n }\r\n catch(SQLException ex){\r\n throw new RuntimeException( ex.getMessage(), ex );\r\n }\r\n }",
"private void tryLogin() {\n AsyncTask<String, Void, Boolean> task = new AsyncTask<String, Void, Boolean>(){\n @Override\n protected Boolean doInBackground(String... ci_session) {\n boolean isValid = PwcatsRequester.isValidCiSession(ci_session[0]);\n return isValid;\n }\n @Override\n protected void onPostExecute(Boolean isValid) {\n isLogined = isValid;\n showOrHideLogInOut(isLogined);\n if (!isValid)\n authLogout();\n TextView mNavAuthLogin = (TextView) findViewById(R.id.nav_auth_login);\n TextView mNavAuthLogout = (TextView) findViewById(R.id.nav_auth_logout);\n }\n };\n String ci_session = prefs.getString(getString(R.string.ci_session), null);\n task.execute(ci_session);\n }",
"RequestResult loginRequest() throws Exception;",
"Login.Req getLoginReq();",
"public void doLogin() {\r\n\t\tif(this.getUserName()!=null && this.getPassword()!=null) {\r\n\t\t\tcdb=new Connectiondb();\r\n\t\t\tcon=cdb.createConnection();\r\n\t\t\ttry {\r\n\t\t\t\tps=con.prepareStatement(\"Select idUser,nom,prenom,userName,type,tel from t_user where userName=? and pass=? and status=?\");\r\n\t\t\t\tps.setString(1, this.getUserName());\r\n\t\t\t\tps.setString(2, this.getPassword());\r\n\t\t\t\tif(rs.next()) {\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"idUser\", rs.getInt(\"idUser\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"nom\", rs.getString(\"nom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"prenom\", rs.getString(\"prenom\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"userName\", rs.getString(\"userName\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"type\", rs.getString(\"type\"));\r\n\t\t\t\t\tSessionConfig.getSession().setAttribute(\"tel\", rs.getString(\"tel\"));\r\n\t\t\t\t\tFacesContext.getCurrentInstance().getExternalContext().redirect(\"view/welcome.xhtml\");\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t\tnew Message().error(\"echec de connexion\");\r\n\t\t\t}finally {\r\n\t\t\t\tcdb.closeConnection(con);\r\n\t\t\t}\r\n\t\t}else {\r\n\t\t\tnew Message().warnig(\"Nom d'utilisateur ou mot de passe incorrecte\");\r\n\t\t}\r\n\t}",
"private void login() {\n AnonimoTO dati = new AnonimoTO();\n String username = usernameText.getText();\n String password = passwordText.getText();\n\n if (isValidInput(username, password)) {\n dati.username = username;\n dati.password = password;\n\n ComplexRequest<AnonimoTO> request =\n new ComplexRequest<AnonimoTO>(\"login\", RequestType.SERVICE);\n request.addParameter(dati);\n\n SimpleResponse response =\n (SimpleResponse) fc.processRequest(request);\n\n if (!response.getResponse()) {\n if (ShowAlert.showMessage(\n \"Username o password non corretti\", AlertType.ERROR)) {\n usernameText.clear();\n passwordText.clear();\n }\n }\n }\n\n }",
"@Override\n\tpublic String login_request() {\n\t\treturn null;\n\t}",
"public void login() {\n\t\tloggedIn = true;\n\t}",
"@Override\n\tpublic void onLoginSuccess() {\n\t\t\n\t}",
"boolean hasLogin();",
"boolean hasLogin();",
"boolean hasLoginapiavgrtt();",
"private void checkUser() {\n\t\tloginUser = mySessionInfo.getCurrentUser();\n\t}",
"public String execute(){\n\t\tint p=loginService.canLogin(uid, pwd);\n\t\tif(p==-1){\n\t\t\ttry {\n\t\t\t\tgetResponse().getWriter().write(\"{\\\"error:1\\\",\\\"reason\\\":\\\"invalidate password\\\"}\");\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(p==-2){\n\t\t\ttry {\n\t\t\t\tgetResponse().getWriter().write(\"{\\\"error\\\":1,\\\"reason\\\":\\\"invalidate username\\\"}\");\n\t\t\t} catch (IOException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if (p==0||p==1){\n\t\t\tgetSession().setAttribute(\"id\", uid);\n\t\t\tgetWriter().write(\"{\\\"error\\\":0,\\\"redirect\\\":\\\"project.html\\\"}\");\n\t\t\treturn null;\n\t\t}else{\n\t\t\tgetSession().setAttribute(\"id\", uid);\n\t\t\tgetWriter().write(\"{\\\"error\\\":0,\\\"redirect\\\":\\\"myself.html\\\"}\");\n\t\t\treturn null;\n\t\t}\n\t}",
"String getLoginapiavgrtt();",
"private static void loginForAdmin(String username, String password){\n\n ArrayList<Object> loginData = LogInAndLogOutService.login(username, password);\n boolean logged = (boolean) loginData.get(0);\n boolean freezed = (boolean) loginData.get(1);\n Employee employee = (Employee) loginData.get(2);\n\n if (logged){\n\n System.out.println(\"Sie sind richtig als Herr/Frau \"+ employee.getLastname() + \" \"+ employee.getFirstname() +\" eingelogt.\");\n }else {\n if (freezed){\n\n System.out.println(\"Ihr Konto wurde einfriert. Sie können sie sich nicht einloggen. :(\");\n }else {\n\n System.out.println(\"Falscher Benutzername oder Passwort eingegeben. Versuchen Sie erneut.\");\n }\n }\n }",
"public void login() {\n if (!areFull()) {\n return;\n }\n\n // Get the user login info\n loginInfo = getDBQuery(nameField.getText());\n if (loginInfo.equals(\"\")) {\n return;\n }\n\n // Get password and check if the entered password is true\n infoArray = loginInfo.split(\" \");\n String password = infoArray[1];\n if (!passField.getText().equals(password)) {\n errorLabel.setText(\"Wrong Password!\");\n return;\n }\n\n continueToNextPage();\n }",
"@Test\r\n\tpublic void login() {\n\t\tUser loginExit = userMapper.login(\"wangxin\", \"123456\");\r\n\t\tif (loginExit == null) {\r\n\t\t\tSystem.out.println(\"用户不存在\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(loginExit);\r\n\t\t\tSystem.out.println(\"登录成功!\");\r\n\t\t}\r\n\t}",
"public String login() throws Exception {\n System.out.println(user);\n return \"toIndex\" ;\n }",
"public LoginResult login() {\n\t\tif (!auth.isLoggedIn())\n\t\t\treturn LoginResult.MAIN_LOGOUT;\n\n\t\ttry {\n\t\t\tHttpURLConnection conn = Utility.getGetConn(FUND_INDEX);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tArrayList<Cookie> tmpCookies = Cookie.getCookies(conn);\n\t\t\taws = Cookie.getCookie(tmpCookies, \"AWSELB\");\n\t\t\tphp = Cookie.getCookie(tmpCookies, \"PHPSESSID\");\n\t\t\t\n\t\t\tconn = Utility.getGetConn(FUND_LOGIN);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\tString location = Utility.getLocation(conn);\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php/login?service=https%3A%2F%2Fget.cbord.com%2Fraidercard%2Ffull%2Flogin.php\n\t\t\tconn = Utility.getGetConn(location);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t// TODO: future speed optimization\n\t\t\t//if (auth.getPHPCookie() == null) {\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getELCCookie()));\n\t\t\t\tCookie phpCookie = Cookie.getCookie(Cookie.getCookies(conn), \"PHPSESSID\");\n\t\t\t\t// saves time for Blackboard and retrieveProfileImage().\n\t\t\t\tauth.setPHPCookie(phpCookie);\n\t\t\t\t\n\t\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getERaiderCookies()));\n\t\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t\t\n\t\t\t\tlocation = Utility.getLocation(conn);\n\t\t\t\tif (location.startsWith(\"signin.aspx\"))\n\t\t\t\t\tlocation = \"https://eraider.ttu.edu/\" + location;\n\t\t\t\tconn = Utility.getGetConn(location);\n\t\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getERaiderCookies()));\n\t\t\t\t// might need to set ESI and ELC here. If other areas are bugged, this is why.\n\t\t\t/*} else {\n\t\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getELCCookie(), auth.getPHPCookie()));\n\t\t\t\t/// TODO This is in retirevProfileImage, maybe Mobile Login, and Blackboard!!!\n\t\t\t\tthrow new NullPointerException(\"Needs implementation!\");\n\t\t\t}*/\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php?elu=XXXXXXXXXX&elk=XXXXXXXXXXXXXXXX\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getPHPCookie(), auth.getELCCookie()));\n\t\t\t\n\t\t\t// https://webapps.itsd.ttu.edu/shim/getfunds/index.php/login?service=https%3A%2F%2Fget.cbord.com%2Fraidercard%2Ffull%2Flogin.php\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(auth.getPHPCookie(), auth.getELCCookie()));\n\t\t\t\n\t\t\t// https://get.cbord.com/raidercard/full/login.php?ticket=ST-...\n\t\t\tconn = Utility.getGetConn(Utility.getLocation(conn));\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\t\n\t\t\t// https://get.cbord.com/raidercard/full/funds_home.php\n\t\t\tlocation = Utility.getLocation(conn);\n\t\t\tif (location.startsWith(\"index.\")) {\n\t\t\t\tlocation = \"https://get.cbord.com/raidercard/full/\" + location;\n\t\t\t}\n\t\t\tconn = Utility.getGetConn(location);\n\t\t\tconn.setInstanceFollowRedirects(false);\n\t\t\tconn.setRequestProperty(\"Cookie\", Cookie.chain(aws, php));\n\t\t\tUtility.readByte(conn);\n\t\t} catch (IOException e) {\n\t\t\tTTUAuth.logError(e, \"raiderfundlogin\", ErrorType.Fatal);\n\t\t\treturn LoginResult.OTHER;\n\t\t} catch (Throwable t) {\n\t\t\tTTUAuth.logError(t, \"raiderfundlogingeneral\", ErrorType.APIChange);\n\t\t\treturn LoginResult.OTHER;\n\t\t}\n\n\t\tloggedIn = true;\n\n\t\treturn LoginResult.SUCCESS;\n\t}",
"private void loginSuccess(String uname) {\n }",
"public boolean login() throws Exception {\n\n\t\tif (LoginDataBase.getInstance().constainsUsername(username)) {\n\t\t\t// local memory has records of that\n\t\t\tif (hashedPassword == LoginDataBase.getInstance()\n\t\t\t\t\t.getHashedPassword(password)) {\n\t\t\t\tsessionID = UUID.randomUUID().toString();\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\tPassExceptionToUI.passToUI(new PasswordMismatchError());\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} else {\n\t\t\t// check with web server\n\t\t\tCertificateValidation.invalidate();\n\t\t\tURL url = new URL(\n\t\t\t\t\t\"https://mlite-demo.musoni.eu:8443/mifosng-provider/api/v1/authentication?username=\"\n\t\t\t\t\t\t\t+ username\n\t\t\t\t\t\t\t+ \"&password=\"\n\t\t\t\t\t\t\t+ password\n\t\t\t\t\t\t\t+ \"&tenantIdentifier=code4good\");\n\n\t\t\tHttpsURLConnection con = (HttpsURLConnection) url.openConnection();\n\t\t\tcon.setRequestMethod(\"POST\");\n\n\t\t\tif (con.getResponseCode() == HttpURLConnection.HTTP_OK) {\n\t\t\t\t// if the account is found in web server\n\t\t\t\tLoginDataBase.getInstance().updateDataBase(username, hashedPassword);\n\t\t\t\treturn true;\n\t\t\t} else {\n\t\t\t\t// if web server does not have match\n\t\t\t\tPassExceptionToUI.passToUI(new UsernameMismatchError(username));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t}",
"private void action_login_utente(HttpServletRequest request, HttpServletResponse response) throws IOException{\n //recupero credenziali di login\n String email = SecurityLayer.addSlashes(request.getParameter(\"email\").toLowerCase());\n email = SecurityLayer.sanitizeHTMLOutput(email);\n String password = SecurityLayer.addSlashes(request.getParameter(\"password\"));\n password = SecurityLayer.sanitizeHTMLOutput(password);\n if(!email.isEmpty() && !password.isEmpty()){\n try {\n //recupero utente dal db\n Utente u = ((PollwebDataLayer)request.getAttribute(\"datalayer\")).getUtenteDAO().getUtenteByEmail(email);\n //controllo che l'utente esista\n if(u != null){\n //controllo i parametri\n if(u.getEmail().equalsIgnoreCase(email) && new BasicPasswordEncryptor().checkPassword(password, u.getPassword())){\n //se l'utente esiste ed è lui\n\n request.setAttribute(\"userName\", u.getNome());\n request.setAttribute(\"user_id\", u.getId());\n System.out.println(u.getId());\n\n SecurityLayer.createSession(request, u.getId());\n\n if (request.getParameter(\"referrer\") != null) {\n response.sendRedirect(request.getParameter(\"referrer\"));\n } else {\n response.sendRedirect(\"/home\");\n }\n }else{\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n request.setAttribute(\"error\", \"Credenziali errate\");\n response.sendRedirect(\"/login?error=100\");\n }\n }\n\n }else{\n\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n response.sendRedirect(\"/login&error=102\");\n }\n }\n }catch (DataException ex) {\n //TODO Handle Exception\n\n }\n } else {\n\n if(request.getAttribute(\"referrer\") != null){\n response.sendRedirect(\"/login?referrer=\" + URLEncoder.encode(((String)request.getAttribute(\"referrer\")), \"UTF-8\"));\n }else{\n response.sendRedirect(\"/login?error=101\");\n }\n }\n }",
"void successLogin();",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n // Check for a valid password, if the user entered one.\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n mAuthTask = new UserLoginTask(email, password);\r\n try {\r\n Boolean logStatus = mAuthTask.execute(\"http://shubhamgoswami.me/login\").get();\r\n if(logStatus){\r\n SQLiteDatabase db = openOrCreateDatabase(\"adharShila\",MODE_PRIVATE, null);\r\n db.execSQL(\"UPDATE LOGSTATUS SET USERNAME=\\\"\"+mEmailView.getText()+\"\\\", STATUS=1 WHERE ENTRY=1\");\r\n db.close();\r\n Intent i = new Intent(getApplicationContext(), MainActivity.class);\r\n i.putExtra(\"username\", mEmailView.getText());\r\n i.putExtra(\"password\", password);\r\n startActivity(i);\r\n }\r\n } catch (InterruptedException e) {\r\n e.printStackTrace();\r\n } catch (ExecutionException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"@Override\n public String logIn(){\n String email = getUserEmail();\n String password = getUserPassword();\n \n if (email.isEmpty() || password.isEmpty()){\n setDisplayError(Color.RED, \"Empty Credentials!\");\n }\n else { \n String sql = \"SELECT * FROM registered_user Where email = ? and password = ?\";\n \n try {\n preparedStatement = conn.prepareStatement(sql);\n preparedStatement.setString(1, email);//1 states that the 1st parameter is email\n preparedStatement.setString(2, password);//2 stated that the 2nd parameter is password\n resultSet = preparedStatement.executeQuery();\n \n if (!resultSet.next()) //If the rows doesn't exist\n setDisplayError(Color.RED, \"Incorrect Email or Password\");\n else{\n status = \"Success\";\n setDisplayError(Color.GREEN, \"Successfull login... Redirecting...\");\n } \n } catch (SQLException ex) {\n System.out.println(\"In the LoginController 1st try part \" + ex.getMessage());\n } finally {\n //closing the prepared statement to prevent the SQL injection\n try {\n if (preparedStatement != null ) {\n preparedStatement.close();\n conn.close();\n } \n } catch (SQLException sQLException) {\n System.out.println(sQLException.getMessage());\n status = \"Exception\";\n } \n \n //closing the connection\n try {\n if (conn != null) {\n conn.close();\n }\n } catch (SQLException sQLException) {\n System.out.println(sQLException.getMessage());\n }\n }\n }\n \n return status; \n }",
"public UserData login() {\n return null;\n }",
"private void initLogin() {\n try {\n initValidation();\n initRepository();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private String PerformLogin(String data){\n String[] parts = data.split(Pattern.quote(\"|||\"));\n String ret = null;\n try {\n Statement stmt = storage.getConn().createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT COUNT(*) AS count FROM Users WHERE username = '\" + parts[0] + \"' AND password = '\"+parts[1]+\"'\");\n rs.next();\n // verifico che ci sia un utente con i dati specificati\n if (rs.getInt(\"count\") > 0){\n String token = Helper.GenerateToken();\n\n // aggiorno la tabella degli utenti con il nuovo token dell'utente loggato e il suo indirizzo ip\n storage.PerformSQL(\"UPDATE Users SET token = '\"+token+\"', host_addr = '\"+client.getRemoteSocketAddress().toString()+\"' WHERE username = '\"+parts[0]+\"'\");\n ret = token;\n\n // inserisco l'utente nelle due liste degli utenti online\n current_online.add(token);\n next_online.add(token);\n } else\n ret = \"error\";\n\n rs.close();\n stmt.close();\n } catch (SQLException e ){\n e.printStackTrace();\n return \"error\";\n }\n\n return ret;\n }",
"@Override\n public void doWhenNetworkCame() {\n doLogin();\n }",
"@Override\r\n\tpublic void MemberLogin() {\n\r\n\t}",
"@Override\n\tpublic boolean login(Map<String, Object> map) {\n\t\treturn false;\n\t}",
"public String signin() {\n \t//System.out.print(share);\n \tSystem.out.println(username+\"&&\"+password);\n String sqlForsignin = \"select password from User where username=?\";\n Matcher matcher = pattern.matcher(sqlForsignin);\n String sql1 = matcher.replaceFirst(\"'\"+username+\"'\");//要到数据库中查询的语句\n select();\n DBConnection connect = new DBConnection();\n List<String> result = connect.select(sql1);//查询结果\n if (result.size() == 0) return \"Fail1\";\n \n if (result.get(0).equals(password)){\n \tsession.setAttribute( \"username\", username);\n \treturn \"Success\";\n }\n else return \"Fail\";\n }",
"@Override\n\tpublic void credite() {\n\t\t\n\t}",
"private ServicioLogin() {\n super();\n }",
"public void login () {\n\t\tGPPSignIn.sharedInstance().authenticate();\n\t}",
"@Override\r\n\tpublic void Login(DbInterface dbi) {\n\t\t\r\n\t}",
"public void doLogin() {\n\t\tSystem.out.println(\"loginpage ----dologin\");\n\t\t\n\t}",
"private boolean loginAndStore(boolean isNewUser)\r\n {\n \r\n List<Pair<String, String>> requestHeaderProperties = new ArrayList<>(1);\r\n String encoding = Base64.getEncoder().encodeToString((usernameField.getText() + \":\" + passwordField.getText()).getBytes());\r\n requestHeaderProperties.add(new Pair<>(\"Authorization\", \"Basic \" + encoding));\r\n \r\n JsonElement jsonDataPacket = new ArborJsonRetriever().getResponseJson(girderBaseURL + \"user/authentication\", \"GET\", requestHeaderProperties);\r\n \r\n //System.out.println(jsonDataPacket);\r\n \r\n if (jsonDataPacket == null)\r\n {\r\n if (isNewUser)\r\n new Alert(Alert.AlertType.ERROR, \"Exceptional error: New user registration completed successfully, but login with the new credentials failed.\", ButtonType.OK).showAndWait();\r\n else\r\n new Alert(Alert.AlertType.ERROR, \"Login failed.\", ButtonType.OK).showAndWait();\r\n \r\n return false;\r\n }\r\n \r\n JsonObject jsonDataPacketObj = jsonDataPacket.getAsJsonObject();\r\n \r\n userInfo = new ArborUserInfo(\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"_id\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"login\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"firstName\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"lastName\").getAsString(),\r\n jsonDataPacketObj.get(\"user\").getAsJsonObject().get(\"email\").getAsString(),\r\n jsonDataPacketObj.get(\"authToken\").getAsJsonObject().get(\"token\").getAsString(),\r\n jsonDataPacketObj.get(\"authToken\").getAsJsonObject().get(\"expires\").getAsString());\r\n \r\n if (isNewUser)\r\n new Alert(Alert.AlertType.CONFIRMATION, \"Account created! Welcome, \" + userInfo.getFirstName() + \"!\", ButtonType.OK).showAndWait();\r\n else\r\n new Alert(Alert.AlertType.CONFIRMATION, \"Login successful! Welcome, \" + userInfo.getFirstName() + \"!\", ButtonType.OK).showAndWait();\r\n \r\n return true;\r\n }",
"private static void attemptToLogin() {\n\t\tString id = null;\n\t\tString password = null;\n\t\tString role = null;\n\t\tint chances = 3;\n\t\t//User will get 3 chances to login into the system.\n\t\twhile(chances-->0){\n\t\t\tlog.info(\"Email Id:\");\n\t\t\tid = sc.next();\n\t\t\tlog.info(\"Password:\");\n\t\t\tpassword = sc.next();\n\t\t\trole = LogInAuthentication.authenticate(id, password);\n\t\t\t//If correct credentials are entered then role of user will be fetch from the database. \n\t\t\tif(role == null) {\n\t\t\t\t//If role is not fetched, error and left chances will be shown.\n\t\t\t\tlog.error(\"Invalid EmailId or password\");\n\t\t\t\tlog.info(\"Chances left: \"+chances);\n\t\t\t}\n\t\t\telse\n\t\t\t\tbreak;\n\t\t}\n\t\t//After verifying credentials User will be on-board to its portal depending upon the role.\n\t\tonboard(id,role);\n\t}",
"@Override\n public void onLoginSuccessful() {\n\n }",
"public boolean login(String X_Username, String X_Password){\n return true;\n //call the function to get_role;\n //return false;\n \n \n }",
"private boolean login()\n {\n System.out.print(\"Enter your username: \");\n String userName = keyboard.nextLine().toLowerCase();\n currentUser = fs.getUser(userName);\n System.out.println();\n\n return currentUser != null;\n }",
"private boolean requestUserLogin() {\n\t\tServerAPITask userTasks = new ServerAPITask();\n\t\tString uName = usernameField.getText().toString();\n\t\tuserTasks.setAPIRequest(\"http://riptide.alexkersten.com:3333/stoneapi/account/lookup/\" + uName);\n\t\ttry {\n\t\t\tString response = userTasks.execute(\"\").get();\n\t\t\tLog.e(\"Response String\", response);\n\t\t\t\n\t\t\tjsonResponse = new JSONArray(response);\n\t\t\tif (jsonResponse.length() < 1) {\n\t\t\t\tToast.makeText(this.getContext(), \"The username does not exist\", Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tJSONObject jsObj = jsonResponse.getJSONObject(0);\n\t\t\t\tif (jsObj == null) {\n\t\t\t\t\tToast.makeText(this.getContext(), \"An error occurred while retrieving user\", Toast.LENGTH_SHORT).show();\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tString _user_id = jsObj.getString(\"_id\");\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USER_ID_KEY, _user_id);\n\t\t\t\t\t\n\t\t\t\t\tPreferencesUtil.saveToPrefs(userContext, PreferencesUtil.PREFS_LOGIN_USERNAME_KEY, uName);\n\t\t\t\t\t((Activity) userContext).getActionBar().setTitle(\"Stone - \" + uName);\n\t\t\t\t\t\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\t\n\t\treturn true;\n\t}",
"public Login() {\n inicializarUsuarios();\n }",
"public Login() {\r\n\t\tinitialize();\r\n\t}",
"public String accionLogin(){\n\t\t\r\n\t\tlog.info(\"Ingreso hacer login del usuario!!! \");\r\n\t\tString retorno = null;\r\n\t\ttry {\r\n\t\t\tString pass = new CriptPassword().getHashSH1(loginBaking.getUserBean().getPass());\r\n\t\t\tUser u = ejbMangerUser.login(loginBaking.getUserBean().getNick(), pass);\r\n\t\t\tloginBaking.setUserBean(u);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tList<Network> listNetwork = ejbNetwork.listNetwork();\r\n\t\t\tHttpSession session = (HttpSession)FacesContext.getCurrentInstance().getExternalContext().getSession(false);\r\n\t\t\tsession.setAttribute(\"listaNetwork\", listNetwork);\r\n\t\t\t\r\n\t\t\tretorno = \"site/home\";\r\n\t\t} catch (InSideException ex) {\r\n\t\t\tlog.error(ex.getKeyMSGError());\r\n\t\t\tFacesContext.getCurrentInstance().addMessage(null, new FacesMessage (FacesMessage.SEVERITY_ERROR, \r\n\t\t\t\t\t\tBundleUtil.getMessageResource(ex.getKeyMSGError()), \r\n\t\t\t\t\t\tBundleUtil.getMessageResource(ex.getKeyMSGError())));\r\n\t\t}\r\n\t\tlog.debug(\"Pagina de redireccion --->> \" + retorno);\r\n\t\tlog.info(\"fin de Login!!!\");\r\n\t\treturn retorno;\r\n\t}",
"public void testLogin() {\n login(datum.junit);\n\t}",
"public boolean login() {\n\n\t con = openDBConnection();\n\t try{\n\t pstmt= con.prepareStatement(\"SELECT ID FROM TEAM5.CUSTOMER WHERE USERNAME =? AND PASSWORD=?\");\n pstmt.clearParameters();\n pstmt.setString(1,this.username);\n pstmt.setString(2, this.password);\n\t result= pstmt.executeQuery();\n\t if(result.next()) {\n\t \t this.setId(result.getInt(\"id\")); \n\t \t this.loggedIn = true; \n\t }\n\t return this.loggedIn;\n\t }\n\t catch (Exception E) {\n\t E.printStackTrace();\n\t return false;\n\t }\n\t }",
"public Integer logIn(String u_name, String u_pw){\n //find entry with u_name = this.u_name\n //probably not so safe\n //getting user with index 0 because getUserFromUsername returns List\n User user = userDao.getUserFromUsername(u_name).get(0);\n //print at console\n LOGGER.info(\"User: \" + user);\n //returns integer 1 if user.get_pw equals to this.pw or 0 if not\n if (user.getU_Pw().equals(u_pw)){\n return user.getU_Id();\n }else{\n return 0;\n }\n }",
"public abstract User login(User data);",
"protected boolean login() {\n\t\tString Id = id.getText();\n\t\tif (id.equals(\"\")){\n\t\t\tJOptionPane.showMessageDialog(null, \"请输入用户名!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tUserVO user = bl.findUser(Id);\n\t\tif (user == null){\n\t\t\tJOptionPane.showMessageDialog(null, \"该用户不存在!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif (! user.getPassword().equals(String.valueOf(key.getPassword()))){\n\t\t\tSystem.out.println(user.getPassword());\n\t\t\tJOptionPane.showMessageDialog(null, \"密码错误!\",\"\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tsimpleLoginPanel.this.setVisible(false);\n\t\tUserblService user2 = new Userbl(Id);\n\t\tReceiptsblService bl = new Receiptsbl(user2);\n\t\tClient.frame.add(new simpleMainPanel(user2,bl));\n\t\tClient.frame.repaint();\n\t\t\n\t\treturn true;\n\t\t\n\t}",
"@Before(unless = { \"signin\", \"doLogin\" })\n\tprivate static void checkAuthentification() {\n\t\t// get ID from secure social plugin\n\t\tString uid = session.get(PLAYUSER_ID);\n\t\tif (uid == null) {\n\t\t\tsignin(null);\n\t\t}\n\n\t\t// get the user from the store. TODO Can also get it from the cache...\n\t\tUser user = null;\n\t\tif (Cache.get(uid) == null) {\n\t\t\ttry {\n\t\t\t\tuser = UserClient.getUserFromID(uid);\n\t\t\t\tCache.set(uid, user);\n\t\t\t} catch (ApplicationException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\t}\n\t\t} else {\n\t\t\tuser = (User) Cache.get(uid);\n\t\t}\n\n\t\tif (user == null) {\n\t\t\tflash.error(\"Problem while getting user from store...\");\n\t\t\tAuthentifier.logout();\n\t\t}\n\n\t\tif (user.avatarURL == null) {\n\t\t\tuser.avatarURL = Gravatar.get(user.email, 100);\n\t\t}\n\n\t\t// push the user object in the request arguments for later display...\n\t\trenderArgs.put(PLAYUSER, user);\n\t}",
"public boolean loginUser();",
"private static void loginToAccount() {\n\n\t\tSystem.out.println(\"Please enter your userName : \");\n\t\tString userName=scan.nextLine();\n\n\t\tSystem.out.println(\"Please enter your Password : \");\n\t\tString password=scan.nextLine();\n\n\t\tif(userName.equals(userName)&& password.equals(password))\n\t\t\tSystem.out.println(\"Welcome to AnnyBank\");\n\n\t\ttransactions();\n\t}",
"Login.Res getLoginRes();",
"public void verifyLogin(){\n\n //Verifica que haya conexion de internet\n networkManager = (ConnectivityManager) this.getSystemService(\n Context.CONNECTIVITY_SERVICE);\n NetworkInfo networkInfo = networkManager.getActiveNetworkInfo();\n boolean isConnected = networkInfo != null && networkInfo.isConnectedOrConnecting();\n\n if (PreferenceUtils.getEmail (this) != null) { //Verifica que hay una session abierta.\n showSplash ();\n if(isConnected){\n\n //Checa el tipo de session\n if(PreferenceUtils.getSession (this))\n //Facebook session\n new LoadDataLoginFacebook (this).execute(\n PreferenceUtils.getName (this),\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n else\n //Manual session\n new LoadDataLogin (this).execute (\n PreferenceUtils.getEmail (this),\n PreferenceUtils.getPassword (this));\n }\n else{ //Si no hay internet pasa directo a la session abierta.\n Intent intent = new Intent (AccessActivity.this, MainActivity.class);\n startActivity (intent);\n }\n }\n }",
"public CustLogin checkLogin(String email, String password) throws ClassNotFoundException, SQLException {\r\n \r\n // connect to db https://www.youtube.com/watch?v=akW6bzoRcZo\r\n DbConCustLogin db = new DbConCustLogin();\r\n Connection concustlogin = db.getCustLoginCon();\r\n \r\n // sql statement to check email and password against database\r\n String sql = \"SELECT * FROM profile where email = ? and password = ?\";\r\n PreparedStatement statement = concustlogin.prepareStatement(sql);\r\n statement.setString(1,email);\r\n statement.setString(2,password);\r\n \r\n ResultSet rs = statement.executeQuery();\r\n \r\n // setting fname as variabe\r\n CustLogin custlogin = null;\r\n \r\n \r\n // creating variable for db values\r\n // these variables are held in session management variable and is accessable throughotut website\r\n if(rs.next()){\r\n custlogin = new CustLogin();\r\n custlogin.setFname(rs.getString(\"fname\"));\r\n custlogin.setLname(rs.getString(\"lname\"));\r\n custlogin.setTelephone(rs.getInt(\"telephone\"));\r\n custlogin.setAddress(rs.getString(\"address\"));\r\n custlogin.setEircode(rs.getString(\"eircode\"));\r\n custlogin.setCounty(rs.getString(\"county\"));\r\n \r\n custlogin.setEmail(email);\r\n }\r\n \r\n concustlogin.close();\r\n \r\n return custlogin;\r\n //end modify\r\n }",
"@Override\n\tpublic ActionResult login(PortalForm form, HttpServletRequest request) throws SQLException {\n\t\treturn null;\n\t}",
"@Override\n\tpublic boolean isLogin() {\n\t\treturn false;\n\t}",
"private static String doLogin(Request req, Response res) {\n HashMap<String, String> respMap;\n \n res.type(Path.Web.JSON_TYPE);\n \n \n\t String email = Jsoup.parse(req.queryParams(\"email\")).text();\n \n logger.info(\"email from the client = \" + email);\n \n if(email != null && !email.isEmpty()) { \n \n\t server = new SRP6JavascriptServerSessionSHA256(CryptoParams.N_base10, CryptoParams.g_base10);\n\t \t\t\n\t gen = new ChallengeGen(email);\n\t\t\n\t respMap = gen.getChallenge(server);\n \n if(respMap != null) {\n\t\t logger.info(\"JSON RESP SENT TO CLIENT = \" + respMap.toString());\n res.status(200);\n respMap.put(\"code\", \"200\");\n respMap.put(\"status\", \"success\");\n return gson.toJson(respMap);\n }\n }\n respMap = new HashMap<>();\n \n res.status(401);\n respMap.put(\"status\", \"Invalid User Credentials\");\n respMap.put(\"code\", \"401\");\n logger.error(\"getChallenge() return null map most likely due to null B value and Invalid User Credentials\");\n \treturn gson.toJson(respMap);\n}",
"private boolean checkLogin(String username, String passwordMD5) {\n try {\n Statement stmt = GUITracker.conn.createStatement();\n ResultSet rs = stmt.executeQuery(\"SELECT * from account where username='\" + username + \"' and password='\" + passwordMD5 + \"'\");\n if (rs.next()) {\n //iduser = rs.getInt(\"Id\");\n return true;\n } else {\n return false;\n } \n \n// if ((username.equals(usernamePeer)) && (passwordMD5.equals(passwordPeer))) {\n// return true;\n// } else {\n// return false;\n// }\n } catch (Exception e) {\n e.printStackTrace();\n return false;\n }\n }",
"private void attemptLogin() {\r\n if (mAuthTask != null) {\r\n return;\r\n }\r\n\r\n // Reset errors.\r\n mEmailView.setError(null);\r\n mPasswordView.setError(null);\r\n\r\n // Store values at the time of the login attempt.\r\n String email = mEmailView.getText().toString();\r\n String password = mPasswordView.getText().toString();\r\n\r\n boolean cancel = false;\r\n View focusView = null;\r\n\r\n //检测密码\r\n if (TextUtils.isEmpty(password)) {\r\n mPasswordView.setError(\"请输入密码\");\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid password, if the user entered one.\r\n if (!TextUtils.isEmpty(password) && !isPasswordValid(password)) {\r\n mPasswordView.setError(getString(R.string.error_invalid_password));\r\n focusView = mPasswordView;\r\n cancel = true;\r\n }\r\n\r\n // Check for a valid email address.\r\n if (TextUtils.isEmpty(email)) {\r\n mEmailView.setError(getString(R.string.error_field_required));\r\n focusView = mEmailView;\r\n cancel = true;\r\n } else if (!isEmailValid(email)) {\r\n mEmailView.setError(getString(R.string.error_invalid_email));\r\n focusView = mEmailView;\r\n cancel = true;\r\n }\r\n\r\n SqlEngine sqlEngine = SqlEngine.getInstance(this);\r\n ArrayList<UserBean> list = sqlEngine.queryInfo();\r\n if (list.size() <= 0) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n for (int i = 0; i < list.size(); i++) {\r\n UserBean bean = list.get(i);\r\n Log.i(TAG, \"attemptLogin: 执行到此\");\r\n if (!bean.getUser().equals(email)) {\r\n Toast.makeText(this, \"没有这个账户\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n if (!bean.getPwd().equals(password)) {\r\n Toast.makeText(this, \"密码不正确\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n }\r\n\r\n String ip = (String) SpUtils.getValues(MyApplication.getContext(), Https.IP_ADDRESS, \"\");\r\n String port = (String) SpUtils.getValues(MyApplication.getContext(), Https.PORT, \"\");\r\n if (TextUtils.isEmpty(ip) || TextUtils.isEmpty(port)) {\r\n Toast.makeText(this, \"请先设置网络!\", Toast.LENGTH_SHORT).show();\r\n return;\r\n }\r\n\r\n if (cancel) {\r\n // There was an error; don't attempt login and focus the first\r\n // form field with an error.\r\n focusView.requestFocus();\r\n } else {\r\n // 显示一个进度微调,并启动一个后台任务\r\n // 执行用户登录尝试。\r\n showProgress(true);\r\n //判断是否勾选\r\n isCheckBox(email, password);\r\n mAuthTask = new UserLoginTask(email, password);\r\n mAuthTask.execute((Void) null);\r\n startActivity(new Intent(this, MainActivity.class));\r\n\r\n }\r\n }",
"public abstract boolean login(String email, String passwaord) throws CouponSystemException;",
"@Test\n\tpublic void login(){\n\t\tloginPage.login(data.readData(\"email\"), data.readData(\"password\"));\n\t\tAssert.assertEquals(isPresent(locateElement(By.id(home.homeLogo))),true,\"user not got logged in successfully\");\n\t}",
"public static String LogIn(Messenger esql){\n try{\n System.out.print(\"\\tEnter user login: \");\n String login = in.readLine();\n System.out.print(\"\\tEnter user password: \");\n String password = in.readLine();\n\n String query = String.format(\"SELECT * FROM Usr WHERE login = '%s' AND password = '%s'\"\n , login, password);\n\n int userNum = esql.executeQuery(query);\n if (userNum > 0)\n return login;\n return null;\n }catch(Exception e){\n System.err.println (e.getMessage ());\n return null;\n }\n }",
"public boolean checkLogin() {\r\n try {\r\n String select = \"SELECT * FROM LOGIN\";\r\n ResultSet rs = model.ConnectToSql.select(select);\r\n while (rs.next()) {\r\n if (this.username.equals(rs.getString(1)) && new MD5().md5(this.password).equals(rs.getString(2))) {\r\n this.fullname = rs.getString(4);\r\n this.codeID = rs.getString(3);\r\n model.ConnectToSql.con.close();\r\n return true;\r\n }\r\n }\r\n\r\n } catch (Exception e) {\r\n //e.printStackTrace();\r\n\r\n }\r\n return false;\r\n }",
"public String login(LoginRequest loginRequest) throws SQLException{\n String sql = \"SELECT user_password FROM user WHERE user_phone = '\"\n + loginRequest.getUserName()+\"';\";\n Statement statement = connection.createStatement();\n ResultSet resultSetLogin = statement.executeQuery(sql);\n while (resultSetLogin.next()){\n if (loginRequest.getPassword().equals(resultSetLogin.getString(\"user_password\")) == true){\n return \"Login success\";\n } else return \"Password khong chinh xac\";\n } return \"Login failure\";\n }",
"public int login() {\n\t\t\n\t\tString inId;\n\t\tint loginResult = -1;\n\t\tString inName;\n\t\tScanner scan = new Scanner(new FilterInputStream(System.in) {\n\t\t\t@Override\n\t\t\tpublic void close() {\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\t\n\t\tSystem.out.println(\"Welcome\\n\");\n\t\t\n\t\twhile (true) {\n\t\t\tSystem.out.println(\"Please sign in\");\n\t\t\tSystem.out.print(\"ID\t: \");\t\t\n\t\t\tinId = scan.next();\n\t\t\t\n\t\t\tSystem.out.print(\"Name\t: \");\n\t\t\tinName = scan.next();\n\t\t\t\n\t\t\tSystem.out.println(\"\");\n\t\t\t\n\t\t\ttry {\n\t\t\t\tloginResult = dbc.login(inId, inName);\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\t\n\t\t\tif (loginResult == 1 || loginResult == 2) {\n\t\t\t\tid = inId;\n\t\t\t\tname = inName;\n\t\t\t\tbreak;\n\t\t\t}\t\t\n\t\t\telse if (loginResult == -1) {\n\t\t\t\tSystem.out.println(\"Error in login query\");\n\t\t\t\tSystem.exit(-1);\n\t\t\t}\n\t\t\telse if (loginResult == 0) {\n\t\t\t\tSystem.out.println(\"Wrong authentication\");\n\t\t\t}\n\t\t}\t\n\t\t\n\t\tscan.close();\n\t\t\n\t\treturn loginResult;\n\t}",
"public Login() {\n\t\tsuper();\n\t}",
"@Test\r\n\tpublic void testLogin5() {\r\n\t\tassertFalse(t1.login(\"userrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr\", \"passssssssssssssssssssssssssssssssssssssssss\"));\r\n\t}",
"@Override\n public Map login(TreadmillStatus treadmillStatus) {\n TreadmillInfo treadmillInfo = new TreadmillInfo();\n BeanCoper.copyProperties(treadmillInfo, treadmillStatus);\n validateTreadmill(treadmillInfo);\n\n Map<String, Object> result = new HashMap<>();\n /*\n * Check this treadmill registered or not\n * If registered return token , else return nothing\n */\n // Set the default unlock status is locked\n treadmillStatus.setLockStatus(TreadmillStatusEnum.LOCKED.getValue());\n String token = StringUtils.getUUID();\n // Cache token to redis\n redisDbDao.setexBySerialize(TOKEN_PREFIX + token, DEFAULT_EXPIRE_SECONDS, treadmillStatus);\n // Token should be stored a copy in mysql in case of Server shutdown suddenly\n\n /*\n * Generate QRCode page url\n */\n JdUrl jdUrl = homeModule.getTarget(\"/v1/authPage\");\n // Set query criteria\n Map<String, Object> query = new LinkedHashMap<>();\n query.put(\"token\", token);\n\n jdUrl.setQuery(query);\n\n result.put(\"token\", token);\n // Url is like http://www.baidu.com?...\n result.put(\"url\", jdUrl.toString());\n\n return result;\n }",
"@Override\n\tpublic boolean loginService(List<Object> paraments) {\n\t\t\n\t\t\n\t\tboolean flag = false;\n\t\t\n\t\tString sql = \"select * from user where user_id=? and password=?\";\n\t\ttry{\n\t\t\t\n\t\t\tmJdbcUtil.getConnetion();\n\t\t\tMap<String,Object> map= mJdbcUtil.findSimpleResult(sql, paraments);\n\t\t\tflag = map.isEmpty()?false:true;\n\t\t\tSystem.out.println(\"-flag-->>\" + flag);\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}finally{\n\t\t\tmJdbcUtil.releaseConn();\n\t\t}\n\t\t\n\t\t\n\t\treturn flag;\n\t}",
"private void attemptUsernamePasswordLogin()\n {\n if (mAuthTask != null)\n {\n return;\n }\n\n if(mLogInButton.getText().equals(getResources().getString(R.string.logout)))\n {\n mAuthTask = new RestCallerPostLoginTask(this,mStoredToken,MagazzinoService.getAuthenticationHeader(this),true);\n mAuthTask.execute(MagazzinoService.getLogoutService(this));\n return;\n }\n // Reset errors.\n mUsernameView.setError(null);\n mPasswordView.setError(null);\n\n // Store values at the time of the login attempt.\n String email = mUsernameView.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 {\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 {\n mUsernameView.setError(getString(R.string.error_field_required));\n focusView = mUsernameView;\n cancel = true;\n }\n else if (!isUsernameOrEmailValid(email))\n {\n mUsernameView.setError(getString(R.string.error_invalid_email));\n focusView = mUsernameView;\n cancel = true;\n }\n\n if (cancel)\n {\n // There was an error; don't attempt login and focus the first\n // form field with an error.\n focusView.requestFocus();\n return;\n }\n\n mAuthTask = new RestCallerPostLoginTask(this,email, password);\n mAuthTask.execute(MagazzinoService.getLoginService(this));\n\n }",
"public abstract void login(String userName, String password) throws RemoteException;",
"boolean login(String userName, String password) {\n RatAppModel.checkInitialization();\n String getUsersText = \"SELECT * FROM users WHERE username=?\";\n ResultSet results;\n boolean loginStatus;\n try {\n PreparedStatement statement = db.getStatement(getUsersText);\n statement.setString(1, userName);\n results = db.query(statement);\n if (!results.next()) {\n // No entries in DB for passed in username\n results.close();\n loginStatus = false;\n } else {\n String dbPass = results.getString(\"password\");\n int salt = results.getInt(\"salt\");\n String hashPass = hasher.getSecurePassword(Integer.toString(salt),\n password);\n if (dbPass.equals(hashPass)) {\n //Log.i(\"login\", \"auth success\");\n loginStatus = true;\n String profileName = results.getString(\"profileName\");\n String address = results.getString(\"homeLocation\");\n boolean isAdmin = results.getBoolean(\"isAdmin\");\n currentUser = new User(userName, profileName, address, isAdmin);\n } else {\n //Log.i(\"login\", \"auth failed\");\n loginStatus = false;\n }\n results.close();\n }\n return loginStatus;\n } catch (SQLException e) {\n Log.e(\"login\", e.getMessage());\n return false;\n }\n }",
"private void checkLogin(String email, String password) {\n final Context ctx = getApplicationContext();\n\n processor.checkLoginCredentials(email, password, ctx, new FetchDataListener() {\n @Override\n public void onFetchComplete(JSONObject data) {\n Boolean resp = (Boolean) data.get(\"response\");\n if (resp) {\n // go to home page\n Intent goToHome = new Intent(ctx, MainActivity.class);\n goToHome.putExtra(\"user\", etEmail.getText().toString());\n goToHome.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(goToHome);\n\n // finish prevents people from going back to login without logging out\n finish();\n } else {\n displayLoginError(\"Couldn't log in\");\n etEmail.setText(\"\");\n etPassword.setText(\"\");\n }\n }\n\n @Override\n public void onFetchFailure(String msg) {\n Log.d(TAG, msg);\n displayLoginError(\"Error connecting to server\");\n }\n\n @Override\n public void onFetchStart() {\n // do nothing\n }\n });\n\n }"
]
| [
"0.75553226",
"0.72537136",
"0.6972939",
"0.69100744",
"0.6618622",
"0.65778613",
"0.6564271",
"0.65429044",
"0.6477974",
"0.646926",
"0.64646256",
"0.6437402",
"0.6432921",
"0.64166474",
"0.6410102",
"0.6401605",
"0.63813233",
"0.63813233",
"0.63590467",
"0.6354203",
"0.6337985",
"0.6335101",
"0.63044786",
"0.6290996",
"0.6289818",
"0.6283763",
"0.6250254",
"0.623682",
"0.62253016",
"0.62161696",
"0.62155646",
"0.61925524",
"0.61883265",
"0.6168053",
"0.6168053",
"0.61673164",
"0.61669564",
"0.61616594",
"0.6153849",
"0.61368686",
"0.61347705",
"0.61322814",
"0.6127454",
"0.612557",
"0.6118724",
"0.61084056",
"0.6105241",
"0.6105002",
"0.6092457",
"0.60830605",
"0.6082932",
"0.6073165",
"0.6071005",
"0.606965",
"0.6052625",
"0.6037667",
"0.6037307",
"0.60345083",
"0.60312104",
"0.6027748",
"0.602531",
"0.6024118",
"0.60059375",
"0.6002563",
"0.6001629",
"0.598753",
"0.59867597",
"0.59835535",
"0.59738344",
"0.5971218",
"0.59702694",
"0.596631",
"0.5965417",
"0.59641016",
"0.5962454",
"0.5952135",
"0.5948586",
"0.5948494",
"0.594786",
"0.59389466",
"0.5934987",
"0.5933249",
"0.5928658",
"0.5920268",
"0.59189796",
"0.5917041",
"0.59035796",
"0.59016335",
"0.589951",
"0.58991516",
"0.58962864",
"0.58962077",
"0.58918494",
"0.5891648",
"0.5889127",
"0.58872175",
"0.5883348",
"0.58829695",
"0.5876624",
"0.58761406",
"0.5869711"
]
| 0.0 | -1 |
The method initializing the research of the periods. Finds the beginning and the ending of the area where the first period is to be searched. Filters the data into the dataFiltered list. | public void initPeriodsSearch() {
//init fundamentalFreq
calculatefundamentalFreq();
//set the first search area
final double confidenceLevel = 5 / 100.;
nextPeriodSearchingAreaEnd = (int) Math.floor( hzToPeriod( fundamentalFreq ) * ( 1 + confidenceLevel ) );
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setup_search_region (RJGUIController.XferCatalogMod xfer) {\n\n\t\t// Time range for aftershock search\n\t\t\n\t\tdouble minDays = xfer.x_dataStartTimeParam;\n\t\tdouble maxDays = xfer.x_dataEndTimeParam;\n\t\t\n\t\tlong startTime = fcmain.mainshock_time + Math.round(minDays*ComcatOAFAccessor.day_millis);\n\t\tlong endTime = fcmain.mainshock_time + Math.round(maxDays*ComcatOAFAccessor.day_millis);\n\n\t\t// Check that start date is before current time\n\n\t\tlong time_now = System.currentTimeMillis();\t\t// must be the actual system time, not ServerClock\n\t\t\n\t\tPreconditions.checkState(startTime < time_now, \"Start time is after now!\");\n\n\t\t// Check that end date is before current time, shrink the time range if not\n\t\t\n\t\tif (endTime > time_now) {\n\t\t\tdouble calcMaxDays = (time_now - startTime)/ComcatOAFAccessor.day_millis;\n\t\t\tSystem.out.println(\"WARNING: End time after current time. Setting max days to: \" + calcMaxDays);\n\t\t\txfer.modify_dataEndTimeParam(calcMaxDays);\n\t\t\tmaxDays = xfer.x_dataEndTimeParam;\n\t\t}\n\n\t\t// The magnitude-of-completeness parameters\n\n\t\tdouble magCat = fetch_fcparams.mag_comp_params.get_magCat();\n\t\tMagCompFn magCompFn = fetch_fcparams.mag_comp_params.get_magCompFn();\n\t\tSearchMagFn magSample = fetch_fcparams.mag_comp_params.get_fcn_magSample();\n\t\tSearchRadiusFn radiusSample = fetch_fcparams.mag_comp_params.get_fcn_radiusSample();\n\t\tSearchMagFn magCentroid = fetch_fcparams.mag_comp_params.get_fcn_magCentroid();\n\t\tSearchRadiusFn radiusCentroid = fetch_fcparams.mag_comp_params.get_fcn_radiusCentroid();\n\n\t\t// No custom region\n\n\t\tcustom_search_region = null;\n\n\t\t// Depth range for aftershock search, assume default\n\t\t\n\t\tdouble minDepth = ForecastParameters.SEARCH_PARAM_OMIT;\n\t\tdouble maxDepth = ForecastParameters.SEARCH_PARAM_OMIT;\n\n\t\t// Minimum magnitude is default, set from the mag-of-comp parameters\n\n\t\tdouble min_mag = ForecastParameters.SEARCH_PARAM_OMIT;\n\n\t\t// Switch on region type\n\n\t\tswitch (xfer.x_regionTypeParam) {\n\n\t\tcase STANDARD:\n\n\t\t\t// Standard region, just change to no minimum magnitude\n\n\t\t\tmagSample = magSample.makeRemovedMinMag();\n\t\t\tmagCentroid = magCentroid.makeRemovedMinMag();\n\t\t\tbreak;\n\n\t\tcase CENTROID_WC_CIRCLE:\n\n\t\t\t// WC circle around centroid, set multiplier and limits, and no minimum magnitude\n\n\t\t\tmagSample = SearchMagFn.makeNoMinMag();\n\t\t\tradiusSample = SearchRadiusFn.makeWCClip (\n\t\t\t\txfer.x_wcMultiplierParam,\n\t\t\t\txfer.x_minRadiusParam,\n\t\t\t\txfer.x_maxRadiusParam\n\t\t\t);\n\t\t\tmagCentroid = SearchMagFn.makeNoMinMag();\n\t\t\tradiusCentroid = SearchRadiusFn.makeWCClip (\n\t\t\t\txfer.x_wcMultiplierParam,\n\t\t\t\txfer.x_minRadiusParam,\n\t\t\t\txfer.x_maxRadiusParam\n\t\t\t);\n\t\t\tminDepth = xfer.x_minDepthParam;\n\t\t\tmaxDepth = xfer.x_maxDepthParam;\n\t\t\tbreak;\n\n\t\tcase CENTROID_CIRCLE:\n\n\t\t\t// Circle around centroid, set constant radius, and no minimum magnitude\n\n\t\t\tmagSample = SearchMagFn.makeNoMinMag();\n\t\t\tradiusSample = SearchRadiusFn.makeConstant (xfer.x_radiusParam);\n\t\t\tmagCentroid = SearchMagFn.makeNoMinMag();\n\t\t\tradiusCentroid = SearchRadiusFn.makeConstant (xfer.x_radiusParam);\n\t\t\tminDepth = xfer.x_minDepthParam;\n\t\t\tmaxDepth = xfer.x_maxDepthParam;\n\t\t\tbreak;\n\n\t\tcase EPICENTER_WC_CIRCLE:\n\n\t\t\t// WC circle around epicenter, set multiplier and limits, and no minimum magnitude\n\n\t\t\tmagSample = SearchMagFn.makeNoMinMag();\n\t\t\tradiusSample = SearchRadiusFn.makeWCClip (\n\t\t\t\txfer.x_wcMultiplierParam,\n\t\t\t\txfer.x_minRadiusParam,\n\t\t\t\txfer.x_maxRadiusParam\n\t\t\t);\n\t\t\tmagCentroid = SearchMagFn.makeSkipCentroid();\n\t\t\tradiusCentroid = SearchRadiusFn.makeConstant (0.0);\n\t\t\tminDepth = xfer.x_minDepthParam;\n\t\t\tmaxDepth = xfer.x_maxDepthParam;\n\t\t\tbreak;\n\n\t\tcase EPICENTER_CIRCLE:\n\n\t\t\t// Circle around epicenter, set constant radius, and no minimum magnitude\n\n\t\t\tmagSample = SearchMagFn.makeNoMinMag();\n\t\t\tradiusSample = SearchRadiusFn.makeConstant (xfer.x_radiusParam);\n\t\t\tmagCentroid = SearchMagFn.makeSkipCentroid();\n\t\t\tradiusCentroid = SearchRadiusFn.makeConstant (0.0);\n\t\t\tminDepth = xfer.x_minDepthParam;\n\t\t\tmaxDepth = xfer.x_maxDepthParam;\n\t\t\tbreak;\n\n\t\tcase CUSTOM_CIRCLE:\n\n\t\t\t// Custom circle, and no minimum magnitude\n\n\t\t\tmagSample = SearchMagFn.makeNoMinMag();\n\t\t\tmagCentroid = SearchMagFn.makeSkipCentroid();\n\t\t\tcustom_search_region = SphRegion.makeCircle (\n\t\t\t\tnew SphLatLon(xfer.x_centerLatParam, xfer.x_centerLonParam),\n\t\t\t\txfer.x_radiusParam\n\t\t\t);\n\t\t\tminDepth = xfer.x_minDepthParam;\n\t\t\tmaxDepth = xfer.x_maxDepthParam;\n\t\t\tbreak;\n\n\t\tcase CUSTOM_RECTANGLE:\n\n\t\t\t// Custom rectangle, and no minimum magnitude\n\n\t\t\tmagSample = SearchMagFn.makeNoMinMag();\n\t\t\tmagCentroid = SearchMagFn.makeSkipCentroid();\n\t\t\tcustom_search_region = SphRegion.makeMercRectangle (\n\t\t\t\tnew SphLatLon(xfer.x_minLatParam, xfer.x_minLonParam),\n\t\t\t\tnew SphLatLon(xfer.x_maxLatParam, xfer.x_maxLonParam)\n\t\t\t);\n\t\t\tminDepth = xfer.x_minDepthParam;\n\t\t\tmaxDepth = xfer.x_maxDepthParam;\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tthrow new IllegalStateException(\"Unknown region type: \" + xfer.x_regionTypeParam);\n\t\t}\n\n\t\t// Make revised magnitude-of-completeness parameters\n\n\t\tfetch_fcparams.mag_comp_params = new MagCompPage_Parameters (\n\t\t\tmagCat,\n\t\t\tmagCompFn,\n\t\t\tmagSample,\n\t\t\tradiusSample,\n\t\t\tmagCentroid,\n\t\t\tradiusCentroid\n\t\t);\n\n\t\t// Make the search region\n\n\t\tfetch_fcparams.set_aftershock_search_region (\n\t\t\tfcmain,\t\t\t\t\t// ForecastMainshock fcmain,\n\t\t\t0L,\t\t\t\t\t\t// long the_start_lag,\n\t\t\t0L,\t\t\t\t\t\t// long the_forecast_lag,\n\t\t\tcustom_search_region,\t// SphRegion the_aftershock_search_region,\n\t\t\tminDays,\t\t\t\t// double the_min_days,\n\t\t\tmaxDays,\t\t\t\t// double the_max_days,\n\t\t\tminDepth,\t\t\t\t// double the_min_depth,\n\t\t\tmaxDepth,\t\t\t\t// double the_max_depth,\n\t\t\tmin_mag\t\t\t\t\t// double the_min_mag\n\t\t);\n\n\t\tif (!( fetch_fcparams.aftershock_search_avail )) {\n\t\t\tthrow new IllegalStateException(\"Failed to build aftershock search region\");\n\t\t}\n\n\t\t// If the event (i.e. cur_mainshock) is outside the plotting domain, change its\n\t\t// hypocenter so it is inside the plotting domain\n\n\t\tLocation hypo = cur_mainshock.getHypocenterLocation();\n\t\tif (fetch_fcparams.aftershock_search_region.getPlotWrap()) {\n\t\t\tif (hypo.getLongitude() < 0.0) {\n\t\t\t\tcur_mainshock.setHypocenterLocation (new Location (\n\t\t\t\t\thypo.getLatitude(), hypo.getLongitude() + 360.0, hypo.getDepth() ));\n\t\t\t}\n\t\t} else {\n\t\t\tif (hypo.getLongitude() > 180.0) {\n\t\t\t\tcur_mainshock.setHypocenterLocation (new Location (\n\t\t\t\t\thypo.getLatitude(), hypo.getLongitude() - 360.0, hypo.getDepth() ));\n\t\t\t}\n\t\t}\n\n\t\treturn;\n\t}",
"@Override\n public void initFilter(final Object value) {\n setPeriod((Date[]) value);\n moPaneView.getFiltersMap().put(DGridConsts.FILTER_DATE_RANGE, getPeriod());\n }",
"private void initIntercativeDatasetFilters() {\n\n int filterHeight = Math.max(((screenHeight - 200) / 2), 300);\n int filterWidth = filterHeight;\n\n int colNumber = Math.max(screenWidth / 310, 1);\n popupBody.setColumns(colNumber);\n popupBody.setHideEmptyRowsAndColumns(true);\n if (colNumber == 1) {\n popupWindow.setFrameWidth(370);\n\n }\n\n filtersSet.clear();\n DatasetPieChartFilter yearFilter = initPieChartFilter(\"Year\", \"yearFilter\", 0, filterWidth, filterHeight);\n\n filtersSet.put(\"yearFilter\", yearFilter);\n\n DatasetPieChartFilter studyTypeFilter = initPieChartFilter(\"Study Type\", \"studyTypeFilter\", 1, filterWidth, filterHeight);\n\n filtersSet.put(\"studyTypeFilter\", studyTypeFilter);\n\n DatasetPieChartFilter sampleMatchingFilter = initPieChartFilter(\"Sample Matching\", \"sampleMatchingFilter\", 1, filterWidth, filterHeight);\n\n filtersSet.put(\"sampleMatchingFilter\", sampleMatchingFilter);\n\n DatasetPieChartFilter technologyFilter = initPieChartFilter(\"Technology\", \"technologyFilter\", 1, filterWidth, filterHeight);\n\n filtersSet.put(\"technologyFilter\", technologyFilter);\n\n DatasetPieChartFilter analyticalApproachFilter = initPieChartFilter(\"Analytical Approach\", \"analyticalApproachFilter\", 1, filterWidth, filterHeight);\n\n filtersSet.put(\"analyticalApproachFilter\", analyticalApproachFilter);\n\n DatasetPieChartFilter shotgunTargetedFilter = initPieChartFilter(\"Shotgun/Targeted\", \"shotgunTargetedFilter\", 1, filterWidth, filterHeight);\n\n filtersSet.put(\"shotgunTargetedFilter\", shotgunTargetedFilter);\n int col = 0, row = 0;\n\n for (DatasetPieChartFilter filter : filtersSet.values()) {\n this.popupBody.addComponent(filter, col++, row);\n this.popupBody.setComponentAlignment(filter, Alignment.MIDDLE_CENTER);\n if (col == colNumber) {\n row++;\n col = 0;\n }\n }\n\n }",
"@SuppressWarnings(\"static-access\")\n\tprivate void initData() {\n\t\tstartDate = startDate.now();\n\t\tendDate = endDate.now();\n\t}",
"private void fillStudyConditionsData() {\n for (Condition condition : workbookStudy.getStudyConditions()) {\n if (condition.getDataType().equals(DATA_TYPE_CHAR)) {\n //LevelC levelCFilter = new LevelC(false);\n //levelCFilter.setFactorid(Integer.SIZE);\n //GCP NEW SCHEMA\n List<LevelC> levelCList = condition.getFactor().getLevelsC();\n if (levelCList != null && levelCList.size() > 0) { //study conditions will only have 1 level\n condition.setValue(levelCList.get(0).getLvalue());\n }\n } else {\n List<LevelN> levelNList = condition.getFactor().getLevelsN();\n if (levelNList != null && levelNList.size() > 0) {\n condition.setValue(levelNList.get(0).getLvalue());\n }\n }\n }\n }",
"private void fillTrialConditionsData() {\n List<Condition> trialConditions = new ArrayList<Condition>();\n\n int instanceCounter = 1;\n for (Condition condition : this.workbookStudy.getConditions()) {\n if (condition.getDataType().equals(DATA_TYPE_CHAR)) {\n// LevelC levelCFilter = new LevelC(true);\n// LevelCPK levelCPK = new LevelCPK();\n// levelCPK.setLabelid(condition.getLabelId());\n// levelCFilter.setFactorid(condition.getFactorId());\n// levelCFilter.setLevelCPK(levelCPK);\n// List<LevelC> levelCList = this.servicioApp.getListLevelC(levelCFilter, 0, 0, false);\n List<LevelC> levelCList = condition.getFactor().getLevelsC();\n instanceCounter = 1;\n for (LevelC levelC : levelCList) {\n try {\n Condition conditionToAdd = new Condition();\n BeanUtilsBean.getInstance().copyProperties(conditionToAdd, condition);\n conditionToAdd.setValue(levelC.getLvalue());\n conditionToAdd.setInstance(instanceCounter);\n conditionToAdd.setLevelNo(levelC.getLevelCPK().getLevelno());\n trialConditions.add(conditionToAdd);\n instanceCounter++;\n } catch (IllegalAccessException ex) {\n Exceptions.printStackTrace(ex);\n } catch (InvocationTargetException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n } else if (condition.getDataType().equals(DATA_TYPE_NUMERIC)) {\n// LevelN levelNFilter = new LevelN(true);\n// LevelNPK levelnPK = new LevelNPK();\n// levelnPK.setLabelid(condition.getLabelId());\n// levelNFilter.setFactorid(condition.getFactorId());\n// levelNFilter.setLevelNPK(levelnPK);\n// List<LevelN> levelNList = this.servicioApp.getListLevelN(levelNFilter, 0, 0, false);\n List<LevelN> levelNList = condition.getFactor().getLevelsN();\n instanceCounter = 1;\n for (LevelN levelN : levelNList) {\n try {\n Condition conditionToAdd = new Condition();\n BeanUtilsBean.getInstance().copyProperties(conditionToAdd, condition);\n conditionToAdd.setValue(DecimalUtils.getValueAsString(levelN.getLvalue()));\n conditionToAdd.setInstance(instanceCounter);\n conditionToAdd.setLevelNo(levelN.getLevelNPK().getLevelno());\n trialConditions.add(conditionToAdd);\n instanceCounter++;\n } catch (IllegalAccessException ex) {\n Exceptions.printStackTrace(ex);\n } catch (InvocationTargetException ex) {\n Exceptions.printStackTrace(ex);\n }\n }\n }\n }\n\n Comparator<Condition> conditionComparator = new Comparator<Condition>() {\n\n @Override\n public int compare(Condition o1, Condition o2) {\n return o1.getInstance().compareTo(o2.getInstance());\n }\n };\n\n Collections.sort(trialConditions, conditionComparator);\n\n this.workbookStudy.setConditionsData(trialConditions);\n }",
"private void setUp() {\r\n Calendar calendar1 = Calendar.getInstance();\r\n calendar1.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n calendar1.roll(Calendar.DAY_OF_YEAR, -6);\r\n \r\n Calendar calendar2 = Calendar.getInstance();\r\n calendar2.set((endDate.get(Calendar.YEAR)), \r\n (endDate.get(Calendar.MONTH)), (endDate.get(Calendar.DAY_OF_MONTH)));\r\n \r\n acceptedDatesRange[0] = calendar1.get(Calendar.DAY_OF_YEAR);\r\n acceptedDatesRange[1] = calendar2.get(Calendar.DAY_OF_YEAR); \r\n \r\n if(acceptedDatesRange[1] < 7) {\r\n acceptedDatesRange[0] = 1; \r\n }\r\n \r\n //MiscStuff.writeToLog(\"Ranges set \" + calendar1.get\r\n // (Calendar.DAY_OF_YEAR) + \" \" + calendar2.get(Calendar.DAY_OF_YEAR));\r\n }",
"public RegysDateCentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"private void filterData(String tit, String loc, String datef, String datet, String cat, String cou){\n String t = tit;\n String l = loc;\n String df = datef;\n String dt = datet;\n String c = cat;\n String country = cou;\n filteredData.clear();\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.US);\n\n //All empty\n if(t.length() == 0 && country.length() == 0 && c.length() == 0){\n for(int i = 0; i < data.size(); i++){\n filteredData.add(data.get(i));\n }\n }\n\n //only title\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only country\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only category\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //only date\n if(t.length() == 0 && country.length() == 0 && c.length() == 0 && df.length() != 0 && dt.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and country\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title and category\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getTitle().equals(t)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, date\n if(t.length() != 0 && country.length() == 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, category\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //country, date\n if(t.length() == 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCountry().equals(country) && data.get(i).getTitle().equals(t) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //category, date\n if(t.length() == 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() == 0){\n for(int i = 0; i < data.size(); i++){\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && data.get(i).getCategory().equals(c)){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, date\n if(t.length() != 0 && country.length() != 0 && c.length() == 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, category, date\n if(t.length() != 0 && country.length() == 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n\n //country, category, date\n if(t.length() == 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n\n //title, country, category and date\n if(t.length() != 0 && country.length() != 0 && c.length() != 0 && df.length() != 0){\n for(int i = 0; i < data.size(); i++){\n String dateeee = data.get(i).getDate();\n try {\n datefrom = dateFormat.parse(df);\n dateto = dateFormat.parse(dt);\n datadate = dateFormat.parse(dateeee);\n } catch (ParseException e) {\n e.printStackTrace();\n }\n if(data.get(i).getTitle().equals(t) && data.get(i).getCategory().equals(c) && data.get(i).getCountry().equals(country) && datadate.compareTo(datefrom) >= 0 && datadate.compareTo(dateto) <= 0){\n filteredData.add(data.get(i));\n }\n }\n }\n }",
"private DateRange setDefaultTemporalSubset(DimensionDescriptor timeDimension, SimpleFeature f) {\n final String start = timeDimension.getStartAttribute();\n final String end = timeDimension.getEndAttribute();\n Date startTime = (Date) f.getAttribute(start);\n Date endTime = startTime;\n if (end != null) {\n endTime = (Date) f.getAttribute(end);\n }\n return new DateRange(startTime, endTime);\n }",
"private void initFilter() {\r\n if (filter == null) {\r\n filter = new VocabularyConceptFilter();\r\n }\r\n filter.setVocabularyFolderId(vocabularyFolder.getId());\r\n filter.setPageNumber(page);\r\n filter.setNumericIdentifierSorting(vocabularyFolder.isNumericConceptIdentifiers());\r\n }",
"private void mInitData(int DaysRange, int HourRange) {\n mDaysRange = DaysRange;\n mHourRange = HourRange;\n\n mDateList = new ArrayList<>();\n mHourList = new ArrayList<>();\n mTimeWithMeridianList = new ArrayList<>();\n mDatewithYearList = new ArrayList<>();\n\n // Calculate Date List\n calculateDateList();\n }",
"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}",
"private void setUpFilter() {\n List<Department> departmentsList = departmentService.getAll(0, 10000);\n departments.setItems(departmentsList);\n departments.setItemLabelGenerator(Department::getDepartment_name);\n departments.setValue(departmentsList.get(0));\n category.setItems(\"Consumable\", \"Asset\", \"%\");\n category.setValue(\"%\");\n status.setItems(\"FREE\", \"IN USE\", \"%\");\n status.setValue(\"%\");\n show.addClickListener(click -> updateGrid());\n }",
"private void updateFilteredData() {\n\t\tswitch (currentTabScreen) {\n\t\tcase INVENTORY:\n\t\t\tpresentationInventoryData.clear();\n\n\t\t\tfor (RecordObj record: masterInventoryData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationInventoryData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tcase INITIAL:\n\t\t\tpresentationInitialData.clear();\n\n\t\t\tfor (RecordObj record: masterInitialData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationInitialData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tcase SEARCH:\n\t\t\tpresentationSearchData.clear();\n\n\t\t\tfor (RecordObj record: masterSearchData) {\n\t\t\t\tif (matchesFilter(record)) {\n\t\t\t\t\tpresentationSearchData.add(record);\n\t\t\t\t} // End if statement\n\t\t\t} // End for loop \n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}// End switch statement\n\t}",
"public IndicatorExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public TBusineCriteria() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public BhiFeasibilityStudyExample() {\r\n\t\toredCriteria = new ArrayList<Criteria>();\r\n\t}",
"public List<SaleInvoice> filterByPeriod(Date startDate, Date endDate) {\n // Normalized Datetime to the beginning and very end of the date\n Date normStartDate = DateUtils.normalizeDateAtStart(startDate);\n Date normEndDate = DateUtils.normalizeDateAtEnd(endDate);\n return saleInvoiceRepository.findAllByDateBetween(normStartDate, normEndDate);\n }",
"List<Establishment> searchEstablishments(EstablishmentCriteria criteria, RangeCriteria rangeCriteria);",
"private void fillObservationsData() {\n\n // retrieve all oindex records\n// List<Oindex> oindexList = this.servicioApp.getMeasurementOindexListByStudy(workbookStudy.getStudy().getStudyid(), effectid);\n\n Integer studyId = this.workbookStudy.getStudy().getStudyid();\n\n int variateCount = this.workbookStudy.getVariates().size();\n\n List<Measurement> measurementList = new ArrayList<Measurement>();\n //todo quitar no se usa\n// int observationsCount = this.servicioApp.getObservationsCount(studyId);\n log.info(\"Getting Data Trial ...\");\n List<Object> dataList = this.servicioApp.getObservationsDataMeasurementEffect(studyId, effectid);\n log.info(\"Getting Data Trial Done...\");\n \n log.info(\"Getting List of Obsunit ...\");\n List<Obsunit> obsunits = this.servicioApp.getObsunitListByEffectid(studyId, effectid);\n log.info(\"Getting List of Obsunit...\");\n for (Obsunit obsUnit : obsunits){\n Measurement measurement = new Measurement();\n\n measurement.initMeasurementData(variateCount);\n\n assignMeasurementData(measurement, obsUnit, dataList);\n\n measurementList.add(measurement);\n }\n\n\n workbookStudy.setMeasurements(measurementList);\n\n List<String> factorsReturn = getFactoresReturnList();\n log.info(\"Getting Trial Randomization ...\");\n ResultSet rst = servicioApp.getTrialRandomization(studyId, 0, getFactoresKeyList(), factorsReturn, factorTrial.getFname());\n log.info(\"Getting Trial Randomization done\");\n fillFactorLabelData(rst, factorsReturn);\n }",
"private DatasetPieChartFilter initPieChartFilter(String title, String filterId, int index, int width, int height) {\n DatasetPieChartFilter filter = new DatasetPieChartFilter(title, filterId, index, width, height) {\n @Override\n public void selectDatasets(boolean noselection) {\n Set<Integer> finalSelectionIds = filterSelectionUnit();\n if (noselection) {\n updateFilters(finalSelectionIds, \"\");\n } else {\n updateFilters(finalSelectionIds, filterId);\n }\n }\n };\n return filter;\n }",
"private void search() {\n if (dateFind.getValue() == null) {\n dateFind.setValue(LocalDate.now().minusDays(DEFAULT_PERIOD));\n }\n Long days = ChronoUnit.DAYS.between(dateFind.getValue(), LocalDate.now());\n final List<Project> findProject = ServiceFactory.getProjectService().getFindProject(days, comboProject.getValue());\n observableProjects.clear();\n observableProjects.addAll(findProject);\n table.setItems(observableProjects);\n }",
"public ScheduleExample() {\n\t\toredCriteria = new ArrayList<Criteria>();\n\t}",
"public void initialiserCompte() {\n DateTime dt1 = new DateTime(date1).withTimeAtStartOfDay();\n DateTime dt2 = new DateTime(date2).withEarlierOffsetAtOverlap();\n DateTime dtIt = new DateTime(date1).withTimeAtStartOfDay();\n Interval interval = new Interval(dt1, dt2);\n\n\n\n// while (dtIt.isBefore(dt2)) {\n while (interval.contains(dtIt)) {\n compte.put(dtIt.toDate(), 0);\n dtIt = dtIt.plusDays(1);\n }\n }",
"public void initializeData() {\n _currentDataAll = _purityReportData.getAll();\n }",
"private void preProcessData() {\n\n // Group employees by department\n if (employeesByDepartments == null) {\n\n employeesByDepartments = new HashMap<>();\n\n dataSet.stream().forEach(employee -> {\n\n if (!employeesByDepartments.containsKey(employee.getDepartment()))\n employeesByDepartments.put(employee.getDepartment(), new HashSet<>());\n Set<EmployeeAggregate> employees = employeesByDepartments.get(employee.getDepartment());\n employees.add(employee);\n });\n }\n\n // Find out minimum, and maximum age of the employees\n if (minAge == 0) minAge = dataSet.stream().map(EmployeeAggregate::getAge).min(Integer::compare).get();\n if (maxAge == 0) maxAge = dataSet.stream().map(EmployeeAggregate::getAge).max(Integer::compare).get();\n\n // Group employees by age\n if (employeesByAgeRange == null) {\n\n employeesByAgeRange = new HashMap<>();\n\n // Work out age ranges\n Set<Range> ranges = new HashSet<>();\n int currTopBoundary = (int) Math.ceil((double) maxAge / (double) AGE_RANGE_INCREMENT) * AGE_RANGE_INCREMENT;\n\n while (currTopBoundary >= minAge) {\n Range range = new Range(currTopBoundary - AGE_RANGE_INCREMENT, currTopBoundary);\n ranges.add(range);\n employeesByAgeRange.put(range, new HashSet<>());\n currTopBoundary -= AGE_RANGE_INCREMENT;\n }\n\n // Group employees\n dataSet.stream().forEach(employee -> {\n for (Range range : ranges) {\n if (range.inRange(employee.getAge())) {\n\n employeesByAgeRange.get(range).add(employee);\n\n break;\n }\n }\n });\n }\n }",
"public SearchCriteria initSearchCriteria() throws Exception {\n\t\treturn null;\n\t}",
"public SolrQuery buildSolrQueryForPeriod(String query, String startDate, String endDate) {\n log.info(\"query between \" + startDate + \"T00:00:00Z and \" + endDate + \"T23:59:59Z\");\n SolrQuery solrQuery = new SolrQuery();\n solrQuery.setQuery(query); //Smurf labs forces text:query\n solrQuery.setRows(0); // 1 page only\n solrQuery.add(\"fl\", \"id\");// rows are 0 anyway\n solrQuery.add(\"fq\",\"content_type_norm:html\"); // only html pages\n solrQuery.add(\"fq\",\"crawl_date:[\" + startDate + \"T00:00:00Z TO \" + endDate + \"T23:59:59Z]\");\n return solrQuery;\n }",
"public DDataFilter() {\n filters = new ArrayList<>();\n operator = null;\n value = null;\n externalData = false;\n valueTo = null;\n attribute = ROOT_FILTER;\n }",
"public ArrayList<CoronaCase> Analytics(LocalDate lowerbound, LocalDate upperbound)\n\t{\n\t\tArrayList<CoronaCase> temp = new ArrayList<CoronaCase>();\n\t\t\n\t\tfor(int i = 0; i < coronaCase.size(); i++)\n\t\t\tif(coronaCase.get(i).isCaseDateWithin(lowerbound, upperbound, coronaCase.get(i).getDate()))\n\t\t\t\ttemp.add(coronaCase.get(i));\n\t\t\n\t\treturn temp;\n\t}",
"@Override\n public Criteria getCriteria() {\n\n //判断是否为精确到天的时间查询\n //情况一 点击分组查询查看该天的详情\n if (this.searchObject.getEndtime() == null && this.searchObject.getStarttime() != null){\n\n this.searchObject.setEndtime(DateTool.addDays(this.searchObject.getStarttime(),1));\n\n //情况二 在分组页面按时间搜索\n }else if (this.searchObject.getEndtime() != null && this.searchObject.getStarttime().equals(this.searchObject.getEndtime())){\n\n this.searchObject.setEndtime(DateTool.addDays(this.searchObject.getStarttime(),1));\n }\n\n Criteria criteria = Criteria.and(\n\n Criteria.add(ActivityPlayerApply.PROP_ID, Operator.EQ, this.searchObject.getId()),\n Criteria.add(ActivityPlayerApply.PROP_ACTIVITY_MESSAGE_ID, Operator.EQ, this.searchObject.getActivityMessageId()),\n Criteria.add(ActivityPlayerApply.PROP_USER_ID, Operator.EQ, this.searchObject.getUserId()),\n Criteria.add(ActivityPlayerApply.PROP_USER_NAME, Operator.EQ, this.searchObject.getUserName()),\n Criteria.add(ActivityPlayerApply.PROP_REGISTER_TIME, Operator.EQ, this.searchObject.getRegisterTime()),\n Criteria.add(ActivityPlayerApply.PROP_APPLY_TIME, Operator.EQ, this.searchObject.getApplyTime()),\n Criteria.add(ActivityPlayerApply.PROP_PLAYER_RECHARGE_ID, Operator.EQ, this.searchObject.getPlayerRechargeId()),\n Criteria.add(ActivityPlayerApply.PROP_STARTTIME, Operator.GE, this.searchObject.getStarttime()),\n Criteria.add(ActivityPlayerApply.PROP_STARTTIME, Operator.LE, this.searchObject.getEndtime()),\n Criteria.add(ActivityPlayerApply.PROP_PREFERENTIAL_VALUE, Operator.EQ, this.searchObject.getPreferentialValue()),\n Criteria.add(ActivityPlayerApply.PROP_ARTICLE, Operator.EQ, this.searchObject.getArticle()),\n Criteria.add(ActivityPlayerApply.PROP_IS_REALIZE, Operator.EQ, this.searchObject.getIsRealize()),\n Criteria.add(ActivityPlayerApply.PROP_RELATION_PLAYER_ID, Operator.EQ, this.searchObject.getRelationPlayerId()),\n Criteria.add(ActivityPlayerApply.PROP_ACTIVITY_CLASSIFY_KEY, Operator.EQ, this.searchObject.getActivityClassifyKey()),\n Criteria.add(ActivityPlayerApply.PROP_ACTIVITY_TYPE_CODE, Operator.EQ, this.searchObject.getActivityTypeCode())\n );\n criteria.addAnd(ActivityPlayerApply.PROP_IS_DELETED, Operator.EQ, false);\n return criteria;\n }",
"public void initializeYears() {\n int j, k;\n WaterPurityReport earliest = _purityReportData.get(1);\n WaterPurityReport latest = _purityReportData.get(_purityReportData.getCount());\n if (earliest != null) {\n// j = earliest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n// k = latest.getDate().toInstant().atZone(ZoneId.of(\"EST\")).toLocalDate().getYear();\n\n Calendar cal = Calendar.getInstance();\n cal.setTime(earliest.getDate());\n j = cal.get(Calendar.YEAR);\n cal.setTime(latest.getDate());\n k = cal.get(Calendar.YEAR);\n dataGraphYear.setItems(FXCollections.observableArrayList(IntStream.range(j, k+1).boxed().collect(Collectors.toList())));\n }\n }",
"@Override\n public Criteria getCriteria() {\n //region your codes 2\n Criteria criteria = new Criteria();\n criteria.addAnd(SiteConfineArea.PROP_NATION,Operator.EQ,searchObject.getNation()).addAnd(SiteConfineArea.PROP_PROVINCE, Operator.EQ, searchObject.getProvince()).addAnd(SiteConfineArea.PROP_CITY,Operator.EQ,searchObject.getCity());\n if (searchObject.getStatus() != null) {\n if (searchObject.getStatus().equals(SiteConfineStatusEnum.USING.getCode())) {\n //使用中\n criteria.addAnd(SiteConfineArea.PROP_END_TIME, Operator.GT, new Date());\n } else if (searchObject.getStatus().equals(SiteConfineStatusEnum.EXPIRED.getCode())) {\n criteria.addAnd(SiteConfineArea.PROP_END_TIME, Operator.LT, new Date());\n }\n }\n criteria.addAnd(SiteConfineArea.PROP_SITE_ID,Operator.EQ,searchObject.getSiteId());\n return criteria;\n //endregion your codes 2\n }",
"public CorrResultModel searchForEvents(String searchString, int page, String lowerBound, String upperBound, List filterNames);",
"public PatientExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public RelevanceSet() {\r\n \tinitComponents();\r\n //updateData();\r\n }",
"public WaterExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"private void updatePieChartSliceSet() {\n fullFiltersData.clear();\n activeDatasetMap.clear();\n Map<Comparable, PieChartSlice> yearMap = new TreeMap<>(Collections.reverseOrder());\n Map<Comparable, PieChartSlice> studyTypeMap = new TreeMap<>();\n Map<Comparable, PieChartSlice> sampleMatchingMap = new TreeMap<>();\n Map<Comparable, PieChartSlice> technologyMap = new TreeMap<>();\n Map<Comparable, PieChartSlice> analyticalApproachMap = new TreeMap<>();\n Map<Comparable, PieChartSlice> shotgunTargetedMap = new TreeMap<>();\n\n quantDatasetMap.values().stream().map((dataset) -> {\n activeDatasetMap.put(dataset.getQuantDatasetIndex(), Boolean.TRUE);\n return dataset;\n }).map((dataset) -> {\n if (!yearMap.containsKey(dataset.getYear())) {\n PieChartSlice slice = new PieChartSlice();\n slice.setLabel(dataset.getYear());\n yearMap.put(dataset.getYear(), slice);\n }\n return dataset;\n }).map((dataset) -> {\n PieChartSlice yearSlice = yearMap.get(dataset.getYear());\n yearSlice.addDatasetId(dataset.getQuantDatasetIndex());\n yearMap.put(dataset.getYear(), yearSlice);\n return dataset;\n }).map((dataset) -> {\n if (!studyTypeMap.containsKey(dataset.getTypeOfStudy())) {\n PieChartSlice slice = new PieChartSlice();\n slice.setLabel(dataset.getTypeOfStudy());\n studyTypeMap.put(dataset.getTypeOfStudy(), slice);\n }\n return dataset;\n }).map((dataset) -> {\n PieChartSlice studyTypeSlice = studyTypeMap.get(dataset.getTypeOfStudy());\n studyTypeSlice.addDatasetId(dataset.getQuantDatasetIndex());\n studyTypeMap.put(dataset.getTypeOfStudy(), studyTypeSlice);\n return dataset;\n }).map((dataset) -> {\n if (!sampleMatchingMap.containsKey(dataset.getSampleMatching())) {\n PieChartSlice slice = new PieChartSlice();\n slice.setLabel(dataset.getSampleMatching());\n sampleMatchingMap.put(dataset.getSampleMatching(), slice);\n }\n return dataset;\n }).map((dataset) -> {\n PieChartSlice sampleMachingSlice = sampleMatchingMap.get(dataset.getSampleMatching());\n sampleMachingSlice.addDatasetId(dataset.getQuantDatasetIndex());\n sampleMatchingMap.put(dataset.getSampleMatching(), sampleMachingSlice);\n return dataset;\n }).map((dataset) -> {\n if (!technologyMap.containsKey(dataset.getTechnology())) {\n PieChartSlice slice = new PieChartSlice();\n slice.setLabel(dataset.getTechnology());\n technologyMap.put(dataset.getTechnology(), slice);\n }\n return dataset;\n }).map((dataset) -> {\n PieChartSlice technologySlice = technologyMap.get(dataset.getTechnology());\n technologySlice.addDatasetId(dataset.getQuantDatasetIndex());\n technologyMap.put(dataset.getTechnology(), technologySlice);\n return dataset;\n }).map((dataset) -> {\n if (!analyticalApproachMap.containsKey(dataset.getAnalyticalApproach())) {\n PieChartSlice slice = new PieChartSlice();\n slice.setLabel(dataset.getAnalyticalApproach());\n analyticalApproachMap.put(dataset.getAnalyticalApproach(), slice);\n }\n return dataset;\n }).map((dataset) -> {\n PieChartSlice analyticalApproachSlice = analyticalApproachMap.get(dataset.getAnalyticalApproach());\n analyticalApproachSlice.addDatasetId(dataset.getQuantDatasetIndex());\n analyticalApproachMap.put(dataset.getAnalyticalApproach(), analyticalApproachSlice);\n return dataset;\n }).map((dataset) -> {\n if (!shotgunTargetedMap.containsKey(dataset.getShotgunTargeted())) {\n PieChartSlice slice = new PieChartSlice();\n slice.setLabel(dataset.getShotgunTargeted());\n shotgunTargetedMap.put(dataset.getShotgunTargeted(), slice);\n }\n return dataset;\n }).forEach((dataset) -> {\n PieChartSlice shotgunTargetedSlice = shotgunTargetedMap.get(dataset.getShotgunTargeted());\n shotgunTargetedSlice.addDatasetId(dataset.getQuantDatasetIndex());\n shotgunTargetedMap.put(dataset.getShotgunTargeted(), shotgunTargetedSlice);\n \n }\n\n );\n\n filtersSet.get (\n\n \"yearFilter\").initializeFilterData(yearMap);\n fullFiltersData.put (\n\n \"yearFilter\", yearMap);\n\n filtersSet.get (\n\n \"studyTypeFilter\").initializeFilterData(studyTypeMap);\n fullFiltersData.put (\n\n \"studyTypeFilter\", studyTypeMap);\n\n filtersSet.get (\n\n \"sampleMatchingFilter\").initializeFilterData(sampleMatchingMap);\n fullFiltersData.put (\n\n \"sampleMatchingFilter\", sampleMatchingMap);\n\n filtersSet.get (\n\n \"technologyFilter\").initializeFilterData(technologyMap);\n fullFiltersData.put (\n\n \"technologyFilter\", technologyMap);\n\n filtersSet.get (\n\n \"analyticalApproachFilter\").initializeFilterData(analyticalApproachMap);\n fullFiltersData.put (\n\n \"analyticalApproachFilter\", analyticalApproachMap);\n\n filtersSet.get (\n\n \"shotgunTargetedFilter\").initializeFilterData(shotgunTargetedMap);\n fullFiltersData.put (\n\n\"shotgunTargetedFilter\", shotgunTargetedMap);\n\n }",
"public void updateFromSearchFilters() {\n this.businessTravelReadyModel.checked(ExploreHomesFiltersFragment.this.searchFilters.isBusinessTravelReady());\n ExploreHomesFiltersFragment.this.businessTravelAccountManager.setUsingBTRFilter(this.businessTravelReadyModel.checked());\n this.instantBookModel.checked(ExploreHomesFiltersFragment.this.searchFilters.isInstantBookOnly());\n this.entireHomeModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.EntireHome));\n this.privateRoomModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.PrivateRoom));\n this.sharedRoomModel.checked(ExploreHomesFiltersFragment.this.searchFilters.getRoomTypes().contains(C6120RoomType.SharedRoom));\n SearchMetaData homeTabMetadata = ExploreHomesFiltersFragment.this.dataController.getHomesMetadata();\n if (homeTabMetadata != null && homeTabMetadata.hasFacet()) {\n SearchFacets facets = homeTabMetadata.getFacets();\n this.entireHomeModel.show(facets.facetGreaterThanZero(C6120RoomType.EntireHome));\n this.privateRoomModel.show(facets.facetGreaterThanZero(C6120RoomType.PrivateRoom));\n this.sharedRoomModel.show(facets.facetGreaterThanZero(C6120RoomType.SharedRoom));\n }\n this.priceModel.minPrice(ExploreHomesFiltersFragment.this.searchFilters.getMinPrice()).maxPrice(ExploreHomesFiltersFragment.this.searchFilters.getMaxPrice());\n if (homeTabMetadata == null) {\n this.priceModel.histogram(null).metadata(null);\n } else {\n this.priceModel.histogram(homeTabMetadata.getPriceHistogram()).metadata(homeTabMetadata.getSearch());\n }\n this.priceButtonsModel.selection(ExploreHomesFiltersFragment.this.searchFilters.getPriceFilterSelection());\n this.bedCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBeds());\n this.bedroomCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBedrooms());\n this.bathroomCountModel.value(ExploreHomesFiltersFragment.this.searchFilters.getNumBathrooms());\n addCategorizedAmenitiesIfNeeded();\n updateOtherAmenitiesModels();\n updateFacilitiesAmenitiesModels();\n updateHouseRulesAmenitiesModels();\n notifyModelsChanged();\n }",
"public Indicator[] getIndicatorForPeriod(int start, int end)\n {\n int index = 0;\n int validStart = indicators[0].getYear();\n int validEnd = indicators[indicators.length - 1].getYear();\n int oldStart = start, oldEnd = end;\n int startIndex = start - validStart;\n int counter = 0;\n\n if (start > end || (start < validStart && end < validStart) || (start > validEnd && end > validEnd))\n {\n throw new IllegalArgumentException(\"Invalid request of start and end year \" + start + \", \" + end +\n \". Valid period for \" + name + \" is \" + validStart + \" to \" + validEnd);\n }\n\n boolean changed = false;\n if (start < indicators[0].getYear())\n {\n changed = true;\n start = indicators[0].getYear();\n }\n\n if (end > indicators[indicators.length - 1].getYear())\n {\n changed = true;\n end = indicators[indicators.length - 1].getYear();\n }\n\n if (changed)\n {\n System.out.println(\"Invalid request of start and end year \" + oldStart + \",\" + oldEnd +\n \". Using valid subperiod for \" + name + \" is \" + start + \" to \" + end);\n }\n\n int numberOfYears = (end - start)+1;\n Indicator[] outputArray = new Indicator[numberOfYears];\n\n for (int i = startIndex; i < numberOfYears; i++)\n {\n outputArray[counter] = indicators[i];\n counter++;\n }\n return outputArray;\n }",
"public CountyStationExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"private void initExplorationBounds() {\n switch (configuration.getCoverageCriteria()) {\n case GOAL_COVERAGE:\n case BRANCH_COVERAGE:\n configuration.setObjectScope(configuration.isIncrementalLoopUnroll() ?\n FajitaConfiguration.INITIAL_INCREMENTAL_OBJECT_SCOPE :\n configuration.getMaximumObjectScope()\n );\n configuration.setLoopUnroll(configuration.isIncrementalLoopUnroll() ?\n FajitaConfiguration.INITIAL_INCREMENAL_LOOP_UNROLL :\n configuration.getMaximumLoopUnroll()\n );\n break;\n case CLASS_COVERAGE:\n case DUAL_CLASS_BRANCH_COVERAGE:\n configuration.setObjectScope(configuration.getMaximumObjectScope());\n configuration.setLoopUnroll(configuration.getMaximumLoopUnroll());\n break;\n }\n }",
"private void fillSearchFields() {\n view.setMinPrice(1);\n view.setMaxPrice(10000);\n view.setMinSQM(1);\n view.setMaxSQM(10000);\n view.setBedrooms(1);\n view.setBathrooms(1);\n view.setFloor(1);\n view.setHeating(false);\n view.setLocation(\"Athens\");\n }",
"public void init() {\n\t\texternallyManaged = getCourse().isExternallyManaged();\n\n\t\t// Get the default search text\n\t\tif(StringUtils.trimToNull(searchText) == null) {\n\t\t\tsearchText = JsfUtil.getLocalizedMessage(\"roster_search_text\");\n\t\t}\n\n\t\t// Get the site enrollments\n\t\tList siteStudents;\n\t\tif(searchText.equals(JsfUtil.getLocalizedMessage(\"roster_search_text\"))) {\n\t\t\tsiteStudents = getSectionManager().getSiteEnrollments(getSiteContext());\n\t\t} else {\n\t\t\tsiteStudents = getSectionManager().findSiteEnrollments(getSiteContext(), searchText);\n\t\t}\n\t\t\n\t\t// Get the section enrollments\n\t\tSet studentUids = new HashSet();\n\t\tfor(Iterator iter = siteStudents.iterator(); iter.hasNext();) {\n\t\t\tParticipationRecord record = (ParticipationRecord)iter.next();\n\t\t\tstudentUids.add(record.getUser().getUserUid());\n\t\t}\n\t\tSectionEnrollments sectionEnrollments = getSectionManager().getSectionEnrollmentsForStudents(getSiteContext(), studentUids);\n\t\t\n\t\t// Construct the decorated enrollments for the UI\n\t\tList unpagedEnrollments = new ArrayList();\n\t\tcategories = getSectionManager().getSectionCategories(getSiteContext());\n\t\t\n\t\tfor(Iterator iter = siteStudents.iterator(); iter.hasNext();) {\n\t\t\tEnrollmentRecord enrollment = (EnrollmentRecord)iter.next();\n\t\t\t\n\t\t\t// Build a map of categories to sections in which the student is enrolled\n\t\t\tMap map = new HashMap();\n\t\t\tfor(Iterator catIter = categories.iterator(); catIter.hasNext();) {\n\t\t\t\tString cat = (String)catIter.next();\n\t\t\t\tCourseSection section = sectionEnrollments.getSection(enrollment.getUser().getUserUid(), cat);\n\t\t\t\tmap.put(cat, section);\n\t\t\t}\n\t\t\tEnrollmentDecorator decorator = new EnrollmentDecorator(enrollment, map);\n\t\t\tunpagedEnrollments.add(decorator);\n\t\t}\n\n\t\t// Sort the list\n\t\tCollections.sort(unpagedEnrollments, getComparator());\n\t\t\n\t\t// Filter the list\n\t\tenrollments = new ArrayList();\n\t\tint lastRow;\n\t\tint maxDisplayedRows = getPrefs().getRosterMaxDisplayedRows();\n\t\tif(maxDisplayedRows < 1 || firstRow + maxDisplayedRows > unpagedEnrollments.size()) {\n\t\t\tlastRow = unpagedEnrollments.size();\n\t\t} else {\n\t\t\tlastRow = firstRow + maxDisplayedRows;\n\t\t}\n\t\tenrollments.addAll(unpagedEnrollments.subList(firstRow, lastRow));\n\t\tenrollmentsSize = unpagedEnrollments.size();\n\t}",
"@PostConstruct\n public void init() {\n\n areaChartByDate = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newAreaChartSettings()\n .dataset(SALES_OPPS)\n .group(CREATION_DATE).dynamic(80, DAY, true)\n .column(CREATION_DATE, \"Creation date\")\n .column(EXPECTED_AMOUNT, SUM).format(AppConstants.INSTANCE.sales_bydate_area_column1(), \"$ #,###\")\n .title(AppConstants.INSTANCE.sales_bydate_area_title())\n .titleVisible(true)\n .width(700).height(200)\n .margins(10, 100, 80, 100)\n .filterOn(true, true, true)\n .buildSettings());\n\n pieChartYears = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newPieChartSettings()\n .dataset(SALES_OPPS)\n .group(CREATION_DATE).dynamic(YEAR, true)\n .column(CREATION_DATE, \"Year\")\n .column(COUNT, \"#occs\").format(AppConstants.INSTANCE.sales_bydate_pie_years_column1(), \"#,###\")\n .title(AppConstants.INSTANCE.sales_bydate_pie_years_title())\n .titleVisible(true)\n .width(200).height(150)\n .margins(0, 0, 0, 0)\n .filterOn(false, true, false)\n .buildSettings());\n\n pieChartQuarters = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newPieChartSettings()\n .dataset(SALES_OPPS)\n .group(CREATION_DATE).fixed(QUARTER, true)\n .column(CREATION_DATE, \"Creation date\")\n .column(COUNT, \"#occs\").format(AppConstants.INSTANCE.sales_bydate_pie_quarters_column1(), \"#,###\")\n .title(AppConstants.INSTANCE.sales_bydate_pie_quarters_title())\n .titleVisible(true)\n .width(200).height(150)\n .margins(0, 0, 0, 0)\n .filterOn(false, true, false)\n .buildSettings());\n\n barChartDayOfWeek = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newBarChartSettings()\n .subType_Bar()\n .dataset(SALES_OPPS)\n .group(CREATION_DATE).fixed(DAY_OF_WEEK, true).firstDay(SUNDAY)\n .column(CREATION_DATE, \"Creation date\")\n .column(COUNT, \"#occs\").format(AppConstants.INSTANCE.sales_bydate_bar_weekday_column1(), \"#,###\")\n .title(AppConstants.INSTANCE.sales_bydate_bar_weekday_title())\n .titleVisible(true)\n .width(200).height(150)\n .margins(0, 20, 80, 0)\n .filterOn(false, true, true)\n .buildSettings());\n\n\n pieChartByPipeline = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newPieChartSettings()\n .dataset(SALES_OPPS)\n .group(PIPELINE)\n .column(PIPELINE, \"Pipeline\")\n .column(COUNT, \"#opps\").format(AppConstants.INSTANCE.sales_bydate_pie_pipe_column1(), \"#,###\")\n .title(AppConstants.INSTANCE.sales_bydate_pie_pipe_title())\n .titleVisible(true)\n .width(200).height(150)\n .margins(0, 0, 0, 0)\n .filterOn(false, true, true)\n .buildSettings());\n\n tableAll = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newTableSettings()\n .dataset(SALES_OPPS)\n .title(AppConstants.INSTANCE.sales_bydate_title())\n .titleVisible(false)\n .tablePageSize(5)\n .tableWidth(800)\n .tableOrderEnabled(true)\n .tableOrderDefault(AMOUNT, DESCENDING)\n .renderer(DefaultRenderer.UUID)\n .column(COUNTRY, AppConstants.INSTANCE.sales_bydate_table_column1())\n .column(CUSTOMER, AppConstants.INSTANCE.sales_bydate_table_column2())\n .column(PRODUCT, AppConstants.INSTANCE.sales_bydate_table_column3())\n .column(SALES_PERSON, AppConstants.INSTANCE.sales_bydate_table_column4())\n .column(STATUS, AppConstants.INSTANCE.sales_bydate_table_column5())\n .column(AMOUNT).format(AppConstants.INSTANCE.sales_bydate_table_column6(), \"$ #,###\")\n .column(EXPECTED_AMOUNT).format(AppConstants.INSTANCE.sales_bydate_table_column7(), \"$ #,###\")\n .column(CREATION_DATE).format(AppConstants.INSTANCE.sales_bydate_table_column8(), \"MMM dd, yyyy\")\n .column(CLOSING_DATE).format(AppConstants.INSTANCE.sales_bydate_table_column9(), \"MMM dd, yyyy\")\n .filterOn(false, true, true)\n .buildSettings());\n\n // Create the selectors\n\n countrySelector = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newSelectorSettings()\n .dataset(SALES_OPPS)\n .group(COUNTRY)\n .column(COUNTRY, \"Country\")\n .column(COUNT, \"#Opps\").format(\"#Opps\", \"#,###\")\n .column(AMOUNT, SUM).format(AppConstants.INSTANCE.sales_bydate_selector_total(), \"$ #,##0.00\")\n .sort(COUNTRY, ASCENDING)\n .filterOn(false, true, true)\n .buildSettings());\n\n salesmanSelector = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newSelectorSettings()\n .dataset(SALES_OPPS)\n .group(SALES_PERSON)\n .column(SALES_PERSON, \"Employee\")\n .column(COUNT, \"#Opps\").format(\"#Opps\", \"#,###\")\n .column(AMOUNT, SUM).format(AppConstants.INSTANCE.sales_bydate_selector_total(), \"$ #,##0.00\")\n .sort(SALES_PERSON, ASCENDING)\n .filterOn(false, true, true)\n .buildSettings());\n\n customerSelector = displayerLocator.lookupDisplayer(\n DisplayerSettingsFactory.newSelectorSettings()\n .dataset(SALES_OPPS)\n .group(CUSTOMER)\n .column(CUSTOMER, \"Customer\")\n .column(COUNT, \"#Opps\").format(\"#Opps\", \"#,###\")\n .column(AMOUNT, SUM).format(AppConstants.INSTANCE.sales_bydate_selector_total(), \"$ #,##0.00\")\n .sort(CUSTOMER, ASCENDING)\n .filterOn(false, true, true)\n .buildSettings());\n\n // Make the displayers interact among them\n displayerCoordinator.addDisplayer(areaChartByDate);\n displayerCoordinator.addDisplayer(pieChartYears);\n displayerCoordinator.addDisplayer(pieChartQuarters);\n displayerCoordinator.addDisplayer(barChartDayOfWeek);\n displayerCoordinator.addDisplayer(pieChartByPipeline);\n displayerCoordinator.addDisplayer(tableAll);\n displayerCoordinator.addDisplayer(countrySelector);\n displayerCoordinator.addDisplayer(salesmanSelector);\n displayerCoordinator.addDisplayer(customerSelector);\n\n // Init the dashboard from the UI Binder template\n initWidget(uiBinder.createAndBindUi(this));\n\n // Draw the charts\n displayerCoordinator.drawAll();\n }",
"public TripSearchCriteria getCriteria(){\r\n\t\tname = jNameTrip.getText();\r\n\t\tdateLow = (Date) datePickerFrom.getModel().getValue();\r\n\t\tdateHigh = (Date) datePickerTo.getModel().getValue();\r\n\t\tpriceHigh = slider.getValue();\r\n\t\tpriceLow = 0;\r\n\t\tcategory = (String) categoryCombo.getSelectedItem();\r\n\t\tif (category == \"All Categories\") category = \"\";\r\n\t\tcriteria = new TripSearchCriteria(name,dateLow,dateHigh,priceLow,priceHigh,category,noGuests);\r\n\t\treturn criteria;\r\n\t\t\t\t}",
"public FilterData() {\n }",
"private void initEventList() {\n\n Calendar calendar = Calendar.getInstance();\n calendar.setTime(new Date());\n calendar.add(Calendar.MINUTE, -1 * 60 * 12);\n startTime = calendar.getTimeInMillis();\n stopTime = System.currentTimeMillis();\n mSearchType = 0;\n eventType = AVIOCTRLDEFs.AVIOCTRL_EVENT_ALL;\n searchEventList(startTime, stopTime, eventType, mCameraChannel);\n }",
"public SysDataExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"private void verifyPeriod(Date start, Date end){\n List dates = logRepositoy.findAllByDateGreaterThanEqualAndDateLessThanEqual(start, end);\n if(dates.isEmpty()){\n throw new ResourceNotFoundException(\"Date range not found\");\n }\n }",
"void parseParams(Map<String, List<String>> params) throws IOException {\n String pageParam = getSingleParam(params, \"page\", null);resultsPerPage=Integer.parseInt(getSingleParam(params, \"resultsPerPage\", \"15\"));\n if (pageParam != null) {\n int page = Integer.parseInt(pageParam);\n start = (page - 1) * resultsPerPage;\n }\n sortOrder = ArticleSearchQuery.SolrSortOrder.RELEVANCE;\n String sortOrderParam = getSingleParam(params, \"sortOrder\", null);\n if (!Strings.isNullOrEmpty(sortOrderParam)) {\n sortOrder = ArticleSearchQuery.SolrSortOrder.valueOf(sortOrderParam);\n }\n dateRange = parseDateRange(getSingleParam(params, \"dateRange\", null),\n getDateParam(params, \"filterStartDate\"), getDateParam(params, \"filterEndDate\"));\n List<String> allJournalKeys = SearchController.isNullOrEmpty(params.get(\"filterJournals\"))\n ? new ArrayList<>() : params.get(\"filterJournals\");\n\n filterJournalNames = new HashSet<>();\n // will have only valid journal keys\n journalKeys = new ArrayList<>();\n for (String journalKey : allJournalKeys) {\n try {\n String journalName = siteSet.getJournalNameFromKey(journalKey);\n journalKeys.add(journalKey);\n filterJournalNames.add(journalName);\n } catch (UnmatchedSiteException umse) {\n log.info(\"Search on an invalid journal key: %s\".format(journalKey));\n }\n }\n startDate = getDateParam(params, \"filterStartDate\");\n endDate = getDateParam(params, \"filterEndDate\");\n\n if (startDate == null && endDate != null) {\n startDate = DEFAULT_START_DATE;\n } else if (startDate != null && endDate == null) {\n endDate = LocalDate.now();\n }\n\n subjectList = parseSubjects(getSingleParam(params, \"subject\", null), params.get(\"filterSubjects\"));\n articleTypes = params.get(\"filterArticleTypes\");\n articleTypes = articleTypes == null ? new ArrayList<String>() : articleTypes;\n authors = SearchController.isNullOrEmpty(params.get(\"filterAuthors\"))\n ? new ArrayList<String>() : params.get(\"filterAuthors\");\n sections = SearchController.isNullOrEmpty(params.get(\"filterSections\"))\n ? new ArrayList<String>() : params.get(\"filterSections\");\n\n isFiltered = !filterJournalNames.isEmpty() || !subjectList.isEmpty() || !articleTypes.isEmpty()\n || dateRange != ArticleSearchQuery.SolrEnumeratedDateRange.ALL_TIME || !authors.isEmpty()\n || startDate != null || endDate != null || !sections.isEmpty();\n }",
"private void initiateProject() {\n\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yyyy\", Locale.getDefault());\n\n Date startDay = null;\n Date deadlineMinPace = null;\n Date deadlineMaxPace = null;\n\n try {\n startDay = dateFormat.parse(\"21-08-2018\");\n deadlineMinPace = dateFormat.parse(\"27-08-2018\");\n deadlineMaxPace = dateFormat.parse(\"25-08-2018\");\n } catch (ParseException e) {\n e.printStackTrace();\n }\n\n if (startDay != null && deadlineMinPace != null && deadlineMaxPace != null) {\n\n smp = new SmartProject(\"Test project\", \"Test project description\",\n 35, startDay, deadlineMinPace, deadlineMaxPace);\n\n System.out.println(\"===>>>\" + smp.toString());\n\n } else {\n System.out.println(\"===>>> Some date are null!\");\n }\n\n /*\n // *** print block ***\n smp.printEntries();\n\n for (float f : smp.getYAxisChartValuesMinPace()) {\n System.out.println(f);\n }\n\n for (float f : smp.getYAxisChartValuesMaxPace()) {\n System.out.println(f);\n }\n\n for (float f : smp.getFloatNumbersForXAxis()) {\n System.out.println(f);\n }\n */\n\n }",
"public UserPracticeSummaryCriteria() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public void getData() {\n\t\tcurrentDate = model.getCurrentDate();\n\t\tLocalDate firstDateOfMonth = LocalDate.of(currentDate.getYear(), currentDate.getMonthValue(), 1);\n\t\tevents = EventProcessor.filterEvents(model.getEvents(), firstDateOfMonth, firstDateOfMonth.plusMonths(1).minusDays(1));\n\t}",
"private List<T> findRange(RequestData requestData) {\n javax.persistence.criteria.CriteriaQuery cq = getEntityManager().getCriteriaBuilder().createQuery();\n cq.select(cq.from(getEntityClass()));\n javax.persistence.Query q = getEntityManager().createQuery(cq);\n q.setMaxResults(requestData.getLength());\n q.setFirstResult(requestData.getStart());\n return q.getResultList();\n }",
"public void start(){\n isFiltersSatisfied();\n }",
"private synchronized void getRawData (Date begin, Date end, Vector<SensorData> data) {\n for (SensorData sensorData : rawData) {\n if ((sensorData.getDate().before(end) || sensorData.getDate()\n .equals(end))\n && (sensorData.getDate().after(begin) || sensorData\n .getDate().equals(begin))) {\n data.add(sensorData);\n }\n }\n }",
"@Before\n\tpublic void init() {\n\t\t\n\n\t\tCalendar cal = Calendar.getInstance();\n\t\t\n\t cal.add(Calendar.DATE, -2); \n\t \n\t fechaOperacion = LocalDate.of(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DAY_OF_MONTH));\n\t \n\n\t\t\n\t\tCiudad buenos_aires = new Ciudad(new Provincia(\"Argentina\", \"Buenos Aires\"), \"Capital Federal\");\n\t \t\n \tProvincia prov_buenos_aires = new Provincia(\"Ciudad Autonoma de Buenos Aires\",\"Capital Federal\");\n \t\n \tDireccionPostal direccionPostal = new DireccionPostal( \"lacarra 180\", buenos_aires, prov_buenos_aires, \"argentina\", new Moneda(\"$\",\"Peso argentino\" ));\n\t\n\t\t\n\t\t entidad1 = new EntidadJuridica(\"chacho bros\", \"grupo chacho\", \"202210\", direccionPostal, new Categoria(\"ONG\"),TipoEmpresa.EMPRESA);\n\n\t\t\n\t\t\n\t}",
"protected void addDateRange() {\n addFieldset(startDatePicker, \"Start Date\", \"startDate\");\n addFieldset(endDatePicker, \"End Date\", \"endDate\");\n }",
"private void prepareData(List<String[]> subset, Set<String> selections) {\n Bundle chartBundle = new Bundle();\n //Get the years and user selected data for the graph\n ArrayList<String> year = new ArrayList<>();\n ArrayList<ArrayList<Float>> data = new ArrayList<>();\n ArrayList<String> options = new ArrayList<>();\n float max=Float.MIN_VALUE;\n float min=Float.MAX_VALUE;\n boolean useLog = false;\n for (String option : selections) {\n //Loop over options\n ArrayList<Float> dataSeries = new ArrayList<>();\n int numOption = Integer.parseInt(option);\n //For every option get data required for the option\n options.add(OPTION_NAMES[numOption]);\n for (String[] line : subset) {\n dataSeries.add(Float.valueOf(line[numOption + CONSTANT]));\n }\n //Keep track of maximum of minimum values user has requested\n float tempMax = Collections.max(dataSeries);\n float tempMin = Collections.min(dataSeries);\n if (tempMax>max){\n max = tempMax;\n }\n if (tempMin<min && tempMin!=0){\n min=tempMin;\n }\n //Add user option to overall data they want to see\n data.add(dataSeries);\n }\n for (String[] line : subset) {\n //Loop preparing list of labels for X Axis\n year.add(line[2]);\n }\n if ((max/min)>50){\n //If the biggest and smallest values have a range bigger than factor of 50 then convert values to log scale\n useLog=true;\n for (int i=0;i<data.size();i++){\n //Loop which removes the data entries, converts them to log and then places them back to their original position in ArrayList\n ArrayList<Float> tempEntry = data.get(i);\n data.remove(i);\n ArrayList<Float> convertedValues = convertToLog(tempEntry);\n data.add(i,convertedValues);\n }\n }\n //Putting all the values in the Bundle in preparation for ChartActivity\n chartBundle.putSerializable(\"Data\", data);\n chartBundle.putString(\"country\", user_choice);\n chartBundle.putSerializable(\"Label\", options);\n chartBundle.putSerializable(\"year\", year);\n chartBundle.putBoolean(\"log\",useLog);\n Intent chart_intent = new Intent(this, ChartActivity.class);\n chart_intent.putExtra(\"Bundle\", chartBundle);\n startActivity(chart_intent);\n }",
"private void buildQueryFilterTemporal(String dateField,\n String startDate,\n String endDate,\n boolean isDatesContainedChecked,\n String namedTimescale, \n String namedTimescaleQueryType,\n TermsList termsList\n ) \n \t\tthrows UnsupportedEncodingException {\n\t boolean endDateSpecified = false;\n\t boolean startDateSpecified = false;\n\t \n /* If the user specified a named time-scale query, search for it\n * in the \"timescale\" field.\n */\n if ((namedTimescale != null) && (!(namedTimescale.equals(\"\")))) {\n termsList.addTerm(namedTimescale);\n String parenthesizedValue = parenthesizeQueryValue(namedTimescale);\n String escapedValue = Search.escapeQueryChars(parenthesizedValue);\n String encodedValue = URLEncoder.encode(escapedValue, \"UTF-8\");\n String timescaleQuery = String.format(\"timescale:%s\", encodedValue);\n updateQString(timescaleQuery);\n }\n \n if ((startDate == null) || (startDate.equals(\"\"))) {\n \tstartDate = \"*\";\n }\n else {\n startDate = ISO8601Utility.formatTimestamp(startDate, \"DAY\");\n if (startDate != null) startDateSpecified = true;\n }\n\n if ((endDate == null) || (endDate.equals(\"\"))) {\n \tendDate = \"NOW\";\n }\n else {\n \tendDate = ISO8601Utility.formatTimestamp(endDate, \"DAY\");\n \tif (endDate != null) endDateSpecified = true;\n }\n\n validateDateRange(startDate, endDate);\n \n // If a start date or an end date was specified, search temporal coverage\n //\n if (startDateSpecified || endDateSpecified) {\n \tString temporalFilter = null;\n \tString collectionFilter = null;\n \tString pubDateFilter = null;\n \tString LEFT_BRACKET = \"%5B\";\n \tString RIGHT_BRACKET = \"%5D\";\n\n if (dateField.equals(\"ALL\") || dateField.equals(\"COLLECTION\")) {\n \t String singleDateQuery = String.format(\"singledate:%s%s+TO+%s%s\", LEFT_BRACKET, startDate, endDate, RIGHT_BRACKET);\n \t String startDateQuery = String.format(\"begindate:%s*+TO+%s%s\", LEFT_BRACKET, endDate, RIGHT_BRACKET);\n \t String endDateQuery = String.format(\"enddate:%s%s+TO+NOW%s\", LEFT_BRACKET, startDate, RIGHT_BRACKET);\n \t collectionFilter = String.format(\"(%s+OR+(%s+AND+%s))\", singleDateQuery, startDateQuery, endDateQuery);\n }\n \n if (dateField.equals(\"ALL\") || dateField.equals(\"PUBLICATION\")) {\n \t pubDateFilter = String.format(\"pubdate:%s%s+TO+%s%s\", LEFT_BRACKET, startDate, endDate, RIGHT_BRACKET);\n }\n \n if (dateField.equals(\"ALL\")) {\n \t temporalFilter = String.format(\"(%s+OR+%s)\", pubDateFilter, collectionFilter);\n }\n else if (dateField.equals(\"COLLECTION\")) {\n \t temporalFilter = collectionFilter;\n }\n else if (dateField.equals(\"PUBLICATION\")) {\n \t temporalFilter = pubDateFilter;\n }\n \n updateFQString(temporalFilter); \n }\n\n }",
"public java.util.List<DataEntry> findAll(int start, int end);",
"public Criterio1() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"private ArticleSearchQuery.SearchCriterion parseDateRange(String dateRangeParam, LocalDate startDate, LocalDate endDate) {\n ArticleSearchQuery.SearchCriterion dateRange = ArticleSearchQuery.SolrEnumeratedDateRange.ALL_TIME;\n if (!Strings.isNullOrEmpty(dateRangeParam)) {\n dateRange = ArticleSearchQuery.SolrEnumeratedDateRange.valueOf(dateRangeParam);\n } else if (startDate != null && endDate != null) {\n dateRange = new ArticleSearchQuery.SolrExplicitDateRange(\"explicit date range\",\n startDate.toString(), endDate.toString());\n }\n return dateRange;\n }",
"public ApplyExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }",
"public void init() {\n for (int i = 1; i <= 20; i++) {\n List<Data> dataList = new ArrayList<Data>();\n if (i % 2 == 0 || (1 + i % 10) == _siteIndex) {\n dataList.add(new Data(i, 10 * i));\n _dataMap.put(i, dataList);\n }\n }\n }",
"private void collectForRange(Date startDate, Date endDate) {\n Flux<SolarFlare> flux = solarFlareMapper.transferCollectionToEntityFlux(\n donkiClient.getBetweenRange(startDate, endDate)\n );\n solarFlareRepository.saveAll(flux)\n .count()\n .subscribe(total -> log.info(\"Collected {} data sets solar flares\", total));\n }",
"private void addDateRangeFiltering(Map params, String dateProperty, Date startDate, Date endDate) {\n\n\t\t// date range filter is enabled\n\t\tif (dateProperty != null) {\n\n\t\t\tparams.put(IReportDAO.DATE_COLUMN, dateProperty);\n\t\t\tString check = (String) params.get(IReportDAO.DATE_COLUMN);\n\t\t\tif (check.equalsIgnoreCase(\"lastModifiedTime\")) {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, null);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, null);\n\t\t\t} else {\n\t\t\t\t// from date\n\t\t\t\tparams.put(IReportDAO.FROM_DATE, startDate);\n\t\t\t\t// to date\n\t\t\t\tparams.put(IReportDAO.TO_DATE, endDate);\n\t\t\t}\n\n\t\t}\n\t}",
"@Override\n\tpublic List<Project> findProjectsByStartDateRange(int ownerAccountId,\n\t\t\tDateTime fromDate, DateTime toDate, Set<String> currentPhases, boolean headerOnly) {\n\t\ttry {\n\t\t\tList<Project> projects = super.findDomainObjectsByDateTimeRange(ownerAccountId, outJoins,\n\t\t\t\t\t\"o.StartDate\", fromDate, toDate, currentPhases, null);\n\t\t\treturn getQueryDetail(projects, headerOnly);\n\t\t}\n\t\tcatch (MustOverrideException e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByStartDateRange MustOverrideException: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.println(\"JdbcProjectDao.findProjectsByStartDateRange Exception: \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\t}",
"public ParameterData(String filterString, LocalDate matchDate, TimeSearch timeSearch) {\n this.filterString = filterString;\n this.matchDate = matchDate;\n this.timeSearch = timeSearch;\n description = null;\n dateTime = null;\n taskNumber = 0;\n }",
"DbQuery setRangeFilter(int startValue, int endValue) {\n return setRangeFilter((double) startValue, (double) endValue);\n }",
"public IncomeClassExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public DataElementChartResult generateChartDataPeriodWise( List<Date> selStartPeriodList,\n List<Date> selEndPeriodList, List<String> periodNames, List<DataElement> dataElementList,\n List<DataElementCategoryOptionCombo> decocList, OrganisationUnit orgUnit )\n throws Exception\n {\n DataElementChartResult dataElementChartResult;\n\n String[] series = new String[dataElementList.size()];\n String[] categories = new String[selStartPeriodList.size()];\n Double[][] data = new Double[dataElementList.size()][selStartPeriodList.size()];\n String chartTitle = \"OrganisationUnit : \" + orgUnit.getShortName();\n String xAxis_Title = \"Time Line\";\n String yAxis_Title = \"Value\";\n\n int serviceCount = 0;\n\n for ( DataElement dataElement : dataElementList )\n {\n DataElementCategoryOptionCombo decoc;\n\n DataElementCategoryCombo dataElementCategoryCombo = dataElement.getCategoryCombo();\n\n List<DataElementCategoryOptionCombo> optionCombos = new ArrayList<DataElementCategoryOptionCombo>(\n dataElementCategoryCombo.getOptionCombos() );\n\n if ( deSelection.equalsIgnoreCase( OPTIONCOMBO ) )\n {\n decoc = decocList.get( serviceCount );\n\n series[serviceCount] = dataElement.getName() + \" : \" + decoc.getName();\n \n CaseAggregationCondition caseAggregationCondition = caseAggregationConditionService\n .getCaseAggregationCondition( dataElement, decoc );\n\n if ( caseAggregationCondition == null )\n {\n selectedStatus.add( \"no\" );\n }\n else\n {\n selectedStatus.add( \"yes\" );\n }\n\n yseriesList.add( dataElement.getName() + \" : \" + decoc.getName() );\n }\n else\n {\n decoc = dataElementCategoryService.getDefaultDataElementCategoryOptionCombo();\n series[serviceCount] = dataElement.getName();\n\n CaseAggregationCondition caseAggregationCondition = caseAggregationConditionService\n .getCaseAggregationCondition( dataElement, decoc );\n\n if ( caseAggregationCondition == null )\n {\n selectedStatus.add( \"no\" );\n }\n else\n {\n selectedStatus.add( \"yes\" );\n }\n\n yseriesList.add( dataElement.getName() );\n }\n\n int periodCount = 0;\n for ( Date startDate : selStartPeriodList )\n {\n Date endDate = selEndPeriodList.get( periodCount );\n String drillDownPeriodName = periodNames.get( periodCount );\n String tempStartDate = format.formatDate( startDate );\n String tempEndDate = format.formatDate( endDate );\n\n categories[periodCount] = periodNames.get( periodCount );\n //PeriodType periodType = periodService.getPeriodTypeByName( periodTypeLB );\n\n String values = orgUnit.getId() + \":\" + dataElement.getId() + \":\" + decoc.getId() + \":\" + periodTypeLB\n + \":\" + tempStartDate + \":\" + tempEndDate;\n selectedValues.add( values );\n\n String drillDownData = orgUnit.getId() + \":\" + \"0\" + \":\" + dataElement.getId() + \":\" + decoc.getId()\n + \":\" + periodTypeLB + \":\" + tempStartDate + \":\" + tempEndDate + \":\" + drillDownPeriodName + \":\"\n + deSelection + \":\" + aggChecked;\n selectedDrillDownData.add( drillDownData );\n\n Double aggDataValue = 0.0;\n \n if ( deSelection.equalsIgnoreCase( OPTIONCOMBO ) )\n {\n //System.out.println( \" Inside deSelection.equalsIgnoreCase( OPTIONCOMBO ) \" );\n if ( aggDataCB != null )\n {\n Double temp = aggregationService.getAggregatedDataValue( dataElement, decoc, startDate,\n endDate, orgUnit );\n if ( temp != null )\n aggDataValue += temp;\n //aggDataValue = temp;\n }\n else\n {\n Collection<Period> periods = periodService.getPeriodsBetweenDates( startDate, endDate );\n for ( Period period : periods )\n {\n DataValue dataValue = dataValueService.getDataValue( orgUnit, dataElement, period, decoc );\n try\n {\n aggDataValue += Double.parseDouble( dataValue.getValue() );\n }\n catch ( Exception e )\n {\n }\n }\n }\n }\n else\n {\n //System.out.println( \" Inside not deSelection.equalsIgnoreCase( OPTIONCOMBO ) \" );\n Iterator<DataElementCategoryOptionCombo> optionComboIterator = optionCombos.iterator();\n while ( optionComboIterator.hasNext() )\n {\n DataElementCategoryOptionCombo decoc1 = (DataElementCategoryOptionCombo) optionComboIterator.next();\n\n if ( aggDataCB != null )\n {\n Double temp = aggregationService.getAggregatedDataValue( dataElement, decoc1, startDate,\n endDate, orgUnit );\n if ( temp != null )\n aggDataValue += temp;\n //aggDataValue = temp;\n }\n else\n {\n Collection<Period> periods = periodService.getPeriodsBetweenDates( startDate, endDate );\n for ( Period period : periods )\n {\n DataValue dataValue = dataValueService.getDataValue( orgUnit, dataElement, period, decoc1 );\n try\n {\n aggDataValue += Double.parseDouble( dataValue.getValue() );\n }\n catch ( Exception e )\n {\n }\n }\n }\n }\n }\n //System.out.println( \" Data is : \" + aggDataValue );\n data[serviceCount][periodCount] = aggDataValue;\n\n if ( dataElement.getType().equalsIgnoreCase( DataElement.VALUE_TYPE_INT ) )\n {\n if ( dataElement.getNumberType().equalsIgnoreCase( DataElement.VALUE_TYPE_INT ) )\n {\n data[serviceCount][periodCount] = Math.round( data[serviceCount][periodCount]\n * Math.pow( 10, 0 ) )\n / Math.pow( 10, 0 );\n }\n else\n {\n data[serviceCount][periodCount] = Math.round( data[serviceCount][periodCount]\n * Math.pow( 10, 1 ) )\n / Math.pow( 10, 1 );\n }\n }\n periodCount++;\n }\n\n serviceCount++;\n }\n dataElementChartResult = new DataElementChartResult( series, categories, data, chartTitle, xAxis_Title,\n yAxis_Title );\n\n return dataElementChartResult;\n }",
"public void searchRecords(Scanner input) {\n\t\tSystem.out.print(\"Enter a call number> \");\n\t\tString callNumber = input.nextLine();\n\n\t\tSystem.out.print(\"Enter title keywords> \");\n\t\tString[] keywords = null;\n\t\tString line = input.nextLine();\n\t\tif (!line.equals(\"\"))\n\t\t\tkeywords = line.split(\"[ ,\\n]+\");\n\n\t\tint startYear = Integer.MIN_VALUE, endYear = Integer.MAX_VALUE;\n\t\tboolean valid;\n\t\tdo {\n\t\t\tvalid = true;\n\t\t\tSystem.out.print(\"Enter a time period (startYear-endYear)> \");\n\t\t\tline = input.nextLine();\n\t\t\tif (!line.equals(\"\")) {\n\t\t\t\tint hyphen = line.indexOf('-');\n\t\t\t\tif (hyphen < 0)\n\t\t\t\t\tvalid = false;\n\t\t\t\telse {\n\t\t\t\t\tString startValue = line.substring(0, hyphen);\n\t\t\t\t\tint start = startValue.equals(\"\") ? Integer.MIN_VALUE: Integer.parseInt(startValue);\n\t\t\t\t\tString endValue = line.substring(hyphen + 1, line.length());\n\t\t\t\t\tint end = endValue.equals(\"\") ? Integer.MAX_VALUE : Integer.parseInt(endValue);\n\t\t\t\t\tif (start > Integer.MIN_VALUE\n\t\t\t\t\t\t\t&& (start < 1000 || start > 9999)\n\t\t\t\t\t\t\t|| end < Integer.MAX_VALUE\n\t\t\t\t\t\t\t&& (end < 1000 || end > 9999))\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\telse {\n\t\t\t\t\t\tstartYear = start;\n\t\t\t\t\t\tendYear = end;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!valid)\n\t\t\t\tSystem.out.println(\"All year values should be between 1000 and 9999.\");\n\t\t} while (!valid); /* Loop to enter only a valid year range */\n\n\t\t/* search for matched references */\n\t\tSystem.out.println(\"Matched references: \");\n\t\t/* Performs sequential search if search query does not contain a 'title' */\n\t\tif (keywords == null) {\n\t\t\tsearchBooks(callNumber, keywords, startYear, endYear);\n\t\t\tsearchJournals(callNumber, keywords, startYear, endYear);\n\t\t} else\n\t\t\t/* Performs HashMap search for records if search query contains a 'title' */\n\t\t\tsearchHashMap(keywords, callNumber, startYear, endYear);\n\t}",
"public AddressBookExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }",
"public SearchPatientControl() {\r\n\t\tmasterData.add(new PatientForSearch(\"1000\",\"Neville\",\"Vance\",\"5 Ballymiscaw Road\",\"9733492995\",\"A\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1001\",\"Patricia\",\"Vance\",\"32 Begny Road\",\"9863527465\",\"AB\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1002\",\"Jennifer\",\"Lyttle\",\"21 Lenaghan Crescent\",\"9863549264\",\"B\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1003\",\"Declan\",\"Cranberry\",\"10 Country Road\",\"9788853741\",\"A\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1004\",\"Bryan\",\"Quinn\",\"12 Farmville Road\",\"9677728491\",\"AB\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1005\",\"Amanda\",\"Tom\",\"21 Glenwood\",\"9866743952\",\"B\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1006\",\"Chris\",\"Tom\",\"8 Shipquay Street\",\"9888885326\",\"AB\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1007\",\"James\",\"Symth\",\"11 Cavehill road\",\"9733492995\",\"B\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1008\",\"Stacey\",\"Monro\",\"21 Johnson drive\",\"9863789891\",\"A\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1009\",\"Andrew\",\"Cusack\",\"54 Ulsterville Gardens\",\"9877738369\",\"O\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1010\",\"Fiona\",\"Cusack\",\"19 Donnybrook Street\",\"9863584765\",\"A\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1011\",\"Claire\",\"Hunter\",\"2 Strand road\",\"9872547665\",\"AB\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1012\",\"Maria\",\"Stephenson\",\"8 Glenavy road\",\"9864763524\",\"AB\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1013\",\"Andrew\",\"Simpson\",\"20 Stormount park\",\"9899763574\",\"B\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1014\",\"Tony\",\"Andrews\",\"14 Spencer road\",\"9765112345\",\"A\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1015\",\"Rachel\",\"Stevens\",\"30 Shankhill road\",\"9833274658\",\"O\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1016\",\"Catherine\",\"Stevens\",\"29 Green grove\",\"9855524356\",\"AB\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1017\",\"Timothy\",\"Stevens\",\"73 Meadow lane\",\"9844499998\",\"O\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1018\",\"Allan\",\"Curry\",\"46 Castle muse\",\"9755375869\",\"B\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1019\",\"Jordan\",\"Watson\",\"51 Grey crescent\",\"9863977648\",\"A\"));\r\n\t\tmasterData.add(new PatientForSearch(\"1020\",\"Agnes\",\"Brown\",\"41 Windview drive\",\"9863587654\",\"O\"));\r\n\t}",
"public CorrResultModel searchForEvents(String searchString, int page, HashMap foundEventtypes, String lowerBound, String upperBound, List filterNames);",
"public void execFuzzySearchRangeFunc(){\n\n Map map = new HashMap();\n\n if(this.searchParam != null && this.searchParam.length()> 0 ){\n if(this.searchParam.contains(\":\")==true || this.searchParam.startsWith(\"chr\") == true){\n String chrom = \"\";\n int pstart = -1;\n int pend = -1;\n if(this.searchParam.indexOf(\":\") > -1 ){\n int idex = this.searchParam.indexOf(\":\");\n chrom = this.searchParam.substring(0,idex );\n System.out.println(\"chrom=\"+chrom);\n map.put(\"chrom\",chrom);\n if(this.searchParam.indexOf(\"-\") > -1 ){\n int idex1 = this.searchParam.indexOf(\"-\");\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, idex1));\n pend = Integer.parseInt(this.searchParam.substring(idex1+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n map.put(\"endpos\",pend);\n }else {\n pstart = Integer.parseInt(this.searchParam.substring(idex+1, this.searchParam.length()));\n map.put(\"startpos\",pstart);\n }\n\n }else if(this.searchParam.startsWith(\"chr\") == true){\n map.put(\"chrom\",this.searchParam);\n\n\n }\n }\n }\n\n int idenfilter = 0;\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"species\",this.searchSpecies);\n }\n\n if(this.searchTrait != null&& this.searchTrait.equals(\"null\")==false && this.searchTrait.length()>0){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"searchTrait\", this.searchTrait) ;\n }\n\n if(this.pvalue != null&& this.pvalue.equals(\"null\")==false && this.pvalue.length()>0){\n idenfilter =1;\n map.put(\"gwas\",\"gwas\") ;\n map.put(\"gwasend\",\"gwasend\") ;\n map.put(\"psitu\", this.psitu);\n map.put(\"pval\", this.pvalue) ;\n }\n\n List<SearchItemBean> searchlist = (List<SearchItemBean>) baseService.findResultList(\"cn.big.gvk.dm.Search.selectRangeBySearch\",map);\n if( searchlist != null ){\n genotypeBeanList = new ArrayList<GenotypeBean>();\n mapGeneBeanList = new ArrayList<MapGeneBean>();\n for(SearchItemBean tmpbean : searchlist){\n if(tmpbean.getItemType() == 1){ //variant\n Map cmp = new HashMap();\n cmp.put(\"genotypeid\",tmpbean.getItemId());\n GenotypeBean tbean = (GenotypeBean) baseService.findObjectByObject(\"cn.big.gvk.dm.Genotype.selectGenotypeByPos\",cmp);\n if(tbean != null ){\n List genotypelist = new ArrayList();\n genotypelist.add(tbean.getGenotypeId()) ;\n\n Map t = new HashMap();\n t.put(\"genotypelist\",genotypelist);\n List<GenotypeAnnotateGeneView> annotateview = baseService.findResultList(\"cn.big.gvk.dm.Genotype.selectGenotypeByList\",t);\n if(annotateview != null && annotateview.size()>0 ){\n //here we need to filter the result\n Map filtermap = new HashMap();\n for(GenotypeAnnotateGeneView tview : annotateview){\n String fkey = tview.getMapGeneId()+\"_\"+tview.getConseqtype();\n if(filtermap.containsKey(fkey) == false){\n filtermap.put(fkey,tview);\n }\n }\n\n if(filtermap.size()>0){\n List<GenotypeAnnotateGeneView> alist = new ArrayList<GenotypeAnnotateGeneView>();\n Iterator it = filtermap.entrySet().iterator();\n while(it.hasNext()){\n Map.Entry entry = (Map.Entry) it.next();\n GenotypeAnnotateGeneView val = (GenotypeAnnotateGeneView) entry.getValue();\n alist.add(val);\n }\n\n tbean.setGenotypeAnnotateGeneView(alist);\n }\n\n\n }\n\n //find association count\n GwasAssociationBean gwas = (GwasAssociationBean) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectAssociationCountByGenotypeid\",tbean.getGenotypeId());\n if(gwas != null){\n tbean.setTraitCount(gwas.getGwasCount());\n }\n\n //find studycount\n Map cmap = new HashMap();\n cmap.put(\"genotypeId\",tbean.getGenotypeId());\n if(this.searchSpecies!= null && this.searchSpecies.equals(\"all\") == false){\n cmap.put(\"species\",this.searchSpecies);\n }\n\n\n GwasAssociationBean tg_bean1 = (GwasAssociationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectStudyCountByGenotypeid\",cmap);\n if(tg_bean1 != null ){\n tbean.setStudyCount(tg_bean1.getGwasCount());\n }\n\n genotypeBeanList.add(tbean) ;\n }\n\n\n\n\n }else if(tmpbean.getItemType() == 2){//gene\n\n Map cmp = new HashMap();\n cmp.put(\"gid\",tmpbean.getItemId()) ;\n MapGeneBean mgb = (MapGeneBean) baseService.findObjectByObject(\"cn.big.gvk.dm.MapGene.selectMapGeneCount\",cmp);\n if(mgb != null ){\n Map t = new HashMap();\n t.put(\"gId\",mgb.getGid()) ;\n t.put(\"count\",\"count\");\n\n //trait count\n GwasAssociationView gwas = (GwasAssociationView) baseService.findObjectByObject(\"cn.big.gvk.dm.GwasAssociation.selectGwasViewByGeneInfo\",t);\n if(gwas != null){\n mgb.setTraitCount(gwas.getTraitCount());\n }\n\n //study count\n StudyBean study = (StudyBean) baseService.findObjectByObject(\"cn.big.gvk.dm.study.selectStudyByMapGeneId\",t);\n if(study != null ){\n mgb.setStudyCount(study.getStudyCount());\n }\n\n //publication count\n PublicationBean publication = (PublicationBean)baseService.findObjectByObject(\"cn.big.gvk.dm.publication.selectPubByGeneId\",t);\n if (publication != null ){\n mgb.setPublicationCount(publication.getPublicationCount());\n }\n mapGeneBeanList.add(mgb) ;\n\n }\n\n\n }\n }\n }\n StringBuffer sb = new StringBuffer();\n //generate hidden html table and then use tableExport.js export\n if(genotypeBeanList != null && genotypeBeanList.size()>0){\n for(GenotypeBean genotype: genotypeBeanList){\n sb.append(genotype.getVarId()).append(\"\\t\").append(genotype.getChrom()).append(\":\")\n .append(genotype.getStartPos()).append(\"\\t\").append(genotype.getTraitCount())\n .append(\"\\t\").append(genotype.getStudyCount()).append(\"\\n\");\n }\n }\n\n if(mapGeneBeanList != null && mapGeneBeanList.size()>0){\n for(MapGeneBean mapgene: mapGeneBeanList){\n sb.append(mapgene.getMapGeneId()).append(\"\\t\").append(mapgene.getMapGeneChrom()).append(\":\")\n .append(mapgene.getMapGeneStart()).append(\"-\").append(mapgene.getMapGeneEnd()).append(\"\\t\").append(mapgene.getTraitCount()).append(\"\\t\")\n .append(mapgene.getStudyCount()).append(\"\\n\");\n }\n }\n\n\n if(format == 1 ){ //export txt\n this.response.reset();\n this.response.setHeader(\"Content-Disposition\",\n \"attachment;filename=export.txt\");\n this.response.setContentType(\"application/ms-txt\");\n try {\n PrintWriter pr = this.response.getWriter();\n pr.print(sb.toString());\n pr.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"public SystemRegionExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public boolean setFilter(int date_begin,int date_end){\n\t\tif(date_end<date_begin) return false;\n\t\tthis.date_begin=date_begin;\n\t\tthis.date_end=date_end;\n\t\tthis.index_begin=findBeginIndex();\n\t\tthis.index_end=findEndIndex();\n\t\tthis.filterApplied=true;\n\t\tnotifyDataSetChanged();\n\t\tnotifyDataSetInvalidated();\n\t\treturn true;\n\t}",
"public NewsCustomerSurveyExample() {\r\n oredCriteria = new ArrayList();\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 }",
"public NewsExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public StockExistingExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"public RentExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }",
"public BhiEnvironmentalAssessmentExample() {\r\n oredCriteria = new ArrayList<Criteria>();\r\n }",
"void setNilSearchRecurrenceStart();",
"private void startFilterCriteria() {\n\n\t\tLog.i(TAG, \"startFilterCriteria()\");\n\n\t\tFindUtilsImpl utils = new FindUtilsImpl();\n\t\tSet<String> tSet = utils.getTypeSet((ArrayList<BELEvent>) eventsListFind);\n\t\tArrayList<String> tList = new ArrayList<String>(cleanSet(tSet));\n\n\t\tString str = \"start FilterCriteria.class\";\n\t\tLog.i(TAG, \"Search Activity: \" +str);\n\n\t\t\tIntent intent = new Intent(context, FilterCriteria.class);\n\t\t\tintent.putStringArrayListExtra(\"TypesKey\", tList);\n\t\t\t//TODO capture activity not found exception\n\t\t\t//\t((Activity) context).startActivityForResult(intent,Constants.FIND_REQ);\n\t\t\tstartActivityForResult(intent,Constants.FIND_REQ);\n\n\t\t\tstr = \"startActivity(intent,Constants.FIND_REQ)\";\n\t\t\t//\tstr = \"startActivityForResult(intent,Constants.FIND_REQ)\";\n\t\t\tLog.e(\"Search Dlg: \", str);\n\t\t}",
"public StudentExample() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"private Filter betweenFilter(String start, Object minValue, Object maxValue) {\n return FF.between(FF.property(start), FF.literal(minValue), FF.literal(maxValue));\n }",
"List<Book> getBooksFromPeriod(LocalDate from,LocalDate to);",
"public FinalOrderBeanCriteria() {\n oredCriteria = new ArrayList<Criteria>();\n }",
"DbQuery setRangeFilter(double startValue, double endValue) {\n filter = Filter.RANGE;\n filterType = FilterType.DOUBLE;\n this.startAt = startValue;\n this.endAt = endValue;\n return this;\n }",
"public PanoOrderTransCriteria() {\r\n oredCriteria = new ArrayList();\r\n }",
"@Override\r\n\tpublic ArrayList<SchoolValue> getValuesFiltered(Boolean searchByPcode, String pCode, Double radius, Boolean searchByDistrict, String district, Boolean searchByString, String search, Boolean searchByClassSize, int minSize, int maxSize) {\r\n\t\t// 3 preps here, for defensive coding (not bothering to search for something if it's null) and to fill latitude, longitude\r\n\t\t// pCode prep\r\n\t\tLatLong aLatLong = null;\r\n\t\tDouble latitude = 0.0;\r\n\t\tDouble longitude = 0.0;\r\n\t\tif (pCode != null) {\r\n\t\t\taLatLong = findLatLong(pCode);\r\n\t\t\tif (aLatLong != null) {\r\n\t\t\t\tlatitude = aLatLong.getLatitude();\r\n\t\t\t\tlongitude = aLatLong.getLongitude();\r\n\t\t\t} else {\r\n\t\t\t\tsearchByPcode = false;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tsearchByPcode = false;\r\n\t\t}\r\n\t\t\r\n\t\t// district prep\r\n\t\tif (district == null)\r\n\t\t\tsearchByDistrict = false;\r\n\t\t\r\n\t\t// search prep\r\n\t\tif (search == null)\r\n\t\t\tsearchByString = false;\r\n\t\t\r\n\t\t// populate a list of districts \r\n\t\tArrayList<District> districts = BCDistricts.getInstance().getDistricts();\r\n\r\n\t\t// populate a list of schools from districts\r\n\t\tArrayList<School> schools = new ArrayList<School>();\r\n\t\tfor (int i = 0; i<districts.size();i++) {\r\n\t\t\tschools.addAll(districts.get(i).schools);\r\n\t\t}\r\n\t\t\r\n\t\t// populate a list of schoolvalues from schools, filtering\r\n\t\tArrayList<SchoolValue> schoolValues = new ArrayList<SchoolValue>();\r\n\t\t\r\n\t\tfor (int i = 0; i<schools.size();i++) {\r\n\t\t\tSchool school = schools.get(i);\r\n\t\t\t// (!searching || result) && (!searching || result) && (!searching || result)\r\n\t\t\t// T T => T, T F => F, F T => T, F F => T\r\n\t\t\t// for a filter component to pass, either we're not searching for something (ignore result)\r\n\t\t\t// or we are and result is true, thus (!searching || result) && (...) format\r\n\t\t\tif ((!searchByPcode || areWithinRange(latitude, longitude, school.getLat(), school.getLon(), radius)) && // TODO: EXTRACT TESTING METHOD\r\n\t\t\t\t(!searchByDistrict || stringMatchesTo(district, school.getDistrict().name)) &&\r\n\t\t\t\t(!searchByString || ( stringMatchesTo(search, school.getName()) ||\r\n\t\t\t\t\t\t\t\t\t\tstringMatchesTo(search, school.getLocation()) || \r\n\t\t\t\t\t\t\t\t\t\tstringMatchesTo(search, school.getDistrict().name))) &&\r\n\t\t\t\t(!searchByClassSize || ((school.getClassSize() >= minSize) && (school.getClassSize() <= maxSize)))) { \r\n\r\n\t\t\tschoolValues.add(school.getEquivSchoolValue());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// TODO: ADD SORTING\r\n\t\t}\r\n\t\t\r\n\t\treturn schoolValues;\r\n\t}",
"@Transactional(readOnly = true)\n public List<Employee> findBetween(Date firstBirthDate, Date lastBirthDate) {\n logger.debug(\"find employee range : {}\", SearshRange(firstBirthDate, lastBirthDate));\n return employeeDao.findBetween(firstBirthDate, lastBirthDate);\n }",
"@Test\n\tpublic void testConvertToDocument() throws Exception {\n\n\t\tISource source = new Source();\n\t\tsource.setShortTitle(\"shortTitle\");\n\t\tsource.setSourceType(\"sourceType\");\n\t\tsource.setShortRef(\"shortRef\");\n\t\tsource.setUrl(\"url\");\n\t\tsource.setProductCode(\"productCode\");\n\t\tsource.setAuthor(\"author\");\n\t\tsource.setCitation(\"citation\");\n\t\tsource.setLongTitle(\"longTitle\");\n\t\tsource.setCopyright(\"copyright\");\n\t\tsource.setDescription(\"Description\");\n\t\tsource.setDescriptionMarkup(\"default\");\n\t\tsource.setColor(0x123456);\n\t\tsource.setCreated(1L);\n\t\tsource.setModified(2L);\n\n\t\tList<IPeriod> list = new ArrayList<>();\n\n\t\t// add a few periods\n\t\tIPeriod period1 = new Period();\n\t\tperiod1.setFromEntry(\"1.1585\");\n\t\tperiod1.setToEntry(\"2.1585\");\n\t\tperiod1.setCreated(1L);\n\t\tperiod1.setModified(2L);\n\t\tlist.add(period1);\n\n\t\tIPeriod period2 = new Period();\n\t\tperiod2.setFromEntry(\"1929\");\n\t\tperiod2.setToEntry(\"1930\");\n\t\tperiod2.addFuzzyFromFlag('c');\n\t\tperiod2.addFuzzyToFlag('?');\n\t\tperiod2.setCreated(1L);\n\t\tperiod2.setModified(2L);\n\t\tlist.add(period2);\n\n\t\tIPeriod period3 = new Period();\n\t\tperiod3.setFromEntry(\"1.1.1700\");\n\t\tperiod3.setToEntry(\"5.6.1702\");\n\t\tperiod3.setCreated(1L);\n\t\tperiod3.setModified(2L);\n\t\tlist.add(period3);\n\n\t\tIPeriod period4 = new Period();\n\t\tperiod4.setFromEntry(null);\n\t\tperiod4.setToEntry(\"1596\");\n\t\tperiod4.addFuzzyToFlag('c');\n\t\tperiod4.setCreated(1L);\n\t\tperiod4.setModified(2L);\n\t\tlist.add(period4);\n\n\t\tIPeriod period5 = new Period();\n\t\tperiod5.setFromEntry(\"5.1.901\");\n\t\tperiod5.setToEntry(null);\n\t\tperiod5.addFuzzyFromFlag('?');\n\t\tperiod5.setCreated(1L);\n\t\tperiod5.setModified(2L);\n\t\tlist.add(period5);\n\n\t\tIPeriod period6 = new Period();\n\t\tperiod6.setFromEntry(\"19.6.1601\");\n\t\tperiod6.setToEntry(\"19.6.1601\");\n\t\tperiod6.setCreated(1L);\n\t\tperiod6.setModified(2L);\n\t\tlist.add(period6);\n\n\t\t// add periods\n\t\tsource.setPeriods(list);\n\n\t\t// first without id\n\t\tODocument document = repository.convertToDocument(source);\n\n\t\tassertEquals(\"shortTitle\", document.field(\"shortTitle\"));\n\t\tassertEquals(\"sourceType\", document.field(\"sourceType\"));\n\t\tassertEquals(\"shortRef\", document.field(\"shortRef\"));\n\t\tassertEquals(\"url\", document.field(\"url\"));\n\t\tassertEquals(\"productCode\", document.field(\"productCode\"));\n\t\tassertEquals(\"author\", document.field(\"author\"));\n\t\tassertEquals(\"citation\", document.field(\"citation\"));\n\t\tassertEquals(\"longTitle\", document.field(\"longTitle\"));\n\t\tassertEquals(\"copyright\", document.field(\"copyright\"));\n\t\tassertEquals(\"Description\", document.field(\"description\"));\n\t\tassertEquals(\"default\", document.field(\"descriptionMarkup\"));\n\t\tassertEquals(new Integer(0x123456), document.field(\"color\", Integer.class));\n\t\tassertEquals(new Long(1L), document.field(\"created\", Long.class));\n\t\tassertEquals(new Long(2L), document.field(\"modified\", Long.class));\n\n\t\tassertEquals(period5.getFromJD(), document.field(\"minJD\"));\n\t\tassertEquals(period2.getToJD(), document.field(\"maxJD\"));\n\t\tassertEquals(period5.getFromEntry(), document.field(\"minEntry\"));\n\t\tassertEquals(period2.getToEntry(), document.field(\"maxEntry\"));\n\t\tassertEquals(period5.getFromEntryCalendar(), document.field(\"minEntryCalendar\"));\n\t\tassertEquals(period2.getToEntryCalendar(), document.field(\"maxEntryCalendar\"));\n\t\tassertEquals(\"?\", document.field(\"minFuzzyFlags\"));\n\t\tassertEquals(\"?\", document.field(\"maxFuzzyFlags\"));\n\n\t\t// save document to get id\n\t\tdocument.save();\n\t\tString id = document.getIdentity().toString();\n\n\t\t// set id and test conversion\n\t\tsource.setId(id);\n\n\t\tODocument newDocument = repository.convertToDocument(source);\n\n\t\tassertEquals(document.getIdentity().toString(), newDocument.getIdentity().toString());\n\t}",
"public ArrayList<Question> sortAndFilter(BankOptions temp) {\n\n /* The array being filtered */\n ArrayList<Question> newArr = new ArrayList<Question>();\n\n /* Adds all the questions into the question collection */\n for (int i = 0; i < quesCollec.size(); i++) {\n newArr.add(quesCollec.get(i));\n }\n\n /* checks to see if getDiff is actually set */\n if (temp.getDiff() != -1) {\n\n /* Calls the filter function to filter by Difficulty */\n newArr = filterByDiff(newArr, temp.getDiff());\n }\n\n /* checks to see if the subject is set */\n if (!temp.getSubj().getName().equals(\"None\")) {\n\n /* Calls the filter functions to filter by Subject */\n newArr = filterBySubj(newArr, temp.getSubj());\n }\n\n /* checks to see if the coursename is set */\n if (!temp.getCourse().getName().equals(\"None\")) {\n\n /* Calls the filter functions to filter by course */\n newArr = filterByCourse(newArr, temp.getCourse());\n }\n\n /* checks to see if the question type is set */\n if (!temp.getQuestionType().equals(\"None\")) {\n\n /* Calls the filter functions to filter by question type. */\n newArr = filterByQuestionType(newArr, temp.getQuestionType());\n }\n\n /* checks to see if the search box is set */\n if (!(temp.getSearchBox().equals(\"\") || temp.getSearchBox().equals(\"Search\"))) {\n\n /* Calls the filter functions to filter by the search box. */\n newArr = filterBySearch(newArr, temp.getSearchBox());\n }\n\n /* checks to see if the start date is null */\n if (temp.getStart() != null) {\n /* Calls the filter functions to filter by the dates. */\n newArr = filterByStart(newArr, temp.getStart());\n }\n\n /* checks to see if the end date is null. */\n if (temp.getEnd() != null) {\n newArr = filterByEnd(newArr, temp.getEnd());\n }\n\n return newArr;\n }",
"public SummaryRanges() {\n this.intervals = new ArrayList<>();\n }"
]
| [
"0.54129046",
"0.5371604",
"0.53536373",
"0.5247338",
"0.52364343",
"0.5168858",
"0.51540154",
"0.5140184",
"0.51114774",
"0.5089092",
"0.5068379",
"0.50575066",
"0.50197953",
"0.4981684",
"0.49606165",
"0.49287885",
"0.490862",
"0.49083543",
"0.48690322",
"0.48671392",
"0.48665634",
"0.48409522",
"0.4809385",
"0.48078617",
"0.47868133",
"0.47836652",
"0.4780791",
"0.47662014",
"0.4746705",
"0.47396702",
"0.4733801",
"0.4717988",
"0.47168738",
"0.47153592",
"0.47141737",
"0.47100508",
"0.47084716",
"0.46933296",
"0.4679801",
"0.46791756",
"0.46727106",
"0.46452275",
"0.46320066",
"0.46288094",
"0.46182927",
"0.46126527",
"0.45915398",
"0.45759544",
"0.45711613",
"0.45706317",
"0.4570313",
"0.45699093",
"0.45549732",
"0.45516315",
"0.45500785",
"0.45498264",
"0.45394957",
"0.45381954",
"0.45337462",
"0.45319045",
"0.45317352",
"0.45242894",
"0.4518494",
"0.4508975",
"0.45058957",
"0.45023137",
"0.4496903",
"0.44924036",
"0.44887516",
"0.44820926",
"0.4482075",
"0.44799945",
"0.4479905",
"0.44796765",
"0.44732636",
"0.44715163",
"0.4471133",
"0.44677308",
"0.44652027",
"0.44634598",
"0.44620863",
"0.44571954",
"0.4452917",
"0.44490802",
"0.44452795",
"0.44448856",
"0.4442672",
"0.44417024",
"0.4440697",
"0.44340295",
"0.4427359",
"0.4425706",
"0.44206193",
"0.44174668",
"0.4416345",
"0.44148472",
"0.44148418",
"0.44104856",
"0.4409585",
"0.43981996"
]
| 0.72765267 | 0 |
The method calculating the periods in the data and searching the pitches positions. Fills the pitchPositions and the periods lists. | public void searchPitchPositions() {
for(float pitch : pitches)
periods.add((int) hzToPeriod(pitch));
int periodMaxPitch;
int periodMaxPitchIndex = 0;
int periodBeginning = 0;
//search each periods maxima
for ( int period = 0; period < periods.size() - 1; period++ ) {
periodMaxPitch = 0;
//search a maximum
for ( int i = periodBeginning; i < periodBeginning + periods.get( period ); i++ ) {
if(i < data.size()){
if ( periodMaxPitch < data.get( i ) ) {
periodMaxPitch = data.get( i );
periodMaxPitchIndex = i;
}
}
}
periodBeginning += periods.get( period );
pitchPositions.add( periodMaxPitchIndex );
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<Float> calculatePitches(){\n\t\tList<Integer> res = new ArrayList<Integer>();\n\t\tint size = data.size();\n\t\tint maxAmp = 0;\n\t\tint startPos = 0;\n\t\t// get the first pitch in the basic period\n\t\tfor (int i = 0; i < BASE_FRAGMENT; i ++){\n\t\t\tif (maxAmp < data.get(i)){\n\t\t\t\tmaxAmp = data.get(i);\n\t\t\t\t// set this position as the start position\n\t\t\t\tstartPos = i;\n\t\t\t}\n\t\t}\n\t\tLog.v(\"startPos\", String.valueOf(startPos));\n\t\t// find every pitch in all the fragments\n\t\tint pos = startPos + OFFSET; // set current position\n\t\tint posAmpMax;\n\t\twhile(startPos < 1000){\n\t\t\tif(data.get(pos) > 0) { // only read the positive data\n\n\t\t\t\tposAmpMax = 0;\n\t\t\t\tmaxAmp = 0;\n\t\t\t\t// access to all the data in this fragment\n\t\t\t\twhile (pos < startPos + BASE_FRAGMENT) {\n\t\t\t\t\t// find the pitch and mark this position\n\t\t\t\t\tif (maxAmp < data.get(pos)) {\n\t\t\t\t\t\tmaxAmp = data.get(pos);\n\t\t\t\t\t\tposAmpMax = pos;\n\t\t\t\t\t}\n\t\t\t\t\tpos++;\n\t\t\t\t}\n\t\t\t\t// add pitch position into the list\n\t\t\t\tpitchPositions.add(posAmpMax);\n\t\t\t\tres.add(posAmpMax);\n\t\t\t\t// update the start position and the current position\n\t\t\t\tstartPos = posAmpMax;\n\t\t\t\tpos = startPos + OFFSET;\n\t\t\t}else{\n\t\t\t\tpos ++;\n\t\t\t}\n\t\t}\n\n\t\t// calculate all periods and add them into list\n\t\tfor(int i = 0; i < pitchPositions.size() - 1; i++){\n\t\t\tfloat period = (float)(pitchPositions.get(i+1) - pitchPositions.get(i));\n\t\t\tT.add(period);\n\t\t\tpitches.add(PeriodToPitch(period));\n\t\t}\n\t\tpitchPositions.clear();\n\t\treturn pitches;\n\t}",
"private void analyzePitch(java.util.List<Double> samples) {\n \r\n if(samples.isEmpty()) return;\r\n if(samples.size()<=SAMPLE_RATE*MIN_SAMPLE_LENGTH_MS/1000) {\r\n //System.err.println(\"samples too short: \"+samples.size());\r\n return;\r\n }\r\n final Sound pitchSound=Sound.Sound_createSimple(\r\n 1, (double)samples.size() / SAMPLE_RATE, SAMPLE_RATE);\r\n for(int i=1; i < pitchSound.z[1].length; i++) {\r\n pitchSound.z[1][i]=samples.get(i - 1);\r\n }\r\n \r\n final SoundEditor editor=SoundEditor.SoundEditor_create(\"\", pitchSound);\r\n editor.pitch.floor=settings.floor;\r\n editor.pitch.ceiling=settings.ceiling;\r\n //editor.pitch.veryAccurate=1;\r\n \r\n if(DEBUG) System.err.print(\"analyzing \"+samples.size()+\" samples(\"\r\n +editor.pitch.floor+\"-\"+editor.pitch.ceiling+\")...\");\r\n final long start=System.nanoTime();\r\n try {\r\n editor.computePitch();\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n return;\r\n }\r\n if(DEBUG) System.err.println(\"complete in \"+(System.nanoTime()-start)/1000000.0+\"ms.\");\r\n \r\n \r\n //[ compute average pitch\r\n final java.util.List<Double> pitches=editor.getPitchesInFrequency();\r\n \r\n// diagram.clearData();\r\n// for(double s: pitches) {\r\n// diagram.addData((float)s); \r\n// }\r\n// diagram.setMaximum(500);\r\n// diagram.repaint();\r\n// \r\n double freqSum=0;\r\n int pitchCount=0;\r\n for(double p : pitches) {\r\n if(Double.isNaN(p) || p<=0) continue;\r\n freqSum+=p;\r\n pitchCount++;\r\n }\r\n final double averageFreq=freqSum/pitchCount; \r\n if(Double.isNaN(averageFreq)) {\r\n if(DEBUG) System.err.println(\"can't recognize.\");\r\n return;\r\n }\r\n//System.err.println(averageFreq); \r\n \r\n //[ compute length\r\n final double lengthMs=samples.size()*1000.0/SAMPLE_RATE;\r\n \r\n SwingUtilities.invokeLater(new Runnable() { //>>> not good\r\n public void run() {\r\n for(PitchListener lis: freqListener) {\r\n lis.gotPitch(averageFreq, lengthMs); //notify listeners\r\n }\r\n }\r\n });\r\n \r\n//System.err.println(\"add \"+ DumpReceiver.getKeyName((int) averagePitch));\r\n }",
"public static ArrayList<PitchCandidate> harmonicChecks(ArrayList<PitchCandidate> pitch_candidates, MelodicNote CF_note, Integer previous_cf_pitch,\n Integer previous_melody_pitch, MelodicNote fragment_note, int canon_transpose_interval ){\n Boolean large_dissonance_bad = InputParameters.large_dissonance_bad;\n Integer [] consonances = InputParameters.consonances;\n Integer [] perfect_consonances = InputParameters.perfect_consonances;\n Integer [] root_consonances = InputParameters.root_consonances;\n \n\n for (PitchCandidate myPC : pitch_candidates){\n\t\t\n Integer cand_pitch = myPC.getPitch() + canon_transpose_interval;\n Integer cf_pitch = CF_note.getPitch();\n boolean CF_accent = CF_note.getAccent();\n boolean use_CF_accent = false;\n if (CF_note.getRest()) cf_pitch = previous_cf_pitch;\n Integer cand_prev_pitch = previous_melody_pitch + canon_transpose_interval;\n //if(previous_melody_pitch == 9999) cand_prev_pitch = cand_pitch;// 9999 means the CP is held over to multiple cfs\n Integer melody_motion_to_cand = cand_pitch - cand_prev_pitch;\n int this_interval = abs(cand_pitch - cf_pitch)%12;\n int this_inv_interval = abs(cf_pitch - cand_pitch)%12;\n Integer melodic_motion_to_ = cf_pitch - previous_cf_pitch;\n Integer previous_interval = abs(cand_prev_pitch - previous_cf_pitch)%12;\n Integer previous_inv_interval = abs(previous_cf_pitch - cand_prev_pitch)%12;\n Double cp_start_time = fragment_note.getStartTime();\n Double cf_start_time = CF_note.getStartTime();\n Boolean directm = false;\n boolean this_interval_consonant = false;\n boolean this_inv_interval_consonant = false;\n boolean cand_prev_cf_diss = true;\n boolean inv_cand_prev_cf_diss = true;\n boolean previous_interval_consonant = false;\n boolean previous_inv_interval_consonant = false;\n \n //System.out.println(\"evaluating pitch candidate \" + cand_pitch + \" against \" + cf_pitch);\n //is this interval consonant\n for (Integer consonance : consonances) {\n if (this_interval == consonance){\n this_interval_consonant = true; \n break;\n }\n }\n for (Integer consonance : consonances) {\n if (this_inv_interval == consonance){\n this_inv_interval_consonant = true; \n break;\n }\n }\n\t \t\n \n if(this_interval_consonant && this_inv_interval_consonant) {\n //System.out.println(cand_pitch + \" against \" + cf_pitch + \"is consonant\");\n if (this_interval ==0) {//decrement if an octave\n myPC.decrementRank(Decrements.octave);\n }\n }\n \n else {\n //System.out.println(cand_pitch + \" against \" + cf_pitch + \"is dissonant\");\n myPC.decrementRank(Decrements.dissonance);\n\t\t//decrement if a minor 9th\n if (this_interval == 1 && (abs(cand_pitch - cf_pitch)<14 || large_dissonance_bad)){\n myPC.decrementRank(Decrements.minor_9th);\n myPC.set_minor_9th();\n }\n if (this_inv_interval == 1 && (abs(cf_pitch - cand_pitch)<14 || large_dissonance_bad)){\n myPC.decrementRank(Decrements.minor_9th);\n myPC.set_minor_9th();\n }\n //decrement accented dissonance\n if (CF_note.getStartTime() > fragment_note.getStartTime())\n use_CF_accent = true;\n \n if (!use_CF_accent) {\n if (fragment_note.getAccent() && (abs(cand_pitch - cf_pitch)<36 || large_dissonance_bad)) {\n //System.out.println(\"caught accented dissoance\");\n myPC.decrementRank(Decrements.accented_dissonance);\n myPC.set_accent_diss();\n }\n if (fragment_note.getAccent() && (abs(cf_pitch - cand_pitch)<36 || large_dissonance_bad)) {\n //System.out.println(\"caught accented dissoance\");\n myPC.decrementRank(Decrements.accented_dissonance);\n myPC.set_accent_diss();\n } \n }\n else {\n if (CF_note.getAccent() && (abs(cand_pitch - cf_pitch)<36 || large_dissonance_bad)) {\n System.out.println(\"caught accented dissonance between cand pitch \" + cand_pitch + \" and cf_pitch \" + cf_pitch);\n myPC.decrementRank(Decrements.accented_dissonance);\n myPC.set_accent_diss();\n }\n if (CF_note.getAccent() && (abs(cf_pitch - cand_pitch)<36 || large_dissonance_bad)) {\n System.out.println(\"caught accented dissonance between cand pitch \" + cand_pitch + \" and cf_pitch \" + cf_pitch);\n myPC.decrementRank(Decrements.accented_dissonance);\n myPC.set_accent_diss();\n }\n }\n\n }\n \n\t //check for pitch candidate dissonance against previous cantus firmus\n for (Integer consonance : consonances) {\n if (abs(cand_pitch - previous_cf_pitch)%12 == consonance) {\n\t\t cand_prev_cf_diss = false; \n }\n }\n for (Integer consonance : consonances) {\n if (abs(previous_cf_pitch - cand_pitch)%12 == consonance) {\n inv_cand_prev_cf_diss = false; \n }\n } \n if (cand_prev_cf_diss ||inv_cand_prev_cf_diss) {\n\t\tmyPC.decrementRank(Decrements.diss_cp_previous_cf);\n }\n\t\t\t\n //compute whether previous_interval consonant\n for (Integer consonance : consonances) {\n if (previous_interval == consonance) previous_interval_consonant = true;\n\t\tbreak;\n }\n for (Integer consonance : consonances) {\n if (previous_inv_interval == consonance) previous_inv_interval_consonant = true;\n\t\tbreak;\n }\n\t\t\t\n\t //check for same type of consonance\n if (previous_interval_consonant && (previous_interval == this_interval) ){\n\t\tmyPC.decrementRank(Decrements.seq_same_type_cons);\n }\n if (previous_inv_interval_consonant && (previous_inv_interval == this_inv_interval) ){\n\t\tmyPC.decrementRank(Decrements.seq_same_type_cons);\n } \n\t\t\t\n\t //check for sequence of dissonances\n if(!previous_interval_consonant && !this_interval_consonant) {\n\t\tmyPC.decrementRank(Decrements.seq_of_diss);\n\t\tif(this_interval == previous_interval ){\n myPC.decrementRank(Decrements.seq_same_type_diss);\n\t\t}\n }\n if(!previous_inv_interval_consonant && !this_inv_interval_consonant) {\n\t\tmyPC.decrementRank(Decrements.seq_of_diss);\n\t\tif(this_inv_interval == previous_inv_interval ){\n myPC.decrementRank(Decrements.seq_same_type_diss);\n\t\t}\n } \n\t\n //check for too long a sequence of same interval\n if (previous_interval == this_interval) {\n same_consonant_count++;\n if (same_consonant_count > same_consonant_threshold) {\n myPC.decrementRank(Decrements.seq_of_same_cons);\n } \n }\n\t else {\n\t\tsame_consonant_count =0;\n\t }\n if (previous_inv_interval == this_inv_interval) {\n same_inv_consonant_count++;\n if (same_inv_consonant_count > same_consonant_threshold) {\n myPC.decrementRank(Decrements.seq_of_same_cons);\n } \n }\n\t else {\n\t\tsame_inv_consonant_count =0;\n\t }\n\n\t\t\t\n\t //if CF starts before CP \n if (cp_start_time > cf_start_time){\n\t //the following checks rely on knowing motion to pitch candidate from previous pitch\n\t //check for a bad approach to a dissonance from a consonance\n\t //ie CP pitch approached by greater than a step\n if (previous_interval_consonant){\n if ((!this_interval_consonant || !this_inv_interval_consonant) && abs(melody_motion_to_cand) >2) {\n myPC.decrementRank(Decrements.bad_diss_approach_from_cons);\n } \n }\n //check for a bad approach to consonance from dissonance\n else if (this_interval_consonant || this_inv_interval_consonant){\n if (abs(melody_motion_to_cand) >2){\n myPC.decrementRank(Decrements.bad_cons_approach_from_diss);\n } \n }\n //check for bad approach to dissonance from dissonance\n else { //implies both this interval and previous are dissonant\n if (abs(melody_motion_to_cand) > 4){\n myPC.decrementRank(Decrements.bad_diss_approach_from_diss);\n } \n }\n }\n // If CP starts before CF\n else if (cp_start_time < cf_start_time) {\n\t\t// the following checks rely on knowing motion to CF pitch from previous CF pitch\n\t\t//check for bad motion into consonance from dissonance\n if (!previous_interval_consonant) {//ie Previous_Interval is dissonant\n if (this_interval_consonant || this_inv_interval_consonant) {\n if (abs(melodic_motion_to_) > 2) {\n myPC.decrementRank(Decrements.bad_cons_approach_from_diss);\n\t\t\t}\n }\n\t\t //check for bad motion into dissonance from dissonance\n else {\n if (abs(melodic_motion_to_) > 4){\n\t\t\t myPC.decrementRank(Decrements.bad_diss_approach_from_diss); \n }\n } \n }\n }\n\t // If CP and CF start at the same time\n else {\n //Check for parallel perfect consonances\n\t\tif((melody_motion_to_cand > 0 && melodic_motion_to_ >0) || (melody_motion_to_cand < 0 && melodic_motion_to_ <0) )\n\t\t directm = true;\n if (this_interval_consonant) {\n if (previous_interval_consonant)\t{\n if (this_interval == previous_interval ){\n myPC.decrementRank(Decrements.seq_same_type_cons);\n if (directm) {\n myPC.decrementRank(Decrements.parallel_perf_consonance);\n } \n }\n else {\n //check for direct motion into a perfect consonance\n if (directm ) {\n myPC.decrementRank(Decrements.direct_motion_perf_cons);\n }\n }\n }\n }\n if (this_inv_interval_consonant) {\n if (previous_inv_interval_consonant)\t{\n if (this_inv_interval == previous_inv_interval ){\n myPC.decrementRank(Decrements.seq_same_type_cons);\n if (directm) {\n myPC.decrementRank(Decrements.parallel_perf_consonance);\n } \n }\n else {\n //check for direct motion into a perfect consonance\n if (directm ) {\n myPC.decrementRank(Decrements.direct_motion_perf_cons);\n }\n }\n }\n } \n\t\t//check for motion into a dissonance\n else { //this interval is dissonant\n myPC.decrementRank(Decrements.motion_into_diss_both_voices_change);\n\t\t if (directm ) {\n\t\t\tmyPC.decrementRank(Decrements.direct_motion_into_diss);\n }\n }\n\n }\n } \n\treturn pitch_candidates;\n }",
"public static ArrayList<PitchCandidate> melodicCheck(ArrayList<PitchCandidate> pitch_candidates, ModeModule my_mode_module, MelodicVoice alter_me, \n Integer pitch_center, int voice_pitch_count, Integer previous_melody_pitch, Integer previous_melodic_interval, Boolean is_accent, Boolean prog_built) {\n Boolean large_dissonance_bad = InputParameters.large_dissonance_bad;\n Integer [] consonances = InputParameters.consonances;\n Integer [] perfect_consonances = InputParameters.perfect_consonances;\n Integer [] root_consonances = InputParameters.root_consonances;\n \n for (PitchCandidate myPC : pitch_candidates){\n int cand_pitch = myPC.getPitch();\n int melody_motion_to_cand = 0;\n \n //DEBUG\n //System.out.println(\"melodicCheck evaluating pitch candidate \" + cand_pitch);\n \n if (voice_pitch_count > 0) {\n melody_motion_to_cand = cand_pitch - previous_melody_pitch;\n \n \n //Check if The candidate has already followed the preceding pitch too often. \n //look for previous_melody_pitch in PitchCount\n //if it's there get how many times it's appeared in the melody\n // if the count is greater than samplesize threshold\n //check if there are previous_melody_pitch to pitch_candidate motions in MOtion Counts\n //if so get the motion count - then divide motion count by pitch count\n // get the percentage of motions from mode module\n //if actual count is greater than mode module percentage decrement\n\t\t\t\t\n double thresh = 0;\n\t\t\t\tDouble threshornull = my_mode_module.getMelodicMotionProbability(cand_pitch, previous_melody_pitch, key_transpose, 0);\n\t\t\t\tif (threshornull == null){\n //DEBUG\n //System.out.println(\"From mode module motion probability of \" + previous_melody_pitch %12 +\" to \" + cand_pitch%12 + \" is NULL\");\n myPC.decrementRank(Decrements.melodic_motion_quota_exceed);\n myPC.decrementRank(Decrements.improbable_melodic_motion);\n }\n else {\n thresh = threshornull;\n //DEBUG\n //System.out.println(\"From mode module, motion probability of \" + previous_melody_pitch%12 +\" to \" + cand_pitch%12 + \" = \" + thresh );\n }\n for (PitchCount my_pitch_count: pitch_counts) {\n if(my_pitch_count.getPitch() == previous_melody_pitch%12)\n\t\t\t\t\t\t//DEBUG\n //System.out.println(\"found preceding cp pitch \" + previous_melody_pitch%12 +\" in pitch counts with count \" + my_pitch_count.getCount());\n if(my_pitch_count.getCount() > sample_size) \n for (MotionCount my_motion_count: motion_counts){\n //DEBUG\n //System.out.println(\"pitch_count for \" + previous_melody_pitch %12 + \" = \" + my_pitch_count.getCount());\n //System.out.println(\"motion count for \" + my_motion_count.getPreviousPitch() + \"/\" + my_motion_count.getSucceedingPitch() + \"=\"+ my_motion_count.getCount());\n if (my_motion_count.getPreviousPitch()== previous_melody_pitch %12 && my_motion_count.getSucceedingPitch() == cand_pitch %12) {\n double actual = my_motion_count.getCount()/(double)my_pitch_count.getCount();\n //DEBUG\n //System.out.println(\"found \" + my_motion_count.getCount() + \" instances of motion from \" + previous_melody_pitch %12 + \" to \" +cand_pitch %12 );\n //System.out.println(\"frequency of motion from \" + previous_melody_pitch %12 + \" to \" + cand_pitch%12 + \" = \" + actual); \n if (actual >= thresh) {\n myPC.decrementRank(Decrements.melodic_motion_quota_exceed);\n //DEBUG\n //System.out.println(cand_pitch %12 + \" is approached too often from \" + previous_melody_pitch %12);\n }\n }\n }\n }\n }\n \n if (voice_pitch_count > 1){\n // Peak/Trough check\n // a melodic phrase should have no more than two peaks and two troughs\n // a peak is defined as a change in melodic direction \n // so when a candidate pitch wants to go in the opposite direction of \n // the previous melodic interval we want to increment the peak or trough count accordingly\n // and determine whether we have more than two peaks or more than two troughs\n // note that the melody can always go higher or lower than the previous peak or trough\n\n if (previous_melodic_interval < 0 && melody_motion_to_cand > 0 ) {// will there be a change in direction from - to + ie trough?\n if (previous_melody_pitch == trough && trough_count >=2) {\n myPC.decrementRank(Decrements.peak_trough_quota_exceed);\n //DEBUG\n //System.out.println(previous_melody_pitch + \" duplicates previous peak\");\n } //will this trough = previous trough? then increment\n } \n if (previous_melodic_interval > 0 && melody_motion_to_cand <0){ // will there be a trough?\n if (previous_melody_pitch == peak && peak_count >=2) {\n myPC.decrementRank(Decrements.peak_trough_quota_exceed);\n //DEBUG\n //System.out.println(previous_melody_pitch + \" duplicates previous trough\");\n } //will this trough = previous trough? then increment\n }\n\t\t\t\t\n //Motion after Leaps checks\n //First check if the melody does not go in opposite direction of leap\n // then check if there are two successive leaps in the same direction\n if (previous_melodic_interval > 4 && melody_motion_to_cand > 0){\n myPC.decrementRank(Decrements.bad_motion_after_leap);\n //DEBUG\n //System.out.println(melody_motion_to_cand + \" to \"+ cand_pitch + \" is bad motion after leap\");\n if (melody_motion_to_cand > 4) {\n myPC.decrementRank(Decrements.successive_leaps);\n //DEBUG\n //System.out.println(cand_pitch + \" is successive leap\");\n }\n \n } \n if (previous_melodic_interval < -4 && melody_motion_to_cand < 0){\n myPC.decrementRank(Decrements.bad_motion_after_leap);\n //DEBUG\n //System.out.println(melody_motion_to_cand + \" to \"+cand_pitch + \" is bad motion after leap\");\n if (melody_motion_to_cand < -4) {\n myPC.decrementRank(Decrements.successive_leaps); \n //DEBUG\n //System.out.println(cand_pitch + \" is successive leap\");\n }\n\n } \n } \n // end melody checks\n } //next pitch candidate\n return pitch_candidates; \n }",
"@Override\n\tpublic void handlePitch(PitchDetectionResult pitchDetectionResult, AudioEvent audioEvent) {\n\t\tif(pitchDetectionResult.getPitch() != -1){\n\t\t\tdouble timeStamp = audioEvent.getTimeStamp();\n\t\t\tfloat pitch = pitchDetectionResult.getPitch();\n\t\t\tpitch *= 2; // Because of bit of file\n\t\t\tfloat probability = pitchDetectionResult.getProbability();\n\t\t\tdouble rms = audioEvent.getRMS() * 100;\n\t\t\tint pMinute = (int) (timeStamp/60);\n\t\t\tint pSecond = (int) (timeStamp%60);\n\t\t\tint intvNum = -1;\n\t\t\tString tInterval = new String();\n \n\t\t\tif(pitch >= 127.142 && pitch < 134.702) {\n\t\t\t\ttInterval = \"C3\";\n\t\t\t\tintvNum = 1;\n\t\t\t}\n\t\t\telse if(pitch >= 134.702 && pitch < 142.712) {\n\t\t\t\ttInterval = \"C3#\";\n\t\t\t\tintvNum = 2;\n\t\t\t}\n\t\t\telse if(pitch >= 142.712 && pitch < 151.198) {\n\t\t\t\ttInterval = \"D3\";\n\t\t\t\tintvNum=3;\n\t\t\t}\n\t\t\telse if(pitch >= 151.198 && pitch < 160.189) {\n\t\t\t\ttInterval = \"D3#\";\n\t\t\t\tintvNum=4;\n\t\t\t}\n\t\t\telse if(pitch >= 160.189 && pitch < 169.714) {\n\t\t\t\ttInterval = \"E3\";\n\t\t\t\tintvNum=5;\n\t\t\t}\n\t\t\telse if(pitch >= 169.714 && pitch < 179.806) {\n\t\t\t\ttInterval = \"F3\";\n\t\t\t\tintvNum=6;\n\t\t\t}\n\t\t\telse if(pitch >= 179.806 && pitch < 190.497) {\n\t\t\t\ttInterval = \"F3#\";\n\t\t\t\tintvNum=7;\n\t\t\t}\n\t\t\telse if(pitch >= 190.497 && pitch < 201.825) {\n\t\t\t\ttInterval = \"G3\";\n\t\t\t\tintvNum=8;\n\t\t\t}\n\t\t\telse if(pitch >= 201.825 && pitch < 213.826) {\n\t\t\t\ttInterval = \"G3#\";\n\t\t\t\tintvNum=9;\n\t\t\t}\n\t\t\telse if(pitch >= 213.826 && pitch < 226.541) {\n\t\t\t\ttInterval = \"A3\";\n\t\t\t\tintvNum=10;\n\t\t\t}\n\t\t\telse if(pitch >= 226.541 && pitch < 240.012) {\n\t\t\t\ttInterval = \"A3#\";\n\t\t\t\tintvNum=11;\n\t\t\t}\n\t\t\telse if(pitch >= 240.012 && pitch < 254.284) {\n\t\t\t\ttInterval = \"B3\";\n\t\t\t\tintvNum=12;\n\t\t\t}\n\t\t\telse if(pitch >= 254.284 && pitch < 269.404) {\n\t\t\t\ttInterval = \"C4\";\n\t\t\t\tintvNum=13;\n\t\t\t}\n\t\t\telse if(pitch >= 269.404 && pitch < 287.924) {\n\t\t\t\ttInterval = \"C4#\";\n\t\t\t\tintvNum=14;\n\t\t\t}\n\t\t\telse if(pitch >= 287.294 && pitch < 302.396) {\n\t\t\t\ttInterval = \"D4\";\n\t\t\t\tintvNum=15;\n\t\t\t}\n\t\t\telse if(pitch >= 302.396 && pitch < 320.377) {\n\t\t\t\ttInterval = \"D4#\";\n\t\t\t\tintvNum=16;\n\t\t\t}\n\t\t\telse if(pitch >= 320.377 && pitch < 339.428) {\n\t\t\t\ttInterval = \"E4\";\n\t\t\t\tintvNum=17;\n\t\t\t}\n\t\t\telse if(pitch >= 339.428 && pitch < 359.611) {\n\t\t\t\ttInterval = \"F4\";\n\t\t\t\tintvNum=18;\n\t\t\t}\n\t\t\telse if(pitch >= 359.611 && pitch < 380.995) {\n\t\t\t\ttInterval = \"F4#\";\n\t\t\t\tintvNum=19;\n\t\t\t}\n\t\t\telse if(pitch >= 380.995 && pitch < 403.65) {\n\t\t\t\ttInterval = \"G4\";\n\t\t\t\tintvNum=20;\n\t\t\t}\n\t\t\telse if(pitch >= 403.65 && pitch < 427.652) {\n\t\t\t\ttInterval = \"G4#\";\n\t\t\t\tintvNum=21;\n\t\t\t}\n\t\t\telse if(pitch >= 427.652 && pitch < 453.082) {\n\t\t\t\ttInterval = \"A4\";\n\t\t\t\tintvNum=22;\n\t\t\t}\n\t\t\telse if(pitch >= 453.082 && pitch < 480.234) {\n\t\t\t\ttInterval = \"A4#\";\n\t\t\t\tintvNum=23;\n\t\t\t}\n\t\t\telse if(pitch >= 480.234 && pitch < 508.567) {\n\t\t\t\ttInterval = \"B4\";\n\t\t\t\tintvNum=24;\n\t\t\t}\n\t\t\telse if(pitch >= 508.567 && pitch < 538.808) {\n\t\t\t\ttInterval = \"C5\";\n\t\t\t\tintvNum=25;\n\t\t\t}\n\t\t\telse if(pitch >= 538.808 && pitch < 570.847) {\n\t\t\t\ttInterval = \"C5#\";\n\t\t\t\tintvNum=26;\n\t\t\t}\n\t\t\telse if(pitch >= 570.847 && pitch < 604.792) {\n\t\t\t\ttInterval = \"D5\";\n\t\t\t\tintvNum=27;\n\t\t\t}\n\t\t\telse if(pitch >= 604.792 && pitch < 640.755) {\n\t\t\t\ttInterval = \"D5#\";\n\t\t\t\tintvNum=28;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttInterval = \"null\";\n\t\t\t\tintvNum=-1;\n\t\t\t}\n \t\n\t\t\t\n\t\t\t//Converting Ended\n\t\t\tif(pitch < 8000 && probability > 0.85) {\n\t\t\t\tString message = String.format(\"Pitch detected at %d 분 %d초, %.2f: %.2fHz ( %.2f probability, RMS: %.5f ) %s\", \n\t\t\t\t\t\tpMinute, pSecond, timeStamp, pitch,probability,rms,tInterval);\n\t\t\t\t// System.out.println(message);\n\t\t\t\tif(tried == 0) {\n\t\t\t\t\tCalculateScore.startTime.add(timeStamp);\n\t\t\t\t\tCalculateScore.endTime.add(timeStamp);\n\t\t\t\t\tCalculateScore.subInterval1.add(intvNum);\n\t\t\t\t\tCalculateScore.subInterval2.add(intvNum);\n\t\t\t\t\tCalculateScore.realInterval.add(null);\n\t\t\t\t\ttried++;\n\t\t\t\t}\n\t\t\t\telse if(((CalculateScore.subInterval1.get(idx)) - intvNum) == 0 || Math.abs(((CalculateScore.subInterval1.get(idx)) - intvNum)) == 1) {\n\t\t\t\t\tCalculateScore.endTime.set(idx, timeStamp);\n\t\t\t\t\tCalculateScore.subInterval2.set(idx, intvNum);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tCalculateScore.endTime.set(idx, timeStamp);\n\t\t\t\t\tCalculateScore.startTime.add(timeStamp);\n\t\t\t\t\tCalculateScore.endTime.add(timeStamp);\n\t\t\t\t\tCalculateScore.subInterval1.add(intvNum);\n\t\t\t\t\tCalculateScore.subInterval2.add(intvNum);\n\t\t\t\t\tCalculateScore.realInterval.add(null);\n\t\t\t\t\tidx++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}",
"public void initPeriodsSearch() {\n\n\t\t//init fundamentalFreq\n\t\tcalculatefundamentalFreq();\n\n\t\t//set the first search area\n\t\tfinal double confidenceLevel = 5 / 100.;\n\t\tnextPeriodSearchingAreaEnd = (int) Math.floor( hzToPeriod( fundamentalFreq ) * ( 1 + confidenceLevel ) );\n\t}",
"protected void treatSpeakers()\n\t{\n\t\tint nHP = (Integer) results[0];\n\t\tdouble Xdist = (Double)results[1];\n\t\tdouble Ydist = (Double)results[2];\n\t\tdouble shift = (Double)results[3];\n\t\tfloat height = (Float) results[4];\n\t\tint numHP1 = (Integer) results[5];\n\t\tboolean stereoOrder = (Boolean)results[6];\n\t\tint lastHP = (replace ? 0 : gp.speakers.size()-1);\n\t\tint numHP;\n\t\tint rangees = (nHP / 2);\n\t\tfloat X, Y;\n\t\tif(replace) gp.speakers = new Vector<HoloSpeaker>(nHP);\n\t\tnumHP1 = (evenp(nHP) ? numHP1 : 1 + numHP1);\n\t\t// Creation des HPs en fonction de ces parametres\n\t\tfor (int i = 1; i <= rangees; i++)\n\t\t\t{\n\t\t\t\t// on part du haut a droite, on descend puis on remonte\n\t\t\t\t\n\t\t\t\tX = (float) (-Xdist);\n\t\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5) - (Ydist * (i - 1)));\n\t\t\t\tif(stereoOrder)\n\t\t\t\t\tnumHP = numHP1+(i-1)*2;\n\t\t\t\telse\n\t\t\t\t\tnumHP = (numHP1 + rangees + rangees - i) % nHP + 1;\n\t\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t\t\t\n\t\t\t\tX = (float) (Xdist);\n\t\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5) - (Ydist * (i - 1)));\n\t\t\t\tif(stereoOrder)\n\t\t\t\t\tnumHP = numHP1+(i-1)*2+1;\n\t\t\t\telse\n\t\t\t\t\tnumHP = (numHP1 + i - 1) % nHP + 1;\n\t\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t\t\tinc();\n\t\t\t}\n\n\t\t\tif (!evenp(nHP))\n\t\t\t{\n\t\t\tX = 0;\n\t\t\tY = (float) (shift + (Ydist * (rangees - 1) * 0.5));\n\t\t\tnumHP = ((numHP1 - 1) % nHP) + 1;\n\t\t\tgp.speakers.add(new HoloSpeaker(X, Y, height, numHP+lastHP,-1));\n\t\t}\n\t}",
"public void updatePredictions (long currTime, TimeSeries inputSeries)\n {\n\n// TODO: decide if this is necessary, it's in PPALg >>\n this.state.clearPredictionsFrom (currTime + stepSize);\n//this.state.clearPredictions();\n\n TimeSeries timeSeries = (TimeSeries) inputSeries.clone();\n\n // if timeSeries is shorter than the minimum stream do nothing.\n if (timeSeries.size() < minStreamLength)\n return;\n\n // trim the first <minPeriod> number of elements from the timeSeries.\n // this removes non-periodicity that is seen in simulators first few elements.\n\n timeSeries.trimFromStart(minPeriodLength);\n\n df.addText (\"First trim of time series : \" + timeSeries.shortToString());\n\n // find the best shift of the time series against iteself that leads to the most matching\n ArrayList shiftGraph = findBestShiftGraph (timeSeries);\n\n // trim the shifted graph to make sure we aren't starting in the middle of an event\n int amountTrimmed = trimShiftGraph (shiftGraph);\n\n df.addText (\"Trim amount : \" + amountTrimmed);\n df.addText (\"final, trimmed shift graph : \" + shiftGraph.toString());\n\n // the offset is the total amount of the time series we have discarded, it is the offset\n // to the leading edge of a periodic repeating occurence\n int offset = amountTrimmed + minPeriodLength;\n\n // create a new periodic event object\n PeriodicEvent pe = getPeriod (shiftGraph, offset);\n\n if (pe == null || pe.getEvent().isEmpty())\n {\n df.addText (\" Periodic event is null \");\n return;\n }\n\n df.addText (\" Periodic Event is : \" + pe.toString());\n\n // get the current time from which we will extrapolate\n long time = currTime;\n\n int period = pe.getPeriod();\n ArrayList event = pe.getEvent();\n\n // if we divide the timeSeries into portions the size of the time period, how much is left over?\n // for this we do not consider the trimmed amount.\n int timeSeriesSize = timeSeries.size() - amountTrimmed;\n\n if (timeSeriesSize <= period)\n return;\n int remainder = getRemainder (timeSeriesSize, period);\n df.addText (\"remainder is : \" + remainder);\n\n // cycle through the remaining portion of the last period adding any predictions based on\n // our periodic event that we have identified.\n // must subtract 1 since index is zero-base, & reaminder is one-based\n for (int i = remainder -1 ; i < event.size(); i++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (i >= 0 && event.get (i) != null)\n {\n prediction = ((Double) event.get(i)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (i)\n\n int extrapolationCount = 2;\n\n // We make <j> additional extapolation into the future beyond the last period fragment\n while (extrapolationCount > 0)\n {\n for (int j = 0; j < event.size(); j++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (event.get (j) != null)\n {\n prediction = ((Double) event.get(j)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (j)\n\n extrapolationCount--;\n } // end while (extapoliationCount)\n\n\n state.updateError (timeSeries, currTime);\n }",
"public List<Period> getPeriods() throws PeriodNotFoundException;",
"public java.util.List<org.drip.analytics.cashflow.CompositePeriod> periods()\n\t{\n\t\treturn _lsPeriod;\n\t}",
"@Override\n\tpublic List<AppointmentDto> getAllAppointmentHavingPitch() {\n\t\t// TODO Auto-generated method stub\n\t\ttry{\n\t\t\treturn jdbcTemplate.query(FETCH_ALL_HAVING_PITCH, (rs, rownnum)->{\n\t\t\t\treturn new AppointmentDto(rs.getInt(\"appointmentId\"), rs.getTime(\"startTime\"), rs.getTime(\"endTime\"), rs.getDate(\"date\"), rs.getInt(\"physicianId\"), rs.getInt(\"userId\"), rs.getInt(\"productId\"), rs.getString(\"confirmationStatus\"), rs.getString(\"zip\"), rs.getString(\"cancellationReason\"), rs.getString(\"additionalNotes\"), rs.getBoolean(\"hasMeetingUpdate\"),rs.getBoolean(\"hasMeetingExperienceFromSR\"),rs.getBoolean(\"hasMeetingExperienceFromPH\"), rs.getBoolean(\"hasPitch\"));\n\t\t\t});\n\t\t}catch(DataAccessException e){\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}",
"private synchronized void update() {\n nPoints++;\n int n = points.size();\n if (n < 1) {\n return;\n }\n PathPoint p = points.get(points.size() - 1); // take last point\n if (p.getNEvents() == 0) {\n return;\n }\n if (n > length) {\n removeOldestPoint(); // discard data beyond range length\n }\n n = n > length ? length : n; // n grows to max length\n float t = p.t - firstTimestamp; // t is time since cluster formed, limits absolute t for numerics\n st += t;\n sx += p.x;\n sy += p.y;\n stt += t * t;\n sxt += p.x * t;\n syt += p.y * t;\n// if(n<length) return; // don't estimate velocityPPT until we have all necessary points, results very noisy and send cluster off to infinity very often, would give NaN\n float den = (n * stt - st * st);\n if (den != 0) {\n valid = true;\n xVelocity = (n * sxt - st * sx) / den;\n yVelocity = (n * syt - st * sy) / den;\n } else {\n valid = false;\n }\n }",
"private Map<String, Integer> getPuntuation(List<Point> points, Trial trial){\n\t\t//Resultados de la prueba sin dividir por categorias\n\t\tList<Result> results = trial.getResults();\n\t\t//ordenar los resultados de la prueba por segundos\n\t\tresults.sort((a,b) -> a.getSeconds() < b.getSeconds() ? -1 : a.getSeconds() == b.getSeconds() ? 0 : 1);\n\t\t\n\t\treturn setPuntuation(points, results);\n\t}",
"public static ArrayList<ArrayList<Integer>> calculateInterval(ArrayList<String> inputPermutation, TreeMap<String, ArrayList<Integer>> binomialMap)\r\n {\r\n ArrayList<ArrayList<Integer>> intervalResult = new ArrayList<>();\r\n ArrayList<Integer> intervalForSinglePermutation = new ArrayList<>();\r\n if(inputPermutation.size() > 0)\r\n {\r\n for(int y=0; y<inputPermutation.size(); y++)\r\n { \r\n intervalForSinglePermutation = new ArrayList<>();\r\n List<String> singleNote = Arrays.asList(inputPermutation.get(y).split(\":\"));\r\n \r\n ArrayList<Integer> binomialFirstNote = binomialMap.get(singleNote.get(0));\r\n ArrayList<Integer> binomialSecondNote = binomialMap.get(singleNote.get(1));\r\n \r\n Integer pitchClassFirstNote = binomialFirstNote.get(0);\r\n Integer NameClassFirstNote = binomialFirstNote.get(1);\r\n\r\n Integer pitchClassSecondNote = binomialSecondNote.get(0);\r\n Integer NameClassSecondNote = binomialSecondNote.get(1);\r\n\r\n Integer firstElem = (pitchClassFirstNote-pitchClassSecondNote) < 0 ? ((pitchClassFirstNote-pitchClassSecondNote)+12)%12: (pitchClassFirstNote-pitchClassSecondNote)%12; \r\n Integer secondElem = (NameClassFirstNote-NameClassSecondNote) < 0 ? ((NameClassFirstNote-NameClassSecondNote)+7)%7: (NameClassFirstNote-NameClassSecondNote)%7;\r\n //System.out.println(\"Inside calculateInterval final result: <\"+firstElem+\",\"+secondElem+\">\");\r\n intervalForSinglePermutation.add(firstElem);\r\n intervalForSinglePermutation.add(secondElem);\r\n intervalResult.add(intervalForSinglePermutation);\r\n }\r\n //System.out.println(\"calculateInterval: \" + intervalResult);\r\n } \r\n return intervalResult;\r\n }",
"private long searchSPSandPPS()\n {\n ByteBuffer[] inputBuffers = encoder.getInputBuffers();\n ByteBuffer[] outputBuffers = encoder.getOutputBuffers();\n BufferInfo info = new BufferInfo();\n byte[] csd = new byte[128];\n int len = 0;\n int p = 4;\n int q = 4;\n long elapsed = 0;\n long now = timestamp();\n\n while (elapsed < 3000000 && (SPS == null || PPS == null))\n {\n // Some encoders won't give us the SPS and PPS unless they receive something to encode first...\n int bufferIndex = encoder.dequeueInputBuffer(1000000 / FRAMERATE);\n if (bufferIndex >= 0)\n {\n check(inputBuffers[bufferIndex].capacity() >= data.length, \"The input buffer is not big enough.\");\n inputBuffers[bufferIndex].clear();\n inputBuffers[bufferIndex].put(data, 0, data.length);\n encoder.queueInputBuffer(bufferIndex, 0, data.length, timestamp(), 0);\n }\n else\n {\n Log.e(TAG,\"No buffer available !\");\n }\n\n // We are looking for the SPS and the PPS here. As always, Android is very inconsistent, I have observed that some\n // encoders will give those parameters through the MediaFormat object (that is the normal behaviour).\n // But some other will not, in that case we try to find a NAL unit of type 7 or 8 in the byte stream outputed by the encoder...\n\n int index = encoder.dequeueOutputBuffer(info, 1000000 / FRAMERATE);\n\n if (index == MediaCodec.INFO_OUTPUT_FORMAT_CHANGED)\n {\n // The PPS and PPS should be there\n MediaFormat format = encoder.getOutputFormat();\n ByteBuffer spsb = format.getByteBuffer(\"csd-0\");\n ByteBuffer ppsb = format.getByteBuffer(\"csd-1\");\n SPS = new byte[spsb.capacity() - 4];\n spsb.position(4);\n spsb.get(SPS,0, SPS.length);\n PPS = new byte[ppsb.capacity() - 4];\n ppsb.position(4);\n ppsb.get(PPS,0, PPS.length);\n break;\n }\n else if (index == MediaCodec.INFO_OUTPUT_BUFFERS_CHANGED)\n {\n outputBuffers = encoder.getOutputBuffers();\n }\n else if (index >= 0)\n {\n len = info.size;\n if (len < 128)\n {\n outputBuffers[index].get(csd,0,len);\n if (len > 0 && csd[0] == 0 && csd[1] == 0 && csd[2] == 0 && csd[3] == 1)\n {\n // Parses the SPS and PPS, they could be in two different packets and in a different order\n //depending on the phone so we don't make any assumption about that\n while (p < len)\n {\n while (!(csd[p + 0] == 0 && csd[p + 1] == 0 && csd[p + 2] == 0 && csd[p + 3] == 1) && p + 3 < len)\n {\n p++;\n }\n\n if (p + 3 >= len)\n {\n p=len;\n }\n\n if ((csd[q] & 0x1F) == 7)\n {\n SPS = new byte[p - q];\n System.arraycopy(csd, q, SPS, 0, p - q);\n }\n else\n {\n PPS = new byte[p - q];\n System.arraycopy(csd, q, PPS, 0, p - q);\n }\n\n p += 4;\n q = p;\n }\n }\n }\n\n encoder.releaseOutputBuffer(index, false);\n }\n\n elapsed = timestamp() - now;\n }\n\n check(PPS != null && SPS != null, \"Could not determine the SPS & PPS.\");\n base64PPS = Base64.encodeToString(PPS, 0, PPS.length, Base64.NO_WRAP);\n base64SPS = Base64.encodeToString(SPS, 0, SPS.length, Base64.NO_WRAP);\n\n return elapsed;\n }",
"private ArrayList<double[]> generatePoints(int divisions) {\n\t\tArrayList<double[]> result = new ArrayList<double[]>();\n\t\tdouble[] weight = new double[Run.NUMBER_OF_OBJECTIVES];\n\t\t\n\t\tif (divisions != 0) {\n\t\t\tgenerateRecursive(result, weight, Run.NUMBER_OF_OBJECTIVES, divisions, divisions, 0);\n\t\t}\n\t\t\n\t\treturn result;\n\t}",
"private void updatePointsPosition() {\n\t\tfor (DataFromPointInfo dataFromPointInfo : fromPoints) {\n\t\t\tDataFromPoint fromPoint = dataFromPointInfo.fromPoint;\n\t\t\tfromPoint.setX((int) (getX() + this.getBounds().getWidth()\n\t\t\t\t\t+ HORIZONTAL_OFFSET));\n\t\t\tfromPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataFromPointInfo.yShift));\n\t\t}\n\t\tfor (DataToPointInfo dataToPointInfo : toPoints) {\n\t\t\tDataToPoint toPoint = dataToPointInfo.toPoint;\n\t\t\ttoPoint.setX((int) (getX() - HORIZONTAL_OFFSET));\n\t\t\ttoPoint.setY((int) (getY() + this.getRowHeight() / 2\n\t\t\t\t\t+ this.getRowHeight() * dataToPointInfo.yShift));\n\t\t}\n\t}",
"public void reviewExtractorPeriodicity() {\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"YYYY-MM-dd hh:mm:ss\");\r\n Iterator<String> it = ExtractorManager.hmExtractor.keySet().iterator();\r\n while (it.hasNext()) { //\r\n String next = it.next();\r\n DataObject dobj = null;\r\n\r\n try {\r\n \tdobj = ExtractorManager.datasource.fetchObjById(next);\r\n } catch (IOException ioex) {\r\n \tlog.severe(\"Error getting extractor definition\");\r\n }\r\n\r\n if (null == dobj) {\r\n \tExtractorManager.hmExtractor.remove(next);\r\n } else {\r\n \tPMExtractor extractor = ExtractorManager.hmExtractor.get(next);\r\n\r\n \tif (null != extractor && extractor.canStart()) {\r\n\t String lastExec = dobj.getString(\"lastExecution\");\r\n\t Date nextExecution = null;\r\n\t boolean extractorStarted = false;\r\n\r\n\t // Revisando si tiene periodicidad\r\n\t if (dobj.getBoolean(\"periodic\")) {\r\n\t \t\ttry {\r\n\t \t\t\tif (null != lastExec && !lastExec.isEmpty()) nextExecution = sdf.parse(lastExec);\r\n\t\t } catch (ParseException psex) {\r\n\t\t \t\tlog.severe(\"Error parsing execution date\");\r\n\t\t }\r\n\t\t \t\r\n\t\t \tif (null == nextExecution) {\r\n\t\t \t\textractor.start();\r\n\t\t \t\textractorStarted = true;\r\n\t\t \t} else {\r\n\t\t \t\ttry {\r\n\t\t\t \t\tlong tiempo = dobj.getLong(\"timer\");\r\n\t\t\t \tString unidad = dobj.getString(\"unit\");\r\n\t\t\t \tlong unitmilis = 0l;\r\n\t\r\n\t\t\t \tswitch(unidad) {\r\n\t\t\t \t\tcase \"min\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"h\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"d\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 24 * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t\tcase \"m\":\r\n\t\t\t \t\t\tunitmilis = tiempo * 30 * 24 * 60 * 60 * 1000;\r\n\t\t\t \t\t\tbreak;\r\n\t\t\t \t}\r\n\t\r\n\t\t\t \tif (unitmilis > 0) {\r\n\t\t\t \t\tunitmilis = unitmilis + nextExecution.getTime();\r\n\t\t\t \t\tif(new Date().getTime() > unitmilis) {\r\n\t\t\t extractor.start();\r\n\t\t\t extractorStarted = true;\r\n\t\t\t }\r\n\t\t\t \t}\r\n\t\t \t\t} catch (Exception ex) { //NFE\r\n\t\t \t\t\tlog.severe(\"Error getting extractor config data\");\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t\r\n\t\t \tif (extractorStarted) {\r\n\t\t \t\tdobj.put(\"lastExecution\", sdf.format(new Date()));\r\n\t\t \t\ttry {\r\n\t\t \t\t\tExtractorManager.datasource.updateObj(dobj);\r\n\t\t \t\t} catch(IOException ioex) {\r\n\t\t \t\t\tlog.severe(\"Error trying to update last execution date\");\r\n\t\t \t\t}\r\n\t\t \t}\r\n\t }\r\n\t }\r\n\t }\r\n }\r\n }",
"private synchronized void update() {\n int numberOfPoints = buffer.get(0).size();\n if (numberOfPoints == 0) return;\n\n for (int i = 0; i < getNumberOfSeries(); i++) {\n final List<Double> bufferSeries = buffer.get(i);\n final List<Double> dataSeries = data.get(i);\n dataSeries.clear();\n dataSeries.addAll(bufferSeries);\n bufferSeries.clear();\n }\n\n //D.info(SineSignalGenerator.this, \"Update triggered, ready: \" + getNumberOfSeries() + \" series, each: \" + data[0].length + \" points\");\n bufferIdx = 0;\n\n // Don't want to create event, just \"ping\" listeners\n setDataReady(true);\n setDataReady(false);\n }",
"public static void sortByPeriod() {\n\t\tArrayList<Student> sortedPeriod = new ArrayList<Student>();\n\t\tsortedPeriod = Main.students;\n\t\t//gather info\n\t\tSystem.out.println(\"Which period would you like to sort by?\");\n\t\tScanner periodChoiceIn = new Scanner(System.in);\n\t\tint periodChoice = periodChoiceIn.nextInt();\n\t\t//conditionals to sort proper period\n\t\t//each one calls the proper comparator class and sorts it, then prints out all the info\n\t\tif(periodChoice == 1){\n\t\t\tCollections.sort(sortedPeriod, new PeriodOneComparator());\n\t\t\tInputHelper.printAllStudentsAndInfo(sortedPeriod);\t\n\t\t}\n\t\telse if(periodChoice == 2) {\n\t\t\tCollections.sort(sortedPeriod, new PeriodTwoComparator());\n\t\t\tInputHelper.printAllStudentsAndInfo(sortedPeriod);\t\n\t\t}\n\t\telse if(periodChoice == 3) {\n\t\t\tCollections.sort(sortedPeriod, new PeriodThreeComparator());\n\t\t\tInputHelper.printAllStudentsAndInfo(sortedPeriod);\t\n\t\t}\n\t\telse{\n\t\t\tsortByPeriod();\n\t\t}\n\t\tMain.selectOption();\n\t}",
"protected int getNumberOfPeriods()\n {\n return 2;\n }",
"private void run() {\n List<Point> points = Arrays.asList(this.points);\n Collections.sort(points);\n for (int i=0; i < points.size(); i++) {\n Point p0 = points.get(i);\n List<Point> cp = new ArrayList<>(points); // clone\n Collections.sort(cp, p0.SLOPE_ORDER);\n for (int s=0, e; s < cp.size(); s=e) {\n for (e=s; e < cp.size() && p0.SLOPE_ORDER.compare(cp.get(s) , cp.get(e)) == 0; e++);\n if (e-s+1>= 4) {\n List<Point> r = new ArrayList<>(cp.subList(s, e));\n r.add(p0);\n Collections.sort(r);\n if (r.get(0).equals(p0)) {\n Point[] ret = r.toArray(new Point[e-s+1]);\n StdOut.println(this.toString(ret));\n this.drawLine(ret);\n }\n }\n }\n }\n }",
"private void calculatePID(float LoopTime){\n\n\n\t\t// Append to our data sets.\n\t\tdata.PID.integralData.add(data.PID.computedTarget - data.PID.target);\n\t\tdata.PID.derivativeData.add(data.PID.computedTarget);\n\n\t\t// Keep integralData and derivativeData from having an exceeding number of entries.\n\t\tif (data.PID.integralData.size() > data.PID.INTEGRAL_DATA_MAX_SIZE){\n\t\t\tdata.PID.integralData.remove(0);\n\t\t}\n\n\t\tif(data.PID.derivativeData.size() > data.PID.DERIVATIVE_DATA_MAX_SIZE){\n\t\t\tdata.PID.derivativeData.remove(0);\n\t\t}\n\n\t\t// Set our P, I, and D values.\n\t\t// `P` will be the computedTarget - target\n\t\tdata.PID.P = data.PID.computedTarget - data.PID.target;\n\n\t\t// `I` will be the average of the integralData (Cries softly at the lack of Java8 streams)\n\t\tfloat IntegralAverage = 0;\n\t\tfor(float value : data.PID.integralData){\n\t\t\tIntegralAverage += value;\n\t\t}\n\t\tdata.PID.I = IntegralAverage / data.PID.integralData.size();\n\n\t\t// `D` will be the difference of the computedTarget and the Derivative average divided by\n\t\t// the time since the last loop in seconds multiplied by one plus half of the size of\n\t\t// the Derivative data set size.\n\t\tfloat DerivativeAverage = 0;\n\t\tfor(float value : data.PID.derivativeData){\n\t\t\tDerivativeAverage += value;\n\t\t}\n\t\tDerivativeAverage /= data.PID.derivativeData.size();\n\n\t\tdata.PID.D = (data.PID.computedTarget - DerivativeAverage) / ((LoopTime/1000) * (1 + (data.PID.derivativeData.size() / 2)));\n\t}",
"double getPeriod();",
"private Map<SODPosition, Integer> updateSODPositions() {\n Map<SODPosition, Integer> sodPositionsWithDelta = new HashMap<>();\n // This will hold all instruments that have associated transactions\n // this is neede at the end to carry forward SOD transaction on which\n // no transactions have come.\n Set<String> instrumentsProcessed = new HashSet<>();\n for (Transaction transaction : transactions) {\n List<SODPosition> positions = sodPositions.get(transaction.getInstrument());\n instrumentsProcessed.add(transaction.getInstrument());\n if (TransactionType.B.equals(transaction.getTranscationType())) {\n for (SODPosition position : positions) {\n if (AccountType.E.equals(position.getAccountType())) {\n LOGGER.debug(\"Processing Transaction Buy for Account Type E with account ID = \" + position.getAccount() + \" and instrument = \" + position.getInstrument());\n position.setQuantity(position.getQuantity() + transaction.getQuantity());\n sodPositionsWithDelta = populateDeltaMap(sodPositionsWithDelta, position, transaction.getQuantity());\n } else {\n LOGGER.debug(\"Processing Transaction Buy for Account Type I with account ID = \" + position.getAccount() + \" and instrument = \" + position.getInstrument());\n position.setQuantity(position.getQuantity() - transaction.getQuantity());\n sodPositionsWithDelta = populateDeltaMap(sodPositionsWithDelta, position, (transaction.getQuantity() * -1));\n }\n }\n } else {\n for (SODPosition position : positions) {\n if (AccountType.E.equals(position.getAccountType())) {\n LOGGER.debug(\"Processing Transaction Sell for Account Type E with account ID = \" + position.getAccount() + \" and instrument = \" + position.getInstrument());\n position.setQuantity(position.getQuantity() - transaction.getQuantity());\n sodPositionsWithDelta = populateDeltaMap(sodPositionsWithDelta, position, (transaction.getQuantity() * -1));\n } else {\n LOGGER.debug(\"Processing Transaction Sell for Account Type I with account ID = \" + position.getAccount() + \" and instrument = \" + position.getInstrument());\n position.setQuantity(position.getQuantity() + transaction.getQuantity());\n sodPositionsWithDelta = populateDeltaMap(sodPositionsWithDelta, position, transaction.getQuantity());\n }\n }\n }\n }\n\n /*\n Populate sodPositions with the positions on which there were no transactions\n */\n for (Map.Entry<String, ArrayList<SODPosition>> entry : sodPositions.entrySet()) {\n if (!instrumentsProcessed.contains(entry.getKey())) {\n for (SODPosition value : entry.getValue()) {\n sodPositionsWithDelta.put(value, 0);\n }\n }\n }\n return sodPositionsWithDelta;\n }",
"public void setPitch(float pitch) {\n\t\talSourcef(musicSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(reverseSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(flangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(distortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(distortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t}",
"int getPeriod();",
"public List<IPos> getCurvePoints() {\n\t\t// Create the array ready to hold all the points\n\t\t@SuppressWarnings(\"rawtypes\")\n\t\tList<IPos> points = new ArrayList<IPos>();\n\t\tif (segmentCount > 1) {\n\t\t\t// Get the influencing points, from simple tests 1/3rd the ditance to the next\n\t\t\t// point at the incoming angle seems to work fine.\n\t\t\tstartInfluencePoint = calculateInfluencingPoint(start, influenceDistance, startAngle);\n\t\t\tendInfluencePoint = calculateInfluencingPoint(end, influenceDistance, endAngle);\n\t\t\t// Once those points are removed, remember to change the rail as well or the\n\t\t\t// data will be wrong\n\n\t\t\t// Add the sub points that will create the bend\n\t\t\tfor (int i = 1; i <= segmentCount; i++) {\n\t\t\t\tfloat t = i / (segmentCount + 1f);\n\t\t\t\tfloat x = getCurveValue(start.x(), startInfluencePoint.x(), end.x(), endInfluencePoint.x(), t);\n\t\t\t\tfloat z = getCurveValue(start.z(), startInfluencePoint.z(), end.z(), endInfluencePoint.z(), t);\n\t\t\t\tfloat y = start.y() + ((end.y() - start.y()) * t);\n\t\t\t\tpoints.add(new Pos(x, y, z));\n\t\t\t\t// TODO we could use a lambda expression to create an add directly to the host\n\t\t\t\t// allowing more reusablity\n\t\t\t}\n\n\t\t}\n\t\treturn points;\n\t}",
"public List<Velocity> getVelocitiesForLevel() {\n List<Velocity> listOfVelocities = new ArrayList<>();\n String velocities = this.map.get(\"ball_velocities\");\n // create an array of velocities\n String[] listOfVelocitiesString = velocities.split(\" \");\n int size = listOfVelocitiesString.length;\n // run over all of the possible velocities\n for (int i = 0; i < size; i++) {\n // in every velocity split it to speed and angel\n String[] oneVel = listOfVelocitiesString[i].split(\",\");\n Velocity v = Velocity.fromAngleAndSpeed(Integer.parseInt(oneVel[0]), Integer.parseInt(oneVel[1]));\n // add the veloctiy to the list of velocities\n listOfVelocities.add(v);\n }\n return listOfVelocities;\n }",
"private void getOriginalAndPedalData(List<Point> originalList) {\n\t\tfor (int i = 0; i < originalList.size() - 1; i++) {\n\t\t\tPoint point = (Point) originalList.get(i);\n\t\t\tPoint pedalPoint = getSpecificPedalByPoint(point);\n\t\t\t// int result = getVectorValue(pedalPoint, point, (Point) originalList.get(i + 1));\n\t\t\t\n\t\t\tdouble tmp = getDistance(point, pedalPoint);\n\t\t\t// double tmp = getHeightDistance(point, pedalPoint);\n\t\t\t\n\t\t\tthis.countM++;\n\t\t\t\n\t\t\tthis.aij += tmp;\n\t\t\tthis.dij += tmp;\n\t\t\tthis.sij += Math.abs(tmp - (this.aij / this.countM));\n\t\t}\n\t}",
"public List<List<ChartProcedure>> viewUpcomingChartProcedures() {\r\n\r\n\t\tSet<AppliedChart> charts = instance.getAppliedCharts();\r\n\r\n\t\tList<List<ChartProcedure>> procedures = new ArrayList<List<ChartProcedure>>();\r\n\r\n\t\t/*\r\n\t\tfor (AppliedChart appliedChart : charts) {\r\n\t\t\tDate beginDate = appliedChart.getDateCreated();\r\n\t\t\t\r\n\t\t\tList<ChartProcedure> proceduresOfType = new ArrayList<ChartProcedure>();\r\n\r\n\t\t\tSet<ChartItem> items = appliedChart.getChart().getChartItems();\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tfor (ChartItem chartItem : items) {\r\n\t\t\t\t\r\n\t\t\t\tint duration = chartItem.getDuration();\r\n\r\n\t\t\t\tfor (int i = 0; i < 5; i++) {\r\n\t\t\t\t\tChartProcedure procedure = new ChartProcedure();\r\n\t\t\t\t\tDateTime dt = new DateTime();\r\n\t\t\t\t\tprocedure.setDueDate(dt.plusMinutes((int) (duration * i\r\n\t\t\t\t\t\t\t* chartItem.getFrequencyPeriod().getValue())).toDate());\r\n\t\t\t\t\tprocedure.setPatient(instance);\r\n\t\t\t\t\t\r\n\t\t\t\t\tprocedure.setChartItem(chartItem);\r\n\t\t\t\t\tproceduresOfType.add(procedure);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tprocedures.add(proceduresOfType);\r\n\t\t}\r\n\t\t*/\r\n\t\treturn procedures;\r\n\t}",
"@Override // com.google.android.exoplayer2.source.AbstractConcatenatedTimeline\n public int getChildIndexByPeriodIndex(int i) {\n return Util.binarySearchFloor(this.sourcePeriodOffsets, i, true, false) + 1;\n }",
"public int[] convertLiveData(int[] points, String stringBuffer) {\n\t\tString[] dataArray = StringHelper.splitString(stringBuffer, \"\\r\", \"\\n\");\n\t\tfor (int i=2; i < dataArray.length; i++) {\n\t\t\t//0=VoltageRx, 1=Voltage, 2=Current, 3=Capacity, 4=Power, 5=Energy, 6=CellBalance, 7=CellVoltage1, 8=CellVoltage2, 9=CellVoltage3, \n\t\t\t//10=CellVoltage4, 11=CellVoltage5, 12=CellVoltage6, 13=Revolution, 14=Efficiency, 15=Height, 16=Climb, 17=ValueA1, 18=ValueA2, 19=ValueA3,\n\t\t\t//20=AirPressure, 21=InternTemperature, 22=ServoImpuls In, 23=ServoImpuls Out, \n\t\t\ttry {\n\t\t\t\tswitch (i) {\n\t\t\t\tcase 2: // 0.00A -3.4m\n\t\t\t\t\tpoints[2] = (int) (Double.parseDouble(dataArray[i].split(\"A\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[15] = (int) (Double.parseDouble(dataArray[i].split(\"A\")[1].split(\"m\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3: // 16.23V +0.1m/s\n\t\t\t\t\tpoints[1] = (int) (Double.parseDouble(dataArray[i].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[16] = (int) (Double.parseDouble(dataArray[i].split(\"V\")[1].split(\"m\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4: // 0W 0rpm\n\t\t\t\t\tpoints[4] = (int) (Double.parseDouble(dataArray[i].split(\"W\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[13] = (int) (Double.parseDouble(dataArray[i].split(\"W\")[1].split(\"r\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5: // 0mAh 0.00VRx\n\t\t\t\t\tpoints[3] = (int) (Double.parseDouble(dataArray[i].split(\"m\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[0] = (int) (Double.parseDouble(dataArray[i].split(\"h\")[1].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6: // 0Wmin \n\t\t\t\t\tpoints[5] = (int) (Double.parseDouble(dataArray[i].split(\"W\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 7: // 0us -> |0us\n\t\t\t\t\tpoints[22] = (int) (Double.parseDouble(dataArray[i].split(\"us\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[23] = (int) (Double.parseDouble(dataArray[i].split(\"us\")[1].replace(\"|\", \"\").substring(3).trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 10: // 4.04V1 4.05V2\n\t\t\t\t\tpoints[7] = (int) (Double.parseDouble(dataArray[i].split(\"V1\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[8] = (int) (Double.parseDouble(dataArray[i].split(\"V1\")[1].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 11: // 4.05V3 4.08V4\n\t\t\t\t\tpoints[9] = (int) (Double.parseDouble(dataArray[i].split(\"V3\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[10] = (int) (Double.parseDouble(dataArray[i].split(\"V3\")[1].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 12: // 0.00V5 0.00V6\n\t\t\t\t\tpoints[11] = (int) (Double.parseDouble(dataArray[i].split(\"V5\")[0].trim()) * 1000.0);\n\t\t\t\t\tpoints[12] = (int) (Double.parseDouble(dataArray[i].split(\"V5\")[1].split(\"V\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 13: // A1 0.6mV\n\t\t\t\t\tString tmpValueA1 =dataArray[i].substring(2).trim();\n\t\t\t\t\ttmpValueA1 = tmpValueA1.contains(\"|\") ? tmpValueA1.substring(0, tmpValueA1.indexOf('|')) + tmpValueA1.substring(tmpValueA1.indexOf('|')+1) : tmpValueA1;\n\t\t\t\t\tif(tmpValueA1.contains(\"mV\"))\n\t\t\t\t\t\tpoints[17] = (int) (Double.parseDouble(tmpValueA1.split(\"mV\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA1.contains(\"`C\"))\n\t\t\t\t\t\tpoints[17] = (int) (Double.parseDouble(tmpValueA1.split(\"`C\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA1.contains(\"km/h\"))\n\t\t\t\t\t\tpoints[17] = (int) (Double.parseDouble(tmpValueA1.split(\"km/h\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 14: // A2 0.6mV\n\t\t\t\t\tString tmpValueA2 =dataArray[i].substring(2).trim();\n\t\t\t\t\ttmpValueA2 = tmpValueA2.contains(\"|\") ? tmpValueA2.substring(0, tmpValueA2.indexOf('|')) + tmpValueA2.substring(tmpValueA2.indexOf('|')+1) : tmpValueA2;\n\t\t\t\t\tif(tmpValueA2.contains(\"mV\"))\n\t\t\t\t\t\tpoints[18] = (int) (Double.parseDouble(tmpValueA2.split(\"mV\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA2.contains(\"`C\"))\n\t\t\t\t\t\tpoints[18] = (int) (Double.parseDouble(tmpValueA2.split(\"`C\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA2.contains(\"km/h\"))\n\t\t\t\t\t\tpoints[18] = (int) (Double.parseDouble(tmpValueA2.split(\"km/h\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 15: // A3 0.6mV\n\t\t\t\t\tString tmpValueA3 =dataArray[i].substring(2).trim();\n\t\t\t\t\ttmpValueA3 = tmpValueA3.contains(\"|\") ? tmpValueA3.substring(0, tmpValueA3.indexOf('|')) + tmpValueA3.substring(tmpValueA3.indexOf('|')+1) : tmpValueA3;\n\t\t\t\t\tif(tmpValueA3.contains(\"mV\"))\n\t\t\t\t\t\tpoints[19] = (int) (Double.parseDouble(tmpValueA3.split(\"mV\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA3.contains(\"`C\"))\n\t\t\t\t\t\tpoints[19] = (int) (Double.parseDouble(tmpValueA3.split(\"`C\")[0].trim()) * 1000.0);\n\t\t\t\t\telse if(tmpValueA3.contains(\"km/h\"))\n\t\t\t\t\t\tpoints[19] = (int) (Double.parseDouble(tmpValueA3.split(\"km/h\")[0].trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 18: // Druck 970.74hPa\n\t\t\t\t\tpoints[20] = (int) (Double.parseDouble(dataArray[i].substring(dataArray[i].lastIndexOf(\" \"), dataArray[i].length()-3).trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 19: // intern 32.1`C\n\t\t\t\t\tpoints[21] = (int) (Double.parseDouble(dataArray[i].substring(dataArray[i].lastIndexOf(\" \"), dataArray[i].length()-2).trim()) * 1000.0);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tcatch (RuntimeException e) {\n\t\t\t\t//ignore;\n\t\t\t}\n\t\t}\n\n\t\tint maxVotage = Integer.MIN_VALUE;\n\t\tint minVotage = Integer.MAX_VALUE;\n\t\tfor (int i = 7; i <= 12; i++) {\n\t\t\tif (points[i] > 0) {\n\t\t\t\tmaxVotage = points[i] > maxVotage ? points[i] : maxVotage;\n\t\t\t\tminVotage = points[i] < minVotage ? points[i] : minVotage;\n\t\t\t}\n\t\t}\n\t\tpoints[6] = (maxVotage != Integer.MIN_VALUE && minVotage != Integer.MAX_VALUE ? maxVotage - minVotage : 0) * 1000;\n\t\t\n\t\treturn points;\n\t}",
"void processScanCoordinates(List<Long> scanTimeStampList, String scanType){\n List<LatLng> scanCoordinates = new ArrayList<>();\n System.out.println(\"LENGTH BEFOREEEE\" + scanTimeStampList.size() + scanType);\n for(int i = 0; i < stepTimeStamp.size()-1;i++){\n long upperTimeBound = stepTimeStamp.get((i+1));\n long lowerTimeBound = stepTimeStamp.get(i);\n List<Integer> scanIndexWithinStep = new ArrayList<>();\n //Searches through the list of timestamps and adds the scan numbers that fall within the step to a list\n for(int j = 0; j < scanTimeStampList.size();j++){\n if(scanTimeStampList.get(j) <= upperTimeBound && scanTimeStampList.get(j)> lowerTimeBound){\n scanIndexWithinStep.add(j);\n }\n }\n if(scanIndexWithinStep.size()>0) {\n //Can loop through them as they will be sequential\n for (int k = scanIndexWithinStep.get(0); k <= scanIndexWithinStep.get(scanIndexWithinStep.size() - 1); k++) {\n //Run the algorithm for each scan that falls within the time range for each step\n double tempLat;\n double tempLong;\n //Formula from Dr. Zheng's paper\n // i here represents the number of steps as the index number in adaptiveTimeList is the step number\n if (xIncreasing) {\n tempLat = startLat + STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * yCompMotion * degToMRatio;\n } else {\n tempLat = startLat - STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * yCompMotion * degToMRatio;\n }\n if (yIncreasing) {\n tempLong = startLong + STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * xCompMotion * degToMRatio;\n } else {\n tempLong = startLong - STEP_LENGTH * (i + (double) (scanTimeStampList.get(k) - lowerTimeBound) / (double) (upperTimeBound - lowerTimeBound)) * xCompMotion * degToMRatio;\n }\n scanCoordinates.add(new LatLng(tempLat, tempLong));\n }\n }\n\n }\n System.out.println(\"LENGTHHHH AFTER\" + scanCoordinates.size() + scanType);\n if(scanType == \"mag\"){\n magCoords = scanCoordinates;\n }\n else if(scanType == \"gyro\"){\n gyroCoords = scanCoordinates;\n }\n else if(scanType == \"accel\"){\n accelCoords = scanCoordinates;\n }\n else if(scanType == \"blue\"){\n blueGlobalCoords = scanCoordinates;\n }\n else if(scanType == \"red\"){\n redGlobalCoords = scanCoordinates;\n }\n }",
"@Transactional(readOnly = true) \n public List<PtoPeriodDTO> findAll() {\n log.debug(\"Request to get all PtoPeriods\");\n List<PtoPeriodDTO> result = ptoPeriodRepository.findAll().stream()\n .map(ptoPeriodMapper::ptoPeriodToPtoPeriodDTO)\n .collect(Collectors.toCollection(LinkedList::new));\n\n if(result.isEmpty()){\n \tresult.add(initialPtoPeriod());\n }\n \n return result;\n }",
"public List<Poliza> generarPoliza(final Periodo p){\r\n\t\tList<Poliza> polizas=new ArrayList<Poliza>();\r\n\t\tfor(Date dia:p.getListaDeDias()){\r\n\t\t\ttry {\r\n\t\t\t\tPoliza res=generarPoliza(dia);\r\n\t\t\t\tpolizas.add(res);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\tlogger.error(\"No genero la poliza para el dia: \"+dia+ \" \\nMsg: \"+ExceptionUtils.getRootCauseMessage(e)\r\n\t\t\t\t\t\t,e);\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn polizas;\r\n\t}",
"org.hl7.fhir.Period getAppliesPeriod();",
"private ArrayList<String[]> getSeekingSlider(ArrayList<String> inList){\r\n\t\tString command = \"SELECT * FROM seekingSlider WHERE userName = \\\"\";\r\n\t\tArrayList<String[]> tempList = new ArrayList<>();\r\n\t\tint listSize = inList.size();\r\n\t\tString userName, pGenMin, pGenMax, pExprMin, pExprMax, pOrMin, pOrMax;\r\n\t\t//String[] strArr = new String[7];//holds matches data\r\n\r\n\t\tif(listSize == 0) return tempList;//if the list is empty, return empty list\r\n\r\n\t\tif(listSize == 1){//if there is only 1 in the list\r\n\t\t\tcommand += inList.get(0) + \"\\\";\";\r\n\t\t} else {//if there is more than 1\r\n\t\t\tfor(int i = 0; i < listSize; i++){//go through the list\r\n\t\t\t\tif(i == 0){//for the first userName\r\n\t\t\t\t\tcommand += inList.get(i) + \"\\\"\";\r\n\t\t\t\t} else if(i == listSize-1){//for the last user name\r\n\t\t\t\t\tcommand += \" or userName = \\\"\" + inList.get(i) + \"\\\";\";\r\n\t\t\t\t} else {//for all other userNames\r\n\t\t\t\t\tcommand += \" or userName = \\\"\" + inList.get(i)+ \"\\\"\";\r\n\t\t\t\t}\r\n\t\t\t}//end for loop\r\n\t\t}\r\n\t\ttry {//send command and parse results\r\n\t\t\trs = stmt.executeQuery(command);\r\n\r\n\t\t\twhile(rs.next()){//while there is a result remaining\r\n\t\t\t\tuserName = rs.getString(\"userName\");\r\n\t\t\t\tpGenMin = rs.getString(\"pGenderMin\");\r\n\t\t\t\tpGenMax = rs.getString(\"pGenderMax\");\r\n\t\t\t\tpExprMin = rs.getString(\"pExpressionMin\");\r\n\t\t\t\tpExprMax = rs.getString(\"pExpressionMax\");\r\n\t\t\t\tpOrMin = rs.getString(\"pOrientationMin\");\r\n\t\t\t\tpOrMax = rs.getString(\"pOrientationMax\");\r\n\t\t\t\t//add to the tempList\r\n\t\t\t\ttempList.add(new String[]{userName, pGenMin, pGenMax, pExprMin, pExprMax, pOrMin, pOrMax, \"-1\"});\r\n\t\t\t}//end while loop\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t\t//out.println(e.getErrorCode());\r\n\t\t}\r\n\t\treturn tempList;\r\n\t}",
"void updatePercepts() {\n clearPercepts();\n\n Location r1Loc = model.getAgPos(0);\n Location r2Loc = model.getAgPos(1);\n\t\tLocation r3Loc = model.getAgPos(2);\n\t\tLocation r4Loc = model.getAgPos(3);\n\t\t\n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\t\tLiteral pos3 = Literal.parseLiteral(\"pos(r3,\" + r3Loc.x + \",\" + r3Loc.y + \")\");\n\t\tLiteral pos4 = Literal.parseLiteral(\"pos(r4,\" + r4Loc.x + \",\" + r4Loc.y + \")\");\n\n addPercept(pos1);\n addPercept(pos2);\n\t\taddPercept(pos3);\n\t\taddPercept(pos4);\n\n if (model.hasObject(GARB, r1Loc)) {\n addPercept(g1);\n }\n if (model.hasObject(GARB, r2Loc)) {\n addPercept(g2);\n }\n\t\tif (model.hasObject(COAL, r4Loc)) {\n\t\t\taddPercept(c4);\t\n\t\t}\n }",
"public void update() \n\t{\n\t\tString inst = \"\";\n\t\tfloat cash = getCash();\n\t\tfloat quantity = getPosition(inst);\n\t\tfloat price = getPrice(inst);\n\n\t\t_data.add(new Float(price));\n\t\t\n\t\tif (_data.size() > _period)\n\t\t{\n\t\t\t_data.remove(0);\n\t\t\n\t\t\tfloat min = Float.MAX_VALUE;\n\t\t\tfloat max = Float.MIN_VALUE;\n\t\t\t\n\t\t\tfor (int i = 0; i < _data.size(); i++)\n\t\t\t{\n\t\t\t\tFloat value = (Float)_data.get(i);\n\t\t\t\t\n\t\t\t\tif (value.floatValue() > max)\n\t\t\t\t{\n\t\t\t\t\tmax = value.floatValue();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (value.floatValue() < min)\n\t\t\t\t{\n\t\t\t\t\tmin = value.floatValue();\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tfloat buylevel = min + (min * _minwin);\n\t\t\tfloat sellevel = max - (max * _maxloss);\n\t\t\tfloat sellevel2 = min + (min * _maxwin);\n\t\t\t\n\t\t\t// if price has risen by min win\n\t\t\t// but is below maximum win and\n\t\t\t// below maximum loss then buy\n\t\t\tif (price > buylevel && \n\t\t\t\t\tprice < sellevel2 &&\n\t\t\t\t\tbuylevel < sellevel &&\n\t\t\t\t\tprice > _previous)\n\t\t\t{\n\t\t\t\tif (cash > 0) \n\t\t\t\t{\n\t\t\t\t\taddAmountOrder(inst, cash);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (price < sellevel &&\n\t\t\t\t\tbuylevel > sellevel &&\n\t\t\t\t\tprice < _previous)\n\t\t\t{\n\t\t\t\tif (quantity > 0)\n\t\t\t\t{\n\t\t\t\t\taddQuantityOrder(inst, -quantity);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (price > sellevel2 &&\n\t\t\t\t\tprice > _previous)\n\t\t\t{\n\t\t\t\tif (quantity > 0)\n\t\t\t\t{\n\t\t\t\t\taddQuantityOrder(inst, -quantity);\n\t\t\t\t}\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t_data.remove(0);\n\t\t}\n\t\t\n\t\t_previous = price;\n\t}",
"protected void updateParticles() {\n\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tif (p.neighbors == null) {\n\t\t\t\tp.neighbors = particles;\n\t\t\t}\n\t\t\tfor (BehaviorInterface b : behaviors) {\n\t\t\t\tb.apply(p);\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < particles.size(); i++) {\n\t\t\tVParticle p = particles.get(i);\n\t\t\tp.scaleVelocity(friction);\n\t\t\tp.update();\n\t\t}\n\t}",
"public DataElementChartResult generateChartDataPeriodWise( List<Date> selStartPeriodList,\n List<Date> selEndPeriodList, List<String> periodNames, List<DataElement> dataElementList,\n List<DataElementCategoryOptionCombo> decocList, OrganisationUnit orgUnit )\n throws Exception\n {\n DataElementChartResult dataElementChartResult;\n\n String[] series = new String[dataElementList.size()];\n String[] categories = new String[selStartPeriodList.size()];\n Double[][] data = new Double[dataElementList.size()][selStartPeriodList.size()];\n String chartTitle = \"OrganisationUnit : \" + orgUnit.getShortName();\n String xAxis_Title = \"Time Line\";\n String yAxis_Title = \"Value\";\n\n int serviceCount = 0;\n\n for ( DataElement dataElement : dataElementList )\n {\n DataElementCategoryOptionCombo decoc;\n\n DataElementCategoryCombo dataElementCategoryCombo = dataElement.getCategoryCombo();\n\n List<DataElementCategoryOptionCombo> optionCombos = new ArrayList<DataElementCategoryOptionCombo>(\n dataElementCategoryCombo.getOptionCombos() );\n\n if ( deSelection.equalsIgnoreCase( OPTIONCOMBO ) )\n {\n decoc = decocList.get( serviceCount );\n\n series[serviceCount] = dataElement.getName() + \" : \" + decoc.getName();\n \n CaseAggregationCondition caseAggregationCondition = caseAggregationConditionService\n .getCaseAggregationCondition( dataElement, decoc );\n\n if ( caseAggregationCondition == null )\n {\n selectedStatus.add( \"no\" );\n }\n else\n {\n selectedStatus.add( \"yes\" );\n }\n\n yseriesList.add( dataElement.getName() + \" : \" + decoc.getName() );\n }\n else\n {\n decoc = dataElementCategoryService.getDefaultDataElementCategoryOptionCombo();\n series[serviceCount] = dataElement.getName();\n\n CaseAggregationCondition caseAggregationCondition = caseAggregationConditionService\n .getCaseAggregationCondition( dataElement, decoc );\n\n if ( caseAggregationCondition == null )\n {\n selectedStatus.add( \"no\" );\n }\n else\n {\n selectedStatus.add( \"yes\" );\n }\n\n yseriesList.add( dataElement.getName() );\n }\n\n int periodCount = 0;\n for ( Date startDate : selStartPeriodList )\n {\n Date endDate = selEndPeriodList.get( periodCount );\n String drillDownPeriodName = periodNames.get( periodCount );\n String tempStartDate = format.formatDate( startDate );\n String tempEndDate = format.formatDate( endDate );\n\n categories[periodCount] = periodNames.get( periodCount );\n //PeriodType periodType = periodService.getPeriodTypeByName( periodTypeLB );\n\n String values = orgUnit.getId() + \":\" + dataElement.getId() + \":\" + decoc.getId() + \":\" + periodTypeLB\n + \":\" + tempStartDate + \":\" + tempEndDate;\n selectedValues.add( values );\n\n String drillDownData = orgUnit.getId() + \":\" + \"0\" + \":\" + dataElement.getId() + \":\" + decoc.getId()\n + \":\" + periodTypeLB + \":\" + tempStartDate + \":\" + tempEndDate + \":\" + drillDownPeriodName + \":\"\n + deSelection + \":\" + aggChecked;\n selectedDrillDownData.add( drillDownData );\n\n Double aggDataValue = 0.0;\n \n if ( deSelection.equalsIgnoreCase( OPTIONCOMBO ) )\n {\n //System.out.println( \" Inside deSelection.equalsIgnoreCase( OPTIONCOMBO ) \" );\n if ( aggDataCB != null )\n {\n Double temp = aggregationService.getAggregatedDataValue( dataElement, decoc, startDate,\n endDate, orgUnit );\n if ( temp != null )\n aggDataValue += temp;\n //aggDataValue = temp;\n }\n else\n {\n Collection<Period> periods = periodService.getPeriodsBetweenDates( startDate, endDate );\n for ( Period period : periods )\n {\n DataValue dataValue = dataValueService.getDataValue( orgUnit, dataElement, period, decoc );\n try\n {\n aggDataValue += Double.parseDouble( dataValue.getValue() );\n }\n catch ( Exception e )\n {\n }\n }\n }\n }\n else\n {\n //System.out.println( \" Inside not deSelection.equalsIgnoreCase( OPTIONCOMBO ) \" );\n Iterator<DataElementCategoryOptionCombo> optionComboIterator = optionCombos.iterator();\n while ( optionComboIterator.hasNext() )\n {\n DataElementCategoryOptionCombo decoc1 = (DataElementCategoryOptionCombo) optionComboIterator.next();\n\n if ( aggDataCB != null )\n {\n Double temp = aggregationService.getAggregatedDataValue( dataElement, decoc1, startDate,\n endDate, orgUnit );\n if ( temp != null )\n aggDataValue += temp;\n //aggDataValue = temp;\n }\n else\n {\n Collection<Period> periods = periodService.getPeriodsBetweenDates( startDate, endDate );\n for ( Period period : periods )\n {\n DataValue dataValue = dataValueService.getDataValue( orgUnit, dataElement, period, decoc1 );\n try\n {\n aggDataValue += Double.parseDouble( dataValue.getValue() );\n }\n catch ( Exception e )\n {\n }\n }\n }\n }\n }\n //System.out.println( \" Data is : \" + aggDataValue );\n data[serviceCount][periodCount] = aggDataValue;\n\n if ( dataElement.getType().equalsIgnoreCase( DataElement.VALUE_TYPE_INT ) )\n {\n if ( dataElement.getNumberType().equalsIgnoreCase( DataElement.VALUE_TYPE_INT ) )\n {\n data[serviceCount][periodCount] = Math.round( data[serviceCount][periodCount]\n * Math.pow( 10, 0 ) )\n / Math.pow( 10, 0 );\n }\n else\n {\n data[serviceCount][periodCount] = Math.round( data[serviceCount][periodCount]\n * Math.pow( 10, 1 ) )\n / Math.pow( 10, 1 );\n }\n }\n periodCount++;\n }\n\n serviceCount++;\n }\n dataElementChartResult = new DataElementChartResult( series, categories, data, chartTitle, xAxis_Title,\n yAxis_Title );\n\n return dataElementChartResult;\n }",
"public Map<String, List<TimePeriodModel>> getAllTimePeriods();",
"public void loadPeriodInfo() throws IOException{\r\n try { \r\n String line;\r\n FileReader in = new FileReader (\"Period List.txt\");\r\n BufferedReader input = new BufferedReader(in); \r\n String line1;\r\n teacherListModel.removeAllElements();\r\n periodModel.removeAllElements();\r\n removeTeachersListModel.removeAllElements();\r\n editTeachersListModel.removeAllElements();\r\n teachers.clear();\r\n //Running through each line of code\r\n while ((line1 = input.readLine()) != null) {\r\n String tempLine = line1; \r\n String[] teacherData = new String [2];\r\n for (int i = 0; i < 2; i++) {\r\n teacherData [i] = tempLine.substring (0, tempLine.indexOf(\",\")); \r\n tempLine = tempLine.substring(tempLine.indexOf(\",\") + 1, tempLine.length()); \r\n } \r\n //Adding the teachers and their data\r\n Teacher tempTeacher = new Teacher (teacherData[0]);//name\r\n teacherListModel.addElement(teacherData[0]); \r\n periodModel.addElement(teacherData[0]); \r\n removeTeachersListModel.addElement(teacherData[0]); \r\n editTeachersListModel.addElement (teacherData[0]);\r\n teachers.add (tempTeacher);\r\n for (int j = 0; j < teacherData[1].length(); j++) {\r\n tempTeacher.addPeriod (Integer.parseInt(teacherData[1].substring (j, j + 1))); //period\r\n }\r\n }\r\n }catch (IOException E) {\r\n System.out.println (\"ERROR READING 'Period List.txt\"); \r\n }\r\n }",
"private void processData() {\n\t\tfloat S, M, VPR, VM;\n\t\tgetCal();\n\t\tgetTimestamps();\n\t\t\n \n\t\tfor(int i = 0; i < r.length; i++) {\n\t\t\t//get lux\n\t\t\tlux[i] = RGBcal[0]*vlam[0]*r[i] + RGBcal[1]*vlam[1]*g[i] + RGBcal[2]*vlam[2]*b[i];\n \n\t\t\t//get CLA\n\t\t\tS = RGBcal[0]*smac[0]*r[i] + RGBcal[1]*smac[1]*g[i] + RGBcal[2]*smac[2]*b[i];\n\t\t\tM = RGBcal[0]*mel[0]*r[i] + RGBcal[1]*mel[1]*g[i] + RGBcal[2]*mel[2]*b[i];\n\t\t\tVPR = RGBcal[0]*vp[0]*r[i] + RGBcal[1]*vp[1]*g[i] + RGBcal[2]*vp[2]*b[i];\n\t\t\tVM = RGBcal[0]*vmac[0]*r[i] + RGBcal[1]*vmac[1]*g[i] + RGBcal[2]*vmac[2]*b[i];\n \n\t\t\tif(S > CLAcal[2]*VM) {\n\t\t\t\tCLA[i] = M + CLAcal[0]*(S - CLAcal[2]*VM) - CLAcal[1]*683*(1 - pow((float)2.71, (float)(-VPR/4439.5)));\n\t\t\t}\n\t\t\telse {\n\t\t\t\tCLA[i] = M;\n\t\t\t}\n\t\t\tCLA[i] = CLA[i]*CLAcal[3];\n\t\t\tif(CLA[i] < 0) {\n\t\t\t\tCLA[i] = 0;\n\t\t\t}\n \n\t\t\t//get CS\n\t\t\tCS[i] = (float) (.7*(1 - (1/(1 + pow((float)(CLA[i]/355.7), (float)1.1026)))));\n \n\t\t\t//get activity\n\t\t\ta[i] = (float) (pow(a[i], (float).5) * .0039 * 4);\n\t\t}\n\t}",
"private void findStaffLinePositions()\n {\n Log.i(TAG, \"findStaffLinePositions\");\n final int sliceStart = (int)(0.45*mWidth);\n final int sliceEnd = (int)(0.65*mWidth);\n \n boolean connected;\n int lineNum;\n for(int x = sliceStart; x<sliceEnd; ++x) //only consider a slice of x values\n {\n connected=false;\n lineNum=0;\n for(int y=0; y<mHeight; ++y)\n {\n if(mHorizontalProjHist[y] >= x) //the histogram for this y value is within the slice we're looking at\n {\n if(mStaffLineMap.indexOfKey(y) < 0) //we haven't seen this y value, so add it\n {\n \tmStaffLineMap.put(y, lineNum);\n }\n connected = true;\n }\n else if(connected) //encountered whitespace after a line\n {\n lineNum++;\n connected = false;\n }\n }\n }\n\n }",
"public void period() {\n\t\tPeriod annually = Period.ofYears(1);\n\t\tPeriod quarterly = Period.ofMonths(3);\n\t\tPeriod everyThreeWeeks = Period.ofWeeks(3);\n\t\tPeriod everyOtherDay = Period.ofDays(2);\n\t\tPeriod everyYearAndAWeek = Period.of(1, 0, 7);\n\t\tLocalDate date = LocalDate.of(2014, Month.JANUARY, 20);\n\t\tdate = date.plus(annually);\n\t\tSystem.out.println(date);\n\t\tSystem.out.println(Period.of(0, 20, 47)); // P20M47D\n\t\tSystem.out.println(Period.of(2, 20, 47)); // P2Y20M47D\n\t}",
"public ArrayList<Proceso> procesosPoliticaEnvejecimiento() {\n\t\tArrayList<Proceso> procesosPE = new ArrayList<Proceso>();\n\t\tProceso aux = this.raiz.sig;\n\t\twhile (aux != this.raiz) {\n\t\t\tint tiempoEnCola = this.tiempo - aux.tllegada + 1;\n\t\t\tif (tiempoEnCola >= this.tiempoPE) {\n\t\t\t\tProceso auxp = aux.padre;\n\t\t\t\tauxp.sig = aux.sig;\n\t\t\t\taux.sig.padre = auxp;\n\t\t\t\taux.padre = null;\n\t\t\t\tprocesosPE.add(aux);\n\t\t\t}\n\n\t\t\taux = aux.sig;\n\t\t}\n\t\tif (procesosPE.isEmpty()) {\n\t\t\treturn null;\n\t\t}\n\t\treturn procesosPE;\n\t}",
"public void createPeriodical(String[] bookInfo) {\n\t\tString isbn = bookInfo[0];\n\t\tString callNumber = bookInfo[1];\n\t\tint available = Integer.parseInt(bookInfo[2]);\n\t\tint total = Integer.parseInt(bookInfo[3]);\n\t\tString title = bookInfo[4];\n\t\tchar frequency = bookInfo[5].charAt(0);\n\n\t\tbookList.add(new Periodic(isbn, callNumber, available, total, title, frequency));\n\t}",
"private void buildDateTimeHypos(ArrayList<DateTimeHypo> hypos, String type, String[] subslots)\n {\n hypos.clear();\n \n SlotHypo[] subHypos = new SlotHypo[subslots.length];\n \n \n for ( SlotHypo sh : slot_hypos )\n {\n if ( !sh.name.startsWith(type) ) continue;\n for ( int i = 0; i < subslots.length; ++i )\n if ( sh.name.equals(type+\".\"+subslots[i]) )\n subHypos[i] = sh;\n }\n \n DateTimeHypo nh = new DateTimeHypo(type);\n nh.belief_prob = 1;\n hypos.add(nh);\n \n int bound = 1;\n for ( SlotHypo sh : subHypos )\n {\n if ( sh == null || sh.value_hypos.isEmpty() )\n continue;\n \n for ( ValueHypo vh : sh.value_hypos )\n {\n for ( int i = 0; i < bound; ++i )\n {\n DateTimeHypo th = new DateTimeHypo(hypos.get(i));\n th.addSVP(new SVP(sh.name,vh.name));\n th.belief_prob = hypos.get(i).belief_prob * vh.belief_prob;\n if ( th.belief_prob > 0.0001 )\n hypos.add(th);\n }\n }\n for ( int i = 0; i < bound; ++i )\n hypos.get(i).belief_prob *= sh.nullProb;\n \n prune(hypos);\n \n bound = hypos.size();\n }\n \n Iterator iter = hypos.iterator();\n if ( iter.hasNext() ) iter.next(); //skip the first\n while ( iter.hasNext() )\n {\n DateTimeHypo h = (DateTimeHypo)iter.next();\n \n /*\n boolean observed = false;\n for ( DateTimeHypo ht : observed_date_time_history )\n {\n if ( ht.equals(h) )\n {\n observed = true;\n break;\n }\n }\n if ( !observed )\n * */\n if ( !h.isValid() )\n iter.remove();\n }\n }",
"public int getPeriod()\r\n\t{\r\n\t\treturn period;\r\n\t}",
"private PeriodicEvent getPeriod (ArrayList shiftGraph, int eventOffset)\n {\n int matchCount = 0;\n int bestMatchCount = 0;\n int bestPeriod = 0;\n\n int lastOffset = shiftGraph.size() - this.minPeriodLength;\n int periodOffset = 0;\n\n for (periodOffset = minPeriodLength; periodOffset < lastOffset; periodOffset++)\n {\n matchCount = 0;\n\n int lastComparisonIndex = shiftGraph.size() - periodOffset;\n for (int j = 0 ; j < lastComparisonIndex; j++)\n {\n Double staticElement = null;\n Double shiftElement = null;\n\n try\n {\n staticElement = (Double) shiftGraph.get (j);\n shiftElement = (Double) shiftGraph.get (j + periodOffset);\n }\n catch (Exception e)\n { ; }\n\n if (elementsAreEqual (staticElement, shiftElement))\n matchCount++;\n } // end for (j)\n\n if (matchCount > bestMatchCount)\n {\n bestMatchCount = matchCount;\n bestPeriod = periodOffset;\n } // end if\n\n } // end for (offset)\n\n ArrayList event = new ArrayList (bestPeriod);\n\n for (int i = 0; i < bestPeriod; i++)\n {\n Double elt = (Double) shiftGraph.get (i);\n event.add (i, elt);\n }\n\n PeriodicEvent pe = new PeriodicEvent ();\n pe.setOffset (eventOffset);\n pe.setPeriod (bestPeriod);\n pe.setEvent (event);\n\n return pe;\n }",
"public Boolean checkPeriod( ){\r\n\r\n Date dstart = new Date();\r\n Date dend = new Date();\r\n Date dnow = new Date();\r\n\r\n\r\n\r\n // this part will read the openndate file in specific formate\r\n try (BufferedReader in = new BufferedReader(new FileReader(\"opendate.txt\"))) {\r\n String str;\r\n while ((str = in.readLine()) != null) {\r\n // splitting lines on the basis of token\r\n String[] tokens = str.split(\",\");\r\n String [] d1 = tokens[0].split(\"-\");\r\n String [] d2 = tokens[1].split(\"-\");\r\n \r\n int a = Integer.parseInt(d1[0]);\r\n dstart.setDate(a);\r\n a = Integer.parseInt(d1[1]);\r\n dstart.setMonth(a);\r\n a = Integer.parseInt(d1[2]);\r\n dstart.setYear(a);\r\n\r\n a = Integer.parseInt(d2[0]);\r\n dend.setDate(a);\r\n a = Integer.parseInt(d2[1]);\r\n dend.setMonth(a);\r\n a = Integer.parseInt(d2[2]);\r\n dend.setYear(a);\r\n\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"File Read Error\");\r\n }\r\n\r\n \r\n\r\n if ( dnow.before(dend) && dnow.after(dstart) )\r\n return true; \r\n\r\n return true;\r\n }",
"public void processData(int newVal) {\n\t\tif(samplePoints[counter] < 0) {\n\t\t\tsamplePoints[counter] = newVal;\n\t\t\tlastAverage = newVal;\n\t\t} else {\n\t\t\tdouble newAverage = lastAverage + ((newVal - samplePoints[counter]) / SAMPLE_POINTS);\n\t\t\tdouble difference = 10 * Math.abs(newAverage - lastAverage);\n\t\t\tsamplePoints[counter] = newVal;\n\t\t\tlastAverage = newAverage;\n\t\t\tif(tookOff) {\n\t\t\t\tif(difference > DIFFERENCE_THRESHOLD || System.currentTimeMillis() - startTime > 16000) {\n\t\t\t\t\t//The robot is landing\n\t\t\t\t\tSound.beep();\n\t\t\t\t\tziplineController.resumeThread();\n\t\t\t\t\ttookOff = false;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif(difference < DIFFERENCE_THRESHOLD) {\n\t\t\t\t\tdifferenceCounter--;\n\t\t\t\t} else {\n\t\t\t\t\tdifferenceCounter = DIFFERENCE_POINTS_COUNTER;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(differenceCounter < 0) {\n\t\t\t\t\t//The robot is now in the air.\n\t\t\t\t\tSound.beep();\n\t\t\t\t\ttookOff = true;\n\t\t\t\t\tstartTime = System.currentTimeMillis();\n\t\t\t\t\tziplineController.resumeThread();\n\t\t\t\t\tArrays.fill(samplePoints, -1);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(4000);\n\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcounter = (counter + 1) % SAMPLE_POINTS;\n\t}",
"private void updateParticles() {\n\t\t// TODO Auto-generated method stub\n\t\tpredParticles = new ArrayList<File>();\n\t\tpreyParticles = new ArrayList<File>();\n\t\tFile f = new File(VisualizerMain.experimentBaseLocation+\"/\"+VisualizerMain.selectedRun+\"/Epoch-\"+epochSelected+\"/\");\n\t\tFile[] listFolders = f.listFiles();\n\t\tfor(File file : listFolders){\n\t\t\tpredParticles.add(file);\n\t\t}\n\t\t\n\t\tDefaultListModel listModelPredator = new DefaultListModel();\n\t\tfor (File file: predParticles){\n\t\t\tlistModelPredator.addElement(file.getName());\n\t\t}\n\t\tdisplayPred.setModel(listModelPredator);\n\t\t\n\t\tDefaultListModel listModelPrey = new DefaultListModel();\n\t\tfor (File file: preyParticles){\n\t\t\tlistModelPrey.addElement(file.getName());\n\t\t}\n\t\tdisplayPrey.setModel(listModelPrey);\n\t}",
"public void recomendarTemposEM() {\n ArrayList iTXCH = new ArrayList(); /// Instancias pre fusion\n ArrayList iTYCH = new ArrayList();\n ArrayList iTZCH = new ArrayList();\n\n ArrayList cenTXCH = new ArrayList(); /// Centroides Tempos tempos ch\n ArrayList cenTYCH = new ArrayList();\n ArrayList cenTZCH = new ArrayList();\n\n ArrayList cenTXDB = new ArrayList(); /// centroide tempos db\n ArrayList cenTYDB = new ArrayList();\n ArrayList cenTZDB = new ArrayList();\n\n ArrayList insTXCH = new ArrayList(); /// Instancias fusion\n ArrayList insTYCH = new ArrayList();\n ArrayList insTZCH = new ArrayList();\n\n ArrayList ppTXCH = new ArrayList(); /// centroide promedio ponderado tempos\n ArrayList ppTYCH = new ArrayList();\n ArrayList ppTZCH = new ArrayList();\n\n ArrayList ppTXDB = new ArrayList(); /// centroide promedio ponderado duracion\n ArrayList ppTYDB = new ArrayList();\n ArrayList ppTZDB = new ArrayList();\n\n ArrayList paTXCH = new ArrayList(); /// centroide promedio aritmetico tempos ch\n ArrayList paTYCH = new ArrayList();\n ArrayList paTZCH = new ArrayList();\n\n ArrayList paTXDB = new ArrayList(); /// centroide promedio artimetico tempos db\n ArrayList paTYDB = new ArrayList();\n ArrayList paTZDB = new ArrayList();\n\n////////////////// TEMPO EN X ////////////////////////////// \n ////////// calinsky - harabaz /////////\n if (txchsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXCH = CExtraer.arrayTempoXCpruebaEM;\n iTXCH = CExtraer.arrayTempoXIpruebaEM;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXCH2.setText(cenTXCH.get(iposision).toString());\n }\n\n if (txchsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n ppTXCH = CFusionarEM.arregloPPTX1EM;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n\n System.out.println(iposision);\n\n }\n }\n valorTXCH2.setText(ppTXCH.get(iposision).toString());\n }\n\n if (txchsEM == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n paTXCH = CFusionarEM.arregloPATX1EM;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXCH2.setText(paTXCH.get(iposision).toString());\n\n }\n\n //////////// davies bouldin //////////////\n if (txdbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXDB = CExtraer.arrayTempoXCpruebaEM;\n iTXCH = CExtraer.arrayTempoXIpruebaEM;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB2.setText(cenTXDB.get(iposision).toString());\n }\n\n if (txdbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n ppTXDB = CFusionarEM.arregloPPTX1EM;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB2.setText(ppTXDB.get(iposision).toString());\n }\n if (txdbsEM == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionarEM.arregloInstanciasTX1EM;\n paTXDB = CFusionarEM.arregloPATX1EM;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXDB2.setText(paTXDB.get(iposision).toString());\n\n }\n\n ///////////// TEMPO EN Y //////////// \n //////////// calinsky - harabaz /////////////\n if (tychsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYCH = CExtraer.arrayTempoYCpruebaEM;\n iTYCH = CExtraer.arrayTempoYIpruebaEM;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYCH2.setText(cenTYCH.get(iposision).toString());\n }\n\n if (tychsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n ppTYCH = CFusionarEM.arregloPPTY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH2.setText(ppTYCH.get(iposision).toString());\n\n }\n\n if (tychsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n paTYCH = CFusionarEM.arregloPATY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH2.setText(paTYCH.get(iposision).toString());\n }\n /////////// davies - bouldin /////////////\n if (tydbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYDB = CExtraer.arrayTempoYCpruebaEM;\n iTYCH = CExtraer.arrayTempoYIpruebaEM;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYDB2.setText(cenTYDB.get(iposision).toString());\n }\n\n if (tydbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n ppTYDB = CFusionarEM.arregloPPTY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB2.setText(ppTYDB.get(iposision).toString());\n }\n if (tydbsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionarEM.arregloInstanciasTY1EM;\n paTYDB = CFusionarEM.arregloPATY1EM;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB2.setText(paTYDB.get(iposision).toString());\n }\n\n ///////////// TEMPO EN Z //////////// \n ///////////// calinsky harabaz ///////////////////\n if (tzchsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZCH = CExtraer.arrayTempoZCpruebaEM;\n iTZCH = CExtraer.arrayTempoZIpruebaEM;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZCH2.setText(cenTZCH.get(iposision).toString());\n }\n\n if (tzchsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n ppTZCH = CFusionarEM.arregloPPTZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH2.setText(ppTZCH.get(iposision).toString());\n }\n if (tzchsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n paTZCH = CFusionarEM.arregloPATZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH2.setText(paTZCH.get(iposision).toString());\n }\n\n ///////////// davies bouldin /////////////////// \n if (tzdbsEM == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZDB = CExtraer.arrayTempoZCpruebaEM;\n iTZCH = CExtraer.arrayTempoZIpruebaEM;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZDB2.setText(cenTZDB.get(iposision).toString());\n }\n\n if (tzdbsEM == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n ppTZDB = CFusionarEM.arregloPPTZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB2.setText(ppTZDB.get(iposision).toString());\n }\n //////////\n if (tzdbsEM == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionarEM.arregloInstanciasTZ1EM;\n paTZDB = CFusionarEM.arregloPATZ1EM;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB2.setText(paTZDB.get(iposision).toString());\n }\n\n }",
"public final flipsParser.pitch_return pitch() throws RecognitionException {\n flipsParser.pitch_return retval = new flipsParser.pitch_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal150=null;\n Token string_literal151=null;\n Token To152=null;\n Token string_literal154=null;\n Token string_literal155=null;\n Token With157=null;\n Token string_literal158=null;\n Token string_literal159=null;\n Token string_literal160=null;\n Token string_literal161=null;\n flipsParser.angularValueWithRate_return angularValueWithRate153 = null;\n\n flipsParser.angularValueWithRate_return angularValueWithRate156 = null;\n\n flipsParser.angularValueWithRate_return angularValueWithRate162 = null;\n\n\n CommonTree string_literal150_tree=null;\n CommonTree string_literal151_tree=null;\n CommonTree To152_tree=null;\n CommonTree string_literal154_tree=null;\n CommonTree string_literal155_tree=null;\n CommonTree With157_tree=null;\n CommonTree string_literal158_tree=null;\n CommonTree string_literal159_tree=null;\n CommonTree string_literal160_tree=null;\n CommonTree string_literal161_tree=null;\n RewriteRuleTokenStream stream_152=new RewriteRuleTokenStream(adaptor,\"token 152\");\n RewriteRuleTokenStream stream_153=new RewriteRuleTokenStream(adaptor,\"token 153\");\n RewriteRuleTokenStream stream_150=new RewriteRuleTokenStream(adaptor,\"token 150\");\n RewriteRuleTokenStream stream_151=new RewriteRuleTokenStream(adaptor,\"token 151\");\n RewriteRuleTokenStream stream_149=new RewriteRuleTokenStream(adaptor,\"token 149\");\n RewriteRuleTokenStream stream_To=new RewriteRuleTokenStream(adaptor,\"token To\");\n RewriteRuleTokenStream stream_With=new RewriteRuleTokenStream(adaptor,\"token With\");\n RewriteRuleTokenStream stream_154=new RewriteRuleTokenStream(adaptor,\"token 154\");\n RewriteRuleSubtreeStream stream_angularValueWithRate=new RewriteRuleSubtreeStream(adaptor,\"rule angularValueWithRate\");\n try {\n // flips.g:314:2: ( ( 'pit' | 'pitch' ) To angularValueWithRate -> ^( PITCH FIXED angularValueWithRate ) | ( 'pit' | 'pitch' ) angularValueWithRate -> ^( PITCH RELATIVE angularValueWithRate ) | ( With 'an' )? ( 'aoa' | 'angle of attack' ) ( 'of' )? angularValueWithRate -> ^( PITCH FIXED angularValueWithRate ) )\n int alt62=3;\n switch ( input.LA(1) ) {\n case 149:\n {\n int LA62_1 = input.LA(2);\n\n if ( (LA62_1==At||(LA62_1>=FloatingPointLiteral && LA62_1<=HexLiteral)||(LA62_1>=340 && LA62_1<=341)) ) {\n alt62=2;\n }\n else if ( (LA62_1==To) ) {\n alt62=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 62, 1, input);\n\n throw nvae;\n }\n }\n break;\n case 150:\n {\n int LA62_2 = input.LA(2);\n\n if ( (LA62_2==At||(LA62_2>=FloatingPointLiteral && LA62_2<=HexLiteral)||(LA62_2>=340 && LA62_2<=341)) ) {\n alt62=2;\n }\n else if ( (LA62_2==To) ) {\n alt62=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 62, 2, input);\n\n throw nvae;\n }\n }\n break;\n case With:\n case 152:\n case 153:\n {\n alt62=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 62, 0, input);\n\n throw nvae;\n }\n\n switch (alt62) {\n case 1 :\n // flips.g:314:4: ( 'pit' | 'pitch' ) To angularValueWithRate\n {\n // flips.g:314:4: ( 'pit' | 'pitch' )\n int alt57=2;\n int LA57_0 = input.LA(1);\n\n if ( (LA57_0==149) ) {\n alt57=1;\n }\n else if ( (LA57_0==150) ) {\n alt57=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 57, 0, input);\n\n throw nvae;\n }\n switch (alt57) {\n case 1 :\n // flips.g:314:5: 'pit'\n {\n string_literal150=(Token)match(input,149,FOLLOW_149_in_pitch1517); \n stream_149.add(string_literal150);\n\n\n }\n break;\n case 2 :\n // flips.g:314:11: 'pitch'\n {\n string_literal151=(Token)match(input,150,FOLLOW_150_in_pitch1519); \n stream_150.add(string_literal151);\n\n\n }\n break;\n\n }\n\n To152=(Token)match(input,To,FOLLOW_To_in_pitch1522); \n stream_To.add(To152);\n\n pushFollow(FOLLOW_angularValueWithRate_in_pitch1524);\n angularValueWithRate153=angularValueWithRate();\n\n state._fsp--;\n\n stream_angularValueWithRate.add(angularValueWithRate153.getTree());\n\n\n // AST REWRITE\n // elements: angularValueWithRate\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 315:2: -> ^( PITCH FIXED angularValueWithRate )\n {\n // flips.g:315:5: ^( PITCH FIXED angularValueWithRate )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PITCH, \"PITCH\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n adaptor.addChild(root_1, stream_angularValueWithRate.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 2 :\n // flips.g:316:4: ( 'pit' | 'pitch' ) angularValueWithRate\n {\n // flips.g:316:4: ( 'pit' | 'pitch' )\n int alt58=2;\n int LA58_0 = input.LA(1);\n\n if ( (LA58_0==149) ) {\n alt58=1;\n }\n else if ( (LA58_0==150) ) {\n alt58=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 58, 0, input);\n\n throw nvae;\n }\n switch (alt58) {\n case 1 :\n // flips.g:316:5: 'pit'\n {\n string_literal154=(Token)match(input,149,FOLLOW_149_in_pitch1541); \n stream_149.add(string_literal154);\n\n\n }\n break;\n case 2 :\n // flips.g:316:11: 'pitch'\n {\n string_literal155=(Token)match(input,150,FOLLOW_150_in_pitch1543); \n stream_150.add(string_literal155);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_angularValueWithRate_in_pitch1546);\n angularValueWithRate156=angularValueWithRate();\n\n state._fsp--;\n\n stream_angularValueWithRate.add(angularValueWithRate156.getTree());\n\n\n // AST REWRITE\n // elements: angularValueWithRate\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 317:2: -> ^( PITCH RELATIVE angularValueWithRate )\n {\n // flips.g:317:5: ^( PITCH RELATIVE angularValueWithRate )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PITCH, \"PITCH\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(RELATIVE, \"RELATIVE\"));\n adaptor.addChild(root_1, stream_angularValueWithRate.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 3 :\n // flips.g:318:4: ( With 'an' )? ( 'aoa' | 'angle of attack' ) ( 'of' )? angularValueWithRate\n {\n // flips.g:318:4: ( With 'an' )?\n int alt59=2;\n int LA59_0 = input.LA(1);\n\n if ( (LA59_0==With) ) {\n alt59=1;\n }\n switch (alt59) {\n case 1 :\n // flips.g:318:5: With 'an'\n {\n With157=(Token)match(input,With,FOLLOW_With_in_pitch1563); \n stream_With.add(With157);\n\n string_literal158=(Token)match(input,151,FOLLOW_151_in_pitch1565); \n stream_151.add(string_literal158);\n\n\n }\n break;\n\n }\n\n // flips.g:318:17: ( 'aoa' | 'angle of attack' )\n int alt60=2;\n int LA60_0 = input.LA(1);\n\n if ( (LA60_0==152) ) {\n alt60=1;\n }\n else if ( (LA60_0==153) ) {\n alt60=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 60, 0, input);\n\n throw nvae;\n }\n switch (alt60) {\n case 1 :\n // flips.g:318:18: 'aoa'\n {\n string_literal159=(Token)match(input,152,FOLLOW_152_in_pitch1570); \n stream_152.add(string_literal159);\n\n\n }\n break;\n case 2 :\n // flips.g:318:24: 'angle of attack'\n {\n string_literal160=(Token)match(input,153,FOLLOW_153_in_pitch1572); \n stream_153.add(string_literal160);\n\n\n }\n break;\n\n }\n\n // flips.g:318:43: ( 'of' )?\n int alt61=2;\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==154) ) {\n alt61=1;\n }\n switch (alt61) {\n case 1 :\n // flips.g:318:43: 'of'\n {\n string_literal161=(Token)match(input,154,FOLLOW_154_in_pitch1575); \n stream_154.add(string_literal161);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_angularValueWithRate_in_pitch1578);\n angularValueWithRate162=angularValueWithRate();\n\n state._fsp--;\n\n stream_angularValueWithRate.add(angularValueWithRate162.getTree());\n\n\n // AST REWRITE\n // elements: angularValueWithRate\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 319:2: -> ^( PITCH FIXED angularValueWithRate )\n {\n // flips.g:319:5: ^( PITCH FIXED angularValueWithRate )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PITCH, \"PITCH\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n adaptor.addChild(root_1, stream_angularValueWithRate.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }",
"void updatePercepts() {\n clearPercepts();\n \n Location r1Loc = model.getAgPos(0);\n //Location r2Loc = model.getAgPos(1);\n \n Literal pos1 = Literal.parseLiteral(\"pos(r1,\" + r1Loc.x + \",\" + r1Loc.y + \")\");\n // Literal pos2 = Literal.parseLiteral(\"pos(r2,\" + r2Loc.x + \",\" + r2Loc.y + \")\");\n\n addPercept(pos1);\n //addPercept(pos2);\n \n if (model.hasObject(Const.ObstacleCode, r1Loc)) {\n addPercept(Const.v1);\n }\n// if (model.hasObject(Const.ObstacleCode, r2Loc)) {\n// addPercept(Const.v2);\n// }\n }",
"public int getPeriod() {\n return period;\n }",
"private void getPTs(){\n mPyTs = estudioAdapter.getListaPesoyTallasSinEnviar();\n //ca.close();\n }",
"public void setPeriod(int period) {\n this.period = period;\n }",
"@SuppressWarnings(\"unused\")\r\n private void findAbdomenVOI() {\r\n \r\n // find the center of mass of the single label object in the sliceBuffer (abdomenImage)\r\n findAbdomenCM();\r\n int xcm = centerOfMass[0];\r\n int ycm = centerOfMass[1];\r\n\r\n ArrayList<Integer> xValsAbdomenVOI = new ArrayList<Integer>();\r\n ArrayList<Integer> yValsAbdomenVOI = new ArrayList<Integer>();\r\n\r\n // angle in radians\r\n double angleRad;\r\n \r\n for (int angle = 39; angle < 45; angle += 3) {\r\n int x, y, yOffset;\r\n double scaleFactor; // reduces the number of trig operations that must be performed\r\n \r\n angleRad = Math.PI * angle / 180.0;\r\n if (angle > 315 || angle <= 45) {\r\n scaleFactor = Math.tan(angleRad);\r\n x = xDim;\r\n y = ycm;\r\n yOffset = y * xDim;\r\n while (x > xcm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n x--;\r\n y = ycm - (int)((x - xcm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 45 && angle <= 135) {\r\n scaleFactor = (Math.tan((Math.PI / 2.0) - angleRad));\r\n x = xcm;\r\n y = 0;\r\n yOffset = y * xDim;\r\n while (y < ycm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n y++;\r\n x = xcm + (int)((ycm - y) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 135 && angle <= 225) {\r\n scaleFactor = Math.tan(Math.PI - angleRad);\r\n x = 0;\r\n y = ycm;\r\n yOffset = y * xDim;\r\n while (x < xcm && sliceBuffer[yOffset + x] != abdomenTissueLabel) {\r\n x++;\r\n y = ycm - (int)((xcm - x) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n } else if (angle > 225 && angle <= 315) {\r\n scaleFactor = Math.tan((3.0 * Math.PI / 2.0) - angleRad);\r\n x = xcm;\r\n y = yDim;\r\n yOffset = y * xDim;\r\n while (y < yDim && sliceBuffer[yOffset + x] == abdomenTissueLabel) {\r\n y--;\r\n x = xcm - (int)((y - ycm) * scaleFactor);\r\n yOffset = y * xDim;\r\n }\r\n xValsAbdomenVOI.add(x);\r\n yValsAbdomenVOI.add(y);\r\n \r\n }\r\n } // end for (angle = 0; ...\r\n \r\n int[] x1 = new int[xValsAbdomenVOI.size()];\r\n int[] y1 = new int[xValsAbdomenVOI.size()];\r\n int[] z1 = new int[xValsAbdomenVOI.size()];\r\n for(int idx = 0; idx < xValsAbdomenVOI.size(); idx++) {\r\n x1[idx] = xValsAbdomenVOI.get(idx);\r\n y1[idx] = xValsAbdomenVOI.get(idx);\r\n z1[idx] = 0;\r\n }\r\n\r\n // make the VOI's and add the points to them\r\n abdomenVOI = new VOI((short)0, \"Abdomen\");\r\n abdomenVOI.importCurve(x1, y1, z1);\r\n\r\n\r\n }",
"public float getPitchRange() {\n\treturn range;\n }",
"private int getPeriodindexFromTime(long time, long period, int periodsPerSpan) {\n int index = (int) (time / period);\n return index;\n }",
"public void processDate(boolean periodStart) {\n Calendar cal = Calendar.getInstance();\n if (year == null) {\n year = cal.get(Calendar.YEAR);\n }\n if (week != null) {\n cal.set(Calendar.WEEK_OF_YEAR, week);\n cal.setFirstDayOfWeek(Calendar.MONDAY);\n cal.set(Calendar.DAY_OF_WEEK, (periodStart) ? Calendar.MONDAY : Calendar.SUNDAY);\n week = null;\n month = TimeConstants.MONTHS_EN.split(\",\")[cal.get(Calendar.MONTH)].toLowerCase();\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n if (season != null) {\n if (\"Spring\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 2 : 4);\n } else if (\"Summer\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 5 : 7);\n } else if (\"Autumn\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 8 : 10);\n } else if (\"Winter\".equalsIgnoreCase(season)) {\n cal.set(Calendar.MONTH, periodStart ? 11 : 1);\n }\n cal.set(Calendar.DAY_OF_MONTH, periodStart ? 1 : cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n month = TimeConstants.MONTHS_EN.split(\",\")[cal.get(Calendar.MONTH)].toLowerCase();\n day = cal.get(Calendar.DAY_OF_MONTH);\n season = null;\n }\n if (month != null) {\n cal.set(Calendar.MONTH, TimeConstants.getMonthIndex(month));\n }\n if (day != null && day == 99) {\n cal.set(Calendar.DAY_OF_MONTH, cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n if (day == null) {\n cal.set(Calendar.DAY_OF_MONTH, periodStart ? 1 : cal.getActualMaximum(Calendar.DAY_OF_MONTH));\n day = cal.get(Calendar.DAY_OF_MONTH);\n }\n }",
"public void sp(){\r\n afcconferencefinal[0] = afcplayoff[0];\r\n afcconferencefinal[1] = afcplayoff[1];\r\n for (int c=2;c<4;c++){\r\n int b = 7-c;\r\n int a = 5-c;\r\n int cscore;\r\n int bscore;\r\n cscore = afcplayoff[c].playoffscoregenerator(afcplayoff[c].displaypf());\r\n bscore = afcplayoff[b].playoffscoregenerator(afcplayoff[b].displaypf());\r\n if (cscore > bscore){\r\n afcconferencefinal[a] = afcplayoff[c];\r\n }\r\n else if (cscore == bscore && \r\n afcplayoff[c].playoffscoregenerator(afcplayoff[c].displaypf()) > afcplayoff[b].playoffscoregenerator(afcplayoff[b].displaypf()) ) {\r\n afcconferencefinal[a] = afcplayoff[c];\r\n }\r\n else {\r\n afcconferencefinal[a] = afcplayoff[b];\r\n }\r\n\r\n }\r\n\r\n for (int c=0;c<afcconferencefinal.length;c++){\r\n if(YourTeam.getName().equals(afcconferencefinal[c].getName()))\r\n afcplayoffconferencefinalt = true;\r\n }\r\n\r\n nfcconferencefinal[0] = nfcplayoff[0];\r\n nfcconferencefinal[1] = nfcplayoff[1];\r\n for (int c=2;c<4;c++){\r\n int b = 7-c;\r\n int a = 5-c;\r\n int cscore;\r\n int bscore;\r\n cscore = nfcplayoff[c].playoffscoregenerator(nfcplayoff[c].displaypf());\r\n bscore = nfcplayoff[b].playoffscoregenerator(nfcplayoff[b].displaypf());\r\n if (cscore > bscore){\r\n nfcconferencefinal[a] = nfcplayoff[c];\r\n }\r\n else if (cscore == bscore && \r\n nfcplayoff[c].playoffscoregenerator(nfcplayoff[c].displaypf()) > nfcplayoff[b].playoffscoregenerator(nfcplayoff[b].displaypf()) ) {\r\n nfcconferencefinal[a] = nfcplayoff[c];\r\n }\r\n else {\r\n nfcconferencefinal[a] = nfcplayoff[b];\r\n }\r\n\r\n }\r\n\r\n for (int c=0;c<nfcconferencefinal.length;c++){\r\n if(YourTeam.getName().equals(nfcconferencefinal[c].getName()))\r\n nfcplayoffconferencefinalt = true;\r\n }\r\n\r\n System.out.println(\"Now for the second round of the playoffs:\"+ \"\\n\"); \r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(afcconferencefinal[0].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" )\" );\r\n System.out.println(\" /-----/\");\r\n System.out.println(afcconferencefinal[3].getName() + \"\\n\");\r\n\r\n System.out.println(afcconferencefinal[1].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" )\" );\r\n System.out.println(\" /-----/\");\r\n System.out.println(afcconferencefinal[2].getName() + \"\\n\" );\r\n\r\n System.out.println(\"\\n\"); \r\n System.out.println(nfcconferencefinal[0].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" )\" );\r\n System.out.println(\" /-----/\");\r\n System.out.println(nfcconferencefinal[3].getName() + \"\\n\");\r\n\r\n System.out.println(nfcconferencefinal[1].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" )\" );\r\n System.out.println(\" /-----/\");\r\n System.out.println(nfcconferencefinal[2].getName() + \"\\n\" );\r\n\r\n for (int c=0;c<2;c++){ // Here all of the teams in the conference final play each other\r\n int t = 3-c;\r\n int firstscore = afcconferencefinal[c].playoffscoregenerator(afcconferencefinal[c].displaypf());\r\n int secondscore = afcconferencefinal[t].playoffscoregenerator(afcconferencefinal[t].displaypf());\r\n if (secondscore > firstscore){\r\n Temp = afcconferencefinal[c];\r\n afcconferencefinal[c] = afcconferencefinal[t];\r\n afcconferencefinal[t] = afcconferencefinal[c];\r\n }\r\n else if (secondscore == firstscore &&\r\n afcconferencefinal[t].playoffscoregenerator(afcconferencefinal[t].displaypf()) > afcconferencefinal[c].playoffscoregenerator(afcconferencefinal[c].displaypf())){\r\n Temp = afcconferencefinal[c];\r\n afcconferencefinal[c] = afcconferencefinal[t];\r\n afcconferencefinal[t] = afcconferencefinal[c];\r\n }\r\n }\r\n for (int c=0;c<2;c++){ // Here all of the teams in the conference final play each other\r\n int t = 3-c;\r\n int firstscore = nfcconferencefinal[c].playoffscoregenerator(nfcconferencefinal[c].displaypf());\r\n int secondscore = nfcconferencefinal[t].playoffscoregenerator(nfcconferencefinal[t].displaypf());\r\n if (secondscore > firstscore){\r\n Temp = nfcconferencefinal[c];\r\n nfcconferencefinal[c] = nfcconferencefinal[t];\r\n nfcconferencefinal[t] = nfcconferencefinal[c];\r\n }\r\n else if (secondscore == firstscore &&\r\n nfcconferencefinal[t].playoffscoregenerator(nfcconferencefinal[t].displaypf()) > nfcconferencefinal[c].playoffscoregenerator(nfcconferencefinal[c].displaypf())){\r\n Temp = nfcconferencefinal[c];\r\n nfcconferencefinal[c] = nfcconferencefinal[t];\r\n nfcconferencefinal[t] = nfcconferencefinal[c];\r\n }\r\n }\r\n for (int c=0;c<1;c++){\r\n if (YourTeam.getName().equals(afcconferencefinal[c].getName())){\r\n afcpresuperbowl = true; \r\n }\r\n }\r\n for (int c=0;c<1;c++){\r\n if (YourTeam.getName().equals(nfcconferencefinal[c].getName())){\r\n nfcpresuperbowl = true; \r\n }\r\n }\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(\"...\"+\"\\n\");\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(\"In the conference finals we have the following teams playing each other in the afc and in the nfc\" + \"\\n\");\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n // More demonstration to user on how the playoffs are progressing\r\n System.out.println(\"AFC:\" + \"\\n\");\r\n System.out.println(afcconferencefinal[0].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" )\" );\r\n System.out.println(\" /-----/\");\r\n System.out.println(afcconferencefinal[1].getName()+ \"\\n\");\r\n\r\n System.out.println(\"NFC:\" + \"\\n\");\r\n\r\n System.out.println(nfcconferencefinal[0].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" )\" );\r\n System.out.println(\" /-----/\");\r\n System.out.println(nfcconferencefinal[1].getName());\r\n\r\n { int firstscore = nfcconferencefinal[0].playoffscoregenerator(nfcconferencefinal[0].displaypf());\r\n int secondscore = nfcconferencefinal[1].playoffscoregenerator(nfcconferencefinal[1].displaypf());\r\n if (firstscore > secondscore){\r\n superbowl[0] = nfcconferencefinal[0];\r\n }\r\n else if (firstscore > secondscore &&\r\n nfcconferencefinal[0].playoffscoregenerator(nfcconferencefinal[0].displaypf()) > nfcconferencefinal[1].playoffscoregenerator(nfcconferencefinal[1].displaypf())){\r\n superbowl[0] = nfcconferencefinal[0];\r\n }\r\n else {\r\n superbowl[0] = nfcconferencefinal[1]; \r\n }\r\n }\r\n\r\n { int firstscore = afcconferencefinal[0].playoffscoregenerator(afcconferencefinal[0].displaypf());\r\n int secondscore = afcconferencefinal[1].playoffscoregenerator(afcconferencefinal[1].displaypf());\r\n if (firstscore > secondscore){\r\n superbowl[1] = afcconferencefinal[0];\r\n }\r\n else if (firstscore > secondscore &&\r\n afcconferencefinal[0].playoffscoregenerator(afcconferencefinal[0].displaypf()) > afcconferencefinal[1].playoffscoregenerator(afcconferencefinal[1].displaypf())){\r\n superbowl[1] = afcconferencefinal[0];\r\n }\r\n else {\r\n superbowl[1] = afcconferencefinal[1]; \r\n }\r\n }\r\n for (int c=0;c<superbowl.length;c++){\r\n if(YourTeam.getName().equals(superbowl[c].getName()))\r\n superbowlt = true;\r\n }\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(\"\\n\"+ \"...\");\r\n System.out.println(\"\\n\"+\"Now for this years long awaited Super bowl; the competing teams are:\"+ \"\\n\");\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n System.out.println(superbowl[0].getName());\r\n System.out.println(\" \\\\-----\\\\\");\r\n System.out.println(\" ) V.S\" );\r\n System.out.println(\" /-----/\");\r\n System.out.println(superbowl[1].getName()+\"\\n\");\r\n System.out.println(\"...\" + \"\\n\");\r\n try\r\n {\r\n Thread.sleep(3000);\r\n }\r\n catch (Exception e)\r\n {}\r\n { int firstscore = superbowl[0].playoffscoregenerator(superbowl[0].displaypf());\r\n int secondscore = superbowl[1].playoffscoregenerator(superbowl[1].displaypf());\r\n if (firstscore > secondscore){\r\n Champs = superbowl[0];\r\n }\r\n else if (firstscore > secondscore &&\r\n superbowl[0].playoffscoregenerator(superbowl[0].displaypf()) > superbowl[1].playoffscoregenerator(superbowl[1].displaypf())){\r\n Champs = superbowl[0];\r\n }\r\n else {\r\n Champs = superbowl[1];\r\n }\r\n }\r\n System.out.println(\"In the final minutes of the game the \" + Champs.getName() + \" pull off multiple miraculous passes to win the game.\" + \"\\n\");\r\n for (int c=0;c<league.length;c++){\r\n for (int p=0;p<31;p++) {\r\n int a = p+1;\r\n if (league[a].displaywins() > league[p].displaywins()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n else if (league[a].displaywins() == league[p].displaywins() && league[a].displaypf() > league[p].displaypf()){\r\n Temp = league[p];\r\n league[p] = league[a];\r\n league[a] = Temp;\r\n }\r\n\r\n }\r\n }\r\n for (int c=0;c<league.length;c++){\r\n if (league[c].getName().equals(selected)){\r\n System.out.println(\"Your team finished number \" + c + \" out of 32 teams, the number 1 team being the best team in the regular season.\" + \"\\n\");\r\n break;\r\n }\r\n\r\n } \r\n // Here I let the user know how his team did.\r\n if(afcplayofft == true){\r\n System.out.println(\"Your team made the playoffs.\"); \r\n }\r\n else if(nfcplayofft == true){\r\n System.out.println(\"Your team made the playoffs.\"); \r\n }\r\n else{\r\n System.out.println(\"Your team did not make the playoffs.\"); \r\n }\r\n if(afcplayoffconferencefinalt == true){\r\n System.out.println(\"Your team made wild card round.\");\r\n }\r\n else if (nfcplayoffconferencefinalt == true){\r\n System.out.println(\"Your team made the wild card round.\");\r\n }\r\n else{\r\n System.out.println(\"Your team did not make the wild card round.\");\r\n }\r\n if(afcpresuperbowl == true){\r\n System.out.println(\"Your team made the conference finals.\");\r\n }\r\n else if (nfcpresuperbowl == true){\r\n System.out.println(\"Your team made the conference finals.\");\r\n }\r\n else{\r\n System.out.println(\"Your team did not make the conference finals.\");\r\n }\r\n if(superbowlt == true){\r\n System.out.println(\"Your team made the super bowl final.\");\r\n }\r\n else{ \r\n System.out.println(\"Your team did not make the super bowl final.\");\r\n }\r\n if (selected.equals(Champs.getName())){\r\n System.out.println(\"Your team won the super bowl!\");\r\n }\r\n else{\r\n System.out.println(\"Your team did not win the super bowl.\" + \"\\n\");\r\n }\r\n System.out.println(\"Simulation Terminated!\");\r\n\r\n }",
"public void recomendarTempos() {\n ArrayList iTXCH = new ArrayList(); /// Instancias pre fusion\n ArrayList iTYCH = new ArrayList();\n ArrayList iTZCH = new ArrayList();\n\n ArrayList cenTXCH = new ArrayList(); /// Centroides Tempos tempos ch\n ArrayList cenTYCH = new ArrayList();\n ArrayList cenTZCH = new ArrayList();\n\n ArrayList cenTXDB = new ArrayList(); /// centroide tempos db\n ArrayList cenTYDB = new ArrayList();\n ArrayList cenTZDB = new ArrayList();\n\n ArrayList insTXCH = new ArrayList(); /// Instancias fusion\n ArrayList insTYCH = new ArrayList();\n ArrayList insTZCH = new ArrayList();\n\n ArrayList ppTXCH = new ArrayList(); /// centroide promedio ponderado tempos\n ArrayList ppTYCH = new ArrayList();\n ArrayList ppTZCH = new ArrayList();\n\n ArrayList ppTXDB = new ArrayList(); /// centroide promedio ponderado duracion\n ArrayList ppTYDB = new ArrayList();\n ArrayList ppTZDB = new ArrayList();\n\n ArrayList paTXCH = new ArrayList(); /// centroide promedio aritmetico tempos ch\n ArrayList paTYCH = new ArrayList();\n ArrayList paTZCH = new ArrayList();\n\n ArrayList paTXDB = new ArrayList(); /// centroide promedio artimetico tempos db\n ArrayList paTYDB = new ArrayList();\n ArrayList paTZDB = new ArrayList();\n\n////////////////// TEMPO EN X ////////////////////////////// \n ////////// calinsky - harabaz /////////\n if (txchs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXCH = CExtraer.arrayTempoXCprueba;\n iTXCH = CExtraer.arrayTempoXIprueba;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXCH.setText(cenTXCH.get(iposision).toString());\n }\n\n if (txchs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n ppTXCH = CFusionar.arregloPPTX1;\n\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n\n System.out.println(iposision);\n\n }\n }\n valorTXCH.setText(ppTXCH.get(iposision).toString());\n }\n\n if (txchs == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n paTXCH = CFusionar.arregloPATX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXCH.setText(paTXCH.get(iposision).toString());\n\n }\n\n //////////// davies bouldin //////////////\n if (txdbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTXDB = CExtraer.arrayTempoXCprueba;\n iTXCH = CExtraer.arrayTempoXIprueba;\n res = Double.parseDouble((String) iTXCH.get(0));\n for (int i = 0; i < iTXCH.size(); i++) {\n if (Double.parseDouble((String) iTXCH.get(i)) > res) {\n System.out.println(iTXCH.get(i));\n res = Double.parseDouble((String) iTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB.setText(cenTXDB.get(iposision).toString());\n }\n\n if (txdbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n ppTXDB = CFusionar.arregloPPTX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n System.out.println(insTXCH.get(i));\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTXDB.setText(ppTXDB.get(iposision).toString());\n }\n if (txdbs == \"Fusion PA\") {\n\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTXCH = CFusionar.arregloInstanciasTX1;\n paTXDB = CFusionar.arregloPATX1;\n res = Double.parseDouble((String) insTXCH.get(0));\n for (int i = 0; i < insTXCH.size(); i++) {\n if (Double.parseDouble((String) insTXCH.get(i)) > res) {\n res = Double.parseDouble((String) insTXCH.get(i));\n iposision = i;\n }\n }\n valorTXDB.setText(paTXDB.get(iposision).toString());\n\n }\n\n ///////////// TEMPO EN Y //////////// \n //////////// calinsky - harabaz /////////////\n if (tychs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYCH = CExtraer.arrayTempoYCprueba;\n iTYCH = CExtraer.arrayTempoYIprueba;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYCH.setText(cenTYCH.get(iposision).toString());\n }\n\n if (tychs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n ppTYCH = CFusionar.arregloPPTY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH.setText(ppTYCH.get(iposision).toString());\n\n }\n\n if (tychs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n paTYCH = CFusionar.arregloPATY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYCH.setText(paTYCH.get(iposision).toString());\n }\n /////////// davies - bouldin /////////////\n if (tydbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTYDB = CExtraer.arrayTempoYCprueba;\n iTYCH = CExtraer.arrayTempoYIprueba;\n res = Double.parseDouble((String) iTYCH.get(0));\n for (int i = 0; i < iTYCH.size(); i++) {\n if (Double.parseDouble((String) iTYCH.get(i)) > res) {\n System.out.println(iTYCH.get(i));\n res = Double.parseDouble((String) iTYCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTYDB.setText(cenTYDB.get(iposision).toString());\n }\n\n if (tydbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n ppTYDB = CFusionar.arregloPPTY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB.setText(ppTYDB.get(iposision).toString());\n }\n if (tydbs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTYCH = CFusionar.arregloInstanciasTY1;\n paTYDB = CFusionar.arregloPATY1;\n res = Double.parseDouble((String) insTYCH.get(0));\n for (int i = 0; i < insTYCH.size(); i++) {\n if (Double.parseDouble((String) insTYCH.get(i)) > res) {\n res = Double.parseDouble((String) insTYCH.get(i));\n iposision = i;\n }\n }\n valorTYDB.setText(paTYDB.get(iposision).toString());\n }\n\n ///////////// TEMPO EN Z //////////// \n ///////////// calinsky harabaz ///////////////////\n if (tzchs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZCH = CExtraer.arrayTempoZCprueba;\n iTZCH = CExtraer.arrayTempoZIprueba;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZCH.setText(cenTZCH.get(iposision).toString());\n }\n\n if (tzchs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n ppTZCH = CFusionar.arregloPPTZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH.setText(ppTZCH.get(iposision).toString());\n }\n if (tzchs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n paTZCH = CFusionar.arregloPATZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZCH.setText(paTZCH.get(iposision).toString());\n }\n\n ///////////// davies bouldin /////////////////// \n if (tzdbs == \"Pre Fusion\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n cenTZDB = CExtraer.arrayTempoZCprueba;\n iTZCH = CExtraer.arrayTempoZIprueba;\n res = Double.parseDouble((String) iTZCH.get(0));\n for (int i = 0; i < iTZCH.size(); i++) {\n if (Double.parseDouble((String) iTZCH.get(i)) > res) {\n System.out.println(iTZCH.get(i));\n res = Double.parseDouble((String) iTZCH.get(i));\n iposision = i;\n System.out.println(iposision);\n }\n }\n valorTZDB.setText(cenTZDB.get(iposision).toString());\n }\n\n if (tzdbs == \"Fusion PP\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n ppTZDB = CFusionar.arregloPPTZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB.setText(ppTZDB.get(iposision).toString());\n }\n //////////\n if (tzdbs == \"Fusion PA\") {\n double res = 0;\n double cont = 0;\n int iposision = 0;\n\n insTZCH = CFusionar.arregloInstanciasTZ1;\n paTZDB = CFusionar.arregloPATZ1;\n res = Double.parseDouble((String) insTZCH.get(0));\n for (int i = 0; i < insTZCH.size(); i++) {\n if (Double.parseDouble((String) insTZCH.get(i)) > res) {\n res = Double.parseDouble((String) insTZCH.get(i));\n iposision = i;\n }\n }\n valorTZDB.setText(paTZDB.get(iposision).toString());\n }\n\n }",
"public void GetAvailableDates()\n\t{\n\t\topenDates = new ArrayList<TimePeriod>(); \n\t\t\n\t\ttry\n\t\t{\n\t\t\tConnector con = new Connector();\n\t\t\t\n\t\t\tString query = \"SELECT startDate, endDate FROM Available WHERE available_hid = '\"+hid+\"'\"; \n\t\t\tResultSet rs = con.stmt.executeQuery(query);\n\t\t\t\n\t\t\twhile(rs.next())\n\t\t\t{\n\t\t\t\tTimePeriod tp = new TimePeriod(); \n\t\t\t\ttp.stringStart = rs.getString(\"startDate\"); \n\t\t\t\ttp.stringEnd = rs.getString(\"endDate\"); \n\t\t\t\ttp.StringToDate();\n\t\t\t\t\n\t\t\t\topenDates.add(tp); \n\t\t\t}\n\t\t\tcon.closeConnection(); \n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\t}",
"protected void initBeats() {\n\t\tEventList beatTimes = gui.getBeatData();\n\t\tbeats = new long[beatTimes.size()];\n\t\tlevel = new int[beatTimes.size()];\n\t\tint mask = (1 << GUI.percussionCount) - 1;\n\t\tint i = 0;\n\t\tfor (Event ev: beatTimes.l) {\n\t\t\tbeats[i] = (long) Math.round(ev.keyDown * currentFile.frameRate) *\n\t\t\t\t\t\tcurrentFile.frameSize;\n\t\t\tint lev = 0;\n\t\t\tfor (int flag = ev.flags & mask; flag > 0; flag >>= 1)\n\t\t\t\tlev++;\n\t\t\tlevel[i] = lev > 0? lev - 1: 0;\n\t\t\ti++;\n\t\t}\n\t\tbeatIndex = 0;\n\t\twhile ((beatIndex < beats.length) && (beats[beatIndex] < currentPosition))\n\t\t\tbeatIndex++;\n\t}",
"protected final List<LocRefPoint> checkAndAdjustOffsets(\n\t\t\tfinal LocRefData lrd, final OpenLREncoderProperties properties)\n\t\t\tthrows OpenLRProcessingException {\n\t\tList<LocRefPoint> checkedAndAdjusted = lrd.getLocRefPoints();\n\t\tLocation location = lrd.getLocation();\n\t\tExpansionData expansion = lrd.getExpansionData();\n\t\tint startLength = checkedAndAdjusted.get(0).getDistanceToNext();\n\t\tint totalPosOff = location.getPositiveOffset()\n\t\t\t\t+ expansion.getExpansionLengthStart();\n\t\twhile (totalPosOff > startLength) {\n\t\t\tif (expansion.hasExpansionStart()) {\n\t\t\t\tif (!expansion.modifyExpansionAtStart(checkedAndAdjusted.get(0)\n\t\t\t\t\t\t.getRoute())) {\n\t\t\t\t\tthrow new OpenLREncoderProcessingException(\n\t\t\t\t\t\t\tEncoderProcessingError.OFFSET_TRIMMING_FAILED);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlrd.addToReducedPosOff(startLength);\n\t\t\t}\n\t\t\tcheckedAndAdjusted.remove(0);\n\t\t\tif (checkedAndAdjusted.size() < 2) {\n\t\t\t\tthrow new OpenLREncoderProcessingException(\n\t\t\t\t\t\tEncoderProcessingError.OFFSET_TRIMMING_FAILED);\n\t\t\t}\n\t\t\tstartLength = checkedAndAdjusted.get(0).getDistanceToNext();\n\t\t\ttotalPosOff = location.getPositiveOffset()\n\t\t\t\t\t+ expansion.getExpansionLengthStart()\n\t\t\t\t\t- lrd.getReducedPosOff();\n\t\t}\n\n\t\tint endLength = checkedAndAdjusted.get(checkedAndAdjusted.size() - 2)\n\t\t\t\t.getDistanceToNext();\n\t\tint totalNegOff = location.getNegativeOffset()\n\t\t\t\t+ expansion.getExpansionLengthEnd();\n\t\twhile (totalNegOff > endLength) {\n\t\t\tif (expansion.hasExpansionEnd()) {\n\t\t\t\tif (!expansion.modifyExpansionAtEnd(checkedAndAdjusted.get(\n\t\t\t\t\t\tcheckedAndAdjusted.size() - 2).getRoute())) {\n\t\t\t\t\tthrow new OpenLREncoderProcessingException(\n\t\t\t\t\t\t\tEncoderProcessingError.OFFSET_TRIMMING_FAILED);\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tlrd.addToReducedNegOff(endLength);\n\t\t\t}\n\t\t\t// remove last LRP\n\t\t\tcheckedAndAdjusted.remove(checkedAndAdjusted.size() - 1);\n\t\t\tif (checkedAndAdjusted.size() < 2) {\n\t\t\t\tthrow new OpenLREncoderProcessingException(\n\t\t\t\t\t\tEncoderProcessingError.OFFSET_TRIMMING_FAILED);\n\t\t\t}\n\t\t\t\n\t\t\tLocRefPoint oldLastLRP = checkedAndAdjusted.get(checkedAndAdjusted\n\t\t\t\t\t.size() - 1);\n\t\t\tLocRefPoint prevLRP = checkedAndAdjusted.get(checkedAndAdjusted\n\t\t\t\t\t.size() - 2);\n\t\t\tLocRefPoint newLastLRP;\n\t\t\tif (oldLastLRP.isLRPOnLine()) {\n\t\t\t\tnewLastLRP = new LocRefPoint(oldLastLRP.getLine(), oldLastLRP.getLongitudeDeg(), oldLastLRP.getLatitudeDeg(), properties, true);\n\t\t\t} else {\n\t\t\t\tnewLastLRP = new LocRefPoint(prevLRP.getLastLineOfSubRoute(), properties);\n\t\t\t}\n\t\t\tcheckedAndAdjusted.remove(checkedAndAdjusted.size() - 1);\n\t\t\tprevLRP.setNextLRP(newLastLRP);\n\t\t\tcheckedAndAdjusted.add(newLastLRP);\n\t\t\t\n\t\t\tendLength = checkedAndAdjusted.get(checkedAndAdjusted.size() - 2)\n\t\t\t\t\t.getDistanceToNext();\n\t\t\ttotalNegOff = location.getNegativeOffset()\n\t\t\t\t\t+ expansion.getExpansionLengthEnd()\n\t\t\t\t\t- lrd.getReducedNegOff();\n\t\t}\n\t\treturn checkedAndAdjusted;\n\t}",
"private float calculateAngles(){\n\t\t// First we will move the current angle heading into the previous angle heading slot.\n\t\tdata.PID.headings[0] = data.PID.headings[1];\n\t\t// Then, we assign the new angle heading.\n\t\tdata.PID.headings[1] = data.imu.getAngularOrientation().firstAngle;\n\n\t\t// Finally we calculate a computedTarget from the current angle heading.\n\t\tdata.PID.computedTarget = data.PID.headings[1] + (data.PID.IMURotations * 360);\n\n\t\t// Now we determine if we need to re-calculate the angles.\n\t\tif(data.PID.headings[0] > 300 && data.PID.headings[1] < 60) {\n\t\t\tdata.PID.IMURotations++; //rotations of 360 degrees\n\t\t\tcalculateAngles();\n\t\t} else if(data.PID.headings[0] < 60 && data.PID.headings[1] > 300) {\n\t\t\tdata.PID.IMURotations--;\n\t\t\tcalculateAngles();\n\t\t}\n\t\treturn data.PID.headings[1];\n\t}",
"private void processSound() {\r\n if (!isEnabled) {\r\n return;\r\n }\r\n\r\n Thread.currentThread().setPriority(Thread.MAX_PRIORITY);\r\n\r\n byte[] data = new byte[line.available()];\r\n if (data.length == 0) {\r\n return;\r\n }\r\n\r\n line.read(data, 0, data.length);\r\n \r\n double[][] partitionedAndTransformedData =\r\n getPartitionedAndTransformedData(SOUND_PARTITIONS, data);\r\n \r\n double[] offMagnitudes = getPartitionedFrequencyMagnitudes(\r\n Constants.FREQUENCY_OFF,\r\n partitionedAndTransformedData,\r\n Constants.SAMPLE_RATE);\r\n double[] offOffsetMagnitudes = getPartitionedFrequencyMagnitudes(\r\n Constants.FREQUENCY_OFF + Constants.FREQUENCY_SECOND_OFFSET,\r\n partitionedAndTransformedData,\r\n Constants.SAMPLE_RATE);\r\n double[] onMagnitudes = getPartitionedFrequencyMagnitudes(\r\n Constants.FREQUENCY_ON,\r\n partitionedAndTransformedData,\r\n Constants.SAMPLE_RATE);\r\n double[] onOffsetMagnitudes = getPartitionedFrequencyMagnitudes(\r\n Constants.FREQUENCY_ON + Constants.FREQUENCY_SECOND_OFFSET,\r\n partitionedAndTransformedData,\r\n Constants.SAMPLE_RATE);\r\n \r\n double offMagnitudeSum = 0.0;\r\n double onMagnitudeSum = 0.0;\r\n \r\n for (int i = 0; i < SOUND_PARTITIONS; i++) {\r\n double offMagnitude = offMagnitudes[i] + offOffsetMagnitudes[i];\r\n double onMagnitude = onMagnitudes[i] + onOffsetMagnitudes[i];\r\n \r\n offMagnitudeSum += offMagnitude;\r\n onMagnitudeSum += onMagnitude;\r\n \r\n// System.out.printf(\"%.2f %.2f%n\", offMagnitude, onMagnitude);\r\n\r\n boolean value = onMagnitude > offMagnitude;\r\n \r\n audioSignalParser.addSignal(value);\r\n \r\n if (value) {\r\n offRunningAverage.add(offMagnitude);\r\n } else {\r\n onRunningAverage.add(onMagnitude);\r\n }\r\n }\r\n\r\n if (offRunningAverage.haveAverage() && onRunningAverage.haveAverage()) {\r\n double offMagnitudeAverage = offMagnitudeSum / SOUND_PARTITIONS;\r\n double onMagnitudeAverage = onMagnitudeSum / SOUND_PARTITIONS;\r\n\r\n boolean isLineFree = \r\n Statistics.isWithinAverage(\r\n onMagnitudeAverage,\r\n onRunningAverage.getAverage(),\r\n onRunningAverage.getStandardDeviation(),\r\n 3 /* deviations */)\r\n && Statistics.isWithinAverage(\r\n offMagnitudeAverage,\r\n offRunningAverage.getAverage(),\r\n offRunningAverage.getStandardDeviation(),\r\n 3 /* deviations */);\r\n lineActivity.add(isLineFree ? 0 : 1);\r\n }\r\n }",
"private Set calculateTimeSet() {\n List choices = getDataChoices();\n if (choices.isEmpty()) {\n return null;\n }\n Set newSet = null;\n for (int i = 0; i < choices.size(); i++) {\n try {\n VerticalProfileInfo info = getVPInfo(i);\n GridDataInstance dataInstance = info.getDataInstance();\n Set set = GridUtil.getTimeSet(dataInstance.getGrid());\n //System.out.println(\"di.timeset[\"+i+\"] = \" + set);\n if (set != null) {\n if (newSet == null) {\n newSet = set;\n } else {\n newSet = newSet.merge1DSets(set);\n }\n }\n } catch (Exception e) {\n logger.error(\"Problem calculating TimeSet\", e);\n }\n }\n //System.out.println(\"merged time set = \" + newSet);\n return newSet;\n }",
"private static void analyse1() {\n\t\tList<String> twoYearIncomeInRateList2 = getTwoYearIncomeInRateList(BasicAnalyse.stockBasicMap.keySet(), 0, 10000, \"2016-4\", \"2015-4\");\r\n\t\tList<String> twoYearIncomeInRateList = getTwoYearIncomeInRateList(twoYearIncomeInRateList2, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoYearProfitInRateList = getTwoYearProfitInRateList(twoYearIncomeInRateList, 0, 10000, \"2017-2\", \"2016-2\");\r\n\t\tList<String> twoSeasonIncomeInRateList = getTwoSeasonIncomeInRateList(twoYearProfitInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tList<String> twoSeasonProfitInRateList = getTwoSeasonProfitInRateList(twoSeasonIncomeInRateList, 0, 10000, \"2017-2\", \"2017-1\");\r\n\t\tHashMap<String, List<HistoryDomain>> codeHisMap = HistoryAnalyse.getCodeHisMap(HistoryAnalyse.historyMap, twoSeasonProfitInRateList);\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateMap = HistoryAnalyse.getOrderDateMap(codeHisMap);\r\n\t\tHashMap<String, String> dieTingTimeMap = PriceAnalyse.getDieTingLastTimeMap(orderDateMap, 5, -100, -20);\r\n\t\tHashMap<String, String> endDateMap = AnalyseUtil.getCodeDateMap(orderDateMap.keySet(), \"2017-10-13\");\r\n\t\tHashMap<String, List<HistoryDomain>> orderDateDTMap = HistoryAnalyse.getCodeHisMap(orderDateMap, dieTingTimeMap.keySet());\r\n\t\tHashMap<String, List<HistoryDomain>> afterDieTingHisMap = HistoryAnalyse.getHisMapByStartAndEndDateMap(orderDateDTMap, dieTingTimeMap, endDateMap);\r\n\t\tHashMap<String, Double> highestFlowInRate = PriceAnalyse.getHighestFlowInRate(afterDieTingHisMap, -2000, 20);\r\n\t\tHashMap<String, List<String>> conceptListMap = ConceptAnalyse.getConceptListMap(highestFlowInRate.keySet());\r\n\r\n\t\t\r\n\t\tSystem.out.println(conceptListMap);\r\n\t}",
"public void handleWave(int frame, double waveData[], int length) {\n\t\tdemodulatedTextStringBuffer = new StringBuffer();\n\n\t\t// mix wavedata with phasor rotating at set frequency\n\t\tComplex result[] = mixer.mixIQ(waveData, length);\n\n\t\t// filter the wave data\n\t\tComplex result1[] = filter1.filter(result, length);\n\t\tint nunberOfSymbols = length / (symbolLength / 16);\n\t\tComplex result2[] = filter2.filter(result1, nunberOfSymbols);\n\n\t\t// work out position of bit in window\n\t\tfor (int sample = 0; sample < nunberOfSymbols; sample++) {\n\t\t\tComplex z = result2[sample];\n\t\t\tdouble zmag = z.abs();\n\t\t\tdouble sum = 0.0;\n\t\t\tdouble ampsum = 0.0;\n\t\t\tint idx = (int) bitClock;\n\n\t\t\t// decaying average - insert current sample magnitude\n\t\t\tsynchronisationBuffer[idx] = 0.8 * synchronisationBuffer[idx] + 0.2 * zmag;\n\n\t\t\t// added correction as per PocketDigi\n\t\t\t// vastly improved performance with synchronous interference !!\n\t\t\tfor (int i = 0; i < 8; i++) {\n\t\t\t\tsum += (synchronisationBuffer[i] - synchronisationBuffer[i + 8]);\n\t\t\t\tampsum += (synchronisationBuffer[i] + synchronisationBuffer[i + 8]);\n\t\t\t}\n\t\t\tsum = (ampsum == 0.0 ? 0.0 : (sum / ampsum));\n\t\t\tbitClock -= (sum / 5.0);\n\n\t\t\t// time minor ticks\n\t\t\tbitClock += 1;\n\n\t\t\t// ensure bitClock is between 0 and 16\n\t\t\tif (bitClock < 0) {\n\t\t\t\tbitClock += 16.0;\n\t\t\t}\n\t\t\tif (bitClock >= 16.0) {\n\t\t\t\tbitClock -= 16.0;\n\n\t\t\t\t// process symbol on each major time tick\n\t\t\t\treceiveSymbol(z);\n\t\t\t}\n\t\t}\n\n\t\tString demodulatedText = demodulatedTextStringBuffer.toString();\n\t\tcontroller.handleText(frame, demodulatedText);\n\t}",
"public PoliceObject[] getPolice(String type, String startDate, String endDate) {\n LinkedList<PoliceObject> list = new LinkedList<>();\n\n boolean hasType = (!type.equals(\"*\"));\n boolean hasStart = (!startDate.equals(\"*\"));\n boolean hasEnd = (!endDate.equals(\"*\"));\n boolean hasDate = (hasStart && hasEnd);\n\n if (hasType && hasDate) {\n LocalDate formattedStart = LocalDate.parse(startDate);\n LocalDate formattedEnd = LocalDate.parse(endDate);\n\n this.policeDB.values().forEach(e -> {\n if (e.getType().equals(type)) {\n if (checkDate(e, formattedStart, formattedEnd)) {\n list.add(e);\n }\n }\n });\n } else if (hasType) {\n this.policeDB.values().forEach(e -> {\n if (e.getType().equals(type)) {\n list.add(e);\n }\n });\n } else if (hasDate) {\n LocalDate formattedStart = LocalDate.parse(startDate);\n LocalDate formattedEnd = LocalDate.parse(endDate);\n\n this.policeDB.values().forEach(e -> {\n if (checkDate(e, formattedStart, formattedEnd)) {\n list.add(e);\n }\n });\n } else {\n list.addAll(this.policeDB.values());\n }\n\n PoliceObject[] array = new PoliceObject[list.size()];\n for (int i=0; i<list.size(); i++) {\n array[i] = list.get(i);\n }\n\n return array;\n }",
"private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}",
"protected void afterTimeSlices()\n\t\tthrows DbCompException\n\t{\n//AW:AFTER_TIMESLICES\n // This code will be executed once after each group of time slices.\n // For TimeSlice algorithms this is done once after all slices.\n // For Aggregating algorithms, this is done after each aggregate\n // period.\n ComputationDAI compdao = tsdb.makeComputationDAO(); \n ArrayList<TimeSeriesIdentifier> tsids = new ArrayList<TimeSeriesIdentifier>();\n TimeSeriesDAI tsdai = tsdb.makeTimeSeriesDAO();\n TimeSeriesIdentifier itsid = getParmTsId(\"input\");\n CTimeSeries icts = new CTimeSeries(itsid.getKey(),itsid.getInterval(),itsid.getTableSelector());\n try {\n tsdai.fillTimeSeriesMetadata(icts);\n int fillDependentCompIds = tsdb.fillDependentCompIds(icts, comp.getAppId() );\n } catch (DbIoException ex) {\n Logger.getLogger(QueueFromFixedTS.class.getName()).log(Level.SEVERE, null, ex);\n } catch (BadTimeSeriesException ex) {\n Logger.getLogger(QueueFromFixedTS.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n HashSet<DbKey> dependentCompIds = icts.getDependentCompIds();\n for( DbKey key: dependentCompIds){\n if( !key.equals( this.comp.getKey() )){ // we don't want an endless loop\n DbComputation mycomp;\n try {\n mycomp = compdao.getComputationById(key);\n if( mycomp.hasGroupInput() && mycomp.isEnabled() ){\n for( DbCompParm parm: mycomp.getParmList() ){\n debug3(parm.getDataTypeId().toString());\n if( parm.isInput() && parm.getSiteDataTypeId().isNull() ){ \n DataType dt = parm.getDataType();\n TsGroup group = mycomp.getGroup();\n //group.addIntervalCode(parm.getInterval());\n //group.addVersion( parm.getVersion() );\n group.addOtherMember(\"version\", parm.getVersion());\n group.addDataTypeId(dt.getKey());\n group.setTransient(); \n group.clearExpandedList();\n //group.refilter(tsdb);\n tsids = tsdb.expandTsGroup(group); \n break; // we got what we need\n }\n\n }\n }\n \n CTimeSeries cts = null;\n for( TimeSeriesIdentifier tsid: tsids ){\n debug3(\"inserting data for \" + tsid.getUniqueString() );\n cts = new CTimeSeries(tsid.getKey(), tsid.getInterval(), tsid.getTableSelector() ); \n tsdai.fillTimeSeries(cts, dates);\n // a little odd, but we are just trying to requeue data\n TimedVariable tv = null;\n for( int i = 0; i < cts.size(); i++ ){\n tv = cts.sampleAt(i);\n tv.setFlags( tv.getFlags() | VarFlags.TO_WRITE );\n }\n tsdai.saveTimeSeries(cts);\n debug3(\"saved data to database\");\n \n }\n \n \n } catch (DbIoException ex) {\n warning(\"database connection failed\");\n } catch (NoSuchObjectException ex) {\n debug3(\"no comp for key \" + key);\n } catch (BadTimeSeriesException ex) {\n debug3(\"could read timeseries data\");\n }\n \n \n }\n \n }\n tsdai.close();\n compdao.close();\n \n//AW:AFTER_TIMESLICES_END\n;\n\t}",
"public static List<Punto> getPuntos(){\n\t\t\n\t\tList<Punto> puntos = new ArrayList<Punto>();\n\t\ttry{\n\n\t\t\t//-12.045916, -75.195270\n\t\t\t\n\t\t\tPunto p1 = new Punto(1,-12.037512,-75.183327,0.0);\n\t\t\tp1.setDatos(getDatos(\"16/06/2017 09:00:00\", 2 , 1));\n\t\t\t\n\t\t\tPunto p2 = new Punto(2,-12.041961,-75.184786,0.0);\n\t\t\tp2.setDatos(getDatos(\"16/06/2017 09:00:00\",1 , 2));\n\t\t\t\n\t\t\tPunto p3 = new Punto(3,-12.0381,-75.1841,0.0);\n\t\t\tp3.setDatos(getDatos(\"16/06/2017 09:00:00\",2 , 2));\n\t\t\t\n\t\t\tPunto p4 = new Punto(4,-12.041542,-75.185816,0.0);\n\t\t\tp4.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p5 = new Punto(5,-12.037764,-75.181096,0.0);\n\t\t\tp5.setDatos(getDatos(\"16/06/2017 11:15:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p6 = new Punto(6,-12.042801,-75.190108,0.0);\n\t\t\tp6.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p7 = new Punto(7,-12.04364,-75.184014,0.0);\n\t\t\tp7.setDatos(getDatos(\"16/06/2017 11:00:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p8 = new Punto(8,-12.045739,-75.185387,0.0);\n\t\t\tp8.setDatos(getDatos(\"16/06/2017 11:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p9 = new Punto(9,-12.04683,-75.187361,0.0);\n\t\t\tp9.setDatos(getDatos(\"16/06/2017 11:50:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p10 = new Punto(10,-12.050775,-75.187962,0.0);\n\t\t\tp10.setDatos(getDatos(\"16/06/2017 12:30:00\",0 , 0));\n\t\t\t\n\t\t\tPunto p11 = new Punto(11,-12.053797,-75.184271,0.0);\n\t\t\tp11.setDatos(getDatos(\"16/06/2017 13:00:00\",0 , 0));\n\t\t\t\n\t\t\tpuntos.add(p8);\n\t\t\tpuntos.add(p9);\n\t\t\tpuntos.add(p3);\n\t\t\tpuntos.add(p4);\n\t\t\tpuntos.add(p5);\n\t\t\tpuntos.add(p6);\n\t\t\tpuntos.add(p7);\n\t\t\tpuntos.add(p10);\n\t\t\tpuntos.add(p1);\n\t\t\tpuntos.add(p2);\n\t\t\tpuntos.add(p11);\n\t\t\t\n\t\t\t\n\t\t}catch(Exception e ){\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t\treturn puntos;\n\t\n\t}",
"private static final void silk_decode_pitch(final short lagIndex, final byte contourIndex, final int pitch_lags[], final int Fs_kHz, final int nb_subfr)\r\n\t{\r\n\t\t//final byte[] Lag_CB_ptr;\r\n\t\tfinal byte[][] Lag_CB_ptr;\r\n\r\n\t\tif( Fs_kHz == 8 ) {\r\n\t\t\tif( nb_subfr == Jpitch_est_defines.PE_MAX_NB_SUBFR ) {\r\n\t\t\t\t// Lag_CB_ptr = Jpitch_est_tables.silk_CB_lags_stage2[ 0 ];//[ 0 ];\r\n\t\t\t\tLag_CB_ptr = Jpitch_est_tables.silk_CB_lags_stage2;\r\n\t\t\t\t// cbk_size = Jpitch_est_defines.PE_NB_CBKS_STAGE2_EXT;\r\n\t\t\t} else {\r\n\t\t\t\t// celt_assert( nb_subfr == Jpitch_est_defines.PE_MAX_NB_SUBFR >> 1 );\r\n\t\t\t\t// Lag_CB_ptr = Jpitch_est_tables.silk_CB_lags_stage2_10_ms[ 0 ];//[ 0 ];\r\n\t\t\t\tLag_CB_ptr = Jpitch_est_tables.silk_CB_lags_stage2_10_ms;\r\n\t\t\t\t// cbk_size = Jpitch_est_defines.PE_NB_CBKS_STAGE2_10MS;\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tif( nb_subfr == Jpitch_est_defines.PE_MAX_NB_SUBFR ) {\r\n\t\t\t\t// Lag_CB_ptr = Jpitch_est_tables.silk_CB_lags_stage3[ 0 ];//[ 0 ];\r\n\t\t\t\tLag_CB_ptr = Jpitch_est_tables.silk_CB_lags_stage3;\r\n\t\t\t\t// cbk_size = Jpitch_est_defines.PE_NB_CBKS_STAGE3_MAX;\r\n\t\t\t} else {\r\n\t\t\t\t// celt_assert( nb_subfr == Jpitch_est_defines.PE_MAX_NB_SUBFR >> 1 );\r\n\t\t\t\t// Lag_CB_ptr = Jpitch_est_tables.silk_CB_lags_stage3_10_ms[ 0 ];//[ 0 ];\r\n\t\t\t\tLag_CB_ptr = Jpitch_est_tables.silk_CB_lags_stage3_10_ms;\r\n\t\t\t\t// cbk_size = Jpitch_est_defines.PE_NB_CBKS_STAGE3_10MS;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tfinal int min_lag = Jpitch_est_defines.PE_MIN_LAG_MS * Fs_kHz;\r\n\t\tfinal int max_lag = Jpitch_est_defines.PE_MAX_LAG_MS * Fs_kHz;\r\n\t\tfinal int lag = min_lag + lagIndex;\r\n\r\n\t\tfor( int k = 0; k < nb_subfr; k++ ) {\r\n\t\t\t// pitch_lags[ k ] = lag + (int)Lag_CB_ptr[k * cbk_size + contourIndex];// FIXME dirty way using 2-dimensional array\r\n\t\t\tint v = lag + (int)Lag_CB_ptr[ k ][ contourIndex ];\r\n\t\t\tv = (v > max_lag ? max_lag : (v < min_lag ? min_lag : v));\r\n\t\t\tpitch_lags[ k ] = v;\r\n\t\t}\r\n\t}",
"public void updateOscilloscopeData() {\n rmsSum = 0;\n boolean overshoot = false;\n int reactorFrequency = getReactorFrequency().intValue();\n int reactorAmplitude = getReactorAmplitude().intValue();\n double reactorPhase = getReactorPhase().doubleValue();\n int controlFrequency = getControlFrequency().intValue();\n int controlAmplitude = getControlAmplitude().intValue();\n double controlPhase = getControlPhase().doubleValue();\n for (int i = 0; i < 40; i++) { \n Double reactorValue = reactorAmplitude * Math.sin(2 * Math.PI * reactorFrequency * ((double) i * 5 / 10000) + reactorPhase);\n Double controlValue = controlAmplitude * Math.sin(2 * Math.PI * controlFrequency * ((double) i * 5 / 10000) + controlPhase);\n if (reactorValue + controlValue > 150) {\n this.outputData.get(0).getData().get(i).setYValue(149);\n overshoot = true;\n } else if (reactorValue + controlValue < -150) {\n this.outputData.get(0).getData().get(i).setYValue(-149);\n overshoot = true;\n } else {\n this.outputData.get(0).getData().get(i).setYValue(reactorValue + controlValue);\n }\n if (this.online == true) {\n this.rmsSum = this.rmsSum + Math.pow(reactorValue + controlValue, 2);\n }\n }\n calculateOutputPower();\n checkForInstability(overshoot);\n }",
"public void process( List<Point2D_F64> detectedDots ) {\n\t\t// Reset the tracker\n\t\tcurrentTracks.reset();\n\t\tglobalId_to_track.clear();\n\n\t\tdouble nano0 = System.nanoTime();\n\t\tperformTracking(detectedDots);\n\t\tdouble nano1 = System.nanoTime();\n\t\tperformDetection(detectedDots);\n\t\tdouble nano2 = System.nanoTime();\n\t\tsetTrackDescriptionsAndID();\n\t\tdouble nano3 = System.nanoTime();\n\n\t\tthis.timeTrack = (nano1 - nano0)*1e-6;\n\t\tthis.timeDetect = (nano2 - nano1)*1e-6;\n\t\tthis.timeUpdate = (nano3 - nano2)*1e-6;\n\t}",
"private void PeriodMeanEvaluation () {\n\n float x = 0;\n for(int i = 0; i < 3; i++)\n {\n for(int j = 0; j < numberOfSample; j++)\n {\n x = x + singleFrame[j][i];\n }\n meanOfPeriodCoord[i] = (x/numberOfSample);\n x = 0;\n }\n }",
"private List<DataPoint> getDeckPlottingPoints(List<Deck> decks) {\n // List<List<QuizAttempt>> listsToMerge = new ArrayList<>();\n //\n // for (Deck deck : decks) {\n // listsToMerge.add(deck.getQuizAttempts());\n // }\n\n List<DataPoint> ret = new ArrayList<>();\n\n Queue<QuizAttempt> pq = new PriorityQueue<>(Comparator.comparing(QuizAttempt::getTakenAt));\n\n for (Deck deck : decks) {\n for (QuizAttempt qa : deck.getQuizAttempts()) {\n pq.offer(qa);\n }\n }\n\n while (!pq.isEmpty()) {\n QuizAttempt attempt = pq.poll();\n LocalDateTime takenAt = attempt.getTakenAt();\n double scoreInPercentage = attempt.getScore().getScoreInPercentage();\n ret.add(new DataPoint(takenAt, scoreInPercentage));\n }\n\n return ret;\n\n // return mergeSortedListsOfAttempts(listsToMerge);\n }",
"private float[] generateParticleVelocities()\n {\n float velocities[] = new float[mEmitRate * 3];\n for ( int i = 0; i < mEmitRate * 3; i +=3 )\n {\n Vector3f nexVel = getNextVelocity();\n velocities[i] = nexVel.x;\n velocities[i+1] = nexVel.y;\n velocities[i+2] = nexVel.z;\n }\n return velocities;\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 }",
"private void computePresentPleyers() {\n\t\tthis.presentPlayerKeys = new ArrayList<>();\n\t\tList<ChesspairingPlayer> players = mTournament.getPlayers();\n\t\tfor (ChesspairingPlayer player : players) {\n\t\t\tif (player.isPresent()) {\n\t\t\t\tthis.presentPlayerKeys.add(player.getPlayerKey());\n\t\t\t}\n\t\t}\n\t}",
"@Test\n public void testAnalisarPeriodo() throws Exception {\n System.out.println(\"analisarPeriodo\");\n int[][] dadosFicheiro = null;\n int lowerLimit = 0;\n int upperLimit = 0;\n int linhas = 0;\n int[] expResult = null;\n int[] result = ProjetoV1.analisarPeriodo(dadosFicheiro, lowerLimit, upperLimit, linhas);\n assertArrayEquals(expResult, result);\n\n }",
"public Indicator[] getIndicatorForPeriod(int start, int end)\n {\n int index = 0;\n int validStart = indicators[0].getYear();\n int validEnd = indicators[indicators.length - 1].getYear();\n int oldStart = start, oldEnd = end;\n int startIndex = start - validStart;\n int counter = 0;\n\n if (start > end || (start < validStart && end < validStart) || (start > validEnd && end > validEnd))\n {\n throw new IllegalArgumentException(\"Invalid request of start and end year \" + start + \", \" + end +\n \". Valid period for \" + name + \" is \" + validStart + \" to \" + validEnd);\n }\n\n boolean changed = false;\n if (start < indicators[0].getYear())\n {\n changed = true;\n start = indicators[0].getYear();\n }\n\n if (end > indicators[indicators.length - 1].getYear())\n {\n changed = true;\n end = indicators[indicators.length - 1].getYear();\n }\n\n if (changed)\n {\n System.out.println(\"Invalid request of start and end year \" + oldStart + \",\" + oldEnd +\n \". Using valid subperiod for \" + name + \" is \" + start + \" to \" + end);\n }\n\n int numberOfYears = (end - start)+1;\n Indicator[] outputArray = new Indicator[numberOfYears];\n\n for (int i = startIndex; i < numberOfYears; i++)\n {\n outputArray[counter] = indicators[i];\n counter++;\n }\n return outputArray;\n }",
"public ArrayList findByCodPersFechaPeriodo(String dbpool, String codPers,\n\t\t\tString fecha, String periodo) throws SQLException {\n\n\t\tStringBuffer strSQL = new StringBuffer(\"\");\n\t\tPreparedStatement pre = null;\n\t\tConnection con = null;\n\t\tResultSet rs = null;\n\t\tArrayList detalle = null;\n\n\t\ttry {\n\n\t\t\tstrSQL.append(\"select mov, fing, fsal, hing, hsal, \"\n\t\t\t\t\t).append( \" estado_id, periodo \" ).append( \" from t1271asistencia \"\n\t\t\t\t\t).append( \" where cod_pers = ? and fing = ? \");\n\n\n\t\t\tcon = getConnection(dbpool);\n\t\t\t//con.prepareCall(\"SET LOCK MODE TO WAIT 10\").execute();\n\t\t\tpre = con.prepareStatement(strSQL.toString());\n\t\t\tpre.setString(1, codPers);\n\t\t\tpre.setDate(2, new BeanFechaHora(fecha).getSQLDate());\n\t\t\trs = pre.executeQuery();\n\t\t\tdetalle = new ArrayList();\n\t\t\tBeanProceso det = null;\n\n\t\t\twhile (rs.next()) {\n\n\t\t\t\tdet = new BeanProceso();\n\n\t\t\t\tdet.setMovimiento(rs.getString(\"mov\"));\n\t\t\t\tdet.setFecha(new BeanFechaHora(rs.getDate(\"fing\")).getFormatDate(\"dd/MM/yyyy\"));\n\t\t\t\tdet.setFechaIni(new BeanFechaHora(rs.getDate(\"fing\")).getFormatDate(\"dd/MM/yyyy\"));\n\t\t\t\t\n\t\t\t\tdet.setFechaFin(new BeanFechaHora(rs.getDate(\"fsal\")).getFormatDate(\"dd/MM/yyyy\"));\n\t\t\t\tdet.setHoraIni(rs.getString(\"hing\"));\n\t\t\t\tdet.setHoraFin(rs.getString(\"hsal\"));\n\t\t\t\tdet.setEstado(rs.getString(\"estado_id\"));\n\t\t\t\tdet.setPeriodo(rs.getString(\"periodo\"));\n\n\t\t\t\tdetalle.add(det);\n\t\t\t}\n\n \n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tlog.error(\"**** SQL ERROR **** \"+ e.toString());\n\t\t\tthrow new SQLException(e.toString());\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tif (rs != null)\n\t\t\t\t\trs.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (pre != null)\n\t\t\t\t\tpre.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\ttry {\n\t\t\t\tif (con != null)\n\t\t\t\t\tcon.close();\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t}\n\t\treturn detalle;\n\t}",
"long getSamplePeriod();",
"public void analyze(){\n\t\t\n\t\t//for pairing consecutive revisions for time interval output\n\t\tString previousRev = \"\";\n\t\tIterator<RevisionNode> runThrough = toAnalyze.iterator(); //preparing to go through every relevant revision's data\n\t\tRevisionNode next = null; //null to determine later whether or not the list is empty or not\n\t\t//loop counter\n\t\tint j;\n\t\t\n\t\twhile (runThrough.hasNext()){ //takes the revisions and organizes the data for output\n\t\t\t\n\t\t\tnext = runThrough.next(); //the next revision's data node\n\t\t\t\n\t\t\tcommenting.addLast(next.getComments());\n\t\t\t\n\t\t\trevisions[toAnalyze.indexOf(next)] = \"r\" + next.getRevision();\n\t\t\trelevants[toAnalyze.indexOf(next)] = Integer.toString(next.getNumberOfRelevants());\n\t\t\t\n\t\t\tfor (j = 0; j < args.length; j++){\n\t\t\t\tLinkedList<String> relevantList = next.getRelevantFiles();\n\t\t\t\tif (relevantList.contains(args[j])) {\n\t\t\t\t\texistsHere[toAnalyze.indexOf(next)][j] = 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (next.getTotalChanges() - next.getNumberOfRelevants() >= 0) {\n\t\t\t\tirrelevants[toAnalyze.indexOf(next)] = Integer.toString(next.getTotalChanges() - next.getNumberOfRelevants());\n\t\t\t}\n\t\t\n\t\t\telse {\n\t\t\t\tirrelevants[toAnalyze.indexOf(next)] = \"0\";\n\t\t\t}\n\t\t\t\n\t\t\tratings[toAnalyze.indexOf(next)] = Double.toString(next.getRating());\n\t\t\t\n\t\t\tCalendar thisTime = new GregorianCalendar(Integer.parseInt(next.getDate().split(\" \")[0].split(\"-\")[0]), Integer.parseInt(next.getDate().split(\" \")[0].split(\"-\")[1]) - 1,\n\t\t\t\t\tInteger.parseInt(next.getDate().split(\" \")[0].split(\"-\")[2]), Integer.parseInt(next.getDate().split(\" \")[1].split(\":\")[0]),\n\t\t\t\t\t\tInteger.parseInt(next.getDate().split(\" \")[1].split(\":\")[1]), Integer.parseInt(next.getDate().split(\" \")[1].split(\":\")[2]));\n\t\t\n\t\t\tif (highestRating == -1){ //implies this is the first iteration\n\t\t\t\tlastTime = new GregorianCalendar(Integer.parseInt(next.getDate().split(\" \")[0].split(\"-\")[0]), Integer.parseInt(next.getDate().split(\" \")[0].split(\"-\")[1]) - 1, \n\t\t\t\t\t\tInteger.parseInt(next.getDate().split(\" \")[0].split(\"-\")[2]), Integer.parseInt(next.getDate().split(\" \")[1].split(\":\")[0]), \n\t\t\t\t\t\t\tInteger.parseInt(next.getDate().split(\" \")[1].split(\":\")[1]), Integer.parseInt(next.getDate().split(\" \")[1].split(\":\")[2]));\n\t\t\t\t\n\t\t\t\tnow = \"Revision \" + next.getRevision() + \" at (\" + next.getDate() + \")\"; //the latest revision's date and number\n\t\t\t\tpreviousRev = next.getRevision();\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\t\n\t\t\t\tlong timeDiff = lastTime.getTimeInMillis() - thisTime.getTimeInMillis();\n\t\t\t\tString a = Double.toString(timeDiff / 1000 / 60 / 60 / 24.0);\n\t\t\t\ta = a.substring(0, a.indexOf('.')) + \" days & \" + Math.round(Double.parseDouble(a.substring(a.indexOf(\".\"))) * 24) + \" hours\";\n\t\t\t\tflowOfTime[toAnalyze.indexOf(next) - 1] = a;\n\t\t\t\trevisionsToo[toAnalyze.indexOf(next) - 1] = next.getRevision() + \"-\" + previousRev;\n\t\t\t\t\n\t\t\t\tif (timeDiff > timeDiffHigh){\n\t\t\t\t\ttimeDiffHigh = timeDiff;\n\t\t\t\t\trevisionReference[4] = next.getRevision() + \" & \" + previousRev;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tif (timeDiff < timeDiffLow){\n\t\t\t\t\ttimeDiffLow = timeDiff;\n\t\t\t\t\trevisionReference[5] = next.getRevision() + \" & \" + previousRev;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttimeDiffAverage += timeDiff;\n\t\t\t\tlastTime = thisTime;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\trelevantPresent[next.getNumberOfRelevants() - 1] += 1; //how many relevant files there are here\n\t\t\t\n\t\t\tif ((next.getTotalChanges() - next.getNumberOfRelevants()) < (Integer.parseInt(bundle.getString(\"irrelevantPerRelevant\")) * next.getNumberOfRelevants())) {\n\t\t\t\tirrelevantPresent[next.getNumberOfRelevants() - 1] += 1; //having the acceptable number of irrelevant files\n\t\t\t}\n\t\t\t\n\t\t\tString files = \"\";\n\t\t\tIterator<String> listIt = next.getRelevantFiles().iterator();\n\t\t\n\t\t\twhile (listIt.hasNext()){\n\t\t\t\tString nextFile = listIt.next();\n\t\t\t\tnextFile = nextFile.substring(nextFile.lastIndexOf('/') + 1); //only take the file's name, not its path\n\t\t\t\n\t\t\t\tif (listIt.hasNext()){\n\t\t\t\t\tfiles += nextFile + \", \"; //if this is not the last file, put in a comma\n\t\t\t\t}\n\t\t\t\n\t\t\t\telse {\n\t\t\t\t\tfiles += nextFile; //else, just enter the file name\n\t\t\t\t}\n\t\t\t}\n\t\t\t\t\n\t\t\tgrouping.newInput(files, next.getRevision()); //send the group of files for file-group processing\n\t\t\t\n\t\t\trelevantAverage += next.getNumberOfRelevants(); //aggregation period of average calculation\n\t\t\tratingAverage += next.getRating(); //aggregation period of average calculation\n\t\t\tnFilesAverage += next.getTotalChanges(); //aggregation period of average calculation\n\t\t\t\n\t\t\tif (next.getRating() > highestRating){\n\t\t\t\t//information for this rounding found on http://www.java-forums.org/advanced-java/4130-rounding-double-two-decimal-places.html\n\t\t\t\thighestRating = next.getRating() * 100000;\n\t\t\t\thighestRating = Math.round(highestRating);\n\t\t\t\thighestRating /= 100000;\n\t\t\t\trevisionReference[0] = next.getRevision();\n\t\t\t}\n\t\t\t\n\t\t\tif (next.getRating() < lowestRating){\n\t\t\t\t//information for this rounding found on http://www.java-forums.org/advanced-java/4130-rounding-double-two-decimal-places.html\n\t\t\t\tlowestRating = next.getRating() * 100000;\n\t\t\t\tlowestRating = Math.round(lowestRating);\n\t\t\t\tlowestRating /= 100000;\n\t\t\t\trevisionReference[1] = next.getRevision();\n\t\t\t}\n\t\t\t\n\t\t\tif (next.getTotalChanges() > highestFileNumber){ //is the current file count higher than the current maximum?\n\t\t\t\thighestFileNumber = next.getTotalChanges(); //changes the value to the new maximum\n\t\t\t\trevisionReference[2] = next.getRevision(); //gets what revision this was found at for later reference\n\t\t\t}\n\t\t\t\n\t\t\tif (next.getTotalChanges() < lowestFileNumber){ //is the current file count lower than the current minimum?\n\t\t\t\tlowestFileNumber = next.getTotalChanges(); //changes the value to the new minimum\n\t\t\t\trevisionReference[3] = next.getRevision(); //gets what revision this was found at for later reference\n\t\t\t}\n\t\t\t\n\t\t\tpreviousRev = next.getRevision();\n\t\t}\n\t\t\n\t\tif (next != null) { //if the list was not empty\n\t\t\t\n\t\t\tthen = \"Revision \" + next.getRevision() + \" at (\" + next.getDate() + \")\"; //the last relevant revision and date of the log\n\t\t\t//information for this rounding found on http://www.java-forums.org/advanced-java/4130-rounding-double-two-decimal-places.html\n\t\t\tratingAverage = (ratingAverage/revisionTotal) * 100000; \n\t\t\tratingAverage = Math.round(ratingAverage);\n\t\t\tratingAverage /= 100000;\n\t\t\tnFilesAverage = nFilesAverage/revisionTotal; //rounding not used since it is an integer\n\t\t\trelevantAverage = relevantAverage/revisionTotal; //rounding not used since it is an integer\n\t\t\t\n\t\t\tif (revisionTotal > 1) {\n\t\t\t\ttimeDiffAverage = timeDiffAverage/(revisionTotal - 1);\n\t\t\t}\n\t\t\t\n\t\t\telse {\n\t\t\t\ttimeDiffLow = 0;\n\t\t\t\ttimeDiffHigh = 0;\n\t\t\t\trevisionReference[4] = \"N/A\";\n\t\t\t\trevisionReference[5] = \"N/A\";\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}",
"public void calculations(){\n\n int temp_size1 = fight_list.get(0).t1.members.size();\n int[] t1_counter = new int[temp_size1 + 1]; //counter for deaths: 0, 1, 2..., party size.\n float t1_avg = 0; //Average number of deaths.\n\n //We don't need to calculate for t2 right now, because t2 is just monsters.\n //temp_size = fight_list.get(0).t2.members.size();\n //int[] t2_counter = new int[temp_size + 1];\n\n for(FightResult fig : this.fight_list){\n int i = 0;\n while(i != fig.t1_deaths){\n i++;\n }\n t1_counter[i]++;\n t1_avg += fig.t1_deaths;\n }//end for\n\n System.out.println(t1_avg);\n System.out.println(Float.toString(t1_avg/fight_list.size()) + \" / \" + Integer.toString(temp_size1));\n\n String axis = \"# of deaths: \\t\";\n int axis_int = 0;\n String t1_results = \"Happened: \\t\";\n for(int i : t1_counter){\n axis += Integer.toString(axis_int++) + \"\\t\";\n t1_results += Integer.toString(i) + \"\\t\";\n }//end for\n System.out.println(axis);\n System.out.println(t1_results);\n\n float tpk_amount = t1_counter[temp_size1]; //by taking the size, we take the item at the end of the array. In this case, the number where everyone dies.\n tpk_amount = (tpk_amount/fight_list.size())*100;\n System.out.println(\"Probability of TPK: \" + Float.toString(tpk_amount) + \" %.\");\n\n System.out.println(\"\\n--------\\n\");\n }",
"List<Sppprm> exportPrimesCalculeesJourToPaie(List<PointageCalcule> pointagesCalculesOrderedByDateAsc);",
"private int[][][] readData(int startElement, int startLine, int endElement, int endLine) throws AreaFileException {\r\n// int[][][]myData = new int[numBands][dir[AD_NUMLINES]][dir[AD_NUMELEMS]];\r\n int numLines = endLine - startLine;\r\n int numEles = endElement - startElement;\r\n// System.out.println(\"linePrefixLength: \" + linePrefixLength);\r\n int[][][] myData = new int[numBands][numLines][numEles];\r\n \r\n if (! fileok) {\r\n throw new AreaFileException(\"Error reading AreaFile data\");\r\n }\r\n\r\n short shdata;\r\n int intdata;\r\n boolean isBrit = \r\n areaDirectory.getCalibrationType().equalsIgnoreCase(\"BRIT\"); \r\n long newPos = 0;\r\n\r\n for (int i = 0; i<numLines; i++) {\r\n newPos = datLoc + linePrefixLength + lineLength * (i + startLine) + startElement * dir[AD_DATAWIDTH];\r\n position = newPos;\r\n// System.out.println(position);\r\n try {\r\n af.seek(newPos);\r\n } catch (IOException e1) {\r\n e1.printStackTrace();\r\n }\r\n \r\n for (int k=0; k<numEles; k++) {\r\n for (int j = 0; j<numBands; j++) {\r\n try {\r\n if (dir[AD_DATAWIDTH] == 1) {\r\n myData[j][i][k] = (int)af.readByte();\r\n if (myData[j][i][k] < 0 && isBrit) {\r\n myData[j][i][k] += 256;\r\n } \r\n// position = position + 1;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 2) {\r\n shdata = af.readShort();\r\n if (flipwords) {\r\n myData[j][i][k] = (int) ( ((shdata >> 8) & 0xff) | \r\n ((shdata << 8) & 0xff00) );\r\n } else {\r\n myData[j][i][k] = (int) (shdata);\r\n }\r\n// position = position + 2;\r\n } else \r\n\r\n if (dir[AD_DATAWIDTH] == 4) {\r\n intdata = af.readInt();\r\n if (flipwords) {\r\n myData[j][i][k] = ( (intdata >>> 24) & 0xff) | \r\n ( (intdata >>> 8) & 0xff00) | \r\n ( (intdata & 0xff) << 24 ) | \r\n ( (intdata & 0xff00) << 8);\r\n } else {\r\n myData[j][i][k] = intdata;\r\n }\r\n// position = position + 4;\r\n } \r\n } \r\n catch (IOException e) {\r\n myData[j][i][k] = 0;\r\n }\r\n }\r\n }\r\n }\r\n return myData;\r\n }",
"public interface Period {\n\n\tDate getStart();\n\n\tDate getEnd();\n}",
"private void updatePointSpeeds() {\n\t\tfor (int i = 0; i < locations.size(); i++) {\n\t\t\tLocationStructure loc = locations.get(i);\t\t\n\t\t\tDouble dist = Double.MIN_VALUE;\n\t\t\tDouble lat1 = loc.getLatitude().doubleValue();\n\t\t\tDouble lon1 = loc.getLongitude().doubleValue();\n\t\t\t\n\t\t\tDate d = times.get(i);\n\t\t\t\n\t\t\tif( i+1 < locations.size()) {\n\t\t\t\tloc = locations.get(i+1);\n\t\t\t\tDouble lat2 = loc.getLatitude().doubleValue();\n\t\t\t\tDouble lon2 = loc.getLongitude().doubleValue();\n\t\t\t\tdist = calculateDistance(lat1, lon1, lat2, lon2);\n\t\t\t\t\n\t\t\t\tDate d1 = times.get(i+1);\n\t\t\t\tDateTime dt1 = new DateTime(d);\n\t\t\t\tDateTime dt2 = new DateTime(d1);\n\t\t\t\tint seconds = Seconds.secondsBetween(dt1, dt2).getSeconds();\t\t\t\n\t\t\t\tDouble pd = (dist/seconds)*60;\n\t\t\t\tif(!pd.isNaN()) {\n\t\t\t\t\tpointSpeed.add(pd);\t\t\n\t\t\t\t\tSystem.out.println(\"BUS STATE-- Added point speed of \"+ (dist/seconds)*60 + \" for \" +this.vehicleRef);\n\t\t\t\t}\n\t\t\t} else break;\n\t\t\t\n\t\t\t\n\t\t}\n\t\t\n\t}",
"private void updatePosition() {\n\t\tfor (int i = 0; i < encoders.length; i++) {\n\t\t\tdRot[i] = (encoders[i].get() - lastEncPos[i]) / this.cyclesPerRev;\n\t\t\tdPos[i] = dRot[i] * wheelDiameter * Math.PI;\n\t\t\tlastEncPos[i] = encoders[i].get();\n\t\t}\n\t\t\n\t\tdLinearPos = (dPos[0] + dPos[1]) / 2;\n\t\t\n\t\tposition[2] = Math.toRadians(gyro.getAngle()) + gyroOffset;\n\t\tposition[0] += dLinearPos * Math.sin(position[2]);\n\t\tposition[1] += dLinearPos * Math.cos(position[2]);\n\t}",
"private List<SignalDetectionHypothesis> generateHypotheses(\n ChannelSegment<Waveform> channelSegment,\n List<SignalDetectionParameters> detectionParametersList,\n OnsetTimeUncertaintyParameters uncertaintyParameters,\n OnsetTimeRefinementParameters refinementParameters) {\n List<SignalDetectionHypothesis> hypotheses = new ArrayList<>();\n\n Map<SignalDetectionParameters, SignalDetectorPlugin> detectorPlugins = detectionParametersList\n .stream().collect(toMap(Function.identity(),\n parameters -> getPlugin(parameters.getPluginName(), SignalDetectorPlugin.class,\n signalDetectorPluginRegistry)));\n\n OnsetTimeUncertaintyPlugin uncertaintyPlugin = getPlugin(uncertaintyParameters.getPluginName(),\n OnsetTimeUncertaintyPlugin.class,\n onsetTimeUncertaintyPluginRegistry);\n\n OnsetTimeRefinementPlugin refinementPlugin = getPlugin(refinementParameters.getPluginName(),\n OnsetTimeRefinementPlugin.class,\n onsetTimeRefinementPluginRegistry);\n\n logger.info(\"SignalDetectionControl invoking {} plugins for Channel {}\",\n detectionParametersList.stream().map(SignalDetectionParameters::getPluginName)\n .collect(toList()), channelSegment.getChannelId());\n\n Collection<Instant> detectionTimes = detectorPlugins.entrySet()\n .stream()\n .map(entry -> entry.getValue()\n .detectSignals(channelSegment, entry.getKey().getPluginParameters()))\n .flatMap(Collection::stream).collect(toList());\n\n if (detectionTimes.isEmpty()) {\n return Collections.emptyList();\n } else {\n for (Instant detectionTime : detectionTimes) {\n Duration uncertainty = executeUncertaintyPlugin(channelSegment, uncertaintyPlugin,\n detectionTime, uncertaintyParameters.getPluginParameters());\n final FeatureMeasurement<InstantValue> arrivalTimeMeasurement = createArrivalMeasurement(\n detectionTime, uncertainty, channelSegment.getId());\n final FeatureMeasurement<PhaseTypeMeasurementValue> phaseMeasurement =\n createPhaseMeasurement(\n channelSegment.getId());\n UUID parentSdId = UUID.randomUUID();\n\n //TODO: Replace the zeroed UUID with a proper CreationInfo ID when CreationInfo is finalized\n SignalDetectionHypothesis initialHypothesis = SignalDetectionHypothesis.create(\n parentSdId, arrivalTimeMeasurement, phaseMeasurement,\n new UUID(0, 0));\n\n hypotheses.add(initialHypothesis);\n\n refineHypothesis(initialHypothesis, channelSegment, refinementPlugin,\n refinementParameters.getPluginParameters(), uncertaintyPlugin,\n uncertaintyParameters.getPluginParameters())\n .ifPresent(hypothesis -> hypotheses.add(hypothesis));\n }\n }\n return hypotheses;\n }"
]
| [
"0.7478235",
"0.571415",
"0.55877614",
"0.54471564",
"0.5338539",
"0.5337807",
"0.51631767",
"0.516181",
"0.5132112",
"0.49860132",
"0.47935972",
"0.4734798",
"0.46600536",
"0.46349758",
"0.4600435",
"0.45994997",
"0.45807022",
"0.4572236",
"0.45678738",
"0.45539087",
"0.45462382",
"0.45222953",
"0.44902644",
"0.44796407",
"0.44762686",
"0.4456575",
"0.44540557",
"0.44454566",
"0.44427934",
"0.4437738",
"0.4434577",
"0.44235286",
"0.44231123",
"0.442213",
"0.44132262",
"0.43928623",
"0.43865284",
"0.43817368",
"0.4378727",
"0.43711552",
"0.43644053",
"0.4352028",
"0.43512347",
"0.43493557",
"0.43479553",
"0.43459004",
"0.43428105",
"0.43426993",
"0.43404007",
"0.433851",
"0.43343773",
"0.4327491",
"0.43240392",
"0.43023443",
"0.4302219",
"0.42848742",
"0.42844173",
"0.4280811",
"0.42797986",
"0.42721626",
"0.42683202",
"0.42586496",
"0.42582363",
"0.42579615",
"0.42549342",
"0.42516467",
"0.42514652",
"0.4249306",
"0.42436376",
"0.42411923",
"0.42333987",
"0.4231254",
"0.422992",
"0.42296457",
"0.42267257",
"0.42261648",
"0.42196462",
"0.42186132",
"0.4218203",
"0.4217744",
"0.42157808",
"0.42154264",
"0.42142162",
"0.4209489",
"0.42051375",
"0.42024803",
"0.4201707",
"0.42013824",
"0.4197282",
"0.4195276",
"0.41941616",
"0.41832417",
"0.41782779",
"0.4176854",
"0.41674435",
"0.41639358",
"0.41630617",
"0.4162264",
"0.4159437",
"0.4153192"
]
| 0.76817393 | 0 |
Returns the period length of the given value in Hz considering the sample rate (44.1kHz). | private float hzToPeriod(float hz ) {
int sampling = 44100;
return sampling / hz;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int freq()\n\t{\n\t\treturn _lsPeriod.get (0).freq();\n\t}",
"private float calculateSensorFrequency() {\n if (startTime == 0) {\n startTime = System.nanoTime();\n }\n\n long timestamp = System.nanoTime();\n\n // Find the sample period (between updates) and convert from\n // nanoseconds to seconds. Note that the sensor delivery rates can\n // individually vary by a relatively large time frame, so we use an\n // averaging technique with the number of sensor updates to\n // determine the delivery rate.\n float hz = (count++ / ((timestamp - startTime) / 1000000000.0f));\n\n return hz;\n }",
"public float getFrequency() {\n Integer sR = (Integer)sampleRate.getSelectedItem();\n int intST = sR.intValue();\n int intFPW = framesPerWavelength.getValue();\n\n return (float)intST/(float)intFPW;\n }",
"@Override\n\tpublic double getLength() {\n \tdouble muscleLength = myAmplitude * Math.sin(myPie);\n\t\tmyPie += myFrequency;\n\t\treturn muscleLength;\n }",
"float getFrequency();",
"public double period()\n\t{\n\t\tdouble n = meanMotion();\n\t\tdouble period = 2.0 * Constants.pi / n;\n\t\treturn period;\n\t}",
"public long getSamplingPeriod();",
"long getSamplePeriod();",
"double getSignalPeriod();",
"public Rational getAudioSampleRate();",
"public float setServoPWMFrequencyHz(float freq){\r\n checkServoCommandThread();\r\n if(freq<=0) {\r\n log.log(Level.WARNING, \"freq={0} is not a valid value\", freq);\r\n return 0;\r\n }\r\n int n=Math.round(SYSCLK_MHZ*1e6f/65536f/freq); // we get about 2 here with freq=90Hz\r\n if(n==0) {\r\n log.log(Level.WARNING, \"freq={0} too high, setting max possible of 183Hz\", freq);\r\n n=1;\r\n }\r\n float freqActual=SYSCLK_MHZ*1e6f/65536/n; // n=1, we get 183Hz\r\n ServoCommand cmd=new ServoCommand();\r\n cmd.bytes=new byte[2];\r\n cmd.bytes[0]=CMD_SET_TIMER0_RELOAD_VALUE;\r\n cmd.bytes[1]=(byte)(n-1); // now we use n-1 to give us a reload value of 0 for max freq\r\n submitCommand(cmd);\r\n pcaClockFreqMHz=SYSCLK_MHZ/n;\r\n return freqActual;\r\n }",
"public int getIntervalLength() {\r\n\t\treturn Integer.parseInt(properties.getProperty(KEY_INTERVAL_LENGTH)) * 1000;\r\n \t}",
"public int getMaxFrequency() {\n\t\t\tif (mMaxFrequency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + MAX_FREQUENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\tmMaxFrequency = value / 1000;\n\t\t\t}\n\t\t\treturn mMaxFrequency;\n\t\t}",
"int getSoundLen(File sndFile) {\n\t\tif (sndFile == null) {\n\t\t\treturn 0;\n\t\t}\n\t\tAudioInputStream audioInputStream;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(sndFile);\n\t\t\tAudioFormat format = audioInputStream.getFormat();\n\t\t\tlong frames = audioInputStream.getFrameLength();\n\t\t\taudioInputStream.close();\n\t\t\treturn (int) (frames / format.getFrameRate());\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Horrible hack blew up, karma\", e);\n\t\t\treturn 0;\n\t\t}\n\t}",
"public long getSampleCount() {\r\n\t\tif (audioFile != null) {\r\n\t\t\treturn audioFile.getEffectiveDurationSamples();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}",
"public Double bytesPerSecond()\n\t{\n\t\treturn getValue(DataRateUnit.BYTES_PER_SEC);\n\t}",
"public Double bitsPerSecond()\n\t{\n\t\treturn getValue(DataRateUnit.BITS_PER_SEC);\n\t}",
"public static double getTrackLength(URL trackAddress) throws UnsupportedAudioFileException,\r\n IOException {\r\n AudioInputStream stream = AudioSystem.getAudioInputStream(trackAddress);\r\n AudioFormat f = stream.getFormat();\r\n return stream.getFrameLength() / f.getFrameRate();\r\n }",
"int getLastVibrationFrequency();",
"public long getMeasFrequencyHz() {\r\n return measFrequencyHz;\r\n }",
"float getLength();",
"float getLength();",
"@Override\n public long getMicrosecondLength() {\n return clip.getMicrosecondLength();\n }",
"int step(int period) {\n\t\tif (ticks >= threshold) {\n\t\t\tamplitude = peaks[segmentIndex++] << 15;\n\t\t\tif (segmentIndex >= segments)\n\t\t\t\tsegmentIndex = segments - 1;\n\t\t\tthreshold = (int) (((double) durations[segmentIndex] / 65536D) * (double) period);\n\t\t\tif (threshold > ticks)\n\t\t\t\tstep = ((peaks[segmentIndex] << 15) - amplitude)\n\t\t\t\t\t\t/ (threshold - ticks);\n\t\t}\n\t\tamplitude += step;\n\t\tticks++;\n\t\treturn amplitude - step >> 15;\n\t}",
"public float getSampleRate();",
"public int getSampleRate() {\n for (int rate : new int[]{8000, 11025, 16000, 22050, 44100, 48000}) {\n int buffer = AudioRecord.getMinBufferSize(rate, channel_in, format);\n if (buffer > 0)\n return rate;\n }\n return -1;\n }",
"private int calcFadcLength(int nFadc) {\n return 2*nFadc;\n }",
"long getDuration() {\n if (debugFlag)\n debugPrintln(\"JSChannel:getDuration\");\n\n if (ais == null || audioFormat == null ) {\n if (debugFlag)\n debugPrintln(\"JSChannel: Internal Error getDuration\");\n return (long)Sample.DURATION_UNKNOWN;\n }\n // Otherwise we'll assume that we can calculate this duration\n\n // get \"duration\" of audio stream (wave file)\n // TODO: For True STREAMing audio the size is unknown...\n long numFrames = ais.getFrameLength();\n if (debugFlag)\n debugPrintln(\" frame length = \" + numFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n\n float rateInFrames = audioFormat.getFrameRate();\n rateInHz = audioFormat.getSampleRate();\n if (debugFlag)\n debugPrintln(\" rate in Frames = \" + rateInFrames);\n if (numFrames <= 0)\n return (long)Sample.DURATION_UNKNOWN;\n long duration = (long)((float)numFrames/rateInFrames);\n if (debugFlag)\n debugPrintln(\" duration(based on ais) = \" + duration);\n return duration;\n }",
"public int duration(){\n int maxLength=voices.get(0).duration();\n for(Bar bar:voices){\n if (bar.duration()>=maxLength){\n maxLength=bar.duration();\n }\n }\n checkRep();\n return maxLength;\n }",
"public int length()\n\t{\n\t\tif ( properties != null && properties.containsKey(\"ogg.length.bytes\") )\n\t\t{\n\t\t\tlengthInMillis = VobisBytes2Millis((Integer)properties.get(\"ogg.length.bytes\"));\n\t\t\tSystem.out.println(\"GOT LENGTH: \"+lengthInMillis);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tlengthInMillis = -1;\n\t\t}\n\t\treturn (int)lengthInMillis;\n\t}",
"int getTickLength();",
"public float getFrequency() { \n \treturn mouseJointDef.frequencyHz; \n }",
"public int getLength() { \r\n return audioLength; \r\n }",
"public void setMeasFrequencyHz(long value) {\r\n this.measFrequencyHz = value;\r\n }",
"public static double pitchToFrequency(double pitch) {\n return mConcertAFrequency * Math.pow(2.0, ((pitch - CONCERT_A_PITCH) * (1.0 / 12.0)));\n }",
"double getPeriod();",
"public short getDataRetentionPeriodLength()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DATARETENTIONPERIODLENGTH$26, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getShortValue();\n }\n }",
"public int getMinFrequency() {\n\t\t\tif (mMinFrequency == 0) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + MIN_FREQUENCY);\n\t\t\t\tif (list == null || list.isEmpty()) return 0;\n\t\t\t\tint value = 0;\n\t\t\t\ttry { value = Integer.valueOf(list.get(0)); }\n\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\tmMinFrequency = value / 1000;\n\t\t\t}\n\t\t\treturn mMinFrequency;\n\t\t}",
"public int getHowManyInPeriod();",
"public float length ()\n {\n return FloatMath.sqrt(lengthSquared());\n }",
"public int getClockFrequency() {\n return clockFrequency;\n }",
"@Test\n public void testDFTOneFreq() {\n for (int freq = 0; freq < 1000; freq += 200) {\n SoundWave wave = new SoundWave(freq, 5, 0.5, 0.1);\n double maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq, maxFreq, 0.00001);\n }\n }",
"int getPulsePercentage();",
"public double[] getFFTBinFrequencies()\n {\n \tdouble[] FFTBins = new double[frameLength];\n \tdouble interval = samplingRate / frameLength;\n \tfor(int i = 0; i < frameLength; i++)\n \t{\n \t\tFFTBins[i] = interval * i;\n \t}\n \t\n \treturn FFTBins;\n }",
"public long getSampleFrameLength() {\n\t\treturn ais.getFrameLength();\n\t}",
"public double getFPS() {\n\t\treturn frequency;\n\t}",
"public Double degreePerSecond()\n\t{\n\t\treturn getValue(AngularVelocityUnit.DEGREES_PER_SEC);\n\t}",
"public double getLength();",
"public static double frequencyToPitch(double frequency) {\n return CONCERT_A_PITCH + 12 * Math.log(frequency / mConcertAFrequency) / Math.log(2.0);\n }",
"public double getLength() {\r\n\t\t\treturn length;\r\n\t\t}",
"private void computeAverageFrequencyDelayValue() {\n\tthis.averageFrequencyDelayValue = value * this.averageDelay;\n }",
"public static double midiToFreq(int note) {\n return (Math.pow(2, ((note - 69) / 12.0))) * 440;\n }",
"public double getLength()\n\t{\n\t\treturn length;\n\t}",
"public abstract double samplingFrequency();",
"double getCalibrationPeriod();",
"public int getAudioSampleRate() {\n\t\treturn mSampleRate;\n\t}",
"public static double[] rawFreqCreator(){\n\t\tfinal int EXTERNAL_BUFFER_SIZE = 2097152;\n\t\t//128000\n\n\t\t//Get the location of the sound file\n\t\tFile soundFile = new File(\"MoodyLoop.wav\");\n\n\t\t//Load the Audio Input Stream from the file \n\t\tAudioInputStream audioInputStream = null;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(soundFile);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Get Audio Format information\n\t\tAudioFormat audioFormat = audioInputStream.getFormat();\n\n\t\t//Handle opening the line\n\t\tSourceDataLine\tline = null;\n\t\tDataLine.Info\tinfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n\t\ttry {\n\t\t\tline = (SourceDataLine) AudioSystem.getLine(info);\n\t\t\tline.open(audioFormat);\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Start playing the sound\n\t\t//line.start();\n\n\t\t//Write the sound to an array of bytes\n\t\tint nBytesRead = 0;\n\t\tbyte[]\tabData = new byte[EXTERNAL_BUFFER_SIZE];\n\t\twhile (nBytesRead != -1) {\n\t\t\ttry {\n\t\t \t\tnBytesRead = audioInputStream.read(abData, 0, abData.length);\n\n\t\t\t} catch (IOException e) {\n\t\t \t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (nBytesRead >= 0) {\n\t\t \t\tint nBytesWritten = line.write(abData, 0, nBytesRead);\n\t\t\t}\n\n\t\t}\n\n\t\t//close the line \n\t\tline.drain();\n\t\tline.close();\n\t\t\n\t\t//Calculate the sample rate\n\t\tfloat sample_rate = audioFormat.getSampleRate();\n\t\tSystem.out.println(\"sample rate = \"+sample_rate);\n\n\t\t//Calculate the length in seconds of the sample\n\t\tfloat T = audioInputStream.getFrameLength() / audioFormat.getFrameRate();\n\t\tSystem.out.println(\"T = \"+T+ \" (length of sampled sound in seconds)\");\n\n\t\t//Calculate the number of equidistant points in time\n\t\tint n = (int) (T * sample_rate) / 2;\n\t\tSystem.out.println(\"n = \"+n+\" (number of equidistant points)\");\n\n\t\t//Calculate the time interval at each equidistant point\n\t\tfloat h = (T / n);\n\t\tSystem.out.println(\"h = \"+h+\" (length of each time interval in second)\");\n\t\t\n\t\t//Determine the original Endian encoding format\n\t\tboolean isBigEndian = audioFormat.isBigEndian();\n\n\t\t//this array is the value of the signal at time i*h\n\t\tint x[] = new int[n];\n\n\t\t//convert each pair of byte values from the byte array to an Endian value\n\t\tfor (int i = 0; i < n*2; i+=2) {\n\t\t\tint b1 = abData[i];\n\t\t\tint b2 = abData[i + 1];\n\t\t\tif (b1 < 0) b1 += 0x100;\n\t\t\tif (b2 < 0) b2 += 0x100;\n\t\t\tint value;\n\n\t\t\t//Store the data based on the original Endian encoding format\n\t\t\tif (!isBigEndian) value = (b1 << 8) + b2;\n\t\t\telse value = b1 + (b2 << 8);\n\t\t\tx[i/2] = value;\n\t\t\t\n\t\t}\n\t\t\n\t\t//do the DFT for each value of x sub j and store as f sub j\n\t\tdouble f[] = new double[n/2];\n\t\tfor (int j = 0; j < n/2; j++) {\n\n\t\t\tdouble firstSummation = 0;\n\t\t\tdouble secondSummation = 0;\n\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t \t\tdouble twoPInjk = ((2 * Math.PI) / n) * (j * k);\n\t\t \t\tfirstSummation += x[k] * Math.cos(twoPInjk);\n\t\t \t\tsecondSummation += x[k] * Math.sin(twoPInjk);\n\t\t\t}\n\n\t\t f[j] = Math.abs( Math.sqrt(Math.pow(firstSummation,2) + \n\t\t Math.pow(secondSummation,2)) );\n\n\t\t\tdouble amplitude = 2 * f[j]/n;\n\t\t\tdouble frequency = j * h / T * sample_rate;\n\t\t\tSystem.out.println(\"frequency = \"+frequency+\", amp = \"+amplitude);\n\t\t}\n\t\tSystem.out.println(\"DONE\");\n\t\treturn f;\n\t\t\n\t}",
"public float findFrequency(ArrayList<Float> wave){\n\r\n ArrayList<Float> newWave = new ArrayList<>();\r\n\r\n for(int i=0;i<wave.size()-4;i++){\r\n newWave.add((wave.get(i)+wave.get(i+1)+wave.get(i+2)+wave.get(i+4))/4f);\r\n }\r\n\r\n\r\n boolean isBelow = wave1.get(0)<triggerVoltage;\r\n\r\n ArrayList<Integer> triggerSamples = new ArrayList<>();\r\n\r\n\r\n System.out.println(\"starting f calc\");\r\n\r\n for(int i=1;i<newWave.size();i++){\r\n if(isBelow){\r\n if(newWave.get(i)>triggerVoltage){\r\n triggerSamples.add(i);\r\n isBelow=false;\r\n }\r\n }else{\r\n if(newWave.get(i)<triggerVoltage){\r\n triggerSamples.add(i);\r\n isBelow=true;\r\n }\r\n }\r\n }\r\n System.out.println(\"F len in \"+triggerSamples.size());\r\n\r\n ArrayList<Float> freqValues = new ArrayList<>();\r\n\r\n\r\n for(int i=0;i<triggerSamples.size()-2;i++){\r\n freqValues.add(1/(Math.abs(SecondsPerSample*(triggerSamples.get(i)-triggerSamples.get(i+2)))));\r\n }\r\n\r\n float finalAVG =0;\r\n for (Float f : freqValues) {\r\n finalAVG+=f;\r\n }\r\n finalAVG/=freqValues.size();\r\n\r\n\r\n return finalAVG;\r\n //System.out.println(finalAVG);\r\n }",
"public double getBandWidth() {\n\t\treturn bw * _mySampleRate;\n\t}",
"public Double radiansPerSecond()\n\t{\n\t\treturn getValue(AngularVelocityUnit.RADIANS_PER_SEC);\n\t}",
"public double getLength() {\r\n\t\treturn length;\r\n\t}",
"public double getLength() {\n\t\treturn length;\n\t}",
"public double get_length() {\n\t\treturn _length;\n\t}",
"public double length () {\n return Math.sqrt(lengthSquared());\n }",
"public java.lang.Integer getFrequency() {\n return frequency;\n }",
"public java.lang.Integer getFrequency() {\n return frequency;\n }",
"int getFreq();",
"org.hl7.fhir.Period getValuePeriod();",
"int getPeriod();",
"public int getFrequency()\n\t{\n\t\treturn frequency;\n\t}",
"public float getProfileLength(){\n\t\treturn profileLength;\n\t}",
"public double getFeBandWidth() {\n return _avTable.getDouble(ATTR_FE_BANDWIDTH, 0.0);\n }",
"public int getSampleRate() {\n return sampleRate;\n }",
"long getAxisLength(final CalibratedAxis t);",
"public int getIntronLength() { \n\t\tfinal int start = getLast5SSPos(); \n\t\tfinal int end = getLast3SSPos();\n\t\treturn( Math.abs( end - start ) ); \n\t}",
"public Double getFrequency() {\n return frequency;\n }",
"public JSlider getFramesPerWavelengthSlider() {\n return framesPerWavelength;\n }",
"public float getEffectiveClockFrequency() {\n return (float) getCpu().getTime() * NANOSECS_IN_MSEC / getUptime();\n }",
"public int getFrequency() {\n\t\t\treturn mCurFrequency;\n\t\t}",
"public int periodCount() {\n\t\treturn message.getPeriodCount();\n\t}",
"java.lang.String getFrequency();",
"public double getLength() {\r\n return length;\r\n }",
"public int getSampleRate() {\n return 0;\n }",
"public edu.pa.Rat.Builder setFrequency(int value) {\n validate(fields()[1], value);\n this.frequency = value;\n fieldSetFlags()[1] = true;\n return this; \n }",
"public static double getRequiredSampleSize(double confidenceLevel, double halfConfidenceIntervalWidth, double standardDerivation) {\n // calculate Z\n double z = AcklamStatUtil.getInvCDF(getInvCdfParam(confidenceLevel), true);\n\n // calculate result\n double result = Math.pow( ((z * standardDerivation) / halfConfidenceIntervalWidth), 2); \n return result;\n }",
"public double getPeriod() {\n return period;\n }",
"public double getLength(){\r\n\t\treturn length;\r\n\t}",
"public void degreePerSecond(Double val)\n\t{\n\t\tsetValue(val, AngularVelocityUnit.DEGREES_PER_SEC);\n\t}",
"public int getAudioSampleSize() {\n\t\treturn mSampleSize;\n\t}",
"public static int getPeriod(int i) {\n int count = 1;\n int mod = 10 % i;\n //If i is not divisible by 2 or 5, compute.\n //If i is divisible by 2 or 5, it's period is had in a smaller number\n if(i%2!=0 && i%5 !=0) {\n //While mod is not 1, multiply by 10 and mod with i, increment period.\n while(mod != 1) {\n mod = mod * 10;\n mod = mod % i;\n count++;\n }\n }\n return count;\n \n }",
"public long getFreq() {\n return freq;\n }",
"public double getLength() {\n return length;\n }",
"public float getChirpFrequency() {\n return chirpFrequency;\n }",
"public abstract void getLength(double length);",
"public int getLengthInCentiMeters()\r\n\t{\r\n\t\treturn length;\r\n\t}",
"BigInteger getPeriod();",
"public Double getLength()\n {\n return length;\n }",
"com.google.protobuf.ByteString\n getFrequencyBytes();",
"public int getFrequency()\n {\n return this.frequency;\n }",
"public void setTransferFrequency(final PeriodDuration newValue) {\n checkWritePermission(transferFrequency);\n transferFrequency = newValue;\n }"
]
| [
"0.6353981",
"0.61254674",
"0.6044024",
"0.6026354",
"0.5896274",
"0.5881207",
"0.58719015",
"0.585478",
"0.58294463",
"0.5821131",
"0.579739",
"0.5714488",
"0.5690322",
"0.56768906",
"0.56266063",
"0.5617016",
"0.5591459",
"0.5569813",
"0.5555429",
"0.55397946",
"0.55318034",
"0.55318034",
"0.55127996",
"0.5511867",
"0.54767287",
"0.54276997",
"0.5403801",
"0.53603107",
"0.53520983",
"0.53404933",
"0.5332401",
"0.5324621",
"0.5309314",
"0.53009886",
"0.5298229",
"0.528769",
"0.5287478",
"0.5284319",
"0.527296",
"0.5262444",
"0.5261723",
"0.5246795",
"0.52414775",
"0.52379",
"0.52317524",
"0.5231104",
"0.5211009",
"0.5206349",
"0.5205446",
"0.51961637",
"0.51956517",
"0.5193644",
"0.51924694",
"0.51921433",
"0.5166184",
"0.51641786",
"0.51635295",
"0.5160746",
"0.5157806",
"0.5155987",
"0.5155346",
"0.5151773",
"0.5137649",
"0.5130159",
"0.5119365",
"0.51187176",
"0.511863",
"0.51166785",
"0.51156735",
"0.5101983",
"0.5085014",
"0.5084384",
"0.50775975",
"0.5074632",
"0.50707495",
"0.5061486",
"0.5055233",
"0.50521106",
"0.50471973",
"0.50427467",
"0.5040139",
"0.50388414",
"0.5038454",
"0.5036207",
"0.50309074",
"0.50280064",
"0.5027569",
"0.5020286",
"0.50169027",
"0.5008274",
"0.50035006",
"0.50019366",
"0.49990258",
"0.49959627",
"0.49916798",
"0.49785352",
"0.49695382",
"0.49672684",
"0.4963824",
"0.4950459"
]
| 0.67106175 | 0 |
FEATURE NUMBER 1 : SHIMMER The method calculating the Shimmer | public double getShimmer() {
int minAmp = 0; // figures the minium of the amplitude.
int maxAmp; // figures the maxium of the amplitude.
double amplitude = 0;
List<Double> amplitudes = new ArrayList<Double>();
double sum = 0;
for ( int i = 0; i < pitchPositions.size() - 1; i++ ) {
// get each pitch
maxAmp = data.get( pitchPositions.get( i ) );
for ( int j = pitchPositions.get( i ); j < pitchPositions.get( i + 1 ); j++ ) {
if ( minAmp > data.get( j ) ) {
minAmp = data.get( j );
}
}
amplitude = maxAmp - minAmp;
amplitudes.add(amplitude);
minAmp = 9999;
}
///Math.log(10)
for(int j = 0; j < amplitudes.size() - 1; j++){
double element = Math.abs(20*(Math.log(amplitudes.get(j+1)/amplitudes.get(j))));
sum = sum + element;
}
double result1 = sum/(amplitudes.size() - 1);
return result1;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void mo1501h();",
"void mo1506m();",
"private void m23260f() {\n Shimmer aVar;\n Shader shader;\n Rect bounds = getBounds();\n int width = bounds.width();\n int height = bounds.height();\n if (width != 0 && height != 0 && (aVar = this.f19138f) != null) {\n int a = aVar.mo28981a(width);\n int b = this.f19138f.mo28983b(height);\n boolean z = true;\n if (this.f19138f.f19117g != 1) {\n if (!(this.f19138f.f19114d == 1 || this.f19138f.f19114d == 3)) {\n z = false;\n }\n if (z) {\n a = 0;\n }\n if (!z) {\n b = 0;\n }\n shader = new LinearGradient(0.0f, 0.0f, (float) a, (float) b, this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n } else {\n shader = new RadialGradient(((float) a) / 2.0f, ((float) b) / 2.0f, (float) (((double) Math.max(a, b)) / Math.sqrt(2.0d)), this.f19138f.f19112b, this.f19138f.f19111a, Shader.TileMode.CLAMP);\n }\n this.f19134b.setShader(shader);\n }\n }",
"private void m6601R() {\n if (AppFeature.f5609e) {\n this.f5399S.mo6174f(\"0\");\n }\n this.f5399S.mo6172e(\"1\");\n }",
"void mo1637a();",
"void mo27575a();",
"void mo7353b();",
"void mo1687b();",
"void mo21075f();",
"protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }",
"void mo33732Px();",
"public void apply(com.esotericsoftware.spine.Skeleton r27) {\n /*\n r26 = this;\n r0 = r26;\n r7 = r0.events;\n r0 = r26;\n r2 = r0.listeners;\n r0 = r2.size;\n r23 = r0;\n r20 = 0;\n L_0x000e:\n r0 = r26;\n r2 = r0.tracks;\n r2 = r2.size;\n r0 = r20;\n if (r0 < r2) goto L_0x0019;\n L_0x0018:\n return;\n L_0x0019:\n r0 = r26;\n r2 = r0.tracks;\n r0 = r20;\n r17 = r2.get(r0);\n r17 = (com.esotericsoftware.spine.AnimationStatePR.TrackEntry) r17;\n if (r17 != 0) goto L_0x002a;\n L_0x0027:\n r20 = r20 + 1;\n goto L_0x000e;\n L_0x002a:\n r2 = 0;\n r7.size = r2;\n r0 = r17;\n r5 = r0.time;\n r0 = r17;\n r4 = r0.lastTime;\n r0 = r17;\n r0 = r0.endTime;\n r18 = r0;\n r0 = r17;\n r6 = r0.loop;\n if (r6 != 0) goto L_0x0047;\n L_0x0041:\n r2 = (r5 > r18 ? 1 : (r5 == r18 ? 0 : -1));\n if (r2 <= 0) goto L_0x0047;\n L_0x0045:\n r5 = r18;\n L_0x0047:\n r0 = r17;\n r0 = r0.previous;\n r25 = r0;\n r0 = r17;\n r2 = r0.mixDuration;\n r3 = 0;\n r2 = (r2 > r3 ? 1 : (r2 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x018b;\n L_0x0056:\n r0 = r17;\n r2 = r0.mixTime;\n r0 = r17;\n r3 = r0.mixDuration;\n r8 = r2 / r3;\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r2 < 0) goto L_0x006d;\n L_0x0066:\n r8 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = 0;\n r0 = r17;\n r0.mixDuration = r2;\n L_0x006d:\n if (r25 != 0) goto L_0x00e0;\n L_0x006f:\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.mix(r3, r4, r5, r6, r7, r8);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r9 = \"none -> \";\n r3.<init>(r9);\n r0 = r17;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \": \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n L_0x009a:\n r21 = 0;\n r0 = r7.size;\n r24 = r0;\n L_0x00a0:\n r0 = r21;\n r1 = r24;\n if (r0 < r1) goto L_0x0196;\n L_0x00a6:\n if (r6 == 0) goto L_0x01d1;\n L_0x00a8:\n r2 = r4 % r18;\n r3 = r5 % r18;\n r2 = (r2 > r3 ? 1 : (r2 == r3 ? 0 : -1));\n if (r2 <= 0) goto L_0x00d6;\n L_0x00b0:\n r2 = r5 / r18;\n r0 = (int) r2;\n r16 = r0;\n r0 = r17;\n r2 = r0.listener;\n if (r2 == 0) goto L_0x00c6;\n L_0x00bb:\n r0 = r17;\n r2 = r0.listener;\n r0 = r20;\n r1 = r16;\n r2.complete(r0, r1);\n L_0x00c6:\n r21 = 0;\n r0 = r26;\n r2 = r0.listeners;\n r0 = r2.size;\n r24 = r0;\n L_0x00d0:\n r0 = r21;\n r1 = r24;\n if (r0 < r1) goto L_0x01db;\n L_0x00d6:\n r0 = r17;\n r2 = r0.time;\n r0 = r17;\n r0.lastTime = r2;\n goto L_0x0027;\n L_0x00e0:\n r0 = r25;\n r11 = r0.time;\n r0 = r25;\n r2 = r0.loop;\n if (r2 != 0) goto L_0x00f6;\n L_0x00ea:\n r0 = r25;\n r2 = r0.endTime;\n r2 = (r11 > r2 ? 1 : (r11 == r2 ? 0 : -1));\n if (r2 <= 0) goto L_0x00f6;\n L_0x00f2:\n r0 = r25;\n r11 = r0.endTime;\n L_0x00f6:\n r0 = r17;\n r2 = r0.animation;\n if (r2 != 0) goto L_0x0144;\n L_0x00fc:\n r0 = r25;\n r9 = r0.animation;\n r0 = r25;\n r13 = r0.loop;\n r14 = 0;\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r15 = r2 - r8;\n r10 = r27;\n r12 = r11;\n r9.mix(r10, r11, r12, r13, r14, r15);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r0 = r25;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \" -> none: \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n L_0x012f:\n r2 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n r2 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1));\n if (r2 < 0) goto L_0x009a;\n L_0x0135:\n com.badlogic.gdx.utils.Pools.free(r25);\n r2 = 0;\n r0 = r17;\n r0.previous = r2;\n r2 = 0;\n r0 = r17;\n r0.mixDuration = r2;\n goto L_0x009a;\n L_0x0144:\n r0 = r25;\n r9 = r0.animation;\n r0 = r25;\n r13 = r0.loop;\n r14 = 0;\n r10 = r27;\n r12 = r11;\n r9.apply(r10, r11, r12, r13, r14);\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.mix(r3, r4, r5, r6, r7, r8);\n r2 = java.lang.System.out;\n r3 = new java.lang.StringBuilder;\n r3.<init>();\n r0 = r25;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \" -> \";\n r3 = r3.append(r9);\n r0 = r17;\n r9 = r0.animation;\n r3 = r3.append(r9);\n r9 = \": \";\n r3 = r3.append(r9);\n r3 = r3.append(r8);\n r3 = r3.toString();\n r2.println(r3);\n goto L_0x012f;\n L_0x018b:\n r0 = r17;\n r2 = r0.animation;\n r3 = r27;\n r2.apply(r3, r4, r5, r6, r7);\n goto L_0x009a;\n L_0x0196:\n r0 = r21;\n r19 = r7.get(r0);\n r19 = (com.esotericsoftware.spine.Event) r19;\n r0 = r17;\n r2 = r0.listener;\n if (r2 == 0) goto L_0x01af;\n L_0x01a4:\n r0 = r17;\n r2 = r0.listener;\n r0 = r20;\n r1 = r19;\n r2.event(r0, r1);\n L_0x01af:\n r22 = 0;\n L_0x01b1:\n r0 = r22;\n r1 = r23;\n if (r0 < r1) goto L_0x01bb;\n L_0x01b7:\n r21 = r21 + 1;\n goto L_0x00a0;\n L_0x01bb:\n r0 = r26;\n r2 = r0.listeners;\n r0 = r22;\n r2 = r2.get(r0);\n r2 = (com.esotericsoftware.spine.AnimationStatePR.AnimationStateListener) r2;\n r0 = r20;\n r1 = r19;\n r2.event(r0, r1);\n r22 = r22 + 1;\n goto L_0x01b1;\n L_0x01d1:\n r2 = (r4 > r18 ? 1 : (r4 == r18 ? 0 : -1));\n if (r2 >= 0) goto L_0x00d6;\n L_0x01d5:\n r2 = (r5 > r18 ? 1 : (r5 == r18 ? 0 : -1));\n if (r2 < 0) goto L_0x00d6;\n L_0x01d9:\n goto L_0x00b0;\n L_0x01db:\n r0 = r26;\n r2 = r0.listeners;\n r0 = r21;\n r2 = r2.get(r0);\n r2 = (com.esotericsoftware.spine.AnimationStatePR.AnimationStateListener) r2;\n r0 = r20;\n r1 = r16;\n r2.complete(r0, r1);\n r21 = r21 + 1;\n goto L_0x00d0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.esotericsoftware.spine.AnimationStatePR.apply(com.esotericsoftware.spine.Skeleton):void\");\n }",
"private float testMethod() {\n {\n int lI0 = (-1456058746 << mI);\n mD = ((double)(int)(double) mD);\n for (int i0 = 56 - 1; i0 >= 0; i0--) {\n mArray[i0] &= (Boolean.logicalOr(((true ? ((boolean) new Boolean((mZ))) : mZ) || mArray[i0]), (mZ)));\n mF *= (mF * mF);\n if ((mZ ^ true)) {\n mF *= ((float)(int)(float) 267827331.0f);\n mZ ^= ((false & ((boolean) new Boolean(false))) | mZ);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n mZ &= ((mArray[279]) | ((boolean) new Boolean(true)));\n mD -= (--mD);\n for (int i2 = 56 - 1; i2 >= 0; i2--) {\n mF /= (mF - mF);\n mI = (Math.min(((int) new Integer(mI)), (766538816 * (++mI))));\n mF += (mZ ? (mB.a()) : ((! mZ) ? -752042357.0f : (++mF)));\n mJ |= ((long) new Long((-2084191070L + (mJ | mJ))));\n lI0 |= ((int) new Integer(((int) new Integer(mI))));\n if (((boolean) new Boolean(false))) {\n mZ &= (mZ);\n mF *= (mF--);\n mD = (Double.POSITIVE_INFINITY);\n mF += ((float)(int)(float) (-2026938813.0f * 638401585.0f));\n mJ = (--mJ);\n for (int i3 = 56 - 1; i3 >= 0; i3--) {\n mI &= (- mI);\n mD = (--mD);\n mArray[426] = (mZ || false);\n mF -= (((this instanceof Main) ? mF : mF) + 976981405.0f);\n mZ &= ((mZ) & (this instanceof Main));\n }\n mZ ^= (Float.isFinite(-1975953895.0f));\n } else {\n mJ /= ((long) (Math.nextDown(-1519600008.0f)));\n mJ <<= (Math.round(1237681786.0));\n }\n }\n mArray[i0] &= (false || ((1256071300.0f != -353296391.0f) ? false : (mZ ^ mArray[i0])));\n mF *= (+ ((float) mD));\n for (int i2 = 0; i2 < 576; i2++) {\n mD *= ((double) lI0);\n lI0 = (lI0 & (Integer.MIN_VALUE));\n mF -= (--mF);\n }\n if ((this instanceof Main)) {\n mZ ^= ((boolean) new Boolean(true));\n } else {\n {\n int lI1 = (mZ ? (--lI0) : 1099574344);\n mJ >>= (Math.incrementExact(mJ));\n mJ = (~ -2103354070L);\n }\n }\n }\n } else {\n mJ *= (- ((long) new Long(479832084L)));\n mJ %= (Long.MAX_VALUE);\n mD /= (--mD);\n if ((mI > ((mBX.x()) << mI))) {\n {\n long lJ0 = (mJ--);\n mI >>>= (mBX.x());\n }\n mF = (+ 505094603.0f);\n mD *= (((boolean) new Boolean((! false))) ? mD : 1808773781.0);\n mI *= (Integer.MIN_VALUE);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n if (((boolean) new Boolean(false))) {\n mD += ((double)(float)(double) -1051436901.0);\n } else {\n mF -= ((float)(int)(float) (Float.min(mF, (mF--))));\n }\n for (int i2 = 0; i2 < 576; i2++) {\n mJ -= ((long) new Long(-1968644857L));\n mJ ^= (+ (mC.s()));\n }\n }\n } else {\n mF -= ((- mF) + -2145489966.0f);\n }\n mD -= (mD++);\n mD = (949112777.0 * 1209996119.0);\n }\n mZ &= (Boolean.logicalAnd(true, ((mZ) & (((boolean) new Boolean(true)) && true))));\n }\n }\n return ((float) 964977619L);\n }",
"public final void mo115215h() {\n if (this.f119286e == 2 || this.f119286e == 4) {\n mo115237d(5);\n }\n }",
"public abstract int mo9741f();",
"protected void warmupImpl(M newValue) {\n\n }",
"private void m50367F() {\n }",
"void mo4833b();",
"public void mo4359a() {\n }",
"public abstract int mo9754s();",
"public double getResult(){\n double x;\n x= (3+Math.sqrt(9-4*3*(1-numberOfStrands)))/(2*3);\n if(x<0){\n x= (3-Math.sqrt(9-(4*3*(1-numberOfStrands))))/6;\n\n }\n numberOfLayers=(float) x;\n diameter=((2*numberOfLayers)-1)*strandDiameter;\n phaseSpacing=(float)(Math.cbrt(ab*bc*ca));\n\n netRadius=diameter/2;\n\n\n\n //SGMD calculation\n float prod=1;\n for(int rand=0;rand<spacingSub.size();rand++){\n prod*=spacingSub.get(rand);\n }\n\n //SGMD calculation\n sgmd=Math.pow((Math.pow(netRadius,subconductors)*prod*prod),1/(subconductors*subconductors));\n capacitance=((8.854e-12*2*3.14)/Math.log(phaseSpacing/sgmd));\n Log.d(\"How\",\"phase spacing:\"+phaseSpacing+\" sgmd=\"+sgmd);\n return capacitance*1000;\n\n\n }",
"void mo67924c();",
"public int hamming() {\n return ham;\n }",
"public void mo21783H() {\n }",
"void m8368b();",
"public int generateRoshambo(){\n ;]\n\n }",
"void mo21076g();",
"public abstract int mo123249h();",
"void mo72113b();",
"private static void mapScaler(android.hardware.camera2.impl.CameraMetadataNative r1, android.hardware.camera2.legacy.ParameterUtils.ZoomData r2, android.hardware.Camera.Parameters r3) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: android.hardware.camera2.legacy.LegacyResultMapper.mapScaler(android.hardware.camera2.impl.CameraMetadataNative, android.hardware.camera2.legacy.ParameterUtils$ZoomData, android.hardware.Camera$Parameters):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.hardware.camera2.legacy.LegacyResultMapper.mapScaler(android.hardware.camera2.impl.CameraMetadataNative, android.hardware.camera2.legacy.ParameterUtils$ZoomData, android.hardware.Camera$Parameters):void\");\n }",
"public void mo21867i() {\n mo21877s();\n }",
"void mo71b();",
"void mo9704b(float f, float f2, int i);",
"void mo57275a();",
"void mo1507n();",
"public void mo3376r() {\n }",
"public void mo4352b(View view, int i) {\n int h = this.f3146a.mo5123h();\n if (h >= 0) {\n mo4349a(view, i);\n return;\n }\n this.f3147b = i;\n if (this.f3149d) {\n int b = (this.f3146a.mo5112b() - h) - this.f3146a.mo5110a(view);\n this.f3148c = this.f3146a.mo5112b() - b;\n if (b > 0) {\n int b2 = this.f3148c - this.f3146a.mo5113b(view);\n int f = this.f3146a.mo5120f();\n int min = b2 - (f + Math.min(this.f3146a.mo5117d(view) - f, 0));\n if (min < 0) {\n this.f3148c += Math.min(b, -min);\n }\n }\n } else {\n int d = this.f3146a.mo5117d(view);\n int f2 = d - this.f3146a.mo5120f();\n this.f3148c = d;\n if (f2 > 0) {\n int b3 = (this.f3146a.mo5112b() - Math.min(0, (this.f3146a.mo5112b() - h) - this.f3146a.mo5110a(view))) - (d + this.f3146a.mo5113b(view));\n if (b3 < 0) {\n this.f3148c -= Math.min(f2, -b3);\n }\n }\n }\n }",
"public int mo9741f() {\n return mo9774x();\n }",
"public void mo3812h() {\n for (int i = 0; i < 6; i++) {\n this.f1426A[i].mo3751a().mo3882c();\n }\n }",
"public int hamming() {\n return hamming;\n }",
"public void warmUp();",
"C4945r5 mo19057F();",
"void m8367a();",
"public abstract int mo9745j();",
"public void mo4348a() {\n int i;\n if (this.f3149d) {\n i = this.f3146a.mo5112b();\n } else {\n i = this.f3146a.mo5120f();\n }\n this.f3148c = i;\n }",
"void mo57278c();",
"public abstract int mo9742g();",
"public final void mo39708H() {\n this.f40711L.mo39269a();\n }",
"public int mo9774x() {\n /*\n r5 = this;\n int r0 = r5.f9082i\n int r1 = r5.f9080g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9079f\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9082i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9776z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9082i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9774x():int\");\n }",
"void mo37810a();",
"public void calculateStastics() {\t\t\n\t\t\n\t\t/* remove verboten spectra */\n\t\tArrayList<String> verbotenSpectra = new ArrayList<String>();\n\t\tverbotenSpectra.add(\"USP_std_run1_100504135936.7436.7436.2.dta\");\n\t\tverbotenSpectra.add(\"USP_std_run1_100504135936.5161.5161.2.dta\");\n\t\tverbotenSpectra.add(\"USP_std_run1_100504135936.4294.4294.2.dta\");\n\t\tverbotenSpectra.add(\"USP_std_run1_100504135936.4199.4199.2.dta\");\n\t\tverbotenSpectra.add(\"USP_std_run1_100504135936.5085.5085.2.dta\");\n\t\tverbotenSpectra.add(\"USP_std_run1_100504135936.4129.4129.2.dta\");\n\t\tfor (int i = 0; i < positiveMatches.size(); i++) {\n\t\t\tMatch match = positiveMatches.get(i);\n\t\t\tfor (String name: verbotenSpectra) {\n\t\t\t\tif (name.equals(match.getSpectrum().getFile().getName())) {\n\t\t\t\t\tpositiveMatches.remove(i);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tfor (int i = 0; i < spectra.size(); i++) {\n\t\t\tSpectrum spectrum = spectra.get(i);\n\t\t\tfor (String name: verbotenSpectra) {\n\t\t\t\tif (name.equals(spectrum.getFile().getName())) {\n\t\t\t\t\tspectra.remove(i);\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t/* finding how much time per spectrum */\n\t\tmilisecondsPerSpectrum = (double) timeElapsed / spectra.size();\n\n\n\t\tMatch.setSortParameter(Match.SORT_BY_SCORE);\n\t\tCollections.sort(positiveMatches);\n\t\t\n\t\t\n\t\t/* Identify if each match is true or false */\n\t\ttestedMatches = new ArrayList<MatchContainer>(positiveMatches.size());\n\t\tfor (Match match: positiveMatches) {\n\t\t\tMatchContainer testedMatch = new MatchContainer(match);\n\t\t\ttestedMatches.add(testedMatch);\n\t\t}\n\t\t\n\t\t/* sort the tested matches */\n\t\tCollections.sort(testedMatches);\n\t\t\n\t\t\n\n\t\t/*account for the fact that these results might have the wrong spectrum ID due to\n\t\t * Mascot having sorted the spectra by mass\n\t\t */\n\t\tif (Properties.scoringMethodName.equals(\"Mascot\")){\n\t\t\t\n\t\t\t/* hash of true peptides */\n\t\t\tHashtable<String, Peptide> truePeptides = new Hashtable<String, Peptide>();\n\t\t\tfor (MatchContainer mc: testedMatches) {\n\t\t\t\tString truePeptide = mc.getCorrectAcidSequence();\n\t\t\t\ttruePeptides.put(truePeptide, mc.getTrueMatch().getPeptide());\n\t\t\t}\n\t\t\t\n\t\t\t/* making a hash of the best matches */\n\t\t\tHashtable<Integer, MatchContainer> bestMascotMatches = new Hashtable<Integer, MatchContainer>(); \n\t\t\tfor (MatchContainer mc: testedMatches) {\n\t\t\t\tMatchContainer best = bestMascotMatches.get(mc.getMatch().getSpectrum().getId());\n\t\t\t\tif (best == null) {\n\t\t\t\t\tbestMascotMatches.put(mc.getMatch().getSpectrum().getId(), mc);\n\t\t\t\t} else {\n\t\t\t\t\tif (truePeptides.get(mc.getMatch().getPeptide().getAcidSequenceString()) != null) {\n\t\t\t\t\t\tbestMascotMatches.put(mc.getMatch().getSpectrum().getId(), mc);\n\t\t\t\t\t\t\n\t\t\t\t\t\t/* need to set the peptide, because though it may have found a correct peptide, it might not be the right peptide for this particular spectrum */\n\t\t\t\t\t\tmc.getMatch().setPeptide(mc.getTrueMatch().getPeptide());\n\t\t\t\t\t\tmc.validate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\ttestedMatches = new ArrayList<MatchContainer>(bestMascotMatches.values());\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t/* reduce the tested matches to one per spectrum, keeping the one that is correct if there is a correct one \n\t\t * else keep the match with the best score */\n\t\tArrayList<MatchContainer> reducedTestedMatches = new ArrayList<MatchContainer>(testedMatches.size());\n\t\tfor (Spectrum spectrum: spectra) {\n\t\t\tMatchContainer toAdd = null;\n\t\t\tfor (MatchContainer mc: testedMatches) {\n\t\t\t\tif (mc.getMatch().getSpectrum().getId() == spectrum.getId()) {\n\t\t\t\t\tif (toAdd == null) {\n\t\t\t\t\t\ttoAdd = mc; \n\t\t\t\t\t}\n\t\t\t\t\tif (toAdd.getMatch().getScore() < mc.getMatch().getScore()) {\n\t\t\t\t\t\ttoAdd = mc;\n\t\t\t\t\t}\n\t\t\t\t\tif (toAdd.getMatch().getScore() == mc.getMatch().getScore() && mc.isTrue()) {\n\t\t\t\t\t\ttoAdd = mc;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (toAdd != null) {\n\t\t\t\treducedTestedMatches.add(toAdd);\n\t\t\t}\n\t\t}\n\t\ttestedMatches = reducedTestedMatches;\n\t\t\n\t\t/* ensure the testedMatches are considering the correct peptide */\n\t\tif (Properties.scoringMethodName.equals(\"Peppy.Match_IMP\")){\n\t\t\tfor (MatchContainer mc: testedMatches) {\n\t\t\t\tif (mc.getMatch().getScore() < mc.getTrueMatch().getScore()) {\n\t\t\t\t\tmc.getMatch().setPeptide(mc.getTrueMatch().getPeptide());\n\t\t\t\t\tmc.getMatch().calculateScore();\n\t\t\t\t\tmc.validate();\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\t/* again sort the tested matches */\n\t\tCollections.sort(testedMatches);\n\t\n\t\t\n\t\t//count total true;\n\t\tfor (MatchContainer match: testedMatches) {\n\t\t\tif (match.isTrue()) {\n\t\t\t\ttrueTally++;\n\t\t\t} else {\n\t\t\t\tfalseTally++;\n\t\t\t}\n\t\t\tif ((double) falseTally / (trueTally + falseTally) <= 0.01) {\n\t\t\t\ttrueTallyAtOnePercentError = trueTally;\n\t\t\t\tpercentAtOnePercentError = (double) trueTallyAtOnePercentError / spectra.size();\n\t\t\t}\n\t\t\tif ((double) falseTally / (trueTally + falseTally) <= 0.05) {\n\t\t\t\ttrueTallyAtFivePercentError = trueTally;\n\t\t\t\tpercentAtFivePercentError = (double) trueTallyAtFivePercentError / spectra.size();\n\t\t\t}\n\t\t}\n\t\t\n\t\tgeneratePrecisionRecallCurve();\n\t}",
"void mo67923b();",
"void mo17012c();",
"public abstract double calcSA();",
"public void mo42331g() {\n mo42335f();\n }",
"void mo67920a();",
"void mo41086b();",
"public void mo7206b() {\n this.f2975f.mo7325a();\n }",
"@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }",
"private static void smelt(ItemStack input, ItemStack output)\r\n\t{\r\n\t\tGameRegistry.addSmelting(input, output, 0.45F);\r\n\t}",
"public abstract int mo123248g();",
"public abstract int mo9753r();",
"public void mo21794S() {\n }",
"private float m4812h(int i, float f) {\n return (i == 8388613 || i == 3) ? (((float) this.f6612t) - f) - ((float) this.f6595c.getDrawable().getIntrinsicWidth()) : f;\n }",
"void mo88521a();",
"public void adjust_FineFuelMoisture(){\r\n\t// If FFM is one or less we set it to one\t\t\r\n\tif ((FFM-1)<=0){\r\n\t\tFFM=1;\r\n\t}else{\r\n\t\t//add 5 percent FFM for each Herb stage greater than one\r\n\t\tFFM=FFM+(iherb-1)*5;\r\n\t}\r\n}",
"public void mo21788M() {\n }",
"void mo54440f();",
"private static void psm2() {\n System.out.println(\"I5.psm2()\");\n psm3(); // OK\n }",
"void mo72114c();",
"public int storrelse();",
"public int mo9741f() {\n return mo9785x();\n }",
"@Override\n public float apply$mcFJ$sp (long arg0)\n {\n return 0;\n }",
"private final void m710e() {\n /*\n r12 = this;\n akn r0 = r12.f531p\n akl r0 = r0.f601d\n if (r0 == 0) goto L_0x0155\n boolean r1 = r0.f580d\n r2 = -9223372036854775807(0x8000000000000001, double:-4.9E-324)\n if (r1 == 0) goto L_0x0017\n aws r1 = r0.f577a\n long r4 = r1.mo1486c()\n r8 = r4\n goto L_0x0019\n L_0x0017:\n r8 = r2\n L_0x0019:\n int r1 = (r8 > r2 ? 1 : (r8 == r2 ? 0 : -1))\n if (r1 != 0) goto L_0x0122\n ajf r1 = r12.f528m\n akn r2 = r12.f531p\n akl r2 = r2.f602e\n akx r3 = r1.f445c\n r4 = 0\n if (r3 == 0) goto L_0x008a\n boolean r3 = r3.mo486w()\n if (r3 != 0) goto L_0x008a\n akx r3 = r1.f445c\n boolean r3 = r3.mo485v()\n if (r3 == 0) goto L_0x0037\n goto L_0x0042\n L_0x0037:\n if (r0 != r2) goto L_0x008a\n akx r2 = r1.f445c\n boolean r2 = r2.mo359g()\n if (r2 == 0) goto L_0x0042\n goto L_0x008a\n L_0x0042:\n bkr r2 = r1.f446d\n long r2 = r2.mo379b()\n boolean r5 = r1.f447e\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n long r5 = r5.mo379b()\n int r7 = (r2 > r5 ? 1 : (r2 == r5 ? 0 : -1))\n if (r7 >= 0) goto L_0x005c\n blf r2 = r1.f443a\n r2.mo2109d()\n goto L_0x0096\n L_0x005c:\n r1.f447e = r4\n boolean r5 = r1.f448f\n if (r5 == 0) goto L_0x0068\n blf r5 = r1.f443a\n r5.mo2107a()\n L_0x0068:\n blf r5 = r1.f443a\n r5.mo2108a(r2)\n bkr r2 = r1.f446d\n akq r2 = r2.mo376Q()\n blf r3 = r1.f443a\n akq r3 = r3.f4280a\n boolean r3 = r2.equals(r3)\n if (r3 != 0) goto L_0x0096\n blf r3 = r1.f443a\n r3.mo378a(r2)\n aje r3 = r1.f444b\n ake r3 = (p000.ake) r3\n r3.m694a(r2, r4)\n goto L_0x0096\n L_0x008a:\n r2 = 1\n r1.f447e = r2\n boolean r2 = r1.f448f\n if (r2 == 0) goto L_0x0096\n blf r2 = r1.f443a\n r2.mo2107a()\n L_0x0096:\n long r1 = r1.mo379b()\n r12.f513D = r1\n long r0 = r0.mo440b(r1)\n akp r2 = r12.f533r\n long r2 = r2.f623m\n java.util.ArrayList r5 = r12.f530o\n boolean r5 = r5.isEmpty()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n awt r5 = r5.f612b\n boolean r5 = r5.mo1504a()\n if (r5 != 0) goto L_0x011d\n akp r5 = r12.f533r\n long r6 = r5.f613c\n int r8 = (r6 > r2 ? 1 : (r6 == r2 ? 0 : -1))\n if (r8 != 0) goto L_0x00c5\n boolean r6 = r12.f515F\n if (r6 == 0) goto L_0x00c5\n r6 = -1\n long r2 = r2 + r6\n L_0x00c5:\n r12.f515F = r4\n alh r4 = r5.f611a\n awt r5 = r5.f612b\n java.lang.Object r5 = r5.f2566a\n int r4 = r4.mo525a(r5)\n int r5 = r12.f514E\n r6 = 0\n if (r5 <= 0) goto L_0x00e1\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x00e1:\n L_0x00e2:\n r5 = r6\n L_0x00e3:\n if (r5 != 0) goto L_0x00e6\n goto L_0x0109\n L_0x00e6:\n int r5 = r5.f502a\n if (r4 >= 0) goto L_0x00eb\n L_0x00ea:\n goto L_0x00f4\n L_0x00eb:\n if (r4 != 0) goto L_0x0109\n r7 = 0\n int r5 = (r2 > r7 ? 1 : (r2 == r7 ? 0 : -1))\n if (r5 >= 0) goto L_0x0109\n goto L_0x00ea\n L_0x00f4:\n int r5 = r12.f514E\n int r5 = r5 + -1\n r12.f514E = r5\n if (r5 <= 0) goto L_0x0108\n java.util.ArrayList r7 = r12.f530o\n int r5 = r5 + -1\n java.lang.Object r5 = r7.get(r5)\n akb r5 = (p000.akb) r5\n goto L_0x00e3\n L_0x0108:\n goto L_0x00e2\n L_0x0109:\n int r2 = r12.f514E\n java.util.ArrayList r3 = r12.f530o\n int r3 = r3.size()\n if (r2 >= r3) goto L_0x011d\n java.util.ArrayList r2 = r12.f530o\n int r3 = r12.f514E\n java.lang.Object r2 = r2.get(r3)\n akb r2 = (p000.akb) r2\n L_0x011d:\n akp r2 = r12.f533r\n r2.f623m = r0\n goto L_0x0140\n L_0x0122:\n r12.m691a(r8)\n akp r0 = r12.f533r\n long r0 = r0.f623m\n int r2 = (r8 > r0 ? 1 : (r8 == r0 ? 0 : -1))\n if (r2 == 0) goto L_0x0140\n akp r0 = r12.f533r\n awt r7 = r0.f612b\n long r10 = r0.f614d\n r6 = r12\n akp r0 = r6.m686a(r7, r8, r10)\n r12.f533r = r0\n akc r0 = r12.f529n\n r1 = 4\n r0.mo409b(r1)\n L_0x0140:\n akn r0 = r12.f531p\n akl r0 = r0.f603f\n akp r1 = r12.f533r\n long r2 = r0.mo442c()\n r1.f621k = r2\n akp r0 = r12.f533r\n long r1 = r12.m719n()\n r0.f622l = r1\n return\n L_0x0155:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p000.ake.m710e():void\");\n }",
"void mo21072c();",
"private static int m7217a(float f, float f2, int[] iArr, int i, int i2, int i3) {\n int i4 = iArr[1] - iArr[0];\n if (i4 == 0) {\n return 0;\n }\n int i5 = i - i3;\n int i6 = (int) (((f2 - f) / ((float) i4)) * ((float) i5));\n int i7 = i2 + i6;\n if (i7 >= i5 || i7 < 0) {\n return 0;\n }\n return i6;\n }",
"void mo72111a();",
"void mo21073d();",
"public static int[][][] rescaleShift(int[][][] ImageArray1) {\n\n int width = ImageArray1.length;\n int height = ImageArray1[0].length;\n\n int[][][] ImageArray2 = ImageArray1;\n\n float s = randFloat(0, 2);\n int t = (int) (Math.random());\n //float s = 2;\n //int t = 20;\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n\n ImageArray1[x][y][1] = (int) (t + ImageArray1[x][y][1]); //r\n ImageArray1[x][y][2] = (int) (t + ImageArray1[x][y][2]); //g\n ImageArray1[x][y][3] = (int) (t + ImageArray1[x][y][3]); //b\n }\n }\n int rmin = (int) (s * (ImageArray1[0][0][1] + t));\n int rmax = rmin;\n int gmin = (int) (s * (ImageArray1[0][0][2] + t));\n int gmax = gmin;\n int bmin = (int) (s * (ImageArray1[0][0][3] + t));\n int bmax = bmin;\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n ImageArray2[x][y][1] = (int) (s * ImageArray1[x][y][1]); //r\n ImageArray2[x][y][2] = (int) (s * ImageArray1[x][y][2]); //g\n ImageArray2[x][y][3] = (int) (s * ImageArray1[x][y][3]); //b\n\n if (rmin > ImageArray2[x][y][1]) {\n rmin = ImageArray2[x][y][1];\n }\n if (gmin > ImageArray2[x][y][2]) {\n gmin = ImageArray2[x][y][2];\n }\n if (bmin > ImageArray2[x][y][3]) {\n bmin = ImageArray2[x][y][3];\n }\n if (rmax < ImageArray2[x][y][1]) {\n rmax = ImageArray2[x][y][1];\n }\n if (gmax < ImageArray2[x][y][2]) {\n gmax = ImageArray2[x][y][2];\n }\n if (bmax < ImageArray2[x][y][3]) {\n bmax = ImageArray2[x][y][3];\n }\n }\n }\n for (int y = 0; y < height; y++) {\n for (int x = 0; x < width; x++) {\n ImageArray2[x][y][1] = 255 * (ImageArray2[x][y][1] - rmin) / (rmax - rmin);\n ImageArray2[x][y][2] = 255 * (ImageArray2[x][y][2] - gmin) / (gmax - gmin);\n ImageArray2[x][y][3] = 255 * (ImageArray2[x][y][3] - bmin) / (bmax - bmin);\n }\n }\n return (ImageArray2);\n }",
"public int mo9761x() {\n /*\n r5 = this;\n int r0 = r5.f9074i\n int r1 = r5.f9072g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9070e\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9074i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9763z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9074i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3658b.mo9761x():int\");\n }",
"public void mo14071a(int i, float f) {\n View m = mo23948m();\n if (m != null) {\n float f2 = i == 1 ? f : i == 2 ? 1.0f : 0.0f;\n this.f15642X.setRotation(9.0f * f2);\n float f3 = (f2 * 0.205f) + 1.0f;\n this.f15641W.setScaleX(f3);\n this.f15641W.setScaleY(f3);\n float f4 = i == 0 ? 1.0f - f : 0.0f;\n this.f15638T.setRotation(-9.0f * f4);\n float f5 = (f4 * 0.205f) + 1.0f;\n this.f15637S.setScaleX(f5);\n this.f15637S.setScaleY(f5);\n if (this.f15656l0) {\n if (f == 0.0f && (i == 0 || i == 2)) {\n this.f15656l0 = false;\n } else {\n return;\n }\n }\n if (i != 1) {\n f = 1.0f - f;\n }\n float f6 = 1.0f - f;\n float f7 = (0.205f * f6) + 1.0f;\n this.f15639U.setScaleX(f7);\n this.f15639U.setScaleY(f7);\n float f8 = (float) ((int) (((float) f15633z0) * f));\n this.f15643Y.setTranslationY(f8);\n this.f15643Y.setAlpha(f6);\n this.f15639U.setTranslationY(f8);\n int measuredWidth = (m.getMeasuredWidth() / 2) - f15630A0;\n int i2 = f15632y0;\n int i3 = (int) (((float) ((measuredWidth - i2) - (i2 / 2))) * f);\n this.f15637S.setTranslationX((float) i3);\n this.f15641W.setTranslationX((float) (-i3));\n this.f15664t0.onViewPagerScrolled(f, f15633z0);\n }\n }",
"void mo119581a();",
"int mo27480a();",
"static void armStrongSeries(){\n\t}",
"void mo41083a();",
"void mo1763h(int i);",
"dkk mo4508f();",
"void mo80455b();",
"void mo60893b();",
"void mo119582b();",
"int mo1760g();",
"public int mo9785x() {\n /*\n r10 = this;\n long r0 = r10.f9091i\n long r2 = r10.f9090h\n int r2 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1))\n if (r2 != 0) goto L_0x000a\n goto L_0x0085\n L_0x000a:\n r2 = 1\n long r4 = r0 + r2\n byte r0 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r0)\n if (r0 < 0) goto L_0x0017\n r10.f9091i = r4\n return r0\n L_0x0017:\n long r6 = r10.f9090h\n long r6 = r6 - r4\n r8 = 9\n int r1 = (r6 > r8 ? 1 : (r6 == r8 ? 0 : -1))\n if (r1 >= 0) goto L_0x0021\n goto L_0x0085\n L_0x0021:\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n int r1 = r1 << 7\n r0 = r0 ^ r1\n if (r0 >= 0) goto L_0x002f\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x008b\n L_0x002f:\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x003e\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x003c:\n r6 = r4\n goto L_0x008b\n L_0x003e:\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n int r1 = r1 << 21\n r0 = r0 ^ r1\n if (r0 >= 0) goto L_0x004e\n r1 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r1\n goto L_0x008b\n L_0x004e:\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n int r6 = r1 << 28\n r0 = r0 ^ r6\n r6 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r6\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n L_0x0085:\n long r0 = r10.mo9787z()\n int r0 = (int) r0\n return r0\n L_0x008b:\n r10.f9091i = r6\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3661d.mo9785x():int\");\n }",
"public int mo9741f() {\n return mo9761x();\n }",
"public void mo21877s() {\n }",
"public final int warmup(M newValue) {\n numWarmup++;\n warmupImpl(newValue);\n return numWarmup;\n }",
"public abstract int mo9797a();",
"public abstract int mo123247f();",
"void mo9693a();",
"public void mo21785J() {\n }",
"void mo56163g();"
]
| [
"0.598375",
"0.5694126",
"0.5677906",
"0.56584483",
"0.5612316",
"0.56121355",
"0.55517566",
"0.5526309",
"0.55260456",
"0.5522696",
"0.55183977",
"0.5506434",
"0.5469367",
"0.546614",
"0.54600924",
"0.5454606",
"0.54539686",
"0.54522514",
"0.54321796",
"0.5431705",
"0.5412907",
"0.54023993",
"0.53987265",
"0.53934115",
"0.53888303",
"0.5387726",
"0.5387096",
"0.53742045",
"0.5372991",
"0.5369798",
"0.5365246",
"0.5353812",
"0.5348549",
"0.5332293",
"0.5328613",
"0.5320293",
"0.5319703",
"0.5317492",
"0.53115535",
"0.5310228",
"0.53084695",
"0.53069973",
"0.53042156",
"0.52981097",
"0.52933925",
"0.52897245",
"0.52879393",
"0.52867067",
"0.5286619",
"0.5285928",
"0.528528",
"0.5282056",
"0.52726114",
"0.52712935",
"0.5268096",
"0.5267423",
"0.52669924",
"0.52667505",
"0.5264342",
"0.5261098",
"0.52602965",
"0.5259453",
"0.52573276",
"0.52529854",
"0.52527195",
"0.52504116",
"0.5243713",
"0.52431446",
"0.524062",
"0.5239325",
"0.5228115",
"0.52224046",
"0.5221629",
"0.52209985",
"0.5218536",
"0.5216653",
"0.52113116",
"0.5205418",
"0.5203693",
"0.5202399",
"0.5200392",
"0.51982486",
"0.51979643",
"0.51973885",
"0.5197383",
"0.5195808",
"0.5195754",
"0.5194199",
"0.51938856",
"0.519379",
"0.5192683",
"0.51873606",
"0.5186299",
"0.5180631",
"0.51750517",
"0.5173946",
"0.516781",
"0.5167646",
"0.5167229",
"0.51638275"
]
| 0.58365786 | 1 |
FEATURE NUMBER 2 : JITTER The method calculating the Jitter (corresponds to ddp in Praat) | public double getJitter() {
double sumOfDifferenceOfPeriods = 0.0; // sum of difference between every two periods
double sumOfPeriods = 0.0; // sum of all periods
double numberOfPeriods = periods.size(); //set as double for double division
// JITTER FORMULA (RELATIVE)
for ( int i = 0; i < periods.size() - 1; i++ ) {
sumOfDifferenceOfPeriods += Math.abs( periods.get( i ) - periods.get( i + 1 ) );
sumOfPeriods += periods.get( i );
}
// add the last period into sum
if ( !periods.isEmpty() ) {
sumOfPeriods += periods.get( periods.size() - 1 );
}
double meanPeriod = sumOfPeriods / numberOfPeriods;
// calculate jitter (relative)
return ( sumOfDifferenceOfPeriods / ( numberOfPeriods - 1 ) ) / meanPeriod;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static int benchmarkedMethod() {\n return 3;\n }",
"@Benchmark\n public void testJMH(@SuppressWarnings(\"unused\") GraalState s) {\n }",
"public void jitter() {\n // jitter +- 20% of the value\n double amount = 0.20;\n double change = 1.0 - amount + (Evolve.getRandomNumber() * amount * 2); \n value *= change;\n }",
"private float testMethod() {\n {\n int lI0 = (-1456058746 << mI);\n mD = ((double)(int)(double) mD);\n for (int i0 = 56 - 1; i0 >= 0; i0--) {\n mArray[i0] &= (Boolean.logicalOr(((true ? ((boolean) new Boolean((mZ))) : mZ) || mArray[i0]), (mZ)));\n mF *= (mF * mF);\n if ((mZ ^ true)) {\n mF *= ((float)(int)(float) 267827331.0f);\n mZ ^= ((false & ((boolean) new Boolean(false))) | mZ);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n mZ &= ((mArray[279]) | ((boolean) new Boolean(true)));\n mD -= (--mD);\n for (int i2 = 56 - 1; i2 >= 0; i2--) {\n mF /= (mF - mF);\n mI = (Math.min(((int) new Integer(mI)), (766538816 * (++mI))));\n mF += (mZ ? (mB.a()) : ((! mZ) ? -752042357.0f : (++mF)));\n mJ |= ((long) new Long((-2084191070L + (mJ | mJ))));\n lI0 |= ((int) new Integer(((int) new Integer(mI))));\n if (((boolean) new Boolean(false))) {\n mZ &= (mZ);\n mF *= (mF--);\n mD = (Double.POSITIVE_INFINITY);\n mF += ((float)(int)(float) (-2026938813.0f * 638401585.0f));\n mJ = (--mJ);\n for (int i3 = 56 - 1; i3 >= 0; i3--) {\n mI &= (- mI);\n mD = (--mD);\n mArray[426] = (mZ || false);\n mF -= (((this instanceof Main) ? mF : mF) + 976981405.0f);\n mZ &= ((mZ) & (this instanceof Main));\n }\n mZ ^= (Float.isFinite(-1975953895.0f));\n } else {\n mJ /= ((long) (Math.nextDown(-1519600008.0f)));\n mJ <<= (Math.round(1237681786.0));\n }\n }\n mArray[i0] &= (false || ((1256071300.0f != -353296391.0f) ? false : (mZ ^ mArray[i0])));\n mF *= (+ ((float) mD));\n for (int i2 = 0; i2 < 576; i2++) {\n mD *= ((double) lI0);\n lI0 = (lI0 & (Integer.MIN_VALUE));\n mF -= (--mF);\n }\n if ((this instanceof Main)) {\n mZ ^= ((boolean) new Boolean(true));\n } else {\n {\n int lI1 = (mZ ? (--lI0) : 1099574344);\n mJ >>= (Math.incrementExact(mJ));\n mJ = (~ -2103354070L);\n }\n }\n }\n } else {\n mJ *= (- ((long) new Long(479832084L)));\n mJ %= (Long.MAX_VALUE);\n mD /= (--mD);\n if ((mI > ((mBX.x()) << mI))) {\n {\n long lJ0 = (mJ--);\n mI >>>= (mBX.x());\n }\n mF = (+ 505094603.0f);\n mD *= (((boolean) new Boolean((! false))) ? mD : 1808773781.0);\n mI *= (Integer.MIN_VALUE);\n for (int i1 = 576 - 1; i1 >= 0; i1--) {\n if (((boolean) new Boolean(false))) {\n mD += ((double)(float)(double) -1051436901.0);\n } else {\n mF -= ((float)(int)(float) (Float.min(mF, (mF--))));\n }\n for (int i2 = 0; i2 < 576; i2++) {\n mJ -= ((long) new Long(-1968644857L));\n mJ ^= (+ (mC.s()));\n }\n }\n } else {\n mF -= ((- mF) + -2145489966.0f);\n }\n mD -= (mD++);\n mD = (949112777.0 * 1209996119.0);\n }\n mZ &= (Boolean.logicalAnd(true, ((mZ) & (((boolean) new Boolean(true)) && true))));\n }\n }\n return ((float) 964977619L);\n }",
"public BigDecimal getJitterDsp() {\r\n return jitterDsp;\r\n }",
"@Test\n @Tag(\"slow\")\n public void testFIT1D() {\n CuteNetlibCase.doTest(\"FIT1D.SIF\", \"-9146.378092421019\", \"80453.99999999999\", NumberContext.of(7, 4));\n }",
"private void m15513b(long j) {\n if (mo9140c() != null) {\n this.f13396d.f11688z = System.currentTimeMillis();\n int intValue = ((Integer) this.f13396d.get(\"data_pk_anchor_score\")).intValue();\n int intValue2 = ((Integer) this.f13396d.get(\"data_pk_guest_score\")).intValue();\n if (intValue > intValue2) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_result\", PkResult.LEFT_WON);\n } else if (intValue < intValue2) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_result\", PkResult.RIGHT_WON);\n } else {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_result\", PkResult.EVEN);\n }\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_state\", PkState.PENAL);\n if (j <= 0) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_state\", PkState.FINISHED);\n }\n int i = (int) (j / 1000);\n int i2 = (int) (j % 1000);\n if (this.f13399i != null) {\n this.f13399i.dispose();\n this.f13399i = null;\n }\n this.f13399i = C9057b.m27050a(0, 1, TimeUnit.SECONDS).mo19305c((long) (i + 1)).mo19320e((long) i2, TimeUnit.MILLISECONDS).mo19317d((C7327h<? super T, ? extends R>) new C4703fw<Object,Object>(i)).mo19294a(C47549a.m148327a()).mo19280a((C7326g<? super T>) new C4704fx<Object>(this), (C7326g<? super Throwable>) new C4705fy<Object>(this));\n }\n }",
"static /* synthetic */ void m34120F(int i, long j) {\n AppMethodBeat.m2504i(114776);\n C22440b c22440b;\n if (i == 11) {\n c22440b = new C22440b();\n c22440b.startTime = System.currentTimeMillis();\n sJR.put(Long.valueOf(j), c22440b);\n AppMethodBeat.m2505o(114776);\n return;\n }\n if (i == 12) {\n if (!sJR.containsKey(Long.valueOf(j))) {\n new C22440b().startTime = System.currentTimeMillis();\n AppMethodBeat.m2505o(114776);\n return;\n }\n } else if (i == 13) {\n c22440b = (C22440b) sJR.get(Long.valueOf(j));\n if (c22440b != null) {\n c22440b.endTime = System.currentTimeMillis();\n sJT.add(c22440b);\n sJR.remove(Long.valueOf(j));\n }\n }\n AppMethodBeat.m2505o(114776);\n }",
"private final float[] probabilisticDiffusion1D(float[] proba, byte[] dir, int ngbParam, float maxdiffParam, float angle, float factor, int iterParam) {\n\t\tfor (int x=0;x<nx;x++) for (int y=0;y<ny;y++) for (int z=0;z<nz;z++) {\n\t\t\tint xyz = x+nx*y+nx*ny*z;\n\t\t\tif (x<1 || y<1 || z<1 || x>=nx-1 || y>=ny-1 || z>=nz-1) proba[xyz] = 0.0f;\n\t\t}\n\t\t\n\t\t// build a similarity function from aligned neighbors\n\t\tfloat[][] similarity = new float[ngbParam][nxyz];\n\t\tbyte[][] neighbor = new byte[ngbParam][nxyz];\n \testimateSimpleDiffusionSimilarity1D(dir, proba, ngbParam, neighbor, similarity, angle);\n\t\t\n\t\t// run the diffusion process\n\t\tfloat[] diffused = new float[nxyz];\n\t\tfor (int xyz=0;xyz<nxyz;xyz++) {\n\t\t\tdiffused[xyz] = (float)FastMath.log(1.0f + proba[xyz]);\n\t\t}\n\n\t\tfactor /= (float)ngbParam;\n\t\tfor (int t=0;t<iterParam;t++) {\n\t\t\tBasicInfo.displayMessage(\"iteration \"+(t+1)+\": \");\n\t\t\tfloat diff = 0.0f;\n\t\t\tfor (int xyz=0;xyz<nxyz;xyz++) if (proba[xyz]>0) {\n\t\t\t\tfloat prev = diffused[xyz];\n\t\t\t\tdiffused[xyz] = proba[xyz];\n\t\t\t\t// weight with distance to 0 or 1\n\t\t\t\tfor (int n=0;n<ngbParam;n++) {\n\t\t\t\t\tfloat ngb = diffused[neighborIndex(neighbor[n][xyz],xyz)];\n\t\t\t\t\t// remap neighbors?\n\t\t\t\t\tngb = (float)FastMath.exp(ngb)-1.0f;\n\t\t\t\t\n\t\t\t\t\t// integration over the whole vessel (log version is more stable (??) )\n\t\t\t\t\tdiffused[xyz] += factor*similarity[n][xyz]*ngb;\n\t\t\t\t}\n\t\t\t\tdiffused[xyz] = (float)FastMath.log(1.0f + diffused[xyz]);\n\t\t\t\t\n\t\t\t\tif (diffused[xyz]+prev>0) {\n\t\t\t\t\tif (Numerics.abs(prev-diffused[xyz])/(prev+diffused[xyz])>diff) diff = Numerics.abs(prev-diffused[xyz])/(prev+diffused[xyz]);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tBasicInfo.displayMessage(\"diff \"+diff+\"\\n\");\n\t\t\tif (diff<maxdiffParam) t=iterParam;\n\t\t}\n\t\t\n\t\tfor (int x=0;x<nx;x++) for (int y=0;y<ny;y++) for (int z=0;z<nz;z++) {\n\t\t\tint id = x + nx*y + nx*ny*z;\n\t\t\tif (iterParam<2) diffused[id] = Numerics.bounded((float)(FastMath.exp(diffused[id])-1.0), 0.0f, 1.0f);\n\t\t\telse diffused[id] = Numerics.bounded((float)(FastMath.exp(diffused[id])-1.0)/(1.0f+2.0f*factor), 0.0f, 1.0f);\n\t\t}\n\t\treturn diffused;\n\t}",
"public void run() {\n int tempRate;\n long frameTimeNanos = OppoRampAnimator.this.mChoreographer.getFrameTimeNanos();\n float timeDelta = ((float) (frameTimeNanos - OppoRampAnimator.this.mLastFrameTimeNanos)) * 1.0E-9f;\n OppoRampAnimator.this.mLastFrameTimeNanos = frameTimeNanos;\n OppoRampAnimator.access$208();\n if (OppoRampAnimator.this.mTargetValue > OppoRampAnimator.this.mCurrentValue) {\n int i = 300;\n if (4 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i2 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i2 + i;\n } else if (3 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i3 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i3 + i;\n } else if (2 == OppoBrightUtils.mBrightnessBitsConfig) {\n int i4 = OppoRampAnimator.this.mRate;\n if (OppoRampAnimator.mAnimationFrameCount <= 300) {\n i = OppoRampAnimator.mAnimationFrameCount;\n }\n tempRate = i4 + i;\n } else {\n tempRate = OppoRampAnimator.this.mRate;\n }\n } else {\n tempRate = OppoRampAnimator.this.mRate;\n }\n OppoBrightUtils unused = OppoRampAnimator.this.mOppoBrightUtils;\n float scale = OppoBrightUtils.mBrightnessNoAnimation ? 0.0f : ValueAnimator.getDurationScale();\n if (scale == OppoBrightUtils.MIN_LUX_LIMITI) {\n OppoRampAnimator oppoRampAnimator = OppoRampAnimator.this;\n oppoRampAnimator.mAnimatedValue = (float) oppoRampAnimator.mTargetValue;\n } else {\n float amount = OppoRampAnimator.this.caculateAmount((((float) tempRate) * timeDelta) / scale);\n float amountScaleFor4096 = 1.0f;\n OppoBrightUtils unused2 = OppoRampAnimator.this.mOppoBrightUtils;\n int i5 = OppoBrightUtils.mBrightnessBitsConfig;\n OppoBrightUtils unused3 = OppoRampAnimator.this.mOppoBrightUtils;\n if (i5 == 4) {\n amountScaleFor4096 = 2.0f;\n }\n if (OppoRampAnimator.this.mOppoBrightUtils.isAIBrightnessOpen()) {\n OppoBrightUtils unused4 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mManualSetAutoBrightness && OppoRampAnimator.this.mRate != OppoBrightUtils.BRIGHTNESS_RAMP_RATE_FAST && !DisplayPowerController.mScreenDimQuicklyDark) {\n OppoBrightUtils unused5 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mReduceBrightnessAnimating) {\n amount = amountScaleFor4096 * OppoRampAnimator.this.mOppoBrightUtils.getAIBrightnessHelper().getNextChange(OppoRampAnimator.this.mTargetValue, OppoRampAnimator.this.mAnimatedValue, timeDelta);\n }\n }\n }\n if (OppoRampAnimator.this.mTargetValue > OppoRampAnimator.this.mCurrentValue) {\n OppoRampAnimator oppoRampAnimator2 = OppoRampAnimator.this;\n oppoRampAnimator2.mAnimatedValue = Math.min(oppoRampAnimator2.mAnimatedValue + amount, (float) OppoRampAnimator.this.mTargetValue);\n } else {\n OppoBrightUtils unused6 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mUseAutoBrightness && amount < 10.0f) {\n amount = (float) (OppoBrightUtils.BRIGHTNESS_RAMP_RATE_FAST / 60);\n }\n OppoRampAnimator oppoRampAnimator3 = OppoRampAnimator.this;\n oppoRampAnimator3.mAnimatedValue = Math.max(oppoRampAnimator3.mAnimatedValue - amount, (float) OppoRampAnimator.this.mTargetValue);\n }\n }\n int oldCurrentValue = OppoRampAnimator.this.mCurrentValue;\n OppoRampAnimator oppoRampAnimator4 = OppoRampAnimator.this;\n oppoRampAnimator4.mCurrentValue = Math.round(oppoRampAnimator4.mAnimatedValue);\n if (oldCurrentValue != OppoRampAnimator.this.mCurrentValue) {\n OppoRampAnimator.this.mProperty.setValue(OppoRampAnimator.this.mObject, OppoRampAnimator.this.mCurrentValue);\n }\n if (OppoRampAnimator.this.mOppoBrightUtils.isSunnyBrightnessSupport()) {\n OppoRampAnimator.this.mOppoBrightUtils.setCurrentBrightnessRealValue(OppoRampAnimator.this.mCurrentValue);\n }\n if ((OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue >= OppoRampAnimator.this.mCurrentValue || OppoAutomaticBrightnessController.mProximityNear) && ((OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue <= OppoRampAnimator.this.mCurrentValue) && (!OppoBrightUtils.DEBUG_PRETEND_PROX_SENSOR_ABSENT || OppoRampAnimator.this.mTargetValue == OppoRampAnimator.this.mCurrentValue))) {\n OppoBrightUtils unused7 = OppoRampAnimator.this.mOppoBrightUtils;\n if (!OppoBrightUtils.mManualSetAutoBrightness || OppoRampAnimator.this.mTargetValue == OppoRampAnimator.this.mCurrentValue) {\n int unused8 = OppoRampAnimator.mAnimationFrameCount = 0;\n OppoRampAnimator.this.mAnimating = false;\n if (OppoRampAnimator.this.mListener != null) {\n OppoRampAnimator.this.mListener.onAnimationEnd();\n OppoBrightUtils unused9 = OppoRampAnimator.this.mOppoBrightUtils;\n OppoBrightUtils.mUseWindowBrightness = false;\n OppoBrightUtils unused10 = OppoRampAnimator.this.mOppoBrightUtils;\n OppoBrightUtils.mCameraUseAdjustmentSetting = false;\n return;\n }\n return;\n }\n }\n OppoRampAnimator.this.postAnimationCallback();\n }",
"@Test\n @Tag(\"slow\")\n public void testFIT1P() {\n CuteNetlibCase.doTest(\"FIT1P.SIF\", \"9146.378092420955\", null, NumberContext.of(7, 4));\n }",
"protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }",
"@Test\n @Tag(\"slow\")\n public void testMODSZK1() {\n CuteNetlibCase.doTest(\"MODSZK1.SIF\", \"320.6197293824883\", null, NumberContext.of(7, 4));\n }",
"public int mo9761x() {\n /*\n r5 = this;\n int r0 = r5.f9074i\n int r1 = r5.f9072g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9070e\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9074i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9763z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9074i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3658b.mo9761x():int\");\n }",
"private static int runBenchmark(int n) {\n int result = 0;\n for (int i = 0; i < n; i++) {\n for (int j = 0; j < n; j++) {\n result = benchmarkedMethod();\n }\n }\n return result;\n }",
"public void mo7624j() {\n mo7623i();\n int size = this.f4372b.size();\n for (int i = 0; i < size; i++) {\n C0933b bVar = this.f4372b.get(i);\n int i2 = bVar.f4379a;\n if (i2 == 1) {\n this.f4374d.mo7441d(bVar);\n this.f4374d.mo7444g(bVar.f4380b, bVar.f4382d);\n } else if (i2 == 2) {\n this.f4374d.mo7441d(bVar);\n this.f4374d.mo7445h(bVar.f4380b, bVar.f4382d);\n } else if (i2 == 4) {\n this.f4374d.mo7441d(bVar);\n this.f4374d.mo7440c(bVar.f4380b, bVar.f4382d, bVar.f4381c);\n } else if (i2 == 8) {\n this.f4374d.mo7441d(bVar);\n this.f4374d.mo7438a(bVar.f4380b, bVar.f4382d);\n }\n Runnable runnable = this.f4375e;\n if (runnable != null) {\n runnable.run();\n }\n }\n mo7636x(this.f4372b);\n this.f4378h = 0;\n }",
"void mo30290d(long j);",
"interface JitterBufferBehaviour\r\n{\r\n /**\r\n * Drops a packet from the associated <tt>JitterBuffer</tt>. Usually, the\r\n * dropped packet is the oldest (in terms of receipt).\r\n */\r\n void dropPkt();\r\n\r\n /**\r\n * Gets the absolute maximum delay in milliseconds that an adaptive jitter\r\n * buffer can reach under worst case conditions. If this value exceeds 65535\r\n * milliseconds, then 65535 shall be returned. Returns <tt>maximumDelay</tt>\r\n * for a fixed jitter buffer implementation.\r\n *\r\n * @return the absolute maximum delay in milliseconds that an adaptive\r\n * jitter buffer can reach under worst case conditions\r\n */\r\n int getAbsoluteMaximumDelay();\r\n\r\n /**\r\n * Gets the current maximum jitter buffer delay in milliseconds which\r\n * corresponds to the earliest arriving packet that would not be discarded.\r\n * In simple queue implementations it may correspond to the nominal size. In\r\n * adaptive jitter buffer implementations, the value may dynamically vary up\r\n * to <tt>absoluteMaximumDelay</tt>.\r\n *\r\n * @return the current maximum jitter buffer delay in milliseconds which\r\n * corresponds to the earliest arriving packet that would not be discarded\r\n */\r\n int getMaximumDelay();\r\n\r\n /**\r\n * Gets the current nominal jitter buffer delay in milliseconds, which\r\n * corresponds to the nominal jitter buffer delay for packets that arrive\r\n * exactly on time.\r\n *\r\n * @return the current nominal jitter buffer delay in milliseconds, which\r\n * corresponds to the nominal jitter buffer delay for packets that arrive\r\n * exactly on time\r\n */\r\n int getNominalDelay();\r\n\r\n /**\r\n * Determines whether the jitter buffer logic implemented by this instance\r\n * exhibits adaptive (as opposed to fixed) behaviour.\r\n *\r\n * @return <tt>true</tt> if this instance implements the behaviour of an\r\n * adaptive jitter buffer or <tt>false</tt> if this instance implements the\r\n * behaviour of a fixed jitter buffer\r\n */\r\n boolean isAdaptive();\r\n\r\n /**\r\n * Invoked by {@link RTPSourceStream} after a specific <tt>Buffer</tt> has\r\n * been received and before it is added to the associated\r\n * <tt>JitterBuffer</tt>. Allows implementations to adapt the\r\n * <tt>JitterBuffer</tt> to the receipt of the specified <tt>buffer</tt> and\r\n * to optionally prevent its addition.\r\n *\r\n * @param buffer the <tt>Buffer</tt> which has been received and which is to\r\n * be added to the associated <tt>JitterBuffer</tt> if <tt>true</tt> is\r\n * returned\r\n * @param rtprawreceiver\r\n * @return <tt>true</tt> if the specified <tt>Buffer</tt> is to be added to\r\n * the associated <tt>JitterBuffer</tt>; otherwise, <tt>false</tt>\r\n */\r\n boolean preAdd(Buffer buffer, RTPRawReceiver rtprawreceiver);\r\n\r\n /**\r\n * Reads from the associated <tt>JitterBuffer</tt> and writes into the\r\n * specified <tt>Buffer</tt>.\r\n *\r\n * @param buffer the <tt>Buffer</tt> into which the media read from the\r\n * associated <tt>JitterBuffer</tt> is to be written\r\n */\r\n void read(Buffer buffer);\r\n\r\n /**\r\n * Notifies this instance that the associated <tt>RTPSourceStream</tt> has\r\n * been reset.\r\n */\r\n void reset();\r\n\r\n /**\r\n * Determines whether a subsequent invocation of {@link #read(Buffer)} on\r\n * this instance will block the calling/current thread.\r\n *\r\n * @return <tt>true</tt> if a subsequent invocation of <tt>read(Buffer)</tt>\r\n * on this instance will block the calling/current thread or <tt>false</tt>\r\n * if a packet may be read without blocking\r\n */\r\n boolean willReadBlock();\r\n}",
"public long mo9786y() {\n long j;\n long j2;\n long j3;\n byte b;\n long j4 = this.f9091i;\n if (this.f9090h != j4) {\n long j5 = j4 + 1;\n byte a = C3691q1.m8803a(j4);\n if (a >= 0) {\n this.f9091i = j5;\n return (long) a;\n } else if (this.f9090h - j5 >= 9) {\n long j6 = j5 + 1;\n byte a2 = a ^ (C3691q1.m8803a(j5) << 7);\n if (a2 < 0) {\n b = a2 ^ Byte.MIN_VALUE;\n } else {\n long j7 = j6 + 1;\n byte a3 = a2 ^ (C3691q1.m8803a(j6) << 14);\n if (a3 >= 0) {\n j = (long) (a3 ^ 16256);\n } else {\n j6 = j7 + 1;\n byte a4 = a3 ^ (C3691q1.m8803a(j7) << 21);\n if (a4 < 0) {\n b = a4 ^ -2080896;\n } else {\n j7 = j6 + 1;\n long a5 = ((long) a4) ^ (((long) C3691q1.m8803a(j6)) << 28);\n if (a5 >= 0) {\n j3 = 266354560;\n } else {\n long j8 = j7 + 1;\n long a6 = a5 ^ (((long) C3691q1.m8803a(j7)) << 35);\n if (a6 < 0) {\n j2 = -34093383808L;\n } else {\n j7 = j8 + 1;\n a5 = a6 ^ (((long) C3691q1.m8803a(j8)) << 42);\n if (a5 >= 0) {\n j3 = 4363953127296L;\n } else {\n j8 = j7 + 1;\n a6 = a5 ^ (((long) C3691q1.m8803a(j7)) << 49);\n if (a6 < 0) {\n j2 = -558586000294016L;\n } else {\n j7 = j8 + 1;\n j = (a6 ^ (((long) C3691q1.m8803a(j8)) << 56)) ^ 71499008037633920L;\n if (j < 0) {\n long j9 = 1 + j7;\n if (((long) C3691q1.m8803a(j7)) >= 0) {\n j6 = j9;\n this.f9091i = j6;\n return j;\n }\n }\n }\n }\n }\n j = a6 ^ j2;\n j6 = j8;\n this.f9091i = j6;\n return j;\n }\n j = a5 ^ j3;\n }\n }\n j6 = j7;\n this.f9091i = j6;\n return j;\n }\n j = (long) b;\n this.f9091i = j6;\n return j;\n }\n }\n return mo9787z();\n }",
"public int mo9745j() {\n return mo9774x();\n }",
"static int m22556b(zzwt zzwt, cu cuVar) {\n zztw zztw = (zztw) zzwt;\n int d = zztw.mo4835d();\n if (d == -1) {\n d = cuVar.mo3068b(zztw);\n zztw.mo4833a(d);\n }\n return m22576g(d) + d;\n }",
"public int mo9745j() {\n return mo9761x();\n }",
"public void setJitterDsp(BigDecimal jitterDsp) {\r\n this.jitterDsp = jitterDsp;\r\n }",
"public abstract long mo9746k();",
"@LargeTest\n public void testMandelbrotfp64() {\n TestAction ta = new TestAction(TestName.MANDELBROT_DOUBLE);\n runTest(ta, TestName.MANDELBROT_DOUBLE.name());\n }",
"public int mo9774x() {\n /*\n r5 = this;\n int r0 = r5.f9082i\n int r1 = r5.f9080g\n if (r1 != r0) goto L_0x0007\n goto L_0x006a\n L_0x0007:\n byte[] r2 = r5.f9079f\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0012\n r5.f9082i = r3\n return r0\n L_0x0012:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x0018\n goto L_0x006a\n L_0x0018:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0024\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x0070\n L_0x0024:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x0031\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x002f:\n r1 = r3\n goto L_0x0070\n L_0x0031:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x003f\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0070\n L_0x003f:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r4 = r1 << 28\n r0 = r0 ^ r4\n r4 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r4\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r3 = r2[r3]\n if (r3 >= 0) goto L_0x0070\n int r3 = r1 + 1\n byte r1 = r2[r1]\n if (r1 >= 0) goto L_0x002f\n int r1 = r3 + 1\n byte r2 = r2[r3]\n if (r2 >= 0) goto L_0x0070\n L_0x006a:\n long r0 = r5.mo9776z()\n int r0 = (int) r0\n return r0\n L_0x0070:\n r5.f9082i = r1\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9774x():int\");\n }",
"public long mo9762y() {\n /*\n r11 = this;\n int r0 = r11.f9074i\n int r1 = r11.f9072g\n if (r1 != r0) goto L_0x0008\n goto L_0x00b6\n L_0x0008:\n byte[] r2 = r11.f9070e\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0014\n r11.f9074i = r3\n long r0 = (long) r0\n return r0\n L_0x0014:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x001b\n goto L_0x00b6\n L_0x001b:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0029\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n L_0x0026:\n long r2 = (long) r0\n goto L_0x00bd\n L_0x0029:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x003a\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n long r0 = (long) r0\n r9 = r0\n r1 = r3\n r2 = r9\n goto L_0x00bd\n L_0x003a:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0048\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0026\n L_0x0048:\n long r3 = (long) r0\n int r0 = r1 + 1\n byte r1 = r2[r1]\n long r5 = (long) r1\n r1 = 28\n long r5 = r5 << r1\n long r3 = r3 ^ r5\n r5 = 0\n int r1 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r1 < 0) goto L_0x005f\n r1 = 266354560(0xfe03f80, double:1.315966377E-315)\n L_0x005b:\n long r2 = r3 ^ r1\n r1 = r0\n goto L_0x00bd\n L_0x005f:\n int r1 = r0 + 1\n byte r0 = r2[r0]\n long r7 = (long) r0\n r0 = 35\n long r7 = r7 << r0\n long r3 = r3 ^ r7\n int r0 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r0 >= 0) goto L_0x0074\n r5 = -34093383808(0xfffffff80fe03f80, double:NaN)\n L_0x0071:\n long r2 = r3 ^ r5\n goto L_0x00bd\n L_0x0074:\n int r0 = r1 + 1\n byte r1 = r2[r1]\n long r7 = (long) r1\n r1 = 42\n long r7 = r7 << r1\n long r3 = r3 ^ r7\n int r1 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r1 < 0) goto L_0x0087\n r1 = 4363953127296(0x3f80fe03f80, double:2.1560793202584E-311)\n goto L_0x005b\n L_0x0087:\n int r1 = r0 + 1\n byte r0 = r2[r0]\n long r7 = (long) r0\n r0 = 49\n long r7 = r7 << r0\n long r3 = r3 ^ r7\n int r0 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r0 >= 0) goto L_0x009a\n r5 = -558586000294016(0xfffe03f80fe03f80, double:NaN)\n goto L_0x0071\n L_0x009a:\n int r0 = r1 + 1\n byte r1 = r2[r1]\n long r7 = (long) r1\n r1 = 56\n long r7 = r7 << r1\n long r3 = r3 ^ r7\n r7 = 71499008037633920(0xfe03f80fe03f80, double:6.838959413692434E-304)\n long r3 = r3 ^ r7\n int r1 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r1 >= 0) goto L_0x00bb\n int r1 = r0 + 1\n byte r0 = r2[r0]\n long r7 = (long) r0\n int r0 = (r7 > r5 ? 1 : (r7 == r5 ? 0 : -1))\n if (r0 >= 0) goto L_0x00bc\n L_0x00b6:\n long r0 = r11.mo9763z()\n return r0\n L_0x00bb:\n r1 = r0\n L_0x00bc:\n r2 = r3\n L_0x00bd:\n r11.f9074i = r1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3658b.mo9762y():long\");\n }",
"static void pregenFact() \n\t{ \n\t\tfact[0] = fact[1] = 1; \n\t\tfor (int i = 1; i <= 1000000; ++i) \n\t\t{ \n\t\t\tfact[i] = (int) ((long) fact[i - 1] * i % mod); \n\t\t} \n\t}",
"private double genMultiplier() {\n return (random.nextInt(81) + 60)/100.0;\n }",
"public void mo9223a(long j, int i, int i2) {\n }",
"private float computeDeceleration(float r1) {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e3 in method: android.widget.OppoScroller.computeDeceleration(float):float, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.widget.OppoScroller.computeDeceleration(float):float\");\n }",
"long mo1636a(long j, alb alb);",
"void mo34547J(float f, float f2);",
"public static double[] Jordan(Matriks M) {\r\n int i, j, k = 0, c;\r\n int flag = 0;\r\n int n = M.BrsEff; \r\n\t\tdouble[][] a = new double[n][n+1];\r\n\t\tdouble[] x;\r\n \r\n for (i = 0; i < M.BrsEff; i++){\r\n for (j = 0; j < M.KolEff; j++){\r\n a[i][j] = M.Elmt[i][j];\r\n }\r\n }\r\n\r\n for (i = 0; i < n; i++){ \r\n if (a[i][i] == 0){ \r\n c = 1; \r\n while ((i + c) < n && a[i + c][i] == 0){ \r\n c++;\r\n } \r\n if ((i + c) == n){\r\n flag = 1; \r\n break; \r\n }\r\n for (j = i, k = 0; k <= n; k++){\r\n double temp =a[j][k]; \r\n a[j][k] = a[j+c][k]; \r\n a[j+c][k] = temp; \r\n }\r\n } \r\n \r\n for (j = 0; j < n; j++){ \r\n if (i != j){ \r\n double p = a[j][i] / a[i][i];\r\n for (k = 0; k <= n; k++){ \r\n a[j][k] = a[j][k] - (a[i][k]) * p;\r\n } \r\n } \r\n } \r\n }\r\n for (i = 0; i < M.BrsEff; i++){\r\n if ((a[i][i]!=0) && (a[i][i]!=1)){\r\n for (j = i; j < M.KolEff; j++){\r\n M.Elmt[i][j] = a[i][j] / a[i][i];\r\n }\r\n }\r\n }\r\n if (flag == 1){\r\n flag = 3;\r\n \t for (i = 0; i < n; i++) { \r\n \t double sum = 0; \r\n \t for (j = 0; j < n; j++){ \r\n \t sum = sum + M.Elmt[i][j]; \r\n \t }\r\n \t if (sum == M.Elmt[i][n]) { \r\n \t flag = 2; \r\n \t }\r\n \t }\r\n \t if (flag == 3){\r\n \t x = new double[n+3];\r\n for (i = 0; i < n; i++){\r\n x[i] = 0;\r\n }\r\n \t }\r\n \t else {\r\n \t x = new double[n+2];\r\n for (i = 0; i < n; i++){\r\n x[i] = 0;\r\n }\r\n \t }\r\n }\r\n else{\r\n x = new double[n];\r\n for (i = 0; i < n; i++){\r\n x[i] = a[i][M.KolEff-1] / a[i][i];\r\n }\r\n }\r\n return x;\r\n }",
"public static void main(String[] args) {\n int[] example1 = {1, 3, 5, 7, 9, 11, 13, 15, 17, 2, 4, 6, 8, 10, 12, 14, 16, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};\n int target1 = 59;\n int[] example2 = {2, 4, 6, 8, 10, 12, 14, 16, 18, 1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30};\n int target2 = 59;\n int[] example3 = {1, 3, 5, 7, 9, 11, 13, 15, 17, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 2, 4, 6, 8, 10, 12, 14, 16, 18};\n int target3 = 34;\n\n int[] result1;\n int[] result2;\n int[] result3;\n\n // 1.Brute Force\n System.out.println(\"Brute Force start\");\n long startBF = System.currentTimeMillis();\n result1 = twoSum_1(example1, target1);\n result2 = twoSum_2(example2, target2);\n result3 = twoSum_3(example3, target3);\n println(\"Brute Force result1 \", result1);\n println(\"Brute Force result2 \", result2);\n println(\"Brute Force result3 \", result3);\n System.out.println(\"Brute Force costs: \" + (System.currentTimeMillis() - startBF));\n\n // 2.Two Pass Hash Table\n System.out.println(\"Two Pass Hash Table start\");\n long startTP = System.currentTimeMillis();\n result1 = twoSum_1(example1, target1);\n result2 = twoSum_2(example2, target2);\n result3 = twoSum_3(example3, target3);\n println(\"Two Pass Hash Table start result1 \", result1);\n println(\"Two Pass Hash Table start result2 \", result2);\n println(\"Two Pass Hash Table start result3 \", result3);\n System.out.println(\"Two Pass Hash Table costs: \" + (System.currentTimeMillis() - startTP));\n\n // 3.One Pass Hash Table\n System.out.println(\"One Pass Hash Table start\");\n long startOP = System.currentTimeMillis();\n result1 = twoSum_1(example1, target1);\n result2 = twoSum_2(example2, target2);\n result3 = twoSum_3(example3, target3);\n println(\"Two Pass Hash Table start result1 \", result1);\n println(\"Two Pass Hash Table start result2 \", result2);\n println(\"Two Pass Hash Table start result3 \", result3);\n System.out.println(\"Two Pass Hash Table costs: \" + (System.currentTimeMillis() - startOP));\n }",
"public final com.iqoption.fragment.c.a.a.j apply(kotlin.Pair<java.lang.Double, java.lang.Integer> r15) {\n /*\n r14 = this;\n r0 = \"<name for destructuring parameter 0>\";\n kotlin.jvm.internal.i.f(r15, r0);\n r0 = r15.bnj();\n r0 = (java.lang.Number) r0;\n r7 = r0.doubleValue();\n r15 = r15.bnk();\n r15 = (java.lang.Integer) r15;\n r0 = r14.dhw;\n r0 = r0.getInstrumentType();\n r0 = com.iqoption.util.j.ae(r0);\n r1 = com.iqoption.app.managers.tab.TabHelper.IM();\n r2 = \"TabHelper.instance()\";\n kotlin.jvm.internal.i.e(r1, r2);\n r1 = r1.Jd();\n r2 = r14.dhw;\n r2 = r2.getInstrumentType();\n r3 = com.iqoption.core.data.model.InstrumentType.FX_INSTRUMENT;\n r9 = 0;\n if (r2 != r3) goto L_0x0051;\n L_0x0037:\n r2 = com.iqoption.app.managers.feature.a.Il();\n r1 = r1.expInterval;\n r1 = r2.get(r1);\n r1 = (java.lang.Double) r1;\n if (r1 == 0) goto L_0x0051;\n L_0x0045:\n r1 = (java.lang.Number) r1;\n r1 = r1.doubleValue();\n r1 = com.iqoption.util.j.P(r1);\n r0[r9] = r1;\n L_0x0051:\n r1 = r0[r9];\n r0 = java.lang.Double.valueOf(r1);\n r0 = com.iqoption.util.j.r(r0);\n r10 = com.iqoption.app.helpers.a.Gs();\n r1 = r14.dhw;\n r1 = r1.getActiveId();\n r2 = r14.dhw;\n r2 = r2.getInstrumentType();\n r1 = r10.a(r1, r2);\n r2 = com.iqoption.core.microservices.f.a.a.a.bzg;\n r2 = r2.g(r1);\n r3 = com.iqoption.core.microservices.f.a.a.a.bzg;\n r1 = r3.d(r1);\n r11 = 0;\n if (r1 == 0) goto L_0x00ad;\n L_0x007e:\n if (r2 != 0) goto L_0x0081;\n L_0x0080:\n goto L_0x00ad;\n L_0x0081:\n if (r15 != 0) goto L_0x0084;\n L_0x0083:\n goto L_0x008f;\n L_0x0084:\n r3 = r15.intValue();\n if (r3 != 0) goto L_0x008f;\n L_0x008a:\n r1 = com.iqoption.util.ab.e(r2, r1);\n goto L_0x00ab;\n L_0x008f:\n r3 = com.iqoption.asset.c.a.axy;\n r4 = r14.dhw;\n r4 = r4.getPrecision();\n r5 = r1.doubleValue();\n r12 = r2.doubleValue();\n r1 = r3;\n r2 = r4;\n r3 = r5;\n r5 = r12;\n r1 = r1.a(r2, r3, r5, r7);\n r1 = java.lang.Double.valueOf(r1);\n L_0x00ab:\n r3 = r1;\n goto L_0x00ae;\n L_0x00ad:\n r3 = r11;\n L_0x00ae:\n r1 = r14.dhu;\n r2 = r14.dhw;\n r5 = r1.P(r2);\n r1 = r14.dhw;\n r1 = r1.getInstrumentType();\n r1 = r1.isOption();\n r2 = \"minInvest\";\n if (r1 == 0) goto L_0x00e8;\n L_0x00c4:\n r15 = r14.dhw;\n r15 = r15.ahR();\n if (r15 != 0) goto L_0x00cd;\n L_0x00cc:\n goto L_0x00dd;\n L_0x00cd:\n r15 = r14.dhw;\n r15 = r15.ahR();\n r15 = 100 - r15;\n r15 = java.lang.Integer.valueOf(r15);\n r11 = com.iqoption.core.util.af.i(r15);\n L_0x00dd:\n r15 = new com.iqoption.fragment.c.a.a.b;\n kotlin.jvm.internal.i.e(r0, r2);\n r15.<init>(r0, r3, r11, r5);\n r15 = (com.iqoption.fragment.c.a.a.j) r15;\n goto L_0x012e;\n L_0x00e8:\n r1 = r14.dhw;\n r1 = r1.getInstrumentType();\n r4 = r14.dhw;\n r4 = r4.getActiveId();\n r4 = java.lang.Integer.valueOf(r4);\n r1 = r10.a(r1, r4);\n if (r1 == 0) goto L_0x010b;\n L_0x00fe:\n r4 = r14.dhu;\n r1 = r1.air();\n r1 = r4.a(r1);\n if (r1 == 0) goto L_0x010b;\n L_0x010a:\n goto L_0x0112;\n L_0x010b:\n r1 = 2131886971; // 0x7f12037b float:1.9408536E38 double:1.053292113E-314;\n r1 = com.iqoption.core.d.getString(r1);\n L_0x0112:\n r6 = r1;\n kotlin.jvm.internal.i.e(r0, r2);\n if (r15 != 0) goto L_0x0119;\n L_0x0118:\n goto L_0x011f;\n L_0x0119:\n r1 = r15.intValue();\n if (r1 == 0) goto L_0x0120;\n L_0x011f:\n r9 = 1;\n L_0x0120:\n if (r9 == 0) goto L_0x0124;\n L_0x0122:\n r4 = r15;\n goto L_0x0125;\n L_0x0124:\n r4 = r11;\n L_0x0125:\n r15 = new com.iqoption.fragment.c.a.a.a;\n r1 = r15;\n r2 = r0;\n r1.<init>(r2, r3, r4, r5, r6);\n r15 = (com.iqoption.fragment.c.a.a.j) r15;\n L_0x012e:\n return r15;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.iqoption.fragment.c.b.a$h.apply(kotlin.Pair):com.iqoption.fragment.c.a.a.j\");\n }",
"public void method_1949() {\n this.field_1249 = System.nanoTime();\n }",
"public int mo12722a(RecyclerView recyclerView, int i, int i2, int i3, long j) {\n float f = 1.0f;\n int signum = (int) (((float) (((int) Math.signum((float) i2)) * m15059a(recyclerView))) * f13702d.getInterpolation(Math.min(1.0f, (((float) Math.abs(i2)) * 1.0f) / ((float) i))));\n if (j <= 2000) {\n f = ((float) j) / 2000.0f;\n }\n int interpolation = (int) (((float) signum) * f13701c.getInterpolation(f));\n if (interpolation == 0) {\n return i2 > 0 ? 1 : -1;\n }\n return interpolation;\n }",
"@Override\n /**\n * @param X The input vector. An array of doubles.\n * @return The value returned by th LUT or NN for this input vector\n */\n\n public double outputFor(double[] X) {\n int i = 0, j = 0;\n for(i=0;i<argNumInputs;i++){\n S[0][i] = X[i];\n NeuronCell[0][i] = X[i];\n }\n //then add the bias term\n S[0][argNumInputs] = 1;\n NeuronCell[0][argNumInputs] = customSigmoid(S[0][argNumInputs]);\n S[1][argNumHidden] = 1;\n NeuronCell[1][argNumHidden] = customSigmoid(S[1][argNumInputs]);\n\n for(i=0;i<argNumHidden;i++){\n for(j=0;j<=argNumInputs;j++){\n //Wji : weigth from j to i\n WeightSum+=NeuronCell[0][j]*Weight[0][j][i];\n }\n //Sj = sigma(Wji * Xi)\n S[1][i]=WeightSum;\n NeuronCell[1][i]=(customSigmoid(WeightSum));\n //reset weigthsum\n WeightSum=0;\n }\n\n for(i = 0; i < argNumOutputs; i++){\n for(j = 0;j <= argNumHidden;j++){\n WeightSum += NeuronCell[1][j] * Weight[1][j][i];\n }\n NeuronCell[2][i]=customSigmoid(WeightSum);\n S[2][i]=WeightSum;\n WeightSum=0;\n }\n //if we only return 1 double, it means we only have one output, so actually we can write return NeuronCell[2][0]\n return NeuronCell[2][0];\n }",
"private long m685d(long j) {\n return (-(j & 1)) ^ (j >>> 1);\n }",
"public C3635j mo9738d() {\n C3635j jVar;\n int x = mo9774x();\n int i = this.f9080g;\n int i2 = this.f9082i;\n if (x <= i - i2 && x > 0) {\n C3635j a = C3635j.m8389a(this.f9079f, i2, x);\n this.f9082i += x;\n return a;\n } else if (x == 0) {\n return C3635j.f9034f;\n } else {\n byte[] f = mo9766f(x);\n if (f != null) {\n jVar = C3635j.m8388a(f);\n } else {\n int i3 = this.f9082i;\n int i4 = this.f9080g;\n int i5 = i4 - i3;\n this.f9084k += i4;\n this.f9082i = 0;\n this.f9080g = 0;\n List g = mo9767g(x - i5);\n byte[] bArr = new byte[x];\n System.arraycopy(this.f9079f, i3, bArr, 0, i5);\n Iterator it = ((ArrayList) g).iterator();\n while (it.hasNext()) {\n byte[] bArr2 = (byte[]) it.next();\n System.arraycopy(bArr2, 0, bArr, i5, bArr2.length);\n i5 += bArr2.length;\n }\n jVar = C3635j.m8391b(bArr);\n }\n return jVar;\n }\n }",
"public long mo9746k() {\n return mo9762y();\n }",
"public void mo442d() {\n long j;\n long j2;\n int i;\n long j3;\n boolean z;\n C0245a[] aVarArr;\n int i2;\n int i3;\n C3683c<? super U> cVar = this.f472a;\n int i4 = 1;\n while (!mo443e()) {\n C0211f<U> fVar = this.f477f;\n long j4 = this.f482m.get();\n boolean z2 = j4 == Long.MAX_VALUE;\n if (fVar != null) {\n j = 0;\n while (true) {\n long j5 = 0;\n Object obj = null;\n while (true) {\n if (j4 == 0) {\n break;\n }\n Object e_ = fVar.mo386e_();\n if (!mo443e()) {\n if (e_ == null) {\n obj = e_;\n break;\n }\n cVar.onNext(e_);\n j++;\n j5++;\n j4--;\n obj = e_;\n } else {\n return;\n }\n }\n if (j5 != 0) {\n if (z2) {\n j4 = Long.MAX_VALUE;\n } else {\n j4 = this.f482m.addAndGet(-j5);\n }\n }\n if (j4 == 0 || obj == null) {\n break;\n }\n }\n } else {\n j = 0;\n }\n boolean z3 = this.f478g;\n C0211f<U> fVar2 = this.f477f;\n C0245a[] aVarArr2 = (C0245a[]) this.f481j.get();\n int length = aVarArr2.length;\n if (!z3 || ((fVar2 != null && !fVar2.mo384b()) || length != 0)) {\n if (length != 0) {\n i = i4;\n long j6 = this.f485p;\n int i5 = this.f486q;\n if (length <= i5 || aVarArr2[i5].f462a != j6) {\n if (length <= i5) {\n i5 = 0;\n }\n int i6 = i5;\n for (int i7 = 0; i7 < length && aVarArr2[i6].f462a != j6; i7++) {\n i6++;\n if (i6 == length) {\n i6 = 0;\n }\n }\n this.f486q = i6;\n this.f485p = aVarArr2[i6].f462a;\n i5 = i6;\n }\n int i8 = i5;\n z = false;\n int i9 = 0;\n while (true) {\n if (i9 >= length) {\n aVarArr = aVarArr2;\n break;\n } else if (!mo443e()) {\n C0245a aVar = aVarArr2[i8];\n Object obj2 = null;\n while (!mo443e()) {\n C0212g<U> gVar = aVar.f467f;\n if (gVar == null) {\n aVarArr = aVarArr2;\n i2 = length;\n } else {\n aVarArr = aVarArr2;\n i2 = length;\n long j7 = 0;\n while (j2 != 0) {\n try {\n obj2 = gVar.mo386e_();\n if (obj2 == null) {\n break;\n }\n cVar.onNext(obj2);\n if (!mo443e()) {\n j2--;\n j7++;\n } else {\n return;\n }\n } catch (Throwable th) {\n Throwable th2 = th;\n C0171b.m584b(th2);\n aVar.dispose();\n this.f479h.mo516a(th2);\n if (!this.f474c) {\n this.f483n.mo407a();\n }\n if (!mo443e()) {\n mo439b(aVar);\n i9++;\n i3 = i2;\n z = true;\n } else {\n return;\n }\n }\n }\n if (j7 != 0) {\n j2 = !z2 ? this.f482m.addAndGet(-j7) : Long.MAX_VALUE;\n aVar.mo433a(j7);\n }\n if (!(j2 == 0 || obj2 == null)) {\n aVarArr2 = aVarArr;\n length = i2;\n }\n }\n boolean z4 = aVar.f466e;\n C0212g<U> gVar2 = aVar.f467f;\n if (z4 && (gVar2 == null || gVar2.mo384b())) {\n mo439b(aVar);\n if (!mo443e()) {\n j++;\n z = true;\n } else {\n return;\n }\n }\n if (j2 == 0) {\n break;\n }\n int i10 = i8 + 1;\n i3 = i2;\n i8 = i10 == i3 ? 0 : i10;\n i9++;\n length = i3;\n aVarArr2 = aVarArr;\n }\n return;\n } else {\n return;\n }\n }\n this.f486q = i8;\n this.f485p = aVarArr[i8].f462a;\n j3 = j;\n } else {\n i = i4;\n j3 = j;\n z = false;\n }\n if (j3 != 0 && !this.f480i) {\n this.f483n.mo408a(j3);\n }\n if (z) {\n i4 = i;\n } else {\n i4 = addAndGet(-i);\n if (i4 == 0) {\n return;\n }\n }\n } else {\n Throwable a = this.f479h.mo515a();\n if (a != C0315e.f669a) {\n if (a == null) {\n cVar.onComplete();\n } else {\n cVar.onError(a);\n }\n }\n return;\n }\n }\n }",
"@Override\n public long apply$mcJD$sp (double arg0)\n {\n return 0;\n }",
"private int e(amj paramamj)\r\n/* 202: */ {\r\n/* 203:221 */ alq localalq = paramamj.b();\r\n/* 204:222 */ int i = paramamj.b;\r\n/* 205: */ \r\n/* 206:224 */ int j = d(paramamj);\r\n/* 207:225 */ if (j < 0) {\r\n/* 208:226 */ j = j();\r\n/* 209: */ }\r\n/* 210:228 */ if (j < 0) {\r\n/* 211:229 */ return i;\r\n/* 212: */ }\r\n/* 213:231 */ if (this.a[j] == null)\r\n/* 214: */ {\r\n/* 215:232 */ this.a[j] = new amj(localalq, 0, paramamj.i());\r\n/* 216:233 */ if (paramamj.n()) {\r\n/* 217:234 */ this.a[j].d((fn)paramamj.o().b());\r\n/* 218: */ }\r\n/* 219: */ }\r\n/* 220:238 */ int k = i;\r\n/* 221:239 */ if (k > this.a[j].c() - this.a[j].b) {\r\n/* 222:240 */ k = this.a[j].c() - this.a[j].b;\r\n/* 223: */ }\r\n/* 224:242 */ if (k > p_() - this.a[j].b) {\r\n/* 225:243 */ k = p_() - this.a[j].b;\r\n/* 226: */ }\r\n/* 227:246 */ if (k == 0) {\r\n/* 228:247 */ return i;\r\n/* 229: */ }\r\n/* 230:250 */ i -= k;\r\n/* 231:251 */ this.a[j].b += k;\r\n/* 232:252 */ this.a[j].c = 5;\r\n/* 233: */ \r\n/* 234:254 */ return i;\r\n/* 235: */ }",
"@Test\n @Tag(\"slow\")\n public void testPILOT_WE() {\n CuteNetlibCase.doTest(\"PILOT-WE.SIF\", \"-2720107.5328449034\", \"20770.464669007524\", NumberContext.of(7, 4));\n }",
"public void faster()\n {\n if(speed < 9){\n speed += 1;\n }\n }",
"void mo25957a(long j, long j2);",
"private Color renderAcceleration(int i, int j, int level) {\r\n\r\n\t\tdouble width = _imageWriter.getWidth();\r\n\t\tdouble height = _imageWriter.getHeight();\r\n\t\tint nX = _imageWriter.getNx();\r\n\t\tint nY = _imageWriter.getNy();\r\n\r\n\t\tColor ru, rd, lu, ld;\r\n\t\tColor ru1, rd1, lu1, ld1;\r\n\t\tColor ru2, rd2, lu2, ld2;\r\n\t\tint a = 10;\r\n\t\tint b = 2;\r\n\r\n\t\t// check 4 points\r\n\t\tru = pixelColor(i * a, (j + 1) * a - 1, (int) (a * Math.pow(b, MAX_ACCELERATION_LEVEL - level)));\r\n\t\trd = pixelColor((i + 1) * a - 1, (j + 1) * a - 1, (int) (a * Math.pow(b, MAX_ACCELERATION_LEVEL - level)));\r\n\t\tlu = pixelColor(i * a, j * a, (int) (a * Math.pow(b, MAX_ACCELERATION_LEVEL - level)));\r\n\t\tld = pixelColor((i + 1) * a - 1, j * a, (int) (a * Math.pow(b, MAX_ACCELERATION_LEVEL - level)));\r\n\r\n\t\tif (level == 1) {\r\n\t\t\t// send 4 quarters\r\n\t\t\tru1 = pixelColor(i * b, (j + 1) * b - 1, b * MAX_ACCELERATION_LEVEL);\r\n\t\t\trd1 = pixelColor((i + 1) * b - 1, (j + 1) * b - 1, b * MAX_ACCELERATION_LEVEL);\r\n\t\t\tlu1 = pixelColor(i * b, j * b, b * MAX_ACCELERATION_LEVEL);\r\n\t\t\tld1 = pixelColor((i + 1) * b - 1, j * b, b * MAX_ACCELERATION_LEVEL);\r\n\t\t\treturn ru.add(rd.add(lu.add(ld))).reduce(b * b);\r\n\r\n\t\t}\r\n\r\n\t\tif ((ru.equals(rd) && rd.equals(lu) && lu.equals(ld))) {\r\n\t\t\treturn ru;\r\n\t\t}\r\n\r\n\t\telse {\r\n\r\n\t\t\tru2 = renderAcceleration(i * b, (j + 1) * b - 1, level - 1);\r\n\t\t\trd2 = renderAcceleration((i + 1) * b - 1, (j + 1) * b - 1, level - 1);\r\n\t\t\tlu2 = renderAcceleration(i * b, j * b, level - 1);\r\n\t\t\tld2 = renderAcceleration((i + 1) * b - 1, j * b, level - 1);\r\n\r\n\t\t\treturn ru.add(rd.add(lu.add(ld))).reduce(b * b);\r\n\r\n\t\t}\r\n\r\n\t}",
"public abstract C7035a mo24417b(long j);",
"public static void main(String[] args) throws FileNotFoundException, IOException {\nfor (double b = 0.5; b < 0.51; b+=0.1) {\n for (double k = 4.40; k < 4.5; k+=0.5) {\n Machine.b = 0.5; //0.2 - ATCnon-delay\n Machine.k = 1.5; //1.4 - ATCnon delay\n int hits = 0;\n engineJob = new cern.jet.random.engine.MersenneTwister(99999);\n noise = new cern.jet.random.Normal(0, 1, engineJob);\n SmallStatistics[] result = new SmallStatistics[5];\n result[0] = new SmallStatistics();\n result[1] = new SmallStatistics();\n for (int ds = 0; ds < 2; ds++) {\n JSPFramework[] jspTesting = new JSPFramework[105];\n for (int i = 0; i < jspTesting.length; i++) {\n jspTesting[i] = new JSPFramework();\n jspTesting[i].getJSPdata(i*2 + 1);\n }\n //DMU - instances (1-80)//la - instances (81-120)\n //mt - instances (121/-123)//orb - instances (124-133)//ta -instances (134-173)\n //////////////////////////////////////////////\n for (int i = 0; i < jspTesting.length; i++) {\n double countEval = 0;\n double tempObj = Double.POSITIVE_INFINITY;\n double globalBest = Double.POSITIVE_INFINITY;\n boolean[] isApplied_Nk = new boolean[2]; //Arrays.fill(isApplied_Nk, Boolean.TRUE);\n int Nk = 0; // index of the Iterative dispatching rule to be used\n jspTesting[i].resetALL();\n boolean firstIteration = true;\n double countLargeStep = 0;\n do{\n countEval++;\n //start evaluate schedule\n jspTesting[i].reset();\n int N = jspTesting[i].getNumberofOperations();\n jspTesting[i].initilizeSchedule();\n int nScheduledOp = 0;\n\n //choose the next machine to be schedule\n while (nScheduledOp<N){\n\n Machine M = jspTesting[i].Machines[jspTesting[i].nextMachine()];\n\n jspTesting[i].setScheduleStrategy(Machine.scheduleStrategy.HYBRID );\n jspTesting[i].setPriorityType(Machine.priorityType.ATC);\n jspTesting[i].setNonDelayFactor(0.3);\n //*\n jspTesting[i].setInitalPriority(M);\n for (Job J:M.getQueue()) {\n double RJ = J.getReadyTime();\n double RO = J.getNumberRemainingOperations();\n double RT = J.getRemainingProcessingTime();\n double PR = J.getCurrentOperationProcessingTime();\n double W = J.getWeight();\n double DD = J.getDuedate();\n double RM = M.getReadyTime();\n double RWT = J.getCurrentOperationWaitingTime();\n double RFT = J.getFinishTime();\n double RNWT = J.getNextOperationWaitingTime();\n int nextMachine = J.getNextMachine();\n\n if (nextMachine==-1){\n RNWT=0;\n } else {\n RNWT = J.getNextOperationWaitingTime();\n if (RNWT == -1){\n RNWT = jspTesting[i].getMachines()[nextMachine].getQueueWorkload()/2.0;\n }\n }\n if (RWT == -1){\n RWT = M.getQueueWorkload()/2.0;\n }\n //J.addPriority((W/PR)*Math.exp(-maxPlus((DD-RM-PR-(RT-PR+J.getRemainingWaitingTime(M)))/(3*M.getQueueWorkload()/M.getNumberofJobInQueue())))); //iATC\n //J.addPriority((PR*PR*0.614577*(-RM-RM/W)-RT*PR*RT/W)\n // -(RT*PR/(W-0.5214191)-RM/W*PR*0.614577+RT*PR/(W-0.5214191)*2*RM/W));\n //J.addPriority(((W/PR)*((W/PR)/(RFT*RFT)))/(max(div((RFT-RT),(RWT/W)),IF(RFT/W-max(RFT-RT,DD),DD,RFT))+DD/RFT+RFT/W-max(RFT-RFT/W,DD))); //best TWT priorityIterative\n if (Nk==0)\n //J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((min(RT,RNWT-RFT)/(RJ-min(RWT,RFT*0.067633785)))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n J.addPriority(min(W/PR-RFT+min(RT,W/RFT),((div(min(RT,RNWT-RFT),(RJ-min(RWT,RFT*0.067633785))))/(RJ-min(RWT,RFT*0.067633785))))/RFT);\n else\n J.addPriority(min((((W/PR)/RFT)/(2*RNWT+max(RO,RFT)))/(PR+RNWT+max(RO,RFT)),((W/PR)/RFT)/PR)/RFT);\n }\n //jspTesting[i].calculatePriority(M);\n jspTesting[i].sortJobInQueue(M);\n Job J = M.completeJob();\n if (!J.isCompleted()) jspTesting[i].Machines[J.getCurrentMachine()].joinQueue(J);\n nScheduledOp++;\n }\n double currentObj = -100;\n currentObj = jspTesting[i].getTotalWeightedTardiness();\n if (tempObj > currentObj){\n tempObj = currentObj;\n jspTesting[i].recordSchedule();\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n //System.out.println(\"Improved!!!\");\n }\n else {\n isApplied_Nk[Nk] = true;\n if (!isNextApplied(Nk, isApplied_Nk)) Nk = circleShift(Nk, isApplied_Nk.length);\n else {\n if (globalBest>tempObj) {\n globalBest = tempObj;\n jspTesting[i].storeBestRecordSchedule();\n } jspTesting[i].restoreBestRecordSchedule();\n if (countLargeStep<1) {\n tempObj = Double.POSITIVE_INFINITY;\n Arrays.fill(isApplied_Nk, Boolean.FALSE);\n jspTesting[i].shakeRecordSchedule(noise, engineJob, globalBest);\n countLargeStep++;\n }\n else break;\n }\n }\n firstIteration = false;\n \n } while(true);\n result[ds].add(jspTesting[i].getDevREFTotalWeightedTardiness(globalBest));\n if (jspTesting[i].getDevLBCmax()==0) hits++;\n System.out.println(jspTesting[i].instanceName + \" & \"+ globalBest + \" & \" + countEval);\n }\n }\n //jsp.schedule();\n //*\n System.out.println(\"*************************************************************************\");\n System.out.println(\"[ & \" + formatter.format(result[0].getMin()) + \" & \"\n + formatter.format(result[0].getAverage()) + \" & \" + formatter.format(result[0].getMax()) +\n \" & \" + formatter.format(result[1].getMin()) + \" & \"\n + formatter.format(result[1].getAverage()) + \" & \" + formatter.format(result[1].getMax()) + \"]\");\n //*/\n System.out.print(\"\"+formatter.format(result[0].getAverage()) + \" \");\n }\n System.out.println(\"\");\n}\n }",
"private static native void anisotropicDiffusion_0(long src_nativeObj, long dst_nativeObj, float alpha, float K, int niters);",
"public void step() {\n // method 1 of Temperature randomness\n enPrice = 1.1 * enPrice;\n\n TempChange = Temperature * (0.1 * (1 - 2 * r.nextDouble()));\n // method 2 of Temperature\n// TempChange = temperature_list.get(count);\n// count+=1;\n\n Temperature += TempChange;\n year_num+=1;\n }",
"private Color renderMini2(int i, int j) {\r\n\t\treturn renderAcceleration(i, j, MAX_ACCELERATION_LEVEL);\r\n\t}",
"C11316t5 mo29022j0();",
"void mo24142a(long j);",
"public long mo9746k() {\n return mo9786y();\n }",
"private long m682c(long j) {\n return (j >> 63) ^ (j << 1);\n }",
"long mo30295f();",
"public double calc_c() {\r\n \t\t\r\n \t\tdouble cij = 0;\r\n \t\tint sum_i = 0;\r\n \t\tint sum_j = 0;\r\n \t\tint diff = 0;\r\n \t\tint state = 0;\r\n \t\t\r\n \t\tdouble li, lri, lj, lrj;\r\n \t\t\r\n \t\tList<Integer> samestate_i = new ArrayList<>();\r\n \t\tList<Integer> samestate_j = new ArrayList<>();\r\n \t\t\r\n \t\tList<Double> gradient_i = new ArrayList<>();\r\n \t\tList<Double> gradient_j = new ArrayList<>();\r\n \t\t\r\n\t\t// if the time step is less than the window cij is initialized to zero.\r\n\t\tif(this.n <= this.w || this.w <2) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// else we determine the state of the region i and region j of which\r\n\t\t\t// we are calculating the cij for\r\n\t \t\tDeterminestate di = new Determinestate(this.i, this.n);\r\n\t\t\tDeterminestate dj = new Determinestate(this.j, this.n);\r\n\t\t\t\r\n\t\t\tProbability pi = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\tProbability pj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\r\n\t\t\tif(di.regionCurrentstate() == dj.regionCurrentstate()) {\r\n\t\t\t\tli = pi.getLsave().get(0);\r\n\t\t\t\tlj = pj.getLsave().get(0);\r\n\t\t\t\tstate = 0;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tli = pi.getLsave().get(1);\r\n\t\t\t\tlj = pj.getLsave().get(1);\r\n\t\t\t\tstate =1;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// for the time window\r\n\t\t\tfor(int k=1; k<this.w; k++) {\r\n\t\t\t\t\r\n\t\t\t\t// determine the state of i and j in the in n-k time step\r\n\t \t\t\tDeterminestate dri = new Determinestate(this.i, this.n-k);\r\n\t \t\t\tDeterminestate drj = new Determinestate(this.j, this.n-k);\r\n\t \t\t\t\r\n\t \t\t\tProbability pri = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\tProbability prj = new Probability(this.i, this.n, this.w, this.neighborsize);\r\n\t\t\t\t\r\n\t\t\t\tlri = pri.getLsave().get(state);\r\n\t\t\t\tlrj = prj.getLsave().get(state);\r\n\t \t\t\t\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for i make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == dri.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_i.add(k);\r\n\t \t\t\t\tgradient_i.add(li - lri);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t\t//if state matches for j make a list of time step in which they match and another list of gradient of Likelihood \r\n\t \t\t\tif(di.regionCurrentstate() == drj.regionCurrentstate()){\r\n\t \t\t\t\tsamestate_j.add(k);\r\n\t \t\t\t\tgradient_j.add(lj - lrj);\r\n\t \t\t\t}\r\n\t \t\t\t\r\n\t \t\t}\r\n\t\t}\r\n\t\t\t\r\n\t\t// if no match found return zero\r\n\t\tif(samestate_i.size() == 0 || samestate_j.size() == 0) {\r\n\t\t\tcij = 0;\r\n\t\t}\r\n\t\t\r\n\t\t// else calculate cij\r\n\t\telse {\r\n\t\t\t\r\n\t\t\t// if both have same length \r\n\t\t\tif(samestate_i.size() == samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i, gradient_j) * Math.abs(diff/(double)this.w);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//if i is smaller\r\n\t\t\telse if(samestate_i.size() < samestate_j.size()) {\r\n\t\t\t\tfor(int i=0; i<samestate_i.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_i.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// if j is smaller \r\n\t\t\telse {\r\n\t\t\t\tfor(int i=0; i<samestate_j.size(); i++) {\r\n\t\t\t\t\tsum_i = sum_i + samestate_i.get(i);\r\n\t\t\t\t\tsum_j = sum_j + samestate_j.get(i);\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\tdiff = (sum_i%this.w - sum_j%this.w);\r\n\t\t\t\tif (diff == 0) {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j);\r\n\t\t\t\t}\r\n\t\t\t\telse {\r\n\t\t\t\t\tcij = cosine_sim(gradient_i.subList(0, samestate_j.size()), gradient_j) * diff/(double)this.w;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.isNaN(cij)) {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\treturn cij;\r\n\t\t}\r\n \t}",
"public int mo9785x() {\n /*\n r10 = this;\n long r0 = r10.f9091i\n long r2 = r10.f9090h\n int r2 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1))\n if (r2 != 0) goto L_0x000a\n goto L_0x0085\n L_0x000a:\n r2 = 1\n long r4 = r0 + r2\n byte r0 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r0)\n if (r0 < 0) goto L_0x0017\n r10.f9091i = r4\n return r0\n L_0x0017:\n long r6 = r10.f9090h\n long r6 = r6 - r4\n r8 = 9\n int r1 = (r6 > r8 ? 1 : (r6 == r8 ? 0 : -1))\n if (r1 >= 0) goto L_0x0021\n goto L_0x0085\n L_0x0021:\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n int r1 = r1 << 7\n r0 = r0 ^ r1\n if (r0 >= 0) goto L_0x002f\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n goto L_0x008b\n L_0x002f:\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x003e\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n L_0x003c:\n r6 = r4\n goto L_0x008b\n L_0x003e:\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n int r1 = r1 << 21\n r0 = r0 ^ r1\n if (r0 >= 0) goto L_0x004e\n r1 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r1\n goto L_0x008b\n L_0x004e:\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n int r6 = r1 << 28\n r0 = r0 ^ r6\n r6 = 266354560(0xfe03f80, float:2.2112565E-29)\n r0 = r0 ^ r6\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n long r4 = r6 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r6)\n if (r1 >= 0) goto L_0x003c\n long r6 = r4 + r2\n byte r1 = p213q.p217b.p301c.p302a.p311j0.p312a.C3691q1.m8803a(r4)\n if (r1 >= 0) goto L_0x008b\n L_0x0085:\n long r0 = r10.mo9787z()\n int r0 = (int) r0\n return r0\n L_0x008b:\n r10.f9091i = r6\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3661d.mo9785x():int\");\n }",
"public int mo9745j() {\n return mo9785x();\n }",
"public BigDecimal getJitterSdp() {\r\n return jitterSdp;\r\n }",
"public long mo130408c() {\n return System.nanoTime();\n }",
"public void lagSkudd2() {\n\t}",
"void mo30275a(long j);",
"g(int paramInt) {\n/* 14364 */ this.a = (Interpolator)new DecelerateInterpolator();\n/* 14365 */ this.b = paramInt;\n/* 14366 */ this.c = this.b + 500;\n/* */ }",
"@Test\n @Tag(\"slow\")\n public void testCZPROB() {\n CuteNetlibCase.doTest(\"CZPROB.SIF\", \"2185196.6988565763\", \"3089066.71321333\", NumberContext.of(7, 4));\n }",
"public long mo9775y() {\n /*\n r11 = this;\n int r0 = r11.f9082i\n int r1 = r11.f9080g\n if (r1 != r0) goto L_0x0008\n goto L_0x00b6\n L_0x0008:\n byte[] r2 = r11.f9079f\n int r3 = r0 + 1\n byte r0 = r2[r0]\n if (r0 < 0) goto L_0x0014\n r11.f9082i = r3\n long r0 = (long) r0\n return r0\n L_0x0014:\n int r1 = r1 - r3\n r4 = 9\n if (r1 >= r4) goto L_0x001b\n goto L_0x00b6\n L_0x001b:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 7\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0029\n r0 = r0 ^ -128(0xffffffffffffff80, float:NaN)\n L_0x0026:\n long r2 = (long) r0\n goto L_0x00bd\n L_0x0029:\n int r3 = r1 + 1\n byte r1 = r2[r1]\n int r1 = r1 << 14\n r0 = r0 ^ r1\n if (r0 < 0) goto L_0x003a\n r0 = r0 ^ 16256(0x3f80, float:2.278E-41)\n long r0 = (long) r0\n r9 = r0\n r1 = r3\n r2 = r9\n goto L_0x00bd\n L_0x003a:\n int r1 = r3 + 1\n byte r3 = r2[r3]\n int r3 = r3 << 21\n r0 = r0 ^ r3\n if (r0 >= 0) goto L_0x0048\n r2 = -2080896(0xffffffffffe03f80, float:NaN)\n r0 = r0 ^ r2\n goto L_0x0026\n L_0x0048:\n long r3 = (long) r0\n int r0 = r1 + 1\n byte r1 = r2[r1]\n long r5 = (long) r1\n r1 = 28\n long r5 = r5 << r1\n long r3 = r3 ^ r5\n r5 = 0\n int r1 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r1 < 0) goto L_0x005f\n r1 = 266354560(0xfe03f80, double:1.315966377E-315)\n L_0x005b:\n long r2 = r3 ^ r1\n r1 = r0\n goto L_0x00bd\n L_0x005f:\n int r1 = r0 + 1\n byte r0 = r2[r0]\n long r7 = (long) r0\n r0 = 35\n long r7 = r7 << r0\n long r3 = r3 ^ r7\n int r0 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r0 >= 0) goto L_0x0074\n r5 = -34093383808(0xfffffff80fe03f80, double:NaN)\n L_0x0071:\n long r2 = r3 ^ r5\n goto L_0x00bd\n L_0x0074:\n int r0 = r1 + 1\n byte r1 = r2[r1]\n long r7 = (long) r1\n r1 = 42\n long r7 = r7 << r1\n long r3 = r3 ^ r7\n int r1 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r1 < 0) goto L_0x0087\n r1 = 4363953127296(0x3f80fe03f80, double:2.1560793202584E-311)\n goto L_0x005b\n L_0x0087:\n int r1 = r0 + 1\n byte r0 = r2[r0]\n long r7 = (long) r0\n r0 = 49\n long r7 = r7 << r0\n long r3 = r3 ^ r7\n int r0 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r0 >= 0) goto L_0x009a\n r5 = -558586000294016(0xfffe03f80fe03f80, double:NaN)\n goto L_0x0071\n L_0x009a:\n int r0 = r1 + 1\n byte r1 = r2[r1]\n long r7 = (long) r1\n r1 = 56\n long r7 = r7 << r1\n long r3 = r3 ^ r7\n r7 = 71499008037633920(0xfe03f80fe03f80, double:6.838959413692434E-304)\n long r3 = r3 ^ r7\n int r1 = (r3 > r5 ? 1 : (r3 == r5 ? 0 : -1))\n if (r1 >= 0) goto L_0x00bb\n int r1 = r0 + 1\n byte r0 = r2[r0]\n long r7 = (long) r0\n int r0 = (r7 > r5 ? 1 : (r7 == r5 ? 0 : -1))\n if (r0 >= 0) goto L_0x00bc\n L_0x00b6:\n long r0 = r11.mo9776z()\n return r0\n L_0x00bb:\n r1 = r0\n L_0x00bc:\n r2 = r3\n L_0x00bd:\n r11.f9082i = r1\n return r2\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9775y():long\");\n }",
"public abstract void mo4363a(int i, long j);",
"public static void initBenchmark()\n\t{\n\t\tfunctionName.add(\" JpfTargetApollo.main()_0\");\n\t\tparaName.add(\"in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double\");\n\t\tbinaryExp.add(\"(((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.014 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_1\");\n\t\tparaName.add(\"in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double\");\n\t\tbinaryExp.add(\"((0.0==(((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.003 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_2\");\n\t\tparaName.add(\"in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double\");\n\t\tbinaryExp.add(\"(((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)>0.0))\");\n\t\t\t\t//Parse time: 0.0 seconds. Solve time: 0.48 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_3\");\n\t\tparaName.add(\"in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double\");\n\t\tbinaryExp.add(\"(((0.18181818181818185*(((0.5*(((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)*((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)))+(0.0-(((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)))-0.04759988869075444))<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\n\n\t\t//Parse time: 0.0 seconds. Solve time: 0.247 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_4\");\n\t\tparaName.add(\"in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double\");\n\t\tbinaryExp.add(\"((0.0==(0.18181818181818185*(((0.5*(((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)*((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)))+(0.0-(((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)))-0.04759988869075444)))) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.003 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_5\");\n\t\tparaName.add(\"in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double\");\n\t\tbinaryExp.add(\"(((0.18181818181818185*(((0.5*(((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)*((((((10.0*in2_0_4_SYMREAL)+-0.0)-0.0)/1.0)/0.055)/2.0)))+(0.0-(((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)))-0.04759988869075444))>0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.041 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_6\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"(((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.014 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_7\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"((0.0==(((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0))) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.002 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_8\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"(((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)>0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t// 可解 Parse time: 0.0 seconds. Solve time: 0.59 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_9\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in2_2_6_SYMREAL,in1_1_2_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"(((0.18181818181818185*(((0.5*((((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)*(((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)))+(0.0-(((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)))-3.332757323673897))<0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.455 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_10\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in2_2_6_SYMREAL,in1_1_2_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"((0.0==(0.18181818181818185*(((0.5*((((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)*(((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)))+(0.0-(((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)))-3.332757323673897)))) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\n\n\t\t//Parse time: 0.0 seconds. Solve time: 0.069 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_11\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in2_2_6_SYMREAL,in1_1_2_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"(((0.18181818181818185*(((0.5*((((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)*(((((-0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/7.855339059327378E-4)/2.0)))+(0.0-(((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)))-3.332757323673897))>0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.001 seconds. Solve time: 0.035 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_12\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"(((((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0)<0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.188 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_13\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"((0.0==(((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0))) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\t\n\t\t//Parse time: 0.0 seconds. Solve time: 0.002 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_14\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in1_1_2_SYMREAL,in2_2_6_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"(((((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0)>0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\n\t\t// 可解Parse time: 0.0 seconds. Solve time: 0.454 seconds.\n\t\tfunctionName.add(\" JpfTargetApollo.main()_15\");\n\t\tparaName.add(\"in2_1_5_SYMREAL,in2_2_6_SYMREAL,in1_1_2_SYMREAL,in1_2_3_SYMREAL,in2_0_4_SYMREAL,in1_0_1_SYMREAL\");\n\t\tparaType.add(\"double,double,double,double,double,double\");\n\t\tbinaryExp.add(\"(((0.18181818181818185*(((0.5*((((((0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/0.006285533905932738)/2.0)*(((((0.7071067811865476*((((10.0*in2_1_5_SYMREAL)+-0.0)-0.0)/1.0))+0.0)+(0.7071067811865476*((((10.0*in2_2_6_SYMREAL)+-0.0)-0.0)/1.0)))/0.006285533905932738)/2.0)))+(0.0-(((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0)))-0.4165109785694488))<0.0)) && (((((((0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/0.006285533905932738)/2.0)<0.0)) && (((((((-0.7071067811865476*(in2_1_5_SYMREAL-in1_1_2_SYMREAL))+0.0)+(0.7071067811865476*(in2_2_6_SYMREAL-in1_2_3_SYMREAL)))/7.855339059327378E-4)/2.0)<0.0)) && (((((in2_0_4_SYMREAL-in1_0_1_SYMREAL)/0.055)/2.0)<0.0))\");\n\t\n\t}",
"public void populateNoiseArray(double[] p_76308_1_, double p_76308_2_, double p_76308_4_, double p_76308_6_, int p_76308_8_, int p_76308_9_, int p_76308_10_, double p_76308_11_, double p_76308_13_, double p_76308_15_, double p_76308_17_) {\n/* 81 */ if (p_76308_9_ == 1) {\n/* */ \n/* 83 */ boolean var64 = false;\n/* 84 */ boolean var65 = false;\n/* 85 */ boolean var21 = false;\n/* 86 */ boolean var68 = false;\n/* 87 */ double var70 = 0.0D;\n/* 88 */ double var73 = 0.0D;\n/* 89 */ int var75 = 0;\n/* 90 */ double var77 = 1.0D / p_76308_17_;\n/* */ \n/* 92 */ for (int var30 = 0; var30 < p_76308_8_; var30++) {\n/* */ \n/* 94 */ double var31 = p_76308_2_ + var30 * p_76308_11_ + this.xCoord;\n/* 95 */ int var78 = (int)var31;\n/* */ \n/* 97 */ if (var31 < var78)\n/* */ {\n/* 99 */ var78--;\n/* */ }\n/* */ \n/* 102 */ int var34 = var78 & 0xFF;\n/* 103 */ var31 -= var78;\n/* 104 */ double var35 = var31 * var31 * var31 * (var31 * (var31 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 106 */ for (int var37 = 0; var37 < p_76308_10_; var37++)\n/* */ {\n/* 108 */ double var38 = p_76308_6_ + var37 * p_76308_15_ + this.zCoord;\n/* 109 */ int var40 = (int)var38;\n/* */ \n/* 111 */ if (var38 < var40)\n/* */ {\n/* 113 */ var40--;\n/* */ }\n/* */ \n/* 116 */ int var41 = var40 & 0xFF;\n/* 117 */ var38 -= var40;\n/* 118 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* 119 */ int var19 = this.permutations[var34] + 0;\n/* 120 */ int var66 = this.permutations[var19] + var41;\n/* 121 */ int var67 = this.permutations[var34 + 1] + 0;\n/* 122 */ int var22 = this.permutations[var67] + var41;\n/* 123 */ var70 = lerp(var35, func_76309_a(this.permutations[var66], var31, var38), grad(this.permutations[var22], var31 - 1.0D, 0.0D, var38));\n/* 124 */ var73 = lerp(var35, grad(this.permutations[var66 + 1], var31, 0.0D, var38 - 1.0D), grad(this.permutations[var22 + 1], var31 - 1.0D, 0.0D, var38 - 1.0D));\n/* 125 */ double var79 = lerp(var42, var70, var73);\n/* 126 */ int var10001 = var75++;\n/* 127 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var79 * var77;\n/* */ }\n/* */ \n/* */ } \n/* */ } else {\n/* */ \n/* 133 */ int var19 = 0;\n/* 134 */ double var20 = 1.0D / p_76308_17_;\n/* 135 */ int var22 = -1;\n/* 136 */ boolean var23 = false;\n/* 137 */ boolean var24 = false;\n/* 138 */ boolean var25 = false;\n/* 139 */ boolean var26 = false;\n/* 140 */ boolean var27 = false;\n/* 141 */ boolean var28 = false;\n/* 142 */ double var29 = 0.0D;\n/* 143 */ double var31 = 0.0D;\n/* 144 */ double var33 = 0.0D;\n/* 145 */ double var35 = 0.0D;\n/* */ \n/* 147 */ for (int var37 = 0; var37 < p_76308_8_; var37++) {\n/* */ \n/* 149 */ double var38 = p_76308_2_ + var37 * p_76308_11_ + this.xCoord;\n/* 150 */ int var40 = (int)var38;\n/* */ \n/* 152 */ if (var38 < var40)\n/* */ {\n/* 154 */ var40--;\n/* */ }\n/* */ \n/* 157 */ int var41 = var40 & 0xFF;\n/* 158 */ var38 -= var40;\n/* 159 */ double var42 = var38 * var38 * var38 * (var38 * (var38 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 161 */ for (int var44 = 0; var44 < p_76308_10_; var44++) {\n/* */ \n/* 163 */ double var45 = p_76308_6_ + var44 * p_76308_15_ + this.zCoord;\n/* 164 */ int var47 = (int)var45;\n/* */ \n/* 166 */ if (var45 < var47)\n/* */ {\n/* 168 */ var47--;\n/* */ }\n/* */ \n/* 171 */ int var48 = var47 & 0xFF;\n/* 172 */ var45 -= var47;\n/* 173 */ double var49 = var45 * var45 * var45 * (var45 * (var45 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 175 */ for (int var51 = 0; var51 < p_76308_9_; var51++) {\n/* */ \n/* 177 */ double var52 = p_76308_4_ + var51 * p_76308_13_ + this.yCoord;\n/* 178 */ int var54 = (int)var52;\n/* */ \n/* 180 */ if (var52 < var54)\n/* */ {\n/* 182 */ var54--;\n/* */ }\n/* */ \n/* 185 */ int var55 = var54 & 0xFF;\n/* 186 */ var52 -= var54;\n/* 187 */ double var56 = var52 * var52 * var52 * (var52 * (var52 * 6.0D - 15.0D) + 10.0D);\n/* */ \n/* 189 */ if (var51 == 0 || var55 != var22) {\n/* */ \n/* 191 */ var22 = var55;\n/* 192 */ int var69 = this.permutations[var41] + var55;\n/* 193 */ int var71 = this.permutations[var69] + var48;\n/* 194 */ int var72 = this.permutations[var69 + 1] + var48;\n/* 195 */ int var74 = this.permutations[var41 + 1] + var55;\n/* 196 */ int var75 = this.permutations[var74] + var48;\n/* 197 */ int var76 = this.permutations[var74 + 1] + var48;\n/* 198 */ var29 = lerp(var42, grad(this.permutations[var71], var38, var52, var45), grad(this.permutations[var75], var38 - 1.0D, var52, var45));\n/* 199 */ var31 = lerp(var42, grad(this.permutations[var72], var38, var52 - 1.0D, var45), grad(this.permutations[var76], var38 - 1.0D, var52 - 1.0D, var45));\n/* 200 */ var33 = lerp(var42, grad(this.permutations[var71 + 1], var38, var52, var45 - 1.0D), grad(this.permutations[var75 + 1], var38 - 1.0D, var52, var45 - 1.0D));\n/* 201 */ var35 = lerp(var42, grad(this.permutations[var72 + 1], var38, var52 - 1.0D, var45 - 1.0D), grad(this.permutations[var76 + 1], var38 - 1.0D, var52 - 1.0D, var45 - 1.0D));\n/* */ } \n/* */ \n/* 204 */ double var58 = lerp(var56, var29, var31);\n/* 205 */ double var60 = lerp(var56, var33, var35);\n/* 206 */ double var62 = lerp(var49, var58, var60);\n/* 207 */ int var10001 = var19++;\n/* 208 */ p_76308_1_[var10001] = p_76308_1_[var10001] + var62 * var20;\n/* */ } \n/* */ } \n/* */ } \n/* */ } \n/* */ }",
"public abstract int mo9745j();",
"public double getSlowToFire();",
"Double getMultiplier();",
"public void mo133110n() {\n this.f113321t = System.currentTimeMillis();\n }",
"@Test\n public void testPrediction1() throws Exception {\n\n final CalUtils.InstantGenerator instantGenerator =\n new LocalTimeMinutes(5);\n \n final double coreDailyVols[][] = new double[][] {\n new double[] {55219 , 262256 , 202661 , 218359 , 178244 , 99610 , 92348 , 124795 , 214370 , 153854 , 204116 , 173501 , 85390 , 156835 , 108070 , 23755 , 118573 , 70117 , 55768 , 52643 , 71485 , 407645 , 442909 , 129109 , 188896 , 79590 , 422121 , 290067 , 227955 , 69257 , 41634 , 446002 , 579188 , 86237 , 1606794 , 83676 , 166393 , 84987 , 875905 , 117013 , 399084 , 116190 , 149507 , 207221 , 60857 , 155612 , 448006 , 198637 , 67695 , 65423 , 180038 , 88774 , 80273 , 86065 , 85231 , 38867 , 29330 , 116353 , 26887 , 34170 , 102518 , 72246 , 21274 , 70752 , 37912 , 49367 , 100472 , 49461 , 41735 , 45795 , 36578 , 311945 , 249039 , 70487 , 121906 , 136424 , 195136 , 166308 , 331734 , 343180 , 419616 , 104613 , 1354058 , 162678 , 141067 , 147039 , 149115 , 271162 , 543989 , 184421 , 340679 , 201939 , 293860 , 171035 , 263964 , 260198 , 428087 , 565126 , 385874 , 547890 , 384416 , 256696 , 0 , 4738359},\n new double[] {1298630 , 678084 , 488607 , 224766 , 434263 , 356933 , 576571 , 219236 , 252805 , 414776 , 166828 , 174665 , 146281 , 110944 , 145234 , 179739 , 253111 , 175685 , 64925 , 216682 , 494507 , 100205 , 67371 , 101019 , 158026 , 316281 , 334067 , 954850 , 115547 , 163051 , 130303 , 107600 , 1407996 , 90357 , 110452 , 451866 , 238004 , 3096215 , 2672803 , 190170 , 111282 , 107135 , 453389 , 60821 , 98292 , 1310864 , 1132267 , 241907 , 89915 , 175676 , 61621 , 521553 , 212388 , 288651 , 193578 , 272161 , 256777 , 236382 , 802159 , 230248 , 387068 , 160647 , 106999 , 391933 , 465080 , 374577 , 340378 , 330708 , 416320 , 200347 , 251986 , 336664 , 311970 , 600559 , 508011 , 922379 , 311581 , 352459 , 508727 , 159316 , 1355635 , 246541 , 389672 , 805957 , 370754 , 382556 , 316971 , 564228 , 437166 , 277733 , 1284505 , 1763095 , 169661 , 280682 , 969102 , 540315 , 451895 , 308036 , 715130 , 642966 , 981563 , 900778 , 0 , 7155528},\n new double[] {679280 , 229518 , 346536 , 347215 , 316025 , 313890 , 235844 , 199995 , 1920617 , 129356 , 172084 , 207860 , 317578 , 10369008 , 480990 , 1403537 , 1021730 , 156125 , 94833 , 366987 , 145687 , 322957 , 328120 , 66657 , 176001 , 271003 , 133121 , 558624 , 264638 , 638663 , 165080 , 129439 , 5126344 , 5438632 , 248806 , 250616 , 112716 , 54523 , 198097 , 67772 , 1414565 , 244509 , 246205 , 151540 , 98584 , 51217 , 94193 , 111763 , 104726 , 45880 , 64242 , 78893 , 60706 , 48117 , 133085 , 101941 , 5103803 , 5084823 , 168230 , 75537 , 815036 , 73409 , 422412 , 437127 , 115802 , 326536 , 54707 , 81759 , 94420 , 208637 , 50361 , 1458556 , 84257 , 129114 , 54632 , 105873 , 57165 , 77578 , 233302 , 195560 , 134194 , 180928 , 140433 , 123154 , 221422 , 339866 , 1343886 , 114699 , 170052 , 150679 , 181731 , 160943 , 192590 , 125556 , 132656 , 154740 , 320932 , 140929 , 117889 , 381656 , 393635 , 306177 , 0 , 21629250},\n new double[] {526909 , 167180 , 199570 , 149154 , 142141 , 320881 , 223750 , 102275 , 258400 , 202197 , 120202 , 93404 , 178631 , 106401 , 346186 , 231729 , 163656 , 1622531 , 125689 , 2656587 , 5336032 , 2385985 , 335692 , 86118 , 130551 , 99047 , 81695 , 98846 , 238413 , 4831684 , 293262 , 124652 , 106642 , 112048 , 14284646 , 111209 , 2204635 , 128940 , 83395 , 134816 , 116320 , 65412 , 165020 , 126511 , 92217 , 111751 , 47320 , 82219 , 19044177 , 70827 , 21676 , 211214 , 103108 , 22771 , 61629 , 4816563 , 63806 , 33989 , 130104 , 146897 , 15046441 , 44977 , 40889 , 54584 , 54591 , 76634 , 238536 , 68583 , 110591 , 75012 , 503760 , 209479 , 217929 , 86397 , 102284 , 81878 , 252785 , 135884 , 129149 , 112760 , 266851 , 110863 , 67866 , 55205 , 150165 , 699438 , 184450 , 270270 , 4270036 , 345303 , 895116 , 217142 , 145398 , 301231 , 10260595 , 136317 , 442910 , 371357 , 189023 , 538928 , 438973 , 926728 , 9137 , 8879481},\n new double[] {1318228 , 1391326 , 574558 , 441739 , 719144 , 522626 , 404351 , 383602 , 490710 , 284952 , 2984474 , 216339 , 10220195 , 247067 , 166223 , 224310 , 10181837 , 126161 , 9764418 , 692337 , 25907353 , 1518741 , 1179929 , 120730 , 10173292 , 290045 , 19824327 , 402527 , 277859 , 3116841 , 7164061 , 332021 , 10560006 , 2334129 , 121753 , 200177 , 246402 , 10106648 , 1137272 , 2084673 , 461849 , 125108 , 465907 , 156972 , 139083 , 127389 , 237263 , 311691 , 156536 , 155322 , 133368 , 329715 , 256088 , 116835 , 5192615 , 823762 , 183836 , 1110239 , 2414836 , 385072 , 599637 , 387285 , 291580 , 2796924 , 12977051 , 338582 , 884415 , 525622 , 322587 , 223348 , 668858 , 143039 , 627590 , 239797 , 232788 , 256503 , 209425 , 375474 , 558106 , 290991 , 1176648 , 286550 , 149539 , 297435 , 602136 , 152733 , 212363 , 178992 , 179644 , 295428 , 933636 , 349405 , 660749 , 226061 , 868852 , 318539 , 469303 , 538061 , 273643 , 444084 , 347730 , 825808 , 12011 , 7792372}};\n\n final SimpleDateFormat dateBuilder = new SimpleDateFormat(\"yyyy-MM-dd\");\n final Calendar moments[] = new Calendar[] { Calendar.getInstance(), \n Calendar.getInstance(), Calendar.getInstance(), \n Calendar.getInstance(), Calendar.getInstance(),\n Calendar.getInstance() };\n\n moments[0].setTime(dateBuilder.parse(\"2011-10-26\"));\n moments[1].setTime(dateBuilder.parse(\"2011-10-27\"));\n moments[2].setTime(dateBuilder.parse(\"2011-10-28\"));\n moments[3].setTime(dateBuilder.parse(\"2011-10-30\"));\n moments[4].setTime(dateBuilder.parse(\"2011-11-01\"));\n moments[5].setTime(dateBuilder.parse(\"2011-11-02\"));\n\n // Nomralize data to sum 100 (i.e., have an expectance of 100/104)\n for(int i=0; i<5; i++) {\n double sum = 0;\n for(int j=0; j<104; j++) sum += coreDailyVols[i][j];\n for(int j=0; j<104; j++) {\n coreDailyVols[i][j] = coreDailyVols[i][j]*100 / sum;\n }\n }\n\n final double[][] synthesizedDailyVols = new double[\n coreDailyVols.length][instantGenerator.maxInstantValue()];\n final Calendar openTime = Calendar.getInstance();\n final int n = 9*60 / 5;\n final int m = n + coreDailyVols[0].length;\n for(int i=0; i<5; i++) {\n for(int j=0; j<n; j++) {\n synthesizedDailyVols[i][j] = Double.NaN;\n }\n for(int j=0; j<coreDailyVols[i].length; j++) {\n synthesizedDailyVols[i][j+n] = coreDailyVols[i][j];\n }\n for(int j=m; j<instantGenerator.maxInstantValue(); j++) {\n synthesizedDailyVols[i][j] = Double.NaN;\n }\n }\n\n\n final Predictor predictor = new PCAPredictorTransposed(\n instantGenerator, 5);\n for(int i=0; i<5; i++) {\n predictor.learnVector(moments[i], synthesizedDailyVols[i]);\n }\n final double prediction[] = predictor.predictVector(moments[5]);\n final double coreExpectedPrediction[] = new double[] {\n0.21383323, -0.08665493, -0.28527934, -0.45293966, -0.35525111, -0.49117788,\n-0.38114565, -0.60141152, -0.09029406, -0.44815719, -0.45152723, -0.58079146,\n-0.29110153, 1.54262599, -0.59900211, -0.48107804, -0.03280398, -0.59369964,\n-0.44886852, -0.43868587, 0.88745208, -0.10900099, -0.26251035, -0.71557572,\n-0.20051598, -0.57674404, 0.53793693, 0.15857465, -0.53212067, -0.13529962,\n-0.49171709, -0.32334222, 2.16101856, 0.46824882, 2.13337330, -0.48802957,\n-0.40084079, 1.62077396, 1.93080019, -0.59114756, -0.09429057, -0.68952951,\n-0.39819841, -0.63019599, -0.78762027, 0.12458423, 0.34847712, -0.52481068,\n0.69730449, -0.74290105, -0.68866588, -0.45964670, -0.69174165, -0.64825389,\n-0.49908622, -0.30049621, 0.35726449, 0.47210113, -0.25058065, -0.72112704,\n0.79345044, -0.73245678, -0.75581875, -0.40885896, -0.08033429, -0.56030291,\n-0.54967743, -0.63571829, -0.58889882, -0.71099478, -0.67055922, -0.03850658,\n-0.40339282, -0.43003588, -0.44813762, -0.14347007, -0.48441216, -0.48851502,\n-0.15427010, -0.39484463, 0.52701151, -0.61335693, 0.89776479, -0.18821502,\n-0.46457371, -0.39850394, -0.26234640, -0.21535441, 0.33669589, -0.48879971,\n0.43892192, 0.52101182, -0.42851659, -0.51364225, 0.85831207, -0.24052028,\n-0.04192086, -0.02287821, 0.01522206, 0.24307671, 0.27369478, 0.11058009,\n-0.95575786, 14.90733910 };\n final double synthesizedExpectedPrediction[] = new double[\n instantGenerator.maxInstantValue()];\n for(int j=0; j<n; j++) {\n synthesizedExpectedPrediction[j] = Double.NaN;\n }\n for(int j=0; j<coreExpectedPrediction.length; j++) {\n synthesizedExpectedPrediction[j+n] = coreExpectedPrediction[j];\n }\n for(int j=m; j<instantGenerator.maxInstantValue(); j++) {\n synthesizedExpectedPrediction[j] = Double.NaN;\n }\n\n assertEquals(prediction.length, synthesizedExpectedPrediction.length);\n\n for(int i=0; i<prediction.length; i++) {\n assertEquals(prediction[i], synthesizedExpectedPrediction[i], \n 0.0001d);\n }\n System.out.println(\"Ok\");\n }",
"public long mo9746k() {\n return mo9775y();\n }",
"public abstract void mo4383c(long j);",
"public static void speedup(){\n\t\tif(bossair.periodairinit > Framework.nanosecond){\n\t\t\t\tbossair.periodair-=Framework.nanosecond/18; \n\t\t\t\tbossair.xmoving-=0.03; \n\t\t}\n\t\t\t\n\t}",
"private void m15508a(long j) {\n C4485ak.m15001a();\n if (this.f13396d.f11672j > 0 && this.f13396d.f11674l > 0 && mo9140c() != null) {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_state\", PkState.PK);\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_result\", PkResult.UNFINISHED);\n long j2 = (this.f13396d.f11674l - j) + ((long) (this.f13396d.f11672j * 1000));\n int i = (int) j2;\n int i2 = i / 1000;\n int i3 = i % 1000;\n StringBuilder sb = new StringBuilder(\"startTimeDown :\");\n sb.append(j2);\n this.f13396d.lambda$put$1$DataCenter(\"cmd_log_link\", sb.toString());\n if (j2 < 0) {\n if (this.f13399i != null) {\n this.f13399i.dispose();\n this.f13399i = null;\n }\n if (((long) (this.f13396d.f11682t * 1000)) + j2 > 0) {\n m15513b(((long) (this.f13396d.f11682t * 1000)) + j2);\n } else {\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_state\", PkState.FINISHED);\n }\n } else {\n if (this.f13399i != null) {\n this.f13399i.dispose();\n this.f13399i = null;\n }\n ((C4697a) mo9140c()).mo12636a(this.f13395c);\n int i4 = i2 + 1;\n this.f13396d.lambda$put$1$DataCenter(\"data_pk_time_left\", Integer.valueOf(i4));\n this.f13399i = C9057b.m27050a(0, 1, TimeUnit.SECONDS).mo19305c((long) i4).mo19320e((long) i3, TimeUnit.MILLISECONDS).mo19317d((C7327h<? super T, ? extends R>) new C4698fr<Object,Object>(i2)).mo19294a(C47549a.m148327a()).mo19280a((C7326g<? super T>) new C4699fs<Object>(this), (C7326g<? super Throwable>) new C4706fz<Object>(this));\n }\n }\n }",
"double actFunction(double k){\n\t\treturn Math.max(0, k); //ReLU\n\t}",
"public void mo4059b() {\n imageCacheStatsTracker.mo4072f();\n }",
"static void jps() {\n\n }",
"long mo54439f(int i);",
"@Override\n public long apply$mcJF$sp (float arg0)\n {\n return 0;\n }",
"public abstract void mo9243b(long j);",
"private void m13231a(long j) {\n int e = (int) (this.f9351b * ((float) this.f9350a.m13223e()));\n int e2 = (int) (((float) this.f9350a.m13223e()) * this.f9352c);\n e += (int) (new AccelerateInterpolator().getInterpolation(((float) j) / 130.0f) * ((float) (e2 - e)));\n if (e >= this.f9350a.m13222d()) {\n boolean z;\n if (e >= e2) {\n z = true;\n } else {\n e2 = e;\n z = false;\n }\n this.f9350a.m13221c(e2);\n this.f9350a.m13216a();\n if (z) {\n this.f9355f = false;\n this.f9353d = System.currentTimeMillis();\n }\n }\n }",
"void mo9694a(float f, float f2);",
"static void labExperiments() {\n\t\tFib efib = new ExponentialFib();\n\t\tSystem.out.println(efib);\n\t\tfor (int i = 0; i < 11; i++)\n\t\t\tSystem.out.println(i + \" \" + efib.fib(i));\n\n\t\t// Determine running time for n1 = 20 and print it out.\n\t\tint n1 = 20;\n\t\tdouble time1 = averageTime(efib, n1, 1000);\n\t\tSystem.out.println(\"n1 \" + n1 + \" time1 \" + time1);\n\t\tint ncalls = (int) (1e6 / time1);\n\t\ttime1 = averageTime(efib, n1, ncalls);\n\t\tSystem.out.println(\"The time1 was: \" + time1 + \" with \" + ncalls + \" calls\");\n\t\ttime1 = accurateTime(efib, n1);\n\t\tSystem.out.println(\"The time1 was: \" + time1 + \" with \" + ncalls + \" calls\");\n\n\t\t// Calculate constant: time = constant times O(n).\n\t\tdouble c = time1 / efib.o(n1);\n\t\tSystem.out.println(\"c: \" + c);\n\n\t\t// Estimate running time for n2=30.\n\t\tint n2 = 30;\n\t\tdouble time2est = c * efib.o(n2);\n\t\tSystem.out.println(\"n2 \" + n2 + \" estimated time: \" + time2est);\n\n\t\t// Calculate actual running time for n2=30.\n\t\tdouble time2 = averageTime(efib, n2, 100);\n\n\t\tncalls = (int) (1e6 / time2);\n\t\ttime2 = averageTime(efib, n2, ncalls);\n\t\tSystem.out.println(\"The time2 was: \" + time2 + \" with \" + ncalls + \" calls\");\n\t\ttime2 = accurateTime(efib, n2);\n\t\tSystem.out.println(\"The time2 was: \" + time2 + \" with \" + ncalls + \" calls\");\n\n\t\tint n3 = 100;\n\t\tdouble time3est = c * efib.o(n3);\n\t\tSystem.out.println(\"n3 \" + n3 + \" estimated time: \" + time3est);\n\t\tdouble years = time3est / 1e6 / 3600 / 24 / 365.25;\n\t\tSystem.out.println(\"Years: \" + years);\n\t}",
"@Test\n @Tag(\"slow\")\n @Tag(\"unstable\")\n public void testFIT2P() {\n CuteNetlibCase.doTest(\"FIT2P.SIF\", \"1234567890\", \"1234567890\", NumberContext.of(7, 4));\n }",
"@Override\n public double tuition(){\n return 2500;\n }",
"public abstract void mo9813b(long j);",
"public static ImagePlus[] computeT1T2MapMultiThread(final ImagePlus[]imgsTemp,double sigmaSmoothing,int fitType,int algType, boolean debug) {\n\t\tboolean isBionano=VitimageUtils.isFromBionano(imgsTemp[0]);\n\t\tdouble[]voxs=VitimageUtils.getVoxelSizes(imgsTemp[0]);\n\t\tint[]dims=VitimageUtils.getDimensions(imgsTemp[0]);\t\tfinal int X=dims[0];\t\tfinal int Y=dims[1];\t\tfinal int Z=dims[2];\n\t\tint n=imgsTemp.length;\n\t\tboolean isBouture=VitimageUtils.isBouture(imgsTemp[0]);System.out.println(\"Detecte bouture ?\"+isBouture);\n\n\t\tImagePlus []imgs=new ImagePlus[n];\n\t\tfor(int i=0;i<n;i++) {imgs[i]=imgsTemp[i].duplicate();IJ.run(imgs[i],\"32-bit\",\"\");}\n\n\t\tfinal double thresholdRatio=isBouture ? THRESHOLD_RATIO_BETWEEN_MAX_ECHO_AND_SIGMA_RICE*MRUtils.THRESHOLD_BOUTURE_FACTOR : THRESHOLD_RATIO_BETWEEN_MEAN_ECHO_AND_SIGMA_RICE;\n\t\tfor(int i=0;i<n ; i++)imgsTemp[i]=VitimageUtils.gaussianFiltering(imgsTemp[i],voxs[0]*sigmaSmoothing,voxs[1]*sigmaSmoothing,0);//It's no error : no \"big smoothing\" over Z, due to misalignment\n\t\t\n\t\tImagePlus imgM0=imgsTemp[0].duplicate();\n\t\tImagePlus imgT1=imgM0.duplicate();\n\t\tImagePlus imgT2=imgM0.duplicate();\n\t\tImagePlus imgT22=imgM0.duplicate();\n\t\tImagePlus imgDelta=imgM0.duplicate();\n\t\tImagePlus imgM02=imgM0.duplicate();\n\t\tImagePlus imgKhi2=imgM0.duplicate();\n\t\tfinal double []listTrForThreads=getTrFrom3DRelaxationImageTab(imgsTemp);\n\t\tfinal double [][]listTeForThreads=getTeFrom3DRelaxationImageTab(imgsTemp);\n\t\tfinal double []listSigmaForThreads=getSigmaFrom3DRelaxationImageTab(imgsTemp);\n\t\t\n\t\tfinal float[][][]tabData=new float[n][Z][];\n\t\tfinal float[][][]tabDataNonSmooth=new float[n][Z][];\n\t\tfor(int i=0;i<n ;i++)for(int z=0;z<Z ; z++) {\n\t\t\ttabData[i][z]=(float[])imgsTemp[i].getStack().getProcessor(z+1).getPixels();\n\t\t\ttabDataNonSmooth[i][z]=(float[])imgs[i].getStack().getProcessor(z+1).getPixels();\n\t\t}\n\t\tfinal FloatProcessor[] tempComputedM0=new FloatProcessor[Z];\n\t\tfinal FloatProcessor[] tempComputedT1=new FloatProcessor[Z];\n\t\tfinal FloatProcessor[] tempComputedT2=new FloatProcessor[Z];\n\t\tfinal FloatProcessor[] tempComputedDelta=new FloatProcessor[Z];\n\t\tfinal FloatProcessor[] tempComputedM02=new FloatProcessor[Z];\n\t\tfinal FloatProcessor[] tempComputedT22=new FloatProcessor[Z];\n\t\tfinal FloatProcessor[] tempComputedKhi2=new FloatProcessor[Z];\n\t\tfinal AtomicInteger incrZ = new AtomicInteger(0);\n\t\tfinal AtomicInteger incrProcess = new AtomicInteger(0);\n\t\tfinal AtomicInteger nEarlyBreaks = new AtomicInteger(0);\n\t\tfinal int totLines=Y*Z;\n\t\tfinal int nThread=n;\n\t\tfinal int onePercent=1+totLines/100;\n\t\tIJ.log(( (Z==1) ? \"Single thread\" : (\"Multi-threaded (\"+Z+\" threads)\"))+\" T1 and/or T2 map computation.\\n Start fit on \"+(X*Y*Z)+\" voxels with sigma=\"+listSigmaForThreads[0]);\n\t\tfinal Thread[] threads = VitimageUtils.newThreadArray(Z); \n\t\tfor (int ithread = 0; ithread < Z; ithread++) { \n\t\t\tthreads[ithread] = new Thread() { { setPriority(Thread.NORM_PRIORITY); } \n\t\t\tpublic void run() { \n\t\t\t\tFloatProcessor threadCompT2=new FloatProcessor(X,Y);\n\t\t\t\tFloatProcessor threadCompT1=new FloatProcessor(X,Y);\n\t\t\t\tFloatProcessor threadCompM0=new FloatProcessor(X,Y);\n\t\t\t\tfloat[]tabThreadT1=(float[])threadCompT1.getPixels();\n\t\t\t\tfloat[]tabThreadM0=(float[])threadCompM0.getPixels();\n\t\t\t\tfloat[]tabThreadT2=(float[])threadCompT2.getPixels();\n\t\t\t\tFloatProcessor threadCompT22=new FloatProcessor(X,Y);\n\t\t\t\tFloatProcessor threadCompM02=new FloatProcessor(X,Y);\n\t\t\t\tFloatProcessor threadCompKhi2=new FloatProcessor(X,Y);\n\t\t\t\tFloatProcessor threadCompDelta=new FloatProcessor(X,Y);\n\t\t\t\tfloat[]tabThreadM02=(float[])threadCompM02.getPixels();\n\t\t\t\tfloat[]tabThreadT22=(float[])threadCompT22.getPixels();\n\t\t\t\tfloat[]tabThreadKhi2=(float[])threadCompKhi2.getPixels();\n\t\t\t\tfloat[]tabThreadDelta=(float[])threadCompDelta.getPixels();\n\t\t\t\t\n\t\t\t\tdouble[]echoesForThisVoxel=new double[nThread];\t\t\n\t\t\t\tdouble[]echoesNonGaussForThisVoxel=new double[nThread];\t\t\n\t\t\t\tdouble[]estimatedParams;\n\t\t\t\tint z = incrZ.getAndIncrement();\n\n\t\t\t\tfor(int y=0;y<Y;y++) {\n\t\t\t\t\tint incrTot=incrProcess.getAndIncrement();\n\t\t\t\t\tif(incrTot%onePercent==0) {\n\t\t\t\t\t\tIJ.log(\"Processing map :, \"+(totLines<1 ? 0 : VitimageUtils.dou(incrTot*100.0/totLines)+\" %\"));\n\t\t\t\t\t}\n\t\t\t\t\tint xDebug=6;int yDebug=37; int zDebug=0;//0 52\n\t\t\t\t\tfor(int x=0;x<X;x++) {\n\t\t\t\t\t\tboolean isTheOne=(z==zDebug) && (x==xDebug) && (y==yDebug) && debug;if(isTheOne)System.out.println(\"\\nThis is the one...\");\n\n\t\t\t\t\t\t//Collect data\n\t\t\t\t\t\tint index=y*X+x;\n\t\t\t\t\t\tfor(int ech=0;ech<nThread;ech++) {\n\t\t\t\t\t\t\techoesForThisVoxel[ech]= tabData[ech][z][index];\n\t\t\t\t\t\t\techoesNonGaussForThisVoxel[ech]= tabDataNonSmooth[ech][z][index];\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t//If not enough signal, make off\n\t\t\t\t\t\tif(isTheOne) System.out.println(\"\\nStep moy two max\\nmoyTwoMax=\"+VitimageUtils.moyTwoMax(echoesNonGaussForThisVoxel)+\"\\nmean=\"+mean(echoesNonGaussForThisVoxel)+\"\\nthresholdRatio=\"+thresholdRatio+\"\\nlistSigmaForThreads[z]=\"+listSigmaForThreads[z]);\n\t\t\t\t\t\tif(mean(echoesNonGaussForThisVoxel)<thresholdRatio*listSigmaForThreads[z]) {\n\t\t\t\t\t\t\ttabThreadT2[index]=0;\n\t\t\t\t\t\t\ttabThreadT1[index]=0;\n\t\t\t\t\t\t\ttabThreadM0[index]=0;\n\t\t\t\t\t\t\ttabThreadDelta[index]=0;\n\t\t\t\t\t\t\tif(fitType==T1T2_MONO_RICE) {\n\t\t\t\t\t\t\t\ttabThreadT22[index]=0;\n\t\t\t\t\t\t\t\ttabThreadM02[index]=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(fitType==T1T2_MULTI_RICE) {\n\t\t\t\t\t\t\t\ttabThreadT22[index]=0;\n\t\t\t\t\t\t\t\ttabThreadM02[index]=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttabThreadKhi2[index]=MRUtils.ERROR_KHI2;\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\t//Compute the fit\t\t\t\t\t\n\t\t\t\t\t\tObject []obj=MRUtils.makeFit(listTrForThreads, listTeForThreads[z],echoesForThisVoxel,fitType,algType,DEFAULT_N_ITER_T1T2,listSigmaForThreads[z],isTheOne);\n\t\t\t\t\t\testimatedParams=((double[])(obj[0]));\n\t\t\t\t\t\tif(( (boolean) obj[1]) )nEarlyBreaks.getAndIncrement();\n\t\t\t\t\t\tif(isTheOne) {\n\t\t\t\t\t\t\tSystem.out.println(\"\\n\\nValues fitted : \\n\"+TransformUtils.stringVectorN(listTrForThreads, \"Tr=\")+\"\\n\"+TransformUtils.stringVectorN(listTeForThreads[z], \"Te\"));\n\t\t\t\t\t\t\tSystem.out.println(TransformUtils.stringVectorN(echoesForThisVoxel, \"Magnitude\")+\"\\nSigma=\"+listSigmaForThreads[z]);\t\t\t\t\t\t\n\t\t\t\t\t\t\tSystem.out.println(TransformUtils.stringVectorN(estimatedParams, \"estimatedParams\"));\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t//Gather data\t\n\t\t\t\t\t\tif(fitType==T1_MONO_RICE) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)estimatedParams[0];\n\t\t\t\t\t\t\ttabThreadT1[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[2];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(fitType==T2_MONO_RICE) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)estimatedParams[0];\n\t\t\t\t\t\t\ttabThreadT2[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[2];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(fitType==T2_MONO_BIAS) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)(estimatedParams[0]);\n\t\t\t\t\t\t\ttabThreadT2[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[3];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(fitType==T2_MONO) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)(estimatedParams[0]);\n\t\t\t\t\t\t\ttabThreadT2[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[2];\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(fitType==T2_MULTI_RICE) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)estimatedParams[0];\n\t\t\t\t\t\t\ttabThreadM02[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadT2[index]=(float)estimatedParams[2];\n\t\t\t\t\t\t\ttabThreadT22[index]=(float)estimatedParams[3];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[4];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(fitType==T1T2_MONO_RICE) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)estimatedParams[0];\n\t\t\t\t\t\t\ttabThreadT1[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadT2[index]=(float)estimatedParams[2];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[3];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(fitType==T1T2_MULTI_RICE) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)estimatedParams[0];\n\t\t\t\t\t\t\ttabThreadM02[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadT1[index]=(float)estimatedParams[2];\n\t\t\t\t\t\t\ttabThreadT2[index]=(float)estimatedParams[3];\n\t\t\t\t\t\t\ttabThreadT22[index]=(float)estimatedParams[4];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[5];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(fitType==T1T2_DEFAULT_T2_MONO_RICE) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)estimatedParams[0];\n\t\t\t\t\t\t\ttabThreadT1[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadT2[index]=(float)estimatedParams[2];\n\t\t\t\t\t\t\ttabThreadDelta[index]=(float)estimatedParams[3];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[4];\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(fitType==T1T2_DEFAULT_T2_MULTI_RICE) {\n\t\t\t\t\t\t\ttabThreadM0[index]=(float)estimatedParams[0];\n\t\t\t\t\t\t\ttabThreadM02[index]=(float)estimatedParams[1];\n\t\t\t\t\t\t\ttabThreadT1[index]=(float)estimatedParams[2];\n\t\t\t\t\t\t\ttabThreadT2[index]=(float)estimatedParams[3];\n\t\t\t\t\t\t\ttabThreadT22[index]=(float)estimatedParams[4];\n\t\t\t\t\t\t\ttabThreadDelta[index]=(float)estimatedParams[5];\n\t\t\t\t\t\t\ttabThreadKhi2[index]=(float)estimatedParams[6];\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif( ( (fitType==T1T2_MULTI_RICE) || (fitType==T2_MULTI_RICE) || (fitType==T1T2_DEFAULT_T2_MULTI_RICE) ) && (tabThreadT2[index]>tabThreadT22[index]) ) {\n\t\t\t\t\t\t\tfloat temp=tabThreadT2[index];\n\t\t\t\t\t\t\ttabThreadT2[index]=tabThreadT22[index];\n\t\t\t\t\t\t\ttabThreadT22[index]=temp;\n\t\t\t\t\t\t\ttemp=tabThreadM0[index];\n\t\t\t\t\t\t\ttabThreadM0[index]=tabThreadM02[index];\n\t\t\t\t\t\t\ttabThreadM02[index]=temp;\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\ttempComputedT2[z]=threadCompT2;\n\t\t\t\ttempComputedT1[z]=threadCompT1;\n\t\t\t\ttempComputedM0[z]=threadCompM0;\n\t\t\t\ttempComputedKhi2[z]=threadCompKhi2;\n\t\t\t\tif(fitType==T1T2_MULTI_RICE || fitType==T2_MULTI_RICE) {\n\t\t\t\t\ttempComputedT22[z]=threadCompT22;\n\t\t\t\t\ttempComputedM02[z]=threadCompM02;\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(fitType==T1T2_DEFAULT_T2_MONO_RICE || fitType==T1T2_DEFAULT_T2_MULTI_RICE) {\n\t\t\t\t\ttempComputedDelta[z]=threadCompDelta;\n\t\t\t\t}\n\t\t\t}}; \n\t\t} \t\t\n\t\tVitimageUtils.startAndJoin(threads); \n\n\t\tSystem.out.println(\"End of fit. Early breaks = \"+nEarlyBreaks.get()+\" / \"+(Z*X*Y));\n\t\tfor (int z=0; z< Z; z++) { \n\t\t\timgM0.getStack().setProcessor(tempComputedM0[z], z+1);\n\t\t\timgT1.getStack().setProcessor(tempComputedT1[z], z+1);\n\t\t\timgT2.getStack().setProcessor(tempComputedT2[z], z+1);\n\t\t\timgKhi2.getStack().setProcessor(tempComputedKhi2[z], z+1);\n\t\t\tif(fitType==T1T2_MULTI_RICE || fitType==T2_MULTI_RICE) {\n\t\t\t\timgM02.getStack().setProcessor(tempComputedM02[z], z+1);\n\t\t\t\timgT22.getStack().setProcessor(tempComputedT22[z], z+1);\n\t\t\t}\n\t\t\tif(fitType==T1T2_DEFAULT_T2_MONO_RICE || fitType==T1T2_DEFAULT_T2_MULTI_RICE) {\n\t\t\t\timgDelta.getStack().setProcessor(tempComputedDelta[z], z+1);\t\t\t\t\n\t\t\t}\n\t\t} \n\t\tif(isBionano) {\n\t\t\timgM0.setDisplayRange(0, maxDisplayedBionanoM0);\n\t\t\timgT1.setDisplayRange(0, maxDisplayedBionanoT1);\n\t\t\timgT2.setDisplayRange(0, maxDisplayedBionanoT2);\n\t\t\timgKhi2.setDisplayRange(0, 2);\n\t\t\tif(fitType==T1T2_MULTI_RICE || fitType==T2_MULTI_RICE) {\n\t\t\t\timgM02.setDisplayRange(0, maxDisplayedBionanoM0);\n\t\t\t\timgT22.setDisplayRange(0, maxDisplayedBionanoT2);\n\t\t\t}\n\t\t\tif(fitType==T1T2_DEFAULT_T2_MONO_RICE || fitType==T1T2_DEFAULT_T2_MULTI_RICE) {\n\t\t\t\timgDelta.setDisplayRange(0, 50);\n\t\t\t\timgDelta.show();\n\t\t\t\timgDelta.setTitle(\"delta\");\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\timgM0.resetDisplayRange();\n\t\t\timgT1.resetDisplayRange();\n\t\t\timgT2.resetDisplayRange();\n\t\t\timgKhi2.resetDisplayRange();\n\t\t\tif(fitType==T1T2_MULTI_RICE || fitType==T2_MULTI_RICE) {\n\t\t\t\timgM02.resetDisplayRange();\n\t\t\t\timgT22.resetDisplayRange();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tImagePlus []tabRet=null;\n\t\tswitch(fitType) {\n\t\t\tcase T1_MONO_RICE : tabRet=new ImagePlus[] {imgM0,imgT1,imgKhi2};break;\n\t\t\tcase T2_MONO_RICE : tabRet=new ImagePlus[] {imgM0,imgT2,imgKhi2};break;\n\t\t\tcase T2_MONO_BIAS : tabRet=new ImagePlus[] {imgM0,imgT2,imgKhi2};break;\n\t\t\tcase T2_MONO : tabRet=new ImagePlus[] {imgM0,imgT2,imgKhi2};break;\n\t\t\tcase T2_MULTI_RICE : tabRet=new ImagePlus[] {imgM0,imgM02,imgT2,imgT22,imgKhi2};break;\n\t\t\tcase T1T2_MONO_RICE : tabRet=new ImagePlus[] {imgM0,imgT1,imgT2,imgKhi2};break;\n\t\t\tcase T1T2_MULTI_RICE : tabRet=new ImagePlus[] {imgM0,imgM02,imgT1,imgT2,imgT22,imgKhi2};break;\n\t\t\tcase T1T2_DEFAULT_T2_MONO_RICE : tabRet=new ImagePlus[] {imgM0,imgT1,imgT2,imgDelta,imgKhi2};break;\n\t\t\tcase T1T2_DEFAULT_T2_MULTI_RICE : tabRet=new ImagePlus[] {imgM0,imgM02,imgT1,imgT2,imgT22,imgDelta,imgKhi2};break;\n\t\t\tdefault : break;\n\t\t}\n\t\treturn tabRet;\n\t}",
"void speedUp(int a);",
"public native int getIterations() throws MagickException;",
"public void setBiasInNs(double r1) {\n /*\n // Can't load method instructions: Load method exception: null in method: android.location.GpsClock.setBiasInNs(double):void, dex: in method: android.location.GpsClock.setBiasInNs(double):void, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.location.GpsClock.setBiasInNs(double):void\");\n }",
"double tirer();",
"@Test\n @Tag(\"slow\")\n public void testWOOD1P() {\n CuteNetlibCase.doTest(\"WOOD1P.SIF\", \"1.44290241157344\", \"9.99999999999964\", NumberContext.of(7, 4));\n }",
"@Override\n\tpublic Object solvePart2(List<Technique> input) {\n\t\tvar m = BigInteger.valueOf(119315717514047L);\n\n\t\tvar a = BigInteger.ONE;\n\t\tvar b = BigInteger.ZERO;\n\t\tfor (var technique : input) {\n\t\t\tvar techniqueA = BigInteger.valueOf(technique.getA());\n\t\t\tvar techniqueB = BigInteger.valueOf(technique.getB());\n\n\t\t\ta = techniqueA.multiply(a).mod(m);\n\t\t\tb = techniqueA.multiply(b).add(techniqueB).mod(m);\n\t\t}\n\n\t\t// We re-arrange our combined f(x) to get x in terms of f(x), so we can\n\t\t// run the function in reverse:\n\t\t//\n\t\t// x = (f(x) - b) * a^(-1) (mod m)\n\t\t// x = f(x) * a^(-1) - b * a^(-1) (mod m)\n\t\t//\n\t\t// Call this new function g(x). Note that g(x) is the same as f(x), but\n\t\t// with:\n\t\t//\n\t\t// a' = a^(-1) (mod m)\n\t\t// b' = -b * a^(-1) (mod m)\n\t\t//\n\t\t// We adjust our a/b below for use with g(x).\n\t\ta = a.modInverse(m);\n\t\tb = b.negate().multiply(a).mod(m);\n\n\t\t// We need to run g(x) several times.\n\t\t//\n\t\t// g^1(x) = a * x + b\n\t\t//\n\t\t// g^2(x) = a * g^1(x) + b\n\t\t// = a * (a * x + b) + b\n\t\t// = a^2 * x + a * b + b\n\t\t//\n\t\t// g^3(x) = a^3 * x + a^2 * b + a * b + b\n\t\t// ...\n\t\t// g^n(x) = a^n * x + a^(n-1) * b + a^(n-2) * b + ... + b\n\t\t//\n\t\t// (mod m omitted for brevity.)\n\t\t//\n\t\t// The latter terms are a geometric series with first term b and common\n\t\t// ratio a.\n\t\t//\n\t\t// We can therefore simplify it to:\n\t\t//\n\t\t// g^n(x) = a^n * x + (1 - a^n) * (1 - a)^-1 * b (mod m)\n\t\tvar n = BigInteger.valueOf(101741582076661L);\n\t\tvar x = BigInteger.valueOf(2020L);\n\n\t\t// Java really needs operator overloading...\n\t\tvar aToN = a.modPow(n, m);\n\t\tvar aToNTimesX = aToN.multiply(x);\n\n\t\tvar geometricSum = BigInteger.ONE.subtract(aToN)\n\t\t\t.multiply(BigInteger.ONE.subtract(a).modInverse(m))\n\t\t\t.multiply(b);\n\n\t\treturn aToNTimesX.add(geometricSum).mod(m).longValue();\n\t}"
]
| [
"0.5845645",
"0.5828103",
"0.56780505",
"0.55514437",
"0.54290026",
"0.5354926",
"0.5280327",
"0.5273568",
"0.5258621",
"0.5215285",
"0.518387",
"0.5179955",
"0.51639634",
"0.516297",
"0.51578224",
"0.51504856",
"0.51392084",
"0.5138033",
"0.51307344",
"0.5119668",
"0.5107436",
"0.5104731",
"0.5097205",
"0.50896525",
"0.5083578",
"0.50810015",
"0.50662255",
"0.50586545",
"0.5053217",
"0.5035055",
"0.50147504",
"0.50104827",
"0.5004758",
"0.50004905",
"0.49843803",
"0.49751538",
"0.49670723",
"0.49485797",
"0.49453387",
"0.49436647",
"0.49431202",
"0.4940946",
"0.49190578",
"0.49147516",
"0.49143496",
"0.49135584",
"0.4895952",
"0.48953143",
"0.48904255",
"0.48885685",
"0.48822364",
"0.48755324",
"0.487372",
"0.48713127",
"0.48702297",
"0.48674086",
"0.48577732",
"0.48435017",
"0.48432633",
"0.48419118",
"0.48413104",
"0.48404002",
"0.48371398",
"0.48361138",
"0.48264682",
"0.48140052",
"0.48056486",
"0.48023698",
"0.47975495",
"0.47935018",
"0.4792132",
"0.47884378",
"0.47803825",
"0.477692",
"0.47671586",
"0.47657487",
"0.47650704",
"0.47646856",
"0.4764504",
"0.47606534",
"0.47544795",
"0.47502035",
"0.47492045",
"0.47306627",
"0.4730395",
"0.4730116",
"0.47275898",
"0.4720519",
"0.4720279",
"0.47184885",
"0.4716852",
"0.47089788",
"0.47087324",
"0.4707539",
"0.4706486",
"0.47047937",
"0.47022158",
"0.47018474",
"0.4701685",
"0.4701036"
]
| 0.6472895 | 0 |
FEATURE NUMBER 3 : FUNDAMENTAL FREQUENCY Getter for the fundamental frequency | public double getfundamentalFreq() {
if ( fundamentalFreq == 0f )
calculatefundamentalFreq();
return fundamentalFreq;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void calculatefundamentalFreq() {\n\t\tint count;\n\t\tfloat f0 = 0;\n\t\tSystem.out.println(\"pitches\");\n\t\tSystem.out.println(pitches);\n\t\tfor(count = 0; count < pitches.size(); count++)\n\t\t{\n\t\t\tf0 += pitches.get(count);\n\t\t}\n\t\tif(count != 0)\n\t\t\tfundamentalFreq = f0 / count;\n\t\telse\n\t\t\tfundamentalFreq = 0;\n\t}",
"float getFrequency();",
"@Override\n\tpublic Float getFrequency() {\n\t\treturn 3.8f;\n\t}",
"public Frequency getFreq() {\n\t\treturn this.freq;\n\t}",
"public float getFrequency() {\n Integer sR = (Integer)sampleRate.getSelectedItem();\n int intST = sR.intValue();\n int intFPW = framesPerWavelength.getValue();\n\n return (float)intST/(float)intFPW;\n }",
"public Double getFrequency() {\n return frequency;\n }",
"int getFreq();",
"public long getFreq() {\n return freq;\n }",
"public java.lang.Integer getFrequency() {\n return frequency;\n }",
"public int getFreq() {\n return freq_;\n }",
"public java.lang.Integer getFrequency() {\n return frequency;\n }",
"java.lang.String getFrequency();",
"public int getFreq() {\n return freq_;\n }",
"public int getFrequency_(){\r\n\t\treturn frequency_;\r\n\t}",
"public int getFrequency()\n\t{\n\t\treturn frequency;\n\t}",
"public Integer getFrequency() {\n return this.frequency;\n }",
"public int freq()\n\t{\n\t\treturn _lsPeriod.get (0).freq();\n\t}",
"public double getF();",
"public int getFreq(){ return frequency;}",
"public int getFrequency() {\n\t\t\treturn mCurFrequency;\n\t\t}",
"public int getFrequency()\n {\n return this.frequency;\n }",
"public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n }\n }",
"public interface IFrequencyTable {\n\t\n\t/**\n\t * Returns the number of symbols in this frequency table, which is a positive number.\n\t * @return the number of symbols in this frequency table\n\t */\n\tpublic int getSymbolLimit();\n\t\n\t\n\t/**\n\t * Returns the frequency of the specified symbol. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the frequency of the symbol\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int get(int symbol);\n\tpublic int get(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Sets the frequency of the specified symbol to the specified value.\n\t * The frequency value must be at least 0.\n\t * @param symbol the symbol to set\n\t * @param freq the frequency value to set\n\t * @throws IllegalArgumentException if the frequency is negative or the symbol is out of range\n\t * @throws ArithmeticException if an arithmetic overflow occurs\n\t */\n\tpublic void set(int symbol, int freq);\n\tpublic void set(ISymbol symbol, int freq);\n\t\n\t\n\t/**\n\t * Increments the frequency of the specified symbol.\n\t * @param symbol the symbol whose frequency to increment\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t * @throws ArithmeticException if an arithmetic overflow occurs\n\t */\n\tpublic void increment(int symbol);\n\tpublic void increment(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Returns the total of all symbol frequencies. The returned value is at\n\t * least 0 and is always equal to {@code getHigh(getSymbolLimit() - 1)}.\n\t * @return the total of all symbol frequencies\n\t */\n\tpublic int getTotal();\n\t\n\t\n\t/**\n\t * Returns the sum of the frequencies of all the symbols strictly\n\t * below the specified symbol value. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the sum of the frequencies of all the symbols below {@code symbol}\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int getLow(int symbol);\n\tpublic int getLow(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Returns the sum of the frequencies of the specified symbol\n\t * and all the symbols below. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the sum of the frequencies of {@code symbol} and all symbols below\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int getHigh(int symbol);\n\tpublic int getHigh(ISymbol symbol);\n\t\n}",
"public jkt.hms.masters.business.MasFrequency getFrequency () {\n\t\treturn frequency;\n\t}",
"public boolean hasFrequency() {\n return fieldSetFlags()[1];\n }",
"public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public int getFrequency(){\n return this.frequency;\n }",
"public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public float getFreqX() {\n return freqX;\n }",
"public SummaryFrequencyCodeType getFrequency() {\n\t return this.frequency;\n\t}",
"public void setFrequency(int f){\n this.frequency = f;\n }",
"@ApiModelProperty(value = \"Frequency of the billing cycle (monthly for instance)\")\n public String getFrequency() {\n return frequency;\n }",
"public float getFrequency() { \n \treturn mouseJointDef.frequencyHz; \n }",
"public double getRawFrequency() {\n return rawFrequency;\n }",
"public double[] getFrequences(){\r\n\t\tPairList pairs = parseTreeFrequences();\r\n\t\tArrayList<Pair> list = pairs.getList();\r\n\t\tdouble[] ret = new double[list.size()];\r\n\t\tfor(int i = 0; i < list.size(); i++){\r\n\t\t\tret[i] = list.get(i).freq;\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"public InterFreq getInterFreq() {\n\t\treturn interFreq;\n\t}",
"public abstract double samplingFrequency();",
"boolean hasFreq();",
"public double calculateFScore() {\n final double divisor = calculatePrecision() + calculateRecall();\n if(divisor == 0) {\n return 0.0;\n } else {\n return 2 * ((calculatePrecision() * calculateRecall()) / (calculatePrecision() + calculateRecall()));\n }\n }",
"public boolean hasFreq() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public Double getFNumber()\n\t{\n\t\treturn null;\n\t}",
"public float nextFloat() {\n int i, n = 0;\n float r = 0.0f;\n\n for (i = 0; i < numFrequencies; i++)\n if (isActive[i]) {\n r += (amplitudes[i] * waveForm(phases[i], whichWaveForm[i], i));\n phases[i] += deltaPhases[i];\n while (phases[i] > TWO_PI)\n phases[i] -= TWO_PI;\n n++;\n } // end if\n\n if (transientFrameCount > 0) {\n double t = (transientNumFrames - transientFrameCount--) / frameRate;\n double u = TWO_PI * t * dingFreq * Math.pow(2.0, t * chirpFactor);\n\n while (u >= TWO_PI)\n u -= TWO_PI;\n\n n++;\n r += (Math.exp(-lambda * t) * waveForm(u, MultiWave.SQUARE, -1));\n }\n if (noiseCoefficient != 0.0) {\n r += noiseCoefficient * (2.0 * Math.random() - 1.0);\n return (n > 0) ? r / (float) Math.sqrt(n) : r;\n }\n\n return (n > 0) ? r / (float) Math.sqrt(n) : 0f;\n }",
"public boolean hasFreq() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public double getF() {\n return m_Kf;\n }",
"com.google.protobuf.ByteString\n getFrequencyBytes();",
"public Set<Frequency> getFrequencies() {\n return null;\n }",
"float getFrequency() throws InterruptedException, ConnectionLostException;",
"public double getFluctuation() { return fluctuation; }",
"public double getRestFrequency(int subsystem) {\n double restFreq = _avTable.getDouble(ATTR_REST_FREQUENCY, subsystem,\n 0.0);\n return restFreq;\n }",
"public boolean hasFrequency() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"boolean hasFrequency();",
"private float calculateSensorFrequency() {\n if (startTime == 0) {\n startTime = System.nanoTime();\n }\n\n long timestamp = System.nanoTime();\n\n // Find the sample period (between updates) and convert from\n // nanoseconds to seconds. Note that the sensor delivery rates can\n // individually vary by a relatively large time frame, so we use an\n // averaging technique with the number of sensor updates to\n // determine the delivery rate.\n float hz = (count++ / ((timestamp - startTime) / 1000000000.0f));\n\n return hz;\n }",
"public double calculateSkyFrequency() {\n return calculateSkyFrequency(0);\n }",
"public Double getInverseDocumentFrequency() {\n return null;\n }",
"public double getCentreFrequency(int subsystem) {\n return _avTable.getDouble(ATTR_CENTRE_FREQUENCY, subsystem, 0.0);\n }",
"public float getFreqY() {\n return freqY;\n }",
"public long getMeasFrequencyHz() {\r\n return measFrequencyHz;\r\n }",
"public int getF() {\n\t\treturn f;\n\t}",
"public Float getSfsalary() {\n sfsalary=yfsalary-grsds;\n return sfsalary;\n }",
"private List<Float> nucleotideFrequencies() {\n\t\tList<Float> freqs = new ArrayList<Float>();\n\t\tfreqs.add((float) 0.3);\n\t\tfreqs.add((float) 0.5);\n\t\tfreqs.add((float) 0.8);\n\t\tfreqs.add((float) 1.0);\n\t\treturn freqs;\n\t}",
"@Override\r\n\t\t\tpublic long getDocumentFrequency(String term) {\n\t\t\t\treturn 0;\r\n\t\t\t}",
"public double[] getFixingPeriodAccrualFactor() {\n return _fixingPeriodAccrualFactor;\n }",
"public boolean hasFrequency() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"public float getTempFarenheit() {\n float tempF = 0;\n float tempC;\n if (readings.size() > 0) {\n tempC = readings.get(readings.size() - 1).temperature;\n tempF = (float) ((tempC * 1.8) + 32);\n\n }\n return tempF;\n }",
"@Test\n public void testDFTOneFreq() {\n for (int freq = 0; freq < 1000; freq += 200) {\n SoundWave wave = new SoundWave(freq, 5, 0.5, 0.1);\n double maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq, maxFreq, 0.00001);\n }\n }",
"@Override\n public int getTermFrequency(String term) {\n return 0;\n }",
"double computeFMeasure() {\n\t\tfMeasure = (2 * recall * precision) / (recall + precision);\n\t\treturn fMeasure;\n\t}",
"public double getFPS() {\n\t\treturn frequency;\n\t}",
"public long getTickFreq() {\n\t\treturn tickFreq;\n\t}",
"public double getFScore() {\n return getDist() + getHeruistic();\n }",
"public double getSkyFrequency() {\n return _avTable.getDouble(ATTR_SKY_FREQUENCY, getRestFrequency(0));\n }",
"public List<Double> getFrequencyBand() {\n return frequencyBand;\n }",
"public void setChannelRFfreq(int freq){\n this.channelRF=freq;\n }",
"public int getClockFrequency() {\n return clockFrequency;\n }",
"public float getEffectiveClockFrequency() {\n return (float) getCpu().getTime() * NANOSECS_IN_MSEC / getUptime();\n }",
"double ComputeFT_F1Score(individual st){\n\t\tdouble sum = 0, ft;\n\t\tint i;\n\t\tdouble[] tm;\n\t\t\n\t\tint tp, tn, fp, fn;\n\n\t\tdouble precision, recall;\n\t\ttp=0;\n\t\ttn=0;\n\t\tfp=0;\n\t\tfn=0;\n\t\t\n\t\ttm=ComputeTest(st.chrom);\n\t\tfor(i = 0; i < NUMFITTEST; i++) {\n\t\t\tft = PVAL(tm[i]);\n\t\t\t\n//\t\t\tSystem.out.println(\"TM[i]:\"+ft);\n\t\t\tif(ft<0) {\t\t\t\t\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\ttn++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\tfp++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttp++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n//\t\t\t\n\t\t}\t\n//\t\t\n//\t\tSystem.out.println(\"TP:\"+tp);\n//\t\tSystem.out.println(\"FP:\"+fp);\n//\t\tSystem.out.println(\"FN:\"+fn);\n//\t\tSystem.out.println(\"TN:\"+tn);\n\t\tprecision=tp/(tp+fp);\n\t\trecall=tp/(tp+fn);\n\t\tsum=2*precision*recall/(precision+recall);\n\t\treturn sum;\n\t}",
"public Double getFactor();",
"public int getFrequency(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.frequency;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }",
"@Override\n\t public float idf(int docFreq, int numDocs) {\n\t // return (float)(Math.log(numDocs/(double)(docFreq+1)) + 1.0);\n\t\t return 1.0f;\n\t }",
"public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }",
"public Map<Integer, Float> getPercentInFrequency() {\n\t\t\tMap<Integer, Float> percents = new LinkedHashMap<Integer, Float>();\n\t\t\t\n\t\t\tint[][] times = getTimeInFrequency();\n\t\t\tif (times == null || times.length == 0) return null;\n\t\t\t\n\t\t\tlong total = 0;\n\t\t\t\n\t\t\tfor (int i = 0; i < times.length; ++i) {\n\t\t\t\ttotal += times[i][1];\n\t\t\t}\n\t\t\t\n\t\t\tif (total == 0) return null;\n\t\t\t\n\t\t\tfor (int i = 0; i < times.length; ++i) {\n\t\t\t\tpercents.put(times[i][0], (float) times[i][1] / total * 100);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn percents;\n\t\t}",
"@Generated\n @Selector(\"falloff\")\n @NFloat\n public native double falloff();",
"public float getTFIDF(Index index, String word) {\n long docCount = index.getDocuments().stream().filter(document -> document.hasWord(word)).count();\n return (float) getWordOccurrence(word) * (float) Math.log((float) index.getDocuments().size() / (float) docCount);\n }",
"FloatResource temperatureCoefficient();",
"BigInteger getMax_freq();",
"public double getFrecuencia() {\r\n return frecuencia;\r\n }",
"@Override\n\tpublic double fiyatlandir() {\n\t\treturn 7.95;\n\t}",
"public Float getT1B11Ffs6() {\r\n return t1B11Ffs6;\r\n }",
"public Double getFpl() {\r\n return fpl;\r\n }",
"public IntegerProperty getReactorFrequency() {\n return this.reactorLine.getCurrentFrequency();\n }",
"public double getSynchronizationFrequency() {\n return frequency;\n }",
"@ComputerMethod\n private Collection<QIOFrequency> getFrequencies() {\n return FrequencyType.QIO.getManagerWrapper().getPublicManager().getFrequencies();\n }",
"public float getChirpFrequency() {\n return chirpFrequency;\n }",
"public Float getT1B11Fd() {\r\n return t1B11Fd;\r\n }",
"private static double freqOfKey(int index) {\n return 440 * Math.pow(2, (double) (index - 12) / 24);\n }",
"public IntegerProperty getControlFrequency() {\n return this.inputAdjuster.getCurrentFrequency();\n }",
"private JTextField getHighFrequencyTF() {\n \t\tif (highFrequencyTF == null) {\n \t\t\thighFrequencyTF = new JTextField();\n \t\t\thighFrequencyTF.setText(new Double(cutHighFrequency).toString());\n \t\t\thighFrequencyTF.setPreferredSize(new Dimension(50, 20));\n \t\t}\n \t\treturn highFrequencyTF;\n \t}",
"@Override\n public long getFrequencyCount() {\n return count;\n }",
"@Test\r\n public void phasorsOnNominalFrequency(){ \r\n double precision = 1e-13;\r\n double frequencyDeviation = 0.0;\r\n double amplitude = 100.0;\r\n double phase = Math.PI/4;\r\n int limitPointNumbers = 36;\r\n \r\n double[] sinArray = new double[WINDOW_WIDTH];\r\n double[] cosArray = new double[WINDOW_WIDTH];\r\n \r\n for(int i=0;i<cosArray.length;i++){\r\n cosArray[i] = Math.cos( i * 2.0 * Math.PI / cosArray.length ); \r\n sinArray[i] = Math.sin( i * 2.0 * Math.PI / cosArray.length ); \r\n }\r\n \r\n \r\n RecursiveDFT recursiveDFT = new RecursiveDFT(cosArray,sinArray);\r\n CosineFunction cosine = new CosineFunction(amplitude,phase ,WINDOW_WIDTH ,NOMINAL_FREQUECY); \r\n List<Double> samples = Utils.generateSamples(cosine,limitPointNumbers,frequencyDeviation);\r\n \r\n List<Complex> phasors = Utils.getPhasors(samples,recursiveDFT).stream()\r\n .filter(phasor->phasor!=null)\r\n .collect(Collectors.toList());\r\n \r\n \r\n // Amplitude and phase are phaser representation \r\n assertTrue(\"Phase must be constant and equals to pi/4 for all samples on nominal frequency 50Hz\",\r\n isPhaseConstant(phase , phasors, precision)\r\n ); \r\n assertTrue(\"Amplitude must be constant and equals to 100/sqrt(2) for all samples on nominal frequency 50Hz\",\r\n isAmplitudeConstant(100/Math.sqrt(2), phasors, precision)\r\n ); \r\n }"
]
| [
"0.75091124",
"0.7401085",
"0.72766006",
"0.71297395",
"0.7061961",
"0.698877",
"0.6978794",
"0.68601114",
"0.6855581",
"0.6853673",
"0.6841052",
"0.6832012",
"0.6831977",
"0.68158823",
"0.6686236",
"0.66839576",
"0.664574",
"0.6642657",
"0.66399676",
"0.6607014",
"0.65855724",
"0.6463308",
"0.64396316",
"0.64286053",
"0.642519",
"0.6405388",
"0.63462996",
"0.6318388",
"0.624662",
"0.623337",
"0.62324715",
"0.62160623",
"0.62063324",
"0.62061495",
"0.6194453",
"0.61935824",
"0.61909765",
"0.6177363",
"0.6159358",
"0.61551565",
"0.6153136",
"0.61335665",
"0.6120115",
"0.6119175",
"0.6106016",
"0.60948503",
"0.60806507",
"0.6079502",
"0.6071666",
"0.6070049",
"0.6063637",
"0.60400057",
"0.6037782",
"0.60146415",
"0.5999168",
"0.5994561",
"0.59842694",
"0.5982612",
"0.5955301",
"0.59349793",
"0.5930152",
"0.59144324",
"0.5911869",
"0.59091663",
"0.5906264",
"0.58963925",
"0.588024",
"0.58551425",
"0.5852842",
"0.5840448",
"0.5817752",
"0.5815097",
"0.57918984",
"0.5791027",
"0.57774055",
"0.5769072",
"0.5757387",
"0.5756414",
"0.57479584",
"0.57227224",
"0.57152206",
"0.5712016",
"0.5705571",
"0.56997985",
"0.56972355",
"0.5688578",
"0.56620914",
"0.5661988",
"0.56582403",
"0.56486094",
"0.5637436",
"0.56355923",
"0.56332636",
"0.5624477",
"0.56219536",
"0.5619536",
"0.5611975",
"0.561117",
"0.5608078",
"0.5597647"
]
| 0.81998175 | 0 |
The method finding the fundamental frequency of the data. To increase efficiency, this method only test the frequencies between 40Hz to 400Hz. | private void calculatefundamentalFreq() {
int count;
float f0 = 0;
System.out.println("pitches");
System.out.println(pitches);
for(count = 0; count < pitches.size(); count++)
{
f0 += pitches.get(count);
}
if(count != 0)
fundamentalFreq = f0 / count;
else
fundamentalFreq = 0;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public double getfundamentalFreq() {\n\t\tif ( fundamentalFreq == 0f )\n\t\t\tcalculatefundamentalFreq();\n\n\t\treturn fundamentalFreq;\n\t}",
"@Test\n public void testDFTOneFreq() {\n for (int freq = 0; freq < 1000; freq += 200) {\n SoundWave wave = new SoundWave(freq, 5, 0.5, 0.1);\n double maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq, maxFreq, 0.00001);\n }\n }",
"float getFrequency();",
"@Test\r\n public void phasorsOnNominalFrequency(){ \r\n double precision = 1e-13;\r\n double frequencyDeviation = 0.0;\r\n double amplitude = 100.0;\r\n double phase = Math.PI/4;\r\n int limitPointNumbers = 36;\r\n \r\n double[] sinArray = new double[WINDOW_WIDTH];\r\n double[] cosArray = new double[WINDOW_WIDTH];\r\n \r\n for(int i=0;i<cosArray.length;i++){\r\n cosArray[i] = Math.cos( i * 2.0 * Math.PI / cosArray.length ); \r\n sinArray[i] = Math.sin( i * 2.0 * Math.PI / cosArray.length ); \r\n }\r\n \r\n \r\n RecursiveDFT recursiveDFT = new RecursiveDFT(cosArray,sinArray);\r\n CosineFunction cosine = new CosineFunction(amplitude,phase ,WINDOW_WIDTH ,NOMINAL_FREQUECY); \r\n List<Double> samples = Utils.generateSamples(cosine,limitPointNumbers,frequencyDeviation);\r\n \r\n List<Complex> phasors = Utils.getPhasors(samples,recursiveDFT).stream()\r\n .filter(phasor->phasor!=null)\r\n .collect(Collectors.toList());\r\n \r\n \r\n // Amplitude and phase are phaser representation \r\n assertTrue(\"Phase must be constant and equals to pi/4 for all samples on nominal frequency 50Hz\",\r\n isPhaseConstant(phase , phasors, precision)\r\n ); \r\n assertTrue(\"Amplitude must be constant and equals to 100/sqrt(2) for all samples on nominal frequency 50Hz\",\r\n isAmplitudeConstant(100/Math.sqrt(2), phasors, precision)\r\n ); \r\n }",
"int getFreq();",
"boolean hasFrequency();",
"public abstract double samplingFrequency();",
"boolean hasFreq();",
"@Test\n public void test() {\n int packLength = 156;\n DFTMainFreqEncoder encoder = new DFTMainFreqEncoder(packLength);\n encoder.setMainFreqNum(2);\n List<float[]> packs;\n\n for (int i = 0; i < 1000; i++) {\n // encoder.encode(2*i+3*Math.cos(2*Math.PI*0.4*i));\n// encoder.encode(3 * Math.cos(2 * Math.PI * 0.4 * i));\n encoder.encode(12.5);\n }\n for (int i = 2001; i < 3000; i++) {\n encoder.encode(37.5 + 10 * Math.cos(2 * Math.PI * 0.4 * i));\n // encoder.encode(i);\n }\n for (int i = 3001; i < 4000; i++) {\n // encoder.encode(2*i+3*Math.cos(2*Math.PI*0.4*i));\n// encoder.encode(3 * Math.cos(2 * Math.PI * 0.4 * i));\n encoder.encode(12.5);\n }\n\n System.out.println(\"data: line\");\n packs = encoder.getPackFrequency();\n for (int i = 0; i < packs.size(); i++) {\n System.out.println(i * packLength + \"\\t~\\t\" + ((i + 1) * packLength - 1) + \"\\t\"\n + Arrays.toString(packs.get(i)));\n }\n GtEq<Float> gtEq = FilterFactory.gtEq(FilterFactory.floatFilterSeries(\"a\", \"b\", FilterSeriesType.FREQUENCY_FILTER),0.2f,true);\n assertTrue(encoder.satisfy(gtEq));\n encoder.resetPack();\n\n }",
"public static List<Float> findFrequency(ComplexNum[] wave)\n\t{\n\t\t\n\t\tComplexNum temp = new ComplexNum();\n\t\tComplexNum sum = new ComplexNum(0,0);\n\t\t\n\t\tdouble mag[] = new double [wave.length];\n\t\tlong timeStart = System.currentTimeMillis();\n\t\tfor(int k = 0; k < wave.length; k++)\n\t\t{\t\n\t\t\tsum.setReal(0.0);\n\t\t\tsum.setImaginary(0.0);\n\t\t\t\n\t\t\tfor(int t = 0; t < wave.length; t++)\n\t\t\t{\n\t\t\t\tdouble realTemp = Math.cos(-2 * Math.PI * k * t /wave.length);\n\t\t\t\tdouble imagTemp = Math.sin(- 2 * Math.PI * k * t /wave.length);\n\t\t\t\t\n\t\t\t\ttemp.setReal((realTemp*wave[t].getReal()));\n\t\t\t\ttemp.setImaginary((imagTemp*wave[t].getReal()));\n\t\t\t\t\n\t\t\t\tsum = sum.add(temp);\t\n\t\t\t}\n\t\t\t\n\t\t\tmag[k] = sum.magnitude();\n\t\t\t\n\t\t}\n\t\t\n\t\tList<Float> found = process(mag, testSampleRate, wave.length, 0.5);\n\t\tList<Float> foundFrequencies = new ArrayList<Float>();\n\t\tlong timeEnd = System.currentTimeMillis();\n\t\tfor (float freq : found) \n\t\t{\n\t\t\tif(freq > 20 && freq < 20000)\n\t\t\t\tfoundFrequencies.add(freq);\n\t\t}\n\n\t return (foundFrequencies);\n\t}",
"@Test\n public void testDFTMultipleFreq() {\n int freq1;\n int freq2;\n int freq3;\n for (int i = 1; i < 10; i += 2) {\n freq1 = i * 100;\n freq2 = i * 200;\n freq3 = i * 300;\n SoundWave wave1 = new SoundWave(freq1, 0, 0.3, 0.1);\n SoundWave wave2 = new SoundWave(freq2, 2, 0.3, 0.1);\n SoundWave wave3 = new SoundWave(freq3, 3, 0.3, 0.1);\n SoundWave wave = wave1.add(wave2.add(wave3));\n\n double maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq3, maxFreq, 0.00001);\n }\n }",
"private float calculateSensorFrequency() {\n if (startTime == 0) {\n startTime = System.nanoTime();\n }\n\n long timestamp = System.nanoTime();\n\n // Find the sample period (between updates) and convert from\n // nanoseconds to seconds. Note that the sensor delivery rates can\n // individually vary by a relatively large time frame, so we use an\n // averaging technique with the number of sensor updates to\n // determine the delivery rate.\n float hz = (count++ / ((timestamp - startTime) / 1000000000.0f));\n\n return hz;\n }",
"java.lang.String getFrequency();",
"public float findFrequency(ArrayList<Float> wave){\n\r\n ArrayList<Float> newWave = new ArrayList<>();\r\n\r\n for(int i=0;i<wave.size()-4;i++){\r\n newWave.add((wave.get(i)+wave.get(i+1)+wave.get(i+2)+wave.get(i+4))/4f);\r\n }\r\n\r\n\r\n boolean isBelow = wave1.get(0)<triggerVoltage;\r\n\r\n ArrayList<Integer> triggerSamples = new ArrayList<>();\r\n\r\n\r\n System.out.println(\"starting f calc\");\r\n\r\n for(int i=1;i<newWave.size();i++){\r\n if(isBelow){\r\n if(newWave.get(i)>triggerVoltage){\r\n triggerSamples.add(i);\r\n isBelow=false;\r\n }\r\n }else{\r\n if(newWave.get(i)<triggerVoltage){\r\n triggerSamples.add(i);\r\n isBelow=true;\r\n }\r\n }\r\n }\r\n System.out.println(\"F len in \"+triggerSamples.size());\r\n\r\n ArrayList<Float> freqValues = new ArrayList<>();\r\n\r\n\r\n for(int i=0;i<triggerSamples.size()-2;i++){\r\n freqValues.add(1/(Math.abs(SecondsPerSample*(triggerSamples.get(i)-triggerSamples.get(i+2)))));\r\n }\r\n\r\n float finalAVG =0;\r\n for (Float f : freqValues) {\r\n finalAVG+=f;\r\n }\r\n finalAVG/=freqValues.size();\r\n\r\n\r\n return finalAVG;\r\n //System.out.println(finalAVG);\r\n }",
"public float getFrequency() {\n Integer sR = (Integer)sampleRate.getSelectedItem();\n int intST = sR.intValue();\n int intFPW = framesPerWavelength.getValue();\n\n return (float)intST/(float)intFPW;\n }",
"float getFrequency() throws InterruptedException, ConnectionLostException;",
"@Override\n\tpublic Float getFrequency() {\n\t\treturn 3.8f;\n\t}",
"public boolean hasFrequency() {\n return ((bitField0_ & 0x00000400) == 0x00000400);\n }",
"public long getFreq() {\n return freq;\n }",
"public int getFrequency_(){\r\n\t\treturn frequency_;\r\n\t}",
"public interface IFrequencyTable {\n\t\n\t/**\n\t * Returns the number of symbols in this frequency table, which is a positive number.\n\t * @return the number of symbols in this frequency table\n\t */\n\tpublic int getSymbolLimit();\n\t\n\t\n\t/**\n\t * Returns the frequency of the specified symbol. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the frequency of the symbol\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int get(int symbol);\n\tpublic int get(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Sets the frequency of the specified symbol to the specified value.\n\t * The frequency value must be at least 0.\n\t * @param symbol the symbol to set\n\t * @param freq the frequency value to set\n\t * @throws IllegalArgumentException if the frequency is negative or the symbol is out of range\n\t * @throws ArithmeticException if an arithmetic overflow occurs\n\t */\n\tpublic void set(int symbol, int freq);\n\tpublic void set(ISymbol symbol, int freq);\n\t\n\t\n\t/**\n\t * Increments the frequency of the specified symbol.\n\t * @param symbol the symbol whose frequency to increment\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t * @throws ArithmeticException if an arithmetic overflow occurs\n\t */\n\tpublic void increment(int symbol);\n\tpublic void increment(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Returns the total of all symbol frequencies. The returned value is at\n\t * least 0 and is always equal to {@code getHigh(getSymbolLimit() - 1)}.\n\t * @return the total of all symbol frequencies\n\t */\n\tpublic int getTotal();\n\t\n\t\n\t/**\n\t * Returns the sum of the frequencies of all the symbols strictly\n\t * below the specified symbol value. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the sum of the frequencies of all the symbols below {@code symbol}\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int getLow(int symbol);\n\tpublic int getLow(ISymbol symbol);\n\t\n\t\n\t/**\n\t * Returns the sum of the frequencies of the specified symbol\n\t * and all the symbols below. The returned value is at least 0.\n\t * @param symbol the symbol to query\n\t * @return the sum of the frequencies of {@code symbol} and all symbols below\n\t * @throws IllegalArgumentException if the symbol is out of range\n\t */\n\tpublic int getHigh(int symbol);\n\tpublic int getHigh(ISymbol symbol);\n\t\n}",
"public long getMeasFrequencyHz() {\r\n return measFrequencyHz;\r\n }",
"public boolean hasFrequency() {\n return ((bitField0_ & 0x00000080) == 0x00000080);\n }",
"public boolean hasFrequency() {\n return fieldSetFlags()[1];\n }",
"public int getFreq() {\n return freq_;\n }",
"public boolean hasFreq() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public boolean hasFreq() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }",
"public int getFreq() {\n return freq_;\n }",
"public Double getFrequency() {\n return frequency;\n }",
"public int getFreq(){ return frequency;}",
"com.google.protobuf.ByteString\n getFrequencyBytes();",
"public void setFrequency(int f){\n this.frequency = f;\n }",
"public void findFrequency(int size) {\r\n\t\tfor(i=0;i<size;i++) {\r\n\t\t\tfor (Entry en : dataEntries) {\t\t\r\n\t\t\t\ttemperature.add(en.getTemperature());\r\n\t\t\t\taches.add(en.getAches());\r\n\t\t\t\tcough.add(en.getCough());\r\n\t\t\t\tsoreThroat.add(en.getSoreThroat());\r\n\t\t\t\tdangerZone.add(en.getDangerZone());\r\n\t\t\t\thasCOVID19.add(en.getHasCOVID19());\r\n\t\t\t\t\r\n\t\t\t\tif (en.getHasCOVID19().equals(\"yes\")) {\r\n\t\t\t\t\ttemperatureIfCOVID19.add(en.getTemperature());\r\n\t\t\t\t\tachesIfCOVID19.add(en.getAches());\r\n\t\t\t\t\tcoughIfCOVID19.add(en.getCough());\r\n\t\t\t\t\tsoreThroatIfCOVID19.add(en.getSoreThroat());\r\n\t\t\t\t\tdangerZoneIfCOVID19.add(en.getDangerZone());\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public static double[] dft(double[] data, double[] idata, int dataLen){\n \n double[] spectrum = new double[dataLen];\n double delF = 1.0/dataLen;\n //Outer loop iterates on frequency\n // values.\n for(int i=0; i < dataLen;i++){\n double freq = i*delF;\n double real = 0;\n double imag = 0;\n //Inner loop iterates on time-\n // series points.\n for(int j=0; j < dataLen; j++){\n real += data[j]*Math.cos( 2*Math.PI*freq*j);\n imag += data[j]*Math.sin( 2*Math.PI*freq*j);\n }\n spectrum[i] = Math.sqrt(real*real + imag*imag);\n idata[i] = -imag;\n }\n return spectrum;\n }",
"public static double[] rawFreqCreator(){\n\t\tfinal int EXTERNAL_BUFFER_SIZE = 2097152;\n\t\t//128000\n\n\t\t//Get the location of the sound file\n\t\tFile soundFile = new File(\"MoodyLoop.wav\");\n\n\t\t//Load the Audio Input Stream from the file \n\t\tAudioInputStream audioInputStream = null;\n\t\ttry {\n\t\t\taudioInputStream = AudioSystem.getAudioInputStream(soundFile);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Get Audio Format information\n\t\tAudioFormat audioFormat = audioInputStream.getFormat();\n\n\t\t//Handle opening the line\n\t\tSourceDataLine\tline = null;\n\t\tDataLine.Info\tinfo = new DataLine.Info(SourceDataLine.class, audioFormat);\n\t\ttry {\n\t\t\tline = (SourceDataLine) AudioSystem.getLine(info);\n\t\t\tline.open(audioFormat);\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\n\t\t//Start playing the sound\n\t\t//line.start();\n\n\t\t//Write the sound to an array of bytes\n\t\tint nBytesRead = 0;\n\t\tbyte[]\tabData = new byte[EXTERNAL_BUFFER_SIZE];\n\t\twhile (nBytesRead != -1) {\n\t\t\ttry {\n\t\t \t\tnBytesRead = audioInputStream.read(abData, 0, abData.length);\n\n\t\t\t} catch (IOException e) {\n\t\t \t\te.printStackTrace();\n\t\t\t}\n\t\t\tif (nBytesRead >= 0) {\n\t\t \t\tint nBytesWritten = line.write(abData, 0, nBytesRead);\n\t\t\t}\n\n\t\t}\n\n\t\t//close the line \n\t\tline.drain();\n\t\tline.close();\n\t\t\n\t\t//Calculate the sample rate\n\t\tfloat sample_rate = audioFormat.getSampleRate();\n\t\tSystem.out.println(\"sample rate = \"+sample_rate);\n\n\t\t//Calculate the length in seconds of the sample\n\t\tfloat T = audioInputStream.getFrameLength() / audioFormat.getFrameRate();\n\t\tSystem.out.println(\"T = \"+T+ \" (length of sampled sound in seconds)\");\n\n\t\t//Calculate the number of equidistant points in time\n\t\tint n = (int) (T * sample_rate) / 2;\n\t\tSystem.out.println(\"n = \"+n+\" (number of equidistant points)\");\n\n\t\t//Calculate the time interval at each equidistant point\n\t\tfloat h = (T / n);\n\t\tSystem.out.println(\"h = \"+h+\" (length of each time interval in second)\");\n\t\t\n\t\t//Determine the original Endian encoding format\n\t\tboolean isBigEndian = audioFormat.isBigEndian();\n\n\t\t//this array is the value of the signal at time i*h\n\t\tint x[] = new int[n];\n\n\t\t//convert each pair of byte values from the byte array to an Endian value\n\t\tfor (int i = 0; i < n*2; i+=2) {\n\t\t\tint b1 = abData[i];\n\t\t\tint b2 = abData[i + 1];\n\t\t\tif (b1 < 0) b1 += 0x100;\n\t\t\tif (b2 < 0) b2 += 0x100;\n\t\t\tint value;\n\n\t\t\t//Store the data based on the original Endian encoding format\n\t\t\tif (!isBigEndian) value = (b1 << 8) + b2;\n\t\t\telse value = b1 + (b2 << 8);\n\t\t\tx[i/2] = value;\n\t\t\t\n\t\t}\n\t\t\n\t\t//do the DFT for each value of x sub j and store as f sub j\n\t\tdouble f[] = new double[n/2];\n\t\tfor (int j = 0; j < n/2; j++) {\n\n\t\t\tdouble firstSummation = 0;\n\t\t\tdouble secondSummation = 0;\n\n\t\t\tfor (int k = 0; k < n; k++) {\n\t\t \t\tdouble twoPInjk = ((2 * Math.PI) / n) * (j * k);\n\t\t \t\tfirstSummation += x[k] * Math.cos(twoPInjk);\n\t\t \t\tsecondSummation += x[k] * Math.sin(twoPInjk);\n\t\t\t}\n\n\t\t f[j] = Math.abs( Math.sqrt(Math.pow(firstSummation,2) + \n\t\t Math.pow(secondSummation,2)) );\n\n\t\t\tdouble amplitude = 2 * f[j]/n;\n\t\t\tdouble frequency = j * h / T * sample_rate;\n\t\t\tSystem.out.println(\"frequency = \"+frequency+\", amp = \"+amplitude);\n\t\t}\n\t\tSystem.out.println(\"DONE\");\n\t\treturn f;\n\t\t\n\t}",
"@Override\n\tpublic int showFrequency(String key) {\n\t\tint hashVal = hashFunc(key);\n\t\twhile (hashArray[hashVal] != null) {\n\t\t\tif (hashArray[hashVal].value.equals(key))\n\t\t\t\treturn hashArray[hashVal].frequency;\n\t\t\telse {\n\t\t\t\thashVal++;\n\t\t\t\thashVal = hashVal % size;\n\t\t\t}\n\t\t}\n\t\treturn 0;\n\t}",
"public double getRawFrequency() {\n return rawFrequency;\n }",
"public int getFrequency()\n\t{\n\t\treturn frequency;\n\t}",
"public java.lang.Integer getFrequency() {\n return frequency;\n }",
"private void getFrequency(){\r\n try {\r\n BufferedReader reader = new BufferedReader(new FileReader(IConfig.FREQUENCY_PATH));\r\n String line;\r\n while((line = reader.readLine()) != null){\r\n frequency.put(line.split(\" \")[0], (Double.parseDouble(line.split(\" \")[1])/ IConfig.TOTAL_NEWS));\r\n }\r\n reader.close();\r\n }catch (Exception e){\r\n e.printStackTrace();\r\n }\r\n }",
"public java.lang.Integer getFrequency() {\n return frequency;\n }",
"protected static double[] getFrequencies(List<Sequence> sequences) {\n return getFrequenciesMaybeSafe(sequences, false);\n }",
"private static double freqOfKey(int index) {\n return 440 * Math.pow(2, (double) (index - 12) / 24);\n }",
"public Set<Frequency> getFrequencies() {\n return null;\n }",
"public int freq()\n\t{\n\t\treturn _lsPeriod.get (0).freq();\n\t}",
"private List<Float> nucleotideFrequencies() {\n\t\tList<Float> freqs = new ArrayList<Float>();\n\t\tfreqs.add((float) 0.3);\n\t\tfreqs.add((float) 0.5);\n\t\tfreqs.add((float) 0.8);\n\t\tfreqs.add((float) 1.0);\n\t\treturn freqs;\n\t}",
"@Test\n public void testHighPassFilter() {\n int freq1;\n int freq2;\n for (int i = 1; i < 10; i += 2) {\n freq1 = i * 100;\n freq2 = i * 200;\n SoundWave wave1 = new SoundWave(freq1, 0, 0.4, 0.1);\n SoundWave wave2 = new SoundWave(freq2, 2, 0.3, 0.1);\n SoundWave wave = wave1.add(wave2);\n\n double maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq1, maxFreq, 0.00001);\n\n wave = wave.highPassFilter(5, 6);\n\n maxFreq = wave.highAmplitudeFreqComponent();\n assertEquals(freq2, maxFreq, 0.00001);\n }\n }",
"public int getFrequency(char symbol) {\r\n if(isEmpty()){\r\n throw new ArrayIndexOutOfBoundsException(\"No symbols in table\");\r\n }\r\n else {\r\n Node symbolNode = first;\r\n while(true) {\r\n if(symbolNode.symbol == symbol) {\r\n return symbolNode.frequency;\r\n }\r\n else if(symbolNode.next == null) {\r\n throw new NoSuchElementException(\"Symbol is not in the table\");\r\n }\r\n else {\r\n symbolNode = symbolNode.next;\r\n }\r\n }\r\n }\r\n }",
"public int getFrequency()\n {\n return this.frequency;\n }",
"public Frequency getFreq() {\n\t\treturn this.freq;\n\t}",
"public int[] getAvailableFrequencies() {\n\t\t\tif (mAvailableFrequencies == null) {\n\t\t\t\tList<String> list = ShellHelper.cat(\n\t\t\t\t\tmRoot.getAbsolutePath() + AVAILABLE_FREQUENCIES);\n\t\t\t\tif (list == null || list.isEmpty()) return null;\n\t\t\t\tString[] results = list.get(0).split(\"\\\\s+\");\n\t\t\t\tif (results == null || results.length == 0) {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t\tint len = results.length;\n\t\t\t\tmAvailableFrequencies = new int[len];\n\t\t\t\tfor (int i = 0; i < len; ++i) {\n\t\t\t\t\tint value = 0;\n\t\t\t\t\ttry { value = Integer.valueOf(results[i]); }\n\t\t\t\t\tcatch (NumberFormatException ignored) {}\n\t\t\t\t\tmAvailableFrequencies[i] = value / 1000;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn mAvailableFrequencies;\n\t\t}",
"public double[] getFFTBinFrequencies()\n {\n \tdouble[] FFTBins = new double[frameLength];\n \tdouble interval = samplingRate / frameLength;\n \tfor(int i = 0; i < frameLength; i++)\n \t{\n \t\tFFTBins[i] = interval * i;\n \t}\n \t\n \treturn FFTBins;\n }",
"public int getFrequency() {\n\t\t\treturn mCurFrequency;\n\t\t}",
"public Map<Integer, Float> getPercentInFrequency() {\n\t\t\tMap<Integer, Float> percents = new LinkedHashMap<Integer, Float>();\n\t\t\t\n\t\t\tint[][] times = getTimeInFrequency();\n\t\t\tif (times == null || times.length == 0) return null;\n\t\t\t\n\t\t\tlong total = 0;\n\t\t\t\n\t\t\tfor (int i = 0; i < times.length; ++i) {\n\t\t\t\ttotal += times[i][1];\n\t\t\t}\n\t\t\t\n\t\t\tif (total == 0) return null;\n\t\t\t\n\t\t\tfor (int i = 0; i < times.length; ++i) {\n\t\t\t\tpercents.put(times[i][0], (float) times[i][1] / total * 100);\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\treturn percents;\n\t\t}",
"public double calculateSkyFrequency() {\n return calculateSkyFrequency(0);\n }",
"@ComputerMethod\n private Collection<QIOFrequency> getFrequencies() {\n return FrequencyType.QIO.getManagerWrapper().getPublicManager().getFrequencies();\n }",
"public void setFrequency(Double frequency) {\n this.frequency = frequency;\n }",
"protected static double[] getFrequenciesSafe(List<Sequence> sequences) {\n return getFrequenciesMaybeSafe(sequences, true);\n }",
"public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"void collectLeastFrequent(FrequencyTable fq);",
"public double[] getFrequences(){\r\n\t\tPairList pairs = parseTreeFrequences();\r\n\t\tArrayList<Pair> list = pairs.getList();\r\n\t\tdouble[] ret = new double[list.size()];\r\n\t\tfor(int i = 0; i < list.size(); i++){\r\n\t\t\tret[i] = list.get(i).freq;\r\n\t\t}\r\n\t\treturn ret;\r\n\t}",
"private int findZero(){\r\n\t\t// configure stuff\r\n\t\tint channelConfiguration = AudioFormat.CHANNEL_CONFIGURATION_MONO;\r\n\t\tint audioEncoding = AudioFormat.ENCODING_PCM_16BIT;\r\n\t\tint bufferSize = AudioRecord.getMinBufferSize(FREQUENCY, channelConfiguration, audioEncoding);\r\n\t\tAudioRecord audioRecord = new AudioRecord(MediaRecorder.AudioSource.MIC, FREQUENCY, channelConfiguration,audioEncoding, bufferSize);\r\n\r\n\t\tshort[] buffer = new short[bufferSize];\r\n\t\taudioRecord.startRecording();\r\n\t\tint bufferReadResult = audioRecord.read(buffer, 0, bufferSize);\r\n\t\taudioRecord.stop();\r\n\t\tint sum = 0;\r\n\t\tfor (int b = bufferReadResult * (2/3); b < bufferReadResult; b++) {\r\n\t\t\tsum += buffer[b];\r\n\t\t}\r\n\t\tif (bufferReadResult == 0){\r\n\t\t\treturn this.offset;\r\n\t\t}\r\n\t\t\r\n\t\treturn -1*(sum/bufferReadResult);\r\n\t}",
"@Test\n public void testApplication() {\n assertEquals(440.0, GuitarHeroLite.frequency(24), 0.05);\n }",
"bool setFrequency(double newFrequency);",
"public Integer getFrequency() {\n return this.frequency;\n }",
"public int getFrequencyOf(T aData) {\n\t\t\n\t\tint frequency = 0;\n\n\t\tint counter = 0;\n\t\tNode currentNode = firstNode;\n\t\twhile ((counter < numEntries) && (currentNode != null)) {\n\t\t\tif (aData.equals(currentNode.data)) {\n\t\t\t\tfrequency++;\n\t\t\t} // end if\n\n\t\t\tcounter++;\n\t\t\tcurrentNode = currentNode.next;\n\t\t} // end while\n\n\t\treturn frequency;\n\t}",
"double ComputeFT_F1Score(individual st){\n\t\tdouble sum = 0, ft;\n\t\tint i;\n\t\tdouble[] tm;\n\t\t\n\t\tint tp, tn, fp, fn;\n\n\t\tdouble precision, recall;\n\t\ttp=0;\n\t\ttn=0;\n\t\tfp=0;\n\t\tfn=0;\n\t\t\n\t\ttm=ComputeTest(st.chrom);\n\t\tfor(i = 0; i < NUMFITTEST; i++) {\n\t\t\tft = PVAL(tm[i]);\n\t\t\t\n//\t\t\tSystem.out.println(\"TM[i]:\"+ft);\n\t\t\tif(ft<0) {\t\t\t\t\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\ttn++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tfn++;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif(fittest[i].y<=0) {\n\t\t\t\t\tfp++;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttp++;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\t\n//\t\t\t\n\t\t}\t\n//\t\t\n//\t\tSystem.out.println(\"TP:\"+tp);\n//\t\tSystem.out.println(\"FP:\"+fp);\n//\t\tSystem.out.println(\"FN:\"+fn);\n//\t\tSystem.out.println(\"TN:\"+tn);\n\t\tprecision=tp/(tp+fp);\n\t\trecall=tp/(tp+fn);\n\t\tsum=2*precision*recall/(precision+recall);\n\t\treturn sum;\n\t}",
"boolean hasFrequencyOffset();",
"@Test\n public void findFrequency(){\n\n int[] input = {2,2,4,12,7,2,7,2,7,7};\n List<Integer> expected = new ArrayList<>(Arrays.asList(4,12));\n assertEquals(expected , Computation.findOdd(input));\n }",
"public float getFrequency() { \n \treturn mouseJointDef.frequencyHz; \n }",
"public com.google.protobuf.ByteString\n getFrequencyBytes() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n frequency_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }",
"public jkt.hms.masters.business.MasFrequency getFrequency () {\n\t\treturn frequency;\n\t}",
"@Override\n public long checkFrequencyMillis()\n {\n return TimeUnit.DAYS.toMillis( 1 );\n }",
"public int getFrequency(){\n return this.frequency;\n }",
"public int getFrequency(int height);",
"public static void getOriginalFrequencies(double[] f)\n {\n f[0] = 0.0866;\n f[1] = 0.0440;\n f[2] = 0.0391;\n f[3] = 0.0570;\n f[4] = 0.0193;\n f[5] = 0.0367;\n f[6] = 0.0581;\n f[7] = 0.0833;\n f[8] = 0.0244;\n f[9] = 0.0485;\n f[10] = 0.0862;\n f[11] = 0.0620;\n f[12] = 0.0195;\n f[13] = 0.0384;\n f[14] = 0.0458;\n f[15] = 0.0695;\n f[16] = 0.0610;\n f[17] = 0.0144;\n f[18] = 0.0353;\n f[19] = 0.0709;\n }",
"BigInteger getMax_freq();",
"public void setMeasFrequencyHz(long value) {\r\n this.measFrequencyHz = value;\r\n }",
"public static void main(String[] args) {\n\r\n\t\tint arr[]={2, 3, 2, 4, 5, 12, 2, 3, 3, 3, 12};\r\n\t\tMap<Integer,Data> map = new HashMap<>();\r\n\t\tfor(int a :arr)\r\n\t\t{\r\n\t\t\tif(map.containsKey(a))\r\n\t\t\t{\r\n\t\t\t\tmap.get(a).incrementFrequency();\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tmap.put(a, new Data(a));\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSet<Data> sortedData = new TreeSet<>(map.values());\r\n\t\tList<Integer> result = new ArrayList<>();\r\n\t\tfor(Data d : sortedData)\r\n\t\t{\r\n\t\t\tfor(int i=0;i<d.frequency;i++)\r\n\t\t\t\tresult.add(d.number);\r\n\t\t}\r\n\t\tSystem.out.println(result);\r\n\t}",
"public static void getFreq(){\n\t\t\tint mutTotalcounter=0;\n\t\t\t\n\t\t\tfor(int i=0; i<numOfMutations.length-1; i++){\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]==numOfMutations[i+1]){\n\t\t\t\t\tfrequency[mutTotalcounter]+=1; //if number of mutation is repeated in original array, frequency is incremented\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(numOfMutations[i]!=numOfMutations[i+1])\n\t\t\t\t{\n\t\t\t\t\tmutTotal[mutTotalcounter++]=numOfMutations[i]; //if number is not repeated in array, the next element in array\n\t\t\t\t\t//becomes the next number of mutations that occurred\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif((i+1)==numOfMutations.length-1){\n\t\t\t\t\t//used to get the last element in original array since for loop will go out of bounds\n\t\t\t\t\tmutTotal[mutTotalcounter]=numOfMutations[i+1];\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tSystem.out.println(\"XMut : YFreq\");\n\t\t\t//console display of mutation and frequency values\n\t\t\tfor (int i=0; i<=mutTotal.length-1;i++){\n\t\t\t\tif(mutTotal[i]==0 && frequency[i]==0) continue;\n\t\t\t\tfrequency[i]+=1;\n\t\t\t\tSystem.out.print(mutTotal[i]+\" : \");\n\t\t\t\tSystem.out.print(frequency[i]);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t}",
"@Override\n\t public float sloppyFreq(int distance) {\n\t //return 1.0f / (distance + 1);\n\t\t return 1.0f;\n\t }",
"public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (ref instanceof java.lang.String) {\n return (java.lang.String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n }\n }",
"public void initPeriodsSearch() {\n\n\t\t//init fundamentalFreq\n\t\tcalculatefundamentalFreq();\n\n\t\t//set the first search area\n\t\tfinal double confidenceLevel = 5 / 100.;\n\t\tnextPeriodSearchingAreaEnd = (int) Math.floor( hzToPeriod( fundamentalFreq ) * ( 1 + confidenceLevel ) );\n\t}",
"public void setFrequency(java.lang.Integer value) {\n this.frequency = value;\n }",
"public void setFund() {\n\t\t// catching a NullPointer because I'm not sure why it happens and fear a crash during a concert.\n\t\ttry\n\t\t{\n\t\t\t// TODO: maybe this won't be necessary once the threads are implemented.\n\t\t\tif(!this.pause)\n\t\t\t{\n\t\t\t\tfor (int i = 0; i < this.adjustedNumInputs; i++)\n\t\t\t\t{\n\t\t\t\t\t// println(\"setFund(); this.frequencyArray[i] = \" + this.frequencyArray[i].getFeatures());\n\t\n\t\t\t\t\t// want to assign the value of .getFeatures() to a variable and check for null,\n\t\t\t\t\t// but can't, b/c it returns a float. :/ (So that must not be exactly the problem.)\n\t\t\t\t\tif (this.frequencyArray[i].getFeatures() != null) {\n\t\t\t\t\t\t// println(\"i = \" + i);\n\t\t\t\t\t\t// println(\"setFund(); this.fundamentalArray[i] = \" + this.fundamentalArray[i] + \"this.frequencyArray[i].getFeatures() = \" + this.frequencyArray[i].getFeatures());\n\t\t\t\t\t\tthis.fundamentalArray[i] = this.frequencyArray[i].getFeatures();\n\t\t\t\t\t\tthis.amplitudeArray[i]\t= this.frequencyArray[i].getAmplitude(); // * 100;\n\t\n\t\t\t\t\t\t// ignores pitches with amplitude lower than \"sensitivity\":\n\t\t\t\t\t\tif (this.frequencyArray[i].getAmplitude() > this.sensitivity) {\n\t\t\t\t\t\t\tthis.adjustedFundArray[i] = this.fundamentalArray[i];\n\t\t\t\t\t\t} // if: amp > sensitivity\n\t\t\t\t\t} // if: features() != null\n\t\t\t\t} // if: > numInputs\n\t\t\t}\n\t\t} catch(NullPointerException npe) {}\n\t}",
"private void initializeAlleleFrequencies(int numSamples) {\n frequencyEstimationPoints = Math.max(MIN_ESTIMATION_POINTS, 2 * numSamples) + 1;\n \n // set up the allele frequency priors\n log10AlleleFrequencyPriors = getNullAlleleFrequencyPriors(frequencyEstimationPoints);\n }",
"public java.lang.String getFrequency() {\n java.lang.Object ref = frequency_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n frequency_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }",
"public static double pitchToFrequency(double pitch) {\n return mConcertAFrequency * Math.pow(2.0, ((pitch - CONCERT_A_PITCH) * (1.0 / 12.0)));\n }",
"public static double[] makeFreqArray( double timestep, int arraylen) {\r\n if ((arraylen == 0) || (Math.abs(timestep - 0.0) < OPS_EPSILON)) {\r\n return new double[0];\r\n }\r\n int halflen = arraylen / 2;\r\n double freqstep = 1.0 / (arraylen * timestep);\r\n double[] freq = new double[halflen];\r\n for (int i = 0; i < halflen; i++) {\r\n freq[i] = (i+1) * freqstep;\r\n }\r\n return freq;\r\n }",
"public void setFrequency(String frequency)\n {\n this.frequency = frequency;\n }",
"public float getPercentInFrequency(int frequency) {\n\t\t\tMap<Integer, Float> percents = getPercentInFrequency();\n\t\t\tif (percents == null || percents.size() == 0) return 0;\n\n\t\t\tfor (int f : percents.keySet()) {\n\t\t\t\tif (f == frequency) return percents.get(f);\n\t\t\t}\n\t\t\treturn 0;\n\t\t}",
"public double getCentreFrequency(int subsystem) {\n return _avTable.getDouble(ATTR_CENTRE_FREQUENCY, subsystem, 0.0);\n }",
"@Override\r\n\t\t\tpublic long getDocumentFrequency(String term) {\n\t\t\t\treturn 0;\r\n\t\t\t}",
"private void parseAvailableFrequencies(){\n\t\tString str = parser.readFile(FREQ_AVAILABLE, 256);\n\t\tif(str == null)\n\t\t\treturn;\n\t\t\n\t\tString[] frestrs = str.split(\" \");\n\t\tint[] freqs = new int[frestrs.length - 1];\n\t\tfor(int i = 0; i < freqs.length; i++)\n\t\t\tfreqs[i] = Integer.valueOf(frestrs[i]);\n\t\t\n\t\tcpuFrequencies = freqs;\n\t}",
"@Override\n public long getFrequencyCount() {\n return count;\n }",
"public float getFreqX() {\n return freqX;\n }",
"public edu.pa.Rat.Builder clearFrequency() {\n fieldSetFlags()[1] = false;\n return this;\n }",
"bool setFrequency(double newFrequency)\n {\n if (newFrequency > 534 && newFrequency < 1606)\n {\n frequency = newFrequency\n return true;\n }\n return false;\n }",
"private static long getClockFrequency(String target) throws IOException, InterruptedException {\n return pi4jSystemInfoConnector.getClockFrequency(target);\r\n }",
"private double habitStrength(Double spFrequency, double totalFrequency) {\n\t\treturn totalFrequency ==0 ? 1:spFrequency/totalFrequency;\n\t}"
]
| [
"0.7413342",
"0.74126804",
"0.72742265",
"0.6881332",
"0.68776643",
"0.6829389",
"0.6795932",
"0.6787255",
"0.67229366",
"0.6671921",
"0.6604716",
"0.6564024",
"0.6516471",
"0.64079785",
"0.6392684",
"0.63315606",
"0.62483597",
"0.6133605",
"0.61246926",
"0.611679",
"0.6101598",
"0.6093748",
"0.60783064",
"0.6069165",
"0.60554045",
"0.60461766",
"0.60452235",
"0.60213596",
"0.60125583",
"0.5993811",
"0.59891987",
"0.5988338",
"0.5981601",
"0.5960821",
"0.5959694",
"0.59465027",
"0.59353614",
"0.5927822",
"0.5926812",
"0.59051555",
"0.5904009",
"0.58870703",
"0.58767575",
"0.58719814",
"0.58715457",
"0.5869086",
"0.584282",
"0.582689",
"0.5826029",
"0.5808863",
"0.5791565",
"0.57899666",
"0.5763873",
"0.57571816",
"0.57537264",
"0.57492083",
"0.5733581",
"0.572547",
"0.57110757",
"0.57014847",
"0.5700749",
"0.5689491",
"0.566868",
"0.5662249",
"0.5658217",
"0.5646992",
"0.5632449",
"0.56279194",
"0.5616212",
"0.56161594",
"0.56154096",
"0.5608767",
"0.56059414",
"0.5596327",
"0.55854315",
"0.5557379",
"0.5555138",
"0.55357325",
"0.5526755",
"0.5514203",
"0.54963857",
"0.54861236",
"0.5475423",
"0.5467957",
"0.54663193",
"0.54593617",
"0.5444878",
"0.54348594",
"0.542175",
"0.54152465",
"0.54143876",
"0.5414002",
"0.5412624",
"0.54069525",
"0.5385871",
"0.5383005",
"0.5376044",
"0.53644234",
"0.5363244",
"0.53554165"
]
| 0.8117217 | 0 |
The method calculating the pitch periods | public List<Float> calculatePitches(){
List<Integer> res = new ArrayList<Integer>();
int size = data.size();
int maxAmp = 0;
int startPos = 0;
// get the first pitch in the basic period
for (int i = 0; i < BASE_FRAGMENT; i ++){
if (maxAmp < data.get(i)){
maxAmp = data.get(i);
// set this position as the start position
startPos = i;
}
}
Log.v("startPos", String.valueOf(startPos));
// find every pitch in all the fragments
int pos = startPos + OFFSET; // set current position
int posAmpMax;
while(startPos < 1000){
if(data.get(pos) > 0) { // only read the positive data
posAmpMax = 0;
maxAmp = 0;
// access to all the data in this fragment
while (pos < startPos + BASE_FRAGMENT) {
// find the pitch and mark this position
if (maxAmp < data.get(pos)) {
maxAmp = data.get(pos);
posAmpMax = pos;
}
pos++;
}
// add pitch position into the list
pitchPositions.add(posAmpMax);
res.add(posAmpMax);
// update the start position and the current position
startPos = posAmpMax;
pos = startPos + OFFSET;
}else{
pos ++;
}
}
// calculate all periods and add them into list
for(int i = 0; i < pitchPositions.size() - 1; i++){
float period = (float)(pitchPositions.get(i+1) - pitchPositions.get(i));
T.add(period);
pitches.add(PeriodToPitch(period));
}
pitchPositions.clear();
return pitches;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void analyzePitch(java.util.List<Double> samples) {\n \r\n if(samples.isEmpty()) return;\r\n if(samples.size()<=SAMPLE_RATE*MIN_SAMPLE_LENGTH_MS/1000) {\r\n //System.err.println(\"samples too short: \"+samples.size());\r\n return;\r\n }\r\n final Sound pitchSound=Sound.Sound_createSimple(\r\n 1, (double)samples.size() / SAMPLE_RATE, SAMPLE_RATE);\r\n for(int i=1; i < pitchSound.z[1].length; i++) {\r\n pitchSound.z[1][i]=samples.get(i - 1);\r\n }\r\n \r\n final SoundEditor editor=SoundEditor.SoundEditor_create(\"\", pitchSound);\r\n editor.pitch.floor=settings.floor;\r\n editor.pitch.ceiling=settings.ceiling;\r\n //editor.pitch.veryAccurate=1;\r\n \r\n if(DEBUG) System.err.print(\"analyzing \"+samples.size()+\" samples(\"\r\n +editor.pitch.floor+\"-\"+editor.pitch.ceiling+\")...\");\r\n final long start=System.nanoTime();\r\n try {\r\n editor.computePitch();\r\n } catch(Exception e) {\r\n e.printStackTrace();\r\n return;\r\n }\r\n if(DEBUG) System.err.println(\"complete in \"+(System.nanoTime()-start)/1000000.0+\"ms.\");\r\n \r\n \r\n //[ compute average pitch\r\n final java.util.List<Double> pitches=editor.getPitchesInFrequency();\r\n \r\n// diagram.clearData();\r\n// for(double s: pitches) {\r\n// diagram.addData((float)s); \r\n// }\r\n// diagram.setMaximum(500);\r\n// diagram.repaint();\r\n// \r\n double freqSum=0;\r\n int pitchCount=0;\r\n for(double p : pitches) {\r\n if(Double.isNaN(p) || p<=0) continue;\r\n freqSum+=p;\r\n pitchCount++;\r\n }\r\n final double averageFreq=freqSum/pitchCount; \r\n if(Double.isNaN(averageFreq)) {\r\n if(DEBUG) System.err.println(\"can't recognize.\");\r\n return;\r\n }\r\n//System.err.println(averageFreq); \r\n \r\n //[ compute length\r\n final double lengthMs=samples.size()*1000.0/SAMPLE_RATE;\r\n \r\n SwingUtilities.invokeLater(new Runnable() { //>>> not good\r\n public void run() {\r\n for(PitchListener lis: freqListener) {\r\n lis.gotPitch(averageFreq, lengthMs); //notify listeners\r\n }\r\n }\r\n });\r\n \r\n//System.err.println(\"add \"+ DumpReceiver.getKeyName((int) averagePitch));\r\n }",
"double getPeriod();",
"int getPeriod();",
"double getPitch();",
"@Override\n\tpublic void handlePitch(PitchDetectionResult pitchDetectionResult, AudioEvent audioEvent) {\n\t\tif(pitchDetectionResult.getPitch() != -1){\n\t\t\tdouble timeStamp = audioEvent.getTimeStamp();\n\t\t\tfloat pitch = pitchDetectionResult.getPitch();\n\t\t\tpitch *= 2; // Because of bit of file\n\t\t\tfloat probability = pitchDetectionResult.getProbability();\n\t\t\tdouble rms = audioEvent.getRMS() * 100;\n\t\t\tint pMinute = (int) (timeStamp/60);\n\t\t\tint pSecond = (int) (timeStamp%60);\n\t\t\tint intvNum = -1;\n\t\t\tString tInterval = new String();\n \n\t\t\tif(pitch >= 127.142 && pitch < 134.702) {\n\t\t\t\ttInterval = \"C3\";\n\t\t\t\tintvNum = 1;\n\t\t\t}\n\t\t\telse if(pitch >= 134.702 && pitch < 142.712) {\n\t\t\t\ttInterval = \"C3#\";\n\t\t\t\tintvNum = 2;\n\t\t\t}\n\t\t\telse if(pitch >= 142.712 && pitch < 151.198) {\n\t\t\t\ttInterval = \"D3\";\n\t\t\t\tintvNum=3;\n\t\t\t}\n\t\t\telse if(pitch >= 151.198 && pitch < 160.189) {\n\t\t\t\ttInterval = \"D3#\";\n\t\t\t\tintvNum=4;\n\t\t\t}\n\t\t\telse if(pitch >= 160.189 && pitch < 169.714) {\n\t\t\t\ttInterval = \"E3\";\n\t\t\t\tintvNum=5;\n\t\t\t}\n\t\t\telse if(pitch >= 169.714 && pitch < 179.806) {\n\t\t\t\ttInterval = \"F3\";\n\t\t\t\tintvNum=6;\n\t\t\t}\n\t\t\telse if(pitch >= 179.806 && pitch < 190.497) {\n\t\t\t\ttInterval = \"F3#\";\n\t\t\t\tintvNum=7;\n\t\t\t}\n\t\t\telse if(pitch >= 190.497 && pitch < 201.825) {\n\t\t\t\ttInterval = \"G3\";\n\t\t\t\tintvNum=8;\n\t\t\t}\n\t\t\telse if(pitch >= 201.825 && pitch < 213.826) {\n\t\t\t\ttInterval = \"G3#\";\n\t\t\t\tintvNum=9;\n\t\t\t}\n\t\t\telse if(pitch >= 213.826 && pitch < 226.541) {\n\t\t\t\ttInterval = \"A3\";\n\t\t\t\tintvNum=10;\n\t\t\t}\n\t\t\telse if(pitch >= 226.541 && pitch < 240.012) {\n\t\t\t\ttInterval = \"A3#\";\n\t\t\t\tintvNum=11;\n\t\t\t}\n\t\t\telse if(pitch >= 240.012 && pitch < 254.284) {\n\t\t\t\ttInterval = \"B3\";\n\t\t\t\tintvNum=12;\n\t\t\t}\n\t\t\telse if(pitch >= 254.284 && pitch < 269.404) {\n\t\t\t\ttInterval = \"C4\";\n\t\t\t\tintvNum=13;\n\t\t\t}\n\t\t\telse if(pitch >= 269.404 && pitch < 287.924) {\n\t\t\t\ttInterval = \"C4#\";\n\t\t\t\tintvNum=14;\n\t\t\t}\n\t\t\telse if(pitch >= 287.294 && pitch < 302.396) {\n\t\t\t\ttInterval = \"D4\";\n\t\t\t\tintvNum=15;\n\t\t\t}\n\t\t\telse if(pitch >= 302.396 && pitch < 320.377) {\n\t\t\t\ttInterval = \"D4#\";\n\t\t\t\tintvNum=16;\n\t\t\t}\n\t\t\telse if(pitch >= 320.377 && pitch < 339.428) {\n\t\t\t\ttInterval = \"E4\";\n\t\t\t\tintvNum=17;\n\t\t\t}\n\t\t\telse if(pitch >= 339.428 && pitch < 359.611) {\n\t\t\t\ttInterval = \"F4\";\n\t\t\t\tintvNum=18;\n\t\t\t}\n\t\t\telse if(pitch >= 359.611 && pitch < 380.995) {\n\t\t\t\ttInterval = \"F4#\";\n\t\t\t\tintvNum=19;\n\t\t\t}\n\t\t\telse if(pitch >= 380.995 && pitch < 403.65) {\n\t\t\t\ttInterval = \"G4\";\n\t\t\t\tintvNum=20;\n\t\t\t}\n\t\t\telse if(pitch >= 403.65 && pitch < 427.652) {\n\t\t\t\ttInterval = \"G4#\";\n\t\t\t\tintvNum=21;\n\t\t\t}\n\t\t\telse if(pitch >= 427.652 && pitch < 453.082) {\n\t\t\t\ttInterval = \"A4\";\n\t\t\t\tintvNum=22;\n\t\t\t}\n\t\t\telse if(pitch >= 453.082 && pitch < 480.234) {\n\t\t\t\ttInterval = \"A4#\";\n\t\t\t\tintvNum=23;\n\t\t\t}\n\t\t\telse if(pitch >= 480.234 && pitch < 508.567) {\n\t\t\t\ttInterval = \"B4\";\n\t\t\t\tintvNum=24;\n\t\t\t}\n\t\t\telse if(pitch >= 508.567 && pitch < 538.808) {\n\t\t\t\ttInterval = \"C5\";\n\t\t\t\tintvNum=25;\n\t\t\t}\n\t\t\telse if(pitch >= 538.808 && pitch < 570.847) {\n\t\t\t\ttInterval = \"C5#\";\n\t\t\t\tintvNum=26;\n\t\t\t}\n\t\t\telse if(pitch >= 570.847 && pitch < 604.792) {\n\t\t\t\ttInterval = \"D5\";\n\t\t\t\tintvNum=27;\n\t\t\t}\n\t\t\telse if(pitch >= 604.792 && pitch < 640.755) {\n\t\t\t\ttInterval = \"D5#\";\n\t\t\t\tintvNum=28;\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttInterval = \"null\";\n\t\t\t\tintvNum=-1;\n\t\t\t}\n \t\n\t\t\t\n\t\t\t//Converting Ended\n\t\t\tif(pitch < 8000 && probability > 0.85) {\n\t\t\t\tString message = String.format(\"Pitch detected at %d 분 %d초, %.2f: %.2fHz ( %.2f probability, RMS: %.5f ) %s\", \n\t\t\t\t\t\tpMinute, pSecond, timeStamp, pitch,probability,rms,tInterval);\n\t\t\t\t// System.out.println(message);\n\t\t\t\tif(tried == 0) {\n\t\t\t\t\tCalculateScore.startTime.add(timeStamp);\n\t\t\t\t\tCalculateScore.endTime.add(timeStamp);\n\t\t\t\t\tCalculateScore.subInterval1.add(intvNum);\n\t\t\t\t\tCalculateScore.subInterval2.add(intvNum);\n\t\t\t\t\tCalculateScore.realInterval.add(null);\n\t\t\t\t\ttried++;\n\t\t\t\t}\n\t\t\t\telse if(((CalculateScore.subInterval1.get(idx)) - intvNum) == 0 || Math.abs(((CalculateScore.subInterval1.get(idx)) - intvNum)) == 1) {\n\t\t\t\t\tCalculateScore.endTime.set(idx, timeStamp);\n\t\t\t\t\tCalculateScore.subInterval2.set(idx, intvNum);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tCalculateScore.endTime.set(idx, timeStamp);\n\t\t\t\t\tCalculateScore.startTime.add(timeStamp);\n\t\t\t\t\tCalculateScore.endTime.add(timeStamp);\n\t\t\t\t\tCalculateScore.subInterval1.add(intvNum);\n\t\t\t\t\tCalculateScore.subInterval2.add(intvNum);\n\t\t\t\t\tCalculateScore.realInterval.add(null);\n\t\t\t\t\tidx++;\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\t}",
"long getSamplePeriod();",
"public void searchPitchPositions() {\n\n\t\tfor(float pitch : pitches)\n\t\t\tperiods.add((int) hzToPeriod(pitch));\n\n\t\tint periodMaxPitch;\n\t\tint periodMaxPitchIndex = 0;\n\t\tint periodBeginning = 0;\n\n\t\t//search each periods maxima\n\t\tfor ( int period = 0; period < periods.size() - 1; period++ ) {\n\t\t\tperiodMaxPitch = 0;\n\n\t\t\t//search a maximum\n\t\t\tfor ( int i = periodBeginning; i < periodBeginning + periods.get( period ); i++ ) {\n\t\t\t\tif(i < data.size()){\n\t\t\t\t\tif ( periodMaxPitch < data.get( i ) ) {\n\t\t\t\t\t\tperiodMaxPitch = data.get( i );\n\t\t\t\t\t\tperiodMaxPitchIndex = i;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tperiodBeginning += periods.get( period );\n\t\t\tpitchPositions.add( periodMaxPitchIndex );\n\t\t}\n\n\t}",
"double getCalibrationPeriod();",
"float getPitch();",
"float getPitch();",
"public double period()\n\t{\n\t\tdouble n = meanMotion();\n\t\tdouble period = 2.0 * Constants.pi / n;\n\t\treturn period;\n\t}",
"protected int getNumberOfPeriods()\n {\n return 2;\n }",
"double getSignalPeriod();",
"public float getPitchRange() {\n\treturn range;\n }",
"private float hzToPeriod(float hz ) {\n\t\tint sampling = 44100;\n\t\treturn sampling / hz;\n\t}",
"public int getPeriod()\r\n\t{\r\n\t\treturn period;\r\n\t}",
"public float getPitchAngle() { return PitchAngle; }",
"public int getPeriod() {\n return period;\n }",
"public int getHowManyInPeriod();",
"int getPulsePercentage();",
"public long getSamplingPeriod();",
"BigInteger getPeriod();",
"public float getPitch() {\n\treturn pitch;\n }",
"public static ArrayList<PitchCandidate> harmonicChecks(ArrayList<PitchCandidate> pitch_candidates, MelodicNote CF_note, Integer previous_cf_pitch,\n Integer previous_melody_pitch, MelodicNote fragment_note, int canon_transpose_interval ){\n Boolean large_dissonance_bad = InputParameters.large_dissonance_bad;\n Integer [] consonances = InputParameters.consonances;\n Integer [] perfect_consonances = InputParameters.perfect_consonances;\n Integer [] root_consonances = InputParameters.root_consonances;\n \n\n for (PitchCandidate myPC : pitch_candidates){\n\t\t\n Integer cand_pitch = myPC.getPitch() + canon_transpose_interval;\n Integer cf_pitch = CF_note.getPitch();\n boolean CF_accent = CF_note.getAccent();\n boolean use_CF_accent = false;\n if (CF_note.getRest()) cf_pitch = previous_cf_pitch;\n Integer cand_prev_pitch = previous_melody_pitch + canon_transpose_interval;\n //if(previous_melody_pitch == 9999) cand_prev_pitch = cand_pitch;// 9999 means the CP is held over to multiple cfs\n Integer melody_motion_to_cand = cand_pitch - cand_prev_pitch;\n int this_interval = abs(cand_pitch - cf_pitch)%12;\n int this_inv_interval = abs(cf_pitch - cand_pitch)%12;\n Integer melodic_motion_to_ = cf_pitch - previous_cf_pitch;\n Integer previous_interval = abs(cand_prev_pitch - previous_cf_pitch)%12;\n Integer previous_inv_interval = abs(previous_cf_pitch - cand_prev_pitch)%12;\n Double cp_start_time = fragment_note.getStartTime();\n Double cf_start_time = CF_note.getStartTime();\n Boolean directm = false;\n boolean this_interval_consonant = false;\n boolean this_inv_interval_consonant = false;\n boolean cand_prev_cf_diss = true;\n boolean inv_cand_prev_cf_diss = true;\n boolean previous_interval_consonant = false;\n boolean previous_inv_interval_consonant = false;\n \n //System.out.println(\"evaluating pitch candidate \" + cand_pitch + \" against \" + cf_pitch);\n //is this interval consonant\n for (Integer consonance : consonances) {\n if (this_interval == consonance){\n this_interval_consonant = true; \n break;\n }\n }\n for (Integer consonance : consonances) {\n if (this_inv_interval == consonance){\n this_inv_interval_consonant = true; \n break;\n }\n }\n\t \t\n \n if(this_interval_consonant && this_inv_interval_consonant) {\n //System.out.println(cand_pitch + \" against \" + cf_pitch + \"is consonant\");\n if (this_interval ==0) {//decrement if an octave\n myPC.decrementRank(Decrements.octave);\n }\n }\n \n else {\n //System.out.println(cand_pitch + \" against \" + cf_pitch + \"is dissonant\");\n myPC.decrementRank(Decrements.dissonance);\n\t\t//decrement if a minor 9th\n if (this_interval == 1 && (abs(cand_pitch - cf_pitch)<14 || large_dissonance_bad)){\n myPC.decrementRank(Decrements.minor_9th);\n myPC.set_minor_9th();\n }\n if (this_inv_interval == 1 && (abs(cf_pitch - cand_pitch)<14 || large_dissonance_bad)){\n myPC.decrementRank(Decrements.minor_9th);\n myPC.set_minor_9th();\n }\n //decrement accented dissonance\n if (CF_note.getStartTime() > fragment_note.getStartTime())\n use_CF_accent = true;\n \n if (!use_CF_accent) {\n if (fragment_note.getAccent() && (abs(cand_pitch - cf_pitch)<36 || large_dissonance_bad)) {\n //System.out.println(\"caught accented dissoance\");\n myPC.decrementRank(Decrements.accented_dissonance);\n myPC.set_accent_diss();\n }\n if (fragment_note.getAccent() && (abs(cf_pitch - cand_pitch)<36 || large_dissonance_bad)) {\n //System.out.println(\"caught accented dissoance\");\n myPC.decrementRank(Decrements.accented_dissonance);\n myPC.set_accent_diss();\n } \n }\n else {\n if (CF_note.getAccent() && (abs(cand_pitch - cf_pitch)<36 || large_dissonance_bad)) {\n System.out.println(\"caught accented dissonance between cand pitch \" + cand_pitch + \" and cf_pitch \" + cf_pitch);\n myPC.decrementRank(Decrements.accented_dissonance);\n myPC.set_accent_diss();\n }\n if (CF_note.getAccent() && (abs(cf_pitch - cand_pitch)<36 || large_dissonance_bad)) {\n System.out.println(\"caught accented dissonance between cand pitch \" + cand_pitch + \" and cf_pitch \" + cf_pitch);\n myPC.decrementRank(Decrements.accented_dissonance);\n myPC.set_accent_diss();\n }\n }\n\n }\n \n\t //check for pitch candidate dissonance against previous cantus firmus\n for (Integer consonance : consonances) {\n if (abs(cand_pitch - previous_cf_pitch)%12 == consonance) {\n\t\t cand_prev_cf_diss = false; \n }\n }\n for (Integer consonance : consonances) {\n if (abs(previous_cf_pitch - cand_pitch)%12 == consonance) {\n inv_cand_prev_cf_diss = false; \n }\n } \n if (cand_prev_cf_diss ||inv_cand_prev_cf_diss) {\n\t\tmyPC.decrementRank(Decrements.diss_cp_previous_cf);\n }\n\t\t\t\n //compute whether previous_interval consonant\n for (Integer consonance : consonances) {\n if (previous_interval == consonance) previous_interval_consonant = true;\n\t\tbreak;\n }\n for (Integer consonance : consonances) {\n if (previous_inv_interval == consonance) previous_inv_interval_consonant = true;\n\t\tbreak;\n }\n\t\t\t\n\t //check for same type of consonance\n if (previous_interval_consonant && (previous_interval == this_interval) ){\n\t\tmyPC.decrementRank(Decrements.seq_same_type_cons);\n }\n if (previous_inv_interval_consonant && (previous_inv_interval == this_inv_interval) ){\n\t\tmyPC.decrementRank(Decrements.seq_same_type_cons);\n } \n\t\t\t\n\t //check for sequence of dissonances\n if(!previous_interval_consonant && !this_interval_consonant) {\n\t\tmyPC.decrementRank(Decrements.seq_of_diss);\n\t\tif(this_interval == previous_interval ){\n myPC.decrementRank(Decrements.seq_same_type_diss);\n\t\t}\n }\n if(!previous_inv_interval_consonant && !this_inv_interval_consonant) {\n\t\tmyPC.decrementRank(Decrements.seq_of_diss);\n\t\tif(this_inv_interval == previous_inv_interval ){\n myPC.decrementRank(Decrements.seq_same_type_diss);\n\t\t}\n } \n\t\n //check for too long a sequence of same interval\n if (previous_interval == this_interval) {\n same_consonant_count++;\n if (same_consonant_count > same_consonant_threshold) {\n myPC.decrementRank(Decrements.seq_of_same_cons);\n } \n }\n\t else {\n\t\tsame_consonant_count =0;\n\t }\n if (previous_inv_interval == this_inv_interval) {\n same_inv_consonant_count++;\n if (same_inv_consonant_count > same_consonant_threshold) {\n myPC.decrementRank(Decrements.seq_of_same_cons);\n } \n }\n\t else {\n\t\tsame_inv_consonant_count =0;\n\t }\n\n\t\t\t\n\t //if CF starts before CP \n if (cp_start_time > cf_start_time){\n\t //the following checks rely on knowing motion to pitch candidate from previous pitch\n\t //check for a bad approach to a dissonance from a consonance\n\t //ie CP pitch approached by greater than a step\n if (previous_interval_consonant){\n if ((!this_interval_consonant || !this_inv_interval_consonant) && abs(melody_motion_to_cand) >2) {\n myPC.decrementRank(Decrements.bad_diss_approach_from_cons);\n } \n }\n //check for a bad approach to consonance from dissonance\n else if (this_interval_consonant || this_inv_interval_consonant){\n if (abs(melody_motion_to_cand) >2){\n myPC.decrementRank(Decrements.bad_cons_approach_from_diss);\n } \n }\n //check for bad approach to dissonance from dissonance\n else { //implies both this interval and previous are dissonant\n if (abs(melody_motion_to_cand) > 4){\n myPC.decrementRank(Decrements.bad_diss_approach_from_diss);\n } \n }\n }\n // If CP starts before CF\n else if (cp_start_time < cf_start_time) {\n\t\t// the following checks rely on knowing motion to CF pitch from previous CF pitch\n\t\t//check for bad motion into consonance from dissonance\n if (!previous_interval_consonant) {//ie Previous_Interval is dissonant\n if (this_interval_consonant || this_inv_interval_consonant) {\n if (abs(melodic_motion_to_) > 2) {\n myPC.decrementRank(Decrements.bad_cons_approach_from_diss);\n\t\t\t}\n }\n\t\t //check for bad motion into dissonance from dissonance\n else {\n if (abs(melodic_motion_to_) > 4){\n\t\t\t myPC.decrementRank(Decrements.bad_diss_approach_from_diss); \n }\n } \n }\n }\n\t // If CP and CF start at the same time\n else {\n //Check for parallel perfect consonances\n\t\tif((melody_motion_to_cand > 0 && melodic_motion_to_ >0) || (melody_motion_to_cand < 0 && melodic_motion_to_ <0) )\n\t\t directm = true;\n if (this_interval_consonant) {\n if (previous_interval_consonant)\t{\n if (this_interval == previous_interval ){\n myPC.decrementRank(Decrements.seq_same_type_cons);\n if (directm) {\n myPC.decrementRank(Decrements.parallel_perf_consonance);\n } \n }\n else {\n //check for direct motion into a perfect consonance\n if (directm ) {\n myPC.decrementRank(Decrements.direct_motion_perf_cons);\n }\n }\n }\n }\n if (this_inv_interval_consonant) {\n if (previous_inv_interval_consonant)\t{\n if (this_inv_interval == previous_inv_interval ){\n myPC.decrementRank(Decrements.seq_same_type_cons);\n if (directm) {\n myPC.decrementRank(Decrements.parallel_perf_consonance);\n } \n }\n else {\n //check for direct motion into a perfect consonance\n if (directm ) {\n myPC.decrementRank(Decrements.direct_motion_perf_cons);\n }\n }\n }\n } \n\t\t//check for motion into a dissonance\n else { //this interval is dissonant\n myPC.decrementRank(Decrements.motion_into_diss_both_voices_change);\n\t\t if (directm ) {\n\t\t\tmyPC.decrementRank(Decrements.direct_motion_into_diss);\n }\n }\n\n }\n } \n\treturn pitch_candidates;\n }",
"@Override\n public double getPitch()\n {\n Vector3d modelIntersect = getModelIntersection();\n if (modelIntersect == null)\n {\n return 0;\n }\n modelIntersect = modelIntersect.getNormalized();\n Vector3d projectedIntersect = Plane.unitProjection(myPosition.getDir().multiply(-1), modelIntersect).getNormalized();\n // Now calculate angle between vectors (and keep sign)\n Vector3d orthogonal = myPosition.getRight().multiply(-1);\n Vector3d cross = modelIntersect.cross(projectedIntersect);\n double dot = modelIntersect.dot(projectedIntersect);\n double resultAngle = Math.atan2(orthogonal.dot(cross), dot);\n double ninetyDegrees = Math.toRadians(90);\n return Math.signum(resultAngle) < 0 ? -1 * (ninetyDegrees - Math.abs(resultAngle)) : ninetyDegrees - resultAngle;\n }",
"public double getPeriod() {\n return period;\n }",
"public final flipsParser.pitch_return pitch() throws RecognitionException {\n flipsParser.pitch_return retval = new flipsParser.pitch_return();\n retval.start = input.LT(1);\n\n CommonTree root_0 = null;\n\n Token string_literal150=null;\n Token string_literal151=null;\n Token To152=null;\n Token string_literal154=null;\n Token string_literal155=null;\n Token With157=null;\n Token string_literal158=null;\n Token string_literal159=null;\n Token string_literal160=null;\n Token string_literal161=null;\n flipsParser.angularValueWithRate_return angularValueWithRate153 = null;\n\n flipsParser.angularValueWithRate_return angularValueWithRate156 = null;\n\n flipsParser.angularValueWithRate_return angularValueWithRate162 = null;\n\n\n CommonTree string_literal150_tree=null;\n CommonTree string_literal151_tree=null;\n CommonTree To152_tree=null;\n CommonTree string_literal154_tree=null;\n CommonTree string_literal155_tree=null;\n CommonTree With157_tree=null;\n CommonTree string_literal158_tree=null;\n CommonTree string_literal159_tree=null;\n CommonTree string_literal160_tree=null;\n CommonTree string_literal161_tree=null;\n RewriteRuleTokenStream stream_152=new RewriteRuleTokenStream(adaptor,\"token 152\");\n RewriteRuleTokenStream stream_153=new RewriteRuleTokenStream(adaptor,\"token 153\");\n RewriteRuleTokenStream stream_150=new RewriteRuleTokenStream(adaptor,\"token 150\");\n RewriteRuleTokenStream stream_151=new RewriteRuleTokenStream(adaptor,\"token 151\");\n RewriteRuleTokenStream stream_149=new RewriteRuleTokenStream(adaptor,\"token 149\");\n RewriteRuleTokenStream stream_To=new RewriteRuleTokenStream(adaptor,\"token To\");\n RewriteRuleTokenStream stream_With=new RewriteRuleTokenStream(adaptor,\"token With\");\n RewriteRuleTokenStream stream_154=new RewriteRuleTokenStream(adaptor,\"token 154\");\n RewriteRuleSubtreeStream stream_angularValueWithRate=new RewriteRuleSubtreeStream(adaptor,\"rule angularValueWithRate\");\n try {\n // flips.g:314:2: ( ( 'pit' | 'pitch' ) To angularValueWithRate -> ^( PITCH FIXED angularValueWithRate ) | ( 'pit' | 'pitch' ) angularValueWithRate -> ^( PITCH RELATIVE angularValueWithRate ) | ( With 'an' )? ( 'aoa' | 'angle of attack' ) ( 'of' )? angularValueWithRate -> ^( PITCH FIXED angularValueWithRate ) )\n int alt62=3;\n switch ( input.LA(1) ) {\n case 149:\n {\n int LA62_1 = input.LA(2);\n\n if ( (LA62_1==At||(LA62_1>=FloatingPointLiteral && LA62_1<=HexLiteral)||(LA62_1>=340 && LA62_1<=341)) ) {\n alt62=2;\n }\n else if ( (LA62_1==To) ) {\n alt62=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 62, 1, input);\n\n throw nvae;\n }\n }\n break;\n case 150:\n {\n int LA62_2 = input.LA(2);\n\n if ( (LA62_2==At||(LA62_2>=FloatingPointLiteral && LA62_2<=HexLiteral)||(LA62_2>=340 && LA62_2<=341)) ) {\n alt62=2;\n }\n else if ( (LA62_2==To) ) {\n alt62=1;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 62, 2, input);\n\n throw nvae;\n }\n }\n break;\n case With:\n case 152:\n case 153:\n {\n alt62=3;\n }\n break;\n default:\n NoViableAltException nvae =\n new NoViableAltException(\"\", 62, 0, input);\n\n throw nvae;\n }\n\n switch (alt62) {\n case 1 :\n // flips.g:314:4: ( 'pit' | 'pitch' ) To angularValueWithRate\n {\n // flips.g:314:4: ( 'pit' | 'pitch' )\n int alt57=2;\n int LA57_0 = input.LA(1);\n\n if ( (LA57_0==149) ) {\n alt57=1;\n }\n else if ( (LA57_0==150) ) {\n alt57=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 57, 0, input);\n\n throw nvae;\n }\n switch (alt57) {\n case 1 :\n // flips.g:314:5: 'pit'\n {\n string_literal150=(Token)match(input,149,FOLLOW_149_in_pitch1517); \n stream_149.add(string_literal150);\n\n\n }\n break;\n case 2 :\n // flips.g:314:11: 'pitch'\n {\n string_literal151=(Token)match(input,150,FOLLOW_150_in_pitch1519); \n stream_150.add(string_literal151);\n\n\n }\n break;\n\n }\n\n To152=(Token)match(input,To,FOLLOW_To_in_pitch1522); \n stream_To.add(To152);\n\n pushFollow(FOLLOW_angularValueWithRate_in_pitch1524);\n angularValueWithRate153=angularValueWithRate();\n\n state._fsp--;\n\n stream_angularValueWithRate.add(angularValueWithRate153.getTree());\n\n\n // AST REWRITE\n // elements: angularValueWithRate\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 315:2: -> ^( PITCH FIXED angularValueWithRate )\n {\n // flips.g:315:5: ^( PITCH FIXED angularValueWithRate )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PITCH, \"PITCH\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n adaptor.addChild(root_1, stream_angularValueWithRate.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 2 :\n // flips.g:316:4: ( 'pit' | 'pitch' ) angularValueWithRate\n {\n // flips.g:316:4: ( 'pit' | 'pitch' )\n int alt58=2;\n int LA58_0 = input.LA(1);\n\n if ( (LA58_0==149) ) {\n alt58=1;\n }\n else if ( (LA58_0==150) ) {\n alt58=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 58, 0, input);\n\n throw nvae;\n }\n switch (alt58) {\n case 1 :\n // flips.g:316:5: 'pit'\n {\n string_literal154=(Token)match(input,149,FOLLOW_149_in_pitch1541); \n stream_149.add(string_literal154);\n\n\n }\n break;\n case 2 :\n // flips.g:316:11: 'pitch'\n {\n string_literal155=(Token)match(input,150,FOLLOW_150_in_pitch1543); \n stream_150.add(string_literal155);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_angularValueWithRate_in_pitch1546);\n angularValueWithRate156=angularValueWithRate();\n\n state._fsp--;\n\n stream_angularValueWithRate.add(angularValueWithRate156.getTree());\n\n\n // AST REWRITE\n // elements: angularValueWithRate\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 317:2: -> ^( PITCH RELATIVE angularValueWithRate )\n {\n // flips.g:317:5: ^( PITCH RELATIVE angularValueWithRate )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PITCH, \"PITCH\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(RELATIVE, \"RELATIVE\"));\n adaptor.addChild(root_1, stream_angularValueWithRate.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n case 3 :\n // flips.g:318:4: ( With 'an' )? ( 'aoa' | 'angle of attack' ) ( 'of' )? angularValueWithRate\n {\n // flips.g:318:4: ( With 'an' )?\n int alt59=2;\n int LA59_0 = input.LA(1);\n\n if ( (LA59_0==With) ) {\n alt59=1;\n }\n switch (alt59) {\n case 1 :\n // flips.g:318:5: With 'an'\n {\n With157=(Token)match(input,With,FOLLOW_With_in_pitch1563); \n stream_With.add(With157);\n\n string_literal158=(Token)match(input,151,FOLLOW_151_in_pitch1565); \n stream_151.add(string_literal158);\n\n\n }\n break;\n\n }\n\n // flips.g:318:17: ( 'aoa' | 'angle of attack' )\n int alt60=2;\n int LA60_0 = input.LA(1);\n\n if ( (LA60_0==152) ) {\n alt60=1;\n }\n else if ( (LA60_0==153) ) {\n alt60=2;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 60, 0, input);\n\n throw nvae;\n }\n switch (alt60) {\n case 1 :\n // flips.g:318:18: 'aoa'\n {\n string_literal159=(Token)match(input,152,FOLLOW_152_in_pitch1570); \n stream_152.add(string_literal159);\n\n\n }\n break;\n case 2 :\n // flips.g:318:24: 'angle of attack'\n {\n string_literal160=(Token)match(input,153,FOLLOW_153_in_pitch1572); \n stream_153.add(string_literal160);\n\n\n }\n break;\n\n }\n\n // flips.g:318:43: ( 'of' )?\n int alt61=2;\n int LA61_0 = input.LA(1);\n\n if ( (LA61_0==154) ) {\n alt61=1;\n }\n switch (alt61) {\n case 1 :\n // flips.g:318:43: 'of'\n {\n string_literal161=(Token)match(input,154,FOLLOW_154_in_pitch1575); \n stream_154.add(string_literal161);\n\n\n }\n break;\n\n }\n\n pushFollow(FOLLOW_angularValueWithRate_in_pitch1578);\n angularValueWithRate162=angularValueWithRate();\n\n state._fsp--;\n\n stream_angularValueWithRate.add(angularValueWithRate162.getTree());\n\n\n // AST REWRITE\n // elements: angularValueWithRate\n // token labels: \n // rule labels: retval\n // token list labels: \n // rule list labels: \n // wildcard labels: \n retval.tree = root_0;\n RewriteRuleSubtreeStream stream_retval=new RewriteRuleSubtreeStream(adaptor,\"rule retval\",retval!=null?retval.tree:null);\n\n root_0 = (CommonTree)adaptor.nil();\n // 319:2: -> ^( PITCH FIXED angularValueWithRate )\n {\n // flips.g:319:5: ^( PITCH FIXED angularValueWithRate )\n {\n CommonTree root_1 = (CommonTree)adaptor.nil();\n root_1 = (CommonTree)adaptor.becomeRoot((CommonTree)adaptor.create(PITCH, \"PITCH\"), root_1);\n\n adaptor.addChild(root_1, (CommonTree)adaptor.create(FIXED, \"FIXED\"));\n adaptor.addChild(root_1, stream_angularValueWithRate.nextTree());\n\n adaptor.addChild(root_0, root_1);\n }\n\n }\n\n retval.tree = root_0;\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n retval.tree = (CommonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n\n }\n catch (RecognitionException re) {\n reportError(re);\n recover(input,re);\n \tretval.tree = (CommonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n\n }\n finally {\n }\n return retval;\n }",
"public float getPitch() {\n return pitch_;\n }",
"public float getPitch() {\n return pitch_;\n }",
"public float getPitch() {\n return pitch;\n }",
"double getPWMRate();",
"public synchronized double getPitch() {\n\t\tif (isConnected) {\n\t\t\treturn gyro.getPitch();\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}",
"@Override\n\tprotected float getSoundPitch() {\n\t\t// note: unused, managed in playSound()\n\t\treturn 1;\n\t}",
"@Generated\n @Selector(\"rollingPeriod\")\n public native int rollingPeriod();",
"public double[] getDesiredHandYawPitchRoll()\n {\n switch (this)\n {\n case STAND_PREP:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case REACH_BACK:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case REACH_WAY_BACK:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case ARMS_03:\n return new double[] {0.0, Math.PI, 0.0};\n case REACH_FORWARD:\n return new double[] {0.0, 0.0, 0.0};\n case SMALL_CHICKEN_WINGS:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case LARGE_CHICKEN_WINGS:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case STRAIGHTEN_ELBOWS:\n return new double[] {0.0, 0.0, 0.0};\n case SUPPINATE_ARMS_IN_A_LITTLE:\n return new double[] {0.0, 0.0, 0.0};\n case ARMS_BACK:\n return new double[] {0.0, 0.0, 0.0};\n case LARGER_CHICKEN_WINGS:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case ARMS_OUT_EXTENDED:\n return new double[] {0.0, 0.0, 0.0};\n case SUPPINATE_ARMS_IN_MORE:\n return new double[] {0.0, 0.0, 0.0};\n case SUPPINATE_ARMS_IN_A_LOT:\n return new double[] {0.0, 0.0, 0.0};\n case SUPER_CHICKEN_WINGS:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case FLYING:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case FLYING_PALMS_UP:\n return new double[] {0.0, 0.0, 0.0};\n case KARATE_KID_KRANE_KICK:\n return new double[] {0.0, 0.0, 0.0};\n case FLEX_UP:\n return new double[] {0.0, 0.0, 0.0};\n case FLEX_DOWN:\n return new double[] {0.0, 0.0, 0.0};\n case FLYING_SUPPINATE_IN:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n case FLYING_SUPPINATE_OUT:\n return new double[] {0.0, -Math.PI / 2.0, 0.0};\n case ARM_NINETY_ELBOW_DOWN:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_NINETY_ELBOW_FORWARD:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_NINETY_ELBOW_UP:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_FORTFIVE_ELBOW_UP:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_FORTFIVE_ELBOW_DOWN:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_OUT_TRICEP_EXERCISE:\n return new double[] {0.0, 0.0, 0.0};\n case ARM_STRAIGHT_DOWN:\n return new double[] {0.0, Math.PI / 2.0, 0.0};\n\n default:\n return new double[] {0.0, 0.0, 0.0};\n }\n }",
"@Override\n default void appendPitchRotation(double pitch)\n {\n AxisAngleTools.appendPitchRotation(this, pitch, this);\n }",
"public float getSoundPitch() {\n return _soundPitch;\n }",
"public TimePeriod getPeriod();",
"public float getPitch() {\n return pitch_;\n }",
"public float getPitch() {\n return pitch_;\n }",
"boolean hasPitch();",
"boolean hasPitch();",
"@Override\n public void gyroPitch(int value, int timestamp) {\n }",
"public String getPitchAsString(){ return Integer.toString(this.pitch);}",
"public void setPitch(int pitch);",
"private void adjustPitch(double tick) {\n\t\tif(pitch < targetPitch) {\n\t\t\taddPitch((float)tick * deltaPitch);\n\t\t\tif(pitch >= targetPitch)\n\t\t\t\tsetPitch(targetPitch);\n\t\t} else if(pitch > targetPitch) {\n\t\t\taddPitch((float)tick * deltaPitch);\n\t\t\tif(pitch <= targetPitch)\n\t\t\t\tsetPitch(targetPitch);\n\t\t}\n\t}",
"@Override\n public void runEffect(double[] fft) {\n\n\n for(int i = fft.length - 1; i - pitchMove >= 0; i--)\n {\n fft[i] = fft[i - pitchMove];\n }\n for(int i = 0; i < pitchMove; i++)\n fft[i] = fft[i]*0.5;\n// for(int i = 0, k = 0; i < fft.length; i+=2)\n// {\n// if(i < fft.length/2) {\n// fft2[fft.length / 2 + k - 1] = (fft[fft.length / 2 + i] + fft[fft.length / 2 + i]) / 2;\n// fft2[fft.length / 2 - k - 1] = (fft[fft.length / 2 - i] + fft[fft.length / 2 - i]) / 2;\n// }\n// //fft2[k] = 0;\n// //fft2[fft2.length - k -1] = 0;\n// k++;\n// }\n /*for(int i = 0; i < fft.length; i++)\n {\n fft[i] = Math.abs(fft[i]);\n if(fft[i] < 2){\n fft[i] = 0;\n }\n //Log.d(\"Log\", fft[i] + \" \");\n }*/\n }",
"@Override\n\tpublic long getTimePeriod() {\n\t\treturn 0;\n\t}",
"public void pitch(float amount)\r\n {\r\n //increment the pitch by the amount param\r\n pitch -= amount;\r\n }",
"public String getPitch()\n\t{\n\t\treturn pitch.getText();\n\t}",
"public static int getNormalizedPitch(Note note) {\n try {\n String pitch = note.getPitch().toString();\n String octave = new Integer(note.getOctave()).toString();\n\n String target = null;\n\n if (note.getPitch().equals(Pitch.R)) {\n target = \"REST\";\n } else {\n if(note.getAlteration().equals(Alteration.N))\n target = pitch.concat(octave);\n else if(note.getAlteration().equals(Alteration.F))\n target = pitch.concat(\"F\").concat(octave);\n else\n target = pitch.concat(\"S\").concat(octave);\n }\n\n \n\n Class cClass = ConverterUtil.class;\n Field field = cClass.getField(target);\n Integer value = (Integer) field.get(null);\n\n return value.intValue()%12;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return 0;\n }",
"public void setPitch(float pitch) {\n\t\talSourcef(musicSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(reverseSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(flangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(distortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(distortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahDistortSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(wahDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t\talSourcef(revWahDistortFlangeSourceIndex, AL_PITCH, pitch);\n\t}",
"public void pitch(double angle) {\n heading = rotateVectorAroundAxis(heading, left, angle);\r\n up = rotateVectorAroundAxis(up, left, angle);\r\n\r\n }",
"org.hl7.fhir.Period getAppliesPeriod();",
"public void period() {\n\t\tPeriod annually = Period.ofYears(1);\n\t\tPeriod quarterly = Period.ofMonths(3);\n\t\tPeriod everyThreeWeeks = Period.ofWeeks(3);\n\t\tPeriod everyOtherDay = Period.ofDays(2);\n\t\tPeriod everyYearAndAWeek = Period.of(1, 0, 7);\n\t\tLocalDate date = LocalDate.of(2014, Month.JANUARY, 20);\n\t\tdate = date.plus(annually);\n\t\tSystem.out.println(date);\n\t\tSystem.out.println(Period.of(0, 20, 47)); // P20M47D\n\t\tSystem.out.println(Period.of(2, 20, 47)); // P2Y20M47D\n\t}",
"private float calculateAngles(){\n\t\t// First we will move the current angle heading into the previous angle heading slot.\n\t\tdata.PID.headings[0] = data.PID.headings[1];\n\t\t// Then, we assign the new angle heading.\n\t\tdata.PID.headings[1] = data.imu.getAngularOrientation().firstAngle;\n\n\t\t// Finally we calculate a computedTarget from the current angle heading.\n\t\tdata.PID.computedTarget = data.PID.headings[1] + (data.PID.IMURotations * 360);\n\n\t\t// Now we determine if we need to re-calculate the angles.\n\t\tif(data.PID.headings[0] > 300 && data.PID.headings[1] < 60) {\n\t\t\tdata.PID.IMURotations++; //rotations of 360 degrees\n\t\t\tcalculateAngles();\n\t\t} else if(data.PID.headings[0] < 60 && data.PID.headings[1] > 300) {\n\t\t\tdata.PID.IMURotations--;\n\t\t\tcalculateAngles();\n\t\t}\n\t\treturn data.PID.headings[1];\n\t}",
"public static ArrayList<PitchCandidate> melodicCheck(ArrayList<PitchCandidate> pitch_candidates, ModeModule my_mode_module, MelodicVoice alter_me, \n Integer pitch_center, int voice_pitch_count, Integer previous_melody_pitch, Integer previous_melodic_interval, Boolean is_accent, Boolean prog_built) {\n Boolean large_dissonance_bad = InputParameters.large_dissonance_bad;\n Integer [] consonances = InputParameters.consonances;\n Integer [] perfect_consonances = InputParameters.perfect_consonances;\n Integer [] root_consonances = InputParameters.root_consonances;\n \n for (PitchCandidate myPC : pitch_candidates){\n int cand_pitch = myPC.getPitch();\n int melody_motion_to_cand = 0;\n \n //DEBUG\n //System.out.println(\"melodicCheck evaluating pitch candidate \" + cand_pitch);\n \n if (voice_pitch_count > 0) {\n melody_motion_to_cand = cand_pitch - previous_melody_pitch;\n \n \n //Check if The candidate has already followed the preceding pitch too often. \n //look for previous_melody_pitch in PitchCount\n //if it's there get how many times it's appeared in the melody\n // if the count is greater than samplesize threshold\n //check if there are previous_melody_pitch to pitch_candidate motions in MOtion Counts\n //if so get the motion count - then divide motion count by pitch count\n // get the percentage of motions from mode module\n //if actual count is greater than mode module percentage decrement\n\t\t\t\t\n double thresh = 0;\n\t\t\t\tDouble threshornull = my_mode_module.getMelodicMotionProbability(cand_pitch, previous_melody_pitch, key_transpose, 0);\n\t\t\t\tif (threshornull == null){\n //DEBUG\n //System.out.println(\"From mode module motion probability of \" + previous_melody_pitch %12 +\" to \" + cand_pitch%12 + \" is NULL\");\n myPC.decrementRank(Decrements.melodic_motion_quota_exceed);\n myPC.decrementRank(Decrements.improbable_melodic_motion);\n }\n else {\n thresh = threshornull;\n //DEBUG\n //System.out.println(\"From mode module, motion probability of \" + previous_melody_pitch%12 +\" to \" + cand_pitch%12 + \" = \" + thresh );\n }\n for (PitchCount my_pitch_count: pitch_counts) {\n if(my_pitch_count.getPitch() == previous_melody_pitch%12)\n\t\t\t\t\t\t//DEBUG\n //System.out.println(\"found preceding cp pitch \" + previous_melody_pitch%12 +\" in pitch counts with count \" + my_pitch_count.getCount());\n if(my_pitch_count.getCount() > sample_size) \n for (MotionCount my_motion_count: motion_counts){\n //DEBUG\n //System.out.println(\"pitch_count for \" + previous_melody_pitch %12 + \" = \" + my_pitch_count.getCount());\n //System.out.println(\"motion count for \" + my_motion_count.getPreviousPitch() + \"/\" + my_motion_count.getSucceedingPitch() + \"=\"+ my_motion_count.getCount());\n if (my_motion_count.getPreviousPitch()== previous_melody_pitch %12 && my_motion_count.getSucceedingPitch() == cand_pitch %12) {\n double actual = my_motion_count.getCount()/(double)my_pitch_count.getCount();\n //DEBUG\n //System.out.println(\"found \" + my_motion_count.getCount() + \" instances of motion from \" + previous_melody_pitch %12 + \" to \" +cand_pitch %12 );\n //System.out.println(\"frequency of motion from \" + previous_melody_pitch %12 + \" to \" + cand_pitch%12 + \" = \" + actual); \n if (actual >= thresh) {\n myPC.decrementRank(Decrements.melodic_motion_quota_exceed);\n //DEBUG\n //System.out.println(cand_pitch %12 + \" is approached too often from \" + previous_melody_pitch %12);\n }\n }\n }\n }\n }\n \n if (voice_pitch_count > 1){\n // Peak/Trough check\n // a melodic phrase should have no more than two peaks and two troughs\n // a peak is defined as a change in melodic direction \n // so when a candidate pitch wants to go in the opposite direction of \n // the previous melodic interval we want to increment the peak or trough count accordingly\n // and determine whether we have more than two peaks or more than two troughs\n // note that the melody can always go higher or lower than the previous peak or trough\n\n if (previous_melodic_interval < 0 && melody_motion_to_cand > 0 ) {// will there be a change in direction from - to + ie trough?\n if (previous_melody_pitch == trough && trough_count >=2) {\n myPC.decrementRank(Decrements.peak_trough_quota_exceed);\n //DEBUG\n //System.out.println(previous_melody_pitch + \" duplicates previous peak\");\n } //will this trough = previous trough? then increment\n } \n if (previous_melodic_interval > 0 && melody_motion_to_cand <0){ // will there be a trough?\n if (previous_melody_pitch == peak && peak_count >=2) {\n myPC.decrementRank(Decrements.peak_trough_quota_exceed);\n //DEBUG\n //System.out.println(previous_melody_pitch + \" duplicates previous trough\");\n } //will this trough = previous trough? then increment\n }\n\t\t\t\t\n //Motion after Leaps checks\n //First check if the melody does not go in opposite direction of leap\n // then check if there are two successive leaps in the same direction\n if (previous_melodic_interval > 4 && melody_motion_to_cand > 0){\n myPC.decrementRank(Decrements.bad_motion_after_leap);\n //DEBUG\n //System.out.println(melody_motion_to_cand + \" to \"+ cand_pitch + \" is bad motion after leap\");\n if (melody_motion_to_cand > 4) {\n myPC.decrementRank(Decrements.successive_leaps);\n //DEBUG\n //System.out.println(cand_pitch + \" is successive leap\");\n }\n \n } \n if (previous_melodic_interval < -4 && melody_motion_to_cand < 0){\n myPC.decrementRank(Decrements.bad_motion_after_leap);\n //DEBUG\n //System.out.println(melody_motion_to_cand + \" to \"+cand_pitch + \" is bad motion after leap\");\n if (melody_motion_to_cand < -4) {\n myPC.decrementRank(Decrements.successive_leaps); \n //DEBUG\n //System.out.println(cand_pitch + \" is successive leap\");\n }\n\n } \n } \n // end melody checks\n } //next pitch candidate\n return pitch_candidates; \n }",
"public java.util.List<org.drip.analytics.cashflow.CompositePeriod> periods()\n\t{\n\t\treturn _lsPeriod;\n\t}",
"public float getInterpolatedPitch (float u) {\r\n\r\n float newPitch;\r\n \r\n // if linear interpolation\r\n if (this.linear == 1) {\r\n\r\n newPitch = keyFrame[1].pitch + \r\n ((keyFrame[2].pitch - keyFrame[1].pitch) * u);\r\n } else {\r\n\r\n newPitch = p0 + u * (p1 + u * (p2 + u * p3));\r\n\r\n }\r\n\r\n return newPitch;\r\n }",
"org.hl7.fhir.Period getValuePeriod();",
"int getLastVibrationFrequency();",
"private void updatePulseDelta () {\n long now = System.currentTimeMillis();\n \n // If there are more than 2^32 seconds between two pulses, we are already extinct.\n this.pulseDelta = (int)(now - this.lastPulse);\n this.lastPulse = now;\n }",
"public void updatePredictions (long currTime, TimeSeries inputSeries)\n {\n\n// TODO: decide if this is necessary, it's in PPALg >>\n this.state.clearPredictionsFrom (currTime + stepSize);\n//this.state.clearPredictions();\n\n TimeSeries timeSeries = (TimeSeries) inputSeries.clone();\n\n // if timeSeries is shorter than the minimum stream do nothing.\n if (timeSeries.size() < minStreamLength)\n return;\n\n // trim the first <minPeriod> number of elements from the timeSeries.\n // this removes non-periodicity that is seen in simulators first few elements.\n\n timeSeries.trimFromStart(minPeriodLength);\n\n df.addText (\"First trim of time series : \" + timeSeries.shortToString());\n\n // find the best shift of the time series against iteself that leads to the most matching\n ArrayList shiftGraph = findBestShiftGraph (timeSeries);\n\n // trim the shifted graph to make sure we aren't starting in the middle of an event\n int amountTrimmed = trimShiftGraph (shiftGraph);\n\n df.addText (\"Trim amount : \" + amountTrimmed);\n df.addText (\"final, trimmed shift graph : \" + shiftGraph.toString());\n\n // the offset is the total amount of the time series we have discarded, it is the offset\n // to the leading edge of a periodic repeating occurence\n int offset = amountTrimmed + minPeriodLength;\n\n // create a new periodic event object\n PeriodicEvent pe = getPeriod (shiftGraph, offset);\n\n if (pe == null || pe.getEvent().isEmpty())\n {\n df.addText (\" Periodic event is null \");\n return;\n }\n\n df.addText (\" Periodic Event is : \" + pe.toString());\n\n // get the current time from which we will extrapolate\n long time = currTime;\n\n int period = pe.getPeriod();\n ArrayList event = pe.getEvent();\n\n // if we divide the timeSeries into portions the size of the time period, how much is left over?\n // for this we do not consider the trimmed amount.\n int timeSeriesSize = timeSeries.size() - amountTrimmed;\n\n if (timeSeriesSize <= period)\n return;\n int remainder = getRemainder (timeSeriesSize, period);\n df.addText (\"remainder is : \" + remainder);\n\n // cycle through the remaining portion of the last period adding any predictions based on\n // our periodic event that we have identified.\n // must subtract 1 since index is zero-base, & reaminder is one-based\n for (int i = remainder -1 ; i < event.size(); i++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (i >= 0 && event.get (i) != null)\n {\n prediction = ((Double) event.get(i)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (i)\n\n int extrapolationCount = 2;\n\n // We make <j> additional extapolation into the future beyond the last period fragment\n while (extrapolationCount > 0)\n {\n for (int j = 0; j < event.size(); j++)\n {\n double prediction;\n\n time = time + timeSeries.getTimeIncrement();\n\n if (event.get (j) != null)\n {\n prediction = ((Double) event.get(j)).doubleValue();\n\n state.addPrediction ( time, prediction);\n df.addText (\"Adding prediction : \" + prediction + \" for time : \" + time);\n }\n } // end for (j)\n\n extrapolationCount--;\n } // end while (extapoliationCount)\n\n\n state.updateError (timeSeries, currTime);\n }",
"public Long getPeriod() {\n return this.Period;\n }",
"public Point2D.Float getVelocityPPS() {\n return velocityPPS;\n /* old method for velocity estimation is as follows\n * The velocity is instantaneously\n * computed from the movement of the cluster caused by the last event, then this velocity is mixed\n * with the the old velocity by the mixing factor. Thus the mixing factor is appplied twice: once for moving\n * the cluster and again for changing the velocity.\n * */\n }",
"public double getRotationalPeriod() {\n return rotationalPeriod;\n }",
"public PulseTransitTime() {\n currPTT = 0.0;\n hmPeakTimes = new ArrayList<>();\n //maf = new MovingAverage(WINDOW_SIZE);\n }",
"public static double frequencyToPitch(double frequency) {\n return CONCERT_A_PITCH + 12 * Math.log(frequency / mConcertAFrequency) / Math.log(2.0);\n }",
"private void PeriodMeanEvaluation () {\n\n float x = 0;\n for(int i = 0; i < 3; i++)\n {\n for(int j = 0; j < numberOfSample; j++)\n {\n x = x + singleFrame[j][i];\n }\n meanOfPeriodCoord[i] = (x/numberOfSample);\n x = 0;\n }\n }",
"private Pitch getPitch(int i) {\n return Pitch.values()[i];\n }",
"float getBlackoutPeriod();",
"int getRemainPoints();",
"public void setPitchRange(float range) {\n\tthis.range = range;\n }",
"public int getTestNotePitch()\n {\n return super.getTestNotePitch();\n }",
"public float getFrameRate() { return 1000f/_interval; }",
"public static double pitchToFrequency(double pitch) {\n return mConcertAFrequency * Math.pow(2.0, ((pitch - CONCERT_A_PITCH) * (1.0 / 12.0)));\n }",
"@Override\n\tpublic void handlePeriod() {\n\t}",
"public Period getPeriod() {\n return period;\n }",
"double getPhase();",
"public int getTimePeriod() {\n return timePeriod;\n }",
"public void addPitch(float pitch) {\n\t\tthis.pitch += pitch;\n\t\tAL10.alSourcef(id, AL10.AL_PITCH, this.pitch);\n\t}",
"@Override\r\n\tpublic double getPitchRightHand() {\n\t\treturn rechtPitch;\r\n\t}",
"public double[] getDesiredUpperArmYawPitchRoll()\n {\n switch (this)\n {\n case STAND_PREP:\n return new double[] {-0.0485, 0.3191, -1.1856};\n case SMALL_CHICKEN_WINGS:\n return new double[] {-0.0435, 0.3279, -0.9843};\n case LARGE_CHICKEN_WINGS:\n return new double[] {-0.0368, 0.3356, -0.7824};\n case STRAIGHTEN_ELBOWS:\n return new double[] {-0.0435, 0.3279, -0.9843};\n case SUPPINATE_ARMS_IN_A_LITTLE:\n return new double[] {-0.1795, 0.4080, -1.0333};\n case ARMS_BACK:\n return new double[] {-0.0565, 0.6187, -1.2032};\n case LARGER_CHICKEN_WINGS:\n return new double[] {-0.0286, 0.3419, -0.5799};\n case ARMS_OUT_EXTENDED:\n return new double[] {-0.0286, 0.3419, -0.5799};\n case FLYING:\n return new double[] {-0.0192, 0.3465, -0.3770};\n case FLYING_PALMS_UP:\n return new double[] {0.4636, -1.5708, -1.1071};\n case KARATE_KID_KRANE_KICK:\n return new double[] {0.6154, 0.5235, 0.9553};\n case FLEX_UP:\n return new double[] {0.4636, -1.5708, -1.1071};\n case FLEX_DOWN:\n return new double[] {-0.8500, 0.0554, -0.5854};\n case FLYING_SUPPINATE_IN:\n return new double[] {-0.8201, 1.1406, -0.9796};\n case FLYING_SUPPINATE_OUT:\n return new double[] {0.3871, -0.6305, -0.4430};\n case SUPPINATE_ARMS_IN_MORE:\n return new double[] {-0.3004, 0.4030, -1.2751};\n case SUPPINATE_ARMS_IN_A_LOT:\n return new double[] {-0.5133, 0.4530, -1.3638};\n case SUPER_CHICKEN_WINGS:\n return new double[] {-0.0142, 0.3481, -0.2754};\n\n case REACH_BACK:\n return new double[] {-0.0877, 1.0177, -1.2451};\n case REACH_WAY_BACK:\n return new double[] {-0.0877, 1.0177, -1.2451};\n case ARMS_03:\n return new double[] {-0.3004, 0.4030, -1.2751};\n case REACH_FORWARD:\n return new double[] {-0.0550, -0.5798, -1.1402};\n case REACH_WAY_FORWARD:\n return new double[] {-0.0550, -0.5798, -1.1402};\n case REACH_FAR_FORWARD:\n return new double[] {-0.0000, -1.2566, -1.1708};\n case REACH_FAR_BACK:\n return new double[] {0.0000, 1.2566, -1.1708};\n\n case ARM_STRAIGHT_DOWN:\n return new double[] {0.0000, -0.0000, -1.0708};\n\n case ARM_NINETY_ELBOW_DOWN:\n return new double[] {-0.4636, 1.5708, -1.1071};\n case ARM_NINETY_ELBOW_DOWN2:\n return new double[] {1.5708, 1.5708, 1.1071};\n case ARM_NINETY_ELBOW_FORWARD:\n return new double[] {0.0000, -0.0000, -0.0000};\n case ARM_NINETY_ELBOW_FORWARD2:\n return new double[] {0.0000, -0.0000, -0.0000};\n case ARM_NINETY_ELBOW_UP:\n return new double[] {0.4636, -1.5708, -1.1071};\n case ARM_NINETY_ELBOW_UP2:\n return new double[] {-1.5708, -1.5708, 1.1071};\n case ARM_FORTFIVE_ELBOW_UP:\n return new double[] {0.0000, -0.7854, -0.0000};\n case ARM_FORTFIVE_ELBOW_UP2:\n return new double[] {0.0000, -0.7854, -0.0000};\n case ARM_FORTFIVE_ELBOW_UP3:\n return new double[] {0.0000, -0.7854, -0.0000};\n case ARM_FORTFIVE_ELBOW_DOWN:\n return new double[] {-0.0000, 0.6000, -0.0000};\n case ARM_FORTFIVE_ELBOW_DOWN2:\n return new double[] {0.0000, 0.7854, -0.0000};\n case ARM_FORTFIVE_ELBOW_DOWN3:\n return new double[] {0.0000, 0.7854, -0.0000};\n\n case ARM_OUT_TRICEP_EXERCISE:\n return new double[] {-0.7780, 1.3298, -0.7928};\n\n default:\n throw new RuntimeException(\"Shouldn't get here!\");\n }\n }",
"public static int getIntPitch(double pitch) {\n return (int) (((pitch % 360) / 360) * 256);\n }",
"public double calculateVelocity(){\n double storyPoints = 0.0; // number of story points completed in total\n double numWeeks = BoardManager.get().getCurrentBoard().getAge()/7.0;\n LinkedList<Card> allCompletedCards = BoardManager.get().getCurrentBoard().getCardsOf(Role.COMPLETED_WORK);\n for (Card card : allCompletedCards) {\n storyPoints += card.getStoryPoints();\n }\n if (storyPoints == 0.0){\n return 0.0;\n }\n return Math.round(storyPoints/numWeeks * 100D) / 100D;\n }",
"public int getTimePeriod()\n\t{\n\t\treturn timePeriod;\n\t}",
"@Override\n default void prependPitchRotation(double pitch)\n {\n AxisAngleTools.prependPitchRotation(pitch, this, this);\n }",
"public void copiedMeasureDecoder(Integer chordNote,Integer[]previousChord, Integer[] playedChord){\n /* int c=0;\n int a=0;\n int b=0;\n int x0=0;\n int x1=0;*/\n int d1=0;\n int d2=0;\n\n\n\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==chordNote)\n d1=i;\n }\n for (int i=0;i<melodyNotes.length;i++){\n if(melodyNotes[i]==melody.get(melodyCounter))\n d2=i;\n /* if(melodyNotes[i]==playedChord[1])\n a=i;\n if(melodyNotes[i]==previousChord[1])\n b=i;*/\n }\n /*if(a<b){\n x0=a-b;\n x1=7+x1;\n }else{\n x0=a-b;\n x1=x0-7;\n }*/\n if(d1>d2) {\n binaryOutput += \"0\";\n }else {\n binaryOutput += \"1\";\n }\n for(int i = 0;i<4;i++){\n for(int j =0; j < rhytm.get(beatCounter).length;j++){\n if(rhytm.get(beatCounter)[j]!=null)\n if ((!rhytm.get(beatCounter)[j].equals(\"Ri\")) && (!rhytm.get(beatCounter)[j].equals(\"Rs\"))) {\n melodyCounter++;\n }\n }\n beatCounter++;\n }\n\n\n}",
"public void setPeriod(int periodInYears) {\nnumberOfPayments = periodInYears * MONTHS;\n}",
"public double updatePeriodic()\n {\n double Angle = getRawAngle();\n\n if (FirstCall)\n {\n AngleAverage = Angle;\n }\n\n AngleAverage -= AngleAverage / NumAvgSamples;\n AngleAverage += Angle / NumAvgSamples;\n\n return (AngleAverage);\n }",
"public long period() throws TimeWindowException {\n return div();\n }",
"void pulse(double pulseLength);",
"@Override\n\tpublic float getTimePerFrame() {\n\t\treturn tpf;\n\t}",
"PeriodCountCalculator<E> getPeriodCountCalculator();",
"public float getPitchShift() {\n\treturn pitchShift;\n }",
"void onNewPulse(int pulse, int spo2 );",
"public interface Period {\n\n\tDate getStart();\n\n\tDate getEnd();\n}",
"public void setPitch(int pitch) {\n mSelf.setPitch(pitch);\n }",
"private void calculateBPRange() {\n\t\tbroadPhaseLength = 0.0f;\n\t\tfor (Vector2f p : points) {\n\t\t\tbroadPhaseLength = Math.max(broadPhaseLength, Math.abs(p.length()));\n\t\t}\n\t}",
"public double darPeriodoOrbital( )\n {\n return periodoOrbitalSinodico;\n }"
]
| [
"0.6791497",
"0.6618286",
"0.65856117",
"0.6577069",
"0.6572845",
"0.6472334",
"0.6419275",
"0.64133567",
"0.6404893",
"0.6404893",
"0.61804414",
"0.61093044",
"0.60604525",
"0.6005036",
"0.5980107",
"0.5886116",
"0.5863939",
"0.58499086",
"0.58473796",
"0.5844087",
"0.584244",
"0.5790095",
"0.5785966",
"0.5754173",
"0.57519615",
"0.5742932",
"0.57296944",
"0.57098174",
"0.57098174",
"0.570409",
"0.56447744",
"0.5636821",
"0.5624337",
"0.5618687",
"0.56126934",
"0.5566993",
"0.5551056",
"0.55471915",
"0.55410147",
"0.55410147",
"0.5518659",
"0.5518659",
"0.55132383",
"0.5510556",
"0.5503719",
"0.54919297",
"0.5454477",
"0.5444322",
"0.541669",
"0.54049987",
"0.53781",
"0.536759",
"0.5348979",
"0.53352517",
"0.5333525",
"0.53258115",
"0.53168285",
"0.5311319",
"0.5307934",
"0.52998835",
"0.5289625",
"0.5279347",
"0.52793044",
"0.52730894",
"0.52631134",
"0.5247267",
"0.5239846",
"0.5229456",
"0.5227263",
"0.522609",
"0.52240807",
"0.5221379",
"0.5221334",
"0.52079207",
"0.52075136",
"0.5189175",
"0.5181902",
"0.516784",
"0.51599455",
"0.5156566",
"0.51420707",
"0.51261157",
"0.511733",
"0.5107838",
"0.50971705",
"0.5067454",
"0.506326",
"0.50579923",
"0.505622",
"0.50463593",
"0.5045083",
"0.5030325",
"0.5018277",
"0.50151247",
"0.5015033",
"0.50140476",
"0.50049424",
"0.4993667",
"0.49852476",
"0.4983612"
]
| 0.71643764 | 0 |
Increases the value of the given Property by the amount specified in setParams. If the agent does not have the specified property, then it is left unaffected. | @Override
public void execute(Agent agent, double deltaTime) throws PropertyDoesNotExistException {
try{
double current_value = (double) agent.getProperty(propertyName);
current_value += amount;
agent.setProperty(propertyName, current_value);
}
catch(PropertyDoesNotExistException e) {
// DO NOTHING, if doesn't exist, don't overwrite
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void enablePropertyBalance()\n {\n iPropertyBalance = new PropertyInt(new ParameterInt(\"Balance\"));\n addProperty(iPropertyBalance);\n }",
"void addPropertyCB(int property) {\n properties_[property].logNum++;\n properties_[property].logTotal++;\n }",
"void setExtremeSpikeIncrease(VariableAmount increase);",
"void setMyProperty1(Integer a) {}",
"void setStatusProperty(String property, Double value);",
"public void changeValue(MyObject myObjParam) {\n\t\tmyObjParam.a = myObjParam.a + 15;\n\t\tSystem.out.printf(\"The value of a is %d\\n\", myObjParam.a);\n\t}",
"public void increase() {\n balance.multiply(1.001);\n }",
"public void increasePrice(int percentage);",
"public void setProperty(String property) {\n }",
"public void Increase()\n {\n Increase(1);\n }",
"public void setPropertyPenalty(float value) {\n this.propertyPenalty = value;\n }",
"DefinedProperty graphChangeProperty( int propertyKey, Object value );",
"public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}",
"public EdgeNeon setAmount(double value) throws ParameterOutOfRangeException\n {\n\t\tif(value > 100.00 || value < 0.00)\n\t {\n\t throw new ParameterOutOfRangeException(value, 0.00, 100.00);\n\t }\n\n m_Amount = value;\n setProperty(\"amount\", value);\n return this;\n }",
"public void increaseEnergy(int energy){\r\n\t\tthis.energy = this.energy + energy;\r\n\t}",
"public void increase(int quantity) {\r\n\r\n\t\tif (getAmount() == Integer.MAX_VALUE)\r\n\r\n\t\t\treturn;\r\n\r\n\t\tsetAmount(getAmount() + quantity);\r\n\r\n\t}",
"public void setProperty(Integer t) {\n\n\t\t}",
"protected void do_childSupportFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"@ReactMethod\n public void peopleIncrement(ReadableMap properties) {\n mixpanel.getPeople().increment(this.readableMapToNumberMap(properties));\n }",
"public int increaseFamValue(FamilyMember famMember) { //remember to use revertFamValue if the action is not accepted\n this.sOut(\"Do you want to increase your \"\n + famMember.getSkinColour() + \" family member value?\" );\n int increase = 0;\n if (this.sInPromptConf()) {\n increase = this.increaseValue();\n famMember.setActionValue(famMember.getActionValue() + increase);\n this.sOut(\"Current \" + famMember.getSkinColour()\n + \" family member value: \" + (famMember.getActionValue()));\n }\n return increase;\n }",
"void setIncome(double amount);",
"@Override\n public void increaseStrength(int power) {\n this.damageStrength += power;\n }",
"protected void do_utilityFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"protected void do_socialSecurityFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public static void setInteger(String prop, int value)\n {\n props.setProperty(prop, \"\" + value);\n }",
"public abstract void setProperty(String property, Object value)\n throws SOAPException;",
"public void buyDecreaseDamage() {\n this.decreaseDamage++;\n }",
"public void incValue(final float amount) {\r\n\t\tthis.value += amount;\r\n\t}",
"protected void do_tanfFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public void increaseQuantity(int amount) {\n this.currentQuantity += amount;\n }",
"public void incrementAmount() { amount++; }",
"public void executeEvent()\n {\n\t\tString name;\n\t\tdouble newValue;\n\n //searches through the list of properties\n for(Property property : propertyList)\n {\n name = property.getName();\n if(name.equals(propertyName))\n {\n newValue = property.getValue();\n\t\t\t\tnewValue *= INCREASE_RATE;\n\t\t\t\tproperty.setValue(newValue);\n }\n }\n }",
"@Override\r\n\tprotected void onIncreaseMp(TYPE type, int value, int skillId, int logId)\r\n\t{\n\t}",
"public long saveupdateProperty(Property property, MultipartFile file) {\n\t\treturn 0;\n\t}",
"public void changePropery(String property, String newValueExpr) {\n \t\n\n \n\t}",
"public double Increase(long amount) \n {\n lastAmount = amount;\n return count += amount;\n }",
"public void performEvent(PropertyController propertyController) throws EventException\n {\n double newRevenue;\n Map<String, Property> properties = propertyController.getProperties();\n\n /* Check if the properties are obtained correctly */\n if (properties == null)\n {\n throw new EventException(\"Properties Map is null\");\n }\n\n /* Retrieve the property to apply a revenue increase on */\n Property prop = properties.get(getProperty());\n\n /* Update the revenue for the specific Business Unit */\n newRevenue = ((BusinessUnit)(prop)).getRevenue();\n newRevenue = newRevenue * 1.05;\n ((BusinessUnit)(prop)).setRevenue(newRevenue);\n }",
"public void setLevel(double amt) {\n\t\tlevel += amt;\n\t}",
"public void setHP(int hp) {\r\n\t\tthis.hp += hp;\r\n\t}",
"DefinedProperty relChangeProperty( long relId, int propertyKey, Object value );",
"DefinedProperty nodeChangeProperty( long nodeId, int propertyKey, Object value );",
"public void adjustPay(double percentage){\r\n this.commission = getCommission() + getCommission() * percentage;\r\n }",
"public void increaseQuantity() {\n this.quantity++;\n this.updateTotalPrice();\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 }",
"public void sellProperty(){\n owner.addMoney(costs[0]/2);\n owner.removeProperty(this);\n owner = null;\n }",
"public void incLevel(int lvl){this.Level=this.XP/(100);}",
"void updatedProperty(TestResult tr, String name, String value);",
"public void changeProperty(String property, String newValueExpr) {\n \t\n\t\tif(NAME_PROPERTY.equals(property)){\n\t\t\tchangeNameProperty(newValueExpr);\n\t\t}\n\t\tif(AMOUNT_PROPERTY.equals(property)){\n\t\t\tchangeAmountProperty(newValueExpr);\n\t\t}\n\n \n\t}",
"public void setIntProperty(@PropertyId int propertyId, int area, int val)\n throws CarNotConnectedException {\n if (mHvacPropertyIds.contains(propertyId)) {\n mCarPropertyMgr.setIntProperty(propertyId, area, val);\n }\n }",
"public boolean upgradeHouse(String property){\n if (business.getLevel() >= 25 && business.getLevel() < 75){\n player.changeProperty(property);\n return true;\n }\n else {\n return false;\n }\n }",
"@Override\r\n\tpublic void setProperty(Properties prop) {\n\t}",
"public void addHealth(int amt) {\n currentHealth = currentHealth + amt;\n }",
"public void setPropertyOwned(int a_property, int a_propertyNum)\n {\n boolean []oldProp = m_properties.get(a_property);\n boolean []updatedProp = new boolean[oldProp.length];\n \n for(int i = 0; i < oldProp.length; i++)\n {\n updatedProp[i] = oldProp[i];\n }\n updatedProp[a_propertyNum] = true;\n \n m_properties.set(a_property, updatedProp);\n }",
"public void change(double increment)\n\t{\n\t\tthis.accumulation += increment;\n\t}",
"public PlayerPaidForProperty(Player owner, Property property, double amount) {\n\t\tthis.amount = amount;\n\t\tthis.owner = owner;\n\t\tthis.property = property;\n\t}",
"void addOrReplaceProperty(Property prop, Collection<Property> properties);",
"public static void increaseEnergy(int statIncreaseAmount) {\n double newEnergy = Sim.getEnergy() + statIncreaseAmount;\n\n if (newEnergy > MAX_PER_STAT) {\n Sim.setEnergy(MAX_PER_STAT);\n } else {\n Sim.setEnergy(newEnergy);\n }\n\n }",
"public void enablePropertyBalanceMax()\n {\n iPropertyBalanceMax = new PropertyUint(new ParameterUint(\"BalanceMax\"));\n addProperty(iPropertyBalanceMax);\n }",
"public void setLifepointsIncrease(int amount) {\r\n this.lifepointsIncrease = amount;\r\n }",
"@Override\r\n\tpublic int increase() throws Exception {\n\t\treturn 0;\r\n\t}",
"protected void do_foodStampsFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public void addPotion() {\n setPotion(getPotion() + 1);\n }",
"public void heal(int healAmount){\r\n health+= healAmount;\r\n }",
"public void setMyIncomeMultiplier(float factor) throws CallbackAIException;",
"public int addProperty(Property property){\r\n\t\tif(property == null) {\r\n\t\t\treturn -2;\r\n\t\t}\r\n\t\tif(!plot.encompasses(property.getPlot())){\r\n\t\t\treturn -3;\r\n\t\t}\r\n\t\tfor (int i=0;i<properties.length;i++) {\r\n\t\t\tif (properties[i]!=null && i<MAX_PROPERTY-1) {\r\n\t\t\t\tif(properties[i].getPlot().overlaps(property.getPlot())) {\r\n\t\t\t\t\treturn -4;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(properties[i]!=null && i>=MAX_PROPERTY-1) {\r\n\t\t\t\treturn -1;\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tproperties[i]=property;\r\n\t\t\t\treturn i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn -1;\r\n\t}",
"public boolean setPropertyBalance(int aValue);",
"protected void do_otherIncomeFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"public void increment(double n) {\r\n\t\tthis.value += n;\r\n\t}",
"public static void setMoney(Integer payment) {\n\n money.moneyLevel += payment;\n money.save();\n }",
"public void increaseMeatQuantity(double amount) {\r\n\t\tif (amount > 0) {\r\n\t\t\tthis.meatQuantity += amount;\r\n\t\t}\r\n\t}",
"void setGoalRPM(double goalRPM);",
"@Override\n\tpublic void setGear(int newValue) {\n\t\tgear = newValue+2;\n\t}",
"public void takePoison(int poison) { this.poison += poison; }",
"public void updateHp(double amount);",
"public void increment() { this.progressBar.setValue(++this.progressValue); }",
"DefinedProperty graphAddProperty( int propertyKey, Object value );",
"public void injure(int a, PhysicsEntity attacker ){\n\t\ta *= getArmorPercentage();\n\t\tsuper.injure(a,attacker);\n\t}",
"public void setSales(Integer sales) {\n this.sales = this.sales + sales;\n }",
"public void setInventory(int inventory){\r\n inventoryNumber += inventory;\r\n }",
"protected void do_disabilityFTF_propertyChange(PropertyChangeEvent arg0) {\n\t\tsetIncomeTotal();\n\t}",
"void gainHealth(int points) {\n this.health += points;\n }",
"public void addProperty(Property property)\r\n {\r\n m_values.add(property);\r\n }",
"public void enablePropertyVolumeLimit()\n {\n iPropertyVolumeLimit = new PropertyUint(new ParameterUint(\"VolumeLimit\"));\n addProperty(iPropertyVolumeLimit);\n }",
"@Override\n\tpublic void addProperty(IProperty property) {\n\t\t\n\t}",
"@Override\n\tpublic void transferProperty(TransferPropertyRequest transferPropertyRequest,Long pid,Long uid) throws Exception {\n\t\tProperty property = getById(transferPropertyRequest.getPropertyId());\n\t\tProperty newProperty = new Property();\n\t\tif(property.getActive()) {\n\t\t\tproperty.setTransferred(true);\n\t\t\tproperty.setTransferredToSamagraId(transferPropertyRequest.getTransferToSamagraId());\n\t\t\tiPropertyDAO.save(property);\n\t\t}else {\n\t\t\tthrow new Exception(\"Property with Unique id :\"+property.getCustomUniqueId()+\"does not belong to current samagra and cant be transffered\");\n\t\t}\n\t\t//fetch the person - the new owner of this property\n\t\tnewProperty.setActive(true);\n\t\tnewProperty.setArea(property.getArea());\n\t\tnewProperty.setIsResidential(property.getIsResidential());\n\t\tnewProperty.setResidentName(property.getResidentName());\n\t\tnewProperty.setResidentName(transferPropertyRequest.getResidentName());\n\t\tnewProperty.setSubHolder(transferPropertyRequest.getNewSubHolder());\n\t\tnewProperty.setIsWaterConnected(property.getWaterConnected());\n\t\tnewProperty.setEastLandmark(property.getEastLandmark());\n\t\tnewProperty.setWestLandmark(property.getWestLandmark());\n\t\tnewProperty.setNorthLandmark(property.getNorthLandmark());\n\t\tnewProperty.setSouthLandmark(property.getSouthLandmark());\n\t\tnewProperty.setVillage(property.getVillage());\n\t\tnewProperty.setTehsil(property.getTehsil());\n\t\tnewProperty.setDistrict(property.getDistrict());\n\t\tnewProperty.setPropertyNumber(property.getPropertyNumber());\n\t\tnewProperty.setPanchayat(property.getPanchayat());\n\t\tnewProperty.setSharedWallDescription(property.getSharedWallDescription());\n\t\tnewProperty.setWaterBillDescription(property.getWaterBillDescription());\n\t\tnewProperty.setLength(property.getLength());\n\t\tnewProperty.setWidth(property.getWidth());\n newProperty.setCustomUniqueId(property.getCustomUniqueId());\n\t\tBeanUtils.copyProperties(property.getPropertyUsages(),newProperty.getPropertyUsages());\n\t\tBeanUtils.copyProperties(property.getPropertyTypes(),newProperty.getPropertyTypes());\n//\t\tnewProperty.setPropertyUsages(property.getPropertyUsages());\n\t\tnewProperty.setOtherDescription(property.getOtherDescription());\n\t\tnewProperty.setPincode(property.getPincode());\n\t\t//the updated field\n\t\tnewProperty.setSamagraId(transferPropertyRequest.getTransferToSamagraId());\n\t\tnewProperty.setDocuments(transferPropertyRequest.getDocuments());\n\t\tcreateTransferredProperty(newProperty,pid,uid);\n\t}",
"void increase();",
"void increase();",
"static void increment(BillGatesBillions billGatesMoneyRef) {\n // Java will send a copy of the reference instead of a copy of the object\n int money = billGatesMoneyRef.getNetWorth();\n billGatesMoneyRef.setNetWorth(money + 1);\n }",
"protected void restockItem(int x){\r\n this.level += x;\r\n }",
"private void promote() {\r\n //promote gives more money\r\n increment();\r\n }",
"public boolean setWindowProperty ( InventoryView.Property prop , int value ) {\n\t\treturn invokeSafe ( \"setWindowProperty\" ,\n\t\t\t\t\t\t\tnew Class[] { InventoryView.Property.class , int.class } , value );\n\t}",
"public void enablePropertyUnityGain()\n {\n iPropertyUnityGain = new PropertyBool(new ParameterBool(\"UnityGain\"));\n addProperty(iPropertyUnityGain);\n }",
"@Override\n public void change(List<Property> propList, String propName, double modifier)\n {\n BusinessUnit tempBus = null;\n\n Iterator<Property> iter = propList.iterator();\n while (iter.hasNext() && (tempBus == null))\n {\n Property prop = iter.next();\n \n // If the property is directly in the property list.\n if (prop instanceof BusinessUnit)\n {\n if (prop.getName().equals(propName))\n {\n ((BusinessUnit) prop).updateRevenue(modifier);\n tempBus = (BusinessUnit) prop;\n }\n }\n else // prop is a company.\n {\n // Recurse through the BusinessUnits owned by the different companies.\n tempBus = ((Company) prop).ownsBusinessUnit(propName);\n\n if (tempBus != null)\n {\n tempBus.updateRevenue(modifier);\n }\n }\n }\n\n // If a BusinessUnit with that name was never found.\n if (tempBus == null)\n {\n throw new IllegalArgumentException(\"Error: Business Unit: \\\"\" + propName + \"\\\" not found.\");\n }\n }",
"public Builder setProperty1(int value) {\n bitField0_ |= 0x00000008;\n property1_ = value;\n \n return this;\n }",
"public void takeDamage(int damage) {\n this.damageTaken += damage;\n }",
"public interface Property {\n\n\t/**\n\t * Returns the name of the property.\n\t * @return property name\n */\n\tString getName();\n\n\t/**\n\t * Returns the cost to buy the property if it is unowned.\n\t * @return cost in dollars\n */\n\tint getCost();\n\n\t/**\n\t * Returns true if the property is mortgaged.\n\t * @return true if mortgaged\n */\n\tboolean getMortgaged();\n\n\t/**\n\t * Controls whether the property is mortgaged or not.\n\t * @param mortgaged whether or not the property is mortgaged\n */\n\tvoid setMortgaged(boolean mortgaged);\n\n\t/**\n\t * Returns the mortgage rate of the property.\n\t * @return mortgage rate in dollars\n */\n\tint getMortgageRate();\n\n\t/**\n\t * Returns the rent the given player should pay.\n\t * @param owner player that owns the property\n\t * @param tenantDiceRoll the roll the tenant made to get to this space\n\t * @return rent cost in dollars\n */\n\tint getRent(Player owner, int tenantDiceRoll);\n\n}",
"@Test\n public void testBuyProperty() throws IOException, InvalidFormatException, NotAProperty {\n GameController controller = new GameController(2,0);\n controller.getActivePlayer().setLocation(6);\n ColouredProperty cp = (ColouredProperty) controller.getBoard().getBoardLocations().get(controller.getActivePlayer().getLocation());\n controller.buyProperty(controller.getBoard().getBoardLocations().get(controller.getActivePlayer().getLocation()));\n Assert.assertTrue(controller.getActivePlayer().getName().equals(cp.getOwnedBuy()));\n }",
"Builder extremeSpikeIncrease(VariableAmount increase);",
"public void setProperty(String name,Object value);",
"void addToAmount(double amount) {\n this.currentAmount += amount;\n }"
]
| [
"0.5786808",
"0.5522966",
"0.5501484",
"0.5492236",
"0.5473706",
"0.5456186",
"0.54047376",
"0.5399565",
"0.5394293",
"0.5363562",
"0.53176165",
"0.530514",
"0.53038096",
"0.53006107",
"0.5277652",
"0.5251092",
"0.52483284",
"0.5234484",
"0.5220175",
"0.52154684",
"0.52084655",
"0.52004397",
"0.5200226",
"0.51878506",
"0.5180729",
"0.517016",
"0.51582414",
"0.5154845",
"0.51502204",
"0.5148193",
"0.50991356",
"0.50800705",
"0.50704384",
"0.5063233",
"0.5062096",
"0.5060348",
"0.5052572",
"0.50486064",
"0.50479764",
"0.50422996",
"0.504218",
"0.50401276",
"0.503807",
"0.5037833",
"0.5036977",
"0.5018153",
"0.50049514",
"0.50034827",
"0.4987941",
"0.4982933",
"0.4980701",
"0.49772456",
"0.49751142",
"0.49699453",
"0.4965325",
"0.49564475",
"0.49556947",
"0.49510935",
"0.49493268",
"0.49437624",
"0.4936254",
"0.49354464",
"0.49320692",
"0.493073",
"0.4929822",
"0.4926622",
"0.49191174",
"0.49182525",
"0.49121976",
"0.4911352",
"0.4908957",
"0.49071947",
"0.49056697",
"0.49055582",
"0.4903229",
"0.49011913",
"0.48996887",
"0.48890966",
"0.48879725",
"0.48869812",
"0.4878441",
"0.4874803",
"0.48666522",
"0.48568773",
"0.48554483",
"0.48467824",
"0.48467824",
"0.48347712",
"0.48335084",
"0.4832809",
"0.48310074",
"0.48298237",
"0.48293185",
"0.4827526",
"0.48079735",
"0.4803978",
"0.48021042",
"0.48018762",
"0.47966197",
"0.47963795"
]
| 0.6445769 | 0 |
Title: MotgaCltalCtrctBsSgmt.java Description: TODO | public MotgaCltalCtrctBsSgmt() {
super();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void cajas() {\n\t\t\n\t}",
"public void mo1403c() {\n }",
"@Override\n\tpublic void coba() {\n\t\t\n\t}",
"@Override\n\tpublic void ccc() {\n\t\t\n\t}",
"private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }",
"teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil getCaz();",
"teledon.network.protobuffprotocol.TeledonProtobufs.CazCaritabil getCaz();",
"zzbct(zzbco zzbco, Looper looper) {\n super(looper);\n this.zzaDN = zzbco;\n }",
"private ControleurAcceuil(){ }",
"@Override\r\n\tpublic int getcc() {\n\t\treturn 120;\r\n\t}",
"public Cgg_jur_anticipo(){}",
"public String getCasTb() {\n\t\treturn casTb;\n\t}",
"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 mo12628c() {\n }",
"private void cargartabla() {\n throw new UnsupportedOperationException(\"Not supported yet.\"); //To change body of generated methods, choose Tools | Templates.\n }",
"void mo17012c();",
"public String getCsc() {\r\n\t\treturn csc;\r\n\t}",
"public String getCVCTG_CODIGO(){\n\t\treturn this.myCvctg_codigo;\n\t}",
"public String getCGG_CVCTG_CODIGO(){\n\t\treturn this.myCgg_cvctg_codigo;\n\t}",
"@Test\n\tpublic void ricercaSinteticaClassificatoreGSAFigli() {\n\n\t}",
"private TMCourse() {\n\t}",
"public static void mmcc() {\n\t}",
"public double getTcCliente() {\r\n return tcCliente;\r\n }",
"void mo17021c();",
"public int getCoeficienteBernua()\n {\n return potenciaCV;\n }",
"private void loadMaTauVaoCBB() {\n cbbMaTau.removeAllItems();\n try {\n ResultSet rs = LopKetNoi.select(\"select maTau from Tau\");\n while (rs.next()) {\n cbbMaTau.addItem(rs.getString(1));\n }\n } catch (Exception e) {\n System.out.println(\"Load ma tau vao cbb that bai\");\n }\n\n }",
"public abstract java.lang.String getAcma_descripcion();",
"public void asetaTeksti(){\n }",
"public void tampilKarakterC(){\r\n System.out.println(\"Saya adalah binatang \");\r\n }",
"String getCmt();",
"java.lang.String getCit();",
"public void cocinar(){\n\n }",
"protected String usaVociCorrelate() {\n StringBuilder testo = new StringBuilder(VUOTA);\n String titolo = \"Voci correlate\";\n List<String> lista = listaCorrelate == null ? listaVociCorrelate() : listaCorrelate;\n String tag = \"*\";\n\n if (array.isValid(lista)) {\n testo.append(LibWiki.setParagrafo(titolo));\n testo.append(A_CAPO);\n for (String riga : lista) {\n testo.append(tag);\n testo.append(LibWiki.setQuadre(riga));\n testo.append(A_CAPO);\n }// end of for cycle\n testo.append(A_CAPO);\n }// end of if cycle\n\n return testo.toString();\n }",
"String getCADENA_TRAMA();",
"C15430g mo56154a();",
"public Controlador(JTextField tfMinutos,JTextField tfKgs, JComboBox cbEjercicios,JLabel laKCalResult) {\n\t\tcoleccionEj = new TiposEjercicios();\n\t\tthis.tfMinutos = tfMinutos;\n\t\tthis.tfKgs = tfKgs;\n\t\tthis.cbEjercicios = cbEjercicios;\n\t\tthis.laKCalResult = laKCalResult;\n\t\t\n\t}",
"public static void mcdc() {\n\t}",
"@Override public int conocerMonto(){\n\treturn 120;\n }",
"public String tipoConta() {\n return \"Conta Comum\";\n }",
"public PnlDatosSolicitanteGarante() {\n initComponents();\n }",
"private DittaAutonoleggio(){\n \n }",
"private USI_TRLT() {}",
"int getCedula();",
"@Override\n protected String elaboraFooterCorrelate() {\n String text = CostBio.VUOTO;\n\n if (usaFooterCorrelate) {\n text += \"==Voci correlate==\";\n text += A_CAPO;\n text += LibWiki.setRigaQuadre(LibText.levaCoda(PATH_ANTRO, \"/\"));\n text += LibWiki.setRigaQuadre(PATH_ANTRO + \"Cognomi\");\n text += LibWiki.setRigaQuadre(PATH_ANTRO + \"Didascalie\");\n }// end of if cycle\n\n return text;\n }",
"void mo88524c();",
"public String getCVCTG_NOMBRE(){\n\t\treturn this.myCvctg_nombre;\n\t}",
"public ControladorCoche() {\n\t}",
"public cola_de_un_banco(){// se crea nuestro metodo costructor \r\n primero=null;//se crea el tipo de indicaciones con valor a null\r\n ultimo=null;\r\n}",
"public void obtener_proximo_cpte(){\n\t\t_Data data=(_Data) _data;\n\t\tString cb=data.getProximoPGCorrecto();\n\t\t//Pago_frame _frame=(Pago_frame) this._frame;\n\t\tframe.get_txt_idPago().setText(cb);\n\t}",
"public CarteCaisseCommunaute() {\n super();\n }",
"void mo12638c();",
"public DataTable getDtCuentaContable()\r\n/* 309: */ {\r\n/* 310:375 */ return this.dtCuentaContable;\r\n/* 311: */ }",
"public beli_kredit() {\n initComponents();\n koneksitoko();\n }",
"C11316t5 mo29022j0();",
"public int \r\nomStudent_dTotalReqChapelsCurTrm( View mStudent,\r\n String InternalEntityStructure,\r\n String InternalAttribStructure,\r\n Integer GetOrSetFlag )\r\n{\r\n zVIEW lTermLST = new zVIEW( );\r\n //:VIEW lTermLST2 BASED ON LOD lTermLST\r\n zVIEW lTermLST2 = new zVIEW( );\r\n //:INTEGER CurrentRequiredChapels\r\n int CurrentRequiredChapels = 0;\r\n int RESULT = 0;\r\n\r\n\r\n //:CASE GetOrSetFlag\r\n switch( GetOrSetFlag )\r\n { \r\n //:OF zDERIVED_GET:\r\n case zDERIVED_GET :\r\n\r\n //:// Get the number of Chapels Required for the current Term from the lTermLST object.\r\n //:IF mStudent.Student.NumberOfChapelsRequired != \"\" \r\n if ( CompareAttributeToString( mStudent, \"Student\", \"NumberOfChapelsRequired\", \"\" ) != 0 )\r\n { \r\n //:// The number of Chapels required is set specifically for the Student.\r\n //:CurrentRequiredChapels = mStudent.Student.NumberOfChapelsRequired \r\n {MutableInt mi_CurrentRequiredChapels = new MutableInt( CurrentRequiredChapels );\r\n GetIntegerFromAttribute( mi_CurrentRequiredChapels, mStudent, \"Student\", \"NumberOfChapelsRequired\" );\r\n CurrentRequiredChapels = mi_CurrentRequiredChapels.intValue( );}\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:// The number of Chapels required is from the value in the College Term.\r\n //:GET VIEW lTermLST NAMED \"lTermLST\"\r\n RESULT = GetViewByName( lTermLST, \"lTermLST\", mStudent, zLEVEL_TASK );\r\n //:IF RESULT >= 0\r\n if ( RESULT >= 0 )\r\n { \r\n //:CreateViewFromView( lTermLST2, lTermLST )\r\n CreateViewFromView( lTermLST2, lTermLST );\r\n //:SET CURSOR FIRST lTermLST2.CollegeTerm WHERE lTermLST2.CollegeTerm.CurrentTermFlag = \"Y\" \r\n RESULT = lTermLST2.cursor( \"CollegeTerm\" ).setFirst( \"CurrentTermFlag\", \"Y\" ).toInt();\r\n //:CurrentRequiredChapels = lTermLST2.CollegeTerm.NumberOfChapelsRequired \r\n {MutableInt mi_CurrentRequiredChapels = new MutableInt( CurrentRequiredChapels );\r\n GetIntegerFromAttribute( mi_CurrentRequiredChapels, lTermLST2, \"CollegeTerm\", \"NumberOfChapelsRequired\" );\r\n CurrentRequiredChapels = mi_CurrentRequiredChapels.intValue( );}\r\n //:DropView( lTermLST2 )\r\n DropView( lTermLST2 );\r\n //:ELSE\r\n } \r\n else\r\n { \r\n //:CurrentRequiredChapels = 0\r\n CurrentRequiredChapels = 0;\r\n } \r\n\r\n //:END\r\n } \r\n\r\n //:END\r\n\r\n //:StoreValueInRecord ( mStudent,\r\n //: InternalEntityStructure, InternalAttribStructure, CurrentRequiredChapels, 0 )\r\n StoreValueInRecord( mStudent, InternalEntityStructure, InternalAttribStructure, CurrentRequiredChapels, 0 );\r\n break ;\r\n\r\n //: /* end zDERIVED_GET */\r\n //:OF zDERIVED_SET:\r\n case zDERIVED_SET :\r\n break ;\r\n } \r\n\r\n\r\n //: /* end zDERIVED_SET */\r\n //:END /* case */\r\n return( 0 );\r\n// END\r\n}",
"@Override\n public String comer(String c)\n {\n c=\"Gato No puede Comer Nada\" ;\n \n return c;\n }",
"protected void createCbgeneralcontrolAnnotations() {\n\t\tString source = \"cbgeneralcontrol\";\t\n\t\taddAnnotation\n\t\t (getClarityAbstractObject_ClarityConnection(), \n\t\t source, \n\t\t new String[] {\n\t\t\t \"label\", \"Clarity Connection:\",\n\t\t\t \"type\", \"Text\"\n\t\t });\n\t}",
"public DetalleTablaComplementario() {\r\n }",
"public BilanComptable() {\n initComponents();\n \n \n \n }",
"@Override\n protected String elaboraFooterCategorie() {\n String text = CostBio.VUOTO;\n\n text += A_CAPO;\n text += LibWiki.setRigaCat(\"Liste di persone per cognome| \");\n text += LibWiki.setRigaCat(\"Progetto Antroponimi|Cognomi\");\n\n return text;\n }",
"@Override\r\n\tpublic void retirer(double mt, String cpte, Long codeEmp) {\n\t dao.addOperation(new Retrait(new Date(),mt), cpte, codeEmp);\r\n\t Compte cp=dao.consulterCompte(cpte);\r\n\t cp.setSolde(cp.getSolde()-mt);\r\n\r\n\t}",
"public TelaCidadaoDescarte() {\n initComponents();\n }",
"public String getAutorizacionCompleto()\r\n/* 184: */ {\r\n/* 185:316 */ return this.establecimiento + \"-\" + this.puntoEmision + \" \" + this.autorizacion;\r\n/* 186: */ }",
"public DataTable getDtMotivoLlamadoAtencion()\r\n/* 134: */ {\r\n/* 135:140 */ return this.dtMotivoLlamadoAtencion;\r\n/* 136: */ }",
"public frmTaquilla() {\n initComponents();\n \n objSalaSecundaria.setCapacidad(250);\n objSalaSecundaria.setPrecioEntrada(180.0);//esto equivale a asignar los valores a través de de los metodos set\n libres1.setText(\"LIBRES \" + objSalaCentral.getCapacidad());\n }",
"public void mo97906c() {\n }",
"public void CARGARCODIGO(String console,String charI,String charF,NSRTableModel t){\n\t\tList<DGENERACIONCODIGOS> listDGeneracionCodigo =new ArrayList<DGENERACIONCODIGOS>();\n\t\tMap<String,String> mapa;\n\t\tint j=0;\n\t\tString codigo=\"\";\n\t\t/*LIMPIAR PANEL*/\n\t\ttry{\n\t\t\t//listGeneracionCodigo \t=\t(new GENERACIONCODIGOSDao()).listar(1,\"IDEMPRESA = ? and PARAMETRO = ?\",ConfigInicial.LlenarConfig()[8].toString(),\"FrmPackingList\");\n//\t\t\tlistDGeneracionCodigo \t=\t(new DGENERACIONCODIGOSDao()).listar();\n\t\t\t/*****************************TRAER DATOS DE CONSOLE*************************/\n\t\t\tArrayList<String> listcodigo=new ArrayList<String>();\n\t\t\tfor(int x=1;x<=listGeneracionCodigo.size();x++){\n\t\t\t\tlistcodigo.add(codigo=Constantes.buscarFragmentoTexto(console,charI,charF,x));\n\t\t\t}\n\t\t\t/**************************RECORRER CABECERA********************************/\n\t\t\tfor(GENERACIONCODIGOS gc : listGeneracionCodigo){\n\t\t\t\tmapa= new HashMap<String,String>();\n\t\t\t\tlistDGeneracionCodigo \t=\t(new DGENERACIONCODIGOSDao()).listar(1,\"IDEMPRESA = ? and IDGENERACION = ?\",gc.getIDEMPRESA(),gc.getIDGENERACION());\n\t\t\t\t/*BUSCAR CÓDIGO CON LONGITUD REQUERIDA*/\n\t\t\t\tcodigo=buscarCadenaxLongitud(listcodigo,gc.getBARCODETOTAL());\n\t\t\t\tj=0;\n\t\t\t\tfor(DGENERACIONCODIGOS dgc : listDGeneracionCodigo){\n\t\t\t\t\tmapa.put(dgc.getPARAMETRO(), codigo.substring(j,j+dgc.getNUMDIGITO()));\n\t\t\t\t\tj+=dgc.getNUMDIGITO();\n\t\t\t\t}\n\t\t\t\t/**********************************LLENAR DATOS**************************************/\n\t\t\t\tmapaGen = mapa;\n\t\t\t\tt.addRow(new Object[] { getPack().getIDEMPRESA(), getPack().getIDSUCURSAL(), getPack().getIDPACKING(),\n\t\t\t\t\t\tgetDetalleTM().getRowCount() + 1, mapaGen.get(\"NROPALETA\"),mapaGen.get(\"IDPRODCUTO\"), \"\",mapaGen.get(\"IDLOTEP\"), \"\", \"\", 0.0, 0.0, 0.0 });\n\t\t\t\t\tmapaGen = new HashMap<String,String>();\n\t\t\t}\n\t\t}catch (NisiraORMException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tConstantes.log.warn(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public String getcZt() {\n return cZt;\n }",
"public String getcZt() {\n return cZt;\n }",
"public String getcZt() {\n return cZt;\n }",
"public Ventana_HistoriaClinica() {\n initComponents();\n }",
"public String getCitta() {\n return citta;\n }",
"public int getCpscCase() { return cpscCase; }",
"public void ListarVehiculosCiatCasaCiat() throws GWorkException {\r\n\t\ttry {\r\n\t\t\tDate dtFechaInicio;\r\n\t\t\tDate dtFechaFin;\r\n\t\t\tLong idPeriodo = 1L;\r\n\r\n\t\t\tdtFechaInicio = ManipulacionFechas\r\n\t\t\t\t\t.getMesAnterior(ManipulacionFechas.getFechaActual());\r\n\r\n\t\t\t// Integer mes = Integer.valueOf(ManipulacionFechas\r\n\t\t\t// .getMes(ManipulacionFechas.getFechaActual()));\r\n\t\t\tCalendar calendario = Calendar.getInstance();\r\n\r\n\t\t\tcalendario.setTime(dtFechaInicio);\r\n\t\t\tcalendario.set(Calendar.DAY_OF_MONTH, 5);\r\n\t\t\t// calendario.set(Calendar.MONTH, mes - 2);\r\n\r\n\t\t\tdtFechaInicio = calendario.getTime();\r\n\r\n\t\t\tdtFechaFin = ManipulacionFechas.getFechaActual();\r\n\t\t\tcalendario.setTime(dtFechaFin);\r\n\t\t\tcalendario.set(Calendar.DAY_OF_MONTH, 4);\r\n\r\n\t\t\tdtFechaFin = calendario.getTime();\r\n\r\n\t\t\tList<BillingAccountVO> vehiculos = listVehiclesFlatFileCiatCasaCiat(\r\n\t\t\t\t\tdtFechaInicio, dtFechaFin);\r\n\r\n\t\t\tReporteCobroCiatCasaCiat(vehiculos, idPeriodo);\r\n\t\t\tEntityManagerHelper.getEntityManager().getTransaction().begin();\r\n\t\t\tEntityManagerHelper.getEntityManager().getTransaction().commit();\r\n\t\t} catch (RuntimeException re) {\r\n\t\t\tlog.error(\"ListarVehiculosCiatCasaCiat\",re);\r\n\t\t\tthrow new GworkRuntimeException(\"[INFO] - \" + re.getMessage(), re);\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(\"ListarVehiculosCiatCasaCiat\",e);\r\n\t\t\tthrow new GWorkException(\r\n\t\t\t\t\t\"No se pudo generar el comprobante [ERROR] - \"\r\n\t\t\t\t\t\t\t+ e.getMessage(), e);\r\n\r\n\t\t}\r\n\t}",
"public TELA_DE_CARREGAMENTO() {\n initComponents();\n }",
"public String getEstablecimiento()\r\n/* 114: */ {\r\n/* 115:188 */ return this.establecimiento;\r\n/* 116: */ }",
"C12017a mo41088c();",
"public ControladorCombate(int tipo_simulacion,\r\n Entrenador entrenador1, Entrenador entrenador2, ControladorPrincipal cp){\r\n this.esLider = false;\r\n this.controlador_principal = cp;\r\n this.tipo_simulacion = tipo_simulacion;\r\n this.combate = new Combate();\r\n this.equipo1 = entrenador1.getPokemones();\r\n this.equipo2 = entrenador2.getPokemones();\r\n this.entrenador1 = entrenador1;\r\n this.entrenador2 = entrenador2;\r\n this.vc = new VistaCombate();\r\n this.va = new VistaAtaque();\r\n this.ve = new VistaEquipo();\r\n this.creg = new ControladorRegistros();\r\n String[] nombres1 = new String[6];\r\n String[] nombres2 = new String[6];\r\n for (int i = 0; i < 6; i++) {\r\n nombres1[i]=equipo1[i].getPseudonimo();\r\n nombres2[i]=equipo2[i].getPseudonimo(); \r\n }\r\n this.vpc = new VistaPreviaCombate(tipo_simulacion, entrenador1.getNombre(), entrenador2.getNombre());\r\n this.vpc.agregarListener(this);\r\n this.vpc.setjC_Equipo1(nombres1);\r\n this.vpc.setjC_Equipo2(nombres2);\r\n this.vpc.setVisible(true);\r\n this.termino = false;\r\n resetearEntrenadores();\r\n }",
"Integer getChnlCde();",
"public CreateAccout() {\n initComponents();\n showCT();\n ProcessCtr(true);\n }",
"public int getCxlangue() {\r\r\r\r\r\r\r\n return cxlangue;\r\r\r\r\r\r\r\n }",
"public TacChrtypmstVOImpl() {\n }",
"private AppLnmMcaBl() {\n\t\tsuper(\"APP_LNM_MCA_BL\", Wetrn.WETRN);\n\t}",
"public String getCROSG_CODIGO(){\n\t\treturn this.myCrosg_codigo;\n\t}",
"public void mo21878t() {\n }",
"Kerucut(){\r\n Tabung tab = new Tabung();\r\n tinggi=tab.getTinggi();\r\n }",
"public mbvBoletinPeriodo() {\r\n }",
"public SystematicAcension_by_LiftingTechnology() {\n\n\t}",
"@Override\r\n\tpublic void verser(double mt, String cpte, Long codeEmp) {\n dao.addOperation(new Versement(new Date(),mt), cpte, codeEmp);\r\n Compte cp=dao.consulterCompte(cpte);\r\n cp.setSolde(cp.getSolde()+mt);\r\n\t}",
"public mbvConsolidadoPeriodoAnteriores() {\r\n }",
"@Override\n\tpublic String getCouleur() {\n\t\treturn null;\n\t}",
"public String getCocAtcn() {\n\t\treturn cocAtcn;\n\t}",
"void mo1749a(C0288c cVar);",
"public contrustor(){\r\n\t}",
"public int ger_nrLuggageCovBelt(){\r\n return this.nrLuggageConvBelt;\r\n }",
"void mo4874b(C4718l c4718l);",
"public String getAutorizacion()\r\n/* 134: */ {\r\n/* 135:226 */ return this.autorizacion;\r\n/* 136: */ }",
"public ComponenteCosto getComponenteCosto()\r\n/* 68: */ {\r\n/* 69: 91 */ return this.componenteCosto;\r\n/* 70: */ }",
"public void mo115190b() {\n }",
"public CorteCaja() {\n initComponents();\n this.setResizable(false);\n fecha = fecha();\n consultaventas();\n consultacambios();\n CulsultaApartados();\n this.setResizable(false);\n LblSubTotal.setText(Double.toString(subtotal));\n LblParesVendidos.setText(Integer.toString(pares));\n LblCambiosRealizados.setText(Integer.toString(ii));\n LblEfectivo.setText(Double.toString(efectivo));\n LblApartados.setText(Double.toString(apartar));\n LblNumApartados.setText(Integer.toString(apartados));\n\n }"
]
| [
"0.6175511",
"0.589491",
"0.5887771",
"0.5783924",
"0.5730793",
"0.57200295",
"0.57200295",
"0.5697986",
"0.5695501",
"0.5673555",
"0.5670875",
"0.5666339",
"0.5656729",
"0.56466687",
"0.56249",
"0.5617913",
"0.5614103",
"0.5606851",
"0.56047803",
"0.5603133",
"0.56024015",
"0.55842507",
"0.55768234",
"0.5569348",
"0.55602074",
"0.5560102",
"0.5548485",
"0.5544334",
"0.5543319",
"0.55398566",
"0.5530355",
"0.5529573",
"0.55279815",
"0.55268115",
"0.55254096",
"0.5524979",
"0.550996",
"0.55064636",
"0.55038434",
"0.5503835",
"0.54755455",
"0.5470653",
"0.54637605",
"0.5458525",
"0.5457205",
"0.54507816",
"0.54469436",
"0.54458255",
"0.5443964",
"0.54409564",
"0.54405165",
"0.5436556",
"0.54282457",
"0.54264086",
"0.54234946",
"0.54229283",
"0.54207015",
"0.5419268",
"0.54147536",
"0.5414281",
"0.54124606",
"0.5410574",
"0.5403149",
"0.5395531",
"0.5394567",
"0.5392112",
"0.53898686",
"0.5386331",
"0.5386331",
"0.5386331",
"0.53660846",
"0.5362434",
"0.5361845",
"0.53618",
"0.53569245",
"0.5353752",
"0.53513205",
"0.5346235",
"0.5336205",
"0.5335986",
"0.5335545",
"0.5329982",
"0.5329659",
"0.53263074",
"0.5325346",
"0.5324245",
"0.5321966",
"0.5316966",
"0.531694",
"0.5313586",
"0.5312967",
"0.5311179",
"0.5308651",
"0.53081954",
"0.53042805",
"0.5300622",
"0.5298003",
"0.5296919",
"0.52931464",
"0.5289284"
]
| 0.84012896 | 0 |
Created by sudh on 3/28/2015. | @Component
public interface ModeratorRepository extends MongoRepository<Moderator, Integer> {
Moderator save(Moderator saved);
//Moderator findOne(int id);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\n\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}",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\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 anular() {\n\n\t}",
"public void mo38117a() {\n }",
"private void poetries() {\n\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n public void init() {\n\n }",
"protected boolean func_70814_o() { return true; }",
"private void m50366E() {\n }",
"public void mo4359a() {\n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"private void init() {\n\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void kk12() {\n\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\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 public void init() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n protected void getExras() {\n }",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\tpublic void init() {}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void init()\n\t{\n\n\t}",
"@Override\n\tpublic void init() {\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"private void strin() {\n\n\t}",
"@Override\n public void init() {}",
"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\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\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 protected void initialize() \n {\n \n }",
"public void mo21877s() {\n }",
"@Override\n public int describeContents() { return 0; }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"public void method_4270() {}",
"public void mo12930a() {\n }",
"@Override\n public void memoria() {\n \n }",
"public void m23075a() {\n }",
"private void init() {\n\n\n\n }",
"public void mo21779D() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"public void mo6081a() {\n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"protected void mo6255a() {\n }"
]
| [
"0.6104785",
"0.60510546",
"0.60356945",
"0.60161084",
"0.59092486",
"0.59092486",
"0.58910424",
"0.5880325",
"0.5865359",
"0.5831054",
"0.58290905",
"0.58188593",
"0.5803197",
"0.57861394",
"0.57861394",
"0.57861394",
"0.57861394",
"0.57861394",
"0.5780238",
"0.5776798",
"0.57738304",
"0.5773678",
"0.57677895",
"0.57610923",
"0.57591265",
"0.57557416",
"0.5727799",
"0.5721696",
"0.5718273",
"0.5714407",
"0.56897974",
"0.56869704",
"0.56811",
"0.56766087",
"0.56678575",
"0.5655286",
"0.5643444",
"0.56426525",
"0.56376654",
"0.56376654",
"0.56376654",
"0.5634359",
"0.5634359",
"0.5627116",
"0.5627116",
"0.5627116",
"0.56122845",
"0.56059843",
"0.56032336",
"0.56032336",
"0.56032336",
"0.56022453",
"0.5579777",
"0.55786586",
"0.55743706",
"0.5573896",
"0.5573896",
"0.5568741",
"0.5555919",
"0.55540144",
"0.55510575",
"0.55510575",
"0.5549237",
"0.5547932",
"0.5547793",
"0.55468047",
"0.5544161",
"0.55351156",
"0.55351156",
"0.55351156",
"0.55351156",
"0.55351156",
"0.55351156",
"0.55351156",
"0.55321664",
"0.5531137",
"0.55297726",
"0.55274487",
"0.55065864",
"0.5502413",
"0.5490326",
"0.5490326",
"0.5490326",
"0.5490326",
"0.5490326",
"0.5490326",
"0.5481029",
"0.54774135",
"0.5472681",
"0.54715425",
"0.5456179",
"0.5452112",
"0.544987",
"0.544488",
"0.54446536",
"0.5442222",
"0.5440118",
"0.5434985",
"0.54347235",
"0.5431005",
"0.54297245"
]
| 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void save(List<PayRollLock> payRollLock) {
payRollLockRepository.save(payRollLock);
} | {
"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 PayRollLock findpayRollLock(String processMonth, Long departmentId) {
return payRollLockRepository.findpayRollLock(processMonth, departmentId);
} | {
"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 List<PayRollLock> findpayRollLock(String processMonth) {
return payRollLockRepository.findpayRollLock(processMonth);
} | {
"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 |
deli podla pravidla sql prikaz a vracia list jeho vykonatelnych alt casti | @Override
public List<String> applyRule(final String sqlSelectQuery) {
//pre istotu cistim, v testoch mam viac stringov po sebe
sqlBlocks.clear();
joinTypeBlocks.clear();
List<String> parts = new ArrayList<String>();
//vycistenie od riadkov, trim, a 1+medizer za jednu medzeru
String workingSQL = RuleUtils.clearSqlStatement(sqlSelectQuery);
//check ci obsahuje JOIN
while (workingSQL.toUpperCase().contains(RULE_KEY)) {
int indexOfJoin = workingSQL.indexOf(RULE_KEY);
//najdem index JOIN a poslem do metody na najdenie jeho celeho tvaru
String foundJOIN = whatFormOfJoin(workingSQL, indexOfJoin);
//najdeny cely tvar odseknem a pridam part
String part = workingSQL.substring(0, workingSQL.indexOf(foundJOIN));
//skratim working string pre cyklus while
workingSQL = workingSQL.substring(indexOfJoin + 4);
//pridam part
sqlBlocks.add(part);
}
lastPart = workingSQL;
//mam stavebne bloky a zapnam magicku funkciu
List<String> variations = makeVariations(sqlBlocks, joinTypeBlocks, lastPart);
//nabucham variacie ak su do vysledku
for (String s : variations) {
parts.add(s);
}
return parts;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<?> getListSQLDinamic(String sql) throws Exception {\n\t\treturn null;\n\t}",
"List<T> getSQLList(String sql);",
"@Override\n\tpublic List queryForList(String sql) {\n\t\treturn this.baseDaoSupport.queryForList(sql);\n\t}",
"List<ParqueaderoEntidad> listar();",
"public List select(String sql, Object[] obj) {\n\t\treturn null;\n\t}",
"public List listBySql(String sql) throws Exception {\n\t\treturn null;\r\n\t}",
"public List<Object[]> getRetencionesAnuladas(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden, TipoComprobanteSRI tipoComprobante)\r\n/* 125: */ {\r\n/* 126:175 */ StringBuilder sql = new StringBuilder();\r\n/* 127: */ \r\n/* 128:177 */ sql.append(\" SELECT a.fechaEmisionDocumento, f.fechaRegistro, f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), f.identificacionProveedor, \");\r\n/* 129: */ \r\n/* 130:179 */ sql.append(\" \\t'', f.montoIva*0, f.montoIva*0, f.montoIva*0, '', '', \");\r\n/* 131: */ \r\n/* 132:181 */ sql.append(\" \\tCONCAT(a.establecimiento,'-',a.puntoEmision,'-',a.numeroDesde), f.montoIva*0, f.montoIva*0, f.montoIva*0, f.nombreProveedor, \");\r\n/* 133: */ \r\n/* 134:183 */ sql.append(\"\\tf.montoIva*0, f.montoIva*0, '', a.autorizacion, f.fechaRegistro, f.autorizacion, '', 'ANULADO', f.idFacturaProveedorSRI,'' \");\r\n/* 135:184 */ sql.append(\" FROM AnuladoSRI a, FacturaProveedorSRI f \");\r\n/* 136:185 */ sql.append(\" WHERE a.documentoRelacionado = f.idFacturaProveedorSRI \");\r\n/* 137:186 */ sql.append(\" AND a.tipoComprobanteSRI = :tipoComprobante \");\r\n/* 138:187 */ sql.append(\" AND a.anio = :anio AND a.mes = :mes \");\r\n/* 139:188 */ sql.append(\" AND a.idOrganizacion = :idOrganizacion \");\r\n/* 140:189 */ if (sucursalFP != null) {\r\n/* 141:190 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 142: */ }\r\n/* 143:192 */ if (sucursalRetencion != null) {\r\n/* 144:193 */ sql.append(\" AND a.establecimiento = :sucursalRetencion \");\r\n/* 145: */ }\r\n/* 146:195 */ if (puntoVentaRetencion != null) {\r\n/* 147:196 */ sql.append(\" AND a.puntoEmision = :puntoVentaRetencion \");\r\n/* 148: */ }\r\n/* 149:198 */ Query query = this.em.createQuery(sql.toString());\r\n/* 150:199 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 151:200 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 152:201 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 153:202 */ query.setParameter(\"tipoComprobante\", tipoComprobante);\r\n/* 154:203 */ if (sucursalFP != null) {\r\n/* 155:204 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 156: */ }\r\n/* 157:206 */ if (sucursalRetencion != null) {\r\n/* 158:207 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 159: */ }\r\n/* 160:209 */ if (puntoVentaRetencion != null) {\r\n/* 161:210 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 162: */ }\r\n/* 163:213 */ return query.getResultList();\r\n/* 164: */ }",
"public <T> List<T> getResultList(Class<T> clz,String sql){\n\t\treturn new ArrayList<T>();\r\n\t}",
"private void llenarListado1() {\r\n\t\tString sql1 = Sentencia1()\r\n\t\t\t\t+ \" where lower(cab.descripcion) = 'concurso' \" + \"and (\"\r\n\t\t\t\t+ \"\t\tdet.id_estado_det = (\" + \"\t\t\t\tselect est.id_estado_det \"\r\n\t\t\t\t+ \"\t\t\t\tfrom planificacion.estado_det est \"\r\n\t\t\t\t+ \"\t\t\t\twhere lower(est.descripcion)='libre'\" + \"\t\t) \"\r\n\t\t\t\t+ \"\t\tor det.id_estado_det is null\" + \"\t) \"\r\n\t\t\t\t+ \" and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" AND det.activo=true\";\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO SIMPLIFICADO Se despliegan los puestos\r\n\t\t * PERMANENTES o CONTRATADOS, con estado = LIBRE o NULO Los puestos\r\n\t\t * deben ser de nivel 1\r\n\t\t */\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_SIMPLIFICADO)) {\r\n\t\t\tsql1 += \" and cpt.nivel=1 and cpt.activo=true and (det.permanente is true or det.contratado is true) \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INSTITUCIONAL Se\r\n\t\t * despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_OPOSICION)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\r\n\t\t/*\r\n\t\t * Tipo de concurso = CONCURSO INTERNO DE OPOSICION INTER INSTITUCIONAL\r\n\t\t * Se despliegan los puestos PERMANENTE, con estado = LIBRE o NULO\r\n\t\t */\r\n\r\n\t\tif (concurso.getDatosEspecificosTipoConc().getDescripcion()\r\n\t\t\t\t.equalsIgnoreCase(CONCURSO_INTERNO_INTERINSTITUCIONAL)) {\r\n\t\t\tsql1 += \" and det.permanente is true \";\r\n\t\t}\r\n\t\tString sql2 = Sentencia2()\r\n\t\t\t\t+ \" where lower(estado_det.descripcion) = 'en reserva' \"\r\n\t\t\t\t+ \"and uo_cab.id_configuracion_uo = \"\r\n\t\t\t\t+ configuracionUoCab.getIdConfiguracionUo()\r\n\t\t\t\t+ \" and concurso.id_concurso = \" + concurso.getIdConcurso()\r\n\t\t\t\t+ \" and puesto_det.activo=true\";\r\n\r\n\t\tcargarLista(sql1, sql2);\r\n\t}",
"public List<Dishes> selectLU(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='³²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"private List<FollowItem> query(String sql)\r\n {\r\n DbManager db=new DbManager();\r\n ResultSet rs=null;\r\n List<FollowItem> list=new ArrayList<FollowItem>();\r\n rs = db.getRs(sql);\r\n try {\r\n while(rs.next())\r\n {\r\n FollowItem followItem = new FollowItem();\r\n followItem.setUserId(rs.getInt(\"UserID\"));\r\n followItem.setListingId(rs.getInt(\"ListingID\"));\r\n \r\n list.add(followItem);\r\n }\r\n } catch (SQLException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n } finally{\r\n db.destory();\r\n }\r\n return list;\r\n }",
"public List<Tipo> listaTipo() throws SQLException{\n String sql= \"SELECT * FROM aux_tipo_obra\";\n ResultSet rs = null ;\n try {\n PreparedStatement stmt = connection.prepareStatement(sql);\n rs=stmt.executeQuery();\n List<Tipo> listaTipo = new ArrayList<>();\n \n while(rs.next()){\n Tipo tipo = new Tipo();\n tipo.setId(rs.getInt(\"id_tipo\"));\n tipo.setTipo(rs.getString(\"Tipo\"));\n listaTipo.add(tipo); \n }\n return listaTipo;\n }\n catch (SQLException e) {\n throw new RuntimeException(e);\n }\n }",
"public List<Lv1p2> listar()\n {\n \n List<Lv1p2> lista = new ArrayList<Lv1p2>();\n String sql = \"SELECT * FROM lv1p2\";\n PreparedStatement pst = Conexao.getPreparedStatement(sql);\n \n try {\n //Executo o aql e jogo em um resultSet\n ResultSet res = pst.executeQuery();\n //Eqaunto tiver REGISTRO eu vou relacionar\n //com a minha classe Jogador e adicionar na lista \n while(res.next())\n {\n Lv1p2 lv1p2 = new Lv1p2();\n lv1p2.setLota_pro(res.getDouble(\"lota_pro\"));\n lv1p2.setUsuario_id(res.getInt(\"usuario_id\"));\n lv1p2.setVacadecria(res.getInt(\"vaca_de_cria\"));\n lv1p2.setVacadedescarte(res.getInt(\"vaca_de_descarte\"));\n lv1p2.setTerneiro(res.getInt(\"terneiro\"));\n lv1p2.setTerneira(res.getInt(\"terneira\"));\n lv1p2.setNovilho1324(res.getInt(\"novilho_13a24\"));\n lv1p2.setNovilha1324(res.getInt(\"novilha_13a24\"));\n lv1p2.setNovilho2536(res.getInt(\"novilho_25a36\"));\n lv1p2.setNovilha2536(res.getInt(\"novilha_25a36\"));\n lv1p2.setNovilho36(res.getInt(\"novilho_36\"));\n lv1p2.setTouro(res.getInt(\"touro\"));\n lv1p2.setRebanhodecria(res.getInt(\"rebanho_de_cria\"));\n lista.add(lv1p2);\n }\n } catch(SQLException ex){\n \n ex.printStackTrace();\n }\n return lista;\n }",
"public List listaCarneMensalidadesAgrupado(String id_pessoa, String datas) {\n String and = \"\";\n\n if (id_pessoa != null) {\n and = \" AND func_titular_da_pessoa(M.id_beneficiario) IN (\" + id_pessoa + \") \\n \";\n }\n\n// String text\n// = \" -- CarneMensalidadesDao->listaCarneMensalidadesAgrupado(new Pessoa(), new Date()) \\n\\n\"\n// + \" SELECT P.ds_nome AS titular, \\n \"\n// + \" S.matricula, \\n \"\n// + \" S.categoria, \\n \"\n// + \" M.id_pessoa AS id_responsavel, \\n \"\n// + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor, \\n\"\n// + \" M.dt_vencimento AS vencimento \\n\"\n// + \" FROM fin_movimento AS M \\n\"\n// + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n// + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n// + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n// + \" WHERE is_ativo = true \\n\"\n// + \" AND id_baixa IS NULL \\n\"\n// + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \")\\n\"\n// + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n// + \" FROM fin_servico_rotina \\n\"\n// + \" WHERE id_rotina = 4 \\n\"\n// + \") \\n\"\n// + and\n// + \" GROUP BY P.ds_nome, \\n\"\n// + \" S.matricula, \\n\"\n// + \" S.categoria, \\n\"\n// + \" M.id_pessoa, \\n\"\n// + \" M.dt_vencimento \\n\"\n// + \" ORDER BY P.ds_nome, \\n\"\n// + \" M.id_pessoa\";\n String queryString = \"\"\n + \"( \\n\"\n + \" -- CarneMensalidadesDao->listaCarneMensalidadesAgrupado(new Pessoa(), new Date()) \\n\"\n + \" \\n\"\n + \" SELECT P.ds_nome AS titular, \\n\"\n + \" S.matricula AS matricula, \\n\"\n + \" S.categoria AS categoria, \\n\"\n + \" M.id_pessoa AS id_responsavel, \\n\"\n + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor, \\n\"\n + \" M.dt_vencimento AS vencimento, \\n\"\n + \" '' AS servico , \\n\"\n + \" 0 AS quantidade \\n\"\n + \" FROM fin_movimento AS M \\n\"\n + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n + \" WHERE is_ativo = true \\n\"\n + \" AND id_baixa IS NULL \\n\"\n + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \") \\n\"\n + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n + \" FROM fin_servico_rotina \\n\"\n + \" WHERE id_rotina = 4 \\n\"\n + \") \\n\"\n + and\n + \" GROUP BY P.ds_nome, \\n\"\n + \" S.matricula, \\n\"\n + \" S.categoria, \\n\"\n + \" M.id_pessoa, \\n\"\n + \" M.dt_vencimento \\n\"\n + \") \\n\"\n + \" \\n\"\n + \" \\n\"\n + \"UNION \\n\"\n + \" \\n\"\n + \" \\n\"\n + \" \\n\"\n + \"( \\n\"\n + \" SELECT P.ds_nome AS titular, \\n\"\n + \" S.matricula AS matricula, \\n\"\n + \" S.categoria AS categoria, \\n\"\n + \" M.id_pessoa AS id_responsavel, \\n\"\n + \" sum(nr_valor - nr_desconto_ate_vencimento) AS valor,\\n\"\n + \" '01/01/1900' AS vencimento, \\n\"\n + \" SE.ds_descricao AS servico, \\n\"\n + \" count(*) AS quantidade \\n\"\n + \" FROM fin_movimento AS M \\n\"\n + \" INNER JOIN fin_servicos AS SE ON SE.id = M.id_servicos \\n\"\n + \" INNER JOIN pes_pessoa AS P ON P.id = M.id_pessoa \\n\"\n + \" INNER JOIN pes_pessoa AS B ON B.id = M.id_beneficiario \\n\"\n + \" LEFT JOIN soc_socios_vw AS S ON S.codsocio = M.id_pessoa \\n\"\n + \" WHERE is_ativo = true \\n\"\n + \" AND id_baixa IS NULL \\n\"\n + \" AND to_char(M.dt_vencimento, 'MM/YYYY') IN (\" + datas + \")\\n\"\n + \" AND M.id_servicos NOT IN (SELECT id_servicos \\n\"\n + \" FROM fin_servico_rotina \\n\"\n + \" WHERE id_rotina = 4 \\n\"\n + \") \\n\"\n + and\n + \" GROUP BY P.ds_nome, \\n\"\n + \" S.matricula, \\n\"\n + \" S.categoria, \\n\"\n + \" M.id_pessoa, \\n\"\n + \" SE.ds_descricao\\n\"\n + \") \\n\"\n + \" ORDER BY 1,4,6\";\n try {\n Query query = getEntityManager().createNativeQuery(queryString);\n return query.getResultList();\n } catch (Exception e) {\n e.getMessage();\n }\n return new ArrayList();\n }",
"public ArrayList<String> consultar(){\n PreparedStatement ps = null;\n ResultSet rs = null;\n Connection con = getConexion();\n PlanDeEstudio plan = new PlanDeEstudio();\n ArrayList<String> planes = new ArrayList<>();\n \n String sql = \"SELECT * FROM plan_estudio\";\n \n try{\n ps = con.prepareStatement(sql);\n rs = ps.executeQuery();\n \n while (rs.next()) {\n plan.setiD(Integer.parseInt((rs.getString(\"id_plan_estudio\"))));\n planes.add(Integer.toString((plan.getiD())));\n }\n return planes;\n \n }catch (SQLException e){\n System.err.println(e);\n return planes;\n \n } finally {\n try {\n con.close();\n } catch (SQLException e){\n System.err.println(e);\n }\n }\n }",
"public List<Map<String,Object>> ejecutarQuery(String sql){\n return this.jdbcTemplate.queryForList(sql);\n }",
"public List<ReporteRetencionesResumido> getRetencionSRIResumido(int mes, int anio, int idOrganizacion)\r\n/* 27: */ {\r\n/* 28: 58 */ String sql = \"SELECT new ReporteRetencionesResumido(f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision, CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero),\\tf.identificacionProveedor,c.descripcion,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) +COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) else COALESCE(dfp.baseImponibleRetencion, 0) end,dfp.porcentajeRetencion,dfp.valorRetencion,\\tc.codigo,CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA then 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE then 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD then 'ISD' else '' end,f.numeroRetencion) FROM DetalleFacturaProveedorSRI dfp INNER JOIN dfp.facturaProveedorSRI f INNER JOIN dfp.conceptoRetencionSRI c WHERE MONTH(f.fechaRegistro) =:mes\\tAND YEAR(f.fechaRegistro) =:anio AND f.estado!=:estadoAnulado AND f.indicadorSaldoInicial!=true AND f.idOrganizacion = :idOrganizacion\\tGROUP BY c.codigo,f.numero,f.puntoEmision,\\tf.establecimiento, f.identificacionProveedor,\\tc.descripcion,dfp.baseImponibleRetencion,dfp.porcentajeRetencion,dfp.valorRetencion,f.fechaEmisionRetencion,f.fechaRegistro,f.fechaEmision,f.numeroRetencion, c.tipoConceptoRetencion ORDER BY c.tipoConceptoRetencion, c.codigo \";\r\n/* 29: */ \r\n/* 30: */ \r\n/* 31: */ \r\n/* 32: */ \r\n/* 33: */ \r\n/* 34: */ \r\n/* 35: */ \r\n/* 36: */ \r\n/* 37: */ \r\n/* 38: */ \r\n/* 39: */ \r\n/* 40: */ \r\n/* 41: */ \r\n/* 42: */ \r\n/* 43: */ \r\n/* 44: */ \r\n/* 45: 75 */ Query query = this.em.createQuery(sql);\r\n/* 46: 76 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 47: 77 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 48: 78 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 49: 79 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 50: 80 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 51: 81 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 52: 82 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 53: 83 */ List<ReporteRetencionesResumido> lista = query.getResultList();\r\n/* 54: */ \r\n/* 55: 85 */ return lista;\r\n/* 56: */ }",
"@Override\n public List<Venda> listar() {\n String sql = \"SELECT v FROM venda v\";\n TypedQuery<Venda> query = em.createQuery(sql, Venda.class);\n List<Venda> resultList = query.getResultList();\n\n return resultList;\n }",
"public List<ItemVenda> getItemVenda(Lancamento lancamento) {\r\n\r\n List<ItemVenda> resultado = new ArrayList<ItemVenda>();\r\n Connection con = pool.getConnection();\r\n PreparedStatement ps = null;\r\n ResultSet rs = null;\r\n String sqlSelect = \"SELECT \\n\" +\r\n \" *\\n\" +\r\n \"FROM\\n\" +\r\n \" (SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PRODUTO AS CODIGO_PRODUTO,\\n\" +\r\n \" D.NOME_PRODUTO AS DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PRODUTO D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PRODUTO_CODIGO_PRODUTO = D.CODIGO_PRODUTO UNION ALL SELECT \\n\" +\r\n \" A.CODIGO_LANCAMENTO,\\n\" +\r\n \" D.CODIGO_PACOTE_PROMOCIONAL AS CODIGO_PRODUTO,\\n\" +\r\n \" D.DESCRICAO,\\n\" +\r\n \" C.QUANTIDADE,\\n\" +\r\n \" C.PRECO_TOTAL,\\n\" +\r\n \" C.PRECO_UNITARIO,\\n\" +\r\n \" C.TYPE_PRODUCT\\n\" +\r\n \" FROM\\n\" +\r\n \" LANCAMENTO A, VENDA B, ITEM_VENDA C, PACOTE_PROMOCIONAL D\\n\" +\r\n \" WHERE\\n\" +\r\n \" A.VENDA_CODIGO_VENDA = B.CODIGO_VENDA\\n\" +\r\n \" AND B.CODIGO_VENDA = C.VENDA_CODIGO_VENDA\\n\" +\r\n \" AND C.PACOTE_PROMOCIONAL_CODIGO_PACOTE_PROMOCIONAL = D.CODIGO_PACOTE_PROMOCIONAL) AS CONSULTA\\n\" +\r\n \" WHERE CODIGO_LANCAMENTO = ?\";\r\n\r\n try {\r\n ps = con.prepareStatement(sqlSelect);\r\n ps.setInt(1, lancamento.getCodigo_lancamento());\r\n\r\n rs = ps.executeQuery();\r\n\r\n resultado = getListaItensVenda(rs);\r\n\r\n ps.close();\r\n } catch (ParseException ex) {\r\n return null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(LocacaoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n pool.liberarConnection(con);\r\n }\r\n return resultado;\r\n }",
"public List<Dia> getDias(){\n List<Dia> result= null;\n Session session = sessionFactory.openSession();\n Transaction tx=null;\n try{\n tx=session.beginTransaction();\n String hql= \"FROM Dia\";\n Query query =session.createQuery(hql);\n result=(List<Dia>)query.list();\n tx.commit();\n }catch (Exception e){\n if(tx != null)\n tx.rollback();\n e.printStackTrace(); \n }finally{\n session.close();\n }\n return result;\n }",
"public ArrayList listarDetalleVenta(int codVenta){\n ArrayList<DetalleVentaConsulta> lista=new ArrayList<>();\n try {\n PreparedStatement pst=cn.prepareStatement(\"select dv.idVenta,dv.cantidad,p.nombreProducto,dv.precioUnidad from detalleVenta dv \\n\" +\n\"inner join producto p on p.idProducto=dv.nombreProducto\\n\" +\n\"where dv.idVenta=?\");\n pst.setInt(1, codVenta);\n ResultSet rs=pst.executeQuery();\n while (rs.next()) { \n lista.add(new DetalleVentaConsulta(rs.getInt(\"idVenta\"),rs.getInt(\"cantidad\"),rs.getDouble(\"precioUnidad\"),rs.getString(\"cancelado\"),rs.getString(\"nombreProducto\")));\n }rs.close();pst.close();\n } catch (Exception e) {\n System.out.println(\"listar Venta: \"+e.getMessage());\n }return lista;\n }",
"public List<Dishes> selectTian(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='Ìðµã' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"public List<Dishes> select(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where 1=1 \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n /*list.add(book.getBookname());\n list.add(book.getPrice());\n list.add(book.getAuthor());\n list.add(book.getPic());\n list.add(book.getPublish());*/\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"public List<GoleadoresDTO> listarTodo(int idTorneo,Connection conexion) throws MiExcepcion {\n ArrayList<GoleadoresDTO> listarGoleadores = new ArrayList();\n\n try {\n String query = \"SELECT DISTINCT usuarios.primerNombre, \" +\n\" usuarios.primerApellido, tablagoleadores.numeroGoles, tablagoleadores.idEquipo, \"+ \n\" tablagoleadores.idTorneo,tablagoleadores.idJugador, \" +\n\" equipo.nombre \" +\n\" FROM tablagoleadores \" +\n\" INNER JOIN jugadoresporequipo \" +\n\" ON tablagoleadores.idJugador = jugadoresporequipo.codigoJugador \" +\n\" INNER JOIN usuarios \" +\n\" ON jugadoresporequipo.codigoJugador = usuarios.idUsuario \" +\n\" INNER JOIN equiposdeltorneo \" +\n\" ON tablagoleadores.idEquipo = equiposdeltorneo.equipoCodigo \" +\n\" INNER JOIN equipo \" +\n\" ON equiposdeltorneo.equipoCodigo = equipo.codigo \" +\n\" INNER JOIN torneo \" +\n\" ON tablagoleadores.idTorneo = torneo.idTorneo \" +\n\" WHERE tablagoleadores.idTorneo = ? \" +\n\" AND equiposdeltorneo.torneoIdTorneo=? \" +\n\" ORDER BY numeroGoles DESC\";\n statement = conexion.prepareStatement(query);\n statement.setInt(1, idTorneo);\n statement.setInt(2, idTorneo);\n rs = statement.executeQuery();\n //mientras que halla registros cree un nuevo dto y pasele la info\n while (rs.next()) {\n //crea un nuevo dto\n GoleadoresDTO gol = new GoleadoresDTO();\n UsuariosDTO usu = new UsuariosDTO();\n EquipoDTO equipo = new EquipoDTO();\n //le pasamos los datos que se encuentren\n gol.setNumeroGoles(rs.getInt(\"numeroGoles\"));\n gol.setIdEquipo(rs.getInt(\"idEquipo\"));\n gol.setIdTorneo(rs.getInt(\"idTorneo\"));\n gol.setIdJugador(rs.getLong(\"idJugador\"));\n usu.setPrimerNombre(rs.getString(\"primerNombre\"));\n usu.setPrimerApellido(rs.getString(\"primerApellido\"));\n gol.setUsu(usu);//paso el usuario al objeto \n equipo.setNombre(rs.getString(\"nombre\"));\n gol.setEquipo(equipo);\n //agregamos el objeto dto al arreglo\n listarGoleadores.add(gol);\n\n }\n } catch (SQLException sqlexception) {\n throw new MiExcepcion(\"Error listando goles\", sqlexception);\n\n } \n// finally {\n// try{\n// if (statement != null) {\n// statement.close(); \n// }\n// }catch (SQLException sqlexception) {\n// throw new MiExcepcion(\"Error listando goles\", sqlexception);\n//\n// }\n// }\n //devolvemos el arreglo\n return listarGoleadores;\n\n }",
"public List<Tema> findBySql(String sql) {\n //SQLiteDatabase db = getReadableDatabase();\n Log.d(\"[IFMG]\", \"SQL: \" + sql);\n try {\n Log.d(\"[IFMG]\", \"Vai consultar\");\n Cursor c = dbr.rawQuery(sql, null);\n Log.d(\"[IFMG]\", \"Consultou...\");\n return toList(c);\n } finally {\n\n //dbr.close();\n }\n }",
"@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();",
"private void listaContatos() throws SQLException {\n limpaCampos();\n BdLivro d = new BdLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\");\n\n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }",
"public List sqlQuery(String sql,Object... params);",
"public List<Aluguel> listarAlugueisPorFilme(Filme filme) throws Exception{\n \n StringBuilder sql = new StringBuilder();\n sql.append(\" SELECT a.id id, a.data_aluguel data_aluguel, a.data_devolucao data_devolucao, a.valor valor, c.nome nome FROM aluguel a \"); \n sql.append(\" INNER JOIN aluguel_filme af ON af.aluguel_id = a.id INNER JOIN filme f ON f.id = af.filme_id \") ;\n sql.append(\" INNER JOIN cliente c on c.id = a.cliente_id \") ;\n sql.append(\" where f.titulo like ? \");\n sql.append(\" GROUP BY a.id, a.data_aluguel, a.data_devolucao, a.valor, c.nome \");\n \n Connection connection = ConexaoUtil.getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(sql.toString());\n preparedStatement.setString(1, \"%\" + filme.getTitulo() + \"%\");\n ResultSet resultSet = preparedStatement.executeQuery();\n \n List<Aluguel> alugueis = new ArrayList<Aluguel>();\n while(resultSet.next()){\n Aluguel aluguel = new Aluguel();\n aluguel.setId(resultSet.getLong(\"id\"));\n aluguel.setDataAluguel(resultSet.getDate(\"data_aluguel\"));\n aluguel.setDataDevolucao(resultSet.getDate(\"data_devolucao\"));\n aluguel.setValor(resultSet.getDouble(\"valor\"));\n Cliente cliente = new Cliente();\n cliente.setNome(resultSet.getString(\"nome\"));\n aluguel.setCliente(cliente);\n alugueis.add(aluguel);\n }\n resultSet.close();\n preparedStatement.close();\n connection.close();\n return alugueis;\n }",
"public List<Dishes> selectYue(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='ÔÁ²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}",
"List selectByExample(CTipoComprobanteExample example) throws SQLException;",
"public static List<Item> loadItems(Statement st) {\n\t\tList<Item> items = new ArrayList<>();\n\t\tString sentSQL = \"\";\n\t\ttry {\n\t\t\tsentSQL = \"select * from items\";\n\t\t\tResultSet rs = st.executeQuery(sentSQL);\n\t\t\t// Iteramos sobre la tabla result set\n\t\t\t// El metodo next() pasa a la siguiente fila, y devuelve true si hay más filas\n\t\t\twhile (rs.next()) {\n\t\t\t\tint id = rs.getInt(\"id\");\n\t\t\t\tString name = rs.getString(\"name\");\n\t\t\t\tfloat timePerUnit = rs.getFloat(\"timeperunit\");\n\t\t\t\tItem item = new Item(id, name, timePerUnit);\n\t\t\t\titems.add(item);\n\t\t\t\tlog(Level.INFO,\"Fila leida: \" + item, null);\n\t\t\t}\n\t\t\tlog(Level.INFO, \"BD consultada: \" + sentSQL, null);\n\t\t} catch (SQLException e) {\n\t\t\tlog(Level.SEVERE, \"Error en BD\\t\" + sentSQL, e);\n\t\t\tlastError = e;\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn items;\n\t}",
"@SuppressWarnings(\"unchecked\")\n public <T extends BaseEntity> List<T> select(String hql, List<Object> param) {\n Query q = this.getCurrentSession().createQuery(hql);\n if (param != null && param.size() > 0) {\n for (int i = 0; i < param.size(); i++) {\n q.setParameter(i, param.get(i));\n }\n }\n return q.list();\n }",
"public ArrayList<T> listagemDeEntidade(String strParaSelect) throws SQLException {\n ArrayList<T> listaEntidades = new ArrayList<>();\n String comandoSql = strParaSelect;\n try (Connection conect = MySqlConexao.geraConexao()) {\n try (PreparedStatement params = conect.prepareStatement(comandoSql)) {\n try (ResultSet dados = params.executeQuery()) {\n while (dados.next()) {\n T entidade = null;\n entidade = montaEntidade(dados);\n listaEntidades.add(entidade);\n }\n }\n }\n if (!conect.isClosed()) {\n conect.close();\n }\n } catch (IOException ex) {\n Logger.getLogger(MySqlDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n\n return listaEntidades;\n }",
"public List<String> selectSQL(final String sql, final Object... objects) {\n\t\tlogger.debug(\"select(), entered. sql: {}\", sql);\n\n\t\ttry (Handle handle = Jdbi.open(pooledDataSource.getConnection()); Query q = handle.createQuery(sql);) {\n\t\t\tfor (int i = 0; i < objects.length; i++) {\n\t\t\t\tq.bind(i, objects[i]);\n\t\t\t}\n\t\t\tfinal List<String> list = q.map((rs, ctx) -> {\n\t\t\t\treturn rs.getString(1);\n\t\t\t}).list();\n\t\t\thandle.close();\n\t\t\tlogger.debug(\"select(), exiting. list-size: {}\", list.size());\n\t\t\treturn list;\n\t\t} catch (final Exception e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"@Override\n\tpublic ArrayList select(String... args) throws SQLException {\n\t\treturn null;\n\t}",
"private void caricaLista() {\n /** variabili e costanti locali di lavoro */\n ArrayList unaLista = null;\n CampoDati unCampoDati = null;\n CDBLinkato unCampoDBLinkato = null;\n //@todo da cancellare\n try { // prova ad eseguire il codice\n /* recupera il campo DB specializzato */\n unCampoDBLinkato = (CDBLinkato)unCampoParente.getCampoDB();\n\n /* recupera la lista dal campo DB */\n unaLista = unCampoDBLinkato.caricaLista();\n\n /* recupera il campo dati */\n unCampoDati = unCampoParente.getCampoDati();\n\n /* registra i valori nel modello dei dati del campo */\n if (unaLista != null) {\n unCampoDati.setValoriInterni(unaLista);\n// unCampoDatiElenco.regolaElementiAggiuntivi();\n } /* fine del blocco if */\n\n } catch (Exception unErrore) { // intercetta l'errore\n /* mostra il messaggio di errore */\n Errore.crea(unErrore);\n } /* fine del blocco try-catch */\n\n }",
"public ArrayList<DTOcomentarioRta> listadoComentarioxComercio(int idComercio) {\n ArrayList<DTOcomentarioRta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\" select co.id_comercio, c.id_comentario, c.nombreUsuario, c.descripcion, c.valoracion, c.fecha, co.nombre , r.descripcion, r.fecha, r.id_rta, co.id_rubro\\n\"\n + \" from Comentarios c join Comercios co on c.id_comercio = co.id_comercio\\n\"\n + \" left join Respuestas r on r.id_comentario = c.id_comentario\\n\"\n + \" where co.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n int idcomentario = rs.getInt(2);\n String nombreU = rs.getString(3);\n String descripC = rs.getString(4);\n int valoracion = rs.getInt(5);\n String fechaC = rs.getString(6);\n String nombrecomercio = rs.getString(7);\n String descripcionR = rs.getString(8);\n String fechaR = rs.getString(9);\n int idR = rs.getInt(10);\n int rubro = rs.getInt(11);\n\n rubro rf = new rubro(rubro, \"\", true, \"\", \"\");\n comercio come = new comercio(nombrecomercio, \"\", \"\", id, true, \"\", \"\", rf, \"\");\n Comentario c = new Comentario(idcomentario, descripC, valoracion, nombreU, fechaC, come);\n respuestas r = new respuestas(idR, descripcionR, c, fechaR);\n DTOcomentarioRta cr = new DTOcomentarioRta(c, r);\n\n lista.add(cr);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }",
"public List<Empleat> obtenirEmpleatsQueTreballenOnViuen() throws UtilitatJdbcSQLException {\r\n JdbcPreparedQueryDao jdbcDao = new JdbcPreparedQueryDao() {\r\n @Override\r\n public Object writeObject(ResultSet rs) throws SQLException {\r\n int field=0;\r\n Empleat empleat = new Empleat();\r\n empleat.setCodi(rs.getInt(++field));\r\n empleat.setNom(rs.getString(++field));\r\n empleat.setCiutat(rs.getString(++field));\r\n \r\n Establiment est=new Establiment();\r\n est.setCodi(rs.getInt(++field));\r\n if(!rs.wasNull()){\r\n est.setNom(rs.getString(++field));\r\n est.setCiutat(rs.getString(++field));\r\n }else{\r\n est=null;\r\n }\r\n empleat.setEstabliment(est);\r\n \r\n return empleat;\r\n }\r\n\r\n @Override\r\n public String getStatement() {\r\n return \"SELECT e.codi, e.nom, e.ciutat, e.establiment, es.nom, es.ciutat FROM Empleat e JOIN Establiment es ON e.establiment = es.codi WHERE e.ciutat = es.ciutat\";\r\n }\r\n\r\n @Override\r\n public void setParameter(PreparedStatement pstm) throws SQLException {\r\n \r\n }\r\n };\r\n List<Empleat> empleat = UtilitatJdbcPlus.obtenirLlista(con, jdbcDao); \r\n return empleat;\r\n }",
"private static List<Pontohorario> getSchedulePointList(String hql)\n {\n List<Pontohorario> pointList = HibernateGenericLibrary.executeHQLQuery(hql);\n return pointList;\n }",
"public static List<String> buscarCategoriaDoLivro(){\n List<String> categoriasLivros=new ArrayList<>();\n Connection connector=ConexaoDB.getConnection();\n String sql=\"Select category from bookCategory\";\n Statement statement=null;\n ResultSet rs=null;\n String nome;\n try {\n statement=connector.createStatement();\n rs=statement.executeQuery(sql);\n while (rs.next()) {\n nome=rs.getString(\"category\");\n categoriasLivros.add(nome);\n }\n \n } catch (Exception e) {\n \n }finally{\n ConexaoDB.closeConnection(connector, statement, rs);\n }\n return categoriasLivros;\n}",
"public List<Object> sqlQuery(Class<Object> class1, String string) {\n return null;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tprivate void cargarLista(String sql1, String sql2) {\r\n\t\tlistaPlantaCargoDet = new ArrayList<PlantaCargoDet>();\r\n\t\tlistaPuestosReservados = new ArrayList<ConcursoPuestoDet>();\r\n\t\tlistaPlantaCargoDto = new ArrayList<PlantaCargoDetDTO>();\r\n\t\tlistaPlantaCargoDet = em.createNativeQuery(sql1, PlantaCargoDet.class)\r\n\t\t\t\t.getResultList();\r\n\t\tlistaPuestosReservados = em.createNativeQuery(sql2,\r\n\t\t\t\tConcursoPuestoDet.class).getResultList();\r\n\t\tif (listaPuestosReservados.size() > 0) {\r\n\t\t\tcantReservados = listaPuestosReservados.size();\r\n\t\t\tfor (ConcursoPuestoDet r : listaPuestosReservados) {\r\n\t\t\t\tPlantaCargoDetDTO dto = new PlantaCargoDetDTO();\r\n\t\t\t\tLong id = r.getPlantaCargoDet().getIdPlantaCargoDet();\r\n\t\t\t\tdto.setPlantaCargoDet(r.getPlantaCargoDet());\r\n\t\t\t\tdto.setReservar(true);\r\n\t\t\t\tlistaPlantaCargoDto.add(dto);\r\n\t\t\t}\r\n\t\t} else {\r\n\t\t\tcantReservados = 0;\r\n\t\t}\r\n\r\n\t\tif (listaPlantaCargoDet.size() > 0) {\r\n\t\t\tfor (PlantaCargoDet p : listaPlantaCargoDet) {\r\n\t\t\t\tBoolean esta = false;\r\n\t\t\t\tfor (ConcursoPuestoDet r : listaPuestosReservados) {\r\n\t\t\t\t\tif (r.getPlantaCargoDet().equals(p))\r\n\t\t\t\t\t\testa = true;\r\n\t\t\t\t}\r\n\t\t\t\tif (!esta) {\r\n\r\n\t\t\t\t\tPlantaCargoDetDTO dto = new PlantaCargoDetDTO();\r\n\t\t\t\t\tdto.setPlantaCargoDet(p);\r\n\t\t\t\t\tdto.setReservar(false);\r\n\t\t\t\t\tlistaPlantaCargoDto.add(dto);\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public List<Map<String, Object>> Listar_Cumplea˝os(String mes,\r\n String dia, String aps, String dep, String are,\r\n String sec, String pue, String fec, String edad,\r\n String ape, String mat, String nom, String tip, String num) {\r\n sql = \"SELECT * FROM RHVD_FILTRO_CUMPL_TRAB \";\r\n sql += (!aps.equals(\"\")) ? \"Where UPPER(CO_APS)='\" + aps.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!dep.equals(\"\")) ? \"Where UPPER(DEPARTAMENTO)='\" + dep.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!are.equals(\"\")) ? \"Where UPPER(AREA)='\" + are.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!sec.equals(\"\")) ? \"Where UPPER(SECCION)='\" + sec.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!pue.equals(\"\")) ? \"Where UPPER(PUESTO)='\" + pue.trim().toUpperCase() + \"'\" : \"\";\r\n //sql += (!fec.equals(\"\")) ? \"Where FECHA_NAC='\" + fec.trim() + \"'\" : \"\"; \r\n sql += (!edad.equals(\"\")) ? \"Where EDAD='\" + edad.trim() + \"'\" : \"\";\r\n sql += (!ape.equals(\"\")) ? \"Where UPPER(AP_PATERNO)='\" + ape.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!mat.equals(\"\")) ? \"Where UPPER(AP_MATERNO)='\" + mat.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!nom.equals(\"\")) ? \"Where UPPER(NO_TRABAJADOR)='\" + nom.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!tip.equals(\"\")) ? \"Where UPPER(TIPO)='\" + tip.trim().toUpperCase() + \"'\" : \"\";\r\n sql += (!num.equals(\"\")) ? \"Where NU_DOC='\" + num.trim() + \"'\" : \"\";\r\n //buscar por rango de mes de cumplea├▒os*/\r\n\r\n sql += (!mes.equals(\"\") & !mes.equals(\"13\")) ? \"where mes='\" + mes.trim() + \"' \" : \"\";\r\n sql += (!mes.equals(\"\") & mes.equals(\"13\")) ? \"\" : \"\";\r\n sql += (!dia.equals(\"\")) ? \"and dia='\" + dia.trim() + \"'\" : \"\";\r\n return jt.queryForList(sql);\r\n }",
"public ArrayList<oferta> listadoOfertaxComercio(int idComercio) {\n ArrayList<oferta> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement st = conn.prepareStatement(\"select o.nombre, o.cantidad, o.precio , c.id_comercio, id_oferta, descripcion, fecha, o.ruta, o.estado\\n\"\n + \"from Comercios c \\n\"\n + \"join Ofertas o on c.id_comercio = o.id_comercio \\n\"\n + \"where c.id_comercio = ?\");\n st.setInt(1, idComercio);\n ResultSet rs = st.executeQuery();\n\n while (rs.next()) {\n String nombreO = rs.getString(1);\n int cantidad = rs.getInt(2);\n Float precio = rs.getFloat(3);\n int id = rs.getInt(4);\n int ido = rs.getInt(5);\n String descripcion = rs.getString(6);\n String fecha = rs.getString(7);\n String ruta = rs.getString(8);\n boolean estado = rs.getBoolean(9);\n\n rubro rf = new rubro(0, \"\", true, \"\", \"\");\n comercio c = new comercio(\"\", \"\", \"\", id, true, \"\", \"\", rf, \"\");\n oferta o = new oferta(ido, nombreO, cantidad, precio, c, estado, descripcion, fecha,ruta );\n\n lista.add(o);\n }\n\n st.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n }",
"protected List<E> getListByQuerry(PreparedStatement statement) throws DAOException {\n\t\tfinal List<E> data;\n\n\t\ttry (ResultSet rs = statement.executeQuery()) {\n\t\t\tdata = parseResultSet(rs);\n\t\t} catch (SQLException cause) {\n\t\t\tthrow new DAOException(cause);\n\t\t}\n\t\tif (data.isEmpty())\n\t\t\treturn null;\n\t\telse\n\t\t\treturn data;\n\t}",
"public static void main(String[] args) {\n String quey = \"select * from places p, branches b where b.place = p.id_place and p.place_name like 'TUNJA' \";\n //String quey = \"select * from branches \";\n List list = ModuleQueryController.findData(quey);\n \n for (Object l : list){\n System.out.println(l);\n //if(l instanceof Branch){\n // Branch p = (Branch) l;\n // System.out.println(p);\n //}\n //Object yourObject = (Object) SerializationUtils.deserialize(l);\n }\n System.out.println(list);\n }",
"@Override\n\tpublic List<Idol> selectList() {\n\t\treturn session.selectList(\"idols.selectList\");\n\t}",
"public List<Object[]> getRetencionSRI(int mes, int anio, int idOrganizacion, Sucursal sucursalFP, Sucursal sucursalRetencion, PuntoDeVenta puntoVentaRetencion, String orden)\r\n/* 59: */ {\r\n/* 60:107 */ StringBuilder sql = new StringBuilder();\r\n/* 61: */ \r\n/* 62:109 */ sql.append(\" SELECT f.fechaEmisionRetencion, f.fechaRegistro, f.fechaEmision, \");\r\n/* 63:110 */ sql.append(\" CONCAT(f.establecimiento,'-',f.puntoEmision,'-',f.numero), \");\r\n/* 64:111 */ sql.append(\" f.identificacionProveedor, c.descripcion, \");\r\n/* 65:112 */ sql.append(\" coalesce(CASE WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE THEN (SUM(COALESCE(dfp.baseImponibleRetencion, 0)+COALESCE(dfp.baseImponibleTarifaCero, 0) \");\r\n/* 66:113 */ sql.append(\" \\t+COALESCE(dfp.baseImponibleDiferenteCero, 0)+COALESCE(dfp.baseImponibleNoObjetoIva, 0))) ELSE COALESCE(dfp.baseImponibleRetencion, 0) END,0), \");\r\n/* 67:114 */ sql.append(\" coalesce(dfp.porcentajeRetencion, 0), coalesce(dfp.valorRetencion, 0), coalesce(c.codigo, 'NA'), \");\r\n/* 68:115 */ sql.append(\" coalesce(CASE WHEN c.tipoConceptoRetencion = :tipoConceptoIVA THEN 'IVA' WHEN c.tipoConceptoRetencion = :tipoConceptoFUENTE THEN 'FUENTE' WHEN c.tipoConceptoRetencion = :tipoConceptoISD THEN 'ISD' ELSE '' END,'NA'), \");\r\n/* 69:116 */ sql.append(\" CONCAT(f.establecimientoRetencion,'-',f.puntoEmisionRetencion,'-',f.numeroRetencion), \");\r\n/* 70:117 */ sql.append(\" f.baseImponibleTarifaCero, f.baseImponibleDiferenteCero, f.baseImponibleNoObjetoIva, f.nombreProveedor, f.montoIva, \");\r\n/* 71:118 */ sql.append(\" f.montoIce, ct.codigo, f.autorizacionRetencion, f.fechaRegistro, f.autorizacion, f.claveAcceso, f.estado,f.idFacturaProveedorSRI, fp.descripcion \");\r\n/* 72:119 */ sql.append(\" FROM DetalleFacturaProveedorSRI dfp \");\r\n/* 73:120 */ sql.append(\" RIGHT OUTER JOIN dfp.conceptoRetencionSRI c \");\r\n/* 74:121 */ sql.append(\" RIGHT OUTER JOIN dfp.facturaProveedorSRI f \");\r\n/* 75:122 */ sql.append(\" LEFT OUTER JOIN f.facturaProveedor fp \");\r\n/* 76:123 */ sql.append(\" LEFT JOIN f.creditoTributarioSRI ct \");\r\n/* 77:124 */ sql.append(\" WHERE MONTH(f.fechaRegistro) =:mes AND f.documentoModificado IS NULL \");\r\n/* 78:125 */ sql.append(\" AND YEAR(f.fechaRegistro) =:anio \");\r\n/* 79:126 */ sql.append(\" AND f.estado!=:estadoAnulado \");\r\n/* 80:127 */ sql.append(\" AND f.indicadorSaldoInicial!=true \");\r\n/* 81:128 */ sql.append(\" AND f.idOrganizacion = :idOrganizacion \");\r\n/* 82:129 */ if (sucursalFP != null) {\r\n/* 83:130 */ sql.append(\" AND f.idSucursal = :idSucursal \");\r\n/* 84: */ }\r\n/* 85:132 */ if (sucursalRetencion != null) {\r\n/* 86:133 */ sql.append(\" AND f.establecimientoRetencion = :sucursalRetencion \");\r\n/* 87: */ }\r\n/* 88:135 */ if (puntoVentaRetencion != null) {\r\n/* 89:136 */ sql.append(\" AND f.puntoEmisionRetencion = :puntoVentaRetencion \");\r\n/* 90: */ }\r\n/* 91:138 */ sql.append(\" GROUP BY f.idFacturaProveedorSRI, c.codigo, f.numero, f.puntoEmision, \");\r\n/* 92:139 */ sql.append(\" f.establecimiento, f.identificacionProveedor, \");\r\n/* 93:140 */ sql.append(\" c.descripcion, dfp.baseImponibleRetencion, dfp.porcentajeRetencion, dfp.valorRetencion, f.fechaEmisionRetencion, f.fechaRegistro, f.fechaEmision, f.numeroRetencion, \");\r\n/* 94:141 */ sql.append(\" f.baseImponibleTarifaCero, f.baseImponibleDiferenteCero, f.baseImponibleNoObjetoIva, f.nombreProveedor, f.montoIva, \");\r\n/* 95:142 */ sql.append(\" f.montoIce, ct.codigo, f.autorizacionRetencion, f.fechaRegistro, c.tipoConceptoRetencion, f.autorizacion, f.claveAcceso, f.estado, \");\r\n/* 96:143 */ sql.append(\" f.establecimientoRetencion, f.puntoEmisionRetencion, f.numeroRetencion, fp.descripcion \");\r\n/* 97:144 */ if ((orden != null) && (orden.equals(\"POR_RETENCION\"))) {\r\n/* 98:145 */ sql.append(\" ORDER BY f.establecimientoRetencion, f.puntoEmisionRetencion, f.numeroRetencion \");\r\n/* 99:146 */ } else if ((orden != null) && (orden.equals(\"POR_FACTURA\"))) {\r\n/* 100:147 */ sql.append(\" ORDER BY f.establecimiento, f.puntoEmision, f.numero \");\r\n/* 101:148 */ } else if ((orden != null) && (orden.equals(\"POR_CONCEPTO\"))) {\r\n/* 102:149 */ sql.append(\" ORDER BY c.descripcion \");\r\n/* 103: */ }\r\n/* 104:151 */ Query query = this.em.createQuery(sql.toString());\r\n/* 105:152 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 106:153 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 107:154 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 108:155 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 109:156 */ query.setParameter(\"tipoConceptoIVA\", TipoConceptoRetencion.IVA);\r\n/* 110:157 */ query.setParameter(\"tipoConceptoFUENTE\", TipoConceptoRetencion.FUENTE);\r\n/* 111:158 */ query.setParameter(\"tipoConceptoISD\", TipoConceptoRetencion.ISD);\r\n/* 112:159 */ if (sucursalFP != null) {\r\n/* 113:160 */ query.setParameter(\"idSucursal\", Integer.valueOf(sucursalFP.getId()));\r\n/* 114: */ }\r\n/* 115:162 */ if (sucursalRetencion != null) {\r\n/* 116:163 */ query.setParameter(\"sucursalRetencion\", sucursalRetencion.getCodigo());\r\n/* 117: */ }\r\n/* 118:165 */ if (puntoVentaRetencion != null) {\r\n/* 119:166 */ query.setParameter(\"puntoVentaRetencion\", puntoVentaRetencion.getCodigo());\r\n/* 120: */ }\r\n/* 121:169 */ return query.getResultList();\r\n/* 122: */ }",
"public List<Usuarios> getUsuarios(){ //retorna una lista con todos los Usuarios en la database\n List<Usuarios> listaUsuarios = new ArrayList<Usuarios>();\n conexion = base.GetConnection();\n try{\n String consulta = \"select Cedula from usuarios\";\n PreparedStatement select = conexion.prepareStatement(consulta);\n boolean r = select.execute();\n if(r){\n ResultSet result = select.getResultSet();\n while(result.next()){\n Usuarios usuario = new Usuarios(result.getString(1));\n System.out.println(usuario);\n listaUsuarios.add(usuario);\n }\n result.close();\n }\n conexion.close();\n }catch(SQLException ex){\n System.out.println(ex.toString());\n }\n return listaUsuarios;\n}",
"public List<NewsItem> getNewsItemDataFromDB() throws SQLException;",
"public List<T> enumerate() throws SQLException;",
"public ArrayList<rubro> obtenerTodoslosRubros() {\n ArrayList<rubro> lista = new ArrayList<>();\n try {\n Connection conn = DriverManager.getConnection(CONN, USER, PASS);\n\n PreparedStatement pr = conn.prepareStatement(\"select id_rubro , nombre, descripcion, estado, ruta \\n\"\n + \" from rubros \");\n\n ResultSet rs = pr.executeQuery();\n\n while (rs.next()) {\n int id = rs.getInt(1);\n String nombre = rs.getString(2);\n String descripcion = rs.getString(3);\n boolean estado = rs.getBoolean(4);\n String ruta = rs.getString(5);\n\n rubro r = new rubro(id, nombre, estado, descripcion, ruta);\n\n lista.add(r);\n }\n\n rs.close();\n conn.close();\n } catch (SQLException ex) {\n ex.printStackTrace();\n }\n\n return lista;\n\n }",
"List<Plaza> consultarPlazas();",
"public ArrayList<ArrayList<Integer>> selectForQuoiEntre(int id) throws DAOException;",
"public List<Marka> markaFullList() {\n\n String sql = \"SELECT id, ad, aciklama, resimyolu FROM eticaretio.marka;\";\n List<Marka> markaArrayList = new ArrayList<>();\n\n try {\n // SELECT id, sirket_ad, adres, telefon, website, email FROM eticaretio.kargo;\n\n Connection connection = DatabaseConnection.getConnection();\n\n PreparedStatement preparedStatement = connection.prepareStatement(sql);\n ResultSet resultSet = preparedStatement.executeQuery();\n\n while (resultSet.next()) {\n\n Marka marka = new Marka();\n\n marka.setId(resultSet.getInt(\"id\"));\n marka.setAd(resultSet.getString(\"ad\"));\n marka.setAciklama(resultSet.getString(\"aciklama\"));\n marka.setResimYol(resultSet.getString(\"resimyolu\"));\n\n markaArrayList.add(marka);\n\n }\n\n } catch (SQLException ex) {\n System.out.println(\"markadao sinifi markaifulllistmetodu : \" + ex.toString());\n return null;\n }\n return markaArrayList;\n }",
"public List<TdiaryArticle> list(Object rp) throws SQLException {\n\t\treturn null;\r\n\t}",
"public List<String> Mutfakkullanici(int masa_no) throws SQLException {\n ArrayList<Integer> kull = new ArrayList<>();\r\n ArrayList<String> kullad = new ArrayList<>();\r\n sqlsorgular.baglanti vb = new baglanti();\r\n vb.baglan();\r\n try {\r\n\r\n String sorgu = \"select kullanici_no from ilisk_masa where masa_no=\" + masa_no + \";\";\r\n ps = vb.con.prepareStatement(sorgu);\r\n rs = ps.executeQuery(sorgu);\r\n\r\n while (rs.next()) {\r\n kull.add(rs.getInt(1));\r\n }\r\n System.out.println(\"mutfak kullanici girdi\");\r\n System.out.println(kull);\r\n } catch (Exception e) {\r\n System.out.println(\"Mutfak kullanicisini alirken hata olustu\");\r\n return null;\r\n }\r\n\r\n for (Integer kullanici_no : kull) {\r\n boolean durum = false;\r\n String deger = \"\";\r\n String sorgu2 = \"select kullanici_adi from kullanicilar where kullanici_no=\" + kullanici_no + \" and durum='MUTFAK';\";\r\n try {\r\n ps = vb.con.prepareStatement(sorgu2);\r\n rs1 = ps.executeQuery(sorgu2);\r\n while (rs1.next()) {\r\n deger = rs1.getString(1);\r\n\r\n if (deger != null) {\r\n kullad.add(deger);\r\n System.out.println(\"null\");\r\n System.out.println(deger);\r\n }\r\n System.out.println(kullad);\r\n durum = true;\r\n }\r\n } catch (Exception e) {\r\n durum = false;\r\n }\r\n\r\n System.out.println(kullad);\r\n\r\n }\r\n vb.con.close();\r\n return kullad;\r\n\r\n }",
"private void listaContatos() throws SQLException {\n limpaCampos();\n DAOLivro d = new DAOLivro();\n livros = d.getLista(\"%\" + jTPesquisar.getText() + \"%\"); \n \n // Após pesquisar os contatos, executa o método p/ exibir o resultado na tabela pesquisa\n mostraPesquisa(livros);\n livros.clear();\n }",
"public static String buscarTodosLosLibros() throws Exception{ //BUSCARtODOS no lleva argumentos\r\n //primero: nos conectamos a oracle con la clase conxion\r\n \r\n Connection con=Conexion.conectarse(\"system\",\"system\");\r\n //segundo: generamos un statemenr de sql con la conexion anterior\r\n Statement st=con.createStatement();\r\n //3: llevamos a cabo la consulta select \r\n ResultSet res=st.executeQuery(\"select * from persona\"); //reset arreglo enmutado de java estructura de datos\r\n System.out.println(\"depues del select\");\r\n int indice=0;\r\n ArrayList<persona> personas=new ArrayList<persona>();\r\n while(res.next()){ //del primero hasta el ultimo prod que vea SI PONGO SECUENCIA NO ENTRA AL WHILE\r\n Integer id= res.getInt(1); \r\n String nombre=res.getString(2);\r\n String empresa=res.getString(3);\r\n Integer edad=res.getInt(4);\r\n String telefono=res.getString(5);\r\n \r\n ///llenamos el arrayList en cada vuelta\r\n personas.add(new persona(id,nombre,empresa,edad,telefono));\r\n \r\n System.out.println(\"estoy en el array list despues del select\");\r\n }\r\n \r\n //el paso final, transformamos a objeto json con jackson\r\n ObjectMapper maper=new ObjectMapper(); //mapeo a objeto jackson\r\n \r\n st.close();\r\n con.close();\r\n System.out.println(\"convirtiendo el json\");\r\n return maper.writeValueAsString(personas);\r\n \r\n }",
"public List<Tags> query(String sql) {\n return tagsDao.query(sql);\n }",
"@Override\n public List<Beheerder> select() {\n ArrayList<Beheerder> beheerders = new ArrayList<>();\n Connection connection = createConnection();\n try {\n PreparedStatement preparedStatement = connection.prepareStatement(\"SELECT * FROM gebruiker ORDER BY id;\");\n ResultSet resultSet = preparedStatement.executeQuery();\n beheerders = fillListFromResultSet(resultSet, beheerders);\n } catch (SQLException e) {\n e.printStackTrace();\n }\n closeConnection(connection);\n return beheerders;\n }",
"public List<Object[]> executeSql(String sql,Object... objs) {\n\t\tQuery query=getEm().createNativeQuery(sql);\r\n\t\tfor(int i=0;i<objs.length;i++){\r\n\t\t\tquery.setParameter(i+1, objs[i]);\r\n\t\t}\r\n\t\treturn query.getResultList();\r\n\t}",
"@Override\n public ArrayList<Zona> list(String description) {\n ArrayList<Zona> res = new ArrayList<>();\n conn = new Connector();\n conn.conectar();\n con = conn.getConexion();\n String list = \"SELECT id, name \"\n + \"FROM zone \"\n + \"WHERE concat(id,' ',name) like '%\"\n + description + \"%' \"\n + \"ORDER BY id DESC\";\n try {\n st = con.createStatement();\n \n rt = st.executeQuery(list);\n //mientras rt tenga datos se iterara\n while (rt.next()) {\n //accedes en el orden q espesificaste en el select rt.getInt(1) = id_user;\n res.add(new Zona(rt.getInt(1), rt.getString(2)));\n }\n System.out.println(\"Lista de zonas recuperadas correctamente\");\n conn.desconectar();\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(null, ex);\n }\n return res;\n }",
"public ArrayList<T> all() throws SQLException {\n\t\tPreparedStatement stmt = DatabaseConnection.get().prepareStatement(\"select * from \"+table_name() + order_string());\n\t\treturn where(stmt);\n\t}",
"@Override\n\tpublic ArrayList<Lista> listaListeElettorali() {\n\t\t\t\n\t\t\t\n\t\t\tDB db = getDB();\n\t\t\tMap<Integer, Lista> map = db.getTreeMap(\"liste\");\n\t\t\tArrayList<Lista> liste = new ArrayList<Lista>();\n\t\t\tSet<Integer> keys = map.keySet();\n\t\t\tfor (int key : keys) {\n\t\t\t\tliste.add(map.get(key));\n\t\t\t}\n\t\n\t\t\treturn liste;\n\t\t\t\n\t\t}",
"@SuppressWarnings(\"unchecked\")\t\r\n\t@Override\r\n\tpublic List<Distrito> listar() {\n\t\tList<Distrito> lista = new ArrayList<Distrito>();\r\n\t\tQuery q = em.createQuery(\"select m from Distrito m\");\r\n\t\tlista = (List<Distrito>) q.getResultList();\r\n\t\treturn lista;\r\n\t}",
"public List<TipoDocumento> listar() throws SQLException{\n ArrayList<TipoDocumento> tipodocumentos = new ArrayList();\n TipoDocumento tipodocumento;\n ResultSet resultado;\n String sentenciaSQL = \"SELECT documentoid, descripcion FROM tipodocumento;\";\n \n resultado = gestorJDBC.ejecutarConsulta(sentenciaSQL);\n while(resultado.next()){ \n //para hacer \"new Genero\" necesito tener un Construtor vacio.\n tipodocumento = new TipoDocumento();\n tipodocumento.setTipodocumentoid(resultado.getInt(\"documentoid\"));\n tipodocumento.setDescripcion(resultado.getString(\"descripcion\"));\n tipodocumentos.add(tipodocumento);\n }\n resultado.close();\n return tipodocumentos; \n }",
"public static List<Comentario> listar()\n {\n Session sessionRecheio;\n sessionRecheio = HibernateUtil.getSession();\n Transaction tr = sessionRecheio.beginTransaction();\n String hql = \"from Comentario u\";\n List<Comentario> lista = (List)sessionRecheio.createQuery(hql).list();\n tr.commit();\n return lista;\n }",
"public List listar() {\n ArrayList<Empleado> lista = new ArrayList<>();\r\n String sql = \"SELECT * FROM empleado\";\r\n \r\n try {\r\n con = cn.getConexion();\r\n ps = con.prepareStatement(sql); \r\n rs = ps.executeQuery();\r\n \r\n while (rs.next()) {\r\n Empleado emp = new Empleado(); \r\n emp.setId(rs.getInt(\"Id\")); //campos de la tabla\r\n emp.setNombre(rs.getString(\"Nombre\"));\r\n emp.setSalario(rs.getDouble(\"Salario\")); \r\n lista.add(emp); \r\n } \r\n } catch(Exception e) {\r\n System.out.println(e.getMessage());\r\n }\r\n \r\n return lista;\r\n }",
"public void afficherReclamationAdmin(ObservableList<Reclamation> oblist1){\n try {\n PreparedStatement pt1 = c.prepareStatement(\"SELECT id_r, message, etat, date_rec, reponse, prenom, nom FROM reclamation, user where idch=id_u and etat != 'Archivée'\");\n ResultSet rs = pt1.executeQuery();\n while (rs.next()) {\n String fetch = rs.getString(\"prenom\")+\" \"+rs.getString(\"nom\");\n System.out.println(rs.getString(\"reponse\"));\n oblist1.add(new Reclamation(rs.getInt(\"id_r\"), rs.getString(\"message\"), rs.getString(\"etat\"), rs.getString(\"date_rec\"), rs.getString(\"reponse\"), fetch));\n }\n } catch (SQLException ex) {\n Logger.getLogger(ReclamationCRUD.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public List<ReporteComprasVentasRetenciones> getReporteCompras(int mes, int anio, int idOrganizacion)\r\n/* 167: */ {\r\n/* 168:227 */ StringBuffer sql = new StringBuffer();\r\n/* 169: */ \r\n/* 170:229 */ sql.append(\" SELECT new ReporteComprasVentasRetenciones(tc.codigo, tc.nombre, COUNT(tc.codigo), \");\r\n/* 171:230 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleTarifaCero) ELSE SUM(fps.baseImponibleTarifaCero) END), \");\r\n/* 172:231 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleDiferenteCero) ELSE SUM(fps.baseImponibleDiferenteCero) END), \");\r\n/* 173:232 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.baseImponibleNoObjetoIva) ELSE SUM(fps.baseImponibleNoObjetoIva) END), \");\r\n/* 174:233 */ sql.append(\" (CASE WHEN tc.codigo = '04' THEN -SUM(fps.montoIva) ELSE SUM(fps.montoIva) END), 'Compras',ct.codigo,ct.nombre) \");\r\n/* 175:234 */ sql.append(\" FROM FacturaProveedorSRI fps \");\r\n/* 176:235 */ sql.append(\" LEFT OUTER JOIN fps.tipoComprobanteSRI tc \");\r\n/* 177:236 */ sql.append(\" LEFT OUTER JOIN fps.creditoTributarioSRI ct\");\r\n/* 178:237 */ sql.append(\" WHERE MONTH(fps.fechaRegistro) =:mes \");\r\n/* 179:238 */ sql.append(\" AND YEAR(fps.fechaRegistro) =:anio \");\r\n/* 180:239 */ sql.append(\" AND fps.estado!=:estadoAnulado \");\r\n/* 181:240 */ sql.append(\" AND fps.indicadorSaldoInicial!=true \");\r\n/* 182:241 */ sql.append(\" AND fps.idOrganizacion = :idOrganizacion \");\r\n/* 183:242 */ sql.append(\" GROUP BY tc.codigo, tc.nombre,ct.codigo,ct.nombre\");\r\n/* 184:243 */ sql.append(\" ORDER BY tc.codigo, tc.nombre \");\r\n/* 185: */ \r\n/* 186:245 */ Query query = this.em.createQuery(sql.toString());\r\n/* 187:246 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 188:247 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 189:248 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 190:249 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 191: */ \r\n/* 192:251 */ return query.getResultList();\r\n/* 193: */ }",
"List<ItemStockDO> selectAll();",
"public static ArrayList<obj_dos_campos> carga_tipo_producto() {\n ArrayList<obj_dos_campos> lista = new ArrayList<obj_dos_campos>();\n Connection c=null;\n try {\n c = conexion_odbc.Connexion_datos();\n Statement s = c.createStatement();\n ResultSet rs = s.executeQuery(\"select tip_prod_idn as data, tip_prod_nombre as label from tipo_producto order by tip_prod_nombre desc\");\n lista.add(new obj_dos_campos(\"0\",\"-- Seleccione --\"));\n while (rs.next()){\n lista.add(new obj_dos_campos(rs.getString(\"data\"),rs.getString(\"label\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n try {\n c.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }\n return lista;\n }",
"public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"@Override\n\tpublic List selectList() {\n\t\t\n\t\t\n\t\t\n\t\treturn null;\n\t}",
"List<SellMedia> selectSellMediaByExample(SellMediaExample example) throws SQLException;",
"public List<Dishes> selectChuan(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='´¨²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n if(book!=null){\n \tSystem.out.println(sql); \n if(book.getDishid()!=null){\n sql.append(\" and dishid=? \");\n System.out.println(book.getDishid()); \n list.add(book.getDishid());\n }\n }\n return dao.select(sql.toString(), list.toArray());\n }",
"private void getinterrogantes(){\n try{\n EntityManagerFactory emf = Persistence.createEntityManagerFactory(\"ServiceQualificationPU\");\n EntityManager em = emf.createEntityManager();\n\n String jpql = \"SELECT i FROM Interrogante i \"\n + \"WHERE i.estado='a' \";\n\n Query query = em.createQuery(jpql);\n List<Interrogante> listInterrogantes = query.getResultList();\n\n ArrayList<ListQuestion> arrayListQuestions = new ArrayList<>();\n for (Interrogante i : listInterrogantes){\n ListQuestion lq = new ListQuestion();\n lq.setIdinterrogante(i.getIdinterrogante());\n lq.setQuestion(i.getDescripcion());\n lq.setListParametros(getParametros(i.getIdinterrogante()));\n arrayListQuestions.add(lq);\n }\n\n this.ListQuestions = arrayListQuestions;\n em.close();\n emf.close();\n }catch(Exception e){\n System.out.println(\"ERROR: \"+e);\n this.Error = \"ERROR: \"+e;\n } \n \n }",
"public abstract List createNativeSQLQuery(String query);",
"public ArrayList<Viaje> listar(){\n\t\tArrayList<Viaje> lista=new ArrayList<Viaje>();\n\t\t\n\t\tString sql=\"select * from viaje\";\n\t\t\n\t\ttry(Connection con=DB.getConexion();\n\t\t\tStatement stm=con.createStatement();){\n\t\t\t\tResultSet rs=stm.executeQuery(sql);\n\t\t\t\n\t\t\twhile(rs.next()){\n\t\t\t\tViaje v=new Viaje(rs.getInt(\"id\"),rs.getString(\"destino\"),rs.getInt(\"duracion\"),rs.getFloat(\"precio\"));\n\t\t\t\tlista.add(v);\n\t\t\t}\n\t\t\n\t\t}\n\t\tcatch(SQLException sqle){\n\t\t\tsqle.printStackTrace();\n\t\t}\n\t\treturn lista;\n\t}",
"public static List<Disease> selectMany(String command) throws Exception {\n if (RemotingClient.RemotingRole == RemotingRole.ClientWeb)\n {\n throw new ApplicationException(\"Not allowed to send sql directly. Rewrite the calling class to not use this query:\\r\\n\" + command);\n }\n \n List<Disease> list = tableToList(Db.getTable(command));\n return list;\n }",
"public List<Produto> consultarProdutos(int consulta, String valor) {\r\n ConexaoBDJavaDB conexaoBD = new ConexaoBDJavaDB(\"routeexpress\");\r\n Connection conn = null;\r\n Statement stmt = null;\r\n ResultSet rs = null;\r\n List<Produto> produtos = new ArrayList<>();\r\n try {\r\n conn = conexaoBD.obterConexao();\r\n stmt = conn.createStatement();\r\n //Se a consulta for igual a zero(0) uma lista de todos os produtos \"cervejas\" e recuperada\r\n if (consulta == 0) {\r\n rs = stmt.executeQuery(consultas[consulta]);\r\n //Se a consulta for igual a tres(3) uma lista de todos os produtos \"cervejas\" e recuperada a parti do preco\r\n } else {\r\n rs = stmt.executeQuery(consultas[consulta] + \"'\" + valor + \"'\");\r\n }\r\n Produto produto;\r\n while (rs.next()) {\r\n produto = new Produto();\r\n produto.setIdCervejaria(rs.getInt(\"ID_CERVEJARIA\"));\r\n produto.setCervejaria(rs.getString(\"CERVEJARIA\"));\r\n produto.setPais(rs.getString(\"PAIS\"));\r\n produto.setIdCerveja(rs.getInt(\"ID_CERVEJA\"));\r\n produto.setIdFkCervajaria(rs.getInt(\"FK_CERVEJARIA\"));\r\n produto.setRotulo(rs.getString(\"ROTULO\"));\r\n produto.setPreco(rs.getString(\"PRECO\"));\r\n produto.setVolume(rs.getString(\"VOLUME\"));\r\n produto.setTeor(rs.getString(\"TEOR\"));\r\n produto.setCor(rs.getString(\"COR\"));\r\n produto.setTemperatura(rs.getString(\"TEMPERATURA\"));\r\n produto.setFamiliaEEstilo(rs.getString(\"FAMILIA_E_ESTILO\"));\r\n produto.setDescricao(rs.getString(\"DESCRICAO\"));\r\n produto.setSabor(rs.getString(\"SABOR\"));\r\n produto.setImagem1(rs.getString(\"IMAGEM_1\"));\r\n produto.setImagem2(rs.getString(\"IMAGEM_2\"));\r\n produto.setImagem3(rs.getString(\"IMAGEM_3\"));\r\n produtos.add(produto);\r\n }\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } catch (ClassNotFoundException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n } finally {\r\n if (conn != null) {\r\n try {\r\n conn.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (stmt != null) {\r\n try {\r\n stmt.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n if (rs != null) {\r\n try {\r\n rs.close();\r\n } catch (SQLException ex) {\r\n Logger.getLogger(ProdutoDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n }\r\n return produtos;\r\n }",
"@Override\n public ArrayList<Asesor> getListaAsesores() {\n ArrayList<Asesor> listaAsesores = new ArrayList();\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor\");\n ResultSet resultadoConsulta = orden.executeQuery();\n String numeroPersonal;\n String nombre;\n String idioma;\n String telefono;\n String correo;\n Asesor asesor;\n while(resultadoConsulta.next()){\n numeroPersonal = resultadoConsulta.getString(1);\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n listaAsesores.add(asesor);\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return listaAsesores;\n }",
"public ArrayList<Cuenta> obtenerCuentasAsociadas(String codigo_cliente) {\n ArrayList<Cuenta> lista = new ArrayList<>();\n try {\n PreparedStatement PrSt;\n PreparedStatement PrSt2;\n ResultSet rs = null;\n ResultSet rs2 = null;\n String Query = \"SELECT * FROM Solicitud WHERE Codigo_ClienteS = ? AND Estado = 'Aceptada'\";\n PrSt = conexion.prepareStatement(Query);\n PrSt.setString(1, codigo_cliente);\n rs = PrSt.executeQuery();\n while (rs.next()) {\n Cuenta cuenta = obtenerCuenta(rs.getString(\"Codigo_Cuenta\"));\n lista.add(cuenta);\n }\n PrSt.close();\n rs.close();\n } catch (SQLException e) {\n System.out.println(e.toString());\n }\n return lista;\n }",
"public ArrayList consultaID(){\n ArrayList<Object> iduser = new ArrayList<Object>();\n\n sSQL = \"SELECT usuario.idusuario from usuario where usuario.idtipo_user='3'\";\n\n try {\n Statement st = cn.createStatement();\n ResultSet rs = st.executeQuery(sSQL);\n while (rs.next()) {\n iduser.add(rs.getInt(\"usuario.idusuario\"));\n\n }\n \n \n return iduser;\n } catch (Exception e) {\n \n System.out.println(\"consultando usuarios registrados para la seleccion del representante\");\n return null;\n \n }\n }",
"public ArrayList<clsPago> consultaDataPagosCuotaInicial(int codigoCli)\n { \n ArrayList<clsPago> data = new ArrayList<clsPago>(); \n try{\n bd.conectarBaseDeDatos();\n sql = \" SELECT a.id_pagos_recibo idPago, a.id_usuario, b.name name_usuario, \"\n + \" a.referencia referencia, \"\n + \" a.fecha_pago fecha_pago, a.estado, \"\n + \" a.valor valor_pago, a.id_caja_operacion, e.name_completo nombre_cliente, \"\n + \" a.fecha_pago fecha_registro\"\n + \" FROM ck_pagos_recibo AS a\"\n + \" JOIN ck_usuario AS b ON a.id_usuario = b.id_usuario\"\n + \" JOIN ck_cliente AS e ON a.codigo = e.codigo\"\n + \" WHERE a.estado = 'A'\"\n + \" AND a.cuota_inicial = 'S'\"\n + \" AND a.estado_asignado = 'N'\"\n + \" AND a.codigo = \" + codigoCli; \n \n System.out.println(sql);\n bd.resultado = bd.sentencia.executeQuery(sql);\n \n if(bd.resultado.next())\n { \n do \n { \n clsPago oListaTemporal = new clsPago();\n \n oListaTemporal.setReferencia(bd.resultado.getString(\"referencia\"));\n oListaTemporal.setFechaPago(bd.resultado.getString(\"fecha_pago\"));\n oListaTemporal.setNombreUsuario(bd.resultado.getString(\"name_usuario\"));\n oListaTemporal.setNombreCliente(bd.resultado.getString(\"nombre_cliente\"));\n oListaTemporal.setValor(bd.resultado.getDouble(\"valor_pago\"));\n oListaTemporal.setFechaRegistro(bd.resultado.getString(\"fecha_registro\"));\n oListaTemporal.setIdPago(bd.resultado.getInt(\"idPago\"));\n data.add(oListaTemporal);\n }\n while(bd.resultado.next()); \n //return data;\n }\n else\n { \n data = null;\n } \n }\n catch(Exception ex)\n {\n System.out.print(ex);\n data = null;\n } \n bd.desconectarBaseDeDatos();\n return data;\n }",
"public void getAllItem (ArrayList<itemTodo> list){\n Cursor cursor = this.getReadableDatabase().rawQuery(\"select judul, deskripsi, priority from \"+nama_table,null);\n while (cursor.moveToNext()){\n list.add(new itemTodo(cursor.getString(0), cursor.getString(1), cursor.getString(2)));\n }\n }",
"public ArrayList<TypeProjet> listeInscr() throws RemoteException{\r\n\t\t\tArrayList<TypeProjet> list = new ArrayList<TypeProjet>();\r\n\t\t\t\r\n\t\t\t\r\n\t\t String requete = \"select * from typeprojet where t_cursus='\" + _etudiant.getCursus() +\r\n\t\t \t\t\t\t \"' and CURRENT_DATE >= t_debinscr AND CURRENT_DATE <= t_fininscr AND NOT EXISTS \" +\r\n\t\t \t\t\t\t \" (select a_idgroupe From association where a_idgroupe in (select ga_idgroupe from \" +\r\n\t\t \t\t\t\t \" groupeassoc, groupe where ga_idetudiant = \" + _etudiant.getId() + \" AND g_idtype = \" +\r\n\t\t \t\t\t\t \"t_id and ga_idgroupe = g_id) and a_idprojet in (select p_id from projet where \" +\r\n\t\t \t\t\t\t \" p_idType = t_id))\";\r\n\t\t System.out.println(\"requete : listeInscr\" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t \r\n\t\t TypeProjet tp = null;\r\n\t\t \r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \tint id = Integer.parseInt(data.getColumnValue(\"t_id\"));\r\n\t\t\t\tString nom = data.getColumnValue(\"t_nom\");\r\n\t\t\t\tString deb_inscr = data.getColumnValue(\"t_debInscr\");\r\n\t\t\t\tString fin_incr = data.getColumnValue(\"t_finInscr\");\r\n\t\t\t\tString deb_projet = data.getColumnValue(\"t_debProjet\");\r\n\t\t\t\tString fin_projet = data.getColumnValue(\"t_finProjet\");\r\n\t\t \ttp = new TypeProjetImpl (id,nom,deb_inscr,fin_incr,deb_projet,fin_projet);\r\n\t\t \tlist.add(tp);\r\n\t\t }\r\n\t\t System.out.println(\"_____________________________________________\");\r\n\t\t for (TypeProjet i : list)\r\n\t\t \tSystem.out.println(i.get_nom());\r\n\t\t System.out.println(\"______________________________________________\");\r\n\t\t \r\n\t\t\treturn list;\r\n\t\t}",
"List selectByExample(BnesBrowsingHisExample example) throws SQLException;",
"List selectByExample(CTipoPersonaExample example) throws SQLException;",
"public Collection<FlujoDetalleDTO> cargarTodos(int codigoFlujo) {\n/* 138 */ Collection<FlujoDetalleDTO> resultados = new ArrayList<FlujoDetalleDTO>();\n/* */ try {\n/* 140 */ String s = \"select t.codigo_flujo,t.secuencia,t.servicio_inicio,r1.descripcion as nombre_servicio_inicio,t.accion,t.codigo_estado,r3.descripcion as nombre_codigo_estado,t.servicio_destino,r4.descripcion as nombre_servicio_destino,t.nombre_procedimiento,t.correo_destino,t.enviar_solicitud,t.ind_mismo_proveedor,t.ind_mismo_cliente,t.estado,t.caracteristica,t.valor_caracteristica,t.caracteristica_correo,m5.descripcion as nombre_estado,c.DESCRIPCION nombre_caracteristica,cv.DESCRIPCION descripcion_valor,t.metodo_seleccion_proveedor,t.ind_correo_clientes,t.usuario_insercion,t.fecha_insercion,t.usuario_modificacion,t.fecha_modificacion from wkf_detalle t left join SERVICIOS r1 on (r1.CODIGO=t.servicio_inicio) left join ESTADOS r3 on (r3.codigo=t.codigo_estado) left join SERVICIOS r4 on (r4.CODIGO=t.servicio_destino) left join sis_multivalores m5 on (m5.tabla='ESTADO_REGISTRO' and m5.valor=t.estado) LEFT JOIN CARACTERISTICAS c ON (t.Caracteristica = c.CODIGO) LEFT JOIN CARACTERISTICAS_VALOR cv ON (t.CARACTERISTICA=cv.CARACTERISTICA AND t.VALOR_CARACTERISTICA = cv.VALOR) where t.codigo_flujo=\" + codigoFlujo + \" order by t.secuencia\";\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 178 */ boolean rtaDB = this.dat.parseSql(s);\n/* 179 */ if (!rtaDB) {\n/* 180 */ return resultados;\n/* */ }\n/* 182 */ this.rs = this.dat.getResultSet();\n/* 183 */ while (this.rs.next()) {\n/* 184 */ resultados.add(leerRegistro());\n/* */ }\n/* */ }\n/* 187 */ catch (Exception e) {\n/* 188 */ e.printStackTrace();\n/* 189 */ Utilidades.writeError(\"FlujoDetalleDAO:cargarTodos \", e);\n/* */ } \n/* 191 */ return resultados;\n/* */ }",
"public static ArrayList <FichajeOperarios> obtenerFichajeOperarios(Date fecha) throws SQLException{\n Connection conexion=null;\n Connection conexion2=null;\n ResultSet resultSet;\n PreparedStatement statement;\n ArrayList <FichajeOperarios> FichajeOperarios=new ArrayList();\n Conexion con=new Conexion();\n\n //java.util.Date fecha = new Date();\n \n //para saber la fecha actual\n Date fechaActual = new Date();\n DateFormat formatoFecha = new SimpleDateFormat(\"dd/MM/yyyy\");\n \n //System.out.println(formatoFecha.format(fechaActual));\n \n try {\n\n conexion = con.connecta();\n\n\n statement=conexion.prepareStatement(\"select codigo,nombre,HORA_ENTRADA,centro from \"\n + \" (SELECT op.codigo,op.nombre,F2.FECHA AS FECHA_ENTRADA,F2.HORA AS HORA_ENTRADA,F2.FECHA+f2.HORA AS FICHA_ENTRADA,centro.DESCRIP as CENTRO,\"\n + \" (select top(1) f22.fecha \"\n + \" from e001_fichajes2 as f22 where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno order by f22.recno) AS FECHA_SALIDA,\"\n + \" (select top(1) f22.hora \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno) AS HORA_SALIDA,\"\n + \" (select top(1) f22.fecha \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno)+\"\n + \" (select top(1) f22.hora \"\n + \" from e001_fichajes2 as f22 \"\n + \" where f22.OPERARIO=f2.OPERARIO and f22.tipo='S' and f22.recno>f2.recno \"\n + \" order by f22.recno) as FICHA_SALIDA \"\n + \" FROM E001_OPERARIO as op left join e001_fichajes2 as f2 on op.codigo=f2.OPERARIO and f2.tipo='E' JOIN E001_centrost as centro on f2.CENTROTRAB=centro.CODIGO \"\n + \" WHERE F2.FECHA='\"+formatoFecha.format(fecha)+\"' and f2.HORA=(select max(hora) from e001_fichajes2 as f22 where f2.operario=f22.operario and f22.tipo='e' and f22.FECHA=f2.FECHA)) as a\"\n + \" where FICHA_SALIDA is null \"\n + \" ORDER BY codigo\");\n \n resultSet = statement.executeQuery();\n while (resultSet.next()) {\n FichajeOperarios fiop=new FichajeOperarios(); \n fiop.setCodigo(resultSet.getString(\"CODIGO\"));\n fiop.setNombre(resultSet.getString(\"NOMBRE\"));\n fiop.setHora_Entrada(resultSet.getString(\"HORA_ENTRADA\"));\n //fiop.setHora_Salida(resultSet.getString(\"HORA_SALIDA\"));\n fiop.setCentro(resultSet.getString(\"CENTRO\"));\n FichajeOperarios.add(fiop);\n }\n \n } catch (SQLException ex) {\n System.out.println(ex);\n \n }\n return FichajeOperarios;\n \n \n }",
"public ArrayList<Info_laboral> findAll(){\n ConexionBD con = new ConexionBD();\n Connection c = con.conOracle();\n\n ArrayList<Info_laboral> eeg = new ArrayList();\n\n try{\n ResultSet gs = con.ejecutaCon(\" Select * from Info_laboral\"); \n while(gs.next()){\n \n Estudios_Egresado ee=new Estudios_Egresado();\n Info_laboral i =new Info_laboral();\n Egresado eg = new Egresado();\n Estudios es = new Estudios();\n \n i.setId(gs.getInt(1));\n i.setJefe(gs.getString(2));\n i.setCargo(gs.getString(3));\n i.setFuncion(gs.getString(4));\n i.setFecha_ini(gs.getDate(5));\n i.setFecha_fin(gs.getDate(6));\n i.setMotivo_retiro(gs.getString(7));\n eg.setId(gs.getLong(8));\n i.setId_egresado(eg);\n i.setPerfil(gs.getString(9));\n \n eeg.add(i);\n }\n }catch(SQLException e){\n System.out.println(\"error \"+e);\n return null;\n }\n return eeg;\n }",
"public ListSqlHelper() {\n\t\t// for bran creation\n\t}",
"public ArrayList<ArrayList<String>> listeProjet() throws RemoteException{\r\n\t\t\tArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>();\r\n\t\t\t\r\n\t\t String requete=\"Select p_id, p_titre, t_debprojet, t_finprojet From projet, association, groupeassoc,\" +\r\n\t\t \t\t\t\t\" typeprojet Where ga_idetudiant =\" + _etudiant.getId() + \" AND ga_idgroupe = a_idgroupe \" +\r\n\t\t \t\t\t\t\" AND a_idprojet = p_id AND p_idtype = t_id\";\r\n\t\t System.out.println(\"requete : \" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t ArrayList <String> projet = new ArrayList<String>();\r\n\t\t \r\n\t\t String[] line = null;\r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \tArrayList<String> tmp = new ArrayList<String>();\r\n\t\t \tline = data.nextElement();\r\n\t\t \tprojet.add(data.getColumnValue(\"p_id\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"p_titre\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"t_debprojet\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"t_finprojet\"));\r\n\t\t \tlist.add(tmp);\r\n\t\t }\r\n\t\t \r\n\t\t int cpt = 0;\r\n\t\t for (String i : projet){\r\n\t\t \tString note = null;\r\n\t\t \tString requete2 = \"select n_note from note where n_idprojet = \" + i + \" and n_idetudiant = \" +\r\n\t\t \t_etudiant.getId();\r\n\t\t \t\r\n\t\t \tSystem.out.println(\"requete : \" + requete2);\r\n\t\t\t DataSet data2 = database.executeQuery(requete2);\r\n\t\t\t if (!data2.hasMoreElements()) {\r\n\t\t\t \tnote = \"non noté\";\r\n\t\t\t }\r\n\t\t\t else{\r\n\t\t\t \t System.out.println(\"note\");\r\n\t\t\t\t\t note = data2.getColumnValue(\"n_note\");\r\n\t\t\t }\r\n\t\t\t list.get(cpt).add(note);\r\n\t\t\t ++cpt;\r\n\t\t }\r\n\t\t \r\n\t\t for (int i = 0 ; i < list.size() ; ++i)\r\n\t\t {\r\n\t\t \tSystem.out.println(list.get(i));\r\n\t\t }\r\n\t\t \r\n\t\t return list;\r\n\t\t}",
"public List<ReporteComprasVentasRetenciones> getReporteRetencionClientes(int mes, int anio, int idOrganizacion)\r\n/* 231: */ {\r\n/* 232:307 */ StringBuffer sql = new StringBuffer();\r\n/* 233:308 */ sql.append(\"SELECT new ReporteComprasVentasRetenciones(fp.codigo, fp.nombre, COUNT(fp.codigo),\");\r\n/* 234:309 */ sql.append(\" (CASE WHEN fp.indicadorRetencionIva = true OR fp.indicadorRetencionFuente = true THEN SUM(dcfc.valor) END),\");\r\n/* 235:310 */ sql.append(\" 'Ventas', '' )\");\r\n/* 236:311 */ sql.append(\" FROM DetalleCobroFormaCobro dcfc\");\r\n/* 237:312 */ sql.append(\" JOIN dcfc.detalleFormaCobro dfc\");\r\n/* 238:313 */ sql.append(\" LEFT JOIN dfc.cobro c\");\r\n/* 239:314 */ sql.append(\" LEFT OUTER JOIN dfc.formaPago fp\");\r\n/* 240:315 */ sql.append(\" LEFT OUTER JOIN dcfc.detalleCobro dc\");\r\n/* 241:316 */ sql.append(\" LEFT OUTER JOIN dc.cuentaPorCobrar cpc\");\r\n/* 242:317 */ sql.append(\" LEFT OUTER JOIN cpc.facturaCliente fc\");\r\n/* 243:318 */ sql.append(\" WHERE MONTH(c.fecha) =:mes\");\r\n/* 244:319 */ sql.append(\" AND YEAR(c.fecha) =:anio\");\r\n/* 245:320 */ sql.append(\" AND fc.estado!=:estadoAnulado\");\r\n/* 246:321 */ sql.append(\" AND c.estado!=:estadoAnulado\");\r\n/* 247:322 */ sql.append(\" AND (fp.indicadorRetencionIva=true OR fp.indicadorRetencionFuente=true)\");\r\n/* 248:323 */ sql.append(\" AND fc.idOrganizacion = :idOrganizacion\");\r\n/* 249:324 */ sql.append(\" GROUP BY fp.codigo, fp.nombre, fp.indicadorRetencionIva, fp.indicadorRetencionFuente\");\r\n/* 250:325 */ sql.append(\" ORDER BY fp.codigo, fp.nombre\");\r\n/* 251:326 */ Query query = this.em.createQuery(sql.toString());\r\n/* 252:327 */ query.setParameter(\"mes\", Integer.valueOf(mes));\r\n/* 253:328 */ query.setParameter(\"anio\", Integer.valueOf(anio));\r\n/* 254:329 */ query.setParameter(\"estadoAnulado\", Estado.ANULADO);\r\n/* 255:330 */ query.setParameter(\"idOrganizacion\", Integer.valueOf(idOrganizacion));\r\n/* 256:331 */ return query.getResultList();\r\n/* 257: */ }",
"public List<Map<String, Object>> queryForListWithLog(final String sql) {\n return queryForListWithLog(proxyDataSource, sql);\n }",
"@Override\n\tpublic ArrayList<ClienteFisico> listar() throws SQLException {\n\t\t\n\t\tArrayList<ClienteFisico> listar = new ArrayList<ClienteFisico>();\n\t\t\n\t\t\n\t\tfor(ClienteFisico c : this.set){\n\t\t\t\n\t\t\tlistar.add(c);\n\t\t}\n\t\n\t\t\n\t\treturn listar;\n\t}",
"public static List<String> separarInstrucoesSql(String script) {\n\n\t\tList<String> retorno = new ArrayList<String>();\n\n\t\tInteger posCaractereInicio = 0;\n\t\tInteger posCaractereFim = 0;\n\t\tString terminador = \";\";\n\t\tboolean terminouScript = false;\n\n\t\tscript = script.trim();\n\n\t\twhile (!terminouScript) {\n\n\t\t\tscript = script.trim();\n\n\t\t\tif (script.length() < 3) {\n\t\t\t\tterminouScript = true;\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// verifica se inicia com set term\n\t\t\tString caractereAvaliado = script.substring(posCaractereInicio, 10).toUpperCase();\n\t\t\tcaractereAvaliado = script.replaceAll(\" \", \"\");\n\n\t\t\tif (caractereAvaliado.startsWith(\"SETTERM\")) {\n\t\t\t\tterminador = caractereAvaliado.substring(7, 8);\n\t\t\t\tposCaractereInicio = devolvePosicaoCaractere(script, terminador) + 2;\n\n\t\t\t\tscript = script.substring(posCaractereInicio);\n\t\t\t\tposCaractereInicio = 0;\n\t\t\t}\n\n\t\t\t// comentarios fora da instrução SQL\n\t\t\tif (caractereAvaliado.substring(0, 2).equals(\"/*\")) {\n\t\t\t\tposCaractereFim = devolveUltimaPosicaoScript(script, \"*/\", true);\n\t\t\t\tscript = script.substring(posCaractereFim + 2);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tposCaractereInicio = posicaoDoPrimeiroCaracterValido(script);\n\n\t\t\tif (posCaractereInicio > 0) {\n\t\t\t\tscript = script.substring(posCaractereInicio);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// percorrer a string até encontrar o terminador\n\t\t\tposCaractereFim = devolveUltimaPosicaoScript(script, terminador);\n\n\t\t\tif (script.length() < 3) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// adicionado na lista de scripts\n\t\t\t// System.out.println(\"-----------------------------------\");\n\t\t\t// System.out.println(script.substring(posCaractereInicio,\n\t\t\t// posCaractereFim));\n\n\t\t\tretorno.add(script.substring(posCaractereInicio, posCaractereFim));\n\n\t\t\tif (script.length() > posCaractereFim + 1)\n\t\t\t\tscript = script.substring(posCaractereFim + 1);\n\n\t\t\t// terminou os scripts\n\t\t\tscript = script.trim();\n\t\t\tif (script.length() < 10)\n\t\t\t\tterminouScript = true;\n\n\t\t\tposCaractereInicio = 0;\n\n\t\t}\n\n\t\treturn retorno;\n\t}"
]
| [
"0.7117383",
"0.69910824",
"0.6473962",
"0.63790554",
"0.6369473",
"0.6311562",
"0.6216357",
"0.6180231",
"0.61715806",
"0.6145559",
"0.61127394",
"0.61066234",
"0.6092409",
"0.6072771",
"0.6060921",
"0.6058655",
"0.60444313",
"0.60021454",
"0.6000008",
"0.59974957",
"0.598833",
"0.59768647",
"0.59658575",
"0.59514326",
"0.5942438",
"0.5922831",
"0.59223306",
"0.59159607",
"0.590407",
"0.58968437",
"0.58961403",
"0.58957094",
"0.5884678",
"0.58585715",
"0.58575225",
"0.58551556",
"0.58546495",
"0.5853384",
"0.58531827",
"0.58452827",
"0.58450377",
"0.58448803",
"0.5838031",
"0.5826715",
"0.58248115",
"0.58155173",
"0.5812567",
"0.58084106",
"0.58082485",
"0.5800101",
"0.5797758",
"0.57955074",
"0.5790651",
"0.5786262",
"0.5783471",
"0.57801586",
"0.5763542",
"0.57593644",
"0.5755289",
"0.57504797",
"0.5747913",
"0.57474923",
"0.5746734",
"0.5743231",
"0.5743084",
"0.5738335",
"0.5723277",
"0.5716634",
"0.5716228",
"0.5711224",
"0.5704952",
"0.57024074",
"0.56960267",
"0.5693709",
"0.56920713",
"0.5691715",
"0.5685452",
"0.5674173",
"0.56670254",
"0.56648844",
"0.56506705",
"0.56504655",
"0.5642857",
"0.5640977",
"0.56394124",
"0.56383854",
"0.56363547",
"0.56282204",
"0.56281066",
"0.56262606",
"0.56245357",
"0.56238306",
"0.562325",
"0.5621103",
"0.5620515",
"0.5620443",
"0.56178534",
"0.56150836",
"0.5614978",
"0.5613226",
"0.56123877"
]
| 0.0 | -1 |
Vrati mi info o aky pravidlo sa jedna, je to pre DebuggerService | @Override
public DebuggerRuleInfo getDebuggerRuleInfo() {
return new DebuggerRuleInfo("JOIN", "Generate variations for every type of JOIN (INNER JOIN | LEFT JOIN | IGHT JOIN).");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void debug() {\n\n\t\t// Establecemos el estado\n\t\tsetEstado(Estado.DEBUG);\n\n\t\t// Obtenemos la proxima tarea\n\t\ttarea = planificador.obtenerProximaTarea();\n\t}",
"public void getInfo(){\n System.out.println(\"Name: \" + name + \"\\n\" + \"Address: \" + address);\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"Debugging engine (idekey = \" + getSessionId() + \", port =\" + DLTKDebugPlugin.getDefault().getDbgpService().getPort() + \")\"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$\n\t}",
"public void infoDebug(String nombreClase, String mensaje) {\r\n\t\tif (controlador.getModoDebug())\r\n\t\t\tSystem.out\r\n\t\t\t\t\t.println(\"Debug :: [\" + nombreClase + \"]\\n \" + mensaje);\r\n\t}",
"public void reestablecerInfo(){\n panelIngresoControlador.getPanelIngreso().reestablecerInfo();\n }",
"private void mostrarInformacionP(){\n System.out.println(\"Nombre: \"+this.nombre);\n System.out.println(\"Sexo: \"+ this.sexo);\n System.out.println(\"Edad: \" + edad);\n\n }",
"public static void shoInfo() {\n\t\tSystem.out.println(description);\n\t \n\t}",
"public String debugInformation()\n\t\t{\n\t\t\treturn debugInformation;\n\t\t}",
"public static void debugInfo() { throw Extensions.todo(); }",
"public Debugger getDebugger() {\r\n\treturn debugger;\r\n}",
"public void clientInfo() {\n uiService.underDevelopment();\n }",
"public void info() {\r\n System.out.println(\" Name: \" + name + \" Facility: \" + facility + \" Floor: \" + floor + \" Covid: \"\r\n + positive + \" Age: \" + age + \" ID: \" + id);\r\n }",
"public void autoDetails() {\n\t\t\r\n\t}",
"public void debug() {\n\n }",
"@Override\r\n public String getDebugPathInfo(String entityName) {\n return null;\r\n }",
"public void logDebugData() {\n SmartDashboard.putNumber(\"Ele Pos\", getPosition());\n SmartDashboard.putBoolean(\"Ele Switch\", bottomSwitchValue());\n SmartDashboard.putNumber(\"Ele Current\", getCurrent());\n SmartDashboard.putNumber(\"Ele Out %\", elevatorSpark.getAppliedOutput());\n }",
"public void mostrarDatos() {\r\n System.out.println(\"El nombre del cliente es: \" + this.getNombre());\r\n System.out.println(\"El primer apellido es: \" + this.getPrimerApellido());\r\n System.out.println(\"El segundo apellido es: \" + this.getSegundoApellido());\r\n System.out.println(\"La edad es: \" + this.getEdad());\r\n }",
"@Override\r\n\t\t\tpublic void debug(String arg) {\n\t\t\t\t\r\n\t\t\t}",
"public void mostrarPersona(){\r\n System.out.println(\"Nombre: \" + persona.getNombre());\r\n System.out.println(\"Cedula: \" + persona.getCedula());\r\n }",
"void getInfo() {\n \tSystem.out.println(\"There doesn't seem to be anything here.\");\n }",
"public void debug()\r\n {\n \t\treload();\r\n }",
"public static boolean debugging()\n {\n return info;\n }",
"private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}",
"public void drawDebugInfo() {\n\n\t\t// Draw our home position.\n\t\tbwapi.drawText(new Point(5,0), \"Our home position: \"+String.valueOf(homePositionX)+\",\"+String.valueOf(homePositionY), true);\n\t\t\n\t\t// Draw circles over workers (blue if they're gathering minerals, green if gas, white if inactive)\n\t\tfor (Unit u : bwapi.getMyUnits()) {\n\t\t\tif (u.isGatheringMinerals()) \n\t\t\t\tbwapi.drawCircle(u.getX(), u.getY(), 12, BWColor.BLUE, false, false);\n\t\t\telse if (u.isGatheringGas())\n\t\t\t\tbwapi.drawCircle(u.getX(), u.getY(), 12, BWColor.GREEN, false, false);\n\t\t\telse if (u.getTypeID() == UnitTypes.Protoss_Probe.ordinal() && u.isIdle())\n\t\t\t\tbwapi.drawCircle(u.getX(), u.getY(), 12, BWColor.WHITE, false, false);\n\t\t\t\t\n\t\t}\n\t\t\n\t}",
"public String getInfo(){\n return \" name: \" + this.name;\n }",
"public void afficheInfos() {\n int i;\n Polygone p;\n for(i=0;i<this.list.size();i++){\n p = (Polygone) this.list.get(i);\n System.out.println(\"–––––––––––––––––––––\");\n System.out.println(\"Type : \" + p.toString());\n System.out.println(\"Sommet :\");\n System.out.print(p.texteSommets());\n System.out.println(\"Perimetre : \" + p.perimetre());\n System.out.println(\"Surface : \" + p.surface());\n System.out.println(\"–––––––––––––––––––––\");\n } \n }",
"String getInfo();",
"public void drukAf(){\n System.out.println(\"BSN :\" + burgerServiceNummer);\n System.out.println(\"voornaam :\" + voornaam);\n System.out.println(\"achternaam :\" + achternaam);\n System.out.println(\"geboortedatum :\" + geboorteDag + \"/\" + geboorteMaand + \"/\" + geboorteJaar);\n System.out.println(\"geslacht :\" + geslacht); \n }",
"public String getInfoString() {\n/* 140 */ return this.info;\n/* */ }",
"public String serviceInfo(){\n String msj = \"\";\n\n msj = \"Nombre del servicio: \" + serviceName;\n msj = \"Costo: \" + cost;\n msj = \"Fecha de realizacion: \" + date;\n msj = \"La ID de la mascota es: \" + petID;\n msj = \"La ID del cliente es: \" + clientID;\n\n return msj;\n }",
"Information getInfo();",
"public void test() {\n String name = AddressService.class.getName();\n System.out.print(name + \"xxxx\");\n Logs.d(name);\n }",
"public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }",
"public void printInfo(){\n\t\tSystem.out.println(\"id : \" + id + \" label : \" + label);\n\t\tSystem.out.println(\"vms : \" );\n\t\tfor(VirtualMachine v : vms){\n\t\t\tv.printInfo();\n\t\t}\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List getDebugInfo();",
"private void freundDetailsAnzeigen() throws Exception {\n Freund foundFriend = eingabeZumSuchen();\n\n System.out.println(\"Name: \" + foundFriend.getName());\n System.out.println(\"Handy: \" + foundFriend.getHandy());\n System.out.println(\"Telefon: \" + foundFriend.getTelefon());\n System.out.println(\"Adresse: \" + foundFriend.getAdresse());\n System.out.println(\"Geburtstag: \" + foundFriend.getGeburtstag());\n System.out.println(\"Schluessel: \" + foundFriend.getSchluessel());\n\n auswahlAnzeigen();\n }",
"@Override//sobrescribir metodo\n public String getDescripcion(){\n return hamburguesa.getDescripcion()+\" + lechuga\";//retorna descripcion del oobj hamburguesa y le agrega +lechuga\n }",
"public void info()\n {\n System.out.println(toString());\n }",
"public String doDetail(){\n if(idsecteur==null){\n this.addActionError(getText(\"error.topo.missing.id.\"));\n }else secteur = managerFactory.getSecteurManager().getbynid(idsecteur);\n {\n // this.addActionError(\"il n'y a pas de projet pour ce numéro \"+idtopo );\n\n\n }\nreturn (this.hasErrors())? ActionSupport.ERROR : ActionSupport.SUCCESS;\n\n }",
"@Override\n\tpublic void muestraInfo() {\n\t\tSystem.out.println(\"Adivina un número par: Es un juego en el que el jugador\" +\n\t\t\t\t\" deberá acertar un número PAR comprendido entre el 0 y el 10 mediante un número limitado de intentos(vidas)\");\n\t}",
"public Debugger getDebugger() {\n return m_debugger;\n }",
"public String info(){\r\n String info =\"\";\r\n info += \"id karyawan : \" + this.idkaryawan + \"\\n\";\r\n info += \"Nama karyawan : \" + this.namakaryawan + \"\\n\";\r\n return info;\r\n }",
"public void getInformation(){\n if (car == null) {\n throw new InvalidParameterException(\"Service is null\");\n }\n System.out.println(\"Setter injection client\");\n System.out.println(car.getInformation());\n }",
"public void print_DEBUG() {\n\t\tSystem.out.println(\"Direction\");\n\t\tSystem.out.println(\"ID: \" + ID);\n\t\tSystem.out.println(\"FROM: \" + from.name() );\n\t\tSystem.out.println(\"TO: \" + to.name() );\n\t\tSystem.out.println(\"dir: \" + dir);\n\t\tSystem.out.println(\"Locked: \" + locked);\n\t\tSystem.out.println(\"LockPattern: \" + lockPattern);\n\t}",
"private static void displayDebugInfo() {\n showDeckInfo();\n showPlayerDeckInfo();\n showMatchedDeckInfo();\n\n// for(int i = 0; i< playerDeck.size(); i++) {\n// //system.out.println(\"Card Value:\" + GameDeck.getCardValue(playerDeck.get(i)));\n// //system.out.println(\"Card Id:\" + GameDeck.getCardId(playerDeck.get(i))); //syntax for accessing the card id\n// //system.out.println(\"Card Suit:\" + GameDeck.getCardSuit(playerDeck.get(i))); //syntax for accessing the card suit\n// //system.out.println(\"Card Name:\" + GameDeck.getCardName(playerDeck.get(i))); //syntax for accessing the card name\n// //system.out.println(\"Card Color:\" + GameDeck.getCardColor(playerDeck.get(i)));\n// }\n// //system.out.println(\"Pattern Length:\" + patterns.length);\n }",
"public void dump() {\n System.out.println(\"ID : \"+hostID);\n for (int i=0; i<hostAddresses.size(); i++) System.out.println(\" - addresse : \"+hostAddresses.elementAt(i).getNormalizedAddress());\n System.out.println(\"CPU : \"+cpuLoad);\n System.out.println(\"Memoire : \"+memoryLoad);\n System.out.println(\"Batterie : \"+batteryLevel);\n System.out.println(\"Threads : \"+numberOfThreads);\n System.out.println(\"CMs : \"+numberOfBCs);\n System.out.println(\"connecteurs : \"+numberOfConnectors);\n System.out.println(\"connecteurs entree reseau : \"+numberOfConnectorsNetworkInputs);\n System.out.println(\"connecteurs sortie reseau : \"+numberOfConnectorsNetworkOutputs);\n System.out.println(\"Traffic PF entree : \"+networkPFInputTraffic);\n System.out.println(\"Traffic PF sortie : \"+networkPFOutputTraffic);\n System.out.println(\"Traffic application entree : \"+networkApplicationInputTraffic);\n System.out.println(\"Traffic application sortie : \"+networkApplicationOutputTraffic);\n }",
"public String detailsUpdate() throws Exception {\n\t\treturn null;\n\t}",
"@Override\n\tpublic String toStringDebug() {\n\t\treturn null;\n\t}",
"public String getInfo() {\n return null;\n }",
"private static void printDetail() {\n System.out.println(\"Welcome to LockedMe.com\");\n System.out.println(\"Version: 1.0\");\n System.out.println(\"Developer: Sherman Xu\");\n System.out.println(\"[email protected]\");\n }",
"private void carregaInformacoes() {\n Pessoa pessoa = (Pessoa) getIntent().getExtras().getSerializable(\"pessoa\");\n edtNome.setText(pessoa.getNome());\n edtEmail.setText(pessoa.getEmail());\n edtTelefone.setText(pessoa.getTelefone());\n edtIdade.setText(pessoa.getIdade());\n edtCPF.setText(pessoa.getCpf());\n }",
"@Override\n\tpublic void display() {\n\t\tSystem.out.println(\"Pasos dados por \" + a.nombre + \" \" + a.distancia + \" m = \" + pasosActividad + \" / Pasos en total = \" + pasosTotal);\n\t}",
"public void printInfo() {\r\n System.out.printf(\"%-25s\", \"Nomor Rekam Medis Pasien\");\r\n System.out.println(\": \" + getNomorRekamMedis());\r\n System.out.printf(\"%-25s\", \"Nama Pasien\");\r\n System.out.println(\": \" + getNama());\r\n System.out.printf(\"%-25s\", \"Tempat, Tanggal Lahir\");\r\n System.out.print(\": \" + getTempatLahir() + \" , \");\r\n getTanggalKelahiran();\r\n System.out.printf(\"%-25s\", \"Alamat\");\r\n System.out.println(\": \" + getAlamat());\r\n System.out.println(\"\");\r\n }",
"@Override\n public String getInfo(){\n return info;\n }",
"void displayDebugInformation() {\n\t\tmyParent.text(\"X\", X.x + 10, X.y + 5);\n\t\tmyParent.text(\"Y\", Y.x + 10, Y.y + 5);\n\t\tmyParent.text(\"Z\", Z.x + 10, Z.y + 5);\n\t\tmyParent.text(\"Q\", Q.x + 10, Q.y + 5);\n\t\tmyParent.fill(255);\n\n\t\tString pointFocuses = \"\";\n\t\tString stickedPoints = \"\";\n\t\tfor (int i = 0; i < amount; i++) {\n\t\t\tpointFocuses += point[i].isFocusedOnThePoint() + \" \";\n\t\t\tstickedPoints += point[i].sticked + \" \";\n\n\t\t\t// fill(200);\n\t\t\tmyParent.text(i, point[i].x + 10, point[i].y + 5);\n\t\t}\n\n\t\tmyParent.text(\"state: \" + state + \"\\nfocused on line: \" + selectedLine + \"\\nfocused on point: \" + selectedPoint\n\t\t\t\t+ \"\\nmouseLockedToLine: \" + mouseLockedToLine + \"\\npointFocuses: \" + pointFocuses + \"\\nstickedPoints: \"\n\t\t\t\t+ stickedPoints + \"\\ndragLock: \" + dragLock + \"\\ndiagonal scale factor: \" + diagonalScaleFactor\n\t\t\t\t+ \"\\npress D to hide debug\", 40, myParent.height - 160);\n\n\t\t// diplayNeighborPoints();\n\t}",
"private static void grabarYleerPaciente(Paciente paciente) {\r\n\t\tString ruta = paciente.getIdUnico();\r\n\t\tDTO<Paciente> dtoPaciente = new DTO<>(\"src/Almacen/\" + ruta + \".dat\");\r\n\t\tif (dtoPaciente.grabar(paciente) == true) {\r\n\t\t\tSystem.out.println(paciente.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tPaciente pacienteLeer = dtoPaciente.leer();\r\n\t\tSystem.out.println(pacienteLeer);\r\n\t\tSystem.out.println(pacienteLeer.getNombre());\r\n\t\tSystem.out.println(pacienteLeer.getApellidos());\r\n\t\tSystem.out.println(pacienteLeer.getDireccion());\r\n\t\tSystem.out.println(pacienteLeer.getFechaDeNacimiento());\r\n\t\tSystem.out.println(pacienteLeer.getIdUnico());\r\n\t\tSystem.out.println(pacienteLeer.getTelefono());\r\n\t\tSystem.out.println(pacienteLeer.getTratamientos());\r\n\t}",
"public void recuperarFactura(){\n int id = datosFactura.recuperarFacturaID();\n Factura factura = almacen.getFactura(id);\n System.out.println(\"\\n\");\n if(factura != null)\n System.out.print(factura.toString());\n System.out.println(\"\\n\");\n }",
"private void dumpService(ServiceExt service)\n {\n log(\"* Service Information\");\n log(\"*\");\n log(\"* Service Name: \" + service.getName());\n log(\"* Service Number: \" + service.getServiceNumber());\n log(\"* Service MinorNumber: \" + service.getMinorNumber());\n assertNotNull(\"Service ServiceType cannot be null\", service.getServiceType());\n log(\"* Service Type: \" + service.getServiceType());\n log(\"* Service hasMultipleInstances: \" + service.hasMultipleInstances());\n assertNotNull(\"Service Locator cannot be null\", service.getLocator());\n log(\"* Service Locator: \" + service.getLocator());\n assertNotNull(\"Service Handle cannot be null\", service.getServiceHandle());\n log(\"* Service Handle: \" + service.getServiceHandle());\n log(\"*\");\n }",
"@Override\n public void updateDebugText(MiniGame game)\n {\n }",
"@Override\n\tpublic emDebugInfo getDebugState() throws emException, TException {\n\t\treturn null;\n\t}",
"public boolean isDebug();",
"@Override\n public void updateDebugText(MiniGame game) {\n }",
"public static final boolean isDebugInfo() { return true; }",
"LabyDebugger getLabyDebugger();",
"public static void proveraServisa() {\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje racunate vreme sledeceg servisa:\");\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tUtillMethod.proveraServisaVozila(Main.getVozilaAll().get(redniBroj));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}",
"@Override\n\tpublic void showInfo() {\n\t\tSystem.out.println(\"Machine Interface \" + id);\n\t}",
"public void skrivUt(){\n System.out.println(this.fornavn + \" \" + this.etternavn + \" \" + this.adresse + \" \" + this.telefonnr + \" \" + this.alder);\n }",
"private static void grabarYllerPaciente() {\r\n\t\tPaciente paciente = new Paciente(\"Juan\", \"Garcia\", \"65\", \"casa\", \"2\", \"1998\");\r\n\t\tPaciente pacienteDos = new Paciente(\"MArta\", \"Garcia\", \"65\", \"casa\", \"3\", \"1998\");\r\n\t\tPaciente pacienteTres = new Paciente(\"MAria\", \"Garcia\", \"65\", \"casa\", \"4\", \"1998\");\r\n\t\tString ruta = paciente.getIdUnico();\r\n\t\tString rutaDos = pacienteDos.getIdUnico();\r\n\t\tString rutaTres = pacienteTres.getIdUnico();\r\n\t\tDTO<Paciente> dtoPacienteDos = new DTO<>(\"src/Almacen/\" + rutaDos + \".dat\");\r\n\t\tDTO<Paciente> dtoPaciente = new DTO<>(\"src/Almacen/\" + ruta + \".dat\");\r\n\t\tDTO<Paciente> dtoPacienteTres = new DTO<>(\"src/Almacen/\" + rutaTres + \".dat\");\r\n\t\tif (dtoPaciente.grabar(paciente) == true) {\r\n\r\n\t\t\tSystem.out.println(paciente.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tif (dtoPacienteDos.grabar(pacienteDos) == true) {\r\n\r\n\t\t\tSystem.out.println(pacienteDos.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tif (dtoPacienteTres.grabar(pacienteTres) == true) {\r\n\t\t\tSystem.out.println(pacienteTres.getNombre() + \" grabado\");\r\n\t\t}\r\n\t\t;\r\n\t\tPaciente pacienteLeer = dtoPaciente.leer();\r\n\t\tSystem.out.println(pacienteLeer);\r\n\t\tSystem.out.println(pacienteLeer.getNombre());\r\n\t}",
"public void printForDebug() {\n\t\tif(Globalconstantable.DEBUG)\n\t\t{\n\t\t\tSystem.out.println(this.getSID());\n\t\t\tSystem.out.println(this.getScores());\n\t\t}\n\t}",
"@Override()\n public String getToolName()\n {\n return \"ldap-debugger\";\n }",
"@Override\n public void afficher() {\n super.afficher();\n System.out.println(\"Sexe : \" + getSexe());\n System.out.println(\"Numéro de sécurité sociale : \" + getNumeroSecuriteSociale());\n System.out.println(\"Date de naissance : \" + getDateDeNaissance().format(DateTimeFormatter.ofLocalizedDate(FormatStyle.LONG)));\n System.out.println(\"Commentaires : \" + getCommentaires());\n this.adresse.afficher();\n }",
"boolean isDebug();",
"boolean isDebug();",
"public String info() {\n\t\t\tString instrumentsString = \" \";\n\t\t\tfor(Instruments i : Instruments.values()){\n\t\t\t\tinstrumentsString +=i.toString() + \"\\n\";\n\t\t\t}\n\t\t\treturn (\"База данных представляет из себя набор старцев(обьектов Olders),\" +\"\\n\"+\n \"каждый из которых имеет поля :\" +\"\\n\"+\n \"id(уникальный идентификатор)\" +\"\\n\"+\n \"name(имя старца)\" +\"\\n\"+\n \"userid(уникальный идентификатор пользователя, который является его владельцем)\" +\"\\n\"+\n \"dateofinit-дата инициализация старца\");\n\t\t}",
"public void deskripsi() {\r\n System.out.println(this.nama + \" bekerja di Perusahaan \" + Employee.perusahaan + \" dengan usia \" + this.usia + \" tahun\");\r\n }",
"@Override\n\tpublic String dohvatiKontakt() {\n\t\treturn \"Naziv tvrtke: \" + naziv + \", mail: \" + getEmail() + \", tel: \" + getTelefon() + \", web: \" + web;\n\t}",
"public void viewDetails(){\n for(int i = 0; i < roads.size(); i++){\n System.out.println(roads.get(i).getName());\n System.out.println(roads.get(i).getNorthStatus() + \" - \" + roads.get(i).getNorthAdvisory());\n System.out.println(roads.get(i).getSouthStatus() + \" - \" + roads.get(i).getSouthAdvisory() + \"\\n\");\n }\n }",
"public static void p_show_info_program() {\n System.out.println(\"╔══════════════════════════════╗\");\n System.out.println(\"║ SoftCalculator V1.2 ║\");\n System.out.println(\"║ Oscar Javier Cardozo Diaz ║\");\n System.out.println(\"║ 16/04/2021 ║\");\n System.out.println(\"╚══════════════════════════════╝\");\n }",
"@Override\n\tpublic String toString() {\n\t\treturn \"CODIGO: \" +codigo+ \" NOME: \"+nome+\" DIA: \"+dataInicio+\" HORA:\"+horaInicio+\" LOCAL:\"+local;\n\t}",
"public void printInfo(){\n\t}",
"public void printInfo(){\n\t}",
"public void tekst_ekranu(Graphics dbg)\n {\n dbg.setColor(Color.BLACK);\n int y=(int)Math.round(getHeight()*0.04);\n dbg.setFont(new Font(\"TimesRoman\",Font.PLAIN,y));\n dbg.drawString(\"zycie \"+liczba_zyc,(int)Math.round(getWidth()*0.01),y);\n dbg.drawString(\"punkty \"+liczba_punktow,(int)Math.round(getWidth()*0.2),y);\n dbg.drawString(\"czas \"+(int)Math.round(czas_gry),(int)Math.round(getWidth()*0.4),y);\n dbg.drawString(\"naboje \"+liczba_naboi,(int)Math.round(getWidth()*0.6),y);\n dbg.drawString(\"poziom \"+poziom,(int)Math.round(getWidth()*0.8),y);\n }",
"public void getInfo() {\n System.out.println(\"Content : \" + content);\n System.out.println(\"Name : \" + name);\n System.out.println(\"Location : (\" + locX + \",\" + locY + \")\");\n System.out.println(\"Weight : \" + String.format(\"%.5f\", weight) + \" kg/day\");\n System.out.println(\"Habitat : \" + habitat);\n System.out.println(\"Type : \" + type);\n System.out.println(\"Diet : \" + diet);\n System.out.println(\"Fodder : \" + String.format(\"%.5f\", getFodder()) + \" kg\");\n System.out.println(tamed ? \"Tame : Yes \" : \"Tame : No \");\n System.out.println(\"Number of Legs : \" + legs);\n }",
"public SharedMemory infos();",
"public void view(){\r\n System.out.println(\"\tNombre: \"+name);\r\n\t\tSystem.out.println(\"\tTipo: \"+type.id);\r\n\t\tSystem.out.println(\"\tVal: \"+((Integer)val).intValue());\r\n\t\tif(block==true){\r\n\t\t\tSystem.out.println(\"\tBLOQUEADA\");\r\n\t\t}else{\r\n\t\t\tSystem.out.println(\"\tDESBLOQUEADO\");\r\n\t\t}\r\n //System.out.println(\"\tTipo2: \"+kind);\r\n //System.out.println(\"\tAnidamiento: \"+level);\r\n //System.out.println(\"\tSigDireccion: \"+nextAdr);\r\n System.out.println(\"\t*********************\");\r\n\t\tSystem.out.println();\r\n }",
"public static String getInfo() {\n/* 327 */ return \"\";\n/* */ }",
"public String getInfo() {\n\t\treturn null;\r\n\t}",
"public void status() {\n System.out.println(\"Nome: \" + this.getNome());\n System.out.println(\"Data de Nascimento: \" + this.getDataNasc());\n System.out.println(\"Peso: \" + this.getPeso());\n System.out.println(\"Altura: \" + this.getAltura());\n }",
"public void print_dev() {\n\t\tSystem.out.println(\r\n\t\t\t\t\t\t\t\t\t\"[System] 펫 정보입니다.\\n 이름 : \"+TMGCSYS.tmgcName\r\n\t\t\t\t\t\t\t\t+\t\", 레벨 : \"+TMGCSYS.tmgcLV+\", 경험치 : \"+TMGCSYS.tmgcEXP+\"/\"+(100*TMGCSYS.tmgcLV)\r\n\t\t\t\t\t\t\t\t+\t\", 체력 : \"+TMGCSYS.tmgcHP+\", 스트레스 : \"+TMGCSYS.tmgcStress+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Function Limit Count\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Eat : \"+TMGCSYS.tmgcLimitEat+\", Sleep : \"+TMGCSYS.tmgcLimitSleep\r\n\t\t\t\t\t\t\t\t+\t\", Walk : \"+TMGCSYS.tmgcLimitWalk+\", Study : \"+TMGCSYS.tmgcLimitStudy+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Ability\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" STR : \"+TMGCSYS.tmgcSTR+\", INT : \"+TMGCSYS.tmgcINT\r\n\t\t\t\t\t\t\t\t+\t\", DEB : \"+TMGCSYS.tmgcDEB+\", HET : \"+TMGCSYS.tmgcHET+\"\\n\\n\\n\"\r\n\t\t\t\t\t\t\t\t+\t\" Character Job : \"+TMGCSYS.tmgc2ndJob\r\n\t\t\t\t\t\t\t\t);\r\n\t}",
"void getInfo() {\n\tSystem.out.println(\"My name is \"+name+\" and I am going to \"+school+\" and my grade is \"+grade);\n\t}",
"@Override\n public String descripcion() {\n return \"Viaje incentivo que te envia la empresa \" + empresa;\n }",
"public void recuperarFacturasCliente(){\n String NIF = datosFactura.recuperarFacturaClienteNIF();\n ArrayList<Factura> facturas = almacen.getFacturas(NIF);\n if(facturas != null){\n for(Factura factura : facturas) {\n System.out.println(\"\\n\");\n System.out.print(factura.toString());\n }\n }\n System.out.println(\"\\n\");\n }",
"@Override\n\tpublic void debug(Marker marker, String message, Object p0) {\n\n\t}",
"@Override\n public String toString() {\n return info();\n }",
"public void mainkan(){\n System.out.println();\n //System.out.printf(\"Waktu: %1.2f\\n\", this.oPlayer.getWaktu());\n System.out.println(\"Nama : \" + this.oPlayer.nama);\n System.out.println(\"Senjata : \" + this.oPlayer.getNamaSenjataDigunakan());\n System.out.println(\"Kesehatan : \" + this.oPlayer.getKesehatan());\n// System.out.println(\"Daftar Efek : \" + this.oPlayer.getDaftarEfekDiri());\n System.out.println(\"Nama Tempat : \" + this.namaTempat);\n System.out.println(\"Narasi : \" + this.narasi);\n }",
"void detallePokemon(){\n System.out.println(numero+\" - \"+nombre);\n }",
"public void openPassengerInfo(Event event) throws Exception {\n int passengerId = passengers.getSelectionModel().getSelectedIndex();\n PassengerPlane plane = (PassengerPlane) this.plane;\n\n World.createPassengerInfo(plane.getPassengerContainer().getPassengers().get(passengerId));\n }",
"public GuestInfo getGuestInfo(com.kcdataservices.partners.kcdebdmnlib_hva.businessobjects.guestinfo.v1.GuestInfo res){\n\t\tGuestInfo guestInfo = new GuestInfo();\n\t\t\n\t\tguestInfo.setSelectedFlag( res.getSelectedFlag() );\n\t\tguestInfo.setGuestId( res.getGuestId() );\n\t\tguestInfo.setTitle( res.getTitle() );\n\t\tguestInfo.setFirstName( res.getFirstName() );\n\t\tguestInfo.setMiddleName( res.getMiddleName() );\n\t\tguestInfo.setLastName( res.getLastName() );\n\t\tguestInfo.setGender( res.getGender() );\n\t\tguestInfo.setPhoneNumber( res.getPhoneNumber() );\n\t\tguestInfo.setEmailId( res.getEmailId() );\n\t\tguestInfo.setParentGuestId( res.getParentGuestId() );\n\t\tguestInfo.setEmergencyContactName( res.getEmergencyContactName() );\n\t\t//Start the the AV-3749/HBsi 52 Enhancement of emergency info tab for passegner\t\n\t\t// Map/Setting the emergency contact phone correctly.\n\t\tguestInfo.setEmergencyContactPhone( res.getEmergencyContactPhone() );\n\t\t//End of the AV-3749/HBsi 52 Enhancement of emergency info tab for passegner\t\n\t\tguestInfo.setFrequentFlyerNo( res.getFrequentFlyerNo() );\n\t\tguestInfo.setAirRemarks( res.getAirRemarks() );\n\t\tguestInfo.setHotelRemarks( res.getHotelRemarks() );\n\t\tguestInfo.setCruiseRemarks( res.getCruiseRemarks() );\n\t\tguestInfo.setMealRequest( res.getMealRequest() );\n\t\tguestInfo.setAirRequest( res.getAirRequest() );\n\t\tguestInfo.setGroundRequest( res.getGroundRequest() );\n\t\tguestInfo.setCateringRequest( res.getCateringRequest() );\n\t\tguestInfo.setSeatPreference( res.getSeatPreference() );\n\t\tguestInfo.setPnrNumber( res.getPnrNumber() );\n\t\tguestInfo.setStatus( res.getStatus() );\n\t\tguestInfo.setRedressNumber( res.getRedressNumber() );\n\t\tguestInfo.setChangeType( res.getChangeType() );\n\t\tguestInfo.setOldPaxId( res.getOldPaxId() );\n\t\tguestInfo.setPaxWeight( res.getPaxWeight() );\n\t\tif( res.getAge() != null ){\n\t\t\tguestInfo.setAge( res.getAge().byteValue() );\n\t\t}\n\t\tif( res.isLapChild() != null ){\n\t\t\tguestInfo.setLapChild( res.isLapChild().booleanValue() );\n\t\t}\n\t\tif( res.getDateOfBirth() != null ){\n\t\t\tguestInfo.setDateOfBirth( this.dateConverterXMLtoUtilBirthDate( res.getDateOfBirth() ) );\n\t\t}\n\t\tif( (res.getAgeCode() != null) && (res.getAgeCode().getAge() > 0) ){\n\t\t\tguestInfo.setAgeCode( this.getAgeCode( res.getAgeCode() ) );\n\t\t}\n\t\tif( res.getPassportInfo() != null ){\n\t\t\tguestInfo.setPassportInfo( this.getPassportInfo( res.getPassportInfo() ) );\n\t\t}\n\t\tif( res.getPriceBreakup() != null ){\n\t\t\tguestInfo.setPriceBreakup( this.getGuestPriceBreakup( res.getPriceBreakup() ) );\n\t\t}\n\t\t\n\t\treturn guestInfo;\n\t}",
"@Override\n public void information() {\n System.out.println(\"\");\n System.out.println(\"Dog :\");\n System.out.println(\"Age : \" + getAge());\n System.out.println(\"Name : \" + getName());\n System.out.println(\"\");\n }",
"private void drawDebugInfo(final Graphics2D theGraphics, final Vehicle theVehicle) {\n int x = theVehicle.getX() * SQUARE_SIZE;\n int y = theVehicle.getY() * SQUARE_SIZE;\n\n // draw numbers on each vehicle\n theGraphics.setColor(Color.WHITE);\n theGraphics.drawString(theVehicle.toString(), x, y + SQUARE_SIZE - 1);\n theGraphics.setColor(Color.BLACK);\n theGraphics.drawString(theVehicle.toString(), x + 1, y + SQUARE_SIZE);\n\n // draw arrow on vehicle for its direction\n final Direction dir = theVehicle.getDirection();\n int dx = (SQUARE_SIZE - MARKER_SIZE) / 2;\n int dy = dx;\n\n switch (dir) {\n case WEST:\n dx = 0;\n break;\n\n case EAST:\n dx = SQUARE_SIZE - MARKER_SIZE;\n break;\n\n case NORTH:\n dy = 0;\n break;\n\n case SOUTH:\n dy = SQUARE_SIZE - MARKER_SIZE;\n break;\n\n default:\n }\n\n x = x + dx;\n y = y + dy;\n\n theGraphics.setColor(Color.YELLOW);\n theGraphics.fillOval(x, y, MARKER_SIZE, MARKER_SIZE);\n }",
"public void debugPrint() {\n\t\tsuper.debugPrint();\n\t\tSystem.out.println(\"requestID: \" + requestID);\n\t\tSystem.out.println(\"jzn: \" + jzn);\n\t\tif (jzn != null) {\n\t\t\tfor (int i = 0; i < jzn.length; i++) {\n\t\t\t\tSystem.out.println(i + \": \" + (jzn[i] != null ? jzn[i].length() : 0));\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"jzt: \" + jzt);\t\t\n\t}"
]
| [
"0.65288335",
"0.595146",
"0.58399975",
"0.58116955",
"0.5721499",
"0.5714775",
"0.562737",
"0.55849636",
"0.5560775",
"0.554795",
"0.55266285",
"0.5514145",
"0.54413414",
"0.5428243",
"0.54011303",
"0.5398571",
"0.5375061",
"0.53607583",
"0.5340914",
"0.53396106",
"0.5316242",
"0.5304038",
"0.52996093",
"0.52949435",
"0.528781",
"0.5286415",
"0.5275048",
"0.5273868",
"0.5271879",
"0.52648187",
"0.5264194",
"0.5261608",
"0.52601606",
"0.5257046",
"0.52488995",
"0.52379256",
"0.5232793",
"0.5226266",
"0.52254426",
"0.52242047",
"0.5223565",
"0.5222978",
"0.52217364",
"0.52199584",
"0.5218403",
"0.52078885",
"0.5207441",
"0.52006984",
"0.520052",
"0.52000266",
"0.5195803",
"0.5193497",
"0.51864314",
"0.51836276",
"0.518052",
"0.51801527",
"0.51774544",
"0.51765734",
"0.517438",
"0.5173772",
"0.5172397",
"0.51717836",
"0.5167342",
"0.51648015",
"0.51637596",
"0.516274",
"0.5162724",
"0.51624745",
"0.5160603",
"0.5157606",
"0.51573604",
"0.5153008",
"0.5153008",
"0.51516926",
"0.51503766",
"0.5148137",
"0.51471376",
"0.5145696",
"0.5140977",
"0.51384735",
"0.51384735",
"0.51304865",
"0.51299244",
"0.51282084",
"0.5116863",
"0.51165926",
"0.5114041",
"0.5106361",
"0.5100688",
"0.5097811",
"0.5090642",
"0.50864947",
"0.5085922",
"0.5079906",
"0.5071269",
"0.50657713",
"0.5065474",
"0.5052725",
"0.5049634",
"0.5048166",
"0.50477576"
]
| 0.0 | -1 |
Vratim co som nasiel aby som to neskor osekal z stringu, spoliham sa ze metoda plny pole typov | private String whatFormOfJoin(final String sqlTrash, final int indexOfJoin) {
// 21 pred potrebujem max
String preSQLTrash = sqlTrash.substring(
indexOfJoin - 21 < 0 ? 0 : indexOfJoin - 21,
indexOfJoin).toUpperCase();
if (preSQLTrash.endsWith("_")) {
joinTypeBlocks.add(0);
return "STRAIGHT_JOIN";
} else if (preSQLTrash.contains("INNER")) {
joinTypeBlocks.add(0);
return "INNER JOIN";
} else if (preSQLTrash.contains("CROSS")) {
joinTypeBlocks.add(0);
return "CROSS JOIN";
} else if (preSQLTrash.contains("LEFT")) {
joinTypeBlocks.add(1);
String returnString = "LEFT";
if (preSQLTrash.contains("OUTER")) {
returnString = returnString + " OUTER JOIN";
} else {
returnString = returnString + " JOIN";
}
if (preSQLTrash.contains("NATURAL")) {
returnString = "NATURAL " + returnString;
}
return returnString;
} else if (preSQLTrash.contains("RIGHT")) {
joinTypeBlocks.add(2);
String returnString = "RIGHT";
if (preSQLTrash.contains("OUTER")) {
returnString = returnString + " OUTER JOIN";
} else {
returnString = returnString + " JOIN";
}
if (preSQLTrash.contains("NATURAL")) {
returnString = "NATURAL " + returnString;
}
return returnString;
}
//ak nenajdem nic exte
joinTypeBlocks.add(0);
return "JOIN";
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@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 }",
"@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 }",
"@Test\n public void kaasunKonstruktoriToimiiOikeinTest() {\n assertEquals(rikkihappo.toString(),\"Rikkihappo Moolimassa: 0.098079\\n tiheys: 1800.0\\n lämpötila: 298.15\\n diffuusiotilavuus: 50.17\\npitoisuus: 1.0E12\");\n }",
"@Test \n\tpublic void testToString() {\n\t\t\n\t\tString saida = \"decio neto - 56554522\";\n\t\tassertEquals(contato1.toString(), saida);\n\t}",
"@Test public void testToString() {\n final OctaveObject string = new OctaveString(\"tekst\");\n assertEquals(\"# name: ans\\n\" + \n\t\t \"# type: string\\n\" + \n\t\t \"# elements: 1\\n\" + \n\t\t \"# length: 5\\ntekst\\n\", \n\t\t OctaveIO.toText(string));\n }",
"@Override public String getCarne(){\n return \"salchicha y jamón \";\n }",
"@Test\n public void testNoteToString() {\n \tassertEquals(\"string for a note\", note.toString(), \"^C'24\");\n }",
"@Test(expected = NemaKonfiguracije.class)\n public void testUcitajKonfiguraciju_String() throws Exception {\n System.out.println(\"ucitajKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.ucitajKonfiguraciju(datKonf.getName());\n }",
"String getString();",
"String getString();",
"String getString();",
"public PilhaStringTest()\n {\n }",
"java.lang.String getPrenume();",
"public abstract String mo24851a(String str);",
"public static void main(String[] args) {\n char[] cadeiaCaracter = {'B','E','N','G','I','L'};\n String cadeiaChar = new String(cadeiaCaracter);\n System.out.println(cadeiaChar);\n //Criar string a partir de intervalo de cadeias de caractere\n char[] abcdef = {'A','B','C','D','E','F'};\n String abc = new String(abcdef, 0,3);\n System.out.println(abc);\n //Array de byte, cada byte representa um caractere da tabela ascii\n byte[] ascii = {65,66,67,68,69};\n String abcde = new String(ascii);\n System.out.println(abcde);\n String cde = new String(ascii,1,3);\n System.out.println(cde);\n //Atribuição sem o new\n String let = \"Letícia\";\n String lettis = \"Letícia\";\n System.out.println(let);\n }",
"@Test\r\n\tpublic void testGetString() {\r\n\t\tString s = lattice1.getString();\r\n\t\tString ss = \"[10. 6. 4.](12.328828005937952)\"\r\n\t\t\t\t+ \"[7. 11. 5.](13.96424004376894)\"\r\n\t\t\t\t+ \"[6.8 -4. -9.](11.968291440301744)\";\r\n\t\tAssert.assertEquals(\"getString\", s, ss);\r\n\t}",
"String getFromText();",
"abstract String mo1747a(String str);",
"private String saisieString(String typeChoice) {\n\t\tSystem.out.println(typeChoice);\n\t\tString persoString= sc.nextLine();\n\t\treturn persoString;\n\t}",
"@Test\n\tpublic void testaToString() {\n\t\tcontato = new Contato(\"Jardely\", \"Maris\", \"984653722\");\n\t\tassertEquals(contato.toString(), \"Jardely Maris - 984653722\");\n\t}",
"@Override\n\tpublic void 식사(String 메뉴) {\n\t\t\n\t}",
"static String type(String sin){\n String s = new String();\n for(int c = 0; 0<sin.length();c++){\n if(sin.charAt(c)>='a'&&sin.charAt(c)<='z'){\n s+=\"variable\";\n }else if(sin.charAt(c)>='0'&&sin.charAt(c)<='0'){\n s+=\"Integer\";\n }\n }\n return s;\n }",
"@Test\n\tpublic void testToString2() {\n\t\t\n\t\tString saideira = \"3 - sono infinito\";\n\t\tassertEquals(contato2.toString2(), saideira);\n\t}",
"void mo12635a(String str);",
"void mo3768a(String str);",
"@Override\r\n public String toString() {\r\n// ritorna una stringa\r\n return \"pollo\";\r\n }",
"public String getString();",
"public abstract java.lang.String getCod_tecnico();",
"@Override\r\n\t\tpublic GeometrijskiLik stvoriIzStringa(String parametri) {\r\n\r\n\t\t\tString[] parametriNiz = parametri.split(\"\\\\s+\");\r\n\t\t\tif (parametriNiz.length != 4) {\r\n\t\t\t\tthrow new IllegalArgumentException(\"Netocan broj argumenata.\");\r\n\t\t\t}\r\n\t\t\tint[] parametriBrojevi = new int[4];\r\n\t\t\tfor (int i = 0; i < parametriNiz.length; i++) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tparametriBrojevi[i] = Integer.parseInt(parametriNiz[i]);\r\n\t\t\t\t} catch (NumberFormatException e) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\r\n\t\t\t\t\t\t\t\"Nisu dani integer brojevi.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\treturn new Elipsa(parametriBrojevi[0], parametriBrojevi[1],\r\n\t\t\t\t\tparametriBrojevi[2], parametriBrojevi[3]);\r\n\t\t}",
"@Test\n\tpublic void test_toString() {\n\tTennisPlayer c1 = new TennisPlayer(5,\"David Ferrer\");\n\tassertEquals(\"[5,David Ferrer]\",c1.toString());\n }",
"@Test\n\tpublic void testToString() {\n\t\tassertEquals(\n\t\t\t\t\"SHOW: Lana Del Rey planeta Terra, R$ 100.0, Nao emprestado, 120 min, LIVRE, Lana Del Rey, 10 faixas\",\n\t\t\t\tshow.toString());\n\t}",
"static void printWord(String propozitie) {\n System.out.println(propozitie);\n\n\n }",
"public void Tarifa(String tipoTarifa){\n Tarifa = tipoTarifa;\n Regular = \"R\";\n Comercial = \"C\";\n\n }",
"abstract String moodString();",
"public String toString(){\r\n\t\t\t\t\treturn \"перший в черзі і шлях вільний\";\r\n\t\t\t\t}",
"void mo5871a(String str);",
"public InterrogationMeteoString() {\r\n\t\tthis(null, null, null, null, null);\r\n\t}",
"@Test\n public void testSpremiKonfiguraciju_String() throws Exception {\n System.out.println(\"spremiKonfiguraciju\");\n KonfiguracijaTxt instance = new KonfiguracijaTxt(datKonf.getName());\n instance.spremiKonfiguraciju(datKonf.getName());\n assertTrue(datKonf.exists());\n }",
"public Polinomio(String cadenaPolinomio) {\n patron = Pattern.compile(PATRON_POLINOMIO);//se carga el patron polinomio\n polinomio = ConvertirPolinomio(cadenaPolinomio);\n }",
"public String ToStr(){\n\t\tswitch(getTkn()){\n\t\tcase Kali:\n\t\t\treturn \"*\";\n\t\tcase Bagi:\n\t\t\treturn \"/\";\n\t\tcase Div:\n\t\t\treturn \"div\";\n\t\tcase Tambah:\n\t\t\treturn \"+\";\n\t\tcase Kurang:\n\t\t\treturn \"-\";\n\t\tcase Kurungbuka:\n\t\t\treturn \"(\";\n\t\tcase Kurungtutup:\n\t\t\treturn \")\";\n\t\tcase Mod:\n\t\t\treturn \"mod\";\n\t\tcase And:\n\t\t\treturn \"and\";\n\t\tcase Or:\n\t\t\treturn \"or\";\n\t\tcase Xor:\n\t\t\treturn \"xor\";\n\t\tcase Not:\n\t\t\treturn \"!\";\n\t\tcase Bilangan:\n\t\t\tString s = new String();\n\t\t\tswitch (getTipeBilangan()){\n\t\t\tcase _bool:\n\t\t\t\tif (getBilanganBool())\n\t\t\t\t\treturn \"true\";\n\t\t\t\telse\treturn \"false\";\n\t\t\tcase _int:\n\t\t\t\ts+=(getBilanganInt());\n\t\t\t\tbreak;\n\t\t\tcase _float:\n\t\t\t\ts+=(getBilanganFloat());\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\treturn s;\n\t\t}\n\t\treturn null;\n\t}",
"void mo85415a(String str);",
"void mo8713dV(String str);",
"void mo37759a(String str);",
"public boolean isString();",
"public String represent();",
"void mo1791a(String str);",
"private void sstring(Tlv tlv, String a){\n if(a != null){\n byte[] data = StringUtil.bytesOfStringCP_1251(a); \n //uint16 value (length)\n uint16(tlv, data.length + 1);\n //asciiz string \n tlv.addTlvData(DataWork.putArray(data)); \n tlv.addTlvData(DataWork.putByte(0x00)); \n }else{\n tlv.addTlvData(DataWork.putWordLE(0x00));\n tlv.addTlvData(DataWork.putWordLE(0x00));\n } \n }",
"public String asString();",
"public abstract String getString();",
"public abstract String getString();",
"public static void tulis(String str){\n System.out.println(str);\n }",
"void mo88522a(String str);",
"void mo1932a(String str);",
"private void insureMinimumLettersInTypeCode(StringBuffer buffer, String type) {\r\n buffer.append(type.charAt(1));\r\n int ndx = 2;\r\n char ch = type.charAt(ndx);\r\n while (isVowel(ch)) {\r\n buffer.append(ch);\r\n ndx++;\r\n ch = type.charAt(ndx);\r\n }\r\n buffer.append(ch);\r\n }",
"@Test\r\n\tpublic void testPointToString0() {\r\n\t\tPonto a1 = new Ponto(1.0, 2.5);\r\n\t\tAssert.assertEquals(\"(1.00, 2.50)\", a1.toString());\r\n\r\n\t\tPonto a2 = new Ponto(-2.4, 4.1);\r\n\t\tAssert.assertEquals(\"(-2.40, 4.10)\", a2.toString());\r\n\r\n\t\tPonto a3 = new Ponto(9.3, -1.9);\r\n\t\tAssert.assertEquals(\"(9.30, -1.90)\", a3.toString());\r\n\t}",
"public LitteralString() \n\t{\n\t\tthis(\"Chaine Litterale\");\n\t\t// TODO Auto-generated constructor stub\n\t}",
"void mo9697a(String str);",
"public String toText(String braille);",
"public abstract void fazerCoisa( String string );",
"@Override\n public String comer(String c)\n {\n c=\"Gato No puede Comer Nada\" ;\n \n return c;\n }",
"java.lang.String getS1();",
"@Test\n public void quandoCriaPilhaVazia(){\n // QUANDO (PRE-CONDIÇAO) E FAÇA (EXECUÇAO DO COMPORTAMENTO):\n PilhaString pilha1 = new PilhaString();\n \n // VERIFICAR (CHECK)\n assertTrue(pilha1.isVazia()); //true\n }",
"String getString_lit();",
"boolean isSetString();",
"private String nalozZvieraNaVozidlo() {\r\n if (zoo.getPracovneVozidlo() == null) {\r\n return \"Pracovne vozidlo nie je pristavene\";\r\n }\r\n\r\n Integer pozicia = MojeMetody.vlozInt(\"Vloz cislo zvierata\");\r\n if (pozicia == null) return \"\";\r\n\r\n try {\r\n Prepravitelny z = (Prepravitelny) zoo.getZvierataZOO(pozicia - 1);\r\n zoo.nalozZivocicha(z);\r\n zoo.odstranZivocicha(pozicia - 1);\r\n return \"Zviera \" + z + \"\\n\\tbolo nalozene na prepravne vozidlo\";\r\n } catch (ClassCastException exCC) {\r\n return \"Zviera c. \" + pozicia + \" nemozno prepravit\\n\\t\";\r\n } catch (NullPointerException exNP) {\r\n return \"Zviera c. \" + pozicia + \" nie je v ZOO\";\r\n } catch (Exception ex) {\r\n return \"Neznama chyba:\\n\\t\" + ex;\r\n }\r\n }",
"@Test\r\n public void testToString() {\r\n articuloPrueba.setNombre(\"Pruebanombre\");\r\n String expResult = \"Pruebanombre\";\r\n String result = articuloPrueba.toString();\r\n assertEquals(expResult, result);\r\n }",
"@java.lang.Override\r\n\tpublic java.lang.String toString()\r\n\t{\r\n\t\treturn \"ja_perlin\";\r\n\t}",
"public static void main(String[] args) {\n\t\tObject o3=\"chandan\";\n String n1=(String)o3;\n\t\t\n\t}",
"@Override\n public abstract String asText();",
"java.lang.String getS2();",
"java.lang.String getS8();",
"boolean getString();",
"PTString() \n {\n _str = \"\";\n }",
"void mo41089d(String str);",
"private String encodageMot(String message) {\n if (message == null || message.equals(\"\")) {\n throw new AssertionError(\"Texte non saisie\");\n } \n return transformWords(message, 1); \n }",
"@RepeatedTest(20)\n void transformtoTStringTest(){\n assertEquals(st.transformtoString(),new TString(hello));\n assertEquals(bot.transformtoString(),new TString(bot.toString()));\n assertEquals(bof.transformtoString(),new TString(bof.toString()));\n assertEquals(f.transformtoString(),new TString(f.toString()));\n assertEquals(i.transformtoString(),new TString(i.toString()));\n assertEquals(bi.transformtoString(),new TString(bi.toString()));\n assertEquals(Null.transformtoString(), Null);\n }",
"void mo1935c(String str);",
"public void testToString()\n {\n // An empty board\n assertEquals(b1.toString(), \"EEEEEEEEE\");\n\n // A more complex case\n b1.fromString(\"RRRBEEBBE\");\n assertEquals(b1.toString(), \"RRRBEEBBE\");\n }",
"String toString(String value) {\n value = value.trim();\n if (\".\".equals(value)) value = \"\";\n if (\"n/a\".equals(value)) value = \"\";\n return (!\"\".equals(value) ? value : Tables.CHARNULL);\n }",
"String getEString();",
"public Resposta(String palavraChave){\n this.palavraChave = palavraChave;\n }",
"public C7249w(String str) {\n super(str);\n C6888i.m12438e(str, \"value\");\n }",
"String getStringValue();",
"String getStringValue();",
"java.lang.String getS();",
"public abstract void mo70704a(String str);",
"public String getString_data() { \n char carr[] = new char[Math.min(net.tinyos.message.Message.MAX_CONVERTED_STRING_LENGTH,60)];\n int i;\n for (i = 0; i < carr.length; i++) {\n if ((char)getElement_data(i) == (char)0) break;\n carr[i] = (char)getElement_data(i);\n }\n return new String(carr,0,i);\n }",
"private String decodageMot(String message) {\n if (message == null || message.equals(\"\")) {\n throw new AssertionError(\"Texte non saisie\");\n } \n return transformWords(message, 2);\n }",
"public abstract java.lang.String getCod_dpto();",
"static void pontipo(String t){\r\n\t\tStruct s=new Struct(t,0);\r\n\t\tStruct auxt=buscaT(s);\r\n\t\t/*He encontrado el tipo q tengo q insertar*/\r\n\t\tif(aux==null){\r\n\t\t\t//Parse.SemError(1);\r\n\t\t\tSystem.out.println(\"ERROR TIPO NO ENCONTRADO!!\");\r\n\t\t}else{\r\n\t\t\tObj aux2=aux;\r\n\t\t\twhile (aux2 != null){\r\n\t\t\t\taux2.type=auxt;\r\n\t\t\t\taux2=aux2.next;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public abstract String read_string();",
"public abstract java.lang.String getAcma_cierre();",
"java.lang.String getS9();",
"public Str(String data) {\n this.data = data;\n }",
"public void caricaPartita(String partita) {\n\r\n }",
"TipeLayanan(String deskripsi)\r\n {\r\n this.deskripsi = deskripsi;\r\n }",
"public String toString(){\n return \"+-----------------------+\\n\" +\n \"| Boleto para el metro |\\n\" +\n \"|derjere0ranfeore |\\n\" +\n \"+-----------------------+\\n\" ;\n }",
"FPNode_Strings(){\r\n\t\t\r\n\t}",
"public static String stringType(Obj type) {\n\t\tString str = ObjStr.get(type);\n\t\t\treturn str != null ? str : \"\";\n\t}",
"@Override\n public String toString() {\n //https://github.com/google/gson/issues/388\n\n String src = super.toString();\n StringBuilder builder = new StringBuilder(src.length() * 4);\n for (char c : src.toCharArray()) {\n if (c >= 0x80) {\n // 为所有非ASCII字符生成转义的unicode字符\n writeUnicodeEscape(builder, c);\n } else {\n // 为ASCII字符中前128个字符使用转义的unicode字符\n int code = (c < ESCAPE_CODES.length ? ESCAPE_CODES[c] : 0);\n if (code == 0) {\n // 此处不用转义\n builder.append(c);\n } else if (code < 0) {\n // 通用转义字符\n writeUnicodeEscape(builder, (char) (-code - 1));\n } else {\n // 短转义字符 (\\n \\t ...)\n builder.append(\"\\\\\").append((char) code);\n }\n }\n }\n return builder.toString();\n }",
"void mo87a(String str);"
]
| [
"0.6325703",
"0.6154967",
"0.6085097",
"0.60602826",
"0.60346043",
"0.59358567",
"0.59239024",
"0.5912317",
"0.5909954",
"0.5909954",
"0.5909954",
"0.5898303",
"0.5891671",
"0.5884876",
"0.58699125",
"0.5842954",
"0.5839423",
"0.5826263",
"0.5819014",
"0.5817454",
"0.5787096",
"0.577515",
"0.5767337",
"0.57588005",
"0.57455",
"0.57158816",
"0.57074046",
"0.5694593",
"0.5679379",
"0.5671044",
"0.56700516",
"0.56446046",
"0.56430405",
"0.56424665",
"0.56347317",
"0.5633572",
"0.56276685",
"0.56247914",
"0.5621956",
"0.56103545",
"0.56041485",
"0.5601314",
"0.55998653",
"0.5592838",
"0.5584821",
"0.55848026",
"0.5583519",
"0.5582044",
"0.5562767",
"0.5562767",
"0.55538934",
"0.5552773",
"0.5548981",
"0.5547586",
"0.55458724",
"0.5542471",
"0.55418485",
"0.55191225",
"0.5507149",
"0.55046153",
"0.550361",
"0.55017334",
"0.55008066",
"0.54984677",
"0.54980654",
"0.54952717",
"0.54749316",
"0.54729795",
"0.5469832",
"0.5467265",
"0.5465204",
"0.546226",
"0.5445527",
"0.543674",
"0.5435144",
"0.54323006",
"0.54252315",
"0.542497",
"0.54206204",
"0.54099095",
"0.54077953",
"0.5406667",
"0.54065514",
"0.54065514",
"0.54063183",
"0.5405829",
"0.5389977",
"0.5382252",
"0.5380017",
"0.537986",
"0.53787684",
"0.53782916",
"0.5376829",
"0.53691584",
"0.536881",
"0.5367613",
"0.5364783",
"0.5363318",
"0.5360875",
"0.53566957",
"0.5355568"
]
| 0.0 | -1 |
Na sqlBlock vrati variacie s pripojeny jointype | private List<String> recursionByType(final String sqlBlock, final int joinType) {
List<String> result = new ArrayList<String>(4);
for (int i = 0; i < JOIN_VARIATIONS.length; i++) {
//ak by som chcel len onstatne variacie JOINOV
// if (joinType == i) continue;
result.add(sqlBlock + JOIN_VARIATIONS[i]);
}
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public abstract String toSQL();",
"public int getSqlType() { return _type; }",
"@Override\n\tpublic String toSql() {\n\t\treturn null;\n\t}",
"String toSql();",
"private void setSql() {\n sql = sqlData.getSql();\n }",
"@Override\n public long insertJQLRaw(String password, Date birthDay, ContactType type, long id) {\n // Specialized Insert - InsertType - BEGIN\n if (insertJQLRawPreparedStatement12==null) {\n // generate static SQL for statement\n String _sql=\"INSERT INTO contact (password, type, id) VALUES (?, ?, ?)\";\n insertJQLRawPreparedStatement12 = KriptonDatabaseHelper.compile(_context, _sql);\n }\n KriptonContentValues _contentValues=contentValuesForUpdate(insertJQLRawPreparedStatement12);\n\n _contentValues.put(\"password\", SQLTypeAdapterUtils.toData(PasswordAdapterType.class, password));\n _contentValues.put(\"type\", SQLTypeAdapterUtils.toData(EnumAdapterType.class, type));\n _contentValues.put(\"id\", id);\n\n // log section BEGIN\n if (_context.isLogEnabled()) {\n // log for insert -- BEGIN \n StringBuffer _columnNameBuffer=new StringBuffer();\n StringBuffer _columnValueBuffer=new StringBuffer();\n String _columnSeparator=\"\";\n for (String columnName:_contentValues.keys()) {\n _columnNameBuffer.append(_columnSeparator+columnName);\n _columnValueBuffer.append(_columnSeparator+\":\"+columnName);\n _columnSeparator=\", \";\n }\n Logger.info(\"INSERT INTO contact (%s) VALUES (%s)\", _columnNameBuffer.toString(), _columnValueBuffer.toString());\n\n // log for content values -- BEGIN\n Triple<String, Object, KriptonContentValues.ParamType> _contentValue;\n for (int i = 0; i < _contentValues.size(); i++) {\n _contentValue = _contentValues.get(i);\n if (_contentValue.value1==null) {\n Logger.info(\"==> :%s = <null>\", _contentValue.value0);\n } else {\n Logger.info(\"==> :%s = '%s' (%s)\", _contentValue.value0, StringUtils.checkSize(_contentValue.value1), _contentValue.value1.getClass().getCanonicalName());\n }\n }\n // log for content values -- END\n // log for insert -- END \n\n\n // log for where parameters -- BEGIN\n int _whereParamCounter=0;\n for (String _whereParamItem: _contentValues.whereArgs()) {\n Logger.info(\"==> param%s: '%s'\",(_whereParamCounter++), StringUtils.checkSize(_whereParamItem));\n }\n // log for where parameters -- END\n }\n // log section END\n // insert operation\n long result = KriptonDatabaseHelper.insert(insertJQLRawPreparedStatement12, _contentValues);\n return result;\n // Specialized Insert - InsertType - END\n }",
"public abstract void toSQL(StringBuilder ret);",
"private static SqlScalars generateSqlForVideoPerson(MetaDataType metaDataType, OptionsId options) {\n SqlScalars sqlScalars = new SqlScalars();\n\n sqlScalars.addToSql(\"SELECT DISTINCT p.id,\");\n if (options.hasDataItem(DataItem.BIOGRAPHY)) {\n sqlScalars.addToSql(\"p.biography,\");\n sqlScalars.addScalar(\"biography\", StringType.INSTANCE);\n }\n sqlScalars.addToSql(\"p.name,\");\n sqlScalars.addToSql(\"p.first_name as firstName,\");\n sqlScalars.addToSql(\"p.last_name as lastName,\");\n sqlScalars.addToSql(\"p.birth_day AS birthDay,\");\n sqlScalars.addToSql(\"p.birth_place AS birthPlace,\");\n sqlScalars.addToSql(\"p.birth_name AS birthName,\");\n sqlScalars.addToSql(\"p.death_day AS deathDay,\");\n sqlScalars.addToSql(\"p.death_place AS deathPlace,\");\n sqlScalars.addToSql(\"c.job as job,\");\n sqlScalars.addToSql(\"c.role as role,\");\n sqlScalars.addToSql(\"c.voice_role as voiceRole \");\n sqlScalars.addToSql(\"FROM person p \");\n\n if (metaDataType == SERIES) {\n sqlScalars.addToSql(\"JOIN cast_crew c ON c.person_id=p.id\");\n sqlScalars.addToSql(\"JOIN videodata vd ON vd.id=c.videodata_id\");\n sqlScalars.addToSql(\"JOIN season sea ON sea.id=vd.season_id and sea.series_id=:id\");\n } else if (metaDataType == SEASON) {\n sqlScalars.addToSql(\"JOIN cast_crew c ON c.person_id=p.id\");\n sqlScalars.addToSql(\"JOIN videodata vd ON vd.id=c.videodata_id and vd.season_id=:id\");\n } else {\n // defaults to movie/episode\n sqlScalars.addToSql(\"JOIN cast_crew c ON c.person_id=p.id and c.videodata_id=:id\");\n }\n\n sqlScalars.addToSql(\"WHERE p.id=c.person_id\");\n sqlScalars.addToSql(\"AND p.status\"+SQL_IGNORE_STATUS_SET);\n \n if (MapUtils.isNotEmpty(options.splitJobs())) {\n sqlScalars.addToSql(\"AND c.job IN (:jobs)\");\n sqlScalars.addParameter(\"jobs\", options.getJobTypes());\n }\n\n // Add the search string\n sqlScalars.addToSql(options.getSearchString(false));\n // This will default to blank if there's no required\n sqlScalars.addToSql(options.getSortString());\n\n // Add the ID\n sqlScalars.addParameter(LITERAL_ID, options.getId());\n\n sqlScalars.addScalar(LITERAL_ID, LongType.INSTANCE);\n sqlScalars.addScalar(LITERAL_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_FIRST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_LAST_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_PLACE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_BIRTH_NAME, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_DAY, DateType.INSTANCE);\n sqlScalars.addScalar(LITERAL_DEATH_PLACE, StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_JOB, StringType.INSTANCE);\n sqlScalars.addScalar(\"role\", StringType.INSTANCE);\n sqlScalars.addScalar(LITERAL_VOICE_ROLE, BooleanType.INSTANCE);\n\n LOG.debug(\"SQL ForVideoPerson: {}\", sqlScalars.getSql());\n return sqlScalars;\n }",
"public void makeSql() {\n\t\tfor(int i=0; i<arr_sql.length; i++) {\n\t\t\tarr_sql[i] = new StringBuffer();\n\t\t}\n\t\t\n\t\t/*\n\t\t * 공통코드 쿼리\n\t\t * 대리점구분 : CU006\n\t\t * 직판구분 : CU012\n\t\t * 지역 : SY006\n\t\t * 계약상태 : CU013\n\t\t * 사용유무 : SY011\n\t\t * 보증보험회사 : CU010\n\t\t * 하위대리점여부 : CU011\n\t\t */\n\t\tarr_sql[0].append (\"SELECT\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append (\"\t' ' head, ' ' detail, '전체' detail_nm \\n\")\n\t\t\t\t .append (\"FROM DUAL \\n\")\n\t\t\t\t .append (\"UNION ALL \\n\")\n\t\t\t\t .append (\"SELECT \\n\")\n\t\t\t\t .append (\"\tB.head, B.detail, B.detail_nm \\n\")\n\t\t\t\t .append (\"FROM \\n\")\n\t\t\t\t .append (\"\tSALES.TSY011 A, \\n\")\n\t\t\t\t .append (\"\tSALES.TSY010 B \\n\")\n\t\t\t\t .append (\"WHERE 1=1 \\n\")\n\t\t\t\t .append (\" AND A.head = B.head \\n\")\n\t\t\t\t .append (\" AND B.head = ? \\n\")\n\t\t\t\t .append (\" AND LENGTH (rtrim(B.detail)) > 0 \\n\");\n\t\t\n\t\t/*\n\t\t * 대리점 조회\n\t\t */\n\t\tarr_sql[1].append(\"SELECT T1.client_sid\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t \t\t .append(\"\t\t ,T1.vend_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_cd \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 코드 \t*/\n\t \t\t .append(\"\t\t ,T1.client_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t \t\t .append(\"\t\t ,T1.client_gu \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 매출처구분 :CU005 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.agen_gu \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t \t\t .append(\"\t\t ,T1.dir_yn \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t \t\t .append(\"\t\t ,T1.area_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\t \t\t .append(\"\t\t ,T1.sal_dam_sid \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t \t\t .append(\"\t\t ,T1.client_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t \t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대전화 \t*/\n\t \t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\t \t\t .append(\"\t\t ,T1.e_mail \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t \t\t .append(\"\t\t ,T1.zip_cd \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 우편번호[TSY110] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.address1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소1 \t*/\n\t \t\t .append(\"\t\t ,T1.address2 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 주소2 \t*/\n\t \t\t .append(\"\t\t ,T1.commi_rate \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t \t\t .append(\"\t\t ,T1.cunt_status \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t \t\t .append(\"\t\t ,T1.bancod \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행코드 [BANKCODE] */\n\t \t\t \n\t \t\t .append(\"\t\t ,T1.bank_acc_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행계좌번호 \t*/\n\t \t\t .append(\"\t\t ,T1.bank_acct_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 예금주 \t*/\n\t \t\t .append(\"\t\t ,T1.use_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 사용여부 :SY011 \t*/ \n\t \t\t .append(\"\t\t ,T1.client_url\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 홈페이지 URL\t\t\t\t*/\n\t \t\t .append(\"\t\t ,T2.sal_dam_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 영업담당자명 \t*/\n\t \t\t .append(\"\t\t ,T3.vend_nm \t\t\t\t\t\t\t\t\t\t\t\t \t\t\t\t\\n\")\t/* 거래처명 \t*/\n\t \t\t \n\t \t\t .append(\"\t\t ,T4.bannam \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 은행명 \t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU006',T1.agen_gu) AS agen_gu_name \t\t\t\t\t\\n\")\t/* 대리점구분명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU012',T1.dir_yn) AS dir_yn_name \t\t\t\t\t\\n\")\t/* 직판여부명 \t\t\t\t*/ \n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006',T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\")\t/* 지역명 \t\t\t\t*/\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU013',T1.cunt_status) AS cunt_status_name \t\t\t\\n\")\t/* 계약상태명 \t\t\t\t*/\n\n\t \t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY011',T1.use_yn) AS use_yn_name \t\t\t\\n\")\t/* 사용여부명 \t\t\t \t*/\n\n\t \t\t .append(\"FROM SALES.TCU030 T1 LEFT OUTER JOIN SALES.TSY410 T2 ON T1.SAL_DAM_SID = T2.SAL_DAM_SID \\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.GCZM_VENDER T3 ON T1.VEND_CD = T3.VEND_CD \t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t LEFT OUTER JOIN ACCOUNT.BANKCODE T4 ON T1.BANCOD = T4.BANCOD \t\t\t\t\t\\n\")\n\t \t\t .append(\"WHERE 1 = 1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t \t\t .append(\"\t\t AND T1.client_GU = '1' \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t/*\n\t\t * 계약정보 조회\n\t\t */\n\t\tarr_sql[2].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,T1.cont_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,T1.expire_date\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,TO_NUMBER(T1.insur_amt) AS insur_amt\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,T1.insur_comp_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ('CU010',T1.insur_comp_cd) AS insur_comp_cd_name\t\t\\n\") \t/* 보증보험회사명 \t\t*/ \n\t\t\t\t .append(\"FROM SALES.TCU031 T1 \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"WHERE 1=1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t \n\t\n\t\t/*\n\t\t * 지점정보 조회\n\t\t */\n\t\tarr_sql[3].append(\"SELECT T1.client_sid\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_nm \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.area_cd\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,T1.client_down_yn \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t .append(\"\t\t ,T1.empno \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.tel_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.mobile_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.fax_no \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,T1.branch_url \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'SY006', T1.area_cd) AS area_nm\t\t\t\t\t\t\t\\n\") \t/* 지역명:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,SALES.FN_DETAIL_NM ( 'CU011',T1.client_down_yn) AS client_down_yn_name \t\\n\")\t/* 하위대리점여부명 \t\t*/\n\t\t\t\t .append(\"FROM SALES.TCU032 T1\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\\n\");\n\t\t\n\t\t\n\t\t/*\n\t\t * 대리점 등록\n\t\t */\n\n\t\tarr_sql[4].append(\"INSERT INTO SALES.TCU030 (\")\n\t\t\t\t .append(\"\t\t\t\t client_sid \\n\")\t\n\t\t\t\t .append(\"\t\t\t\t,vend_cd \\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_cd \\n\")\t/* 매출처 코드 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_nm \\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_gu \\n\")\t/* 매출처구분 :CU005 \t*/\n\t\t\t\t .append(\"\t\t\t\t,agen_gu \\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,dir_yn \\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t\t\t,area_cd \\n\")\t/* 지역코드 :SY006 \t*/\n\t\t\t\t .append(\"\t\t\t\t,sal_dam_sid \\n\")\t/* 영업담당자코드[TSY410] \t*/\n\t\t\t\t .append(\"\t\t\t\t,client_dam_nm \\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t\t\t,tel_no \\n\")\t/* 전화번호 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,mobile_no \\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t\t\t,fax_no \\n\")\t/* FAX번호 \t*/\n\t\t\t\t .append(\"\t\t\t\t,e_mail \\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t\t\t,zip_cd \\n\")\t/* 소재지우편번호[TSY110] */\n\t\t\t\t .append(\"\t\t\t\t,address1 \\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,address2 \\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t\t\t,commi_rate \t\\n\") \t/* 수수료율 \t*/\n\t\t\t\t .append(\"\t\t\t\t,cunt_status \\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t\t\t,bancod\t\t\t\\n\") \t/* 은행코드 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,bank_acc_no \\n\")\t/* 은행계좌번호[BANKCODE] \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t\t\t,bank_acct_nm\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t\t\t,use_yn\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\t\t\t\t\n\t\t\t\t .append(\"\t\t \t\t,u_date \t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t \t\t,u_empno \t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t \t\t,u_ip \\n\")\t/* 최종수정IP */\t\t\t\n\t \t\t .append(\"\t\t\t\t,client_url\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append(\"\t\t\t)\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSALES.SWS_TCU030_ID.NEXTVAL,?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,SYSTIMESTAMP,?,?,?\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\n\t\t\n\t\t/*\n\t\t * 계약정보 등록\n\t\t */\n\t\tarr_sql[5].append(\"INSERT INTO SALES.TCU031 ( \t\\n\")\n\t\t\t\t .append(\" \t client_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t .append(\"\t\t ,cont_date\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t \n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 등록\n\t\t */\n\t\t\n\t\tarr_sql[6].append(\"INSERT INTO SALES.TCU032 ( \t\\n\")\n\t\t\t\t .append(\"\t\t client_SID\t\t\t\\n\") \t/* 매출처SID \t\t*/\n\t\t\t\t .append(\"\t\t ,branch_cd\t\t\t\t\\n\")\t/* 지점코드 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_nm \t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append(\"\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\t\n\t\t\t\t .append(\"\t\t\t\t?,?,?,?,?,\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t\t)\");\n\t\t\n\t\t/*\n\t\t * 대리점 수정\n\t\t */\n\n\t\tarr_sql[7].append(\"UPDATE SALES.TCU030 SET \t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t vend_cd\t\t= ? \t\t\t\t\\n\")\t/* [회계]거래처 코드 \t*/\n\t\t\t\t .append(\"\t\t,client_nm\t\t= ? \t\t\t\t\\n\")\t/* 매출처 명 \t*/\n\t\t\t\t .append(\"\t\t,agen_gu\t\t= ? \t\t\t\t \t\\n\")\t/* 대리점구분 :CU006 \t*/\n\t\t\t\t .append(\"\t\t,dir_yn\t\t\t= ? \t\t\t\t\\n\")\t/* 직판여부 :CU012 \t*/\n\t\t\t\t .append(\"\t\t,area_cd \t= ? \t\t\t\t\t\\n\")\t/* 지역코드 :SY006 \t*/\n\n\t\t\t\t .append(\"\t\t,sal_dam_sid\t= ? \t\t\t\t\t\\n\")\t/* 영업담당자코드[TSY410] */\n\t\t\t\t .append(\"\t\t,client_dam_nm\t= ? \t\t\t\t\t\\n\")\t/* 매출처담당자 \t*/\n\t\t\t\t .append(\"\t\t,tel_no = ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t*/\n\t\t\t\t .append(\"\t\t,mobile_no = ?\t\t\t\t\t\t\\n\")\t/* 핸드폰 \t*/\n\t\t\t\t .append(\"\t\t,fax_no = ?\t\t\t\t\t\t\\n\")\t/* FAX번호 \t*/\n\n\t\t\t\t .append(\"\t\t,e_mail = ?\t\t\t\t\t\t\\n\")\t/* 이메일 \t*/\n\t\t\t\t .append(\"\t\t,zip_cd = ?\t\t\t\t\t\t\\n\")\t/* 소재지우편번호[TSY110] \t*/\n\t\t\t\t .append(\"\t\t,address1 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소1 \t*/\n\t\t\t\t .append(\"\t\t,address2 = ?\t\t\t\t\t\t\\n\")\t/* 소재지주소2 \t*/\n\t\t\t\t .append(\"\t\t,commi_rate \t= ?\t\t\t\t\t\t\\n\") \t/* 수수료율 \t*/\n\n\t\t\t\t .append(\"\t\t,cunt_status = ?\t\t\t\t\t\t\\n\")\t/* 계약상태 :CU013 \t*/\n\t\t\t\t .append(\"\t\t,bancod\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 은행코드\t \t\t\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acc_no = ?\t\t\t\t\t\t\\n\")\t/* 은행계좌번호[BANKCODE]\t\t*/\n\t\t\t\t .append(\"\t\t,bank_acct_nm\t= ?\t\t\t\t\t\t\\n\")\t/* 예금주 \t\t\t\t\t*/\n\t\t\t\t .append(\"\t\t,use_yn\t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 사용여부 \t\t\t\t\t*/\n\n\t\t\t\t .append(\"\t\t,u_date \t= SYSTIMESTAMP\t\t\\n\") \t/* 최종수정일자 \t*/\n\t \t\t .append(\"\t\t,u_empno \t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정자사번 \t*/\n\t \t\t .append(\"\t\t,u_ip = ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP */\n\t \t\t .append(\"\t,client_url = ?\t\t\t\t\t\t\\n\")\t/* 홈페이지 */\n\t\t\t\t .append (\"WHERE client_sid \t= ? \t\t\t\t\\n\");\n\t\t\t\t \n\t\t/*\n\t\t * 계약정보 수정\n\t\t */\n\t\tarr_sql[8].append(\"UPDATE SALES.TCU031 SET\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t cont_date\t\t\t= ?\t\t\t\t\t\\n\") \t/* 계약일자 \t*/\n\t\t\t\t .append(\"\t\t ,expire_date\t\t= ?\t\t\t\t\t\\n\")\t/* 만기일자 \t*/\n\t\t\t\t .append(\"\t\t ,insur_amt\t\t\t= ?\t\t\t\t\t\\n\")\t/* 보험료 \t*/\n\t\t\t\t .append(\"\t\t ,insur_comp_cd\t\t= ?\t\t\t\t\t\\n\")\t/* 보증보험회사:CU010 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND cont_date = ? \\n\");\n\t\t\t\t\n\t\t\t\t \n\t\t\t\t\t\n\t\t/*\n\t\t * 지점정보 수정\n\t\t */\n\t\t\n\t\tarr_sql[9].append(\"UPDATE SALES.TCU032 SET \t\t\t\t\t\t\t\\n\")\n\t\t\t\t .append(\"\t\t branch_nm \t\t= ?\t\t\t\t\t\t\\n\") \t/* 지점명 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,area_cd\t\t\t= ?\t\t\t\t\t\t\\n\") \t/* 지역코드:SY006 \t\t*/\n\t\t\t\t .append(\"\t\t ,client_down_yn \t= ?\t\t\t\t\t\t\\n\")\t/* 하위대리점여부:CU011 \t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,empno \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 담당자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,tel_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 전화번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,mobile_no \t\t= ?\t\t\t\t\t\t\\n\")\t/* 휴대폰 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,fax_no \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 팩스번호 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,branch_url \t\t= ?\t\t\t\t\t\t\\n\")\t/* 지점홈페이지 \t\t\t*/\n\t\t\t\t \n\t\t\t\t .append(\"\t\t ,u_date \t\t\t= SYSTIMESTAMP\t\t\t\t\t\t\\n\")\t/* 최종수정일자 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\\n\")\t/* 최종수정자사번 \t\t\t*/\n\t\t\t\t .append(\"\t\t ,u_ip \t\t\t= ?\t\t\t\t\t\t\\n\")\t/* 최종수정IP \t\t*/\n\t\t\t\t .append (\"WHERE client_sid = ? AND branch_cd \t= ?\t\t\\n\");\n\t\t\n\t\t arr_sql[10].append(\"DELETE FROM SALES.TCU030 WHERE client_sid = ?\");\t\n\t\t arr_sql[11].append(\"DELETE FROM SALES.TCU031 WHERE client_sid = ? AND cont_date = ?\");\n\t\t arr_sql[12].append(\"DELETE FROM SALES.TCU032 WHERE client_sid = ? AND branch_cd = ?\");\n\t\t \n\t\t \n\t\t /*\n\t\t * Client SID 얻어오기\n\t\t */\n\t\t\t\n\t\t\tarr_sql[13].append(\"SELECT client_sid FROM SALES.TCU030 WHERE client_cd = ?\\n\");\n\t\t\t\n\t\t/*\n\t\t * 수수료율 조회\n\t\t */\n\t\t\tarr_sql[14].append(\"SELECT\t\t\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t.append(\" T1.CLIENT_SID AS CLIENT_SID\t\\n\") /* 매출처SID */\n\t\t\t\t\t\t.append(\" ,T1.FR_DATE AS FR_DATE \t\\n\") /* 시작일자 */\n\t\t\t\t\t\t.append(\" ,T1.TO_DATE AS TO_DATE \t\\n\") /* 종료일자 */\n\t\t\t\t\t\t.append(\" ,T1.WEEKEND_YN AS WEEKEND_YN \t\\n\") /* 주말여부 */\n\t\t\t\t\t\t.append(\" ,T1.COMMI_RATE AS COMMI_RATE\t\\n\") /* 수수료율 */\n\t\t\t\t\t\t.append(\"FROM SALES.TCU033 T1 \t\\n\")\n\t\t\t\t\t\t.append(\"WHERE 1=1 \t\t\t\t\t\t\t\\n\");\n\t\t\t\t\t\t\n\t\t/*\n\t\t * 수수료율 등록\n\t\t */\n\t\t\t\n\t\t\tarr_sql[15].append(\"INSERT INTO SALES.TCU033 ( \t\\n\")\n\t\t\t\t\t\t .append(\" \t CLIENT_SID\t\t\t\\n\")\t/* 매출처SID \t*/\n\t\t\t\t\t\t .append(\"\t\t ,FR_DATE\t\t\t\t\\n\") \t/* 시작일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,TO_DATE\t\t\t\\n\")\t/* 종료일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_DATE\t\t\t\t\\n\")\t/* 최종입력일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_EMPNO \t\t\t\t\\n\") \t/* 최종입력자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,I_IP\t\t\t\t\t\\n\")\t/* 최종입력IP \t*/\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t\t\\n\")\t/* 최종수정일자 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\n\t\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\n\t\t\t\t\t\t .append(\"\t\t)\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t \n\t\t\t\t\t\t .append(\"VALUES\t\t\t\t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t(\t \t\t\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t\t?,?,?,?, ?,\t\t\\n\")\t\n\t\t\t\t\t\t .append(\"\t\t\t\tSYSTIMESTAMP,?,?, SYSTIMESTAMP,?,?\t\\n\")\n\t\t\t\t\t\t .append(\"\t\t\t)\");\n\t\t/*\n\t\t * 수수료율 수정\n\t\t */\n\t\t\tarr_sql[16].append(\"UPDATE SALES.TCU033 SET\t\t\t\t\t\t\\n\") \n\t\t\t\t\t .append(\"\t\t TO_DATE\t\t\t= ?\t\t\t\t\t\\n\")\t/* 종료일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,COMMI_RATE\t\t= ?\t\t\t\t\t\\n\")\t/* 수수료율 \t*/\n\t\t\t\t\t .append(\"\t\t ,WEEKEND_YN\t\t= ?\t\t\t\t\t\\n\")\t/* 주말여부 \t*/\n\t\t\t\t\t \n\t\t\t\t\t \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_date\t\t\t= SYSTIMESTAMP\t\\n\")\t/* 최종수정일자 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_empno \t\t\t= ?\t\t\t\t\t\\n\") \t/* 최종수정자사번 \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append(\"\t\t ,u_ip\t\t\t\t= ?\t\t\t\t\t\\n\")\t/* 최종수정IP \t*/\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t .append (\"WHERE client_sid \t\t= ? AND FR_DATE = ? AND WEEKEND_YN=? \\n\"); \n\t\t/*\n\t\t * 수수료율 삭제\n\t\t */\n\t\tarr_sql[17].append(\"DELETE FROM SALES.TCU033 WHERE client_sid = ? AND fr_date = ? AND WEEKEND_YN=? \");\t \n\t\t\t \n\n\t}",
"abstract protected String buildSQL(BatchSQLEnum sql);",
"@Insert({\n \"insert into kd_user_medal (id, userid, \",\n \"medalId, bindUserid, \",\n \"remark, createTime)\",\n \"values (#{id,jdbcType=BIGINT}, #{userid,jdbcType=BIGINT}, \",\n \"#{medalid,jdbcType=BIGINT}, #{binduserid,jdbcType=BIGINT}, \",\n \"#{remark,jdbcType=VARCHAR}, #{createtime,jdbcType=TIMESTAMP})\"\n })\n int insert(KDUserMedal record);",
"public String insertSelective(MaterialType record) {\r\n SQL sql = new SQL();\r\n sql.INSERT_INTO(\"material_type\");\r\n \r\n if (record.getId() != null) {\r\n sql.VALUES(\"id\", \"#{id,jdbcType=INTEGER}\");\r\n }\r\n \r\n if (record.getMtName() != null) {\r\n sql.VALUES(\"mt_name\", \"#{mtName,jdbcType=VARCHAR}\");\r\n }\r\n \r\n if (record.getRemark() != null) {\r\n sql.VALUES(\"remark\", \"#{remark,jdbcType=VARCHAR}\");\r\n }\r\n \r\n if (record.getMtOrderNum() != null) {\r\n sql.VALUES(\"mt_order_num\", \"#{mtOrderNum,jdbcType=INTEGER}\");\r\n }\r\n \r\n return sql.toString();\r\n }",
"public void setSql(String sql) {\n this.sql = sql;\n }",
"private String createInsertQuery()\n {\n int i = 0;\n StringBuilder sb = new StringBuilder();\n sb.append(\"INSERT INTO \");\n sb.append(type.getSimpleName());\n sb.append(\" (\");\n for(Field field:type.getDeclaredFields()) {i++; if(i != type.getDeclaredFields().length)sb.append(field.getName() +\", \"); else sb.append(field.getName());}\n sb.append(\")\");\n sb.append(\" VALUES (\");\n i = 0;\n for(Field field:type.getDeclaredFields()) {i++; if(i!= type.getDeclaredFields().length)sb.append(\"?, \"); else sb.append(\"?\");}\n sb.append(\");\");\n return sb.toString();\n }",
"@Insert({\n \"insert into soggetto_personale_scolastico (codice_fiscale, \",\n \"id_asr, cognome, nome, \",\n \"data_nascita_str, comune_residenza_istat, \",\n \"comune_domicilio_istat, indirizzo_domicilio, \",\n \"telefono_recapito, data_nascita, \",\n \"asl_residenza, asl_domicilio, \",\n \"email, lat, lng, \",\n \"id_tipo_soggetto, utente_operazione, \",\n \"data_creazione, data_modifica, \",\n \"data_cancellazione, id_medico, id_soggetto_fk)\",\n \"values ( #{codiceFiscale,jdbcType=VARCHAR}, \",\n \"#{idAsr,jdbcType=BIGINT}, #{cognome,jdbcType=VARCHAR}, #{nome,jdbcType=VARCHAR}, \",\n \"#{dataNascitaStr,jdbcType=VARCHAR}, #{comuneResidenzaIstat,jdbcType=VARCHAR}, \",\n \"#{comuneDomicilioIstat,jdbcType=VARCHAR}, #{indirizzoDomicilio,jdbcType=VARCHAR}, \",\n \"#{telefonoRecapito,jdbcType=VARCHAR}, #{dataNascita,jdbcType=DATE}, \",\n \"#{aslResidenza,jdbcType=VARCHAR}, #{aslDomicilio,jdbcType=VARCHAR}, \",\n \"#{email,jdbcType=VARCHAR}, #{lat,jdbcType=NUMERIC}, #{lng,jdbcType=NUMERIC}, \",\n \"#{idTipoSoggetto,jdbcType=INTEGER}, #{utenteOperazione,jdbcType=VARCHAR}, \",\n \"#{dataCreazione,jdbcType=TIMESTAMP}, #{dataModifica,jdbcType=TIMESTAMP}, \",\n \"#{dataCancellazione,jdbcType=TIMESTAMP}, #{idMedico,jdbcType=BIGINT}, #{idSoggettoFk,jdbcType=BIGINT})\"\n })\n @Options(useGeneratedKeys = true, keyProperty = \"idSoggetto\", keyColumn = \"id_soggetto\")\n int insert(SoggettoPersonaleScolastico record);",
"@Insert({\n \"insert into A_SUIT_MEASUREMENT (user_id, measure_date, \",\n \"contract_id, consultant_uid, \",\n \"collar, wrist, bust, \",\n \"shoulder_width, mid_waist, \",\n \"waist_line, sleeve, \",\n \"hem, back_length, front_length, \",\n \"arm, forearm, front_breast_width, \",\n \"back_width, pants_length, \",\n \"crotch_depth, leg_width, \",\n \"thigh, lower_leg, height, \",\n \"weight, body_shape, \",\n \"stance, shoulder_shape, \",\n \"abdomen_shape, payment, \",\n \"invoice)\",\n \"values (#{userId,jdbcType=INTEGER}, #{measureDate,jdbcType=TIMESTAMP}, \",\n \"#{contractId,jdbcType=INTEGER}, #{consultantUid,jdbcType=INTEGER}, \",\n \"#{collar,jdbcType=DOUBLE}, #{wrist,jdbcType=DOUBLE}, #{bust,jdbcType=DOUBLE}, \",\n \"#{shoulderWidth,jdbcType=DOUBLE}, #{midWaist,jdbcType=DOUBLE}, \",\n \"#{waistLine,jdbcType=DOUBLE}, #{sleeve,jdbcType=DOUBLE}, \",\n \"#{hem,jdbcType=DOUBLE}, #{backLength,jdbcType=DOUBLE}, #{frontLength,jdbcType=DOUBLE}, \",\n \"#{arm,jdbcType=DOUBLE}, #{forearm,jdbcType=DOUBLE}, #{frontBreastWidth,jdbcType=DOUBLE}, \",\n \"#{backWidth,jdbcType=DOUBLE}, #{pantsLength,jdbcType=DOUBLE}, \",\n \"#{crotchDepth,jdbcType=DOUBLE}, #{legWidth,jdbcType=DOUBLE}, \",\n \"#{thigh,jdbcType=DOUBLE}, #{lowerLeg,jdbcType=DOUBLE}, #{height,jdbcType=DOUBLE}, \",\n \"#{weight,jdbcType=DOUBLE}, #{bodyShape,jdbcType=INTEGER}, \",\n \"#{stance,jdbcType=INTEGER}, #{shoulderShape,jdbcType=INTEGER}, \",\n \"#{abdomenShape,jdbcType=INTEGER}, #{payment,jdbcType=INTEGER}, \",\n \"#{invoice,jdbcType=VARCHAR})\"\n })\n int insert(ASuitMeasurement record);",
"public String getSQLstring() {\r\n return typeId.toParsableString(this);\r\n }",
"@Override\n\tpublic String getSqlWhere() {\n\t\treturn null;\n\t}",
"public CustomSql getCustomSqlInsert();",
"B database(S database);",
"protected abstract NativeSQLStatement createNativeBoundaryStatement();",
"public interface DatabaseCondition extends SQLObject {\n \n}",
"@Override\n public PlainSqlQuery<T, ID> createPlainSqlQuery() {\n return null;\n }",
"public String getSql() {\n return sql;\n }",
"BSQL2Java2 createBSQL2Java2();",
"public abstract Statement queryToRetrieveData();",
"SQLBinary()\n\t{\n\t}",
"protected abstract String statementType();",
"public void setResult(int type, String typeName, Class javaType) {\r\n ObjectRelationalDatabaseField field = new ObjectRelationalDatabaseField(\"\");\r\n field.setSqlType(type);\r\n field.setSqlTypeName(typeName);\r\n field.setType(javaType);\r\n getParameters().set(0, field);\r\n }",
"StatementBlock createStatementBlock();",
"public String insertSelective(BsNewsWithBLOBs record) {\n BEGIN();\n INSERT_INTO(\"bs_news\");\n \n if (record.getId() != null) {\n VALUES(\"ID\", \"#{id,jdbcType=INTEGER}\");\n }\n \n if (record.getTitle() != null) {\n VALUES(\"title\", \"#{title,jdbcType=VARCHAR}\");\n }\n \n if (record.getNote() != null) {\n VALUES(\"note\", \"#{note,jdbcType=VARCHAR}\");\n }\n \n if (record.getCreatetime() != null) {\n VALUES(\"createTime\", \"#{createtime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getCreateuserid() != null) {\n VALUES(\"createUserId\", \"#{createuserid,jdbcType=INTEGER}\");\n }\n \n if (record.getCreateusername() != null) {\n VALUES(\"createUserName\", \"#{createusername,jdbcType=VARCHAR}\");\n }\n \n if (record.getUpdatetime() != null) {\n VALUES(\"updateTime\", \"#{updatetime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getUpdateuserid() != null) {\n VALUES(\"updateUserId\", \"#{updateuserid,jdbcType=INTEGER}\");\n }\n \n if (record.getUpdateusername() != null) {\n VALUES(\"updateUserName\", \"#{updateusername,jdbcType=VARCHAR}\");\n }\n \n if (record.getIntcolumn1() != null) {\n VALUES(\"intColumn1\", \"#{intcolumn1,jdbcType=INTEGER}\");\n }\n \n if (record.getIntcolumn2() != null) {\n VALUES(\"intColumn2\", \"#{intcolumn2,jdbcType=INTEGER}\");\n }\n \n if (record.getStrcolumn1() != null) {\n VALUES(\"strColumn1\", \"#{strcolumn1,jdbcType=VARCHAR}\");\n }\n \n if (record.getStrcolumn2() != null) {\n VALUES(\"strColumn2\", \"#{strcolumn2,jdbcType=VARCHAR}\");\n }\n \n if (record.getHtmlvalue() != null) {\n VALUES(\"htmlValue\", \"#{htmlvalue,jdbcType=LONGVARCHAR}\");\n }\n \n return SQL();\n }",
"public interface Compound extends Clause {}",
"public String getStatement();",
"@SqlQuery(\"SELECT gid, name AS text from sby\")\n List<OptionKecamatanO> option();",
"private static String toSql(Object obj) {\n\t\tif(obj==null) {\n\t\t\treturn \"NULL\";\n\t\t}\n\t\tif(obj instanceof String) {\n\t\t\treturn \"'\"+obj+\"'\";\n\t\t}\n\t\treturn obj.toString();\n\t}",
"public void writeSQL(SQLOutput stream) throws SQLException {\n\t\tstream.writeBigDecimal(Helpers.bigDecOrNull(id));\n\t\tstream.writeString(Helpers.strOrNull(rt));\n\t\tstream.writeString(Helpers.strOrNull(name));\n\t\tstream.writeString(Helpers.strOrNull(description));\n\n\t}",
"SELECT createSELECT();",
"private static String getSqlParameter(String type) {\n switch (type) {\n case \"boolean\":\n case \"java.lang.Boolean\":\n return \"BOOLEAN\";\n case \"byte\":\n case \"java.lang.Byte\":\n return \"TINYINT\";\n case \"short\":\n case \"java.lang.Short\":\n return \"SMALLINT\";\n case \"int\":\n case \"java.lang.Integer\":\n return \"INTEGER\";\n case \"long\":\n case \"java.lang.Long\":\n return \"BIGINT\";\n case \"float\":\n case \"java.lang.Float\":\n return \"FLOAT\";\n case \"double\":\n case \"java.lang.Double\":\n return \"DOUBLE\";\n case \"byte[]\":\n case \"java.lang.Byte[]\":\n return \"BINARY\";\n case \"java.lang.String\":\n return \"VARCHAR\";\n case \"java.sql.Date\":\n return \"DATE\";\n case \"java.sql.Timestamp\":\n return \"TIMESTAMP\";\n case \"java.sql.Time\":\n return \"TIME\";\n case \"java.math.BigDecimal\":\n return \"DOUBLE\";\n default:\n if (type.contains(\"[]\")) {\n return \"ARRAY\";\n }\n\n throw new RuntimeException(\"Unknown SqlType: \" + type);\n }\n }",
"@Insert({\n \"insert into generalcourseinformation (courseid, code, \",\n \"name, teacher, credit, \",\n \"week, day_detail1, \",\n \"day_detail2, location, \",\n \"remaining, total, \",\n \"extra, index)\",\n \"values (#{courseid,jdbcType=VARCHAR}, #{code,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{teacher,jdbcType=VARCHAR}, #{credit,jdbcType=INTEGER}, \",\n \"#{week,jdbcType=VARCHAR}, #{day_detail1,jdbcType=VARCHAR}, \",\n \"#{day_detail2,jdbcType=VARCHAR}, #{location,jdbcType=VARCHAR}, \",\n \"#{remaining,jdbcType=INTEGER}, #{total,jdbcType=INTEGER}, \",\n \"#{extra,jdbcType=VARCHAR}, #{index,jdbcType=INTEGER})\"\n })\n int insert(GeneralCourse record);",
"public void setResult(int type, String typeName, Class javaType, DatabaseField nestedType) {\r\n ObjectRelationalDatabaseField field = new ObjectRelationalDatabaseField(\"\");\r\n field.setSqlType(type);\r\n field.setSqlTypeName(typeName);\r\n field.setType(javaType);\r\n field.setNestedTypeField(nestedType);\r\n getParameters().set(0, field);\r\n }",
"public String getBodySql(String table)\r\n \t{\r\n \t\treturn \"select BODY from \" + table + \" where ( RESOURCE_ID = ? )\";\r\n \t}",
"@Insert({\r\n \"insert into umajin.user_master (user_id, nickname, \",\r\n \"sex, age, birthday, \",\r\n \"regist_date, update_date, \",\r\n \"disable)\",\r\n \"values (#{user_id,jdbcType=INTEGER}, #{nickname,jdbcType=VARCHAR}, \",\r\n \"#{sex,jdbcType=INTEGER}, #{age,jdbcType=INTEGER}, #{birthday,jdbcType=DATE}, \",\r\n \"#{regist_date,jdbcType=TIMESTAMP}, #{update_date,jdbcType=TIMESTAMP}, \",\r\n \"#{disable,jdbcType=INTEGER})\"\r\n })\r\n int insert(UserMaster record);",
"private void appendSelectStatement() {\n builder.append(SELECT).append(getSelectedFields()).append(FROM);\n }",
"public String toSql() {\t\n int n;\t\n void a;\t\n StringBuilder a2 = new StringBuilder();\t\n Table table = MapperHelper.getTable(this.entity);\t\n a2.append(MapperHelper.getTableName((Table)a, this.entity) + \" \" + a.alias());\t\n JoinTable[] arrjoinTable = a.joinTable();\t\n int n2 = arrjoinTable.length;\t\n int n3 = n = 0;\t\n while (n3 < n2) {\t\n JoinTable a3 = arrjoinTable[n];\t\n Table a4 = MapperHelper.getTable(a3.entity());\t\n a2.append(new StringBuilder().insert(0, \" \").append(a3.type().value()).append(\" \").toString());\t\n a2.append(new StringBuilder().insert(0, MapperHelper.getTableName(a4, this.entity)).append(\" \").append(a3.alias()).toString());\t\n a2.append(new StringBuilder().insert(0, \" ON \").append(a3.on()).toString());\t\n n3 = ++n;\t\n }\t\n StringBuilder stringBuilder = a2;\t\n stringBuilder.append(MapperHelper.getSqlMapValue(this.entity, a.extFromKeys()));\t\n return stringBuilder.toString();\t\n }",
"public void readSQL(SQLInput stream, String typeName) throws SQLException {\n\t\tid = Helpers.integerOrNull(stream.readBigDecimal());\n\t\trt = stream.readString();\n\t\tname = stream.readString();\n\t\tdescription = stream.readString();\n\n\t}",
"public SQLInfo (Element sql) throws TemplateException, SQLException {\r\n\t \r\n\t //code description\r\n\t \r\n\t if (sql == null) throw new NullPointerException();\r\n\t this.id = sql.getAttribute(\"name\");\r\n\t if (\"\".equals(this.id.trim())) throw new IllegalArgumentException(); \r\n\t if (\"jct:prepared-sql\".equals(sql.getTagName())) {\r\n\t\t //это параметризованный запрос\r\n\t\t NodeList text = sql.getElementsByTagName(\"jct:prepared-text\");\r\n\t\t if (text.getLength() == 0) throw new TemplateException(\"SQL Info - required 'jct:prepared-text' not found in 'jct:prepared-sql'.\");\r\n\t\t this.SQL = this.getSQL((Element)text.item(0));\t\t\t\t \r\n\t\t this.parameters = this.getParameters(sql);\r\n\t }\r\n\t else {\r\n\t\t //обычный запрос\r\n\t\t this.SQL = this.getSQL(sql); \r\n\t }\t \t \t \t \t\r\n\t if (this.SQL.startsWith(\"SELECT\")) { \r\n\t //выясним в каком виде ожидается результат: набор записей или XML-структур\r\n\t String xml = sql.getAttribute(\"xml\");\r\n\t if (\"true\".equals(xml)) {\r\n\t \t //набор XML-структур\r\n\t \t this.type = SQLInfo.TYPES[SQLInfo.XML_TYPE];\t \r\n\t }\r\n\t else {\r\n\t \t //набор записей:\r\n\t \t //check if SQL template has other attributes:\r\n\t //result-sum - the index of numeric field names the value sum of which\r\n\t //must be calculated; result-group - the group by some field\r\n\t \t this.setResultSumFieldsAttr(sql.getAttribute(\"result-sum\"));\r\n\t \t this.setResultGroupFieldsAttr(sql.getAttribute(\"result-group\"));\t \r\n\t \t this.type = SQLInfo.TYPES[SQLInfo.SELECT_TYPE];\t \t \t\r\n\t } \r\n\t }\r\n\t else {\r\n\t this.type = SQLInfo.TYPES[SQLInfo.UPDATE_TYPE];\t \t\t \r\n\t }\t \r\n\t \r\n }",
"@Insert({\n \"insert into SALEORDERDETAIL (SOID, LINENO, \",\n \"MID, MNAME, STANDARD, \",\n \"UNITID, UNITNAME, \",\n \"NUM, BEFOREDISCOUNT, \",\n \"DISCOUNT, PRICE, \",\n \"TOTALPRICE, TAXRATE, \",\n \"TOTALTAX, TOTALMONEY, \",\n \"BEFOREOUT, ESTIMATEDATE, \",\n \"LEFTNUM, ISGIFT, \",\n \"FROMBILLTYPE, FROMBILLID)\",\n \"values (#{soid,jdbcType=VARCHAR}, #{lineno,jdbcType=DECIMAL}, \",\n \"#{mid,jdbcType=VARCHAR}, #{mname,jdbcType=VARCHAR}, #{standard,jdbcType=VARCHAR}, \",\n \"#{unitid,jdbcType=VARCHAR}, #{unitname,jdbcType=VARCHAR}, \",\n \"#{num,jdbcType=DECIMAL}, #{beforediscount,jdbcType=DECIMAL}, \",\n \"#{discount,jdbcType=DECIMAL}, #{price,jdbcType=DECIMAL}, \",\n \"#{totalprice,jdbcType=DECIMAL}, #{taxrate,jdbcType=DECIMAL}, \",\n \"#{totaltax,jdbcType=DECIMAL}, #{totalmoney,jdbcType=DECIMAL}, \",\n \"#{beforeout,jdbcType=DECIMAL}, #{estimatedate,jdbcType=TIMESTAMP}, \",\n \"#{leftnum,jdbcType=DECIMAL}, #{isgift,jdbcType=DECIMAL}, \",\n \"#{frombilltype,jdbcType=DECIMAL}, #{frombillid,jdbcType=VARCHAR})\"\n })\n int insert(Saleorderdetail record);",
"private static StringBuilder generateSqlForVideo(MetaDataType type, IndexParams params) {\n \n StringBuilder sbSQL = new StringBuilder(\"SELECT vd.id\");\n sbSQL.append(SQL_COMMA_SPACE_QUOTE).append(type).append(SQL_AS_VIDEO_TYPE);\n sbSQL.append(\", vd.title, vd.title_original AS originalTitle, vd.title_sort AS sortTitle\");\n sbSQL.append(\", vd.publication_year AS videoYear, vd.release_date as releaseDate\");\n sbSQL.append(\", null AS seriesId, vd.season_id AS seasonId, null AS season, vd.episode AS episode \");\n\t\tif (!params.getLibrary_item()) { sbSQL.append(\", null AS library_base \");}\n sbSQL.append(\", vd.watched AS watched, vd.create_timestamp as createTimestamp \");\n \n sbSQL.append(DataItemTools.addSqlDataItems(params.getDataItems(), \"vd\"));\n\n if (params.checkNewest()) {\n String source = params.getNewestSource();\n if (LITERAL_CREATION.equalsIgnoreCase(source)) {\n sbSQL.append(\", vd.create_timestamp AS newest\");\n } else if (LITERAL_LASTSCAN.equalsIgnoreCase(source)) {\n sbSQL.append(\", vd.last_scanned AS newest\");\n } else {\n params.addParameter(LITERAL_EXTRA, Boolean.FALSE);\n\n sbSQL.append(\", (SELECT MAX(sf.file_date) FROM stage_file sf \");\n sbSQL.append(\"JOIN mediafile mf ON mf.id=sf.mediafile_id JOIN mediafile_videodata mv ON mv.mediafile_id=mf.id \");\n sbSQL.append(\"WHERE mv.videodata_id=vd.id AND sf.file_type\");\n sbSQL.append(SQL_SELECTABLE_VIDEOS);\n sbSQL.append(\"AND sf.status\");\n sbSQL.append(SQL_IGNORE_STATUS_SET);\n sbSQL.append(\"AND mf.extra=:extra) AS newest\");\n }\n }\n\t\tif (params.getLibrary_item()) {\n\t\t\tsbSQL.append(\" ,l.base_directory as library_base from videodata_libraries vl join library l on l.id = vl.library_id join videodata vd on vd.id = vl.data_id WHERE vd.episode\");\n }\n\t\telse {sbSQL.append(\" FROM videodata vd WHERE vd.episode\");}\n \n sbSQL.append(type == MOVIE ? \"<0\" : \">-1\");\n\n if (params.getId() > 0L) {\n sbSQL.append(\" AND vd.id=\").append(params.getId());\n }\n\n if (params.includeYear()) {\n sbSQL.append(\" AND vd.publication_year=\").append(params.getYear());\n } else if (params.excludeYear()) {\n sbSQL.append(\" AND vd.publication_year!=\").append(params.getYear());\n }\n if (params.getYearStart() > 0) {\n sbSQL.append(\" AND vd.publication_year>=\").append(params.getYearStart());\n }\n if (params.getYearEnd() > 0) {\n sbSQL.append(\" AND vd.publication_year<=\").append(params.getYearEnd());\n }\n\n if (params.getWatched() != null) {\n sbSQL.append(\" AND vd.watched=\");\n sbSQL.append(params.getWatched().booleanValue() ? \"1\" : \"0\");\n }\n\t\t\n // check genre inclusion/exclusion\n includeOrExcludeGenre(type, params, sbSQL);\n\n // check studio inclusion/exclusion\n includeOrExcludeStudio(type, params, sbSQL);\n\t\t\n\t\t// check library inclusion/exclusion\n includeOrExcludeLibrary(type, params, sbSQL);\n\n // check country inclusion/exclusion\n includeOrExcludeCountry(type, params, sbSQL);\n\n // check certification inclusion/exclusion\n includeOrExcludeCertification(type, params, sbSQL);\n\n // check award inclusion/exclusion\n includeOrExcludeAward(type, params, sbSQL);\n\n // check video source inclusion/exclusion\n includeOrExcludeVideoSource(type, params, sbSQL);\n\n // check resolution inclusion/exclusion\n includeOrExcludeResolution(type, params, sbSQL);\n\n // check rating inclusion/exclusion\n includeOrExcludeRating(type, params, sbSQL);\n\n // check boxed set inclusion/exclusion\n includeOrExcludeBoxedSet(type, params, sbSQL);\n\n // check newest\n final String newestSource = params.getNewestSource();\n if (newestSource != null) {\n Date newestDate = params.getNewestDate();\n params.addParameter(LITERAL_NEWEST_DATE, newestDate);\n\n if (LITERAL_CREATION.equalsIgnoreCase(newestSource)) {\n if (params.includeNewest()) {\n sbSQL.append(\" AND vd.create_timestamp >= :newestDate\");\n } else {\n sbSQL.append(\" AND vd.create_timestamp < :newestDate\");\n }\n } else if (LITERAL_LASTSCAN.equalsIgnoreCase(newestSource)) {\n if (params.includeNewest()) {\n sbSQL.append(\" AND (vd.last_scanned is null or vd.last_scanned >= :newestDate)\");\n } else {\n sbSQL.append(\" AND vd.last_scanned is not null AND vd.last_scanned < :newestDate\");\n }\n } else {\n params.addParameter(LITERAL_EXTRA, Boolean.FALSE);\n \n addExistsOrNot(params.includeNewest(), sbSQL);\n sbSQL.append(\"SELECT 1 FROM stage_file sf JOIN mediafile mf ON mf.id=sf.mediafile_id \");\n sbSQL.append(\"JOIN mediafile_videodata mv ON mv.mediafile_id=mf.id \");\n sbSQL.append(\"WHERE mv.videodata_id=vd.id AND sf.file_type\");\n sbSQL.append(SQL_SELECTABLE_VIDEOS);\n sbSQL.append(\"AND sf.status!='DUPLICATE' AND mf.extra=:extra AND sf.file_date >= :newestDate)\");\n }\n }\n\n // add the search string, this will be empty if there is no search required\n return sbSQL.append(params.getSearchString(false));\n }",
"private void parseSql() throws IOException {\n for (int i = 0;i < 100;i++) {\n feltJusteringTegn[i] = TEXTFORMAT;\n feltLengde[i] = 0;\n }\n\n sqlStatement = \"\";\n\n mld(\"J\", \"\\n SQL statement som kjøres:\");\n\n mld(\"J\", \"_________________________________________________\");\n\n BufferedReader sqlfil = Text.open(sqlfilNavn);\n \n try {\n String linje = sqlfil.readLine();\n\n String tekst = \"\";\n int startPos = 0, sluttPos = 0;\n\n if (linje.length() > 16) tekst = linje.substring(0, 16);\n\n// sett feltformat ut fra definisjoner fra inputfil\n if (tekst.equals(\"-- fieldlengths=\")) {\n startPos = 16;\n index = 0;\n tegn = linje.charAt(startPos);\n sqlStmLength = linje.length() + 1;\n\n while (startPos < sqlStmLength && (linje.charAt(startPos) != ' ')){\n sluttPos = startPos + 3;\n\n// mld(\"J\",\"lengde feltnr. \" + index + \": \" + linje.substring(startPos, sluttPos));\n\n feltJusteringTegn[index] = linje.charAt(startPos);\n \n char c = feltJusteringTegn[index]; \n \n if (feltJusteringTegn[index] == VENSTREJUSTERT || feltJusteringTegn[index] == TEXTFORMAT) {\n \t feltJusteringTegn[index] = TEXTFORMAT;\n \t } else {\n \t\t if (feltJusteringTegn[index] == HOYREJUSTERT || feltJusteringTegn[index] == NUMERICFORMAT) {\n \t\t\t feltJusteringTegn[index] = NUMERICFORMAT;\n \t\t } else {\n \t\t\t feltJusteringTegn[index] = GENERELLFORMAT;\n \t\t\t }\n \t\t }\n\n feltLengde[index] = Integer.parseInt(linje.substring(startPos + 1, sluttPos));\n\n// mld(\"J\",\"lengde feltnr. \" + index + \": \" + feltJusteringTegn[index] + \"/\" + feltLengde[index]);\n\n startPos = startPos + 4;\n\n index ++;\n } // end while\n\n// maksAntFeltLengder = index - 1;\n\n linje = sqlfil.readLine();\n } // end if\n\n// les inn SQL linje for linje og bygg opp felttabell\n while (linje != null) {\n mld(\"J\", linje);\n \n startPos = linje.indexOf(\"--\");\n \n if (startPos > 0) {\n linje = linje.substring(0, startPos); \t \n }\n\n if (!(startPos==0)) {\n sqlStatement = sqlStatement + linje.trim() + \" \" ;\n }\n\n linje = sqlfil.readLine();\n }\n\n mld(\"J\", \"_________________________________________________\");\n\n// Text.prompt(\"Trykk enter for å fortsette!\");\n// inn.readLine();\n\n if (mldInd.equals(\"J\")) System.out.println(\"Startpos for select er : \" + startPos );\n\n startPos = 6;\n sluttPos = 0;\n \n sqlStmLength = sqlStatement.length() + 1;\n\n int fromPos = sqlStatement.indexOf(\" from \");\n \n int fromPos2 = sqlStatement.indexOf(\" FROM \");\n \n if (fromPos < 0) fromPos = sqlStmLength;\n if (fromPos2 < 0) fromPos2 = sqlStmLength;\n if (fromPos2 < fromPos) fromPos = fromPos2;\n\n while ((startPos < fromPos) & antFelt < 99){\n \t boolean isAsFelt = false;\n \t // finn først kommaposisjonen som skiller mot neste felt\n \t \n tegn = sqlStatement.charAt(startPos);\n int pos = startPos;\n int antParenteser = 0;\n\t\t\twhile ((!(tegn == ',') || antParenteser > 0) && pos < fromPos) {\n \tif (tegn == '(') {\n \t\tantParenteser++;\n \t isAsFelt = true;\n\t\t\t}\n \telse\n \t\tif (tegn == ')') {antParenteser--;}\n\t\t\t\tpos++;\n\t\t\t\ttegn = sqlStatement.charAt(pos);\n }\n\t\t\t\n\t\t\tint kommaPos = Math.min(pos, fromPos); \n \n int asPos = sqlStatement.substring(startPos, fromPos).indexOf(\" as \");\n if (asPos < 0) asPos = fromPos; else asPos = asPos + startPos;\n \n \n int asPos2 = sqlStatement.substring(startPos, fromPos).indexOf(\" AS \");\n if (asPos2 < 0) asPos2 = fromPos; else asPos2 = asPos2 + startPos;\n \n if (asPos2 < asPos) asPos = asPos2;\n \n if (isAsFelt) {\n \t kommaPos = sqlStatement.substring(asPos, fromPos).indexOf(\",\");\n \t if (kommaPos < 0) kommaPos = fromPos; else kommaPos = kommaPos + asPos;\n }\n\n if ((asPos < kommaPos)) \n \t startPos = asPos + 3;\n\n \n while (tegn == ' ' & startPos < sqlStmLength){\n startPos ++;\n\n if (mldInd.equals(\"J\")) System.out.println(tegn);\n\n tegn = sqlStatement.charAt(startPos);\n }\n\n if (kommaPos < fromPos) \n \t sluttPos = kommaPos;\n else \n \t sluttPos = fromPos;\n\n String feltNavn = sqlStatement.substring((startPos), sluttPos).trim();\n\n feltTab [antFelt] = feltNavn;\n\n antFelt ++;\n\n startPos = sluttPos + 1;\n } // end while\n\n\n } // try\n catch (NullPointerException e) {\n mld(mldInd, \" NullPointerException!\");\n } finally {\n sqlfil.close();\n }\n\t\n}",
"public String insertSelective(TbChain record) {\n SQL sql = new SQL();\n sql.INSERT_INTO(\"tb_chain\");\n \n if (record.getChainName() != null) {\n sql.VALUES(\"chain_name\", \"#{chainName,jdbcType=VARCHAR}\");\n }\n \n if (record.getChainDesc() != null) {\n sql.VALUES(\"chain_desc\", \"#{chainDesc,jdbcType=VARCHAR}\");\n }\n \n if (record.getVersion() != null) {\n sql.VALUES(\"version\", \"#{version,jdbcType=VARCHAR}\");\n }\n \n if (record.getEncryptType() != null) {\n sql.VALUES(\"encrypt_type\", \"#{encryptType,jdbcType=TINYINT}\");\n }\n \n if (record.getChainStatus() != null) {\n sql.VALUES(\"chain_status\", \"#{chainStatus,jdbcType=TINYINT}\");\n }\n if (record.getRunType() != null) {\n sql.VALUES(\"run_type\", \"#{runType,jdbcType=TINYINT}\");\n }\n if (record.getWebaseSignAddr() != null) {\n sql.VALUES(\"webase_sign_addr\", \"#{webaseSignAddr,jdbcType=VARCHAR}\");\n }\n\n if (record.getCreateTime() != null) {\n sql.VALUES(\"create_time\", \"#{createTime,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getModifyTime() != null) {\n sql.VALUES(\"modify_time\", \"#{modifyTime,jdbcType=TIMESTAMP}\");\n }\n \n return sql.toString();\n }",
"@Override\r\n\tpublic String[] getData(String[] sql) {\n\t\treturn null;\r\n\t}",
"@Insert({\n \"insert into test_module (id, title, \",\n \"create_time, create_id, \",\n \"update_time, update_id)\",\n \"values (#{id,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR}, \",\n \"#{createTime,jdbcType=TIMESTAMP}, #{createId,jdbcType=VARCHAR}, \",\n \"#{updateTime,jdbcType=TIMESTAMP}, #{updateId,jdbcType=VARCHAR})\"\n })\n int insert(TestModule record);",
"java.lang.String getSqlCode();",
"int insertSelective(NjProductTaticsRelation record);",
"public void setSql(String sql) {\n\t\tthis.sql = sql;\n\t}",
"@Override\r\n\tpublic void save(TQssql sql) {\n\r\n\t}",
"protected abstract String getEntityExistanceSQL(E entity);",
"@Override\n\tprotected String sql() throws OperationException {\n\t\treturn sql.insert(tbObj, fieldValue);\n\t}",
"public String getGeneratedSql() {\n/* 142 */ return this.sql;\n/* */ }",
"@Insert({\n \"insert into order (id, orderid, \",\n \"name, price, userid)\",\n \"values (#{id,jdbcType=BIGINT}, #{orderid,jdbcType=VARCHAR}, \",\n \"#{name,jdbcType=VARCHAR}, #{price,jdbcType=BIGINT}, #{userid,jdbcType=VARCHAR})\"\n })\n int insert(Order record);",
"@Insert({\n \"insert into NEWS (NEWS_ID, TITLE, \",\n \"BODY, IMG_URL, URL, \",\n \"CREATE_TIME)\",\n \"values (#{newsId,jdbcType=INTEGER}, #{title,jdbcType=VARCHAR}, \",\n \"#{body,jdbcType=VARCHAR}, #{imgUrl,jdbcType=VARCHAR}, #{url,jdbcType=VARCHAR}, \",\n \"#{createTime,jdbcType=TIMESTAMP})\"\n })\n int insert(News record);",
"public SqlType getSqlType() {\n \t\t\treturn SqlType.BYTE;\n \t\t}",
"CompoundStatement createCompoundStatement();",
"String getCursorRecAccessSql(String fieldName);",
"int insertSelective(Assist_table record);",
"private Cursor selectStatements(TransferObject feature) throws Exception {\r\n\t //ContentValues cv = new ContentValues(); \r\n\t List<FieldTO> fields = feature.getFields();\r\n\t String[] selectionArgs = new String[fields.size()];\r\n\t for (int i=0; i<fields.size();i++) {\r\n\t \tFieldTO fieldTO = fields.get(i);\r\n\t \tString name = fieldTO.getName();\r\n\t \tObject value = fieldTO.getValue();\r\n\t \tselectionArgs[i] = String.valueOf(value);\r\n\r\n\t\t}\r\n\t // return getDb().insert(getTableName(), null, cv);\r\n\t\tStatementFactory statement = new StatementFactory(feature);\r\n StringBuilder sqls = statement.createStatementSQL();\r\n Cursor c = getDb().rawQuery(sqls.toString(), selectionArgs);\r\n\t return c;\r\n\t}",
"Statement createStatement();",
"Statement createStatement();",
"Statement createStatement();",
"void insertSelective(CTipoComprobante record) throws SQLException;",
"public String getSQLString () {\n \treturn statementString;\n }",
"public <E extends Retrievable> void setObject(String sql, E e);",
"protected String getSQLString() {\n \t\treturn queryTranslator.getSQLString();\n \t}",
"@Override\n\tprotected String getCreateSql() {\n\t\treturn null;\n\t}",
"public CustomSql getCustomSqlUpdate();",
"@Override\n\tprotected void initializeSegments() {\n\t\tsegments.add(new SqlSegment(\"(insert into)(.+?)(values)\",\"[,]\"));\n\t\t//segments.add(new SqlSegment(\"([(])(.+?)([)] values [(])\",\"[,]\"));\n\t\tsegments.add(new SqlSegment(\"(values [(])(.+)([)] ENDOFSQL)\",\"[,]\"));\n\t}",
"public String insertSelective(Car record) {\n SQL sql = new SQL();\n sql.INSERT_INTO(\"`basedata_car`\");\n \n if (record.getCarId() != null) {\n sql.VALUES(\"car_id\", \"#{carId,jdbcType=INTEGER}\");\n }\n \n if (record.getCarBrandId() != null) {\n sql.VALUES(\"car_brand_id\", \"#{carBrandId,jdbcType=INTEGER}\");\n }\n \n if (record.getCarModel() != null) {\n sql.VALUES(\"car_model\", \"#{carModel,jdbcType=VARCHAR}\");\n }\n \n if (record.getCarType() != null) {\n sql.VALUES(\"car_type\", \"#{carType,jdbcType=TINYINT}\");\n }\n \n if (record.getAlias() != null) {\n sql.VALUES(\"alias\", \"#{alias,jdbcType=VARCHAR}\");\n }\n \n if (record.getSeatType() != null) {\n sql.VALUES(\"seat_type\", \"#{seatType,jdbcType=TINYINT}\");\n }\n \n if (record.getSeatNum() != null) {\n sql.VALUES(\"seat_num\", \"#{seatNum,jdbcType=TINYINT}\");\n }\n \n if (record.getCarClass() != null) {\n sql.VALUES(\"car_class\", \"#{carClass,jdbcType=INTEGER}\");\n }\n \n if (record.getGuestNum() != null) {\n sql.VALUES(\"guest_num\", \"#{guestNum,jdbcType=INTEGER}\");\n }\n \n if (record.getLuggageNum() != null) {\n sql.VALUES(\"luggage_num\", \"#{luggageNum,jdbcType=INTEGER}\");\n }\n \n if (record.getSpell() != null) {\n sql.VALUES(\"spell\", \"#{spell,jdbcType=VARCHAR}\");\n }\n \n if (record.getEnName() != null) {\n sql.VALUES(\"en_name\", \"#{enName,jdbcType=VARCHAR}\");\n }\n \n if (record.getUpdatedAt() != null) {\n sql.VALUES(\"updated_at\", \"#{updatedAt,jdbcType=TIMESTAMP}\");\n }\n \n if (record.getCreatedAt() != null) {\n sql.VALUES(\"created_at\", \"#{createdAt,jdbcType=TIMESTAMP}\");\n }\n \n return sql.toString();\n }",
"@Insert({\n \"insert into tb_user (username, password)\",\n \"values (#{username,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR})\"\n })\n int insert(User record);",
"@Insert({\n \"insert into user_t (id, user_name, \",\n \"password, age, ver)\",\n \"values (#{id,jdbcType=INTEGER}, #{userName,jdbcType=VARCHAR}, \",\n \"#{password,jdbcType=VARCHAR}, #{age,jdbcType=INTEGER}, #{ver,jdbcType=INTEGER})\"\n })\n int insert(User record);",
"void insertSelective(CTipoPersona record) throws SQLException;",
"static void dataToevoegen(String querry) {\n try {\n Statement stmt = connectieMaken().createStatement(); //\n stmt.execute(querry);\n } catch (SQLException se) {\n se.printStackTrace();\n }\n }",
"public final /* synthetic */ void saveToDb() {\n DruidPooledConnection druidPooledConnection;\n DruidPooledConnection druidPooledConnection2;\n block18: {\n block17: {\n StringBuilder stringBuilder;\n PreparedStatement preparedStatement;\n MaplePet a2;\n if (!a2.a) {\n return;\n }\n try {\n druidPooledConnection2 = DBConPool.getInstance().getDataSource().getConnection();\n try {\n preparedStatement = druidPooledConnection2.prepareStatement(ConcurrentEnumMap.ALLATORIxDEMO(\";\\t*\\u0018:\\u001cN)\\u000b-\\u001dy=\\u001c:y\\u00008\\u0003<NdNfBy\\u0002<\\u0018<\\u0002ySyQuN:\\u00026\\u001d<\\u0000<\\u001d*NdNfBy\\b,\\u00025\\u0000<\\u001d*NdNfBy\\u001d<\\r6\\u0000=\\u001dySyQuN?\\u00028\\t*NdNfBy\\u000b!\\r5\\u001b=\\u000b=NdNfNuN*\\u001e<\\u000b=NdNfBy\\f,\\b?\\u001d2\\u00075\\u00020\\nySyQuN:\\u000f7>0\\r2;)NdNfBy\\u001d2\\u00075\\u00020\\nySyQy9\\u0011+\\u000b+y\\u001e<\\u001a0\\nySyQ\"));\n try {\n int n2;\n PreparedStatement preparedStatement2 = preparedStatement;\n PreparedStatement preparedStatement3 = preparedStatement;\n preparedStatement.setString(1, a2.h);\n preparedStatement3.setByte(2, a2.e);\n preparedStatement3.setShort(3, a2.B);\n preparedStatement2.setByte(4, a2.H);\n preparedStatement2.setInt(5, a2.J);\n preparedStatement.setShort(6, a2.k);\n stringBuilder = new StringBuilder();\n int n3 = n2 = 0;\n while (n3 < a2.d.length) {\n stringBuilder.append(a2.d[n2]);\n stringBuilder.append(KoreanDateUtil.ALLATORIxDEMO(\"V\"));\n n3 = ++n2;\n }\n }\n catch (Throwable throwable) {\n Throwable throwable2;\n if (preparedStatement != null) {\n try {\n preparedStatement.close();\n throwable2 = throwable;\n throw throwable2;\n }\n catch (Throwable throwable3) {\n throwable.addSuppressed(throwable3);\n }\n }\n throwable2 = throwable;\n throw throwable2;\n }\n }\n catch (Throwable throwable) {\n Throwable throwable4;\n if (druidPooledConnection2 != null) {\n try {\n druidPooledConnection2.close();\n throwable4 = throwable;\n throw throwable4;\n }\n catch (Throwable throwable5) {\n throwable.addSuppressed(throwable5);\n }\n }\n throwable4 = throwable;\n throw throwable4;\n }\n }\n catch (SQLException sQLException) {\n FilePrinter.printError(ConcurrentEnumMap.ALLATORIxDEMO(\"\\u0014\\u000f)\\u0002<><\\u001aw\\u001a!\\u001a\"), sQLException, KoreanDateUtil.ALLATORIxDEMO(\"e\\u001b`\\u001fB\\u0015R\\u0018\"));\n return;\n }\n {\n String string = stringBuilder.toString();\n PreparedStatement preparedStatement4 = preparedStatement;\n PreparedStatement preparedStatement5 = preparedStatement;\n PreparedStatement preparedStatement6 = preparedStatement;\n String string2 = string;\n preparedStatement6.setString(7, string2.substring(0, string2.length() - 1));\n preparedStatement6.setInt(8, a2.ALLATORIxDEMO);\n preparedStatement5.setInt(9, a2.I);\n preparedStatement5.setShort(10, a2.K);\n preparedStatement4.setInt(11, a2.M);\n preparedStatement4.setInt(12, a2.D);\n preparedStatement4.executeUpdate();\n a2.a = false;\n if (preparedStatement == null) break block17;\n druidPooledConnection = druidPooledConnection2;\n }\n preparedStatement.close();\n break block18;\n }\n druidPooledConnection = druidPooledConnection2;\n }\n if (druidPooledConnection == null) return;\n druidPooledConnection2.close();\n }",
"int insertSelective(@Param(\"record\") TbSerdeParams record, @Param(\"selective\") TbSerdeParams.Column ... selective);",
"protected String getSql(MethylDbQuerier params, String chr) \n\tthrows Exception{\n\t\tString methTable = tablePrefix + chr;\n\t\t//String methTable = params.methylTablePrefix;\n\t\tString sql = String.format(\"select * from %s WHERE \", methTable);\n\t\tsql += \"ABaseRefUpperCase != '0'\";\n\t\tsql += \" AND BBaseRefUpperCase != '0'\";\n\t\t\n\t\tsql += \" AND (ACReads != 0 OR BCReads != 0)\";\n\t\tsql += \" AND (ATReads != 0 OR BTReads != 0)\";\n\t\t//sql += \" AND (ACReads + ATReads)/totalReads >= \" + minAlleleFreq;\n\t\t//sql += \" AND (BCReads + BTReads)/totalReads >= \" + minAlleleFreq;\n\t\t//sql += \" AND (ACReads + ATReads >= \" + minAlleleCount + \")\";\n\t\t//sql += \" AND (BCReads + BTReads >= \" + minAlleleCount + \")\";\n\t\tsql += \" AND aReadsOpposite/totalReadsOpposite <= \" + minOppoAFreq;\n\t\tif (Cpg){\n\t\t\tsql += \" AND nextBaseRefUpperCase = 'G'\";\n\t\t}\n\t\t\t\n\t\t//sql += \" GROUP BY chromPos \"; // If you don't do this, you get multiple instances of the same CpG if it overlaps multiple features.\n\t\tsql += \" ORDER BY chromPos,alleleChromPos ;\";\n\t\t\n\t\treturn sql;\n\t}",
"int insertSelective(TbComEqpModel record);",
"public void sql(boolean sql) {\n this.sql = sql;\n }",
"@Override\n public PreparedStatement loadParameters(PreparedStatement ps, UltraSoundRecordBean bean) throws SQLException{\n ps.setLong(1,bean.getUltraSoundID());\n ps.setLong(2, bean.getOfficeVisitID());\n ps.setDouble(3, bean.getCrownRumpLength());\n ps.setDouble(4, bean.getBiparietalDiameter());\n ps.setDouble(5, bean.getHeadCircumference());\n ps.setDouble(6, bean.getFemurLength());\n ps.setDouble(7, bean.getOcciFrontalDiameter());\n ps.setDouble(8, bean.getAbdoCircumference());\n ps.setDouble(9, bean.getHumerusLength());\n ps.setDouble(10, bean.getEstimatedFetalWeight());\n ps.setString(11, bean.getUltraSoundImage());\n return ps;\n }",
"@Override\n\tpublic String insertTable(String sql, String pointid, String type) {\n\t\treturn \"insert into history_table_view(sqltext,pointid,type) values('\"+sql+ \"','\"+ pointid +\"','\"+ type +\"')\";\n\t}",
"T buidEntity(ResultSet rs) throws SQLException;",
"@Override\n public long insertCompactRaw(String password, ContactType type, long id) {\n // Specialized Insert - InsertType - BEGIN\n if (insertCompactRawPreparedStatement9==null) {\n // generate static SQL for statement\n String _sql=\"INSERT INTO contact (password, type, id) VALUES (?, ?, ?)\";\n insertCompactRawPreparedStatement9 = KriptonDatabaseHelper.compile(_context, _sql);\n }\n KriptonContentValues _contentValues=contentValuesForUpdate(insertCompactRawPreparedStatement9);\n\n _contentValues.put(\"password\", SQLTypeAdapterUtils.toData(PasswordAdapterType.class, password));\n _contentValues.put(\"type\", SQLTypeAdapterUtils.toData(EnumAdapterType.class, type));\n _contentValues.put(\"id\", id);\n\n // log section BEGIN\n if (_context.isLogEnabled()) {\n // log for insert -- BEGIN \n StringBuffer _columnNameBuffer=new StringBuffer();\n StringBuffer _columnValueBuffer=new StringBuffer();\n String _columnSeparator=\"\";\n for (String columnName:_contentValues.keys()) {\n _columnNameBuffer.append(_columnSeparator+columnName);\n _columnValueBuffer.append(_columnSeparator+\":\"+columnName);\n _columnSeparator=\", \";\n }\n Logger.info(\"INSERT INTO contact (%s) VALUES (%s)\", _columnNameBuffer.toString(), _columnValueBuffer.toString());\n\n // log for content values -- BEGIN\n Triple<String, Object, KriptonContentValues.ParamType> _contentValue;\n for (int i = 0; i < _contentValues.size(); i++) {\n _contentValue = _contentValues.get(i);\n if (_contentValue.value1==null) {\n Logger.info(\"==> :%s = <null>\", _contentValue.value0);\n } else {\n Logger.info(\"==> :%s = '%s' (%s)\", _contentValue.value0, StringUtils.checkSize(_contentValue.value1), _contentValue.value1.getClass().getCanonicalName());\n }\n }\n // log for content values -- END\n // log for insert -- END \n\n\n // log for where parameters -- BEGIN\n int _whereParamCounter=0;\n for (String _whereParamItem: _contentValues.whereArgs()) {\n Logger.info(\"==> param%s: '%s'\",(_whereParamCounter++), StringUtils.checkSize(_whereParamItem));\n }\n // log for where parameters -- END\n }\n // log section END\n // insert operation\n long result = KriptonDatabaseHelper.insert(insertCompactRawPreparedStatement9, _contentValues);\n return result;\n // Specialized Insert - InsertType - END\n }",
"@Override\n public long updateJQLRaw(String password, Date birthDay, ContactType type, long id) {\n if (updateJQLRawPreparedStatement8==null) {\n // generate static SQL for statement\n String _sql=\"UPDATE contact SET birth_day=?, id=? WHERE password=? and type=?\";\n updateJQLRawPreparedStatement8 = KriptonDatabaseHelper.compile(_context, _sql);\n }\n KriptonContentValues _contentValues=contentValuesForUpdate(updateJQLRawPreparedStatement8);\n _contentValues.put(\"birth_day\", SQLTypeAdapterUtils.toData(DateAdapterType.class, birthDay));\n _contentValues.put(\"id\", id);\n\n _contentValues.addWhereArgs(SQLTypeAdapterUtils.toString(PasswordAdapterType.class, password));\n _contentValues.addWhereArgs(SQLTypeAdapterUtils.toString(EnumAdapterType.class, type));\n\n // generation CODE_001 -- BEGIN\n // generation CODE_001 -- END\n // log section BEGIN\n if (_context.isLogEnabled()) {\n\n // display log\n Logger.info(\"UPDATE contact SET birth_day=:birth_day, id=:id WHERE password=? and type=?\");\n\n // log for content values -- BEGIN\n Triple<String, Object, KriptonContentValues.ParamType> _contentValue;\n for (int i = 0; i < _contentValues.size(); i++) {\n _contentValue = _contentValues.get(i);\n if (_contentValue.value1==null) {\n Logger.info(\"==> :%s = <null>\", _contentValue.value0);\n } else {\n Logger.info(\"==> :%s = '%s' (%s)\", _contentValue.value0, StringUtils.checkSize(_contentValue.value1), _contentValue.value1.getClass().getCanonicalName());\n }\n }\n // log for content values -- END\n\n // log for where parameters -- BEGIN\n int _whereParamCounter=0;\n for (String _whereParamItem: _contentValues.whereArgs()) {\n Logger.info(\"==> param%s: '%s'\",(_whereParamCounter++), StringUtils.checkSize(_whereParamItem));\n }\n // log for where parameters -- END\n }\n // log section END\n int result = KriptonDatabaseHelper.updateDelete(updateJQLRawPreparedStatement8, _contentValues);\n return result;\n }",
"public List<Object> sqlQuery(Class<Object> class1, String string) {\n return null;\n }",
"public void simpanDataBuku(){\n String sql = (\"INSERT INTO buku (judulBuku, pengarang, penerbit, tahun, stok)\" \n + \"VALUES ('\"+getJudulBuku()+\"', '\"+getPengarang()+\"', '\"+getPenerbit()+\"'\"\n + \", '\"+getTahun()+\"', '\"+getStok()+\"')\");\n \n try {\n //inisialisasi preparedstatmen\n PreparedStatement eksekusi = koneksi. getKoneksi().prepareStatement(sql);\n eksekusi.execute();\n \n //pemberitahuan jika data berhasil di simpan\n JOptionPane.showMessageDialog(null,\"Data Berhasil Disimpan\");\n } catch (SQLException ex) {\n //Logger.getLogger(modelPelanggan.class.getName()).log(Level.SEVERE, null, ex);\n JOptionPane.showMessageDialog(null, \"Data Gagal Disimpan \\n\"+ex);\n }\n }",
"public int getTipoSql() {\n return tipoSql;\n }",
"List<BannerPosition> selectBannerPositionByExample(BannerPositionExample example) throws SQLException;",
"@Insert({\n \"insert into basic_info_precursor_process_type (code, process_name, \",\n \"types)\",\n \"values (#{code,jdbcType=INTEGER}, #{processName,jdbcType=VARCHAR}, \",\n \"#{types,jdbcType=TINYINT})\"\n })\n int insert(BasicInfoPrecursorProcessType record);",
"public static String buildInsertSql(Object object, FlyingModel flyingModel)\r\n\t\t\tthrows SecurityException, NoSuchFieldException, IllegalArgumentException, IllegalAccessException,\r\n\t\t\tInvocationTargetException, NoSuchMethodException {\r\n\t\tString ignoreTag = flyingModel.getIgnoreTag();\r\n\t\tKeyHandler keyHandler = flyingModel.getKeyHandler();\r\n\t\tMap<?, ?> dtoFieldMap = PropertyUtils.describe(object);\r\n\t\tTableMapper tableMapper = buildTableMapper(getTableMappedClass(object.getClass()));\r\n\r\n\t\tString tableName = tableMapper.getTableName();\r\n\t\tStringBuffer tableSql = new StringBuffer();\r\n\t\tStringBuffer valueSql = new StringBuffer();\r\n\r\n\t\ttableSql.append(INSERT_INTO_).append(tableName).append(_OPENPAREN);\r\n\t\tvalueSql.append(VALUES_OPENPAREN);\r\n\r\n\t\tboolean allFieldNull = true;\r\n\t\tboolean uniqueKeyHandled = false;\r\n\t\tfor (FieldMapper fieldMapper : tableMapper.getFieldMapperCache().values()) {\r\n\t\t\tObject value = dtoFieldMap.get(fieldMapper.getFieldName());\r\n\t\t\tif (!fieldMapper.isInsertAble() || ((value == null && !fieldMapper.isOpVersionLock())\r\n\t\t\t\t\t|| (fieldMapper.getIgnoreTagSet().contains(ignoreTag)))) {\r\n\t\t\t\tcontinue;\r\n\t\t\t} else if (((FieldMapper) fieldMapper).isOpVersionLock()) {\r\n\t\t\t\tvalue = 0;\r\n\t\t\t\tReflectHelper.setValueByFieldName(object, fieldMapper.getFieldName(), value);\r\n\t\t\t}\r\n\t\t\tallFieldNull = false;\r\n\t\t\ttableSql.append(fieldMapper.getDbFieldName()).append(COMMA);\r\n\t\t\tvalueSql.append(POUND_OPENBRACE);\r\n\t\t\tif (fieldMapper.isForeignKey() || fieldMapper.isCrossDbForeignKey()) {\r\n\t\t\t\tvalueSql.append(fieldMapper.getFieldName()).append(DOT).append(fieldMapper.getForeignFieldName());\r\n\t\t\t} else {\r\n\t\t\t\tvalueSql.append(fieldMapper.getFieldName());\r\n\t\t\t}\r\n\t\t\tvalueSql.append(COMMA).append(JDBCTYPE_EQUAL).append(fieldMapper.getJdbcType().toString());\r\n\t\t\tif (fieldMapper.getTypeHandlerPath() != null) {\r\n\t\t\t\tvalueSql.append(COMMA_TYPEHANDLER_EQUAL).append(fieldMapper.getTypeHandlerPath());\r\n\t\t\t}\r\n\t\t\tif (fieldMapper.isUniqueKey()) {\r\n\t\t\t\tuniqueKeyHandled = true;\r\n\t\t\t\tif (keyHandler != null) {\r\n\t\t\t\t\thandleInsertSql(keyHandler, valueSql, fieldMapper, object, uniqueKeyHandled);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tvalueSql.append(CLOSEBRACE_COMMA);\r\n\t\t}\r\n\t\tif (keyHandler != null && !uniqueKeyHandled) {\r\n\t\t\tFieldMapper temp = tableMapper.getUniqueKeyNames()[0];\r\n\t\t\ttableSql.append(temp.getDbFieldName()).append(COMMA);\r\n\t\t\thandleInsertSql(keyHandler, valueSql, temp, object, uniqueKeyHandled);\r\n\t\t}\r\n\t\tif (allFieldNull) {\r\n\t\t\tthrow new BuildSqlException(BuildSqlExceptionEnum.nullField);\r\n\t\t}\r\n\r\n\t\ttableSql.delete(tableSql.lastIndexOf(COMMA), tableSql.lastIndexOf(COMMA) + 1);\r\n\t\tvalueSql.delete(valueSql.lastIndexOf(COMMA), valueSql.lastIndexOf(COMMA) + 1);\r\n\t\treturn tableSql.append(CLOSEPAREN_).append(valueSql).append(CLOSEPAREN).toString();\r\n\t}",
"@Insert({\n \"insert into PURCHASE (ID, SDATE, \",\n \"STYPE, SMONEY, TOUCHING, \",\n \"ACCOUNT, CHECKSTATUS, \",\n \"DEMO1, DEMO2, DEMO3)\",\n \"values (#{id,jdbcType=DECIMAL}, #{sdate,jdbcType=TIMESTAMP}, \",\n \"#{stype,jdbcType=VARCHAR}, #{smoney,jdbcType=DECIMAL}, #{touching,jdbcType=VARCHAR}, \",\n \"#{account,jdbcType=VARCHAR}, #{checkstatus,jdbcType=DECIMAL}, \",\n \"#{demo1,jdbcType=DECIMAL}, #{demo2,jdbcType=VARCHAR}, #{demo3,jdbcType=DECIMAL})\"\n })\n int insert(Purchase record);",
"void LlenarModelo(){\n datos.addColumn(\"ID\");\n datos.addColumn(\"Descripcion\");\n datos.addColumn(\"Cantidad\");\n String []ingresar=new String[4];\n try {\n Connection con = Conexion.getConection();\n Statement estado = con.createStatement();\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo>=\" + SIGEPSA.IDOtrosPagosMin + \";\");\n //ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago ;\");\n ResultSet resultado = estado.executeQuery(\"SELECT * FROM pago where codigo<9 or codigo>10 and activo = 1;\");\n while(resultado.next()){\n ingresar[0]=String.valueOf((String)resultado.getObject(\"CODIGO\").toString());\n ingresar[1]=String.valueOf((String)resultado.getObject(\"DESCRIPCION\").toString());\n ingresar[2]=String.valueOf((String)resultado.getObject(\"CANTIDAD\").toString());\n datos.addRow(ingresar);\n }\n }catch (Exception ex) {\n \n }\n }",
"void insertSelective(GfanCodeBanner record) throws SQLException;"
]
| [
"0.59024227",
"0.56425756",
"0.5587839",
"0.55690384",
"0.54119676",
"0.5403898",
"0.53984666",
"0.5390624",
"0.53692174",
"0.5368403",
"0.5353919",
"0.53521305",
"0.5340286",
"0.5332985",
"0.53304064",
"0.53244203",
"0.5321668",
"0.5314815",
"0.5311148",
"0.5309369",
"0.52823716",
"0.52782094",
"0.52685094",
"0.5264777",
"0.5258092",
"0.5243904",
"0.52294576",
"0.5214265",
"0.5208073",
"0.5205059",
"0.520395",
"0.51873714",
"0.51851153",
"0.51767194",
"0.5170466",
"0.5152969",
"0.5143538",
"0.5131758",
"0.5128357",
"0.51219237",
"0.512188",
"0.5117856",
"0.51157767",
"0.51091135",
"0.5104615",
"0.510325",
"0.50982046",
"0.5093843",
"0.50907904",
"0.5090474",
"0.5086563",
"0.50831723",
"0.50748533",
"0.50672734",
"0.50654143",
"0.5061634",
"0.50588197",
"0.5057784",
"0.5050437",
"0.50371164",
"0.5032013",
"0.50263",
"0.50158024",
"0.5012478",
"0.50083995",
"0.5000885",
"0.49990812",
"0.49990812",
"0.49990812",
"0.4996761",
"0.49958542",
"0.49953687",
"0.49952406",
"0.49925917",
"0.49717268",
"0.4968418",
"0.49673712",
"0.49673375",
"0.49655014",
"0.49548048",
"0.49537355",
"0.4951787",
"0.4948699",
"0.49486554",
"0.49469066",
"0.4946567",
"0.49396005",
"0.49360275",
"0.49329194",
"0.49319357",
"0.49245062",
"0.49238363",
"0.49184793",
"0.49184334",
"0.49173918",
"0.49082267",
"0.49078417",
"0.49064648",
"0.49030614",
"0.49011573"
]
| 0.5541406 | 4 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.