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
Is current item a placeholder for header or footer.
public boolean isPlaceholder() { return this.placeholder; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isHeaderView(int i) {\n return haveHeaderView() && i == 0;\n }", "public boolean isFooterView(int i) {\n return haveFooterView() && i == getItemCount() - 1;\n }", "boolean hasFeedPlaceholderView();", "public boolean hasItem() {\n return (this.curItem != null);\n }", "...
[ "0.62106866", "0.6067467", "0.60526985", "0.60242903", "0.5974261", "0.5945239", "0.592344", "0.5883047", "0.58587325", "0.58356863", "0.5768221", "0.57418233", "0.5685656", "0.56384104", "0.56324965", "0.56198037", "0.56053174", "0.55880225", "0.5521265", "0.5513392", "0.549...
0.6595889
0
Process property set on proxy.
private void processProperty(String name, Object value) { final TableViewProxy tableViewProxy = getTableViewProxy(); if (name.equals(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR)) { Log.w(TAG, "selectedBackgroundColor is deprecated, use backgroundSelectedColor instead."); setProperty(TiC.PROPERTY_BACKGROUND_SELECTED_COLOR, value); } if (name.equals(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE)) { Log.w(TAG, "selectedBackgroundImage is deprecated, use backgroundSelectedImage instead."); setProperty(TiC.PROPERTY_BACKGROUND_SELECTED_IMAGE, value); } // TableViewRow.header and TableViewRow.footer have been deprecated. if (name.equals(TiC.PROPERTY_HEADER)) { headerDeprecationLog(); } if (name.equals(TiC.PROPERTY_FOOTER)) { footerDeprecationLog(); } // Set selected color from selection style. if (!hasPropertyAndNotNull(TiC.PROPERTY_BACKGROUND_SELECTED_COLOR) && name.equals(TiC.PROPERTY_SELECTION_STYLE) && value instanceof Integer) { String selectionColor = null; switch ((Integer) value) { case UIModule.SELECTION_STYLE_NONE: selectionColor = "transparent"; break; } setProperty(TiC.PROPERTY_BACKGROUND_SELECTED_COLOR, selectionColor); invalidate(); } if (name.equals(TiC.PROPERTY_LEFT_IMAGE) || name.equals(TiC.PROPERTY_RIGHT_IMAGE) || name.equals(TiC.PROPERTY_HAS_CHECK) || name.equals(TiC.PROPERTY_HAS_CHILD) || name.equals(TiC.PROPERTY_HAS_DETAIL) || name.equals(TiC.PROPERTY_BACKGROUND_COLOR) || name.equals(TiC.PROPERTY_BACKGROUND_IMAGE) || name.equals(TiC.PROPERTY_SELECTED_BACKGROUND_COLOR) || name.equals(TiC.PROPERTY_BACKGROUND_SELECTED_COLOR) || name.equals(TiC.PROPERTY_SELECTED_BACKGROUND_IMAGE) || name.equals(TiC.PROPERTY_BACKGROUND_SELECTED_IMAGE) || name.equals(TiC.PROPERTY_TITLE) || name.equals(TiC.PROPERTY_COLOR) || name.equals(TiC.PROPERTY_FONT) || name.equals(TiC.PROPERTY_LEFT) || name.equals(TiC.PROPERTY_RIGHT) || name.equals(TiC.PROPERTY_TOP) || name.equals(TiC.PROPERTY_BOTTOM) || name.equals(TiC.PROPERTY_MOVABLE)) { // Force re-bind of row. invalidate(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBeforeSet() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def prop = 'hello' }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaCl...
[ "0.6507928", "0.6059086", "0.59357274", "0.59357274", "0.5882329", "0.5786057", "0.57158214", "0.5715528", "0.57076913", "0.56550294", "0.5636522", "0.5636096", "0.5623933", "0.5551509", "0.5539027", "0.5500262", "0.5499506", "0.54850376", "0.5480274", "0.545662", "0.5444655"...
0.0
-1
Process property set on proxy.
@Override public void setProperty(String name, Object value) { super.setProperty(name, value); processProperty(name, value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testBeforeSet() throws Exception {\r\n GroovyClassLoader gcl = new GroovyClassLoader();\r\n final Class<?> testClass = gcl.parseClass(\"class Test { def prop = 'hello' }\");\r\n GroovyObject go = (GroovyObject)testClass.newInstance();\r\n\r\n ProxyMetaClass pmc = ProxyMetaCl...
[ "0.6507928", "0.6059086", "0.5882329", "0.5786057", "0.57158214", "0.5715528", "0.57076913", "0.56550294", "0.5636522", "0.5636096", "0.5623933", "0.5551509", "0.5539027", "0.5500262", "0.5499506", "0.54850376", "0.5480274", "0.545662", "0.5444655", "0.5409694", "0.5389046", ...
0.59357274
2
TODO: This could be improved to prevent the need for swapping native views. Our `nativeView` is currently set as our TableViewHolder view as a workaround for allowing events/properties to set on our holder instead of our row content. Temporarily swap our native view back to original content while new child is added.
@Override public void add(TiUIView child) { final View nativeView = getNativeView(); if (nativeView != null) { setNativeView(this.content); super.add(child); setNativeView(nativeView); } else { super.add(child); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void addView(View child, int index, ViewGroup.LayoutParams params) {\n if (child == mainTable || child == columnHeaderTable || child == rowHeaderTable || child == cornerTable) {\n super.addView(child, index, params);\n } else {\n throw new UnsupportedOperat...
[ "0.5924479", "0.5694172", "0.55838424", "0.54624176", "0.5459312", "0.5458999", "0.545379", "0.544661", "0.5403712", "0.5390942", "0.53821266", "0.5367804", "0.53674275", "0.5348404", "0.53287625", "0.53008074", "0.53007627", "0.52803046", "0.52782863", "0.52771044", "0.52613...
0.6044643
0
TODO: This could be improved to prevent the need for swapping native views. Our `nativeView` is currently set as our TableViewHolder view as a workaround for allowing events/properties to set on our holder instead of our row content. Temporarily swap our native view back to original content while new child is removed.
@Override public void remove(TiUIView child) { final View nativeView = getNativeView(); if (nativeView != null) { setNativeView(this.content); super.remove(child); setNativeView(nativeView); } else { super.remove(child); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\npublic void removeForReplacement(VirtualContainer parent, int index,\n\t\tObjectAdapter childAdapter) {\n\t\n}", "@Override\npublic void removeForReplacement(int index, ObjectAdapter childAdapter) {\n\t\n}", "public boolean removeChild(View root, int virtualDescendantId) {\n/* 258 */ throw new ...
[ "0.58464545", "0.5613919", "0.5551873", "0.5520902", "0.55104315", "0.543551", "0.5385314", "0.53693265", "0.5298862", "0.52735037", "0.52616626", "0.5198235", "0.51798356", "0.5176665", "0.516084", "0.51510894", "0.51180077", "0.51093584", "0.5105318", "0.5102619", "0.509940...
0.6441462
0
Prevent TiUIView from overriding `touchFeedback` effect.
protected boolean canApplyTouchFeedback(@NonNull KrollDict props) { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onInterceptTouchEvent(MotionEvent event) {\n return false;\n }", "@Override\n public boolean onInterceptTouchEvent(MotionEvent ev) {\n return false;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }", "@Ov...
[ "0.6192691", "0.6164647", "0.6095773", "0.6095773", "0.59819496", "0.59759116", "0.59681696", "0.59355843", "0.59157324", "0.58689016", "0.58689016", "0.58401406", "0.5820454", "0.5798382", "0.5783659", "0.57794625", "0.57794625", "0.57794625", "0.5717607", "0.56806606", "0.5...
0.6444182
0
Always create custom background drawable.
@Override protected boolean hasBorder(KrollDict d) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void setBackgroundDrawable(Drawable d) {\n\t\t\n\t}", "@Override\n\tpublic Drawable background() {\n\t\treturn null;\n\t}", "public CommonPopWindow setBackgroundDrawable(Drawable drawable) {\n/* 152 */ this.mDrawable = drawable;\n/* 153 */ return this;\n/* */ }", "private Te...
[ "0.7206041", "0.71480334", "0.688666", "0.6852158", "0.6822063", "0.6793526", "0.664349", "0.6565428", "0.6515211", "0.6447175", "0.635603", "0.6322772", "0.62707573", "0.6267131", "0.626641", "0.62593234", "0.6145937", "0.6102972", "0.60578847", "0.6052595", "0.6020292", "...
0.0
-1
String fileName = downloadURL.substring(downloadURL.lastIndexOf("article/") + 8, downloadURL.length());
@Override public void run(){ String datas = Uploader.doImageCheck(bmp, session); if (datas != "NULL" && datas != "") { String fileURL=""; int lastnum=1; String filename=""; String ext=""; JSONObject job = null; try { job = new JSONObject(datas); fileURL = (String) job.get("fileDir"); lastnum = Integer.parseInt((String) job.get("lastnum")); filename = (String) job.get("filename"); ext = (String) job.get("ext"); } catch (JSONException e) { return; } final File sdCard = Environment.getExternalStorageDirectory(); File dir = new File(sdCard.getAbsolutePath() + "/Verrapel/Video/" + filename); if (!dir.exists()) { dir.mkdirs(); } for (int i = 1; i <= lastnum; i++) { String filePath = sdCard.getAbsolutePath() + "/Verrapel/Video/" + filename + "/" + i + ext; File f = new File(filePath); if (!f.exists()) { String fileUrl = fileURL + "/" + i + ext; String localPath = filePath; try { URL imgUrl = new URL(fileUrl); //서버와 접속하는 클라이언트 객체 생성 HttpURLConnection conn = (HttpURLConnection) imgUrl.openConnection(); int response = conn.getResponseCode(); File file = new File(localPath); InputStream is = conn.getInputStream(); OutputStream outStream = new FileOutputStream(file); byte[] buf = new byte[1024]; int len = 0; while ((len = is.read(buf)) > 0) { outStream.write(buf, 0, len); } outStream.close(); is.close(); conn.disconnect(); } catch (Exception e) { e.printStackTrace(); } } } ArrayList<Mat> videoArray = new ArrayList<Mat>(); for (int i = 1; i <= lastnum; i++) { String filePath = sdCard.getAbsolutePath() + "/Verrapel/Video/" + filename + "/" + i + ext; File file = new File(filePath); if (file.exists()) { Bitmap bm = BitmapFactory.decodeFile(filePath); Mat tmp = new Mat(); Matrix matrix = new Matrix(); matrix.postRotate(270); Bitmap resizedBitmap = Bitmap.createBitmap(bm, 0, 0, bm.getWidth(), bm.getHeight(), matrix, true); Utils.bitmapToMat(resizedBitmap, tmp); videoArray.add(tmp); /* mmr.setDataSource(filePath); String time = mmr.extractMetadata(FFmpegMediaMetadataRetriever.METADATA_KEY_DURATION); int VideoDuration = Integer.parseInt(time) * 1000;// This will give time in millesecond for (int ftime = 0; ftime < VideoDuration; ftime += 120000) { Bitmap b = mmr.getFrameAtTime(ftime, FFmpegMediaMetadataRetriever.OPTION_CLOSEST); // frame at 2 seconds byte[] artwork = mmr.getEmbeddedPicture(); ftime = (ftime + 120000) % VideoDuration; Mat result = new Mat(); Utils.bitmapToMat(b, result); videoArray.add(result); } //p.setDownloadFinish(true); */ } } p.setVideoArray(videoArray); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String getFileName(String url) {\n // get the begin and end index of name which will be between the\n //last \"/\" and \".\"\n int beginIndex = url.lastIndexOf(\"/\")+1;\n int endIndex = url.lastIndexOf(\".\");\n return url.substring(beginIndex, endIndex);\n \n }", "private String extr...
[ "0.77118975", "0.7138377", "0.7080073", "0.69852406", "0.68599606", "0.6854848", "0.6854848", "0.68460345", "0.68331397", "0.6817104", "0.6786727", "0.6746476", "0.6716322", "0.6711017", "0.66185284", "0.6610952", "0.6579735", "0.6501055", "0.63699114", "0.6310197", "0.623520...
0.0
-1
Enter the front page of the drawing board
@RequestMapping("/drawingBoard") public String drawingBoard(HttpServletRequest request, Model model, DrawingBoardType drawingBoardType, String processType) { String load = request.getParameter("load"); //set parentAccessPath String parentAccessPath = request.getParameter("parentAccessPath"); model.addAttribute("parentAccessPath", parentAccessPath); // set current user UserVo user = SessionUserUtil.getCurrentUser(); model.addAttribute("currentUser", user); //set drawingBoardType model.addAttribute("drawingBoardType", drawingBoardType); String pagePath = "errorPage"; // Determine whether there is an'id'('load') of'Flow', and if there is, load it, otherwise generate'UUID' to return to the return page. if (StringUtils.isBlank(load)) { return "errorPage"; } switch (drawingBoardType) { case GROUP: { Model groupHandleModel = groupHandle(model, load); if (null != groupHandleModel) { model = groupHandleModel; pagePath = "mxGraph/index"; } break; } case TASK: { Model taskHandleModel = taskHandle(model, load); if (null != taskHandleModel) { model = taskHandleModel; pagePath = "mxGraph/index"; } break; } case PROCESS: { Model processHandleModel = processHandle(model, load, processType); if (null != processHandleModel) { model = processHandleModel; pagePath = "mxGraph/index"; } break; } } return pagePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void present()\n {\n front = (front == page1) ? page2 : page1;\n repaint();\n getToolkit().sync();\n }", "private void startingScreen() {\n screenWithGivenValues(-1,-2,1,2,3,-1,0);\n }", "public void drawStartScreen() {\n\t\tint highScore = getHighScore();\n\t\tdispl...
[ "0.74431276", "0.6944123", "0.65268797", "0.6483614", "0.6480048", "0.6347254", "0.629778", "0.6221958", "0.61845934", "0.61660093", "0.61642826", "0.6157675", "0.61316395", "0.61286294", "0.61234367", "0.6111497", "0.61088014", "0.6091228", "0.6080756", "0.6077972", "0.60676...
0.0
-1
TODO Autogenerated method stub
public void disablePanelInput() { if (!clickThem) { txt_mssv.setText(""); txt_mssv.setEnabled(false); txt_hoten.setEnabled(false); txt_hoten.setText(""); comboSex.setEnabled(false); txt_ntns.setText(""); txt_ntns.setEnabled(false); btn_nhap.setEnabled(false); } else { txt_mssv.setEnabled(true); txt_hoten.setEnabled(true); comboSex.setEnabled(true); txt_ntns.setEnabled(true); btn_nhap.setEnabled(true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void addTableGui() { DefaultTableModel mTableModel = new DefaultTableModel(); mTable = new JTable(mTableModel); mTableModel.addColumn("MSSV"); mTableModel.addColumn("HoTen"); mTableModel.addColumn("GioiTinh"); mTableModel.addColumn("NTNS"); JScrollPane mJScrollPane = new JScrollPane(mTable); mJScrollPane.setPreferredSize(new Dimension(760, 310)); c.fill = GridBagConstraints.HORIZONTAL; c.ipady = 40; //make this component tall c.weightx = 0.0; c.gridwidth = 3; c.gridx = 0; c.gridy = 1; panel.add(mJScrollPane,c); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void addPanelControls() { list_sort = new JComboBox<>(new String[] { "MSSV", "HoTen", "NTNS" }); btn_sapxep = new JButton("Sap xep"); btn_them = new JButton("Them"); btn_xoa = new JButton("Xoa"); btn_save = new JButton("Save"); btn_load = new JButton("Load"); JPanel mControlPanel = new JPanel(new GridLayout(5, 1)); mControlPanel.add(btn_them); mControlPanel.add(btn_xoa); JPanel sapxepPanel = new JPanel(); sapxepPanel.add(list_sort); sapxepPanel.add(btn_sapxep); mControlPanel.add(sapxepPanel); mControlPanel.add(btn_save); mControlPanel.add(btn_load); mControlPanel.setPreferredSize(new Dimension(380, 200)); mControlPanel.setBorder(new TitledBorder("Controls")); c.fill = GridBagConstraints.HORIZONTAL; c.weightx = 0.5; c.gridx = 1; c.gridy = 0; panel.add(mControlPanel,c); }
{ "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) { JButton source = (JButton) e.getSource(); if (source.equals(btn_them)) { clickThem = true; disablePanelInput(); lbl_status.setText("Clicked Button Them"); } else if (source.equals(btn_nhap)) { clickThem = false; SinhVien mSinhVien = new SinhVien(txt_mssv.getText(), txt_hoten.getText(), (String) comboSex.getSelectedItem(), (Date) txt_ntns.getValue()); if (mSinhViens.contains(mSinhVien)) { JOptionPane.showMessageDialog(null, "Không thể lưu 2 sinh viên có cùng MSSV", "Lỗi nhập dữ liệu", JOptionPane.ERROR_MESSAGE); } mSinhViens.add(mSinhVien); refreshTable(); disablePanelInput(); lbl_status.setText("Clicked Button Nhap"); } else if (source.equals(btn_sapxep)) { if (list_sort.getSelectedIndex() == 0) { // sap xep theo MSSV TreeSet<SinhVien> temp = new TreeSet<SinhVien>( new MssvComperator()); temp.addAll(mSinhViens); mSinhViens = temp; refreshTable(); lbl_status.setText("Sap xep theo MSSV"); } else if (list_sort.getSelectedIndex() == 1) { // sap xep theo Ho // Ten TreeSet<SinhVien> temp = new TreeSet<SinhVien>( new HoTenComperator()); temp.addAll(mSinhViens); mSinhViens = temp; refreshTable(); lbl_status.setText("Sap xep theo Ho Ten"); } else { TreeSet<SinhVien> temp = new TreeSet<SinhVien>( new NTNSComperator()); temp.addAll(mSinhViens); mSinhViens = temp; refreshTable(); lbl_status.setText("Sap xep theo NTNS"); } } else if (source.equals(btn_save)) { int reValue = fc.showSaveDialog(GUI2.this); if (reValue == JFileChooser.APPROVE_OPTION) { try { File f = fc.getSelectedFile(); ObjectOutputStream os = new ObjectOutputStream( new BufferedOutputStream(new FileOutputStream(f))); os.writeObject(mSinhViens); os.flush(); os.close(); lbl_status.setText("Saved"); } catch (Exception e2) { // TODO: handle exception e2.printStackTrace(); } } } else if (source.equals(btn_load)) { int reValue = fc.showOpenDialog(GUI2.this); if (reValue == JFileChooser.APPROVE_OPTION) { try { File f = fc.getSelectedFile(); ObjectInputStream ois = new ObjectInputStream( new BufferedInputStream(new FileInputStream(f))); mSinhViens = (TreeSet<SinhVien>) ois.readObject(); ois.close(); refreshTable(); lbl_status.setText("Loaded"); } catch (Exception e2) { e2.printStackTrace(); } } } else if (source.equals(btn_xoa)) { int[] index = mTable.getSelectedRows(); StringBuilder mBuilder = new StringBuilder(); DefaultTableModel mModel = (DefaultTableModel) mTable.getModel(); for (int i : index) { /* * mBuilder.append(i + ","); String mssv = (String) * mModel.getValueAt(i, 0); String hoten = (String) * mModel.getValueAt(i, 1); String gioitinh = (String) * mModel.getValueAt(i, 2); Date ntns = (Date) * mModel.getValueAt(i, 3); mSinhViens.remove(new SinhVien(mssv, * hoten, gioitinh, ntns)); */ Iterator<SinhVien> it = mSinhViens.iterator(); int j = 0; while (j < i) { it.next(); j++; } it.remove(); } refreshTable(); lbl_status.setText("Xoa cac dong : " + mBuilder.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { new GUI2(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
returns user data after authentication
public User userAuth(Login loginData)throws EntityNotFoundException { try { User gotUser=userDao.getById(loginData.getEmail()); if(gotUser.getPassword().equals(loginData.getPassword())) { return gotUser; } else { throw new EntityNotFoundException("Password Incorrect"); } } catch(EntityNotFoundException e) { throw new EntityNotFoundException("No user exist with this email id"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User getUserData();", "public Think.XmlWebServices.User_login_data getUser_login_data() {\n return user_login_data;\n }", "private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(pr...
[ "0.7554477", "0.72295845", "0.72067297", "0.7094441", "0.7068752", "0.7067946", "0.70037305", "0.6995972", "0.6828062", "0.68217486", "0.68169385", "0.68009675", "0.67283", "0.6709123", "0.6684649", "0.6680553", "0.666859", "0.66547203", "0.66534424", "0.66315675", "0.661548"...
0.0
-1
Get the user data with help of emailID
public User getUserByEmail(String email)throws EntityNotFoundException { return userDao.getById(email); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public User get(String emailID);", "public User getUser(String emailId);", "public User_info search_User_info(String email) {\n\t\t\t\tSystem.out.println(user_loginDao.searchId(email));\r\n\t\t\t\treturn user_infoDao.search_User(user_loginDao.findUserByEmail(email).getId());\r\n\t}", "public User getUser(Str...
[ "0.7992316", "0.79401606", "0.7413937", "0.7352616", "0.7347519", "0.7341007", "0.73184264", "0.73034", "0.7290248", "0.7261665", "0.7261665", "0.71839935", "0.7183415", "0.7177313", "0.71594596", "0.71245235", "0.7076991", "0.7072946", "0.7041093", "0.6973221", "0.6971092", ...
0.6808183
33
returns the no. of users
public int getUsersCount() { int usersCount=(int) userDao.count(); return usersCount; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int numberOfUsers() {\r\n \tint anzahlUser=userDAO.getUserList().size();\r\n \treturn anzahlUser;\r\n }", "int getUsersCount();", "int getUsersCount();", "int getUsersCount();", "public int numberUsers() \n\t{\n\t\treturn this.userList.size();\n\t}", "public int getUserCount() {\n ...
[ "0.8894456", "0.8758401", "0.8758401", "0.8758401", "0.86534375", "0.8452307", "0.833825", "0.833825", "0.8332787", "0.8332435", "0.8273769", "0.8249213", "0.8119881", "0.8036486", "0.79705495", "0.7955642", "0.79552543", "0.79296154", "0.7836406", "0.7832981", "0.7820491", ...
0.8408923
6
returns all user names
public List<String> getAllUserNames() { return userDao.findUserNames(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Collection<String> getUsernames();", "List<String> loadAllUserNames();", "public ArrayList<String> getAllUserNames() {\n return allUserNames;\n }", "@Override\n\tpublic List<String> findAllUsername() {\n\t\treturn userDao.findAllUsername();\n\t}", "public String getUserNames() {\n return s...
[ "0.87771153", "0.8277446", "0.8204634", "0.8020818", "0.799012", "0.7844824", "0.7788321", "0.7666479", "0.7617638", "0.7383187", "0.73192066", "0.72765946", "0.7246352", "0.7229714", "0.72010756", "0.71529824", "0.71057695", "0.70643926", "0.70512474", "0.7044548", "0.702353...
0.8651638
1
Ajout d'un identifiant global
public static void addGlobal(String s, Ident i) { globaux.put(s, i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static long getGlobalId() {\n return globalId++;\n }", "public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = param;\n }", "public void setId(java.lang.String param) {\n localIdTracker = true;\n\n this.localId = pa...
[ "0.6683425", "0.60964566", "0.60964566", "0.60445875", "0.59695566", "0.5860758", "0.58496934", "0.583494", "0.5757701", "0.57328814", "0.57080823", "0.5693465", "0.5688617", "0.5684324", "0.5678401", "0.5678401", "0.5678401", "0.5678401", "0.5678401", "0.5678401", "0.5678401...
0.60659015
3
Ajout d'un identifiant local
public static void addLocal(String s, Ident i) { locaux.put(s, i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIdLocal(int idLocal) {\r\n this.idLocal = idLocal;\r\n }", "public void setLocalId(String localId) {\n\t\t\n\t}", "public void setLocalId(java.lang.String value) {\n this.localId = value;\n }", "public boolean insertLocal(int id,int idAdmin,String numLocal,int cupo){\n boo...
[ "0.68306863", "0.67038345", "0.6697606", "0.6333981", "0.6325588", "0.630424", "0.6274854", "0.6214772", "0.6214772", "0.61816484", "0.60272586", "0.5961283", "0.59247524", "0.5912632", "0.5912408", "0.58886725", "0.58886725", "0.5881283", "0.58740926", "0.5811666", "0.580752...
0.57186586
25
Conversion en String du tableau d'identifiant
public static String string() { String s = ""; s += "Locaux :\n"; for(String key : locaux.keySet()) { Ident i = locaux.get(key); s += key+", "+i.toString()+"\n"; } s += "Globaux :\n"; for(String key : globaux.keySet()) { Ident i = globaux.get(key); s += key+", "+i.toString()+"\n"; } return s; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getConvertToId();", "java.lang.String getStringId();", "java.lang.String getStringId();", "java.lang.String getID();", "@Override\n public String getToID()\n {\n \tStringBuilder sb = new StringBuilder();\n\n\t\tint prefix = getPrefix();\n \tint ident = getIdent1();\n\n \tswitch...
[ "0.67990136", "0.67433155", "0.67433155", "0.6512608", "0.64571947", "0.64180195", "0.6338428", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", "0.63173693", ...
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.doctors, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.7246102", "0.7201358", "0.7194834", "0.7176498", "0.71066517", "0.7039537", "0.7037961", "0.70112145", "0.70094734", "0.69807225", "0.6944953", "0.69389373", "0.6933199", "0.6916928", "0.6916928", "0.6891486", "0.68831646", "0.68754137", "0.68745375", "0.68621665", "0.6862...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); //noinspection SimplifiableIfStatement // if (id == R.id.facebook) { // return true; // } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.79041183", "0.7805934", "0.77659106", "0.7727251", "0.7631684", "0.7621701", "0.75839096", "0.75300384", "0.74873656", "0.7458051", "0.7458051", "0.7438486", "0.742157", "0.7403794", "0.7391802", "0.73870087", "0.7379108", "0.7370295", "0.7362194", "0.7355759", "0.73454577...
0.0
-1
Handle navigation view item clicks here. here is the main place where we need to work on.
@SuppressWarnings("StatementWithEmptyBody") @Override public boolean onNavigationItemSelected(MenuItem item) { int id=item.getItemId(); switch (id){ case R.id.nav_home: Intent home= new Intent(DoctorsActivity.this,MainActivity.class); startActivity(home); overridePendingTransition(R.anim.fade_in, R.anim.fade_out); break; case R.id.nav_service: Intent service= new Intent(DoctorsActivity.this,SettingActivity.class); startActivity(service); overridePendingTransition(R.anim.fade_in, R.anim.fade_out); break; case R.id.nav_doctors: Intent doctors= new Intent(DoctorsActivity.this,DoctorsActivity.class); startActivity(doctors); overridePendingTransition(R.anim.fade_in, R.anim.fade_out); break; case R.id.nav_location: Intent location= new Intent(DoctorsActivity.this,locationActivity.class); startActivity(location); overridePendingTransition(R.anim.fade_in, R.anim.fade_out); break; case R.id.nav_about: Intent about= new Intent(DoctorsActivity.this,AboutActivity.class); startActivity(about); break; case R.id.nav_branch: Intent branch= new Intent(DoctorsActivity.this,BranchActivity.class); startActivity(branch); break; case R.id.nav_developer: Intent dev= new Intent(DoctorsActivity.this,AboutappActivity.class); startActivity(dev); break; } DrawerLayout drawer = (DrawerLayout) findViewById(R.id.drawer_layout); drawer.closeDrawer(GravityCompat.START); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onNavigationItemClicked(Element element);", "@Override\n public void onClick(View view) { listener.onItemClick(view, getPosition()); }", "@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\thandleClick(position);\n\t\t\t}", "@Ove...
[ "0.74551684", "0.71521807", "0.6982956", "0.6947123", "0.69001216", "0.68858665", "0.6826961", "0.6826312", "0.6806741", "0.68017435", "0.67970145", "0.67934406", "0.6791385", "0.6783517", "0.67642605", "0.6762629", "0.6758098", "0.6755436", "0.6754988", "0.6754988", "0.67444...
0.0
-1
Lig Created by sumanthn on 23/3/14.
public interface IProducer { /** sends out the filled in message to kafka */ public void dispatchMessage(KeyedMessage<byte[], byte[]> msg); public void shutdown(); public void dispatchMessage(final List<KeyedMessage<byte[], byte[]>> msgBatch ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void verliesLeven() {\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "private void kk12() {\n\n\t}", "public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}", "public void mo21787L() {\n }", "public void mo3370l() {\n ...
[ "0.63624716", "0.6106704", "0.59715086", "0.5796138", "0.5781158", "0.57553583", "0.564537", "0.5637361", "0.5621698", "0.5605885", "0.5595031", "0.5583337", "0.5574706", "0.5557033", "0.5510339", "0.5490105", "0.5479532", "0.5467896", "0.54670084", "0.54520714", "0.54190373"...
0.0
-1
sends out the filled in message to kafka
public void dispatchMessage(KeyedMessage<byte[], byte[]> msg);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void run() {\n\t\tkafkaProducer.send(record);\n\t\tkafkaProducer.close();\n\t}", "public synchronized void sendMessage(KafkaMessage msg, String[] topic) {\r\n if (producer != null) {\r\n // Encode message\r\n JsonEncoder json = new JsonEncoder();\r\n\r\n\r\n ...
[ "0.67663074", "0.6534827", "0.65142417", "0.6453872", "0.62704474", "0.6144868", "0.6142454", "0.60369116", "0.59916425", "0.5986697", "0.5973643", "0.5969959", "0.59107274", "0.5858471", "0.5842602", "0.58388567", "0.583233", "0.58280957", "0.58205473", "0.5809803", "0.58076...
0.0
-1
defines the interface for Objects which register with the MsgFilter to receive the TimeoutEvents from the layout. Title: CATS Crandic Automated Traffic System Description: A program for dispatching trains on Pat Lana's Crandic model railroad. Copyright: Copyright (c) 2004 Company:
public interface TimeoutObserver { /** * is the interface through which the MsgFilter delivers the TimeoutEvent. */ public void acceptTimeout(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface WFEventListener extends ActivityInsEventListener, ProcessInsEventListener {\r\n\r\n /**\r\n * called when a timer event is fired;\r\n */\r\n public void onTimerEvent();\r\n\r\n public void addECAList(ECAList list);\r\n\r\n}", "public interface Itf_ConsumidorBuzonTimeout {\r\n\r\...
[ "0.5884406", "0.57266814", "0.5708756", "0.57006866", "0.56999224", "0.56395525", "0.54548705", "0.5450075", "0.5417585", "0.5382526", "0.5356763", "0.53548485", "0.5316393", "0.52704424", "0.5255935", "0.5255175", "0.52455765", "0.5239252", "0.5213583", "0.5209321", "0.52069...
0.7050643
0
is the interface through which the MsgFilter delivers the TimeoutEvent.
public void acceptTimeout();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface TimeoutObserver {\n\n /**\n * is the interface through which the MsgFilter delivers the TimeoutEvent.\n */\n public void acceptTimeout();\n }", "static interface TimeoutHandler {\n\n\t/**\n\t * Perform an action required for a timeout.\n\t */\n\tpublic void handleTimeout();\n }", ...
[ "0.8235769", "0.6648288", "0.625339", "0.6251112", "0.6195863", "0.61518", "0.61255383", "0.6099206", "0.6055627", "0.6003838", "0.5951444", "0.59474814", "0.594655", "0.592895", "0.58893776", "0.58838874", "0.5834107", "0.5814489", "0.57811695", "0.5775171", "0.57671404", ...
0.5498236
35
Returns 'type' of the ecore object associated with the hint.
public static ENamedElement getElement(IAdaptable hint) { Object type = hint.getAdapter(IElementType.class); if (elements == null) { elements = new IdentityHashMap<IElementType, ENamedElement>(); elements.put(Schema_1000, ESchemaPackage.eINSTANCE.getSchema()); elements.put(PersistentTable_2009, ETablesPackage.eINSTANCE.getPersistentTable()); elements.put(Column_3001, ETablesPackage.eINSTANCE.getColumn()); elements.put(UniqueConstraint_3002, EConstraintsPackage.eINSTANCE.getUniqueConstraint()); elements.put(ForeignKey_3003, EConstraintsPackage.eINSTANCE.getForeignKey()); elements.put(ForeignKey_4001, EConstraintsPackage.eINSTANCE.getForeignKey()); elements.put(ForeignKey_4002, EConstraintsPackage.eINSTANCE.getForeignKey()); } return (ENamedElement) elements.get(type); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String getType();", "java.lang.String g...
[ "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68292546", "0.68181944", "0.68022275", "0.67936945", "0.67936945", "0.67936945", "0.67936945", "0.67936945"...
0.0
-1
When possible, user is looked up only once. Privilege string normalization/mapping into CrateDB Privilege.Type is also done once if possible
@Override public Scalar<Boolean, Object> compile(List<Symbol> arguments, String currentUser, UserLookup userLookup) { Object userValue = null; Symbol privileges = null; if (arguments.size() == 2) { userValue = currentUser; privileges = arguments.get(1); } if (arguments.size() == 3) { if (arguments.get(0) instanceof Input<?> input) { userValue = input.value(); } privileges = arguments.get(2); } Collection<Privilege.Type> compiledPrivileges = normalizePrivilegeIfLiteral(privileges); if (userValue == null) { // Fall to non-compiled version which returns null. return this; } // Compiled privileges can be null here but we don't fall to non-compiled version as // can mean that privilege string is not null but not Literal either. // When we pass NULL to the compiled version, it treats last argument like regular evaluate: // does null check and parses privileges string. var sessionUser = USER_BY_NAME.apply(userLookup, currentUser); User user = getUser.apply(userLookup, userValue); validateCallPrivileges(sessionUser, user); return new CompiledHasPrivilege(signature, boundSignature, sessionUser, user, compiledPrivileges); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Privilege findByName(UserPrivilegeType name);", "private void loadUserPrivileges() {\n\t\t// Get the UserPrivilege details after a successful log in.\n\t\tuserPrivilege = new UserPrivilegeImpl(this.session);\n\n\t\t// End problems here\n\t\tif ( userPrivilege == null ) throw new IllegalArgumentException(\...
[ "0.699387", "0.6037246", "0.59261733", "0.5907267", "0.5853466", "0.5578207", "0.55014133", "0.54437125", "0.5428652", "0.53537744", "0.5345627", "0.5343937", "0.53000504", "0.52494234", "0.5239043", "0.5177838", "0.5145508", "0.51444745", "0.5144377", "0.51216704", "0.509089...
0.0
-1
Only superusers can call this function for other users
protected static void validateCallPrivileges(User sessionUser, User user) { if (user.name().equals(sessionUser.name()) == false && sessionUser.hasPrivilege(Privilege.Type.DQL, Privilege.Clazz.TABLE, "sys.privileges", null) == false && sessionUser.hasPrivilege(Privilege.Type.AL, Privilege.Clazz.CLUSTER, "crate", null) == false) { throw new MissingPrivilegeException(sessionUser.name()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void verificaUtentePrivilegiato() {\n\r\n\t}", "@Override\n protected boolean isCalledForCurrentUserLocked() {\n return true;\n }", "@Override\n public boolean isUser() {\n return false;\n }", "public void flagUser() {\n\t\tsuper.flagUser();\n\t}...
[ "0.6621101", "0.64582455", "0.6443065", "0.6357272", "0.6271674", "0.6245765", "0.62008256", "0.6181939", "0.6144166", "0.6126919", "0.60949385", "0.6062861", "0.60589087", "0.6020312", "0.5993449", "0.59763026", "0.59479296", "0.59455186", "0.5942058", "0.59402966", "0.58726...
0.0
-1
Insert a whole batch of entries
@Test public void testBatchSink() throws Exception { List<WALEntry> entries = new ArrayList<>(TestReplicationSink.BATCH_SIZE); List<Cell> cells = new ArrayList<>(); for (int i = 0; i < (TestReplicationSink.BATCH_SIZE); i++) { entries.add(createEntry(TestReplicationSink.TABLE_NAME1, i, Put, cells)); } TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells.iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir); Scan scan = new Scan(); ResultScanner scanRes = TestReplicationSink.table1.getScanner(scan); Assert.assertEquals(TestReplicationSink.BATCH_SIZE, scanRes.next(TestReplicationSink.BATCH_SIZE).length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void insert(Iterator<Object[]> batch) {\n while (batch.hasNext()) {\n BoundStatement boundStatement = statement.bind(batch.next());\n ResultSetFuture future = session.executeAsync(boundStatement);\n Futures.addCallback(future, callback, executor);\n ...
[ "0.7495769", "0.7425279", "0.71939105", "0.7192753", "0.7085261", "0.68755263", "0.68372184", "0.66509163", "0.66336805", "0.66307455", "0.6621053", "0.66190165", "0.6603608", "0.6580303", "0.6563225", "0.6488897", "0.6458253", "0.6403033", "0.63168913", "0.6308986", "0.62878...
0.5551124
90
Insert a mix of puts and deletes
@Test public void testMixedPutDelete() throws Exception { List<WALEntry> entries = new ArrayList<>(((TestReplicationSink.BATCH_SIZE) / 2)); List<Cell> cells = new ArrayList<>(); for (int i = 0; i < ((TestReplicationSink.BATCH_SIZE) / 2); i++) { entries.add(createEntry(TestReplicationSink.TABLE_NAME1, i, Put, cells)); } TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir); entries = new ArrayList(TestReplicationSink.BATCH_SIZE); cells = new ArrayList(); for (int i = 0; i < (TestReplicationSink.BATCH_SIZE); i++) { entries.add(createEntry(TestReplicationSink.TABLE_NAME1, i, ((i % 2) != 0 ? Type.Put : Type.DeleteColumn), cells)); } TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells.iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir); Scan scan = new Scan(); ResultScanner scanRes = TestReplicationSink.table1.getScanner(scan); Assert.assertEquals(((TestReplicationSink.BATCH_SIZE) / 2), scanRes.next(TestReplicationSink.BATCH_SIZE).length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showdelete() {\n\t\tif (printstatus != delete)\n\t\t\tprintln(\">>>> DELETE AT <br/>\" + printoldline);\n\t\tprintstatus = delete;\n\t\toutput+=oldinfo.symbol[printoldline].showSymbol();\n\t\toutput+=\"<br/>\";\n\t\tanyprinted = true;\n\t\tprintoldline++;\n\t}", "public static void main(String[] args) throw...
[ "0.55751467", "0.53732413", "0.5243588", "0.51643836", "0.5129607", "0.51016587", "0.5044338", "0.5010638", "0.49512786", "0.49482402", "0.49470383", "0.48987052", "0.48237392", "0.48237118", "0.48195434", "0.4806997", "0.47993878", "0.47908643", "0.47681123", "0.47583985", "...
0.5035029
7
Insert to 2 different tables
@Test public void testMixedPutTables() throws Exception { List<WALEntry> entries = new ArrayList<>(((TestReplicationSink.BATCH_SIZE) / 2)); List<Cell> cells = new ArrayList<>(); for (int i = 0; i < (TestReplicationSink.BATCH_SIZE); i++) { entries.add(createEntry(((i % 2) == 0 ? TestReplicationSink.TABLE_NAME2 : TestReplicationSink.TABLE_NAME1), i, Put, cells)); } TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells.iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir); Scan scan = new Scan(); ResultScanner scanRes = TestReplicationSink.table2.getScanner(scan); for (Result res : scanRes) { Assert.assertTrue((((Bytes.toInt(res.getRow())) % 2) == 0)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void insertValuesToTables(Connection conn) {\n\t// insert queries\n\n\t\n\tthis.insertIntoAccountTables(conn);\n\tthis.insertIntoIncidentTicketTables(conn);\n\t\n\n\t\n}", "int insert(Table2 record);", "int insert(TblMotherSon record);", "public void insertPersonnelUnit(PersonnelUnit personnelUnit) th...
[ "0.6690761", "0.6566669", "0.63286245", "0.6027658", "0.6007204", "0.6004184", "0.59649736", "0.5963583", "0.59597456", "0.59523004", "0.5919451", "0.5904671", "0.5901948", "0.5859391", "0.5852835", "0.5826282", "0.58161247", "0.5813902", "0.58016086", "0.5784798", "0.5784025...
0.0
-1
Insert then do different types of deletes
@Test public void testMixedDeletes() throws Exception { List<WALEntry> entries = new ArrayList<>(3); List<Cell> cells = new ArrayList<>(); for (int i = 0; i < 3; i++) { entries.add(createEntry(TestReplicationSink.TABLE_NAME1, i, Put, cells)); } TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells.iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir); entries = new ArrayList(3); cells = new ArrayList(); entries.add(createEntry(TestReplicationSink.TABLE_NAME1, 0, DeleteColumn, cells)); entries.add(createEntry(TestReplicationSink.TABLE_NAME1, 1, DeleteFamily, cells)); entries.add(createEntry(TestReplicationSink.TABLE_NAME1, 2, DeleteColumn, cells)); TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells.iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir); Scan scan = new Scan(); ResultScanner scanRes = TestReplicationSink.table1.getScanner(scan); Assert.assertEquals(0, scanRes.next(3).length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\r\n\tpublic void insertAndDeleteTest() throws Exception{\r\n\t\tList<Long> userIds = new ArrayList<Long>();\r\n\t\tuserIds.add(3419099044399521L);\r\n\t\tuserService.deleteById(userIds);\r\n\t\t\r\n\t}", "protected abstract void doDelete();", "@Override\r\n\tpublic void insertar() {\n\t\ttab_cuenta.elimi...
[ "0.64896166", "0.6323401", "0.619563", "0.61869746", "0.6177905", "0.6149804", "0.6143947", "0.6118145", "0.6075468", "0.606438", "0.60403013", "0.60346603", "0.594869", "0.5930959", "0.5919422", "0.5919422", "0.5906526", "0.5901289", "0.5896185", "0.58838576", "0.5872742", ...
0.5909019
16
Puts are buffered, but this tests when a delete (notbuffered) is applied before the actual Put that creates it.
@Test public void testApplyDeleteBeforePut() throws Exception { List<WALEntry> entries = new ArrayList<>(5); List<Cell> cells = new ArrayList<>(); for (int i = 0; i < 2; i++) { entries.add(createEntry(TestReplicationSink.TABLE_NAME1, i, Put, cells)); } entries.add(createEntry(TestReplicationSink.TABLE_NAME1, 1, DeleteFamily, cells)); for (int i = 3; i < 5; i++) { entries.add(createEntry(TestReplicationSink.TABLE_NAME1, i, Put, cells)); } TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(cells.iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir); Get get = new Get(Bytes.toBytes(1)); Result res = TestReplicationSink.table1.get(get); Assert.assertEquals(0, res.size()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testPutDel() {\n cache.put(\"A\", \"first\");\n cache.put(\"B\", \"second\");\n cache.put(\"C\", \"third\");\n cache.put(\"D\", \"fourth\");\n cache.put(\"E\", \"fifth\");\n cache.del(\"A\");\n cache.del(\"B\");\n cache.put(\"F\", \"six...
[ "0.5892001", "0.5868949", "0.58269525", "0.570216", "0.5690193", "0.559381", "0.55872136", "0.5555547", "0.5526931", "0.54760385", "0.5475203", "0.54319566", "0.53551567", "0.5343491", "0.534342", "0.5306532", "0.53045166", "0.5257251", "0.52546406", "0.5230135", "0.52102745"...
0.6003787
0
Test replicateEntries with a bulk load entry for 25 HFiles
@Test public void testReplicateEntriesForHFiles() throws Exception { Path dir = TestReplicationSink.TEST_UTIL.getDataTestDirOnTestFS("testReplicateEntries"); Path familyDir = new Path(dir, Bytes.toString(TestReplicationSink.FAM_NAME1)); int numRows = 10; List<Path> p = new ArrayList<>(1); final String hfilePrefix = "hfile-"; // 1. Generate 25 hfile ranges Random rng = new SecureRandom(); Set<Integer> numbers = new HashSet<>(); while ((numbers.size()) < 50) { numbers.add(rng.nextInt(1000)); } List<Integer> numberList = new ArrayList<>(numbers); Collections.sort(numberList); Map<String, Long> storeFilesSize = new HashMap<>(1); // 2. Create 25 hfiles Configuration conf = TestReplicationSink.TEST_UTIL.getConfiguration(); FileSystem fs = dir.getFileSystem(conf); Iterator<Integer> numbersItr = numberList.iterator(); for (int i = 0; i < 25; i++) { Path hfilePath = new Path(familyDir, (hfilePrefix + i)); HFileTestUtil.createHFile(conf, fs, hfilePath, TestReplicationSink.FAM_NAME1, TestReplicationSink.FAM_NAME1, Bytes.toBytes(numbersItr.next()), Bytes.toBytes(numbersItr.next()), numRows); p.add(hfilePath); storeFilesSize.put(hfilePath.getName(), fs.getFileStatus(hfilePath).getLen()); } // 3. Create a BulkLoadDescriptor and a WALEdit Map<byte[], List<Path>> storeFiles = new HashMap<>(1); storeFiles.put(TestReplicationSink.FAM_NAME1, p); org.apache.hadoop.hbase.wal.WALEdit edit = null; WALProtos.BulkLoadDescriptor loadDescriptor = null; try (Connection c = ConnectionFactory.createConnection(conf);RegionLocator l = c.getRegionLocator(TestReplicationSink.TABLE_NAME1)) { HRegionInfo regionInfo = l.getAllRegionLocations().get(0).getRegionInfo(); loadDescriptor = ProtobufUtil.toBulkLoadDescriptor(TestReplicationSink.TABLE_NAME1, UnsafeByteOperations.unsafeWrap(regionInfo.getEncodedNameAsBytes()), storeFiles, storeFilesSize, 1); edit = org.apache.hadoop.hbase.wal.WALEdit.createBulkLoadEvent(regionInfo, loadDescriptor); } List<WALEntry> entries = new ArrayList<>(1); // 4. Create a WALEntryBuilder WALEntry.Builder builder = TestReplicationSink.createWALEntryBuilder(TestReplicationSink.TABLE_NAME1); // 5. Copy the hfile to the path as it is in reality for (int i = 0; i < 25; i++) { String pathToHfileFromNS = new StringBuilder(100).append(TestReplicationSink.TABLE_NAME1.getNamespaceAsString()).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.TABLE_NAME1.getName())).append(SEPARATOR).append(Bytes.toString(loadDescriptor.getEncodedRegionName().toByteArray())).append(SEPARATOR).append(Bytes.toString(TestReplicationSink.FAM_NAME1)).append(SEPARATOR).append((hfilePrefix + i)).toString(); String dst = ((TestReplicationSink.baseNamespaceDir) + (Path.SEPARATOR)) + pathToHfileFromNS; Path dstPath = new Path(dst); FileUtil.copy(fs, p.get(0), fs, dstPath, false, conf); } entries.add(builder.build()); try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) { // 6. Assert no existing data in table Assert.assertEquals(0, scanner.next(numRows).length); } // 7. Replicate the bulk loaded entry TestReplicationSink.SINK.replicateEntries(entries, CellUtil.createCellScanner(edit.getCells().iterator()), TestReplicationSink.replicationClusterId, TestReplicationSink.baseNamespaceDir, TestReplicationSink.hfileArchiveDir); try (ResultScanner scanner = TestReplicationSink.table1.getScanner(new Scan())) { // 8. Assert data is replicated Assert.assertEquals(numRows, scanner.next(numRows).length); } // Clean up the created hfiles or it will mess up subsequent tests }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGenerateWorkItems() {\n\n ArrayList<Integer> lFileIdx = new ArrayList<>( Arrays.asList( 10, 20, 30, 37 ) );\n List<String> lExpectedWorkItemKeys = new ArrayList<String>();\n\n iBulkLoadDataService.generateWorkItems( lFileIdx, WAREHOUSE_STOCK_LEVEL, iFileImportKey );\n\n ...
[ "0.5948215", "0.5919022", "0.55547696", "0.55545694", "0.5368718", "0.5340755", "0.5338724", "0.5260635", "0.5194993", "0.51840645", "0.51775044", "0.51742786", "0.5169279", "0.51541305", "0.5142383", "0.51419306", "0.50935656", "0.50818425", "0.50776964", "0.50595415", "0.50...
0.77719486
0
Constructor for objects of class PinboardMaker
public PinboardMaker() { pictures = new ArrayList<String>(); pinboardObject = new Pinboard(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public JumbleBoard()\n {\n }", "private Board() {\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// A private board constructor to ensure only one is created\n\t\tsuper();\n\t}", "public Board()\r\n\t{\r\n\t\tsuper(8, 8);\r\n\t}", "public PersonalBoard(){\n this(0);\n }", "public Board() {\n ini...
[ "0.64381146", "0.62954175", "0.6255086", "0.6223907", "0.62193906", "0.6178728", "0.611444", "0.6025372", "0.6009489", "0.5978161", "0.59250814", "0.59001565", "0.58983845", "0.5896431", "0.58913916", "0.58904016", "0.5881024", "0.5868613", "0.58467865", "0.5839729", "0.58331...
0.8466572
0
A method that pauses the program for the given length of time, in milliseconds. This can be used when you want to pin items with a delay between them as in a slide show.
private void pause(long howLong) { try { Thread.sleep(howLong); } catch(InterruptedException e) { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void pause( int milliseconds )\n\t{\n\t\ttry\n\t\t{\n\t\t\tThread.sleep( milliseconds );\n\t\t}\n\t\tcatch( InterruptedException e )\n\t\t{\n\t\t}\n\t}", "private void pause() {\n pause(myDelay);\n }", "public void pauseFor( final long ms )\n\t{\n\t\tpauseUntil( System.currentTimeMilli...
[ "0.7452009", "0.71875614", "0.7177971", "0.69859713", "0.69714785", "0.69633794", "0.69390076", "0.68643135", "0.6651433", "0.6583392", "0.65078175", "0.64677215", "0.6454056", "0.64474213", "0.6444457", "0.6423838", "0.64124364", "0.64015794", "0.63816607", "0.6365627", "0.6...
0.72472703
1
A method that takes a String parameter and stores it in the collection. The picture should not be displayed on the pinboard when it is added.
public void addPicture(String picture) { pictures.add(picture); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addNewPicture() {\n ImageView imgView = (ImageView)findViewById(R.id.poll_object_btn_image);\n Resources res = getContext().getResources();\n if(this.type == \"generic\") {\n //add the new pciture for the generic type\n Bitmap bitmap = BitmapFactory.decodeReso...
[ "0.6070886", "0.60340726", "0.60274404", "0.6007413", "0.5870278", "0.5863393", "0.5843525", "0.5790195", "0.57792485", "0.5774089", "0.5679399", "0.5630311", "0.5622527", "0.555349", "0.55534697", "0.5532164", "0.550574", "0.5501333", "0.54620236", "0.54395646", "0.54041713"...
0.6672092
0
A method that returns (not prints) the number of picture filenames in the collection.
public int getNumberOfPictures() { return pictures.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int getFileNamesCount();", "int getFileNamesCount();", "public int getFileNamesCount() {\n return fileNames_.size();\n }", "int getFilesCount();", "int getFilesCount();", "public int getFileNamesCount() {\n return fileNames_.size();\n }", "public int getTotalPics()\n {\n\t\t/*Sys...
[ "0.76787657", "0.76787657", "0.7315007", "0.7261228", "0.7261228", "0.722722", "0.7220398", "0.7208848", "0.7188279", "0.7168204", "0.7059769", "0.70204175", "0.701542", "0.6960582", "0.69059175", "0.6894373", "0.68942094", "0.68540305", "0.67974323", "0.6748408", "0.6723147"...
0.73394746
2
listPictures: A method that prints to the BlueJ terminal window the names of the picture files in the collection, one per line, with an index number against each file name.
public void listPictures() { int index = 0; while(index >=0 && index < pictures.size()) { String filename = pictures.get(index); System.out.println(index + ": "+ filename); index++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printPhotos() {\n\t\t//System.out.println(\"Loading photos: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\n\t\tif(AccessibleUsersList.masterUserList.getUsers() != null) {\n\t\t\t//System.out.println(listOfPhotos);\n\t\t\tlistOfPhotos.clear();\n\t\t\tlistOfPhotos ...
[ "0.64297664", "0.61675173", "0.6050643", "0.60314745", "0.59714615", "0.5886612", "0.58339155", "0.5807069", "0.5791255", "0.5785271", "0.5721976", "0.56786674", "0.5581469", "0.5570826", "0.5563388", "0.5557735", "0.55309916", "0.55010504", "0.54905635", "0.5439659", "0.5429...
0.845083
0
A method that takes an integer as a parameter and uses the Pinboard object to display the image file at that index in the list. Use the pinPicture method of Pinboard. However, if the index is not valid (too small or too large) then use the pinNote method of the Pinboard object to pin an error message on the board.
public void pin(int index) { if(index >= 0 && index < pictures.size()) { pinboardObject.pinPicture(pictures.get(index)); } else { pinboardObject.pinNote("This is not a valid index."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unpin(int index)\r\n {\r\n if(index >=0 && index < pictures.size())\r\n {\r\n if(pinboardObject.removeItem(pictures.get(index)))\r\n {\r\n pinboardObject.removeItem(pictures.get(index));\r\n }\r\n else\r\n {\r\n ...
[ "0.61360973", "0.6059091", "0.5889259", "0.5846852", "0.5833965", "0.5822127", "0.5559027", "0.5527537", "0.54929733", "0.5471626", "0.5459366", "0.5421002", "0.54204243", "0.5392574", "0.5389824", "0.53885573", "0.5377043", "0.5340027", "0.5331336", "0.5323497", "0.53218275"...
0.77284753
0
A method that takes no parameters but causes all the pictures files in the collection to be displayed, one after the other, on the pinboard. Before anything is displayed, have displayAll call your clearPinboard method to clear the Pinboard. The displayAll method takes no parameters.
public void displayAll() { clearPinboard(); for(String filename : pictures) { pinboardObject.pinPicture(filename); pause(1000); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printPhotos() {\n\t\t//System.out.println(\"Loading photos: \" + AccessibleUsersList.masterUserList.userLoggedIn.selectedAlbum.getAlbum());\n\t\t\n\t\tif(AccessibleUsersList.masterUserList.getUsers() != null) {\n\t\t\t//System.out.println(listOfPhotos);\n\t\t\tlistOfPhotos.clear();\n\t\t\tlistOfPhotos ...
[ "0.6964576", "0.64272785", "0.6118159", "0.6042503", "0.6009563", "0.5848952", "0.5845994", "0.5803723", "0.5781376", "0.5780754", "0.57356507", "0.57188326", "0.56939894", "0.56162846", "0.5610478", "0.56045604", "0.5603403", "0.5594412", "0.55653", "0.55630803", "0.5560776"...
0.8317728
0
unpin: A method that takes an integer index as parameter. The integer is an index into the picture collection. If the index is not valid then use the pinNote method of the Pinboard to show an error message. The unpin method removes the associated picture from the pinboard. It does not remove the picture from the collection.
public void unpin(int index) { if(index >=0 && index < pictures.size()) { if(pinboardObject.removeItem(pictures.get(index))) { pinboardObject.removeItem(pictures.get(index)); } else { pinboardObject.pinNote("There is no image at index: " + index + " being displayed."); } } else { pinboardObject.pinNote("This is not a valid index."); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void unpin();", "public void unpin();", "public void pin(int index)\r\n {\r\n if(index >= 0 && index < pictures.size())\r\n { \r\n pinboardObject.pinPicture(pictures.get(index));\r\n }\r\n else\r\n {\r\n pinboardObject.pinNote(\"This is not a...
[ "0.67301726", "0.67301726", "0.63838726", "0.5924497", "0.5791764", "0.55127543", "0.54919225", "0.54454815", "0.54063493", "0.53827524", "0.5346018", "0.53209084", "0.531303", "0.5303322", "0.52826333", "0.5268958", "0.52085906", "0.5200918", "0.5197257", "0.51524615", "0.51...
0.8347905
0
This is the constructor that calls its parents class and sets up the pencil object.
public PencilTool() { super(); myPencil = new Path2D.Double(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Pencil() {\n\n }", "public PencilPen() {\n this(10.0);\n }", "public Pencil(double x, double y, double width, double height)\n {\n\n\t//outline of the pencil\n GeneralPath body = new GeneralPath();\n\t\n body.moveTo(200,400);\n body.lineTo(150,350);\n\tbody.lineTo(200,300)...
[ "0.8189405", "0.7387433", "0.69911146", "0.67379016", "0.67114216", "0.6528115", "0.6489324", "0.6409185", "0.6385651", "0.6379874", "0.63721526", "0.63634527", "0.6355613", "0.63341385", "0.63137114", "0.625936", "0.6208412", "0.6197669", "0.6197393", "0.6086464", "0.608278"...
0.7639343
1
This will allow for the shape to be drawn while following the cursor.
@Override public Shape getShape() { myPencil.moveTo(getStartPoint().getX(), getStartPoint().getY()); myPencil.lineTo(getEndPoint().getX(), getEndPoint().getY()); setStartPoint(getEndPoint()); return myPencil; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void paintCursor() {\r\n }", "public void draw_cursor(){\n }", "private void draw()\n {\n Canvas canvas = Canvas.getCanvas();\n canvas.draw(this, color, new Ellipse2D.Double(xPosition, yPosition, \n diameter, diameter));\n canvas.wait(10);\n }", "DrawSh...
[ "0.7098344", "0.6723895", "0.66508657", "0.65966356", "0.6578584", "0.6567007", "0.6553618", "0.65229714", "0.6503219", "0.6470291", "0.64159805", "0.6403965", "0.64003986", "0.6361375", "0.6333398", "0.6273908", "0.62470996", "0.6204959", "0.62008506", "0.6195175", "0.618305...
0.59034234
69
This will allow for the pencil tool to be reset to allow for more than one pencil object to be drawn.
public void resetTool() { myPencil = new Path2D.Double(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void reset() {\n points.reset();\n paintPolygon = false;\n paintResult = false;\n repaint();\n }", "protected void reset() {\n\t\tpush();\n\n\t\t// Clearen, en niet opnieuw aanmaken, om referenties elders\n\t\t// in het programma niet corrupt te maken !\n\t\tcurves.clear();\...
[ "0.69801223", "0.6793162", "0.66697675", "0.64713675", "0.64038265", "0.63997954", "0.6354964", "0.63337505", "0.63168603", "0.6301121", "0.6287596", "0.6275323", "0.6266287", "0.6242235", "0.62351924", "0.62137127", "0.62136084", "0.619819", "0.6185284", "0.61680454", "0.615...
0.7874221
0
Convert the given object to string with each line indented by 4 spaces (except the first line).
private String toIndentedString(java.lang.Object o) { if (o == null) { return "null"; } return o.toString().replace("\n", "\n "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String toIndentedString(Object object) {\n if (object == null) {\n return EndpointCentralConstants.NULL_STRING;\n }\n return object.toString().replace(EndpointCentralConstants.LINE_BREAK,\n EndpointCentralConstants.LINE_BREAK + EndpointCentralConstants.TAB_SPA...
[ "0.78847593", "0.75493765", "0.74971926", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0.746168", "0...
0.0
-1
TODO Autogenerated method stub List intList = Arrays.asList(intArray);
private static int findTheSingleNum(int[] intArray) { Arrays.sort(intArray); int length = intArray.length; int theSingleNum = 0; for (int i = 0; i < length; i = i + 3) { long firstOne = intArray[i]; long secOne = 0; long thirdOne = 0; if (i + 1 >= length) { theSingleNum = (int) firstOne; break; } else { secOne = intArray[i + 1]; thirdOne = intArray[i + 2]; } // BigDecimal one = new BigDecimal(firstOne); // BigDecimal two = new BigDecimal(secOne); // BigDecimal three = new BigDecimal(thirdOne); // // // BigDecimal sum = one.add(two).add(three); // double half = sum.divide(new BigDecimal(3)).doubleValue(); // if (half == firstOne && half == secOne && half == thirdOne) { // } else { // theSingleNum = firstOne; // break; // } long sum = firstOne+secOne+thirdOne; double half = sum/3; if (half == firstOne && half == secOne && half == thirdOne) { } else { theSingleNum = (int) firstOne; break; } } return theSingleNum; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static List<Integer> asList(int[] array) {\n\t\treturn new IntList(array);\n\t}", "private void intListToArrayList(int[] list, ArrayList<Integer> arrayList){\n for(int integer: list){\n arrayList.add(integer);\n }\n }", "private int[] arrayListToIntList(ArrayList<Integer> arr...
[ "0.78254163", "0.747035", "0.7371714", "0.7319807", "0.7228015", "0.72160923", "0.71855944", "0.71714455", "0.692097", "0.67838395", "0.6760567", "0.6653548", "0.66404235", "0.6575139", "0.6461416", "0.63033456", "0.6248748", "0.6214802", "0.61712795", "0.612402", "0.61209977...
0.0
-1
Constructor alternativo para StackDynamic a partir de otra pila.
public StackDynamic(StackIF<T> stack) { this(); if(stack != null) if(!stack.isEmpty()) { element = stack.getTop(); next = new StackDynamic<T>(stack.pop()); stack.push(element); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyDynamicStack() {\r\n items = new LinkedList<>();\r\n }", "public MyStack() {\n\n }", "public Stack() {}", "public Stack() {\r\n this(20);\r\n }", "public myStackUsingDynamicArray(){\n A = new dynamicArray();\n top=-1;\n bottom=-1;\n localSize=0;\...
[ "0.7036404", "0.6765698", "0.6725925", "0.66783017", "0.6652496", "0.6647708", "0.663454", "0.64914733", "0.64531636", "0.6451837", "0.64508885", "0.6387163", "0.63670754", "0.63529444", "0.6327907", "0.6280126", "0.6237614", "0.61896706", "0.6187447", "0.61873513", "0.618099...
0.68505186
1
Constructor alternativo para StackDynamic a partir de una lista.
public StackDynamic(ListIF<T> list) { this(); if(list != null) if(!list.isEmpty()) { element = list.getFirst(); next = new StackDynamic<T>(list.getTail()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MyDynamicStack() {\r\n items = new LinkedList<>();\r\n }", "public Stack(List<T> items) {\n \tstack = new ArrayList<T>();\n \tfor(T item: items){\n \t\tstack.add(item);\n \t}\n }", "public MyStack() {\n list = new LinkedList<>();\n list2 = new LinkedList<>();\n ...
[ "0.72827893", "0.6749384", "0.662226", "0.660889", "0.6556444", "0.6468688", "0.6460176", "0.6425604", "0.6418883", "0.6386229", "0.6317498", "0.6291614", "0.6268065", "0.62648356", "0.62107366", "0.6153109", "0.60824573", "0.60669893", "0.60519546", "0.6029452", "0.6021424",...
0.71476156
1
TODO Autogenerated method stub
public static void main(String[] args) { }
{ "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
Constructeur permettant d'instancier une nouvelle structure de Kripke.
public KripkeStructure() { states = new HashMap<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Kullanici() {}", "public Musik(){}", "public SlanjePoruke() {\n }", "public KdTree() \r\n\t{\r\n\t}", "public KdTree() {\n }", "public TmKabupaten() {\n\t}", "public Ov_Chipkaart() {\n\t\t\n\t}", "public Kendaraan() {\n }", "public OVChipkaart() {\n\n }", "public KdTree() ...
[ "0.71702385", "0.6596701", "0.65121627", "0.65115595", "0.65017533", "0.6482525", "0.641679", "0.63789225", "0.637322", "0.63597214", "0.6252425", "0.62377185", "0.62354803", "0.6154607", "0.6120131", "0.61032575", "0.61028975", "0.6101252", "0.60939044", "0.6057448", "0.6040...
0.68008125
1
TODO Autogenerated method stub
@Override public char getCont() { return super.getCont(); }
{ "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
Gets the builds the time.
public String getBuildTime() { return buildTime; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final int getBuildTime()\n{\n\treturn _buildTime;\n}", "public Instant getBuildDate() {\r\n\t\treturn buildDate;\r\n\t}", "public static String getBuildDate() {\n return mBuildDate;\n }", "String indexBlackLabBuildTime();", "public static final Date getBuildDate() { return buildDate; }", ...
[ "0.78715897", "0.73006237", "0.72328985", "0.7197922", "0.7176818", "0.7176818", "0.70703185", "0.6833415", "0.6777161", "0.6767659", "0.6733477", "0.6732346", "0.6649935", "0.66361535", "0.64899594", "0.6476222", "0.6454565", "0.6405137", "0.6390408", "0.63444406", "0.634112...
0.80225134
0
Gets the technical info.
public String getTechnicalInfo() { FacesContext ctx = FacesContext.getCurrentInstance(); // "git-Revision: " StringBuffer sb = new StringBuffer(); if (StringUtils.isNotBlank(getVersion())) { sb.append(JsfUtil.getResourceText("technical.info.version", ctx)); sb.append(": "); sb.append(getVersion()); } if (StringUtils.isNotBlank(getRevision())) { sb.append(", "); sb.append(JsfUtil .getResourceText("technical.info.version.git", ctx)); sb.append(": "); sb.append(getRevision()); } if (StringUtils.isNotBlank(getBuildTime())) { sb.append(", "); sb.append(JsfUtil.getResourceText("technical.info.build.time", ctx)); sb.append(": "); sb.append(getBuildTime()); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getTechnicalDetails () {\n\t\treturn technicalDetails;\n\t}", "public TechnicalInformation getTechnicalInformation() {\n TechnicalInformation \tresult;\n \n result = new TechnicalInformation(Type.ARTICLE);\n result.setValue(Field.AUTHOR, \"J. Cendrowska\");\n result.setValu...
[ "0.79561853", "0.72724515", "0.7226121", "0.71459615", "0.71224767", "0.6892878", "0.6803643", "0.67285186", "0.6600772", "0.6596564", "0.65616024", "0.64922494", "0.6458548", "0.645122", "0.6446892", "0.6443678", "0.64105797", "0.6405292", "0.6405292", "0.6399056", "0.639392...
0.75274724
1
Get a single flame
private Node generateView() { Text text = new Text("Click to\nextinguish!"); text.setFont(Font.font(Font.getDefault().getFamily(), FontWeight.BOLD, Font.getDefault().getSize())); text.setTextAlignment(TextAlignment.CENTER); text.setPickOnBounds(false); text.setMouseTransparent(true); VBox box = new VBox(5.0); AnimationChannel animChannel = new AnimationChannel(FXGL.image("flames.png"), 4, 20, 20, Duration.seconds(ANIM_TIME), 0, 3); AnimatedTexture texture = new AnimatedTexture(animChannel).loop(); texture.setFitWidth(SIZE); texture.setFitHeight(SIZE); texture.setSmooth(false); texture.setPickOnBounds(true); texture.setOnMousePressed(pEvt -> { FXGL.play("sizzle.wav"); FXGL.removeUINode(box); mCount--; if (mCount <= 0) { onCompleted(); } pEvt.consume(); }); // Wrap in entity so animation plays mEntity = FXGL.entityBuilder().view(texture).buildAndAttach(); box.getChildren().addAll(text, texture); box.setAlignment(Pos.CENTER); box.setPickOnBounds(false); // Fix width for accurate location generation box.setMinWidth(SIZE * 2.0); box.setMaxWidth(SIZE * 2.0); box.setPrefWidth(SIZE * 2.0); return box; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getFlame() {\r\n\t\treturn flame;\r\n\t}", "Fish findFish(){\r\n\t\t//step through GameCollection using iterator to find first instance of a fish\r\n\t\tIterator iterator = gc.getIterator();\r\n\t\twhile(iterator.hasNext()){\r\n\t\t\tGameObject g = iterator.getNext();\r\n\t\t\tif (g instanceof Fis...
[ "0.6235332", "0.59698397", "0.57907206", "0.56108296", "0.5589218", "0.54569644", "0.5454539", "0.5436752", "0.5406589", "0.54043716", "0.5379028", "0.5379028", "0.53677374", "0.53428733", "0.5332755", "0.53294724", "0.52671677", "0.5251593", "0.51932514", "0.5159488", "0.514...
0.0
-1
Generate a location somewhere on the drill
@Override protected Point2D generateViewLocation() { double minX = 300.0 - Constants.DRILL_WIDTH / 2.0 - SIZE * 0.5 + X_PAD; // Account for VBox width double maxX = 300.0 + Constants.DRILL_WIDTH / 2.0 - SIZE * 1.5 - X_PAD; // Account for VBox width double maxY = Constants.DRILL_HEIGHT - Y_PAD; return new Point2D(FXGL.random(minX, maxX), FXGL.random(Y_PAD / 2.0, maxY)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generate() {\n\t\tLocation location0 = new Location();\n\t\tlocation0.setAddress(\"Zhong Nan Hai\");\n\n\t\tlocation0.setLatitude(0.0);\n\t\tlocation0.setLongitude(0.0);\n;\n\t\tTestDriver.locationList.add(location0);\n\t\t\n\t\t\n\t\tLocation location1 = new Location();\n\t\tlocation1.setAddress(\"Tia...
[ "0.69093555", "0.6723688", "0.6723688", "0.6723688", "0.632243", "0.6073901", "0.6073901", "0.6073901", "0.6073901", "0.6073901", "0.6073901", "0.6073901", "0.6073901", "0.6072821", "0.6048473", "0.60275835", "0.60275835", "0.60275835", "0.6026873", "0.6013945", "0.6007182", ...
0.5859491
31
Creation date: 20160528. Author: jjauregui Copyright 2015, Asset Science LLC. All rights reserved.
public interface MessageHandler { default void handle(Message message, BlackjackPlayer player) { throw new RuntimeException("Unhandled Message: " + message); } default void handle(UnparseableMessage message) { System.err.println("Could not parse message: " + message); } void handle(Ping message); void handle(Pong message, BlackjackPlayer player); void handle(Name message); void handle(SetDisplayName message, BlackjackPlayer player); void handle(Start message, BlackjackPlayer player); void handle(ChoiceQuery message); void handle(Take message, BlackjackPlayer player); void handle(Pass message, BlackjackPlayer player); void handle(Play message, BlackjackPlayer player); void handle(GameOver message); void handle(Info message); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void mo4359a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "public void mo38117a() {\n }", "private stendhal() {\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n ...
[ "0.60910565", "0.60239565", "0.5962159", "0.5961305", "0.5935447", "0.5935447", "0.5935447", "0.5935447", "0.5935447", "0.5935447", "0.5935447", "0.5904981", "0.58669674", "0.5779289", "0.57776904", "0.5756714", "0.57396287", "0.57356733", "0.57317364", "0.57083106", "0.57083...
0.0
-1
correct password for gmail id
public static void SendEmailConfirmation(String toEmail, String content) { try { System.out.println("Se pregateste email-ul."); Properties properties = new Properties(); properties.put("mail.smtp.host", "smtp.gmail.com"); properties.put("mail.smtp.port", "587"); properties.put("mail.smtp.auth", "true"); properties.put("mail.smtp.starttls.enable", "true"); Authenticator auth = new Authenticator() { @Override protected PasswordAuthentication getPasswordAuthentication() { return new PasswordAuthentication(fromEmail, password); } }; Session session = Session.getInstance(properties, auth); sendEmail(session, toEmail, "[INFORMATII PERSONALE] Credentiale pentru aplicatia UVT StudentApp", content); } catch ( Exception e) { System.out.println("Nu s-a putut trimite mail-ul."); return; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void validatePassword(String usid, String password) throws Exception;", "String getNewPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassw...
[ "0.6878905", "0.6681165", "0.65423524", "0.65423524", "0.65423524", "0.65423524", "0.65423524", "0.65423524", "0.65423524", "0.6523667", "0.64423054", "0.64423054", "0.64423054", "0.64423054", "0.64423054", "0.64423054", "0.64423054", "0.64423054", "0.64423054", "0.6323198", ...
0.0
-1
TODO Autogenerated method stub
public int run(String[] otherArgs) throws Exception { Configuration conf = new Configuration(); // get all args if (otherArgs.length != 6) { System.err.println("Input : hadoop jar InMemoryJoinMutualFrdsDoB <userA> <userB> <soc-LiveJournalAdj1.txt> <temp_out> <userdata.txt> <o/p>"); System.exit(2); } conf.set("userA", otherArgs[0]); conf.set("userB", otherArgs[1]); // create a job with name "InlineArgument" and assign all Jar,Mapper,Reducer,Output classes Job job = new Job(conf, "InlineArgument"); job.setJarByClass(InMemoryJoinMutualFrdsDoB.class); job.setMapperClass(MutualFriendsGeneration.Map.class); job.setReducerClass(MutualFriendsGeneration.Reduce.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(Text.class); FileInputFormat.addInputPath(job, new Path(otherArgs[2])); Path p=new Path(otherArgs[3]); FileOutputFormat.setOutputPath(job, p); int code = job.waitForCompletion(true) ? 0 : 1; Configuration conf1 = getConf(); conf1.set("userdata", otherArgs[4]); Job job2 = new Job(conf1, "InMemoryJoinDateofBirth"); job2.setJarByClass(InMemoryJoinMutualFrdsDoB.class); job2.setMapperClass(Map.class); job2.setOutputKeyClass(Text.class); job2.setOutputValueClass(Text.class); FileInputFormat.addInputPath(job2,p); FileOutputFormat.setOutputPath(job2, new Path(otherArgs[5])); // Check job completion code = job2.waitForCompletion(true) ? 0 : 1; System.exit(code); return code; }
{ "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
public List testData = userDAO.findListById("Test");
public boolean deleteSession() { if (Driver.getCurrentDriver().getClass().getSimpleName().contains("InternetExplorer")) { Driver.refreshDriver(); driver = Driver.getCurrentDriver(); driver.get(baseUrl); } else if (Driver.getCurrentDriver().getClass().getSimpleName().contains("Remote")) { Driver.getCurrentDriver().executeScript( "var cookies = document.cookie.split(\";\");for (var i = 0; i < cookies.length; i++) document.cookie = cookies[i].split(\"=\")[0]+\"=;expires=Thu, 01 Jan 1970 00:00:00 GMT\";", (new Button()).getElement()); } else { // System.out.println(Driver.getCurrentDriver().executeScript("return // document.cookie.split(\";\");", (new Button()).getElement())); Driver.getCurrentDriver().manage().deleteAllCookies(); if (!driver.getClass().getSimpleName().contains("SelendroidDriver")) { Driver.getCurrentDriver().executeScript( "var cookies = document.cookie.split(\";\");for (var i = 0; i < cookies.length; i++) document.cookie = cookies[i].split(\"=\")[0]+\"=;expires=Thu, 01 Jan 1970 00:00:00 GMT\";", (new Button()).getElement()); } // System.out.println(Driver.getCurrentDriver().executeScript("return // document.cookie.split(\";\");", (new Button()).getElement())); } Logger.logDebug("All cookies were deleted"); // return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void getListTest() throws SQLException, IDAO.DALException {\n User[] userList = userDAO.getList();\n assertEquals(\"Simon\", userList[0].getNavn());\n assertEquals(\"Silas\", userList[1].getNavn());\n assertEquals(\"Peter\", userList[2].getNavn());\n }", "@Test\n ...
[ "0.7735816", "0.75845295", "0.7494338", "0.7158144", "0.71516836", "0.7103396", "0.70841753", "0.70783424", "0.706586", "0.7065585", "0.7065426", "0.70532167", "0.69947493", "0.6939172", "0.68774444", "0.6875796", "0.6870259", "0.6816608", "0.6786492", "0.6755316", "0.6750872...
0.0
-1
An interface for generating new requests and responses. This is implemented by the application and called by the stack for processing requests and responses. When a Request comes in off the wire, the stack calls newSIPServerRequest which is then responsible for processing the request. When a response comes off the wire, the stack calls newSIPServerResponse to process the response.
public interface StackMessageFactory { /** * Make a new SIPServerResponse given a SIPRequest and a message * channel. * * @param sipRequest is the incoming request. * @param sipTransaction is the message channel on which this request was * received. */ public ServerRequestInterface newSIPServerRequest( SIPRequest sipRequest, SIPTransaction sipTransaction); /** * Generate a new server response for the stack. * * @param sipResponse is the incoming response. * @param msgChannel is the message channel on which the response was * received. */ public ServerResponseInterface newSIPServerResponse( SIPResponse sipResponse, MessageChannel msgChannel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ServerRequestInterface newSIPServerRequest(\n SIPRequest sipRequest,\n SIPTransaction sipTransaction);", "protected SIPServerRequestInterface newSIPServerRequest(\n SIPRequest\t\trequestReceived,\n MessageChannel\trequestMessageChannel\n ) {\n \n // Iterator throu...
[ "0.6956653", "0.6501232", "0.61003506", "0.59607273", "0.5852408", "0.5833923", "0.583023", "0.57981664", "0.5765566", "0.5584014", "0.55143815", "0.5511273", "0.54974127", "0.54809767", "0.54558074", "0.5446704", "0.5439145", "0.54035324", "0.53849244", "0.5374523", "0.53428...
0.63209546
2
Make a new SIPServerResponse given a SIPRequest and a message channel.
public ServerRequestInterface newSIPServerRequest( SIPRequest sipRequest, SIPTransaction sipTransaction);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ServerResponseInterface newSIPServerResponse(\n SIPResponse sipResponse,\n MessageChannel msgChannel);", "protected SIPServerResponseInterface newSIPServerResponse(\n SIPResponse\t\tresponseReceived,\n MessageChannel\tresponseMessageChannel\n ) {\n //\tSystem.out.println...
[ "0.75413823", "0.6911778", "0.63050133", "0.54076326", "0.52618337", "0.517849", "0.5112104", "0.50180006", "0.49425444", "0.48737374", "0.48229924", "0.48028213", "0.47976404", "0.47521895", "0.4734368", "0.4673702", "0.46620855", "0.4649865", "0.46107388", "0.4541406", "0.4...
0.56884724
3
Generate a new server response for the stack.
public ServerResponseInterface newSIPServerResponse( SIPResponse sipResponse, MessageChannel msgChannel);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void buildResponse() {\r\n appendResponse(\"<?xml version=\\\"1.0\\\" standalone=\\\"no\\\"?>\\r\\n\");\r\n appendResponse(\"<!DOCTYPE RETS SYSTEM \\\"RETS-20021015.dtd\\\">\\r\\n\");\r\n appendResponse(\"<RETS ReplyCode=\\\"\");\r\n appendResponse(replyCode);\r\n appen...
[ "0.62124354", "0.607074", "0.5995497", "0.5968779", "0.5959725", "0.59251815", "0.59240806", "0.5911412", "0.58547896", "0.5784245", "0.5693907", "0.5681932", "0.5653786", "0.5647284", "0.56381744", "0.56254905", "0.5618696", "0.55802864", "0.5572731", "0.5503179", "0.5492276...
0.5211523
54
Use identity for strings, not equals : it's the typed word if it's the same object
private int getSuggestionTextColor(final SuggestedWords suggestedWords, final int indexInSuggestedWords) { final boolean isTypedWord = suggestedWords.getInfo(indexInSuggestedWords).isKindOf( SuggestedWordInfo.KIND_TYPED); final int color; if (indexInSuggestedWords == SuggestedWords.INDEX_OF_AUTO_CORRECTION && suggestedWords.mWillAutoCorrect) { color = mColorAutoCorrect; } else if (isTypedWord && suggestedWords.mTypedWordValid) { color = mColorValidTypedWord; } else if (isTypedWord) { color = mColorTypedWord; } else { color = mColorSuggested; } if (suggestedWords.mIsObsoleteSuggestions && !isTypedWord) { return applyAlpha(color, mAlphaObsoleted); } return color; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n String name = new String(\"String one\");\n String name2 = name;\n\n System.out.println(name);\n System.out.println(name2);\n\n System.out.println(name.hashCode());\n System.out.println(name2.hashCode());\n\n name2 = \"Stri...
[ "0.6242214", "0.59707206", "0.5869174", "0.5755078", "0.57536554", "0.5721542", "0.5629123", "0.5619258", "0.5509231", "0.5449064", "0.5448134", "0.54356027", "0.54332036", "0.5430702", "0.5392751", "0.5376077", "0.53711283", "0.535534", "0.5350594", "0.53468084", "0.53141993...
0.0
-1
Layout suggestions to the suggestions strip. And returns the start index of more suggestions.
public int layoutAndReturnStartIndexOfMoreSuggestions( final Context context, final SuggestedWords suggestedWords, final ViewGroup stripView, final ViewGroup placerView) { if (suggestedWords.isPunctuationSuggestions()) { return layoutPunctuationsAndReturnStartIndexOfMoreSuggestions( (PunctuationSuggestions)suggestedWords, stripView); } final int wordCountToShow = suggestedWords.getWordCountToShow( Settings.getInstance().getCurrent().mShouldShowLxxSuggestionUi); final int startIndexOfMoreSuggestions = setupWordViewsAndReturnStartIndexOfMoreSuggestions( suggestedWords, mSuggestionsCountInStrip); final TextView centerWordView = mWordViews.get(mCenterPositionInStrip); final int stripWidth = stripView.getWidth(); final int centerWidth = getSuggestionWidth(mCenterPositionInStrip, stripWidth); if (wordCountToShow == 1 || getTextScaleX(centerWordView.getText(), centerWidth, centerWordView.getPaint()) < MIN_TEXT_XSCALE) { // Layout only the most relevant suggested word at the center of the suggestion strip // by consolidating all slots in the strip. final int countInStrip = 1; mMoreSuggestionsAvailable = (wordCountToShow > countInStrip); layoutWord(context, mCenterPositionInStrip, stripWidth - mPadding); stripView.addView(centerWordView); setLayoutWeight(centerWordView, 1.0f, ViewGroup.LayoutParams.MATCH_PARENT); if (SuggestionStripView.DBG) { layoutDebugInfo(mCenterPositionInStrip, placerView, stripWidth); } final Integer lastIndex = (Integer)centerWordView.getTag(); return (lastIndex == null ? 0 : lastIndex) + 1; } final int countInStrip = mSuggestionsCountInStrip; mMoreSuggestionsAvailable = (wordCountToShow > countInStrip); @SuppressWarnings("unused") int x = 0; for (int positionInStrip = 0; positionInStrip < countInStrip; positionInStrip++) { if (positionInStrip != 0) { final View divider = mDividerViews.get(positionInStrip); // Add divider if this isn't the left most suggestion in suggestions strip. addDivider(stripView, divider); x += divider.getMeasuredWidth(); } final int width = getSuggestionWidth(positionInStrip, stripWidth); final TextView wordView = layoutWord(context, positionInStrip, width); stripView.addView(wordView); setLayoutWeight(wordView, getSuggestionWeight(positionInStrip), ViewGroup.LayoutParams.MATCH_PARENT); x += wordView.getMeasuredWidth(); if (SuggestionStripView.DBG) { layoutDebugInfo(positionInStrip, placerView, x); } } return startIndexOfMoreSuggestions; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int setupWordViewsAndReturnStartIndexOfMoreSuggestions(\n final SuggestedWords suggestedWords, final int maxSuggestionInStrip) {\n for (int positionInStrip = 0; positionInStrip < maxSuggestionInStrip; ++positionInStrip) {\n final TextView wordView = mWordViews.get(positionInStr...
[ "0.70760787", "0.5651387", "0.5489588", "0.511302", "0.51049185", "0.5011463", "0.49976447", "0.49779662", "0.49336585", "0.49137273", "0.4908065", "0.48674315", "0.48499703", "0.4843532", "0.48355073", "0.4831283", "0.48184413", "0.47960046", "0.4789449", "0.47170225", "0.47...
0.66817725
1
Clear all suggestions first
private int setupWordViewsAndReturnStartIndexOfMoreSuggestions( final SuggestedWords suggestedWords, final int maxSuggestionInStrip) { for (int positionInStrip = 0; positionInStrip < maxSuggestionInStrip; ++positionInStrip) { final TextView wordView = mWordViews.get(positionInStrip); wordView.setText(null); wordView.setTag(null); // Make this inactive for touches in {@link #layoutWord(int,int)}. if (SuggestionStripView.DBG) { mDebugInfoViews.get(positionInStrip).setText(null); } } int count = 0; int indexInSuggestedWords; for (indexInSuggestedWords = 0; indexInSuggestedWords < suggestedWords.size() && count < maxSuggestionInStrip; indexInSuggestedWords++) { final int positionInStrip = getPositionInSuggestionStrip(indexInSuggestedWords, suggestedWords); if (positionInStrip < 0) { continue; } final TextView wordView = mWordViews.get(positionInStrip); // {@link TextView#getTag()} is used to get the index in suggestedWords at // {@link SuggestionStripView#onClick(View)}. wordView.setTag(indexInSuggestedWords); wordView.setText(getStyledSuggestedWord(suggestedWords, indexInSuggestedWords)); wordView.setTextColor(getSuggestionTextColor(suggestedWords, indexInSuggestedWords)); if (SuggestionStripView.DBG) { mDebugInfoViews.get(positionInStrip).setText( suggestedWords.getDebugString(indexInSuggestedWords)); } count++; } return indexInSuggestedWords; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void refreshSuggestions() {\n resetSections(/* alwaysAllowEmptySections = */false);\n }", "private void reset() {\n \t\tif (currentSuggestion != null) {\n \t\t\tsetPromptingOff(currentSuggestion.getReplacementString());\n \t\t} else {\n \t\t\tif (focused) {\n \t\t\t\tsetPromptingOff(\"\");\n \t\...
[ "0.7868303", "0.72725636", "0.7143707", "0.70483416", "0.69844735", "0.68852437", "0.6823164", "0.6798139", "0.6796868", "0.67448646", "0.67319185", "0.67023104", "0.6697359", "0.66127217", "0.6601578", "0.65467256", "0.6513631", "0.6513631", "0.65036476", "0.65036476", "0.65...
0.0
-1
Set the energy level of the plant
@Override public void setEngergyLevel(double energy) { this.energy = energy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setEnergy(double energy) { this.energy = energy; }", "public void setEnergy (double energy) {\n\t this.energy = energy;\n\t}", "public void setEnergy(int energy) {\r\n\t\tthis.energy = energy;\r\n\t}", "public void setEnergy(int energy) {\n\t\tthis.energy = energy;\n\t}", "public void setEn...
[ "0.74261945", "0.73623884", "0.7339377", "0.7196892", "0.71348447", "0.70768595", "0.7008761", "0.69553256", "0.68978584", "0.6888147", "0.65403265", "0.65179783", "0.63998145", "0.63777775", "0.6343939", "0.62653077", "0.6242939", "0.6228924", "0.62030363", "0.62014115", "0....
0.7979231
0
Get the energy level of this plant
@Override public double getEnergyLevel() { return energy; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getEnergy() {\n return energy;\n }", "public double getEnergy() {\n\t\treturn energy;\n\t}", "public int getEnergy()\n {\n return energy;\n }", "public int getEnergy() {\n\t\treturn energy;\n\t}", "public double getEnergy() {\n\t\treturn _energy;\n\t}", "public Energy ge...
[ "0.7646717", "0.7604549", "0.75928855", "0.75814205", "0.7540329", "0.7531107", "0.7525687", "0.75070757", "0.7486818", "0.7429865", "0.7385277", "0.7373848", "0.7165919", "0.7133763", "0.70700395", "0.7007867", "0.6979631", "0.6833534", "0.68031764", "0.67850155", "0.6750571...
0.84586483
0
Returns the list of eatable particles for this plant. currently the list is empty
@Override public DietCollection digestion() { return new DietCollection(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Particle> getParticles()\n\t{\n\t\treturn particles;\n\t}", "public Array<Particle> getParticlesListIteration() {\n return new Array(masterList);\n }", "public int getParticles() {\r\n\t\treturn particles;\r\n\t}", "public static synchronized List<ActiveParticle> getActiveParticles...
[ "0.76997834", "0.7010295", "0.67573744", "0.6643841", "0.6421173", "0.59515405", "0.5900875", "0.581365", "0.57916635", "0.57612944", "0.57425743", "0.57150596", "0.57042193", "0.5647952", "0.5631493", "0.56202143", "0.5615538", "0.55909276", "0.5577421", "0.55755436", "0.553...
0.0
-1
/ Grab the listing saved in shared preferences to edit
@Override public void run() { final Listing editingListing = new SharedPreferenceHelper(AddListingView.this).getListingFromSharedPrefs(); if (editingListing != null) { runOnUiThread(new Runnable() { @Override public void run() { prepareEdit(editingListing, pd); } }); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void getPrefs(){\n SharedPreferences sharedPreferences = getSharedPreferences(LIST_TAG, MODE_PRIVATE);\n Gson gson = new Gson();\n String json = sharedPreferences.getString(PREFS_TAG, null);\n Type type = new TypeToken<ArrayList<String[]>>() {}.getType();\n dataPref = gso...
[ "0.6224073", "0.6195758", "0.6183749", "0.5892849", "0.5737402", "0.57276", "0.5704117", "0.56447905", "0.5638778", "0.5632648", "0.5629554", "0.5585101", "0.5573385", "0.5565956", "0.5550227", "0.5505177", "0.54977906", "0.54525506", "0.5445497", "0.5440833", "0.54329705", ...
0.6374618
0
populate the views in this activity with the values defined for an already existing listing
private void prepareEdit(Listing editingListing, ProgressDialog pd) { setTitle(String.format("%s %s %s", getString(R.string.editing_title), editingListing.getAddress_number(), editingListing.getAddress_street())); int selection = 0; mEditing = true; mEditingId = editingListing.getId(); mListingBeingEdited = editingListing; switch (editingListing.getType()) { case "Flat": selection = 0; break; case "Apartment": selection = 1; break; case "Bungalow": selection = 2; break; case "Cottage": selection = 3; break; case "Terrace House": selection = 4; break; case "Semi-detached house": selection = 5; break; case "Detached house": selection = 6; break; } mTypeSpinner.setSelection(selection); mBedroomsSpinner.setSelection(editingListing.getNumbOfBedRooms() - 1); mSurfaceAreaText.setText(String.valueOf(editingListing.getSurfaceArea())); mPriceEditText.setText(String.valueOf(editingListing.getPrice()).substring(0, String.valueOf(editingListing.getPrice()).indexOf("."))); mPoiAutocomplete.setText(editingListing.getPoi()); mAddressPostcodeEditText.setText(editingListing.getAddress_postcode()); mAddressNumberEditText.setText(editingListing.getAddress_number()); mAddressStreetEditText.setText(editingListing.getAddress_street()); mAddressTownEditText.setText(editingListing.getAddress_town()); mAddressCountyEditText.setText(editingListing.getAddress_county()); mDescriptionEditText.setText(editingListing.getDescr()); if (editingListing.getBuyOrLet().toLowerCase().equals("buy")) { mBuyOrLetSwitch.setChecked(false); } else { mBuyOrLetSwitch.setChecked(true); } if (editingListing.isForSale()) { updateListingSoldStatus(false); } else { updateListingSoldStatus(true); } if (editingListing.getFirebasePhotos() == null) { restoreImages(editingListing.getLocalDbPhotos(), editingListing.getPhotoDescriptions(), LOCAL_DB_ID); } else { restoreImages(editingListing.getFirebasePhotos(), editingListing.getPhotoDescriptions(), FIREBASE_ID); } if (pd.isShowing()) { pd.dismiss(); //dismiss the progress dialog shown to the user when restoring the listing } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void populateView() {\r\n populateHead();\r\n ArrayList arrayList = new ArrayList();\r\n arrayList.add(new AccDetailItem(\"Loan Amount\", this.account.totLoanAmt, MiscUtils.getColor(getResources(), this.account.totLoanAmt)));\r\n arrayList.add(new AccDetailItem(\"Interest Rate\",...
[ "0.69720745", "0.6783603", "0.669619", "0.65578955", "0.64104855", "0.6310689", "0.62857264", "0.626765", "0.62632173", "0.6237792", "0.6223763", "0.6217759", "0.61927986", "0.618485", "0.61735463", "0.6168303", "0.6162401", "0.6151836", "0.6124555", "0.61111116", "0.6100111"...
0.0
-1
If we are mEditing a listing, this method will retrieve either a byte[] or arraylist of uris that are used to restore the mImages for the listing These mImages are then passed into the recyclerview adapter to display to the user
@SuppressWarnings("unchecked") private void restoreImages(Object photos, final String[] photoDescriptions, int id) { if (photos != null) { switch (id) { case LOCAL_DB_ID: List<byte[]> localPhotos = (List<byte[]>) photos; mImages = ImageTools.byteArrayToBitmaps(localPhotos); mImageDescription = new ArrayList<>(Arrays.asList(photoDescriptions)); initializeRecyclerView(); break; case FIREBASE_ID: ArrayList<String> firebasePhotos = (ArrayList<String>) photos; for (String s : firebasePhotos) { try { //noinspection deprecation Glide.with(getApplicationContext()).asBitmap().load(s).into(new SimpleTarget<Bitmap>() { @Override public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) { mImages.add(resource); mImageDescription = new ArrayList<>(Arrays.asList(photoDescriptions)); initializeRecyclerView(); } }); } catch (Exception e) { e.printStackTrace(); } } break; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onSuccess(Uri uri) {\n if (!ImageListUrl.contains(uri.toString())) {\n ImageListUrl.add(uri.toString());\n\n /// add property if imageurl arraylist...
[ "0.63166255", "0.6150826", "0.6008917", "0.5937533", "0.5916016", "0.590813", "0.5835838", "0.5819091", "0.5767488", "0.5752444", "0.5715674", "0.5709748", "0.5696747", "0.56936586", "0.5675938", "0.5635676", "0.5629809", "0.5617844", "0.5605479", "0.5601724", "0.5597934", ...
0.5703928
12
Initialize all views in this activity, set any relevant tags and create the spinners
private void initializeViews() { mAllEditTexts = new ArrayList<>(); mImagesRecyclerView = findViewById(R.id.images_recycler_view); mAddPictureBtn = findViewById(R.id.add_picture_btn); mSaleStatusImage = findViewById(R.id.sale_status_image); mSaleStatusImage.setTag(FOR_SALE_TAG); mTypeSpinner = findViewById(R.id.type_spinner); mBedroomsSpinner = findViewById(R.id.rooms_spinner); mTypeSpinner.setAdapter(new ArrayAdapter<>(this, R.layout.spinner_item, getResources().getStringArray(R.array.spinner_types))); mBedroomsSpinner.setAdapter(new ArrayAdapter<>(this, R.layout.spinner_item, getResources().getStringArray(R.array.spinner_number_of_rooms))); mSurfaceAreaText = findViewById(R.id.surface_area_text1); mPriceEditText = findViewById(R.id.price_edit_text1); mAddressPostcodeEditText = findViewById(R.id.address_postcode_et1); mAddressNumberEditText = findViewById(R.id.address_number_et1); mAddressStreetEditText = findViewById(R.id.address_street_et1); mAddressTownEditText = findViewById(R.id.address_town_et1); mAddressCountyEditText = findViewById(R.id.address_county_et1); mDescriptionEditText = findViewById(R.id.description_edit_text1); mBuyOrLetSwitch = findViewById(R.id.buy_or_let); mSaveButton = findViewById(R.id.savebtn); mAllEditTexts.add(mSurfaceAreaText); mAllEditTexts.add(mPriceEditText); mAllEditTexts.add(mAddressPostcodeEditText); mAllEditTexts.add(mAddressNumberEditText); mAllEditTexts.add(mAddressStreetEditText); mAllEditTexts.add(mAddressTownEditText); mAllEditTexts.add(mAddressCountyEditText); mAllEditTexts.add(mDescriptionEditText); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initializeViews(Context context) {\n LayoutInflater inflater = (LayoutInflater) context\n .getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n inflater.inflate(R.layout.field_spinner_field, this);\n }", "private void initSpinners() {\n mColourArray = Constants...
[ "0.74372023", "0.7261589", "0.7221891", "0.7207833", "0.7169862", "0.7156251", "0.7128792", "0.70864993", "0.70509094", "0.70423234", "0.69369835", "0.6920571", "0.6897768", "0.68551934", "0.68426305", "0.6827451", "0.6824746", "0.6824434", "0.6802473", "0.6800589", "0.680000...
0.67383754
28
Created the recycler view to display a listings mImages
private void initializeRecyclerView() { if (mImages != null) { if (mImages.size() > 0) { mImagesRecyclerView.setBackground(null); } else { mImagesRecyclerView.setBackgroundResource(R.drawable.placeholder_image); } mImagesRecyclerView.setLayoutManager(new GridLayoutManager(this, 3)); mAdapter = new ImagesRecyclerViewAdapter(this, mImages, mImageDescription, this); mImagesRecyclerView.setAdapter(mAdapter); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void setUpListOfImageRecyclerView() {\n try {\n\n content_layout.removeAllViews();\n RecyclerView recyclerView = new RecyclerView(getApplicationContext());\n recyclerView.setLayoutParams(\n new ViewGroup.LayoutParams(\n ...
[ "0.74677426", "0.71521044", "0.701401", "0.6997454", "0.69911724", "0.69803077", "0.69510645", "0.68891937", "0.68887436", "0.68371737", "0.6825326", "0.6811791", "0.68104374", "0.68026876", "0.6791339", "0.67834026", "0.6781562", "0.67421085", "0.67284024", "0.6709758", "0.6...
0.68034244
13
initialize on click events for this activity
@SuppressLint("CheckResult") private void initializeClickEvents() { //create the onlick event for the add picture button Disposable pictureClick = RxView.clicks(mAddPictureBtn) .subscribe(new Consumer<Unit>() { @Override public void accept(Unit unit) { if (mImages.size() < MAX_NUM_IMAGES) { displayPictureMethodDialog(); } else { Toast.makeText(AddListingView.this, R.string.maximum_images, Toast.LENGTH_LONG).show(); } } }); mCompositeDisposable.add(pictureClick); //create the on click event for the save button final Disposable save = RxView.clicks(mSaveButton) .subscribe(new Consumer<Unit>() { @Override public void accept(Unit unit) { saveData(); } }); mCompositeDisposable.add(save); //create onclick for the property status image Disposable statusChange = RxView.clicks(mSaleStatusImage) .subscribe(new Consumer<Unit>() { @Override public void accept(Unit unit) { switch (mSaleStatusImage.getTag().toString()) { case FOR_SALE_TAG: updateListingSoldStatus(true); break; case SOLD_TAG: updateListingSoldStatus(false); } } }); mCompositeDisposable.add(statusChange); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initEvents() {\n\t\tuser_head_img.setOnClickListener(this);\r\n\t\ttxt_zcgl.setOnClickListener(this);\r\n\t\ttxt_tzgl.setOnClickListener(this);\r\n\t\ttxt_jlcx.setOnClickListener(this);\r\n\t\ttxt_wdyhk.setOnClickListener(this);\r\n\t\ttxt_wdxx.setOnClickListener(this);\r\n\t\tlayout_zhaq.setOnClickLi...
[ "0.7403731", "0.7393248", "0.73080915", "0.7293977", "0.71724325", "0.7150988", "0.7114813", "0.69452596", "0.69138736", "0.6903128", "0.69030577", "0.68678993", "0.6864154", "0.681586", "0.6754823", "0.6727191", "0.6713616", "0.6686218", "0.6681646", "0.6671881", "0.6657986"...
0.6744559
15
update the sold status of a listing, changes the sales status image and tag depending on whether the listing is sold or not
private void updateListingSoldStatus(boolean sold) { if (sold) { mSaleStatusImage.setBackgroundResource(R.drawable.sold); mSaleStatusImage.setTag(SOLD_TAG); } else { mSaleStatusImage.setBackgroundResource(R.drawable.for_sale); mSaleStatusImage.setTag(FOR_SALE_TAG); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void updateSoldProductInfo() { public static final String COL_SOLD_PRODUCT_CODE = \"sells_code\";\n// public static final String COL_SOLD_PRODUCT_SELL_ID = \"sells_id\";\n// public static final String COL_SOLD_PRODUCT_PRODUCT_ID = \"sells_product_id\";\n// public static final String COL_SOLD_PR...
[ "0.6182802", "0.61543506", "0.60236883", "0.6001555", "0.58865315", "0.5712399", "0.560646", "0.5586712", "0.55710715", "0.5555148", "0.545199", "0.5351443", "0.53146267", "0.5282606", "0.52773935", "0.52727395", "0.52520746", "0.5232884", "0.5229408", "0.5175068", "0.5166492...
0.8327197
0
Called from the save button. Checks first to see if we are ok to save based on Do we have at least one image? Do all the edit texts have a value? If ok to save, a listing object is passed to the presenter to save the data
@SuppressLint("CheckResult") private void saveData() { boolean okToSave = true; if (mImages.size() == 0) { okToSave = false; ToastModifications.createToast(this, getString(R.string.at_least_one_photo), Toast.LENGTH_LONG); } else { for (View v : mAllEditTexts) { EditText thisEditText = (EditText) v; if (thisEditText.getText().toString().equals("")) { okToSave = false; ToastModifications.createToast(this, getString(R.string.enter_value_for) + thisEditText.getTag(), Toast.LENGTH_SHORT); break; } } } if (okToSave) { new Thread(new Runnable() { @SuppressWarnings("ConstantConditions") @Override public void run() { String[] imageDescrps = mImageDescription.toArray(new String[0]); String saleDate; if (mListingBeingEdited != null) { String editingListingSoldDate = mListingBeingEdited.getSaleDate(); if (!editingListingSoldDate.equals("")) { //it has been sold previously saleDate = determineSaveDate(true); } else { //it has not been sold saleDate = determineSaveDate(false); } } else { saleDate = determineSaveDate(false); } Listing listingToAdd = new Listing( mEditingId == null ? DEFAULT_LISTING_ID : mEditingId, mTypeSpinner.getSelectedItem().toString(), Double.valueOf(mPriceEditText.getText().toString()), Double.valueOf(mSurfaceAreaText.getText().toString()), Integer.valueOf(mBedroomsSpinner.getSelectedItem().toString()), mDescriptionEditText.getText().toString(), ImageTools.BitmapsToByteArray(mImages), imageDescrps, mAddressPostcodeEditText.getText().toString(), mAddressNumberEditText.getText().toString(), mAddressStreetEditText.getText().toString(), mAddressTownEditText.getText().toString(), mAddressCountyEditText.getText().toString(), mPoiAutocomplete.getText().toString(), mEditing ? mListingBeingEdited.getPostedDate() : Utils.getTodayDate(), saleDate, mListingBeingEdited != null ? mListingBeingEdited.getAgent() : (FirebaseHelper.getLoggedInUser() != null ? FirebaseHelper.getLoggedInUser() : getString(R.string.unknown_agent)), Utils.getTodayDate(), !mBuyOrLetSwitch.isChecked() ? BUY_STRING : LET_STRING, mSaleStatusImage.getTag().toString().equals(FOR_SALE_TAG)); if (mEditing) { listingToAdd.setEditingAgent(FirebaseHelper.getLoggedInUser() != null ? FirebaseHelper.getLoggedInUser() : getString(R.string.unknown_agent)); } mPresenter.addListing(getApplicationContext(), listingToAdd, mEditing); } }).start(); createSaveListingProgressBar(); //create the progress bar to display to the user that saving is taking place } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void save() {\n if (AppUtil.isEmpty(txtName.getText().toString())) {\n AppUtil.alertMessage(mainActivity,\"Please enter valid recipe name.\");\n txtName.requestFocus();\n } else if (AppUtil.isEmpty(txtDesc.getText().toString())) {\n AppUtil.alertMessage(mainAct...
[ "0.65851337", "0.6513314", "0.6403537", "0.6282504", "0.6269902", "0.6230836", "0.6213865", "0.61576563", "0.61458445", "0.6041111", "0.60163945", "0.60128915", "0.5990446", "0.5990372", "0.5966589", "0.5962907", "0.59606564", "0.59599406", "0.5954331", "0.59298235", "0.59297...
0.69322485
0
Determines the date we should show for the sale date
private String determineSaveDate(boolean soldPreviously) { if (soldPreviously) { switch (mSaleStatusImage.getTag().toString()) { case FOR_SALE_TAG: return ""; case SOLD_TAG: return mListingBeingEdited.getSaleDate(); } } else { switch (mSaleStatusImage.getTag().toString()) { case FOR_SALE_TAG: return ""; case SOLD_TAG: return Utils.getTodayDate(); } } return ""; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getFoundingDate();", "@Override\n public Date getManufactureDate() {\n return manufacturedOn;\n }", "public String getSalesOrderDate() {\n\t\treturn salesOrderDate;\n\t}", "public void setPurchaseDate(String d)\n {\n this.purchaseDate = d;\n }", "@OnClick(R.id.search_esta...
[ "0.62189096", "0.6128653", "0.6127019", "0.6066917", "0.5954653", "0.5941807", "0.5926376", "0.58765537", "0.5871498", "0.58640707", "0.58302516", "0.5791939", "0.5789131", "0.5787562", "0.57754", "0.57509744", "0.57335824", "0.5727035", "0.5721306", "0.57079023", "0.5698944"...
0.6175237
1
called from presenters getPhotoFromCamera and getPhotoFromDevice
@Override protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); switch (requestCode) { case PICK_FROM_GALLERY_REQUEST_CODE: if (resultCode == RESULT_OK) { Uri targetUri = data.getData(); String path = ImageFilePath.getPath(this, data.getData()); Bitmap bitmap; try { bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(), targetUri); Bitmap finalBitmap = BitmapMods.modifyOrientation(bitmap, path); mImages.add(BitmapMods.getResizedBitmap(finalBitmap, 400)); initializeRecyclerView(); } catch (Exception e) { onPhotoError(); e.printStackTrace(); } } break; case PICK_FROM_CAMERA_REQUEST_CODE: if (resultCode == RESULT_OK) { try { @SuppressWarnings("ConstantConditions") Bitmap photo = (Bitmap) data.getExtras().get("data"); mImages.add(photo); initializeRecyclerView(); } catch (Exception e) { onPhotoError(); e.printStackTrace(); } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void invokeGetPhoto() {\n // invoke the image gallery using an implicit intent.\n Intent photoPickerIntent = new Intent(Intent.ACTION_PICK);\n // Show only images, no videos or anything else\n photoPickerIntent.setType(\"image/*\");\n photoPickerIntent.setAction(Intent.AC...
[ "0.7223888", "0.6944075", "0.6683508", "0.6658529", "0.6637055", "0.6617579", "0.6615499", "0.65336686", "0.6523696", "0.6522008", "0.635758", "0.6317575", "0.6291865", "0.6276673", "0.62679344", "0.6256853", "0.62522864", "0.62226653", "0.6212714", "0.62042755", "0.6201848",...
0.6377729
10
called if ther was an error getting a photo
private void onPhotoError() { ToastModifications.createToast(this, getString(R.string.error_saving_photo), Toast.LENGTH_LONG); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onPhotoError();", "@Override\n public void onError() {\n Picasso.with(getActivity())\n .load(profileModel.getDriverPhoto())\n .error(R.drawable.profile)\n .resize(0, 200)\n ...
[ "0.82336205", "0.72015", "0.7188155", "0.70354885", "0.6873731", "0.6837723", "0.67683065", "0.6708466", "0.66150206", "0.6547799", "0.6539167", "0.6527415", "0.65217066", "0.64372694", "0.6411382", "0.6404705", "0.6343053", "0.63096786", "0.6273223", "0.62429905", "0.6235", ...
0.71326715
3
Callback for the result from requesting permissions. This method is invoked for every call on requestPermissions(String[], int).
@Override public void onRequestPermissionsResult(int requestCode, @NonNull String[] permissions, @NonNull int[] grantResults) { switch (requestCode) { case PICK_FROM_GALLERY_REQUEST_CODE: // If request is cancelled, the result arrays are empty. if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { mPresenter.getPhotoFromDevice(); } else { Snackbar.make(getWindow().getDecorView().getRootView(), R.string.permission_error, Snackbar.LENGTH_LONG) .setAction(R.string.give_access, new View.OnClickListener() { @Override public void onClick(View v) { if (ActivityCompat.shouldShowRequestPermissionRationale(AddListingView.this, READ_EXTERNAL_STORAGE)) { mPresenter.getPhotoFromDevice(); } else { //The user has permanently denied permission - so take them to the app settings so they can manually enable the permission openSettingsforApp(); } } }).show(); } break; case PICK_FROM_CAMERA_REQUEST_CODE: if (grantResults.length > 0 && grantResults[0] == PackageManager.PERMISSION_GRANTED) { mPresenter.getPhotoFromCamera(); } else { Snackbar.make(getWindow().getDecorView().getRootView(), R.string.permission_error, Snackbar.LENGTH_LONG) .setAction(R.string.give_access, new View.OnClickListener() { @Override public void onClick(View v) { if (ActivityCompat.shouldShowRequestPermissionRationale(AddListingView.this, READ_EXTERNAL_STORAGE)) { mPresenter.getPhotoFromCamera(); } else { //The user has permanently denied permission - so take them to the app settings so they can manually enable the permission openSettingsforApp(); } } }).show(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onAction(List<String> permissions) {\n Log.e(TAG, \"permission success\");\n callback.onSuccess(permissions);\n\n }", "@Override\n public void onPermissionsGranted(int requestCode, List<String> perms) {...
[ "0.75444245", "0.7497989", "0.7497989", "0.7396344", "0.736", "0.72659445", "0.7138574", "0.7137907", "0.7133788", "0.70704335", "0.7053934", "0.70462346", "0.69860035", "0.6963049", "0.69589317", "0.69541055", "0.6947633", "0.69412655", "0.69365585", "0.6926714", "0.69209415...
0.0
-1
Called by this activites presenter when required
@Override public Activity getViewActivity() { return this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void initializePresenter() {\n\r\n\t}", "protected abstract void onPresenter();", "private void init() {\n //set view to presenter\n presenter.setView(this, service);\n\n setupView();\n }", "@Override\n public void onActivate() {\n }", "public abstract void setupMvp...
[ "0.68917", "0.67750645", "0.6614728", "0.6400278", "0.6389946", "0.63267", "0.6260013", "0.6248343", "0.62367845", "0.61999", "0.6195948", "0.6174639", "0.61693037", "0.6165807", "0.6126558", "0.61176133", "0.61141896", "0.6103454", "0.6060116", "0.60525936", "0.60406125", ...
0.0
-1
Callback from the presenter when a listing has been added in order to update the UI
@Override public void addingListingCompleted(boolean error) { if (mProgressDialog != null && mProgressDialog.isShowing()) { mProgressDialog.dismiss(); } if (error) { ToastModifications.createToast(AddListingView.this, getString(R.string.error_saving), Toast.LENGTH_LONG); } else { ToastModifications.createToast(AddListingView.this, getString(R.string.listing_saved), Toast.LENGTH_LONG); mEditing = false; mListingBeingEdited = null; onBackPressed(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void addListing(Listing<P, C> listing) {\n this.collectionOfCurrentListings.add(listing);\n }", "public void addMovieListing(MovieListing listing) {\n movieListings.add(listing);\n notifyItemInserted(movieListings.size() - 1);\n if (MoviesApplication.getApp().isLargeLayout() && movieList...
[ "0.6616326", "0.6476624", "0.6256455", "0.59881806", "0.5987934", "0.59766364", "0.5942043", "0.592837", "0.5896558", "0.5843136", "0.5826023", "0.5771742", "0.576804", "0.57581824", "0.5754802", "0.57468843", "0.5718946", "0.57008994", "0.5681623", "0.5658152", "0.5657027", ...
0.6374908
2
The user has permanently denied permission so take them to the app settings so they can manually enable the permission if required
private void openSettingsforApp() { Intent intent = new Intent(); intent.setAction(Settings.ACTION_APPLICATION_DETAILS_SETTINGS); Uri uri = Uri.fromParts("package", AddListingView.this.getPackageName(), null); intent.setData(uri); AddListingView.this.startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public void onPermissionDenied(PermissionDeniedResponse response) {\n if (response.isPermanentlyDenied()) {\r\n showSettingsDialog();\r\n }\r\n }", "@Override\r\n public...
[ "0.76345974", "0.76345974", "0.75195557", "0.7350294", "0.7125417", "0.7064732", "0.704591", "0.702244", "0.7020891", "0.6964047", "0.69468707", "0.6833295", "0.6827769", "0.6821602", "0.6768789", "0.6752483", "0.674543", "0.672359", "0.6706422", "0.6654445", "0.6581453", "...
0.0
-1
Called from the presented to open the camera
@Override public void startCameraIntent() { Intent cameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE); startActivityForResult(cameraIntent, PICK_FROM_CAMERA_REQUEST_CODE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void openCamera() {\n \n\n }", "public void openCamera() {\n Toast.makeText(this, \"Coming soon...\", Toast.LENGTH_SHORT).show();\n }", "public void onCameraOpened() {\n openCameraCommon();\n initializeControlByIntent();\n new Thread() {\n public void ...
[ "0.8269017", "0.7781099", "0.775139", "0.7553634", "0.7553634", "0.7456815", "0.7383053", "0.73730457", "0.73635113", "0.7356043", "0.7356043", "0.7347388", "0.7341064", "0.7313628", "0.72980297", "0.7294833", "0.7253156", "0.72307295", "0.7229247", "0.7205403", "0.7203979", ...
0.71640486
22
Called from the presented to open the gallery
@Override public void startDeviceImageIntent() { Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); startActivityForResult(galleryIntent, PICK_FROM_GALLERY_REQUEST_CODE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void OpenGallery() {\n Intent pickImage = new Intent(Intent.ACTION_PICK, MediaStore.Images.Media.EXTERNAL_CONTENT_URI);\n startActivityForResult(pickImage, RequestCode);\n }", "private void openGallery() {\n\n Intent galleryIntent = new Intent(Intent.ACTION_GET_CONTENT);\n ...
[ "0.7681712", "0.76693034", "0.7619399", "0.7609823", "0.7531085", "0.7460483", "0.7420434", "0.74087614", "0.7377689", "0.7326796", "0.7214091", "0.71544087", "0.7133881", "0.70153105", "0.7014267", "0.7009875", "0.6891555", "0.68853885", "0.6869526", "0.6868195", "0.6865498"...
0.64404166
66
Handles the events of the home button being pressed
@Override public boolean onOptionsItemSelected(MenuItem item) { if (item.getItemId() == android.R.id.home) { AlertDialog.Builder confirmDiagBuilder = new AlertDialog.Builder(AddListingView.this); confirmDiagBuilder.setMessage(R.string.want_to_save); confirmDiagBuilder.setPositiveButton(R.string.save, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { mSaveButton.callOnClick(); } }); confirmDiagBuilder.setNegativeButton(R.string.no, new DialogInterface.OnClickListener() { @Override public void onClick(DialogInterface dialogInterface, int i) { onBackPressed(); } }); confirmDiagBuilder.show(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pressHomeButton() {\n System.out.println(\"TV is already on the home screen\\n\");\n }", "@Override\n public void pressHomeButton() {\n System.out.println(\"TV is already on the home screen\\n\");\n tv.setState(tv.getHomeState());\n }", "public void btnHomeClicked(Acti...
[ "0.78193", "0.7727605", "0.7206471", "0.7106396", "0.70830524", "0.70372915", "0.6959961", "0.6941372", "0.6862688", "0.6841906", "0.6824341", "0.6802441", "0.67216855", "0.67042136", "0.6703832", "0.6703662", "0.6684393", "0.66016495", "0.6598184", "0.6596699", "0.65638554",...
0.0
-1
prevents the super method being called as this activity has immersive mode disabled
@Override public void onWindowFocusChanged(boolean hasFocus) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onResume() {\n super.onResume();\n setSystemUiVisilityMode();\n }", "@Override\n public void onDisabled() {\n }", "@Override\n protected void onResume() {\n super.onResume();\n updateEnabledState();\n ...
[ "0.6405108", "0.6401332", "0.63120013", "0.62705415", "0.62394136", "0.6236833", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", "0.6232838", ...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { List<List<Integer>> list=new ArrayList<List<Integer>>(); List<Integer> l1=new ArrayList<Integer>(); List<Integer> l2=new ArrayList<Integer>(); List<Integer> l3=new ArrayList<Integer>(); List<Integer> l4=new ArrayList<Integer>(); l1.add(1); l1.add(2); l1.add(3); l2.add(4); l2.add(5); l2.add(5); l2.add(6); l3.add(7); l3.add(8); l4.add(9); list.add(l1); list.add(l2); list.add(l3); list.add(l4); Solution solution=new Solution(); solution.nP(list); }
{ "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
Method: shellSort(int[] list, int[] dlta, int t)
@Test public void testShellSort() throws Exception { int[] list = new int[]{49, 38, 65, 97, 76, 13, 27, 49, 55, 4}; LogUtils.d(list); A_10_4_to_10_5.shellSort(list); LogUtils.d(list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void shellSort(){\n int increment = list.size() / 2;\n while (increment > 0) {\n for (int i = increment; i < list.size(); i++) {\n int j = i;\n int temp = list.get(i);\n while (j >= increment && list.get(j - increment) > temp) {\n list.set(j, list.get(j - increment))...
[ "0.764116", "0.75869036", "0.7420572", "0.7287548", "0.7078059", "0.7064727", "0.6961724", "0.68852407", "0.6819152", "0.65052134", "0.64622605", "0.6424084", "0.6423613", "0.6423613", "0.6423613", "0.6423613", "0.6423613", "0.6423613", "0.6423613", "0.6423613", "0.6423613", ...
0.7776816
0
auths not ready at this time The purpose of this method is to perform save operation of UserNoun noun into database
@ApiOperation(value = "/create_UserNoun", httpMethod = "POST", notes = "creates a noun of UserNoun", response = UserNoun.class) @ApiResponses(value = { @ApiResponse(code = 200, message =LoginACTSwaggerUIConstants.SUCCESS), @ApiResponse(code = 404, message = LoginACTSwaggerUIConstants.NOT_FOUND), @ApiResponse(code = 500, message = LoginACTSwaggerUIConstants.INTERNAL_SERVER_ERROR), @ApiResponse(code = 400, message = LoginACTSwaggerUIConstants.BAD_REQUEST), @ApiResponse(code = 412, message = LoginACTSwaggerUIConstants.PRE_CONDITION_FAILED) }) @RequestMapping(method = RequestMethod.POST,value = "/create_UserNoun" ,headers="Accept=application/json") @ResponseBody public UserNoun create_UserNoun(@RequestBody UserNoun the_UserNoun) throws Exception { log.setLevel(Level.INFO); log.info("create_UserNoun controller started operation!"); UserNoun a_UserNoun; a_UserNoun = UserNoun_service.create_usernoun(the_UserNoun, super.getUser()); log.info("Object returned from create_UserNoun method !"); return a_UserNoun; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void save(KingdomUser user);", "private void save_meaning_word() {\n\t\tif(this.dwd!=null && this.main_word!=null)\n\t\t{\n\n\n\t\t\tString meaning_word=\"\";\n\t\t\tif(isHindi)\n\t\t\t{\n\t\t\t\tmeaning_word=dwd.eng_word;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tmeaning_word=dwd.hin_word;\n\t\t\t}\n\n\t\t\tDictCo...
[ "0.60743874", "0.60495836", "0.5977654", "0.59178036", "0.58713996", "0.58365333", "0.5819581", "0.57928514", "0.5708399", "0.5701948", "0.5667118", "0.56589115", "0.56171316", "0.55299157", "0.5524626", "0.5516811", "0.55159605", "0.5513262", "0.55127335", "0.5502204", "0.54...
0.55246943
14
auths not ready at this time The purpose of this method is to perform update operation of UserNoun noun into database
@ApiOperation(value = "/update_UserNoun", httpMethod = "PUT", notes = "updates a noun of UserNoun", response = UserNoun.class) @ApiResponses(value = { @ApiResponse(code = 200, message =LoginACTSwaggerUIConstants.SUCCESS), @ApiResponse(code = 404, message = LoginACTSwaggerUIConstants.NOT_FOUND), @ApiResponse(code = 500, message = LoginACTSwaggerUIConstants.INTERNAL_SERVER_ERROR), @ApiResponse(code = 400, message = LoginACTSwaggerUIConstants.BAD_REQUEST), @ApiResponse(code = 412, message = LoginACTSwaggerUIConstants.PRE_CONDITION_FAILED) }) @RequestMapping(method = RequestMethod.PUT,value = "/update_UserNoun" ,headers="Accept=application/json") @ResponseBody public UserNoun update_UserNoun(@RequestBody UserNoun the_UserNoun) throws Exception { log.setLevel(Level.INFO); log.info("update_UserNoun controller started operation!"); UserNoun a_UserNoun; a_UserNoun = UserNoun_service.update_usernoun(the_UserNoun, super.getUser()); log.info("Object returned from update_UserNoun method !"); return a_UserNoun; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Transactional\n\tpublic TestNoun update_testnoun(TestNoun TestNoun, LuUser user) throws Exception {\n\n\t \t log.setLevel(Level.INFO);\n\t log.info(\"update_testnoun Dao started operation!\");//dhina updateverb\n\n\t\ttry{\n\t\t\tQuery query = entityManager\n\t\t\t\t\t.createNativeQuery(update_TestNoun)\n\t...
[ "0.6248209", "0.61541295", "0.599712", "0.5826501", "0.5787236", "0.5747065", "0.5722679", "0.5634646", "0.5580378", "0.55591184", "0.5544561", "0.55340946", "0.5522216", "0.5520454", "0.54952794", "0.5470089", "0.54692906", "0.5468754", "0.5460043", "0.5457944", "0.5449767",...
0.61513186
2
auths not ready at this time The purpose of this method is to perform fetch operation of UserNoun noun from database based on given noun id
@ApiOperation(value = "/search_for_update_UserNoun/{UserNoun_id}", httpMethod = "GET", notes = "updates a noun of UserNoun", response = UserNoun.class) @ApiResponses(value = { @ApiResponse(code = 200, message =LoginACTSwaggerUIConstants.SUCCESS), @ApiResponse(code = 404, message = LoginACTSwaggerUIConstants.NOT_FOUND), @ApiResponse(code = 500, message = LoginACTSwaggerUIConstants.INTERNAL_SERVER_ERROR), @ApiResponse(code = 400, message = LoginACTSwaggerUIConstants.BAD_REQUEST), @ApiResponse(code = 412, message = LoginACTSwaggerUIConstants.PRE_CONDITION_FAILED) }) @RequestMapping(method = RequestMethod.GET,value = "/search_for_update_UserNoun/{UserNoun_id}" ,headers="Accept=application/json") @ResponseBody public UserNoun search_for_update_UserNoun(@PathVariable("UserNoun_id")long UserNoun_id) throws Exception { log.setLevel(Level.INFO); log.info("search_for_update_UserNoun controller started operation!"); UserNoun the_UserNoun = new UserNoun(); the_UserNoun = UserNoun_service.usernoun_search_for_update(UserNoun_id, super.getUser()); log.info("Object returned from search_for_update_UserNoun method !"); return the_UserNoun; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public TestNoun testnoun_search_for_update(long id, LuUser user) throws Exception {\n\t\t log.setLevel(Level.INFO);\n\t log.info(\"testnoun_search_for_update Dao started operation!\");\n\n\t\ttry{\n\n\t\t\tQuery result = entityManager.\n\t\t\tcreateNativeQuery(search_for_update_TestNoun,TestNoun.class)\n\n\...
[ "0.6240514", "0.59327906", "0.56466794", "0.55855453", "0.5501917", "0.5427641", "0.5426586", "0.5363088", "0.5183693", "0.5175586", "0.50997126", "0.49868977", "0.49808282", "0.49736083", "0.49726224", "0.49518704", "0.49433118", "0.490562", "0.48878762", "0.48504215", "0.48...
0.60731375
1
auths not ready at this time The purpose of this method is to perform delete operation of UserNoun noun from database based on given noun id
@ApiOperation(value = "/delete_UserNoun/{UserNoun_id}", httpMethod = "DELETE", notes = "deletes a noun of UserNoun", response = UserNoun.class) @ApiResponses(value = { @ApiResponse(code = 200, message =LoginACTSwaggerUIConstants.SUCCESS), @ApiResponse(code = 404, message = LoginACTSwaggerUIConstants.NOT_FOUND), @ApiResponse(code = 500, message = LoginACTSwaggerUIConstants.INTERNAL_SERVER_ERROR), @ApiResponse(code = 400, message = LoginACTSwaggerUIConstants.BAD_REQUEST), @ApiResponse(code = 412, message = LoginACTSwaggerUIConstants.PRE_CONDITION_FAILED) }) @RequestMapping(method = RequestMethod.DELETE,value = "/delete_UserNoun/{UserNoun_id}" ,headers="Accept=application/json") @ResponseBody public String delete_UserNoun(@PathVariable("UserNoun_id")long UserNoun_id) throws Exception { log.setLevel(Level.INFO); log.info("delete_UserNoun controller started operation!"); String service_return_msg = ""; service_return_msg = UserNoun_service.delete_usernoun(UserNoun_id, super.getUser()); log.info("Object returned from delete_UserNoun method !"); return service_return_msg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Transactional\n\tpublic String delete_testnoun(long id, LuUser user) throws Exception {\n\n\t \t log.setLevel(Level.INFO);\n\t log.info(\"delete_testnoun Dao started operation!\");//dhina updateverb\n\n\t\ttry{\n\t\t\tQuery query = entityManager\n\t\t\t\t\t.createNativeQuery(delete_TestNoun)\n\t\t\t.setPar...
[ "0.6910254", "0.6667194", "0.6312864", "0.62565684", "0.6232149", "0.6225809", "0.6195763", "0.6191642", "0.6190233", "0.6141867", "0.6113052", "0.60870296", "0.6080584", "0.6074246", "0.60728395", "0.6066192", "0.6065881", "0.6062144", "0.6056647", "0.6054802", "0.60519946",...
0.7212858
0
auths not ready at this time The purpose of this method is to get list of UserNoun noun from database
@ApiOperation(value = "/get_all_UserNoun", httpMethod = "GET", notes = "special search that gets all values of UserNoun", response = UserNoun.class) @ApiResponses(value = { @ApiResponse(code = 200, message =LoginACTSwaggerUIConstants.SUCCESS), @ApiResponse(code = 404, message = LoginACTSwaggerUIConstants.NOT_FOUND), @ApiResponse(code = 500, message = LoginACTSwaggerUIConstants.INTERNAL_SERVER_ERROR), @ApiResponse(code = 400, message = LoginACTSwaggerUIConstants.BAD_REQUEST), @ApiResponse(code = 412, message = LoginACTSwaggerUIConstants.PRE_CONDITION_FAILED) }) @RequestMapping(method = RequestMethod.GET,value = "/get_all_UserNoun" ,headers="Accept=application/json") @ResponseBody public List<UserNoun> get_all_UserNoun() throws Exception { log.setLevel(Level.INFO); log.info("get_all_UserNoun controller started operation!"); List<UserNoun> UserNoun_list = new ArrayList<UserNoun>(); UserNoun_list = UserNoun_service.get_all_usernoun(); log.info("Object returned from get_all_UserNoun method !"); return UserNoun_list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<TestNoun> get_all_testnoun() throws Exception {\n\t\t log.setLevel(Level.INFO);\n\t log.info(\"get_all_testnoun Dao started operation!\");\n\n\t\ttry{\n\n\t\t\tQuery result = entityManager.\n\t\t\tcreateNativeQuery(get_all_TestNoun,TestNoun.class)\n\n;\n\n\t\t\tArrayList<TestNoun> TestNoun_...
[ "0.6370866", "0.6350501", "0.6323658", "0.62419474", "0.6172945", "0.6171599", "0.61412483", "0.61191964", "0.61103696", "0.6107893", "0.6106893", "0.6094624", "0.6061322", "0.59362763", "0.5923924", "0.591778", "0.587596", "0.5853971", "0.5796037", "0.5777792", "0.5771656", ...
0.6928668
0
/ access modifiers changed from: protected
public void onCreate(Bundle savedInstanceState) { super.onCreate(savedInstanceState); setContentView( R.layout.activity_pic); final ImageView image = (ImageView) findViewById(R.id.pic); ((BottomNavigationView) findViewById(R.id.button_navigation)).setOnNavigationItemSelectedListener(new BottomNavigationView.OnNavigationItemSelectedListener() { @RequiresApi(api = 21) public boolean onNavigationItemSelected(@NonNull MenuItem item) { int itemId = item.getItemId(); if (itemId == R.id.download) { Bitmap bitmap = ((BitmapDrawable) pic.this.getDrawable(pic.this.pictures[pic.this.index])).getBitmap(); try { OutputStream stream = new FileOutputStream(new File(new ContextWrapper(pic.this.getApplicationContext()).getDir("Images", 0), "UniqueFileName.jpg")); bitmap.compress(CompressFormat.JPEG, 100, stream); stream.flush(); stream.close(); } catch (IOException e) { Toast.makeText(pic.this, "can't save image !", Toast.LENGTH_LONG).show(); e.printStackTrace(); } Toast.makeText(pic.this, "Image Saved into gallery", Toast.LENGTH_LONG).show(); } else if (itemId != R.id.next) { if (itemId == R.id.previous) { if (pic.this.index == 0) { pic.this.index = 52; } else { pic.this.index--; image.setImageResource(pic.this.pictures[pic.this.index]); } } } else if (pic.this.index == 52) { pic.this.index = 0; } else { pic.this.index++; image.setImageResource(pic.this.pictures[pic.this.index]); } return true; } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void prot() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override...
[ "0.7375736", "0.7042321", "0.6922649", "0.6909494", "0.68470824", "0.6830288", "0.68062353", "0.6583185", "0.6539446", "0.65011257", "0.64917654", "0.64917654", "0.64733833", "0.6438831", "0.64330196", "0.64330196", "0.64295477", "0.6426414", "0.6420484", "0.64083177", "0.640...
0.0
-1
/ Button handler clear create delete logout This is clear button handler. If user click this button, text field will be clear.
@FXML void clearBT_handler(ActionEvent e) { userNameTF.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void clear() {\n\t\ttxtId.setText(\"\");\n\t\ttxtAlert.setText(\"\");\n\t\ttxtNbMax.setText(\"\");\n\t\t\n\t}", "private void clear() {\n\t\tmRegister.setText(\"\");\n\t\tmName.setText(\"\");\n\t\tmUsername.setText(\"\");\n\t\tmPassword.setText(\"\");\n\t\tmPhone.setText(\"\");\n\t\tmEmail.setText(\"\");...
[ "0.7263252", "0.7108843", "0.7060473", "0.70146656", "0.7011515", "0.6995521", "0.6988543", "0.6983282", "0.695405", "0.6944969", "0.6907604", "0.69046575", "0.6894748", "0.6890774", "0.6857853", "0.68315774", "0.6804658", "0.6781865", "0.6776451", "0.676971", "0.6756548", ...
0.68718755
14