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
actions that can be taken on the page
public void insertEmailAdress (String emailAdress) { getEmailFieldForLogin().clear(); getEmailFieldForLogin().sendKeys(emailAdress); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public HomePageActions() {\n\t\tPageFactory.initElements(driver,HomePageObjects.class);\n\t}", "public void actionOffered();", "@Override\r\n\tpublic void action() {\n\t\t\r\n\t}", "@Override\n public void action() {\n }", "@Override\n public void action() {\n }"...
[ "0.639501", "0.63477844", "0.63468784", "0.62124836", "0.62124836", "0.62124836", "0.61579454", "0.6138766", "0.61174995", "0.6112968", "0.6092786", "0.60770816", "0.60270184", "0.60264194", "0.60181427", "0.60154384", "0.60094166", "0.6002767", "0.5984432", "0.59646785", "0....
0.0
-1
verification that the login function wasn't successful
public String textFromErrorLoginMessage () { return getErrorLoginMessage().getText(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "@Override\r\n\tpublic boolean checkLogin() {\n\t\treturn false;\r\n\t}", "public boolean loginCheck() {\n\t\tif(allParametersGiven==true) {\n\t\t\treturn dtb.checkLoginDetais(username,password);\n\t\t}\n\t\treturn false;\n\t}", "boolea...
[ "0.7466942", "0.7466942", "0.72751737", "0.72287583", "0.7179769", "0.7159749", "0.7159749", "0.7080823", "0.70679384", "0.7013599", "0.69911516", "0.69784504", "0.6965308", "0.6944275", "0.69399416", "0.69308627", "0.69268876", "0.6899427", "0.6880537", "0.6841815", "0.67978...
0.0
-1
A adapter for table.
public interface MyTableAdapter { public final static int IGNORE_ITEM_VIEW_TYPE = -1; public int getRowCount(); public int getColumnCount(); public View getView(int row, int column, View convertView, ViewGroup parent); public int getWidth(int column); public int getHeight(int row); public int getItemViewType(int row, int column); public int getViewTypeCount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Table getTable();", "public interface Table\n extends Tabular\n{\n /** @return the names of the columns in this table or an empty list if no columns have been defined, never null */\n List<String> getColumns();\n\n /**\n * Define the name of a column\n *\n * @param index the position in the header star...
[ "0.68618214", "0.67700803", "0.66125685", "0.6569817", "0.64878005", "0.6486409", "0.64660853", "0.6409886", "0.63641495", "0.63549465", "0.6334326", "0.63306767", "0.6321895", "0.62722915", "0.62619925", "0.62225014", "0.6149665", "0.6141678", "0.6106824", "0.6099912", "0.60...
0.64765865
6
/ vrne string v katerem so izdeleki ter njihova kolicina. format pa je " izdelek1 kolicina1, izdelek2 kolicina2."
public String vrniStanje() { String tmp; StringBuffer stanje = new StringBuffer(); for(Enumeration<String> en = izdelki.keys(); en.hasMoreElements(); ){ tmp = en.nextElement(); stanje.append(" "+tmp); stanje.append(" "+izdelki.get(tmp)+","); } if(stanje.length() == 0) return "."; stanje.replace(stanje.length()-1, stanje.length(), "."); return stanje.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rozseparujWytnijBialeZnaki() {\r\n\t\tString[] bufor;\r\n\t\tString[] tablicaWynik;\r\n\t\tint licznik;\r\n\t\tint m;\r\n\t\tfor (String s : calaZawartosc) {\r\n\t\t\tbufor = s.split(\"[\\\\s]+\");\r\n\t\t\tlicznik = 0;\r\n\r\n\t\t\tfor (int i = 0; i < bufor.length; ++i)\r\n\t\t\t\tif (!bufor[i].equals...
[ "0.6073625", "0.6026517", "0.6020089", "0.60175085", "0.592685", "0.5923973", "0.585585", "0.5844056", "0.57995725", "0.5793948", "0.5747885", "0.5710484", "0.5706906", "0.5643303", "0.56068295", "0.5606262", "0.55952525", "0.5545141", "0.55446506", "0.5521447", "0.5497688", ...
0.60241145
2
/ vrne stanje dolocenega izdelka vrnjena vrednsot je tipa int
public int vrniStanje(String izdelek) { if(izdelki.containsKey(izdelek)) return izdelki.get(izdelek); else return -1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int generujViacZvierat(int pocet){\r\n int poc = 0;\r\n for (int i = 0; i < pocet; i++) {\r\n if (zoo.pridajZivocicha(vytvorZivocicha())) poc++;\r\n }\r\n return poc;\r\n }", "public void calcularIndicePlasticidad(){\r\n\t\tindicePlasticidad = limiteLiquido - lim...
[ "0.68592924", "0.65470284", "0.6527247", "0.65038353", "0.647194", "0.64670223", "0.6389267", "0.6371431", "0.6322859", "0.63205576", "0.62829316", "0.6259358", "0.62459666", "0.622635", "0.6212705", "0.6212101", "0.6198633", "0.6189432", "0.61774176", "0.6169779", "0.6165731...
0.5875017
53
SELECT FROM teachplan WHERE courseid = '297e7c7c62b888f00162b8a7dec20000' AND parentid='0'
List<Teachplan> findByCourseidAndParentid(String courseId, String parentId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "courses selectByPrimaryKey(String courseId);", "TrainingCourse selectByPrimaryKey(String id);", "@Override\r\n\t//得到任一课程对应的教室ID\r\n\tpublic List<Integer> getAllClassroomIdOfCourse(int courseId) {\n\t\tsession = sessionFactory.openSession();\r\n\t\tTransaction tran = session.beginTransaction();\r\n\t\tString hq...
[ "0.5746028", "0.56486875", "0.5621496", "0.5361674", "0.5295231", "0.5276666", "0.519011", "0.51776856", "0.5174698", "0.50528514", "0.50320226", "0.502833", "0.49948984", "0.4989603", "0.49665314", "0.49634752", "0.49488983", "0.49310598", "0.4884001", "0.48755792", "0.48361...
0.7043119
0
The basic fragment support for showing a simple confirmation dialog.
private void simpleConfirmRequest(int title, int message, boolean showCancel){ // Set up the fragment. FragmentManager mgr = null; try { mgr = getActivity().getSupportFragmentManager(); } catch (Exception ex) { return; } Fragment fragment = mgr.findFragmentByTag(KY_SIMPLE_CONFIRM_FRAG); if (fragment != null) { // Clear out the previous use. mgr.beginTransaction().remove(fragment).commit(); } // Launch the confirmation. DialogFragment submitFrag = new SimpleConfirmDialog(title, message, !showCancel); submitFrag.show(mgr, KY_SIMPLE_CONFIRM_FRAG); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n FragmentManager fm = getFragmentManager();\n ConfirmDialogFragment cfDialog =\n ConfirmDialogFragment.getNewInstance(R.string.add_confirm, R.string.save_title);\n cfDialog.setTargetFragment(MemeViewFragment.this, REQUEST_CODE4);\n ...
[ "0.6874913", "0.6838749", "0.6707281", "0.6701889", "0.66649806", "0.65763587", "0.6569507", "0.65550125", "0.646672", "0.64109445", "0.6377511", "0.6373993", "0.6340292", "0.63222784", "0.63148814", "0.628865", "0.6238393", "0.62279624", "0.6203085", "0.61917883", "0.6190436...
0.7418264
0
Metoda zmieniajace wartosc punktow lojalnosciowych
@Override public void zmianaPkt(int wartosc){ this.pktLojalnosciowe+=wartosc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void ustawPojazdNaPoczatek()\n\t{\n\t\tSciezka pierwszaSc = droga.get(0);\n\t\tfinal double y = 10;\n\t\tpojazd.zmienPozycje(pierwszaSc.getCenterDownX(), y);\n\t}", "void zmniejszBieg();", "private static void cajas() {\n\t\t\n\t}", "public void stampaScacchiera(String titolo)\n {\n System.out.pri...
[ "0.63021535", "0.6014477", "0.6005863", "0.5956763", "0.5947557", "0.59008795", "0.58157927", "0.5788256", "0.5625043", "0.5590848", "0.554936", "0.5542358", "0.54420304", "0.5430563", "0.5430257", "0.5415945", "0.54126483", "0.54112107", "0.5382075", "0.53806525", "0.5375742...
0.54664195
12
Compute convex cell area.
private double convexCellArea(final Vertex start) { int n = 0; double sum = 0; // loop around the cell for (Edge e = start.getOutgoing(); n == 0 || e.getStart() != start; e = e.getEnd().getOutgoing()) { // find path interior angle at vertex final Vector3D previousPole = e.getCircle().getPole(); final Vector3D nextPole = e.getEnd().getOutgoing().getCircle().getPole(); final Vector3D point = e.getEnd().getLocation().getVector(); double alpha = FastMath.atan2(Vector3D.dotProduct(nextPole, Vector3D.crossProduct(point, previousPole)), -Vector3D.dotProduct(nextPole, previousPole)); if (alpha < 0) { alpha += MathUtils.TWO_PI; } sum += alpha; n++; } // compute area using extended Girard theorem // see Spherical Trigonometry: For the Use of Colleges and Schools by I. Todhunter // article 99 in chapter VIII Area Of a Spherical Triangle. Spherical Excess. // book available from project Gutenberg at http://www.gutenberg.org/ebooks/19770 return sum - (n - 2) * FastMath.PI; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static Double computeArea() {\n // Area is height x width\n Double area = height * width;\n return area;\n }", "public double computeArea() {\n\t\treturn 0;\n\t}", "@Override\n\tpublic double computeArea()\n\t{\n\t\treturn\n\t\t\t\tthis.length * this.width;\n\t}", "public double compu...
[ "0.70108575", "0.6690084", "0.66718197", "0.6636543", "0.6492774", "0.64762247", "0.64701664", "0.64336926", "0.6422298", "0.64117813", "0.64027226", "0.6390915", "0.6382849", "0.63286406", "0.6299959", "0.62878674", "0.6281425", "0.6275947", "0.6263243", "0.62446916", "0.621...
0.77217287
0
Compute convex cell barycenter.
private Vector3D convexCellBarycenter(final Vertex start) { int n = 0; Vector3D sumB = Vector3D.ZERO; // loop around the cell for (Edge e = start.getOutgoing(); n == 0 || e.getStart() != start; e = e.getEnd().getOutgoing()) { sumB = new Vector3D(1, sumB, e.getLength(), e.getCircle().getPole()); n++; } return sumB.normalize(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Cell Center(){\n double sum_x = 0;\r\n double sum_y = 0;\r\n \r\n for(int i = 0; i < this.edgeCells.size(); i++){\r\n sum_x = this.edgeCells.get(i).x;\r\n sum_y = this.edgeCells.get(i).y;\r\n }\r\n \r\n for(int i = 0; i < this.seedCells.size();...
[ "0.6790197", "0.66225475", "0.65561795", "0.6263677", "0.59904397", "0.5911994", "0.58923423", "0.58621645", "0.58391035", "0.5832288", "0.58314", "0.58308744", "0.58293355", "0.58026445", "0.579989", "0.574953", "0.57288826", "0.5727799", "0.5714965", "0.5702535", "0.5689959...
0.8008192
0
Get the points strictly inside convex cells.
public List<Vector3D> getConvexCellsInsidePoints() { return convexCellsInsidePoints; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Array<Point> allOuterPoints() {\r\n \tArray<Point> innerPoints = innerPiece.getPoints();\r\n Array<Point> outerPoints = new Array<Point>();\r\n for (Point inner : innerPoints) {\r\n outerPoints.add(toOuterPoint(inner));\r\n }\r\n return outerPoints;\r\n }", "pu...
[ "0.6968535", "0.64195144", "0.6138351", "0.60353833", "0.60237354", "0.5991297", "0.5934089", "0.5891848", "0.5858787", "0.5776714", "0.5773583", "0.5761727", "0.5740774", "0.5715585", "0.5704616", "0.56957126", "0.5653532", "0.56439674", "0.5623615", "0.5567137", "0.55606645...
0.80572104
0
enregistrement ou mise a jour !!!
public void saveDirecteur(Directeur directeur){ directeurRepos.save(directeur); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}", "@Override\n\tpublic void registrarSalida() {\n\t\t\n\t}", "@Override\n\tpublic void registrarSalida() {\n\n\t}", "@Override\n\tpublic void registrarLlegada() {\n\t\t\n\t}", "@Override\n\tpublic void registrarEntrada() {\n\n\t}", "@Override\n\tpub...
[ "0.75047606", "0.75047606", "0.7478363", "0.7099605", "0.70530057", "0.7002773", "0.6818976", "0.67925245", "0.6626938", "0.6596471", "0.65878624", "0.65567434", "0.65547144", "0.65224165", "0.6506305", "0.6502049", "0.6497018", "0.6487037", "0.64670324", "0.6453548", "0.6430...
0.0
-1
VARIAVEL CAMINHO IMAGEM CRIADA PARA GRAVAR E CARREGAR NA HORA DE PROCURAR OBRA
public AcervoCtrl(JPanel frmAcervo, JLabel imagem, JLabel lblStatus, JLabel lblValor, JComboBox<String> cbSetor, JComboBox<String> cbSetorT, JComboBox<String> cbStatus, JComboBox<String> cbStatusT, JComboBox<String> cbCategoria, JComboBox<String> cbObras, JComboBox<String> cbMaterial, JTextField nomeArtista, JTextField nomeObra, JTextField txtNovaObra, JFormattedTextField dataAquisicao, JEditorPane descricaoObra, JLabel msgGravar, JLabel msgVazio, JFormattedTextField txtValor, JButton btnPesqArtist, JButton btnNovoArtista, JButton btnEditarArtista, JButton btnNovaCategoria, JButton btnEditarCategoria, JButton btnNovoMaterial, JButton btnEditarMaterial, JButton btnNovoSetor, JButton btnEditarSetor, JButton btnNovoSetorT, JButton btnEditarSetorT, JTextField idObra, JButton btnGravar) { this.frmAcervo = frmAcervo; this.btnGravar = btnGravar; this.idObra = idObra; this.obras = new ArrayList<ObraMdl>(); this.imagem = imagem; this.lblValor = lblValor; this.nomeArtista = nomeArtista; this.txtNovaObra = txtNovaObra; this.lblStatus = lblStatus; this.nomeObra = nomeObra; this.dataAquisicao = dataAquisicao; this.edtDescricao = descricaoObra; this.cbMaterial = cbMaterial; this.cbObras = cbObras; this.cbCategoria = cbCategoria; this.cbSetor = cbSetor; this.cbSetorT = cbSetorT; this.cbStatus = cbStatus; this.cbStatusT = cbStatusT; this.btnPesqArtist = btnPesqArtist; this.btnNovoArtista = btnNovoArtista; this.btnEditarArtista = btnEditarArtista; this.btnNovaCategoria = btnNovaCategoria; this.btnEditarCategoria = btnEditarCategoria; this.btnNovoMaterial = btnNovoMaterial; this.btnEditarMaterial = btnEditarMaterial; this.btnNovoSetor = btnNovoSetor; this.btnEditarSetor = btnEditarSetor; this.btnNovoSetorT = btnNovoSetorT; this.btnEditarSetorT = btnEditarSetorT; this.txtValor = txtValor; this.msgGravar = msgGravar; this.msgVazio = msgVazio; this.caminhoImagem = ""; lerAcervo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void rellenaImagen()\n {\n rellenaDatos(\"1\",\"Samsung\", \"cv3\", \"blanco\" , \"50\", 1200,2);\n rellenaDatos(\"2\",\"Samsung\", \"cv5\", \"negro\" , \"30\", 600,5);\n }", "public void cambiarEstadoImagen(){\n ImageIcon respuesta=new ImageIcon();\n if(oportunidades==0)...
[ "0.69076514", "0.6514402", "0.6497707", "0.63678205", "0.61174077", "0.6099315", "0.60795975", "0.60763234", "0.60612273", "0.6016863", "0.5967179", "0.5917874", "0.58797383", "0.5875419", "0.58717996", "0.5855185", "0.5852358", "0.58369386", "0.5827458", "0.5800354", "0.5787...
0.0
-1
METODOS DE SUPORTE ///////////////////////////////////////////
public void copiaImg() { try { String tipo = caminhoImagem.replaceAll(".*\\.", ""); System.out.println(tipo); String l = caminhoImagem; String i = "../MASProject/imagens/" + idObra.getText() + "." + tipo; caminhoImagem = i; @SuppressWarnings("resource") FileInputStream fisDe = new FileInputStream(l); @SuppressWarnings("resource") FileOutputStream fisPara = new FileOutputStream(i); FileChannel fcPara = fisDe.getChannel(); FileChannel fcDe = fisPara.getChannel(); if (fcPara.transferTo(0, fcPara.size(), fcDe) == 0L) { fcPara.close(); fcDe.close(); } } catch (Exception e) { JOptionPane.showMessageDialog(null, e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void tires() ...
[ "0.64939", "0.64902234", "0.6448907", "0.64373016", "0.6363212", "0.63387406", "0.63275474", "0.6285016", "0.62502384", "0.6243006", "0.62274", "0.62274", "0.62245536", "0.62121534", "0.6210023", "0.6157671", "0.6130622", "0.61241585", "0.61191463", "0.60736847", "0.6061936",...
0.0
-1
ALTEREI O NOME pesquisarArtistaEditar POR editarArtista pAController = new ArtistaPesqCtrl(btnEditarArtista, dataAquisicao, cbCategoria);
public void editarArtista() { ArrayList<String> listString = new ArrayList<>(); ArrayList<ArtistaMdl> listArtista = new ArrayList<>(); String[] possibilities = pAController.getArtista(); for (String s : possibilities) { String text = s.replaceAll(".*:", ""); listString.add(text); if (s.contains("---")) { ArtistaMdl artista = new ArtistaMdl(); artista.setNome(listString.get(1)); listArtista.add(artista); listString.clear(); } } String[] possibilities2 = new String[listArtista.size()]; for (int i = 0; i < listArtista.size(); i++) { possibilities2[i] = listArtista.get(i).getNome(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public AcervoCtrl(JPanel frmAcervo, JLabel imagem, JLabel lblStatus, JLabel lblValor, JComboBox<String> cbSetor,\r\n\t\t\tJComboBox<String> cbSetorT, JComboBox<String> cbStatus, JComboBox<String> cbStatusT,\r\n\t\t\tJComboBox<String> cbCategoria, JComboBox<String> cbObras, JComboBox<String> cbMaterial,\r\n\t\t\tJT...
[ "0.65459615", "0.6412728", "0.6374657", "0.608884", "0.60808367", "0.6007776", "0.59655875", "0.5962713", "0.59536016", "0.5942426", "0.5935851", "0.59342986", "0.59334165", "0.5931602", "0.58993363", "0.5864538", "0.5852293", "0.5842495", "0.57865196", "0.5781168", "0.577552...
0.60197806
5
ABRE UM JOptionPane COM UMA ComboBox VITOR
public void pesquisarArtista() { pAController = new ArtistaCtrl(); Object[] possibilities = pAController.getArtista(); String s = (String) JOptionPane.showInputDialog(frmAcervo, "Escolha o artista:\n", "Pesquisar o Artista", JOptionPane.INFORMATION_MESSAGE, null, possibilities, possibilities[0]); if (s != null && s.length() > 0) { nomeArtista.setText(s); artistaNome = s; return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void displayComboBox() {\n openingLine = new JLabel(\"Select \" + type + \":\");\n window = new JFrame(frameTitle);\n chooseBox = new JComboBox(range);\n chooseBox.addActionListener(this);\n window.setVisible(true);\n window.setLayout(new BoxLayout(window.getCont...
[ "0.7384198", "0.7049507", "0.6835917", "0.68312067", "0.6784563", "0.66836697", "0.66785115", "0.6668813", "0.66625935", "0.6660611", "0.6656049", "0.66452706", "0.663445", "0.66089845", "0.6582725", "0.6573971", "0.65687615", "0.65239006", "0.651212", "0.65049106", "0.649439...
0.0
-1
CHAMADA DE TELA ////////////////////////////////////////////
@SuppressWarnings("static-access") private void abrirTelaNovoArtista() { FrmArtistaCad newArtista = new FrmArtistaCad(); newArtista.setVisible(true); newArtista.setDefaultCloseOperation(newArtista.DISPOSE_ON_CLOSE); newArtista.setResizable(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void cajas() {\n\t\t\n\t}", "Petunia() {\r\n\t\t}", "String getCADENA_TRAMA();", "private DittaAutonoleggio(){\n \n }", "private UsineJoueur() {}", "@Override public String getMasa(){\n return \"gruesa \";\n }", "public void leerAlimentos();", "void kiemTraThangHopLi(...
[ "0.6434902", "0.6406354", "0.62130445", "0.61277884", "0.61216563", "0.6115799", "0.60209507", "0.6020176", "0.59813356", "0.59578943", "0.5950668", "0.59328914", "0.5897237", "0.58962333", "0.58763635", "0.58571005", "0.5856177", "0.57933515", "0.5785315", "0.57835907", "0.5...
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { System.exit(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void actionPerformed(ActionEvent e) { FrmCategoriaEdit frame = new FrmCategoriaEdit(); frame.setVisible(true); frame.setLocation(0,0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Created by yule on 2016/4/29.
public interface OnListFragmentInteractionListener { void onListFragmentInteraction(DummyContent.DummyItem item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.6243957", "0.62052846", "0.6064328", "0.603671", "0.5978947", "0.5978947", "0.59761715", "0.59683233", "0.59212697", "0.585688", "0.58524334", "0.5849205", "0.581734", "0.5814225", "0.58049953", "0.57922465", "0.5790412", "0.57712847", "0.57638556", "0.5760652", "0.5753060...
0.0
-1
/ Gets all the public, protected, default (package) access, and private fields, including inherited fields, that have desired annotations.
static boolean includeFieldAnnotations( AnnotationToXML atx, TypeDeclaration typeDecl, String additionalAnnotation ) { boolean hasFieldAnnotations = false; if (! (typeDecl instanceof ClassDeclaration)) { return hasFieldAnnotations; } ClassDeclaration jclass = (ClassDeclaration) typeDecl; FieldDeclaration[] fields = jclass.getFields(); for (int i = 0; i < fields.length; i++) { AnnotationInstance fieldAnnotation = CompilerUtils.getAnnotation(fields[i], JpfLanguageConstants.SHARED_FLOW_FIELD_TAG_NAME); if (fieldAnnotation == null) { fieldAnnotation = CompilerUtils.getAnnotationFullyQualified(fields[i], CONTROL_ANNOTATION); } if (fieldAnnotation == null && additionalAnnotation != null) { fieldAnnotation = CompilerUtils.getAnnotation(fields[i], additionalAnnotation); } if (fieldAnnotation != null) { atx.include(fields[i], fieldAnnotation); hasFieldAnnotations = true; } } ClassType superclass = jclass.getSuperclass(); boolean superclassHasFieldAnns = false; if (superclass != null) { superclassHasFieldAnns = includeFieldAnnotations(atx, CompilerUtils.getDeclaration(superclass), additionalAnnotation); } return hasFieldAnnotations || superclassHasFieldAnns; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<ResolvedFieldDeclaration> getAllFieldsVisibleToInheritors() {\n List<ResolvedFieldDeclaration> res = new LinkedList<>(this.getDeclaredFields().stream().filter(f -> f.accessSpecifier() != AccessSpecifier.PRIVATE).collect(Collectors.toList()));\n getDirectAncestors().forEach(a -> res.addAll...
[ "0.71073896", "0.7094157", "0.70419425", "0.6937597", "0.6588856", "0.65548503", "0.6553958", "0.64990133", "0.6146606", "0.61386245", "0.61070216", "0.6085259", "0.6067051", "0.6059554", "0.60223985", "0.59896743", "0.5984462", "0.59616905", "0.5958796", "0.59452516", "0.593...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { printletter c = new printletter(); c.Letter(); }
{ "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
================================================================================================================== Inner class ================================================================================================================== =================================================================================================== NewConversation ===================================================================================================
public static interface NewConversationOrBuilder extends MessageLiteOrBuilder { public abstract ClientConversation getClientConversation(); public abstract String getSenderId(); public abstract Data.StubbyInfo getStubbyInfo(); public abstract boolean hasClientConversation(); public abstract boolean hasSenderId(); public abstract boolean hasStubbyInfo(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Conversation newConversation(Uuid id, String title, Uuid owner, Time creationTime);", "public Conversation() {}", "private Conversation()\n {\n }", "void createConversation(@NonNull final ConversationCreate request, @Nullable Callback<ComapiResult<ConversationDetails>> callback);", "private void crea...
[ "0.78586197", "0.77322245", "0.73766243", "0.7206148", "0.67644906", "0.67436516", "0.67264956", "0.67092216", "0.67072845", "0.6573619", "0.63946813", "0.62670416", "0.62418777", "0.6122179", "0.60914844", "0.6082742", "0.6036396", "0.59518987", "0.5944448", "0.59202415", "0...
0.69558305
4
================================================================================================== BunchCommand ================================================================================================= ================================================================================================== BunchCommand ==================================================================================================
public static interface BunchCommandOrBuilder extends MessageLiteOrBuilder { public abstract ChatMessage getChatMessage(); public abstract ChatMessageRequest getChatMessageRequest(); public abstract ChatMessageResponse getChatMessageResponse(); public abstract ConversationJoinRequest getConversationJoinRequest(); public abstract ConversationJoinResponse getConversationJoinResponse(); public abstract ConversationListRequest getConversationListRequest(); public abstract ConversationListResponse getConversationListResponse(); public abstract ConversationPreferenceRequest getConversationPreferenceRequest(); public abstract ConversationPreferenceResponse getConversationPreferenceResponse(); public abstract ConversationRenameRequest getConversationRenameRequest(); public abstract ConversationRenameResponse getConversationRenameResponse(); public abstract NewConversationRequest getConversationRequest(); public abstract NewConversationResponse getConversationResponse(); public abstract ConversationSearchRequest getConversationSearchRequest(); public abstract ConversationSearchResponse getConversationSearchResponse(); public abstract DeviceRegistrationRequest getDeviceRegistrationRequest(); public abstract DeviceRegistrationResponse getDeviceRegistrationResponse(); public abstract Error getError(); public abstract EventSearchRequest getEventSearchRequest(); public abstract EventSearchResponse getEventSearchResponse(); public abstract EventStreamResponse getEventSteamResponse(); public abstract EventStreamRequest getEventStreamRequest(); public abstract GlobalConversationPreferencesRequest getGlobalConversationPreferencesRequest(); public abstract GlobalConversationPreferencesResponse getGlobalConversationPreferencesResponse(); public abstract GroupConversationRename getGroupConversationRename(); public abstract HangoutInviteFinishRequest getHangoutInviteFinishRequest(); public abstract HangoutInviteFinishResponse getHangoutInviteFinishResponse(); public abstract HangoutInviteKeepAliveRequest getHangoutInviteKeepAliveRequest(); public abstract HangoutInviteKeepAliveResponse getHangoutInviteKeepAliveResponse(); public abstract HangoutInviteReplyRequest getHangoutInviteReplyRequest(); public abstract HangoutInviteReplyResponse getHangoutInviteReplyResponse(); public abstract HangoutInviteRequest getHangoutInviteRequest(); public abstract HangoutInviteResponse getHangoutInviteResponse(); public abstract HangoutRingFinishRequest getHangoutRingFinishRequest(); public abstract HangoutRingFinishResponse getHangoutRingFinishResponse(); public abstract InvalidateLocalCache getInvalidateLocalCache(); public abstract InviteRequest getInviteRequest(); public abstract InviteResponse getInviteResponse(); public abstract LeaveConversationRequest getLeaveConversationRequest(); public abstract LeaveConversationResponse getLeaveConversationResponse(); public abstract MembershipChange getMembershipChange(); public abstract Migration getMigration(); public abstract PingRequest getPingRequest(); public abstract PingResponse getPingResponse(); public abstract Presence getPresence(); public abstract PresenceRequest getPresenceRequest(); public abstract PresenceResponse getPresenceResponse(); public abstract Receipt getReceipt(); public abstract ReceiptRequest getReceiptRequest(); public abstract ReceiptResponse getReceiptResponse(); public abstract ReplyToInviteRequest getReplyToInviteRequest(); public abstract ReplyToInviteResponse getReplyToInviteResponse(); public abstract String getRequestClientId(); public abstract SetAclsRequest getSetAclsRequest(); public abstract SetAclsResponse getSetAclsResponse(); public abstract SuggestionsRequest getSuggestionsRequest(); public abstract SuggestionsResponse getSuggestionsResponse(); public abstract TileEvent getTileEvent(); public abstract TileEventRequest getTileEventRequest(); public abstract TileEventResponse getTileEventResponse(); public abstract Typing getTyping(); public abstract TypingRequest getTypingRequest(); public abstract TypingResponse getTypingResponse(); public abstract UserCreationRequest getUserCreationRequest(); public abstract UserCreationResponse getUserCreationResponse(); public abstract UserInfoRequest getUserInfoRequest(); public abstract UserInfoResponse getUserInfoResponse(); public abstract boolean hasChatMessage(); public abstract boolean hasChatMessageRequest(); public abstract boolean hasChatMessageResponse(); public abstract boolean hasConversationJoinRequest(); public abstract boolean hasConversationJoinResponse(); public abstract boolean hasConversationListRequest(); public abstract boolean hasConversationListResponse(); public abstract boolean hasConversationPreferenceRequest(); public abstract boolean hasConversationPreferenceResponse(); public abstract boolean hasConversationRenameRequest(); public abstract boolean hasConversationRenameResponse(); public abstract boolean hasConversationRequest(); public abstract boolean hasConversationResponse(); public abstract boolean hasConversationSearchRequest(); public abstract boolean hasConversationSearchResponse(); public abstract boolean hasDeviceRegistrationRequest(); public abstract boolean hasDeviceRegistrationResponse(); public abstract boolean hasError(); public abstract boolean hasEventSearchRequest(); public abstract boolean hasEventSearchResponse(); public abstract boolean hasEventSteamResponse(); public abstract boolean hasEventStreamRequest(); public abstract boolean hasGlobalConversationPreferencesRequest(); public abstract boolean hasGlobalConversationPreferencesResponse(); public abstract boolean hasGroupConversationRename(); public abstract boolean hasHangoutInviteFinishRequest(); public abstract boolean hasHangoutInviteFinishResponse(); public abstract boolean hasHangoutInviteKeepAliveRequest(); public abstract boolean hasHangoutInviteKeepAliveResponse(); public abstract boolean hasHangoutInviteReplyRequest(); public abstract boolean hasHangoutInviteReplyResponse(); public abstract boolean hasHangoutInviteRequest(); public abstract boolean hasHangoutInviteResponse(); public abstract boolean hasHangoutRingFinishRequest(); public abstract boolean hasHangoutRingFinishResponse(); public abstract boolean hasInvalidateLocalCache(); public abstract boolean hasInviteRequest(); public abstract boolean hasInviteResponse(); public abstract boolean hasLeaveConversationRequest(); public abstract boolean hasLeaveConversationResponse(); public abstract boolean hasMembershipChange(); public abstract boolean hasMigration(); public abstract boolean hasPingRequest(); public abstract boolean hasPingResponse(); public abstract boolean hasPresence(); public abstract boolean hasPresenceRequest(); public abstract boolean hasPresenceResponse(); public abstract boolean hasReceipt(); public abstract boolean hasReceiptRequest(); public abstract boolean hasReceiptResponse(); public abstract boolean hasReplyToInviteRequest(); public abstract boolean hasReplyToInviteResponse(); public abstract boolean hasRequestClientId(); public abstract boolean hasSetAclsRequest(); public abstract boolean hasSetAclsResponse(); public abstract boolean hasSuggestionsRequest(); public abstract boolean hasSuggestionsResponse(); public abstract boolean hasTileEvent(); public abstract boolean hasTileEventRequest(); public abstract boolean hasTileEventResponse(); public abstract boolean hasTyping(); public abstract boolean hasTypingRequest(); public abstract boolean hasTypingResponse(); public abstract boolean hasUserCreationRequest(); public abstract boolean hasUserCreationResponse(); public abstract boolean hasUserInfoRequest(); public abstract boolean hasUserInfoResponse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private CommandBrocker() {}", "private void registerCommands() {\n CommandSpec showBanpoints = CommandSpec.builder().permission(\"dtpunishment.banpoints.show\")\r\n .description(Text.of(\"Show how many Banpoints the specified player has \"))\r\n .arguments(GenericArguments.on...
[ "0.5983905", "0.5794614", "0.56812394", "0.56486964", "0.56163263", "0.56163263", "0.56163263", "0.5568752", "0.55606496", "0.55443823", "0.5533999", "0.5502972", "0.5483422", "0.5476297", "0.5434281", "0.5428378", "0.5418505", "0.5413596", "0.54109573", "0.5408819", "0.54088...
0.0
-1
Constructor of Origin point
public Origin(int north, int south, int east, int west){ this.north = north; this.south = south; this.east = east; this.west = west; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrigin(Point p) {\n origin = new Point(p);\n }", "protected Coord() {\n\t}", "public Point getOrigin() {\n return origin;\n }", "public Coordenada() {\n }", "@Override\n public Point getOrigin() {\n return origin;\n }", "Point() {\n this.x = 0;\n this....
[ "0.72078353", "0.71034867", "0.7088675", "0.7052752", "0.70393574", "0.697466", "0.6961301", "0.69064325", "0.6906381", "0.6885856", "0.68711156", "0.6864933", "0.6846322", "0.6845847", "0.6807385", "0.6786426", "0.6780854", "0.67456055", "0.67433584", "0.6740899", "0.6738422...
0.7310702
0
Getters for origin point
public int getNorth() { return north; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Point getOrigin() {\n return origin;\n }", "@Override\n public Point getOrigin() {\n return origin;\n }", "public Point2D getOrigin() {\r\n return new Point2D.Double(originX, originY);\r\n }", "@Override\n\tpublic double[] getOrigin()\n\t{\n\t\tdouble origin[] = new double[]...
[ "0.8839281", "0.8724494", "0.826249", "0.82059544", "0.81950206", "0.7951415", "0.79261637", "0.7788075", "0.7783152", "0.7765757", "0.7761624", "0.77072895", "0.76452434", "0.76408607", "0.762224", "0.75966835", "0.7584827", "0.7564411", "0.7556307", "0.750456", "0.74741", ...
0.0
-1
Setters for origin point
public void setNorth(int north) { this.north = north; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrigin(Point origin) {\n setOrigin(origin.x, origin.y);\n }", "public void setOrigin(Point p) {\n origin = new Point(p);\n }", "abstract void setOrigin(double x, double y, double z);", "@Override\n public Point getOrigin() {\n return origin;\n }", "private void set...
[ "0.84062785", "0.8269789", "0.7946463", "0.78611916", "0.7859964", "0.784232", "0.7764145", "0.77529997", "0.7564555", "0.7561319", "0.75214547", "0.7469802", "0.74422467", "0.7391678", "0.73235965", "0.7279566", "0.7194102", "0.7187154", "0.7004988", "0.6965821", "0.6953444"...
0.0
-1
This method is responsible to get all the transactions list from backend data stream/API and provide the result to the controller layer
public List<HCLFieldTransaction> getAllTransactionListService() throws JsonProcessingException, MalformedURLException, IOException { logger.info("Logger Name: getAllTransactionListService() :: " + logger.getName()); ObjectMapper mapper = new ObjectMapper(); logger.info("Open Bank API URL :: getTotalAmountbyTransactionType() :: " + TransactionConstant.THIRD_PARTY_REST_API); JsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API)); List<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>(); /* Traversing Nested JSON node to publish the relevant data */ try { JsonNode transactionsNodes = root.path("transactions"); for (JsonNode transactionsNode : transactionsNodes) { HCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction(); hclFieldTransaction.setId(transactionsNode.path("id").asText()); JsonNode thisAccount_Node = transactionsNode.path("this_account"); hclFieldTransaction.setAccountId(thisAccount_Node.path("id").asText()); JsonNode otherAccount_Node = transactionsNode.path("other_account"); hclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path("number").asText()); JsonNode otherAccount_holder_Node = otherAccount_Node.path("holder"); hclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path("name").asText()); JsonNode metadata = otherAccount_Node.path("metadata"); hclFieldTransaction.setCounterPartyLogoPath(metadata.path("open_corporates_URL").asText()); JsonNode details = transactionsNode.path("details"); hclFieldTransaction.setTransactionType(details.path("type").asText()); hclFieldTransaction.setDescription(details.path("description").asText()); JsonNode value = details.path("value"); hclFieldTransaction.setInstructedAmount(value.path("amount").asDouble()); hclFieldTransaction.setInstructedCurrency(value.path("currency").asText()); hclFieldTransaction.setTransactionAmount(value.path("amount").asDouble()); hclFieldTransaction.setTransactionCurrency(value.path("currency").asText()); logger.debug("Transaction Field Row Value:: " + hclFieldTransaction.toString()); /* Adding all transaction list into one ArrayList */ transactionList.add(hclFieldTransaction); } } catch (Exception e) { logger.error("Exception : getAllTransactionListService() :: ", e); } logger.info( "Return value from service layer :: getAllTransactionListService() :: " + transactionList.toString()); return transactionList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/rest\")\n\t\tpublic @ResponseBody List<Transaction> transactionsListRest() {\n\t\t\tUserDetails user = (UserDetails) SecurityContextHolder.getContext()\n\t\t\t\t\t.getAuthentication().getPrincipal();\n\t\t\tString username = user.getUsername();\n\t\t\tUser currentUser = userRepo.findByUsername(usern...
[ "0.72661763", "0.6981378", "0.6976167", "0.6945337", "0.6943688", "0.6889564", "0.68217736", "0.67872393", "0.662096", "0.65848255", "0.6555383", "0.6537089", "0.6511523", "0.6496055", "0.6488385", "0.64223766", "0.63317794", "0.63209325", "0.63013786", "0.6295239", "0.624705...
0.64772683
15
This method is responsible to get all the transactions list by transactionType from backend data stream/API and provide the result to the controller layer
public List<HCLFieldTransaction> getTransactionbyType(String transactionType) throws JsonProcessingException, IOException { logger.info("Logger Name: getTransactionbyType() :: " + logger.getName()); logger.debug("Transaction Type : getTransactionbyType() :: " + transactionType); ObjectMapper mapper = new ObjectMapper(); logger.info("Open Bank API URL :: getTotalAmountbyTransactionType() :: " + TransactionConstant.THIRD_PARTY_REST_API); JsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API)); List<HCLFieldTransaction> transactionList = new ArrayList<HCLFieldTransaction>(); /* Traversing Nested JSON node to publish the relevant data */ try { JsonNode transactionsNodes = root.path("transactions"); for (JsonNode transactionsNode : transactionsNodes) { HCLFieldTransaction hclFieldTransaction = new HCLFieldTransaction(); JsonNode details = transactionsNode.path("details"); hclFieldTransaction.setTransactionType(details.path("type").asText()); /* When transactionType is null or empty */ if (transactionType == null && details.path("type").isNull() == true) { hclFieldTransaction.setId(transactionsNode.path("id").asText()); JsonNode thisAccount_Node = transactionsNode.path("this_account"); hclFieldTransaction.setAccountId(thisAccount_Node.path("id").asText()); JsonNode otherAccount_Node = transactionsNode.path("other_account"); hclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path("number").asText()); JsonNode otherAccount_holder_Node = otherAccount_Node.path("holder"); hclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path("name").asText()); JsonNode metadata = otherAccount_Node.path("metadata"); hclFieldTransaction.setCounterPartyLogoPath(metadata.path("open_corporates_URL").asText()); hclFieldTransaction.setTransactionType(details.path("type").asText()); hclFieldTransaction.setDescription(details.path("description").asText()); JsonNode value = details.path("value"); hclFieldTransaction.setInstructedAmount(value.path("amount").asDouble()); hclFieldTransaction.setInstructedCurrency(value.path("currency").asText()); hclFieldTransaction.setTransactionAmount(value.path("amount").asDouble()); hclFieldTransaction.setTransactionCurrency(value.path("currency").asText()); logger.debug("Transaction Field Row Value:: " + hclFieldTransaction.toString()); /* Adding specific type of transaction list into one ArrayList */ transactionList.add(hclFieldTransaction); } /* When transactionType is not null or empty */ else if (transactionType != null) { if (hclFieldTransaction.getTransactionType().equalsIgnoreCase(transactionType.trim())) { logger.debug("Transaction Type :: " + transactionType); hclFieldTransaction.setId(transactionsNode.path("id").asText()); JsonNode thisAccount_Node = transactionsNode.path("this_account"); hclFieldTransaction.setAccountId(thisAccount_Node.path("id").asText()); JsonNode otherAccount_Node = transactionsNode.path("other_account"); hclFieldTransaction.setCounterpartyAccount(otherAccount_Node.path("number").asText()); JsonNode otherAccount_holder_Node = otherAccount_Node.path("holder"); hclFieldTransaction.setCounterpartyName(otherAccount_holder_Node.path("name").asText()); JsonNode metadata = otherAccount_Node.path("metadata"); hclFieldTransaction.setCounterPartyLogoPath(metadata.path("open_corporates_URL").asText()); hclFieldTransaction.setTransactionType(details.path("type").asText()); hclFieldTransaction.setDescription(details.path("description").asText()); JsonNode value = details.path("value"); hclFieldTransaction.setInstructedAmount(value.path("amount").asDouble()); hclFieldTransaction.setInstructedCurrency(value.path("currency").asText()); hclFieldTransaction.setTransactionAmount(value.path("amount").asDouble()); hclFieldTransaction.setTransactionCurrency(value.path("currency").asText()); logger.debug("Transaction Field Row Value:: " + hclFieldTransaction.toString()); /* Adding specific type of transaction list into one ArrayList */ transactionList.add(hclFieldTransaction); } } } } catch (Exception e) { logger.error("Exception : getTransactionbyType() :: ", e); } logger.info("Return value from service layer:: getTransactionbyType() :: " + transactionList.toString()); return transactionList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<HCLFieldTransaction> getAllTransactionListService()\r\n\t\t\tthrows JsonProcessingException, MalformedURLException, IOException {\r\n\t\tlogger.info(\"Logger Name: getAllTransactionListService() :: \" + logger.getName());\r\n\t\tObjectMapper mapper = new ObjectMapper();\r\n\r\n\t\tlogger.info(\"Open Ba...
[ "0.67073286", "0.66176033", "0.6542548", "0.6410861", "0.6388323", "0.636887", "0.63390815", "0.6303972", "0.6288421", "0.6262967", "0.6241935", "0.6240533", "0.62192833", "0.61758226", "0.61365575", "0.6124728", "0.6107017", "0.60562027", "0.60506725", "0.59482104", "0.59361...
0.6879939
0
This method is responsible to get all the total amount by transactionType from backend data stream/API and provide the result to the controller layer
public Double getTotalAmountbyTransactionType(String transactionType) throws JsonProcessingException, IOException { logger.info("Logger Name: getTotalAmountbyTransactionType() :: " + logger.getName()); logger.debug("Transaction Type : getTotalAmountbyTransactionType() :: " + transactionType); ObjectMapper mapper = new ObjectMapper(); Double totalAmount = 0.00; logger.info("Open Bank API URL :: getTotalAmountbyTransactionType() :: " + TransactionConstant.THIRD_PARTY_REST_API); JsonNode root = mapper.readTree(new URL(TransactionConstant.THIRD_PARTY_REST_API)); /* Traversing Nested JSON node to get/add the total amount */ try { JsonNode transactionsNodes = root.path("transactions"); for (JsonNode transactionsNode : transactionsNodes) { JsonNode details = transactionsNode.path("details"); /* When transactionType is null or empty */ if (transactionType == null && details.path("type").isNull() == true) { JsonNode value = details.path("value"); Double tempAmount = value.path("amount").asDouble(); totalAmount = totalAmount + tempAmount; } /* When transactionType is not null or empty */ else if (transactionType != null) { if ((details.path("type").asText()).equalsIgnoreCase(transactionType.trim())) { JsonNode value = details.path("value"); Double tempAmount = value.path("amount").asDouble(); totalAmount = totalAmount + tempAmount; } } } } catch (Exception e) { logger.error("Exception : getTotalAmountbyTransactionType() :: ", e); } logger.info("Response from Service layer :: Total Amount: getTotalAmountbyTransactionType() :: " + totalAmount); return totalAmount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GetMapping(\"/total-sum\")\n\tpublic Double getTotalTransactionsSumByType(@RequestParam String type) {\n\t\tDouble totalSum = null;\n\t\t\n\t\ttry {\n\t\t\ttotalSum = transactionService.getTotalTransactionsSumByType(type);\n\t\t}\n\t\tcatch (InvalidDataException e) {\n\t\t\tString exceptionMessage = e.getMessage(...
[ "0.69473946", "0.6901147", "0.66045135", "0.65780306", "0.63766515", "0.6321741", "0.6302418", "0.6104977", "0.60255545", "0.59378004", "0.59207755", "0.5913066", "0.5886114", "0.58640283", "0.57965946", "0.5738757", "0.56557137", "0.5626151", "0.5626151", "0.5623971", "0.562...
0.71177024
0
REST call to get the current weather conditions of a particular location. If no location provided a random set of coordinates are generated and their weather conditions are returned.
@GetMapping("/weather/current") public Location getCurrentWeather(@RequestParam(value = "city", required = false) final String city, @RequestParam(value = "country", required = false) final String country, @RequestParam(value = "lon", required = false) final String lon, @RequestParam(value = "lat", required = false) final String lat) { final StringBuilder locationBuilder = new StringBuilder(); validator.getCurrentWeatherValidator(city, country, lon, lat); if (city != null) { locationBuilder.append("city=").append(city); if(country != null) { locationBuilder.append("&country=").append(country); } } else if (lat != null) { final double latitude = Double.parseDouble(lat); final double longitude = Double.parseDouble(lon); final Coordinates latLong = new Coordinates(longitude, latitude); locationBuilder.append(latLong.getUriComponent()); } else { Coordinates randomCoordinates = getRandomCoordinates(); locationBuilder.append(randomCoordinates.getUriComponent()); } final String location = locationBuilder.toString(); return weatherService.getCurrentConditions(location); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract WeatherData[] getHourlyWeatherForecast(LocationCoordinate _location) throws Exception;", "@GET(\"/v3/weather/now.json\")\n Call<City> getCity(@Query(\"key\")String key,@Query(\"location\")String location);", "public static WeatherRequest generateWeatherRequestForCurrentLocation() {\n ...
[ "0.63684344", "0.626959", "0.6265928", "0.62405026", "0.62158126", "0.60449433", "0.57750034", "0.57200587", "0.56939465", "0.5666786", "0.56664497", "0.56433344", "0.5631019", "0.56188685", "0.5509726", "0.54847443", "0.5452166", "0.5425821", "0.5400917", "0.5395598", "0.534...
0.63240886
1
Generates a random pair of geo coordinates.
private static Coordinates getRandomCoordinates() { Random r = new Random(); double upperLimit = 180; double lowerLimit = -180; double lon = r.nextDouble() * (upperLimit - lowerLimit) + lowerLimit; double lat = r.nextDouble() * (upperLimit - lowerLimit) + lowerLimit; return new Coordinates(lat, lon); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double[] generateRandomCoordinates() {\n return generateRandomCoordinates(CoordinateDomain.GEOGRAPHIC, 0.05f);\n }", "public void generateRandomPosition() {\n\t\tx.set((int)(Math.floor(Math.random()*23+1)));\n\t\ty.set((int)(Math.floor(Math.random()*23+1)));\n\n\t}", "private RandomLocationGe...
[ "0.75231075", "0.69491094", "0.694072", "0.67448145", "0.65985906", "0.6498333", "0.64461964", "0.6398474", "0.6366384", "0.6357596", "0.63005674", "0.6287762", "0.62665343", "0.6224475", "0.62125826", "0.6202901", "0.6110602", "0.6065411", "0.6035545", "0.6031298", "0.602617...
0.6908822
3
Get All Indices Name
private void listAllIndices(Client client){ try { String[] indexList = client.admin().cluster().prepareState().execute().actionGet().getState().getMetaData().concreteAllIndices(); System.out.println("Index List Size size : " + indexList.length); for (String index : indexList) { System.out.println("Index Name " + index); deleteIndex(client,index); } } catch (Exception e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String[] getAlternateIndexNames() \n {\n if (!this.hasAlternateIndexes()) {\n return null;\n } else {\n return this.altIndexMap.keyArray(String.class);\n }\n }", "public String getIndexName() {\n return indexName;\n }", "public String getName() {\n ...
[ "0.71712905", "0.6950037", "0.68329996", "0.68190175", "0.6591021", "0.6542354", "0.65101075", "0.6467808", "0.62482613", "0.6203251", "0.61665165", "0.61481655", "0.61047477", "0.6102304", "0.606682", "0.6059082", "0.5975478", "0.5975478", "0.59625095", "0.5949946", "0.58923...
0.555525
55
/ The this keyword is used to refer explicitly to current object. It is most commonly used when accessing instance variables.
public void setCurrentScore(int currentScore) { this.currentScore = currentScore; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic int getVarThisFlag() {\n\t\treturn heldObj.getVarThisFlag();\n\t}", "public Context getThis()\r\n {\r\n return this.context;\r\n }", "public void method(){\n\t\t\n\t\tint a=3;//only for this method//local variable\n\t\tSystem.out.println(a);\n\t\tSystem.out.println(this.a);\n\t...
[ "0.6382073", "0.6354727", "0.62039113", "0.62011516", "0.61825943", "0.60342777", "0.60342777", "0.6031028", "0.59565264", "0.59100866", "0.5896498", "0.5881238", "0.58795756", "0.58468837", "0.57262635", "0.5718512", "0.5715207", "0.5708338", "0.5689084", "0.56793875", "0.56...
0.0
-1
Get the equation given the 3 points Setter of a,b,c
public void computeEquation() { // Curve equation of type : y = ax^2 + bx + c // OR (x*x)a + (x)b + 1c = y // ex : 50 = 4a + 2b + c where y = 50 and x = 2 and z = 1 double[][] matrice = {{Math.pow(A.getKey(),2),A.getKey(),1}, {Math.pow(B.getKey(),2),B.getKey(),1}, {Math.pow(C.getKey(),2),C.getKey(),1}}; double deter = computeSarrus(matrice); double [][] matriceA = {{A.getValue(),A.getKey(),1}, {B.getValue(),B.getKey(),1}, {C.getValue(),C.getKey(),1}}; double [][] matriceB = {{Math.pow(A.getKey(),2),A.getValue(),1}, {Math.pow(B.getKey(),2),B.getValue(),1}, {Math.pow(C.getKey(),2),C.getValue(),1}}; double [][] matriceC = {{Math.pow(A.getKey(),2),A.getKey(),A.getValue()}, {Math.pow(B.getKey(),2),B.getKey(),B.getValue()}, {Math.pow(C.getKey(),2),C.getKey(),C.getValue()}}; abc[0] = computeSarrus(matriceA) / deter; abc[1] = computeSarrus(matriceB) / deter; abc[2] = computeSarrus(matriceC) / deter; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Function(double a, double b, double c) {\r\n\t //y = a*(x*x) + b*x + c;\r\n co[0]= c;\r\n co[1]= b;\r\n co[2]= a;\r\n degree[0] = 0;\r\n degree[1] = 1;\r\n degree[2] = 2;\r\n cindex = 3;\r\n\t}", "public static void equation(int a, int b, int c) {\n\t\tint D = b * b - ...
[ "0.6322516", "0.62016356", "0.6019624", "0.5843027", "0.5705513", "0.5523715", "0.5518429", "0.55094016", "0.5500703", "0.54258764", "0.5373807", "0.5344628", "0.53418684", "0.5301566", "0.52558404", "0.52555734", "0.52470946", "0.52224964", "0.5215959", "0.52054584", "0.5203...
0.6480226
0
method to detect and return all induced diamonds found
public List<Collection<Vertex<Integer>>> detect(UndirectedGraph<Integer,Integer> graph){ long start = System.currentTimeMillis(); List<Collection<Vertex<Integer>>> diamonds = find(graph); long stop = System.currentTimeMillis(); p1time = ""+(stop-start); found=diamonds.size(); return diamonds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printDiamond(){\n printIsoceles();\n //use bottom isosceles method to get bottom half of Diamond\n printBottomIsoceles();\n }", "private void startGame() { \n \n int body = 0;\n int column = 0;\n int end = 0;\n int fill = 0;\n int increment = 2; \n int numPe...
[ "0.5868833", "0.5177068", "0.5169519", "0.50071836", "0.49556643", "0.49242896", "0.4922945", "0.48821554", "0.48798606", "0.48675692", "0.48411974", "0.4840604", "0.47949663", "0.47708273", "0.4763066", "0.47385934", "0.47377756", "0.47281268", "0.47228196", "0.47191405", "0...
0.58300537
1
method that checks if a P3 is present in a graph and returns the vertices of the P3s
public List<Collection<Graph.Vertex<Integer>>> checkP3InComponent(UndirectedGraph<Integer,Integer> graph){ List<Collection<Graph.Vertex<Integer>>> p3s = new ArrayList<Collection<Graph.Vertex<Integer>>>(); //stores vertices of p3s found //if the no of vertices in graph is less than 3, then graph cannot have a p3 if(graph.size()<3){ return p3s; } Set<Set<Integer>> marked = new HashSet<Set<Integer>>(); //to prevent creating the same p3 more than once //create mapping between matrix indices and vertex List<Graph.Vertex<Integer>> vertexIndexMap = new ArrayList<Graph.Vertex<Integer>>(); Iterator<Graph.Vertex<Integer>> vIt = graph.vertices(); //gets the vertex iterator while(vIt.hasNext()){ vertexIndexMap.add(vIt.next()); } int[][] A = graph.getAdjacencyMatrix(); int[][] A2; try { A2 = Utility.multiplyMatrix(A, A); } catch (MatrixException e) { return null; } //look for a path of length 2 in A2 for(int i=0; i<A2.length;i++){ for(int j=i+1; j<A2.length;j++){ if((int)A2[i][j]>0 && (int)A[i][j]==0){ //then a P3 is found //look for third vertex for(int k=0; k<A.length;k++){ if(k!=i && k!= j && ((int)A[k][i] == 1) && ((int)A[k][j] == 1)){ List<Graph.Vertex<Integer>> vert = new ArrayList<Graph.Vertex<Integer>>(); Set<Integer> hh = new HashSet<Integer>(); Graph.Vertex<Integer> u = vertexIndexMap.get(i); Graph.Vertex<Integer> v = vertexIndexMap.get(j); Graph.Vertex<Integer> w = vertexIndexMap.get(k); vert.add(u); vert.add(v); vert.add(w); hh.add(u.getElement()); hh.add(v.getElement()); hh.add(w.getElement()); if(marked.add(hh)){ p3s.add(vert); } } } } } } return p3s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasIsVertexOf();", "Set<Set<V>> routine3(Graph<V, E> g)\n {\n Set<Set<V>> NuvList = new HashSet<>();\n for (V u : g.vertexSet()) {\n for (V v : g.vertexSet()) {\n if (u == v || !g.containsEdge(u, v))\n continue;\n NuvList.add(N(...
[ "0.64387107", "0.60489875", "0.60084647", "0.5837258", "0.5810786", "0.571991", "0.570506", "0.56914645", "0.5691339", "0.5658362", "0.56141114", "0.5609157", "0.55925965", "0.5591741", "0.5579876", "0.5559179", "0.55580175", "0.55247", "0.54999846", "0.5492466", "0.5480416",...
0.8250618
0
method to return the time taken to run the listing and the number of diamonds found
public String getResult(){ String result = String.format("%-10s%10d", p1time,found); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int totalTime() {\n int time = 0;\n for (List l : lists.getList()) time += l.obtainTotalTime();\n return time;\n }", "public int totalTime(){\n\t\t\n\t\tint time=0;\n\t\t\n\t\n\t\tfor(int i=0; (i<songList.length);i++){\n\t\t\t\n\t\t\tif(songList[i]!=null){\n\t\t\t\n\t\t\ttime+= son...
[ "0.63004416", "0.6129069", "0.6084026", "0.58468634", "0.5740664", "0.56945294", "0.56517863", "0.5640977", "0.56198806", "0.561341", "0.5612704", "0.5585624", "0.5570607", "0.5566763", "0.55531085", "0.5544904", "0.5535228", "0.5521889", "0.55147606", "0.5513508", "0.5498648...
0.0
-1
Construct a new simple results uploader with the given configuration for the entries and table.
public SimpleResultsUploader(SQLAdapter adapter, String table, String algorithmName, int experimentId) { this.adapter = adapter; this.table = table; this.algorithmName = algorithmName; this.experimentId = experimentId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void generateFiles(File config, File destination, int entryCount, int entryFieldSize) throws Exception {\n String parentDirectory = config.getParent();\n JsonParser parser = new JsonParser();\n JsonObject configJson = parser.parse(new FileReader(config)).getAsJsonObject();\n\n // Generat...
[ "0.48782587", "0.483144", "0.48172864", "0.48160365", "0.47901988", "0.4761263", "0.47143927", "0.4648399", "0.463112", "0.4611645", "0.46096575", "0.4601092", "0.45925155", "0.4579794", "0.4565521", "0.45601556", "0.4546335", "0.45218208", "0.44446695", "0.4434659", "0.44223...
0.61444676
0
Uploads the given intermediate results
public void uploadResult(MLPipeline classifier, long evaluationTime, double solutionQuality, String phase) throws SQLException { String solutionString = getSolutionString(classifier); if (adapter == null) { logger.warn("Not uploading result after {}ms with value {}. Solution: {}", evaluationTime, solutionQuality, solutionString); } else { Map<String, Object> map = new HashMap<>(); map.put("classifier", solutionString); map.put("phase", phase); map.put("loss", solutionQuality); map.put("time", evaluationTime); map.put("found", System.currentTimeMillis() - timeStart); map.put("algorithm", algorithmName); map.put("experiment_id", experimentId); adapter.insert(table, map); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doUploadResult(String json) throws Exception {\n\n\t}", "public uploadFileForExperiment_result(uploadFileForExperiment_result other) {\n __isset_bitfield = other.__isset_bitfield;\n this.success = other.success;\n }", "@Override\n\t\t\tpublic void uploadSuccess(DefaultPutR...
[ "0.60229737", "0.6005011", "0.58877224", "0.5664807", "0.56218815", "0.5591309", "0.5578519", "0.5535681", "0.5504114", "0.5499934", "0.54992527", "0.5488014", "0.54563946", "0.5445144", "0.54276145", "0.54077375", "0.53864145", "0.5355643", "0.5349224", "0.534381", "0.534366...
0.5110822
44
Converts the given pipeline to a simple string representation
public static String getSolutionString(MLPipeline classifier) { if (classifier == null) { return "error"; } Classifier baseClassifier = classifier.getBaseClassifier(); String[] classifierOptionsArray; String classifierOptionsString = ""; String classifierString = baseClassifier.getClass().getName(); if (baseClassifier instanceof OptionHandler) { classifierOptionsArray = ((OptionHandler) baseClassifier).getOptions(); classifierOptionsString = classifierOptionsArray.length > 0 ? Arrays.stream(classifierOptionsArray).collect(Collectors.joining(", ", "[", "]")) : ""; } SupervisedFilterSelector preprocessor = !classifier.getPreprocessors().isEmpty() ? classifier.getPreprocessors().get(0) : null; String preprocessorString = preprocessor != null ? preprocessor.getClass().getName() : ""; String[] preprocessorOptionsArray; String preprocessorOptionsString = ""; if (preprocessor instanceof OptionHandler) { preprocessorOptionsArray = !preprocessorString.equals("") ? ((OptionHandler) preprocessor).getOptions() : new String[0]; preprocessorOptionsString = preprocessorOptionsArray.length > 0 ? Arrays.stream(preprocessorOptionsArray).collect(Collectors.joining(",", "[", "]")) : ""; } return classifierString + " " + classifierOptionsString + " " + preprocessorString + " " + preprocessorOptionsString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getStrPipelineURl() {\n return strPipelineURl;\n }", "public String getStrPipelineName() {\n return strPipelineName;\n }", "public static String execute(String pipeline, String text, boolean debugMode) {\n\n\t\tif (debugMode) System.out.println(\"Pipeline: \" + pipeline);\n\n\...
[ "0.5821866", "0.57959557", "0.56911665", "0.5681874", "0.5568266", "0.5521013", "0.5422828", "0.5371328", "0.51798236", "0.50646454", "0.5064364", "0.5028921", "0.50128114", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941", "0.5001941"...
0.5208052
8
/ JADX WARNING: Illegal instructions before constructor call / Code decompiled incorrectly, please refer to instructions dump.
private FieldSumMap(com.shopee.protocol.ads.action.FieldSumMap.Builder r17) { /* r16 = this; r0 = r17 java.lang.Long r2 = r0.impression java.lang.Long r3 = r0.click java.lang.Long r4 = r0.order java.lang.Long r5 = r0.order_amount java.lang.Long r6 = r0.order_gmv java.lang.Long r7 = r0.cost java.lang.Long r8 = r0.shop_item_impression java.lang.Long r9 = r0.shop_item_click java.lang.Long r10 = r0.broad_shop_item_imp java.lang.Long r11 = r0.broad_shop_item_click java.lang.Long r12 = r0.broad_order java.lang.Long r13 = r0.broad_item_count java.lang.Long r14 = r0.broad_gmv java.lang.Long r15 = r0.location_in_ads r1 = r16 r1.<init>(r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13, r14, r15) r16.setBuilder(r17) return */ throw new UnsupportedOperationException("Method not decompiled: com.shopee.protocol.ads.action.FieldSumMap.<init>(com.shopee.protocol.ads.action.FieldSumMap$Builder):void"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void translateConstructor( ) {\n \n Set<MethodInfoFlags> flags = EnumSet.noneOf( MethodInfoFlags.class );\n \n AVM2Method method = new AVM2Method( null, flags );\n avm2Class.avm2Class.constructor = method;\n \n AVM2MethodBody body = method.methodBody;\n ...
[ "0.71015143", "0.7059596", "0.6989391", "0.6781889", "0.6726215", "0.67163754", "0.6671958", "0.665917", "0.66513497", "0.6587412", "0.6584786", "0.65427125", "0.65144664", "0.65082955", "0.6488894", "0.6471565", "0.6467171", "0.64512646", "0.64405286", "0.6431756", "0.643083...
0.0
-1
TC 1: OrangeHRM Title Validation TC 2: OrangeHRM Successful Login Please make sure to use the following: annotations:
@BeforeMethod public void setUp() throws InterruptedException { setUpDriver("chrome", "https://opensource-demo.orangehrmlive.com/"); boolean swagLabs = driver.findElement(By.xpath("//title[text()='OrangeHRM']")).isDisplayed(); if(swagLabs=true) { System.out.println("This is the right title"); }else { System.out.println("This is the wrong title"); } Thread.sleep(2000); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test(groups ={Slingshot,Regression})\n\tpublic void verifyTitleField() {\n\t\tReport.createTestLogHeader(\"MuMv\", \"Verify the Title Field validations and its appropriate error message\"); \t \t \t \n\t\tUserProfile userProfile = new TestDataHelper().getUserProfile(\"MuMVTestDataspl\");\n\t\tnew LoginAction(...
[ "0.619163", "0.5918852", "0.5866061", "0.58622956", "0.5836218", "0.5816644", "0.58071077", "0.5806571", "0.5806055", "0.5795774", "0.57734495", "0.5769979", "0.57679045", "0.57596916", "0.5744607", "0.5731481", "0.57204676", "0.5703786", "0.56762075", "0.5666533", "0.5657247...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) throws InterruptedException { LockThread th = new LockThread(); th.start(); startLatch.await(); System.out.println("Before park, thread state: " + th.getState()); parkLatch.countDown(); System.out.println("After park, thread state: " + th.getState()); Thread.sleep(1000); th.interrupt(); System.out.println("Unparking.. " + th.getState()); }
{ "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
/ liste des feedback d'un collaborateur
@RequestMapping(value = "/collaborateurs/{id}/feedBacks" , method = RequestMethod.GET) public Reponse getAllfeedBackOfCollaborateurByYear(@PathVariable("id") Long id,Date year) { try { Collaborateur collaborateur = new Collaborateur(id); return new Reponse(0,FeedBackModel.listeFeedBackRvised(feedBackMetier.getAllfeedBackOfCollaborateurByYear(collaborateur, year))); } catch (LambdaException e) { return new Reponse(1,ExceptionHelpers.getErreursForException(e)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void afficher_les_messages() {\n List<Message> liste_message = ticket_courant.getMessage();\n String texte = \"\";\n for(Message mess: liste_message){\n texte += mess.getExpediteur()+ \" : \"+mess.getTexte()+\"\\n\";\n }\n aff_message.setText(texte);\n /...
[ "0.6449239", "0.62481236", "0.5898571", "0.58790344", "0.5714568", "0.56890976", "0.5686613", "0.5683569", "0.56608945", "0.5609879", "0.5600989", "0.55948186", "0.55879927", "0.556962", "0.5561415", "0.55605894", "0.5546587", "0.5543648", "0.5541389", "0.5512306", "0.5496657...
0.0
-1
Designs partition ranges by sampling the given files. See the class comment for more details.
public static ValueRange[] designPartitions (SampleableTupleReader tupleReader, int partitioningColumnIndex, int numPartitions, int sampleSize) throws IOException { ColumnType type = tupleReader.getColumnType(partitioningColumnIndex); EquiWidthPartitioner<?, ?> partitioner; switch(type) { case DATE: case TIME: case TIMESTAMP: case BIGINT: partitioner = new EquiWidthPartitioner<Long, long[]>(type); break; case DOUBLE: partitioner = new EquiWidthPartitioner<Double, double[]>(type); break; case FLOAT: partitioner = new EquiWidthPartitioner<Float, float[]>(type); break; case INTEGER: partitioner = new EquiWidthPartitioner<Integer, int[]>(type); break; case SMALLINT: partitioner = new EquiWidthPartitioner<Short, short[]>(type); break; case BOOLEAN: case TINYINT: partitioner = new EquiWidthPartitioner<Byte, byte[]>(type); break; case VARBINARY: throw new IllegalArgumentException("partitioning by VARBINARY column is not supported"); case VARCHAR: partitioner = new EquiWidthPartitioner<String, String[]>(type); break; default: throw new IOException ("Unexpected column type:" + type); } return partitioner.design(tupleReader, partitioningColumnIndex, numPartitions, sampleSize); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createPartitions() {\n \tfor (int attrOrd : splitAttrs) {\n \t\tFeatureField featFld = schema.findFieldByOrdinal(attrOrd);\n \t\tif (featFld.isInteger()) {\n \t\t\t//numerical\n \t\t\tList<Integer[]> splitList = new ArrayList<Integer[]>();\n \t\t\tInteger[] sp...
[ "0.6009191", "0.56652415", "0.5236926", "0.51691186", "0.5144511", "0.51141816", "0.50413775", "0.50235015", "0.50170314", "0.49688017", "0.49509385", "0.49398622", "0.4925246", "0.4868305", "0.48529792", "0.4825527", "0.48082158", "0.4800891", "0.4751627", "0.4746135", "0.47...
0.47718865
18
overload that uses default sample size.
public static ValueRange[] designPartitions (SampleableTupleReader tupleReader, int partitioningColumnIndex, int numPartitions) throws IOException { return designPartitions(tupleReader, partitioningColumnIndex, numPartitions, DEFAULT_SAMPLE_SIZE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSampleSize(int value) {\n this.sampleSize = value;\n }", "public void setSampleSize(int size){\r\n\t\tSampleSize = size;\r\n\t}", "int getSampleSize();", "public int getSampleSize(){\n\t\treturn sampleSize;\n\t}", "public int getSampleSize() {\n return sampleSize;\n }", ...
[ "0.7980416", "0.7814389", "0.769275", "0.7644276", "0.7557473", "0.69000196", "0.6845457", "0.66210735", "0.6553523", "0.65480196", "0.6368946", "0.63599765", "0.6331578", "0.6331578", "0.6268218", "0.61848253", "0.6182265", "0.6143171", "0.6139072", "0.6130328", "0.6065063",...
0.0
-1
String prompt used to capture info.
public String getToken(String prompt) { do { try { System.out.print(prompt); String line = reader.readLine(); StringTokenizer tokenizer = new StringTokenizer(line,"\n\r\f"); if (tokenizer.hasMoreTokens()) { return tokenizer.nextToken(); } } catch (IOException ioe) { System.exit(0); } } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getPrompt(){\n\t\treturn getString(KEY_PROMPT);\n\t}", "String promptString();", "public String getPrompt() { return prompt; }", "static String promptForString(String prompt) {\n String line = \"\";\n\n System.out.println(prompt);\n while (line.compareTo(\"\") == 0) {\n ...
[ "0.76307034", "0.7493219", "0.7319197", "0.71672463", "0.7115158", "0.7078978", "0.70619404", "0.70602727", "0.7022229", "0.70154256", "0.70057166", "0.69876796", "0.6986994", "0.69443125", "0.69410837", "0.68817204", "0.68433386", "0.68319666", "0.68256515", "0.67951566", "0...
0.0
-1
Integer prompt using token method.
public int getInt(String prompt) { do { try { String item = getToken(prompt); Integer num = Integer.valueOf(item); return num.intValue(); } catch (NumberFormatException nfe) { System.out.println("Please input a number "); } } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int promptNumber();", "public static int promptUserForInt(String prompt){\n Scanner scannerln = new Scanner(System.in);\n System.out.print(prompt);\n return scannerln.nextInt();\n }", "public int getInteger(String prompt) {\r\n\t\tdo {\r\n\t\t\ttry {\r\n\t\t\t\tString item = getToken(prompt);\r\n\t\t...
[ "0.68931276", "0.6804663", "0.6608833", "0.64553356", "0.631204", "0.62542325", "0.6227073", "0.620908", "0.62074566", "0.61734235", "0.612848", "0.612848", "0.60707283", "0.6024502", "0.596335", "0.59604925", "0.59370977", "0.590367", "0.5903301", "0.5880984", "0.5834445", ...
0.6693707
3
Float prompt using token method.
public double getDouble(String prompt) { do { try { String item = getToken(prompt); double f = Double.parseDouble(item); return f; } catch (NumberFormatException nfe) { System.out.println("Please input a number "); } } while (true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static float queryFloat (String prompt)\n\t{\n\t\tString entry ;\n\t\tfloat entryFloat ;\n\t\tSystem.out.print (prompt) ;\n\t\tentry = scanIn.nextLine() ;\n\t\tif (entry.length() == 0)\n\t\t{\n\t\t\tentryFloat = 0f ;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tentryFloat = Float.parseFloat (entry) ;\n\t\t}\n\n\t\treturn entryF...
[ "0.63284063", "0.63182694", "0.6246625", "0.6034125", "0.56526405", "0.56526405", "0.5521322", "0.5516257", "0.54980195", "0.54479474", "0.54430443", "0.54042625", "0.5367877", "0.53517497", "0.535116", "0.53290266", "0.5328768", "0.529072", "0.5290079", "0.5268839", "0.52558...
0.51433426
36
Yes or no prompt.
private boolean yesOrNo(String prompt) { String more = getToken(prompt + " (Y|y)[es] or anything else for no: "); if (more.charAt(0) != 'y' && more.charAt(0) != 'Y') { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean promptYesNo(String str)\r\n\t\t{\r\n\t\t\treturn true;\r\n\t\t}", "@Override\r\n\t\tpublic boolean promptYesNo(String message) {\n\t\t\treturn true;\r\n\t\t}", "public boolean yesTo(String prompt) {\r\n System.out.print(prompt + \" (y/n)? \");\r\n String response = console.nextLine().t...
[ "0.82262903", "0.82113916", "0.78521967", "0.78521967", "0.77241117", "0.76621777", "0.7423772", "0.7388453", "0.73752874", "0.73386973", "0.73383695", "0.7226958", "0.72088933", "0.717253", "0.7135645", "0.7122433", "0.71161014", "0.7102853", "0.69744766", "0.6908673", "0.68...
0.7552539
7
System.out.print("currentState [" + currentState + "] > transition [" + transition + "]");
public void changeState(int transition) { lastState = currentState; currentState = nextState[currentState][transition]; // System.out.println(" = " + currentState); if (currentState == -2) { System.out.println("Error [" + currentState + "] has occured"); terminate(); } else if (currentState == -1) { terminate(); } states[currentState].run(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printCurrentState() {\n\t\tfor (int i = 0; i < 9; i++) {\n\t\t\tfor (int j = 0; j < 9; j++) {\n\t\t\t\tSystem.out.print(this.currentState[i][j] + \" \");\n\t\t\t}\n\t\t\tSystem.out.println(\"\");\n\t\t}\n\t}", "public void printMachine(){\n\t\tfor(State s:theStates){\n\t\t\tSystem.out.println(s);\n\t...
[ "0.7138703", "0.69558305", "0.6875359", "0.68277687", "0.6621466", "0.66094357", "0.65757376", "0.65554696", "0.64773715", "0.64275223", "0.6422559", "0.6374108", "0.63117206", "0.6283393", "0.626694", "0.62603456", "0.62369204", "0.6214107", "0.6211307", "0.620608", "0.62056...
0.61898583
22
/Get unsync Installation list from db
private void getDBInstallationList() { DataHolder mDataHolder; mArrayListInstallations = new ArrayList<>(); try { String url = "select * from " + mActivity.mDbHelper.mTableInstall + " where " + mActivity.mDbHelper.mFieldInstallIsSync + "= 0" + " AND " + mActivity.mDbHelper.mFieldInstallUserId + "= '" + PreferenceHelper.getPreferenceInstance(MyApplication.getAppContext()).getUserId() + "'" + " order by " + mActivity.mDbHelper.mFieldInstallLocalId + " DESC"; System.out.println("Local url " + url); mDataHolder = mActivity.mDbHelper.read(url); if (mDataHolder != null) { System.out.println("Local Device List " + url + " : " + mDataHolder.get_Listholder().size()); for (int i = 0; i < mDataHolder.get_Listholder().size(); i++) { VoInstallation mVoInstallation = new VoInstallation(); mVoInstallation.setInst_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalId)); mVoInstallation.setInst_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerId)); mVoInstallation.setInst_user_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUserId)); mVoInstallation.setInst_device_imei_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceIMEINo)); mVoInstallation.setInst_device_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceServerId)); mVoInstallation.setInst_device_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceLocalId)); mVoInstallation.setInst_device_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDevicName)); mVoInstallation.setInst_device_warranty_status(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceWarranty_status)); mVoInstallation.setInst_device_type_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDeviceTypeName)); mVoInstallation.setInst_help_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallHelpNo)); mVoInstallation.setInst_date_time(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTime)); mVoInstallation.setInst_latitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLatitude)); mVoInstallation.setInst_longitude(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLongitude)); mVoInstallation.setInst_country_code(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryCode)); mVoInstallation.setInst_country_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCountryName)); mVoInstallation.setInst_vessel_local_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselLocalId)); mVoInstallation.setInst_vessel_server_id(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselServerId)); mVoInstallation.setInst_vessel_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselName)); mVoInstallation.setInst_vessel_regi_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallVesselRegNo)); mVoInstallation.setInst_power(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPower)); mVoInstallation.setInst_location(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocation)); mVoInstallation.setInst_owner_name(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerName)); mVoInstallation.setInst_owner_address(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerAddress)); mVoInstallation.setInst_owner_city(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerCity)); mVoInstallation.setInst_owner_state(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerState)); mVoInstallation.setInst_owner_zipcode(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerZipcode)); mVoInstallation.setInst_owner_email(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerEmail)); mVoInstallation.setInst_owner_mobile_no(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallOwnerMobileNo)); mVoInstallation.setInst_local_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalSignUrl)); mVoInstallation.setInst_server_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerSignUrl)); mVoInstallation.setInst_local_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallLocalInstallerSignUrl)); mVoInstallation.setInst_server_installer_sign_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallServerInstallerSignUrl)); mVoInstallation.setInst_pdf_url(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallPdfUrl)); mVoInstallation.setInst_created_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallCreatedDate)); mVoInstallation.setInst_updated_date(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallUpdatedDate)); mVoInstallation.setInst_is_sync(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallIsSync)); mVoInstallation.setIs_install(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallStatus)); mVoInstallation.setInst_date_timestamp(mDataHolder.get_Listholder().get(i).get(mActivity.mDbHelper.mFieldInstallDateTimeStamp)); mArrayListInstallations.add(mVoInstallation); } } // Collections.sort(mArrayListTreatmentLists, new Comparator<TreatmentList>() { // @Override // public int compare(TreatmentList s1, TreatmentList s2) { // return s1.getTreatment_title().compareToIgnoreCase(s1.getTreatment_title()); // } // }); } catch (Exception e) { e.printStackTrace(); } LinearLayoutManager mLayoutManager = new LinearLayoutManager(mActivity, LinearLayoutManager.VERTICAL, false); mInstallationAdapter = new InstallationAdapter(); mRecyclerViewInstallation.setLayoutManager(mLayoutManager); mRecyclerViewInstallation.setAdapter(mInstallationAdapter); mInstallationAdapter.registerAdapterDataObserver(new RecyclerView.AdapterDataObserver() { @Override public void onChanged() { super.onChanged(); checkAdapterIsEmpty(); } }); checkAdapterIsEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic List<NetBarDeployEntity> getUnDeployInfos() {\n\t\tList<NetBarDeployEntity> data = new ArrayList<NetBarDeployEntity>();\n\t\tMap<String, Object> parameters = new HashMap<String, Object>();\n\t\tStringBuffer sql = new StringBuffer();\n\t\tsql.append(\"select \"+getQueryColumns())\n\t\t.append(\"...
[ "0.63496554", "0.60443133", "0.56733525", "0.5520845", "0.55037606", "0.5500534", "0.5482811", "0.5387915", "0.534477", "0.53225696", "0.5284606", "0.52517605", "0.5188074", "0.5174684", "0.51680475", "0.51233196", "0.5122404", "0.5102768", "0.5095201", "0.5060205", "0.505935...
0.69836074
0
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println("Enter 5 numbers in ascenorder order for example 1 2 3"); Scanner san = new Scanner(System.in); int num= san.nextInt(); int arr[]= new int[num]; System.out.println("now enters the "+num+" numbers"); System.out.println(arr.length); for(int i=0; i<arr.length; i++) arr[i]=san.nextInt(); for(int i=0; i<arr.length; i++) { if(i+1<arr.length && arr[i]>arr[i+1]) { System.out.println(arr[i]+ " is bigger than the "+arr[i+1]+" numbers must be in ascending order"); return; } } for(int a:arr) System.out.print(a+" "); }
{ "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
array where the elements of type T will be stored Constructor of ListDA that initializes the newly created object it assigns the initial properties of object
public ListDA() { elements = new Object[CAPACITY]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TDrawingConstructor (ArrayList interpretation){\r\n fInterpretation=interpretation;\r\n}", "public AList() {\n items = (TypeHere[]) new Object[100];\n size = 0;\n }", "public ArrayList() {\n arr = (T[]) new Object[10];\n size = 0;\n }", "public Hylle(int size) {\n a = (...
[ "0.6581004", "0.64886093", "0.63938284", "0.6203847", "0.61232513", "0.6113902", "0.606928", "0.6039715", "0.6036068", "0.6007881", "0.600683", "0.59968406", "0.598651", "0.5958311", "0.5958311", "0.59501976", "0.59306514", "0.58945197", "0.58779037", "0.58669096", "0.5838027...
0.59343076
16
method isEmpty() checks if the list is empty and returns true if size is equal 0 false in other cases Time Complexity is O(1) constant
public boolean isEmpty() { return size() == 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isEmpty(){\n\n \treturn list.size() == 0;\n\n }", "public boolean isEmpty(){\n return this.listSize == 0;\n }", "public /*@ pure @*/ boolean isEmpty() {\n return the_list == null;\n }", "public boolean isEmpty(){\n\t\tif(list.isEmpty()){\n\t\t\treturn true;\n\t\t} els...
[ "0.8484456", "0.84531647", "0.8204503", "0.8200807", "0.8200138", "0.8179292", "0.816772", "0.816763", "0.8161713", "0.8161713", "0.8161713", "0.8156727", "0.8146723", "0.8125319", "0.8112198", "0.8109327", "0.8108806", "0.8104131", "0.8094264", "0.8092901", "0.809283", "0....
0.0
-1
method add(int i, T t) adds provided element t at position i firstly, it checks the potential overflow and whether the variable i is valid then, it shifts all elements by one slot and assigns element with index i to t finally, it returns the previous value of the first element Time Complexity is O(n) linear
public void add(int i, T t) { if (size == elements.length) // checks potential overflow ensureCapacity(); // increase capacity size++; // increment size of list if (i < 0 || i >= size) // if there is no index i in list throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + size()); // cause IndexOutOfBoundException for (int j = size - 1; j > i; j--) { // treat elements of list with indexes in range [i+1, n] elements[j] = elements[j - 1]; // element shifts to right } elements[i] = t; // store element at index i }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addFirst(T t) {\n if (size == elements.length) // checks potential overflow\n ensureCapacity(); // increase capacity\n for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n]\n elements[j] = elements[j - 1]; // element shifts to right\n ...
[ "0.7226116", "0.66744506", "0.6585309", "0.6585309", "0.641812", "0.63830227", "0.6351532", "0.63183165", "0.63037795", "0.6270327", "0.624214", "0.62133384", "0.6165649", "0.6135962", "0.6133687", "0.60937", "0.6073367", "0.6036791", "0.5997537", "0.59776795", "0.59299904", ...
0.6856369
1
method addFirst(T t) adds element t to the start of the list firstly, it checks the potential overflow then it shifts all elements by one slot and assigns the first element of array to t finally, it returns the previous value of the first element Time Complexity is O(n) linear
public void addFirst(T t) { if (size == elements.length) // checks potential overflow ensureCapacity(); // increase capacity for (int j = size; j > 0; j--) // treat elements of list with indexes in range [1, n] elements[j] = elements[j - 1]; // element shifts to right size++; // increment size elements[0] = t; // store element at index 0 }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addFirst(T item) {\n if (size >= array.length) {\n resize(size * 2);\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n } else {\n array[nextFirst] = item;\n nextFirst = minusOne(nextFirst);\n }\n ...
[ "0.7418026", "0.7169094", "0.69904983", "0.6944868", "0.6897272", "0.6730529", "0.6679956", "0.65874094", "0.62619203", "0.624443", "0.6221389", "0.61679506", "0.6157559", "0.6138255", "0.6128565", "0.6124398", "0.61029273", "0.60275346", "0.59924954", "0.5985898", "0.5895198...
0.8157629
0
method addLast(T t) adds element t to the end of the list firstly, it checks the potential overflow then it assigns the value of last element to t finally, it returns the previous value of the last element Time Complexity is O(n) linear
public void addLast(T t) { if (size == elements.length) // checks potential overflow ensureCapacity(); // increase capacity elements[size] = t; //store element at last position size++; // increment size }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Node<T> addLast(T t) { \r\n Node<T> currLast = sentinel.prev;\r\n Node<T> newNode = new Node<T>(t, currLast, sentinel);\r\n currLast.next = newNode;\r\n sentinel.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public void addLast(T element);", "@Override\n public void addL...
[ "0.7670766", "0.758008", "0.6988851", "0.6896901", "0.688641", "0.6840023", "0.68129236", "0.6781915", "0.66985095", "0.66766936", "0.666934", "0.6635568", "0.66037804", "0.6552409", "0.6529441", "0.6479073", "0.6462365", "0.64282703", "0.6408984", "0.6395179", "0.6392529", ...
0.7938834
0
TODO method delete(T t) remove all entries of element with value t from the list it creates new array with the same length, then it copies all elements except the element with value t Time Complexity is O(n) linear
public boolean delete(T t) { boolean found = false; // is element with value t found Object[] newElements = new Object[elements.length]; // creating new array with size of "elements" int index = 0; // stores current index for(int i = 0; i < size; i++){ // treat all elements if(!found && elements[i] == t){ // if we have not found element with value t and current element has this value found = true; // we have found such element } else{ newElements[index] = elements[i]; // // copy elements in temporary array index++; // increment index } } elements = newElements; // move temporary array to main array "elements" size --; // decrement size return found; // return Is element with value t found? }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void remove(T t) {\n for (int i = 0; i < elementsInArray; i++) {\n if(t.equals(arrayList[i])) {\n arrayList[i] = null;\n elementsInArray--;\n return;\n }\n }\n }", "public T deleteFirst() {\n Object[]...
[ "0.70603627", "0.633042", "0.62611574", "0.6249314", "0.6232519", "0.59894335", "0.59737134", "0.5929669", "0.59001106", "0.5876825", "0.5871552", "0.5856196", "0.5854426", "0.58387274", "0.5827267", "0.5824652", "0.58117664", "0.57878864", "0.5726696", "0.5720312", "0.571761...
0.63594073
1
method delete(int i) remove the last element from the list it checks whether the variable i is valid then, creates new array with the same length, then it copies all elements except the element with index i after that it copies the remaining elements with one position left shifting finally, it returns the value of deleted element Time Complexity is O(n) linear
public T delete(int i) { if (i < 0 || i >= size) // if there is no index i in list throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + size()); // cause IndexOutOfBoundException Object[] newElements = new Object[elements.length]; // creating new array with size of "elements" T deletedValue = null; // save value of element that will be deleted if (size == 0) { // if list is empty throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + 0); // cause IndexOutOfBoundException } else if (size == 1) { // if size is 1 deletedValue = (T) elements[i]; // save value of deleted element elements = newElements; // move temporary array to main array "elements" } else { deletedValue = (T) elements[i]; // save value of deleted element for (int j = 0; j < i; j++) // treat all values with index less than i newElements[j] = elements[j]; // copy elements in temporary array for (int j = i; j < size - 1; j++) // treat all values with index greater than i newElements[j] = elements[j + 1]; // copy elements in temporary array size--; // decrement size elements = newElements; // move temporary array to main array "elements" } return deletedValue; // return value of element that will be deleted }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public E remove(int i) throws IndexOutOfBoundsException {\n checkIndex(i, size);\n E temp = data[i];\n for (int k = i; k < size - 1; k++) // shift element to fill hole\n data[k] = data[k + 1];\n data[size - 1] = null; // help garbage collection\n size-...
[ "0.7141458", "0.7060815", "0.69998246", "0.6953466", "0.6941567", "0.6910266", "0.6890521", "0.6876222", "0.68196744", "0.67903054", "0.6752407", "0.6749188", "0.67486656", "0.6744572", "0.6706654", "0.66449016", "0.6524177", "0.6502221", "0.64995706", "0.6489438", "0.6461676...
0.7802273
0
method deleteFirst() remove the first element from the list it creates new array with the same length, then it copies all elements except the first and return the value of deleted element Time Complexity is O(n) linear
public T deleteFirst() { Object[] newElements = new Object[elements.length]; // creating new array with size of "elements" T deletedValue = null; // save value of element that will be deleted if (size == 0) { // if list is empty throw new IndexOutOfBoundsException("Treated index: " + 0 + " | Size of the Dynamic Array " + 0); } else if (size == 1) { // if size is 1 deletedValue = (T) elements[0]; // save value of deleted element elements = newElements; // move temporary array to main array "elements" } else { deletedValue = (T) elements[0]; // save value of deleted element for (int i = 0; i < size - 1; i++) { // treat all values with index greater than 1 newElements[i] = elements[i + 1]; // copy elements in temporary array } elements = newElements; // move temporary array to main array "elements" } size--; // decrement size return deletedValue; // return value of element that will be deleted }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void deleteFirst() {\n if (this.isEmpty()){\n throw new IllegalStateException(\"List is empty\");\n }\n for (int j = 0; j < size - 1; j++){\n data[j] = data[j + 1];\n }\n data[size - 1] = null;\n size--;\n }", "@Override\n ...
[ "0.762808", "0.75744194", "0.74974054", "0.7362861", "0.72758067", "0.72700375", "0.7225714", "0.71543056", "0.7116029", "0.70964634", "0.70806473", "0.70797306", "0.70456654", "0.68774724", "0.6856541", "0.68331033", "0.67669076", "0.67483455", "0.67129433", "0.66963696", "0...
0.8263776
0
method deleteLast() remove the last element from the list it creates new array with the same length, then it copies all elements except the last and return the value of deleted element Time Complexity is O(n) linear
public T deleteLast() { Object[] newElements = new Object[elements.length]; // creating new array with size of "elements" T deletedValue; // if (size == 0) { // if list is empty throw new IndexOutOfBoundsException("Treated index: " + 0 + " | Size of the Dynamic Array " + 0); } else if (size == 1) { // if size is 1 deletedValue = (T) elements[elements.length - 1]; // save value of deleted element elements = newElements; // move temporary array to main array "elements" } else { deletedValue = (T) elements[elements.length - 1]; // save value of deleted element for (int i = 0; i < size - 1; i++) // treat all elements except the last one newElements[i] = elements[i]; // copy elements in temporary array elements = newElements; // move temporary array to main array "elements" } size--; // decrement size return deletedValue; // return previous value of last element }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T removeLast() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[rear];\n }\n this.checkReSizeDown();\n size--;\n rear--;\n this.updatePointer();\n return array[Math.floorMod(rea...
[ "0.76068497", "0.7439687", "0.7430201", "0.74259955", "0.7406086", "0.73057276", "0.72197187", "0.71646994", "0.7128954", "0.7120657", "0.71195656", "0.70502275", "0.7041026", "0.7020424", "0.69874626", "0.6868098", "0.68360245", "0.67603827", "0.6753613", "0.6749326", "0.666...
0.829718
0
method set(int i, T t) replaces element at position i with new element e it changes the value of element stored in an array with index i and returns an object that was stored in array with index i before value changing Time Complexity is O(1) constant
public T set(int i, T t) { if (i < 0 || i >= size) // if there is no index i in list throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + size()); // cause IndexOutOfBoundException T previousValue = (T) elements[i]; // store previous value of element with index i elements[i] = t; // set element with index i to t return previousValue; // return previous value of element with index i }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object set (int i, Object t)\r\n {\r\n }", "@Override\n // worst-case complexity: O(1), only assignments and array accesses\n public T set(int index, T item) {\n if (index < size && index >= 0) {\n T prev = arr[index];\n // replace the item\n arr[index] ...
[ "0.74435097", "0.7404326", "0.73810774", "0.7375247", "0.7361659", "0.72207564", "0.7130071", "0.7128156", "0.7090049", "0.7090049", "0.70748067", "0.6988286", "0.6988225", "0.69818586", "0.6972991", "0.6965925", "0.6932217", "0.6854048", "0.67922854", "0.6784514", "0.6724466...
0.8053582
0
method get(int i) retrieve element at position i it returns an object stored in an array with index i Time Complexity is O(1) constant
@SuppressWarnings("unchecked") public T get(int i) { if (i < 0 || i >= size) // if there is no index i in list throw new IndexOutOfBoundsException("Treated index: " + i + " | Size of the Dynamic Array " + size()); // cause IndexOutOfBoundException return (T) elements[i]; // return element with index i }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object get(int i);", "Object get(int index);", "Object get(int index);", "public Object get(int index);", "public Object get(int index);", "public Object get(int index) {\n\tif(index > arr.length) return null;\n\treturn arr[index];\n}", "@Override\n // worst-case complexity: O(1), it's basically jus...
[ "0.7884647", "0.7862725", "0.7862725", "0.7811654", "0.7811654", "0.7678454", "0.76223636", "0.75993884", "0.7595538", "0.75827736", "0.75827736", "0.7576707", "0.7576707", "0.7576707", "0.7576707", "0.7576707", "0.75705576", "0.75705576", "0.75705576", "0.7503997", "0.746897...
0.73517025
27
Assistive methods method size() returns the size of the Dynamic Array Time Complexity is O(1) constant
public int size() { return size; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int arraySize();", "public int size() {\n //encapsulate\n int size = this.array.length;\n return size;\n }", "int size() {\n\t\treturn array.length;\n\t}", "public int size (){\n return N;\n }", "public int size()\r\n { return N; }", "public int size(){\n\t...
[ "0.76706696", "0.7479186", "0.7375774", "0.72778004", "0.72305167", "0.7226266", "0.718397", "0.7151756", "0.71467245", "0.71341753", "0.7132479", "0.7132479", "0.7100664", "0.7086875", "0.7079043", "0.7076383", "0.70578027", "0.70467097", "0.70466644", "0.7042502", "0.702879...
0.0
-1
method ensureCapacity() double the capacity of the Dynamic Array it creates new array with increased length, then copies all elements of current array in this array and then assigns current array to new one Time Complexity is O(n) linear
private void ensureCapacity() { int newSize = elements.length * 2; Object[] newElements = new Object[newSize]; for (int i = 0; i < elements.length; i++) { newElements[i] = elements[i]; } elements = newElements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void ensureCapacity(int newCapacity) {\n\t\t\t data = Arrays.copyOf(data, newCapacity * 2);\n\t\t\t this.capacity = newCapacity * 2;\n\t\t }", "private void ensureCapacity() {\n\t\tif (numberOfElements == capacity) {\n\t\t\tT[] newArray = (T[])new Object[(numberOfElements+1) * CAPACITY_MULTIPLIER];\n\t\t...
[ "0.74355954", "0.73727447", "0.73171073", "0.7279275", "0.7147237", "0.71083957", "0.7107402", "0.7070864", "0.7034882", "0.7000838", "0.6972654", "0.69267106", "0.690593", "0.6887336", "0.687732", "0.6870693", "0.6865834", "0.6858927", "0.6836334", "0.68337744", "0.6799619",...
0.73769885
1
method toString() returns the string interpretation of the Dynamic Array Time Complexity is O(n) linear
public String toString() { String temp = ""; temp += "[ "; for (int i = 0; i < elements.length - 1; i++) { temp += elements[i] + ","; } temp += elements[this.elements.length - 1]; temp += " ]\n"; return temp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString() {\n\t\tString str = new String ();\n\t\tfor (int i = 0; i <size; i++)\n\t\t{\n\t\t\tstr +=\"(\" + i +\")\" + arr[i] + \"\\n\";\n\t\t}\n\t\treturn str;\n\t}", "public String toString() {\n if (N == 0) return \"[ ]\";\n String s = \"\";\n s = s + \"[ \";\n for ...
[ "0.71447587", "0.7126797", "0.69063455", "0.68889993", "0.6864462", "0.6840972", "0.6816762", "0.6797534", "0.67969716", "0.67910486", "0.67711425", "0.6770553", "0.6743213", "0.6710861", "0.6663064", "0.6637717", "0.6611937", "0.6603598", "0.6495593", "0.6485447", "0.6461919...
0.60865307
56
private BiMap SdkUser = Maps.synchronizedBiMap(HashBiMap.create());
@Override public void handleInit() { Integer curMaxPlayerId = playerDao.selectMaxPlayerId(); if (curMaxPlayerId == null) { curMaxPlayerId = 0; } maxPlayerId = (curMaxPlayerId / 1000); LocalDateTime dateTime = LocalDateTime.now(); int second = dateTime.getSecond(); int minute = dateTime.getMinute() % 5; timerService.scheduleAtFixedRate(new Runnable() { //每5分钟检测一次,活动开关 @Override public void run() { try { doCheckTimeOut(); } catch (Exception e) { ServerLogger.err(e, "内存检测异常"); } } }, (4 - minute) * 60 + (60 - second), 5 * 60, TimeUnit.SECONDS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public SharedData(ConcurrentHashMap<String, User> userMap) {\n this.mapOfLoggedInUsersByConnectedIds = new ConcurrentHashMap<>();\n this.mapOfRegisteredUsersByUsername = userMap;\n }", "public static HashMap<Long, User> userMapInit() {\n HashMap<Long, User> userMap = new HashMap<Long, Use...
[ "0.6383905", "0.62971187", "0.60475487", "0.6035612", "0.5910234", "0.5870377", "0.5797515", "0.5779249", "0.57623", "0.5724848", "0.56864464", "0.5646336", "0.564312", "0.55802155", "0.5507739", "0.5498498", "0.5490004", "0.54768264", "0.5450639", "0.5442972", "0.54215527", ...
0.0
-1
A generic interface for representing composite keys in data stores that use a bucket and key pair.
public interface BucketKeyPair<B, K> { /** * Get the bucket representation. * * @return */ B getBucket(); /** * Get the key representation. * * @return */ K getKey(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public CompositeKey(double startPrice,double endPrice){\n\t this.key1=startPrice;\n\t this.key2=endPrice;\n }", "interface Bucket extends MultiBucketsAggregation.Bucket {}", "abstract public String getKey();", "public interface Bucket {\n String getUid();\n\n String getName();\n\n Uri getImage...
[ "0.6670252", "0.6198553", "0.6074657", "0.59068316", "0.58303857", "0.5811057", "0.5763683", "0.5732558", "0.5718785", "0.570441", "0.5680401", "0.56076634", "0.55806786", "0.5535342", "0.55282956", "0.5525804", "0.5517863", "0.54707533", "0.54474026", "0.5397028", "0.538635"...
0.7413909
0
Get the bucket representation.
B getBucket();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getBucket();", "public String getBucket() {\n return bucket;\n }", "@java.lang.Override\n public com.google.protobuf.ByteString getGcsBucketBytes() {\n java.lang.Object ref = gcsBucket_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b =\n ...
[ "0.74450624", "0.7444667", "0.6631115", "0.6618154", "0.65964174", "0.6538197", "0.65292335", "0.64291835", "0.64267373", "0.6421582", "0.64060223", "0.63522804", "0.626638", "0.626638", "0.6243037", "0.62183666", "0.6194888", "0.61523503", "0.61158234", "0.6098888", "0.60542...
0.7446115
0
Get the key representation.
K getKey();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getKey() {\n Object ref = key_;\n if (ref instanceof String) {\n return (String) ref;\n } else {\n com.google.protobuf.ByteString bs = \n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n ke...
[ "0.7883103", "0.7878083", "0.7768571", "0.77516603", "0.774592", "0.7683487", "0.7683487", "0.7683487", "0.7683487", "0.7632131", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.7620415", "0.75950307", ...
0.0
-1
displays or hides tutorial depending on whether it is in view or not
@Override public void onClick(View v) { toggleTutorial(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void toggleTutorial(){\n final RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n if(relLayoutTutorial.getVisibility() == View.VISIBLE){\n relLayoutTutorial.setVisibility(View.GONE);\n }else{\n relLayoutTutorial.setVisibility(V...
[ "0.7643905", "0.7085756", "0.69813466", "0.65988517", "0.654705", "0.6338231", "0.6189351", "0.617932", "0.61252004", "0.60842645", "0.5916989", "0.5903919", "0.58485436", "0.5816203", "0.5790957", "0.57833284", "0.577", "0.575967", "0.5751328", "0.5738212", "0.57323915", "...
0.71236986
1
Shows a popover displaying nearby memories
@Override public void onClick(View v) { showMemoriesPopover(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void showMemoriesPopover(){\n\n RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n relLayoutTutorial.setVisibility(View.GONE);\n\n FragmentManager fm = getActivity().getSupportFragmentManager();\n RecyclerViewPopoverFragment recyclerViewPopov...
[ "0.6421665", "0.6088149", "0.6005732", "0.58114076", "0.57255524", "0.5713671", "0.56944036", "0.5675219", "0.557632", "0.55250674", "0.54891956", "0.54525125", "0.54114574", "0.5401078", "0.5325711", "0.5270332", "0.5251371", "0.52272636", "0.5217943", "0.5157134", "0.515593...
0.6819796
0
If the tutorial is visible, makes it invisible. Otherwise, makes it visible
private void toggleTutorial(){ final RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial); if(relLayoutTutorial.getVisibility() == View.VISIBLE){ relLayoutTutorial.setVisibility(View.GONE); }else{ relLayoutTutorial.setVisibility(View.VISIBLE); } Button btnCloseTutorial = (Button) view.findViewById(R.id.btn_close_tutorial); btnCloseTutorial.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { relLayoutTutorial.setVisibility(View.GONE); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n toggleTutorial();\n }", "@Override\n public void makeHidden(Player viewer) {\n \n }", "@Override\n public void makeVisible(Player viewer) {\n \n }", "void setVisible(boolean visible);", "void setVisib...
[ "0.67685497", "0.64766", "0.64659804", "0.63751376", "0.63751376", "0.63582265", "0.63448584", "0.633586", "0.6316332", "0.6315626", "0.6253637", "0.6249143", "0.62435216", "0.62417626", "0.6241612", "0.62415093", "0.6239908", "0.6238205", "0.6238019", "0.62127686", "0.616687...
0.7611565
0
Sets up the map if necessary and possible
@Override /***** Sets up the map if it is possible to do so *****/ public boolean setUpMapIfNeeded() { super.setUpMapIfNeeded(); if (mMap != null) { //Shows history popover on marker clicks mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() { @Override public boolean onMarkerClick(Marker marker) { showPopup(getContentFromMarker(marker), marker.getTitle()); return true; } }); return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setUp()\n {\n map = new Map(5, 5, null);\n }", "private static void initializeMaps()\n\t{\n\t\taddedPoints = new HashMap<String,String[][][]>();\n\t\tpopulatedList = new HashMap<String,Boolean>();\n\t\tloadedAndGenerated = new HashMap<String,Boolean>();\n\t}", "private void setUpMapIfN...
[ "0.80326766", "0.79645276", "0.7747342", "0.7603531", "0.7602365", "0.7577948", "0.754285", "0.7537578", "0.7503267", "0.7495252", "0.74233246", "0.7408984", "0.7400406", "0.7382166", "0.7359721", "0.73532736", "0.73339814", "0.731387", "0.7308024", "0.7300076", "0.72977406",...
0.0
-1
Sets up the map (should only be called if mMap is null) Monitors the zoom and target of the camera and changes them if the user zooms out too much or scrolls map too far off campus.
@Override protected void setUpMap() { super.setUpMap(); // For showing a move to my location button and a blue // dot to show user's location MainActivity mainActivity = (MainActivity) getActivity(); mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setupMapView(){\n Log.d(TAG, \"setupMapView: Started\");\n\n view_stage_map = VIEW_MAP_FULL;\n cycleMapView();\n\n }", "private void setUpMap() {\n Log.i(TAG, \"in setUpMap()\");\n // Set listeners for marker events. See the bottom of this class for their behavior.\n ...
[ "0.74766177", "0.7335512", "0.72934926", "0.72813785", "0.72737455", "0.7257498", "0.7254318", "0.72446555", "0.7224824", "0.72100985", "0.7166344", "0.7165808", "0.713955", "0.7085555", "0.70812017", "0.70377433", "0.70377433", "0.70377433", "0.7026566", "0.7025553", "0.7023...
0.69066256
30
Lifecycle method overridden to set up the map and check for internet connectivity when the fragment comes into focus. If fragment is not already monitoring geofences, begins monitoring geofences
@Override public void onResume() { super.onResume(); MainActivity mainActivity = (MainActivity) getActivity(); if(mainActivity.isConnectedToNetwork()) { setUpMapIfNeeded(); } if(mainActivity.checkIfGPSEnabled() && !isMonitoringGeofences) { //starts the mainActivity monitoring geofences mainActivity.getGeofenceMonitor().startGeofenceMonitoring(); isMonitoringGeofences = true; } mMap.setMyLocationEnabled(mainActivity.checkIfGPSEnabled()); if(needToCallUpdateGeofences) { updateGeofences(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void onResume() {\n super.onResume();\n if (mMap != null) {\n requestLocation();\n }\n }", "private void setupMap() {\n int status = GooglePlayServicesUtil.isGooglePlayServicesAvailable(getBaseContext());\n \t\tif ( status != ConnectionResult.SU...
[ "0.6839269", "0.6742001", "0.6609197", "0.6577383", "0.64237255", "0.642361", "0.6394509", "0.63915294", "0.6358422", "0.62973565", "0.62841034", "0.62802714", "0.6280141", "0.626438", "0.6222661", "0.6206513", "0.6204807", "0.6203376", "0.6200348", "0.6200348", "0.6199764", ...
0.72428364
0
Adds a marker to the map for each item in geofenceToAdd
private void addMarker(HashMap<String, GeofenceInfoContent[]> geofenceToAdd){ System.gc(); MainActivity mainActivity = (MainActivity) getActivity(); for(Map.Entry<String, GeofenceInfoContent[]> e : geofenceToAdd.entrySet()){ if(!currentGeofencesInfoMap.containsKey(e.getKey())) { currentGeofencesInfoMap.put(e.getKey(), e.getValue()); geofenceNamesBeingQueriedForInfo.remove(e.getKey()); String curGeofenceName = e.getKey(); GeofenceObjectContent geofence = mainActivity.getGeofenceMonitor().curGeofencesMap.get(curGeofenceName); Bitmap markerIcon = BitmapFactory.decodeResource(getResources(), R.drawable.basic_map_marker); LatLng position = new LatLng(geofence.getGeofence().getLocation().getLat(), geofence.getGeofence().getLocation().getLng()); BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(markerIcon); MarkerOptions geofenceMarkerOptions = new MarkerOptions() .position(position) .title(curGeofenceName) .icon(icon); Marker curGeofenceMarker = mMap.addMarker(geofenceMarkerOptions); currentGeofenceMarkers.add(curGeofenceMarker); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addMarkers() {\n\n Map<String, ProductDetailsCartItem> restaurantGeolocations = new HashMap<>();\n for (UserProductsItem userProductsItem : userProductsItemList) {\n for (ProductDetailsCartItem productDetailsCartItem : userProductsItem.getCartDetails()) {\n ProductDetai...
[ "0.69940007", "0.680524", "0.6769225", "0.6711899", "0.6628256", "0.6602882", "0.65937304", "0.64027655", "0.63583404", "0.6335168", "0.62552905", "0.62250954", "0.61199206", "0.61186486", "0.6050456", "0.603629", "0.60235924", "0.6020985", "0.60167444", "0.5995514", "0.59531...
0.80823714
0
Displays text stating which geofences the user is currently in. Used only in debug mode
private void displayGeofenceInfo(){ TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info); locationView.setVisibility(View.VISIBLE); MainActivity mainActivity = (MainActivity) getActivity(); String displayString = getResources().getString(R.string.currently_in_geofences_for); boolean showString = false; if(mainActivity.getGeofenceMonitor().curGeofences == null){ return; } for(int i = 0; i<mainActivity.getGeofenceMonitor().curGeofences.size(); i++){ displayString += mainActivity.getGeofenceMonitor().curGeofences.get(i).getName() + " "; showString = true; } if(showString) { locationView.setText(displayString); } else { locationView.setText(getResources().getString(R.string.no_items)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n ...
[ "0.6071204", "0.59258527", "0.58099604", "0.57975274", "0.5791252", "0.57669216", "0.5764866", "0.56921315", "0.5665048", "0.5628926", "0.5612298", "0.5590993", "0.5586894", "0.5583601", "0.55816734", "0.5579155", "0.555908", "0.5558378", "0.5450082", "0.544656", "0.5404191",...
0.80681247
0
Handles the result of a query for information about a geofence.
@Override public void handleResult(GeofenceInfoObject result) { super.handleResult(result); /*This is a call from the VolleyRequester, so this check prevents the app from crashing if the user leaves the tab while the app is trying to get quests from the server */ if(this.isResumed()) { MainActivity mainActivity = (MainActivity) getActivity(); if(mainActivity != null) { final Button btnRequestInfo = (Button) view.findViewById(R.id.btn_request_info); final TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences); if(result == null){ if(currentGeofences != null){ if(currentGeofences.size() != 0){ //If the result is null and it shouldn't be, displays error and allows user to request //information again btnRequestInfo.setVisibility(View.VISIBLE); txtRequestGeofences.setText(getResources().getString(R.string.no_info_retrieved)); txtRequestGeofences.setVisibility(View.VISIBLE); btnRequestInfo.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { txtRequestGeofences.setText(getResources().getString(R.string.retrieving_info)); btnRequestInfo.setVisibility(View.GONE); handleGeofenceChange(currentGeofences); } }); } } } if (result != null) { try { Log.i(logMessages.GEOFENCE_MONITORING, "handleResult: result length is: " + result.getContent().size()); Log.i(logMessages.GEOFENCE_MONITORING, "handleResult: result is: " + result.getContent().toString()); btnRequestInfo.setVisibility(View.GONE); txtRequestGeofences.setVisibility(View.GONE); if(debugMode) { displayGeofenceInfo(); } addMarker(result.getContent()); } catch (NullPointerException e) { e.printStackTrace(); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayGeofenceInfo(){\n TextView locationView = (TextView) view.findViewById(R.id.txt_geopoint_info);\n locationView.setVisibility(View.VISIBLE);\n MainActivity mainActivity = (MainActivity) getActivity();\n String displayString = getResources().getString(R.string.currentl...
[ "0.62086153", "0.60002273", "0.59638995", "0.5807675", "0.57891744", "0.56403184", "0.5603463", "0.54775006", "0.54085666", "0.5386164", "0.5375096", "0.5328885", "0.532189", "0.53129303", "0.5310012", "0.52274275", "0.52180725", "0.52096516", "0.51890314", "0.5176349", "0.51...
0.61919886
1
Updates map view to reflect user's new location
@Override public void handleLocationChange(Location newLocation) { super.handleLocationChange(newLocation); MainActivity mainActivity = (MainActivity) getActivity(); mainActivity.getGeofenceMonitor().handleLocationChange(newLocation); setCamera(); if(mainActivity.getGeofenceMonitor().currentLocation != null) { if(debugMode) { TextView txt_lat = (TextView) view.findViewById(R.id.txt_lat); TextView txt_long = (TextView) view.findViewById(R.id.txt_long); txt_lat.setVisibility(View.VISIBLE); txt_long.setVisibility(View.VISIBLE); txt_lat.setText("Latitude: " + mainActivity.getGeofenceMonitor().currentLocation.getLatitude()); txt_long.setText("Longitude: " + mainActivity.getGeofenceMonitor().currentLocation.getLongitude()); } setUpMapIfNeeded(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onLocationChange(Location loc) {\n user.setRelativePosition(loc.getX(), loc.getY());\n map.addStep(new PointF(loc.getX(), loc.getY()));\n //messageHandler.sendEmptyMessage(MESSAGE_REFRESH);\n }", "@Override\r\n\tpublic void onLocationChange(Location loc) {\n\t\t...
[ "0.7401772", "0.7381851", "0.73349017", "0.7290627", "0.72743934", "0.720776", "0.7167821", "0.71270406", "0.71250355", "0.71250355", "0.71250355", "0.7105738", "0.7075215", "0.70741415", "0.70314574", "0.6946418", "0.69450843", "0.69441915", "0.6930185", "0.6906686", "0.6878...
0.68126506
26
Returns the GeofenceInfoContent[] of info that each marker represents
private GeofenceInfoContent[] getContentFromMarker(Marker marker){ return currentGeofencesInfoMap.get(marker.getTitle()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Marker> getMarkers() {\n return this.markers.obtainAll();\n }", "public List<UserMarker> getMarkers() {\n List<UserMarker> markers = new ArrayList<>();\n\n Query query = new Query(\"UserMarker\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : resul...
[ "0.66116625", "0.6264297", "0.6077777", "0.5629442", "0.55602294", "0.5550244", "0.5525342", "0.53260607", "0.53245085", "0.530638", "0.53034556", "0.5290002", "0.5264398", "0.52630574", "0.5234221", "0.522317", "0.52167743", "0.5201473", "0.5200572", "0.5197761", "0.5197761"...
0.8072234
0
Shows the history popover for a given marker on the map
private void showPopup(GeofenceInfoContent[] geofenceInfoObject, String name){ RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial); relLayoutTutorial.setVisibility(View.GONE); GeofenceInfoContent[] sortedContent = sortByDate(geofenceInfoObject); FragmentManager fm = getActivity().getSupportFragmentManager(); RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(sortedContent, name); // Transaction start FragmentTransaction fragmentTransaction = fm.beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom, R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom); fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, "RecyclerViewPopoverFragment"); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showHistory(){\n \tif (historyExample==null) historyExample = new HistoryExample();\n setWidgetAsExample(historyExample);\n }", "public void showMarkerInfo(OperaFirebase mapMarker){\n Intent i = new Intent(this, MarkerInfoActivity.class);\n i.putExtra(\"MapMarker\", mapMark...
[ "0.63299465", "0.61616784", "0.6149679", "0.6097017", "0.6056507", "0.60302716", "0.5989299", "0.59260255", "0.5918066", "0.591543", "0.5892186", "0.587989", "0.58617526", "0.5849738", "0.58493984", "0.58442295", "0.5842387", "0.5842387", "0.5745802", "0.57326007", "0.5709019...
0.5159994
74
Uses bubble sort to sort geofenceInfoContents by date
private GeofenceInfoContent[] sortByDate(GeofenceInfoContent[] geofenceInfoContents){ GeofenceInfoContent infoContent = null; for(int j = 0; j < geofenceInfoContents.length; j++) { for (int i = 0; i < geofenceInfoContents.length; i++) { infoContent = geofenceInfoContents[i]; if (i < geofenceInfoContents.length - 1) { String year1 = infoContent.getYear(); String year2 = geofenceInfoContents[i + 1].getYear(); int year1Int = Integer.parseInt(year1); int year2Int = Integer.parseInt(year2); if (year1Int < year2Int) { geofenceInfoContents[i] = geofenceInfoContents[i + 1]; geofenceInfoContents[i + 1] = infoContent; } } } } return geofenceInfoContents; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sortViewEntries() {\n runOnUiThread(new Runnable() {\n public void run() {\n try {\n Collections.sort(viewEntries, new DateComparator());\n } catch (final Exception ex) {\n // Log.i(\"sortViewEntries\", \"Exception i...
[ "0.6691224", "0.6630784", "0.66227955", "0.66059977", "0.6596296", "0.65893143", "0.6554003", "0.6434165", "0.6202342", "0.6201763", "0.6182071", "0.6168744", "0.6159904", "0.61578053", "0.6120382", "0.60800344", "0.60773444", "0.59648716", "0.5932675", "0.5904547", "0.586602...
0.8073883
0
Testing function to draw circles on maps to show the geofences we are currently monitoring. Helps to ensure that we are getting geofences from server
public void drawGeofences(GeofenceObjectContent[] geofences) { MainActivity mainActivity = (MainActivity) getActivity(); mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences; if(debugMode) { if(geofences != null) { mMap.clear(); for (int i = 0; i < geofences.length; i++) { carleton150.edu.carleton.carleton150.POJO.GeofenceObject.Geofence geofence = geofences[i].getGeofence(); CircleOptions circleOptions = new CircleOptions(); GeofenceObjectLocation location = geofence.getLocation(); double lat = location.getLat(); double lon = location.getLng(); circleOptions.center(new LatLng(lat, lon)); circleOptions.radius(geofence.getRadius()); circleOptions.strokeColor(R.color.colorPrimary); circleOptions.strokeWidth(5); mMap.addCircle(circleOptions); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setUpMap() {\n if (points.size()>2) {\n drawCircle();\n }\n\n\n }", "public void drawCircle() {\n mMap.clear();\n // Generate the points\n mMap.addPolygon(new PolygonOptions().addAll(points).strokeWidth(5).strokeColor(Color.RED).fillColor(Color.TRANSP...
[ "0.64598536", "0.6452937", "0.64376193", "0.61442536", "0.59919214", "0.5953862", "0.5888364", "0.5888015", "0.5803986", "0.57872224", "0.5779036", "0.57405937", "0.573912", "0.57311225", "0.57035756", "0.5684595", "0.5628858", "0.56068265", "0.55913997", "0.5589005", "0.5566...
0.77183723
0
Called from VolleyRequester. Handles the JSONObjects received when we requested new geofences from the server
@Override public void handleNewGeofences(GeofenceObjectContent[] geofencesContent){ /*This is a call from the VolleyRequester, so this check prevents the app from crashing if the user leaves the tab while the app is trying to get quests from the server */ MainActivity mainActivity = (MainActivity) getActivity(); if(mainActivity == null){ return; } try { Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences); TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences); Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : handleNewGeofences"); if (mainActivity != null) { Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : mainActivity not null"); if (geofencesContent != null) { Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : geofencesContent not null"); btnRequestGeofences.setVisibility(View.GONE); txtRequestGeofences.setVisibility(View.GONE); mainActivity.getGeofenceMonitor().handleNewGeofences(geofencesContent); drawGeofences(geofencesContent); } else if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0 || geofencesContent == null){ btnRequestGeofences.setVisibility(View.VISIBLE); txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved)); txtRequestGeofences.setVisibility(View.VISIBLE); } } }catch (IllegalStateException e){ e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) {\n super.handleGeofenceChange(currentGeofences);\n MainActivity mainActivity = (MainActivity) getActivity();\n\n for (int i = 0; i<currentGeofenceMarkers.size(); i++){\n boolean remov...
[ "0.7100442", "0.65934557", "0.6489957", "0.6313687", "0.6255934", "0.6127957", "0.61108184", "0.5989835", "0.59479624", "0.59221226", "0.590204", "0.58635575", "0.5862303", "0.5800918", "0.5775706", "0.5745935", "0.571246", "0.56801474", "0.564048", "0.56118226", "0.56114006"...
0.6964703
1
When geofences change, queries database for information about geofences
@Override public void handleGeofenceChange(ArrayList<GeofenceObjectContent> currentGeofences) { super.handleGeofenceChange(currentGeofences); MainActivity mainActivity = (MainActivity) getActivity(); for (int i = 0; i<currentGeofenceMarkers.size(); i++){ boolean removeMarker = true; for(int j =0; j<currentGeofences.size(); j++){ if(currentGeofenceMarkers.get(i).getTitle().equals(currentGeofences.get(j).getName())){ removeMarker = false; } } if(removeMarker){ currentGeofenceMarkers.get(i).remove(); currentGeofencesInfoMap.remove(currentGeofencesInfoMap.get(currentGeofenceMarkers.get(i).getTitle())); currentGeofenceMarkers.remove(i); } } this.currentGeofences = currentGeofences; if(mainActivity != null && currentGeofences != null) { if (mainActivity.isConnectedToNetwork()) { ArrayList<GeofenceObjectContent> singleGeofence = new ArrayList<>(1); for(int i = 0; i<currentGeofences.size(); i++){ if(!currentGeofencesInfoMap.containsKey(currentGeofences.get(i).getName()) && !geofenceNamesBeingQueriedForInfo.containsKey(currentGeofences.get(i).getName())){ singleGeofence.clear(); singleGeofence.add(currentGeofences.get(i)); geofenceNamesBeingQueriedForInfo.put(currentGeofences.get(i).getName(), 0); Log.i(logMessages.VOLLEY, "handleGeofenceChange : about to query database : " + singleGeofence.toString()); volleyRequester.request(this, singleGeofence); } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void populateGeofencesList() {\n ArrayList<GeofenceObjects> returnlist = currentList;\n geofences.clear();\n for (GeofenceObjects geofenceObjects : returnlist) {\n geofences.add(geofenceObjects.getGeofenceName());\n }\n }", "public void drawGeofences(GeofenceObje...
[ "0.7011064", "0.6466031", "0.625931", "0.6242231", "0.61471605", "0.5948408", "0.59174", "0.59025955", "0.56942034", "0.5623643", "0.5615015", "0.559109", "0.5550121", "0.5533829", "0.55001986", "0.5473227", "0.54694474", "0.543259", "0.54299784", "0.5427853", "0.54166126", ...
0.72502613
0
Gets new geofences and draws markers on the map
public void updateGeofences() { MainActivity mainActivity = (MainActivity) getActivity(); if(view != null) { Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : updateGeofences : view is not null "); Button btnRequestGeofences = (Button) view.findViewById(R.id.btn_request_geofences); TextView txtRequestGeofences = (TextView) view.findViewById(txt_try_getting_geofences); Log.i(logMessages.GEOFENCE_MONITORING, "HistoryFragment : updateGeofences : about to get new geofences "); boolean gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences(); if (!gotGeofences) { btnRequestGeofences.setVisibility(View.VISIBLE); txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved)); } if (mainActivity.getGeofenceMonitor().allGeopointsByName.size() == 0) { gotGeofences = mainActivity.getGeofenceMonitor().getNewGeofences(); if (!gotGeofences) { btnRequestGeofences.setVisibility(View.VISIBLE); txtRequestGeofences.setText(getResources().getString(R.string.no_geofences_retrieved)); }else{ btnRequestGeofences.setVisibility(View.GONE); txtRequestGeofences.setVisibility(View.GONE); } } else { if (txtRequestGeofences != null) { txtRequestGeofences.setVisibility(View.GONE); btnRequestGeofences.setVisibility(View.GONE); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawGeofences(GeofenceObjectContent[] geofences) {\n MainActivity mainActivity = (MainActivity) getActivity();\n mainActivity.getGeofenceMonitor().geofencesBeingMonitored = geofences;\n if(debugMode) {\n if(geofences != null) {\n mMap.clear();\n ...
[ "0.7627845", "0.6985864", "0.65373707", "0.65079224", "0.6486823", "0.6435145", "0.6427536", "0.63426584", "0.6274068", "0.62357414", "0.6185849", "0.6172695", "0.6130096", "0.6031238", "0.5998671", "0.59968066", "0.59808135", "0.5975515", "0.59485203", "0.5944535", "0.590716...
0.5802652
23
Shows a popover to display nearby memories
private void showMemoriesPopover(){ RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial); relLayoutTutorial.setVisibility(View.GONE); FragmentManager fm = getActivity().getSupportFragmentManager(); RecyclerViewPopoverFragment recyclerViewPopoverFragment = RecyclerViewPopoverFragment.newInstance(this); // Transaction start FragmentTransaction fragmentTransaction = fm.beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom, R.anim.abc_slide_in_bottom, R.anim.abc_slide_out_bottom); fragmentTransaction.add(R.id.fragment_container, recyclerViewPopoverFragment, "RecyclerViewPopoverFragment"); fragmentTransaction.addToBackStack(null); fragmentTransaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n showMemoriesPopover();\n }", "public void showAddMemoriesPopover(){\n Log.i(logMessages.MEMORY_MONITORING, \"HistoryFragment : showAddMemoriesPopover called\");\n FragmentManager fm = getActivity().getSupportFragmentMa...
[ "0.68409836", "0.616995", "0.60707116", "0.5902692", "0.58571774", "0.58503467", "0.57764995", "0.5771913", "0.5694098", "0.5623028", "0.5504711", "0.5465601", "0.5436312", "0.5425514", "0.5414868", "0.54069775", "0.53985417", "0.53372216", "0.530614", "0.52899295", "0.524269...
0.65095043
1
shows a popover for user to add a memory
public void showAddMemoriesPopover(){ Log.i(logMessages.MEMORY_MONITORING, "HistoryFragment : showAddMemoriesPopover called"); FragmentManager fm = getActivity().getSupportFragmentManager(); AddMemoryFragment addMemoryFragment = AddMemoryFragment.newInstance(); // Transaction start FragmentTransaction fragmentTransaction = fm.beginTransaction(); fragmentTransaction.setCustomAnimations(R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom, R.anim.abc_slide_in_top, R.anim.abc_slide_out_bottom); fragmentTransaction.replace(R.id.fragment_container, addMemoryFragment, "AddMemoriesFragment"); fragmentTransaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View v) {\n showMemoriesPopover();\n }", "private void showMemoriesPopover(){\n\n RelativeLayout relLayoutTutorial = (RelativeLayout) view.findViewById(R.id.tutorial);\n relLayoutTutorial.setVisibility(View.GONE);\n\n Fragm...
[ "0.6372831", "0.59155583", "0.5736473", "0.5736473", "0.5736473", "0.57022357", "0.566013", "0.566013", "0.56319857", "0.56183463", "0.56144", "0.56144", "0.56144", "0.56144", "0.56144", "0.56144", "0.56144", "0.56144", "0.5608136", "0.5608136", "0.5608136", "0.5608136", ...
0.7024334
0
recherche et retourne le noeud parent du noeud new_node
public FuzzyNode ParentNode( FuzzyNode new_node ) throws Exception { for( int i=0 ; i<this.Nodes.size() ; i++ ) // parmis tous les noeud enregistrés if( ((FuzzyNode)this.Nodes.elementAt(i)).Node() == new_node.Parent() ) return (FuzzyNode)this.Nodes.elementAt(i); throw new Exception( LocaleKBCT.GetString("ParentNode") + ": " + Integer.toString(new_node.Parent()) + " " + LocaleKBCT.GetString("NotFoundForNode") + ": " + Integer.toString(new_node.Node()) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void findNewParent() {\n\t\t\tif (parent != null)\n\t\t\t\tparent.children.remove(this);\n\t\t\tNodeLayout[] predecessingNodes = node.getPredecessingNodes();\n\t\t\tparent = null;\n\t\t\tfor (int i = 0; i < predecessingNodes.length; i++) {\n\t\t\t\tTreeNode potentialParent = (TreeNode) owner.layoutToTree...
[ "0.70486903", "0.6875729", "0.6761636", "0.6559619", "0.6527358", "0.65085053", "0.63644207", "0.6353561", "0.63293535", "0.6236284", "0.6231873", "0.61973995", "0.6174963", "0.6143882", "0.6114219", "0.6103558", "0.6070226", "0.6056039", "0.602394", "0.59917533", "0.5986297"...
0.73806024
0
retourne le numero du noeud parent
public int Parent() { return this.Parent; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getParentCounter(){\r\n\t\tint returning = parentCounter;\r\n\t\tparentCounter++;\r\n\t\treturn returning;\r\n\t}", "public Integer getnParentid() {\n return nParentid;\n }", "public int getParent();", "public int getParent_id() {\n return this.parent_id;\n }", "public static int s...
[ "0.75537616", "0.7492954", "0.7303945", "0.7224561", "0.7182937", "0.7177423", "0.71321154", "0.71264297", "0.7091544", "0.6969355", "0.69649416", "0.6943481", "0.6919506", "0.6888873", "0.68871397", "0.6865244", "0.6843176", "0.68371063", "0.68045413", "0.67929655", "0.67865...
0.70561165
9
retourne le numero du noeud
public int Node() { return this.Node; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumNudo() {\n return numNudo;\n }", "private int getNumero() {\n\t\treturn numero;\n\t}", "int generarNumeroNota();", "public int getNumero() {\n return numero;\n }", "public int getNumero() {\n\t\treturn numero;\n\t}", "public int getNumero() {\n\t\treturn numero;\n\t}"...
[ "0.73512226", "0.73351806", "0.69819546", "0.6973108", "0.6959032", "0.6959032", "0.6959032", "0.69193566", "0.6910129", "0.68740475", "0.6871815", "0.68370163", "0.6823871", "0.67610645", "0.66672707", "0.66120064", "0.6611613", "0.66031975", "0.6601585", "0.6598183", "0.657...
0.0
-1
rempli le vecteur display_variables avec le nom des variables
public void InitVariablesGroups( Vector display_variables, Vector params ) { display_variables.add(new DisplayVariableGroup(new String("Samples"))); display_variables.add(new DisplayVariableGroup(new String("Entropie"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayVariables() {\n Iterator i = dvm.getVariableNames().iterator();\n Object temp;\n while(i.hasNext()){\n temp = i.next();\n System.out.print(temp + \": \" + dvm.getValue(temp.toString()) + \"\\n\");\n }\n }", "public void displayVariable...
[ "0.7844046", "0.6485383", "0.6387944", "0.6365872", "0.62232906", "0.61352473", "0.6104218", "0.6062639", "0.60352707", "0.60275507", "0.6016332", "0.6012956", "0.59886104", "0.5872097", "0.5844917", "0.58215255", "0.5811076", "0.58100134", "0.5783019", "0.5757543", "0.575112...
0.65636903
1
nombre de classes pour la classif
public FuzzyNodeClassif( String buffer, int nb_class ) throws Exception { super( buffer ); this.nb_class = nb_class; // lecture du noeud this.Variables.add(new Integer(st.nextToken().trim()) ); // lecture de la classe majoritaire for( int i=0 ; i<nb_class ; i++ ) this.Variables.add(new Double(st.nextToken().trim())); // lecture des effectifs par classe }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getClazzName();", "public String getClassName();", "String getClassName();", "String getClassName();", "String getClassName();", "public int getNumOfClasses();", "private String getClassname() {\r\n\t\tString classname = this.getClass().getName();\r\n\t\tint index = classname.lastIndexOf(...
[ "0.745797", "0.73111176", "0.72620255", "0.72620255", "0.72620255", "0.7186412", "0.7148621", "0.7092385", "0.70412844", "0.6911607", "0.69111824", "0.6905573", "0.6877526", "0.6859231", "0.68451774", "0.6777167", "0.6777167", "0.6763394", "0.6736492", "0.67231286", "0.672312...
0.0
-1
rempli le vecteur display_variables avec le nom des variables
public void InitVariablesGroups( Vector display_variables, Vector params ) { super.InitVariablesGroups(display_variables, params); // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes display_variables.add(new DisplayVariableGroup(new String("MajorityClass"), new String("Majority\nClass"))); // les effectifs par classe sont gérés par un groupe de variables ClassEffectif DisplayVariableGroup new_dv = new DisplayVariableGroup(new String("ClassEffectif"), Integer.toString(1)); for( int i=1 ; i<this.nb_class ; i++ ) new_dv.AddVariableName(Integer.toString(i+1)); display_variables.add(new_dv); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayVariables() {\n Iterator i = dvm.getVariableNames().iterator();\n Object temp;\n while(i.hasNext()){\n temp = i.next();\n System.out.print(temp + \": \" + dvm.getValue(temp.toString()) + \"\\n\");\n }\n }", "public void InitVariablesGr...
[ "0.7844046", "0.65636903", "0.6485383", "0.6387944", "0.6365872", "0.62232906", "0.61352473", "0.6104218", "0.6062639", "0.60352707", "0.60275507", "0.6016332", "0.6012956", "0.59886104", "0.5872097", "0.5844917", "0.58215255", "0.5811076", "0.58100134", "0.5783019", "0.57575...
0.57511294
21
rempli le vecteur display_variables avec le nom des variables
public void InitVariablesGroups( Vector display_variables, Vector params ) { super.InitVariablesGroups(display_variables, params); display_variables.add(new DisplayVariableGroup(new String("Mean"))); display_variables.add(new DisplayVariableGroup(new String("StandardDeviation"))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayVariables() {\n Iterator i = dvm.getVariableNames().iterator();\n Object temp;\n while(i.hasNext()){\n temp = i.next();\n System.out.print(temp + \": \" + dvm.getValue(temp.toString()) + \"\\n\");\n }\n }", "public void InitVariablesGr...
[ "0.7844046", "0.65636903", "0.6485383", "0.6387944", "0.6365872", "0.62232906", "0.61352473", "0.6104218", "0.6062639", "0.60352707", "0.6016332", "0.6012956", "0.59886104", "0.5872097", "0.5844917", "0.58215255", "0.5811076", "0.58100134", "0.5783019", "0.5757543", "0.575112...
0.60275507
10
nombre de classe (en fait nombre de sef dans ce cas)
public FuzzyNodeFuzzyOutput( String buffer, int nb_class ) throws Exception { super( buffer ); this.nb_class = nb_class; // lecture du noeud this.Variables.add(new String(st.nextToken().trim())); // lecture sef majoritaire for( int i=0 ; i<nb_class ; i++ ) this.Variables.add(new Double(st.nextToken().trim())); // lecture de l'effectif par sef }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getClazzName();", "private String name() {\r\n return cls.getSimpleName() + '.' + mth;\r\n }", "public String getName_Class() {\n\t\treturn name;\n\t}", "@Override\n public String simpleName() {\n if (this == class_) {\n return \"class\";\n }\n return name();\n }", "public...
[ "0.7567311", "0.7367507", "0.72656536", "0.7132638", "0.7130803", "0.708971", "0.7087832", "0.7087832", "0.7087832", "0.7028404", "0.7027422", "0.7025819", "0.69970053", "0.69635445", "0.68918574", "0.68427336", "0.6842015", "0.6827344", "0.6809138", "0.68017274", "0.67765915...
0.0
-1
rempli le vecteur display_variables avec le nom des variables
public void InitVariablesGroups( Vector display_variables, Vector params ) { super.InitVariablesGroups(display_variables, params); // le nom de la variable du groupe MajorityClass est affiché sur 2 lignes display_variables.add(new DisplayVariableGroup(new String("MajorityClass"), new String("Majority\nClass"))); // les effectifs par sef sont gérés par un groupe de variables ClassEffectif DisplayVariableGroup new_dv = new DisplayVariableGroup(new String("ClassEffectif"), (String)params.elementAt(0)); for( int i=1 ; i<this.nb_class ; i++ ) new_dv.AddVariableName((String)params.elementAt(i)); display_variables.add(new_dv); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void displayVariables() {\n Iterator i = dvm.getVariableNames().iterator();\n Object temp;\n while(i.hasNext()){\n temp = i.next();\n System.out.print(temp + \": \" + dvm.getValue(temp.toString()) + \"\\n\");\n }\n }", "public void InitVariablesGr...
[ "0.7845234", "0.6562839", "0.6485705", "0.638912", "0.6367465", "0.62249124", "0.61357445", "0.6105265", "0.6063461", "0.6036035", "0.6027151", "0.60169333", "0.60141337", "0.59890544", "0.587315", "0.58456993", "0.5822206", "0.58123636", "0.5810376", "0.5783895", "0.57500106...
0.5756412
20