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
Executa este if se for clicado o botao Alterar
public void actionPerformed(ActionEvent event) { if (event.getSource()==balterar) { operacao="edicao"; int linha = aTable.getSelectedRow(); if (linha>=0) { desbloqueia(); String idprod = aTable.getValueAt(linha,0).toString(); String desprod = aTable.getValueAt(linha,1).toString(); String quantidade = aTable.getValueAt(linha,2).toString(); String valunit = aTable.getValueAt(linha,3).toString(); String ultmov = aTable.getValueAt(linha,4).toString(); String categoria = aTable.getValueAt(linha,5).toString(); String idcateg = aTable.getValueAt(linha,6).toString(); tidprod.setText(idprod); tidprod.setEnabled(false); tdesprod.setText(desprod); tquantidade.setText(quantidade); tvalunit.setText(valunit); tultmov.setDate(dma_to_amd(ultmov)); tlistacateg.setSelectedItem(categoria); g_idcateg = Integer.parseInt(idcateg); } else { JOptionPane.showMessageDialog(null,"Selecione na tabela o registro que deseja editar"); } } // Executa este if se for clicado o botao Gravar if (event.getSource()==bgravar) { try { int idprod = Integer.parseInt(tidprod.getText()); if (idprod>0 && "edicao".equals(operacao)) { PreparedStatement st = conex.prepareStatement("update produtos set desprod=?,quantidade=?,valunit=?,codcateg=?, ultmov=? where idprod=?"); st.setString(1,tdesprod.getText()); st.setDouble(2,Double.parseDouble(tquantidade.getText())); st.setDouble(3,Double.parseDouble(tvalunit.getText())); st.setInt(4,g_idcateg); st.setDate(5,new java.sql.Date(tultmov.getDate().getTime())); st.setInt(6,Integer.parseInt(tidprod.getText())); st.executeUpdate(); } if (idprod > 0 && "novo".equals(operacao)) { PreparedStatement st = conex.prepareStatement("select idprod from produtos where idprod = ?"); st.setInt(1,Integer.parseInt(tidprod.getText())); ResultSet rs = st.executeQuery(); if (rs.first()) { JOptionPane.showMessageDialog(null,"Este codigo ja existe!"); } else { String sql = "insert into produtos (idprod,desprod,quantidade,valunit,codcateg,ultmov) values (?,?,?,?,?,?)"; PreparedStatement vs = conex.prepareStatement(sql); vs.setInt(1,Integer.parseInt(tidprod.getText())); vs.setString(2,tdesprod.getText()); vs.setDouble(3,Double.parseDouble(tquantidade.getText())); vs.setDouble(4,Double.parseDouble(tvalunit.getText())); vs.setInt(5,g_idcateg); vs.setDate(6,new java.sql.Date(tultmov.getDate().getTime())); vs.executeUpdate(); } rs.close(); } } catch (Exception sqlEx) {JOptionPane.showMessageDialog(null,"erro");} preenche_grid(); limpaBase(); bloqueia(); } // Executa este if se for clicado o botao Excluir if (event.getSource()==bexcluir) { int linha = aTable.getSelectedRow(); if (linha>=0) { int resp = JOptionPane.showOptionDialog(null,"Confirma exclusão","Atenção",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,null,null); if (resp==0) { String idprod = aTable.getValueAt(linha,0).toString(); try { PreparedStatement st = conex.prepareStatement("delete from produtos where idprod = ?"); st.setInt(1,Integer.parseInt(idprod)); st.executeUpdate(); } catch (Exception sqlEx) {} preenche_grid(); } } else { JOptionPane.showMessageDialog(null,"Selecione na tabela o registro que deseja excluir"); } } // Executa este if se for clicado o botao Incluir if (event.getSource()==bincluir) { operacao="novo"; try { limpaBase(); desbloqueia(); } catch (Exception sqlEx) {} } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String editar()\r\n/* 59: */ {\r\n/* 60: 74 */ if ((getMotivoLlamadoAtencion() != null) && (getMotivoLlamadoAtencion().getIdMotivoLlamadoAtencion() != 0)) {\r\n/* 61: 75 */ setEditado(true);\r\n/* 62: */ } else {\r\n/* 63: 77 */ addInfoMessage(getLanguageController().getMens...
[ "0.651254", "0.64400846", "0.6377357", "0.63249195", "0.6302754", "0.6297949", "0.6276696", "0.6251613", "0.6246952", "0.62322503", "0.6216819", "0.61821777", "0.61397254", "0.6103826", "0.6079595", "0.6050687", "0.6035104", "0.6027323", "0.60248446", "0.6017941", "0.60154885...
0.0
-1
Fim do metodo principal
public String amd_to_dma(java.sql.Date d) { String resp = ""; if (d!=null) { String sdat = d.toString(); String sano = sdat.substring(0,4); String smes = sdat.substring(5,7); String sdia = sdat.substring(8,10); resp = sdia+"/"+smes+"/"+sano; } return resp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Ordenamiento() {\n\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "protected void accionUsuario() {\n\t\t\r\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "public static void MenuPrincipal() {\n System.out.println...
[ "0.63947755", "0.62866056", "0.617852", "0.6158776", "0.61376804", "0.6134583", "0.61282074", "0.61057514", "0.6033937", "0.60060453", "0.6005395", "0.6000262", "0.5996719", "0.59745324", "0.5968401", "0.59084874", "0.58933353", "0.5891871", "0.5883216", "0.586105", "0.585981...
0.0
-1
XXX: this method does not get called when hovering over a string literal which leads to potential problem annotation hovers not appearing
@Override public String getHoverInfo( final ITextViewer textViewer, final IRegion hoverRegion ) { String hoverInfo = computeProblemInfo( textViewer, hoverRegion ); if (hoverInfo != null) { return hoverInfo; } return computeThingAtPoint( textViewer, hoverRegion ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface EscapeMarker {}", "@Override\r\n\tpublic void insertString(int offs, String str, AttributeSet a)\r\n\t\t\tthrows BadLocationException {\n\t\tStyleConstants.setForeground((MutableAttributeSet) a, Color.BLACK);\r\n\t\tStyleConstants.setItalic((MutableAttributeSet) a, false);\r\n\t\t\r\n\t\t// trim...
[ "0.5831186", "0.57790667", "0.57352716", "0.56899345", "0.5685213", "0.5631585", "0.5627032", "0.5614861", "0.5610099", "0.55855256", "0.5556664", "0.55520463", "0.5548682", "0.5547641", "0.5546277", "0.5545762", "0.55383503", "0.5536372", "0.55172664", "0.5509286", "0.549214...
0.0
-1
Creates an instance of JobRunResourceIdInner class.
public JobRunResourceIdInner() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String jobRunResourceId() {\n return this.jobRunResourceId;\n }", "public JobID() {\n super();\n }", "public static JobID generate() {\n return new JobID();\n }", "public Job(int id) {\n this.id = id;\n }", "public Job(String JobID, int RunTime) {\n\t\t\tthis....
[ "0.60545415", "0.54137295", "0.5390828", "0.53010553", "0.5083474", "0.50623494", "0.4971983", "0.49203226", "0.48043752", "0.4778131", "0.4746941", "0.4677057", "0.46456814", "0.4588109", "0.45737383", "0.45470873", "0.4544238", "0.4538654", "0.45094836", "0.44963714", "0.44...
0.8114496
0
Get the jobRunResourceId property: Fully qualified resource id of the Job Run.
public String jobRunResourceId() { return this.jobRunResourceId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String runId() {\n return this.runId;\n }", "public JobID getJobID() {\n \n \t\treturn this.environment.getJobID();\n \t}", "public String getJobID() {\n\t\t\treturn JobID;\n\t\t}", "public Long getJobID() {\n return jobID;\n }", "public String getResourceId() {\n\t\treturn resou...
[ "0.7146008", "0.6898634", "0.6750046", "0.65106255", "0.6392255", "0.6392255", "0.63621557", "0.62698454", "0.6256226", "0.6234287", "0.6180203", "0.6075652", "0.60608715", "0.60259956", "0.6018301", "0.6018301", "0.59922844", "0.59922844", "0.59922844", "0.59735614", "0.5968...
0.8964432
0
This application has a different form for save and read registry, the registry is read for range of dates (start date end date)
@Override public void setPrimaryKey(java.lang.Object key) { mnDbmsType = ((int[]) key)[0]; mnPkYearId = ((int[]) key)[1]; mnPkTypeCostObjectId = ((int[]) key)[2]; mnPkRefCompanyBranchId = ((int[]) key)[3]; mnPkRefReferenceId = ((int[]) key)[4]; mnPkRefEntityId = ((int[]) key)[5]; mnPkBizPartnerId = ((int[]) key)[6]; mtDbmsDateStart = ((java.util.Date[]) key)[7]; mtDbmsDateEnd = ((java.util.Date[]) key)[8]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDateRange(Date start, Date end)\n {\n descriptorManager.readFileDescriptors(start,end);\n }", "@Override\n public void onDateRangeSelected(int startDay, int startMonth, int startYear, int endDay, int endMonth, int endYear) {\n DateFormat df = DateFormat.getDateInstance(Date...
[ "0.5608251", "0.5330981", "0.5327838", "0.5211915", "0.5207656", "0.5203659", "0.5137054", "0.5128527", "0.511679", "0.5102621", "0.5097517", "0.50941664", "0.50941664", "0.50611407", "0.50488466", "0.50396997", "0.5036914", "0.50293803", "0.5022484", "0.50172883", "0.499978"...
0.0
-1
Adjust the bond coupon measures by a cash settlement discount factor
public boolean adjustForSettlement ( final double dblCashPayDF) { if (!org.drip.quant.common.NumberUtil.IsValid (dblCashPayDF)) return false; _dblDV01 /= dblCashPayDF; _dblIndexCouponPV /= dblCashPayDF; _dblCouponPV /= dblCashPayDF; _dblPV /= dblCashPayDF; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setDiscount(BigDecimal discount);", "BigDecimal getDiscount();", "void setDiscount(float sconto);", "public double applyDiscount(){\n SaleDTO saleDTO = sale.createSaleDTO();\n List<DiscountDTO> itemDiscounts=dc.findDiscounts(saleDTO,new ItemDiscount());\n List<DiscountDTO> saleDisco...
[ "0.705021", "0.7022869", "0.69380957", "0.6872108", "0.67962176", "0.6736272", "0.66623735", "0.6590811", "0.658709", "0.6585167", "0.6581519", "0.6529569", "0.64983946", "0.64970076", "0.64764273", "0.6473938", "0.6368832", "0.6302888", "0.6300276", "0.6261928", "0.6244871",...
0.0
-1
Retrieve the Index Coupon PV
public double indexCouponPV() { return _dblIndexCouponPV; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double couponPV()\n\t{\n\t\treturn _dblCouponPV;\n\t}", "hr.client.appuser.CouponCenter.AppCoupon getCouponList(int index);", "int getCouponStat();", "int getCouponNum();", "@WebMethod public Coupon getCoupon(String coupon);", "public pb4client.ValueChange getVc(int index) {\n return vc_.get(in...
[ "0.6323294", "0.6241754", "0.6233437", "0.6076355", "0.58540785", "0.5847178", "0.57007545", "0.5607452", "0.5562849", "0.5534766", "0.5513888", "0.5506635", "0.5499475", "0.54984856", "0.5478267", "0.54580075", "0.5429597", "0.5394409", "0.53822297", "0.5379108", "0.5377579"...
0.74414206
0
Retrieve the Coupon PV
public double couponPV() { return _dblCouponPV; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double indexCouponPV()\n\t{\n\t\treturn _dblIndexCouponPV;\n\t}", "@WebMethod public Coupon getCoupon(String coupon);", "int getCouponStat();", "java.lang.String getCouponVendor();", "int getCouponNum();", "public double getCouponRate() {\n return _couponRate;\n }", "com.google.protobuf.Byte...
[ "0.6628262", "0.6337491", "0.6240976", "0.61928177", "0.6091763", "0.59352887", "0.5914965", "0.58794606", "0.58569145", "0.58565164", "0.56693965", "0.5654713", "0.56529075", "0.56454116", "0.5629211", "0.56208307", "0.5596214", "0.55648714", "0.55590045", "0.5539469", "0.55...
0.7099432
0
Adjust Measures for accrued
public boolean adjustForAccrual ( final double dblAccrued01, final double dblCoupon, final double dblIndex, final boolean bDirtyFromClean) { if (!org.drip.quant.common.NumberUtil.IsValid (dblAccrued01) || !org.drip.quant.common.NumberUtil.IsValid (dblCoupon)) return false; if (bDirtyFromClean) _dblDV01 -= dblAccrued01; else _dblDV01 += dblAccrued01; if (bDirtyFromClean) _dblIndexCouponPV -= dblAccrued01 * dblIndex; else _dblIndexCouponPV += dblAccrued01 * dblIndex; if (bDirtyFromClean) _dblCouponPV -= dblAccrued01 * dblCoupon; else _dblCouponPV += dblAccrued01 * dblCoupon; if (bDirtyFromClean) _dblPV -= dblAccrued01 * dblCoupon; else _dblPV += dblAccrued01 * dblCoupon; return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateFMeasure(){\n double precisionValue = precision.get(precision.size()-1);\n double recallValue = recall.get(recall.size()-1);\n if(precisionValue==0.0 || recallValue==0.0){\n fMeasures.add(0.0);\n }else{\n fMeasures.add((2*precisionValue*recallVal...
[ "0.64310867", "0.636045", "0.61329484", "0.59841925", "0.5958918", "0.5883207", "0.5880292", "0.586454", "0.5815465", "0.578832", "0.5743482", "0.5733949", "0.55477554", "0.5530165", "0.55149066", "0.55059385", "0.54857093", "0.54752946", "0.54684997", "0.54429215", "0.543063...
0.0
-1
Return the state as a named measure map
public org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> toMap ( final java.lang.String strPrefix) { org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double> mapMeasures = new org.drip.analytics.support.CaseInsensitiveTreeMap<java.lang.Double>(); mapMeasures.put (strPrefix + "DV01", _dblDV01); mapMeasures.put (strPrefix + "IndexCouponPV", _dblIndexCouponPV); mapMeasures.put (strPrefix + "CouponPV", _dblCouponPV); mapMeasures.put (strPrefix + "PV", _dblPV); return mapMeasures; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Map<Integer, State> getMyStateMap() { return myStateMap; }", "String getState();", "String getState();", "String getState();", "public String getState() {\r\n StringBuilder builder = new StringBuilder();\r\n builder.append(mLastLarge);\r\n builder.append(',');\r\n builder...
[ "0.5925917", "0.58721507", "0.58721507", "0.58721507", "0.5839441", "0.5789337", "0.5774103", "0.5748188", "0.5647896", "0.55884933", "0.5579226", "0.55763763", "0.55280995", "0.55280995", "0.55280995", "0.55280995", "0.54707825", "0.54707825", "0.54707825", "0.54707825", "0....
0.0
-1
Used to determine if tile1 and tile2 are cardinal from each other (North/East/South/West).
public static boolean isCardinal(Tile tile1, Tile tile2) { if (tile1.getX() == tile2.getX() || tile1.getY() == tile2.getY()) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isOrdinal(Tile tile1, Tile tile2) {\n\t\tif (tile2.getX() - tile1.getX() == tile2.getY() - tile1.getY()\n\t\t\t\t|| tile2.getX() - tile1.getX() == tile1.getY() - tile2.getY())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "public boolean isNeighbour(Tile tile){\n int x1 = this.getX()...
[ "0.7004366", "0.6238558", "0.60582805", "0.60143524", "0.5995304", "0.59904253", "0.5945485", "0.58998555", "0.5895759", "0.5887591", "0.5883021", "0.5848979", "0.5837303", "0.5833176", "0.5806991", "0.5785821", "0.5764593", "0.5761255", "0.57470953", "0.57341033", "0.5733362...
0.79073703
0
Used to determine if tile1 and tile2 are ordinal from each other (North East/North West/South East/South West).
public static boolean isOrdinal(Tile tile1, Tile tile2) { if (tile2.getX() - tile1.getX() == tile2.getY() - tile1.getY() || tile2.getX() - tile1.getX() == tile1.getY() - tile2.getY()) return true; return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isCardinal(Tile tile1, Tile tile2) {\n\t\tif (tile1.getX() == tile2.getX() || tile1.getY() == tile2.getY())\n\t\t\treturn true;\n\t\treturn false;\n\t}", "@Override\n\tpublic int compareTo(Tile another) {\n\n\t\tfloat diference = (distanceToStart + distanceToEnd) - (another.distanceToStart ...
[ "0.67514664", "0.5721609", "0.5523389", "0.5405353", "0.53821826", "0.53695416", "0.5356662", "0.53281736", "0.5311453", "0.5278747", "0.5277046", "0.52767867", "0.52561194", "0.52443415", "0.5225748", "0.5194447", "0.5186382", "0.5186112", "0.5183993", "0.5169509", "0.516440...
0.81311136
0
Generates a path (array of tiles) from the origin tile to the target tile.
public static Tile[] getPath(Tile origin, Tile target) { int dist = getDistance(origin, target); Tile[] path = new Tile[dist]; switch (getDirection(origin, target)) { case East: for (int i = 0; i < dist; i++) { path[i] = Chess.getBoard().getTile(origin.getX(), origin.getY() + (i + 1)); } return path; case North: for (int i = 0; i < dist; i++) { path[i] = Chess.getBoard().getTile(origin.getX() - (i + 1), origin.getY()); } return path; case NorthEast: for (int i = 0; i < dist; i++) { path[i] = Chess.getBoard().getTile(origin.getX() - (i + 1), origin.getY() + (i + 1)); } return path; case NorthWest: for (int i = 0; i < dist; i++) { path[i] = Chess.getBoard().getTile(origin.getX() - (i + 1), origin.getY() - (i + 1)); } return path; case South: for (int i = 0; i < dist; i++) { path[i] = Chess.getBoard().getTile(origin.getX() + (i + 1), origin.getY()); } return path; case SouthEast: for (int i = 0; i < dist; i++) { path[i] = Chess.getBoard().getTile(origin.getX() + (i + 1), origin.getY() + (i + 1)); } return path; case SouthWest: for (int i = 0; i < dist; i++) { path[i] = Chess.getBoard().getTile(origin.getX() + (i + 1), origin.getY() - (i + 1)); } return path; case West: for (int i = 0; i < dist; i++) { path[i] = Chess.getBoard().getTile(origin.getX(), origin.getY() + (i + 1)); } return path; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generatePath(List<Coordinate> source, List<Coordinate> path) {\n for (int i = 0; i < source.size() - 1; i++) {\n Graph graph = new Graph(getEdge(map));\n Coordinate start = source.get(i);\n Coordinate end = source.get(i + 1);\n graph.dijkstra(start);\...
[ "0.6468", "0.6416914", "0.6167659", "0.6159607", "0.61423624", "0.58029807", "0.5791358", "0.5748858", "0.5571243", "0.55070716", "0.54837835", "0.54395133", "0.5436772", "0.5391942", "0.53758913", "0.53754264", "0.53346646", "0.5334538", "0.5333012", "0.5332972", "0.53154254...
0.72961754
0
Returns the direction required to travel to get from one tile to another tile.
public static Direction getDirection(Tile origin, Tile target) { int x1 = origin.getX(); int y1 = origin.getY(); int x2 = target.getX(); int y2 = target.getY(); int dx = x2 - x1; int dy = y2 - y1; // cardinal directions if (dx == 0) if (y1 < y2) return Direction.East; else if (y1 > y2) return Direction.West; if (dy == 0) { if (x1 < x2) return Direction.South; else if (x1 > x2) return Direction.North; } // ordinal directions if (dx == dy || dx == -dy) { if (x1 < x2) if (y1 < y2) return Direction.SouthEast; else if (y1 > y2) return Direction.SouthWest; if (x1 > x2) if (y1 < y2) return Direction.NorthEast; else if (y1 > y2) return Direction.NorthWest; } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected final Direction getDirection() {\n\t\treturn tile.getDirection();\n\t}", "public double getDirectionMove();", "int getDirection();", "public double direction(){\n return Math.atan2(this.y, this.x);\n }", "public int getDirection();", "public Direction getDirect() {\n \tif(xMoving &...
[ "0.73332673", "0.720741", "0.69309604", "0.68806785", "0.6810745", "0.6760366", "0.67141116", "0.6708766", "0.65628654", "0.65351176", "0.6520419", "0.6508734", "0.64875484", "0.6483705", "0.64827627", "0.6474609", "0.64694464", "0.642583", "0.63728565", "0.63335115", "0.6321...
0.646589
17
For testing and debugging purposes. This method is a quick way to print all the tiles in an array.
public static void printPath(Tile[] path) { System.out.print("Path tiles: {"); for (Tile tile : path) { System.out.print(tile + ","); } System.out.println("}"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printTiles() {\n for (int i = 0; i < tiles.length; i++) {\n for (int k = 0; k < tiles[0].length; k++) {\n System.out.println(\"//\");\n System.out.println(\"ROW: \" + tiles[i][k].getRow());\n System.out.println(\"COL: \" + tiles[i][k].getCo...
[ "0.84439945", "0.83448565", "0.7427883", "0.7201041", "0.7086594", "0.70524687", "0.70467585", "0.6995828", "0.6977715", "0.6937478", "0.6891979", "0.6880519", "0.68414366", "0.6839525", "0.68358827", "0.6776402", "0.6764597", "0.67329186", "0.67093843", "0.6694781", "0.66835...
0.6675209
22
Compares two tiles and returns the distance between them. If the tiles being compared are not cardinal (North/East/South/West) or ordinal (Northeast/Southeast/Southwest/Northwest) of each other then 1 will be returned.
public static int getDistance(Tile from, Tile to) { if (!isOrdinal(from, to) && !isCardinal(from, to)) return -1; int distX = Math.abs(to.getX() - from.getX()); int distY = Math.abs(to.getY() - from.getY()); if (distX == distY) return distX; else if (distX == 0) return distY; else return distX; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int compareTo(Tile another) {\n\n\t\tfloat diference = (distanceToStart + distanceToEnd) - (another.distanceToStart + another.distanceToEnd);\n\n\t\tif( diference < 0 )\n\t\t\treturn -1;\n\t\telse if ( diference > 0)\n\t\t\treturn 1;\n\t\telse\n\t\t\treturn 0;\n\t}", "public int compare(City ...
[ "0.6370168", "0.62716824", "0.6180608", "0.598242", "0.5964259", "0.5945651", "0.59354436", "0.59337866", "0.5894601", "0.5846997", "0.5766319", "0.5758078", "0.57527196", "0.5678852", "0.56150997", "0.56101304", "0.55995065", "0.5558637", "0.55470747", "0.55442786", "0.55267...
0.63270044
1
TODO Autogenerated method stub
@Override public ScenicSpots selectById(String id) { ; return mapper.selectByPrimaryKey(id); }
{ "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 int updateSpots(ScenicSpots spots) { return mapper.updateByPrimaryKeySelective(spots); }
{ "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
increment the number of columns in the button bar
protected Button createCustomButton(Composite parent, String label) { ((GridLayout) parent.getLayout()).numColumns++; Button button = new Button(parent, SWT.PUSH); button.setText(label); button.setFont(JFaceResources.getDialogFont()); button.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { //buttonPressed(((Integer) event.widget.getData()).intValue()); } }); setButtonLayoutData(button); return button; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void iterateOverButtons(){\n int columnRows = 4;\n integerButtons = new Button[MAX_BUTTONS];\n for (int i = 0; i < integerButtons.length; ++i) {\n integerButtons[i] = new Button(buttonText[i]);\n integerButtons[i].setId(\"buttons\");\n ...
[ "0.6445795", "0.63970876", "0.63970876", "0.6269344", "0.6257821", "0.62573767", "0.62573767", "0.62374413", "0.6181442", "0.6180221", "0.60110193", "0.6009514", "0.5984861", "0.5951233", "0.59448487", "0.59139305", "0.58931047", "0.5881564", "0.58644456", "0.5831819", "0.573...
0.0
-1
Returns the Java project of the currently selected package fragment root or null if no package fragment root is configured.
public IJavaProject getJavaProject() { //IPackageFragmentRoot root= getPackageFragmentRoot(); if (pkgroot != null) { return pkgroot.getJavaProject(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static IProject getSelectedProject() {\n\t\tIProject activeProject = null;\n\t\tIWorkbenchWindow window = PlatformUI.getWorkbench().getActiveWorkbenchWindow();\n\t\tISelectionService selectionService = window.getSelectionService();\n\t\tISelection selection = selectionService.getSelection(IPageLayout.ID_PRO...
[ "0.6775383", "0.64372253", "0.63390684", "0.63270533", "0.63180465", "0.6262852", "0.61725485", "0.6133743", "0.5995481", "0.5981837", "0.5981837", "0.5950946", "0.5896982", "0.57884395", "0.5695289", "0.567822", "0.5671327", "0.5669015", "0.5667144", "0.5638477", "0.55688167...
0.8002671
0
Validates the package name and returns the status of the validation.
private IStatus getPackageStatus(String packName) { StatusInfo status= new StatusInfo(); if (packName.length() > 0) { IStatus val= validatePackageName(packName); if (val.getSeverity() == IStatus.ERROR) { status.setError(Messages.format(NewWizardMessages.NewPackageWizardPage_error_InvalidPackageName, val.getMessage())); return status; } else if (val.getSeverity() == IStatus.WARNING) { status.setWarning(Messages.format(NewWizardMessages.NewPackageWizardPage_warning_DiscouragedPackageName, val.getMessage())); } } else { status.setError(NewWizardMessages.NewPackageWizardPage_error_EnterName); return status; } // removed below logic return status; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean validatePackage() {\n\t\treturn this.validateID() && this.validateFirstName() && this.validateLastName()\n\t\t\t\t&& this.validateBank() && this.validateBSB() && this.validateAccountNumber();\n\t}", "private int doValidateCheck()\n {\n if (Math.min(txtArtifactID.getText().trim().length()...
[ "0.6691218", "0.6562189", "0.64285827", "0.6024407", "0.59296703", "0.59015465", "0.590044", "0.5863789", "0.5812425", "0.5783769", "0.57317847", "0.56412745", "0.5630455", "0.560491", "0.55756974", "0.5524118", "0.54908615", "0.5486924", "0.54677486", "0.5462918", "0.5441959...
0.67898947
0
TODO Autogenerated method stub
@Override public List<Section> retrieveSectionByclassLevelId(Long classLevelId) { return documentDAO.getSectionListByClassLevel(classLevelId); }
{ "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 save(DocumentDTO documentDto) { Document document=convertDocumentBean(documentDto); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<DocumentDTO> getDocumentListByTeacherId(Long userId) { return documentDAO.getDocumentListByTeacherId(userId); }
{ "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.66713095", "0.6567948", "0.652319", "0.648097", "0.64770466", "0.64586824", "0.64132667", "0.6376419", "0.62759", "0.62545097", "0.62371093", "0.62237984", "0.6201738", "0.619477", "0.619477", "0.61924416", "0.61872935", "0.6173417", "0.613289", "0.6127952", "0.6080854", ...
0.0
-1
TODO Autogenerated method stub
@Override public Boolean delete(long id) { return documentDAO.delete(id); }
{ "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 updateDocument(DocumentDTO document) { Document document1=new Document(); document1=convertDocumentBean(document); documentDAO.saveDocument(document1); }
{ "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 DocumentDTO getDocumentById(long id) { DocumentDTO ddto=documentDAO.getDocumentListById(id); ddto.setImagePath(context.getContextPath()+ddto.getImagePath()); ddto.setDataPath(context.getContextPath()+ddto.getDataPath()); return ddto; }
{ "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
(1) get a reference to the spinner (2) create a simple static list of strings
void loadSpinner(Spinner sp){ List<String> spinnerArray = new ArrayList<>(); spinnerArray.add("Oui"); spinnerArray.add("Non"); // (3) create an adapter from the list ArrayAdapter<String> adapter = new ArrayAdapter<String>( this, android.R.layout.simple_spinner_item, spinnerArray ); //adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); // (4) set the adapter on the spinner sp.setAdapter(adapter); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String getSpinnerText();", "public void addItemsOnSpinner() {\r\n\r\n\tspinner = (Spinner) findViewById(R.id.spinner);\r\n\tList<String> list = new ArrayList<String>();\r\n\tlist.add(\"Food\");\r\n\tlist.add(\"RentHouse\");\r\n\tlist.add(\"Closing\");\r\n\tlist.add(\"Party\");\r\n\tlist.add(\"Material\");\r\n\tA...
[ "0.73106736", "0.7076683", "0.69404864", "0.6779731", "0.6753772", "0.6597745", "0.65830237", "0.65372735", "0.65318125", "0.65243685", "0.65195525", "0.6514582", "0.65063727", "0.6501008", "0.6498483", "0.64314663", "0.63763094", "0.6371058", "0.63593775", "0.63588494", "0.6...
0.714024
1
Represents an Open Order (active order) on the exchange.
public interface OpenOrder { /** * Returns the ID for this order. * * @return the ID of the order. */ String getId(); /** * Returns the exchange date/time the order was created. * * @return The exchange date/time. */ Date getCreationDate(); /** * Returns the id of the market this order was placed on. * * @return the id of the market. */ String getMarketId(); /** * Returns the type of order. Value will be {@link OrderType#BUY} or {@link OrderType#SELL}. * * @return the type of order. */ OrderType getType(); /** * Returns the price per unit for this order. This is usually in BTC or USD. * * @return the price per unit for this order. */ BigDecimal getPrice(); /** * Returns the Quantity remaining for this order. This is usually the amount of the other currency * you want to trade for BTC/USD. * * @return the Quantity remaining for this order. */ BigDecimal getQuantity(); /** * Returns the Original total order quantity. If the Exchange does not provide this information, * the value will be null. This is usually the amount of the other currency you want to trade for * BTC/USD. * * @return the Original total order quantity if the Exchange provides this information, null * otherwise. */ BigDecimal getOriginalQuantity(); /** * Returns the Total value of order (price * quantity). This is usually in BTC or USD. * * @return the Total value of order (price * quantity). */ BigDecimal getTotal(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "List<Order> getOpenOrders(OpenOrderRequest orderRequest);", "public String getOpenOrders() {\n\n\t\treturn getOpenOrders(\"\");\n\t}", "public String open_orders(String pair) {\n\t\treturn this.apiCall(\"open_orders\", pair, \"\", true);\n\t}", "public double getOpen() {\n return open;\n }", "pub...
[ "0.6255637", "0.6073728", "0.6001599", "0.57101566", "0.56659406", "0.5625505", "0.5622965", "0.55510867", "0.55474126", "0.55294603", "0.55051655", "0.54103696", "0.53962255", "0.5376804", "0.5347849", "0.5346994", "0.5288492", "0.5286792", "0.52853626", "0.52815014", "0.525...
0.79280406
0
Returns the ID for this order.
String getId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getId() {\n return orderID;\n }", "public String getOrderID() {\n\t\treturn this.token.get(\"orderID\").toString();\n\t}", "public Integer\t\tgetOrderID();", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public int getOrderID()\n {\n synchronized (monitor(...
[ "0.80564076", "0.7790454", "0.7453705", "0.74352735", "0.740647", "0.7281046", "0.7281046", "0.7281046", "0.7273701", "0.72695327", "0.72635436", "0.7234944", "0.7222991", "0.7222991", "0.7222731", "0.7186333", "0.71562195", "0.71447355", "0.7106996", "0.7100331", "0.697946",...
0.0
-1
Returns the exchange date/time the order was created.
Date getCreationDate();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Date getOrderTime();", "public Date getOrderTime() {\n return orderTime;\n }", "public DateTime getCreatedTimestamp() {\n\t\treturn getDateTime(\"sys_created_on\");\n\t}", "public Date getDateCreated() {\r\n\t\t\r\n\t\t\tDate date= new Date(System.currentTimeMillis());\r\n\t\treturn date;\r\...
[ "0.7336371", "0.70643884", "0.70505387", "0.7008987", "0.7002202", "0.6971302", "0.6951624", "0.6951624", "0.6946352", "0.6941729", "0.6941729", "0.6941729", "0.6925866", "0.69045293", "0.69045293", "0.6896705", "0.68772525", "0.68732935", "0.6849274", "0.6840184", "0.6835356...
0.0
-1
Returns the id of the market this order was placed on.
String getMarketId();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getMarketId() {\n\t\treturn marketId;\n\t}", "public String getMarketId() {\n return marketId;\n }", "public long id() {\n\t\treturn message.getBaseMarketId();\n\t}", "public String getMarketActivityId() {\n\t\treturn marketActivityId;\n\t}", "public Integer getMarketGroupId() {\n ...
[ "0.77905035", "0.7743405", "0.73888934", "0.6837678", "0.66144025", "0.6586164", "0.6501471", "0.6469086", "0.6312291", "0.62837386", "0.616343", "0.61610305", "0.60715425", "0.6061111", "0.604939", "0.60232073", "0.60232073", "0.6003814", "0.6003814", "0.6003814", "0.6001832...
0.7356038
3
Returns the price per unit for this order. This is usually in BTC or USD.
BigDecimal getPrice();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MMDecimal getUnitPrice() {\r\n return this.unitPrice;\r\n }", "public float getUnitPrice() {\n return unitPrice;\n }", "public Float getUnitPrice() {\n return this.UnitPrice;\n }", "@Override\r\n\tpublic Map<Character, Double> SetUnitPrice() {\r\n\t\tPricePerUnit.put('A',...
[ "0.73980254", "0.7133264", "0.70955867", "0.7052107", "0.68252534", "0.6703816", "0.64642686", "0.64006764", "0.6349339", "0.6278898", "0.62741095", "0.6270046", "0.6232072", "0.619696", "0.6181883", "0.618081", "0.61558545", "0.6144429", "0.6137067", "0.61304605", "0.6129384...
0.63922465
8
Returns the Quantity remaining for this order. This is usually the amount of the other currency you want to trade for BTC/USD.
BigDecimal getQuantity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic Integer getRemainingQuantity() {\n\t\treturn null;\n\t}", "public long calcRemaining(){\n return getGrandTotal() - getTotalPaid();\n }", "public int getRemaining() {\n\t\treturn activeQuest.getRequirement_left();\n\t}", "public Long remaining() {\n return this.remaining;\...
[ "0.71250856", "0.68335336", "0.67655796", "0.65747094", "0.651616", "0.64896363", "0.64358956", "0.6362862", "0.6357656", "0.634879", "0.63174707", "0.6282252", "0.6259873", "0.62040687", "0.6172", "0.61436915", "0.6135604", "0.61278665", "0.6126501", "0.60988486", "0.6094818...
0.60401374
25
Returns the Original total order quantity. If the Exchange does not provide this information, the value will be null. This is usually the amount of the other currency you want to trade for BTC/USD.
BigDecimal getOriginalQuantity();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n for (OrderItem oi : getOrderItems()) {\n sum += oi.getTotalPrice();\n }\n return sum;\n }", "public double getTotalCostOfOrder() {\n double total = 0;\n for (AbstractProduct item :\n th...
[ "0.6517258", "0.64479613", "0.6431292", "0.6424268", "0.63642687", "0.633547", "0.6300741", "0.625228", "0.6240895", "0.6220012", "0.61017936", "0.61003166", "0.6080698", "0.60784334", "0.60648084", "0.60601157", "0.59910244", "0.597969", "0.5955935", "0.59539324", "0.5904234...
0.6113809
10
Returns the Total value of order (price quantity). This is usually in BTC or USD.
BigDecimal getTotal();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Transient\n public Double getTotalOrderPrice() {\n double sum = 0;\n for (OrderItem oi : getOrderItems()) {\n sum += oi.getTotalPrice();\n }\n return sum;\n }", "public double getTotal() {\n double total = 0.0;\n for (OrderItem i : getOrderItems()) {\n ...
[ "0.7954141", "0.77042055", "0.7662868", "0.7603316", "0.75771433", "0.7530766", "0.750713", "0.74501276", "0.7343583", "0.73043156", "0.7150071", "0.71304417", "0.7096463", "0.7084132", "0.7075674", "0.7016752", "0.70113003", "0.7007574", "0.6984582", "0.69531006", "0.6942919...
0.64404964
74
/ Enter your code here. Read input from STDIN. Print output to STDOUT. Your class should be named Solution.
public static void main(String[] args) { Scanner in = new Scanner(System.in); int dec = in.nextInt(); Stack<Integer> st = new Stack<Integer>(); int rm = 0; while(dec>0){ rm = dec%2; dec = dec/2; st.push(rm); } int size = st.size(); int[] array = new int[size]; for(int i = 0 ; i < size; i++){ array[i] = st.pop(); } int countOne = 0; int maxOne =0; for(int j = 0 ; j < size ; j++){ if(array[j] == 0){ countOne = 0; } else{ countOne++; maxOne = Math.max(maxOne,countOne); } } System.out.println(maxOne); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tSolution s = new Solution();\r\n\t}", "public static void main(String[] args) throws IOException {\n\t\t//Scanner in = new Scanner(System.in);\n\t\tBufferedReader in = new BufferedReader(new InputStreamReader(System.in...
[ "0.75280106", "0.7303422", "0.72608393", "0.72363067", "0.7178064", "0.71745384", "0.7022264", "0.7022264", "0.68939406", "0.68699366", "0.6857948", "0.68238825", "0.68213546", "0.6809923", "0.6807801", "0.6805596", "0.6782698", "0.6770123", "0.6755418", "0.6753114", "0.67508...
0.0
-1
Fetch hardcoded list of tags used for tasks
public static List<Tag> getAllTags() { return Arrays.asList( new Tag("home", Color.parseColor("#3F91EB")), new Tag("work", Color.parseColor("#CF4647")), new Tag("other", Color.parseColor("#85D95B")) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List getTags();", "public List<ITag> getTags ();", "String[] getAvailableTags();", "com.google.cloud.compute.v1.Tags getTags();", "private static ArrayList<JSONObject> getJsonTagSet(Task task) {\n ArrayList<JSONObject> myArray = new ArrayList<>();\n Set<Tag> myTags = task.getTags();\n ...
[ "0.69744396", "0.681816", "0.6784648", "0.67594755", "0.6755283", "0.66327107", "0.66170263", "0.6612782", "0.66100186", "0.6507507", "0.6507507", "0.6498821", "0.6458902", "0.64568645", "0.6447744", "0.6419211", "0.6413899", "0.6413899", "0.6413899", "0.6413899", "0.6413899"...
0.0
-1
Created by benjamindrake on 12/14/15.
public interface InviteRepository extends CrudRepository<Invite, Integer> { List<Invite> findByEmail(String email); List <Invite> findByWeddingId(Integer weddingId); Invite findOneByEmail(String email); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpubl...
[ "0.5983887", "0.5846162", "0.5787144", "0.5785909", "0.5742994", "0.5697893", "0.5697893", "0.5684761", "0.5673955", "0.56375474", "0.56363773", "0.5606579", "0.55863965", "0.55784196", "0.5565794", "0.5545546", "0.55435663", "0.5533635", "0.5533635", "0.55286705", "0.5522665...
0.0
-1
Calculate cost of this component
public abstract double getCost();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getCost();", "double getCost();", "@Pure\n\tdouble getCost();", "double getTotalCost();", "@Override\r\n\tpublic double cost() {\n\t\treturn this.cost;\r\n\t}", "public int totalCostOfComponents( ){\n\t\tint total=0;\n\t\tfor (Component temp : components){\n\t\t\ttotal+=temp.getCost();\n\t\t}\n\t\...
[ "0.8029359", "0.8029359", "0.7874663", "0.7782434", "0.7740192", "0.77259743", "0.76646394", "0.76107585", "0.7601767", "0.75921273", "0.7589135", "0.75888157", "0.7574535", "0.75532573", "0.7533495", "0.7533495", "0.7526726", "0.7510843", "0.7509234", "0.749326", "0.7481966"...
0.76560014
7
Get details of this component
public abstract String showDetails();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getDetails() {\n return toString();\n }", "@Override\n\tpublic Object getDetails() {\n\t\treturn details;\n\t}", "public JPanel getInfo() {\n return info;\n }", "ComponentBodyType getComponentInfo();", "public String getComponent() {\n return this.component;\n }", "p...
[ "0.6995166", "0.6917012", "0.68314904", "0.6756656", "0.6733832", "0.67138857", "0.67138857", "0.66938597", "0.66759205", "0.66759205", "0.662095", "0.66094327", "0.65909344", "0.654896", "0.65439236", "0.652822", "0.6401801", "0.6400844", "0.6400844", "0.6396518", "0.6382212...
0.0
-1
Method to add components to a composite kit
public abstract void add(KitComponent component);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addComponents();", "private void addComponents() {\n //this.getContentPane().add(new ViewDeckComputer(), BorderLayout.NORTH);\n createTopPanel();\n createCentralPanel();\n createBottomPanel();\n }", "private void addComponents() {\n LOOGER.info(\"Get add Components En...
[ "0.76444036", "0.72037536", "0.7069037", "0.6975784", "0.68647695", "0.683831", "0.6789179", "0.6726546", "0.66889983", "0.65410835", "0.64923996", "0.6486458", "0.6474672", "0.64682883", "0.645421", "0.6446995", "0.64426535", "0.6424385", "0.6422946", "0.64053774", "0.640294...
0.7497487
1
Method to remove component from composite kit.
public abstract boolean remove(KitComponent component);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void removeComponent(Component c);", "public void removeCompositeComponent(DrawingComponent component)\n\t{\n\t\t\n\t}", "public void remove(Component c){}", "@Override\r\n\tpublic void removeLayoutComponent(Component arg0) {\n\t\t\r\n\t}", "@Override\npublic void remove(VirtualContainer parent, Vir...
[ "0.78610474", "0.7782734", "0.77592456", "0.7226084", "0.71953046", "0.71492296", "0.71492296", "0.7148939", "0.71276057", "0.7117778", "0.70546955", "0.70322835", "0.7018075", "0.6908845", "0.68532914", "0.68323517", "0.6823715", "0.67819446", "0.6777411", "0.6762156", "0.66...
0.7892951
0
Set SizeState of this component.
public void setSizeState(SizeState size) { this.sizeState = size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSize(int _size)\r\n {\r\n size = _size;\r\n }", "public void setSize(int size) {\r\n _size = size;\r\n }", "public void setSizeModifier(Dimension size) {\n\t\tthis.size = size;\n\t}", "public void setSize(int size) {\n\t\t _size = size;\n\t}", "public void setSize(int size...
[ "0.6904474", "0.6873153", "0.6836866", "0.6780465", "0.6761023", "0.6719807", "0.6719807", "0.66837096", "0.66837096", "0.66837096", "0.66837096", "0.66792154", "0.6667331", "0.664596", "0.6611232", "0.6561511", "0.64627266", "0.6425995", "0.6425748", "0.6416673", "0.6347363"...
0.81918824
0
Get SizeState of this component.
public SizeState getSizeState() { return this.sizeState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Dimension getSize() {\r\n\t\treturn this.size;\r\n\t}", "public Size getSize() {\n return size;\n }", "public double getSize() {\n return size_;\n }", "public double getSize() {\n return size_;\n }", "public float getSize() {\n\t\treturn size;\n\t}", "public float get...
[ "0.6748211", "0.67424744", "0.6631483", "0.65786916", "0.6551756", "0.65490127", "0.6496764", "0.6466929", "0.642932", "0.64181465", "0.6407755", "0.6374236", "0.6309885", "0.63031906", "0.63023335", "0.6286068", "0.6272576", "0.62670535", "0.6249267", "0.62312204", "0.623053...
0.838649
0
Set ExpertiseLevelState of this component.
public void setLevelState(ExpertiseLevelState level) { this.levelState = level; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ExpertiseLevelState getLevelState() {\n return this.levelState;\n }", "public void setLevelState(LevelState newLevelState) {\r\n\t\tlevelState = newLevelState;\r\n\t}", "@Override\n public void setEngergyLevel(double energy) {\n this.energy = energy;\n }", "@Override\n public...
[ "0.62048787", "0.51060414", "0.5044593", "0.49123237", "0.4904747", "0.48722416", "0.4865", "0.47756702", "0.47539294", "0.47286096", "0.47189388", "0.46914223", "0.46836102", "0.4668874", "0.46671885", "0.46588498", "0.46562648", "0.4645655", "0.46395782", "0.46296978", "0.4...
0.7286258
0
Get ExpertiseLevelState of this component.
public ExpertiseLevelState getLevelState() { return this.levelState; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LevelState getLevelState() {\r\n\t\treturn levelState;\r\n\t}", "public String getEducationLevel(){\n\t\t\n\t\treturn this.edulvl;\n\t}", "public int getEnabledLevel()\r\n {\r\n return this.enabled;\r\n }", "public State getLevel() {\r\n\t\treturn level;\r\n\t}", "public LevelExperience...
[ "0.6231535", "0.5901302", "0.58857346", "0.5840057", "0.58018196", "0.57213306", "0.57099783", "0.5615625", "0.56051356", "0.55314636", "0.5422667", "0.54018354", "0.53994435", "0.53937024", "0.53928494", "0.5368803", "0.5368803", "0.53406703", "0.53191733", "0.53191733", "0....
0.8262985
0
Set parent of this component.
public void setParent(Kit parentKit) { this.parent = parentKit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setParent(UIComponent parent);", "public abstract void setParent(UIComponent parent);", "void setParent(IGLProperty parent);", "public void setParent(ILexComponent parent);", "void setParent(WidgetParent ip) {\n this.m_parent = ip;\n }", "public void setParent(String parent) {\n _pa...
[ "0.8085734", "0.79205906", "0.7807329", "0.7778568", "0.7728566", "0.76871604", "0.76482123", "0.7646921", "0.7618192", "0.7554591", "0.7539121", "0.7524787", "0.74963284", "0.7474154", "0.74196273", "0.73995465", "0.739065", "0.73857075", "0.738547", "0.7382733", "0.7378565"...
0.7093489
43
Get parent of this component.
public Kit getParent() { return this.parent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Component getParentComponent() {\r\n\t\tif (parentComponent == null) {\r\n\t\t\tif (view != null)\r\n\t\t\t\tparentComponent = view.getComponent(parentComponentName);\r\n\t\t}\r\n\t\treturn parentComponent;\r\n\t}", "public WidgetParent getParent() {\n return this.m_parent;\n }", "public Objec...
[ "0.8396402", "0.82206726", "0.79263115", "0.79263115", "0.79263115", "0.78818524", "0.7843218", "0.77807033", "0.77571166", "0.7744687", "0.7723069", "0.7710659", "0.76736236", "0.7671721", "0.76704794", "0.7599284", "0.7573727", "0.7527903", "0.7467859", "0.7467859", "0.7440...
0.73800516
30
Method to check if this component is a composite or leaf.
public boolean isComposite() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean hasCompositeStructure() {\n return (getStructureType() == EquipmentType.T_STRUCTURE_COMPOSITE);\n }", "public boolean isLeaf()\r\n {\r\n return ! (isComposite(boundable1) || isComposite(boundable2));\r\n }", "boolean isComposite();", "boolean isComposite();", "public boolean i...
[ "0.728086", "0.72509605", "0.717708", "0.717708", "0.70687777", "0.68537897", "0.6501121", "0.6463876", "0.6463876", "0.6463876", "0.6463876", "0.6440421", "0.6439938", "0.6423299", "0.63951385", "0.6393481", "0.6373724", "0.63338107", "0.63338107", "0.63338107", "0.63338107"...
0.6624717
6
/////////////////////////////////////////////////////////////////////////////////////// PUBLIC ENTRY POINT ///////////////////////////////////////////////////////////////////////////////////////
public void setObjToBeDeletedOid(final O oid, final UIPresenterSubscriber<V> subscriber) { _objToBeDeletedOid = oid; _subscriber = subscriber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Main() {\n\n super();\n }", "private Main ()\n {\n super ();\n }", "private Main() {}", "public static void main() {\n \n }", "private Main() {\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "private Reke...
[ "0.71011806", "0.6855639", "0.6748123", "0.673603", "0.6626404", "0.66015136", "0.65214485", "0.65012234", "0.6495349", "0.6469512", "0.64309764", "0.6416569", "0.6408754", "0.6398964", "0.636646", "0.63640916", "0.6361011", "0.63580394", "0.6355126", "0.63334006", "0.6329278...
0.0
-1
initialize all the classes
@Override public void runOpMode() { RobotMain main = new RobotMain(this,hardwareMap,telemetry); //initialize controls imuTeleOpDualGamepad control = new imuTeleOpDualGamepad(main,gamepad1,gamepad2); waitForStart(); //Pull the tail back from autonomous main.JewelArm.setServo(.65); //Continually run the control program in the algorithm while (opModeIsActive()) control.run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void initClasses() {\n\t // base class must be initialized first\n\t \t SoAction.initClass();\n\t \t \n\t \t SoCallbackAction.initClass();\n\t \t SoGLRenderAction.initClass();\n\t \t SoGetBoundingBoxAction.initClass();\n\t \t SoGetMatrixA...
[ "0.8197643", "0.77257496", "0.7476933", "0.74048054", "0.7280805", "0.72727376", "0.72636485", "0.7258414", "0.7253841", "0.7252341", "0.7245555", "0.72137976", "0.7181076", "0.71800494", "0.71800494", "0.71800494", "0.71800494", "0.717885", "0.71756893", "0.7171903", "0.7161...
0.0
-1
Copy the given byte range of the given input to the given output.
public static void copy2(RandomAccessFile input, OutputStream output, long start, long length) throws IOException { byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; int read; if (input.length() == length) { // Write full range. while ((read = input.read(buffer)) > 0) { ByteArrayOutputStream bais = new ByteArrayOutputStream((int)length); bais.write(buffer, 0, read); // output.write(buffer, 0, read); } } else { // Write partial range. input.seek(start); long toRead = length; while ((read = input.read(buffer)) > 0) { if ((toRead -= read) > 0) { ByteArrayOutputStream bais = new ByteArrayOutputStream((int)length); bais.write(buffer, 0, read); // output.write(buffer, 0, read); } else { ByteArrayOutputStream bais = new ByteArrayOutputStream((int)length); // ByteArrayOutputStream bais = new ByteArrayOutputStream((int)length); bais.write(buffer, 0, (int)toRead + read); break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] setRange(byte[] source, byte[] destination, int start, int end ){\n for(int i=start; i <= end; i++)\n destination[i]=source[i-start];\n return destination;\n }", "public static byte[] setRange(byte[] source, byte[] destination, int start){\n for(int i=start...
[ "0.6341104", "0.6189972", "0.60459864", "0.6029616", "0.5870229", "0.56475306", "0.56139207", "0.55200756", "0.55176574", "0.55077755", "0.55011094", "0.54846865", "0.5459897", "0.52611464", "0.52344596", "0.5215907", "0.52124405", "0.51722616", "0.5166402", "0.51619047", "0....
0.6299891
1
Copy the given byte range of the given input to the given output.
private static void copyFirstVersion(RandomAccessFile input, OutputStream output, long start, long length) throws IOException { byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; int read; if (input.length() == length) { ByteArrayInputStream bai = new ByteArrayInputStream(buffer); // Write full range. while ((read = bai.read(buffer)) > 0) { ByteArrayOutputStream bao = new ByteArrayOutputStream(); // bai.read(buffer, 0, (int) length); bao.write(buffer, 0,(int) length); // output.write(buffer, 0, read); } } else { // Write partial range. // input.seek(start); long toRead = length; // // while ((read = input.read(buffer)) > 0) { // if ((toRead -= read) > 0) { // output.write(buffer, 0, read); // } else { // output.write(buffer, 0, (int) toRead + read); // break; // } // } ByteArrayInputStream bai = new ByteArrayInputStream(buffer); ByteArrayOutputStream bao = new ByteArrayOutputStream(); while ((read = bai.read(buffer)) > 0) { if((toRead -= read) > 0) { bao.write(buffer, 0, read); } else { bao.write(buffer,0,(int)toRead + read); break; } // bai.read(buffer, 0, (int) length); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] setRange(byte[] source, byte[] destination, int start, int end ){\n for(int i=start; i <= end; i++)\n destination[i]=source[i-start];\n return destination;\n }", "public static void copy2(RandomAccessFile input, OutputStream output, long start, long length) throws...
[ "0.6341104", "0.6299891", "0.6189972", "0.60459864", "0.6029616", "0.56475306", "0.56139207", "0.55200756", "0.55176574", "0.55077755", "0.55011094", "0.54846865", "0.5459897", "0.52611464", "0.52344596", "0.5215907", "0.52124405", "0.51722616", "0.5166402", "0.51619047", "0....
0.5870229
5
Copy the given byte range of the given input to the given output.
private static void copyFirstVersion2(RandomAccessFile input, OutputStream output, long start, long length) throws IOException { // byte[] buffer = new byte[DEFAULT_BUFFER_SIZE]; int read; ByteBuffer buffer = ByteBuffer.allocateDirect(DEFAULT_BUFFER_SIZE); FileChannel fch = input.getChannel(); if (input.length() == length) { while (true) { buffer.clear(); if (fch.read(buffer) == -1) { break; } } buffer.flip(); output.write(buffer.get()); // Write full range. // while ((read = input.read(buffer)) > 0) { // output.write(buffer, 0, read); // } // MappedByteBuffer mapbuf = fch.map(MapMode.READ_ONLY, 0, length); // while (mapbuf.position() < mapbuf.capacity()) // mapbuf.get(); } else { // Write partial range. // input.seek(start); // long toRead = length; // // while ((read = input.read(buffer)) > 0) { // if ((toRead -= read) > 0) { // output.write(buffer, 0, read); // } else { // output.write(buffer, 0, (int) toRead + read); // break; // } // } MappedByteBuffer mapbuf = fch.map(MapMode.READ_ONLY, start, length); while (mapbuf.position() < mapbuf.capacity()) mapbuf.get(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static byte[] setRange(byte[] source, byte[] destination, int start, int end ){\n for(int i=start; i <= end; i++)\n destination[i]=source[i-start];\n return destination;\n }", "public static void copy2(RandomAccessFile input, OutputStream output, long start, long length) throws...
[ "0.6341104", "0.6299891", "0.6189972", "0.6029616", "0.5870229", "0.56475306", "0.56139207", "0.55200756", "0.55176574", "0.55077755", "0.55011094", "0.54846865", "0.5459897", "0.52611464", "0.52344596", "0.5215907", "0.52124405", "0.51722616", "0.5166402", "0.51619047", "0.5...
0.60459864
3
write your code here
public static void main(String[] args) { Student sabiha = new ClassOneStudent(); sabiha.name = "sabiha"; sabiha.roll = 2; sabiha.joined(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void logic(){\r\n\r\n\t}", "public static void generateCode()\n {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "void pramitiTechTutorials() {\n\t\n}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tpub...
[ "0.61019534", "0.6054925", "0.58806974", "0.58270746", "0.5796887", "0.56999695", "0.5690986", "0.56556827", "0.5648637", "0.5640487", "0.56354505", "0.56032085", "0.56016207", "0.56006724", "0.5589654", "0.5583692", "0.55785793", "0.55733466", "0.5560209", "0.55325305", "0.5...
0.0
-1
return COLOR_MAP.get(colorName.toUpperCase());// this is used to Pro golf Supplier
public static String getColorGroup(String colorName){ return COLOR_MAP.get(colorName);// this is used to Ball Pro supplier }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Color getColor(String key) {\n\t\tif (mappings.containsKey(key)) {\n\t\t\t// return previously mapped color\n\t\t\treturn (Color) mappings.get(key);\n\t\t} else {\n\t\t\t// check for available standard color\n\t\t\tfor (int i = 0; i < assigned.length; i++) {\n\t\t\t\tif (assigned[i] == false) {\n\t\t\t\t\ta...
[ "0.6118928", "0.6036463", "0.5961721", "0.59533787", "0.5907353", "0.59004587", "0.58108175", "0.56959504", "0.5655963", "0.5650125", "0.5641846", "0.56347334", "0.56165755", "0.55907416", "0.55907416", "0.5579779", "0.55592066", "0.55552846", "0.55540687", "0.55372804", "0.5...
0.5966312
2
Method to take screenshot when the test cases fail
public static void captureScreenshot(WebDriver driver , String screenshotname) throws IOException { Path dest = Paths.get("./ScreenShots",screenshotname+"gh.png"); //take screenshot File scrFile = ((TakesScreenshot) driver).getScreenshotAs(OutputType.FILE); //copy the screen shot to another file FileUtils.copyFile(scrFile, new File(dest.toString())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onTestFailure(ITestResult arg0) {\n\t\tSystem.setProperty(\"org.uncommons.reportng.escape-output\", \"false\");\r\n\t\ttry {\r\n\t\t\tTestUtils.captureScreenshot();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\ttest.log(LogSta...
[ "0.78761643", "0.75457865", "0.7485209", "0.7467555", "0.74589336", "0.7447738", "0.74071944", "0.73918676", "0.73027515", "0.7275843", "0.7254762", "0.7233415", "0.7209658", "0.7138134", "0.71040905", "0.7031788", "0.70186824", "0.7015604", "0.69991136", "0.6940693", "0.6925...
0.0
-1
path and status value for the below Get method is retrieved from properties file
@Step("Method 'getCountOfPetsWithName' calculates the total number of pets with name 'doggie'") public void getCountOfPetsWithName() { response = restClient.doGetRequest("/pet/findByStatus", property.getProperty("status")); //This step gets the name of all the pets in the list List<String> petsNames=response.then() .extract() .path("name"); //For each is used to iterate over the list of names and verify with name- doggie and gets the total count for(String petsName:petsNames) { try { if(petsName.equalsIgnoreCase(petDoggie)) { petCount = petCount+1; } } //This is to handle the exception when Pet has No Name catch(NullPointerException e) { } } System.out.println("Pet Count is- "+petCount); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String accessLocationPropFile(){\n\t\tProperties prop = new Properties();\n\t\tString loc=\"\";\n\t\ttry {\n\t\t\t//load a properties file\n\t\t\tprop.load(new FileInputStream(\"C:/Users/SARA/Desktop/OpenMRS/de/DeIdentifiedPatientDataExportModule/api/src/main/resources/config1.properties\"));\n\t\t\tInteger...
[ "0.6657859", "0.6360501", "0.63261443", "0.63261443", "0.6302692", "0.6302692", "0.6302692", "0.62313944", "0.6225285", "0.61593723", "0.61140794", "0.60383624", "0.59284765", "0.59284765", "0.59284765", "0.59255445", "0.5918197", "0.5879521", "0.586084", "0.5856214", "0.5807...
0.0
-1
Register a new event handler. An event handler is a Runnable that is call on an Executor.
public synchronized void on(String eventName, Callable eventHandler) { if(eventRegistry.get(eventName) == null) eventRegistry.put(eventName, new ArrayList<>()); eventRegistry.get(eventName).add(eventHandler); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addHandler(EventHandler handler);", "public void registerNewEventHandler(Plugin cauldron, Class<? extends Event> type, Value handler)\n throws ClassNotFoundException {\n Listener lis = new Listener() {\n public int hashCode() {\n return super.hashCode();\n }\n };\n Even...
[ "0.6670224", "0.64704424", "0.617305", "0.6148468", "0.6021422", "0.59904", "0.5949803", "0.59169215", "0.5915227", "0.581656", "0.5782553", "0.5753905", "0.5684056", "0.5648622", "0.5570147", "0.5414124", "0.5399813", "0.53844225", "0.5343163", "0.5336163", "0.53323036", "...
0.7009251
0
Send a named event. This will call all event handlers registered to this event. Each event handler will be executed inside of the executor service, which means events may be handled in parallel.
public synchronized void emit(String name) throws RuntimeException { for (String pausedName : pausedEvents) { if (pausedName.equals(name)) return; } ArrayList<Future<Boolean>> f = fire(name); cache.put(name, f); runningFutures.addAll(f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendEvent(Event event);", "@SuppressWarnings(\"unchecked\")\n public void fireEvent(final Event event) {\n try {\n final List<EventListener<? extends Event>> eventListeners = this.eventListeners.get(event.getType());\n eventListeners.forEach(listener -> {\n ...
[ "0.6319439", "0.61276853", "0.6087659", "0.60427076", "0.60122955", "0.5975656", "0.5928631", "0.58950186", "0.5850668", "0.58355546", "0.5753313", "0.5743208", "0.57321995", "0.5657538", "0.5645673", "0.56436145", "0.5579121", "0.5567026", "0.5537602", "0.5535404", "0.553356...
0.55536467
18
This does the actual firing of the event. The emit() method calls this, and caches the resulting future for cancellation.
protected synchronized ArrayList<Future<Boolean>> fire(String eventName) throws RuntimeException { ArrayList<Future<Boolean>> futures = new ArrayList<>(); if(eventRegistry.get(eventName) != null) for (Callable eventHandler : eventRegistry.get(eventName)) { if (eventHandler != null) futures.add(service.submit(eventHandler)); } return futures; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void emit() {\n synchronized (this) {\n if (this.emitting) {\n this.missed = true;\n return;\n }\n this.emitting = true;\n emitLoop();\n }\n }", "public void emit() {\n ...
[ "0.60825294", "0.60825294", "0.59855235", "0.5850975", "0.56277883", "0.5601009", "0.5550387", "0.55348235", "0.5447628", "0.54366636", "0.5333355", "0.52911496", "0.52725273", "0.52441835", "0.5220907", "0.5203346", "0.51884776", "0.51598626", "0.5159558", "0.5140383", "0.51...
0.49323964
43
Main function of the program.
public static void main(String[] args) { boolean deterministic = Arguments.parseArguments(args); Runtime rt = Runtime.instance(); Profile p = new ProfileImpl(); ContainerController container = rt.createAgentContainer(p); try { VehicleAgent[] vehicles = createVehicles(10,10,10); startVehicles(vehicles, container); ControlTowerAgent controlTowerAgent = new ControlTowerAgent(); AgentController controlTower = container.acceptNewAgent(ControlTowerAgent.getDFName(), controlTowerAgent); LoggerHelper.get().logInfo("START - Started control tower"); controlTower.start(); ClientAgent clientAgent = new ClientAgent("johnny", ControlTowerAgent.getDFName(), deterministic); AgentController client = container.acceptNewAgent(clientAgent.getClientName(), clientAgent); String deterministicInfo = deterministic ? "deterministic" : "random"; LoggerHelper.get().logInfo("CLIENT - Started " + deterministicInfo + " client " + clientAgent.getClientName()); client.start(); } catch (StaleProxyException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main()\n\t{\n\t}", "public static void main() {\n \n }", "public static void main(){\n\t}", "public static void main() {\n }", "public static void main (String []args){\n }", "public static void main(String[] args) {\r\n \r\n }", "public static void main(String[] ...
[ "0.8057717", "0.79688144", "0.79141974", "0.78870326", "0.7850953", "0.7694336", "0.7694336", "0.76860267", "0.76860267", "0.7684073", "0.7665839", "0.7658207", "0.7658207", "0.7647905", "0.7640627", "0.76378036", "0.7614383", "0.76033854", "0.7590576", "0.7588488", "0.758654...
0.0
-1
This method was generated by MyBatis Generator. This method returns the value of the database column sales_user_role.roleid
public Integer getRoleid() { return roleid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Long getRoleid() {\n return roleid;\n }", "public String getRoleid() {\n return roleid;\n }", "public String getRoleid() {\n return roleid;\n }", "public String getRoleid() {\n return roleid;\n }", "public Integer getRoleId() {\r\n return roleId;\r\n ...
[ "0.76603377", "0.7459571", "0.7459571", "0.7459571", "0.7384197", "0.7376424", "0.73477083", "0.73477083", "0.73477083", "0.73477083", "0.73477083", "0.73477083", "0.73477083", "0.73477083", "0.7319597", "0.7284045", "0.7284045", "0.7284045", "0.7284045", "0.72538185", "0.723...
0.76872855
0
This method was generated by MyBatis Generator. This method sets the value of the database column sales_user_role.roleid
public void setRoleid(Integer roleid) { this.roleid = roleid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRoleId(Integer roleId) {\r\n this.roleId = roleId;\r\n }", "public void setRoleid(Long roleid) {\n this.roleid = roleid;\n }", "public void setRoleId(Integer roleId) {\n this.roleId = roleId;\n }", "public void setRoleId(Integer roleId) {\n this.roleId = ro...
[ "0.7287283", "0.7195626", "0.716375", "0.716375", "0.716375", "0.716375", "0.716375", "0.716375", "0.716375", "0.716375", "0.7130571", "0.70842516", "0.70017093", "0.70017093", "0.70017093", "0.70017093", "0.696035", "0.69318044", "0.69288224", "0.68879694", "0.6847356", "0...
0.7428409
0
This method was generated by MyBatis Generator. This method returns the value of the database column sales_user_role.uid
public Integer getUid() { return uid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<ExtUser> getUserIdByRoleId(long roleid) {\n\t\treturn extUserDao.getUserIdByRoleId(roleid);\n\t}", "public Byte getUserRole() {\r\n return userRole;\r\n }", "public Long getRoleid() {\n return roleid;\n }", "SysRoleUser selectByPrimaryKey(Long id);", "public Int...
[ "0.63423395", "0.6256662", "0.6184595", "0.6144647", "0.61161405", "0.6057089", "0.60414165", "0.6039849", "0.60201126", "0.5991693", "0.5991693", "0.5991693", "0.59852237", "0.59852237", "0.59852237", "0.5946195", "0.5931727", "0.59172326", "0.59126955", "0.5904803", "0.5886...
0.5748496
53
This method was generated by MyBatis Generator. This method sets the value of the database column sales_user_role.uid
public void setUid(Integer uid) { this.uid = uid; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUserRole(Byte userRole) {\r\n this.userRole = userRole;\r\n }", "public void setUserId(String uid, String first_name, String client_type, String unique_id, String role_id) {\n editor.putString(KEY_USERID, uid);\n editor.putString(FIRST_NAME, first_name);\n editor.put...
[ "0.66132617", "0.6468191", "0.6461065", "0.6396436", "0.6383736", "0.63716644", "0.61337274", "0.6039314", "0.60085464", "0.58932185", "0.58880275", "0.58343726", "0.5827331", "0.58264863", "0.5825391", "0.5819907", "0.5813821", "0.58094525", "0.5777847", "0.5770581", "0.5770...
0.56437695
48
Creates new form GradesUI
public GradesUI() { items = new ArrayList<>(); initComponents(); gradeItem.setModel(new javax.swing.DefaultComboBoxModel(new String[]{"No Item Added Yet!"})); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addGrade(final Context context, Assignment assignment){\n final Assignment addTo = assignment;\n AlertDialog.Builder addView = new AlertDialog.Builder(context);\n LayoutInflater inflater = ClassView.this.getLayoutInflater();\n View layout = inflater.inflate(R.layout.dialog_a...
[ "0.63993037", "0.6053753", "0.5881046", "0.5851687", "0.5850688", "0.5850078", "0.58437634", "0.5831116", "0.5748539", "0.56762", "0.5658231", "0.56132287", "0.5605948", "0.5588494", "0.5562805", "0.55545324", "0.5526694", "0.55242145", "0.5521577", "0.55210483", "0.54945004"...
0.6846083
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { createCSV = new javax.swing.JButton(); itemTextField = new javax.swing.JTextField(); jPanel1 = new javax.swing.JPanel(); label1 = new java.awt.Label(); jButton1 = new javax.swing.JButton(); gradeItem = new javax.swing.JComboBox(); jButton2 = new javax.swing.JButton(); warningLabel = new javax.swing.JLabel(); setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE); createCSV.setText("Create CSV"); createCSV.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { createCSVActionPerformed(evt); } }); itemTextField.setText("Enter Gradebook Item"); itemTextField.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { itemTextFieldActionPerformed(evt); } }); jPanel1.setBackground(new java.awt.Color(255, 255, 255)); label1.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR)); label1.setFont(new java.awt.Font("Dotum", 0, 48)); // NOI18N label1.setText("Gradebook Creator"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(0, 81, Short.MAX_VALUE)) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(label1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) ); jButton1.setText("Add"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); gradeItem.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Item 1", "Item 2", "Item 3", "Item 4" })); gradeItem.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { gradeItemActionPerformed(evt); } }); jButton2.setText("Delete"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); warningLabel.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(gradeItem, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(itemTextField)) .addGap(18, 18, 18) .addComponent(jButton2) .addGap(62, 62, 62) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(createCSV, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1, javax.swing.GroupLayout.DEFAULT_SIZE, 111, Short.MAX_VALUE))) .addGroup(layout.createSequentialGroup() .addComponent(warningLabel) .addGap(0, 0, Short.MAX_VALUE))) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(27, 27, 27) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(itemTextField, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jButton1)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(warningLabel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(gradeItem, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(createCSV) .addComponent(jButton2)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); 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.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
Interface to receive wallet notifications.
public interface MoneroWalletListenerI { /** * Invoked as the wallet is synchronized. * * @param height is the height of the synced block * @param startHeight is the starting height of the sync request * @param endHeight is the ending height of the sync request * @param percentDone is the sync progress as a percentage * @param message is a human-readable description of the current progress */ public void onSyncProgress(long height, long startHeight, long endHeight, double percentDone, String message); /** * Invoked when a new block is added to the chain. * * @param height - the height of the block added to the chain */ public void onNewBlock(long height); /** * Invoked when the wallet receives an output. * * @param output - the received output */ public void onOutputReceived(MoneroOutputWallet output); /** * Invoked when the wallet spends an output. * * @param output - the spent output */ public void onOutputSpent(MoneroOutputWallet output); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void notificationReceived(Notification notification);", "private void sendNotification() {\n }", "protected void attachNotification(Txn txn) {\r\n }", "@Override\r\n\tpublic void sendNotifications() {\n\r\n\t}", "public abstract void notify(JSONObject message);", "interface Callback {\n /**\...
[ "0.62888485", "0.6135589", "0.58261", "0.58104664", "0.5760511", "0.5715361", "0.570177", "0.5681885", "0.56189865", "0.5617159", "0.55969864", "0.55894923", "0.5560088", "0.5558862", "0.5551135", "0.55188996", "0.5518414", "0.55092466", "0.5506933", "0.54679406", "0.5466741"...
0.6420383
0
Invoked as the wallet is synchronized.
public void onSyncProgress(long height, long startHeight, long endHeight, double percentDone, String message);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n final KeyParameter oldKey = oldPassword != null ? wallet.getKeyCrypter().deriveKey(oldPassword) : null;\n\n // For the new key, we create a new key crypter according to the desired parameters.\n final KeyCrypterScrypt keyCryp...
[ "0.60021085", "0.59930354", "0.59240806", "0.5721996", "0.5653486", "0.56532925", "0.56276506", "0.56086385", "0.556379", "0.55620176", "0.55557805", "0.55528057", "0.5548239", "0.54753995", "0.54513764", "0.5423044", "0.54183584", "0.53966564", "0.53797096", "0.5378387", "0....
0.0
-1
Invoked when a new block is added to the chain.
public void onNewBlock(long height);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onBlockAdded(World p_149726_1_, int p_149726_2_, int p_149726_3_, int p_149726_4_)\r\n {\r\n super.onBlockAdded(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n// this.func_149930_e(p_149726_1_, p_149726_2_, p_149726_3_, p_149726_4_);\r\n }", "public void blockAdded(Respon...
[ "0.69278973", "0.67971665", "0.66271996", "0.65043986", "0.6190026", "0.6045663", "0.59852165", "0.5941486", "0.59331363", "0.5912236", "0.5903606", "0.58896714", "0.58722633", "0.58645976", "0.58579123", "0.58536804", "0.5818616", "0.5762305", "0.5745755", "0.5739067", "0.57...
0.58599156
14
Invoked when the wallet receives an output.
public void onOutputReceived(MoneroOutputWallet output);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onOutputSpent(MoneroOutputWallet output);", "@Override\r\n\tpublic void onOutput(OutputEvent arg0) {\n\t\toutput = arg0.getMsg();\r\n\t}", "void requestOutput();", "@Override\n public void emitOutput() {\n }", "public interface Outputable {\n void onOutput(String output, int id);\n}", ...
[ "0.81290716", "0.7259921", "0.6572832", "0.617585", "0.60078454", "0.5938554", "0.5815666", "0.57929355", "0.5788043", "0.57736796", "0.57376474", "0.5736882", "0.57247084", "0.57006854", "0.55638677", "0.5560585", "0.55462515", "0.55404645", "0.5488774", "0.54875094", "0.546...
0.84419733
0
Invoked when the wallet spends an output.
public void onOutputSpent(MoneroOutputWallet output);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onOutputReceived(MoneroOutputWallet output);", "@Override\r\n\tpublic void onOutput(OutputEvent arg0) {\n\t\toutput = arg0.getMsg();\r\n\t}", "@Override\n public void outputCompletedNotification(String scriptId, OutputStats outputStats) { }", "private synchronized void notifyCompletedOutput(Sect...
[ "0.71439016", "0.6370764", "0.6192337", "0.5818284", "0.57997316", "0.5727923", "0.57126206", "0.5712426", "0.57060266", "0.56639165", "0.5642707", "0.5638263", "0.55983883", "0.55922854", "0.55374855", "0.5488403", "0.548806", "0.54179686", "0.5403", "0.5396468", "0.5371703"...
0.7946988
0
Constructor of the class.
public FuldaGasStation() { gasPumpsList = new ArrayList<GasPump>(GAS_PUMPS_NUMBER); gasPricesList = new Hashtable<GasType, Double>(GAS_PUMPS_NUMBER); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public CyanSus() {\n\n }", "public PSRelation()\n {\n }", "private Instantiation(){}", "public _355() {\n\n }", "public CSSTidier() {\n\t}", "public Chick() {\n\t}", "public Curso() {\r\n }", "public Pitonyak_09_02()...
[ "0.86650574", "0.8431586", "0.75683993", "0.7532721", "0.7532043", "0.73285073", "0.7287848", "0.72743255", "0.72390366", "0.7220624", "0.71794575", "0.71720743", "0.71706283", "0.71544695", "0.7147451", "0.7140733", "0.71340513", "0.7126298", "0.7116482", "0.7107418", "0.710...
0.0
-1
Questo metodo ritorna l'attributo risultato di questa classe
public double getRisultato() { return risultato; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\npublic void setAttributes() {\n\t\n}", "@Override\n\tpublic void buildAttributes(JDefinedClass cls) {\n\n\t}", "private Attributes getAttributes()\r\n\t{\r\n\t return attributes;\r\n\t}", "protected FanisamBato(){\n\t}", "@Override\npublic void processAttributes() {\n\t\n}", "protected bool...
[ "0.664165", "0.65555155", "0.6379584", "0.62925476", "0.6284412", "0.62742597", "0.6238646", "0.62212104", "0.6207622", "0.6197483", "0.61705244", "0.6132325", "0.6072452", "0.6068912", "0.60606426", "0.6023707", "0.6018266", "0.60128975", "0.6010314", "0.6009803", "0.6002013...
0.0
-1
Questo metodo serve a settare un risultato
public void setRisultato(double risultato) { this.risultato = risultato; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n ...
[ "0.6607233", "0.64169097", "0.63750434", "0.6351558", "0.6309397", "0.62702733", "0.6259745", "0.6255115", "0.6248462", "0.623821", "0.62135124", "0.6213122", "0.62003684", "0.6198929", "0.6197902", "0.6196346", "0.6195505", "0.6170623", "0.61693406", "0.61689186", "0.6163117...
0.6031563
24
click the "button" input element created by link text
public GitHubSignInPage openSignInPage() { signInBtn = driver.findElement(By.linkText(SIGNIN_BTN_ID)); signInBtn.click(); System.out.println("Navigating to signin page..."); return new GitHubSignInPage(driver); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clickSearchButton() {\n\t\tsearchButton.click();\n\t}", "public void clickOnSearchButton() {\n elementControl.clickElement(searchButton);\n }", "public void buttonClick() {\n\t\tdriver.get(\"https://es.wikipedia.org\");\n\t\tWebElement input = driver.findElement(By.id(\"searchInput\"));\n...
[ "0.6897335", "0.6876201", "0.681394", "0.67838764", "0.6776661", "0.6776203", "0.6730092", "0.6583096", "0.6582906", "0.65759754", "0.655882", "0.6529681", "0.65230864", "0.6490348", "0.6481431", "0.64752966", "0.6457549", "0.6446951", "0.641914", "0.63869077", "0.63866127", ...
0.0
-1
Called when the activity is first created.
@Override public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView(R.layout.main); DatabaseManager.init(this); Button btnAddFoodItem = (Button) this.findViewById(R.id.btnAddFoodItem); btnAddFoodItem.setOnClickListener(new OnClickListener() { public void onClick(View v) { createItemFood("aa", 1, 1, 1); Toast.makeText(v.getContext(), "Put your message here", Toast.LENGTH_SHORT).show(); }; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n\tpublic void onActivit...
[ "0.791686", "0.77270156", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7693263", "0.7637394", "0.7637394", "0.7629958", "0.76189965", "0.76189965", "0.7543775", "0.7540053", "0.7540053", "0.7539505", "0.75269467", "0.75147736", "0.7509639", "0.7500879",...
0.0
-1
left 0,1,2,3 right 1,1,2,2 output 0,1,1,1,2,2,2,3
public static Iterator<Integer> mergeSortedIterators(Iterator<Integer> left, Iterator<Integer> right) { return }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected int left(int i ) { return 2 * i + 1; }", "boolean getLeftToRight();", "private static int LEFT(int i) {\n return (2 * i + 1);\n }", "protected static int left(int i){\n return 2*i+1;\n }", "private int left(int index) {\r\n\t\treturn 2 * index + 1;\r\n\t}", "private int left(int i...
[ "0.64853305", "0.6032289", "0.59677535", "0.59629923", "0.5938368", "0.59376454", "0.59231055", "0.59158653", "0.5868103", "0.58547854", "0.58394504", "0.57571125", "0.5696632", "0.56945944", "0.5674483", "0.56697685", "0.5628168", "0.5622696", "0.56147444", "0.5607298", "0.5...
0.0
-1
This method implements the treatment on the command parameter.
public abstract List<C_result> processJob(C_request processing_cmd);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic final void receiveCommand(Command cmd) {\n\t\tif (cmd.getCommand().equals(Constants.CMD_PARAMETER)) {\r\n\t\t\tString param = cmd.getParameter(\"NAME\");\r\n\t\t\tString value = cmd.getParameter(\"VALUE\");\r\n\t\t\tif (param != null && value != null && parameters.containsKey(param)) {\r\n\t\...
[ "0.6766129", "0.64232516", "0.63786966", "0.63711053", "0.6326269", "0.6236119", "0.6037176", "0.60339767", "0.59832084", "0.59726816", "0.5963611", "0.59564126", "0.59427375", "0.5848861", "0.58421946", "0.58296716", "0.5826103", "0.5825835", "0.58170694", "0.57880557", "0.5...
0.0
-1
String str = args[0].trim(); String pattern = args[1].trim(); String str = "abbbbbbbbbbc"; String pattern = "ab+c"; String str = "ad"; String pattern = "a."; String str = "mississippi"; String pattern = "misisp";
public static void main(String[] args){ String str = "aasdfasdfasdfasdfas"; String pattern = "aasdf.*asdf.*asdf.*asdf.*s"; // String str = "mississippi"; // String pattern = "mis*is*ip*."; // String pattern = "mis*is*p*."; // String pattern = "mis*is*ip*."; // String str = "aaaaaaaaaaaaac"; // String pattern = "a*a*a*a*a*a*a*a*a*a*c"; long time = System.currentTimeMillis(); // String str = "aaaaaaaaaaaaab"; // String pattern = "a*a*a*a*a*a*a*a*a*a*b"; System.out.println(find(str,pattern)); System.out.println("time: " + (System.currentTimeMillis() - time)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n//\n// String pattern = \"abba\";\n// String s = \"dog cat cat fish\";\n\n\n// String pattern = \"aaaa\";\n// String s = \"dog cat cat dog\";\n\n String pattern = \"abba\";\n String s = \"dog dog dog dog\";\n\n// String patt...
[ "0.7154042", "0.66495115", "0.6464463", "0.6364182", "0.6277701", "0.62623173", "0.6253313", "0.62248796", "0.6212736", "0.6201293", "0.6164633", "0.61604446", "0.61419606", "0.6100407", "0.6070936", "0.60619193", "0.6046126", "0.602972", "0.6000547", "0.5980257", "0.5972053"...
0.6374296
3
Only runs once for each fragment instance
public void init(String zip, Application app) { if(weatherModel!=null){ return; } //sets the original value to a banck weather model final MutableLiveData<WeatherModel> data = new MutableLiveData<>(); data.setValue(new WeatherModel("","","","","","","","")); weatherModel=data; //loads the model from the repo weatherModel = ((WeatherApp)app).getWeatherRepo().loadWeather(zip); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void onFragmentCreate(Bundle savedInstanceState) {\n\t}", "@Override\r\n\tpublic void onFragmentStart() {\n\t}", "private void initFragments() {\n\t\tZhiBoFragment zhiBoFragment = ZhiBoFragment.newInstance(null);\n\t\tzhiBoFragment.setSquareFragmentListener(this);\n\t\tLiaotianFragment li...
[ "0.7324346", "0.72191244", "0.68598425", "0.6800359", "0.6781711", "0.67660666", "0.6755189", "0.67237616", "0.6661624", "0.6631519", "0.6622242", "0.6584924", "0.6535912", "0.6500326", "0.6489556", "0.6480445", "0.6436489", "0.6436489", "0.6436489", "0.6436489", "0.6436489",...
0.0
-1
Accesor for the weather model to be observed
public LiveData<WeatherModel> getWeatherModel() { return this.weatherModel; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IWeather extends IOpenScenarioModelElement {\n /**\n * From OpenSCENARIO class model specification: Definition of the cloud state, i.e. cloud state\n * and sky visualization settings.\n *\n * @return value of model property cloudState\n */\n public CloudState getCloudState();\n /**\n ...
[ "0.6193021", "0.6163706", "0.57137793", "0.5650359", "0.5637892", "0.56226474", "0.56173074", "0.5615943", "0.5613683", "0.55472964", "0.5543028", "0.5494355", "0.5492152", "0.5445582", "0.5402668", "0.53745794", "0.536082", "0.5352008", "0.5346535", "0.53440833", "0.53326887...
0.5511881
11
/ Generates 1000 random users and tries to log in with them Should fail every time, barring the freak generation of a valid user/password
public void test_LoginToSystem1(){ for (int i=0; i < 5; i++) { User NewUser = InputGenerator.randomUser(); Login l = new Login(); l.LoginToSystem(NewUser.GetUserName(), InputGenerator.randomString()); assertFalse(l.GetSuccessfulLogin()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \r\n\tpublic void testMultipleLogins() throws Exception {\r\n\t\tHttpClientHelper.setGlobalConnectionTimeout(DefaultHttpClientSingleton.getInstance(), 100000);\r\n\t\tHttpClientHelper.setGlobalSocketTimeout(DefaultHttpClientSingleton.getInstance(), 100000);\r\n\t\tcreateUsers();\r\n\t\tfor (int i : new int[]...
[ "0.7356203", "0.6612306", "0.64761966", "0.633675", "0.62550414", "0.6155753", "0.607967", "0.605982", "0.602391", "0.59914804", "0.59541893", "0.59260637", "0.59119445", "0.5881824", "0.58610046", "0.58603966", "0.5859233", "0.58458686", "0.5808496", "0.5774466", "0.57702976...
0.66404855
1
/ Generates 1000 random users and tries to log in with them to uppercase Should fail every time, barring the freak generation of a valid user/password
public void test_LoginToSystem2(){ for (int i=0; i<5; i++) { Login l = new Login(); l.LoginToSystem("TBONCI", "TEST"); assertFalse(l.GetSuccessfulLogin()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \r\n\tpublic void testMultipleLogins() throws Exception {\r\n\t\tHttpClientHelper.setGlobalConnectionTimeout(DefaultHttpClientSingleton.getInstance(), 100000);\r\n\t\tHttpClientHelper.setGlobalSocketTimeout(DefaultHttpClientSingleton.getInstance(), 100000);\r\n\t\tcreateUsers();\r\n\t\tfor (int i : new int[]...
[ "0.6710664", "0.6567567", "0.6397844", "0.63435256", "0.6339731", "0.62986904", "0.6217885", "0.60863537", "0.6054971", "0.60527235", "0.6036648", "0.60012776", "0.5983497", "0.5981544", "0.59708893", "0.59704417", "0.5937748", "0.59176326", "0.59012383", "0.5901133", "0.5899...
0.0
-1
/ Generates 1000 random users and tries to log in with them to lowercase Should fail every time, barring the freak generation of a valid user/password
public void test_LoginToSystem3(){ for (int i=0; i<5; i++) { Login l = new Login(); l.LoginToSystem("tbonci", "TEST"); assertFalse(l.GetSuccessfulLogin()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test \r\n\tpublic void testMultipleLogins() throws Exception {\r\n\t\tHttpClientHelper.setGlobalConnectionTimeout(DefaultHttpClientSingleton.getInstance(), 100000);\r\n\t\tHttpClientHelper.setGlobalSocketTimeout(DefaultHttpClientSingleton.getInstance(), 100000);\r\n\t\tcreateUsers();\r\n\t\tfor (int i : new int[]...
[ "0.67524123", "0.65764326", "0.6439856", "0.6326729", "0.6254894", "0.62536204", "0.60825723", "0.60733193", "0.6062458", "0.6030047", "0.5972243", "0.5971272", "0.59563375", "0.5952549", "0.59360576", "0.5926754", "0.59139246", "0.59107983", "0.58402747", "0.5827952", "0.581...
0.5440492
77
/ Tests blank username
public void test_LoginToSystem5(){ Login l = new Login(); l.LoginToSystem("" , "test"); assertFalse(l.GetSuccessfulLogin()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isUserNameValid(String username) {\n if (username == null) {\n return false;\n } else {\n return !username.trim().isEmpty();\n }\n }", "@Test(expected = IllegalArgumentException.class)\n public void test_getByUsername_usernameEmpty() throws Excepti...
[ "0.8003357", "0.79209876", "0.7752843", "0.7633699", "0.7631604", "0.75336456", "0.74756384", "0.7458203", "0.74576324", "0.74409604", "0.7395754", "0.7395754", "0.7395754", "0.7395754", "0.7395754", "0.7395754", "0.7363788", "0.7353343", "0.73503786", "0.7340911", "0.7321268...
0.0
-1
/ Tests blank password
public void test_LoginToSystem6(){ Login l = new Login(); l.LoginToSystem("tbonci" , ""); assertFalse(l.GetSuccessfulLogin()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n\tpublic void testPassHashEmpty() {\n\t\tu.setPasswordPlain(\"temp\");\n\t\t\n\t\tString pass = \"\";\n\t\tu.setPasswordPlain(pass);\n\t\tassertFalse(u.getPassword().equals(\"\"));\n\t}", "private boolean isPasswordValid(String password) {\n return password.length() > 0;\r\n }", "@Override\r\n...
[ "0.8067909", "0.7853931", "0.7805471", "0.7664595", "0.75035703", "0.75035703", "0.75035703", "0.75035703", "0.75035703", "0.75035703", "0.75035703", "0.75035703", "0.7446381", "0.74408156", "0.7416378", "0.73940194", "0.73940194", "0.7329671", "0.7303711", "0.72782886", "0.7...
0.0
-1
/ Tests both blank
public void test_LoginToSystem7(){ Login l = new Login(); l.LoginToSystem("", ""); assertFalse(l.GetSuccessfulLogin()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean isBlank() throws Exception;", "boolean canMatchEmptyString() {\n return false;\n }", "public void testCheckOxyEmpty() {\n }", "@Test\n\tpublic void nonEmptyString() {\n\t\tString s = \" H \";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}...
[ "0.7100359", "0.69355124", "0.67141914", "0.67127794", "0.6708611", "0.66631377", "0.65991765", "0.6532585", "0.6501155", "0.6448338", "0.64177877", "0.6399589", "0.6396608", "0.6367513", "0.63583875", "0.6358059", "0.6350965", "0.63464254", "0.6318716", "0.6312287", "0.63122...
0.0
-1
/ Tests that should pass
public void test_LoginToSystem8() { Login l = new Login(); l.LoginToSystem("tbonci", "test"); assertTrue(l.GetSuccessfulLogin()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void testSanity() {\n\t}", "@Override\r\n\t\t\tpublic void test() {\n\t\t\t}", "@Test\n public void matchCorrect() {\n }", "@Test\r\n\t public void feelingLucky() {\r\n\t \t Assert.fail();\r\n\t Assert.fail();\r\n\t }", "@Test\n\tpublic void testTotalPuzzleGenerated(...
[ "0.6815015", "0.6800637", "0.677126", "0.67334384", "0.66882885", "0.6603923", "0.6536594", "0.6455563", "0.6439938", "0.643046", "0.6410897", "0.6410897", "0.63923246", "0.63921165", "0.6386901", "0.6382873", "0.63546383", "0.63477856", "0.6317676", "0.63126904", "0.63071847...
0.0
-1
Guess if the bot has just stopped
public boolean stopped() { if (change != null) { //Check if the bot's current speed is very low, and it wasn't before return (getVelocity() < 0.01 && change.getVelocity() > 0.01); } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isStopped();", "boolean isStopped();", "public boolean isStopped()\r\n\t{\r\n\t\treturn speed()==0;\r\n\t}", "boolean shouldStop();", "public boolean isStopped()\r\n\t{\r\n\t\treturn currentstate == TIMER_STOP;\r\n\t}", "boolean isStop();", "boolean hasStopped()\n {\n if (running && ...
[ "0.70932823", "0.70436645", "0.69097924", "0.6906491", "0.6888188", "0.6861246", "0.6679222", "0.663409", "0.65852857", "0.65612113", "0.65612113", "0.65589625", "0.65521204", "0.65492254", "0.6498674", "0.64358085", "0.6278959", "0.6241217", "0.62398535", "0.62389505", "0.62...
0.7202027
0
TODO this needs optimizing, an edge created in the transaction need not go to the db to load itself again
@Override protected void load() { //recordId can be null when in batchMode if (this.recordId != null && this.properties.isEmpty()) { this.sqlgGraph.tx().readWrite(); if (this.sqlgGraph.getSqlDialect().supportsBatchMode() && this.sqlgGraph.tx().getBatchManager().isStreaming()) { throw new IllegalStateException("streaming is in progress, first flush or commit before querying."); } //Generate the columns to prevent 'ERROR: cached plan must not change result type" error' //This happens when the schema changes after the statement is prepared. @SuppressWarnings("OptionalGetWithoutIsPresent") EdgeLabel edgeLabel = this.sqlgGraph.getTopology().getSchema(this.schema).orElseThrow(() -> new IllegalStateException(String.format("Schema %s not found", this.schema))).getEdgeLabel(this.table).orElseThrow(() -> new IllegalStateException(String.format("EdgeLabel %s not found", this.table))); StringBuilder sql = new StringBuilder("SELECT\n\t"); sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes("ID")); appendProperties(edgeLabel, sql); List<VertexLabel> outForeignKeys = new ArrayList<>(); for (VertexLabel vertexLabel : edgeLabel.getOutVertexLabels()) { outForeignKeys.add(vertexLabel); sql.append(", "); if (vertexLabel.hasIDPrimaryKey()) { String foreignKey = vertexLabel.getSchema().getName() + "." + vertexLabel.getName() + Topology.OUT_VERTEX_COLUMN_END; sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(foreignKey)); } else { int countIdentifier = 1; for (String identifier : vertexLabel.getIdentifiers()) { PropertyColumn propertyColumn = vertexLabel.getProperty(identifier).orElseThrow( () -> new IllegalStateException(String.format("identifier %s column must be a property", identifier)) ); PropertyType propertyType = propertyColumn.getPropertyType(); String[] propertyTypeToSqlDefinition = this.sqlgGraph.getSqlDialect().propertyTypeToSqlDefinition(propertyType); int count = 1; for (String ignored : propertyTypeToSqlDefinition) { if (count > 1) { sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + "." + identifier + propertyType.getPostFixes()[count - 2] + Topology.OUT_VERTEX_COLUMN_END)); } else { //The first column existVertexLabel no postfix sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + "." + identifier + Topology.OUT_VERTEX_COLUMN_END)); } if (count++ < propertyTypeToSqlDefinition.length) { sql.append(", "); } } if (countIdentifier++ < vertexLabel.getIdentifiers().size()) { sql.append(", "); } } } } List<VertexLabel> inForeignKeys = new ArrayList<>(); for (VertexLabel vertexLabel : edgeLabel.getInVertexLabels()) { sql.append(", "); inForeignKeys.add(vertexLabel); if (vertexLabel.hasIDPrimaryKey()) { String foreignKey = vertexLabel.getSchema().getName() + "." + vertexLabel.getName() + Topology.IN_VERTEX_COLUMN_END; sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(foreignKey)); } else { int countIdentifier = 1; for (String identifier : vertexLabel.getIdentifiers()) { PropertyColumn propertyColumn = vertexLabel.getProperty(identifier).orElseThrow( () -> new IllegalStateException(String.format("identifier %s column must be a property", identifier)) ); PropertyType propertyType = propertyColumn.getPropertyType(); String[] propertyTypeToSqlDefinition = this.sqlgGraph.getSqlDialect().propertyTypeToSqlDefinition(propertyType); int count = 1; for (String ignored : propertyTypeToSqlDefinition) { if (count > 1) { sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + "." + identifier + propertyType.getPostFixes()[count - 2] + Topology.IN_VERTEX_COLUMN_END)); } else { //The first column existVertexLabel no postfix sql.append(sqlgGraph.getSqlDialect().maybeWrapInQoutes(vertexLabel.getFullName() + "." + identifier + Topology.IN_VERTEX_COLUMN_END)); } if (count++ < propertyTypeToSqlDefinition.length) { sql.append(", "); } } if (countIdentifier++ < vertexLabel.getIdentifiers().size()) { sql.append(", "); } } } } sql.append("\nFROM\n\t"); sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(this.schema)); sql.append("."); sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(EDGE_PREFIX + this.table)); sql.append(" WHERE "); //noinspection Duplicates if (edgeLabel.hasIDPrimaryKey()) { sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes("ID")); sql.append(" = ?"); } else { int count = 1; for (String identifier : edgeLabel.getIdentifiers()) { sql.append(this.sqlgGraph.getSqlDialect().maybeWrapInQoutes(identifier)); sql.append(" = ?"); if (count++ < edgeLabel.getIdentifiers().size()) { sql.append(" AND "); } } } if (this.sqlgGraph.getSqlDialect().needsSemicolon()) { sql.append(";"); } Connection conn = this.sqlgGraph.tx().getConnection(); if (logger.isDebugEnabled()) { logger.debug(sql.toString()); } try (PreparedStatement preparedStatement = conn.prepareStatement(sql.toString())) { if (edgeLabel.hasIDPrimaryKey()) { preparedStatement.setLong(1, this.recordId.sequenceId()); } else { int count = 1; for (Comparable identifierValue : this.recordId.getIdentifiers()) { preparedStatement.setObject(count++, identifierValue); } } ResultSet resultSet = preparedStatement.executeQuery(); if (resultSet.next()) { loadResultSet(resultSet, inForeignKeys, outForeignKeys); } } catch (SQLException e) { throw new RuntimeException(e); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void switchRelations() throws TransactionAbortedException, DbException {\n // IMPLEMENT ME\n }", "public void loadEdge()\r\n {\r\n town.createConnection();\r\n }", "@Override\n\tpublic void joinTransaction() {\n\t\t\n\t}", "private void addArbitraryDataToDatabase() {\n\n ...
[ "0.6543859", "0.6454514", "0.55621576", "0.5548877", "0.55311406", "0.55185914", "0.5443653", "0.54140466", "0.5406228", "0.53663677", "0.5335599", "0.53207785", "0.53170687", "0.53052187", "0.5263385", "0.5242641", "0.523364", "0.52061725", "0.51783305", "0.515714", "0.51540...
0.58496195
2
The last two chars are not in cPCT_ENCODED_UNESCAPED. final String cPCT_ENCODED = "%45%46%47" + "%22" + "%5C"; final String cUNRESERVED = "ABCabc123._~"; final String cOTHER_DELIMS = "!()+,;"; final String cSUB_DELIMS = "$&'=" + cOTHER_DELIMS;
@Test public void delims() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String URLEncode (String sStr) {\r\n if (sStr==null) return null;\r\n\r\n int iLen = sStr.length();\r\n StringBuffer sEscaped = new StringBuffer(iLen+100);\r\n char c;\r\n for (int p=0; p<iLen; p++) {\r\n c = sStr.charAt(p);\r\n switch (c) {\r\n case ' ':\r\n sEscap...
[ "0.6193316", "0.5985661", "0.58263904", "0.5819938", "0.58014834", "0.5778617", "0.57430065", "0.5683512", "0.56610674", "0.56457967", "0.5599276", "0.5550223", "0.5536143", "0.5492561", "0.54727215", "0.546642", "0.5460837", "0.54506654", "0.5449355", "0.5445205", "0.5439961...
0.0
-1
The ManagementProcessorlevel wrapper object for a SessionManagementBean.
public interface SessionMXBean /*extends SessionManagementListener*/ { void close(); void closeImmediately(); ObjectName getObjectName(); long getId(); long getReadBytes(); double getReadBytesThroughput(); long getWrittenBytes(); double getWrittenBytesThroughput(); String getPrincipals(); long getCreateTime(); String getRemoteAddress(); String getSessionTypeName(); String getSessionDirection(); long getLastRoundTripLatency(); long getLastRoundTripLatencyTimestamp(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected GatheringSessionBean getinventory$GatheringSessionBean() {\n return (GatheringSessionBean) getBean(\"inventory$GatheringSessionBean\");\n }", "protected AccessionSessionBean getgermplasm$AccessionSessionBean() {\n return (AccessionSessionBean) getBean(\"germplasm$AccessionSessionBea...
[ "0.5507404", "0.53396165", "0.5063955", "0.50577927", "0.50325376", "0.4892964", "0.48679015", "0.48600534", "0.47931504", "0.47705418", "0.47634843", "0.47494605", "0.47443318", "0.47332364", "0.4725722", "0.47215825", "0.46968558", "0.46968558", "0.46878585", "0.4685131", "...
0.54211384
1
/ Set the Nimbus look and feel / If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel. For details see
public static void main(String args[]) { try { for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) { if ("Nimbus".equals(info.getName())) { javax.swing.UIManager.setLookAndFeel(info.getClassName()); break; } } } catch (ClassNotFoundException ex) { java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (InstantiationException ex) { java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (IllegalAccessException ex) { java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } catch (javax.swing.UnsupportedLookAndFeelException ex) { java.util.logging.Logger.getLogger(Calculator.class.getName()).log(java.util.logging.Level.SEVERE, null, ex); } //</editor-fold> //</editor-fold> //</editor-fold> //</editor-fold> /* Create and display the form */ java.awt.EventQueue.invokeLater(new Runnable() { public void run() { new Calculator().setVisible(true); } } ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void setLookAndFeel() {\n try {\n for (LookAndFeelInfo info : UIManager.getInstalledLookAndFeels()) {\n if (\"Nimbus\".equals(info.getName())) {\n UIManager.setLookAndFeel(info.getClassName());\n break;\n }\n ...
[ "0.7949842", "0.77695245", "0.7702217", "0.7505592", "0.7288192", "0.72294354", "0.72234964", "0.72215366", "0.71814275", "0.71575797", "0.7119326", "0.7112099", "0.70995355", "0.7061918", "0.70504636", "0.69139534", "0.6817144", "0.67054737", "0.66966176", "0.65856785", "0.6...
0.57723355
47
TODO Autogenerated method stub
@Override public void addResourceHandlers(ResourceHandlerRegistry registry) { registry.addResourceHandler("/photos/**").addResourceLocations("file:///c:/dev/study/temp2/") .setCacheControl(CacheControl.noCache()); // .setCacheControl(CacheControl.masAge(Duration.ofDays(1)); registry.addResourceHandler("/swagger-ui/**") .addResourceLocations("classpath:/META-INF/resources/webjars/springfox-swagger-ui/") .resourceChain(false); }
{ "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
For a mass of 12, divide by 3 and round down to get 4, then subtract 2 to get 2.
@Test void testPartA_Example1() { assertEquals(2, Day01.getFuelNeededForMass(12)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void Down4()\r\n {\r\n if(By2>0 && By2<900){\r\n \r\n By2+=2.5;\r\n }\r\n }", "public void Down3(){\r\n if(Hy2>0 && Hy2<900){\r\n \r\n Hy2+=3;\r\n }\r\n }", "public static void main(String[] args) {\n\r\n int cent = ...
[ "0.59073836", "0.58474183", "0.5821746", "0.56656265", "0.55312693", "0.54457027", "0.5443139", "0.54400593", "0.54344314", "0.5375328", "0.5364416", "0.5360202", "0.53526247", "0.5340233", "0.53025806", "0.5299065", "0.52943903", "0.5276613", "0.52705264", "0.5262772", "0.52...
0.0
-1
For a mass of 14, dividing by 3 and rounding down still yields 4, so the fuel required is also 2.
@Test void testPartA_Example2() { assertEquals(2, Day01.getFuelNeededForMass(14)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double fuelneeded(int miles) {\n\t\treturn (double) miles / mpg;\n\t}", "public double fuelneeded (int miles) {\n\t\treturn (double) miles / mpg;\n\t}", "public double getBurntFuelMass();", "@Override\n\tpublic double CalcularFuel() {\n\t\tdouble consumo=this.getCargaActual()*30+2*numEje;\n\t\treturn consumo...
[ "0.7122193", "0.6727341", "0.6701557", "0.6540733", "0.6302359", "0.62465423", "0.62186766", "0.6204114", "0.61062", "0.6050303", "0.5906897", "0.5872585", "0.585295", "0.58471805", "0.58242095", "0.5803638", "0.5795863", "0.57750213", "0.5756061", "0.57306015", "0.5722166", ...
0.0
-1