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
Creates a String from a URI, the URI can be relative or absolute, the URI is decoded. TODO Why can't I just return uri.toString()???
public static String toString(URI uri) { StringBuffer buffer = new StringBuffer(); if (uri.getScheme() != null) { buffer.append(uri.getScheme()); buffer.append(":"); } buffer.append(uri.getSchemeSpecificPart()); if (uri.getFragment() != null) { buffer.append("#"); buffer.append(uri.getFragment()); } return buffer.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String encode(String uri) {\n return uri;\n }", "URI uri();", "java.lang.String getUri();", "java.lang.String getUri();", "String getUri( );", "URI createURI();", "String getURI();", "String getURI();", "String getURI();", "public static String encodedURI(String uri, String decod...
[ "0.71306396", "0.67213917", "0.65889525", "0.65889525", "0.6397545", "0.63757646", "0.63455915", "0.63455915", "0.63455915", "0.6320799", "0.62679166", "0.6256216", "0.6231376", "0.61860985", "0.6170308", "0.60925573", "0.5993049", "0.59867525", "0.5975891", "0.5959841", "0.5...
0.68925023
1
Creates a File from a URI, the URI can be relative or absolute, this method returns only a file for the Scheme Specific Part.
public static File toFile(URI uri) { // if (uri.getScheme() == null) { // try { // uri = new URI("file", uri.getSchemeSpecificPart(), null); // } catch (URISyntaxException e) { // // should never happen // Logger.getLogger(URIUtils.class).fatal(uri, e); // } // } return new File((File) null, uri.getSchemeSpecificPart()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static File getRealFile(final Context context, final Uri uri) {\n if (null == uri) return null;\n final String scheme = uri.getScheme();\n String data = null;\n if (scheme == null)\n data = uri.getPath();\n else if (ContentResolver.SCHEME_FILE.equals(scheme)) {\...
[ "0.69342047", "0.6881421", "0.66922784", "0.6557873", "0.5932983", "0.5884533", "0.58015585", "0.57992697", "0.57954717", "0.57818276", "0.5778088", "0.5771849", "0.5755642", "0.5721896", "0.5712975", "0.57123333", "0.56566775", "0.56262773", "0.5606867", "0.55773723", "0.557...
0.80726045
0
Return the uri for the uri relative to the base uri.
public static URI getRelativeURI(URI base, URI uri) { if (base != null && uri != null && (uri.getScheme() == null || uri.getScheme().equals(base.getScheme()))) { StringTokenizer baseParts = tokenizeBase(base); StringTokenizer uriParts = new StringTokenizer(uri.getSchemeSpecificPart(), "/"); StringBuffer relativePath = new StringBuffer(); String part = null; boolean first = true; if (!baseParts.hasMoreTokens()) { return uri; } while (baseParts.hasMoreTokens() && uriParts.hasMoreTokens()) { String baseDir = baseParts.nextToken(); part = uriParts.nextToken(); if ((baseDir.equals(part) && baseDir.contains(":")) && first) { baseDir = baseParts.nextToken(); part = uriParts.nextToken(); } if (!baseDir.equals(part)) { // || (baseDir.equals(part) && baseDir.contains(":"))) { if (first) { return uri; } relativePath.append("../"); break; } part = null; first = false; } while (baseParts.hasMoreTokens()) { relativePath.append("../"); baseParts.nextToken(); } if (part != null) { relativePath.append(part); if (uriParts.hasMoreTokens()) { relativePath.append("/"); } } while (uriParts.hasMoreTokens()) { relativePath.append(uriParts.nextToken()); if (uriParts.hasMoreTokens()) { relativePath.append("/"); } } return createURI(relativePath.toString()); } return uri; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FullUriTemplateString baseUri();", "String getBaseUri();", "RaptureURI getBaseURI();", "public String getBaseUri() {\n\t\treturn baseUri;\n\t}", "public URI getBaseURI() {\n Map<String, String> map = new LinkedHashMap<>();\n map.put(\"xml\", XML_NAMESPACE);\n return getLink(\"/*/@xml:b...
[ "0.768938", "0.72977215", "0.7267465", "0.7255437", "0.71149737", "0.69693136", "0.67202437", "0.6671526", "0.6662984", "0.66514987", "0.66514987", "0.66391796", "0.66002494", "0.6588051", "0.6557957", "0.6544298", "0.6499197", "0.6497294", "0.6395951", "0.6370012", "0.631832...
0.68429905
6
Return the path for the file relative to the base uri.
public static String getRelativePath(URI base, File file) { return toString(getRelativeURI(base, file.toURI())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String getURI() {\n if (filePath == null) {\n return null;\n }\n int ind = filePath.lastIndexOf(\"/\");\n if (ind != -1) {\n //int ind2 = filePath.substr...
[ "0.7091692", "0.6948855", "0.6940015", "0.68169", "0.67948955", "0.674483", "0.674483", "0.67390335", "0.672673", "0.66148317", "0.66065806", "0.656938", "0.6551655", "0.6530185", "0.65207493", "0.6497765", "0.64388555", "0.64105344", "0.63948613", "0.63839483", "0.6374248", ...
0.70181054
1
Return the absolute path, composed from a base URI and a relative path.
public static File composeFile(URI base, String relativePath) { URI uri = composeURI(base, relativePath); if (uri.isAbsolute()) { return new File(uri); } else if (base != null) { return new File(new File(base), uri.toString()); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String composePath(URI base, String relativePath) {\n\t\tURI uri = composeURI(base, relativePath);\n\t\tif (uri.isAbsolute()) {\n\t\t\tFile file = new File(uri);\n\t\t\treturn file.toString();\n\t\t} else if (base != null) {\n\t\t\tFile file = new File(new File(base), uri.toString());\n\t\t\treturn f...
[ "0.74793077", "0.68975806", "0.6895879", "0.68511766", "0.66588724", "0.6653762", "0.66058165", "0.64026994", "0.6364364", "0.6205673", "0.6197813", "0.618197", "0.61760545", "0.6131825", "0.6131308", "0.6119563", "0.611407", "0.6096476", "0.60644525", "0.6064061", "0.6010529...
0.65761715
7
Return the absolute path, composed from a base URI and a relative path.
public static String composePath(URI base, String relativePath) { URI uri = composeURI(base, relativePath); if (uri.isAbsolute()) { File file = new File(uri); return file.toString(); } else if (base != null) { File file = new File(new File(base), uri.toString()); return file.toString(); } return relativePath; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FullUriTemplateString baseUri();", "public static URI getRelativeURI(URI base, URI uri) {\n\t\tif (base != null && uri != null && (uri.getScheme() == null || uri.getScheme().equals(base.getScheme()))) {\n\t\t\tStringTokenizer baseParts = tokenizeBase(base);\n\t\t\tStringTokenizer uriParts = new StringTokenizer(u...
[ "0.6897237", "0.6893437", "0.68507475", "0.6659701", "0.6656269", "0.66057616", "0.6574046", "0.64007956", "0.63652056", "0.6204146", "0.62004167", "0.6183918", "0.6178946", "0.61319536", "0.6131554", "0.61215585", "0.6113266", "0.6095264", "0.6066717", "0.60663193", "0.60090...
0.7477029
0
This function will create a random individual represented by an array of integers.
public ArrayList<Integer> makeIndividual();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static int[] singleArrayGenerator(int num){\n int[] arr = new int[num];\n for(int i = 0; i < num; i++)\n arr[i] = new Random().nextInt(100);\n return arr;\n }", "private static int[] createArray() {\n\t\trnd = new Random();\r\n\t\trandomArray = new int[8];\r\n\t\tfor (int i = 0...
[ "0.68611425", "0.67538685", "0.67323637", "0.6606705", "0.65345216", "0.65225226", "0.6400426", "0.6390958", "0.63857955", "0.6368126", "0.6297846", "0.62422913", "0.6237032", "0.62137645", "0.62072897", "0.61779517", "0.61507833", "0.61226636", "0.6104783", "0.6102684", "0.6...
0.59169716
40
This method will return the individual
public E decode(ArrayList<Integer> individual);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Person getPerson() {\n String fore = this.forenameCombo.getSelectedItem().toString();\n String sur = this.surnameCombo.getSelectedItem().toString();\n String sect = this.sectionCombo.getSelectedItem().toString();\n Person myPers = pers.getPerson(fore, sur, sect);\n return...
[ "0.681293", "0.680214", "0.671408", "0.6595892", "0.65314895", "0.6456836", "0.6402558", "0.6375117", "0.63584256", "0.63563776", "0.6338672", "0.63299245", "0.6283785", "0.6265535", "0.6235378", "0.62141407", "0.621249", "0.6197516", "0.61848325", "0.61742926", "0.6087106", ...
0.0
-1
This method takes a index representing the index of the gene to mutate and returns a new value for this gene
public Integer mutate(int index);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int mutateGene(int gene);", "private TraceableFloat mutateGene(TraceableFloat a, float new_a_value, EvolutionState state){\n\n if(a.getValue() == new_a_value)//return the original gene if the value was not altered\n return a;\n\n double influence_factor_mut = Math.abs(a.getValue()...
[ "0.7468814", "0.6493353", "0.6230161", "0.6002113", "0.5941511", "0.5937", "0.59064955", "0.5865751", "0.57764083", "0.57593656", "0.57535374", "0.5718658", "0.57157594", "0.56268597", "0.5557569", "0.551778", "0.5493158", "0.5486918", "0.54441136", "0.5431753", "0.5397112", ...
0.743545
1
Create a new main window
public FrmMain() { //Displays the menu bar on the top of the screen (mac style) System.setProperty("apple.laf.useScreenMenuBar", "true"); // Build the GUI initComponents(); // Load the texts initTextsI18n(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void createWindow();", "private static void createAndShowGUI() {\n\t\tJFrame window = MainWindow.newInstance();\n\t\t\n //Display the window.\n window.pack();\n window.setVisible(true);\n \n }", "public void newWindow() {\n\t\tJMenuTest frame1 = new JMenuTest();\n\t\tframe1.setBo...
[ "0.797114", "0.77146834", "0.76424235", "0.7416028", "0.7209441", "0.7189814", "0.71441257", "0.7143837", "0.71390194", "0.7124081", "0.70914435", "0.70203984", "0.70036787", "0.69877577", "0.6964106", "0.69514906", "0.6883818", "0.6837793", "0.6805285", "0.6764365", "0.67561...
0.0
-1
This method is called from within the constructor to initialize the form
private void initComponents() { // Attributes of the window int windowWidth = 450; // Get the content pane Container pane = this.getContentPane(); pane.setLayout(new BoxLayout(pane, BoxLayout.Y_AXIS)); // The first row: wifi animated icon JPanel row0 = new JPanel(); row0.setLayout(new BoxLayout(row0, BoxLayout.X_AXIS)); wifiAnimatedIcon = new WiFiAnimatedIcon(250, FrmMainController.WINDOW_TOP_BACKGROUND); wifiAnimatedIcon.setPreferredSize(new Dimension(152, 252)); row0.add(Box.createHorizontalGlue()); row0.add(wifiAnimatedIcon); row0.add(Box.createHorizontalGlue()); // The second row: notifications labelNotifications = new JLabel("Notifications ici", SwingConstants.CENTER); labelNotifications.setFont(new Font(labelNotifications.getFont().getFontName(), Font.ITALIC, labelNotifications.getFont().getSize())); labelNotifications.setForeground(Color.GRAY); labelNotifications.setAlignmentX(Component.CENTER_ALIGNMENT); labelNotifications.setAlignmentY(Component.TOP_ALIGNMENT); setSize(labelNotifications, new Dimension(windowWidth, 15)); // The third row: profile + connection state JPanel row2 = new JPanel(); row2.setLayout(new BoxLayout(row2, BoxLayout.X_AXIS)); labelProfile = new JLabel("SFR WiFi Public", SwingConstants.CENTER); labelConnectionState = new JLabel("Connecté", SwingConstants.CENTER); labelProfile.setFont(new Font(labelProfile.getFont().getName(), Font.BOLD, labelProfile.getFont().getSize())); labelConnectionState.setFont(new Font(labelConnectionState.getFont().getName(), Font.BOLD, labelConnectionState.getFont().getSize())); labelGroupSeparator = new JLabel("-", SwingConstants.CENTER); labelGroupSeparator.setFont(new Font(labelGroupSeparator.getFont().getName(), Font.BOLD, labelGroupSeparator.getFont().getSize())); setSize(labelGroupSeparator, new Dimension(8, 20)); Dimension colDimension0 = new Dimension((windowWidth - 19 - labelGroupSeparator.getWidth()) / 2 - 2, 20); JPanel p1 = new JPanel(); p1.setLayout(new BoxLayout(p1, BoxLayout.X_AXIS)); setSize(p1, colDimension0); JPanel p2 = new JPanel(); p2.setLayout(new BoxLayout(p2, BoxLayout.X_AXIS)); setSize(p2, colDimension0); // Left and right columns p1.add(Box.createHorizontalGlue()); p1.add(labelProfile); p1.add(Box.createHorizontalGlue()); p2.add(Box.createHorizontalGlue()); p2.add(labelConnectionState); p2.add(Box.createHorizontalGlue()); // The row row2.add(p1); row2.add(labelGroupSeparator); row2.add(p2); // THe border row2.setBorder(BorderFactory.createEtchedBorder()); // Set the sizes setSize(row2, new Dimension(windowWidth - 19, 45)); // Last row: buttons JPanel row3 = new JPanel(); row3.setLayout(new BoxLayout(row3, BoxLayout.X_AXIS)); // The last row, left column JPanel row3_col0 = new JPanel(); row3_col0.setLayout(new BoxLayout(row3_col0, BoxLayout.Y_AXIS)); buttonLaunchPause = new JButton("Marche"); setSize(buttonLaunchPause, new Dimension(140, 35)); buttonLaunchPause.setAlignmentX(Component.CENTER_ALIGNMENT); labelAutoConnectState = new JLabel("Auto Connect en pause", SwingConstants.CENTER); labelAutoConnectState.setForeground(Color.GRAY); labelAutoConnectState.setAlignmentX(Component.CENTER_ALIGNMENT); setSize(labelAutoConnectState, new Dimension(windowWidth / 2, 15)); // Add components row3_col0.add(Box.createVerticalGlue()); row3_col0.add(Box.createVerticalGlue()); row3_col0.add(buttonLaunchPause); row3_col0.add(Box.createRigidArea(new Dimension(0, 3))); row3_col0.add(labelAutoConnectState); row3_col0.add(Box.createVerticalGlue()); // The last row, right column JPanel row3_col1 = new JPanel(); row3_col1.setLayout(new BoxLayout(row3_col1, BoxLayout.Y_AXIS)); buttonAutoManual = new JButton("Automatique"); setSize(buttonAutoManual, new Dimension(140, 35)); buttonAutoManual.setAlignmentX(Component.CENTER_ALIGNMENT); labelAuthMode = new JLabel("Authentification manuelle", SwingConstants.CENTER); labelAuthMode.setForeground(Color.GRAY); labelAuthMode.setAlignmentX(Component.CENTER_ALIGNMENT); setSize(labelAuthMode, new Dimension(windowWidth / 2, 15)); // Add components row3_col1.add(Box.createVerticalGlue()); row3_col1.add(Box.createVerticalGlue()); row3_col1.add(buttonAutoManual); row3_col1.add(Box.createRigidArea(new Dimension(0, 3))); row3_col1.add(labelAuthMode); row3_col1.add(Box.createVerticalGlue()); // A vertical border JLabel labelSeparator0 = new JLabel(); Dimension labelSeparatorDimension = new Dimension(10, 70); setSize(labelSeparator0, labelSeparatorDimension); labelSeparator0.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); JLabel labelSeparator1 = new JLabel(); setSize(labelSeparator1, new Dimension(6, 70)); labelSeparator1.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); JLabel labelSeparator2 = new JLabel(); setSize(labelSeparator2, labelSeparatorDimension); labelSeparator2.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); row3.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); // Add borders row3_col0.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); row3_col1.setBorder(BorderFactory.createLineBorder(Color.GRAY, 1)); // Add components row3.add(labelSeparator0); row3.add(row3_col0); row3.add(labelSeparator1); row3.add(row3_col1); row3.add(labelSeparator2); // Set sizes Dimension colDimension1 = new Dimension(windowWidth / 2 - 2 * labelSeparator0.getWidth() / 2 - labelSeparator1.getWidth() / 2, 70); setSize(row3_col0, colDimension1); setSize(row3_col1, colDimension1); Dimension row3Dimension = new Dimension(windowWidth, row3.getHeight()); row3.setMinimumSize(row3Dimension); row3.setSize(row3Dimension); row3.setMaximumSize(row3Dimension); // Set the color p1.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); p2.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); pane.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); row0.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); row2.setBackground(FrmMainController.WINDOW_TOP_BACKGROUND); row3_col0.setBackground(FrmMainController.WINDOW_BOTTOM_BACKGROUND); row3_col1.setBackground(FrmMainController.WINDOW_BOTTOM_BACKGROUND); // Add components pane.add(Box.createRigidArea(new Dimension(0, 15))); pane.add(row0); pane.add(Box.createRigidArea(new Dimension(0, 0))); pane.add(labelNotifications); pane.add(Box.createRigidArea(new Dimension(0, 8))); pane.add(row2); pane.add(Box.createRigidArea(new Dimension(0, 5))); pane.add(row3); pane.add(Box.createRigidArea(new Dimension(0, 10))); // Create the menu this.menuFile = new JMenu("Fichier"); this.menuProfiles = new JMenu("Profils"); this.menuHelp = new JMenu("Aide"); this.menuFile_Parameters = new JMenuItem("Paramètres"); this.menuFile_Quit = new JMenuItem("Quitter"); this.menuFile.add(this.menuFile_Parameters); if (OSUtil.IS_WINDOWS) this.menuFile.addSeparator(); else this.menuFile.add(new JSeparatorExt()); this.menuFile.add(this.menuFile_Quit); this.menuHelp_Update = new JMenuItem("Vérifier les mises à jour"); this.menuHelp_Doc = new JMenuItem("Documentation"); this.menuHelp_FAQ = new JMenuItem("FAQ"); this.menuHelp_About = new JMenuItem("À propos de WiFi Auto Connect"); this.menuHelp.add(this.menuHelp_Update); if (OSUtil.IS_WINDOWS) this.menuHelp.addSeparator(); else this.menuHelp.add(new JSeparatorExt()); this.menuHelp.add(this.menuHelp_Doc); this.menuHelp.add(this.menuHelp_FAQ); if (!OSUtil.IS_MAC) // On mac os, the About menu is present in the application menu { if (OSUtil.IS_WINDOWS) this.menuHelp.addSeparator(); else this.menuHelp.add(new JSeparatorExt()); this.menuHelp.add(this.menuHelp_About); } this.menuBar = new JMenuBar(); if (!OSUtil.IS_MAC) // On mac os, Preferences & Quit are already present in the application menu this.menuBar.add(this.menuFile); this.menuBar.add(this.menuProfiles); this.menuBar.add(this.menuHelp); // Add shortcuts (mnemonics are added when we load texts for internationalization) this.menuFile_Quit.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_Q, Toolkit.getDefaultToolkit().getMenuShortcutKeyMask())); this.menuHelp_Doc.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_F1, 0)); // Add the menu bar this.setJMenuBar(this.menuBar); // Full integration of the application in Mac OS if (OSUtil.IS_MAC) { Application.getApplication().setAboutHandler(new AboutHandler() { @Override public void handleAbout(AboutEvent arg0) { new FrmAbout(FrmMain.this, true).setVisible(true); } }); Application.getApplication().setPreferencesHandler(new PreferencesHandler() { @Override public void handlePreferences(PreferencesEvent pe) { new FrmParameters(FrmMain.this, true).setVisible(true); } }); Application.getApplication().addAppEventListener(new AppReOpenedListener() { @Override public void appReOpened(AppReOpenedEvent aroe) { setState(FrmMain.NORMAL); setVisible(true); } }); } // Pack before to display this.pack(); // Add event listeners buttonLaunchPause.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent evt) { buttonLaunchPause_MouseClicked(evt); } }); buttonAutoManual.addMouseListener(new MouseAdapter() { @Override public void mouseClicked(MouseEvent evt) { buttonAutoManual_MouseClicked(evt); } }); menuHelp_About.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { new FrmAbout(FrmMain.this, true).setVisible(true); } }); menuFile_Quit.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.exit(0); } }); menuFile_Parameters.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { new FrmParameters(FrmMain.this, true).setVisible(true); } }); // Create the system tray this.addApplicationSystemTray(); // Set the other properties of the window FrmMain.setDefaultLookAndFeelDecorated(true); this.setTitle(FrmMainController.APP_NAME); this.setResizable(false); this.setIconImage(ResourcesUtil.APPLICATION_IMAGE); // Just hide this.setDefaultCloseOperation(HIDE_ON_CLOSE); // Add the tooltip of the system tray this.updateSystemTrayToolTip(); // Center the window on the screen this.setLocationRelativeTo(null); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n \n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() ...
[ "0.82028484", "0.81591064", "0.8083211", "0.8059758", "0.8059758", "0.8059758", "0.8047378", "0.7990599", "0.7934614", "0.7895904", "0.78393334", "0.78134173", "0.77839035", "0.77748847", "0.7715212", "0.76305854", "0.761853", "0.75999445", "0.75991696", "0.7596386", "0.75907...
0.0
-1
Handle a click on the launch / pause button
private void buttonLaunchPause_MouseClicked(MouseEvent evt) { if (buttonLaunchPause.getText().equalsIgnoreCase(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonLaunchPause.Launch"))) { buttonLaunchPause.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonLaunchPause.Pause")); labelAutoConnectState.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelAutoConnectState.Launched")); } else if (buttonLaunchPause.getText().equalsIgnoreCase(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonLaunchPause.Pause"))) { buttonLaunchPause.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonLaunchPause.Launch")); labelAutoConnectState.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelAutoConnectState.Paused")); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void pause_press(View view){\n //blur background\n blurEffect();\n //pause the game\n if (mSpaceGame.getState() instanceof SpaceGame.PausedGame){\n //mSpaceGame.setState(new SpaceGame.RunningGame());\n }else {\n mSpaceGame.setState(SpaceGame.PAUSED_ST...
[ "0.69254005", "0.68367225", "0.6763703", "0.6660945", "0.6651207", "0.66452396", "0.6627521", "0.6627185", "0.66264737", "0.65919286", "0.6572371", "0.6558488", "0.6552803", "0.6530082", "0.65208167", "0.6515249", "0.6513239", "0.6511848", "0.6506116", "0.65036434", "0.650145...
0.7360278
0
Handle a click on the automatic / manual button
private void buttonAutoManual_MouseClicked(MouseEvent evt) { if (buttonAutoManual.getText().equalsIgnoreCase(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonAutoManual.Auto"))) { buttonAutoManual.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonAutoManual.Manual")); labelAuthMode.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelAuthMode.Auto")); } else if (buttonAutoManual.getText().equalsIgnoreCase(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonAutoManual.Manual"))) { buttonAutoManual.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonAutoManual.Auto")); labelAuthMode.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelAuthMode.Manual")); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void click() {\n\t\tSystem.out.println(\"LinuxButton Click\");\r\n\t}", "public void clickYes ();", "public void clickButton()\n {\n fieldChangeNotify( 0 );\n }", "@Override\n\tprotected void OnClick() {\n\t\t\n\t}", "@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\trb.performCli...
[ "0.7182985", "0.7024424", "0.69722575", "0.69497937", "0.69073963", "0.68296444", "0.6786247", "0.67556566", "0.6754905", "0.67371225", "0.6677366", "0.66561496", "0.6652468", "0.66343784", "0.6587337", "0.65862525", "0.6583934", "0.65760213", "0.6574094", "0.6571401", "0.656...
0.67556226
8
This method is called to change the displayed texts depending on the selected locale
private void initTextsI18n() { // Remember the different indentations to integrate better in different OS's String notMacLargeIndentation = (!OSUtil.IS_MAC ? " " : ""); String notMacSmallIndentation = (!OSUtil.IS_MAC ? " " : ""); String linuxLargeIndentation = (OSUtil.IS_LINUX ? " " : ""); String linuxSmallIndentation = (OSUtil.IS_LINUX ? " " : ""); this.setLocale(Locale.FRANCE); // this.setLocale(Locale.UK); I18nUtil.getInstance().setLocale(this.getLocale().getLanguage(), this.getLocale().getCountry()); this.buttonAutoManual.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonAutoManual.Manual")); this.buttonLaunchPause.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.buttonLaunchPause.Pause")); this.labelAuthMode.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelAuthMode.Auto")); this.labelAutoConnectState.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelAutoConnectState.Launched")); this.labelConnectionState.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelConnectionState.Disconnected")); this.labelNotifications.setText(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelNotifications")); this.labelProfile.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelProfile.Color"))); this.labelGroupSeparator.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelGroupSeparator.Color"))); this.labelConnectionState.setForeground(Color.decode(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.labelConnectionState.Color"))); this.menuFile.setText(notMacLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile") + notMacSmallIndentation); this.menuProfiles.setText(notMacSmallIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuProfiles") + notMacSmallIndentation); this.menuHelp.setText(notMacSmallIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp") + notMacSmallIndentation); this.menuFile_Parameters.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Parameters")); this.menuFile_Quit.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Quit")); this.menuHelp_Update.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Update")); this.menuHelp_Doc.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Doc")); this.menuHelp_FAQ.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_FAQ")); this.menuHelp_About.setText(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_About")); this.popupMenu_ShowApp.setLabel(linuxSmallIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_ShowApp")); this.popupMenu_PauseStart.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_PauseStart.Pause")); this.popupMenu_Profiles.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Profiles")); this.popupMenu_Logs.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Logs")); this.popupMenu_Parameters.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Parameters")); this.popupMenu_Quit.setLabel(linuxLargeIndentation + I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_Quit")); this.setMenuBarMnemonics(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateLocale() {\r\n\t\tsuper.updateLocale();\r\n\t}", "protected void localeChanged() {\n\t}", "private void setLanguage() {\n ResourceBundle labels = ResourceBundle.getBundle\n (\"contactmanager.Contactmanager\", Locale.getDefault()); \n this.setTitle(labels.getStri...
[ "0.675812", "0.6737018", "0.6719466", "0.66676563", "0.6604539", "0.653099", "0.6527207", "0.6496113", "0.64868563", "0.6445351", "0.6445351", "0.6445351", "0.6399045", "0.6394162", "0.63443387", "0.63419497", "0.633602", "0.6314103", "0.6290291", "0.6277008", "0.62733364", ...
0.6635429
4
Set mnemonics to the menus of the menu bar (with the first letter of the captions) No mnemonic on Mac OS
private void setMenuBarMnemonics() { if (!OSUtil.IS_MAC) { // Menus if (this.menuFile.getText().length() > 0) this.menuFile.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile").charAt(0)); if (this.menuProfiles.getText().length() > 0) this.menuProfiles.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuProfiles").charAt(0)); if (this.menuHelp.getText().length() > 0) this.menuHelp.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp").charAt(0)); // File sub menus if (this.menuFile_Parameters.getText().length() > 0) this.menuFile_Parameters.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Parameters").charAt(0)); if (this.menuFile_Quit.getText().length() > 0) this.menuFile_Quit.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuFile_Quit").charAt(0)); // Help sub menus if (this.menuHelp_Update.getText().length() > 0) this.menuHelp_Update.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Update").charAt(0)); if (this.menuHelp_Doc.getText().length() > 0) this.menuHelp_Doc.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_Doc").charAt(0)); if (this.menuHelp_FAQ.getText().length() > 0) this.menuHelp_FAQ.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_FAQ").charAt(0)); if (this.menuHelp_About.getText().length() > 0) this.menuHelp_About.setMnemonic(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.menuHelp_About").charAt(0)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void run() {\n JMenuItem abubillaMenuItem = new JMenuItem(\"Akino Abubilla\");\n // JMenuItem is similar to JButton. You can create Action Listeners on the JMenuItem\n abubillaMenuItem.addActionListener(e -> System.out.println(\"Akino Abubilla!!\"));\n // Also mnem...
[ "0.66341215", "0.6377881", "0.63669866", "0.62612516", "0.6147877", "0.6135465", "0.6114984", "0.6100548", "0.6094147", "0.60746753", "0.6074624", "0.606575", "0.5947764", "0.5935616", "0.59351707", "0.5927245", "0.5899967", "0.58853644", "0.5874352", "0.5846439", "0.58413416...
0.79235464
0
This method is called from within the constructor to manage the system tray icon for the application
private void addApplicationSystemTray() { // Check if the OS has a system tray if (SystemTray.isSupported()) { SystemTray tray = SystemTray.getSystemTray(); // Create the popup menu of the system tray GenericPopupMenu.PopupMenuType popupMenuType = (OSUtil.IS_MAC ? GenericPopupMenu.PopupMenuType.AWT : GenericPopupMenu.PopupMenuType.SWING); this.popupMenu = new GenericPopupMenu(popupMenuType, ""); GenericMenuItem.MenuItemType menuItemType = (OSUtil.IS_MAC ? GenericMenuItem.MenuItemType.AWT : GenericMenuItem.MenuItemType.SWING); GenericMenuItemSeparator.MenuItemSeparatorType menuItemSeparatorType = (OSUtil.IS_MAC ? GenericMenuItemSeparator.MenuItemSeparatorType.AWT : GenericMenuItemSeparator.MenuItemSeparatorType.SWING); this.popupMenu_ShowApp = new GenericMenuItem(menuItemType, "Afficher l'application"); this.popupMenu_Blanc1 = new GenericMenuItemSeparator(menuItemSeparatorType); this.popupMenu_PauseStart = new GenericMenuItem(menuItemType, "Pause"); this.popupMenu_Blanc2 = new GenericMenuItemSeparator(menuItemSeparatorType); this.popupMenu_Profiles = new GenericMenuItem(menuItemType, "Profils"); this.popupMenu_Blanc3 = new GenericMenuItemSeparator(menuItemSeparatorType); this.popupMenu_Logs = new GenericMenuItem(menuItemType, "Consulter les logs"); this.popupMenu_Parameters = new GenericMenuItem(menuItemType, "Paramètres"); this.popupMenu_Blanc4 = new GenericMenuItemSeparator(menuItemSeparatorType); this.popupMenu_Quit = new GenericMenuItem(menuItemType, "Quitter"); // Display the top item in bold only on Windows if (OSUtil.IS_WINDOWS) this.popupMenu_ShowApp.setFont(new Font(menuProfiles.getFont().getName(), Font.BOLD, menuProfiles.getFont().getSize())); this.popupMenu_Quit.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { System.exit(0); } }); this.popupMenu_ShowApp.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { setState(FrmMain.NORMAL); setVisible(true); } }); this.popupMenu_PauseStart.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { if (popupMenu_PauseStart.getLabel().equalsIgnoreCase(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_PauseStart.Start"))) { popupMenu_PauseStart.setLabel(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_PauseStart.Pause")); } else if (popupMenu_PauseStart.getLabel().equalsIgnoreCase(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_PauseStart.Pause"))) { popupMenu_PauseStart.setLabel(I18nUtil.getInstance().getI18nMsg("fr.davidbrun.wifiautoconnect.views.FrmMain.popupMenu_PauseStart.Start")); } } }); this.popupMenu_Parameters.addActionListener( new ActionListener() { @Override public void actionPerformed(ActionEvent e) { new FrmParameters(FrmMain.this, true).setVisible(true); } }); this.popupMenu.addMenuItem(this.popupMenu_ShowApp); this.popupMenu.addMenuItemSeparator(this.popupMenu_Blanc1); this.popupMenu.addMenuItem(this.popupMenu_PauseStart); this.popupMenu.addMenuItemSeparator(this.popupMenu_Blanc2); this.popupMenu.addMenuItem(this.popupMenu_Profiles); this.popupMenu.addMenuItemSeparator(this.popupMenu_Blanc3); this.popupMenu.addMenuItem(this.popupMenu_Logs); this.popupMenu.addMenuItem(this.popupMenu_Parameters); this.popupMenu.addMenuItemSeparator(this.popupMenu_Blanc4); this.popupMenu.addMenuItem(this.popupMenu_Quit); // Create the system tray GenericTrayIcon.TrayIconType trayIconType = (OSUtil.IS_MAC ? GenericTrayIcon.TrayIconType.DEFAULT : GenericTrayIcon.TrayIconType.CUSTOM); systemTray = new GenericTrayIcon(trayIconType, ResourcesUtil.SYSTEM_TRAY_IMAGE_ICON.getImage(), FrmMainController.APP_NAME, this.popupMenu.getCurrentPopupMenu()); //To catch events on the popup menu systemTray.setImageAutoSize(true); systemTray.addActionListener(new ActionListener() { @Override public void actionPerformed(ActionEvent e) { // TODO: manage double-click } }); try { if (OSUtil.IS_MAC) tray.add((TrayIcon)systemTray.getCurrentTrayIcon()); else tray.add((JTrayIcon)systemTray.getCurrentTrayIcon()); } catch (Exception e) { } } else // If there is no system tray, we don't do anything { } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void initSystemTray() {\n if (SystemTray.isSupported()) {\n SystemTray tray = SystemTray.getSystemTray();\n PopupMenu menu = new PopupMenu();\n MenuItem exitItem = new MenuItem(Resources.strings().get(\"menu_exit\"));\n exitItem.addActionListener(a -> System.exit(0));\n m...
[ "0.7602504", "0.73673683", "0.7358876", "0.7351138", "0.7294668", "0.7048497", "0.6878309", "0.67034644", "0.66525704", "0.66505164", "0.6620077", "0.6583604", "0.6555529", "0.6555529", "0.64985496", "0.6492921", "0.6405128", "0.63900536", "0.63473564", "0.6344716", "0.634403...
0.73637676
2
Update the tool tip of the system tray depending on the state of the connection
private void updateSystemTrayToolTip() { if (OSUtil.IS_LINUX) this.systemTray.setToolTip("SFR WiFi Public : Connecté"); else this.systemTray.setToolTip(FrmMainController.APP_NAME + " " + FrmMainController.APP_VERSION + FrmMainController.LINE_SEPARATOR + "SFR WiFi Public : Connecté"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateTrayIcon(Boolean state) {\n if (lastState == state) {\n return;\n }\n \n if (true == state) {\n this.trayicon.setImage(this.statusImages[0]);\n this.trayicon.setToolTip(this.statusText[0]);\n } else {\n this.t...
[ "0.7029735", "0.6484738", "0.64443743", "0.6301863", "0.6246847", "0.59668463", "0.59273696", "0.5914442", "0.59061855", "0.5898063", "0.58773804", "0.58187985", "0.57943666", "0.57887703", "0.5719084", "0.5717178", "0.57063866", "0.5652862", "0.55637646", "0.5556901", "0.555...
0.8106868
0
Fix the size of a swing component
private void setSize(JComponent target, Dimension d) { target.setMinimumSize(d); target.setMaximumSize(d); target.setPreferredSize(d); target.setSize(d); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setCorrectSize() {\n double newHeight = this.getContentPane().getPreferredSize().getHeight() +\n this.getContentPane().getPreferredSize().getHeight()/10 * 7;\n int newHeightInt = (int)Math.round(newHeight);\n \n this.setSize(this.getWidth(),newHeightInt);\n ...
[ "0.7286934", "0.700465", "0.6828053", "0.6781718", "0.6751755", "0.67465794", "0.6723085", "0.6705922", "0.6703896", "0.66000164", "0.6574225", "0.6574225", "0.6556418", "0.6556418", "0.65501475", "0.65226823", "0.6513124", "0.64938384", "0.64479655", "0.64337575", "0.6384741...
0.6416349
20
apply BurrowsWheeler transform, reading from standard input and writing to standard output
public static void transform() { String input = BinaryStdIn.readString(); CircularSuffixArray csa = new CircularSuffixArray(input); int first = 0; for (int i = 0; i < csa.length(); i++) { if (csa.index(i) == 0) { first = i; break; } } BinaryStdOut.write(first); for (int i = 0; i < csa.length(); i++) { if (csa.index(i) == 0) { BinaryStdOut.write(input.charAt(csa.length() - 1)); } else BinaryStdOut.write(input.charAt(csa.index(i) - 1)); } BinaryStdOut.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testTransform() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input\n System.setIn(new ByteArrayInputStream(DECODED_INPUT.getBytes()));\n // create new output stream as byte array a...
[ "0.65564066", "0.6362747", "0.6328882", "0.61198163", "0.5496498", "0.54042095", "0.5400635", "0.52985686", "0.5147185", "0.50070834", "0.49071744", "0.48080468", "0.47502562", "0.474352", "0.47095534", "0.46704552", "0.46001875", "0.45831734", "0.45824432", "0.45684716", "0....
0.41213092
74
apply BurrowsWheeler inverse transform, reading from standard input and writing to standard output
public static void inverseTransform() { int first = BinaryStdIn.readInt(); String t = BinaryStdIn.readString(); int N = t.length(); char[] b = new char[N]; for (int i = 0; i < N; i++) b[i] = t.charAt(i); Arrays.sort(b); int[] next = new int[N]; int[] count = new int[R + 1]; for (int i = 0; i < N; i++) { count[t.charAt(i) + 1]++; } for (int r = 0; r < R; r++) { count[r + 1] += count[r]; } for (int i = 0; i < N; i++) { next[count[t.charAt(i)]++] = i; } int number = 0; for (int i = first; number < N; i = next[i]) { BinaryStdOut.write(b[i]); number++; } BinaryStdOut.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testInverseTransform() {\n InputStream standardIn = System.in;\n PrintStream standardOut = System.out;\n try {\n // setup new input with encoded message\n System.setIn(new ByteArrayInputStream(ENCODED_INPUT));\n // create new output strea...
[ "0.69826484", "0.6816762", "0.67806256", "0.6734761", "0.66478264", "0.65675867", "0.6542327", "0.59532785", "0.58001983", "0.5776313", "0.54837036", "0.5200868", "0.50022066", "0.49973074", "0.49494058", "0.49403203", "0.48900276", "0.48812687", "0.4852544", "0.47806376", "0...
0.5875049
8
if args[0] is "", apply BurrowsWheeler transform if args[0] is "+", apply BurrowsWheeler inverse transform
public static void main(String[] args) { if (args[0].equals("-")) transform(); else if (args[0].equals("+")) inverseTransform(); else throw new IllegalArgumentException("Illegal Argument!"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n if (args[0].equals(\"-\")) {\n BurrowsWheeler.transform();\n }\n else {\n BurrowsWheeler.inverseTransform();\n }\n }", "public static void main(String[] args) {\n if (args[0].equals(\"-\")) {\n trans...
[ "0.7432263", "0.64872825", "0.63750136", "0.6084334", "0.58750206", "0.5100899", "0.50037", "0.48549414", "0.4704609", "0.46756247", "0.46682248", "0.45533323", "0.45432884", "0.45301113", "0.45165583", "0.44966048", "0.4496364", "0.44875208", "0.44563207", "0.44214654", "0.4...
0.646912
2
TODO Autogenerated method stub
@Override public Celular buscarPeloId(String id) throws Exception { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void atualizar(Celular celular) throws Exception { }
{ "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
arr[0][0] = 1 + Math.min(Math.min(arr[1][1], arr[1][0]), arr[0][1]);
public static void main(String[] args) { String s1 = "dabc"; int l1 = s1.length(); String s2 = "abcd"; int l2 = s2.length(); // System.out.println(findED(s1, s2, l1, l2)); System.out.println(findEDdp(s1, s2)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int minCost(int[][] costs) {\n\nif(costs== null || costs.length == 0)\nreturn 0;\n// int n_houses = costs.length ;\nint lastR = costs[0][0];\nint lastB = costs[0][1];\nint lastG = costs[0][2];\nint currR,currB,currG ;\nfor(int i = 1; i< costs.length ; i++ ){\ncurrR = costs[i][0] + Math.min(lastB,lastG);\ncu...
[ "0.6666522", "0.66607183", "0.66084164", "0.65892357", "0.65156996", "0.65065503", "0.6458854", "0.6447218", "0.6418727", "0.64149797", "0.6393434", "0.63910973", "0.63488513", "0.63428897", "0.6320221", "0.63191634", "0.6314529", "0.62999636", "0.62963593", "0.62861145", "0....
0.0
-1
The coupled model has been made able to create the simulation architecture description.
protected void initialise() throws Exception { Architecture localArchitecture = this.createLocalArchitecture(null) ; // Create the appropriate DEVS simulation plug-in. this.asp = new OvenSimulatorPlugin() ; // Set the URI of the plug-in, using the URI of its associated // simulation model. this.asp.setPluginURI(localArchitecture.getRootModelURI()) ; // Set the simulation architecture. this.asp.setSimulationArchitecture(localArchitecture) ; // Install the plug-in on the component, starting its own life-cycle. this.installPlugin(this.asp) ; // Toggle logging on to get a log on the screen. this.toggleLogging() ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface\t\t\tComponentModelArchitectureI\nextends\t\tArchitectureI\n{\n\t/**\n\t * get the URI of the described architecture.\n\t * \n\t * <p><strong>Contract</strong></p>\n\t * \n\t * <pre>\n\t * pre\ttrue\t\t\t// no precondition.\n\t * post\tret != null\n\t * </pre>\n\t *\n\t * @return\tthe URI of the d...
[ "0.64833033", "0.6099944", "0.59327555", "0.5919019", "0.5766645", "0.5756302", "0.5748928", "0.57477957", "0.5744523", "0.57098275", "0.5700612", "0.5695519", "0.56921643", "0.56879455", "0.56733", "0.5673278", "0.5667437", "0.5666392", "0.56584585", "0.55912817", "0.5556564...
0.0
-1
Initialize your data structure here.
public 用栈实现队列() { stack1 = new LinkedList<>(); stack2 = new LinkedList<>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initData() {\n }", "private void initData() {\n\t}", "private void initData() {\n\n }", "public void initData() {\n }", "public void initData() {\n }", "@Override\n\tpublic void initData() {\n\n\n\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\...
[ "0.79946685", "0.7973242", "0.7808862", "0.77763873", "0.77763873", "0.7643394", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.76371324", "0.75553316", "0.7543321", "0.7543321", "0.75426376", "0.75426376", "0.75426376", "0.7532583", "0.75228804", "0...
0.0
-1
Push element x to the back of queue.
public void push(int x) { stack1.push(x); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n queue.addLast(x);\n }", "public void push(int x) {\n if (!reverseQueue.isEmpty()) {\n normalQueue.offer(reverseQueue.poll());\n }\n normalQueue.offer(x);\n }", "publ...
[ "0.82624036", "0.8259673", "0.81935894", "0.81571823", "0.80487853", "0.8009802", "0.7990561", "0.79842633", "0.79804295", "0.7975267", "0.7919498", "0.78962463", "0.7856843", "0.78444326", "0.7841012", "0.77275115", "0.7722426", "0.7722426", "0.76359296", "0.76308316", "0.76...
0.0
-1
Removes the element from in front of queue and returns that element.
public int pop() { peek(); return stack2.pop(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized Object removeFirstElement() {\n return _queue.remove(0);\n }", "public E remove(){\r\n if(isEmpty())\r\n return null;\r\n \r\n //since the array is ordered, the highest priority will always be at the end of the queue\r\n //--currentSize will fi...
[ "0.7710383", "0.767744", "0.7632147", "0.7572486", "0.7529685", "0.75053036", "0.7495563", "0.7455531", "0.74506617", "0.74362785", "0.74324703", "0.74064606", "0.73923665", "0.7384324", "0.73561954", "0.73264414", "0.7326095", "0.7309975", "0.7303639", "0.730135", "0.7294155...
0.0
-1
Get the front element.
public int peek() { if (stack2.size() > 0) { return stack2.peek(); } while (!stack1.isEmpty()) { stack2.push(stack1.pop()); } return stack2.peek(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object getFront() throws Exception {\n\t\tif(data[front]!=null)\n\t\t\n\t\t return data[front];\n\t\treturn null;\n\t}", "public int getFront() {\n return !isEmpty() ? elements[last - 1] : -1;\n }", "@Override\n\tpublic E getFront() {\n\t\treturn data[front];\n\t}", "public T getFront();"...
[ "0.7787832", "0.7759961", "0.7736187", "0.77095133", "0.7660213", "0.7649954", "0.76229614", "0.7568303", "0.7566831", "0.75497985", "0.7549047", "0.754666", "0.7536814", "0.75341916", "0.7465238", "0.745295", "0.73273396", "0.73127115", "0.73101807", "0.7300005", "0.7194966"...
0.0
-1
Returns whether the queue is empty.
public boolean empty() { return stack1.isEmpty() && stack2.isEmpty(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean is_empty() {\n\t\tif (queue.size() <= 0) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean isEmpty() {\n return this.queue.size() == 0;\n }", "public boolean isEmpty() {\n\t\treturn queue.isEmpty();\n\t}", "public boolean isEmpty() {\n\t\tret...
[ "0.9061608", "0.8914194", "0.8852499", "0.8852499", "0.8815682", "0.8810445", "0.87997335", "0.8791669", "0.8790852", "0.87563825", "0.87563825", "0.87563825", "0.87563825", "0.87563825", "0.87563825", "0.87563825", "0.8689962", "0.8680233", "0.8680233", "0.8680233", "0.86802...
0.0
-1
Called when the properties of the animation node have changed
public void onChanged() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void animUpdate(PropertyChangeEvent anEvent)\n{\n // Return if shape is a new-born\n if(getAnimator()==null || getAnimator().isNewborn(this) || !getAnimator().isEnabled()) return;\n \n // If change is anim property, add record\n if(isAnimProperty(anEvent.getPropertyName()))\n addTimeli...
[ "0.64587015", "0.61047125", "0.60299575", "0.6023029", "0.6010574", "0.5994554", "0.5949204", "0.588773", "0.5862012", "0.58612704", "0.5842036", "0.58385676", "0.5831784", "0.5807375", "0.5805848", "0.5805848", "0.57840145", "0.5764582", "0.57588196", "0.57573205", "0.575732...
0.0
-1
Called when this node needs to be duplicated one down
public void onDuplicate() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public VNode duplicate() throws VlException\n\t{\n\t\tthrow new nl.uva.vlet.exception.NotImplementedException(\"Duplicate method not implemented\"); \n\t}", "public void duplicateClubEvent() {\n \n boolean modOK = modIfChanged();\n \n if (modOK) {\n ClubEvent clubEvent = position.getClubEvent();\n ...
[ "0.62196887", "0.57864255", "0.57739574", "0.57025564", "0.56245434", "0.5592577", "0.55701584", "0.5557268", "0.55095077", "0.547832", "0.54724514", "0.5469804", "0.5439379", "0.54227227", "0.5387595", "0.53435403", "0.53435403", "0.5340256", "0.533939", "0.5338836", "0.5337...
0.6183002
1
Called when this node needs to be deleted from the array
public void onDelete() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public synchronized void delete() {\n if (this.agpCptr != 0) {\n if (this.isAgpCmemOwn) {\n this.isAgpCmemOwn = false;\n CoreJni.deleteCoreRenderNodeDescArrayView(this.agpCptr);\n }\n this.agpCptr = 0;\n }\n }", "@objid (\"808c0839-1...
[ "0.7001802", "0.68769276", "0.6832622", "0.66953236", "0.66737044", "0.6663551", "0.6530577", "0.6530577", "0.6530577", "0.65243953", "0.65235645", "0.6481714", "0.64668417", "0.6442376", "0.6442376", "0.6401062", "0.637123", "0.6365899", "0.6338367", "0.6300098", "0.62905306...
0.0
-1
Main Class for testing ranks of these users
public static void main(String[] args) { HonestUser ds= new HonestUser((short) 1); for (int i=0;i<15;i++) System.out.println(ds.generate_rankValue((float) 0.754)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void testGetMyBestRank() {\n int result1 = this.scoreBoard.getMyBestRank(new Record(4, 5, \"@u1\", \"ST\"));\n assertEquals(1, result1);\n int result2 = this.scoreBoard.getMyBestRank(new Record(3, 15, \"@u3\", \"ST\"));\n assertEquals(3, result2);\n\n }", "void se...
[ "0.6854243", "0.67787546", "0.6746764", "0.6588525", "0.6435683", "0.64349085", "0.634622", "0.63382983", "0.6283469", "0.62784755", "0.62731165", "0.617437", "0.6170448", "0.6157117", "0.6157117", "0.6150521", "0.6104591", "0.6091864", "0.6066066", "0.6064389", "0.6051305", ...
0.6814427
1
This is the number of comment delimiter characters deleted from the string. It is 4 for a "( ... )" comment, etc.
public CommentToken(String str, int col, int sub, boolean pseudo) /********************************************************************** * The constructor for this class. The third argument specifies the * * rsubtype. The fourth argument is true iff this comment is ended * * by the beginning of a PlusCal algorithm or begun by the end of a * * PlusCal algorithm. In either case, two delimiter characters that * * normally would have been deleted weren't. * **********************************************************************/ { type = Token.COMMENT; column = col ; string = str; rsubtype = sub; subtype = 0 ; switch (rsubtype) { case NORMAL : delimiters = pseudo?2:4; break; case LINE : case BEGIN_OVERRUN : case END_OVERRUN : delimiters = pseudo?0:2; break ; case OVERRUN : break ; default : Debug.ReportBug( "CommentToken constructor called with illegal subtype" ); } ; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int countDelimiters(String resource, String delimiter)\r\n {\r\n int delLen = (delimiter.equals(TIGHT_BINDING)) ? TIGHT_BINDING_LEN :\r\n LOOSE_BINDING_LEN ;\r\n\r\n // find the first delimiter\r\n int index = resource.indexOf(delimiter);\r\n\r\...
[ "0.6223086", "0.6139729", "0.6040746", "0.57000965", "0.5572187", "0.5515099", "0.54886687", "0.5474645", "0.54639935", "0.5459915", "0.5458011", "0.5448354", "0.54392415", "0.54300743", "0.5421933", "0.54114234", "0.5408601", "0.5405779", "0.539674", "0.53832614", "0.5323359...
0.5393423
19
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_user_information, container, false); nombre = (EditText) view.findViewById(R.id.rg_nombre); apellido = (EditText) view.findViewById(R.id.rg_apellido); cedula = (EditText) view.findViewById(R.id.rg_cedula); tomo = (EditText) view.findViewById(R.id.rg_tomo); asiento = (EditText) view.findViewById(R.id.rg_asiento); fecha = (EditText) view.findViewById(R.id.rg_fecha_nacimiento); sexo = (TextView) view.findViewById(R.id.rg_sexo); etnia = (TextView) view.findViewById(R.id.rg_etnia_text); sp_etnia = (Spinner) view.findViewById(R.id.rg_etnia); sp_sexo = (Spinner) view.findViewById(R.id.rg_sp_sexo); sp_ced = (Spinner) view.findViewById(R.id.sp_ced); ced = new ArrayList<>(); ced.add("01"); ced.add("02"); ced.add("03"); ced.add("04"); ced.add("05"); ced.add("06"); ced.add("07"); ced.add("08"); ced.add("09"); ced.add("10"); ced.add("11"); ced.add("12"); ced.add("13"); ced.add("AV"); ced.add("E"); ced.add("N"); ced.add("PE"); ced.add("PI"); ced.add("SB"); sp_ced.setAdapter(new ArrayAdapter<String>(getContext(),R.layout.support_simple_spinner_dropdown_item,ced)); sp_ced.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() { @Override public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) { cedula.setText(adapterView.getSelectedItem().toString()); } @Override public void onNothingSelected(AdapterView<?> adapterView) { } }); presenterINT = new RegistroPresenterIMP(this); etnias = new ArrayList<>(); adapterEtnias = new ArrayAdapter<Etnia>(getContext(), R.layout.support_simple_spinner_dropdown_item,etnias); arraySexo = new ArrayList<>(); arraySexo .add("Mujer"); arraySexo .add("Hombre"); adapterSexo = new ArrayAdapter<String>(getContext(), R.layout.support_simple_spinner_dropdown_item,arraySexo); sp_sexo .setAdapter(adapterSexo); sp_etnia .setAdapter(adapterEtnias); presenterINT .getEtnias(getContext()); btn_fecha_rg = (Button) view.findViewById(R.id.btn_fecha_rg); btn_fecha_rg.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { showFechaDialogo(view); } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6739604", "0.67235583", "0.6721706", "0.6698254", "0.6691869", "0.6687986", "0.66869223", "0.6684548", "0.66766286", "0.6674615", "0.66654444", "0.66654384", "0.6664403", "0.66596216", "0.6653321", "0.6647136", "0.66423255", "0.66388357", "0.6637491", "0.6634193", "0.66251...
0.0
-1
/ access modifiers changed from: packageprivate
public void logValue(String str, byte[] bArr) { if (bArr == null) { bArr = this.gattCharacteristic.getValue(); } String bytesToHex = bArr != null ? ByteUtils.bytesToHex(bArr) : "(null)"; RxBleLog.m1116v(str + " Characteristic(uuid: " + this.gattCharacteristic.getUuid().toString() + ", id: " + this.f1174id + ", value: " + bytesToHex + ")", new Object[0]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private stendhal() {\n\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\n protected void prot() {\n }", "public void method_4270() {}", "@Override\n public void func_104112_b() {\n \n }", "private void m50366E() {\n }", "private void kk12() {\n\n\t}", "public final void mo51373a...
[ "0.7151204", "0.6685856", "0.65579224", "0.64821804", "0.6429287", "0.6384333", "0.63834417", "0.63473904", "0.63293463", "0.6275806", "0.62622887", "0.62497604", "0.62368774", "0.623226", "0.62282825", "0.61979276", "0.61979276", "0.61937356", "0.618325", "0.6179347", "0.615...
0.0
-1
los achivos en color verde son colores nuevos
public static void main(String[] args) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void generarColor() {\r\n\t\tthis.color = COLORES[(int) (Math.random() * COLORES.length)];\r\n\t}", "public void colorearSecuencialAlternativo() {\n\t\tint color;\n\t\tcantColores = 0;\n\t\tfor (int i = 0; i < cantNodos; i++) {\n\t\t\tcolor = 1;\n\t\t\t/** Mientras el color no se pueda usar, elijo otro c...
[ "0.6873983", "0.68522274", "0.68300366", "0.6822404", "0.67505425", "0.6650139", "0.6565505", "0.65637165", "0.64921737", "0.64538336", "0.64432263", "0.6429804", "0.6418446", "0.6381722", "0.63477963", "0.632491", "0.62956196", "0.6283951", "0.62822556", "0.62739056", "0.624...
0.0
-1
User: alexkorotkikh Date: 12/20/13 Time: 7:18 PM
public interface EmployeeDao { List<Employee> getAllEmployees() throws ParseException, SQLException; Employee getEmployeeById(Integer id) throws ParseException, SQLException; Collection<Employee> getEmployeesByTitle(String title) throws ParseException; Collection<Employee> getEmployeesWithSalaryHigherTham(Integer salary) throws ParseException; Collection<Employee> getEmployeesWithNameStartsWith(String firstLetter) throws ParseException; Collection<Employee> getSubordinatesByManagerId(Integer managerId) throws ParseException; void saveEmployee(Employee employee) throws SQLException; void updateEmployee(Employee employee); void deleteEmployee(Employee employee); void setManagerForEmployee(Employee employee, Employee manager); Collection<Employee> getEmployeesByName(String name) throws SQLException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws Exception {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat simpleformat = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss Z\");\n System.out.println(\"Today's date and time = \"+simpleformat.format(cal.getTime()));\n // displayin...
[ "0.6161666", "0.6010684", "0.5899819", "0.58791", "0.58496606", "0.5817841", "0.5811267", "0.5811267", "0.58010095", "0.57892025", "0.5779314", "0.5778302", "0.5775405", "0.57567304", "0.5744736", "0.57343596", "0.57297397", "0.57108605", "0.5686059", "0.56821996", "0.5678025...
0.0
-1
Configure our custom authentication provider to forward login to oauth2 authorization server.
@Bean @Override public AuthenticationManager authenticationManagerBean() { return new ProviderManager(singletonList(new OAuth2PasswordAuthenticationProvider(properties))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void configure(AuthenticationManagerBuilder auth) {\n auth.authenticationProvider(authProvider);\n }", "@Override\n protected void configure(AuthenticationManagerBuilder authenticationManagerBuilderObj) throws Exception {\n\t authenticationManagerBuilderObj.authenticationProvider(...
[ "0.7016269", "0.68628746", "0.674127", "0.6674377", "0.66635144", "0.6568515", "0.64562726", "0.6249366", "0.6242794", "0.6216301", "0.61750865", "0.6170689", "0.61306924", "0.6104554", "0.6101874", "0.6008261", "0.5892125", "0.58765864", "0.5831043", "0.5827442", "0.5765649"...
0.6717684
3
Constructs a new exception with the specified value and detail message.
public ScriptThrownException(String message, Object value) { super(message); this.value = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ValueOutOfBoundsException(String message){\n super(message);\n //do nothing else\n }", "public ValueOutOfRangeException(String message) {\n this.message = message;\n }", "public ScriptThrownException(Exception e, Object value) {\n super(e);\n this.value = value;\...
[ "0.63232315", "0.6238719", "0.60298777", "0.5881406", "0.5873726", "0.582185", "0.5804039", "0.5787346", "0.57245874", "0.5709769", "0.570867", "0.5671463", "0.5670891", "0.5668799", "0.56651443", "0.5658371", "0.5655509", "0.5639446", "0.56329095", "0.5631254", "0.56277275",...
0.6893957
0
Constructs a new exception with the specified value and cause.
public ScriptThrownException(Exception e, Object value) { super(e); this.value = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Exception(String message, Throwable cause) {\n\t\t\tsuper(message, cause);\n\t\t}", "public Neo4jException(String message, Throwable cause) {\n this(\"N/A\", message, cause);\n }", "public Exception(Throwable cause) {\n\t\t\tsuper(cause);\n\t\t}", "public AgentException(String cause) {\n ...
[ "0.64827955", "0.64621174", "0.6430261", "0.6427472", "0.64070046", "0.63173765", "0.6277893", "0.62642896", "0.62455726", "0.6226406", "0.6222806", "0.6211587", "0.62041384", "0.61665213", "0.61660963", "0.61502576", "0.61487454", "0.61450887", "0.6140075", "0.6136512", "0.6...
0.59222794
41
Returns the value that was thrown from the script.
public Object getValue() { return value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getError() {\r\n if (scriptError == null) return \"\";\r\n return scriptError;\r\n }", "String getException();", "String getException();", "public SpawnException getCaught();", "public static int getValue_from_die()\n {\n return value_from_die;\n }", "public ByteVector get...
[ "0.66496754", "0.6510122", "0.6510122", "0.6341591", "0.63297296", "0.6172812", "0.6119453", "0.6100047", "0.59902614", "0.5978253", "0.58552957", "0.583468", "0.58310765", "0.5785412", "0.5779545", "0.57557815", "0.56850225", "0.56421554", "0.5613419", "0.557617", "0.5555129...
0.0
-1
Converts the script exception to an appropriate json resource exception. The exception message is set to, in order of precedence 1. Specific message set in the thrown script exception 2. Default exception supplied to this method, or if null 3. value toString of this exception
public ResourceException toResourceException(int defaultCode, String defaultMsg) { if (value instanceof Map) { // Convention on structuring well known exceptions with value that // contains // code : Integer matching ResourceException codes // (required for it to be considered a known exception definition) // reason : String - optional exception reason, not set this use the // default value // message : String - optional exception message, set to // value.toString if not present // detail : Map<String, Object> - optional structure with exception // detail // cause : Throwable - optional cause to chain JsonValue val = new JsonValue(value); Integer openidmCode = val.get(FIELD_CODE).asInteger(); if (openidmCode != null) { String message = val.get(FIELD_MESSAGE).asString(); if (message == null) { if (defaultMsg != null) { message = defaultMsg; } else { message = String.valueOf(value); } } JsonValue failureDetail = val.get(FIELD_DETAIL); Throwable throwable = (Throwable) val.get("cause").getObject(); if (throwable == null) { throwable = this; } return getException(openidmCode.intValue(), message, throwable).setDetail( failureDetail); } } if (defaultMsg != null) { return getException(defaultCode, defaultMsg, this); } else if (value == null) { return getException(defaultCode, null, this); } else { return getException(defaultCode, String.valueOf(value.toString()), this); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getExceptionMessage() {\n\t\treturn \"Error while publishing JSON reports. Please contact system administrator or try again later!\";\n\t}", "@Override\n\tprotected String generateMessage() {\n\t\treturn \"Script evaluation exception \" + generateSimpleMessage();\n\t}", "private ScriptException g...
[ "0.5891404", "0.58450025", "0.5707659", "0.56464565", "0.5617287", "0.5617287", "0.5584353", "0.5444282", "0.5426613", "0.53308195", "0.53134793", "0.5299897", "0.529771", "0.5274516", "0.5261636", "0.5257807", "0.519016", "0.5173503", "0.515593", "0.5116984", "0.5113672", ...
0.55716777
7
A balanced dupdel mutation operator that performs either deletion OR duplication with some size distribution.
public static <G extends VarLengthGenome<G>> MutationRule<G> withSize(Function<G,DiscreteDistribution> lendist) { final MutationRule<G> in = Duplication.withSize(lendist); final MutationRule<G> del = Deletion.withSize(lendist); return (rng) -> { final MutationOp<G> in_rng = in.apply(rng); final MutationOp<G> del_rng = del.apply(rng); return (g, stats) -> { if (rng.nextBoolean()) { in_rng.accept(g, stats); } else { del_rng.accept(g, stats); } }; }; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Chromosome doDisplacementMutation(){\n for(int i = 0; i < PopulationConfiguration.MUTATION_ATTEMPTS; i++){\n ArrayList<Boolean> newSelection = copyBoolArrayList(this.knapsackSelection);\n\n int allele1 = Configuration.RANDOM_GENERATOR.nextInt(newSelection.size());\n i...
[ "0.5696099", "0.5693743", "0.5685312", "0.5624169", "0.5426503", "0.5400826", "0.53379077", "0.5191976", "0.50966144", "0.49731857", "0.490406", "0.48984876", "0.48941028", "0.48567605", "0.4803307", "0.4770597", "0.4751161", "0.4731288", "0.47292718", "0.47207776", "0.471488...
0.5779515
0
Spring Data JPA repository for the Authority entity.
public interface AuthorityRepository extends JpaRepository<Authority, String> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Repository\npublic interface AuthorityRepository extends JpaRepository<Authority, String>{\n}", "@Repository\npublic interface AuthorityRepository extends JpaRepository<Authority, String> {\n\n}", "public interface AuthorityRepository extends JpaRepository<Authority, String> {\n\n Authority findByName(Stri...
[ "0.79359925", "0.7923745", "0.7796128", "0.7532417", "0.72032243", "0.7125369", "0.6667799", "0.6586023", "0.6586023", "0.6569341", "0.6541673", "0.6367956", "0.6258347", "0.61350906", "0.6083212", "0.60583526", "0.6017775", "0.5965169", "0.59432715", "0.5903021", "0.5886393"...
0.7831635
9
Returns a string containing the tokens joined by delimiters.
public static String join(CharSequence delimiter, Object[] tokens) { StringBuilder sb = new StringBuilder(); boolean firstTime = true; for (Object token : tokens) { if (firstTime) { firstTime = false; } else { sb.append(delimiter); } sb.append(token); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String join(@NonNull CharSequence delimiter, @NonNull Iterable tokens) {\n final Iterator<?> it = tokens.iterator();\n if (!it.hasNext()) {\n return \"\";\n }\n final StringBuilder sb = new StringBuilder();\n sb.append(it.next());\n while (it.hasNe...
[ "0.7133881", "0.7132544", "0.6842979", "0.66349155", "0.6482836", "0.64126545", "0.6231003", "0.6188539", "0.61463314", "0.60716206", "0.59030604", "0.5731653", "0.5722748", "0.57136714", "0.5680558", "0.56608886", "0.5608188", "0.5596938", "0.55420715", "0.5510877", "0.54803...
0.71686286
0
Returns a string containing the tokens joined by delimiters.
@SuppressWarnings("rawtypes") public static String join(CharSequence delimiter, Iterable tokens) { StringBuilder sb = new StringBuilder(); boolean firstTime = true; for (Object token : tokens) { if (firstTime) { firstTime = false; } else { sb.append(delimiter); } sb.append(token); } return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String join(CharSequence delimiter, Object[] tokens) {\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tboolean firstTime = true;\r\n\t\tfor (Object token : tokens) {\r\n\t\t\tif (firstTime) {\r\n\t\t\t\tfirstTime = false;\r\n\t\t\t} else {\r\n\t\t\t\tsb.append(delimiter);\r\n\t\t\t}\r\n\t\t\tsb...
[ "0.71686286", "0.7133881", "0.6842979", "0.66349155", "0.6482836", "0.64126545", "0.6231003", "0.6188539", "0.61463314", "0.60716206", "0.59030604", "0.5731653", "0.5722748", "0.57136714", "0.5680558", "0.56608886", "0.5608188", "0.5596938", "0.55420715", "0.5510877", "0.5480...
0.7132544
2
Splits a string on a pattern. String.split() returns [''] when the string to be split is empty. This returns []. This does not remove any empty strings from the result.
public static String[] split(String text, Pattern pattern) { if (text.length() == 0) { return EMPTY_STRING_ARRAY; } else { return pattern.split(text, -1); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String[] split(String str) {\n\t\treturn split(str, null, -1);\n\t}", "public String[] splitBySplitter(String s) {\r\n\t\tString[] returnArray = new String[4];\r\n\t\treturnArray = s.split(\"-\");\r\n\t\treturn returnArray;\r\n\t}", "public static final List<?> splitRegex(final String string, fin...
[ "0.72100985", "0.67787075", "0.6678708", "0.6670141", "0.6513825", "0.6503553", "0.6349907", "0.6290228", "0.6279295", "0.6208723", "0.6180541", "0.6177879", "0.6154412", "0.61353266", "0.61340165", "0.61198217", "0.6114698", "0.6110374", "0.60693043", "0.606479", "0.60284853...
0.7310365
0
Returns true if the string is null or 0length.
public static boolean isEmpty(CharSequence str) { if (str == null || str.length() == 0) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isZeroLength() {\r\n return value.length() == 0;\r\n }", "private boolean hasValue (String s) { return s != null && s.length() != 0; }", "public static boolean hasLength(CharSequence str) {\n\t\treturn (str != null && str.length() > 0);\n\t}", "protected boolean notEmpty(String s) {\...
[ "0.7866255", "0.78282", "0.776109", "0.74661076", "0.73871607", "0.7342946", "0.7305148", "0.7261805", "0.7253386", "0.72099763", "0.7206328", "0.7186251", "0.71488774", "0.71468973", "0.7143354", "0.7143291", "0.7135468", "0.7135077", "0.7129628", "0.71118367", "0.7101511", ...
0.7153199
12
Returns true if a and b are equal, including if they are both null. Note: In platform versions 1.1 and earlier, this method only worked well if both the arguments were instances of String.
public static boolean equals(CharSequence a, CharSequence b) { if (a == b) return true; int length; if (a != null && b != null && (length = a.length()) == b.length()) { if (a instanceof String && b instanceof String) { return a.equals(b); } else { for (int i = 0; i < length; i++) { if (a.charAt(i) != b.charAt(i)) return false; } return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean equal(final String a, final String b) {\n boolean result;\n if (a == null) {\n result = b == null;\n } else {\n result = a.equals(b);\n }\n return result;\n }", "public static boolean equal(Object a, Object b) {\r\n\t\tif (a == b) ...
[ "0.8230083", "0.7414937", "0.73119944", "0.72413635", "0.7229905", "0.7139157", "0.71093804", "0.7052176", "0.7034455", "0.701337", "0.6988968", "0.69835484", "0.6961361", "0.6948196", "0.682081", "0.6810944", "0.6790121", "0.67475915", "0.6730817", "0.66657287", "0.66529644"...
0.7350857
2
Returns whether the given CharSequence contains any printable characters.
public static boolean isGraphic(CharSequence str) { final int len = str.length(); for (int i = 0; i < len; i++) { int gc = Character.getType(str.charAt(i)); if (gc != Character.CONTROL && gc != Character.FORMAT && gc != Character.SURROGATE && gc != Character.UNASSIGNED && gc != Character.LINE_SEPARATOR && gc != Character.PARAGRAPH_SEPARATOR && gc != Character.SPACE_SEPARATOR) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isAsciiPrintable(char ch) {\n/* 422 */ return (ch >= ' ' && ch < '');\n/* */ }", "boolean hasChar();", "boolean hasHasCharacter();", "public static boolean isNotEmpty(final CharSequence chars) {\r\n\t\treturn !isEmpty(chars);\r\n\t}", "private boolean containsOnlyASCII(Stri...
[ "0.72271466", "0.6412164", "0.6233662", "0.60964566", "0.6088936", "0.60860133", "0.6043375", "0.58166814", "0.58081347", "0.5797511", "0.5791638", "0.57773995", "0.57684445", "0.5742333", "0.57398516", "0.57376176", "0.57268876", "0.57137465", "0.5708671", "0.5688226", "0.56...
0.54858345
29
Returns whether this character is a printable character.
public static boolean isGraphic(char c) { int gc = Character.getType(c); return gc != Character.CONTROL && gc != Character.FORMAT && gc != Character.SURROGATE && gc != Character.UNASSIGNED && gc != Character.LINE_SEPARATOR && gc != Character.PARAGRAPH_SEPARATOR && gc != Character.SPACE_SEPARATOR; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isAsciiPrintable(char ch) {\n/* 422 */ return (ch >= ' ' && ch < '');\n/* */ }", "public boolean hasHasCharacter() {\n return ((bitField0_ & 0x00000008) == 0x00000008);\n }", "public boolean hasHasCharacter() {\n return ((bitField0_ & 0x00000008) == 0x00000008)...
[ "0.7652953", "0.6595585", "0.6587181", "0.6566465", "0.6553348", "0.6510602", "0.6477379", "0.64371073", "0.64174294", "0.63877416", "0.63220745", "0.62938255", "0.62745905", "0.6213782", "0.61543906", "0.6137997", "0.6084774", "0.60487616", "0.5843449", "0.57884705", "0.5731...
0.6122136
16
Returns whether the given CharSequence contains only digits.
public static boolean isDigitsOnly(CharSequence str) { final int len = str.length(); for (int i = 0; i < len; i++) { if (!Character.isDigit(str.charAt(i))) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean isDigits(CharSequence seq) {\n return is(seq, IS_DIGIT);\n }", "public static boolean isDigits(String value) {\n return value.matches(\"[0-9]+\");\n }", "private boolean isDigit(char toCheck) {\n return toCheck >= '0' && toCheck <= '9';\n }", "public boolea...
[ "0.76075804", "0.70184255", "0.68082845", "0.6768981", "0.67386615", "0.6723225", "0.6568294", "0.6545482", "0.65304464", "0.65182436", "0.64981204", "0.6488176", "0.6449375", "0.6445493", "0.64366376", "0.6416921", "0.6390192", "0.63791513", "0.63283473", "0.62683445", "0.62...
0.7884592
0
Does a commadelimited list 'delimitedString' contain a certain item? (without allocating memory)
public static boolean delimitedStringContains(String delimitedString, char delimiter, String item) { if (isEmpty(delimitedString) || isEmpty(item)) { return false; } int pos = -1; int length = delimitedString.length(); while ((pos = delimitedString.indexOf(item, pos + 1)) != -1) { if (pos > 0 && delimitedString.charAt(pos - 1) != delimiter) { continue; } int expectedDelimiterPos = pos + item.length(); if (expectedDelimiterPos == length) { // Match at end of string. return true; } if (delimitedString.charAt(expectedDelimiterPos) == delimiter) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static public boolean isList (String listString, String startToken, String endToken,\n String delimiter)\n{\n String s = listString.trim ();\n Vector list = new Vector ();\n\n if (s.startsWith (startToken) && s.endsWith (endToken)) \n return true;\n else\n return false;...
[ "0.65710133", "0.62002635", "0.61776394", "0.6126099", "0.6039466", "0.57717025", "0.5744769", "0.57155997", "0.56564677", "0.563426", "0.5629975", "0.5629975", "0.5629975", "0.55219", "0.5509407", "0.5509407", "0.5509407", "0.5509407", "0.5509407", "0.5509407", "0.54444593",...
0.63607264
1
Pack 2 int values into a long, useful as a return value for a range
public static long packRangeInLong(int start, int end) { return (((long) start) << 32) | end; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public LongRange(long number1, long number2) {\n/* 110 */ if (number2 < number1) {\n/* 111 */ this.min = number2;\n/* 112 */ this.max = number1;\n/* */ } else {\n/* 114 */ this.min = number1;\n/* 115 */ this.max = number2;\n/* */ } \n/* */ }", "public static void...
[ "0.65051454", "0.6455134", "0.6453655", "0.64294124", "0.6175664", "0.61665326", "0.60749537", "0.6073792", "0.599345", "0.59669995", "0.5930954", "0.5923311", "0.5806199", "0.57816815", "0.5766425", "0.5739991", "0.5739991", "0.5730201", "0.5658317", "0.5633873", "0.56291866...
0.75907856
0
creates the database if it does not exist yet
@Override public void onCreate(SQLiteDatabase db) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void dbCreate() {\n Logger.write(\"INFO\", \"DB\", \"Creating database\");\n try {\n if (!Database.DBDirExists())\n Database.createDBDir();\n dbConnect(false);\n for (int i = 0; i < DBStrings.createDB.length; i++)\n execute(DBStrin...
[ "0.80305874", "0.79584855", "0.790113", "0.778937", "0.7755077", "0.7645161", "0.7599415", "0.7590311", "0.7585238", "0.75585383", "0.75585383", "0.74234253", "0.74108887", "0.74057007", "0.73746455", "0.7300596", "0.7288773", "0.7259145", "0.72456264", "0.7242858", "0.723810...
0.0
-1
upgrades the database if its version has changed
@Override public void onUpgrade( SQLiteDatabase db, int oldVersion, int newVersion ) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doUpgrade() {\n // implement the database upgrade here.\n }", "private static void doUpgrade(SQLiteDatabase db, Integer oldVersion) {\r\n Logger.info(Logger.Type.GHOST_SMS, \"****** last version [%s]: %s\", Names.GHOST_SMS, oldVersion);\r\n if (CURRENT_VERSION.equals(oldVersi...
[ "0.7686865", "0.7452608", "0.73877406", "0.7342601", "0.71664745", "0.714287", "0.7102129", "0.7094961", "0.70507556", "0.70340246", "0.7014905", "0.6974262", "0.69387627", "0.6896256", "0.6891337", "0.6889849", "0.6888979", "0.6879214", "0.6830939", "0.6822489", "0.6802351",...
0.6472133
70
TODO Autogenerated method stub
@Override public void inativar(EntidadeDominio entidade) { PreparedStatement pst=null; Livro livro = (Livro)entidade; try { openConnection(); connection.setAutoCommit(false); StringBuilder sql = new StringBuilder(); sql.append("UPDATE livro SET livStatus=?"); sql.append("WHERE idlivro=?"); pst = connection.prepareStatement(sql.toString()); pst.setString(1, "INATIVADO"); pst.setInt(2, livro.getId()); pst.executeUpdate(); connection.commit(); } catch (SQLException e) { try { connection.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } e.printStackTrace(); }finally{ try { pst.close(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } //SEGUNDA PARTE try { openConnection(); connection.setAutoCommit(false); //FALTA COLOCAR EDITORA StringBuilder sql = new StringBuilder(); System.out.println(livro.getId()); System.out.println(livro.getJustificativa()); System.out.println(livro.getIdCatJustificativa()); sql.append("INSERT INTO justificativainativar (id_livro , justificativa, id_Inativar) VALUES (?,?,?)"); pst = connection.prepareStatement(sql.toString()); pst.setInt(1, livro.getId()); pst.setString(2,livro.getJustificativa()); pst.setInt(3,livro.getIdCatJustificativa()); pst.executeUpdate(); connection.commit(); } catch (SQLException e) { try { connection.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } e.printStackTrace(); }finally{ try { pst.close(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<EntidadeDominio> Visualizar(EntidadeDominio entidade) { Livro livro = (Livro)entidade; PreparedStatement pst = null; PreparedStatement pst2 = null; PreparedStatement pst3 = null; PreparedStatement pst4 = null; PreparedStatement pst5 = null; StringBuilder sql = new StringBuilder(); sql.append("SELECT * FROM livro WHERE idlivro=?"); try { openConnection(); pst = connection.prepareStatement(sql.toString()); pst.setInt(1, livro.getId()); ResultSet rs = pst.executeQuery(); List<EntidadeDominio> livros = new ArrayList<EntidadeDominio>(); if(rs.next()) { livro.setTitulo(rs.getString("livTitulo")); livro.setSinopse(rs.getString("livSinopse")); livro.setCodigoBarras(rs.getString("livCodigoDeBarras")); Dimensoes dimensao = new Dimensoes(); double Altura = rs.getDouble("livAltura"); double Largura = rs.getDouble("livLargura"); double Peso = rs.getDouble("livPeso"); double profundidade = rs.getDouble("livProfundidade"); dimensao.setAltura(Altura); dimensao.setLargura(Largura); dimensao.setPeso(Peso); dimensao.setProfundidade(profundidade); livro.setDimensoes(dimensao); livro.setISBN(rs.getString("livISBN")); livro.setNumeroPaginas(rs.getInt("livNumeroPaginas")); livro.setEdicao(rs.getInt("livEdicao")); livro.setStatus(rs.getString("livStatus")); livro.setAno(rs.getInt("livAno")); } StringBuilder sql2 = new StringBuilder(); sql2.append("SELECT * FROM livcat JOIN categoria ON livcat.id_categoria= categoria.id_Categoria WHERE livcat.id_livro=?"); pst2 = connection.prepareStatement(sql2.toString()); pst2.setInt(1, livro.getId()); ResultSet rs2 = pst2.executeQuery(); List<Categoria> cat = new ArrayList<Categoria>(); Categoria c = new Categoria(); if(rs2.next()) { c.setNome(rs2.getString("categoria")); c.setId(rs2.getInt("id_Categoria")); cat.add(c); } //TERCEIRA PARTE PUXAR AUTOR StringBuilder sql3 = new StringBuilder(); sql3.append("SELECT * FROM livro JOIN autor ON livro.livIdAutor = autor.id_Autor WHERE livro.idlivro=?"); pst3 = connection.prepareStatement(sql3.toString()); pst3.setInt(1, rs.getInt("idlivro")); ResultSet rs3 = pst3.executeQuery(); while(rs3.next()) { Autor autor = new Autor(); autor.setId(rs3.getInt("id_Autor")); autor.setNome(rs3.getString("autor")); livro.setAutor(autor); } //QUARTA PARTE PUXANDO A EDITORA StringBuilder sql4 = new StringBuilder(); sql4.append("SELECT * FROM livro JOIN editora ON livro.livIdEditora = editora.id_editora WHERE livro.idlivro=?"); pst4 = connection.prepareStatement(sql4.toString()); pst4.setInt(1, rs.getInt("idlivro")); ResultSet rs4 = pst4.executeQuery(); if(rs4.next()) { Editora edit = new Editora(); edit.setId(rs4.getInt("id_editora")); edit.setNome(rs4.getString("editora")); livro.setEditora(edit); } //QUINTA PARTE PUXANDO A PRECIFICACAO StringBuilder sql5 = new StringBuilder(); sql5.append("SELECT * FROM livro JOIN precificacao ON livro.livIdPrecificacao = precificacao.id_precificacao WHERE idlivro=?"); pst5 = null; pst5 = connection.prepareStatement(sql5.toString()); pst5.setInt(1, rs.getInt("idlivro")); ResultSet rs5 = pst5.executeQuery(); if(rs5.next()) { Precificacao preci = new Precificacao(); preci.setClassificacao(rs5.getString("precificacao")); preci.setTipo(rs5.getInt("id_precificacao")); livro.setPrecificacao(preci); } //SEXTA PARTE MONTANDO O RETORNO livro.setIdcategoria(cat); livros.add(livro); return livros; //java.sql.Date dtCadastroEmLong = rs.getDate("dt_cadastro"); //Date dtCadastro = new Date(dtCadastroEmLong.getTime()); //p.setDtCadastro(dtCadastro); //produtos.add(p); } catch (SQLException e) { e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<EntidadeDominio> VisualizarInativos(EntidadeDominio entidade) { PreparedStatement pst = null; StringBuilder sql = new StringBuilder(); sql.append("SELECT * FROM livros WHERE Status=?"); try { openConnection(); pst = connection.prepareStatement(sql.toString()); pst.setString(1, "INATIVADO"); ResultSet rs = pst.executeQuery(); List<EntidadeDominio> livros = new ArrayList<EntidadeDominio>(); //SEGUNDA PARTE PUXAR CATEGORIAS while (rs.next()) { StringBuilder sql2 = new StringBuilder(); sql2.append("SELECT * FROM livCat JOIN Categoria ON livCat.id_categoria = Categoria.id_categoria WHERE Idlivro=?"); pst = null; pst = connection.prepareStatement(sql2.toString()); pst.setInt(1, rs.getInt("id_livro")); ResultSet rs2 = pst.executeQuery(); List<Categoria> cat = new ArrayList<Categoria>(); Categoria c = new Categoria(); while(rs2.next()) { c.setNome(rs2.getString("CategoriaNome")); c.setId(rs2.getInt("idCategoria")); cat.add(c); } //TERCEIRA PARTE PUXAR AUTOR StringBuilder sql3 = new StringBuilder(); sql3.append("SELECT * FROM livro JOIN Autor ON livro.IdAutor = Autor.Id WHERE Idlivro=?"); pst = null; pst = connection.prepareStatement(sql3.toString()); pst.setInt(1, rs.getInt("id_livro")); ResultSet rs3 = pst.executeQuery(); //QUARTA PARTE PUXANDO A EDITORA StringBuilder sql4 = new StringBuilder(); sql4.append("SELECT * FROM livro JOIN Editora ON livro.IdEditora = Editora.Id WHERE Idlivro=?"); pst = null; pst = connection.prepareStatement(sql4.toString()); pst.setInt(1, rs.getInt("id_livro")); ResultSet rs4 = pst.executeQuery(); //QUINTA PARTE PUXANDO A PRECIFICACAO StringBuilder sql5 = new StringBuilder(); sql5.append("SELECT * FROM livro JOIN Precificacao ON livro.IdPrecificacao = Precificacao.Id WHERE Idlivro=?"); pst = null; pst = connection.prepareStatement(sql5.toString()); pst.setInt(1, rs.getInt("id_livro")); ResultSet rs5 = pst.executeQuery(); //SEXTA PARTE MONTANDO O RETORNO Livro liv = new Livro(); Editora edit = new Editora(); Autor autor = new Autor(); Precificacao preci = new Precificacao(); edit.setId(rs4.getInt("IdEditora")); edit.setNome(rs3.getString("AutorNome")); liv.setId(rs3.getInt("IdAutor")); liv.setEditora(edit); liv.setAutor(autor); liv.setTitulo(rs.getString("Titulo")); liv.setSinopse(rs.getString("Sinopse")); liv.dimensoes.setAltura(rs.getDouble("Altura")); liv.dimensoes.setLargura(rs.getDouble("Largura")); liv.dimensoes.setPeso(rs.getDouble("Peso")); liv.dimensoes.setProfundidade(rs.getDouble("Profundidade")); liv.setISBN(rs.getString("ISBN")); liv.setIdcategoria(cat); liv.setNumeroPaginas(rs.getInt("NumeroDePaginas")); preci.setClassificacao(rs5.getString("PrecificacaoNome")); preci.setTipo(rs5.getInt("IdPrecificacao")); liv.setPrecificacao(preci); liv.setEdicao(rs.getInt("Edicao")); liv.setStatus(rs.getString("Status")); int VerificarDuplicatas = 0; for(EntidadeDominio teste : livros) // Verificar se o livro que será armazenado no resultado ja está na array { if(teste.getId() == liv.getId()) { VerificarDuplicatas = 1; } } if(VerificarDuplicatas == 0) { livros.add(liv); } //java.sql.Date dtCadastroEmLong = rs.getDate("dt_cadastro"); //Date dtCadastro = new Date(dtCadastroEmLong.getTime()); //p.setDtCadastro(dtCadastro); //produtos.add(p); } return livros; } catch (SQLException e) { e.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void ativar(EntidadeDominio entidade) throws SQLException { PreparedStatement pst=null; Livro livro = (Livro)entidade; try { openConnection(); connection.setAutoCommit(false); StringBuilder sql = new StringBuilder(); sql.append("UPDATE livro SET livStatus=?"); sql.append("WHERE idlivro=?"); pst = connection.prepareStatement(sql.toString()); pst.setString(1, "ATIVADO"); pst.setInt(2, livro.getId()); pst.executeUpdate(); connection.commit(); } catch (SQLException e) { try { connection.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } e.printStackTrace(); }finally{ try { pst.close(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } //SEGUNDA PARTE try { openConnection(); connection.setAutoCommit(false); //FALTA COLOCAR EDITORA StringBuilder sql = new StringBuilder(); System.out.println(livro.getId()); System.out.println(livro.getJustificativa()); System.out.println(livro.getIdCatJustificativa()); sql.append("INSERT INTO justificativaativar (id_livro , justificativa, id_Ativar) VALUES (?,?,?)"); pst = connection.prepareStatement(sql.toString()); pst.setInt(1, livro.getId()); pst.setString(2,livro.getJustificativa()); pst.setInt(3,livro.getIdCatJustificativa()); pst.executeUpdate(); connection.commit(); } catch (SQLException e) { try { connection.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } e.printStackTrace(); }finally{ try { pst.close(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void entradaestoque(EntidadeDominio entidade) throws SQLException { openConnection(); PreparedStatement pst=null; Livro livro = (Livro)entidade; try { connection.setAutoCommit(false); StringBuilder sql = new StringBuilder(); sql.append("INSERT INTO estoque (id_livro, quantidade,id_precificacao, custo) VALUES (?,?,?,?)"); pst = connection.prepareStatement(sql.toString()); pst.setInt(1, livro.getId()); pst.setInt(2, livro.getEstoque().getQuantidade()); pst.setInt(3, livro.getPrecificacao().getTipo()); pst.setDouble(4, livro.getEstoque().getCusto()); pst.executeUpdate(); connection.commit(); } catch (SQLException e) { try { connection.rollback(); } catch (SQLException e1) { e1.printStackTrace(); } e.printStackTrace(); }finally{ try { pst.close(); connection.close(); } catch (SQLException e) { e.printStackTrace(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void AlterarCartao(EntidadeDominio entidade) throws SQLException { }
{ "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 AlterarEndereco(EntidadeDominio entidade) throws SQLException { }
{ "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 AlterarSenha(EntidadeDominio entidade) throws SQLException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<EntidadeDominio> Detalhes(EntidadeDominio entidade) throws SQLException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void AdiconarCarrinho(EntidadeDominio entidade) throws SQLException { }
{ "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 DiminuirCarrinho(EntidadeDominio entidade) throws SQLException { }
{ "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 RemoverCarrinho(EntidadeDominio entidade) throws SQLException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<EntidadeDominio> VisualizarEndereco(EntidadeDominio entidade) { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<EntidadeDominio> Frete(EntidadeDominio entidade) throws SQLException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<EntidadeDominio> FormasDePagamento(EntidadeDominio entidade) throws SQLException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void RemoverCupons(EntidadeDominio entidade) throws SQLException { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<EntidadeDominio> PegarCartoesCliente(EntidadeDominio entidade) throws SQLException { return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
Created by j.suarez on 4/14/2015.
public interface Api { @GET("/jokes/random/{number}") Observable<Jokes> getRandomJokes(@Path("number") int number); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n...
[ "0.6053393", "0.5992162", "0.59062475", "0.58965003", "0.5852548", "0.5852548", "0.57781297", "0.5773839", "0.5773063", "0.57676506", "0.5765825", "0.57483804", "0.5711534", "0.5711114", "0.5706591", "0.56942546", "0.56875646", "0.56604683", "0.5652244", "0.56509745", "0.5641...
0.0
-1
select from blogpostlikes where blogpost_id=? and user_username=? if user already liked the post, 1 object if user has not yet liked the post, null object
BlogPostLikes userLikes(BlogPost blogPost,User user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BlogPost updateLikes(BlogPost blogPost, User user);", "@Override\n public void onClick(final View view) {\n final ParseRelation<ParseUser> likers = post.getRelation(\"likers\");\n final ParseQuery<ParseUser> usrLikers = likers.getQuery();\n ...
[ "0.6910552", "0.65337586", "0.6446313", "0.6280857", "0.6034948", "0.6034751", "0.60228777", "0.5995521", "0.581904", "0.5773479", "0.5769394", "0.574911", "0.5741987", "0.5720884", "0.5715629", "0.56646067", "0.5656136", "0.56417274", "0.55947894", "0.5551644", "0.5545666", ...
0.75451434
0
increment / decrement the number of likes insert into blogpostlikes / delete from blogpostlikes
BlogPost updateLikes(BlogPost blogPost, User user);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void like() {\n this.likes += 1;\n }", "void incrementCommentLikes(long id) throws DaoException;", "private void setLikesCount(int value) {\n \n likesCount_ = value;\n }", "public void setLikedcount(Integer likedcount) {\n this.likedcount = likedcount;\n }", "@Override\r\n...
[ "0.7233242", "0.6677799", "0.649465", "0.64704204", "0.6281685", "0.62245345", "0.62079954", "0.6105897", "0.60805017", "0.59113854", "0.5897923", "0.58972734", "0.5876726", "0.5872284", "0.5851257", "0.5835911", "0.57951456", "0.5760712", "0.5760226", "0.5743156", "0.5739015...
0.6741787
1
Return the types of events allowed in a response, an assert will be done.
protected abstract List<EventType> getAllowedEventTypes();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void testValidEventTypes() throws Exception {\n \n UnitTestData data = new UnitTestData();\n EventFeedJSON eventFeedJSON = new EventFeedJSON(data.getContest());\n\n String elist = EventFeedJSON.CONTEST_KEY + \",\" + EventFeedJSON.TEAM_KEY;\n EventFeedFilter filter = new Ev...
[ "0.61564094", "0.5803144", "0.55844337", "0.5460945", "0.54491884", "0.5350546", "0.5341132", "0.5304324", "0.5290701", "0.5290701", "0.5268114", "0.5263505", "0.52460873", "0.52325183", "0.5231337", "0.5228188", "0.5171237", "0.5150577", "0.51275814", "0.5112921", "0.5103065...
0.720151
0
When the user exits the activity the exit transition should be triggered
@Override public void onBackPressed() { exitReveal(); super.onBackPressed(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onExit();", "void onExit();", "public void exitActivity() {\n\n finish();\n\n }", "@Override\n\tpublic void finish() {\n\t\tsuper.finish();\n\t\toverridePendingTransition(activityCloseEnterAnimation, activityCloseExitAnimation);\n\t}", "public void onExit() {\n Intent homeInten...
[ "0.75284475", "0.74649066", "0.73712754", "0.72946244", "0.72797835", "0.72394264", "0.7196896", "0.7190961", "0.7093371", "0.7000371", "0.6995363", "0.698285", "0.69500464", "0.6947171", "0.6940005", "0.6916549", "0.6898442", "0.6854456", "0.6844368", "0.6828783", "0.6803705...
0.0
-1
Starts the transition to enter the DetailsActivity page
void enterReveal() { // get the center for the clipping circles int fabCall_x = binding.fabCall.getMeasuredWidth() / 2; int fabCall_y = binding.fabCall.getMeasuredHeight() / 2; int fabLike_x = binding.fabLike.getMeasuredWidth() / 2; int fabLike_y = binding.fabLike.getMeasuredHeight() / 2; // get the final radius for the clipping circle int fabCall_finalRadius = Math.max(binding.fabCall.getWidth(), binding.fabCall.getHeight()) / 2; int fabLike_finalRadius = Math.max(binding.fabLike.getWidth(), binding.fabLike.getHeight()) / 2; // create the animator for this view (the start radius is zero) Animator fabCall_anim = ViewAnimationUtils.createCircularReveal(binding.fabCall, fabCall_x, fabCall_y, 0, fabCall_finalRadius); Animator fabLike_anim = ViewAnimationUtils.createCircularReveal(binding.fabLike, fabLike_x, fabLike_y, 0, fabLike_finalRadius); // Add Listener for button animation fabCall_anim.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { } @Override public void onAnimationEnd(Animator animation) { getWindow().getEnterTransition().removeListener(transitionListener); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); fabLike_anim.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { } @Override public void onAnimationEnd(Animator animation) { getWindow().getEnterTransition().removeListener(transitionListener); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); // make the view visible and start the animation binding.fabCall.setVisibility(View.VISIBLE); binding.fabLike.setVisibility(View.VISIBLE); fabCall_anim.start(); fabLike_anim.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void goToEvent() {\n startActivity(new Intent(AddGuests.this, DetailEventRequest.class)); }", "@Override\n public void startDetailActivity(String dateAndTime, String message, int colorResource, View viewRoot) {\n Intent i = new Intent(this, DetailActivity.class);\n i...
[ "0.66828096", "0.6441971", "0.63253456", "0.62475765", "0.61625886", "0.61585885", "0.6153448", "0.6146749", "0.6145274", "0.608381", "0.60512835", "0.6039656", "0.6030923", "0.60209626", "0.60157436", "0.59572774", "0.59542024", "0.59516156", "0.59430236", "0.59291345", "0.5...
0.0
-1
Starts the transition to exis the DetailsActivity
void exitReveal() { // get the center for the clipping circle int fabCall_x = binding.fabCall.getMeasuredWidth() / 2; int fabCall_y = binding.fabCall.getMeasuredHeight() / 2; int fabLike_x = binding.fabLike.getMeasuredWidth() / 2; int fabLike_y = binding.fabLike.getMeasuredHeight() / 2; // get the initial radius for the clipping circle int fabCall_initialRadius = binding.fabCall.getWidth() / 2; int fabLike_initialRadius = binding.fabLike.getWidth() / 2; // create the animation (the final radius is zero) Animator fabCall_anim = ViewAnimationUtils.createCircularReveal(binding.fabCall, fabCall_x, fabCall_y, fabCall_initialRadius, 0); Animator fabLike_anim = ViewAnimationUtils.createCircularReveal(binding.fabLike, fabLike_x, fabLike_y, fabLike_initialRadius, 0); // make the view invisible when the animation is done fabCall_anim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); binding.fabCall.setVisibility(View.INVISIBLE); } }); fabLike_anim.addListener(new AnimatorListenerAdapter() { @Override public void onAnimationEnd(Animator animation) { super.onAnimationEnd(animation); binding.fabLike.setVisibility(View.INVISIBLE); } }); // Add listener to finish activity when animation finished fabCall_anim.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { } @Override public void onAnimationEnd(Animator animation) { finishAfterTransition(); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); fabLike_anim.addListener(new Animator.AnimatorListener() { @Override public void onAnimationStart(Animator animation) { } @Override public void onAnimationEnd(Animator animation) { finishAfterTransition(); } @Override public void onAnimationCancel(Animator animation) { } @Override public void onAnimationRepeat(Animator animation) { } }); // start the animation fabCall_anim.start(); fabLike_anim.start(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Test\n public void openTaskDetails_startsActivity() {\n String taskId = \"id\";\n\n // When opening the task details\n mTasksNavigator.openTaskDetails(taskId);\n\n // The AddEditTaskActivity is opened with the correct request code\n verify(mNavigationProvider).startActivityFo...
[ "0.67727685", "0.6572871", "0.6545338", "0.63875705", "0.6386251", "0.62619334", "0.6228205", "0.62131727", "0.61854964", "0.6073082", "0.6053989", "0.6052852", "0.6051149", "0.60411835", "0.5994292", "0.59808207", "0.59576863", "0.59552824", "0.5916088", "0.5873671", "0.5847...
0.0
-1
Loads the map Uses the special class WorkaroundMapFragment to intercept any touchEvent from ScrollView so that when touching the map the screen stays the same.
protected void loadMap(GoogleMap googleMap) { this.map = googleMap; if (this.map == null) { Toast.makeText(this, "Error loading map", Toast.LENGTH_SHORT).show(); return; } // Set map settings, and create listener to intercept clicks so that map is able to move this.map.getUiSettings().setZoomControlsEnabled(false); ((WorkaroundMapFragment) getSupportFragmentManager().findFragmentById(R.id.map)) .setListener(new WorkaroundMapFragment.OnTouchListener() { @Override public void onTouch() { binding.scrollView.requestDisallowInterceptTouchEvent(true); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onMapReady(final GoogleMap googleMap) {\n this.googleMap = googleMap;\n googleMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n googleMap.getUiSettings().setZoomControlsEnabled(true);\n final ScrollView mScrollView = (ScrollView) findViewById(R.id.scrollMap); //parent scrollview ...
[ "0.72283334", "0.6816318", "0.6740635", "0.6695964", "0.6695964", "0.66837466", "0.6598239", "0.65209275", "0.648679", "0.64421064", "0.6378333", "0.6372866", "0.63641286", "0.63481516", "0.63193715", "0.631687", "0.63137734", "0.63065827", "0.6300453", "0.6252614", "0.625127...
0.78510493
0
Gets the information of the place passed from Parse server backed
private void getPlace(String _id) { this.binding.main.setVisibility(View.GONE); this.binding.loading.setVisibility(View.VISIBLE); ParseQuery<Place> query = ParseQuery.getQuery(Place.class); query.whereEqualTo(Place.KEY_OBJECT_ID, _id); query.include(Place.KEY_CATEGORY); query.include(Place.KEY_USER); query.getFirstInBackground(new GetCallback<Place>() { @Override public void done(Place object, ParseException e) { if(e == null) { place = object; bindInformation(); enterReveal(); } else { Toast.makeText(PlaceDetailActivity.this, "Place not found", Toast.LENGTH_LONG).show(); finish(); } } }); // Set up elements visibility binding.fabCall.setVisibility(View.INVISIBLE); binding.fabLike.setVisibility(View.INVISIBLE); binding.main.setVisibility(View.VISIBLE); binding.loading.setVisibility(View.GONE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String Get_place() \n {\n\n return place;\n }", "Place getPlace();", "public String getLocationInfo(String _placeInfo) {\r\n String urlString = apiUrl;\r\n obj = getConnection(urlString);\r\n try {\r\n return obj.getString(fixParams(_placeInfo));\r\n } cat...
[ "0.7019934", "0.676309", "0.65637285", "0.6459465", "0.63896286", "0.63896286", "0.63896286", "0.63896286", "0.624346", "0.60419595", "0.6034591", "0.6000975", "0.599372", "0.598114", "0.5978718", "0.5953069", "0.5882976", "0.58719563", "0.5846062", "0.58310694", "0.58092904"...
0.5899692
16
Binds the information of the place with the corresponding part of the layout
private void bindInformation() { // Fill information this.binding.tvName.setText(this.place.getName()); this.binding.tvDescription.setText(this.place.getDescription()); this.binding.chipLikes.setText(String.format("%d likes", this.place.getLikeCount())); this.binding.tvAddress.setText(this.place.getAddress()); this.binding.tvCategory.setText(this.place.getCategory().getString("name")); this.binding.rbPrice.setRating(this.place.getPrice()); // Add marker to map LatLng placePosition = new LatLng(this.place.getLocation().getLatitude(), this.place.getLocation().getLongitude()); this.map.addMarker(new MarkerOptions() .position(placePosition) .title(this.place.getName())); // Move camera to marker CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(placePosition, 17); this.map.animateCamera(cameraUpdate); // Load image Glide.with(PlaceDetailActivity.this) .load(this.place.getImage().getUrl()) .placeholder(R.drawable.placeholder) .error(R.drawable.error) .centerCrop() .into(this.binding.ivImage); // If author is same as logged user then display edit actions if(this.place.getUser().getObjectId().equals(ParseUser.getCurrentUser().getObjectId())) { this.binding.rlAuthor.setVisibility(View.GONE); this.binding.rlEdit.setVisibility(View.VISIBLE); } else { this.binding.rlAuthor.setVisibility(View.VISIBLE); this.binding.rlEdit.setVisibility(View.GONE); this.binding.rlAuthor.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { Intent intent = new Intent(PlaceDetailActivity.this, ProfileActivity.class); intent.putExtra("user", place.getUser().getObjectId()); startActivity(intent); } }); } // Set author's information String authorProfileImage, authorName, authorUsername; try { authorProfileImage = this.place.getUser().getParseFile(User.KEY_PROFILE_PICTURE).getUrl(); } catch (NullPointerException e) { authorProfileImage = ""; Log.e(TAG, "Author doesn't have image"); } try { authorName = this.place.getUser().get(User.KEY_NAME).toString(); } catch (NullPointerException e) { authorName = "[NO NAME]"; Log.e(TAG, "Author doesn't have image"); } try { authorUsername = String.format("@%s", this.place.getUser().get("username").toString()); } catch (NullPointerException e) { authorUsername = "[NO NAME USERNAME]"; Log.e(TAG, "Author doesn't have image"); } this.binding.tvAuthorName.setText(authorName); this.binding.tvAuthorUsername.setText(authorUsername); Glide.with(PlaceDetailActivity.this) .load(authorProfileImage) .placeholder(R.drawable.avatar) .error(R.drawable.avatar) .circleCrop() .into(this.binding.ivAuthorImage); // Set edit actions if(this.place.getPublic()) { this.binding.btnPublic.setText(R.string.make_private); } else { this.binding.btnPublic.setText(R.string.make_public); } this.binding.btnPublic.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { changePlacePrivacy(); } }); // Set delete listener this.binding.btnDelete.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { deletePlace(); } }); // Set call fab action listener this.binding.fabCall.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.green))); this.binding.fabCall.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { String uri = "tel:" + place.getPhone(); if(uri.length() < 5) { Toast.makeText(PlaceDetailActivity.this, "This place doesn't have a phone", Toast.LENGTH_SHORT).show(); return; } Intent intent = new Intent(Intent.ACTION_DIAL); intent.setData(Uri.parse(uri)); startActivity(intent); } }); // Set fab like colors ParseQuery<ParseObject> query = ParseQuery.getQuery("Like"); query.whereEqualTo("user", ParseUser.getCurrentUser()); query.whereEqualTo("place", this.place); query.findInBackground(new FindCallback<ParseObject>() { @Override public void done(List<ParseObject> objects, ParseException e) { if (e == null) { place.liked = objects.size() == 1; // Set follow button text if (place.liked) { binding.fabLike.setImageTintList(ColorStateList.valueOf(getColor(R.color.primary))); binding.fabLike.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.primary))); } else { binding.fabLike.setImageTintList(ColorStateList.valueOf(getColor(R.color.black))); binding.fabLike.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.black))); } } else { Log.e(TAG, "Problem knowing if place is liked", e); } } }); // Set like actions listener this.binding.fabLike.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { if(place.liked) { binding.fabLike.setImageTintList(ColorStateList.valueOf(getColor(R.color.black))); binding.fabLike.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.black))); unlike(); } else { binding.fabLike.setImageTintList(ColorStateList.valueOf(getColor(R.color.primary))); binding.fabLike.setBackgroundTintList(ColorStateList.valueOf(getColor(R.color.primary))); like(); } place.liked = !place.liked; } }); // Promote a place this.binding.btnPromote.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { binding.rlPromote.setVisibility(View.VISIBLE); } }); // Promotion cancelled this.binding.btnPromoteCancel.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { binding.rlPromote.setVisibility(View.GONE); } }); // Promote now this.binding.btnPromoteNow.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { binding.rlPromote.setVisibility(View.GONE); binding.btnPromote.setVisibility(View.GONE); binding.loadingPromote.setVisibility(View.VISIBLE); // Create a new instance of AsyncHttpClient AsyncHttpClient client = new AsyncHttpClient(); RequestHeaders headers = new RequestHeaders(); headers.put("x-api-key", apiKey); RequestParams params = new RequestParams(); params.put("place", place.getObjectId()); params.put("user", ParseUser.getCurrentUser().getObjectId()); client.get(SERVER_URL + "promote", headers, params, new JsonHttpResponseHandler() { @Override public void onSuccess(int i, Headers headers, JSON json) { onToastMessage("Place promoted successfully!", false); } @Override public void onFailure(int i, Headers headers, String s, Throwable throwable) { onToastMessage("Error while promoting place", true); } }); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBindViewHolder(MyViewHolder holder, int position) {\n // - get element from your dataset at this position\n // - replace the contents of the view with that element\n\n MyPlace place = mDataset.get(position);\n\n holder.bind(activity,place,itemClicked,positio...
[ "0.61617094", "0.6120384", "0.6061554", "0.5957414", "0.59299314", "0.58376616", "0.5825546", "0.5820981", "0.5774574", "0.57653016", "0.57525414", "0.57434744", "0.5714683", "0.57100743", "0.5679916", "0.5679614", "0.5664161", "0.565707", "0.56386304", "0.56096494", "0.56001...
0.6424184
0
Changes the privacy of the place (public private)
private void changePlacePrivacy() { this.place.setPublic(!this.place.getPublic()); this.place.saveInBackground(); if(this.place.getPublic()) { this.binding.btnPublic.setText(R.string.make_private); } else { this.binding.btnPublic.setText(R.string.make_public); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setPrivate(Boolean isPrivate)\n {\n this.isPrivate = isPrivate;\n }", "public void setPrivacy(String privacy) throws ParseException;", "public void setPrivate()\n {\n ensureLoaded();\n m_flags.setPrivate();\n setModified(true);\n }", "@Override\n ...
[ "0.62213945", "0.60909516", "0.60501325", "0.5819222", "0.58057004", "0.5779058", "0.57623583", "0.57208836", "0.5700623", "0.5683551", "0.56786364", "0.5677487", "0.5596068", "0.55924714", "0.5570284", "0.5502265", "0.5458168", "0.5453166", "0.5436861", "0.5432351", "0.54008...
0.8120803
0
TODO Autogenerated method stub
@Override public void onClick(View v) { String urlServer = AppConfig.CLIENT_URL +"../"+ "test.php"; //String urlServer = AppConfig.BASE_URL + "editteacherprofilemobs"; // List<RequestParams> params1 = new ArrayList<RequestParams>(11); RequestParams params1 = new RequestParams(); if (path == null) { String image_Name[] = uPhotopath.split("_"); int len = image_Name.length; String image_Name1 = new String(); for (int z = 1; z < len - 1; z++) image_Name1 += image_Name[z] + "_"; image_Name1 += image_Name[len - 1]; params1.put("image", image_Name1); /* * Toast.makeText(getBaseContext(), image_Name1 , * Toast.LENGTH_LONG).show(); */ } else { params1.put("image", path); /* * Toast.makeText(getBaseContext(), "set"+path, * Toast.LENGTH_LONG).show(); */ } //params1.put("Username", Username); //params1.put("textFieldFirstName", tFname.getText().toString().trim()); //params1.put("textFieldLastName", tLname.getText().toString().trim()); params1.put("address", tAddress.getText().toString() .trim()); params1.put("password", tPassword.getText().toString().trim()); params1.put("mobile", tMobile.getText().toString().trim()); params1.put("email", tEmail.getText().toString().trim()); params1.put("education", tQualification.getText() .toString().trim()); params1.put("hobbies", tHobbies.getText().toString().trim()); params1.put("id", User_id); params1.put("droot", "editteacherprofilemobs"); params1.put("schoolfolder", SchoolFolder); params1.put("imagepath", realpath); if (filename.getText().toString().trim() .equals("No file chosen") || filename.getText().toString().trim().equals("")) { }else { try { params1.put("uploadedfile", new File(realpath)); } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } } // here write your parameter name and its value /*try { if (realpath == null) { //params1.put("imagepath", new File(realpath)); } else { params1.put("imagepath", new File(realpath)); //params1.put("imagepath", new File(uPhotopath)); } } catch (FileNotFoundException e) { // TODO Auto-generated catch block e.printStackTrace(); } */ AsyncHttpClient client = new AsyncHttpClient(); client.post(urlServer, params1, new AsyncHttpResponseHandler() { @Override public void onSuccess(String arg0) { super.onSuccess(arg0); Log.e("from response", arg0); if (pDialog.isShowing()) pDialog.dismiss(); Toast.makeText(getBaseContext(), "Update Successfully", Toast.LENGTH_LONG).show(); } @Override public void onStart() { // TODO Auto-generated method stub super.onStart(); pDialog = new ProgressDialog(ProfileDetails.this); pDialog.setMessage("Please wait..."); pDialog.setCancelable(false); pDialog.show(); } }); // subjectListDailog.setVisibility(View.GONE); }
{ "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 onStart() { super.onStart(); pDialog = new ProgressDialog(ProfileDetails.this); pDialog.setMessage("Please wait..."); pDialog.setCancelable(false); pDialog.show(); }
{ "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 Tag used to cancel the request
private void getTeacherDetails() { String tag_string_req = "req_login"; pDialog.setMessage("Please wait ..."); showDialog(); StringRequest strReq = new StringRequest(Request.Method.GET, AppConfig.BASE_URL + "viewprofilemembers/" + User_id, new Response.Listener<String>() { @Override public void onResponse(String response) { Log.d(TAG, "Login Response: " + response.toString()); hideDialog(); try { JSONObject json = new JSONObject(response); JSONObject resp = json.getJSONObject("response"); JSONArray studentdetails = resp .getJSONArray("users"); for (int i = 0; i < studentdetails.length(); i++) { JSONObject c = studentdetails.getJSONObject(i); tFirstame = c.getString("firstname"); tLastname = c.getString("lastname"); taddress = c.getString("address"); // tphone = c1.getString("phone1"); tmobile = c.getString("mobile"); temail = c.getString("email"); tusername = c.getString("username"); tpassword = c.getString("password"); tqualification = c.getString("education"); thobbies = c.getString("hobbies"); uPhotopath = c.getString("photo"); //tname.setText(tFirstame + " " + tLastname); tFname.setText(tFirstame); //tLname.setHint(tLastname); tAddress.setText(taddress); // tPhone.setHint(tphone); tMobile.setText(tmobile); tEmail.setText(temail); tUsername.setText(tusername); tPassword.setText(tpassword); tQualification.setText(tqualification); tHobbies.setText(thobbies); if (uPhotopath != null) { new DownloadImageTask(iv) .execute(AppConfig.CLIENT_URL + "../uploads/" + uPhotopath); } else { Toast.makeText(getApplicationContext(), "Sorry there is no Image", Toast.LENGTH_SHORT).show(); } // iv.setImageURI(uPhotopath); } /* * else if (i == 1) { JSONArray studentnoArray = c * .getJSONArray("teaching_sub"); * * for (int k = 0; k < studentnoArray.length(); k++) * { JSONObject c2 = studentnoArray * .getJSONObject(k); String assign_class = c2 * .getString("ClassName"); String subject = c2 * .getString("SubjectName"); tteaching_sub = * assign_class + "-" + subject; * teachingSub.add(tteaching_sub); } } */ } catch (JSONException e) { e.printStackTrace(); } } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.e(TAG, "Data Error: " + error.getMessage()); Toast.makeText(getApplicationContext(), error.getMessage(), Toast.LENGTH_LONG).show(); hideDialog(); } }); // Adding request to request queue AppController.getInstance().addToRequestQueue(strReq, tag_string_req); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\tpublic void cancel() {\n\t\t\t\n\t\t}", "@Override\n\t\t\t\t\t\t\t\t\tpublic void cancel() {\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}", "@Override\n public void cancel() {\n\n }", "@Override\n ...
[ "0.79327357", "0.79228735", "0.78359246", "0.78359246", "0.78359246", "0.78285104", "0.7818214", "0.7802591", "0.7796857", "0.7792864", "0.7778909", "0.7769053", "0.775633", "0.775633", "0.775633", "0.7752685", "0.7722824", "0.7713301", "0.75773007", "0.75740564", "0.7523861"...
0.0
-1
TODO Autogenerated method stub /Intent intent = new Intent(); intent.setType("image /"); intent.setAction(Intent.ACTION_GET_CONTENT); startActivityForResult( Intent.createChooser(intent, "Select Picture"), 1);
@Override public void onClick(View v) { Intent galleryIntent = new Intent(Intent.ACTION_PICK, android.provider.MediaStore.Images.Media.EXTERNAL_CONTENT_URI); // Start the Intent startActivityForResult( Intent.createChooser(galleryIntent, "Select Picture"), REQUEST_CODE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void imagePic(){\n Intent intent = new Intent();\n intent.setType(\"image/*\");\n intent.setAction(Intent.ACTION_GET_CONTENT);\n startActivityForResult(Intent.createChooser(intent, \"Select Picture\"),1);\n\n }", "@Override\n public void onClick(View v) {\n\n ...
[ "0.91591865", "0.89463675", "0.8894937", "0.87899405", "0.8780709", "0.8728964", "0.8614303", "0.8536726", "0.8515184", "0.84979266", "0.8487938", "0.8470512", "0.8459877", "0.84515595", "0.84515595", "0.84068483", "0.8374116", "0.8372667", "0.83320653", "0.8276997", "0.82527...
0.78518283
61
TODO Autogenerated method stub
@Override protected void onPreExecute() { super.onPreExecute(); pDialog.show(); }
{ "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(StringVezba[] args) { System.out.println("0 Celzijusa je farenhajte: " + StatickiKonvertorTemperature.konvertujCUF(0)); System.out.println("41 Farenhajt je celzijusa: " + StatickiKonvertorTemperature.konvertujFUC(41)); }
{ "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
Constructor for the class
public InteractionTarget(Element _element, int _type) { element = _element; type = _type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Constructor() {\r\n\t\t \r\n\t }", "public Constructor(){\n\t\t\n\t}", "public CyanSus() {\n\n }", "public PSRelation()\n {\n }", "public _355() {\n\n }", "public Pitonyak_09_02() {\r\n }", "private Instantiation(){}", "public Chick() {\n\t}", "public CSSTidier() {\n\t}", "public Chauf...
[ "0.8684979", "0.83157516", "0.7531155", "0.7512286", "0.7384737", "0.7306363", "0.72895694", "0.7229921", "0.71888965", "0.7186963", "0.7162534", "0.7162355", "0.71531713", "0.71493727", "0.7139213", "0.7135244", "0.71339834", "0.713029", "0.7116769", "0.70741767", "0.7068038...
0.0
-1
Returns the Element that contains the target
final public Element getElement() { return element; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic T find(T targetElement) {\n\t\tif(contains(targetElement))\n\t\t return targetElement;\n\t\telse \n\t\t\treturn null;\n\t\t\n\t}", "public ReferenceType getTargetElement();", "@Override\n\tpublic boolean contains(T targetElement) {\n\t\t\n\t\treturn findAgain(targetElement, roo...
[ "0.72097266", "0.6912928", "0.6819226", "0.6814461", "0.6361756", "0.63208866", "0.61980206", "0.61980206", "0.60910827", "0.60156614", "0.58992535", "0.58555925", "0.58545053", "0.584169", "0.5796001", "0.5766331", "0.57643944", "0.57643944", "0.573228", "0.5709673", "0.5698...
0.0
-1
Returns the type of target
final public int getType() { return type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public String getTargetType() {\n return targetType;\n }", "public int getTargetType() ...
[ "0.82274103", "0.82274103", "0.82274103", "0.82274103", "0.81726205", "0.8156806", "0.7895347", "0.7881927", "0.77629566", "0.76965076", "0.7590644", "0.75770795", "0.74970675", "0.7251687", "0.72382885", "0.71526915", "0.71396285", "0.700788", "0.70033383", "0.6787439", "0.6...
0.0
-1
Enables/Disables the target completely
final public void setEnabled(boolean value) { enabledType = value ? ENABLED_ANY : ENABLED_NONE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void disable();", "void disable();", "protected abstract void disable();", "public void disable();", "public void enable();", "void disable() {\n }", "public void toggleEnable();", "public abstract void onDisable();", "void disableMod();", "public void enable(){\r\n\t\tthis.activ = true;\r\n\t...
[ "0.7011237", "0.7011237", "0.69822675", "0.69582355", "0.6878389", "0.6850571", "0.6801138", "0.6781713", "0.6748658", "0.67464197", "0.6700836", "0.6665293", "0.66420573", "0.6547167", "0.65322715", "0.65309745", "0.6529361", "0.6526209", "0.65187824", "0.6494778", "0.649477...
0.0
-1
Returns the enabled status of the target
final public boolean isEnabled() { return enabledType!=ENABLED_NONE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getEnabled() {\r\n \t\tif (status == AlternativeStatus.ADOPTED) {\r\n \t\t\treturn true;\r\n \t\t} else {\r\n \t\t\treturn false;\r\n \t\t}\r\n \t}", "boolean getEnabled();", "boolean getEnabled();", "boolean getEnabled();", "java.lang.String getEnabled();", "boolean hasEnabled();", "pub...
[ "0.7669354", "0.7319618", "0.7319618", "0.7319618", "0.7304348", "0.713966", "0.7114058", "0.7026082", "0.7026001", "0.699083", "0.699083", "0.698412", "0.6978586", "0.6974982", "0.6968458", "0.69622916", "0.69482034", "0.6910354", "0.6876961", "0.6827192", "0.67892617", "0...
0.6690354
40
Sets partially the interaction capability of the target One of: ENABLED_NONE: the target is not responsive ENABLED_ANY: any motion is allowed ENABLED_X: the target only responds to motion in the X direction ENABLED_Y: the target only responds to motion in the Y direction
final public void setEnabled(int value) { enabledType = value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void interact(Object obj) {\n // TODO: Cave Code - Add additional Agility to the player while on this Tile\n }", "public void basicMotion() {\r\n\t\tPVector v = behavior.behavior(obj.getMotion());\r\n\t\tobj.getMotion().setVelocity(v);\r\n\t\t\r\n\t\tobj.getMotion().kinematicUpdat...
[ "0.5538901", "0.5412244", "0.531237", "0.5200865", "0.5153052", "0.51147425", "0.5111558", "0.5063296", "0.5057309", "0.5054322", "0.5033363", "0.5028274", "0.49935618", "0.4980171", "0.4956232", "0.49403313", "0.49377018", "0.4926287", "0.49158797", "0.49062738", "0.49016637...
0.0
-1
Returns the (perhaps partial) interaction capability of the target
final public int getEnabled() { return enabledType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "AbilityTarget getAbilityTarget();", "public Capability getCapability() {\n\t\treturn _capability;\n\t}", "public Logic getBehaviorTarget ()\n {\n return _behavior.getCurrentTarget();\n }", "@Override\n public Interaction getStandardInteraction()\n {\n return interaction;\n }", ...
[ "0.622345", "0.61955976", "0.5864808", "0.5649695", "0.5632854", "0.55650365", "0.5542399", "0.55022997", "0.5452215", "0.54390883", "0.5433106", "0.5406293", "0.5406293", "0.54027426", "0.5391822", "0.5383449", "0.53825104", "0.53644687", "0.5345002", "0.5325415", "0.5321086...
0.0
-1
Returns the action command of this target
final public String getActionCommand() { return command; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getActionCommand() {\n return actionCommand_;\n }", "public int getActionCommand() {\n return actionCommand_;\n }", "public String getAction() {\n\t\treturn action.get();\n\t}", "public String getAction () {\n return action;\n }", "public String getAction() ...
[ "0.84135264", "0.8388543", "0.7917611", "0.76619136", "0.76351905", "0.761125", "0.761125", "0.761125", "0.761125", "0.7571392", "0.7571392", "0.7571392", "0.75230056", "0.75043297", "0.73140013", "0.73131347", "0.7290298", "0.72509176", "0.72399163", "0.7237848", "0.71640164...
0.8370902
2