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
Verificamos que se escoja una cuenta papa del mismo nivel o que no sea su hija
@Override public boolean preSave() { if(!cuentaPapaCorrecta(instance)) { FacesMessages.instance().add( sainv_messages.get("cuentac_error_ctapdrno")); return false; } if(!cuentaEsUnica()) { FacesMessages.instance().add( sainv_messages.get("cuentac_error_ctaexis")); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean nivelPasado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posi...
[ "0.70361745", "0.6837661", "0.67838055", "0.67086494", "0.6684259", "0.6466414", "0.63965183", "0.63957", "0.6348817", "0.6286408", "0.6263016", "0.62276345", "0.6208036", "0.6205685", "0.6181542", "0.61632156", "0.6145458", "0.6122096", "0.60852784", "0.6052887", "0.60339755...
0.0
-1
Verificamos que se escoja una cuenta papa del mismo nivel o que no sea su hija
@Override public boolean preModify() { if(!cuentaPapaCorrecta(instance)) { FacesMessages.instance().add( sainv_messages.get("cuentac_error_ctapdrno")); return false; } if(!cuentaEsUnica()) { FacesMessages.instance().add( sainv_messages.get("cuentac_error_ctaexis")); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean nivelPasado() {\r\n\t\tint[] contPelotas = new int[ COLORES_POSIBLES.length ]; // Contadores por color\r\n\t\tfor (int i=0; i<tablero.size(); i++) {\r\n\t\t\tPelota pelota = tablero.getPelota(i);\r\n\t\t\tint contColor = Arrays.asList(COLORES_POSIBLES).indexOf( pelota.getColor() ); // Posi...
[ "0.7036686", "0.6837423", "0.6784448", "0.6709494", "0.66850424", "0.6465338", "0.63978964", "0.6397289", "0.6349852", "0.62867033", "0.62647283", "0.622833", "0.6209563", "0.6206895", "0.61833066", "0.6163947", "0.61451554", "0.6123623", "0.6087594", "0.605499", "0.6035391",...
0.0
-1
Eliminamos todas las cuentas hijas
@Override public boolean preDelete() { eliminarCuentasHijas(instance); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void borrarPiezasAmenazadoras(){\n this.piezasAmenazadoras.clear();\n }", "private Element removeHiElements(Element p_seg)\n {\n ArrayList elems = new ArrayList();\n\n findHiElements(elems, p_seg);\n\n for (int i = 0; i < elems.size(); i++)\n {\n Element...
[ "0.6353837", "0.6298461", "0.6294249", "0.626849", "0.6115094", "0.61053413", "0.6082062", "0.6081819", "0.60545236", "0.6051373", "0.60415065", "0.5994272", "0.598351", "0.5978912", "0.5949648", "0.5919541", "0.5918443", "0.59132826", "0.5836735", "0.58091056", "0.5801639", ...
0.0
-1
TODO Autogenerated method stub
@Override public void posSave() { }
{ "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 getExr...
[ "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.608016...
0.0
-1
Si modificaron el padre de la cuenta, todos los hijos de esta cuenta deben de pertenecer al mismo tipo de cuenta
@Override public void posModify() { getEntityManager().refresh(instance); cambiarTipoCuenta(instance); getEntityManager().flush(); getEntityManager().refresh(instance); resultList = null; rootNode = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void modi() { \n try {\n cvo.getId_cliente();\n cvo.setNombre_cliente(vista.txtNombre.getText());\n cvo.setApellido_cliente(vista.txtApellido.getText());\n cvo.setDireccion_cliente(vista.txtDireccion.getText());\n cvo.setCorreo_...
[ "0.61711925", "0.61168563", "0.6043917", "0.60396045", "0.5993593", "0.59399956", "0.5908049", "0.59060067", "0.5900649", "0.5874093", "0.5866643", "0.58337694", "0.58003557", "0.57934016", "0.5793371", "0.57868004", "0.5778448", "0.5776801", "0.57652235", "0.5763002", "0.575...
0.0
-1
TODO Autogenerated method stub
@Override public void posDelete() { }
{ "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 getExr...
[ "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.608016...
0.0
-1
Create a child resolver. Searches will take place first in the child, then the parent(s).
public Resolver(Resolver parentResolver) { parent = parentResolver; storage = new Slots(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void addChildren(PlaceIndex index, Place parent, TupleQuery queryChildren,\n TupleQuery queryNamesOff, TupleQuery queryNamesAlt)\n throws QueryEvaluationException {\n TupleQueryResult resultChildren = queryChildren.evaluate();\n try {\n\n ...
[ "0.56816196", "0.5403795", "0.5323775", "0.51035804", "0.49603775", "0.49163106", "0.49155295", "0.4909287", "0.4907509", "0.48730686", "0.48495665", "0.48265287", "0.48258147", "0.478441", "0.47792676", "0.47699198", "0.4712512", "0.46949106", "0.46855408", "0.46843404", "0....
0.53686225
2
Get a value from this Resolver. Return null if not found.
public Value get(Value key) { return storage.get(key); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public V get(K key) {\r\n\t\t\tif (key == null) {\r\n\t\t\t\tthrow new NullPointerException();\r\n\t\t\t} else if (find(key) == null) {\r\n\t\t\t\treturn null;\r\n\t\t\t} else {\r\n\t\t\t\treturn find(key).value;\r\n\t\t\t}\r\n\t\t}", "public Optional<T> getValue() {\n return Optional.ofNullable(value);\n...
[ "0.66380286", "0.6532285", "0.64603186", "0.6449879", "0.64214844", "0.64083266", "0.6371911", "0.63674986", "0.6210381", "0.62065965", "0.61807746", "0.61627036", "0.61387956", "0.6135578", "0.6104331", "0.6098054", "0.6096548", "0.609118", "0.6087621", "0.5956864", "0.59548...
0.0
-1
Insert a new Value into this Resolver.
public void put(Value key, Value value) { storage.put(key, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insert(Key key, Value value){\n this.root = this.insertHelper(key, value, root);\n }", "@Override\r\n public void insert(K key, V value) {\r\n // call insert of the root\r\n root.insert(key, value);\r\n }", "public void insert(Key key, Value value) {\r\n root.in...
[ "0.6543526", "0.6492224", "0.6315486", "0.62776965", "0.6266496", "0.6126167", "0.6090357", "0.60682774", "0.60682774", "0.60118353", "0.59867513", "0.59468985", "0.5885562", "0.58417404", "0.58281803", "0.58188343", "0.5802015", "0.57748014", "0.5750825", "0.5729787", "0.572...
0.0
-1
Attempt to find a key in the Resolver hierarchy. Return null if not found.
public Value find(Value key) { Value v = get(key); if (v != null) return v; if (parent != null) return parent.find(key); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic K lookup(K key) {\n\t\treturn lookup(root, key);\n\t}", "public V find (K key) throws KeyNotFoundException {\n\t\treturn findKey(root, key);\n\t}", "public Entry find(Object key) {\n int i = compFunction(key.hashCode());\n SList chain = buckets[i];\n try {\n for (SLi...
[ "0.697106", "0.68429357", "0.67250055", "0.6578719", "0.6541792", "0.6527125", "0.65189147", "0.6514704", "0.64685595", "0.6464023", "0.6379997", "0.6338199", "0.62976897", "0.6279548", "0.62505555", "0.62463164", "0.61731404", "0.617223", "0.61544883", "0.615089", "0.6136128...
0.6849057
1
Put a new Operator in this Resolver.
public void put(Operator operator) { put(new Str(operator.getOperatorName()), operator); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addOperator(Operator operator){\n _operators.add(operator);\n }", "public void addOperator(String operator) {\n this.operators.add(operator);\n }", "public void setOperator(String operator) {\n this.operator = operator;\n }", "public void setOp(Operator op) {\n ...
[ "0.6860041", "0.65414095", "0.6519481", "0.65054584", "0.6476962", "0.64152837", "0.63734347", "0.6280848", "0.6206307", "0.6170056", "0.6156649", "0.6106415", "0.6074648", "0.6010386", "0.6009539", "0.6007228", "0.5997799", "0.5997799", "0.5997799", "0.5997799", "0.5963703",...
0.72177947
0
Set the value of the most local slot in the Resolver. If not found in the root Resolver, create it in the root Resolver.
public Value set(Value key, Value value) { if (get(key) != null) put(key, value); else if (parent != null) parent.put(key, value); else put(key, value); return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Resolver(Resolver parentResolver) {\n\t\tparent = parentResolver;\n\t\tstorage = new Slots();\n\t}", "public Resolution resolve(Constraint localConstraint, LocalNode localModel) throws QueryException {\n // globalize the model\n Node modelNode = globalizeNode(localModel);\n if (!(modelNode ins...
[ "0.561539", "0.50441164", "0.49873754", "0.49561283", "0.49060538", "0.4884284", "0.47862014", "0.4780615", "0.47781366", "0.47688532", "0.47585526", "0.47404465", "0.46933106", "0.46842134", "0.46644488", "0.46568796", "0.46507263", "0.46167183", "0.46107417", "0.46048757", ...
0.4345717
58
Makes the given area of the image transparent if it was previously completely opaque (used to remove the outer layer of a skin around the head if it was saved all opaque; this would be redundant so it's assumed that the skin maker is just using an image editor without an alpha channel)
private void setAreaTransparent(int p_78434_1_, int p_78434_2_, int p_78434_3_, int p_78434_4_) { if (!this.hasTransparency(p_78434_1_, p_78434_2_, p_78434_3_, p_78434_4_)) { for (int var5 = p_78434_1_; var5 < p_78434_3_; ++var5) { for (int var6 = p_78434_2_; var6 < p_78434_4_; ++var6) { this.imageData[var5 + var6 * this.imageWidth] &= 16777215; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setAreaTransparent(int p_78434_1_, int p_78434_2_, int p_78434_3_, int p_78434_4_)\r\n {\r\n if (!this.hasTransparency(p_78434_1_, p_78434_2_, p_78434_3_, p_78434_4_))\r\n {\r\n for (int var5 = p_78434_1_; var5 < p_78434_3_; ++var5)\r\n {\r\n for (...
[ "0.66790265", "0.61143893", "0.6088475", "0.60593224", "0.6055126", "0.6010658", "0.59080917", "0.57876885", "0.5603494", "0.5600117", "0.55618936", "0.555006", "0.55392534", "0.5532419", "0.5501867", "0.546764", "0.54429233", "0.54181033", "0.54158264", "0.53962886", "0.5386...
0.67089057
0
Makes the given area of the image opaque
private void setAreaOpaque(int p_78433_1_, int p_78433_2_, int p_78433_3_, int p_78433_4_) { for (int var5 = p_78433_1_; var5 < p_78433_3_; ++var5) { for (int var6 = p_78433_2_; var6 < p_78433_4_; ++var6) { this.imageData[var5 + var6 * this.imageWidth] |= -16777216; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setAreaTransparent(int p_78434_1_, int p_78434_2_, int p_78434_3_, int p_78434_4_)\n {\n if (!this.hasTransparency(p_78434_1_, p_78434_2_, p_78434_3_, p_78434_4_))\n {\n for (int var5 = p_78434_1_; var5 < p_78434_3_; ++var5)\n {\n for (int var6 = p...
[ "0.6665535", "0.66386783", "0.65885425", "0.6085869", "0.6054008", "0.57954365", "0.57665586", "0.573631", "0.5689003", "0.5665531", "0.5579686", "0.553631", "0.5530139", "0.5504315", "0.54964596", "0.54843485", "0.54764295", "0.54660153", "0.5447201", "0.5362251", "0.5348459...
0.66398394
1
Returns true if the given area of the image contains transparent pixels
private boolean hasTransparency(int p_78435_1_, int p_78435_2_, int p_78435_3_, int p_78435_4_) { for (int var5 = p_78435_1_; var5 < p_78435_3_; ++var5) { for (int var6 = p_78435_2_; var6 < p_78435_4_; ++var6) { int var7 = this.imageData[var5 + var6 * this.imageWidth]; if ((var7 >> 24 & 255) < 128) { return true; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean hasTransparency(int p_78435_1_, int p_78435_2_, int p_78435_3_, int p_78435_4_)\r\n {\r\n for (int var5 = p_78435_1_; var5 < p_78435_3_; ++var5)\r\n {\r\n for (int var6 = p_78435_2_; var6 < p_78435_4_; ++var6)\r\n {\r\n int var7 = this.imageData...
[ "0.707299", "0.6762048", "0.6276051", "0.6098227", "0.6069104", "0.60589725", "0.6029734", "0.60273135", "0.60037094", "0.600307", "0.5877787", "0.5871135", "0.5808062", "0.57398003", "0.5710733", "0.5677449", "0.56655735", "0.563753", "0.556967", "0.5551664", "0.5550864", ...
0.7105286
0
Generates a random coordinate for a mine.
public int[][] generateRandomCoordinate(int mineNumber, int numberOfColumns, int numberOfRows) { int columnNumberIsOneRowNumberIsTwo = 1; while (columnNumberIsOneRowNumberIsTwo <= 2) { if (columnNumberIsOneRowNumberIsTwo == 1) { mine[mineNumber][columnNumberIsOneRowNumberIsTwo] = random.nextInt(numberOfColumns) + 1; } if (columnNumberIsOneRowNumberIsTwo == 2) { mine[mineNumber][columnNumberIsOneRowNumberIsTwo] = random.nextInt(numberOfRows) + 1; } columnNumberIsOneRowNumberIsTwo++; } return mine; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "public Location getRandomLocation() {\n\t\tint x = rand.nextInt(WORLD_SIZE);\n\t\tint y = 12;\n\t\tint z = rand.nextInt(WORLD_SIZE);\n\t\treturn new Location(x, y...
[ "0.7822626", "0.759261", "0.75228417", "0.7461754", "0.73126847", "0.7231717", "0.7126103", "0.7113967", "0.709577", "0.7028068", "0.69930285", "0.69886994", "0.696801", "0.6963491", "0.6952288", "0.69448525", "0.6857434", "0.6848071", "0.68317336", "0.68226624", "0.6819278",...
0.7027881
10
Determines where each mine is located.
public void setMinePositions(int numberOfMines, int numberOfColumns, int numberOfRows) { mine = new int[numberOfMines + 1][3]; int mineNumber = 1; while (mineNumber <= numberOfMines) { mine = generateRandomCoordinate(mineNumber, numberOfColumns, numberOfRows); if (mineNumber > 1) { int mineComparedTo = 1; while (mineComparedTo < mineNumber) { if (mine[mineNumber][1] == mine[mineComparedTo][1] && mine[mineNumber][2] == mine[mineComparedTo][2]) { mine = generateRandomCoordinate(mineNumber, numberOfColumns, numberOfRows); } else if (mine[mineNumber][1] != mine[mineComparedTo][1] || mine[mineNumber][2] != mine[mineComparedTo][2]) { mineComparedTo++; } } } mineNumber++; } System.out.println("\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Position findWeedPosition() {\n int x = 0;\n int y = 0;\n int sum = 0;\n for (int i = 0; i < this.WORLD.getMapSize().getX(); i++) {\n for (int j = 0; j < this.WORLD.getMapSize().getY(); j++) {\n\n //hogweed\n Organism organism = this.WORLD...
[ "0.6534268", "0.64126676", "0.6276434", "0.6187646", "0.6155797", "0.6110677", "0.6100826", "0.60973895", "0.5835954", "0.5779573", "0.57494384", "0.5701199", "0.56930417", "0.5622639", "0.56175625", "0.56006175", "0.558486", "0.5568764", "0.55506253", "0.55114377", "0.549222...
0.55626374
18
Creates the initial minefield with mines marked with 9 and all other points as 0. The other numbers are to be added later.
public void setGrid(int[][] mine, int numberOfMines, int numberOfColumns, int numberOfRows) { int mineNumber = 1; point = new int[numberOfColumns + 1][numberOfRows + 1]; int rowNumber = 1; while (rowNumber <= numberOfRows) { int columnNumber = 1; while (columnNumber <= numberOfColumns) { if (mineNumber <= numberOfMines) { while (mineNumber <= numberOfMines) { if (columnNumber == mine[mineNumber][1] && rowNumber == mine[mineNumber][2]) { point[columnNumber][rowNumber] = 9; } mineNumber++; } mineNumber = 1; } else { point[columnNumber][rowNumber] = 0; } columnNumber++; } rowNumber++; } point = getPlotNumbers(point, numberOfMines, numberOfColumns, numberOfRows); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MineField(int numRows, int numCols, int numMines) {\n \n\t /*get the number of rows, columns and mines as given*/\n\t this.row = numRows;\n\t this.col = numCols;\n\t this.numMines = numMines;\n\t /*initiate the mineField with no mines*/\n\t mineField = blankField(numRows, numCols);\n\t\n }", ...
[ "0.69014466", "0.6822688", "0.66398305", "0.64733034", "0.63921493", "0.630482", "0.62700987", "0.6253548", "0.62463367", "0.6205535", "0.6164499", "0.6133378", "0.6092983", "0.6049328", "0.6027621", "0.593827", "0.59331405", "0.59273887", "0.59217906", "0.590991", "0.5888482...
0.5877497
21
At the location of each mine, add 1 to every point around the mine unless encountering another mine. The surrounding points differ based on if the mine is located on an edge, in a corner, or in the middle.
public int[][] getPlotNumbers(int[][] point, int numberOfMines, int numberOfColumns, int numberOfRows) { int mineNumber = 1; while (mineNumber <= numberOfMines) { int columnNumber = mine[mineNumber][1]; int rowNumber = mine[mineNumber][2]; if (columnNumber == 1 && rowNumber == 1) { // top left corner if (point[columnNumber + 1][rowNumber] != 9) { point[columnNumber + 1][rowNumber]++; } if (point[columnNumber + 1][rowNumber + 1] != 9) { point[columnNumber + 1][rowNumber + 1]++; } if (point[columnNumber][rowNumber + 1] != 9) { point[columnNumber][rowNumber + 1]++; } } else if (columnNumber == 1 && (rowNumber != 1 && rowNumber != numberOfRows)) { // left edge if (point[columnNumber][rowNumber - 1] != 9) { point[columnNumber][rowNumber - 1]++; } if (point[columnNumber + 1][rowNumber - 1] != 9) { point[columnNumber + 1][rowNumber - 1]++; } if (point[columnNumber + 1][rowNumber] != 9) { point[columnNumber + 1][rowNumber]++; } if (point[columnNumber + 1][rowNumber + 1] != 9) { point[columnNumber + 1][rowNumber + 1]++; } if (point[columnNumber][rowNumber + 1] != 9) { point[columnNumber][rowNumber + 1]++; } } else if (columnNumber == 1 && rowNumber == numberOfRows) { // bottom left corner if (point[columnNumber][rowNumber - 1] != 9) { point[columnNumber][rowNumber - 1]++; } if (point[columnNumber + 1][rowNumber - 1] != 9) { point[columnNumber + 1][rowNumber - 1]++; } if (point[columnNumber + 1][rowNumber] != 9) { point[columnNumber + 1][rowNumber]++; } } else if ((columnNumber != 1 && columnNumber != numberOfColumns) && rowNumber == 1) { // top edge if (point[columnNumber + 1][rowNumber] != 9) { point[columnNumber + 1][rowNumber]++; } if (point[columnNumber + 1][rowNumber + 1] != 9) { point[columnNumber + 1][rowNumber + 1]++; } if (point[columnNumber][rowNumber + 1] != 9) { point[columnNumber][rowNumber + 1]++; } if (point[columnNumber - 1][rowNumber + 1] != 9) { point[columnNumber - 1][rowNumber + 1]++; } if (point[columnNumber - 1][rowNumber] != 9) { point[columnNumber - 1][rowNumber]++; } } else if (columnNumber == numberOfColumns && rowNumber == 1) { // top right corner if (point[columnNumber - 1][rowNumber] != 9) { point[columnNumber - 1][rowNumber]++; } if (point[columnNumber - 1][rowNumber + 1] != 9) { point[columnNumber - 1][rowNumber + 1]++; } if (point[columnNumber][rowNumber + 1] != 9) { point[columnNumber][rowNumber + 1]++; } } else if (columnNumber == numberOfColumns && (rowNumber != 1 && rowNumber != numberOfRows)) { // right edge if (point[columnNumber][rowNumber - 1] != 9) { point[columnNumber][rowNumber - 1]++; } if (point[columnNumber - 1][rowNumber - 1] != 9) { point[columnNumber - 1][rowNumber - 1]++; } if (point[columnNumber - 1][rowNumber] != 9) { point[columnNumber - 1][rowNumber]++; } if (point[columnNumber - 1][rowNumber + 1] != 9) { point[columnNumber - 1][rowNumber + 1]++; } if (point[columnNumber][rowNumber + 1] != 9) { point[columnNumber][rowNumber + 1]++; } } else if (columnNumber == numberOfColumns && rowNumber == numberOfRows) { // bottom right corner if (point[columnNumber - 1][rowNumber] != 9) { point[columnNumber - 1][rowNumber]++; } if (point[columnNumber - 1][rowNumber - 1] != 9) { point[columnNumber - 1][rowNumber - 1]++; } if (point[columnNumber][rowNumber - 1] != 9) { point[columnNumber][rowNumber - 1]++; } } else if ((columnNumber != 1 && columnNumber != numberOfColumns) && rowNumber == numberOfRows) { // bottom edge if (point[columnNumber - 1][rowNumber] != 9) { point[columnNumber - 1][rowNumber]++; } if (point[columnNumber - 1][rowNumber - 1] != 9) { point[columnNumber - 1][rowNumber - 1]++; } if (point[columnNumber][rowNumber - 1] != 9) { point[columnNumber][rowNumber - 1]++; } if (point[columnNumber + 1][rowNumber - 1] != 9) { point[columnNumber + 1][rowNumber - 1]++; } if (point[columnNumber + 1][rowNumber] != 9) { point[columnNumber + 1][rowNumber]++; } } else if ((columnNumber != 1 && columnNumber != numberOfColumns) && (rowNumber != 1 && rowNumber != numberOfRows)) { // not on the edge or corner if (point[columnNumber - 1][rowNumber - 1] != 9) { point[columnNumber - 1][rowNumber - 1]++; } if (point[columnNumber][rowNumber - 1] != 9) { point[columnNumber][rowNumber - 1]++; } if (point[columnNumber + 1][rowNumber - 1] != 9) { point[columnNumber + 1][rowNumber - 1]++; } if (point[columnNumber + 1][rowNumber] != 9) { point[columnNumber + 1][rowNumber]++; } if (point[columnNumber + 1][rowNumber + 1] != 9) { point[columnNumber + 1][rowNumber + 1]++; } if (point[columnNumber][rowNumber + 1] != 9) { point[columnNumber][rowNumber + 1]++; } if (point[columnNumber - 1][rowNumber + 1] != 9) { point[columnNumber - 1][rowNumber + 1]++; } if (point[columnNumber - 1][rowNumber] != 9) { point[columnNumber - 1][rowNumber]++; } } mineNumber++; } return point; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addSurrounding(int location) {\n int mineColumn = location % boardWidth;\n int mineRow = location / boardWidth;\n\n boolean leftEdge = true;\n boolean rightEdge = true;\n boolean topEdge = true;\n boolean bottomEdge = true;\n\n if (mineColumn > 0) {\n ...
[ "0.66615385", "0.66459394", "0.66124606", "0.6280397", "0.6244509", "0.6148638", "0.61012065", "0.6078895", "0.5985189", "0.5923716", "0.5889735", "0.58637965", "0.5852332", "0.5822088", "0.5778359", "0.5769467", "0.5766541", "0.57276154", "0.5688019", "0.5687984", "0.5680588...
0.5658708
21
Prints the solution grid with "" marking the mines.
public void testGrid(int[][] point, int numberOfColumns, int numberOfRows) { int j = 1; while (j <= numberOfRows) { int i = 1; while (i <= numberOfColumns) { System.out.print(point[i][j] == 9 ? "* " : point[i][j] + " "); i++; } System.out.print("\n"); j++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printGrid(){\n\t\tfor(int i=0;i<getHeight();i++){\n\t\t\tfor(int j=0;j<getWidth();j++){\n\t\t\t\tif(grid[i][j]==null)\n\t\t\t\t\tSystem.out.print(\"- \");\n\t\t\t\telse if(getGrid(i,j).isPath())\n\t\t\t\t\tSystem.out.print(\"1 \");\n\t\t\t\telse if(getGrid(i,j).isScenery())\n\t\t\t\t\tSystem.out.print(...
[ "0.7354383", "0.71710616", "0.7151571", "0.7113675", "0.6970963", "0.69434005", "0.69357294", "0.68780965", "0.6865927", "0.6849124", "0.6845953", "0.67930293", "0.6779069", "0.6767505", "0.67353237", "0.67163175", "0.6680584", "0.6658547", "0.66495264", "0.65843946", "0.6546...
0.0
-1
Here you can do something when items are selected/deselected, such as update the title in the CAB
@Override public void onItemCheckedStateChanged(ActionMode mode, int position, long id, boolean checked) { if(checked) { mSelection.setNewSelection(position, checked); numItemsSelected++; } else { mSelection.removeSelection(position); numItemsSelected--; } mode.setTitle(numItemsSelected + " items selected"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void itemSelected(boolean selected);", "@Override\n\tpublic void itemStateChanged(ItemEvent e) {\n\t\tString res = jc.getSelectedItem().toString();\n\t\tjt.setText(res);\n\n\t}", "public void itemStateChanged(ItemEvent ie) {\n JCheckBox check = (JCheckBox)ie.getSource();\n cb_selection = check...
[ "0.7136181", "0.693266", "0.6927673", "0.6857444", "0.6801502", "0.6755029", "0.6744509", "0.67387855", "0.6720382", "0.6720382", "0.6700233", "0.6698625", "0.6694672", "0.6655062", "0.6655062", "0.66512275", "0.66471356", "0.66331434", "0.66303927", "0.66297084", "0.6628598"...
0.0
-1
Respond to clicks on the actions in the CAB
@Override public boolean onActionItemClicked(ActionMode mode, MenuItem item) { switch (item.getItemId()) { case R.id.action_delete: deleteSelected(mSelection); mSelection.clearSelection(); numItemsSelected=0; mode.finish(); // Action picked, so close the CAB return true; case R.id.action_rename: // TODO renameItem(); numItemsSelected=0; mode.finish(); // Action picked, so close the CAB return true; default: return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "public void act() \n {\n super.checkClick();\n active(isActive);\n }", "public void act() \n {\n checkClicked();\n }", "void onClick();", "@Override\n\tpublic void onClick() {\n\t\t\n\t}", "@Override\r\n\t\t\t\tpublic ...
[ "0.6877413", "0.6660156", "0.6578302", "0.65755045", "0.6571938", "0.65468174", "0.65468174", "0.6545602", "0.6500375", "0.649099", "0.6473951", "0.6473951", "0.642179", "0.63957524", "0.6388274", "0.63832384", "0.63832384", "0.63832384", "0.63832384", "0.63832384", "0.638323...
0.0
-1
Inflate the menu for the CAB
@Override public boolean onCreateActionMode(ActionMode mode, Menu menu) { MenuInflater inflater = mode.getMenuInflater(); inflater.inflate(R.menu.context_menu, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Menu createViewMenu();", "public abstract MenuInflater mo2159d();", "void createMenus(Container cp) {\r\n createMenu4Shape(cp);\r\n createMenu4Color(cp);\r\n createMenu4Filled(cp);\r\n createButtons(cp);\r\n }", "public void onFinishInflate() {\n super.onFinishInflate();\n b...
[ "0.66216594", "0.6550568", "0.6516972", "0.6426459", "0.63437855", "0.63125", "0.6237134", "0.620093", "0.61664784", "0.6142864", "0.6134979", "0.61261535", "0.61067617", "0.6105249", "0.6104831", "0.6095975", "0.6093483", "0.60634387", "0.6045347", "0.60256475", "0.6023289",...
0.0
-1
Here you can make any necessary updates to the activity when the CAB is removed. By default, selected items are deselected/unchecked.
@Override public void onDestroyActionMode(ActionMode mode) { mSelection.clearSelection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "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 }", "protected void onPreDe...
[ "0.7002742", "0.66871595", "0.6555556", "0.6462171", "0.64542973", "0.64030004", "0.6397086", "0.6327488", "0.6313486", "0.6210573", "0.62079567", "0.6199305", "0.6173133", "0.61573076", "0.614486", "0.61317635", "0.6127334", "0.6121139", "0.61122596", "0.6097181", "0.6097181...
0.0
-1
Here you can perform updates to the CAB due to an invalidate() request
@Override public boolean onPrepareActionMode(ActionMode mode, Menu menu) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void invalidate() {}", "@Override\r\n public void invalidate() {\r\n }", "public void invalidate() {\n\t\tthis.invalidated = true;\n\t}", "@Override\n\tpublic void invalidate() {\n\n\t}", "@Override\n\tpublic void invalidate() {\n\t\t\n\t}", "public void invalidate() {\n\t\t\n\t}", "public...
[ "0.65024185", "0.6465632", "0.6435808", "0.64216805", "0.63028646", "0.6243346", "0.6230971", "0.6145606", "0.6112225", "0.6048902", "0.6033985", "0.6033985", "0.60303175", "0.60187876", "0.58913916", "0.58624995", "0.58614165", "0.5845463", "0.58386517", "0.58373755", "0.577...
0.0
-1
Acesso ao Array Aluno
public boolean addAlunos(Aluno aluno) { return this.alunos.add(aluno); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Vuelo[] arribos(Vuelo [] vuelosArray) {\n Ciudad concordia = new Ciudad(\"CON\",\"Concordia\");\n\n Vuelo[] listado = new Vuelo[0];\n for (Vuelo vuelo: vuelosArray) {\n if (vuelo.getCiudaDestino().equals(concordia)) {\n listado = agregarVuelo(listado, vuelo);\n }\n }\n ...
[ "0.68884224", "0.6560407", "0.65557235", "0.6318644", "0.6309564", "0.62460166", "0.62446153", "0.62432355", "0.61710167", "0.61129475", "0.6100285", "0.60923254", "0.60886", "0.60749125", "0.6059547", "0.60574317", "0.6053671", "0.60299486", "0.60094225", "0.6007132", "0.595...
0.0
-1
constructor that will instiate all the inital variables
public Node(int row,int col,int value){ this.row = row; this.col = col; this.value = value; this.north = null; this.south = null; this.east =null; this.west = null; this.visited = false; dfs_stack = new Stack<String>(); exitPath = " "; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void initVars() {}", "public void init() {\r\n\r\n\t}", "public void init() {\n \n }", "@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}", "private void init() {\n\n\t}", "private void init() {\n }", "private void init() {\n }", "private void init() {\n }", "pr...
[ "0.7985205", "0.7802201", "0.77891135", "0.7776564", "0.7764402", "0.7758721", "0.7758721", "0.7758721", "0.7758721", "0.7732925", "0.7732925", "0.7732925", "0.7728698", "0.7722504", "0.7720264", "0.76910067", "0.76800823", "0.7669529", "0.76398677", "0.76398677", "0.75797474...
0.0
-1
This function is to input the grid ans utilize it for debugging
public void setGrid(int ingrid[][],int in_row_size,int in_col_size){ grid=ingrid; row_size = in_row_size; col_size = in_col_size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printGrid(){\n System.out.println(\"printing the grid\");\n for(int i=0;i<row_size;i++){\n for(int j = 0;j<col_size;j++){\n System.out.println(grid[i][j]);\n }\n }\n }", "private void displayGrid() {\r\n System.out.print(this.grid);\r\...
[ "0.70054483", "0.6980213", "0.69503766", "0.68882567", "0.68869406", "0.68656576", "0.68288106", "0.6795695", "0.67624223", "0.6717454", "0.67105997", "0.6700006", "0.6687487", "0.6683951", "0.6633395", "0.6601415", "0.6537025", "0.6492273", "0.6490505", "0.6485401", "0.64813...
0.6544398
16
just show the grid is complete and useful for initial debugging
public void printGrid(){ System.out.println("printing the grid"); for(int i=0;i<row_size;i++){ for(int j = 0;j<col_size;j++){ System.out.println(grid[i][j]); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void checkGridCompletion() {\n if (this.model.getPuzzle().isFilled()) {\n if (this.model.getPuzzle().isSolved()) {\n puzzleCompleted();\n }\n }\n }", "private void displayGrid() {\r\n System.out.print(this.grid);\r\n }", "void printGrid() {\n...
[ "0.7102669", "0.70201385", "0.6997348", "0.6781698", "0.6758237", "0.6571103", "0.6508698", "0.6298413", "0.62767774", "0.6270639", "0.6246557", "0.6245981", "0.6191636", "0.61874306", "0.6174695", "0.6136982", "0.61289537", "0.61140925", "0.6086421", "0.6063748", "0.6025694"...
0.6389813
7
pass in the initial adjacency list and continue to build it in the class
public void setList(Node in_adjacentcyList[]){ adjacentcyList = in_adjacentcyList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private List<Vertex> prepareGraphAdjacencyList() {\n\n\t\tList<Vertex> graph = new ArrayList<Vertex>();\n\t\tVertex vertexA = new Vertex(\"A\");\n\t\tVertex vertexB = new Vertex(\"B\");\n\t\tVertex vertexC = new Vertex(\"C\");\n\t\tVertex vertexD = new Vertex(\"D\");\n\t\tVertex vertexE = new Vertex(\"E\");\n\t\tV...
[ "0.6590779", "0.652405", "0.6471115", "0.63714206", "0.63435537", "0.63353604", "0.6245071", "0.6216876", "0.61234945", "0.6118706", "0.60088027", "0.59789723", "0.5951891", "0.58912146", "0.5884565", "0.58684486", "0.5832779", "0.57991624", "0.5797636", "0.5794822", "0.57837...
0.55616915
45
ability to print the adjacency list for debugging
public void printList(){ System.out.println("Printing the list"); for(int i = 0; i<adjacentcyList.length;i++){ System.out.println(adjacentcyList[i].value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printAdjacencyMatrix();", "public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }", "public static void printAdjacencyList(ArrayLi...
[ "0.811474", "0.80930966", "0.7635395", "0.75311345", "0.74169093", "0.7315872", "0.70848835", "0.7063354", "0.7047757", "0.7028909", "0.70183283", "0.7006363", "0.699013", "0.6976521", "0.69518775", "0.69191927", "0.6906271", "0.6904984", "0.68906105", "0.6802406", "0.6798862...
0.6637249
26
calculate all the neighbors of each individual node in the adjacency list
public void getNeighbors(){ // North if(this.row - this.value>=0){ this.north = adjacentcyList[((this.row - this.value)*col_size)+col]; } // South if(this.row + value<row_size){ this.south = adjacentcyList[((this.row+this.value)*row_size)+col]; } // East if(this.col + this.value<col_size){ this.east = adjacentcyList[((this.col+this.value)+(this.row)*(col_size))]; } // West if(this.col - this.value>=0){ this.west = adjacentcyList[((this.row*col_size)+(this.col - this.value))]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract List<AStarNode> getNeighbours();", "public List neighbors(int vertex) {\n// your code here\n LinkedList<Integer> result = new LinkedList<>();\n LinkedList<Edge> list = adjLists[vertex];\n for (Edge a : list) {\n result.add(a.to());\n }\n//List<Integer> list ...
[ "0.7476039", "0.733819", "0.723688", "0.7186222", "0.7097143", "0.702806", "0.70013624", "0.69933105", "0.6970513", "0.69667244", "0.69372267", "0.68042845", "0.6762613", "0.67417973", "0.6653006", "0.6652526", "0.6614905", "0.6601131", "0.6590252", "0.65696603", "0.65175897"...
0.6016485
85
print the complete adjacency list
public void printNeighbors(){ if(this.north == null){ System.out.print("North->Null | "); } else{ System.out.print("North->"+this.north.value+" | "); } if(this.south == null){ System.out.print("South->Null | "); } else{ System.out.print("South->"+this.south.value+" | "); } if(this.east == null){ System.out.print("East->Null | "); } else{ System.out.print("East->"+this.east.value+" | "); } if(this.west == null){ System.out.print("West->Null | "); } else{ System.out.print("West->"+this.west.value+" | "); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printAdjacencyList() {\n \n for ( int i=0; i<vertex_adjacency_list.size(); i++ ) {\n \n vertex_adjacency_list.get( i ).printVertex();\n \n }\n \n }", "public void printAdjacencyMatrix();", "public void print() {\n\t\tfor (int count = 0...
[ "0.8485245", "0.81990176", "0.8027225", "0.7966273", "0.7580348", "0.74171954", "0.73608667", "0.7360425", "0.72806925", "0.72653544", "0.7199604", "0.7185462", "0.7097718", "0.70784426", "0.70763236", "0.7075873", "0.7048181", "0.70056725", "0.6997302", "0.6986021", "0.69495...
0.0
-1
traverse the maze using depth first search and print the exit path
public void depthFirstSearch(Node vertex){ vertex.visited = true; if(vertex.row == row_size-1 && vertex.col == col_size-1){ while(!dfs_stack.isEmpty()){ exitPath +=dfs_stack.peek(); dfs_stack.pop(); } } if(vertex.north!=null && vertex.north.visited==false){ dfs_stack.push("N"); vertex.depthFirstSearch(vertex.north); } if(vertex.south!=null && vertex.south.visited==false){ dfs_stack.push("S"); vertex.depthFirstSearch(vertex.south); } if(vertex.west !=null && vertex.west.visited ==false){ dfs_stack.push("W"); vertex.depthFirstSearch(vertex.west); } if(vertex.east !=null && vertex.east.visited==false){ dfs_stack.push("E"); vertex.depthFirstSearch(vertex.east); } if (!dfs_stack.isEmpty()){ dfs_stack.pop(); } return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String findPath(Maze maze) {\n \tint m = maze.getNumRows();\n \tint n = maze.getNumCols();\n\n \t//define a visited matrix\n \tboolean[][] visited = new boolean[m][n];\n \tsetvisited(false, visited);\n\n \t//define a direction matrix\n \tint[][] dir_mtr = new int[m][n];\n \tin...
[ "0.78008723", "0.7155282", "0.7103596", "0.66598934", "0.6525007", "0.6277543", "0.61429447", "0.60640574", "0.60269856", "0.5978703", "0.59395987", "0.5935227", "0.5926324", "0.59152293", "0.5899471", "0.58962494", "0.58771926", "0.58432", "0.58429605", "0.5836906", "0.58367...
0.675961
3
assign TCP/IP service number to a LAN client
static int lanPort(String xxx) { return 20000 + Integer.parseInt(xxx); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void gestionSocket(){\n Socket sock = null;\n try{\n sock = new Socket(adresse, 18000);\n }\n catch(IOException ioe){\n System.out.println(\"Erreur lors de la connexion : \" + ioe.getMessage());\n }\n \n envoieInt(sock, 3);\n }", "...
[ "0.6180841", "0.61691076", "0.6147428", "0.61109126", "0.6098285", "0.6072943", "0.6072943", "0.6067331", "0.6037766", "0.5920957", "0.5868494", "0.5824676", "0.5810948", "0.579266", "0.579266", "0.5792132", "0.57828957", "0.57822925", "0.57822925", "0.57723355", "0.57627386"...
0.54491603
94
get file object in all environments (NT / Linux / CE)
static File localFile(String path, String name) { File f = new File(path, name.replace('*', 'X')); return new File(f.getAbsolutePath()); /* make EVM use user.dir */ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FileObject getFile();", "FileObject getFile();", "public File getFile()\r\n \t{\r\n \t\tFile result = null;\r\n \t\t\r\n \t\tString hostName = getAuthority();\r\n \t\t\r\n \t\tif((hostName == null) || hostName.equals(\"\") || hostName.equalsIgnoreCase(\"localhost\"))\r\n \t\t{\r\n \t\t\tString filePath = getPa...
[ "0.70189196", "0.70189196", "0.6814738", "0.675038", "0.675038", "0.6566485", "0.6566485", "0.6560651", "0.64796424", "0.645863", "0.6407233", "0.6395581", "0.63891923", "0.63822466", "0.63471586", "0.63462806", "0.63462806", "0.6263476", "0.62332684", "0.6225139", "0.6225139...
0.5911777
33
adapt path to local environment (adjust separator characters)
static String localPath(String name) { char c = File.separatorChar; return name.replace((char) (c ^ '/' ^ '\\'), c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String localizePath(String path)\r\n {\r\n StringBuilder result = new StringBuilder();\r\n char nextChar;\r\n for(int i = 0; i < path.length(); i++)\r\n {\r\n nextChar = path.charAt(i);\r\n if((nextChar == '/') || (nextChar == '\\\\'))\r\n {\r\n ...
[ "0.70387304", "0.6712605", "0.63148665", "0.62593216", "0.62161934", "0.5919639", "0.58485806", "0.5802559", "0.5782028", "0.5741143", "0.570265", "0.5619278", "0.5591686", "0.5572572", "0.5565132", "0.55292577", "0.54921067", "0.54737556", "0.5472693", "0.54454875", "0.54383...
0.72728926
0
move file in local file system (delete target, rename source)
static boolean localMove(File source, File target) { if (target.exists()) if (!target.delete()) { logConsole(0, target.getPath() + " delete failed", null); return false; } if (source != null) if (!source.renameTo(target)) { logConsole(0, target.getPath() + " rename failed", null); return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void moveFile(File source, File destination) throws Exception {\n\tif (destination.exists()) {\n\t destination.delete();\n\t}\n\tsource.renameTo(destination);\n }", "void moveFile(String sourceName, String destinationName, boolean overwrite) throws IOException;", "void moveFile(String pathT...
[ "0.7596562", "0.7487556", "0.7319292", "0.71797943", "0.7157005", "0.7025254", "0.6866389", "0.6801173", "0.6744932", "0.66617596", "0.66191244", "0.65597546", "0.6551215", "0.6499326", "0.64130753", "0.6403899", "0.6360452", "0.62974256", "0.6270483", "0.6244465", "0.6234148...
0.7600694
0
character to byte conversion using system property "file.encoding" (default char encoding in java.lang.String is platform dependent: windows = ANSI character codes, linux = platform default ISO8859_x)
static byte[] oemBytes(String s) { try { return s.getBytes(oem); } catch (IOException e) { return s.getBytes(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public byte[] charToByte(String text, String encoding);", "public byte[] charToByte(char char1, String encoding);", "public String byteToChar(byte b[], String encoding);", "Charset getEncoding();", "public void convertToUTF8() {\n FileInputStream istream = null;\n Writer out = null;\n ...
[ "0.7312777", "0.70012504", "0.62393314", "0.59974444", "0.5940958", "0.591", "0.5872091", "0.58703476", "0.58561015", "0.5847785", "0.5847785", "0.5847785", "0.58384675", "0.5805721", "0.57433873", "0.5725466", "0.5665553", "0.5655458", "0.5654799", "0.55963033", "0.55963033"...
0.0
-1
get frame size from environment
static Dimension frameSize(String env) { String s = System.getProperty(env, "0"); int x = s.indexOf('x'), high = 600; if (x >= 0) { high = Integer.parseInt(s.substring(x + 1)); s = s.substring(0, x); } return new Dimension(Integer.parseInt(s), high); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getFrameSize();", "public int getFrameByteCount() {\n return mMetaData[0] * mMetaData[1] * 4;\n }", "public int getFrameLength() {\n return frameLength;\n }", "int getCurrentSize();", "int getWindowSize();", "public double getFrameWidth() { return isRSS()? getFrame().width...
[ "0.7252401", "0.6638963", "0.66149014", "0.6539849", "0.64557666", "0.64518374", "0.64033884", "0.6305237", "0.6286619", "0.625323", "0.6233376", "0.6230617", "0.6191401", "0.61910915", "0.61720496", "0.6169663", "0.6152047", "0.6151343", "0.6141504", "0.6112998", "0.6105985"...
0.81087244
0
get monospaced font from awt
static Font getFont(int style, int size) { return new Font("Monospaced", style, size); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getFontName();", "public String getFontName();", "public String getFontName();", "Font createFont();", "public static Font getFont() {\n return getFont(12);\n }", "FONT createFONT();", "abstract Font getFont();", "@Override\n public String getFont() {\n return graphi...
[ "0.7123377", "0.7123377", "0.7123377", "0.70279515", "0.6771171", "0.66977835", "0.66359", "0.6622801", "0.6587293", "0.6497079", "0.64840883", "0.6453516", "0.64112675", "0.6402502", "0.63945025", "0.6383792", "0.6371606", "0.63558716", "0.6340646", "0.63379365", "0.6321233"...
0.64655626
11
log (implemented as output to stdout and supposedly redirected) using platform specific character encoding: windows = OEM codepage according to file.encoding linux = platform default character set ISO8859_x
static boolean logConsole(int type, String info, String data) { logger.info("" + info + data); if (type > 0) /* errorInfo always active */ { if ((type & logMasking) == 0) return false; } if (info != null) System.out.println(new Date() + " " + info); if (data != null) System.out.println(data); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void suggestsUtF8CharsetWhenUsingPlatformDefaultCharset(OutputStream os) {\n OutputStreamWriter outputStreamWriter = new OutputStreamWriter(os, StandardCharsets.UTF_8);\n }", "public void testSetEncoding_Normal() throws Exception {\n ByteArrayOutputStream aos = new ByteArrayOutputStream(...
[ "0.612923", "0.5949603", "0.5889406", "0.588333", "0.586409", "0.5602881", "0.5584286", "0.54937077", "0.5292758", "0.52099776", "0.51625377", "0.5132724", "0.5126142", "0.5093454", "0.5089602", "0.5071295", "0.5047964", "0.5035913", "0.5033112", "0.5031665", "0.50087243", ...
0.0
-1
static assigned here takes the value as 1,2,...
static void doCount(){ StaticDemo st=new StaticDemo(); st.count++; System.out.println("Count is:"+st.count); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static void m1(int a){\n\t\ta=Static11.a;\nSystem.out.println(a);\n\t}", "StaticVariable(){\n count++;//incrementing the value of static variable\n System.out.println(count);\n }", "public Constant (int value){\r\n this.value = value;\r\n\r\n }", "public static void main(String[] a...
[ "0.68419427", "0.6319195", "0.6028607", "0.59274775", "0.58936566", "0.5835639", "0.5828967", "0.57949656", "0.57607734", "0.57265407", "0.57147527", "0.56195545", "0.55819726", "0.55496746", "0.5519925", "0.545982", "0.54491574", "0.54416", "0.54316753", "0.542971", "0.54297...
0.57050765
11
observation + backtracking solution. We use backtracking to enumerate all patterns and use observation to avoid same backtracking skips record the cross information. For example skips[1][3] = 2 means 1 3 cross 2
public int numberOfPatterns(int m, int n) { int[][] skips = new int[10][10]; skips[1][3] = skips[3][1] = 2; skips[7][9] = skips[9][7] = 8; skips[1][7] = skips[7][1] = 4; skips[3][9] = skips[9][3] = 6; skips[1][9] = skips[9][1] = skips[3][7] = skips[7][3] = skips[2][8] = skips[8][2] = skips[4][6] = skips[6][4] = 5; //since we only have 1 - 9 buttons, we use a boolean array to record visited information boolean[] visited = new boolean[10]; int result = 0; for(int i = m; i <= n; i++){ //test 1, 3, 7, 9 visited[3] = true; result += DFS(i - 1, 3, skips, visited) * 4; visited[3] = false; //test 2, 4, 6, 8 visited[2] = true; result += DFS(i - 1, 2, skips, visited) * 4; visited[2] = false; //test 5 visited[5] = true; result += DFS(i - 1, 5, skips, visited); visited[5] = false; } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean solveBacktrack(int[][] emptyCells, int ind) {\n\n if (ind == emptyCells.length)\n return true;\n\n for (int trial = 1; trial <= sb.size; trial++) {\n if (isTrialValid(emptyCells[ind], trial)) {\n\n // If \"trial\" doesn't break any rule, insert it ...
[ "0.56113124", "0.56112695", "0.5256003", "0.51256055", "0.512305", "0.5094173", "0.50768626", "0.5061165", "0.50474906", "0.5037185", "0.5013424", "0.5013235", "0.5008142", "0.5005325", "0.49883175", "0.49806315", "0.4954642", "0.495033", "0.49234843", "0.4919176", "0.4916341...
0.0
-1
found one pattern return 1
public int DFS(int count, int curr, int[][] skips, boolean[] visited){ if(count == 0) return 1; int sum = 0; for(int i = 1; i <= 9; i++){ //check all buttons that are either directly connected or have some cross buttons in middle if( !visited[i] && (skips[curr][i] == 0 || visited[ skips[curr][i] ]) ){ //found a valid next button visited[i] = true; sum += DFS(count - 1, i, skips, visited); visited[i] = false; } } return sum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int firstMatch(char[] array, char[] pattern){\n for(int a = 0; a <= array.length-pattern.length; a++) {\n for (int p = 0; p < pattern.length; p++) {\n if (array[a+p] != pattern[p]) break;\n if (p == pattern.length-1) return a;\n }\n }\n retur...
[ "0.661233", "0.6134496", "0.60479045", "0.6035229", "0.59666586", "0.5953641", "0.59534305", "0.59342384", "0.5898524", "0.584541", "0.58257836", "0.5799817", "0.5770918", "0.5759469", "0.57589203", "0.57589203", "0.57518256", "0.5750631", "0.5740805", "0.57299656", "0.572623...
0.0
-1
basicAttack & specialAttack are two actions possible for each character : they have the target Character in parameter. damaged() allow to decrease life of the character, depend to the damages isDead allow to know if the life's character equals 0 getBasicDamage & getSpecialDamage return the exact damages done
void basicAttack(Character attacked);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic String attack(int damage) {\n\t\treturn damage +\"로 공격 합니다.\";\r\n\t}", "public String attack(String input, boolean playerAttack) {\n\n String result = \" You didn't die\";\n\n int damage = 0;\n\n if (input.toCharArray().length == 1 && playerAttack) {\n\n sw...
[ "0.68876743", "0.6794615", "0.6756152", "0.6664563", "0.6639014", "0.6625675", "0.65910167", "0.64566255", "0.64532596", "0.6446362", "0.6390763", "0.63791007", "0.63767946", "0.6360406", "0.63372755", "0.6327197", "0.63001966", "0.62939507", "0.6293479", "0.6285981", "0.6263...
0.7153652
0
Creates and empty deck.
public Deck() { this.deck = new LinkedList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void fillDeck()\n\t{\n\t\t\n\t\tfor ( byte decks = 0 ; decks < howManyDecks ; decks++ )\n\t\t\tfor ( byte suit = 0 ; suit < 4 ; suit++ )\n\t\t\t\tfor ( byte value = 1 ; value < 14 ; value++ ) \n\t\t\t\t\tdeck.add ( new Card (value , suit , true) );\n\t}", "public void generateDeck() {\n\t\tList<String> valueList...
[ "0.7398095", "0.7367935", "0.7355257", "0.7334907", "0.73181194", "0.7317471", "0.731496", "0.7268787", "0.72550714", "0.7254617", "0.71498746", "0.7149399", "0.7119362", "0.7097507", "0.7082405", "0.70761317", "0.70656157", "0.7064683", "0.7061594", "0.70401174", "0.703368",...
0.6678701
45
Defines the kind of card that can be added on top of this deck.
abstract boolean allowedToAdd(Card card);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCardKind() {\r\n return cardKind;\r\n }", "public int getCardType() {\n\t\t\treturn cardType;\n\t\t}", "public String getCardType() {\n return cardType;\n }", "public CardStack(char type){\n\t\tthis.type = type;\n\t}", "public Byte getCardType() {\r\n return card...
[ "0.6688222", "0.62464166", "0.6204687", "0.618849", "0.61828834", "0.60891306", "0.59822065", "0.5955853", "0.5935606", "0.592396", "0.59226483", "0.5886546", "0.5858161", "0.5833384", "0.57666504", "0.5765045", "0.5738376", "0.5733728", "0.5732441", "0.5702486", "0.5689924",...
0.56036264
23
Adds a card on top the deck.
public void addCard(Card card) { this.deck.push(card); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addToTop(Card card) {\n downStack.add(0, card);\n }", "public void addCard(Card card){\n\t\tthis.pile.add(0, card);\n\t}", "private void addCardToDeck(Card card) {\n\t\tdeck.add(card);\n\t}", "public void add(Card card) {\n this.cards.add(card);\n }", "public void addCard(Card car...
[ "0.80808955", "0.790292", "0.7758864", "0.7734864", "0.7678077", "0.7646269", "0.7639036", "0.76286024", "0.76081336", "0.7601209", "0.7585013", "0.7566887", "0.7490065", "0.74852693", "0.74733484", "0.74698025", "0.74609035", "0.74415135", "0.7424737", "0.7424489", "0.738658...
0.80392176
1
Return the top card without removing it.
public Card topCard() { return this.deck.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card getTopCard(){\n\t\treturn getCard(4);\n\t\t\n\t}", "public Card getTopCard() {\n\t\treturn topCard;\n\t}", "public Card getTopCard() {\r\n\t\tthis.sort();\r\n\t\treturn this.getCard(2); //Center card will always be part of quad after sorting, so has to be highest card\r\n\t}", "public Card getTop...
[ "0.8766203", "0.8393005", "0.83407927", "0.83031195", "0.8288216", "0.8229357", "0.8194593", "0.8160766", "0.81455153", "0.8065212", "0.8053737", "0.7993987", "0.79333943", "0.7919259", "0.78077775", "0.7701058", "0.76350677", "0.75573003", "0.74710697", "0.7388922", "0.73699...
0.8320421
3
Removes the top card and returns it.
public Card takeCard() { return this.deck.pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Card removeTopCard(){\n\t\treturn this.pile.remove(0);\n\t}", "public Card pop(){\r\n Card temp = cards.get(0);\r\n cards.remove(0);\r\n deckSize--;\r\n return temp;\r\n }", "public Card getTopCard()\r\n {\r\n Card tmp;\r\n\r\n if ( valid <= 0)\r\n ...
[ "0.8622905", "0.7584174", "0.745956", "0.7429465", "0.73997647", "0.73930126", "0.7336753", "0.7327205", "0.73136324", "0.73079664", "0.72865444", "0.72390723", "0.72156674", "0.71998966", "0.71823597", "0.71479577", "0.7142096", "0.7132854", "0.71206546", "0.7093515", "0.707...
0.75009906
2
Returns the number of card in the deck.
public int size() { return this.deck.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int CardsOnDeck()\n\t{\n\t\treturn cardNumber;\n\t}", "public int getNumberOfCards()\n\t{\n\t\treturn numCards;\n\t}", "public int getCardCount() {\n\t\treturn this.cardsInhand.size();\n\t}", "public int getNumberOfCards() {\r\n\t\treturn numberOfCards;\r\n\t}", "public int getNumCards()\r\n {\r\n...
[ "0.8147587", "0.79687697", "0.7920702", "0.7775205", "0.77740276", "0.7773127", "0.7725737", "0.7710868", "0.7540302", "0.7454781", "0.7454425", "0.73672646", "0.72924805", "0.7277426", "0.7234689", "0.7234148", "0.72324955", "0.7200609", "0.7174179", "0.7154183", "0.715347",...
0.67832553
32
Return the image of top card in the deck, or transparent image if the is empty.
public Image deckImage() { if (this.size() == 0) { return getImageFromStream("graphics/empty_deck.png"); } return getImageFromStream(this.topCard().getImageSource()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ImageIcon getTopCardImage() {\r\n return new ImageIcon(validColor + \"_\" + validValue + \".png\");\r\n }", "private Image getBackImage() {\n return getImage(\"playing-cards/blue-back.png\");\n }", "public static Drawable GetCardBackSideImage()\r\n\t{\r\n\t\tDrawable image = null;\r\...
[ "0.7693059", "0.6705937", "0.663277", "0.65991944", "0.6546787", "0.6522946", "0.65131664", "0.64794225", "0.6452031", "0.6433682", "0.6433561", "0.63426566", "0.6320279", "0.6294931", "0.6290251", "0.6270074", "0.62559754", "0.62384903", "0.6208504", "0.61423457", "0.6124106...
0.7972245
0
get all commandes bdd
@Override public List<Commande> getAll() { try { ps = this.connection.prepareStatement("SELECT * FROM commandes"); rs = ps.executeQuery(); List<Commande> listeCommandesBDD = new ArrayList<>(); Commande commande = null; while (rs.next()) { commande = new Commande(rs.getInt(1), rs.getDate(2), rs.getInt(3)); listeCommandesBDD.add(commande); } // end while return listeCommandesBDD; } catch (SQLException e) { System.out.println("...(CommandeDAOImpl) erreur de l'execution de getAll()..."); e.printStackTrace(); } finally { try { rs.close(); ps.close(); } catch (SQLException e) { e.printStackTrace(); } } // end finally return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getBcclist();", "public List<Consultor> getConsultores()\n\t{\n\t\tList<Consultor> nombres = new ArrayList<Consultor>();\n\t\tLinkedList<Consultor> tb = Consultor.findAll();\n\t\tfor(Consultor c : tb)\n\t\t{\n\t\t\tnombres.add(c);\n\t\t}\n\t\treturn nombres;\t\n\t}", "private void getRecepcionBHCs(){\n...
[ "0.6696371", "0.65119267", "0.6373858", "0.6345088", "0.62045664", "0.61334485", "0.6075672", "0.6053351", "0.6041783", "0.6017238", "0.5995326", "0.59869087", "0.5982487", "0.5947341", "0.5908283", "0.59049886", "0.5890783", "0.5871148", "0.58627135", "0.58514506", "0.582862...
0.67725694
0
end getById ajouter commande bdd
@Override public boolean add(Commande pCommande) { try { ps = this.connection.prepareStatement("INSERT INTO commandes (date_commande, client_id) VALUES (?,?)"); ps.setDate(1, pCommande.getDateCommande()); ps.setInt(2, pCommande.getClientID()); int verif = ps.executeUpdate(); return (verif == 1); } catch (SQLException e) { System.out.println("...(CommandeDAOImpl) erreur de l'execution de add()..."); e.printStackTrace(); } finally { try { ps.close(); } catch (SQLException e) { e.printStackTrace(); } } // end finally return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/{id}\")\n\tpublic String getById(@PathVariable int id) {\n\t\tSystem.out.println(\"recuperer la commande avec l'id= \" +id);\n\t\tOptional<Commande> optional = commandeRepository.findById(id);\n\t\tif (optional.isPresent()) {\n\t\t\tSystem.out.println(\"Commande= \" +optional.get());\n\t\t} else {\n...
[ "0.7094849", "0.7068795", "0.7028759", "0.702725", "0.7023791", "0.7010944", "0.6953095", "0.6947455", "0.6940853", "0.687611", "0.6807675", "0.6804404", "0.6770118", "0.6764455", "0.67581147", "0.6699926", "0.66824394", "0.6656454", "0.6650281", "0.66307247", "0.6623834", ...
0.0
-1
end add() modifier commande bdd
@Override public boolean update(Commande pCommande) { try { ps = this.connection .prepareStatement("UPDATE commandes SET date_commande=?, client_id=? WHERE id_commande=?"); ps.setDate(1, pCommande.getDateCommande()); ps.setInt(2, pCommande.getClientID()); ps.setInt(3, pCommande.getIdCommande()); int verif = ps.executeUpdate(); return (verif == 1); } catch (SQLException e) { System.out.println("...(CommandeDAOImpl) erreur de l'execution de update()..."); e.printStackTrace(); } finally { try { ps.close(); } catch (SQLException e) { e.printStackTrace(); } } // end finally return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void add() {\n\n\t}", "public void add() {\n\t\t\n\t}", "public void add() {\n }", "public void add() {\n\n }", "@Override\n\tpublic void add() {\n\t\t\n\t}", "public void add();", "public void add() {\n\t\tSystem.out.println(\"I am from Add method\");\n\t}", "private Add() {}", "priv...
[ "0.7356779", "0.711606", "0.686982", "0.68512124", "0.68261385", "0.67308706", "0.661274", "0.6563493", "0.6563493", "0.6518654", "0.6507521", "0.64935094", "0.641354", "0.641354", "0.641354", "0.6410148", "0.6309194", "0.62188363", "0.61610746", "0.60947186", "0.6030545", ...
0.0
-1
Example 2: jdbc authentication
@Bean public AuthenticationManager authenticationManagerBean(HttpSecurity http) throws Exception { AuthenticationManagerBuilder auth = http.getSharedObject(AuthenticationManagerBuilder.class); auth.jdbcAuthentication().usersByUsernameQuery(this.usersQuery).authoritiesByUsernameQuery(this.rolesQuery) .dataSource(this.dataSource) .passwordEncoder(PasswordEncoderFactories.createDelegatingPasswordEncoder()); return auth.build(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Connection getConnection(String user, String password) throws SQLException;", "public Login() throws SQLException, ClassNotFoundException {\n DriverManager.registerDriver(new com.mysql.jdbc.Driver());\n Class.forName(\"com.mysql.jdbc.Driver\");\n conn = DriverManager.getConne...
[ "0.67799586", "0.66583526", "0.6587654", "0.65868205", "0.6523873", "0.64692163", "0.6447432", "0.64457566", "0.63545233", "0.635055", "0.630861", "0.6307147", "0.6301213", "0.62839097", "0.62814873", "0.626521", "0.6248204", "0.623021", "0.622384", "0.6205196", "0.6140617", ...
0.0
-1
Tells a datasource to get more data, process it into a unified stream of STTPoints and return it
public abstract ArrayList<STTPoint> getWrappedData();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DataStreamApi getDataStreamApi();", "Stream<DataPoint> getHistoryData(Symbol symbol, LocalDateTime startTime, LocalDateTime endTime, int numberOfPoints);", "@Override\n public void emitTuples() {\n\n Statement query = queryToRetrieveData();\n logger.debug(String.format(\"select statement: %s\", query.to...
[ "0.5813121", "0.53100115", "0.5215922", "0.5201357", "0.51715773", "0.5161365", "0.50971717", "0.5093866", "0.5088453", "0.5003794", "0.49839842", "0.4951578", "0.49278793", "0.4925156", "0.4916172", "0.49152073", "0.4912642", "0.49074203", "0.49001876", "0.48821265", "0.4875...
0.47802174
34
TODO Autogenerated method stub
@Override public void mouseClicked(MouseEvent arg0) { }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void mouseEntered(MouseEvent arg0) { }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void mouseExited(MouseEvent arg0) { }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void mouseReleased(MouseEvent arg0) { }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void mouseMoved(MouseEvent arg0) { }
{ "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 getExr...
[ "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.608016...
0.0
-1
Each validator should call this method to add its ValidationState into the validation manager.
public final void addValidationState(ValidationState vs) { fVSs.add(vs); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addValidator(IValidator validator);", "public void validate() throws ValidationException {\r\n/* 522 */ Validator validator = new Validator();\r\n/* 523 */ validator.validate(this);\r\n/* */ }", "public void validate() {\n\t\tthis.invalidated = false;\n\t}", "@Override\r\n public void a...
[ "0.6376002", "0.6113516", "0.61068135", "0.6029002", "0.6003911", "0.5975853", "0.59280527", "0.5884378", "0.5849283", "0.5842672", "0.5835695", "0.5831395", "0.5814659", "0.5783854", "0.573436", "0.57285297", "0.5723842", "0.57211673", "0.5717029", "0.57152116", "0.57151675"...
0.70410395
0
Set the information required to validate entity values.
public final void setEntityState(EntityState state) { for (int i = fVSs.size()-1; i >= 0; i--) { ((ValidationState)fVSs.get(i)).setEntityState(state); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void validateEntity() {\n super.validateEntity();\n }", "protected void validateEntity()\n {\n super.validateEntity();\n \n Date startDate = getStartDate();\n Date endDate = getEndDate();\n \n validateStartDate(startDate);\n validateEndDate(endDate);\n\n // We validat...
[ "0.6675313", "0.64877033", "0.6129787", "0.61146766", "0.60037476", "0.5974623", "0.58630747", "0.5815315", "0.5775196", "0.5716999", "0.57069767", "0.56594545", "0.5610146", "0.5610146", "0.5610146", "0.5581731", "0.5581731", "0.5581731", "0.55678713", "0.5548607", "0.553686...
0.0
-1
/ access modifiers changed from: protected
public int getStaticCharsCount() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ access modifiers changed from: private
public /* synthetic */ void lambda$new$0(ValueAnimator valueAnimator) { float animatedFraction = valueAnimator.getAnimatedFraction(); TextView textView = this.currentView; CubicBezierInterpolator cubicBezierInterpolator = CubicBezierInterpolator.DEFAULT; textView.setAlpha(cubicBezierInterpolator.getInterpolation(animatedFraction)); this.nextView.setAlpha(cubicBezierInterpolator.getInterpolation(1.0f - animatedFraction)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "@Override\n protected void prot() {\n }", "private Rekenhulp()\n\t{\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void func_104...
[ "0.7044492", "0.66476846", "0.6633218", "0.6534506", "0.653226", "0.6375119", "0.6367836", "0.63059497", "0.62446606", "0.6226185", "0.6204622", "0.61772674", "0.61419636", "0.61311585", "0.61311585", "0.6127362", "0.6108939", "0.6108441", "0.60789734", "0.60623217", "0.60584...
0.0
-1
/ access modifiers changed from: protected
public void onTextViewCreated(TextView textView) { textView.setSingleLine(true); textView.setMaxLines(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
check if blockshape is available (independent of color)
private boolean isBlockAvailable(BlockShape shape) { boolean result = false; for (BlockColor color : map_color_to_id.keySet()) { if (objBlockFactory.IsBlocktypeAvailable(shape, color)){ result = true; break; } } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasBlockInfo();", "boolean hasBlockInfo();", "boolean isSolid();", "protected abstract boolean isShapeSimple();", "boolean hasBlockNumber();", "boolean hasBlockNumber();", "protected boolean isShapeFilled(Plot plot, int series, int item, double x, double y) {\n return false;\n }", "@O...
[ "0.6470939", "0.6470939", "0.6203513", "0.609432", "0.60724366", "0.60724366", "0.59732306", "0.5942484", "0.5912213", "0.5912213", "0.5890978", "0.5840888", "0.5820254", "0.5818092", "0.5802821", "0.578501", "0.5777396", "0.57771343", "0.5764327", "0.57334685", "0.5720462", ...
0.816435
0
Send Order Button Text Play Sound have Fun
public void goSendOrderButton(View view) { //is called by onClick function of Button in activity_main.xml if(WifiAvaible()) { try { fab.getProtocol().sendOrder(surface.getSeedbox().toString()); OrderStatus.setText("Waiting for \n"+"confirmation."); } catch (Exception e) { //ErrorWindow } SendButton.setEnabled(false); } /* if(ClickCnt == 0) { mp.start(); ClickCnt = 1; } else { ClickCnt = 0; mp.stop(); try { mp.prepare(); } catch (java.lang.Exception e) { // Do nothing } mp.seekTo(0); }*/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void soundPressed() {\n // display\n TextLCD.print(SOUND);\n // sound\n Sound.beep();\n }", "public void playBeep() {\n // Cách 1: Sử dụng audio có sẵn của android\n// ToneGenerator toneGenerator = new ToneGenerator(AudioManager.STREAM_NOTIFICATION, 500);\n// ...
[ "0.73149323", "0.7079647", "0.68667907", "0.67858624", "0.67743856", "0.67469263", "0.67180735", "0.6693003", "0.6689539", "0.6587136", "0.657963", "0.65570426", "0.65508866", "0.6546789", "0.65459377", "0.65286994", "0.6495168", "0.64578485", "0.645182", "0.64485973", "0.641...
0.6417905
20
function for brick choosing. Determines chosen brick by id of respective brick image button in activity_placement_mode.xml
public void chooseBrick(View v) { // do nothing if block is not available if (isBlockAvailable(map_id_to_bricks.get(v.getId()))) { TextView obj_text_view = (TextView) findViewById(R.id.ID_PlacementMode_BrickPreview_TextView); obj_text_view.setVisibility(View.INVISIBLE); if (objBrickPreview != null) { objBlockFactory.ReleaseBlock(objBrickPreview); objBrickPreview = null; b_brick_is_placeable = false; } ImageView img = (ImageView) findViewById(ID_PlacementMode_BrickPreview_ImageView); img.setRotation(0); img.setColorFilter(Color.GRAY); // disable drag and drop findViewById(ID_PlacementMode_BrickPreview_ImageView).setOnTouchListener(null); switch (v.getId()) { case R.id.ID_PlacementMode_1x1_Brick_ImageButton: img.setImageResource(R.drawable.vi_quadrat_1x1); i_act_id = R.id.ID_PlacementMode_1x1_Brick_ImageButton; break; case R.id.ID_PlacementMode_2x2_Brick_ImageButton: img.setImageResource(R.drawable.vi_quadrat_2x2); i_act_id = R.id.ID_PlacementMode_2x2_Brick_ImageButton; break; case R.id.ID_PlacementMode_I_Brick_ImageButton: img.setImageResource(R.drawable.vi_i); i_act_id = R.id.ID_PlacementMode_I_Brick_ImageButton; break; case R.id.ID_PlacementMode_J_Brick_ImageButton: img.setImageResource(R.drawable.vi_j); i_act_id = R.id.ID_PlacementMode_J_Brick_ImageButton; break; case R.id.ID_PlacementMode_L_Brick_ImageButton: img.setImageResource(R.drawable.vi_l); i_act_id = R.id.ID_PlacementMode_L_Brick_ImageButton; break; case R.id.ID_PlacementMode_S_Brick_ImageButton: img.setImageResource(R.drawable.vi_s); i_act_id = R.id.ID_PlacementMode_S_Brick_ImageButton; break; case R.id.ID_PlacementMode_T_Brick_ImageButton: img.setImageResource(R.drawable.vi_t); i_act_id = R.id.ID_PlacementMode_T_Brick_ImageButton; break; case R.id.ID_PlacementMode_Z_Brick_ImageButton: img.setImageResource(R.drawable.vi_z); i_act_id = R.id.ID_PlacementMode_Z_Brick_ImageButton; break; default: break; } updateView(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void selectBloodGroup(int id)\n {\n switch (id) {\n\n case R.id.radioGroup1:\n value = \"A+\";\n break;\n case R.id.radioGroup2:\n value = \"B+\";\n break;\n case R.id.radioGroup3:\n value ...
[ "0.5808072", "0.56825835", "0.56815684", "0.5606976", "0.5571683", "0.555361", "0.55534375", "0.54256004", "0.54190654", "0.53514916", "0.53461736", "0.5346033", "0.53167444", "0.5277782", "0.5240482", "0.52357125", "0.5216484", "0.5169211", "0.51672065", "0.5152519", "0.5149...
0.75914556
0
set desired color to brick preview. In this function the brick will be allocated from stock
public void changeColor(View v) { if (i_act_id > 0) { ImageView img = (ImageView) findViewById(ID_PlacementMode_BrickPreview_ImageView); // release old brick if (objBrickPreview != null) { objBlockFactory.ReleaseBlock(objBrickPreview); objBrickPreview = null; b_brick_is_placeable = false; } // get actual selected shape BlockShape block_shape = map_id_to_bricks.get(i_act_id); // get color from id BlockColor block_color = map_id_to_color.get(v.getId()); // if block is available pick up if (objBlockFactory.IsBlocktypeAvailable(block_shape, block_color)) { img.setColorFilter(map_blockcolor_to_int.get(block_color)); objBrickPreview = objBlockFactory.Allocate(block_shape, block_color); objBrickPreview.setRotation(BlockRotation.DEGREES_0); // Allowing a view to be dragged findViewById(ID_PlacementMode_BrickPreview_ImageView).setOnTouchListener(new BrickTouchListener()); // set flag that brick is placeable b_brick_is_placeable = true; } } updateView(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setColor(){\n this.objectColour = new Color(rValue,gValue,bValue,timeToLive).brighter();\n }", "private void colorBricks(GRect block,int k) {\n\n\t\tif (k < 2) block.setFillColor(Color.RED);\n\t\telse if (k >= 2 && k < 4) block.setFillColor(Color.ORANGE);\n\t\telse if (k >= 4 && k < 6) block.setFi...
[ "0.65622765", "0.65025926", "0.64855796", "0.6385978", "0.6222577", "0.62205017", "0.6175224", "0.61630166", "0.6139325", "0.61261666", "0.61261666", "0.6110722", "0.60004336", "0.59866047", "0.5980233", "0.59785783", "0.5970891", "0.59526867", "0.5946912", "0.5946912", "0.59...
0.7097747
0
Delete marked brick. Is only callable when a brick is marked in seedbox
public void onDelete(View v) { objMarkedBrickInSeedbox.setRotation(BlockRotation.DEGREES_0); // reset rotation (Bugfix for Bug #413) surface.deleteBrick(objMarkedBrickInSeedbox); objBlockFactory.ReleaseBlock(objMarkedBrickInSeedbox); objMarkedBrickInSeedbox = null; updateView(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void deleteBanque(Banque b) {\n\t\t\n\t}", "@Override\n public void deleteBeer(UUID beerId) {\n log.debug(\"Deleting a beer...\" + beerId + \")\" +\"...\");\n }", "public Bike removeBike () {\n categorizeBikes(); // categorize all bikes based on their status\n Sca...
[ "0.6503006", "0.6074512", "0.6063576", "0.60424656", "0.5997476", "0.59802", "0.59561825", "0.5881055", "0.5874358", "0.5874068", "0.5868428", "0.58524305", "0.5845693", "0.5780443", "0.57705325", "0.57628435", "0.57581645", "0.57581073", "0.57425857", "0.5737877", "0.5708206...
0.73384595
0
/checks if there is a valid WifiConnection active
public boolean WifiAvaible() { boolean Wifi = false; ConnectivityManager cm = (ConnectivityManager) getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo[] netInfo = cm.getAllNetworkInfo(); for (NetworkInfo NI : netInfo) { if (NI.getTypeName().equalsIgnoreCase("WIFI")){ if (NI.isConnected()){ Wifi = true; } } } return Wifi; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@TargetApi(Build.VERSION_CODES.M)\n @SuppressLint(\"MissingPermission\")\n private boolean isConnectedThroughWifi_Q() {\n //Get ConnectivityManager.\n ConnectivityManager connectivityManager = (ConnectivityManager) mContext.getSystemService(Context.CONNECTIVITY_SERVICE);\n\n //Check WIFI...
[ "0.74440354", "0.7418062", "0.7382727", "0.7334095", "0.7314543", "0.73052984", "0.72798884", "0.7250189", "0.72466695", "0.72375405", "0.723708", "0.7184829", "0.71832377", "0.7182896", "0.7179077", "0.7170349", "0.71385", "0.7137157", "0.7137157", "0.7121114", "0.71028525",...
0.72973907
6
Set rotation of brick preview. Clockwise and Counterclockwise are possible
public void rotateImage(View view) { View img = findViewById(ID_PlacementMode_BrickPreview_ImageView); float rotation; if (view.getId() == R.id.ID_PlacementMode_RotateLeft_Button) { rotation = img.getRotation() - (float) 90.0; } else { // rotate right rotation = img.getRotation() + (float) 90.0; } // set rotation in positive range in order to use map_angle_to_blockrotation correctly (Bugfix #414) if (rotation < 0) { rotation = rotation + 360f; } // set rotation of visualized brick preview img.setRotation(rotation); BlockRotation block_rotation = map_angle_to_blockrotation.get(((int)rotation)%360); // set rotation in block object objBrickPreview.setRotation(block_rotation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRotation(){\n\t\t\tfb5.accStop();\n\t\t\twt.turning = true;\n\t\t\tif(state == BotMove.RIGHT_15){\n\t\t\t\tfb5.turnRightBy(6);\n\t\t\t\tangle = (angle+360-20)%360;\n\t\t\t}\n\t\t\telse if(state == BotMove.RIGHT_10){\n\t\t\t\tfb5.turnRightBy(3);\n\t\t\t\tangle = (angle+360-10)%360;\n\t\t\t}\n\t\t\tel...
[ "0.688085", "0.6852477", "0.67390114", "0.67369", "0.67144525", "0.6700658", "0.6470434", "0.64619106", "0.63880706", "0.63776654", "0.63776654", "0.63776654", "0.63776654", "0.63776654", "0.63776654", "0.63776654", "0.63776654", "0.63776654", "0.63776654", "0.63776654", "0.6...
0.6850715
2
Restore block factory and go to SeedBoxModeActivity
public void goToSeedBoxModeActivity(View view) { //is called by onClick function of Button objBlockFactory.RestoreBlockFactory(); Intent intent = new Intent(this, SeedBoxModeActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onKeyDown(int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_BACK ) {\n objBlockFactory.RestoreBlockFactory();\n Intent intent = new Intent(this, SeedBoxModeActivity.class);\n startActivity(intent);\n }\n return super...
[ "0.6334173", "0.60679066", "0.5748048", "0.572592", "0.5635899", "0.5612021", "0.5565757", "0.5554076", "0.55031145", "0.5499382", "0.5496357", "0.54925436", "0.5388128", "0.53429914", "0.5334181", "0.53317237", "0.5298667", "0.5275594", "0.52551126", "0.5204915", "0.5192311"...
0.7401521
0
Override android back button. Restore block factory and go to SeedBoxModeActivity
@Override public boolean onKeyDown(int keyCode, KeyEvent event) { if (keyCode == KeyEvent.KEYCODE_BACK ) { objBlockFactory.RestoreBlockFactory(); Intent intent = new Intent(this, SeedBoxModeActivity.class); startActivity(intent); } return super.onKeyDown(keyCode, event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBackPressed() {\n replaceUseCase(meetingManager);\n replaceUseCase(traderManager);\n super.onBackPressed();\n }", "@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tstartActivity(new Intent(getApplicationContext(),\tLauncher.class));\...
[ "0.75643337", "0.7560996", "0.7474084", "0.7346197", "0.7346197", "0.7346197", "0.7344226", "0.7344226", "0.73420244", "0.73420244", "0.7323322", "0.7310297", "0.73042196", "0.73042196", "0.7292969", "0.7286163", "0.72765565", "0.72765565", "0.72765565", "0.72765565", "0.7276...
0.7921757
0
Defines dimensions of the shadow image and the point within that shadow that should be centered under the touch location while dragging
@Override public void onProvideShadowMetrics(android.graphics.Point shadowSize, android.graphics.Point shadowTouchPoint) { // set shadow size to new rotated size shadowSize.set(width, height); // scale touch point shadowTouchPoint.set(shadowSize.x / 2, shadowSize.y / 2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t public void onProvideShadowMetrics (Point size, Point touch){\n\t // Defines local variables\n\t int width;\n\t\t\t\tint height;\n\n\t // Sets the width of the shadow to half the width of the original View\n\t width = getView().getWidth() / 2;\n\n\t ...
[ "0.6816242", "0.61897826", "0.6107149", "0.5976648", "0.5976648", "0.56784666", "0.5446741", "0.5424605", "0.5390232", "0.5382175", "0.53432065", "0.53402", "0.5328971", "0.53157127", "0.525667", "0.52459306", "0.51529247", "0.51493686", "0.5084392", "0.504311", "0.50424063",...
0.62968355
1
Draws the shadow image. The system creates the Canvas object based on the dimensions it received from the onProvideShadowMetrics(Point, Point) callback
@Override public void onDrawShadow(Canvas canvas) { // scale the image relating to a pivot point (reference point) canvas.scale(view.getScaleX(), view.getScaleY(), width / 2, height / 2); // rotate the image relating to a pivot point (reference point) canvas.rotate(view.getRotation(), width / 2, height / 2); // Calculate the canvas matrix with the specified translation with given // distances to x and y canvas.translate((width - view.getWidth()) / 2, (height - view.getHeight()) / 2); // call parent onDrawShadow function super.onDrawShadow(canvas); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t public void onDrawShadow(Canvas canvas) {\n\n\t // Draws the ColorDrawable in the Canvas passed in from the system.\n\t shadow.draw(canvas);\n\t }", "public void draw(Canvas canvas) {\n super.draw(canvas);\n if (this.getChildCount() <= 1) return;\n ...
[ "0.69865054", "0.6435686", "0.6285012", "0.6237465", "0.5781263", "0.5687561", "0.56767297", "0.55474436", "0.5520014", "0.54704237", "0.5423461", "0.54217404", "0.53914285", "0.52962005", "0.52887374", "0.5278695", "0.52290595", "0.51782936", "0.5171734", "0.51664567", "0.51...
0.6362696
3
getIndex(String playerName) This is used to return a the index for the playing status icons
public static int getIndex(String playerName) { int result = 0; if (GROUPS.clientPlayStatuses != null && GROUPS.clientPlayStatuses.containsKey(playerName)) { switch (GROUPS.valueOf(GROUPS.clientPlayStatuses.get(playerName))) { case QUEUED: result = 1; break; case PLAYING: result = 2; default: } } return result + (GROUPS.isLeader(playerName) ? 8 : 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getActivePlayerIndex();", "private static int getIndexOfPlayer(PlayerSide playerSide) {\n if (playerSide == PlayerSide.CURRENT_PLAYER){\n return 0;\n } else {\n return 1;\n }\n }", "public int getNameIndex() {\n\t\treturn nameIndex & 0xffff;\n\t}", "public in...
[ "0.6853281", "0.620353", "0.6153722", "0.614514", "0.60716194", "0.6010734", "0.6006698", "0.60021186", "0.5934625", "0.59190047", "0.59166336", "0.5895102", "0.5853778", "0.5818735", "0.57729137", "0.5768609", "0.57660264", "0.5764083", "0.5756959", "0.5752974", "0.5747762",...
0.74534726
0
Preferred version same version from leetocde discussion Approach 3: Backtracking (!!!) "Let's just pick up the first opportunity "matches zero characters" and proceed further. If this assumption would lead in "no match" situation, then backtrack : come back to the previous star, assume now that it matches one more character (one) and proceed again. Again "no match" situation? Backtrack again : come back to the previous star, and assume now that it matches one more character (two), etc."
boolean comparison(String str, String pattern) { int s = 0, p = 0, match = 0, starIdx = -1; while (s < str.length()){ /** * advancing both pointers */ if (p < pattern.length() && (pattern.charAt(p) == '?' || str.charAt(s) == pattern.charAt(p))){ s++; p++; } /** * '*' found, only advancing pattern pointer * * check the situation when '*' matches no char * * starIdx : remember location of '*' in pattern * match : remember index in s when the last '*" appears */ else if (p < pattern.length() && pattern.charAt(p) == '*'){ starIdx = p; match = s; p++; } /** * the last pattern pointer was *, advancing string pointer * * !!! * If pattern character != string character * OR * pattern is used up * AND * there was '*' character in pattern before : * * Backtrack check the situation when '*' matches one more character */ else if (starIdx != -1){ p = starIdx + 1; match++; s = match; } /** * current pattern pointer is not star, last pattern pointer was not * * characters do not match */ else return false; } /** * check for remaining characters in pattern */ while (p < pattern.length() && pattern.charAt(p) == '*') { p++; } return p == pattern.length(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isMatch(String s, String p) {\n if(s == null || p == null){\n return false;\n }\n int pPoint = 0;\n int sPoint = 0;\n int starPoint =-1;\n int sMatch = 0;\n while(sPoint < s.length()){\n // there is no star, then we should match ...
[ "0.6436526", "0.6394364", "0.6345224", "0.61927956", "0.6155244", "0.61463284", "0.6146078", "0.6130779", "0.61205107", "0.60907876", "0.6089867", "0.6063002", "0.6045449", "0.5932155", "0.59129214", "0.5858881", "0.5856618", "0.5853413", "0.58431935", "0.5824591", "0.5697439...
0.5848716
18
This isValid method checks to see if GBS is enabled. For the record, this method/class is absurd.
@Override public boolean isValid(Boolean gbsEnabled, ConstraintValidatorContext notused) { boolean valid = false; if (gbsEnabled != null) { if (gbsEnabled.booleanValue()) { // TODO: Uncomment this section when re-integrated with master // project. // valid = GBSConfigurator.isGBSEnabled(); valid = true; } } return valid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean validateBSB() {\n\t\tif (!this.setBSB(this.bsb))\n\t\t\treturn false;\n\t\treturn this.getBSB().length() == 6;\n\t}", "public boolean isValid()\r\n {\r\n //Override this method in MediaItem object\r\n return getSemanticObject().getBooleanProperty(swb_valid,false);\r\n }", "pu...
[ "0.64138615", "0.6277739", "0.6111094", "0.59808165", "0.5930977", "0.58617145", "0.5825649", "0.5825649", "0.5814037", "0.5808823", "0.5804847", "0.5802505", "0.57781476", "0.5776404", "0.5773511", "0.57734805", "0.5721563", "0.5721563", "0.5721563", "0.57101667", "0.5709505...
0.8074788
0
Creates new form PurchaseNewTicket
public PurchaseNewTicket() { initComponents(); mLoadMovieName(); mLoadTime(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping(value=\"/create\")\n\tpublic Ticket creatTicket(@RequestBody Ticket ticket){\n\t\treturn ticketBookingService.createTicket(ticket);\n\t}", "public void XxGamMaCreateTicket(Number nPayment, \n OAPageContext pageContext) {\n //Buscamos el Payment con el id par...
[ "0.63168526", "0.6180159", "0.6177615", "0.6172822", "0.60211456", "0.6003053", "0.5996775", "0.5903288", "0.5880027", "0.5856023", "0.58479244", "0.5793801", "0.57654643", "0.5755507", "0.57353437", "0.5735017", "0.57245505", "0.56725836", "0.56696224", "0.56535345", "0.5630...
0.66189533
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel1 = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); cboMoviename = new javax.swing.JComboBox<>(); jLabel3 = new javax.swing.JLabel(); cboTime = new javax.swing.JComboBox<>(); jLabel2 = new javax.swing.JLabel(); txtTicketNo = new javax.swing.JTextField(); btnBook = new javax.swing.JButton(); btnLoad = new javax.swing.JButton(); btnEdit = new javax.swing.JButton(); btnSave = new javax.swing.JButton(); btnDelete = new javax.swing.JButton(); jButton1 = new javax.swing.JButton(); setBackground(new java.awt.Color(51, 51, 51)); setClosable(true); setIconifiable(true); setTitle("Purchase New Ticket"); jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 3, true)); jPanel1.setForeground(new java.awt.Color(51, 51, 51)); jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/stemsentertainmentcompany/AmericanSniper.jpg"))); // NOI18N jLabel7.setIcon(new javax.swing.ImageIcon(getClass().getResource("/stemsentertainmentcompany/BirdMan.jpg"))); // NOI18N jLabel9.setIcon(new javax.swing.ImageIcon(getClass().getResource("/stemsentertainmentcompany/Taken3.jpg"))); // NOI18N jLabel8.setIcon(new javax.swing.ImageIcon(getClass().getResource("/stemsentertainmentcompany/exMachina.jpg"))); // NOI18N javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel8) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 200, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(jLabel9, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel9) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(jLabel6) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 280, javax.swing.GroupLayout.PREFERRED_SIZE)) ); jPanel2.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 3, true)); jLabel1.setFont(new java.awt.Font("Goudy Old Style", 2, 14)); // NOI18N jLabel1.setText("Select movie:"); cboMoviename.setBackground(new java.awt.Color(51, 51, 51)); cboMoviename.setForeground(new java.awt.Color(255, 255, 0)); jLabel3.setFont(new java.awt.Font("Goudy Old Style", 2, 14)); // NOI18N jLabel3.setText("Select viewing time/session:"); cboTime.setBackground(new java.awt.Color(51, 51, 51)); cboTime.setForeground(new java.awt.Color(255, 255, 0)); cboTime.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { cboTimeActionPerformed(evt); } }); jLabel2.setFont(new java.awt.Font("Goudy Old Style", 2, 14)); // NOI18N jLabel2.setText("Ticket Number:"); btnBook.setBackground(new java.awt.Color(51, 51, 51)); btnBook.setForeground(new java.awt.Color(255, 255, 0)); btnBook.setText("Book"); btnBook.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnBookActionPerformed(evt); } }); btnLoad.setBackground(new java.awt.Color(51, 51, 51)); btnLoad.setForeground(new java.awt.Color(255, 255, 0)); btnLoad.setText("Load"); btnLoad.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnLoadActionPerformed(evt); } }); btnEdit.setBackground(new java.awt.Color(51, 51, 51)); btnEdit.setForeground(new java.awt.Color(255, 255, 0)); btnEdit.setText("Edit"); btnEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditActionPerformed(evt); } }); btnSave.setBackground(new java.awt.Color(51, 51, 51)); btnSave.setForeground(new java.awt.Color(255, 255, 0)); btnSave.setText("Save"); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); btnDelete.setBackground(new java.awt.Color(51, 51, 51)); btnDelete.setForeground(new java.awt.Color(255, 255, 0)); btnDelete.setText("Delete"); btnDelete.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnDeleteActionPerformed(evt); } }); jButton1.setBackground(new java.awt.Color(51, 51, 51)); jButton1.setFont(new java.awt.Font("Goudy Old Style", 2, 14)); // NOI18N jButton1.setForeground(new java.awt.Color(204, 0, 0)); jButton1.setText("Exit"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(btnLoad, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnEdit, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnSave, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnBook, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel1) .addComponent(cboMoviename, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(cboTime, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(jLabel3) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel2) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(txtTicketNo, javax.swing.GroupLayout.PREFERRED_SIZE, 121, javax.swing.GroupLayout.PREFERRED_SIZE))) .addComponent(btnDelete, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addGap(28, 28, 28)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jButton1, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel1) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cboMoviename, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel3) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(cboTime, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(33, 33, 33) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(txtTicketNo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(31, 31, 31) .addComponent(btnBook) .addGap(48, 48, 48) .addComponent(btnLoad) .addGap(48, 48, 48) .addComponent(btnEdit) .addGap(48, 48, 48) .addComponent(btnSave) .addGap(52, 52, 52) .addComponent(btnDelete) .addGap(45, 45, 45) .addComponent(jButton1) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGap(4, 4, 4) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(18, 18, 18) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, 281, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(15, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 580, javax.swing.GroupLayout.PREFERRED_SIZE)) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7321245", "0.7292375", "0.7292375", "0.7292375", "0.7286756", "0.7250393", "0.7215278", "0.7208825", "0.7197639", "0.71918", "0.7185626", "0.716065", "0.71489197", "0.7094757", "0.7081307", "0.7057363", "0.69892997", "0.6978972", "0.6956389", "0.69543713", "0.69465107", ...
0.0
-1
TODO Autogenerated method stub
public int getCurSteps() { return nativegetCurSteps(); }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
public void resetCalMileData() { nativeresetCalMileData(); }
{ "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 getExr...
[ "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.608016...
0.0
-1
CoreEngine engine = new CoreEngine(0, 600, 60, true, new TestGame()); engine.createWindow("Earthengine tech demo"); engine.start();
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public RenderEngine() {\n\t\twindow = Window.getInstance();\n\t\t\n\t\ttestEntity = new Entity(\"skull/skull.obj\", \"./res/models/skull/skull.png\", new Vector3f(0,0,0), new Vector3f(0,0,0));\n\t\ttestEntity.getWorldTransform().setScaling(new Vector3f(0.01f,0.01f,0.01f));\n\t\t\n\t\ttestEntity2 = new Entity(\"dum...
[ "0.7366517", "0.67738193", "0.67609817", "0.67433995", "0.6737852", "0.66874963", "0.66615725", "0.6654565", "0.6654565", "0.66193444", "0.6600798", "0.6598022", "0.6563574", "0.65158474", "0.64502573", "0.644868", "0.6433066", "0.64267224", "0.63970345", "0.63835776", "0.638...
0.0
-1
TODO Autogenerated method stub / Ask a user to input a leap year. Give the user 10 chances to enter a correct leap year. As soon as the user enters the correct leap year exit the loop.
public static void main(String[] args) { int year ; int leapYear; Scanner in = new Scanner(System.in); for (int i = 9; i >= 0; i--) { System.out.println("Input leap year please:"); year = in.nextInt(); if (year%4==0 ) { System.out.println("You won!!!"); break; } else { System.out.println("You lost!!! AHAHAHAHAHAHAHAAHA!!!"); } if (year%4!=0) System.out.println("You have " + i + " more chances"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void leapYear() {\n System.out.print(\"\\nEnter a year: \");\n long year = in.nextLong();\n if ((year % 4 == 0 && year % 100 != 0) || year % 400 == 0) {\n System.out.println(\"\\n\" + year + \" is a leap year.\\n\");\n } else {\n System.out.println(\"\\n\" + year + \" is no...
[ "0.7994157", "0.7611514", "0.73944443", "0.7084106", "0.6839448", "0.6815704", "0.6777999", "0.6744073", "0.66844505", "0.6659874", "0.6659105", "0.6558829", "0.65283126", "0.6506227", "0.6463266", "0.64423096", "0.6441771", "0.6378248", "0.63095224", "0.62950873", "0.6253883...
0.71608114
3
Called repeatedly as command is running
@Override protected void execute() { Robot.driveTrain.drive(Robot.oi.joystick); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void run() throws IOException {\n\t\tif (lastTime + interval > Time.now())\n\t\t\treturn;\n\t\texitCode = 0; // reset for next run\n\t\trunCommand();\n\t}", "public void run() {\n\t\texecuteCommand( client, false );\n\t}", "private void doCommand() {\n try {\n TimeUnit.SECONDS.sleep...
[ "0.6861053", "0.67603487", "0.6546131", "0.64567053", "0.64061284", "0.63862985", "0.63245255", "0.63081026", "0.6299205", "0.6292428", "0.627344", "0.6253181", "0.6227077", "0.6193406", "0.61803955", "0.6169944", "0.6153394", "0.61508405", "0.61301064", "0.6124054", "0.61163...
0.0
-1
Creates new form ConsFuncionario
public BuscaMedicamento() { initComponents(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Compuesta createCompuesta();", "Compleja createCompleja();", "OperacionColeccion createOperacionColeccion();", "public creacionempresa() {\n initComponents();\n mostrardatos();\n }", "public CadastroFuncionario() {\n initComponents();\n setTitle(\"Cadastrar Funcionário\");\n ...
[ "0.71345633", "0.7056454", "0.6803266", "0.66834164", "0.64860713", "0.6450117", "0.6428864", "0.6396316", "0.63365006", "0.63052016", "0.6267799", "0.6243829", "0.6231858", "0.615138", "0.6144241", "0.612226", "0.6095325", "0.6060759", "0.6025617", "0.60154766", "0.59944886"...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel5 = new javax.swing.JPanel(); jLabel5 = new javax.swing.JLabel(); jPanel6 = new javax.swing.JPanel(); jLabel6 = new javax.swing.JLabel(); edID = new javax.swing.JTextField(); edPrincipio_Ativo = new javax.swing.JTextField(); btBuscar = new javax.swing.JButton(); chSemFiltro = new javax.swing.JCheckBox(); chPrincipio_Ativo = new javax.swing.JCheckBox(); chID = new javax.swing.JCheckBox(); btLimpar = new javax.swing.JButton(); btInserir = new javax.swing.JButton(); jScrollPane1 = new javax.swing.JScrollPane(); tabela = new javax.swing.JTable(); lbErro = new javax.swing.JLabel(); btVoltar = new javax.swing.JButton(); btInserir1 = new javax.swing.JButton(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); setTitle("Busca de Medicamentos"); setResizable(false); addWindowListener(new java.awt.event.WindowAdapter() { public void windowActivated(java.awt.event.WindowEvent evt) { formWindowActivated(evt); } }); getContentPane().setLayout(null); jPanel5.setName(""); // NOI18N jPanel5.setLayout(null); jLabel5.setFont(new java.awt.Font("Tahoma", 1, 24)); // NOI18N jLabel5.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); jLabel5.setText("Busca Medicamento"); jPanel5.add(jLabel5); jLabel5.setBounds(0, 20, 570, 30); jPanel6.setBorder(javax.swing.BorderFactory.createEtchedBorder()); jPanel6.setLayout(null); jLabel6.setFont(new java.awt.Font("Tahoma", 1, 16)); // NOI18N jLabel6.setText("Filtros de busca:"); jPanel6.add(jLabel6); jLabel6.setBounds(40, 10, 140, 20); edID.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N edID.setEnabled(false); jPanel6.add(edID); edID.setBounds(130, 40, 100, 25); edPrincipio_Ativo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N edPrincipio_Ativo.setEnabled(false); jPanel6.add(edPrincipio_Ativo); edPrincipio_Ativo.setBounds(130, 70, 260, 25); btBuscar.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btBuscar.setText("BUSCAR"); btBuscar.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btBuscarMouseClicked(evt); } }); jPanel6.add(btBuscar); btBuscar.setBounds(430, 50, 100, 50); buttonGroup1.add(chSemFiltro); chSemFiltro.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N chSemFiltro.setSelected(true); chSemFiltro.setText("Sem Filtro"); jPanel6.add(chSemFiltro); chSemFiltro.setBounds(315, 40, 97, 30); buttonGroup1.add(chPrincipio_Ativo); chPrincipio_Ativo.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N chPrincipio_Ativo.setText("Princípio ativo"); chPrincipio_Ativo.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chPrincipio_AtivoItemStateChanged(evt); } }); jPanel6.add(chPrincipio_Ativo); chPrincipio_Ativo.setBounds(10, 70, 120, 24); buttonGroup1.add(chID); chID.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N chID.setText("ID"); chID.addItemListener(new java.awt.event.ItemListener() { public void itemStateChanged(java.awt.event.ItemEvent evt) { chIDItemStateChanged(evt); } }); jPanel6.add(chID); chID.setBounds(10, 40, 70, 24); btLimpar.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N btLimpar.setText("Limpar"); btLimpar.setToolTipText(""); btLimpar.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); btLimpar.setOpaque(false); btLimpar.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btLimparMouseClicked(evt); } }); jPanel6.add(btLimpar); btLimpar.setBounds(430, 10, 100, 30); btInserir.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btInserir.setText("INSERIR"); btInserir.setToolTipText(""); btInserir.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btInserirMouseClicked(evt); } }); jPanel6.add(btInserir); btInserir.setBounds(-60, 520, 110, 40); jPanel5.add(jPanel6); jPanel6.setBounds(20, 60, 530, 110); tabela.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N tabela.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "Title 4" } )); tabela.setIntercellSpacing(new java.awt.Dimension(2, 2)); jScrollPane1.setViewportView(tabela); jPanel5.add(jScrollPane1); jScrollPane1.setBounds(20, 180, 530, 350); lbErro.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N lbErro.setForeground(new java.awt.Color(255, 0, 51)); lbErro.setHorizontalAlignment(javax.swing.SwingConstants.CENTER); lbErro.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER); jPanel5.add(lbErro); lbErro.setBounds(20, 540, 350, 30); btVoltar.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btVoltar.setText("VOLTAR"); btVoltar.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btVoltarMouseClicked(evt); } }); jPanel5.add(btVoltar); btVoltar.setBounds(450, 580, 100, 40); btInserir1.setFont(new java.awt.Font("Tahoma", 1, 14)); // NOI18N btInserir1.setText("INSERIR"); btInserir1.setToolTipText(""); btInserir1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { btInserir1MouseClicked(evt); } }); jPanel5.add(btInserir1); btInserir1.setBounds(20, 580, 110, 40); getContentPane().add(jPanel5); jPanel5.setBounds(0, 0, 570, 630); setSize(new java.awt.Dimension(585, 669)); setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73195875", "0.7291065", "0.7291065", "0.7291065", "0.7286258", "0.7248489", "0.7213822", "0.7208757", "0.7195916", "0.7190243", "0.7184025", "0.71591616", "0.7148041", "0.70930153", "0.7080625", "0.7056986", "0.6987694", "0.69770867", "0.6955136", "0.69538426", "0.69452894...
0.0
-1
TODO Autogenerated method stub
@Override protected void onSaveInstanceState(Bundle savedInstanceState) { super.onSaveInstanceState(savedInstanceState); }
{ "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 getExr...
[ "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.608016...
0.0
-1
TODO Autogenerated method stub
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.activity_coursesinfo, menu); return true; }
{ "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 getExr...
[ "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.608016...
0.0
-1
From value result type.
public static ResultType fromValue(String v) { return Arrays.stream(values()). filter(s -> s.value.equals(v)). findFirst().orElseThrow(() -> new IllegalArgumentException(v)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected IValue narrow(Object result){\n\t\tif(result instanceof Integer) {\n\t\t\treturn vf.integer((Integer)result);\n\t\t}\n\t\tif(result instanceof IValue) {\n\t\t\treturn (IValue) result;\n\t\t}\n\t\tif(result instanceof Thrown) {\n\t\t\t((Thrown) result).printStackTrace(stdout);\n\t\t\treturn vf.string(((Th...
[ "0.6672227", "0.65640044", "0.6562539", "0.65519446", "0.6546597", "0.6513284", "0.6512189", "0.6351294", "0.6351294", "0.6351294", "0.6351294", "0.6351294", "0.6351294", "0.6307861", "0.6280806", "0.62764555", "0.616325", "0.616325", "0.616325", "0.616325", "0.616325", "0....
0.6156152
24
Create a publisher for the emitter.
@Outgoing("multiplyVariants") public Publisher<String> preparePublisher() { // Create new publisher for emitting to by this::process return ReactiveStreams .fromPublisher(FlowAdapters.toPublisher(emitter)) .buildRs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Publisher() {\n // This constructor is intentionally empty. Nothing special is needed here.\n }", "public interface Publisher {\n\t// Publishes new message to PubSubService\n\tvoid publish(Message message, PubSubService pubSubService);\n}", "@Override\r\n public void publishStart(Publisher publishe...
[ "0.6315947", "0.6112014", "0.60219693", "0.58392996", "0.5725442", "0.5682084", "0.56802624", "0.56552887", "0.5645735", "0.56205416", "0.5539591", "0.5502703", "0.5455668", "0.54508424", "0.543375", "0.5402642", "0.54005885", "0.5395844", "0.53622085", "0.5319577", "0.529128...
0.48852906
55
Returns a builder for a processor that maps a string into three variants.
@Incoming("multiplyVariants") @Outgoing("wrapSseEvent") public ProcessorBuilder<String, String> multiply() { // Multiply to 3 variants of same message return ReactiveStreams.<String>builder() .flatMap(o -> ReactiveStreams.of( // upper case variant o.toUpperCase(), // repeat twice variant o.repeat(2), // reverse chars 'tnairav' new StringBuilder(o).reverse().toString()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Builder zza(String str);", "public abstract Builder mappingName(String paramString);", "public StringSetField build() {\n Objects.requireNonNull(value, StringSetField.class + \": value is missing\");\n return new StringSetFieldImpl(value);\n }", "public abstract String constr...
[ "0.5736532", "0.5246434", "0.52195203", "0.50340533", "0.4984188", "0.49138296", "0.49067086", "0.4899869", "0.4891346", "0.48580596", "0.48507434", "0.48389715", "0.4759269", "0.47414982", "0.4728636", "0.46803403", "0.4639279", "0.46373838", "0.46151292", "0.46058702", "0.4...
0.5536303
1
Constructor 1. Sets the field values. Used when play is pressed in MenuState
public LevelLoader(GameStateManager gsm){ super(gsm); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Menu(){\n\t\tthis.player = null;\n\t\tthis.weapon = null;\n\t\tthis.power = null;\n\t\tthis.in = new Scanner(System.in);\n\t\tthis.bdd = new Driver();\n\t\tthis.savedIndex = 0;\n\n\t}", "public void initiateValues() {\n\t\t// initialise states and actions\n\t\toldState = new MarioState(configFile);\n\t\ts...
[ "0.6377199", "0.6357751", "0.6294999", "0.6250205", "0.6238736", "0.62250847", "0.6177608", "0.6166819", "0.6163698", "0.61464566", "0.613844", "0.6098062", "0.60967386", "0.60959417", "0.60396606", "0.60280603", "0.602262", "0.6010788", "0.6009221", "0.600879", "0.6008192", ...
0.0
-1
Constructor 2. Sets the field values.
public LevelLoader(GameStateManager gsm, String worldName, String map_name) { super(gsm); this.worldName = worldName; this.map_name = map_name; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n protected void setFieldValues (Object ... fields)\r\n {\n \r\n }", "@Override\r\n\tprotected void init() {\n\t\tupdateValues();\r\n\t}", "private void initValues() {\n \n }", "@Override\n\tpublic void initializeValues() {\n\n\t}", "public Field(String watermark,\n ...
[ "0.6562554", "0.6555696", "0.6439799", "0.63748384", "0.63366866", "0.6263759", "0.6231043", "0.61981905", "0.61539257", "0.61146015", "0.60776293", "0.6058709", "0.6049339", "0.6040877", "0.59318584", "0.5835478", "0.58280295", "0.58239865", "0.57917243", "0.57808214", "0.57...
0.0
-1
Part of GameLoop, Initialises the declared classes and fields. Initialises the World class and generates the map
@Override public void init() { world = new World(gsm); world.init(); if(worldName == null){ worldName = "null"; map_name = "map"; } world.generate(map_name); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public World()\n\t{\n\t\tinitWorld();\t\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\t...
[ "0.75209737", "0.738253", "0.72980046", "0.72048694", "0.7163124", "0.7111245", "0.7107153", "0.71032643", "0.709684", "0.70343894", "0.7027846", "0.70184857", "0.6982931", "0.6953827", "0.69473666", "0.6947272", "0.6846527", "0.68276167", "0.6813066", "0.67732084", "0.676733...
0.81249017
0
Part of GameLoop, Updates the declared classes and fields (60 FPS).
@Override public void update() { world.update(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void update() {\r\n gameObjects.update(playState);\r\n }", "public void update()\n\t{\n\t\tgameTime++;\n\t\tfor(int i = 0; i<gameObj.length; i++)\n\t\t{\n\t\t\tfor(int j = 0; j < gameObj[i].size(); j++)\n\t\t\t{\n\t\t\t\t/*If the object implements movable\n\t\t\t\t * call the move method in each...
[ "0.727797", "0.72369087", "0.7152869", "0.7076257", "0.70083493", "0.69961625", "0.6925496", "0.6918321", "0.6905372", "0.6846156", "0.68170255", "0.67887986", "0.67631125", "0.67137206", "0.6656484", "0.6655446", "0.66390467", "0.6628928", "0.66248804", "0.66095227", "0.6590...
0.61909837
83