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
checks whether a line segment and a polygon intersect
public static boolean intersectsLinePolygon(int x1, int y1, int x2, int y2, Vector2i[] polygon) { int n = polygon.length; int x3 = polygon[n-1].x; int y3 = polygon[n-1].y; for(int i=0; i<n; i+=2) { int x4 = polygon[i].x; int y4 = polygon[i].y; int d = (y4 - y3) * (x2 - x1) - (x4 - x3) * (y2 - y1); if (d != 0) { int yd = y1 - y3; int xd = x1 - x3; int ua = ((x4 - x3) * yd - (y4 - y3) * xd) / d; if (ua >= 0 && ua <= 1) { int ub = ((x2 - x1) * yd - (y2 - y1) * xd) / d; if (ub >= 0 && ub <= 1) { return true; } } } x3 = x4; y3 = x4; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean intersects(GLineSegment lineSegment) {\n if(this.equals(lineSegment)) return(true);\n else if(this.slope()==lineSegment.slope()) return(false);\n else {\n //complicated stuff here.\n return(false);\n }\n }", "public boolean hasIntersectionSegment(Line3D line) {\n List...
[ "0.79270726", "0.7547218", "0.72250193", "0.72084373", "0.7037103", "0.7031679", "0.70191365", "0.6978275", "0.6912837", "0.69056", "0.69037503", "0.6891707", "0.686027", "0.6856987", "0.6853711", "0.6812369", "0.6811474", "0.6792903", "0.6740972", "0.6732602", "0.67255145", ...
0.7232765
2
checks whether two polygons intersect
public static boolean intersectsPolygonPolygon(Vector2i[] polygon1, Vector2i[] polygon2) { int numPointsInPoly1 = 0; for(Vector2i v1 : polygon1) { if(pointInPolygon(polygon1, v1.x, v1.y)) { numPointsInPoly1++; } } if(numPointsInPoly1 > 0) { return true; } int numPointsInPoly2 = 0; for(Vector2i v2 : polygon2) { if(pointInPolygon(polygon2, v2.x, v2.y)) { numPointsInPoly2++; } } if(numPointsInPoly2 > 0) { return true; } for(int i=0; i<polygon1.length; i++) { int x1 = polygon1[i].x; int y1 = polygon1[i].y; int x2 = polygon1[(i+1) % polygon1.length].x; int y2 = polygon1[(i+1) % polygon1.length].y; for(int j=0; j<polygon2.length; j++) { int x3 = polygon1[j].x; int y3 = polygon1[j].y; int x4 = polygon1[(j+1) % polygon2.length].x; int y4 = polygon1[(j+1) % polygon2.length].y; if(intersectsLineLine(x1, y1, x2, y2, x3, y3, x4, y4, null)) { return true; } } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Multimap<String, String> intersects(Polygon bounds);", "boolean intersects( Geometry gmo );", "public static boolean intersects(Geometry a, Geometry b) {\r\n GeometryFactory factory = new GeometryFactory(a.getPrecisionModel(),\r\n a.getSRID());\r\n List aComponents = components(a);...
[ "0.74020517", "0.73850024", "0.7200197", "0.67735445", "0.6750898", "0.6724778", "0.66864437", "0.6673488", "0.66388315", "0.6621655", "0.6537729", "0.64882946", "0.64449245", "0.63241935", "0.6244738", "0.62390673", "0.6231196", "0.6205983", "0.6192974", "0.61601704", "0.613...
0.6548994
10
Calculates the point on the line segment nearest to the given point
public static Vector2i getClosestPointOnLine(int x1, int y1, int x2, int y2, int px, int py) { double xDelta = x2 - x1; double yDelta = y2 - y1; // line segment with length = 0 if( (xDelta==0) && (yDelta==0) ) { return new Vector2i(px, py); } double u = ((px - x1) * xDelta + (py - y1) * yDelta) / (xDelta * xDelta + yDelta * yDelta); Vector2i closestPoint; if(u < 0) { closestPoint = new Vector2i(x1, y1); } else if( u > 1) { closestPoint = new Vector2i(x2, y2); } else { closestPoint = new Vector2i((int)(x1+u*xDelta), (int)(y1+u*yDelta)); } return closestPoint; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private PointD getNearestPointOnLine(Vector v, PointD p)\r\n\t{\r\n\t\t//for line of form ax + by + c = 0 and point (x0, y0)\r\n\t\tdouble a = -1*v.getY();\r\n\t\tdouble b = v.getX();\r\n\t\tdouble c = v.getY()*v.getTail().getX() - v.getX()*v.getTail().getY();\r\n\r\n\t\tdouble x0 = p.getX();\r\n\t\tdouble y0 = p....
[ "0.7894943", "0.766738", "0.72208315", "0.7170241", "0.70495224", "0.6996975", "0.692906", "0.6762139", "0.6695855", "0.6688948", "0.6643262", "0.663673", "0.65921235", "0.6585885", "0.65589017", "0.6522919", "0.6515981", "0.64811516", "0.6475825", "0.64736164", "0.646925", ...
0.6580101
14
checks whether the given point is on the line segment
public static boolean pointOnLine(int x1, int y1, int x2, int y2, int px, int py, int EPSILON) { // ..a.. ..b.. // start |------P-----| end => a+b = len // ...len... int a = dist(x1, y1, px, py); int b = dist(x2, y2, px, py); int l = dist(x1, y1, x2, y2); int ab = a + b; int diff = Math.abs(l-ab); return diff <= (EPSILON*EPSILON); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPointInLine(Coordinates point, Coordinates linePointA, Coordinates linePointB);", "private static boolean isPointOnLine(LineSegment a, Point2D b) {\r\n\t // Move the image, so that a.first is on (0|0)\r\n\t LineSegment aTmp = new LineSegment(new PointDouble(0, 0), new PointDouble(\r\n\t ...
[ "0.838995", "0.8117219", "0.7979467", "0.7740874", "0.7446623", "0.73275", "0.7316883", "0.72961897", "0.7083554", "0.7023647", "0.6976468", "0.6938124", "0.69258136", "0.69254047", "0.6906709", "0.68100995", "0.676823", "0.6767489", "0.6749999", "0.6741156", "0.6738895", "...
0.7346003
5
checks whether the given point is inside the polygon
public static boolean pointInPolygon(Vector2i[] polygon, int x, int y) { int intersects = 0; for(int i=0; i<polygon.length; i++) { int x1 = polygon[i].x; int y1 = polygon[i].y; int x2 = polygon[(i+1) % polygon.length].x; int y2 = polygon[(i+1) % polygon.length].y; if (((y1 <= y && y < y2) || (y2 <= y && y < y1)) && x < ((x2 - x1) / (y2 - y1) * (y - y1) + x1)) intersects++; } return (intersects & 1) == 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean contains(Polygon p);", "boolean checkPointInsidePolygon(Point[] points, PVector input) {\n\t\tint i, j;\n\t\tboolean c = false;\n\t\tfor (i = 0, j = points.length - 1; i < points.length; j = i++) {\n\t\t\tif (((points[i].y > input.y) != (points[j].y > input.y))\n\t\t\t\t\t&& (input.x < (points[j].x - poi...
[ "0.784018", "0.76442766", "0.7641358", "0.73930454", "0.72822535", "0.7264364", "0.72532356", "0.7187848", "0.71640307", "0.7161992", "0.71489525", "0.71365625", "0.71182996", "0.71056414", "0.70929086", "0.7067402", "0.7056747", "0.7047723", "0.70407504", "0.7030976", "0.702...
0.75769436
3
checks whether the given point is inside the rectangle
public static boolean pointInRectangle(int minX, int minY, int maxX, int maxY, int x, int y) { return minX < x && maxX > x && minY < y && maxY > y; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean whithinRectangle(Point point1, Point point2) {\n\t\treturn false;\n\t}", "public boolean pointInside(Point2D p) {\n AffineTransform fullTransform = this.getFullTransform();\n AffineTransform inverseTransform = null;\n try {\n inverseTransform = fullTransform.createI...
[ "0.7831456", "0.7748379", "0.76828474", "0.76767534", "0.76204133", "0.7558989", "0.7545254", "0.75294536", "0.74946237", "0.7453895", "0.74415886", "0.7321799", "0.72581136", "0.725783", "0.72437763", "0.7190258", "0.71346116", "0.7101397", "0.70942175", "0.70914376", "0.706...
0.7574272
5
checks whether the given point is inside the circle
public static boolean pointInCircle(int cx, int cy, int cRadius, int x, int y) { int dx = Math.abs(cx - x); int dy = Math.abs(cy - y); int d = (dx*dx) + (dy*dy); return d < (cRadius*cRadius); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean inCircle(int x, int y) {\n return Math.pow(x - xs, 2) + Math.pow(y - ys, 2) <= Math.pow(r, 2);\n }", "static boolean pointInCircumcircle(PointDouble a, PointDouble b, PointDouble c, PointDouble p) {\n PointDouble circumcenter = circumCircle(a, b, c);\n return circu...
[ "0.7952105", "0.7810411", "0.7724701", "0.7719724", "0.7671148", "0.75687003", "0.73786074", "0.7246558", "0.7228786", "0.7221192", "0.7218186", "0.72046274", "0.7188779", "0.7173592", "0.71236944", "0.7082182", "0.70121145", "0.7011987", "0.7004728", "0.6988525", "0.6938004"...
0.7853174
1
checks whether the given point is inside the triangle
public static boolean pointInTriangle(int x1, int y1, int x2, int y2, int x3, int y3, int px, int py) { Vector2i a = new Vector2i(x1, y1); Vector2i b = new Vector2i(x2, y2); Vector2i c = new Vector2i(x3, y3); Vector2i p = new Vector2i(px, py); Vector3f bary = MathUtils.barycentric(a, b, c, p); if(bary.x < 0 || bary.y < 0 || bary.z < 0) { return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isPointInTriangle(E3DVector2F point)\r\n\t{\r\n\t\tif(point == null)\r\n\t\t\treturn false;\r\n\t\t\r\n E3DVector3F vertexPosA = vertices[0].getVertexPos(),\r\n vertexPosB = vertices[1].getVertexPos(),\r\n vertexPosC = vertices[2].getVertexPos();\r\n\r\n ...
[ "0.78767693", "0.7850306", "0.7610886", "0.726393", "0.72541094", "0.71921897", "0.7151968", "0.6980736", "0.69205683", "0.69166136", "0.68789315", "0.68703103", "0.6745605", "0.67371684", "0.6663084", "0.6649735", "0.6627883", "0.66221416", "0.6596103", "0.65771425", "0.6520...
0.7505114
3
calculates the dot product of the two vectors (x1,y1) and (x2,y2)
private static int dot(int x1, int y1, int x2, int y2) { return (x1 * x2) + (y1 * y2); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double dotProduct(Coordinates vectorA, Coordinates vectorB);", "private double calcDotProduct(Point2D.Double a, Point2D.Double b)\n\t{\t\n\t\treturn (a.getX() * b.getX()) + (a.getY() * b.getY());\n\t}", "static double dot(Vec a, Vec b) {\n return (a.x * b.x + a.y * b.y);\n }", "doubl...
[ "0.8586509", "0.80086625", "0.7996343", "0.7871812", "0.7856297", "0.78323704", "0.77665436", "0.7510978", "0.73907375", "0.73815715", "0.73233", "0.72520536", "0.7247015", "0.72348505", "0.72270805", "0.7214283", "0.71616095", "0.7154229", "0.71431917", "0.70998806", "0.7075...
0.82477915
1
calculates the cross product of the two vectors (x1,y1) and (x2,y2)
private static int dist(int x1, int y1, int x2, int y2) { return (int) Math.sqrt(Math.abs(((x2-x1) * (x2-x1)) + ((y2-y1) * (y2-y1)))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double crossProduct(Point2D a, Point2D b) {\r\n return a.getX() * b.getY() - b.getX() * a.getY();\r\n }", "static double cross(Vec a, Vec b) {\n return a.x * b.y - a.y * b.x;\n }", "public double computeCrossProduct(Vector v2){\n return this.getX() * v2.getY() ...
[ "0.81925666", "0.8100806", "0.7775315", "0.765267", "0.75251466", "0.73774946", "0.7274298", "0.70820636", "0.7024671", "0.6950369", "0.68615294", "0.68440455", "0.683927", "0.6818856", "0.68127483", "0.672863", "0.6650707", "0.6603402", "0.637015", "0.63459814", "0.62852466"...
0.5413362
70
Lower case Setter/getter for JPA
public int getxCoord() { return xCoord; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract T getEntityByColumnName(String columnName, String value);", "public void setUWCompany(entity.UWCompany value);", "void entityValueChange(String name, String value);", "protected String isSetter(final Method<?> method)\r\n {\r\n String methodName = method.getName();\r\n \r\n if ...
[ "0.5963085", "0.5918442", "0.57861114", "0.57674676", "0.574531", "0.57408035", "0.57153153", "0.56777084", "0.5596895", "0.5580469", "0.5562657", "0.55605495", "0.5553819", "0.5552806", "0.5549928", "0.554357", "0.54810846", "0.547926", "0.5477521", "0.5470493", "0.5467129",...
0.0
-1
Called by a ComputationThread when a computation has been completed.
public void computationCompleted(ComputationThread thread, WorkSection work);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void done() {\n\t\ttry {\n\t\t\t// get the result of doInBackground and display it\n\t\t\tresultJLabel.setText(get().toString());\n\t\t} // end try\n\t\tcatch (InterruptedException ex) {\n\t\t\tresultJLabel.setText(\"Interrupted while waiting for results.\");\n\t\t} // end catch\n\t\tcatch (ExecutionExce...
[ "0.694626", "0.6756399", "0.6720062", "0.66165596", "0.6605701", "0.65681815", "0.6563673", "0.65510505", "0.65260917", "0.650385", "0.6462116", "0.63295203", "0.6279481", "0.62468266", "0.6242836", "0.62112963", "0.62025946", "0.61646795", "0.61416686", "0.6127728", "0.60947...
0.8057923
0
Called by a ComputationThread when a computation has been canceled.
public void computationCanceled(ComputationThread thread, WorkSection work);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cancelCurrentComputation(){\n\t\tft.cancel(true);\n\t}", "@Override\n\tpublic void canceled() {\n\t\t\n\t}", "@Override\n\tpublic void canceled() {\n\t\t\n\t}", "public synchronized void cancel() {\n }", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t...
[ "0.7779034", "0.7462844", "0.7462844", "0.7393547", "0.72159797", "0.7165775", "0.7146721", "0.71350896", "0.71350896", "0.71350896", "0.71350896", "0.71350896", "0.71350896", "0.7133056", "0.71166503", "0.7112056", "0.70973325", "0.70794255", "0.70794255", "0.70794255", "0.7...
0.81158304
0
Represents a permission being added or its boolean being set
public PermissionSetMessage(Rank rank, PermissionNode permission) { super(rank, MESSAGE_TYPE, permission); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean addPermission(Permission permission);", "public String getPermission()\r\n {\r\n return permission;\r\n }", "public String getPermissionDescription() {\n return permissionDescription;\n }", "public int getUserModificationPermission() {\n return permission;\n }"...
[ "0.6822967", "0.664449", "0.6563952", "0.65556437", "0.6442278", "0.64264655", "0.6359666", "0.63579327", "0.62866855", "0.6269472", "0.6231768", "0.6207801", "0.62002", "0.61955965", "0.615526", "0.61050725", "0.608574", "0.60818577", "0.6042442", "0.6033844", "0.59993225", ...
0.0
-1
TODO: Not sure how valuable this method is. See asList() and automatic table conversion.
public List<List<Object>> rows() { List<List<Object>> rows = new ArrayList<List<Object>>(); for (List<String> rawRow : getRawRows()) { List<Object> newRow = new ArrayList<Object>(); for (int i = 0; i < rawRow.size(); i++) { newRow.add(transformCellValue(i, rawRow.get(i))); } rows.add(newRow); } return rows; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@ZenCodeType.Caster\n @ZenCodeType.Method\n default List<IData> asList() {\n \n return notSupportedCast(\"IData[]\");\n }", "public abstract List toNameValueList();", "List<List<Object>> getTableValues();", "Object getTolist();", "Listof<X> toList();", "java.util.List<java.lang.Str...
[ "0.65530974", "0.65486366", "0.6445645", "0.59932154", "0.5982386", "0.597712", "0.59396845", "0.59371334", "0.5874488", "0.5872698", "0.5869477", "0.58513117", "0.5845465", "0.5828481", "0.58162487", "0.57666457", "0.5754083", "0.57531804", "0.5732742", "0.5717769", "0.56849...
0.0
-1
Creates new form StammvErstellen
public StammvErstellen(java.awt.Frame parent, boolean modal, DBConnection Con, String Edvid, String Pfad, boolean anzeigen) { super(parent, modal); initComponents(); con = Con; edvid = Edvid; pfad = Pfad; jTextField1.setText(pfad); if(anzeigen){ Statement stmt = null; ResultSet rs = null; int nauf = 0; try{ stmt = con.Connections[0].createStatement(); rs = stmt.executeQuery("SELECT auf, jahr FROM Auf ORDER BY auf"); while(rs.next()){ int aufx = rs.getInt("auf"); int jahrx = rs.getInt("jahr"); jComboBox1.addItem(aufx+" ("+jahrx+")"); nauf ++; } } catch (Exception e) {e.printStackTrace(); } finally{ try{ if(stmt!=null) rs.close(); if(stmt!=null) stmt.close(); }catch(Exception e) {e.printStackTrace();} } setVisible(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Result newForm() {\n return ok(newForm.render(palletForm, setOfArticleForm));\n }", "FORM createFORM();", "public FormInserir() {\n initComponents();\n }", "private void createBtnActionPerformed(java.awt.event.ActionEvent evt) {\n\n staff.setName(regName.getText());\n...
[ "0.6864175", "0.6825612", "0.66550934", "0.6641329", "0.65455407", "0.63615924", "0.6330274", "0.6238551", "0.6233757", "0.6214075", "0.61909336", "0.6177112", "0.6158149", "0.6152513", "0.6115905", "0.61065197", "0.6106274", "0.6031723", "0.6030706", "0.60260046", "0.6025092...
0.0
-1
Creates a new generator that displays tree numbers as labels
public LabelGenerator(ArrayList<String> labels ) { this.labels = labels; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toYield() {\n\t\tif (label == null && numChildren <= 0)\n\t\t\treturn \"\";\n\t\tif (isEmptyString)\n\t\t\treturn \"\";\n\t\tif (numChildren == 0)\n\t\t\treturn label.toString();\n\t\tStringBuffer ret = new StringBuffer();\n\t\tif (numChildren > 0) {\n\t\t\tfor (int i = 0; i < numChildren; i++) {\n\t...
[ "0.6144559", "0.5979183", "0.59539646", "0.5886684", "0.5840588", "0.58285767", "0.57815456", "0.5747964", "0.5734736", "0.5719517", "0.5713259", "0.5712047", "0.5701381", "0.5688039", "0.5673332", "0.5657436", "0.56289554", "0.56206095", "0.5594761", "0.558389", "0.55783325"...
0.50932586
87
Generates a label for the specified item. The label is typically a formatted version of the data value, but any text can be used.
public String generateLabel(XYDataset dataset, int series, int category) { String result; result = labels.get(category); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected String generateLabelString(CategoryDataset dataset, int row, int column) {\n\t\tif (dataset == null) {\n\t\t\tthrow new IllegalArgumentException(\"Null 'dataset' argument.\");\n\t\t}\n\t\tString result = null;\n\t\tObject[] items = createItemArray(dataset, row, column);\n\t\tresult = MessageFormat.format...
[ "0.6606331", "0.65337694", "0.6344011", "0.62909114", "0.61227494", "0.6024568", "0.60212207", "0.6014039", "0.59938574", "0.5885411", "0.5885411", "0.58448416", "0.5828696", "0.5807457", "0.576746", "0.5727311", "0.57091796", "0.5708983", "0.5669744", "0.5638024", "0.5638024...
0.576222
15
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jButton2 = new javax.swing.JButton(); jTextField1 = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); jButton1 = new javax.swing.JButton(); jComboBox1 = new javax.swing.JComboBox(); jLabel2 = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Crear programa maestro de asignación"); setLocationByPlatform(true); jButton2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N jButton2.setText("ok"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); jTextField1.setText("jTextField1"); jLabel1.setText("Seleccionar archivo de Topcon"); jButton1.setText("Browse"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jLabel2.setLabelFor(jComboBox1); jLabel2.setText("Número de grabación"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1, javax.swing.GroupLayout.PREFERRED_SIZE, 124, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(13, 13, 13) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, 329, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(6, 6, 6) .addComponent(jButton1)) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel2, javax.swing.GroupLayout.PREFERRED_SIZE, 143, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(31, 31, 31) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createSequentialGroup() .addGap(264, 264, 264) .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 65, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addGap(45, 45, 45) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(jComboBox1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 59, Short.MAX_VALUE) .addComponent(jButton2) .addContainerGap()) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.7319545", "0.7290502", "0.7290502", "0.7290502", "0.72860676", "0.7248135", "0.72132677", "0.7208833", "0.7195503", "0.71899074", "0.71839535", "0.7159182", "0.71478266", "0.7092896", "0.7081379", "0.70575553", "0.6987028", "0.69771224", "0.69548094", "0.6954804", "0.69449...
0.0
-1
Handles user denial for authorization.
public OAuth2AuthorizeRespDTO handleUserConsentDenial(OAuth2Parameters oAuth2Parameters) { String cibaAuthCodeDOKey = oAuth2Parameters.getNonce(); OAuth2AuthorizeRespDTO respDTO = new OAuth2AuthorizeRespDTO(); try { // Update authenticationStatus when user denied the consent. CibaDAOFactory.getInstance().getCibaAuthMgtDAO().persistStatus(cibaAuthCodeDOKey, AuthenticationStatus.DENIED.toString()); respDTO.setErrorCode(CONSENT_DENIED); respDTO.setErrorMsg("User Denied the consent."); return respDTO; } catch (CibaCoreException e) { if (log.isDebugEnabled()) { log.debug("Error occurred in updating the authentication_status for the ID : " + cibaAuthCodeDOKey + "with " + "responseType as (ciba). "); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unauthorized() {\n super.unauthorized();\n LoginFragment.this.getTracker().send(new HitBuilders.EventBuilder().setCategory(\"sign_in\").setAction(\"incorrect\").setLabel(\"incorrect\").build());\n Answers.getInstance().logLogin(new LoginEvent().p...
[ "0.69768", "0.6527191", "0.6470827", "0.6410081", "0.6384938", "0.62044024", "0.61961925", "0.61765593", "0.61761326", "0.6164607", "0.61047745", "0.60921985", "0.60910124", "0.6043255", "0.6036788", "0.60181254", "0.5987532", "0.5984187", "0.59715897", "0.5934157", "0.592404...
0.58827764
23
Handles failure in authentication process.
public OAuth2AuthorizeRespDTO handleAuthenticationFailed(OAuth2Parameters oAuth2Parameters) { String nonce = oAuth2Parameters.getNonce(); OAuth2AuthorizeRespDTO respDTO = new OAuth2AuthorizeRespDTO(); try { CibaDAOFactory.getInstance().getCibaAuthMgtDAO() .persistStatus(nonce, AuthenticationStatus.FAILED.toString()); respDTO.setErrorCode(ErrorCodes.SubErrorCodes.AUTHENTICATION_FAILED); respDTO.setErrorMsg("Authentication failed."); return respDTO; } catch (CibaCoreException e) { if (log.isDebugEnabled()) { log.debug("Error occurred in updating the authentication_status for the ID : " + nonce + "with " + "responseType as (ciba). "); } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void onUnsuccessfulAuthentication(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException {\n }", "@Override\n public void onAuthenticationFailed() {\n }", "@Override\n public void onAuthenticationFailed() {\n ...
[ "0.7790117", "0.77566767", "0.76517886", "0.7383608", "0.73570913", "0.7306127", "0.7189768", "0.7160373", "0.7148218", "0.712649", "0.7082558", "0.7082013", "0.6980539", "0.6963358", "0.69579285", "0.68983597", "0.68983597", "0.68983597", "0.68339473", "0.68083954", "0.67080...
0.62739044
39
find out which number is greatest
public static int greatest(int number1, int number2, int number3) { int result; int max = Math.max(number1, number2); if (number1 == number2 && number2 == number3) { //randomizer for lulz int[] numbersInArray = {number1, number2, number3}; int random = (int) (Math.random() * numbersInArray.length); result = numbersInArray[random]; } else if (max > number2) { result = Math.max(number1, number3); } else { result = Math.max(number2, number3); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int findGreatestValue(int x, int y) {\r\n\t\t\r\n\t\tif(x>y)\r\n\t\t\treturn x;\r\n\t\telse\r\n\t\t return y;\r\n\t}", "int getMax( int max );", "int getMax();", "int max(int a, int b);", "int getMaximum();", "private static int[] findGreatestNumInArray(int[] array) {\r\n\t\tint maxValue = Integ...
[ "0.762199", "0.72828007", "0.7224754", "0.70651174", "0.7038304", "0.70137197", "0.6851098", "0.6850685", "0.68192095", "0.67494255", "0.67466366", "0.67439026", "0.6701509", "0.6701509", "0.669976", "0.6693526", "0.66669625", "0.6665562", "0.66462106", "0.6637635", "0.661755...
0.6690851
16
add reading to end of array
public void addReading(Reading newReading) { int i = 0; while (_readings[i] != null) { i++; } _readings[i] = newReading; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void append(byte[] array, int off, int len) throws IOException {\n if(buffer == null) {\n buffer = allocator.allocate(limit);\n }\n buffer.append(array, off, len);\n }", "public synchronized void addData(Object[] data) throws IOException {\n\t\tif (! stopped){\n\t\t\tsampleCount...
[ "0.6278844", "0.6080255", "0.60795414", "0.6075137", "0.6008405", "0.5863834", "0.5841308", "0.58172613", "0.58052284", "0.57456017", "0.56875783", "0.56868166", "0.5684936", "0.56795", "0.5669843", "0.560993", "0.55703473", "0.5552822", "0.5537049", "0.5525123", "0.54967993"...
0.6360332
0
main class for chess game
public static void main(String[] args) throws Exception { Game game = new Game(); game.start(true,null,null,null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\n ConsoleChessGui gui = new ConsoleChessGui();\n GameController gameController = new GameController(gui);\n gameController.run();\n\n\n\n\n }", "public static void main(String[] args)\n {\n // put your code here\n //display an in...
[ "0.74925005", "0.73885685", "0.7298842", "0.7254223", "0.7197348", "0.7129005", "0.70967036", "0.7058688", "0.7050871", "0.6989848", "0.69359696", "0.6859058", "0.68307894", "0.68089926", "0.67725515", "0.6762241", "0.6748396", "0.6740318", "0.67107713", "0.66788125", "0.6672...
0.0
-1
method: Scores purpose: constructor for player name and score
public Scores(String player, int score) { this.player = player; this.score = score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PlayerScore (String name, int score)\n {\n playerName = name;\n playerScore = score;\n }", "public WinnerProfile(String name, int score){\n this.name=name;\n this.score=score;\n }", "public Score(String name, int score) {\n //set date to current date\n ...
[ "0.86188316", "0.7831123", "0.76021856", "0.7572135", "0.7419807", "0.73542285", "0.72276866", "0.7220221", "0.7144975", "0.7144543", "0.7123439", "0.7039239", "0.70175534", "0.700544", "0.6998319", "0.69359803", "0.6927939", "0.68777347", "0.6830046", "0.68104094", "0.678573...
0.8387504
1
method: Scores purpose: constructor for player score
public Scores(int score) { this.score = score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public PlayerScore (String name, int score)\n {\n playerName = name;\n playerScore = score;\n }", "public Scores(String player, int score) {\r\n this.player = player;\r\n this.score = score;\r\n }", "public Score(){\n\t\tscore = 0;\n\t\tincrement = 0; //how many points for...
[ "0.82649374", "0.8193504", "0.7636068", "0.7544242", "0.75163203", "0.7489284", "0.7310351", "0.72834027", "0.7274657", "0.72673446", "0.7265171", "0.7253607", "0.7238713", "0.72171867", "0.7177936", "0.7161708", "0.71165985", "0.7105292", "0.70541114", "0.70149726", "0.70117...
0.7998248
2
method: getPlayer purpose: return name of player (String)
public String getPlayer() { return player; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getPlayerName();", "public String getPlayerName() {\n\t\tString name = super.getPlayerName();\n\t\treturn name;\n\t}", "public String getName()\r\n\t{\r\n\t\treturn this.playerName;\r\n\t}", "public String getName(){\r\n\t\treturn playerName;\r\n\t}", "String getPlayer();", "public String getPlaye...
[ "0.89562875", "0.8640189", "0.8540858", "0.8505197", "0.85045505", "0.84971374", "0.8472185", "0.8432476", "0.8417751", "0.84120274", "0.8393132", "0.8393132", "0.83909416", "0.83552897", "0.83412904", "0.8315739", "0.8303239", "0.8276824", "0.8269036", "0.8224476", "0.816345...
0.804423
26
method: getScore purpose: return score of player
public int getScore() { return score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getPlayerScore();", "public int getScore(){\n\t\treturn playerScore;\n\t}", "public static int getPlayerScore()\r\n\t{\r\n\t\treturn playerScore;\r\n\t}", "public int getPlayerScore(){\n\t\treturn playerScore;\n\t}", "public int getScore() {\n return getStat(score);\n }", "Float getScore()...
[ "0.8922803", "0.86819255", "0.8631978", "0.8533766", "0.8327494", "0.82783616", "0.8253405", "0.8253405", "0.8223745", "0.8211636", "0.8180019", "0.81700885", "0.81620127", "0.81255925", "0.80729574", "0.80729574", "0.80729574", "0.80729574", "0.80625093", "0.80625093", "0.80...
0.80161405
23
method: setPlayer purpose: set name of player
public void setPlayer(String player) { this.player = player; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setName(String name)\r\n\t{\r\n\t\tthis.playerName = name;\r\n\t}", "private void setName(String nameIn){\r\n\t\tplayerName = nameIn;\r\n\t}", "public void setPlayerName(String name) {\n \tplayername = name;\n }", "public void setName(String name)\n {\n playersName = name;\n }", "pub...
[ "0.87200487", "0.86070466", "0.84676784", "0.8392461", "0.83695793", "0.8233719", "0.8185439", "0.8104723", "0.79727036", "0.79319036", "0.7926387", "0.76881635", "0.7673427", "0.7664107", "0.76539594", "0.7621613", "0.7583844", "0.7581313", "0.756233", "0.7554352", "0.753198...
0.81518734
7
method: setScore purpose: set score of player
public void setScore(int score) { this.score = score; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setPlayerScore(int score)\r\n\t{\r\n\t\tGame.playerScore = score;\r\n\t}", "public void setScore(int score) {this.score = score;}", "public void setScore(int score) { this.score = score; }", "public void setScore(int score)\n {\n this.score = score;\n }", "void setScore(long...
[ "0.8515799", "0.84249896", "0.8423096", "0.8327409", "0.8286692", "0.8277587", "0.8274306", "0.82680607", "0.82251656", "0.82251656", "0.82251656", "0.82251656", "0.82225496", "0.8153512", "0.81477433", "0.8142397", "0.81269604", "0.8126052", "0.81022483", "0.80983406", "0.80...
0.82913125
5
TODO Autogenerated method stub
@Override public int select(String queryString) { return (Integer)getSession().createQuery(queryString).uniqueResult(); }
{ "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
Variables ================================================================================ Lifecycle callbacks ================================================================================ ================================================================================ UI methods ================================================================================
protected void setupUI() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void initUI() {\n\r\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "@Override\n\tprotected void UpdateUI() {\n\t\t\n\t}", "private void initUI() {\n }", "public abstract void initUiAndListener();", "@Override\r\n public void updateUI() {\r\n }", ...
[ "0.6868063", "0.6813188", "0.6813188", "0.68117476", "0.66946924", "0.6606504", "0.6601799", "0.6588715", "0.6514893", "0.6487351", "0.6485981", "0.64820164", "0.6460055", "0.64509183", "0.64461917", "0.64461917", "0.64461917", "0.6436489", "0.64317125", "0.63800395", "0.6376...
0.67149615
4
================================================================================ View implementation ================================================================================
public void displayResults(ExperimentGameResultViewModel viewModel) { mNameIconView.setDescription(viewModel.gameName); mTypeIconView.setDescription(viewModel.gameType); mActualTimeIconView.setDescription(String.valueOf(viewModel.gameActualTime)); mEstimatedTimeIconView.setDescription(String.valueOf(viewModel.gameEstimatedTime)); mWasInterruptedIconView.setDescription(viewModel.wasInterrupted ? getStringByResourceId(R.string.yes) : getStringByResourceId(R.string.no)); if (viewModel.customJsonInfo != null && !viewModel.customJsonInfo.isEmpty()) { mAdditionalInfoIconView.setVisibility(View.VISIBLE); mAdditionalInfoIconView.setDescription(viewModel.customJsonInfo); } else { mAdditionalInfoIconView.setVisibility(View.GONE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void view() {\n\t\t\n\t}", "public abstract String getView();", "public String getView();", "public String getView();", "StableView view();", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\n\tprotected void initView() {\n\t\t\n\t}", "@Override\r\n\tprotected voi...
[ "0.752154", "0.72476846", "0.7163766", "0.7163766", "0.7142736", "0.70888305", "0.70888305", "0.69755936", "0.69755936", "0.6947131", "0.69467926", "0.6925491", "0.6925491", "0.6897443", "0.68948805", "0.68827003", "0.6869463", "0.6850354", "0.68421894", "0.68365794", "0.6828...
0.0
-1
/////////////////////////////// // init MIDI tracking ////////// //////////////////////////////////
void controllerChangeReceived(rwmidi.Controller cntrl){ println("cc recieved"); println(": " + cntrl.getCC()) ; if(cntrl.getCC() == 2){ modThresh1(cntrl.getValue()); /// adjust threshold1 } if(cntrl.getCC() == 3){ modThresh2(cntrl.getValue()); /// adjust threshold1 } if(cntrl.getCC() ==4){ modThresh3(cntrl.getValue()); /// adjust threshold1 } if(cntrl.getCC() == 5){ //// adjust skip modSkip(cntrl.getValue()); } if(cntrl.getCC() == 6){ /// adjus scale modScale(cntrl.getValue()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected ImgProcessor() {\n\t\talbert = new Midi();\n\t\tharmon1 = new Midi();\n\t\tharmon2 = new Midi();\n\t\tharmon3 = new Midi();\n\t}", "@Override\r\n\tpublic void setup(){\n\t\tmidiIO = CCMidiIO.getInstance();\r\n\t\tmidiIO.printDevices();\r\n\r\n\t\t// print a list with all available devices\r\n\t\tmidiIO...
[ "0.63522285", "0.6235852", "0.6219815", "0.60283834", "0.6006842", "0.5979568", "0.5927463", "0.5913324", "0.5887884", "0.5883848", "0.58433855", "0.5828123", "0.5757251", "0.5741267", "0.57396954", "0.5738436", "0.5737627", "0.5736392", "0.5725764", "0.572171", "0.57157266",...
0.0
-1
/ end MIDI tracking ////////////// //////////////////////////////////
public void mousePressed() { int ret = output.sendNoteOn(0, 3, 3); ret = output.sendSysex(new byte[] {(byte)0xF0, 1, 2, 3, 4, (byte)0xF7}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void end() {\n \tRobotMap.feedMotor1.set(0);\n \tRobotMap.shootAgitator.set(0);\n }", "public void endMessage()\n\t{\n\t}", "protected void end() {\r\n // stop motor, reset position on the dumper, enable closed loop\r\n }", "public void closeMidi() {\n\t\tjDevice.close();\n\t}", ...
[ "0.671154", "0.6556719", "0.64726746", "0.64334714", "0.63816804", "0.6331333", "0.62924993", "0.6291009", "0.620741", "0.6200564", "0.61805326", "0.6129151", "0.6074436", "0.6058478", "0.60307735", "0.6027437", "0.601233", "0.5989978", "0.59782326", "0.59745216", "0.59745085...
0.0
-1
////////////////////////// // do the threshold display //////////////////////////////
void doThreshDisplay(){ /// init colors int greenFill = color(125,125,0, 65); int redFill = color(255,0,0,65); int blueFill = color(0,0,255, 85); // float spacing = 15; // textFont(SanSerif); /// hint(ENABLE_NATIVE_FONTS) ; /// position float dPosY3 = 0-height/2; float dPosY2 = 0-height/2 + spacing; float dPosY1 = 0-height/2 + spacing + spacing; /// make the text flush with the display bar float dPosX3 = 0-width/2 + (threshold3 * .5f) + 10f; float dPosX2 = 0-width/2 + (threshold2 * .5f) + 10f; float dPosX1 = 0-width/2 + (threshold1 * .5f) + 10f; // thresh 3 -- green squares strokeWeight(1); fill(greenFill); stroke(64,208,0); rect(0-width/2, dPosY3, threshold3 * .5f, 10f); fill(255,255,0); text("BACKGROUND: " + threshold3 * .5, dPosX3, dPosY3 + 10); /// thresh 2 -- red circles fill(redFill); stroke(204,0,0); /// rotate(-15); rect(0-width/2,dPosY2, threshold2 * .5f, 10f); fill(204,0,0); text("MIDDLEGROUND: " + threshold2 * .5f, dPosX2, dPosY2 + 10f); //// thresh 1 -- blue triangles fill(blueFill); stroke(0,24,255); /// rotate(-15); rect(0-width/2, dPosY1, threshold1 * .5f, 10f); fill(0,24,255); text("FOREGROUND: " + threshold1 * .5, dPosX1, dPosY1 + 10); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static void adaptivaeThresholdCalc() {\n\t\tif (triggerCount > 3) {\n\t\t\tthreshold /= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold up to \" + threshold);\n\t\t}\n\t\tif (triggerCount < 2) {\n\t\t\tthreshold *= 0.9;\n\t\t\t// Log.d(\"visualizer\", \"threshold down to \" + threshold);\n\t\t}\n\n\t\ti...
[ "0.65527016", "0.6307873", "0.6218594", "0.6140313", "0.5989145", "0.5985285", "0.59369373", "0.58944577", "0.58593583", "0.5833696", "0.5784632", "0.57528126", "0.5738919", "0.5673912", "0.56248266", "0.560544", "0.5597456", "0.558684", "0.55703396", "0.5565683", "0.55365103...
0.7644126
0
These functions come from:
float rawDepthToMeters(int depthValue) { if (depthValue < 2047) { return (float)(1.0 / ((double)(depthValue) * -0.0030711016 + 3.3309495161)); } return 0.0f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected boolean func_70814_o() { return true; }", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "public abstract void mo56925d();", "void mo21072c();", "void mo57278c();", "private void kk12() {\n\n\t}", "void mo57277b();", "@Override\n public void func_104112_b() {\n ...
[ "0.56635916", "0.5658572", "0.56264406", "0.5588659", "0.55794823", "0.55642635", "0.5558291", "0.55569315", "0.55231047", "0.5514677", "0.5503473", "0.55030334", "0.54952663", "0.5493184", "0.54914606", "0.54890025", "0.54696226", "0.5467684", "0.5467684", "0.5467684", "0.54...
0.0
-1
////////////////////////////////// /////// KEYBOARD COMMANDS //////// //////////////////////////////////
public void keyPressed() { if (key == CODED) { ///// geometry per pixel if (keyCode == UP) { skip+=1; } if (keyCode == DOWN) { if (skip >= 5){ skip-=1; } } ///// scale ratio (fits the kinect image to the canvas) if (keyCode == LEFT) { kScale-=100; } if (keyCode == RIGHT) { kScale+=100; } } ///// adjust Kinect tilt if(keyPressed) { if (key == 'a' || key == 'A') { deg++; } else if (key == 'z' || key == 'Z') { deg--; } deg = constrain(deg,0,30); kinect.tilt(deg); ///// adjust depth threshold } if (key == 's' || key == 'S') { /// thresh 1 if(threshold1 < threshold2){ threshold1 +=10; println("threshold1: " + threshold1); } } if (key == 'x' || key == 'X') { /// thresh 1 if(threshold1 > 0 ){ threshold1 -=10; println("threshold1: " + threshold1); } } if (key == 'd' || key == 'D') { /// thresh 2 if(threshold2 < threshold3){ threshold2 +=10; println("threshold2: " + threshold2); } } if (key == 'c' || key == 'C') { /// thresh 2 if(threshold2 > threshold1){ threshold2 -=10; println("threshold2: " + threshold2); } }if (key == 'f' || key == 'F') { /// thresh 3 if(threshold3 < threshold4){ threshold3 +=10; println("threshold2: " + threshold2); } }if (key == 'v' || key == 'v') { /// thresh 3 if(threshold3 > threshold2){ println("threshold3: " + threshold3); threshold3 -=10; } //// this does opacity for the objects }if (key == 'g' || key == 'V') { /// thresh 3 if(threshold3 > threshold2){ ///// println("threshold3: " + threshold3); objOpacity +=10; } }if (key == 'b' || key == 'B') { /// thresh 3 if(threshold3 > threshold2){ //// println("threshold3: " + threshold3); objOpacity -=10; } }if (key == ' ') { /// toddgle threshold display if(displayThreshold == true){ displayThreshold = false; } else if (displayThreshold == false){ displayThreshold = true; } } /// end key pressed //// end }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void keyboardAction( KeyEvent ke )\n {\n \n }", "public abstract void keycommand(long ms);", "public void interactWithKeyboard() {\n StdDraw.setCanvasSize(WIDTH * 16, HEIGHT * 16);\n StdDraw.setXscale(0, WIDTH);\n StdDraw.setYscale(0, HEIGHT);\n cr...
[ "0.7154602", "0.7140998", "0.7113559", "0.70681", "0.70668864", "0.6991751", "0.6900942", "0.6885435", "0.6853133", "0.68326724", "0.68140715", "0.6808078", "0.67958885", "0.67911154", "0.67899084", "0.67803043", "0.6739494", "0.6723356", "0.6694484", "0.6690007", "0.6686482"...
0.0
-1
/////////////////////////////// //MIDI threshold modifiers ///////////////////////////////
void modThresh1(int theValue){ threshold1=10*theValue; // threshold2 = threshold1 + 1; println("mod t1: " + threshold1) ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MultiSpectralVolume(Integer threshold)\r\n/* 14: */ {\r\n/* 15:23 */ this.threshold = threshold.intValue();\r\n/* 16: */ }", "public int getThreshold() {\n return threshold; \n }", "public void setThreshold(float threshold){\n this.threshold = threshold;\n }", "float getThr...
[ "0.66096056", "0.64141756", "0.63278544", "0.6326522", "0.61867917", "0.61752856", "0.6110238", "0.60861254", "0.6032401", "0.6018738", "0.598375", "0.5887882", "0.58312434", "0.58027494", "0.57792485", "0.57509434", "0.5741738", "0.5720399", "0.57127", "0.5706711", "0.568542...
0.584773
12
================= Getters & Setters
public long getId() { return id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "@Override\n public void get() {}", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "@Override\n String get();", "protected abstract Set method_1559();", "@Override\n\n // <editor-fold defaultstate=\"collapsed\" desc=\" UML Marker \"> \n //...
[ "0.65337235", "0.6474254", "0.6437332", "0.6210924", "0.6189611", "0.61207926", "0.6108809", "0.6091732", "0.60569435", "0.60435545", "0.6018168", "0.6008576", "0.5997084", "0.59912354", "0.5976269", "0.5970668", "0.5964311", "0.5936816", "0.59190524", "0.5913581", "0.590988"...
0.0
-1
Computes statistics for the results of a metric over a sequence of nodes.
public static <O extends Node> DoubleSummaryStatistics computeStatistics(Metric<? super O, ?> key, Iterable<? extends O> ops) { return computeStatistics(key, ops, MetricOptions.emptyOptions()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateMetrics(){\n //precision\n precisionFinal = precision.stream().mapToDouble(f -> f).sum()/precision.size();\n System.out.print(\"Precision: \");\n System.out.println(precisionFinal);\n //recall\n recallFinal = recall.stream().mapToDouble(f -> f).sum()/r...
[ "0.6004557", "0.57517195", "0.5737452", "0.571849", "0.57145196", "0.5705139", "0.5631827", "0.5607799", "0.556066", "0.5557912", "0.55359864", "0.55256397", "0.5467689", "0.52985704", "0.52744925", "0.5269458", "0.52540714", "0.5220956", "0.5199072", "0.51718193", "0.5160613...
0.49848714
37
Computes statistics for the results of a metric over a sequence of nodes.
public static <O extends Node> DoubleSummaryStatistics computeStatistics(Metric<? super O, ?> key, Iterable<? extends O> ops, MetricOptions options) { Objects.requireNonNull(key, NULL_KEY_MESSAGE); Objects.requireNonNull(options, NULL_OPTIONS_MESSAGE); Objects.requireNonNull(ops, NULL_NODE_MESSAGE); return StreamSupport.stream(ops.spliterator(), false) .filter(key::supports) .collect(Collectors.summarizingDouble(op -> computeMetric(key, op, options).doubleValue())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void calculateMetrics(){\n //precision\n precisionFinal = precision.stream().mapToDouble(f -> f).sum()/precision.size();\n System.out.print(\"Precision: \");\n System.out.println(precisionFinal);\n //recall\n recallFinal = recall.stream().mapToDouble(f -> f).sum()/r...
[ "0.6004521", "0.575071", "0.57350373", "0.5717073", "0.5713314", "0.5703919", "0.563053", "0.5606967", "0.55610895", "0.55566", "0.5534012", "0.55245566", "0.5466693", "0.5299246", "0.527318", "0.5268416", "0.5253156", "0.5219619", "0.51974", "0.5169702", "0.51595634", "0.5...
0.46382135
87
it accepts statement without semicolon.
@Test public void test8() { String statement = "delete from omar;"; Extractor extractor = new DeleteExtractor(statement); assertTrue(extractor.isValid()); assertNull(extractor.getColumnsNames()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseStatement() {\n switch (nextToken.kind) {\n case Token.IDENT:\n parseSimpleStatement();\n break;\n case Token.IF:\n parseIfStatement();\n break;\n case Token.WHILE:\n parseWhileState...
[ "0.6966283", "0.64556044", "0.6444794", "0.62597823", "0.62420964", "0.6061301", "0.6029286", "0.6022245", "0.5986141", "0.5986141", "0.5986141", "0.5975982", "0.59723735", "0.5901102", "0.58843744", "0.58739114", "0.5860431", "0.5811417", "0.5773612", "0.5719435", "0.5719435...
0.0
-1
Test the Utility Provider
@Test public void testSceneList() throws Exception { // Open up a file that we can write some test results to // Shouldn't be relied on for automated testing but good for debugging PrintWriter testLogger = new PrintWriter("logs/testUtils.txt", "UTF-8"); testLogger.println("Starting Test for Scene List"); try { UtilityProvider utils = new UtilityProvider(); assert (utils.translateDvsError(100) == HttpStatus.OK); assert (utils.translateDvsError(102) == HttpStatus.NO_CONTENT); assert (utils.translateDvsError(110) == HttpStatus.BAD_REQUEST); assert (utils.translateDvsError(122) == HttpStatus.NOT_ACCEPTABLE); assert (utils.translateDvsError(101) == HttpStatus.INTERNAL_SERVER_ERROR); } catch (Exception e) { e.printStackTrace(testLogger); assert (false); } finally { // Close the output text file testLogger.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testUtil() {\n String random = Util.getInstance().getRandomString(15);\n\n assertEquals(15, random.length());\n }", "@Test\r\n\tpublic void testSanity() {\n\t}", "private DataProviderUtils() {\n }", "private void someUtilityMethod() {\n }", "private void so...
[ "0.6563014", "0.63245344", "0.62235755", "0.61517173", "0.61517173", "0.6144988", "0.6143999", "0.61377245", "0.611008", "0.6107759", "0.6107759", "0.6107759", "0.6107759", "0.61023957", "0.6069033", "0.60083085", "0.60045564", "0.59815764", "0.5976074", "0.593193", "0.591887...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.chat, 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.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
/String message = "You have left channel " + channel + "."; LayoutInflater inflater = (LayoutInflater)getSystemService(Context.LAYOUT_INFLATER_SERVICE); TextView textView = (TextView)inflater.inflate(R.layout.received_red_message, null, true); textView.setText(message); this.runOnUiThread(new AddTextViewToMessagesListRunnable(textView));
@Override public void channelParted(String channel) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void text(final String sender, final String nachricht)\n {\n act.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n\n\n\n i=-i;\n String text=\"<br />\";\n text+=sender + \": \" + nachricht+\"\";\n ...
[ "0.74063337", "0.7124114", "0.6816737", "0.665751", "0.66399556", "0.6587628", "0.65321636", "0.6517211", "0.6506527", "0.6488842", "0.6418203", "0.63889134", "0.6363021", "0.6353387", "0.6325752", "0.6317572", "0.6286306", "0.6279069", "0.6272522", "0.62596273", "0.62539506"...
0.0
-1
Open URL stream as an input stream and print contents to command line.
public static void readFromUrl(URL url) { try { BufferedReader in = new BufferedReader( new InputStreamReader( url.openStream())); String inputLine; while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } in.close(); } catch (IOException ex) { ex.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String args[]) throws Exception\n {\n URL myurl = new URL(args[0]);\n // get inputstream of the URL\n InputStream is = myurl.openStream();\n\n int ch;\n\n while ((ch = is.read()) != -1)\n System.out.print( (char)ch);\n }", "public abstract InputStream stdout();"...
[ "0.67738396", "0.6135353", "0.5920105", "0.5702708", "0.56966585", "0.5457381", "0.54264706", "0.53437614", "0.53240365", "0.5296437", "0.52405125", "0.52315325", "0.52053523", "0.5185233", "0.51806253", "0.5174617", "0.51666504", "0.51551276", "0.51523477", "0.51511866", "0....
0.5738606
3
Update the packr config
static void updateLauncherArgs(Bootstrap bootstrap, Collection<String> extraJvmArgs) { File configFile = new File("config.json").getAbsoluteFile(); // The AppImage mounts the packr directory on a readonly filesystem, so we can't update the vm args there if (!configFile.exists() || !configFile.canWrite()) { return; } Gson gson = new GsonBuilder() .setPrettyPrinting() .create(); Map config; try (FileInputStream fin = new FileInputStream(configFile)) { config = gson.fromJson(new InputStreamReader(fin), Map.class); } catch (IOException e) { log.warn("error updating packr vm args!", e); return; } String[] argsArr = getArgs(bootstrap); if (argsArr == null || argsArr.length == 0) { log.warn("Launcher args are empty"); return; } // Insert JVM arguments to config.json because some of them require restart List<String> args = new ArrayList<>(); args.addAll(Arrays.asList(argsArr)); args.addAll(extraJvmArgs); config.put("vmArgs", args); config.put("env", getEnv(bootstrap)); try { File tmpFile = File.createTempFile("openosrs", null); try (FileOutputStream fout = new FileOutputStream(tmpFile); FileChannel channel = fout.getChannel(); PrintWriter writer = new PrintWriter(fout)) { channel.lock(); writer.write(gson.toJson(config)); channel.force(true); // FileChannel.close() frees the lock } try { Files.move(tmpFile.toPath(), configFile.toPath(), StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.ATOMIC_MOVE); } catch (AtomicMoveNotSupportedException ex) { log.debug("atomic move not supported", ex); Files.move(tmpFile.toPath(), configFile.toPath(), StandardCopyOption.REPLACE_EXISTING); } } catch (IOException e) { log.warn("error updating packr vm args!", e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateConfig(){\n try {\n BeanUtils.copyProperties(config_,newConfig_);//copy the properties of newConfig_ into config_\n } catch (IllegalAccessException ex) {\n ReportingUtils.logError(ex, \"Failed to make copy of settings\");\n } catch (InvocationTargetException ex) {\...
[ "0.6347981", "0.62721026", "0.6255111", "0.6156131", "0.60537106", "0.56991", "0.5648173", "0.5602787", "0.5598631", "0.55583215", "0.5512343", "0.5493994", "0.5417806", "0.5414044", "0.54096794", "0.5407693", "0.5393629", "0.5375212", "0.53637266", "0.5362792", "0.53627515",...
0.0
-1
TODO Autogenerated method stub
public int updateIncome(Income income) { 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
public void deleteIncome(String uid) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public Income findIncomeById(String id) { 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
TODO Autogenerated method stub
public List<Income> findIncomeList(String begin, String end, Income income) { 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
Returns the session keys prefix.
public String getKeyPrefix() { return keyPrefix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getKeyPrefix() {\n return keyPrefix;\n }", "public final String getPrefix() {\n return properties.get(PREFIX_PROPERTY);\n }", "public String getPrefixKey() {\n return \"qa.journal.item.\" + key;\n }", "public static String getPrefix() {\n return getConfiguration().get...
[ "0.79350513", "0.72058886", "0.70997953", "0.70406026", "0.7004903", "0.68853545", "0.6848269", "0.6842922", "0.68078345", "0.6800924", "0.67999846", "0.6770658", "0.6769205", "0.6760505", "0.6743005", "0.67359936", "0.6724882", "0.67222255", "0.6704493", "0.6703886", "0.6688...
0.8005464
0
Sets the sessions key prefix.
public void setKeyPrefix(String keyPrefix) { this.keyPrefix = keyPrefix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setGeneratedKeyPrefix(\n\t\tString\tprefix)\n\t{\n\t\tgeneratedKeyPrefix = prefix;\n\t}", "void setPrefix(String prefix);", "public String getKeyPrefix() {\n\t\treturn keyPrefix;\n\t}", "public String getKeyPrefix() {\n return keyPrefix;\n }", "public void setPropertyPrefix(Str...
[ "0.65718925", "0.6474672", "0.64426196", "0.63839877", "0.63797635", "0.6241305", "0.61656237", "0.61259496", "0.61259496", "0.610346", "0.60743314", "0.6065288", "0.6038471", "0.6017535", "0.5984223", "0.5966507", "0.586172", "0.58465743", "0.5791274", "0.57869506", "0.57598...
0.75462717
0
Constructs a cache instance with the specified Redis manager and using a custom key prefix.
public EasyFKCache(CacheManager cache, String prefix){ this( cache ); // set the prefix this.keyPrefix = prefix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Bean\r\n\tpublic CacheManager cacheManager(@SuppressWarnings(\"rawtypes\") RedisTemplate redisTemplate,\r\n\t\t\tRedisCachePrefix redisCachePrefix, @Value(\"${redis.cluster.cache.expiration:3600}\") Long expiration) {\n\t\tRedisCacheManager cacheManager = new RedisCacheManager(redisTemplate);\r\n\t\tcacheManager....
[ "0.6675957", "0.58348995", "0.56040126", "0.5591263", "0.5570259", "0.5483306", "0.5445223", "0.542538", "0.5396663", "0.53941983", "0.5349619", "0.5323184", "0.5316548", "0.5298863", "0.52139395", "0.5199284", "0.5143559", "0.5139996", "0.51275784", "0.51173705", "0.51078916...
0.64174795
1
Get parameter value from request body parameter
private String getEasyMapValueByName(ExtensionRequest extensionRequest, String name) { EasyMap easyMap = extensionRequest.getParameters().stream().filter(x -> x.getName().equals(name)).findAny() .orElse(null); if (easyMap != null) { return easyMap.getValue(); } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object getParameter(String name);", "Parameter getParameter();", "String getParameter(HttpServletRequest request, String name) throws ValidationException;", "String getParameter(String key);", "private String getValueFromRequest(String key, HttpServletRequest request) {\n if (!StringUtils.isEmpty(ke...
[ "0.6609733", "0.6460701", "0.6411967", "0.63176537", "0.6279463", "0.6151136", "0.61483955", "0.6113644", "0.61065507", "0.6072668", "0.6048584", "0.6033865", "0.6018058", "0.60054654", "0.5991929", "0.5969784", "0.59259355", "0.5918244", "0.5908118", "0.5880757", "0.583275",...
0.0
-1
/ Sample Srn status with static result (nonJavadoc)
@Override public ExtensionResult getSrnResult(ExtensionRequest extensionRequest) { ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); Map<String, String> output = new HashMap<>(); StringBuilder respBuilder = new StringBuilder(); respBuilder.append( "20-July-2018 16:10:32 Ahmad Mahatir Ridwan - PIC sudah onsite cek problem(printer nyala-mati)\n"); respBuilder.append("PIC troubleshoot. restart printer(NOK), ganti kabel power(NOK)\n"); respBuilder.append("PIC akan eskalasi ke vendor terkait."); output.put(OUTPUT, respBuilder.toString()); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String status();", "String status();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "java.lang.String getStatus();", "public String showStatus();", "public SampleResult sample() {\n SampleResult res = null;\n try {\n re...
[ "0.6074133", "0.6074133", "0.6010481", "0.6010481", "0.6010481", "0.6010481", "0.5979114", "0.59629816", "0.5949432", "0.5919163", "0.5919163", "0.5919163", "0.5919163", "0.5919163", "0.58984447", "0.58984447", "0.5785029", "0.57533884", "0.570542", "0.56981504", "0.56761104"...
0.0
-1
/ Sample Customer Info with static result (nonJavadoc)
@Override public ExtensionResult getCustomerInfo(ExtensionRequest extensionRequest) { String account = getEasyMapValueByName(extensionRequest, "account"); String name = getEasyMapValueByName(extensionRequest, "name"); Map<String, String> output = new HashMap<>(); StringBuilder respBuilder = new StringBuilder(); if (account.substring(0, 1).equals("1")) { respBuilder.append("Ticket Number : " + extensionRequest.getIntent().getTicket().getTicketNumber() + "\n"); respBuilder.append(" Data Customer Account " + account + "\n"); respBuilder.append("Nama: " + name + "\n"); respBuilder.append("Setoran tiap bulan : Rp. 500,000\n"); respBuilder.append("Jatuh tempo berikutnya : 15 Agustus 2018"); } else { respBuilder.append("Ticket Number : " + extensionRequest.getIntent().getTicket().getTicketNumber() + "\n"); respBuilder.append(appProperties.getFormId() + " Data Customer Account " + account + "\n"); respBuilder.append("Nama: " + name + "\n"); respBuilder.append("Setoran tiap bulan : Rp. 1,000,000\n"); respBuilder.append("Jatuh tempo berikutnya : 27 Agustus 2018"); } ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); output.put(OUTPUT, respBuilder.toString()); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printCustomerDetails()\r\n {\r\n System.out.println(title + \" \" + firstName + \" \" \r\n + lastName + \"\\n\" +getAddress() \r\n + \"\\nCard Number: \" + cardNumber \r\n + \"\\nPoints available: \" + points);\r\n }", "public static void viewCustomerInfo...
[ "0.6588461", "0.6584106", "0.6333502", "0.61677545", "0.61668956", "0.614306", "0.6124931", "0.6102408", "0.6073275", "0.6023054", "0.6017106", "0.60050076", "0.5975202", "0.5966304", "0.5957308", "0.595631", "0.5944734", "0.5935324", "0.5903205", "0.5901976", "0.58916956", ...
0.60867065
8
/ Modify Customer Name Entity (nonJavadoc)
@Override public ExtensionResult modifyCustomerName(ExtensionRequest extensionRequest) { ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); Map<String, String> clearEntities = new HashMap<>(); String name = getEasyMapValueByName(extensionRequest, "name"); if (name.equalsIgnoreCase("reja")) { clearEntities.put("name", "budi"); extensionResult.setEntities(clearEntities); } return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCustomerName(String customerName) \n {\n this.customerName = customerName;\n }", "public void setCustomer_Name(String customer_Name) {\n this.customer_Name = customer_Name;\n }", "public void setCustomerName(String name) {\r\n this.name.setText(name);\r\n }", "...
[ "0.7130059", "0.6999316", "0.6938882", "0.66439867", "0.66347086", "0.66054994", "0.6586436", "0.6574447", "0.65571904", "0.65380204", "0.6523771", "0.64930826", "0.6478431", "0.6472705", "0.6452238", "0.64117455", "0.6404415", "0.6381816", "0.6354686", "0.6351783", "0.633865...
0.7214495
0
/ Sample Product info with static value (nonJavadoc)
@Override public ExtensionResult getProductInfo(ExtensionRequest extensionRequest) { String model = getEasyMapValueByName(extensionRequest, "model"); String type = getEasyMapValueByName(extensionRequest, "type"); Map<String, String> output = new HashMap<>(); StringBuilder respBuilder = new StringBuilder(); respBuilder.append("Untuk harga mobil " + model + " tipe " + type + " adalah 800,000,000\n"); respBuilder.append("Jika kak {customer_name} tertarik, bisa klik tombol dibawah ini. \n"); respBuilder.append("Maka nanti live agent kami akan menghubungi kakak ;)"); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); output.put(OUTPUT, respBuilder.toString()); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getProductDescription();", "String getProduct();", "ProductProperties productProperties();", "public String getProduct() {\r\n return this.product;\r\n }", "public String getProduct()\n {\n return product;\n }", "public String getProductDescription() {\r\n/* 221 */ ret...
[ "0.69910705", "0.6867746", "0.6505765", "0.6480052", "0.646232", "0.6441752", "0.64196086", "0.63682693", "0.63682693", "0.62990856", "0.6261212", "0.62568843", "0.62123746", "0.6164815", "0.6161251", "0.61494803", "0.6134759", "0.6130434", "0.6121114", "0.60949415", "0.60882...
0.5708795
62
/ Get messages from third party service (nonJavadoc)
@Override public ExtensionResult getMessageBody(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); StringBuilder respBuilder = new StringBuilder(); try { OkHttpUtil okHttpUtil = new OkHttpUtil(); okHttpUtil.init(true); Request request = new Request.Builder().url("https://jsonplaceholder.typicode.com/comments").get().build(); Response response = okHttpUtil.getClient().newCall(request).execute(); JSONArray jsonArray = new JSONArray(response.body().string()); JSONObject jsonObject = jsonArray.getJSONObject(0); String message = jsonObject.getString("body"); respBuilder.append(message); } catch (Exception e) { } ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); output.put(OUTPUT, respBuilder.toString()); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "ReadResponseMessage fetchMessagesFromUser(String user);", "com.exacttarget.wsdl.partnerapi.QueryRequestMsgDocument.QueryRequestMsg getQueryRequestMsg();", "messages.Clienthello.ClientHello getClientHello();", "java.util.List<main.java.io.grpc.chatservice.Message> \n getMessagesList();", "ReadResponseM...
[ "0.617177", "0.6149526", "0.61120754", "0.6078095", "0.60158885", "0.5960426", "0.5949937", "0.58792746", "0.58792746", "0.58792746", "0.58792746", "0.58792746", "0.5853939", "0.5818087", "0.5787333", "0.5784526", "0.57840014", "0.5782065", "0.5755902", "0.5755893", "0.571146...
0.0
-1
/ Generate quick replies output (nonJavadoc)
@Override public ExtensionResult getQuickReplies(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); QuickReplyBuilder quickReplyBuilder = new QuickReplyBuilder.Builder("Hello").add("Hello World", "hello world") .add("Hello Java", "B0F63CE1-F16F-4761-8881-F44C95D2792F").build(); output.put(OUTPUT, quickReplyBuilder.string()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void helpPage() {\n \n System.out.println(\"Commands:\");\n System.out.println(\"\\tQ [filename]\\t\\t\\tquit and save to filename\"); \n System.out.println(\"\\t ~ is used for a space character\" ); \n System.out.println(\"\\tb [STRING] [INDEX]\\t\\tinsert...
[ "0.6274728", "0.6144823", "0.61367434", "0.6083588", "0.5984087", "0.5945955", "0.5925709", "0.5868747", "0.58615804", "0.58525777", "0.58481115", "0.5839903", "0.5836616", "0.58347094", "0.5791814", "0.5784441", "0.5751723", "0.5719593", "0.5715129", "0.5691762", "0.56672895...
0.5868632
8
/ Generate Forms (nonJavadoc)
@Override public ExtensionResult getForms(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); FormBuilder formBuilder = new FormBuilder(appProperties.getFormIdTest()); ButtonTemplate button = new ButtonTemplate(); button.setTitle("Test Form"); button.setSubTitle("Subtitle is here"); button.setPictureLink(appProperties.getAtmUrl()); button.setPicturePath(appProperties.getAtmUrl()); List<EasyMap> actions = new ArrayList<>(); EasyMap bookAction = new EasyMap(); bookAction.setName("Label here"); bookAction.setValue(formBuilder.build()); actions.add(bookAction); button.setButtonValues(actions); ButtonBuilder buttonBuilder = new ButtonBuilder(button); output.put(OUTPUT, buttonBuilder.build()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public interface Form {\n\n\t/**\n\t * Gets the number of documents that use this Form and have been modified since a given Java date\n\t *\n\t * @param since\n\t * Date the method should compare against\n\t * @return int number of documents using this Form modified\n\t * @since ...
[ "0.7370982", "0.63605857", "0.6252565", "0.6182831", "0.60490143", "0.604063", "0.6003131", "0.589294", "0.5799998", "0.5793653", "0.57905555", "0.57339656", "0.56997895", "0.5680335", "0.5625711", "0.5587924", "0.5576102", "0.5563902", "0.55239904", "0.5507895", "0.55046314"...
0.6564096
1
/ Generate buttons output (nonJavadoc)
@Override public ExtensionResult getButtons(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); ButtonTemplate button = new ButtonTemplate(); button.setTitle("This is title"); button.setSubTitle("This is subtitle"); button.setPictureLink(SAMPLE_IMAGE_PATH); button.setPicturePath(SAMPLE_IMAGE_PATH); List<EasyMap> actions = new ArrayList<>(); EasyMap bookAction = new EasyMap(); bookAction.setName("Label"); bookAction.setValue("Payload"); actions.add(bookAction); button.setButtonValues(actions); ButtonBuilder buttonBuilder = new ButtonBuilder(button); output.put(OUTPUT, buttonBuilder.build()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HomePageHelper writeTextOfButtons(){\n System.out.println (\"Quantity of elements: \" + languagesButtons.size());\n for(WebElement el : languagesButtons){\n System.out.println(\"Tag Name: \" + el.getTagName());\n System.out.println(\"attr: ng-click - \" + el.getAttribute(\"ng-click\"));\n ...
[ "0.6918432", "0.6849508", "0.6818991", "0.6730584", "0.6704629", "0.66847646", "0.6626376", "0.66133046", "0.65460247", "0.65021086", "0.649755", "0.6482278", "0.6466992", "0.64624476", "0.64580905", "0.6432906", "0.6407818", "0.63968706", "0.63966155", "0.63949656", "0.63796...
0.6349274
26
/ Generate Carousel (nonJavadoc)
@Override public ExtensionResult getCarousel(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); ButtonTemplate button = new ButtonTemplate(); button.setPictureLink(appProperties.getAtmUrl()); button.setPicturePath(appProperties.getAtmUrl()); button.setTitle("Go 1"); button.setSubTitle("Button Carousel 1"); List<EasyMap> actions = new ArrayList<>(); EasyMap bookAction = new EasyMap(); bookAction.setName("Go 1"); bookAction.setValue("Thanks"); actions.add(bookAction); button.setButtonValues(actions); ButtonBuilder buttonBuilder = new ButtonBuilder(button); ButtonTemplate button2 = new ButtonTemplate(); button2.setPictureLink(appProperties.getAtmUrl()); button2.setPicturePath(appProperties.getAtmUrl()); button2.setTitle("This is title 2"); button2.setSubTitle("This is subtitle 2"); List<EasyMap> actions2 = new ArrayList<>(); EasyMap bookAction2 = new EasyMap(); bookAction2.setName("Label 2"); bookAction2.setValue("Payload 2"); actions2.add(bookAction2); button2.setButtonValues(actions2); ButtonBuilder buttonBuilder2 = new ButtonBuilder(button2); ButtonTemplate button3 = new ButtonTemplate(); button3.setPictureLink(appProperties.getAtmUrl()); button3.setPicturePath(appProperties.getAtmUrl()); button3.setTitle("This is title 3"); button3.setSubTitle("This is subtitle 3"); button3.setButtonValues(actions2); ButtonBuilder buttonBuilder3 = new ButtonBuilder(button3); ButtonTemplate button4 = new ButtonTemplate(); button4.setPictureLink(appProperties.getAtmUrl()); button4.setPicturePath(appProperties.getAtmUrl()); button4.setTitle("This is title 4"); button4.setSubTitle("This is subtitle 4"); button4.setButtonValues(actions2); ButtonBuilder buttonBuilder4 = new ButtonBuilder(button4); ButtonTemplate button5 = new ButtonTemplate(); button5.setPictureLink(appProperties.getAtmUrl()); button5.setPicturePath(appProperties.getAtmUrl()); button5.setTitle("This is title 5"); button5.setSubTitle("This is subtitle 5"); button5.setButtonValues(actions2); ButtonBuilder buttonBuilder5 = new ButtonBuilder(button5); CarouselBuilder carouselBuilder = new CarouselBuilder(buttonBuilder.build(), buttonBuilder2.build(), buttonBuilder3.build(), buttonBuilder4.build(), buttonBuilder5.build()); output.put(OUTPUT, carouselBuilder.build()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void fillPaintingCarousel() {\n ImageButton buttonItem;\n\n for (int i = 0; i < Maria_sick.description.length; i++) {\n //STORE THE INDIVIDUAL PAINTINGS AS BUTTONS\n buttonItem = new ImageButton(this);\n\n\n Maria_story painting = new Maria_story(Maria_sick.de...
[ "0.597323", "0.5393742", "0.5354316", "0.5309387", "0.52861124", "0.52858716", "0.5216562", "0.5208029", "0.52034295", "0.51320577", "0.5128282", "0.51133335", "0.51021826", "0.50947744", "0.5026518", "0.5018839", "0.5017036", "0.5016199", "0.49979046", "0.4958882", "0.495800...
0.5846992
1
/ Transfer ticket to agent (nonJavadoc)
@Override public ExtensionResult doTransferToAgent(ExtensionRequest extensionRequest) { ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(true); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(false); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setTicket(Ticket ticket) {\n this.ticket = ticket;\n }", "@Override\n\tpublic int createTicket(Booking_ticket bt) {\n\t\treturn btr.createTicket(bt);\n\t}", "public void editTransactionAgent(Agent agent);", "Ticket ticketDTOToTicket(TicketDTO ticketDTO);", "int createTicket(Ticket ticket, in...
[ "0.6197515", "0.5952321", "0.5835239", "0.58166593", "0.5783007", "0.5766555", "0.57433397", "0.57289743", "0.571455", "0.55532575", "0.552094", "0.5519856", "0.54982233", "0.54744977", "0.54451936", "0.5441823", "0.543339", "0.5417971", "0.5401369", "0.53726476", "0.536683",...
0.0
-1
/ Send Location (nonJavadoc)
@Override public ExtensionResult doSendLocation(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); QuickReplyBuilder quickReplyBuilder = new QuickReplyBuilder.Builder("") .add("location", "location").build(); output.put(OUTPUT, quickReplyBuilder.string()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void location(String[] command) {\n\t\tSystem.out\n\t\t\t\t.println(\"Sending last known location information via Twitter.\");\n\t\tTwitterComm.sendDirectMessage(Constants.AUTH_USER,\n\t\t\t\tConstants.CH_LOCATIONTEXT + \"\\n\"\n\t\t\t\t\t\t+ Alfred.getLocation().toString());\n\t}", "public void sendData...
[ "0.72446024", "0.7124725", "0.6772523", "0.6746768", "0.6719503", "0.66597646", "0.66597646", "0.66562265", "0.6624711", "0.66245794", "0.66245794", "0.66245794", "0.66245794", "0.6592722", "0.65402156", "0.6526128", "0.6524915", "0.6524915", "0.6524915", "0.64659494", "0.646...
0.7491215
0
/ Generate Image (nonJavadoc)
@Override public ExtensionResult getImage(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); ButtonTemplate image = new ButtonTemplate(); image.setPictureLink(SAMPLE_IMAGE_PATH); image.setPicturePath(SAMPLE_IMAGE_PATH); ImageBuilder imageBuilder = new ImageBuilder(image); output.put(OUTPUT, imageBuilder.build()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Image gen();", "Image createImage();", "IMG createIMG();", "protected abstract Image generateImage(Graphics g, String text, Dimension d);", "public boolean generateImageFromText();", "String getImage();", "java.lang.String getImage();", "int wkhtmltoimage_init(int use_graphics);", "...
[ "0.8001483", "0.7415121", "0.73780394", "0.71645606", "0.70747423", "0.69173306", "0.6886358", "0.6837186", "0.6797727", "0.67798805", "0.67460674", "0.66099495", "0.6601808", "0.6483638", "0.64731854", "0.64245516", "0.6408259", "0.6367927", "0.6309599", "0.6296598", "0.6269...
0.58860147
50
/ Split bubble chat conversation (nonJavadoc)
@Override public ExtensionResult getSplitConversation(ExtensionRequest extensionRequest) { String firstLine = "Terima kasih {customer_name}"; String secondLine = "Data telah kami terima dan agent kami akan proses terlebih dahulu ya kak"; Map<String, String> output = new HashMap<>(); output.put(OUTPUT, firstLine + ParamSdk.SPLIT_CHAT + secondLine); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processMessage(Chat chat, Message message)\n {\n }", "private String splitmessage(String message){\n String finalmessage = message;\n int length = message.length();\n for(int i = 50; i < length; i = i + 50){\n finalmessage = new StringBuilder(finalmessage).insert...
[ "0.6116282", "0.58339846", "0.56257373", "0.5606976", "0.55700856", "0.55132633", "0.5479452", "0.54576904", "0.53925645", "0.53698575", "0.5363164", "0.5304119", "0.5299326", "0.525136", "0.5240698", "0.52203584", "0.51770526", "0.51721233", "0.51529574", "0.51413727", "0.51...
0.6330239
0
/ Send mail configuration on application.properties file (nonJavadoc)
@Override public ExtensionResult doSendMail(ExtensionRequest extensionRequest) { String recipient = getEasyMapValueByName(extensionRequest, "recipient"); MailModel mailModel = new MailModel(recipient, "3Dolphins SDK Mail Subject", "3Dolphins SDK mail content"); String sendMailResult = svcMailService.sendMail(mailModel); Map<String, String> output = new HashMap<>(); output.put(OUTPUT, sendMailResult); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static Properties getMailServerConfig() {\n\n Properties properties = new Properties();\n properties.put(\"mail.smtp.host\", host);\n properties.put(\"mail.smtp.port\", \"2525\");\n\n return properties;\n }", "protected void setConfigs() throws KKException\n {\n f...
[ "0.6729043", "0.62795264", "0.6147806", "0.60914665", "0.60251814", "0.5992066", "0.59786135", "0.5963924", "0.5917732", "0.5903805", "0.58989805", "0.5881985", "0.5873142", "0.586674", "0.5838119", "0.581304", "0.5807145", "0.57980007", "0.57808256", "0.57697797", "0.5750724...
0.0
-1
yg mau dipake utk form cuti
@Override public ExtensionResult dogetFormcuti(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); String formId = appProperties.getFormIdCuti(); FormBuilder formBuilder = new FormBuilder(formId); ButtonTemplate button = new ButtonTemplate(); button.setTitle("Form Cuti"); button.setSubTitle("Form Cuti"); button.setPictureLink(Image_cuti); button.setPicturePath(Image_cuti); List<EasyMap> actions = new ArrayList<>(); EasyMap bookAction = new EasyMap(); bookAction.setName("Isi Form"); bookAction.setValue(formBuilder.build()); // bookAction.setValue(appProperties.getShortenFormCuti()); actions.add(bookAction); button.setButtonValues(actions); ButtonBuilder buttonBuilder = new ButtonBuilder(button); output.put(OUTPUT, buttonBuilder.build()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void xoatrangactrtion() {\n\t\ttxtmakhhm.setText(\"\");\n\t\ttxtTinhtrang.setText(\"\");\n\t\ttxtGhichu.setText(\"\");\n\t\tjdcNgaytra.setToolTipText(\"\");\n\t\tckTra.setToolTipText(\"\");\n\t\t\n\t}", "private void jButton19ActionPerformed(java.awt.event.ActionEvent evt) {\n String cadena;\n ...
[ "0.5935238", "0.58634174", "0.5856512", "0.5752141", "0.5748319", "0.5722994", "0.5693696", "0.5681215", "0.5671384", "0.56711555", "0.567072", "0.56652933", "0.56323844", "0.56319517", "0.56309", "0.5628621", "0.56163436", "0.55907017", "0.5589361", "0.5587571", "0.5578544",...
0.0
-1
Seva.id sdk Mendapatkan tipe tipe mobil
@Override public ExtensionResult doGetTipeMobil(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); QuickReplyBuilder quickReplyBuilder = new QuickReplyBuilder.Builder("Type") .add("Sport", "Sport") .add("MPV", "mpv") .add("Hatchback", "Hatchback") .add("SUV", "suv") .add("Commercial", "Commercial") .add("Sedan", "Sedan").build(); output.put(OUTPUT, quickReplyBuilder.string()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public ExtensionResult doGetModelMobils(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n\n String tipe = getEasyMapValueByName(extensionRequest, \"type\");\n String merek = getEasyMapValueByName(extensionRequest, \"merk\");\n\n String...
[ "0.5609701", "0.5549421", "0.5444404", "0.5322888", "0.52802783", "0.5253706", "0.52305174", "0.52244395", "0.5219821", "0.51984787", "0.51749736", "0.51687366", "0.5150156", "0.512941", "0.5086842", "0.5012877", "0.5002525", "0.49941215", "0.4991354", "0.4978833", "0.4960391...
0.4854334
44
Seva.id sdk Membuat carousel berupa merkmerk mobil yang dinamis
@Override public ExtensionResult doGetMerkMobils(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); String url = "https://bububibap.herokuapp.com/getMerkMobil"; List<String> merks = getMobilDinamis(url, "mobil", "merk"); List<ButtonBuilder> buttonBuilders = new ArrayList<>(); for (String merk : merks) { logger.debug("Mobil dengan merk : " + merk); ButtonTemplate button = new ButtonTemplate(); button.setPictureLink(appProperties.getToyotaImgUrl()); button.setPicturePath(appProperties.getToyotaImgUrl()); button.setTitle(merk); button.setSubTitle("Astra " + merk); List<EasyMap> actions = new ArrayList<>(); EasyMap bookAction = new EasyMap(); bookAction.setName(merk); bookAction.setValue(merk); actions.add(bookAction); button.setButtonValues(actions); ButtonBuilder buttonBuilder = new ButtonBuilder(button); buttonBuilders.add(buttonBuilder); } String btnBuilders = ""; for (ButtonBuilder buttonBuilder : buttonBuilders) { btnBuilders += buttonBuilder.build(); btnBuilders += "&split&"; } CarouselBuilder carouselBuilder = new CarouselBuilder(btnBuilders); output.put(OUTPUT, carouselBuilder.build()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayBanner() {\n\n mDemoSlider = (SliderLayout) findViewById(R.id.sample_output);\n mDemoSlider.setFocusable(true);\n mDemoSlider.setPresetTransformer(SliderLayout.Transformer.Default);\n mDemoSlider.setPresetIndicator(SliderLayout.PresetIndicators.Center_Bottom);\n ...
[ "0.55767316", "0.54773766", "0.54464865", "0.54142773", "0.53751874", "0.5345625", "0.53131306", "0.521246", "0.51921767", "0.5191459", "0.51869845", "0.5170848", "0.5143113", "0.5086402", "0.5069654", "0.5059907", "0.5050619", "0.5029163", "0.50051117", "0.4996892", "0.49958...
0.5581484
0
Seva.id sdk nge get model mobil
@Override public ExtensionResult doGetModelMobils(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); String tipe = getEasyMapValueByName(extensionRequest, "type"); String merek = getEasyMapValueByName(extensionRequest, "merk"); String url = "https://bububibap.herokuapp.com/getToyota/"; List<List<String>> models = getModelModel(url, "mobil", "model", tipe); List<ButtonBuilder> buttonBuilders = new ArrayList<>(); List<String> model = models.get(type_index); for (String mod : model) { ButtonTemplate button = new ButtonTemplate(); //button.setPictureLink(appProperties.getToyotaImgUrl()); //button.setPicturePath(appProperties.getToyotaImgUrl()); button.setTitle(mod); button.setSubTitle(mod); List<EasyMap> actions = new ArrayList<>(); EasyMap bookAction = new EasyMap(); bookAction.setName(mod); bookAction.setValue("model " + mod); actions.add(bookAction); button.setButtonValues(actions); ButtonBuilder buttonBuilder = new ButtonBuilder(button); buttonBuilders.add(buttonBuilder); } String btnBuilders = ""; for (ButtonBuilder buttonBuilder : buttonBuilders) { btnBuilders += buttonBuilder.build(); btnBuilders += "&split&"; } CarouselBuilder carouselBuilder = new CarouselBuilder(btnBuilders); output.put(OUTPUT, carouselBuilder.build()); ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "M getModel();", "ModelData getModel();", "NCModel getModel();", "public Modello getModello() {\r\n\t\treturn mod;\r\n\t}", "@Override\n\tpublic String getModel() {\n\t\treturn \"medium model\";\n\t}", "public Mob getMob() {\n\t\treturn mob;\n\t}", "public long getModelId();", "@Override\r\n\tpublic M...
[ "0.594423", "0.58656985", "0.5816626", "0.5761231", "0.5754108", "0.57538915", "0.5689013", "0.5667665", "0.5653128", "0.56204665", "0.5615033", "0.5581153", "0.55729663", "0.5557092", "0.5536693", "0.55352527", "0.55344486", "0.5526837", "0.5526837", "0.5526837", "0.550441",...
0.6551826
0
Seva.id sdk untuk mendapatkan data mobil baik itu merk, model, atau varian
private List<String> getMobilDinamis(String url, String jsonName, String key) { List<String> result = new ArrayList<>(); try { OkHttpUtil okHttpUtil = new OkHttpUtil(); okHttpUtil.init(true); Request request = new Request.Builder().url(url).get().build(); Response response = okHttpUtil.getClient().newCall(request).execute(); String res = "{\"" + jsonName + "\":" + response.body().string() + "}"; JSONObject jsonObject = new JSONObject(res); JSONArray jSONArray = jsonObject.getJSONArray(jsonName); for (int i = 0; i < jSONArray.length(); i++) { JSONObject obj = (JSONObject) jSONArray.get(i); result.add(obj.getString(key)); } } catch (Exception e) { } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public ExtensionResult doGetModelMobils(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n\n String tipe = getEasyMapValueByName(extensionRequest, \"type\");\n String merek = getEasyMapValueByName(extensionRequest, \"merk\");\n\n String...
[ "0.5966126", "0.5790446", "0.5469132", "0.54501325", "0.541482", "0.5321457", "0.53023267", "0.5276984", "0.5271916", "0.52380985", "0.5220844", "0.520849", "0.5208007", "0.5190209", "0.51897854", "0.5139752", "0.51335555", "0.5131826", "0.5131826", "0.5128043", "0.5118869", ...
0.0
-1
Seva.id sdk untuk mendapatkan data model mobil dinamis
private List<List<String>> getModelModel(String url, String jsonName, String key, String tipe) { List<List<String>> result = new ArrayList<>(); try { OkHttpUtil okHttpUtil = new OkHttpUtil(); okHttpUtil.init(true); Request request = new Request.Builder().url(url).get().build(); Response response = okHttpUtil.getClient().newCall(request).execute(); String res = "{\"" + jsonName + "\":" + response.body().string() + "}"; JSONObject jsonObject = new JSONObject(res); JSONArray jSONArray = jsonObject.getJSONArray(jsonName); List<String> list = new ArrayList<>(); JSONObject obj = (JSONObject) jSONArray.get(0); String temp = obj.getString("type"); List<String> types = new ArrayList<>(); for (int i = 0; i < jSONArray.length(); i++) { obj = (JSONObject) jSONArray.get(i); if (obj.getString("type").equalsIgnoreCase(temp)) { list.add(obj.getString(key)); } else { types.add(temp); if (temp.equals(tipe)) { type_index = result.size(); } result.add(list); list = new ArrayList<>(); list.add(obj.getString(key)); temp = obj.getString("type"); } } } catch (Exception e) { } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public ExtensionResult doGetModelMobils(ExtensionRequest extensionRequest) {\n Map<String, String> output = new HashMap<>();\n\n String tipe = getEasyMapValueByName(extensionRequest, \"type\");\n String merek = getEasyMapValueByName(extensionRequest, \"merk\");\n\n String...
[ "0.5899121", "0.57138747", "0.569132", "0.5678747", "0.5667693", "0.5588194", "0.5585327", "0.5585327", "0.55636734", "0.5478806", "0.54630417", "0.5454027", "0.5441885", "0.54326755", "0.54273784", "0.5415712", "0.54098344", "0.5407393", "0.54047024", "0.5373579", "0.5363115...
0.0
-1
buat shorten bitly tp gajadi make
private String shortenBitLy(String link) { Bitly bitly = Bit.ly(appProperties.getBitlyAccessToken()); String shortUrl = bitly.shorten(link); return shortUrl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void buildBootstrap() {\n String command = \"-prod -mac -o2 rom -strip:d j2me imp\";\n if (includeDebugger) {\n command += \" debugger\";\n }\n command += \" -- translator\";\n builder(command);\n }", "protected void compile(String[] args) {\n Str...
[ "0.5433524", "0.5390644", "0.5177344", "0.5111971", "0.50629616", "0.5005365", "0.494646", "0.49135718", "0.4895435", "0.4895223", "0.48831326", "0.4881321", "0.48773623", "0.47660393", "0.4744901", "0.4731976", "0.47140586", "0.47064173", "0.46675658", "0.46674085", "0.46673...
0.0
-1
/// Booking Service /////
@Override public ExtensionResult doSendComplaint(ExtensionRequest extensionRequest) { Map<String, String> output = new HashMap<>(); ExtensionResult extensionResult = new ExtensionResult(); StringBuilder sbCX = new StringBuilder(); String ticketNumber = extensionRequest.getIntent().getTicket().getTicketNumber(); String Bearer = ""; String nama = getEasyMapValueByName(extensionRequest, "person"); String perusahaan = getEasyMapValueByName(extensionRequest, "company"); String posisi = getEasyMapValueByName(extensionRequest, "position"); String email = getEasyMapValueByName(extensionRequest, "email"); String nohp = getEasyMapValueByName(extensionRequest, "phone"); String keluhan = ""; String masukan = ""; // 1.get data dari form // ambil token Bearer = getToken(); // request API dolphin System.out.println("bearer = " + Bearer); DatumComplaint data = new DatumComplaint(); data = getFormComplaint(Bearer, ticketNumber); // 2. parsing data keluhan = data.getKeluhan(); masukan = data.getMasukan(); sbCX.append("<html>").append("<body>"); sbCX.append(getHeaderEmail("Complaint", nama, posisi, perusahaan, email, nohp).toString()); sbCX .append("<td>6.</td>").append("<td>Keluhan</td>").append("<td>:</td>").append("<td>" + keluhan + "</td>") .append("</tr><tr>") .append("<td>7.</td>").append("<td>Masukan</td>").append("<td>:</td>").append("<td>" + masukan + "</td>") .append("</tr>"); sbCX.append("</table>"); sbCX.append(getFooterEmail().toString()) .append("</body>").append("</html>"); int codeCX = sendGridEmail(sbCX, email, "Kakak CX", "SAMI - Complaint (" + keluhan + ")"); String result = ""; if (codeCX == 202) { result = "Baik kak silahkan tunggu konfirmasi ya kak"; } else { result = "Maaf kak pengiriman email gagal. Boleh diulangi kak"; } output.put(OUTPUT, result); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void toMyBookings() {\n }", "public void availableBookings(int bID){\n int index=0;\n String n = null;\n Services s = new Services();\n\n System.out.println(\"\\n\"+ Login.businessList.get(bID).getName()+ \" [opening hours]\");\n System.out.println(\"--...
[ "0.69265723", "0.67443955", "0.6677693", "0.6653901", "0.6603011", "0.6507559", "0.64815855", "0.64636326", "0.6455635", "0.6442771", "0.64410627", "0.64358526", "0.64314646", "0.64131635", "0.6395741", "0.63941735", "0.6392425", "0.63581127", "0.63429993", "0.6296347", "0.62...
0.0
-1
String operasi = "3 +216/2 24"; String operasi = "3 +216";
@Override public ExtensionResult doCalculate(ExtensionRequest extensionRequest) { String result = "Maaf Kak. ada kesalahan :( Mohon dicek lagi inputannya!"; String operasi = getEasyMapValueByName(extensionRequest, "hitung"); operasi = operasi.replaceAll("\\s+", ""); operasi = operasi.replaceAll("multiply", "*"); operasi = operasi.replaceAll("Multiply", "*"); operasi = operasi.replaceAll("bagi", "/"); operasi = operasi.replaceAll("Bagi", "/"); String[] arr = operasi.split("(?<=[-+*/])|(?=[-+*/])"); double res = 0; try { //ubah - jadi + dan merubah next index jd angka negatif for (int i = 0; i < arr.length; i++) { if (arr[i].equals("-")) { arr[i] = "+"; arr[i + 1] = "-" + arr[i + 1]; } } //temporary List<String> temp = new ArrayList<>(); for (String obj : arr) { temp.add(obj); } if (operasi.contains("*")) { //perkalian for (int i = 1; i < temp.size(); i++) { if (temp.get(i).equals("*")) { double angka1 = new Double(temp.get(i - 1)); double angka2 = new Double(temp.get(i + 1)); String operator = temp.get(i); double hasil = calculate(angka1, operator, angka2); temp.remove(i); temp.remove(i); temp.set(i - 1, hasil + ""); i--; } } } if (operasi.contains("/")) { //pembagian for (int i = 1; i < temp.size(); i++) { if (temp.get(i).equals("/")) { double angka1 = new Double(temp.get(i - 1)); double angka2 = new Double(temp.get(i + 1)); String operator = temp.get(i); double hasil = calculate(angka1, operator, angka2); temp.remove(i); temp.remove(i); temp.set(i - 1, hasil + ""); i--; } } } //menjumlahkan semua angka for (int i = 0; i < temp.size(); i += 2) { double d = new Double(temp.get(i)); res = res + d; } result = "Hasilnya " + res + " Kak."; } catch (Exception e) { } ExtensionResult extensionResult = new ExtensionResult(); extensionResult.setAgent(false); extensionResult.setRepeat(false); extensionResult.setSuccess(true); extensionResult.setNext(true); Map<String, String> output = new HashMap<>(); output.put(OUTPUT, result); extensionResult.setValue(output); return extensionResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int calculate_2(String s) {\n if ((s == null) || (s.length() == 0)) return 0;\n int i = 0;\n int j = 0;\n s = s.replace(\" \", \"\");\n String val = \"\";\n boolean ifStop = true;\n while (i < s.length()) {\n if ((s.charAt(i) == '+') || (s.charAt(i...
[ "0.6970836", "0.66584307", "0.6288514", "0.62709093", "0.62452483", "0.62435097", "0.61734587", "0.61425954", "0.6117793", "0.6107774", "0.6089389", "0.6067278", "0.60666263", "0.60414016", "0.6034215", "0.60267615", "0.59207356", "0.5912619", "0.5868006", "0.58553684", "0.58...
0.55913234
46
Add, update, or merge, the entity. This method also calls the model listeners to trigger the proper events associated with adding, deleting, or updating an entity.
public com.ext.portlet.contests.model.ContestDebate update( com.ext.portlet.contests.model.ContestDebate contestDebate, boolean merge) throws com.liferay.portal.SystemException;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void entityAdded(Entity entity)\n\t{\n\t\t\n\t}", "@Override\n public E update(E entity) {\n LOG.info(\"[update] Start: entity = \" + entity.getClass().getSimpleName());\n entityManager.merge(entity);\n LOG.info(\"[update] End\");\n return entity;\n }", "pu...
[ "0.6301576", "0.61789227", "0.6071568", "0.6027648", "0.60158885", "0.60011053", "0.59930176", "0.5910999", "0.5801046", "0.5774844", "0.5766732", "0.5737436", "0.5737436", "0.5659578", "0.56490904", "0.56418735", "0.5598109", "0.5568299", "0.5547859", "0.5524703", "0.549468"...
0.0
-1
Return connection back to the pool
public void closeConnection() { this.session.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Connection getConnection() throws SQLException {\r\n if (poolState.get() != POOL_NORMAL) throw PoolCloseException;\r\n\r\n //0:try to get from threadLocal cache\r\n WeakReference<Borrower> ref = threadLocal.get();\r\n Borrower borrower = (ref != null) ? ref.get() : null;\r\n ...
[ "0.752316", "0.74696344", "0.7340281", "0.7244265", "0.7184411", "0.7143332", "0.70549893", "0.69905984", "0.6969378", "0.6926983", "0.69142896", "0.68946457", "0.6822539", "0.6822539", "0.6822539", "0.67958045", "0.67890066", "0.67876136", "0.6767071", "0.67269343", "0.67221...
0.0
-1
0 = nuvem pequena | 1 = nuvem grande
private static String mensagemProvavel(String nuvemVista[]) { String padraoClimas[][] = { {"tempestade", "1", "1", "1", "1", "1"}, {"chuva", "1", "0", "1", "0", "0"}, {"nublado", "0", "1", "0", "1", "0"}, {"sol", "0", "0", "0", "0", "1"} }; int iguais[][] = new int[padraoClimas.length][1]; // Realiza comparação das nuvens "vistas" com os padroes de nuvens e contaquantas igualdades em cada clima padrao for(int i = 0; i < padraoClimas.length; i++) { for(int x = 1; x < padraoClimas[i].length; x++) { if(padraoClimas[i][x] == nuvemVista[x-1]) { iguais[i][0]++; } } } int maiorIgualdade = iguais[0][0]; String clima = padraoClimas[0][0]; // Checa qual dos climas tem maior igualdades e define o clima for(int l = 0; l < iguais.length; l++) { if(iguais[l][0] == 5) { clima = padraoClimas[l][0]; } else if (iguais[l][0] > maiorIgualdade) { maiorIgualdade = iguais[l][0]; clima = padraoClimas[l][0]; } } return clima; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getZero_or_one();", "public int hayGanador() {\n\t\tif(marcador1==2) {\n\t\t\tresultado=1;\n\t\t\treturn 1;\n\t\t}\n\t\telse if(marcador2==2) {\n\t\t\tresultado=2;\n\t\t\treturn 2;\n\t\t}\n\t\telse {\n\t\t\treturn 0;\n\t\t}\n\t}", "public static int BIASED_ONE_OR_ZERO()\n\t{\n\t}", "public String perm...
[ "0.60115576", "0.59444296", "0.5925806", "0.5919877", "0.5893892", "0.58682334", "0.58631295", "0.58622587", "0.5844414", "0.57626456", "0.57479584", "0.5722844", "0.57178897", "0.57163364", "0.57161844", "0.570663", "0.5683993", "0.5650079", "0.56368136", "0.56198317", "0.56...
0.0
-1
todo: design this better.
private void printInputMatrix (double[] yVector, double[][] xVector, List<String> docVectorList) { try { String outputFile = mOutputFolder + "/regressionMatrix.csv"; PrintStream prn = new PrintStream (new FileOutputStream (outputFile)); // print header. prn.print ("docId<string>, y"); for (int counter1 = 0; counter1 < xVector[0].length; ++counter1) prn.print (String.format (", x[%d]", counter1)); prn.println (""); for (int counter1 = 0; counter1 < yVector.length; ++counter1) { prn.print (docVectorList.get (counter1) + "," + yVector[counter1]); for (int counter2 = 0; counter2 < xVector[counter1].length; ++counter2) { prn.print ("," + xVector[counter1][counter2]); } prn.println (""); } prn.close (); } catch (Exception exp) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t...
[ "0.58550036", "0.5778395", "0.57617897", "0.57223946", "0.5658331", "0.56374645", "0.56365234", "0.56165636", "0.5524588", "0.55143243", "0.5504003", "0.54667425", "0.54572177", "0.54572177", "0.54545027", "0.5409557", "0.54079443", "0.53843856", "0.5383878", "0.53524417", "0...
0.0
-1
Instantiates a new status message.
private StatusMessage() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public StatusMessage(int code, String message) {\n _code = code;\n _message = message;\n }", "public Message(){\n super();\n this.status = RETURN_OK;\n put(\"status\",this.status.getCode());\n put(\"message\", this.status.getMessage());\n }", "public ServerMessag...
[ "0.7176234", "0.7129664", "0.67876136", "0.67226386", "0.6653856", "0.66348493", "0.6548824", "0.65397906", "0.6450203", "0.6411899", "0.63371104", "0.6336173", "0.62417966", "0.62388164", "0.6233032", "0.6194293", "0.6194293", "0.6169994", "0.6161523", "0.6153004", "0.613221...
0.77987754
1
slower than serial version
private static void copyP(final float[][] x, final float[][] y) { final int n1 = x[0].length; final int n2 = x.length; Parallel.loop(n2,new Parallel.LoopInt() { public void compute(int i2) { for (int i1 = 0; i1<n1; ++i1) y[i2][i1] = x[i2][i1]; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static com.qiyukf.nimlib.p470f.p471a.C5826a m23369a(android.os.Parcel r4) {\n /*\n com.qiyukf.nimlib.f.a.a r0 = new com.qiyukf.nimlib.f.a.a\n r1 = 0\n r0.m50001init(r1)\n int r2 = r4.readInt()\n r0.f18499a = r2\n int r2 = r4.readInt()\n ...
[ "0.6052078", "0.60341215", "0.5909556", "0.5772123", "0.5755292", "0.5733651", "0.55342555", "0.5527648", "0.5517329", "0.5498542", "0.5479617", "0.5464377", "0.54577047", "0.5442941", "0.54415005", "0.542035", "0.53952855", "0.53748876", "0.53724724", "0.5353035", "0.5352183...
0.0
-1
quicker than serial version
private static void copyP(final float[][][] x, final float[][][] y) { final int n1 = x[0][0].length; final int n2 = x[0].length; final int n3 = x.length; Parallel.loop(n3,new Parallel.LoopInt() { public void compute(int i3) { copyS(x[i3],y[i3]); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String m569b() {\r\n LineNumberReader lineNumberReader;\r\n Throwable th;\r\n InputStreamReader inputStreamReader = null;\r\n String str = \"0000000000000000\";\r\n InputStreamReader inputStreamReader2;\r\n try {\r\n inputStreamReader2 = new InputS...
[ "0.5766523", "0.57380486", "0.5687762", "0.54876196", "0.5487094", "0.5360637", "0.5360309", "0.53337663", "0.5255947", "0.5255651", "0.52529585", "0.5233112", "0.5232394", "0.52221566", "0.52061385", "0.5196584", "0.5178428", "0.5162836", "0.5162802", "0.5153139", "0.5143842...
0.0
-1
Questo metodo ritorna true se il metodo passato in input e' un getter/setter di una delle variabili d'istanza
private boolean isGetterSetterMethod(MethodBean pMethod, ClassBean pClass) { for (InstanceVariableBean var : pClass.getInstanceVariables()) { if (pMethod.getName().toLowerCase().equals("get" + var.getName())) { return true; } else if (pMethod.getName().toLowerCase().equals("set" + var.getName())) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract void setInput(boolean value);", "boolean isSetValue();", "boolean isSetValue();", "public void setInput(boolean input) {\n this.input = input;\n }", "public void testGetterAndSetter() {\n UDDIOperationInput uddiOperationInput = new UDDIOperationInput();\n\n //Test Ge...
[ "0.6721428", "0.6626561", "0.6626561", "0.63332003", "0.62503976", "0.62087005", "0.6136158", "0.59982526", "0.59633905", "0.5957695", "0.5917644", "0.59162706", "0.589589", "0.5895061", "0.58935744", "0.58840084", "0.58548033", "0.5853007", "0.58423215", "0.57784504", "0.577...
0.0
-1
Questo metodo ritorna true se il metodo passato in input e' un metodo della classe
private boolean isInternalMethod(MethodBean pMethod, ClassBean pClass) { for (MethodBean method : pClass.getMethods()) { if (pMethod.getName().equals(method.getName())) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract boolean checkInput();", "protected abstract boolean isInputValid();", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "boolean hasIsInputTo();", "public boolean checkInput();", "public abstract boolean verifyInput();", "private boolean isInputValid() {\n return true...
[ "0.71867704", "0.7052743", "0.6911153", "0.68869716", "0.6706524", "0.66565734", "0.6594045", "0.6438862", "0.6432415", "0.64137954", "0.6325846", "0.6266282", "0.62593764", "0.62224734", "0.6153545", "0.61509454", "0.6139946", "0.6112239", "0.6112239", "0.6104041", "0.603155...
0.0
-1
constructor for the Intersection class
public Intersection(Stoplight s, Point p) { roads = new ArrayList<Road>(); stoplight = s; currentCar = null; pos = p; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public intersection(){}", "public IntersectionParams(List<IntersectionParam> ts) {\n super(ts);\n }", "public Intersection(ListExpression expr1, ListExpression expr2) {\n this.expr1 = expr1;\n this.expr2 = expr2;\n }", "public Intervals() {\n }", "public IntersectOperator(Inte...
[ "0.77671844", "0.66261655", "0.63782907", "0.6289617", "0.6064578", "0.59947425", "0.5807121", "0.5802011", "0.57763904", "0.5768914", "0.5710368", "0.5700961", "0.55962896", "0.55831695", "0.5539154", "0.5520464", "0.55018556", "0.54690844", "0.54667795", "0.5464957", "0.544...
0.58538157
6
addRoad method Connect road to intersection
public void addRoad(Road r) { this.roads.add(r); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean addRoad(\n String fromName, String toName, double roadDistance, String roadName\n ) {\n Vertex<String> from = addLocation(fromName);\n Vertex<String> to = addLocation(toName);\n\n // Add the road to the network - We assume all roads are two-way and\n // ignore if we've already add...
[ "0.66699713", "0.64085203", "0.63917494", "0.6190207", "0.61844236", "0.61817074", "0.607469", "0.60039353", "0.5978167", "0.59490085", "0.5892321", "0.5861644", "0.58307993", "0.58101636", "0.5802033", "0.5764886", "0.5742036", "0.56926656", "0.56541264", "0.56266713", "0.56...
0.7122411
0
canEnter allows car to enter if intersection does not have a car in it and current stoplight is green
public Boolean canEnter(Car car) { //0 left, 1 right, 2 up, 3 down int nextDir = car.road.direction; if(currentCar != null) { return false; } if(stoplight.lights[nextDir] == 0 || stoplight.lights[nextDir] == 2) return false; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean tryToGetIntoIntersection(Car car) {\n Logger.getInstance().logInfo(car.getName(), \"Trying to get into intersection: \" + getName());\n Lane nextLane = car.getNextLane();\n // in french driving system you don't get inside an intersection if the next lane is not free\n if ...
[ "0.6467277", "0.6326357", "0.5951241", "0.5859494", "0.58408254", "0.57070684", "0.5699547", "0.5688372", "0.5629396", "0.5603368", "0.55849785", "0.55467135", "0.5434988", "0.53824997", "0.53757614", "0.5355636", "0.53385043", "0.5320514", "0.5304155", "0.53033906", "0.53000...
0.76515615
0
enter a car into intersection Enter method enters a car into intersection
public void Enter(Car car) { currentCar = car; car.curVelocity=car.maxVelocity; ArrayList <Road> tempList = new ArrayList<Road>(); for(int i=0; i<roads.size(); i++){ if(roads.get(i).roadClosed){ tempList.add(null); //System.out.println("road closed"); //System.out.println(roads.get(i).getStart() + ", " + roads.get(i).getEnd()); } else if(roads.get(i).direction == i){ tempList.add(roads.get(i)); } else{ tempList.add(null); } } nextDir = currentCar.getNextDirection(tempList); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCarInsideIntersection(Car car) {\n if (carsInsideIntersection.contains(car)) {\n Logger.getInstance().logWarning(getName(), car.getName() + \" is already inside intersection \" + getName());\n throw new IllegalStateException(\"car already in intersection\");\n }\n...
[ "0.67259574", "0.64515615", "0.6299936", "0.6232521", "0.61877745", "0.6099921", "0.60418355", "0.598791", "0.5959988", "0.5914844", "0.58994424", "0.58697045", "0.58422834", "0.58306926", "0.57712793", "0.5724692", "0.57000947", "0.56817", "0.56321734", "0.5625006", "0.56104...
0.68071145
0
Exit method makes a car exit inersection
public void Exit() { if(currentCar == null) return; currentCar.setRoad(roads.get(nextDir)); Road nextRoad = roads.get(nextDir); if(currentCar != null){ nextRoad.Enter(currentCar); currentCar = null; } //currentCar.curVelocity = 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void exit() {\n\t\t\r\n\t}", "@Override\n\tpublic void exit() {\n\t\t\n\t}", "@Override\n\tpublic void exit() {\n\t\t\n\t}", "@Override\n\tpublic void exit() {\n\n\t}", "private void exitAction() {\n\t}", "@Override\n\tpublic void exit() {\n\t\t// TODO Auto-generated method stub\n\t...
[ "0.7875557", "0.77190214", "0.77190214", "0.765598", "0.7652494", "0.76203495", "0.7615178", "0.76091975", "0.75889665", "0.75445634", "0.7498637", "0.74891376", "0.73777294", "0.7278307", "0.7237316", "0.7215204", "0.72135204", "0.7201585", "0.7189371", "0.7164087", "0.71378...
0.78015774
1
Metodos de acesso get
public int getIdFornecedor(){ return idFornecedor; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void accionUsuario() {\n\t\t\r\n\t}", "public String getAccess();", "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "String getAccess();", "String getAccess();", "public String getAutorizacion()\r\n/* 134: */ {\r\n/* 135:226 */ return this.autorizacion;\r\n/* 1...
[ "0.6267368", "0.607154", "0.6068341", "0.6036296", "0.6036296", "0.5921704", "0.5837871", "0.578384", "0.57383007", "0.57334083", "0.5722062", "0.56774634", "0.56362486", "0.5621396", "0.56065434", "0.55884236", "0.5571568", "0.55642074", "0.55586594", "0.5543039", "0.5531126...
0.0
-1
Get response with booking Ids
@Test public void getBookingIdWithoutFilterTest() { Response response = RestAssured.get("https://restful-booker.herokuapp.com/booking"); response.print(); // verify response 200 Assert.assertEquals(response.getStatusCode(), 200, "statuscode should 200 but it not"); // verify at least 1 booking id in response; List<Integer> bookingIds = response.jsonPath().getList("bookingid"); Assert.assertFalse(bookingIds.isEmpty(), "LIst of booking is empty,but it not"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/booking/{id}\")\n\tpublic Bookings getBookingById(@PathVariable(value = \"id\") String bookingId){\n\t\tBookings booking = services.getBookings(bookingId);\n\t\treturn booking;\n\t}", "@GetMapping(\"/bookingDetails/{id}\")\n\tpublic List<Bookings> getBookingsById(@PathVariable(value = \"id\") Stri...
[ "0.68947643", "0.6821973", "0.64978504", "0.64033693", "0.64007246", "0.64007246", "0.6184383", "0.599281", "0.5975227", "0.5928384", "0.5896369", "0.5890751", "0.5869845", "0.58620346", "0.5850721", "0.5841123", "0.5820083", "0.58139616", "0.5794234", "0.5758867", "0.5741354...
0.67021185
2
TODO Autogenerated method stub
@Override public void onClick(View arg0) { switch (arg0.getId()) { case R.id.r3: Intent loactionAcIntent = new Intent(); loactionAcIntent.setClass(mContext, CrmVisitorFromGaodeMap.class); startActivityForResult(loactionAcIntent, 1015); break; case R.id.txt_comm_head_right: if (null != php_Address && !php_Address.equals("") && postState && php_Lng != null && php_Lat != null) { // if(mAdapter.mPicList.size()>0){ CustomDialog.showProgressDialog(mContext, "签到中..."); postCustomerInfo(); // } // else{ // CustomToast.showShortToast(mContext, "请上传照片"); // } } else { CustomToast.showShortToast(mContext, "请选择签到位置"); } default: break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void baseSetContentView() { View layout = View.inflate(this, R.layout.crm_vistor_signaddinfo, mContentLayout); mContext = this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public boolean getDataResult() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void updateUi() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void initView() { r3 = (LinearLayout) findViewById(R.id.r3); sign_time = (TextView) findViewById(R.id.sign_time); visitor_address_change = (TextView) findViewById(R.id.visitor_address_change); // 上传图片使用 mGrideviewUpload = (GridView) findViewById(R.id.grideview_upload); mAdapter = new UploadAdapter(this); mGrideviewUpload.setAdapter(mAdapter); mParentView = (LinearLayout) getLayoutInflater().inflate(R.layout.creative_idea_new, null); mPicturePathList = new ArrayList<String>(); mDialog = new BSProgressDialog(this); sign_time.setText(DateUtils.getCurrentTimess()); mTitleTv.setText("位置签到"); activate(); // MyThread m = new MyThread(); // new Thread(m).start(); }
{ "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