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
Check whether the given world is a valid world for a entity.
@Model private boolean isValidSuperWorld(World world){ return (world == null || !world.isTerminatedWorld()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean checkWorld(Entity entity) {\r\n return entity.getWorld() == worldFrom;\r\n }", "@Raw\n\tpublic boolean canHaveAsWorld(World world) {\n\t\tif (world != null && (getXCoordinate() > world.getWidth() || getYCoordinate() > world.getHeight()))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "p...
[ "0.7879068", "0.7244029", "0.71465343", "0.6958503", "0.6474537", "0.6418813", "0.61854005", "0.59898376", "0.5983627", "0.58699846", "0.58449984", "0.5825734", "0.57242036", "0.57159257", "0.5708263", "0.56794465", "0.5648174", "0.56434244", "0.55797446", "0.5572633", "0.555...
0.6938941
4
Returns whether the entity is terminated.
@Basic @Raw public boolean isTerminated(){ return this.isTerminated; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Basic\r\n\t@Raw\r\n\tpublic boolean isTerminated(){\r\n\t\treturn isTerminated;\r\n\t}", "public boolean isTerminated() {\n \n \t\tfinal Thread executingThread = this.environment.getExecutingThread();\n \t\tif (executingThread.getState() == Thread.State.TERMINATED) {\n \t\t\treturn true;\n \t\t}\n \n \t\treturn...
[ "0.7178544", "0.7104781", "0.69930893", "0.6722163", "0.6623012", "0.658331", "0.6494317", "0.641274", "0.63734573", "0.624531", "0.6223837", "0.61658466", "0.6112654", "0.6035919", "0.59651005", "0.5962247", "0.59567976", "0.5920338", "0.59192866", "0.5892337", "0.5880497", ...
0.71075827
1
Method to terminate this entity.
@Raw public void terminate(){ if (superWorld != null) this.superWorld.removeEntityFromWorld(this); this.superWorld = null; this.isTerminated = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void terminate() {\n\t\tpostEvent(new IpcEvent(SimulationEvents.EVENT_TYPE_TERMINATE, this, null));\n\t}", "@Override\r\n protected void terminate() {\n forceEntities.release();\r\n forceEntities = null;\r\n\r\n velocityEntities.release();\r\n velocityEntities = null;\r\n\r\...
[ "0.7586611", "0.7271982", "0.72208935", "0.7202922", "0.7180061", "0.7180061", "0.7180061", "0.71390945", "0.7044108", "0.6941409", "0.688295", "0.68828464", "0.6857221", "0.6775209", "0.6761115", "0.67522186", "0.6744747", "0.66913635", "0.66714966", "0.66520023", "0.6599424...
0.75783503
1
returns the mass of the entity.
@Basic @Raw public double getMass(){ return this.mass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getMass() {\n return mass;\n }", "public double getMass() {\n return mass;\n }", "public double getMass();", "public float getMass() {\n return mass;\n }", "public Double getMass() {\n return mass;\n }", "public double getMass()\n\t{\n\t\treturn this....
[ "0.78964156", "0.78964156", "0.78407013", "0.7832492", "0.7823329", "0.77843624", "0.7735844", "0.76818776", "0.765907", "0.7376819", "0.71897006", "0.7022198", "0.69814646", "0.6968527", "0.6945452", "0.6883031", "0.68811363", "0.6773508", "0.6377453", "0.6368331", "0.631053...
0.77459085
6
This method sets the mass of a entity.
@Raw protected void setMass(double mass){ this.mass = mass; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMass(double amount)\n\t{\n\t\tthis.mass = amount;\n\t}", "public void setMass(final float mass);", "public void setMass(float value) {\n this.mass = value;\n }", "@Override\n\tpublic void setMass(float mass) {\n\t\tthis.mass = mass;\n\t}", "public void setMass(double value) {\n ...
[ "0.7564462", "0.7258923", "0.72561973", "0.7164192", "0.7125739", "0.7013926", "0.68930125", "0.6855046", "0.6768455", "0.6753955", "0.61450154", "0.60190016", "0.5919258", "0.5786624", "0.5768658", "0.57000077", "0.57000077", "0.56552863", "0.55966884", "0.55762935", "0.5524...
0.7196635
3
returns in String form which type of Entity this is.
@Basic @Immutable public String getTypeName() { return typeName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getTypeAsString();", "public EntityType getEntity_type() {\n return this.entity_type;\n }", "public String entityType();", "public EntityType getType()\n {\n return m_type;\n }", "public String getTypeString() {\r\n return Prediction.getTypeString(type);\r\n }", "java.la...
[ "0.75009507", "0.7487037", "0.7410784", "0.7210744", "0.71676356", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71434283", "0.71178335", "0.70703834", ...
0.0
-1
A Method which resolves and directs collisions to its respective proper collison methods.
public void collide(Entity entity) throws IllegalArgumentException{ if (this instanceof Ship && entity instanceof Ship) this.defaultCollide(entity); else if (this instanceof MinorPlanet && entity instanceof MinorPlanet) this.defaultCollide(entity); else if (entity instanceof Bullet) { Bullet bullet = (Bullet) entity; if (bullet.getBulletSource() == this) bullet.bulletCollideOwnShip((Ship) this); else bullet.bulletCollideSomethingElse(this); } else if (this instanceof Bullet) { Bullet bullet = (Bullet) this; if (bullet.getBulletSource() == entity) bullet.bulletCollideOwnShip((Ship) entity); else bullet.bulletCollideSomethingElse(entity); } else if ((this instanceof Ship && entity instanceof Asteroid) || (entity instanceof Ship && this instanceof Asteroid)){ Ship ship = null; if (this instanceof Ship){ ship = (Ship) this; } else { ship = (Ship) entity; } ship.terminate(); } else if ((this instanceof Ship && entity instanceof Planetoid) || (entity instanceof Ship && this instanceof Planetoid)){ Ship ship = null; if (this instanceof Ship){ ship = (Ship) this; } else { ship = (Ship) entity; } World world = ship.getSuperWorld(); double xnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth()); double ynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight()); ship.setPosition(xnew, ynew); while (! this.overlapAnyEntity()){ xnew = Helper.randomInBetween(this.getRadius(), world.getWorldWidth()); ynew = Helper.randomInBetween(this.getRadius(), world.getWorldHeight()); ship.setPosition(xnew, ynew); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void collideWith(Entity entity);", "public abstract void processCollisions();", "public void checkCollision() {}", "@Override\n\tpublic void doCollision(CollisionResult c) {\n\t\t\n\t}", "public abstract void collided(Collision c);", "@Override\n\tpublic void onCollision(Entity collidedEn...
[ "0.723625", "0.720029", "0.70841175", "0.70819265", "0.69301283", "0.6924352", "0.6901298", "0.6833454", "0.67843664", "0.6728315", "0.6727389", "0.6672184", "0.6670692", "0.6670371", "0.66656655", "0.6664614", "0.6654345", "0.6635477", "0.6567854", "0.6565391", "0.65489197",...
0.636837
27
Return the shortest time in which the given entity will collide with the boundaries of its world.
public double getTimeCollisionBoundary() { double[] velocity = this.velocity.getVelocity(); if (this.superWorld == null) return Double.POSITIVE_INFINITY; if (velocity[0] == 0 && velocity[1] == 0) return Double.POSITIVE_INFINITY; double radius = this.getRadius(); if (this instanceof Planetoid) { Planetoid planetoid = (Planetoid) this; radius = planetoid.getRadius();} double edgeY; double edgeX; double mY = 0; double mX = 0; if (velocity[0] > 0){ edgeX = position[0] + radius; mX = this.superWorld.getWorldWidth(); } else edgeX = position[0] - radius; if (velocity[1] > 0){ edgeY = position[1] + radius; mY = this.superWorld.getWorldHeight(); } else edgeY = position[1] - radius; double tX = Double.POSITIVE_INFINITY; double tY = Double.POSITIVE_INFINITY; if (velocity[0] != 0){ tX = (mX-edgeX)/velocity[0]; } if (velocity[1] != 0){ tY = (mY-edgeY)/velocity[1]; } //Return the smallest value return Math.min(tX, tY); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double getTimeFirstCollisionBoundary() {\n\t\tif (getWorld() == null) return Double.POSITIVE_INFINITY;\n\t\tdouble xTime = Double.POSITIVE_INFINITY;\n\t\tdouble yTime = Double.POSITIVE_INFINITY;\n\t\t\n\t\tif (this.getXVelocity() > 0)\n\t\t\txTime = (getWorld().getWidth() - getXCoordinate() - getRadius()) ...
[ "0.7005157", "0.5429021", "0.53298783", "0.5285322", "0.5271097", "0.51907206", "0.5107394", "0.5078434", "0.5066215", "0.50583047", "0.5044788", "0.5018856", "0.49438167", "0.49156576", "0.48840287", "0.48689052", "0.4848054", "0.4840203", "0.4808922", "0.48067486", "0.47940...
0.70539135
0
Return the first position at which the given entity will collide with the boundaries of its world.
public double[] getPositionCollisionBoundary(){ if (!Helper.isValidDouble(this.getTimeCollisionBoundary()) || this.superWorld == null) return null; double[] pos = new double[2]; pos[0] = this.getPosition()[0] + (this.getVelocity()[0] * this.getTimeCollisionBoundary()); pos[1] = this.getPosition()[1] + (this.getVelocity()[1] * this.getTimeCollisionBoundary()); if (pos[0] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]+= this.getRadius(); else if (pos[0] - this.getRadius() >= this.superWorld.getWorldHeight()) pos[0]-= this.getRadius(); else if (pos[1] + this.getRadius() >= this.superWorld.getWorldHeight()) pos[1]+= this.getRadius(); else pos[1] -= this.getRadius(); return pos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double[] getCollisionPosition(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\t\n\n\t\tif ( this.overlap(otherEntity) ) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif ( this.getTimeToCollisio...
[ "0.67058855", "0.6622497", "0.65319127", "0.621248", "0.6109031", "0.6073427", "0.585202", "0.58333325", "0.58200717", "0.5805759", "0.5793666", "0.5774901", "0.5708396", "0.56925195", "0.5687605", "0.55979854", "0.55392456", "0.5519982", "0.5519982", "0.54904354", "0.5462019...
0.6273406
3
Method that deals with collisions between entities and boundaries.
public void collideBoundary(){ int bulletBouncer = 0; if ((this.getPosition()[0]-(this.getRadius()) <= 0.0 || (this.getPosition()[0]+(this.getRadius()) >= this.superWorld.getWorldWidth()))){ if (this instanceof Bullet){ bulletBouncer++; } this.velocity.setXYVelocity( this.velocity.getVelocity()[0] * -1); } if ((this.getPosition()[1]-(this.getRadius()) <= 0.0 || (this.getPosition()[1]+(this.getRadius()) >= this.superWorld.getWorldHeight()))){ if (this instanceof Bullet){ bulletBouncer++; } this.velocity.setYVelocity(this.velocity.getVelocity()[1] * -1); } if (this instanceof Bullet){ Bullet bullet = (Bullet) this; for (int i = 0; i < bulletBouncer; i++){ if (!bullet.isTerminated()) bullet.bouncesCounter(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void applyEntityCollision(Entity entityIn) {\n }", "public abstract void collideWith(Entity entity);", "public abstract boolean collide(int x, int y, int z, int dim, Entity entity);", "@Override\n\tpublic void collide(Entity e) {\n\n\t}", "void checkCollision(Entity other);", "@Override\n\tpubli...
[ "0.7896268", "0.78719276", "0.7418993", "0.7366563", "0.72106284", "0.7172774", "0.71200186", "0.70948935", "0.7093819", "0.7059763", "0.7025855", "0.6949578", "0.69285166", "0.6924437", "0.6908813", "0.69057655", "0.6893375", "0.68691605", "0.6847471", "0.6835448", "0.679728...
0.6872337
17
Defensive A method to get the distance between two centers entities.
public double getDistanceBetweenCenter(Entity entity) throws IllegalArgumentException{ if(this == entity) throw new IllegalArgumentException("this == entity"); else{ double diffx = Math.abs(entity.getPosition()[0] - this.getPosition()[0]); double diffy = Math.abs(entity.getPosition()[1] - this.getPosition()[1]); double diff = Math.sqrt(Helper.square(diffx) + Helper.square(diffy)); return diff; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public float distance(Entity other) {\n return getCenteredCoordinate().distance(other.getCenteredCoordinate());\n }", "public double getDistance(){\r\n\t\treturn Math.sqrt(\r\n\t\t\t\t(\r\n\t\t\t\t\tMath.pow(\r\n\t\t\t\t\t\tthis.getFirstObject().getCenterX()\r\n\t\t\t\t\t\t- this.getSecondObject().getC...
[ "0.75885284", "0.73033196", "0.71155506", "0.7047637", "0.69731474", "0.69445646", "0.6895842", "0.6886741", "0.6850703", "0.68497145", "0.68284494", "0.6759335", "0.6740292", "0.67345107", "0.6705429", "0.6685436", "0.668281", "0.66814953", "0.66811234", "0.66088456", "0.658...
0.71881884
2
A method to get the distance between two edges entities.
public double getDistanceBetweenEdge(Entity entity) throws IllegalArgumentException{ if(this == entity) throw new IllegalArgumentException("this == entity @ getDistanceBetweenEdge"); return getDistanceBetweenCenter(entity) - this.getRadius() - entity.getRadius(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static double distancia(Entidade e1,Entidade e2){\r\n\t\tdouble dx = e1.getPosicaoX() - e2.getPosicaoX();\r\n\t\tdouble dy = e1.getPosicaoY() - e2.getPosicaoY();\r\n\t\tdouble d = Math.sqrt(dx*dx + dy*dy);\r\n\t\treturn d;\r\n\t}", "public double distance() {\n \tif (dist == -1) {\n \t\tdist = dista...
[ "0.7009215", "0.6997359", "0.6970626", "0.69149363", "0.6903942", "0.6808647", "0.6797006", "0.67274", "0.66764486", "0.6619434", "0.659666", "0.6545583", "0.6401389", "0.639982", "0.63958347", "0.634499", "0.63036567", "0.6256994", "0.6243667", "0.6236818", "0.62138486", "...
0.7290474
0
Defensive A method to check whether two entity overlap.
public boolean overlap(Entity entity){ if (entity == null) throw new IllegalArgumentException("The second entity does not exist. @overlap"); if (this == entity) return true; return this.getDistanceBetweenEdge(entity) <= -0.01; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean overlap(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\tif (this == otherEntity) return true;\n\t\t\n\t\tif ( this.getDistanceBetween(otherEntity) < -0.01)\n\t\t\treturn true;\n\...
[ "0.76987976", "0.7591737", "0.7368229", "0.7267188", "0.725929", "0.72227496", "0.7215723", "0.721205", "0.71928734", "0.7140651", "0.7134548", "0.7044385", "0.7015745", "0.69971925", "0.6990632", "0.6935063", "0.6921581", "0.68792146", "0.6871441", "0.6851502", "0.68425524",...
0.78739053
0
A method that checks whether or not an entity overlaps with any other entity.
public boolean overlapAnyEntity(){ return this.getSuperWorld().getEntities().stream().anyMatch(T ->this.overlap(T)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean overlap(Entity entity){\n \t\n \tif (entity == null) throw new IllegalArgumentException(\"The second entity does not exist. @overlap\");\n\t\tif (this == entity) return true;\n\t\treturn this.getDistanceBetweenEdge(entity) <= -0.01;\n }", "public boolean overlap(Entity otherEntity) throws...
[ "0.79230666", "0.7575197", "0.725206", "0.7161679", "0.67878145", "0.6786093", "0.6738798", "0.67319983", "0.66782004", "0.66728836", "0.665247", "0.66207933", "0.66023505", "0.6596589", "0.65957093", "0.6544277", "0.6542842", "0.65394384", "0.65383095", "0.65287054", "0.6511...
0.7788805
1
A method to get the position where two entities collide.
public double[] getCollisionPosition(Entity entity) throws IllegalArgumentException{ if (entity == null) throw new IllegalArgumentException("getCollisionPosition called with a non-existing circular object!"); if (this.overlap(entity)) throw new IllegalArgumentException("These two circular objects overlap!"); double timeToCollision = getTimeToCollision(entity); if (timeToCollision == Double.POSITIVE_INFINITY) return null; double[] positionThisShip = this.getPosition(); double[] velocityThisShip = this.getVelocity(); double[] positionShip2 = entity.getPosition(); double[] velocityShip2 = entity.getVelocity(); double xPositionCollisionThisShip = positionThisShip[0] + velocityThisShip[0] * timeToCollision; double yPositionCollisionThisShip = positionThisShip[1] + velocityThisShip[1] * timeToCollision; double xPositionCollisionShip2 = positionShip2[0] + velocityShip2[0] * timeToCollision; double yPositionCollisionShip2 = positionShip2[1] + velocityShip2[1] * timeToCollision; double slope = Math.atan2(yPositionCollisionShip2 - yPositionCollisionThisShip, xPositionCollisionShip2 - xPositionCollisionThisShip); return new double[] {xPositionCollisionThisShip + Math.cos(slope) * this.getRadius(), yPositionCollisionThisShip + Math.sin(slope) * this.getRadius()}; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double[] getCollisionPosition(Entity otherEntity) throws IllegalArgumentException {\n\t\tif (otherEntity == null) \n\t\t\tthrow new IllegalArgumentException(\"Invalid argument object (null).\");\n\t\t\n\n\t\tif ( this.overlap(otherEntity) ) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif ( this.getTimeToCollisio...
[ "0.7144755", "0.66509634", "0.6609152", "0.6350467", "0.6337829", "0.62968975", "0.62066025", "0.61662793", "0.61358273", "0.61194664", "0.6116108", "0.6073424", "0.6015539", "0.6011781", "0.59631246", "0.59631133", "0.5888672", "0.5864695", "0.58354247", "0.5825329", "0.5825...
0.6584736
3
A helper method to get the center of a entity when it traveled over a time.
public double[] getDistanceTraveled(double time){ assert ((time > 0) && Helper.isValidDouble(time)); double pos[] = new double[2]; pos[0] = this.getPosition()[0] + this.getVelocity()[0] * time; pos[1] = this.getPosition()[1] + this.getVelocity()[1] * time; return pos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Location getEntityCenter(Entity entity) {\n\t\treturn entity.getBoundingBox().getCenter().toLocation(entity.getWorld());\n\t}", "Point getCenter();", "Point getCenter();", "private int getMidPoint(int cordinate)\n {\n int mid_point = ((cordinate + Player.getWidth_of_box()) / 2);\n return mid_...
[ "0.6717956", "0.65796417", "0.65796417", "0.6371724", "0.62740415", "0.6156717", "0.61284715", "0.60724", "0.60527503", "0.60520625", "0.60349673", "0.60027456", "0.5951044", "0.5923008", "0.5917532", "0.58972996", "0.5886919", "0.58845377", "0.5879546", "0.58688825", "0.5859...
0.0
-1
ESCRIBIR OAIPMH CON METADATA EN DUBLIN CORE EN CASO DE SER UN GETRECORD O LISTRECORDS
public void escribirOAIPMH_DC(OAIPMHAgrega oaipmh, Writer writer) throws ParseadorException { try { Marshaller marshaller = new Marshaller(writer); marshaller.setEncoding(getProperty("default.encoding")); marshaller.setNamespaceMapping("oai_dc", "http://www.openarchives.org/OAI/2.0/oai_dc/"); marshaller.setNamespaceMapping("dc", "http://purl.org/dc/elements/1.1/"); marshaller.setSchemaLocation("http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd " + "http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd"); marshaller.setSuppressXSIType(true); marshaller.setEncoding(getProperty("default.encoding")); marshaller.setValidation(false); marshaller.marshal(oaipmh.getOaipmh()); } catch (MarshalException e) { throw new ParseadorException( "Error de parseo al escribir el oaipmh", e); } catch (ValidationException e) { throw new ValidacionException( "Error de validacion al escribir el oaipmh", e); } catch (IOException e) { throw new ParseadorException( "No se pudo abrir el fichero oaipmh para su escritura", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings({ \"rawtypes\", \"unchecked\" })\n public MapList getConnectedPCMDataForSLC(Context context, String[] args) throws Exception {\n\n try {\n Map programMap = (Map) JPO.unpackArgs(args);\n\n String objectId = (String) programMap.get(\"objectId\");\n String ...
[ "0.57651025", "0.54318017", "0.5235707", "0.52241033", "0.5077547", "0.5034718", "0.5022301", "0.49758604", "0.49487624", "0.49411994", "0.49346852", "0.49188787", "0.49118268", "0.49078667", "0.48868385", "0.48826438", "0.48814493", "0.4875941", "0.4859228", "0.48298916", "0...
0.0
-1
ESCRIBIR GENERICOS Escribe los xml de la respuestas a cualquier tipo request de OAIPMH (Identify,ListMetadataFormats,ListSets,ListIdentifiers,ListRecords,GetRecord)
public void escribirOAIPMH(OAIPMHAgrega oaipmh, Writer writer, int tipo) throws ParseadorException { try { Marshaller marshaller = new Marshaller(writer); marshaller.setEncoding(getProperty("default.encoding")); String schemas = "http://www.openarchives.org/OAI/2.0/ http://www.openarchives.org/OAI/2.0/OAI-PMH.xsd"; if(tipo == IDENTIFY){ String nameSpace = getProperty("nameSpaceIdentify"); String urlNameSpace = getProperty("urlNameSpaceIdentiy"); marshaller.setNamespaceMapping(nameSpace, urlNameSpace); String schemaLocIdentify = getProperty("schemaLocIdentify"); schemas = schemas + " " + schemaLocIdentify; } else if (tipo == GETRECORD || tipo == LISTRECORDS){ String nameSpaceOAIDC = getProperty("nameSpaceOAIDC"); String urlNameSpaceOAIDC = getProperty("urlNameSpaceOAIDC"); marshaller.setNamespaceMapping(nameSpaceOAIDC, urlNameSpaceOAIDC); String schemaLocOAIDC = getProperty("schemaLocOAIDC"); schemas = schemas + " " + schemaLocOAIDC; String nameSpaceDC = getProperty("nameSpaceDC"); String urlNameSpaceDC =getProperty("urlNameSpaceDC"); marshaller.setNamespaceMapping(nameSpaceDC, urlNameSpaceDC); } marshaller.setSchemaLocation(schemas); marshaller.setSuppressXSIType(true); marshaller.setEncoding(getProperty("default.encoding")); marshaller.setValidation(false); marshaller.marshal(oaipmh.getOaipmh()); } catch (MarshalException e) { throw new ParseadorException( "Error de parseo al escribir el oaipmh", e); } catch (ValidationException e) { throw new ValidacionException( "Error de validacion al escribir el oaipmh", e); } catch (IOException e) { throw new ParseadorException( "No se pudo abrir el fichero oaipmh para su escritura", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws Exception {\n\t\tString response = \"<AuditResultHospital xmlns=\\\"http://schemas.datacontract.org/2004/07/BMI.Engine.Common.Hospital\\\" xmlns:i=\\\"http://www.w3.org/2001/XMLSchema-instance\\\">\"\n\t\t\t\t+ \"<ClaimID>50b768e10c02b60f7c9343d9</ClaimID>\" + \"<Elaps...
[ "0.57882714", "0.56300265", "0.56212366", "0.5581528", "0.55781347", "0.55710334", "0.5550184", "0.5544871", "0.5503959", "0.54969794", "0.5468168", "0.5464511", "0.5463959", "0.54345345", "0.542829", "0.5389392", "0.5387285", "0.5381404", "0.53811955", "0.5375609", "0.536435...
0.0
-1
Interface representing an HTTP request.
public interface HttpRequest { /** * Gets the HTTP request {@link URL}. */ URL getUrl(); /** * Gets the HTTP request method. */ String getMethod(); /** * Gets an immutable map containing the request headers and their values. */ Map<String, List<String>> getHeaders(); /** * Gets the header's value. * * @param name Header name for which to retrieve the value. * * @return The header's value, which might also be {@code null} if not set. */ String getHeader(String name); /** * Sets an HTTP header or overwrites an existing HTTP header with new value. * <p> * Trying to set an HTTP header with null name will return immediately. * Trying to set one of the following restricted headers will also return immediately. * </p> * <ul> * <li>{@code Access-Control-Request-Headers}</li> * <li>{@code Access-Control-Request-Method}</li> * <li>{@code Connection}</li> * <li>{@code Content-Length}</li> * <li>{@code Content-Transfer-Encoding}</li> * <li>{@code Host}</li> * <li>{@code Keep-Alive}</li> * <li>{@code Origin}</li> * <li>{@code Trailer}</li> * <li>{@code Transfer-Encoding}</li> * <li>{@code Upgrade}</li> * <li>{@code Via}</li> * </ul> * * @param name The header's name, which must not be {@code null} or any of the restricted headers. * @param value The header's value */ void setHeader(String name, String value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IHttpRequest {\n Map<String, String> getHeaders();\n\n Map<String, String> getBodyParams();\n\n Map<String, String> getCookies();\n\n String getMethod();\n\n void setMethod(String method);\n\n String getUrl();\n\n void setUrl(String url);\n\n void addHeader(String header, S...
[ "0.75705814", "0.75439936", "0.73527986", "0.71763974", "0.7053579", "0.7019913", "0.69628406", "0.6944111", "0.687306", "0.68613595", "0.6816985", "0.6790411", "0.6740628", "0.6712765", "0.66747075", "0.65957016", "0.6558242", "0.6551507", "0.6543021", "0.65202284", "0.65166...
0.7103324
4
Gets the HTTP request method.
String getMethod();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getRequestMethod()\n {\n return requestMethod;\n }", "public String getRequestMethod(){\n return this.requestMethod;\n }", "public HTTPRequestMethod getMethod();", "@Override\n\tpublic String getRequestMethod() {\n\t\treturn requestMethod;\n\t}", "public String getHttpM...
[ "0.8266261", "0.80912584", "0.8072783", "0.79883087", "0.79233855", "0.79163384", "0.7897178", "0.78841203", "0.78841203", "0.78641117", "0.77921194", "0.7761275", "0.77607703", "0.77286935", "0.75749606", "0.752505", "0.74549514", "0.74189484", "0.7302455", "0.72302145", "0....
0.68353856
30
Gets an immutable map containing the request headers and their values.
Map<String, List<String>> getHeaders();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Map<String, String> getRequestHeaders();", "public Map<String, String> getRequestHeaders(HttpServletRequest request) {\n Map<String, String> headers = new HashMap<String, String>();\n\n if (request == null)\n return headers;\n\n Enumeration headerNames = request.getHeaderNames();\...
[ "0.82624054", "0.78526145", "0.78103787", "0.7796311", "0.7709923", "0.76288927", "0.7596782", "0.73609644", "0.7271843", "0.7197566", "0.7121264", "0.7107575", "0.69625187", "0.691864", "0.6911859", "0.691014", "0.6862452", "0.685427", "0.6842114", "0.6839521", "0.6725024", ...
0.74183846
7
/ this driver are avaliable at it is also included in the zip package. to compile this program you have to download and add it your buildpath. If everything fails and executable are available at
public static void main(String[] argv) throws SQLException { try { Class.forName("org.postgresql.Driver"); } catch (ClassNotFoundException e) { e.printStackTrace(); return; } /* * Establishing connection */ try { dbconn = DriverManager.getConnection( "jdbc:postgresql://178.63.131.184:5432/dbwa2", "dbwa2", "diku2012"); } catch (SQLException e) { System.out .println("Your internet connection or my server is dead.. :("); return; } /* * If connection were successfully established, then run * printCategoryTable(); and afterwards close the connection. */ if (dbconn != null) { System.out .println("Fetching and formating data, please wait a few seconds!!\n\n"); printCategoryTable(); dbconn.close(); } else { System.out.println("Failed to make connection!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException {\n\t\tFileChannel fc = FileChannel.open(Paths.get(\"F:/eclipse-jee-luna-SR2-win32-x86_64.zip\"), StandardOpenOption.READ);\r\n\t\tFileChannel w = FileChannel.open(Paths.get(\"‪F:/mobansdfd.zip\"), EnumSet.of(StandardOpenOption.CREATE_NEW, StandardOpenOptio...
[ "0.59038657", "0.57963663", "0.5719043", "0.569816", "0.5692783", "0.5661349", "0.5642808", "0.56174195", "0.5608775", "0.5597704", "0.55795455", "0.55580246", "0.55133104", "0.5512524", "0.5509306", "0.54643077", "0.5462184", "0.54496855", "0.54466397", "0.5439335", "0.54191...
0.0
-1
/ Create an int array, representing the (length+10) of the longest element in every column.
public static void printCategoryTable() throws SQLException { PreparedStatement stmtGetLengthOfColumns = dbconn .prepareStatement("SELECT max(character_length((cast(categoryid as text)))) as lenid, max(character_length(trim(both ' ' from categoryname))) as lenname,max(character_length(trim(both ' ' from description))) as lendes FROM nw_category"); ResultSet rsGetLengthOfColumns = stmtGetLengthOfColumns.executeQuery(); int[] columnLengths = new int[3]; rsGetLengthOfColumns.next(); for (int i = 0; 3 > i; i++) { columnLengths[i] = rsGetLengthOfColumns.getInt(i + 1) + 10; } /* * Executing the query to get the categories and resturnning data and * metadata to resultsets. */ PreparedStatement pstmt = dbconn .prepareStatement("SELECT categoryid,categoryname,description from nw_category"); ResultSet rs = pstmt.executeQuery(); ResultSetMetaData rsmd = rs.getMetaData(); /* * Printf ColumnLabels */ for (int i = 0; rsmd.getColumnCount() > i; i++) { System.out.printf("|%-" + columnLengths[i] + "S", rsmd.getColumnLabel(i + 1)); } System.out.print("|\n"); /* * Printf seperator for data and metadata */ for (int i = 0; (rsmd.getColumnCount()) > i; i++) { String sep = ""; for (int j = 0; j < columnLengths[i]; j++) { sep = sep + "-"; } System.out.print("+" + sep); } System.out.print("+\n"); /* * Printf data; */ while (rs.next()) { for (int i = 0; rsmd.getColumnCount() > i; i++) { System.out.printf("|%-" + columnLengths[i] + "s", rs.getString(i + 1)); } System.out.print("|\n"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int[] longestSequence(int arrayParameter[]) {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tint arrayLength=arrayParameter.length;\r\n\t\tint maxSequenceFirstIndex=0;\r\n\t\tint maxSequenceLength=0;\r\n\t\tint temperarySequenceLength=1;\r\n\t\tint arrayFirstIndex;\r\n\t\tint arrayLastIndex;\r\n\t\tint ...
[ "0.5989729", "0.59143007", "0.5845297", "0.5784342", "0.57554847", "0.5693489", "0.56274", "0.5615397", "0.55319417", "0.55300987", "0.5523266", "0.5522342", "0.5509306", "0.5483125", "0.5470952", "0.54513645", "0.5444191", "0.5429009", "0.5420459", "0.5414847", "0.5411078", ...
0.0
-1
IP donde se encuentra el broker / Constructor del Servidor A
public ServerA(){}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void connect(){\n // Averiguem quina direccio IP hem d'utilitzar\n InetAddress iAddress;\n try {\n iAddress = InetAddress.getLocalHost();\n String IP = iAddress.getHostAddress();\n\n //Socket sServidor = new Socket(\"172.20.31.90\", 33333);\n ...
[ "0.6702812", "0.66442037", "0.652145", "0.6343684", "0.6340324", "0.6310315", "0.6161871", "0.60895413", "0.6081581", "0.60570735", "0.60479516", "0.6047344", "0.59895235", "0.59818596", "0.5978714", "0.59628457", "0.59308946", "0.59298426", "0.59298426", "0.5910162", "0.5908...
0.6042307
12
/ Devuelve un string con la fecha actual
public String dar_fecha(){ Date date = new Date(); DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy"); return dateFormat.format(date).toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String ObtenerFechaActual() {\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/mm/yyyy\");\n Calendar calendar = GregorianCalendar.getInstance();\n return String.valueOf(simpleDateFormat.format(calendar.getTime()));\n }", "public static String fechaActual() {\n ...
[ "0.76390636", "0.7530866", "0.7464792", "0.71684235", "0.7139787", "0.66954535", "0.66903657", "0.66329736", "0.66329736", "0.66103995", "0.65582794", "0.64196444", "0.64023435", "0.6318412", "0.6237833", "0.6236237", "0.6233031", "0.6215238", "0.6210151", "0.6143083", "0.609...
0.6193807
19
/ Devuelve un string con la hora actual
public String dar_hora(){ Date date = new Date(); DateFormat dateFormat = new SimpleDateFormat("HH:mm:ss"); return dateFormat.format(date).toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@RequiresApi(api = Build.VERSION_CODES.O)\n public String obtenerHora(){\n this.hora = java.time.LocalDateTime.now().toString().substring(11,13);\n return this.hora;\n }", "public String getHora() {\n Calendar calendario = new GregorianCalendar();\n SimpleDateFormat sdf = new Si...
[ "0.73671526", "0.7128469", "0.6980577", "0.65961474", "0.6440645", "0.6395144", "0.628922", "0.62697476", "0.6268237", "0.6246771", "0.6203634", "0.61625326", "0.6106786", "0.6102544", "0.609471", "0.6090362", "0.60873544", "0.6043516", "0.60405034", "0.6027133", "0.59860945"...
0.73302263
1
/ Metodo Main del servidor A. Registra el servidor en el registro RMI
public static void main(String[] args){ try{ // El servidor se registra en RMI IP = args[0]; IPBroker = args[1]; Registry registryA = LocateRegistry.getRegistry(); ServerAInterface sA = new ServerA(); ServerAInterface stub = (ServerAInterface) UnicastRemoteObject.exportObject(sA,0); System.setProperty("java.rmi.server.hostname",IP); registryA.rebind("//"+IP+":ServerA",stub); System.out.println("Servidor A registrado correctamente."); // Obtenemos el Broker Registry registry = LocateRegistry.getRegistry(IPBroker); ServicesBrokerInterface s = (ServicesBrokerInterface) registry.lookup("//"+IPBroker+":ServicesBroker"); Scanner teclado = new Scanner(System.in); boolean finalizar = false; String entrada = ""; while (!finalizar) { System.out.println("\n--------------------------------------\n"); System.out.println("LISTA DE SERVICIOS DEL SERVIDOR B:\n" + " - Nombre: introducir_libro; Parametros: String nombreLibro; Return: Void \n" + " - Nombre: lista_libros; Parametros: none; Return: ArrayList<String> \n"); System.out.println("¿Que desea hacer? \n"+ " 1 - Introducir libro\n"+ " 2 - Obtener lista de libros\n"); System.out.print("Accion: "); entrada = teclado.nextLine(); if (entrada.equals("1")) { System.out.println("Introduzca el titulo del libro que desea almacenar:"); System.out.print("Titulo:"); entrada = teclado.nextLine(); System.out.println(s.ejecutar_servicio("introducir_libro", entrada)); } else if (entrada.equals("2")) { System.out.println(s.ejecutar_servicio("lista_libros","")); } else System.out.println("Accion no existente."); } }catch (RemoteException e){ System.out.println(e); } catch (ArrayIndexOutOfBoundsException e) { System.out.println("Es necesario pasar como parametro la IP del servidor donde se hostea el registro RMI y la IP del Broker."); } catch (NotBoundException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String args[]) {\n try {\n LocateRegistry.createRegistry(80);\n OperacoesImpl obj = new OperacoesImpl();\n Naming.rebind(\"ServerRMI\", obj);\n System.out.println(\"Server RMI pronto.\");\n } catch (Exception e) {\n System...
[ "0.73900545", "0.7312897", "0.7192309", "0.7187257", "0.7140742", "0.71342367", "0.7123782", "0.70051914", "0.7000186", "0.688472", "0.6861395", "0.6829134", "0.6741962", "0.67328715", "0.6715259", "0.6705653", "0.6702795", "0.66907865", "0.6683228", "0.6674167", "0.6661989",...
0.6854584
11
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.adicionar_treino, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.72461367", "0.7201596", "0.7195268", "0.7177002", "0.71069986", "0.7039653", "0.70384306", "0.70115715", "0.7010647", "0.69803435", "0.6945406", "0.69389313", "0.6933442", "0.69172275", "0.69172275", "0.6890826", "0.6883689", "0.687515", "0.6874831", "0.68615955", "0.68615...
0.0
-1
Instantiates a new Iterator 1.
public Iterator1(String nums) { this.nums = nums; this.numsMass = nums.split(""); this.iterReverse = true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Iterator iterator () {\n return new MyIterator (first);\n }", "public Iterator()\n {\n this(null, null, true);\n }", "public Iterator()\n {\n this(null, null, true);\n }", "public Iterator()\n ...
[ "0.7153429", "0.70570856", "0.70570856", "0.70570856", "0.68016726", "0.6725864", "0.6724752", "0.67049253", "0.66384715", "0.6589927", "0.64680576", "0.6458902", "0.64147687", "0.640727", "0.6387957", "0.6367787", "0.6338922", "0.6287652", "0.6283475", "0.62713116", "0.62358...
0.5649237
90
The entry point of application.
public static void main(String[] args) { var x = new Iterator1("123456789101112"); System.out.println(x.getNums()); for (String d : x) { System.out.println(d); } x.iterReverse = false; System.out.println("*****"); for (String d : x) { System.out.println(d); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\trunApplication();\n\t}", "public static void main(String[] args) {\n startApplication();\n }", "public static void main(String arg[]) {\n\n\t\tUtility.runApplication();\n\t}", "public static void main(String[] args) {\r\n \t\r\n // Creates new...
[ "0.73630613", "0.7347031", "0.7215883", "0.71634805", "0.71544456", "0.71317524", "0.7123426", "0.7119055", "0.70908254", "0.7038634", "0.7020937", "0.7018889", "0.70058846", "0.7001001", "0.69867754", "0.6964717", "0.6941777", "0.693072", "0.69003654", "0.6891231", "0.688928...
0.0
-1
TODO: Move to an upper/separate generic class
@Override public void enter(ViewChangeListener.ViewChangeEvent event) { Map<String, String> parametersMap = event.getParameterMap(); Logger.getLogger(this).info("Parameters map " + Arrays.toString(parametersMap.entrySet().toArray())); this.selectedCustomerId = Integer.parseInt(parametersMap.getOrDefault("customer", "0")); this.selectedSiteId = Integer.parseInt(parametersMap.getOrDefault("site", "0")); this.selectedVehicleId = Integer.parseInt(parametersMap.getOrDefault("vehicle", "0")); super.enter(event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testGenericMethod() {\n \n }", "@Override\n public boolean isGeneric() { \n return false;\n }", "abstract public T getInfo();", "public abstract Result<T> mo66250a();", "public interface ComplexDataObjectParser extends IKeyValueObjectParser<Object, ComplexDataObject> {\r\n...
[ "0.59038025", "0.5574628", "0.5522019", "0.55065256", "0.5456803", "0.5400349", "0.5382727", "0.52244306", "0.5216885", "0.5208066", "0.5201286", "0.5172014", "0.5168909", "0.5166891", "0.5160411", "0.5141181", "0.5131972", "0.51222366", "0.51186806", "0.5117865", "0.5116069"...
0.0
-1
New instance car list fragment.
public static CarListFragment newInstance() { return new CarListFragment(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void carlist() {\n Cars xx = new Cars();\n System.out.println(\"You have \" + String.valueOf(listcars.size())+ \" cars\");\n System.out.println(\"List of all your cars \");\n for (int i = 0; i < listcars.size();i++) {\n xx = listcars.get(i);\n System....
[ "0.6577033", "0.6553929", "0.64459383", "0.62912846", "0.6169122", "0.6107836", "0.6100356", "0.60767925", "0.5947404", "0.59257615", "0.5908195", "0.5901835", "0.5890855", "0.5886863", "0.5781075", "0.5766637", "0.57567304", "0.5737009", "0.5735818", "0.57343924", "0.5724045...
0.7499565
0
This function hide progress wheel
private void hideProgress() { if(null != mErrorTextView) { mErrorTextView.setVisibility(View.GONE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void hideMainLoadingWheel();", "void hideProgress();", "void hideProgress() {\n removeProgressView();\n removeScreenshotView();\n }", "void hideNextEventsLoadingWheel();", "private void hideProgressIndicator() {\n setProgressBarIndeterminateVisibility(false);\n setProgressB...
[ "0.8111602", "0.8027625", "0.77144605", "0.771163", "0.76943547", "0.76055384", "0.7518389", "0.7408465", "0.7404047", "0.7302505", "0.7225287", "0.7173753", "0.71697074", "0.71625334", "0.711526", "0.7066975", "0.70260996", "0.70088816", "0.69979745", "0.6986823", "0.6981812...
0.67880094
25
This function bring some hacks to JStorm, this isn't a good way
@Deprecated public static StormZkClusterState mkStormZkClusterState(Map conf) throws Exception { Map realConf = getFullConf(conf); return new StormZkClusterState(realConf); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tpublic void jugar() {}", "public void method_4270() {}", "public void m9741j() throws cf {\r\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "private stendhal() {...
[ "0.5777844", "0.57271785", "0.5537556", "0.5532021", "0.545308", "0.53939646", "0.53845745", "0.53626966", "0.53617775", "0.5358974", "0.53339905", "0.53323823", "0.526796", "0.5260452", "0.5256198", "0.5252159", "0.5251791", "0.5249202", "0.5249202", "0.52417356", "0.5220636...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { ArrayList<String> clist=getCode(); ArrayList<String> clist1=getCode1(); for(String code:clist){ if(clist1.contains(code)){ continue; } System.out.println(code); MongoCollection<Document> collection=mongo.getShardConn("ss_all_speak"); BasicDBObject find=new BasicDBObject(); find.put("stock_code",code); // find.put("website","同花顺"); MongoCursor<Document> cursor =collection.find(find).batchSize(1000).noCursorTimeout(true).iterator(); HashMap<String, HashMap<String, Object>> dmap=new HashMap<String, HashMap<String,Object>>(); while(cursor.hasNext()){ Document doc=cursor.next(); Object list=doc.get("list"); String time=doc.getString("timedel").trim(); HashMap<String, Object> map=countNamesAndComments(list,time); map.put("time",time); if(dmap.containsKey(time)){ HashMap<String, Object> tmp=dmap.get(time); int a1=Integer.parseInt(map.get("names").toString()); int b1=Integer.parseInt(map.get("comments").toString()); int a2=Integer.parseInt(tmp.get("names").toString()); int b2=Integer.parseInt(tmp.get("comments").toString()); tmp.put("names", a1+a2); tmp.put("comments", b1+b2); dmap.put(time, tmp); }else{ dmap.put(time, map); } } cursor.close(); ArrayList<HashMap<String, Object>> dlist=new ArrayList<HashMap<String,Object>>(); for(String key:dmap.keySet()){ HashMap<String, Object> tmp=dmap.get(key); dlist.add(tmp); } Collections.sort(dlist, new Comparator<HashMap<String, Object >>() { public int compare(HashMap<String, Object > a, HashMap<String, Object > b) { String one =a.get("time").toString(); String two = b.get("time").toString(); int time=str2TimeMuli(one); int time1=str2TimeMuli(two); return time - time1; } }); if(!dlist.isEmpty()){ HashMap<String, Object> lastmap=new HashMap<String, Object>(); lastmap.put("id", code); lastmap.put("list", dlist); // System.out.println(lastmap.toString()); try { mongo.upsertMapByTableName(lastmap, "ss_data_count1"); } catch (Exception e) { // TODO Auto-generated catch block e.printStackTrace(); } } } }
{ "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
Get stabbed or shot and health is reduced by dmg.
public void takeDamage(int dmg) { health -= dmg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getDamaged(float dmg) {\n\t\tStagePanel.addValueLabel(parentGP,dmg,Commons.cAttack);\n\t\tif(shield - dmg >= 0) {\n\t\t\tshield-=dmg;\n\t\t\tdmg = 0;\n\t\t}else {\n\t\t\tdmg-=shield;\n\t\t\tshield = 0;\n\t\t}\n\t\tif(health-dmg > 0) {\n\t\t\thealth-=dmg;\n\t\t}else {\n\t\t\thealth = 0;\n\t\t}\n\t\tSoun...
[ "0.71346617", "0.70251745", "0.7024118", "0.6940777", "0.6940777", "0.6940777", "0.6940777", "0.6940777", "0.6829581", "0.68080705", "0.67488635", "0.6696305", "0.6684921", "0.6568678", "0.6547043", "0.6493446", "0.64917105", "0.6467781", "0.6439283", "0.6433815", "0.6419933"...
0.59848964
72
Constructor que crea una canasta de productos alimenticios
public Basket(double price, String name, int quantityForSold, double priceOfProvider, Quantity quantity) { super(price, name, quantityForSold, priceOfProvider, quantity); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Alojamiento() {\r\n\t}", "public Productos() {\n super();\n // TODO Auto-generated constructor stub\n }", "public Aritmetica(){ }", "public Funcionalidad() {\n Cajero cajero1 = new Cajero(\"Pepe\", 2);\n empleados.put(cajero1.getID(), cajero1);\n Reponedor reponed...
[ "0.64074785", "0.6394578", "0.6354895", "0.6304881", "0.62772566", "0.6236783", "0.623474", "0.6208335", "0.618338", "0.6145195", "0.61176825", "0.61157465", "0.6104909", "0.61029565", "0.6102362", "0.6084981", "0.60702366", "0.6067123", "0.6064753", "0.60602283", "0.6051644"...
0.0
-1
con el atributo salario,
public Volunteer(int salarioBase) { super(); this.setCoeficiente(this.COEFICIENTE); try { this.setSueldoBase(salarioBase); } catch (Throwable e) { JOptionPane.showMessageDialog(null, "Volunteer no puede tener salario"); e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void salarioAtual() {\n\t\tSystem.out.print(\"VALOR ATUAL\"+this.valor);\r\n\t\t\r\n\t}", "@Override\n public void cantidad_Ataque(){\n ataque=5+2*nivel+aumentoT;\n }", "void setSalario(double salario);", "private void esqueceu() {\n\n //Declaração de Objetos\n ...
[ "0.62715745", "0.6248691", "0.62246037", "0.61742795", "0.6171033", "0.6168294", "0.6153612", "0.6137343", "0.61329716", "0.6083755", "0.6037787", "0.6031184", "0.5997854", "0.5981374", "0.5978614", "0.59505826", "0.59056294", "0.5901838", "0.5900799", "0.5900027", "0.5899657...
0.0
-1
para controlar el salario de Volunteer, no cobra nada o recibe ayuda governal hasta 300 euros,
public void setSueldoBase(int salarioBase) throws Throwable { int ayuda; if (salarioBase <= 300) { ayuda = JOptionPane.showOptionDialog(null, "Ayuda governal", "Tiene ayuda governal?", JOptionPane.YES_NO_CANCEL_OPTION, JOptionPane.QUESTION_MESSAGE, null, new Object[] { "No", "Sí" }, "Sí"); this.sueldoBase = ayuda > 0 ? salarioBase : 0; } else { throw new Exception(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Volunteer(int salarioBase) {\n\n\t\tsuper();\n\t\tthis.setCoeficiente(this.COEFICIENTE);\n\n\t\ttry {\n\t\t\tthis.setSueldoBase(salarioBase);\n\t\t} \n\t\tcatch (Throwable e) {\n\t\t\tJOptionPane.showMessageDialog(null, \"Volunteer no puede tener salario\");\n\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "pr...
[ "0.65590364", "0.58372825", "0.56983835", "0.5672668", "0.56203043", "0.5593167", "0.5583476", "0.55735284", "0.5570834", "0.55631363", "0.5550796", "0.55351406", "0.55317974", "0.55244285", "0.5510398", "0.54695684", "0.5450752", "0.54434353", "0.5442923", "0.5437437", "0.54...
0.0
-1
para mostrar que cobra voluntario,
public void cobrar() { JOptionPane.showInternalMessageDialog(null, this.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String toString(){\n return \" Vuelo \"+this.getTipo()+\" \" +this.getIdentificador() +\"\\t \"+ this.getDestino()+ \"\\t salida prevista en \" + timeToHour(this.getTiemposal())+\" y su combustible es de \"+this.getCombustible()+\" litros.( \"+ String.format(\"%.2f\", this.getCom...
[ "0.6571364", "0.6505852", "0.61559427", "0.6080081", "0.6079541", "0.60614383", "0.60330194", "0.6026302", "0.6013155", "0.60113186", "0.6008039", "0.5992625", "0.5984357", "0.59647125", "0.5944138", "0.5943195", "0.59348637", "0.5906201", "0.58944076", "0.58923435", "0.58911...
0.0
-1
Nothing to do ...
@Override public long apply(ICreationCondition condition, ICreationData action, boolean optional, long apply) { return apply; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\...
[ "0.6758159", "0.66072506", "0.6602716", "0.6530756", "0.6504949", "0.64956236", "0.64941657", "0.6480964", "0.6415343", "0.64063305", "0.6354142", "0.6348092", "0.6348092", "0.6326873", "0.6326754", "0.6320198", "0.62585723", "0.62585723", "0.6256142", "0.62456465", "0.622571...
0.0
-1
Nothing to do ...
@Override public void getOutput(ICreationCondition condition, ICreationData data, long amountToApply, IUnitCountList output) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\...
[ "0.6758159", "0.66072506", "0.6602716", "0.6530756", "0.6504949", "0.64956236", "0.64941657", "0.6480964", "0.6415343", "0.64063305", "0.6354142", "0.6348092", "0.6348092", "0.6326873", "0.6326754", "0.6320198", "0.62585723", "0.62585723", "0.6256142", "0.62456465", "0.622571...
0.0
-1
A constructor for validating and loading data. Use this constructor when the data should be validated and loaded upon object creation. If validation fails, the data is not loaded.
public QuestionTF(String line, int lineNumber) { if (this.validate(line, lineNumber)) { this.loadData(line); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Data() {\n }", "public Data() {\n }", "public Data() {}", "public Data() {\n \n }", "public InitialData(){}", "public Validation() {\n }", "private Validate(){\n //private empty constructor to prevent object initiation\n }", "public UserData() {\n }", "public UserDa...
[ "0.6633789", "0.6633789", "0.6630041", "0.6621978", "0.6350361", "0.62528324", "0.62210274", "0.61945397", "0.61474854", "0.61457664", "0.6136484", "0.61186665", "0.6089783", "0.6061651", "0.6031952", "0.60319394", "0.6025586", "0.59590626", "0.59297645", "0.592001", "0.59118...
0.0
-1
Basic constructor Use this constructor when validation and data loading should be handled separately.
public QuestionTF() {}
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Data() {\n \n }", "public Data() {\n }", "public Data() {\n }", "public InitialData(){}", "public Student() {\r\n\t\t\r\n\t\t//populating country options\r\n\t\t//can also be done using a properties file\r\n\t\t\r\n\t\t/*\r\n\t\t * countryOptions = new...
[ "0.70472926", "0.70373166", "0.6967455", "0.6967455", "0.689495", "0.687403", "0.68195873", "0.68056536", "0.6782513", "0.67414844", "0.67114234", "0.6709819", "0.66960067", "0.66370845", "0.66221035", "0.66221035", "0.6576438", "0.65701693", "0.65436083", "0.65366995", "0.65...
0.0
-1
delete items when swiping from the main list
@Override public void onSwiped(@NonNull RecyclerView.ViewHolder viewHolder, int direction) { viewModel.delete(adapter.getNoteAtPosition(viewHolder.getAdapterPosition())); Toast.makeText(MainActivity.this, "Drink deleted!", Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onSwiped(RecyclerView.ViewHolder viewHolder, int swipeDir) {\n int position = viewHolder.getAdapterPosition();\n adapter.arrayList.remove(position);\n adapter.notifyDataSetChanged();\n\n }", "@Override\n public ...
[ "0.69264114", "0.68892694", "0.67482567", "0.66996366", "0.66926295", "0.6650354", "0.66313875", "0.6515011", "0.6474448", "0.64459527", "0.64275676", "0.6413702", "0.62907165", "0.6280273", "0.6261275", "0.623539", "0.62254256", "0.62201816", "0.6205735", "0.6200665", "0.617...
0.60649216
30
Using BinaryOperator Functional Interface to return an Integer Lambda expression finds the average between two numbers: a and b
@Override public void run() { BinaryOperator<Integer> avg = (Integer a, Integer b) -> (a + b) / 2; int replacement; System.out.println("++" + Thread.currentThread().getName() + " has arrived."); replacement = avg.apply(oldArray[index - 1], oldArray[index + 1]); // All threads must wait for all numThreads threads to catch up // Phaser acting like a barrier ph.arriveAndAwaitAdvance(); System.out.println("--" + Thread.currentThread().getName() + " has left."); oldArray[index] = replacement; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double average();", "@Override\n\tpublic int calculation(int a, int b) {\n\t\treturn b/a;\n\t}", "public abstract int apply(int lhs, int rhs);", "@Override\n public BinaryOperator<List<Integer>> combiner() {\n return (resultList1, resultList2) -> {\n Integer currentTotal1 = resultList1.g...
[ "0.6473387", "0.6159004", "0.5973428", "0.5959663", "0.5945764", "0.5926129", "0.59213704", "0.59190285", "0.58519536", "0.58199006", "0.58164287", "0.57998735", "0.57988507", "0.5774684", "0.5762139", "0.5761724", "0.5744435", "0.57269394", "0.57166547", "0.5710729", "0.5707...
0.0
-1
interfazFuncional(); expresionesLambda(); ejemplosStream(); ejerciciosStream();
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void functionStream() {\n\t\tStream.iterate(0, n -> n + 2).limit(10).forEach(System.out::println);\n\t\tStream.generate(Math::random).limit(4).forEach(System.out::println);\n\n\t}", "public static void main(String[] args) {\n\t\tStream st = new Stream();\r\n\t\tSystem.out.println(\">>> Filtrar <<<...
[ "0.63541067", "0.6110818", "0.5926567", "0.58950317", "0.5893261", "0.5839013", "0.57584864", "0.56987715", "0.56911135", "0.5690787", "0.5688644", "0.5680207", "0.567251", "0.56293654", "0.5614573", "0.56034803", "0.5566403", "0.5545029", "0.5523863", "0.54594433", "0.545418...
0.0
-1
/ Help functions for logging
private String getGeofenceTransitionDetails( int geofenceTransition, List<Geofence> triggeringGeofences) { String geofenceTransitionString = getTransitionString(geofenceTransition); // Get the Ids of each geofence that was triggered. ArrayList<String> triggeringGeofencesIdsList = new ArrayList<>(); for (Geofence geofence : triggeringGeofences) { triggeringGeofencesIdsList.add(geofence.getRequestId()); } String triggeringGeofencesIdsString = TextUtils.join(", ", triggeringGeofencesIdsList); Log.i("logos","jnj"); return geofenceTransitionString + ": " + triggeringGeofencesIdsString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void log();", "public String getLog();", "private static void _logInfo ()\n {\n System.err.println (\"Logging is enabled using \" + log.getClass ().getName ());\n }", "void initializeLogging();", "public void log(String txt);", "String getLogHandled();", "void log(String string);", "private void...
[ "0.7888856", "0.7193236", "0.7172839", "0.7171774", "0.71637344", "0.708232", "0.70711815", "0.7064105", "0.7013679", "0.69961286", "0.6979487", "0.69687283", "0.6923361", "0.6893133", "0.6881956", "0.6877396", "0.6875372", "0.6869662", "0.68579376", "0.68579376", "0.68579376...
0.0
-1
Use PingMessage.newBuilder() to construct.
private PingMessage(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PingResult(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public void sendPing(PingMessage ping)\n {\n InetAddress host = ping.getIP();\n int port = ping.getPort();\n String msg = ping.getPayload();\n try\n {\n DatagramPa...
[ "0.6270375", "0.5899079", "0.5412903", "0.5341719", "0.53363615", "0.53316694", "0.53250223", "0.5285512", "0.52688766", "0.5265946", "0.52636087", "0.5255573", "0.5249606", "0.5216293", "0.5210007", "0.5207296", "0.51875275", "0.5175081", "0.5166196", "0.5143696", "0.5136263...
0.7858533
0
Use CommonMsgPB.newBuilder() to construct.
private CommonMsgPB(com.google.protobuf.GeneratedMessage.Builder<?> builder) { super(builder); this.unknownFields = builder.getUnknownFields(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setMsgBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000020;\n msg_ = value;\n onChanged();\n return this;\n }", "public Builder setMsg(com.google.protobuf.ByteString...
[ "0.6558248", "0.6547967", "0.63615745", "0.63019764", "0.62816995", "0.6273351", "0.6227149", "0.6227149", "0.6224937", "0.6224937", "0.6224937", "0.6224937", "0.62119246", "0.620833", "0.620833", "0.620833", "0.620833", "0.6199329", "0.6199329", "0.6199329", "0.6198215", "...
0.7907181
0
Affiche une boite dialogue pour confirmer l'appel au serveur
public void callWaiter(View v){ new AlertDialog.Builder(this).setMessage("Appeler un serveur ?").setPositiveButton("Oui", null).setNegativeButton("Non",null).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void msgNoServidorConfigurado() {\r\n\tAlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\tbuilder.setMessage(R.string.txtSinServidor).setCancelable(false)\r\n\t\t.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\r\n\t\t public void onClick(DialogInterface dialog, int id) ...
[ "0.70182157", "0.6745019", "0.66550267", "0.6609184", "0.6599067", "0.6586523", "0.6574598", "0.65558", "0.6546854", "0.6423708", "0.6423282", "0.6421664", "0.6419506", "0.6391872", "0.6358915", "0.6324072", "0.63209087", "0.63127124", "0.62956977", "0.6276093", "0.6273532", ...
0.6084207
44
afficher info d'un produit
public void afficherInfo(View v){ Intent intent=new Intent(CarteActivity.this,InfoActivity.class); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void afficherProduit() {\r\n Scanner myObj = new Scanner(System.in);\r\n System.out.print(\"Entrez le nom du produit ............................. \");\r\n String input = myObj.nextLine();\r\n int indice = Catalogue.chercher(input);\r\n if(indice == -1) {\r\n ...
[ "0.677178", "0.6295565", "0.6198124", "0.617472", "0.6169003", "0.6153098", "0.6129433", "0.6108742", "0.60111254", "0.5981519", "0.5968237", "0.59298813", "0.5919506", "0.59033936", "0.5897462", "0.58853495", "0.5870305", "0.58460027", "0.5837941", "0.5836323", "0.583499", ...
0.0
-1
starting background task to update product
public void onClick(View v) { Intent fp=new Intent(getApplicationContext(),SignUpDetails.class); startActivity(fp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\t\tpublic void run() {\n\t\t\t\t\tGetProductItem();\r\n\t\t\t\t}", "public void processProduct() {\n Product product = self.getCurrentProduct();\n ServiceManager sm = self.getServiceManager();\n boolean failure = false;\n\n if (product != null) {\n //update the product's locati...
[ "0.67090094", "0.65789396", "0.6555532", "0.63846225", "0.6332941", "0.62714887", "0.62714887", "0.62446856", "0.62320334", "0.61853945", "0.616618", "0.60944754", "0.60763294", "0.6022168", "0.5989909", "0.5956248", "0.59393984", "0.59087056", "0.58584905", "0.5843696", "0.5...
0.0
-1
TODO Autogenerated method stub
protected IPhynixxConnectionProxy getObservableProxy() { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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
methods of the IConnectionProxy are redirected to the current object
public Object invoke(Object proxy, Method method, Object[] args) throws Throwable { if(logger.isDebugEnabled() ) { logger.debug("Calling "+method.getDeclaringClass()+"."+method.getName()+" on Object "+ this); } // execute try { if( method.getDeclaringClass().equals(IPhynixxConnection.class) && method.equals(PooledDynaProxyFactory.closeMethod)) { if (this.getPooledConnectionFactory()==null) { throw new IllegalStateException("No PooledConnectionFactoryx assigned and the current proxy could not be released"); } this.close(); return null; } else if ( method.getDeclaringClass().equals(IPhynixxConnectionProxy.class)|| method.getDeclaringClass().equals(IPhynixxConnection.class)|| method.getDeclaringClass().equals(IPhynixxConnectionHandle.class) || method.getDeclaringClass().equals(IPooledConnection.class) ) { return method.invoke(this,args); } else { Object target= this.getConnection(); // all methods of the interfaces joins the TX this.fireConnectionRequiresTransaction(); Object obj= method.invoke(target,args); return obj; } } catch( InvocationTargetException targetEx) { throw new DelegatedRuntimeException("Invoke "+method, targetEx.getTargetException()); } catch( Throwable ex) { throw new DelegatedRuntimeException("Invoke "+method, ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\t\t\t\t\tpublic Object invoke(Object proxy, Method method, Object[] args) throws Throwable {\n\t\t\t\t\t\t\tif(!method.getName().equals(\"close\")){\r\n\t\t\t\t\t\t\t\treturn method.invoke(conn, args);\r\n\t\t\t\t\t\t\t}else{\r\n\t\t\t\t\t\t\t\tlistConnection.add(conn);\r\n\t\t\t\t\t\t\t\treturn nu...
[ "0.641337", "0.6325275", "0.6325275", "0.63046616", "0.62960917", "0.6296081", "0.6291998", "0.6171848", "0.61527544", "0.6130302", "0.6075504", "0.6038264", "0.60158783", "0.6015299", "0.5984104", "0.595592", "0.5945128", "0.59429014", "0.5896088", "0.5894784", "0.58888334",...
0.5678058
44
metodo interno che fa il lavro sporco livello= lunghezza della soluzione parziale lievello iniziale=0 parziale=stringa che contiene anagramma incompleto i fase di costruzione lettere=numero di lettere rimaste da mettere in soluzione
private void permuta(String parziale,String lettere,int livello, List<String> risultato) { if(lettere.length()==0) { //caso terminale //la soluzione parziale è anche sol completa //if(parziale è una parola valida?){ -->bisogna dargli accesso a dizionario risultato.add(parziale); }else { //fai ricorsione //sottoproblema== una lettera(un singolo carattere) di 'lettere' for(int pos=0;pos<lettere.length();pos++) { char tentativo= lettere.charAt(pos); String nuovaParziale=parziale+tentativo; String nuovaLettere= lettere.substring(0,pos)+ lettere.substring(pos+1); //if(nuovaParziale è un Prefisso valido di almeno una parola nel dizionario){ //esempio aqz-->NO car-->SI permuta(nuovaParziale, nuovaLettere, livello+1,risultato); //backtracking -->si può escludere introducendo nuove parziali senza toccare i parametri di input //rimettere a posto parziale //rimettere a posto lettere } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String ingresarLetra(String letra, String palabra)throws MyException{\n String respuesta=\"\";\n if(Integer.toString(1).equals(letra)||Integer.toString(2).equals(letra)||Integer.toString(3).equals(letra)||Integer.toString(4).equals(letra)||Integer.toString(5).equals(letra)||Integer.toString(6)...
[ "0.6783893", "0.6567767", "0.61800975", "0.6158889", "0.6119519", "0.6092881", "0.60822517", "0.6059614", "0.60120463", "0.5990451", "0.5968348", "0.59659785", "0.5933313", "0.58883375", "0.5880712", "0.58234113", "0.5808429", "0.57851934", "0.5767811", "0.575934", "0.5758809...
0.6633772
1
TODO Autogenerated method stub
public void actionPerformed(ActionEvent e) { Index = Main.getIndex(); myBf = new BufferedImage(1050,820,BufferedImage.TYPE_INT_RGB); Graphics2D gd = (Graphics2D) myBf.createGraphics(); /*gd.setColor(Color.WHITE); gd.fillRect(0,0,1050,820);*/ Color c = Main.arr.get(Index).jp.getBackground(); gd.setColor(c); gd.fillRect(0,0,1050,820); //gd.setBackground(Color.WHITE); gd.drawImage(Main.arr.get(Index).bf,null,0,0); FileDialog fd = new FileDialog(Main.frame,"",FileDialog.SAVE); fd.setVisible(true); File outputFile = new File (fd.getDirectory()+"/" + fd.getFile()+ ".jpg"); try { ImageIO.write(myBf, "jpg",outputFile); } catch (IOException e1) { // TODO Auto-generated catch block e1.printStackTrace(); System.out.println("file not saved"); } }
{ "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
get the word in the node
public Movies getMovie () { return movie; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getWord();", "public String getWord()\n\t{\n\t\treturn word.get(matcher());\n\t}", "public void getWord() {\n\t\t\n\t}", "public String getWord()\r\n\t\t{\r\n\t\t\treturn word;\r\n\t\t}", "public String getWord(){\r\n\t\treturn word;\r\n\t}", "public String getTextValue (Node node);", ...
[ "0.7474127", "0.68532354", "0.68491626", "0.68194723", "0.6779375", "0.67663556", "0.67257565", "0.6711786", "0.6704968", "0.6701906", "0.67010486", "0.6685749", "0.65614146", "0.65605545", "0.6504578", "0.64845306", "0.6433477", "0.6344555", "0.63139784", "0.63108975", "0.63...
0.0
-1
set the left Node of the word
public void setLeft (Node l) { left = l; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setLeft(Node left) {\n this.left = left;\n }", "public void setLeft(BinNode<E> l)\n {\n left = l;\n }", "public void setLeft(TreeNode left) {\n\t\tthis.left = left;\n\t}", "public boolean SetLeft(Tree ln){\n\tleft = ln ;\n\treturn true ;\n }", "public boolean SetLeft(T...
[ "0.760427", "0.7515429", "0.73311085", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", "0.73277295", ...
0.7795993
0
get the left Node
public Node getLeft () { return left; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node getLeft() {\n return left;\n }", "public Node getLeft() {\n return left;\n }", "public Node getLeft() {\n return left;\n }", "public Node getLeft() {\n return left;\n }", "public MyNode getLeft()\r\n {\r\n \treturn left;\r\n }", "public Node<T>...
[ "0.8566683", "0.8566683", "0.8566683", "0.8566683", "0.85462093", "0.8436039", "0.8418367", "0.8409914", "0.8407475", "0.8376523", "0.83388233", "0.8289053", "0.8229951", "0.81989056", "0.8164036", "0.81447726", "0.81057477", "0.8010819", "0.8009472", "0.79993707", "0.7987212...
0.8702377
0
set the Right Node
public void setRight (Node r) { right = r; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRight(Node right) {\n this.right = right;\n }", "public void setRight(BTNode myNode){\n rightleaf = myNode;\r\n }", "public void setRight(Node node) {\n right = node;\n }", "public void setRight(Node<T> right) {\n this.right = right;\n if (right...
[ "0.8377698", "0.82450676", "0.82437146", "0.8089644", "0.8073307", "0.7957637", "0.79428756", "0.79428756", "0.79284", "0.78878665", "0.7865065", "0.7865065", "0.7865065", "0.7865065", "0.7865065", "0.7865065", "0.7865065", "0.7865065", "0.7865065", "0.7865065", "0.7865065", ...
0.8505472
0
get the right Node
public Node getRight () { return right; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Node getNode();", "public Node getNode();", "public abstract Node getNode();", "public Node getNode (){\n if (_node == null){\n Label label = new Label(_value);\n label.setFont(DEFAULT_FONT);\n _node = label;\n }\n return _node;\n }", "@AutoEscape\n\...
[ "0.7776525", "0.7330812", "0.7114544", "0.7067301", "0.69872314", "0.6951097", "0.68319076", "0.6831051", "0.6801676", "0.67604333", "0.6733507", "0.67272425", "0.6722421", "0.6697837", "0.6665105", "0.6652229", "0.6647137", "0.66130143", "0.6611891", "0.6591638", "0.6589586"...
0.0
-1
Ensures the given ID belongs to a table and that the user can access it.
private boolean validateId(String tableId) throws IOException { try { Asset asset = engine.assets().get(tableId).execute(); return "table".equalsIgnoreCase(asset.getType()); } catch (GoogleJsonResponseException ex) { // A "400 Bad Request" is thrown when the asset ID is missing or invalid return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Boolean isTableIdValid(Integer id){\n if(MIN_TABLE_ID < id && id < MAX_TABLE_ID){\n return true;\n }else{\n return false;\n }\n }", "@Override\n public boolean userCanAccess(int id) {\n return true;\n }", "void check(Object dbobject, int rights)...
[ "0.640678", "0.62294865", "0.5729668", "0.56712365", "0.5561446", "0.5499353", "0.54194874", "0.5387855", "0.5348778", "0.52985936", "0.52720064", "0.51957005", "0.5188143", "0.51371527", "0.51267344", "0.5116485", "0.5094586", "0.5087678", "0.5069947", "0.50358385", "0.50103...
0.5927027
2
Deletes a table, including any layers displaying the table.
private void deleteTable(String tableId) throws IOException { LOG.info("Finding layers belonging to table."); ParentsListResponse tableParents = engine.tables().parents().list(tableId).execute(); LOG.info("Layers retrieved."); // Collect the layer IDs to ensure we can safely delete maps. Set<String> allLayerIds = new HashSet<String>(); for (Parent tableParent : tableParents.getParents()) { allLayerIds.add(tableParent.getId()); } // We need to delete layers before we can delete the table. deleteLayers(allLayerIds); LOG.info("Deleting table."); engine.tables().delete(tableId).execute(); LOG.info("Table deleted."); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteTapTable(TableConfig tableConfig) throws ConfigurationException;", "public void deleteTableRecords()\n {\n coronaRepository.deleteAll();\n }", "void delete_table(String table_name) {\n //table does not exist\n if (!get_table_names().contains(table_name) && !table_na...
[ "0.6817768", "0.6708099", "0.6659194", "0.6645784", "0.66397345", "0.65894264", "0.65756154", "0.65602016", "0.6558431", "0.65173453", "0.6504192", "0.6407469", "0.6352143", "0.6351437", "0.6322889", "0.63188034", "0.6316076", "0.6263902", "0.6246844", "0.62035865", "0.619327...
0.7565443
0
Deletes the provided layers, including any maps where they are used.
private void deleteLayers(Set<String> layerIds) throws IOException { for (String layerId : layerIds) { assertLayerIsNotPublished(layerId); LOG.info("Layer ID: " + layerId + ", finding maps."); ParentsListResponse layerParents = engine.layers().parents().list(layerId).execute(); // Delete each layer. Note that these operations are not transactional, // so if a later operation fails, the earlier assets will still be deleted. for (Parent layerParent : layerParents.getParents()) { String mapId = layerParent.getId(); deleteMap(layerIds, mapId); } LOG.info("Deleting layer."); engine.layers().delete(layerId).execute(); LOG.info("Layer deleted."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void clearLayers(){\n\t\tfor(int i=0;i<ChangeLayer.Layers.length;i++){\n\t\t\tChangeLayer.Layers[i].clear();\n\t\t\t}\n\t}", "public void clearMapLayers() {\n if(internalNative != null) {\n internalNative.removeAllMarkers();\n markers.clear();\n } else {\n ...
[ "0.6915276", "0.67563117", "0.6558396", "0.63119185", "0.62180257", "0.6154153", "0.60104173", "0.5757281", "0.56696063", "0.5669534", "0.5592701", "0.5584445", "0.55190027", "0.55076605", "0.5461244", "0.5460206", "0.54523176", "0.5436868", "0.53618956", "0.53544146", "0.531...
0.7224741
0
TODO(macd): Update this to edit the map, once available in the API. Safely deletes a map, as long as all layers contained are scheduled for deletion.
private void deleteMap(Set<String> layerIdsPendingDeletion, String mapId) throws IOException { assertMapIsNotPublished(mapId); LOG.info("Checking for other layers on this map (ID: " + mapId + ")"); Set<String> mapLayerIds = getLayerIdsFromMap(mapId); // Determine if this map will still have layers once we perform our delete. mapLayerIds.removeAll(layerIdsPendingDeletion); if (mapLayerIds.size() == 0) { // Map will not contain any more Layers when done, so delete it. LOG.info("Deleting map."); engine.maps().delete(mapId).execute(); LOG.info("Map deleted."); } else { // Map will contain Layers not scheduled for deletion, so we can't continue. throw new IllegalStateException("Map " + mapId + " contains layers not scheduled for " + "deletion. You will need to remove them before we can delete this map."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void deleteMap(String s){\n GridMap target=null;\n for(GridMap gm:mapsList){\n if(gm.getMapName().equals(s))\n target=gm;\n }\n removeMaps(target);\n }", "public void removeMaps(GridMap map){\n mapsList.remove(map);\n //Observer patter...
[ "0.6778915", "0.6710368", "0.6482955", "0.64687425", "0.6454725", "0.64096844", "0.6358477", "0.6334626", "0.6325016", "0.6320187", "0.6266329", "0.62392485", "0.62114006", "0.6205917", "0.6205576", "0.6201601", "0.61984986", "0.61795086", "0.6166555", "0.6158844", "0.6158719...
0.7617725
0
Ensures that a layer is not published. Useful to test before deleting.
private void assertLayerIsNotPublished(String layerId) throws IOException { boolean publishedVersionExists; try { engine.layers().get(layerId).setVersion("published").execute(); publishedVersionExists = true; } catch (GoogleJsonResponseException ex) { // The API failed to retrieve a published version. publishedVersionExists = false; } if (publishedVersionExists) { throw new AssertionError("Layer ID " + layerId + " is published, " + "please un-publish before deleting."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void assertMapIsNotPublished(String mapId) throws IOException {\n Map map = engine.maps().get(mapId).execute();\n if (map.getVersions().contains(\"published\")) {\n throw new AssertionError(\"Map ID \" + mapId + \" is published, \"\n + \"please un-publish before deleting.\");\n }\n ...
[ "0.6771634", "0.6162653", "0.5673808", "0.56642246", "0.56100357", "0.5541741", "0.5493747", "0.54407537", "0.5430546", "0.54151535", "0.5399739", "0.5389119", "0.5363707", "0.53552073", "0.5353461", "0.534288", "0.53194773", "0.5304415", "0.5244521", "0.52300334", "0.5209126...
0.81647074
0
Ensures that a map is not published. Useful to test before deleting.
private void assertMapIsNotPublished(String mapId) throws IOException { Map map = engine.maps().get(mapId).execute(); if (map.getVersions().contains("published")) { throw new AssertionError("Map ID " + mapId + " is published, " + "please un-publish before deleting."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void assertLayerIsNotPublished(String layerId) throws IOException {\n boolean publishedVersionExists;\n try {\n engine.layers().get(layerId).setVersion(\"published\").execute();\n publishedVersionExists = true;\n } catch (GoogleJsonResponseException ex) {\n // The API failed to retr...
[ "0.65268487", "0.6235109", "0.62145305", "0.6208795", "0.5997454", "0.5929514", "0.56774485", "0.5676425", "0.56359947", "0.5630246", "0.5588613", "0.55847484", "0.5584047", "0.55752486", "0.5539853", "0.5533336", "0.5526341", "0.546359", "0.54588455", "0.5443337", "0.5433731...
0.8571599
0
Finds all layers attached to a map.
private Set<String> getLayerIdsFromMap(String mapId) throws IOException { // Retrieve the map. Map map = engine.maps().get(mapId).execute(); // Find the layers Set<String> layerIds = new HashSet<String>(); List<MapItem> mapContents = map.getContents(); while (mapContents != null && mapContents.size() > 0) { MapItem item = mapContents.remove(0); if (item instanceof MapLayer) { layerIds.add(((MapLayer) item).getId()); } else if (item instanceof MapFolder) { mapContents.addAll(((MapFolder) item).getContents()); } // MapKmlLinks do not have IDs } return layerIds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Collection<Layer> getAllLayers() {\n return Collections.unmodifiableCollection(layers.values());\n }", "public Collection<OsmDataLayer> getAllLayers() {\n\t\treturn null;\n\t}", "public void allLayers()\n\t{\n\t\tint totalLayers = this.psd.getLayersCount();\n\t\t\n\t\tLayer layer;\n\t\t\n\t\tf...
[ "0.6673765", "0.66044223", "0.6244039", "0.61825246", "0.6168798", "0.58996373", "0.56961", "0.5623348", "0.55498046", "0.55444294", "0.5508627", "0.54830384", "0.5457498", "0.5337927", "0.53037924", "0.5251624", "0.52512", "0.5248288", "0.52265495", "0.52260715", "0.5217558"...
0.6508755
2
builds AttributeBooleanType without checking for non null required values
public AttributeBooleanType buildUnchecked() { return new AttributeBooleanTypeImpl(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "BooleanValue createBooleanValue();", "public Boolean getBooleanAttribute();", "static Nda<Boolean> of( boolean... value ) { return Tensor.of( Boolean.class, Shape.of( value.length ), value );...
[ "0.6627946", "0.6627946", "0.6627946", "0.6627946", "0.64543056", "0.6266034", "0.6091543", "0.6091543", "0.6072251", "0.60056996", "0.59657764", "0.59657764", "0.59609765", "0.5921413", "0.5907314", "0.5898321", "0.58689255", "0.5861516", "0.5860361", "0.5855712", "0.5845338...
0.75021833
0
TODO Autogenerated method stub
@Override public ParaMap index(ParaMap inMap) throws Exception { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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
The size of a distribution in bytes, as specified by . The size in bytes can be approximated when the precise size is not known. When the size of the distribution is not known field must be set to 0 (this default value is not defined by DCAT standard).
@Value.Default public int getByteSize() { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getSize() {\n\t\treturn dist.length;\n\t}", "double getSize();", "@Override\n\tpublic int computeSize() {\n\t\treturn 36;\n\t}", "@Override\n\tpublic double getSize() {\n\t\treturn Math.sqrt(getMySize())/2;\n\t}", "Integer diskSizeGB();", "public int getSize() {\n\n\treturn getSectors().size()...
[ "0.65246695", "0.63789", "0.63527125", "0.62927645", "0.621244", "0.6212014", "0.61433893", "0.6132207", "0.6110499", "0.60710627", "0.60556793", "0.6045138", "0.60445017", "0.60349303", "0.6017181", "0.5998029", "0.59719896", "0.59713644", "0.5967137", "0.5958052", "0.595161...
0.63901454
1
Freetext account of the distribution, as specified in <a href="
@Value.Default public Dict getDescription() { return Dict.of(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getAccount();", "public void linkAccount() {}", "public String viewAccount() {\n ConversationContext<Account> ctx = AccountController.newEditContext(getPart().getAccount());\n ctx.setLabelWithKey(\"part_account\");\n getCurrentConversation().setNextContextSubReadOnly(ctx);...
[ "0.5723771", "0.5609941", "0.5586396", "0.54929924", "0.546973", "0.54352987", "0.54251766", "0.5370237", "0.5354281", "0.53248", "0.53248", "0.53248", "0.53248", "0.53248", "0.53248", "0.53248", "0.53248", "0.53248", "0.53248", "0.5270314", "0.52509564", "0.5244533", "0....
0.0
-1
A link to the license document under which the distribution is made available. The license should be a legal document giving official permission to do something with the resource, as specified in
@Value.Default public String getLicense() { return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getLicense();", "License createLicense();", "public String getLicense() {\n\t\treturn license;\n\t}", "public String getLicenseUrl() {\n\t\treturn licenseUrl;\n\t}", "@Override\n\tpublic java.lang.String getLicense() {\n\t\treturn _scienceApp.getLicense();\n\t}", "String getLicense_java_lan...
[ "0.7220536", "0.7072264", "0.6810458", "0.6699057", "0.6648126", "0.6493004", "0.63243985", "0.6285075", "0.6282077", "0.627862", "0.6224889", "0.6214649", "0.61808187", "0.61544293", "0.61532784", "0.61455035", "0.60991395", "0.60973006", "0.60973006", "0.602146", "0.5997584...
0.6122124
16
The media type of the distribution as defined by , for example, "text/csv". This property SHOULD be used when the media type of the distribution is defined in IANA, otherwise .
@Value.Default public String getMediaType() { return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "MimeType mediaType();", "MediaType getMediaType();", "public String getMime_type()\r\n {\r\n return getSemanticObject().getProperty(data_mime_type);\r\n }", "public String getMediaType() {\r\n return mediaType;\r\n }", "public java.lang.String getMediaType()\n {\n synchroni...
[ "0.68576413", "0.68370575", "0.6738027", "0.66570055", "0.6506895", "0.64701146", "0.64701146", "0.64701146", "0.6455694", "0.6455694", "0.64320236", "0.6422341", "0.6387451", "0.6360997", "0.6339174", "0.6339174", "0.6337218", "0.6335128", "0.6335128", "0.6320471", "0.630613...
0.69340587
0
A human readable name given to the distribution, i.e. "CSV Distribution of Apple Production". Specified by
@Value.Default public Dict getTitle() { return Dict.of(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String deviceName() {\n\t\t String manufacturer = Build.MANUFACTURER;\n\t\t String model = Build.MODEL;\n\t\t if (model.startsWith(manufacturer)) {\n\t\t return capitalize(model);\n\t\t } else {\n\t\t return capitalize(manufacturer) + \" \" + model;\n\t\t }\n\t\t}", "String pu...
[ "0.64441967", "0.6160469", "0.6087766", "0.60385877", "0.6037669", "0.60060054", "0.60017556", "0.60017556", "0.5962882", "0.5923758", "0.589185", "0.58898896", "0.5859578", "0.58581716", "0.5857602", "0.58449477", "0.57810926", "0.57752794", "0.57752794", "0.57752794", "0.57...
0.0
-1
Returns the uri of the distribution (which is not the uri of the file pointed to).
@Value.Default public String getUri() { return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "RaptureURI getBaseURI();", "java.lang.String getResourceUri();", "java.lang.String getArtifactUrl();", "String getURI();", "String getURI();", "String getURI();", "public String getPhysicalURI()\n {\n return physicalURI;\n }", "public String getURI() {\n if (filePath == null) {\n ...
[ "0.64608353", "0.64112306", "0.64102936", "0.6377843", "0.6377843", "0.6377843", "0.6374008", "0.6351775", "0.6315209", "0.6306926", "0.62731445", "0.6250894", "0.6250291", "0.62474126", "0.6235847", "0.62184983", "0.62101233", "0.6204931", "0.6194973", "0.6168377", "0.616516...
0.593126
49
Adds a User Order
UserOrder save(UserOrder order);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@PostMapping(\"/order/add\")\n String addOrder(@RequestBody OrderDto orderDto) {\n Order order = new Order();\n order.setAmount(orderDto.getAmount());\n\n\n Optional<User> user = userRepository.findById(orderDto.getUserId());\n if (user.isPresent()) {\n order.setUser(user....
[ "0.74339485", "0.70026475", "0.6966285", "0.69537115", "0.6927141", "0.68670607", "0.68424666", "0.67302185", "0.66944885", "0.6669888", "0.66613257", "0.66363704", "0.6628031", "0.6545106", "0.6449414", "0.6440787", "0.64267707", "0.6418479", "0.6412402", "0.63984144", "0.63...
0.6550198
13
Finds user orders by user id
List<UserOrder> findUserOrdersByUserId(Long userId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Order> getAllUsersOrdersById(long userId);", "List<Order> findByUser(User user);", "List<Order> getUserOrderList(int userId) throws ServiceException;", "Optional<Order> findByUserId(long userId);", "@Override\n public Collection<Order> getOrdersByUserId(String id) {\n Collection<Order...
[ "0.7846011", "0.7539741", "0.73152757", "0.7304883", "0.7203445", "0.7162734", "0.7135677", "0.6934781", "0.6887741", "0.68503165", "0.6846815", "0.67238855", "0.6721065", "0.6664613", "0.6656471", "0.6523551", "0.6503872", "0.6470719", "0.64479375", "0.6447323", "0.643208", ...
0.8224163
0
TODO Autogenerated method stub
@Override public int updateUser(Users user) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0...
0.0
-1
TODO Autogenerated method stub
@Override public int deleteUser(Users user) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void 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 List<Product> selectAllProduct() { return productMapper.selectAllProduct(); }
{ "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
Adds the main nuxeo document artifact.
public void addMainArtefact(NuxeoDocArtefact nuxeoDocArtifact) { this.mainArtefact = nuxeoDocArtifact; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MinedMainDocument parseMainArtifact() {\n\t\ttry {\n\t\t\tInputStream is = this.getNuxeoInstance().getDocumentInputStream(mainArtefact.getId());\n\t\t\t\n\t\t\tString title = this.getNuxeoInstance().getLastDocTitle();\n\t\t\tif(title==null) title = \"Main Document\";\n\t\t\t\n\t\t\tDocxParser docx = new Doc...
[ "0.59533405", "0.58850056", "0.5754597", "0.57196814", "0.5704475", "0.5596047", "0.54440534", "0.54434115", "0.5407299", "0.5347804", "0.5291404", "0.52334213", "0.5215092", "0.52117556", "0.5194969", "0.5161292", "0.5152717", "0.51456267", "0.5133393", "0.5133393", "0.50793...
0.7952319
0
Adds a "comparte artifact".
public void addArtefact(IArtefact artefact) { this.artefacts.add(artefact); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addArtifact(ArtifactModel artifact);", "@Override\n public int compare( ArtifactMetadata o1, ArtifactMetadata o2 )\n {\n int result =\n new DefaultArtifactVersion( o2.getVersion() ).compareTo( new DefaultArtifactVersion( o1.getVersion() ) );\n return result != 0 ? resul...
[ "0.6114298", "0.58016354", "0.53444886", "0.53287977", "0.53109384", "0.52506864", "0.52195656", "0.5211165", "0.5184806", "0.5170683", "0.5085673", "0.50107163", "0.49281994", "0.490501", "0.490361", "0.4898127", "0.4880427", "0.4855387", "0.48413074", "0.48368767", "0.47886...
0.0
-1
Adds a list of "compare artifacts". Clears the list before adding.
public void addArtefacts(List<IArtefact> artifacts) { this.artefacts.clear(); this.artefacts.addAll(artifacts); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void addProductsToCompareListTest() {\n YandexMarketHomePage homePage = new YandexMarketHomePage(driver);\n homePage.open();\n\n // 2. Select category of products\n homePage.selectCategory(\"Электроника\");\n\n // 3. Select subcategory of products\n new Y...
[ "0.5271633", "0.51681507", "0.5118993", "0.5082475", "0.50357825", "0.49532026", "0.49117506", "0.48814127", "0.48724326", "0.48556927", "0.48493692", "0.4811096", "0.47776958", "0.47726998", "0.4749672", "0.47318533", "0.4702475", "0.4702181", "0.46982172", "0.46654725", "0....
0.56919944
0
Connects to Nuxeo to receive and parse the main document. Uses a docx parser to find chapters.
public MinedMainDocument parseMainArtifact() { try { InputStream is = this.getNuxeoInstance().getDocumentInputStream(mainArtefact.getId()); String title = this.getNuxeoInstance().getLastDocTitle(); if(title==null) title = "Main Document"; DocxParser docx = new DocxParser(is); docx.parseDocxAndChapters(); MinedMainDocument mainDoc = new MinedMainDocument(title, docx.getFullText()); mainDoc.addChapters(docx.getChapterHeadlines(), docx.getChapterTexts()); is.close(); return mainDoc; } catch (Exception e) { e.printStackTrace(); return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n protected void parseDocuments()\r\n {\n\r\n }", "public void parse(){\n\n Integer childStart = this.findNewElement(0, this.document.length - 1);\n if(childStart == null){\n return;\n }\n\n this.root.removeData();\n this.copyTextToDocumentTree(t...
[ "0.6015931", "0.59455585", "0.572101", "0.5671998", "0.55608815", "0.55593306", "0.55022496", "0.53509545", "0.5349113", "0.5302841", "0.52227324", "0.52211684", "0.51894057", "0.51831573", "0.5174183", "0.51721025", "0.51310295", "0.512964", "0.5127121", "0.5124797", "0.5095...
0.53127384
9
Depending on the artifact, connects to nuxeo, liferay or shindig to parse the artifact and get its title and content. Adds null to the returnlist if an artifact cannot be parsed.
public List<MinedDocument> parseCompareArtifacts() { // System.out.println("parseCompareArtifacts()"); List<MinedDocument> compareDocs = new ArrayList<MinedDocument>(); InputStream is; DocxParser docx; String title = null; String text; for(IArtefact artefact : this.artefacts) { text = null; if(artefact instanceof NuxeoDocArtefact) { // Nuxeo Document: try { is = getNuxeoInstance().getDocumentInputStream(artefact.getId()); title = this.getNuxeoInstance().getLastDocTitle(); if(title==null) title = NO_TITLE; if(this.getNuxeoInstance().getLastDocFilePath().endsWith(".docx")) { docx = new DocxParser(is); docx.parseDocxSimple(); text = docx.getFullText(); } else if(this.getNuxeoInstance().getLastDocFilePath().endsWith(".doc")) { text = DocxParser.parseDocSimple(is); } } catch (Exception e) { System.out.println("Error: Can not read nuxeo doc with id: "+artefact.getId()); continue; } } else if(artefact instanceof LiferayBlogArtefact) { // Liferay Blog Entry: try { JSONObject blogEntry = this.getLiferayInstance().getBlogEntry(artefact.getId()); title = blogEntry.getString("title"); text = blogEntry.getString("content"); text = TextParser.parseHtml(text); } catch (Exception e) { System.out.println("Error: Can not read Liferay blog entry with id: "+artefact.getId()); continue; } } else if(artefact instanceof LiferayForumArtefact) { // Liferay Forum Message try { JSONObject forumEntry = this.getLiferayInstance().getMessageBoardMessage(artefact.getId()); title = forumEntry.getString("subject"); text = forumEntry.getString("body"); } catch(Exception e) { System.out.println("Error: Can not read Liferay forum message with id: "+artefact.getId()); continue; } } else if(artefact instanceof LiferayWebContentArtefact) { // Liferay Web Content Article (Journal) try { JSONObject webContentArticle = this.getLiferayInstance().getWebContentArticle(artefact.getId()); title = webContentArticle.getString(WEBCONTENT_TITLE); text = webContentArticle.getString(WEBCONTENT_CONTENT); // check if is "meeting minutes" content: JSONObject webContentTemplate = this.getLiferayInstance().getWebContentTemplate( webContentArticle.getString(WEBCONTENT_TEMPLATE_ID), webContentArticle.getString(WEBCONTENT_GROUP_ID)); String templateName = webContentTemplate.getString(WEBCONTENTTEMPLATE_NAME); if(templateName.contains(WEBCONTENTTEMPLATE_MEETING_MINUTES)) { ((LiferayWebContentArtefact)artefact).setIsMeetingMinutes(true); } } catch(Exception e) { System.out.println("Error: Can not read Liferay web content with id: "+artefact.getId()); continue; } } else if(artefact instanceof LiferayWikiArtefact) { // Liferay Wiki Page try { JSONObject wikiPage = this.getLiferayInstance().getWikiPage(artefact.getId()); title = wikiPage.getString("title"); text = wikiPage.getString("content"); } catch(Exception e) { System.out.println("Error: Can not read Liferay wiki page with id: "+artefact.getId()); continue; } } else if(artefact instanceof SocialMessageArtefact) { // Shindig Message ShindigConnector shindigCon; if(Config.SHINDIG_USAGE.getValue().equals(Config.VAL_SHINDIG_DIRECT)) // disabled // shindigCon = new ShindigDirectConnector(); shindigCon = null; else shindigCon = new ShindigRESTConnector(); JSONObject message = shindigCon.getOutboxMessage(((SocialMessageArtefact) artefact).getUserId(), artefact.getId()); if(message!=null) { title = message.getString("title"); text = message.getString("body"); } // System.out.println("MinedDocument is a SocialMessageArtefact"); } else if(artefact instanceof MailArtefact) { // Email via ElastiSearch title = ((MailArtefact)artefact).getSubject(); text = ((MailArtefact)artefact).getContent(); } if(title==null) title = NO_TITLE; if(text!=null) compareDocs.add(new MinedDocument(title, text)); else compareDocs.add(null); } return compareDocs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JsonObject getArtifact(String wrksName, String artName) throws CartagoException {\n var info = getArtInfo(wrksName, artName);\n\n var artifact = Json.createObjectBuilder()\n .add(\"artifact\", artName)\n .add(\"type\", info.getId().getArtifactType());\n\n\n ...
[ "0.5722722", "0.56573343", "0.5578998", "0.5531136", "0.5422633", "0.53876543", "0.5371926", "0.53367573", "0.5331336", "0.52364105", "0.52174914", "0.5189639", "0.5139688", "0.5094468", "0.50897884", "0.50672185", "0.50175", "0.4977778", "0.49615318", "0.4960615", "0.4919539...
0.59978575
0
Only creates one NuxeoConnector instance and returns it.
public NuxeoConnector getNuxeoInstance() { if(this.nuxeoConnector==null) { nuxeoConnector = new NuxeoConnector(); } return this.nuxeoConnector; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static GaConnector createConnector() {\n return new GaConnector();\n }", "public static GomokuConnector getInstance(){\n if(instance == null){\n System.err.println(\"getInstance() called on a null GomokuConnector.\");\n return null;\n }\n return instanc...
[ "0.6610134", "0.6145394", "0.58588415", "0.5854075", "0.5843968", "0.56083864", "0.55633575", "0.5473825", "0.5443702", "0.5431703", "0.5426923", "0.54139966", "0.5381329", "0.53496385", "0.53442276", "0.5332497", "0.53322023", "0.53187555", "0.5281173", "0.5270395", "0.52592...
0.80057997
0
Only creates one LiferayConnector instance and returns it.
public LiferayConnector getLiferayInstance() { if(this.liferayConnector==null) { this.liferayConnector = new LiferayConnector(); } return this.liferayConnector; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static GaConnector createConnector() {\n return new GaConnector();\n }", "public static ConnectorManager getInstance() {\n synchronized (ConnectorManager.class) {\n if (instance == null) {\n instance = new ConnectorManager();\n }\n }\n\n ...
[ "0.61443293", "0.6083965", "0.60475343", "0.5877798", "0.57126385", "0.5661103", "0.5484736", "0.54494745", "0.52622867", "0.5260464", "0.51627356", "0.5154156", "0.5091194", "0.5084318", "0.5027457", "0.50024265", "0.49967727", "0.49922726", "0.49816757", "0.49678332", "0.49...
0.80258155
0
static: Creates and returns the (empty) main artifact.
public static NuxeoDocArtefact createMainArtefact(String mainDocId) { return new NuxeoDocArtefact(mainDocId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Active_Digital_Artifact createActive_Digital_Artifact();", "Digital_Artifact createDigital_Artifact();", "public MinedMainDocument parseMainArtifact() {\n\t\ttry {\n\t\t\tInputStream is = this.getNuxeoInstance().getDocumentInputStream(mainArtefact.getId());\n\t\t\t\n\t\t\tString title = this.getNuxeoInstance()...
[ "0.58545244", "0.578029", "0.57397157", "0.57126456", "0.5638312", "0.5638185", "0.5591621", "0.5506029", "0.5450484", "0.54075897", "0.5397047", "0.5312263", "0.5237798", "0.523388", "0.5225067", "0.51998633", "0.51938903", "0.5184621", "0.5180858", "0.5177574", "0.515939", ...
0.56572276
4
Creates and returns an artifact, using the given json activity.
public static IArtefact createActivityArtefact(JSONObject activity) { // System.out.println("DEBUG| createActivityArtefact activity: "+activity); JSONObject object = activity.getJSONObject(ShindigConnector.ACTIVITY_OBJECT); switch(object.getString(ShindigConnector.ACTIVITY_OBJECT_OBJECTTYPE)) { case(ActivityController.TYPE_LIFERAY_BLOG_ENTRY): // System.out.println("It is a blog entry."); return new LiferayBlogArtefact(object.getString("id").split(":")[1]); // blog entry id case(ActivityController.TYPE_LIFERAY_FORUM_ENTRY): case(ActivityController.TYPE_LIFERAY_FORUM_THREAD): // System.out.println("It is a forum entry."); return new LiferayForumArtefact(object.getString("id").split(":")[1]); // message board message id case(ActivityController.TYPE_LIFERAY_WEB_CONTENT): // System.out.println("It is a web content."); return new LiferayWebContentArtefact(object.getString("id").split(":")[1]); // journal article id case(ActivityController.TYPE_LIFERAY_WIKI_PAGE): // System.out.println("It is a wiki page."); return new LiferayWikiArtefact(object.getString("id").split(":")[1]); // wiki page id case(ActivityController.TYPE_NUXEO_DOCUMENT): // System.out.println("It is a nuxeo document."); return new NuxeoDocArtefact(object.getString("id")); // document version series id case(ActivityController.TYPE_OX_TASK): break; case(ActivityController.TYPE_OX_CALENDAR_ENTRY): break; case(ActivityController.TYPE_PUBLIC_MESSAGE): SocialMessageArtefact a = new SocialMessageArtefact(object.getString("id")); a.setUserId(activity.getJSONObject(ShindigConnector.ACTIVITY_ACTOR).getString(ShindigConnector.ID)); return a; } // System.out.println("DEBUG| createActivityArtefact: return null!!!"); return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Active_Digital_Artifact createActive_Digital_Artifact();", "public com.google.cloud.aiplatform.v1.Artifact createArtifact(\n com.google.cloud.aiplatform.v1.CreateArtifactRequest request) {\n return io.grpc.stub.ClientCalls.blockingUnaryCall(\n getChannel(), getCreateArtifactMethod(), getCall...
[ "0.6644305", "0.6333385", "0.63255", "0.6009147", "0.5978221", "0.5884619", "0.58354896", "0.58029014", "0.57167536", "0.5683555", "0.5606495", "0.55606896", "0.5443966", "0.5443858", "0.5314685", "0.528979", "0.52120495", "0.5173278", "0.5168742", "0.51239705", "0.5118768", ...
0.58308643
7
Creates and returns a mail artifact, using the given json object. The json object has to contain a ElasticSearchConnector.SOURCE object.
public static MailArtefact createMailArtefact(JSONObject searchMailObject) { JSONObject mailSource = searchMailObject.getJSONObject(ElasticSearchConnector.SOURCE); MailArtefact art = new MailArtefact( String.valueOf(mailSource.getInt(ElasticSearchConnector.ID)) ); art.setSubject(mailSource.getString(ElasticSearchConnector.SUBJECT)); art.setContent(mailSource.getString(ElasticSearchConnector.TEXTCONTENT)); return art; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MailMessage(JsonObject json) {\n Objects.requireNonNull(json);\n bounceAddress = json.getString(\"bounceAddress\");\n from = json.getString(\"from\");\n to = getKeyAsStringOrList(json, \"to\");\n cc = getKeyAsStringOrList(json, \"cc\");\n bcc = getKeyAsStringOrList(json, \"bcc\");\n sub...
[ "0.58257824", "0.5426481", "0.52679276", "0.51658076", "0.50887346", "0.49714112", "0.4935553", "0.49311817", "0.49066758", "0.48240066", "0.47932035", "0.47853845", "0.47233123", "0.47159493", "0.47103474", "0.47100994", "0.46855512", "0.46753275", "0.46569043", "0.46377537", ...
0.6792821
0
/ This is the start of the running of commands
@EventHandler public void onInventoryClick(InventoryClickEvent event) { //if clicked outside of area, return if(event.getCurrentItem() == null){ return; } //test if this is one of our menus Menu menu = null; Boolean ourMenu = false; for (Menu m : plugin.menuList) { if (m.getMenuName().equalsIgnoreCase(event.getClickedInventory().getName())){ menu = m; ourMenu = true; break; } } if (!ourMenu) { //not our menu return; } //it is our GUI //stop moving item straight away event.setCancelled(true); Player player = (Player) event.getWhoClicked(); //get item through slot that was clicked int clickedSlot = event.getSlot(); Item item = menu.getItems().stream().filter((i) -> i.getSlot() == clickedSlot).findFirst().orElse(null); //if item clicked is null, just do nothing if (item == null) { return; } //get stored arrays CommandMemory savedCmds = plugin.cmdMemoryList.stream() .filter((cm) -> cm.uuid.equalsIgnoreCase(player.getUniqueId().toString())) .findFirst() .orElse(null); //check that we actually have the command saved if (savedCmds == null) { //command has not been saved plugin.console.log("Unable to find saved ARgs"); return; } String CommandToRun;//this string will hold every command //execute console commands for (String consoleCMD : item.getCommands()) { CommandToRun = consoleCMD.replace("{player}", player.getName());//puts this player in the command //add in args for (Argument a : savedCmds.args) { CommandToRun = CommandToRun.replace("$arg" + a.getArgNum(), a.getName()); } //run command if (CommandToRun.contains("[console]")) { //run as console plugin.getServer() .dispatchCommand( plugin.getServer().getConsoleSender(), CommandToRun.replace("[console]", "").trim()); } else if (CommandToRun.contains("[player]")) { //run as player player.performCommand(CommandToRun.replace("[player]", "").trim()); } else if (CommandToRun.contains("[message]")) { //message caller player.sendMessage(menu.getPrefix() + ChatColor.RESET + CommandToRun.replace("[message]", "").trim()); } else if (CommandToRun.contains("[close]")) { //close menu player.closeInventory();//close invent for player plugin.cmdMemoryList.remove(savedCmds); } else if (CommandToRun.contains("[refresh]")) { //refresh item that was clicked menu.refreshMenu(event); } else { //don't know how to handle.... let console know plugin.console.log("Unknown command: " + CommandToRun); //let player know player.sendMessage(menu.getPrefix() + ChatColor.RED + "There was a problem with running your command. Please report this."); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void command() {\n List<String> commands = new ArrayList<>();\n commands.add(\": start\");\n commands.add(\": exit\");\n commands.add(\": help\");\n commands.add(\": commands\");\n\n for (String command : commands) {\n System.out.println(command);\n ...
[ "0.70910853", "0.68372494", "0.67724633", "0.66008407", "0.6596015", "0.657153", "0.65660226", "0.65660226", "0.6536627", "0.65349555", "0.6528278", "0.64412034", "0.64408684", "0.64381754", "0.6416496", "0.6416496", "0.6404856", "0.6396931", "0.638174", "0.636838", "0.636259...
0.0
-1
Metodo que muestra la informacion
public String Information(int position){ String msg = ""; //ArrayList<String> info = new ArrayList<>(); SQLiteDatabase db = this.getReadableDatabase(); String q = "select * from pedidos where code = " + position; Cursor reg = db.rawQuery(q,null); if(reg.moveToFirst()){ do{ msg += "Código: " + reg.getString(0); msg += "\nTeléfono Cliente: " + reg.getString(2); msg += "\nDirección Cliente: " + reg.getString(3); msg += "\nDescripción Cliente: \n" + reg.getString(4); }while (reg.moveToNext()); } db.close(); return msg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getInformacionInstruccion() {\n\treturn \"comando desconocido\";\n }", "private void mostrarInformacionP(){\n System.out.println(\"Nombre: \"+this.nombre);\n System.out.println(\"Sexo: \"+ this.sexo);\n System.out.println(\"Edad: \" + edad);\n\n }", "...
[ "0.722581", "0.70610696", "0.69612414", "0.69286644", "0.69286644", "0.68560296", "0.67825115", "0.67517513", "0.67372733", "0.67352045", "0.66976273", "0.6691265", "0.66881216", "0.6661908", "0.6637555", "0.6637555", "0.66368353", "0.6635165", "0.6616512", "0.65986973", "0.6...
0.0
-1
Handle navigation view item clicks here.
public boolean onNavigationItemSelected(@NonNull MenuItem item) { switch (item.getItemId()) { case R.id.MARIUS: { mDrawerLayout.closeDrawers(); break; } case R.id.settings: { goSettings(); mDrawerLayout.closeDrawers(); break; } case R.id.abouts : { goAboutUs(); mDrawerLayout.closeDrawers(); break; } } //close navigation drawer return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "void onDialogNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) {\n itemInterface.OnItemClickedListener(tr...
[ "0.7882029", "0.7235578", "0.6987005", "0.69458413", "0.6917864", "0.6917864", "0.6883472", "0.6875181", "0.68681556", "0.6766498", "0.67418456", "0.67207", "0.6716157", "0.6713947", "0.6698189", "0.66980195", "0.66793925", "0.66624063", "0.66595167", "0.6646381", "0.6641224"...
0.0
-1
Query untuk ambil semua dosen
public List<Resep> getReseps() { return sessionFactory.getCurrentSession().createCriteria(Resep.class).list(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Kaiwa selectByPrimaryKey(String maht);", "public List<Dishes> selectHuai(Dishes book){\n StringBuilder sql=new StringBuilder(\"select * from REAPER.\\\"Dish\\\" where \\\"cuisines\\\"='»´Ñï²Ë' \");\n //sqlÓï¾ä\n System.out.println(sql); \n List<Object> list=new ArrayList<Object>();\n ...
[ "0.5886127", "0.5803776", "0.57911396", "0.5790887", "0.5746158", "0.573357", "0.5694085", "0.55928755", "0.5567762", "0.55388355", "0.5496752", "0.54803187", "0.5465449", "0.54338664", "0.5423693", "0.5423693", "0.5400778", "0.53812236", "0.53240246", "0.52787566", "0.527633...
0.0
-1
end setUp() / (nonJavadoc)
@Override protected void tearDown() throws Exception { super.tearDown(); chronometer.stop(); logger.info("Total Time = " + chronometer); PipeBlockingQueueService.destroyAllQueue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void setUp() {\n\t\t\r\n\t}", "@Override\n public void setUp() {\n }", "@Override\r\n protected void setUp() {\r\n // nothing yet\r\n }", "protected void setUp() {\n\t}", "public void setUp() {\n\n\t}", "@Override\r\n\tpublic void setUp() {\n\r\n\t}", "protected void se...
[ "0.8627094", "0.8495488", "0.8415323", "0.8382428", "0.83727354", "0.83608395", "0.83567864", "0.83567864", "0.8274831", "0.8218038", "0.8217749", "0.80852854", "0.80007887", "0.7984933", "0.79697794", "0.7900881", "0.7891058", "0.78568596", "0.7842771", "0.7813228", "0.78132...
0.0
-1
Created by tshiamotaukobong on 15/05/19.
public interface CountryService { List<City> getCitiesByRegion(int rig_id); List<Region> getRegionsByCountry(int con_id); List<Country> getCountries(); List<CityData> searchCities(String name, int limit, int pageNo); CityData addCityData(PostCityData postCityData); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\n\tpu...
[ "0.62216586", "0.60339427", "0.6007887", "0.60004425", "0.60004425", "0.5982004", "0.5949695", "0.59150493", "0.58772206", "0.5876246", "0.5851109", "0.5824229", "0.58200955", "0.5802304", "0.5785279", "0.5783684", "0.57784694", "0.5776255", "0.5769802", "0.57493424", "0.5731...
0.0
-1
Attempt to detect the vehicle position.
public void detect(Frame input) { // Isolate the blue color from the image. input.isolateRange(this.frame, Config.Colors.blueLower, Config.Colors.blueUpper ); // Find largest triangle and return out if missing. MatOfPoint2f triangle = this.findTriangle(this.frame); if (triangle == null) return; // Get list of points from triangle. this.points = triangle.toArray(); // Find frame width and height. double width = this.frame.getSource().cols(); double height = this.frame.getSource().rows(); // Transform the found points. this.projector.transformPosition(this.points, width, height); this.triangle = new MatOfPoint2f(this.points); // Find the front point in the triangle. this.front = this.findFront(this.points); // Find the back point in the triangle. this.back = this.findBack(this.points); // Find the center point of the triangle. this.center = this.findCenter(this.triangle); // Find the rotation of the triangle. this.rotation = this.findRotation(this.front, this.back); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/10...
[ "0.6335042", "0.6151744", "0.6068907", "0.5892641", "0.5802249", "0.57902575", "0.5711092", "0.563783", "0.56327707", "0.5624959", "0.5618833", "0.56183887", "0.5611449", "0.56011033", "0.5591737", "0.5571529", "0.5567766", "0.55658835", "0.5539122", "0.5497883", "0.545237", ...
0.0
-1
Draw the vehicle points on the screen.
public void draw(Frame frame) { // Draw vehicle corner points. if (this.points != null) { for (int i = 0; i < 3; i++) { if (this.points[i] == null) continue; Imgproc.circle(frame.getSource(), this.points[i], 3, new Scalar(0, 0, 255)); } } // Draw the vehicles back point. if (this.back != null) { Imgproc.circle(frame.getSource(), this.back, 3, new Scalar(0, 0, 255)); } // Draw the vehicles front point. if (this.front != null) { Imgproc.circle(frame.getSource(), this.front, 6, new Scalar(0, 0, 255)); } // Draw the vehicles center point. if (this.center != null) { Imgproc.circle(frame.getSource(), this.center, 3, new Scalar(255, 0, 0), Imgproc.FILLED); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT MODIFY */\n StdDraw.point(x, y);\n }", "public void draw() {\n /* DO NOT...
[ "0.74320936", "0.74320936", "0.74320936", "0.74320936", "0.74255395", "0.70603216", "0.7057083", "0.67640203", "0.67378104", "0.67220104", "0.6611405", "0.6588421", "0.64175296", "0.6408214", "0.6339665", "0.6337346", "0.633528", "0.63345003", "0.63232785", "0.631705", "0.630...
0.7104034
5