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
TODO Autogenerated method stub
public void serviceAdded(ServiceEvent event) { Log.e("z", "added serivce: " + event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void serviceRemoved(ServiceEvent event) { Log.e("z", "removed serivce: " + event); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
public void serviceResolved(ServiceEvent event) { Log.e("z", "resolved serivce: " + event); }
{ "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 Heart Of Dead on 07/12/2017.
public interface IList { void deleteClick(int i); void countUp(int i); void countDown(int i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public final void mo51373a() {\n }", "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n public void func_104112_b() {\n \n }", "public void mo38117a() {\n }", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpu...
[ "0.6293679", "0.6132349", "0.6058328", "0.6005648", "0.59603024", "0.5945946", "0.59048146", "0.589124", "0.5884206", "0.58805895", "0.58660394", "0.58660394", "0.58007824", "0.5793816", "0.57794285", "0.5750292", "0.57443756", "0.5715855", "0.5712125", "0.5701728", "0.568903...
0.0
-1
Creates new form TablasJoyas
public TablasJoyasB() { initComponents(); this.getContentPane().setBackground(Color.cyan); setIconImage(new ImageIcon(getClass().getResource("/img/42349585.jpg")).getImage()); setLocationRelativeTo(null); limpiarjoyas(); bloquearjoyas(); mostrarJoyas(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createTable(){\n Object[][] data = new Object[0][8];\n int i = 0;\n for (Grupo grupo : etapa.getGrupos()) {\n Object[][] dataAux = new Object[data.length+1][8];\n System.arraycopy(data, 0, dataAux, 0, data.length);\n dataAux[i++] = new Object[]{gru...
[ "0.68220717", "0.67528546", "0.6729793", "0.6630768", "0.6550583", "0.6453645", "0.6416566", "0.63713396", "0.63357764", "0.632487", "0.63133365", "0.6304262", "0.6222187", "0.62170607", "0.62065995", "0.6204813", "0.6160549", "0.6141769", "0.61382973", "0.61329204", "0.61271...
0.0
-1
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { btnRegistrarB = new javax.swing.JButton(); btnAtras = new javax.swing.JButton(); jScrollPane2 = new javax.swing.JScrollPane(); tablaJoyas = new javax.swing.JTable(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); txtDescripcion = new javax.swing.JTextField(); txtCantidad = new javax.swing.JTextField(); txtCodigo = new javax.swing.JTextField(); txtPrecio = new javax.swing.JTextField(); lblTotal = new javax.swing.JLabel(); btnNuevo = new javax.swing.JButton(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); txtBuscarJB = new javax.swing.JTextField(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); setUndecorated(true); btnRegistrarB.setText("GUARDAR"); btnRegistrarB.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRegistrarBActionPerformed(evt); } }); btnAtras.setText("ATRAS"); btnAtras.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAtrasActionPerformed(evt); } }); tablaJoyas.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { }, new String [] { "idjoyas", "cantidad", "descripcion", "codigo", "precio", "total" } ) { boolean[] canEdit = new boolean [] { false, true, false, false, false, false }; public boolean isCellEditable(int rowIndex, int columnIndex) { return canEdit [columnIndex]; } }); tablaJoyas.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tablaJoyasMouseClicked(evt); } }); jScrollPane2.setViewportView(tablaJoyas); if (tablaJoyas.getColumnModel().getColumnCount() > 0) { tablaJoyas.getColumnModel().getColumn(0).setResizable(false); tablaJoyas.getColumnModel().getColumn(1).setResizable(false); tablaJoyas.getColumnModel().getColumn(2).setResizable(false); tablaJoyas.getColumnModel().getColumn(3).setResizable(false); tablaJoyas.getColumnModel().getColumn(4).setResizable(false); tablaJoyas.getColumnModel().getColumn(5).setResizable(false); } jLabel1.setText("Cantidad:"); jLabel2.setText("Descripción:"); jLabel3.setText("Código"); jLabel4.setText("Precio:"); jLabel5.setText("Total:"); txtDescripcion.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtDescripcionActionPerformed(evt); } }); txtCantidad.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtCantidadActionPerformed(evt); } }); txtCodigo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtCodigoActionPerformed(evt); } }); txtPrecio.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { txtPrecioActionPerformed(evt); } }); btnNuevo.setText("NUEVO"); btnNuevo.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnNuevoActionPerformed(evt); } }); jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource("/img/joyasdos.jpg"))); // NOI18N jLabel7.setFont(new java.awt.Font("Trebuchet MS", 1, 18)); // NOI18N jLabel7.setText("TABLA DE JOYAS"); jLabel8.setFont(new java.awt.Font("Tahoma", 1, 12)); // NOI18N jLabel8.setText("BUSCAR:"); txtBuscarJB.addKeyListener(new java.awt.event.KeyAdapter() { public void keyTyped(java.awt.event.KeyEvent evt) { txtBuscarJBKeyTyped(evt); } }); jButton1.setText("MODIFICAR"); jButton2.setText("ELIMINAR"); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); getContentPane().setLayout(layout); layout.setHorizontalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createSequentialGroup() .addComponent(jLabel8) .addGap(18, 18, 18) .addComponent(txtBuscarJB, javax.swing.GroupLayout.PREFERRED_SIZE, 290, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addComponent(btnAtras) .addGap(27, 27, 27) .addComponent(btnNuevo) .addGap(18, 18, 18) .addComponent(btnRegistrarB) .addGap(18, 18, 18) .addComponent(jButton1) .addGap(19, 19, 19) .addComponent(jButton2)) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(lblTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 167, javax.swing.GroupLayout.PREFERRED_SIZE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(jLabel1) .addComponent(jLabel3) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel5) .addComponent(jLabel4))) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addComponent(txtDescripcion, javax.swing.GroupLayout.DEFAULT_SIZE, 167, Short.MAX_VALUE) .addComponent(txtCodigo) .addComponent(txtCantidad) .addComponent(txtPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, 80, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(18, 18, 18) .addComponent(jLabel7) .addGap(31, 31, 31) .addComponent(jLabel6)))) .addGap(0, 99, Short.MAX_VALUE)) .addComponent(jScrollPane2)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(txtCantidad, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtDescripcion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel2)) .addGap(25, 25, 25)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jLabel7) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED))) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtCodigo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel3)) .addGap(22, 22, 22) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel4) .addComponent(txtPrecio, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(lblTotal, javax.swing.GroupLayout.PREFERRED_SIZE, 27, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel5))) .addComponent(jLabel6, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE)) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(txtBuscarJB, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel8)) .addGap(18, 18, 18) .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 131, Short.MAX_VALUE) .addGap(18, 18, 18) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnAtras) .addComponent(btnRegistrarB) .addComponent(btnNuevo)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jButton1) .addComponent(jButton2))) .addGap(25, 25, 25)) ); pack(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Form() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public MainForm() {\n initComponents();\n }", "public frmRectangulo() {\n initComponents();\n }", "public form() {\n ...
[ "0.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
/ it is checking that an element is present on the DOM of a page or not. That does not necessarily mean that the element is visible. ExpectedConditions will return true once the element is found in the DOM.
@Override public boolean isPresent(long seconds){ if (seconds < 0) { return false; } try { WebElement element = (WebElement) (new WebDriverWait(driver, seconds)) .until((Function<? super WebDriver, ? extends Object>) ExpectedConditions.presenceOfElementLocated(locator)); this.element = element; return true; } catch (NoSuchElementException ex){ this.noSuchElementException = new NoSuchElementException(locator.toString());; return false; } catch (TimeoutException ex){ this.noSuchElementException = new NoSuchElementException(locator.toString()); return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isElementPresent(WebElement element) {\n wait.until(ExpectedConditions.elementToBeClickable(element));\n// wait.until(ExpectedConditions.visibilityOf(element));\n return element.isDisplayed();\n }", "@Override\n public boolean isVisible(){\n \n try\t{\n ...
[ "0.7734785", "0.7505919", "0.74974364", "0.7443211", "0.7417867", "0.7368226", "0.734612", "0.72901195", "0.7220917", "0.7186154", "0.7173353", "0.7162234", "0.7145246", "0.7140832", "0.711159", "0.71114516", "0.7098705", "0.7096373", "0.7091898", "0.70515305", "0.69718236", ...
0.6967812
21
if (element == null) throw this.noSuchElementException;
@Override public boolean isVisible(){ try { new WebDriverWait(driver, 1) .until((Function<? super WebDriver, ? extends Object>) ExpectedConditions.visibilityOfElementLocated(locator)); return true; } catch (NoSuchElementException ex){ return false; } catch (TimeoutException ex){ return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public E element () throws NoSuchElementException;", "public NoSuchElementException() {\n super();\n }", "E getElement() throws IllegalStateException;", "@Test\n\tpublic void noSuchElementExceptionTest( ) {\n\t\tdriver.get(\"https://practicetestautomation.com/practice-test-exceptions/\");\n\t\t\n\t...
[ "0.78936434", "0.72119546", "0.6934801", "0.6792455", "0.6762609", "0.6718127", "0.66638756", "0.64329946", "0.6397741", "0.63707536", "0.63242185", "0.62703675", "0.62677664", "0.6212678", "0.61581963", "0.61508334", "0.61473334", "0.613166", "0.6109694", "0.6102407", "0.608...
0.0
-1
Initializes a Simulator with 4 LoadingDocks and 30 DVDPackages.
@Before public void setUp() throws Exception { simulator = new Simulator(4, 30); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void init(int numPacks)\n {\n int k, pack;\n\n if (numPacks < 1 || numPacks > 6)\n numPacks = 1;\n\n // hand over the masterPack cards to our deck\n for (pack = 0; pack < numPacks; pack++)\n for (k = 0; k < 52; k++)\n cards[pack*52 + k] = masterPack[k];\n\n ...
[ "0.59121346", "0.5896972", "0.5753592", "0.5724467", "0.572276", "0.5702198", "0.5698256", "0.56286323", "0.561639", "0.55980766", "0.5574363", "0.5573634", "0.5572096", "0.5568054", "0.5553471", "0.5544601", "0.55416304", "0.5528975", "0.5505055", "0.5498518", "0.5495765", ...
0.5437633
27
Tests step and other methods by stepping through the simulation and periodically checking the state of the data.
@Test public void testStep() { simulator.step(); assertEquals(0, (int)simulator.averageWaitTime()); assertEquals(0, (int)simulator.averageProcessTime()); assertEquals(false, simulator.packageLeftSimulation()); assertEquals(0, simulator.getCurrentIndex()); assertEquals(true, simulator.moreSteps()); for (int i = 0; i < 28; i++) { simulator.step(); } assertEquals(287, (int)(simulator.averageWaitTime() * 100)); assertEquals(1525, (int)(100 * simulator.averageProcessTime())); assertEquals(false, simulator.packageLeftSimulation()); assertEquals(0, simulator.getCurrentIndex()); assertEquals(true, simulator.moreSteps()); for (int i = 0; i < 15; i++) { simulator.step(); } assertEquals(614, (int)(simulator.averageWaitTime() * 100)); assertEquals(1457, (int)(100 * simulator.averageProcessTime())); assertEquals(true, simulator.packageLeftSimulation()); assertEquals(0, simulator.getCurrentIndex()); assertEquals(true, simulator.moreSteps()); for (int i = 0; i < 16; i++) { simulator.step(); } assertEquals(false, simulator.moreSteps()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void step();", "public void step();", "@Override\r\n\tpublic void step(SimState state) {\r\n\r\n\t}", "public void step()\n {\n status = stepInternal();\n }", "public void executeTimeStep(Simulation simulation) {\n }", "public void step() {\n \tinternaltime ++;\n \n }", ...
[ "0.6977719", "0.6977719", "0.6928719", "0.69015384", "0.68492496", "0.67061806", "0.66439515", "0.6591458", "0.6507063", "0.6462678", "0.64287704", "0.6404538", "0.6404538", "0.6396596", "0.6396596", "0.6384565", "0.637491", "0.6323587", "0.63174427", "0.63065374", "0.6271489...
0.78444594
0
Reads user input from command line.
public static String readUserInput() { return in.nextLine(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void read() {\n try {\n pw = new PrintWriter(System.out, true);\n br = new BufferedReader(new InputStreamReader(System.in));\n input = br.readLine();\n while (input != null) {\n CM.processCommand(input, pw, true);\n input = br.readLine();\n }\n } catch (IOExcepti...
[ "0.72414416", "0.70943916", "0.6755615", "0.6745502", "0.67233795", "0.6602719", "0.659399", "0.65767205", "0.65606433", "0.65438104", "0.6540112", "0.64994186", "0.6490834", "0.64663684", "0.64337754", "0.6429528", "0.6422026", "0.6414875", "0.641307", "0.6394868", "0.635393...
0.7071193
2
Displays the message given.
public static void printMessage(String message) { printDashLines(); System.out.println(message); printDashLines(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void displayMessage(String message) {\n }", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "@Override\r\n\tpublic void display(Object message) {\n\t\t\r\n\t}", "void displayMessage(String message);", "public void DisplayMessage(String massage);", "public void showMessage(...
[ "0.82451206", "0.8217975", "0.8217975", "0.8127133", "0.8069318", "0.8034597", "0.7928813", "0.7872183", "0.7863516", "0.77947915", "0.77801687", "0.7763651", "0.77544093", "0.7686479", "0.76330805", "0.7624389", "0.7614096", "0.7588166", "0.75534105", "0.75400245", "0.743459...
0.0
-1
Prints logo when user opens the program.
public static void printLogo() { System.out.println(LOGO1); System.out.println(LOGO2); System.out.println(LOGO3); System.out.println(LOGO4); System.out.println(LOGO5); System.out.println(""); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void displayLogo(){\r\n System.out.println();\r\n }", "public static void printLogo() {\n System.out.println( \" ____ ____ \" + System.lineSeparator()\n + \" | __| | _ \\\\ \" + System.lineSeparator()\n + \" | |__ | | | | \" + System.lineSe...
[ "0.8162514", "0.79881394", "0.722025", "0.71969527", "0.6907632", "0.6888144", "0.6578095", "0.6573853", "0.65274787", "0.64475644", "0.62723035", "0.6267593", "0.62579894", "0.624982", "0.62244725", "0.6188074", "0.61880535", "0.6183636", "0.6177601", "0.61702037", "0.610047...
0.7704675
2
Displays the prompt for user input in Normal Mode.
public static void printNormalPrompt() { System.out.println("[Normal]"); System.out.print(" > "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "private void prompt() {\n System.out.print(\"> \");\n System.out.flush();\n }", "private void prompt() {\n ...
[ "0.77217853", "0.76781195", "0.7340181", "0.7338963", "0.71784437", "0.71278197", "0.69528776", "0.6933844", "0.6702847", "0.66337585", "0.662421", "0.661096", "0.65981627", "0.65881115", "0.6541013", "0.6522777", "0.64136595", "0.6409181", "0.64035296", "0.6349319", "0.63014...
0.79557836
0
Displays the prompt for user input in Deck Mode.
public static void printDeckPrompt(Deck deck) { System.out.println("[Deck - " + deck.getName() + "]"); System.out.print(" > "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printGamePrompt(Deck deck) {\n System.out.println(\"[Game - \" + deck.getName() + \"]\");\n System.out.print(\" > \");\n }", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "private void promptForSomething() {\n ...
[ "0.68504214", "0.64586556", "0.64289975", "0.63973254", "0.6393275", "0.63495237", "0.6328055", "0.632676", "0.6131934", "0.6095571", "0.6070888", "0.60690933", "0.6059302", "0.60407424", "0.60259867", "0.60106045", "0.59862775", "0.5963911", "0.5955457", "0.58816826", "0.586...
0.739724
0
Displays the prompt for user input in Game Mode.
public static void printGamePrompt(Deck deck) { System.out.println("[Game - " + deck.getName() + "]"); System.out.print(" > "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void displayPrompt()\n\t{\n\t\tif (ch.usingJog.length() > 0)\n\t\t\treturn;\n\t\t\t\n\t\tif (showPrompt)\n\t\t{\n\t\t\t// Show the pageMode prompt if necessary.\n\t\t\tif (pageMode)\n\t\t\t{\n\t\t\t\tpageMode = false;\n\t\t\t\tsendln(\"\");\n\t\t\t\tsendln(\"{Y[== {CPAGE MODE: {wPush enter to continue. See ...
[ "0.7287126", "0.7180116", "0.70665115", "0.70122427", "0.68806726", "0.6832567", "0.6773551", "0.67627287", "0.67268133", "0.6657524", "0.66289645", "0.6483079", "0.64729565", "0.64471567", "0.6430743", "0.6426176", "0.6410176", "0.63859457", "0.6377224", "0.63732606", "0.637...
0.67941886
6
Displays the prompt for user input without specifying current mode.
public static void printPrompt() { System.out.print(" > "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void prompt() {\n\t\tSystem.out.printf(\"\\n입력 > \");\n\t}", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "public String getPrompt() {\r\n\t\treturn \"oui/non\";\r\n\t}", "public void generalPrompt() {\n System.out.println(\"W...
[ "0.7558259", "0.7557409", "0.7122201", "0.71167994", "0.7100621", "0.70721644", "0.70201635", "0.6923681", "0.6885119", "0.68471646", "0.67671216", "0.67254746", "0.6632025", "0.6631779", "0.6620352", "0.6568365", "0.6538254", "0.64335793", "0.64303464", "0.6362652", "0.63586...
0.70778626
5
Displays the welcome message from Deck Mode to Normal Mode.
public static void printNormalWelcome() { printMessage(NORMAL_WELCOME_LINE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void welcome() {\n System.out.println(\"\\n---------------------------------------------------------------------\" +\n \"\\n\\tBienvenue sur le plateau de Donjon et Dragons !!!\" +\n \"\\n---------------------------------------------------------------------\");\n ...
[ "0.7562603", "0.7367819", "0.73337513", "0.72999275", "0.72599596", "0.7168335", "0.7135772", "0.71194524", "0.7068824", "0.68704766", "0.6833197", "0.68261033", "0.682342", "0.67754346", "0.6774972", "0.67724365", "0.67584324", "0.6739215", "0.67253715", "0.6619226", "0.6607...
0.72630674
4
Displays the welcome message from Normal Mode to Deck Mode.
public static void printDeckWelcome(int index, Deck deck) { printMessage(DECK_WELCOME_LINE + "[" + index + "] " + deck.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void welcome() {\n System.out.println(\"\\n---------------------------------------------------------------------\" +\n \"\\n\\tBienvenue sur le plateau de Donjon et Dragons !!!\" +\n \"\\n---------------------------------------------------------------------\");\n ...
[ "0.7756892", "0.74519134", "0.74489164", "0.7437126", "0.73806864", "0.72800934", "0.72652704", "0.72176886", "0.72149205", "0.7077987", "0.70687675", "0.70568794", "0.69450206", "0.6942287", "0.69322836", "0.6927636", "0.6919872", "0.6888557", "0.6853116", "0.6849598", "0.67...
0.641457
43
Displays the welcome message for Game Mode.
public static void printGameWelcome(int index, Deck deck) { printMessage(Game.WELCOME_MESSAGE + "[" + index + "] " + deck.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void displayWelcomeMessage() {\n\t\tSystem.out.println(\"Welcome to my program! :D\");\n\t\tSystem.out.println(\" Ryan Shupe \");\n\t\tSystem.out.println(\" CSCI 1250-004 Project 3 \");\n\t}", "public static void welcome()\n\t{\n\t\tSystem.out.println(\"Monty Hall Game\");\n\t\tSystem....
[ "0.76496214", "0.76309747", "0.75847304", "0.7522292", "0.74790984", "0.738293", "0.7271381", "0.7238476", "0.7196082", "0.71918666", "0.7181543", "0.7116268", "0.7115582", "0.70974934", "0.7089536", "0.70815384", "0.7079845", "0.7001176", "0.6998912", "0.69265145", "0.687196...
0.60993606
82
Displays the greeting message.
public static void printGreeting() { printDashLines(); printLogo(); System.out.println(GREETING_LINES); printDashLines(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String displayGreeting() {\n return Duke.getGreeting();\n }", "private String greeting() {\n\t\tanswerUser = null;\n\t\tquestionBot.put(owner.id(), WELCOME);\n\n\t\treturn buildMessage(\"Olá, \" + owner.firstName() + \"! \" + WELCOME);\n\t}", "public String displayGreeting() {\n\t\treturn \"H...
[ "0.79253435", "0.7542638", "0.7525221", "0.75089806", "0.73837715", "0.7376678", "0.730306", "0.71889514", "0.7172176", "0.7138363", "0.7106192", "0.7090292", "0.70795316", "0.70698917", "0.7058996", "0.70419097", "0.70225924", "0.70037365", "0.6941002", "0.6929448", "0.69168...
0.7258828
7
Displays the exit message.
public static void printExitLine() { printMessage(BYE_LINE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printExitMessage() {\n printLine();\n System.out.println(\" Bye Bye for now! See you soon!\");\n printLine();\n }", "public static void printExitMsg() {\r\n CmdUx.printHBars(EXIT_MSG);\r\n }", "public void printExitMessage()\n {\n System.out.pri...
[ "0.8164486", "0.8049473", "0.79813087", "0.78178614", "0.7795985", "0.77228504", "0.7552188", "0.73807216", "0.73692596", "0.7326257", "0.7277596", "0.71890074", "0.7008784", "0.70082617", "0.69993275", "0.6990127", "0.69637215", "0.69637215", "0.6961033", "0.69198227", "0.69...
0.65820456
57
Displays the add FlashCard line.
public static void printAddFlashCardLine(Deck deck) { printMessage(ADD_FLASHCARD_LINE + deck.getName()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printFlashCardAddedLine() {\n System.out.println(FLASHCARD_ADDED_LINE);\n }", "private void addCard(){\n WebDriverHelper.clickElement(addCard);\n }", "public void addCard(Card card){\r\n\t\tplayerHand.add(card);\r\n\t\tSystem.out.print(\"You draw \");\r\n\t\tSystem.out.pr...
[ "0.7756416", "0.62081397", "0.60356313", "0.5947907", "0.59363973", "0.58852404", "0.58829933", "0.58011734", "0.57708406", "0.5754191", "0.5727401", "0.56913424", "0.56554013", "0.5620297", "0.56149125", "0.5595939", "0.5583261", "0.5583002", "0.5565692", "0.55645376", "0.55...
0.7235854
1
Displays the enter question line.
public static void printEnterQuestionLine() { System.out.println(ENTER_QUESTION_LINE); printPrompt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printEnterAnswerLine() {\n System.out.println(ENTER_ANSWER_LINE);\n printPrompt();\n }", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "@Override\r\n public void display() {\n super.display();\r\n ...
[ "0.77236265", "0.6794038", "0.6475308", "0.6454394", "0.6453295", "0.64270216", "0.6423318", "0.64027125", "0.63784355", "0.6366009", "0.6345955", "0.63445574", "0.6344346", "0.63107663", "0.6298801", "0.62458485", "0.6235734", "0.6227034", "0.6174401", "0.61731297", "0.61490...
0.82559764
0
Displays the enter answer line.
public static void printEnterAnswerLine() { System.out.println(ENTER_ANSWER_LINE); printPrompt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printEnterQuestionLine() {\n System.out.println(ENTER_QUESTION_LINE);\n printPrompt();\n }", "public static void showPrompt() {\r\n \r\n System.out.print(\"> \");\r\n \r\n }", "private final static void pulsaEnter() {\n\t\tSystem.out.println();\n\t\tS...
[ "0.7854596", "0.7032254", "0.69705445", "0.68276304", "0.67629254", "0.67580694", "0.6741229", "0.66502434", "0.66238636", "0.6598568", "0.6591049", "0.6491025", "0.64734256", "0.64686865", "0.6415641", "0.639088", "0.6365543", "0.63481224", "0.63270897", "0.63005346", "0.629...
0.82115096
0
Displays the FlashCard added line.
public static void printFlashCardAddedLine() { System.out.println(FLASHCARD_ADDED_LINE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printAddFlashCardLine(Deck deck) {\n printMessage(ADD_FLASHCARD_LINE + deck.getName());\n }", "public static void printUpdateQuestionLine(FlashCard flashCard) {\n // No offset since printing from start of line.\n System.out.println(flashCard.toString(true, 0));\n ...
[ "0.737803", "0.6668044", "0.66080236", "0.6483777", "0.64567304", "0.6267706", "0.62261605", "0.6043273", "0.5994597", "0.59521425", "0.5934643", "0.59331167", "0.5912933", "0.5911379", "0.5877417", "0.5845727", "0.5844115", "0.584216", "0.5833476", "0.5828069", "0.5799769", ...
0.83478653
0
Displays an index list of FlashCards in the deck.
public static void printDeck(Deck deck, boolean isQuestionOnly) { String deckMessage = ""; if (deck.toString(isQuestionOnly).trim().equals("")) { deckMessage += EMPTY_DECK_LINE; } else { deckMessage += LIST_FLASHCARDS_LINE + deck.getName() + System.lineSeparator() + deck.toString(isQuestionOnly); } printMessage(deckMessage); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void showCards() {\n\t\tfor(int i=0;i<cards.size();i++) {\n\t\t\tSystem.out.println(cards.get(i).toString());\n\t\t}\n\t}", "public String showCard(int index){\n\t\ttry{\n\t\t\treturn this.cardList.get(index).toString();\n\t\t} catch(IndexOutOfBoundsException e){\n\t\t\treturn null;\n\t\t}\n\t}", "void ...
[ "0.66406417", "0.6470509", "0.64617056", "0.6306437", "0.62127966", "0.6093858", "0.60743946", "0.6052969", "0.60327756", "0.6025649", "0.59995705", "0.59912133", "0.59141403", "0.5842239", "0.5818827", "0.58033544", "0.57947904", "0.578715", "0.5752543", "0.5751031", "0.5735...
0.0
-1
Displays the delete FlashCard line.
public static void printDeleteFlashCardLine(String question) { System.out.print(DELETE_FLASHCARD_LINE + "?\n '" + question + "' "); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printFlashCardDeletedLine(String question) {\n System.out.println(FLASHCARD_DELETED_LINE + question + \"'\");\n }", "void showdelete() {\n\t\tif (printstatus != delete)\n\t\t\tprintln(\">>>> DELETE AT <br/>\" + printoldline);\n\t\tprintstatus = delete;\n\t\toutput+=oldinfo.symbol[pri...
[ "0.71326596", "0.71234465", "0.6886894", "0.62751573", "0.6269703", "0.62575966", "0.6121618", "0.6101998", "0.6078826", "0.6014978", "0.59530336", "0.59508175", "0.5947426", "0.5945366", "0.5928609", "0.5896493", "0.5886797", "0.58837885", "0.5881283", "0.586842", "0.5860352...
0.7397744
0
Displays the FlashCard deleted line.
public static void printFlashCardDeletedLine(String question) { System.out.println(FLASHCARD_DELETED_LINE + question + "'"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void showdelete() {\n\t\tif (printstatus != delete)\n\t\t\tprintln(\">>>> DELETE AT <br/>\" + printoldline);\n\t\tprintstatus = delete;\n\t\toutput+=oldinfo.symbol[printoldline].showSymbol();\n\t\toutput+=\"<br/>\";\n\t\tanyprinted = true;\n\t\tprintoldline++;\n\t}", "public static void printDeleteFlashCardLine(...
[ "0.7741152", "0.72435725", "0.69715893", "0.6669081", "0.6411215", "0.63511604", "0.6200019", "0.61094433", "0.6062512", "0.59770906", "0.5976854", "0.592153", "0.58627814", "0.5830197", "0.58109874", "0.5793035", "0.57805836", "0.57703805", "0.5736335", "0.5688283", "0.56852...
0.77215564
1
Displays the help page of commands. Displays a different help page for Normal Mode and Deck Mode.
public static void printHelp(String helpDisplay) { printMessage(helpDisplay); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void help() {\n System.out.println(\"Type 'commands' to list all \" +\n \"available commands\");\n System.out.println(\"Type 'start' to play game\");\n System.out.println(\"Player to remove the last stone loses!\");\n System.out.println();\n }", "private void ...
[ "0.7848017", "0.78049994", "0.78029734", "0.77998275", "0.77536964", "0.7739956", "0.77290267", "0.7718219", "0.76999354", "0.76981854", "0.76854664", "0.76481724", "0.76460576", "0.7543506", "0.7513875", "0.7447973", "0.7437318", "0.74086565", "0.74013335", "0.7386528", "0.7...
0.0
-1
Prints new deck added in the Normal Mode.
public static void printNewDeck(Deck deck) { String tagsOfNewDeck = deck.getTagString(); if (!tagsOfNewDeck.isEmpty()) { tagsOfNewDeck = " #Tag: " + tagsOfNewDeck; } printMessage(NEW_DECK_CREATED_LINE + deck.getName() + tagsOfNewDeck); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[index].getName() + this.cardsInDeck[index].getColor() + \",\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "@Override\n\tpublic void printDeck() {\n\t\tfor(int i = getCount() - 1; i >= 0;...
[ "0.74169046", "0.7411661", "0.72819924", "0.7095057", "0.7053618", "0.6884458", "0.6780105", "0.67421216", "0.6604952", "0.6595092", "0.6576855", "0.6559787", "0.64941996", "0.64660877", "0.6465506", "0.645784", "0.6448848", "0.64422655", "0.64277375", "0.6402806", "0.6379164...
0.7798867
0
Prints all decks available in the Normal Mode.
public static void printDeckList(DeckList decks) { printMessage(DECKS_AVAILABLE_LINE + decks.toString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void printDeck() {\n\t\tfor(int i = getCount() - 1; i >= 0; i--) {\n\t\t\tSystem.out.println(\"[\" + i + \"]\" + this.aktuellesDeck[i].toString());\n\t\t}\n\t}", "void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[in...
[ "0.7175472", "0.70672166", "0.6706289", "0.6686696", "0.6448435", "0.63592106", "0.63256055", "0.63224787", "0.6315997", "0.6246526", "0.62342507", "0.62278366", "0.62199914", "0.6207122", "0.6190158", "0.61809975", "0.6141455", "0.6138681", "0.61111593", "0.6105221", "0.6100...
0.64443034
5
Confirms the deck the user wants to delete.
public static void printDeletedDeckQuestion(String deletedDeckName) { System.out.print(String.format(DELETED_DECK_QUESTION_LINE, deletedDeckName)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean getDeletedDeckConfirmation(String deckName) {\n logger.log(Level.INFO, \"Logging method getDeletedDeckConfirmation() in Ui.\");\n printDashLines();\n printDeletedDeckQuestion(deckName);\n\n return checkYorNResponse();\n }", "private void delete(ActionEvent e){...
[ "0.6466757", "0.64648473", "0.64605594", "0.6416824", "0.63040966", "0.6150008", "0.6148024", "0.61175674", "0.6107642", "0.61018485", "0.6086389", "0.6065945", "0.6065529", "0.60107607", "0.60031605", "0.59820694", "0.59819525", "0.5979035", "0.59684896", "0.59540784", "0.59...
0.6077753
11
Prints the name of the deleted deck.
public static void printDeckDeletedLine(String deletedDeckName) { System.out.println(String.format(DELETED_DECK_LINE, deletedDeckName)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printDeletedDeckQuestion(String deletedDeckName) {\n System.out.print(String.format(DELETED_DECK_QUESTION_LINE, deletedDeckName));\n }", "void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[index].getName() +...
[ "0.81037706", "0.69429344", "0.68833166", "0.6872143", "0.6844967", "0.68330115", "0.68219745", "0.6725529", "0.67046547", "0.666801", "0.64770657", "0.6449572", "0.63838816", "0.63528585", "0.6329851", "0.62761146", "0.62639314", "0.62316686", "0.6210973", "0.6190806", "0.61...
0.8255155
0
Confirms the deck the user wants to print to PowerPoint.
public static void printPptxDeckQuestion(String pptxDeckName) { System.out.print(String.format(PPTX_DECK_QUESTION_LINE, pptxDeckName)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printDeckPrompt(Deck deck) {\n System.out.println(\"[Deck - \" + deck.getName() + \"]\");\n System.out.print(\" > \");\n }", "private void printDeck() {\n for (int i = 0; i < deck.length; i++) {\n System.out.println(deck[i]);\n }\n\n }", "public ...
[ "0.6728623", "0.6280186", "0.61993694", "0.6186026", "0.61859643", "0.61767364", "0.6175735", "0.61319995", "0.60449207", "0.6020903", "0.59627986", "0.5954574", "0.5924484", "0.5906548", "0.5906529", "0.58886516", "0.5873673", "0.5837838", "0.58373064", "0.5825776", "0.58190...
0.6979934
0
Prints the name of the deck to be printed to PowerPoint.
public static void printDeckPptxLine(String pptxDeckName, String bgColor, String txtColor, ColorOption colorOpt) { switch (colorOpt) { case DEFAULT: printMessage(String.format(PPTX_DECK_DEFAULT_LINE, pptxDeckName)); break; case COLOR_SCHEME: printMessage(String.format(PPTX_DECK_CS_LINE, pptxDeckName, bgColor, txtColor)); break; case ORGINAL_COLOR: printMessage(String.format(PPTX_DECK_OC_LINE, pptxDeckName, bgColor, txtColor)); break; default: // break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printPptxDeckQuestion(String pptxDeckName) {\n System.out.print(String.format(PPTX_DECK_QUESTION_LINE, pptxDeckName));\n }", "void printDeck() {\n\t\tfor(int index = 0; index < this.getNumberOfCards(); index++) {\n\t\t\tSystem.out.print(this.cardsInDeck[index].getName() + this.cardsI...
[ "0.79099816", "0.77291536", "0.76557225", "0.753993", "0.7488778", "0.74195784", "0.73460984", "0.7284053", "0.72482455", "0.7169355", "0.6988767", "0.69621336", "0.6950546", "0.681682", "0.6806184", "0.67820626", "0.67782307", "0.67691964", "0.6767548", "0.6738211", "0.66358...
0.586183
88
Prints the update question lines for a flashcard.
public static void printUpdateQuestionLine(FlashCard flashCard) { // No offset since printing from start of line. System.out.println(flashCard.toString(true, 0)); System.out.println(NEW_QUESTION_LINE); printPrompt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printUpdateAnswerLine(FlashCard flashCard) {\n // No offset since printing from start of line.\n System.out.println(System.lineSeparator() + flashCard.toString(false, 0));\n System.out.println(NEW_ANSWER_LINE);\n printPrompt();\n }", "public static void printFlas...
[ "0.7875329", "0.713567", "0.6804735", "0.6595756", "0.6400667", "0.60900223", "0.60467446", "0.60131437", "0.5993403", "0.59136283", "0.58868796", "0.58557785", "0.58281314", "0.57894605", "0.5740601", "0.5727004", "0.57006466", "0.56961375", "0.56934226", "0.56854546", "0.56...
0.8384924
0
Prints the update answer lines for a flashcard.
public static void printUpdateAnswerLine(FlashCard flashCard) { // No offset since printing from start of line. System.out.println(System.lineSeparator() + flashCard.toString(false, 0)); System.out.println(NEW_ANSWER_LINE); printPrompt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printUpdateQuestionLine(FlashCard flashCard) {\n // No offset since printing from start of line.\n System.out.println(flashCard.toString(true, 0));\n System.out.println(NEW_QUESTION_LINE);\n printPrompt();\n }", "public static void printFlashCardUpdatedLine(boole...
[ "0.81165034", "0.6921351", "0.6747696", "0.6336991", "0.60642165", "0.60329974", "0.5935017", "0.59295684", "0.5891098", "0.58747494", "0.58651906", "0.5859322", "0.5810513", "0.5809731", "0.5781394", "0.5713411", "0.5710631", "0.5697064", "0.5652926", "0.5652491", "0.5649481...
0.83334565
0
Prints line informing updated flashcards.
public static void printFlashCardUpdatedLine(boolean hasNewQ, boolean hasNewA) { if (hasNewQ && hasNewA) { System.out.println(QNA_UPDATED_LINE); } else if (hasNewQ) { // !hasNewA System.out.println(QUESTION_UPDATED_LINE); } else if (hasNewA) { // !hasNewQ System.out.println(ANSWER_UPDATED_LINE); } else { System.out.println(NO_UPDATE_LINE); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printFlashCardAddedLine() {\n System.out.println(FLASHCARD_ADDED_LINE);\n }", "public static void printUpdateQuestionLine(FlashCard flashCard) {\n // No offset since printing from start of line.\n System.out.println(flashCard.toString(true, 0));\n System.out.prin...
[ "0.7945656", "0.77525026", "0.7611813", "0.6843489", "0.68116915", "0.6567694", "0.64558685", "0.63946354", "0.63185954", "0.6269846", "0.62247443", "0.62219507", "0.6213198", "0.6144176", "0.607893", "0.60591334", "0.6043615", "0.60147417", "0.596454", "0.59351796", "0.59177...
0.69724584
3
Prints a line prompting user to enter only 'y' or 'n'.
public static void printInvalidYorNResponse() { System.out.print(INVALID_YN_RESPONSE_LINE); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"resource\")\n public static boolean askYN()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Continue(Y/N)?\");\n while (true)\n {\n char ans = Character.toUpperCase(scanner.nextLine().charAt(0));\n if (ans == 'Y' || an...
[ "0.742996", "0.6780108", "0.67726564", "0.66735345", "0.66735345", "0.6491186", "0.64835095", "0.64091575", "0.63033587", "0.6282514", "0.624756", "0.6238888", "0.6235515", "0.6227956", "0.6199384", "0.6142239", "0.607405", "0.60692066", "0.6031359", "0.600436", "0.59994787",...
0.0
-1
Displays question in the flashcard.
public static void printGameQuestion(String question) { final String label = "Q: "; System.out.println(label + prettyPrintFormatter(question, label.length())); System.out.println(ENTER_ATTEMPT_LINE); printPrompt(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onClick(View view) {\n showFlashcardDialog(QuizActivity.this, quizQuestions.getHint(questionNumber - 1), true);\n\n }", "public static void printDeleteFlashCardLine(String question) {\n System.out.print(DELETE_FLASHCARD_LINE + \"?\\n '\" + ques...
[ "0.65128666", "0.64782715", "0.6372394", "0.6320312", "0.62566024", "0.6244362", "0.6240137", "0.61948055", "0.61948055", "0.61948055", "0.61876136", "0.6173506", "0.61706066", "0.61606306", "0.6157255", "0.6157255", "0.6157255", "0.6157255", "0.6157255", "0.6157255", "0.6157...
0.0
-1
Prints the new tags added to the deck.
public static void printNewTags(String name, ArrayList<String> newTags) { String tagString = formStringOfTags(newTags); printMessage(String.format(NEW_TAGS_LINE, name, tagString)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printNewDeck(Deck deck) {\n String tagsOfNewDeck = deck.getTagString();\n if (!tagsOfNewDeck.isEmpty()) {\n tagsOfNewDeck = \" #Tag: \" + tagsOfNewDeck;\n }\n printMessage(NEW_DECK_CREATED_LINE + deck.getName() + tagsOfNewDeck);\n }", "public void prin...
[ "0.7382724", "0.7023912", "0.6877125", "0.6601844", "0.6566476", "0.63237274", "0.60481715", "0.603424", "0.5916906", "0.5901056", "0.58842653", "0.58712226", "0.5829818", "0.5785832", "0.57130426", "0.56618917", "0.5586481", "0.5572799", "0.55570567", "0.5553155", "0.553461"...
0.6293179
6
Prints out warning about invalid tags provided.
public static void printInvalidTagsLine(String tags) { logger.log(Level.WARNING, "User did not supply valid tags."); printMessage(String.format((INVALID_TAGS_LINE), tags)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void warn(String tag, String msg);", "@SuppressWarnings(\"UseOfSystemOutOrSystemErr\")\n final void printWarning(final DocTree tag, final String message) {\n if (reporter != null) {\n reporter.print(Diagnostic.Kind.WARNING, message);\n } else {\n System.err.println(message)...
[ "0.69659954", "0.66815156", "0.5781307", "0.56751984", "0.5643907", "0.56326264", "0.5615456", "0.5611853", "0.55777776", "0.55191493", "0.54865867", "0.5482303", "0.54586244", "0.54445934", "0.54432154", "0.5396381", "0.53837615", "0.53767717", "0.5366587", "0.5366517", "0.5...
0.8152526
0
Prints confirmation question before tag removal.
public static void printRemovedTagsQuestion(String deckName, ArrayList<String> tags) { String removedTags = formStringOfTags(tags); System.out.print(String.format(REMOVED_TAGS_QUESTION_LINE, removedTags, deckName)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n void confirm() throws IOException {\n SystemMain.tagManager.deleteTag(tagToDelete);\n parent.refresh();\n stage.close();\n }", "private void popupRemoveTrap() {\n\n new AlertDialog.Builder(this)\n .setTitle(\"Remove \" + trap.getName())\n .setMessage(\"Do y...
[ "0.632612", "0.6005517", "0.5973214", "0.5939948", "0.59306157", "0.58814675", "0.5866213", "0.58523625", "0.5851826", "0.58381903", "0.58319443", "0.57231474", "0.5695625", "0.56763315", "0.56222653", "0.5609948", "0.5561146", "0.5530027", "0.5468154", "0.5444714", "0.544286...
0.6280688
1
Prints the tags that are removed from the specified deck.
public static void printTagsRemovedLine(String deckName, ArrayList<String> tags) { String removedTags = formStringOfTags(tags); System.out.println(String.format(REMOVED_TAGS_LINE, removedTags, deckName)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printRemovedTagsQuestion(String deckName, ArrayList<String> tags) {\n String removedTags = formStringOfTags(tags);\n System.out.print(String.format(REMOVED_TAGS_QUESTION_LINE, removedTags, deckName));\n }", "public void printDeck() {\n\t\t// Inform the user if the deck is empt...
[ "0.80378336", "0.639886", "0.6322123", "0.62813056", "0.6260199", "0.6246878", "0.6148877", "0.5885348", "0.5766237", "0.5643697", "0.55939025", "0.5587376", "0.55644846", "0.5525482", "0.5496919", "0.5466544", "0.5420922", "0.53910524", "0.537304", "0.5343117", "0.5335235", ...
0.7933061
1
Forms a String of provided tags.
public static String formStringOfTags(ArrayList<String> tags) { String stringOfTags = ""; for (int i = 0; i < tags.size(); i++) { stringOfTags += tags.get(i); if (i < tags.size() - 1) { stringOfTags += " | "; } } return stringOfTags; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String convertTag(String tag);", "public CharSequence getTagString() {\n\t\tStringBuilder tagString = new StringBuilder();\n\t\tList<String> tags = getTags();\n\t\tfor (String tag : tags) {\n\t\t\tif (tagString.length() > 0) {\n\t\t\t\ttagString.append(SPACE);\n\t\t\t}\n\t\t\ttagString.append(tag);\n\t\t}\n\t\tr...
[ "0.6182476", "0.59862095", "0.5969361", "0.5864516", "0.5862999", "0.56940615", "0.56841016", "0.5588952", "0.55664825", "0.55061275", "0.55014455", "0.55009854", "0.54391074", "0.5355506", "0.5346394", "0.53372794", "0.5225503", "0.51892346", "0.5126447", "0.5082897", "0.505...
0.700859
0
Checks y or n response from user.
private static boolean checkYorNResponse() { logger.log(Level.INFO, "Logging method checkYorNResponse() in Ui."); String response; do { response = readUserInput(); assert response != null : "response should not be null"; switch (response.trim()) { case Y: response = Y; break; case N: response = N; break; default: logger.log(Level.INFO, "User entered response other than 'y' or 'n'"); logger.log(Level.INFO, "Re-prompting..."); printInvalidYorNResponse(); } } while (!response.trim().equals(Y) && !response.trim().equals(N)); assert (response.equals(Y) || response.equals(N)) : "Response should be y/n"; return response.equals(Y); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"resource\")\n public static boolean askYN()\n {\n Scanner scanner = new Scanner(System.in);\n System.out.print(\"Continue(Y/N)?\");\n while (true)\n {\n char ans = Character.toUpperCase(scanner.nextLine().charAt(0));\n if (ans == 'Y' || an...
[ "0.7716092", "0.76698375", "0.76119983", "0.73482263", "0.72694504", "0.71927935", "0.7134618", "0.7110096", "0.7057477", "0.7006682", "0.69809", "0.69809", "0.696627", "0.6898171", "0.68319196", "0.68309575", "0.68309575", "0.68095124", "0.67130774", "0.6604329", "0.65784484...
0.8832442
0
Get confirmation for deleting a deck.
public static boolean getDeletedDeckConfirmation(String deckName) { logger.log(Level.INFO, "Logging method getDeletedDeckConfirmation() in Ui."); printDashLines(); printDeletedDeckQuestion(deckName); return checkYorNResponse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Boolean confirmDeletion() {\n final AtomicReference<Boolean> reference = new AtomicReference<>(false);\n\n TopsoilNotification.showNotification(\n TopsoilNotification.NotificationType.VERIFICATION,\n \"Delete Table\",\n \"Do you really want t...
[ "0.63977623", "0.6024793", "0.59892875", "0.59515", "0.5947646", "0.5892521", "0.58689225", "0.5862872", "0.58555907", "0.5822722", "0.5797426", "0.5768456", "0.5757487", "0.5737097", "0.5736809", "0.5735168", "0.5700768", "0.5695661", "0.56938064", "0.56896466", "0.56848305"...
0.66924566
0
Checks whether the user want to remove the tags specified from the deck specified.
public static boolean getRemovedTagsConfirmation(ArrayList<String> tags, String deckName) { printDashLines(); printRemovedTagsQuestion(deckName, tags); boolean isConfirmed = checkYorNResponse(); if (isConfirmed) { printTagsRemovedLine(deckName, tags); printDashLines(); } return isConfirmed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printRemovedTagsQuestion(String deckName, ArrayList<String> tags) {\n String removedTags = formStringOfTags(tags);\n System.out.print(String.format(REMOVED_TAGS_QUESTION_LINE, removedTags, deckName));\n }", "public static void printTagsRemovedLine(String deckName, ArrayList<St...
[ "0.6772238", "0.6105833", "0.600042", "0.5635705", "0.56096005", "0.56022054", "0.5518516", "0.5383745", "0.5357141", "0.5344264", "0.53383124", "0.5325478", "0.5302682", "0.5279598", "0.52739584", "0.5267233", "0.52478933", "0.5208364", "0.52078867", "0.5196741", "0.5190286"...
0.73982775
0
Get confirmation from user on whether to print deck to PowerPoint.
public static boolean getPptxDeckConfirmation(String deckName) { logger.log(Level.INFO, "Logging method getPptxDeckConfirmation() in Ui."); Ui.printPptxDeckQuestion(deckName); return checkYorNResponse(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void printPptxDeckQuestion(String pptxDeckName) {\n System.out.print(String.format(PPTX_DECK_QUESTION_LINE, pptxDeckName));\n }", "@Override\n\tprotected String showConfirmation() {\n\t\treturn \"Payment is successful. Check your credit card statement for PetSitters, Inc.\";\n\t}", "pub...
[ "0.65089554", "0.63242", "0.61709213", "0.5960087", "0.5919935", "0.59178364", "0.5887693", "0.5774146", "0.57117224", "0.56780434", "0.5673718", "0.566505", "0.5660177", "0.5646862", "0.56345403", "0.56228125", "0.56056577", "0.5591411", "0.5531521", "0.5485724", "0.5482585"...
0.6532154
0
Format the target string to properly wrap around the end of each line. The response will occupy the area between offset and Ui.DASH_LINES.length().
public static String prettyPrintFormatter(String target, int offset) { String result = ""; String[] words = target.split(" "); int lineLength = Ui.DASH_LINES.length(); int usableLength = lineLength - offset; assert usableLength > 0 : "Otherwise we cannot print anything."; int currentLength = 0; for (String word : words) { // Handle the case where a word is too long to print on one line if (word.length() > usableLength) { // Find number of characters that can be printed on current line int remainLength = usableLength - currentLength; result += word.substring(0, remainLength); String leftover = word.substring(remainLength); // Separate the word into parts that can fit in a line while (leftover.length() > usableLength) { result += System.lineSeparator() + " ".repeat(offset) + leftover.substring(0, usableLength); leftover = leftover.substring(usableLength); } // Place remainder of word into line and continue result += System.lineSeparator() + " ".repeat(offset) + leftover + " "; currentLength = leftover.length() + 1; continue; } currentLength += word.length(); if (currentLength > usableLength) { // Repeat enough spaces so that text is aligned to usable area. result += System.lineSeparator() + " ".repeat(offset) + word; currentLength = word.length(); } else { result += word; } result += " "; // Account for the " " after the word. ++currentLength; } return result.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String createDashedLine(){\n return \"- \".repeat(Math.max(0, this.columns));\n }", "private void lineBreak()\n\t{\n\t\tlog += String.format(\"%n\");\n\t\tfor(int i = 0; i < 25; i++)\n\t\t\tlog += \"-\";\n\t\tlog += String.format(\"%n\");\n\t}", "private static String formNewLineWithSpaces(St...
[ "0.6301853", "0.5904623", "0.5746466", "0.57004404", "0.56518173", "0.5531317", "0.5475518", "0.5375833", "0.53292686", "0.53149855", "0.5290383", "0.5280726", "0.5245217", "0.52358884", "0.52172226", "0.5217094", "0.5202082", "0.5187117", "0.5178769", "0.5165903", "0.5159176...
0.6357414
0
end of method BubbleSort algorithm
public static void sort(LendItemArrayList list, int order){ LendItem tempItem = new LendItem(); for (int i = 0; i < list.next - 1; i++) { for (int j = 0; j < list.next - 1; j++) { if (compare(list.lendItems[j], list.lendItems[j+1], order) == 1) { tempItem = list.lendItems[j]; list.lendItems[j] = list.lendItems[j+1]; list.lendItems[j+1] = tempItem; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void bubbleSort() {\n\t\tint n = data.size();\n\t\tfor (int i = 0; i < data.size(); i++) {\n\t\t\tfor (int j = 1; j < n - i; j++) {\n\t\t\t\tif (data.get(j - 1) > data.get(j)) {\n\t\t\t\t\tswap(j, j - 1);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}\n\n\t}", "public static void BubbleSort(int[] a) {\n\t int n = a.le...
[ "0.8204571", "0.78877896", "0.779378", "0.77723783", "0.76877505", "0.76453334", "0.7505869", "0.74916697", "0.74910563", "0.74565166", "0.7414379", "0.7391393", "0.7385727", "0.7376333", "0.7366589", "0.7359492", "0.73396176", "0.7329779", "0.72878677", "0.7264707", "0.72512...
0.0
-1
Con este metodo damos de comer al granjero un animal el animal debe ser de edad mayor a 5.
public boolean alimentarGranjero(String nombreAnimal) { Animal animal = animalDeNombre(nombreAnimal); if (animal != null) { if (animal.getEdad() >= 5) { granjero.comer(animal); return true; } return false; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void miedo(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n aleatorio = (numeroAleatorio.nextInt(10-5+1)+5);\n \n if(oro>aleatorio){//condicion de fina...
[ "0.61566156", "0.59554607", "0.57704103", "0.5767871", "0.57649255", "0.5705884", "0.5632344", "0.5619256", "0.56058306", "0.557597", "0.55511004", "0.5543168", "0.55239683", "0.5506865", "0.548501", "0.5441882", "0.5440895", "0.5380064", "0.5368087", "0.53430206", "0.5342466...
0.5962186
1
TODO Autogenerated method stub
@Override public int getCount() { return historyGoods.size(); }
{ "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 Object getItem(int position) { return historyGoods.get(position); }
{ "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 long getItemId(int position) { return position; }
{ "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 View getView(int position, View convertView, ViewGroup parent) { View view = null; ViewHolder holder = null; if (convertView != null) { view = convertView; holder = (ViewHolder) view.getTag(); } else { view = View.inflate(context, R.layout.history_item, null); holder = new ViewHolder(); holder.iv_history_icon = (ImageView) view .findViewById(R.id.iv_history_icon); holder.tv_history_name = (TextView) view .findViewById(R.id.tv_history_name); holder.tv_history_price = (TextView) view .findViewById(R.id.tv_history_price); holder.tv_history_newprice = (TextView) view .findViewById(R.id.tv_history_newprice); view.setTag(holder); } // 设置数据 final Good good = historyGoods.get(position); // 设置显示图片 show(holder.iv_history_icon, good.getPic()); holder.tv_history_name.setText(good.getName()); holder.tv_history_price.setText(good.getPrice() + ""); holder.tv_history_newprice.setText(good.getNewprice() + ""); // 点击之后进入商品的详细信息界面,让用户加入购物车 return view; }
{ "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
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_comments, container, false); commentsRecyclerView = (RecyclerView) view.findViewById(R.id.commentsRecyclerView); commentsRecyclerView.setHasFixedSize(true); commentsRecyclerView.setItemViewCacheSize(20); commentsRecyclerView.setDrawingCacheEnabled(true); commentsRecyclerView.setDrawingCacheQuality(View.DRAWING_CACHE_QUALITY_HIGH); linearLayoutManager = new LinearLayoutManager(context); commentsRecyclerView.setLayoutManager(linearLayoutManager); commentsListAdapter = new CommentsListAdapter(commentsList); commentsRecyclerView.setAdapter(commentsListAdapter); commentsRecyclerView.addOnScrollListener(new EndlessRecyclerOnScrollListener(linearLayoutManager) { @Override public void onLoadMore(int current_page) { if(!mIsLoading) { loadMoreData(); } } }); editTextComment = (EditText) view.findViewById(R.id.editTextComment); backButton = (ImageButton) view.findViewById(R.id.backButton); backButton.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { if (getCallingActivityFromBundle().equals(getString(R.string.main_activity))) { getActivity().getSupportFragmentManager().popBackStack(); ((MainActivity) getActivity()).showLayout(); } else { getActivity().getSupportFragmentManager().popBackStack(); } } }); loadMoreData(); sendMessageBtn = (ImageButton) view.findViewById(R.id.sendMessageBtn); sendMessageBtn.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { //Send message to firebase Toast.makeText(context, "Posting Comment", Toast.LENGTH_SHORT).show(); final String userid = sharedPrefs.getUserIdFromSharedPref(); final String username = sharedPrefs.getUsernameFromSharedPref(); final String profilepic = sharedPrefs.getProfilePictureFromSharedPref(); final String addNewCommentURL = Constants.protocol + Constants.IP + Constants.addNewPostComment; final String commentText = editTextComment.getText().toString(); Long timestamp = System.currentTimeMillis(); //Comment.UserInfo userInfo = new Comment.UserInfo() Comment comment; if(profilepic.equals("")){ comment = new Comment(null, postId, commentText, timestamp, userid, 0, null, new UserInfo(username, null)); }else{ comment = new Comment(null, postId, commentText, timestamp, userid, 0, null, new UserInfo(username, profilepic)); } Log.d("newComment",comment.toString()); commentsList.add(0, comment); commentsListAdapter.notifyItemInserted(0); commentsRecyclerView.smoothScrollToPosition(0); //Comment comment = new Comment(postId, commentText, timestamp.toString(), userid, 0,null); //GsonBuilder gsonBuilder = new GsonBuilder(); //Gson gson = gsonBuilder.create(); //String jsonObject = gson.toJson(comment); Map<String,Map<String, Object>> Data = new HashMap<>(); Map<String, Object> PostCommentData = new HashMap<>(); PostCommentData.put("UserId", userid); PostCommentData.put("PostId", postId); PostCommentData.put("CommentText", commentText); PostCommentData.put("timestamp", timestamp); PostCommentData.put("LikesCount", 0); Map<String, Object> NotificationData = new HashMap<>(); NotificationData.put("ByUserId", userid); NotificationData.put("ToUserId", userIdOfPost); NotificationData.put("PostId", postId); NotificationData.put("NotificationType", "post_comment"); NotificationData.put("Read", false); NotificationData.put("timestamp", timestamp); //PostCommentData.put("CommentId", timestamp.toString()); Data.put("PostCommentData",PostCommentData); Data.put("NotificationData",NotificationData); JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, addNewCommentURL, new JSONObject(Data), new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { Log.d("volleyadd", response.toString()); Toast.makeText(context, "Posting Done", Toast.LENGTH_SHORT).show(); //FirebasePushNotificationMethods.sendTownPostNotification(userid, key, txtPrimary, txtSecondary, editTextShareNews, MainActivity.this); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.d("VolleyError", error.toString()); } }); RequestQueue queue = Volley.newRequestQueue(context); queue.add(jsonObjectRequest); //final String userid = firebaseAuth.getCurrentUser().getUid(); // String commentid = databaseReference.child("postcomments").child(postId).child("comments").push().getKey(); // // final String toUserId = getUserIdOfPostFromBundle(); // //Long timestamp = HelperFunctions.getCurrentTimestamp(); // //Comment comment = new Comment(commentText, null, 0, timestamp, userid); // Map<String, Object> childUpdates = new HashMap<>(); // childUpdates.put("/postcomments/" + postId + "/comments/" + commentid, comment); // databaseReference.updateChildren(childUpdates).addOnSuccessListener(new OnSuccessListener<Void>() { // @Override // public void onSuccess(Void aVoid) { // HelperFunctions.getToastShort(getActivity(), "comment posted"); // FirebasePushNotificationMethods.sendPostCommentNotification(toUserId, userid, postId, commentText, getContext()); // } // }); } }); //final Comment comment = new Comment(); // query.addListenerForSingleValueEvent(new ValueEventListener() { // @Override // public void onDataChange(DataSnapshot dataSnapshot) { // for (DataSnapshot item : dataSnapshot.getChildren()) { // final Comment comment = item.getValue(Comment.class); // comment.setCommentid(item.getKey()); // Log.d("commentdata", comment.toString()); // commentsList.add(comment); //// comment.setCommentid(item.getKey()); //// comment.setCommenttext(item.child("commenttext").toString()); //// //comment.setLikes(item.child("likes")); //// comment.setLikesCount(2); //// comment.setTimestamp(Long.valueOf(item.child("timestamp"))); // // //final Comment comment = item.getValue(Comment.class); // } // commentsListAdapter.notifyDataSetChanged(); // } // // @Override // public void onCancelled(DatabaseError databaseError) { // // } // }); 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
Send message to firebase
@Override public void onClick(View view) { Toast.makeText(context, "Posting Comment", Toast.LENGTH_SHORT).show(); final String userid = sharedPrefs.getUserIdFromSharedPref(); final String username = sharedPrefs.getUsernameFromSharedPref(); final String profilepic = sharedPrefs.getProfilePictureFromSharedPref(); final String addNewCommentURL = Constants.protocol + Constants.IP + Constants.addNewPostComment; final String commentText = editTextComment.getText().toString(); Long timestamp = System.currentTimeMillis(); //Comment.UserInfo userInfo = new Comment.UserInfo() Comment comment; if(profilepic.equals("")){ comment = new Comment(null, postId, commentText, timestamp, userid, 0, null, new UserInfo(username, null)); }else{ comment = new Comment(null, postId, commentText, timestamp, userid, 0, null, new UserInfo(username, profilepic)); } Log.d("newComment",comment.toString()); commentsList.add(0, comment); commentsListAdapter.notifyItemInserted(0); commentsRecyclerView.smoothScrollToPosition(0); //Comment comment = new Comment(postId, commentText, timestamp.toString(), userid, 0,null); //GsonBuilder gsonBuilder = new GsonBuilder(); //Gson gson = gsonBuilder.create(); //String jsonObject = gson.toJson(comment); Map<String,Map<String, Object>> Data = new HashMap<>(); Map<String, Object> PostCommentData = new HashMap<>(); PostCommentData.put("UserId", userid); PostCommentData.put("PostId", postId); PostCommentData.put("CommentText", commentText); PostCommentData.put("timestamp", timestamp); PostCommentData.put("LikesCount", 0); Map<String, Object> NotificationData = new HashMap<>(); NotificationData.put("ByUserId", userid); NotificationData.put("ToUserId", userIdOfPost); NotificationData.put("PostId", postId); NotificationData.put("NotificationType", "post_comment"); NotificationData.put("Read", false); NotificationData.put("timestamp", timestamp); //PostCommentData.put("CommentId", timestamp.toString()); Data.put("PostCommentData",PostCommentData); Data.put("NotificationData",NotificationData); JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, addNewCommentURL, new JSONObject(Data), new Response.Listener<JSONObject>() { @Override public void onResponse(JSONObject response) { Log.d("volleyadd", response.toString()); Toast.makeText(context, "Posting Done", Toast.LENGTH_SHORT).show(); //FirebasePushNotificationMethods.sendTownPostNotification(userid, key, txtPrimary, txtSecondary, editTextShareNews, MainActivity.this); } }, new Response.ErrorListener() { @Override public void onErrorResponse(VolleyError error) { Log.d("VolleyError", error.toString()); } }); RequestQueue queue = Volley.newRequestQueue(context); queue.add(jsonObjectRequest); //final String userid = firebaseAuth.getCurrentUser().getUid(); // String commentid = databaseReference.child("postcomments").child(postId).child("comments").push().getKey(); // // final String toUserId = getUserIdOfPostFromBundle(); // //Long timestamp = HelperFunctions.getCurrentTimestamp(); // //Comment comment = new Comment(commentText, null, 0, timestamp, userid); // Map<String, Object> childUpdates = new HashMap<>(); // childUpdates.put("/postcomments/" + postId + "/comments/" + commentid, comment); // databaseReference.updateChildren(childUpdates).addOnSuccessListener(new OnSuccessListener<Void>() { // @Override // public void onSuccess(Void aVoid) { // HelperFunctions.getToastShort(getActivity(), "comment posted"); // FirebasePushNotificationMethods.sendPostCommentNotification(toUserId, userid, postId, commentText, getContext()); // } // }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void sendMessageFirebase(String name, String content, String image, String uid, String url){\n FirebaseDatabase firebaseDatabase; //Firebase Database 관리 객체참조변수\n DatabaseReference roodIdReference;\n Calendar calendar = Calendar.getInstance(); //현재 시간을 가지고 있는 객...
[ "0.71937895", "0.6893761", "0.6810092", "0.67629176", "0.6727015", "0.6623494", "0.66181594", "0.65739095", "0.6527313", "0.64515424", "0.64394754", "0.6341501", "0.6328174", "0.62855566", "0.6274316", "0.623152", "0.618147", "0.61710924", "0.6163077", "0.6159947", "0.6146742...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { { String str1 = "Hello Java and Welcome to Java"; String str2 = "Java"; System.out.println("Original String: " + str1); System.out.println("Specified sequence of char values: " + str2); System.out.println(str1.contains(str2)); } }
{ "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
/ reloads info from MPD if it is not up to date
public synchronized boolean refresh() { return this.refresh(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected synchronized boolean updateConnection() \n {\n if (!enabled) \n {\n \td(\"is disabled\");\n return false;\n }\n if (mpd == null) \n {\n \td(\"no MPD! \");\n return false;\n }\n mpdconnection = mpd.getMpdConnection();\...
[ "0.6191891", "0.59929276", "0.5872436", "0.57780176", "0.5696605", "0.5688845", "0.5647043", "0.56262195", "0.56067413", "0.56058735", "0.5580675", "0.5548974", "0.5512262", "0.5503939", "0.5485679", "0.54357284", "0.54309994", "0.5406054", "0.53693885", "0.53602743", "0.5334...
0.0
-1
/ reloads info from MPD if it is not up to date or if forced
public synchronized boolean refresh(final boolean force) { if (!this.mEnabled) { return false; } if (!this.updateConnection()) { return false; } if (!force && this.isUpToDate()) { return true; } this.mLastUpdate = Calendar.getInstance().getTime(); final Date oldUpdate = this.mLastUpdate; this.mAlbumDetails = new HashMap<String, AlbumDetails>(); this.mAlbumSet = new HashSet<List<String>>(); final List<Music> allmusic; try { allmusic = this.mMPD.listAllInfo(); } catch (final IOException e) { this.mEnabled = false; this.mLastUpdate = null; this.updateConnection(); return false; } catch (MPDException e) { this.mEnabled = false; this.mLastUpdate = null; this.updateConnection(); return false; } try { for (final Music music : allmusic) { final String albumArtist = music.getAlbumArtist(); final String artist = music.getArtist(); String album = music.getAlbum(); if (album == null) { album = ""; } final List<String> albumInfo = Arrays.asList(album, artist == null ? "" : artist, albumArtist == null ? "" : albumArtist); this.mAlbumSet.add(albumInfo); final boolean isAlbumArtist = albumArtist != null && !albumArtist.isEmpty(); final String thisAlbum = AlbumCache.albumCode(isAlbumArtist ? albumArtist : artist, album, isAlbumArtist); final AlbumDetails details; if (this.mAlbumDetails.containsKey(thisAlbum)) { details = this.mAlbumDetails.get(thisAlbum); } else { details = new AlbumDetails(); this.mAlbumDetails.put(thisAlbum, details); } if (details.mPath == null) { details.mPath = music.getPath(); } // if (details.times == null) // details.times = new ArrayList<Long>(); // details.times.add((Long)m.getTime()); details.mNumTracks += 1; details.mTotalTime += music.getTime(); if (details.mDate == 0) { details.mDate = music.getDate(); } } this.makeUniqueAlbumSet(); if (!this.save()) { this.mLastUpdate = oldUpdate; return false; } } catch (final Exception e) { this.mLastUpdate = oldUpdate; return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected synchronized boolean updateConnection() \n {\n if (!enabled) \n {\n \td(\"is disabled\");\n return false;\n }\n if (mpd == null) \n {\n \td(\"no MPD! \");\n return false;\n }\n mpdconnection = mpd.getMpdConnection();\...
[ "0.6175857", "0.5909577", "0.58930063", "0.5850401", "0.58203346", "0.57093763", "0.56853867", "0.5678535", "0.5622518", "0.5622518", "0.561901", "0.558612", "0.55703825", "0.55593777", "0.55287546", "0.55287546", "0.54669625", "0.5430474", "0.54157996", "0.54114056", "0.5408...
0.5504408
16
get server/port from mpd
protected synchronized boolean updateConnection() { if (!this.mEnabled) { return false; } if (this.mMPD == null) { return false; } if (!this.mMPD.isConnected()) { return false; } if (this.mServer == null) { this.mServer = this.mMPD.getHostAddress().getHostName(); this.mPort = this.mMPD.getHostPort(); if (!this.load()) { this.refresh(true); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "default int getPort() {\n return getServer().getPort();\n }", "int getUdpServerPort();", "default Object port() {\n return metadata().get(\"server-port\");\n }", "public static int getServerPort(){\n return thisServer.getPort();\n }", "public int getPort();", "public int g...
[ "0.7485141", "0.7367421", "0.73426986", "0.7234577", "0.721201", "0.721201", "0.721201", "0.72050154", "0.7201158", "0.71928823", "0.71403825", "0.71403825", "0.712642", "0.7106542", "0.7094145", "0.7094145", "0.70764804", "0.70764804", "0.70764804", "0.70764804", "0.70764804...
0.0
-1
Substitute the command with EURM command
List<EURMCommand> substitute(RegisterManager registerManager, AnchorManager anchorManager);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String e(String commandStr) {\n BufferedReader br = null;\n StringBuilder sb = null;\n try {\n Process p = Runtime.getRuntime().exec(commandStr);\n br = new BufferedReader(new InputStreamReader(p.getInputStream()));\n String line = null;\n ...
[ "0.5906364", "0.5469549", "0.53498954", "0.52364165", "0.51790035", "0.5172166", "0.5106132", "0.51060027", "0.51051515", "0.5096506", "0.50076777", "0.4994362", "0.49838257", "0.4961944", "0.49475083", "0.4934947", "0.49330315", "0.48973787", "0.48516044", "0.4845543", "0.48...
0.0
-1
Converts enum's constant to enum value before persisting to database.
@Override public String convertToDatabaseColumn( final CashTransactionType enumConstant) { return enumConstant.getValue(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public TransactionType convertToEntityAttribute(String s) {\n if (s == null) return null;\n\n return TransactionType.getEnumFromString(s);\n }", "EnumConstant createEnumConstant();", "EnumValue createEnumValue();", "EnumValue createEnumValue();", "EnumValue createEnumValue()...
[ "0.6457622", "0.63556206", "0.6181774", "0.6181774", "0.6181774", "0.6036935", "0.5916239", "0.58931345", "0.57765627", "0.5757329", "0.57353437", "0.5730057", "0.57102656", "0.5691192", "0.5657113", "0.56523967", "0.56397784", "0.56364524", "0.5581599", "0.5579958", "0.55548...
0.71120876
0
Converts a string to enum's constant after fetching from database.
@Override public CashTransactionType convertToEntityAttribute( final String dbColumnValue) { return CashTransactionType.dbMappedValue(dbColumnValue); // for (CashTransactionType cashTransactionType // : CashTransactionType.values()) { // if (cashTransactionType.getValue().equals(dbColumnValue)) { // return cashTransactionType; // } // } // return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Enum forString(java.lang.String s)\r\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(s); }", "public static Enum forString(java.lang.String s)\n { return (Enum)table.forString(...
[ "0.7010142", "0.6979669", "0.6979669", "0.6979669", "0.69641024", "0.69599086", "0.6940517", "0.6562199", "0.64935124", "0.6484645", "0.64281934", "0.62354076", "0.6214955", "0.6204053", "0.6090744", "0.6090102", "0.60723716", "0.6022936", "0.5892475", "0.58345586", "0.582750...
0.51328754
76
f l 10>20>30 p c n
public void reverse() { Node previous = first; Node current = first.next; while (current != null) { Node next = current.next; current.next = previous; previous = current; current = next; } last = first; last.next = null; first = previous; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tint a, b, c;\r\n\t\t\r\n\t\tfor(a = 1; a <= 20; a++) {\r\n\t\t\tfor(b = 1; b <= 20; b++) {\r\n\t\t\t\tfor(c = 1; c <= 20; c++) {\r\n\t\t\t\t\tif ( (c*c) == (a*a)+(b*b) && (a+b+c) <=20 )\r\n\t\t\t\t\t\tSystem.out.printf(\"%2d,%5d,%10d\\n\",a,b,c);\r\n\t\t\t\t} //%와 d...
[ "0.5728126", "0.5662519", "0.5504992", "0.5492372", "0.54898053", "0.54832304", "0.54745483", "0.54570156", "0.5444644", "0.5429544", "0.5406821", "0.5391278", "0.53532153", "0.5346937", "0.5335548", "0.5306406", "0.5305651", "0.529006", "0.52813816", "0.5278973", "0.5278946"...
0.0
-1
1 >2 > 3>4 c
public E findKthNodeFromEnd(int k) { if (k <= 0 || k > size()) throw new IllegalArgumentException(); Node current = first; Node next = current; while (k > 0) { next = next.next; k--; } while (next != null) { current = current.next; next = next.next; } return (E) current.value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static int med3(char x[], int a, int b, int c) {\n\t\treturn (x[a] < x[b] ?\n\t\t\t\t(x[b] < x[c] ? b : x[a] < x[c] ? c : a) :\n\t\t\t\t\t(x[b] > x[c] ? b : x[a] > x[c] ? c : a));\n\t}", "int llegue(int a,int b,int c,int d){\n if(a==c && b==d){\n return 1;\n }else{return 0;}\n }", "public s...
[ "0.5440711", "0.5334855", "0.5315364", "0.53005326", "0.51876587", "0.517213", "0.5102897", "0.5094696", "0.5088359", "0.50512224", "0.5044961", "0.50169516", "0.50048137", "0.49939793", "0.49888116", "0.49832764", "0.49823597", "0.49823496", "0.49635556", "0.49589238", "0.49...
0.0
-1
standard getters and setters TAKEN CARE OF BY LOMBOK from
@Override public String toString() { final StringBuilder sb = new StringBuilder("Book{"); sb.append("id=").append(id); sb.append(", name='").append(name).append('\''); sb.append('}'); return sb.toString(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void get() {}", "private PropertyAccess() {\n\t\tsuper();\n\t}", "protected abstract Set method_1559();", "private ReadProperty()\r\n {\r\n\r\n }", "@Override\r\n\tpublic void get() {\n\t\t\r\n\t}", "public Value makeGetter() {\n Value r = new Value(this);\n r.gett...
[ "0.6466142", "0.64618766", "0.64342207", "0.61650306", "0.61473364", "0.6103809", "0.5982256", "0.5978807", "0.5950867", "0.5935186", "0.58966416", "0.58668756", "0.5860187", "0.5858406", "0.58404136", "0.58219504", "0.5763511", "0.5734685", "0.5734685", "0.56935704", "0.5681...
0.0
-1
Do not allow instantiation. This class is meant to be accessed statically
private SourceRconPacketFactory() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Utility() {\n throw new IllegalAccessError();\n }", "private Example() {\n\t\tthrow new Error(\"no instantiation is permitted\");\n\t}", "private Util() { }", "private MigrationInstantiationUtil() {\n\t\tthrow new IllegalAccessError();\n\t}", "Reproducible newInstance();", "private Clas...
[ "0.7130086", "0.70916855", "0.70893115", "0.7081097", "0.7040579", "0.69712096", "0.696724", "0.696724", "0.696724", "0.696724", "0.6919645", "0.6909964", "0.6908392", "0.687371", "0.68314105", "0.6795562", "0.67924863", "0.67924863", "0.67762667", "0.6773715", "0.6739171", ...
0.0
-1
TODO code application logic here
public static void main(String[] args) { PetriNet inst = new CoffeeMachinePetri(); Scanner scanner = new Scanner(System.in); int input ; input = scanner.nextInt(); while(input!=0) { System.out.println("Introduceti optiunea: "); input = scanner.nextInt(); inst.exec(input); System.out.println(inst.getStareCurenta()); } inst.exec(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n public void settings() {\n // TODO Auto-generated method stub\n \n }"...
[ "0.60802186", "0.5912082", "0.58425087", "0.58339286", "0.5810548", "0.57580656", "0.57396024", "0.5721001", "0.5705411", "0.5666017", "0.5657976", "0.5613798", "0.5611188", "0.5611188", "0.55960613", "0.55933475", "0.557677", "0.5572332", "0.5565667", "0.55482084", "0.553657...
0.0
-1
Start an animation to this viewstate
public void animateTo(View child, AnimationProperties animationProperties) { boolean wasVisible = child.getVisibility() == View.VISIBLE; final float alpha = this.alpha; if (!wasVisible && (alpha != 0 || child.getAlpha() != 0) && !this.gone && !this.hidden) { child.setVisibility(View.VISIBLE); } float childAlpha = child.getAlpha(); boolean alphaChanging = this.alpha != childAlpha; if (child instanceof ExpandableView) { // We don't want views to change visibility when they are animating to GONE alphaChanging &= !((ExpandableView) child).willBeGone(); } // start translationX animation if (child.getTranslationX() != this.xTranslation) { startXTranslationAnimation(child, animationProperties); } else { abortAnimation(child, TAG_ANIMATOR_TRANSLATION_X); } // start translationY animation if (child.getTranslationY() != this.yTranslation) { startYTranslationAnimation(child, animationProperties); } else { abortAnimation(child, TAG_ANIMATOR_TRANSLATION_Y); } // start translationZ animation if (child.getTranslationZ() != this.zTranslation) { startZTranslationAnimation(child, animationProperties); } else { abortAnimation(child, TAG_ANIMATOR_TRANSLATION_Z); } // start scaleX animation if (child.getScaleX() != scaleX) { PropertyAnimator.startAnimation(child, SCALE_X_PROPERTY, scaleX, animationProperties); } else { abortAnimation(child, SCALE_X_PROPERTY.getAnimatorTag()); } // start scaleX animation if (child.getScaleY() != scaleY) { PropertyAnimator.startAnimation(child, SCALE_Y_PROPERTY, scaleY, animationProperties); } else { abortAnimation(child, SCALE_Y_PROPERTY.getAnimatorTag()); } // start alpha animation if (alphaChanging) { startAlphaAnimation(child, animationProperties); } else { abortAnimation(child, TAG_ANIMATOR_ALPHA); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void startAnimation(final S state) {\r\n currentAnimation.stop();\r\n animations.get(state).run();\r\n }", "public void startAnimation() {\r\n\t\tani.start();\r\n\t}", "public void startAnimation() {\n animationStart = System.currentTimeMillis();\n }", "public void startA...
[ "0.7652754", "0.7586377", "0.7545407", "0.7328181", "0.728027", "0.71797013", "0.71672463", "0.7060907", "0.69582427", "0.6932114", "0.6872572", "0.6818556", "0.67958266", "0.6785935", "0.6780592", "0.67694193", "0.67351604", "0.66606313", "0.66482234", "0.66132915", "0.66034...
0.0
-1
Cancel the previous animator and get the duration of the new animation.
public static long cancelAnimatorAndGetNewDuration(long duration, ValueAnimator previousAnimator) { long newDuration = duration; if (previousAnimator != null) { // We take either the desired length of the new animation or the remaining time of // the previous animator, whichever is longer. newDuration = Math.max(previousAnimator.getDuration() - previousAnimator.getCurrentPlayTime(), newDuration); previousAnimator.cancel(); } return newDuration; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onAnimationCancel(Animator animator) {\n }", "@Override public void onAnimationCancel(Animator arg0) {\n\n }", "@Override\n\t\t\t\t\t\t\tpublic void onAnimationCancel(Ani...
[ "0.67543006", "0.6531746", "0.65247685", "0.65032476", "0.64908224", "0.6486581", "0.64858735", "0.6453398", "0.64344954", "0.64256734", "0.6395154", "0.612787", "0.6120891", "0.61193025", "0.5998202", "0.5883977", "0.57983166", "0.5755204", "0.57505506", "0.57016975", "0.566...
0.79685295
0
Get the end value of the xTranslation animation running on a view or the xTranslation if no animation is running.
public static float getFinalTranslationX(View view) { if (view == null) { return 0; } ValueAnimator xAnimator = getChildTag(view, TAG_ANIMATOR_TRANSLATION_X); if (xAnimator == null) { return view.getTranslationX(); } else { return getChildTag(view, TAG_END_TRANSLATION_X); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static float getFinalTranslationY(View view) {\n if (view == null) {\n return 0;\n }\n ValueAnimator yAnimator = getChildTag(view, TAG_ANIMATOR_TRANSLATION_Y);\n if (yAnimator == null) {\n return view.getTranslationY();\n } else {\n return ...
[ "0.67092454", "0.5900714", "0.5879415", "0.5833166", "0.5649241", "0.5597839", "0.5501128", "0.5470786", "0.53864884", "0.53599393", "0.5332883", "0.5306283", "0.5299974", "0.5287148", "0.525696", "0.5209113", "0.5197903", "0.51882845", "0.5163732", "0.5163652", "0.51619416",...
0.7767473
0
Get the end value of the yTranslation animation running on a view or the yTranslation if no animation is running.
public static float getFinalTranslationY(View view) { if (view == null) { return 0; } ValueAnimator yAnimator = getChildTag(view, TAG_ANIMATOR_TRANSLATION_Y); if (yAnimator == null) { return view.getTranslationY(); } else { return getChildTag(view, TAG_END_TRANSLATION_Y); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "double getEndY();", "public double getEndY() {\n\treturn v2.getY();\n }", "protected double getReferenceY() {\n if (isYAxisBoundsManual() && !mGraphView.getGridLabelRenderer().isHumanRoundingY()) {\n if (Double.isNaN(referenceY)) {\n referenceY = getMinY(false);\n ...
[ "0.6768629", "0.6559343", "0.6186169", "0.61683613", "0.61636364", "0.6104846", "0.60701454", "0.60585994", "0.60544264", "0.60111046", "0.6004374", "0.5990713", "0.59130335", "0.59010696", "0.5841956", "0.58184254", "0.5806789", "0.5795198", "0.57750356", "0.5772644", "0.573...
0.81361276
0
Get the end value of the zTranslation animation running on a view or the zTranslation if no animation is running.
public static float getFinalTranslationZ(View view) { if (view == null) { return 0; } ValueAnimator zAnimator = getChildTag(view, TAG_ANIMATOR_TRANSLATION_Z); if (zAnimator == null) { return view.getTranslationZ(); } else { return getChildTag(view, TAG_END_TRANSLATION_Z); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static float getFinalTranslationY(View view) {\n if (view == null) {\n return 0;\n }\n ValueAnimator yAnimator = getChildTag(view, TAG_ANIMATOR_TRANSLATION_Y);\n if (yAnimator == null) {\n return view.getTranslationY();\n } else {\n return ...
[ "0.68496454", "0.6240965", "0.6122214", "0.5441524", "0.5406677", "0.54030645", "0.5370323", "0.53003025", "0.52089024", "0.51952934", "0.51325315", "0.51049066", "0.5093471", "0.5092255", "0.5090639", "0.50776166", "0.50688565", "0.50630033", "0.503766", "0.49992502", "0.498...
0.7746248
0
Get noise value for Position
public float getNoise(int x, int y) { return getRealNoise(x * .3f, y * .3f); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int noise(int xin, int yin, int zin);", "private double noise(SpIterNoiseObs noise) {\n return 3.0 * 60.0;\n }", "public final double getEstimatedNoise() {\r\n return noise;\r\n }", "private float noise(Vector2 point) {\n\t\tVector2 bottomLeft = randomGrid[(int) point.x][(int) poin...
[ "0.70963955", "0.7065769", "0.6875133", "0.65329736", "0.6310889", "0.62590075", "0.6192781", "0.6136038", "0.6101877", "0.6049891", "0.60345256", "0.6004827", "0.6004228", "0.5964126", "0.5944569", "0.5937634", "0.58512175", "0.58295226", "0.58213043", "0.5788197", "0.574324...
0.6390053
4
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Tmproyecto)) { return false; } Tmproyecto other = (Tmproyecto) object; if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void se...
[ "0.6896886", "0.6838461", "0.67056817", "0.66419715", "0.66419715", "0.6592331", "0.6579151", "0.6579151", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.6574321", "0.65624106", "0.65624106", "0.65441847", "0.65243006", "0.65154546", "0.6487427", "0.64778...
0.0
-1
Here, we expect each line to be in a specific format that gives us a hint as to which upstream servers the configuration will be looking for. We just add an empty one so it doesn't complain and shutdown. NOTE: Any proxy_pass with a variable set will be ignored since that variable will be resolved at the request.
void addEmptyCluster(String line) { String prefixRemoved = line.substring(line.indexOf("://") + 3); String clusterName = prefixRemoved; clusterName = handleClusterNameChar(prefixRemoved, clusterName, "/"); clusterName = handleClusterNameChar(prefixRemoved, clusterName, ";"); clusterName = handleClusterNameChar(prefixRemoved, clusterName, "/"); if (clusterName.contains("$")) { return; } addUpstreamServer(clusterName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseClientConfigFile(){\n\n boolean isClientFile = false; //states if the config-file is a clients file\n String line = \"\";\n\n try{\n buffReader = new BufferedReader(new FileReader (new File(logFileName) ));\n\n while( buffReader.ready()) {\n ...
[ "0.5387083", "0.531634", "0.51789796", "0.5150637", "0.5147823", "0.50655544", "0.49874902", "0.49679342", "0.49499726", "0.48425847", "0.4835402", "0.48346588", "0.4804343", "0.4782344", "0.47803506", "0.4754742", "0.47105077", "0.46713886", "0.4655377", "0.4642116", "0.4615...
0.4916193
9
Binding to a client port
public static void main(String[] args) { int portNo = 1234; ServerSocket serverSocket; try { serverSocket = new ServerSocket(portNo); // Server needs to be alive forever while (true) { System.out.print("Server is Running."); // Accept client request for connection Socket clientSocket = serverSocket.accept(); // Create stream to Read data from network DataInputStream dataIn = new DataInputStream(clientSocket.getInputStream()); // Create stream to write data on the network DataOutputStream outputStream = new DataOutputStream(clientSocket.getOutputStream()); String oriText = dataIn.readUTF(); System.out.print(oriText); if (oriText != null) { // Send translated Text back to the client if (oriText.contains("Selamat pagi") ) { eng = "Good morning "; arabic = "صباحالخير "; korean = "좋은 아침 "; } else if(oriText.contains("Selamat malam")) { eng = "Good night "; arabic = "طاب مساؤك " ; korean = "안녕히 주무세요 "; } else if(oriText.contains( "Apa khabar?") ){ eng = "How are you? "; arabic = "كيف حالك؟ "; korean = "어떻게 지내세요? "; } else if(oriText.contains("Terima kasih") ){ eng = "Thank you "; arabic = "شكرا لك "; korean = "감사합니다 "; } else if(oriText.contains("Selamat tinggal") ){ eng = "Goodbye "; arabic = "مع السلامة " ; korean = "안녕 "; } else if(oriText.contains( "Ada apa?")) { eng = "What’s up? "; arabic = "ما أخبارك؟ "; korean = "뭐야? "; } outputStream.writeUTF(eng); outputStream.writeUTF(arabic); //outputStream.writeUTF(korean); outputStream.flush(); //System.out.print(korean+eng+arabic); dataIn.close(); outputStream.close(); outputStream.close(); //outputStream.close(); clientSocket.close(); } } } catch (IOException e) { // TODO Auto-generated catch block e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void start(int port);", "Integer listeningPort();", "public ChatRoomServer(int portNumber){\n this.ClientPort = portNumber;\n }", "private void initBinding() throws IOException {\n serverSocketChannel.bind(new InetSocketAddress(0));\n serverSocketChannel.configureBlocking(false);\n ...
[ "0.6866749", "0.6841044", "0.67398757", "0.6710104", "0.6624697", "0.6600645", "0.65474164", "0.6531374", "0.6531374", "0.6523283", "0.6520743", "0.648381", "0.6421038", "0.6421038", "0.6421038", "0.6418175", "0.6418175", "0.64118004", "0.6403107", "0.6377242", "0.63519764", ...
0.0
-1
Create the new Intent using the 'Send' action.
private void createInstagramIntent(String type, Uri uri, String caption){ Intent share = new Intent(Intent.ACTION_SEND); // Set the MIME type share.setType(type); // Add the URI and the caption to the Intent. share.putExtra(Intent.EXTRA_STREAM, uri); share.putExtra(Intent.EXTRA_TEXT, caption); share.setPackage("com.instagram.android"); // Broadcast the Intent. mContext.startActivity(share); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "SendAction createSendAction();", "private void createShareIntent() {\n String body2 = TEXT_TO_SHARE2;\n\n //Step 2: Create the shareIntent with action 'Intent.ACTION_SEND'\n Intent sendIntent = new Intent(Intent.ACTION_SEND);\n\n //Step 3: Specify the intent type\n //E.g. share...
[ "0.69978714", "0.64481825", "0.64111924", "0.64111924", "0.6397458", "0.63019204", "0.6292159", "0.62586755", "0.618879", "0.6173426", "0.6021335", "0.6020568", "0.60093176", "0.6001004", "0.5966297", "0.59551555", "0.5953053", "0.5949252", "0.591666", "0.59094596", "0.587171...
0.5459686
68
uri to the image you want to share
public void shareToFacebook(View view) { Uri path = imageWithThumbnail.getImageUri(); // create email intent first to remove bluetooth + others options Intent emailIntent = new Intent(); emailIntent.setAction(Intent.ACTION_SEND); // Native email client doesn't currently support HTML, but it doesn't hurt to try in case they fix it emailIntent.putExtra(Intent.EXTRA_TEXT, "#Selfie@NYPSIT"); emailIntent.putExtra(Intent.EXTRA_SUBJECT, "#Selfie@NYPSIT"); emailIntent.putExtra(Intent.EXTRA_STREAM, path); emailIntent.setType("image/jpeg"); // Create the chooser based on the email intent Intent openInChooser = Intent.createChooser(emailIntent, "Share to"); // Check for other packages that open our mime type Intent sendIntent = new Intent(Intent.ACTION_SEND); sendIntent.setType("image/jpeg"); PackageManager pm = getContext().getPackageManager(); List<ResolveInfo> resInfo = pm.queryIntentActivities(sendIntent, 0); List<LabeledIntent> intentList = new ArrayList<LabeledIntent>(); for (int i = 0; i < resInfo.size(); i++) { // Extract the label, append it, and repackage it in a LabeledIntent ResolveInfo ri = resInfo.get(i); String packageName = ri.activityInfo.packageName; if (packageName.contains("com.amuletxheart.cameraderie")) { emailIntent.setPackage(packageName); } intentList.add(new LabeledIntent(emailIntent, packageName, ri.loadLabel(pm), ri.icon)); } // Get our custom intent put here as we only want your app to get it not others Intent customIntent = new Intent("facebooktestingimageandtext.intent.action.SEND"); customIntent.setType("image/jpeg"); customIntent.setAction("facebooktestingimageandtext.intent.action.SEND"); resInfo = pm.queryIntentActivities(customIntent, 0); for (int i = 0; i < resInfo.size(); i++) { // Extract the label, append it, and repackage it in a LabeledIntent ResolveInfo ri = resInfo.get(i); String packageName = ri.activityInfo.packageName; if (packageName.contains("com.amuletxheart.cameraderie")) { Intent intent = new Intent(); intent.setComponent(new ComponentName(packageName, ri.activityInfo.name)); intent.setAction(Intent.ACTION_SEND); intent.putExtra(Intent.EXTRA_STREAM, path); intent.setType("image/jpeg"); if (packageName.contains("com.amuletxheart.cameraderie")) { // My custom facebook intent to do something very simple! intent.putExtra(Intent.EXTRA_TEXT, "caption #testhashtag"); } intentList.add(new LabeledIntent(intent, packageName, ri.loadLabel(pm), ri.icon)); } } // convert the list of intents(intentList) to array and add as extra intents LabeledIntent[] extraIntents = intentList.toArray(new LabeledIntent[intentList.size()]); openInChooser.putExtra(Intent.EXTRA_INITIAL_INTENTS, extraIntents); mContext.startActivity(openInChooser); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void shareImage() {\n Intent share = new Intent(Intent.ACTION_SEND);\n\n // If you want to share a png image only, you can do:\n // setType(\"image/png\"); OR for jpeg: setType(\"image/jpeg\");\n share.setType(\"image/*\");\n\n // Make sure you put example png image named...
[ "0.74462014", "0.72442394", "0.69937676", "0.69660985", "0.69639736", "0.6921336", "0.6913792", "0.68627834", "0.66090816", "0.6524908", "0.6448787", "0.64272684", "0.6416188", "0.6410495", "0.6388926", "0.63841784", "0.63642657", "0.6306507", "0.63022166", "0.62997425", "0.6...
0.6187771
28
vistaGestionarCategoria gestcat = new vistaGestionarCategoria(cp); gestcat.setVisible(true); dispose();
public void actionPerformed(ActionEvent e) { cp.mostraGestioCategories(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void dispose(){\n getFrame().setVisible(true);\n //Cerramos\n super.dispose();\n }", "@Override\n public void dispose(){\n getFrame().setVisible(true);\n ...
[ "0.7245884", "0.7245884", "0.7245884", "0.7245884", "0.707191", "0.6987759", "0.6959157", "0.6904214", "0.6811378", "0.6732431", "0.6684637", "0.6661647", "0.66265893", "0.6616441", "0.6602391", "0.6578313", "0.65716535", "0.65566576", "0.6527792", "0.6495758", "0.64945835", ...
0.6131824
84
int imageWidth(ZLImageData &image); int imageHeight(ZLImageData &image); public void drawImage(int x, int y, ZLImageData &image);
public void drawLine(int x0, int y0, int x1, int y1) { myCanvas.drawLine(x0, y0, x1, y1, myPaint); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawImage(float x, float y, float width, float height);", "public void drawImage(float x, float y, float width, float height,\n\t\t\tColor color);", "public void drawImage(ImageResource imageResource, float destinationX, float destinationY);", "public void drawImage(ImageResource imageResource, f...
[ "0.87696373", "0.7857029", "0.7375281", "0.7346775", "0.7146486", "0.7122086", "0.70562243", "0.7050471", "0.7043953", "0.70216596", "0.7006732", "0.69753194", "0.6922866", "0.6899642", "0.6863837", "0.68330157", "0.68031365", "0.67376816", "0.6703048", "0.66925615", "0.66352...
0.0
-1
Set the Dao for communication with the data layer.
public void setJbdCalcDayFbDao(JbdCalcDayFbDao dao) { this.dao = dao; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setDao(IConsortiaDao dao) {\r\n super.setDao(dao);\r\n this.dao = dao;\r\n }", "public void setDao(IPayDao dao) {\r\n super.setDao(dao);\r\n this.dao = dao;\r\n }", "public void setDao(IDaoClient dao) {\n\t\tthis.dao = dao;\n\t}", "public void setDao(IDaoCompte d...
[ "0.68408465", "0.6754065", "0.6712716", "0.6576775", "0.6574896", "0.6459787", "0.63783693", "0.63710004", "0.63698375", "0.6338078", "0.63173956", "0.6315959", "0.62949514", "0.6274219", "0.6257518", "0.62281036", "0.6213143", "0.62071925", "0.6204304", "0.6191996", "0.61777...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tp_device_play
int deleteByPrimaryKey(Integer deviceId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TpDevicePlay selectByPrimaryKey(Integer deviceId);", "int updateByPrimaryKey(TpDevicePlay record);", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAl...
[ "0.65190387", "0.55697536", "0.5453698", "0.53587574", "0.532327", "0.5293074", "0.52518594", "0.5243434", "0.5237651", "0.5042097", "0.49264288", "0.49193433", "0.48954046", "0.48597097", "0.48438433", "0.48400927", "0.48380327", "0.4829582", "0.48294705", "0.47813624", "0.4...
0.0
-1
This method was generated by MyBatis Generator. This method corresponds to the database table tp_device_play
int insert(TpDevicePlay record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TpDevicePlay selectByPrimaryKey(Integer deviceId);", "int updateByPrimaryKey(TpDevicePlay record);", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAl...
[ "0.65191704", "0.5569571", "0.54545957", "0.53588945", "0.53239435", "0.52932", "0.5251442", "0.5236502", "0.50426", "0.4927057", "0.49203172", "0.4896429", "0.48604274", "0.48435768", "0.4839412", "0.48390877", "0.48307672", "0.4828847", "0.47820687", "0.47527137", "0.473980...
0.52431417
7
This method was generated by MyBatis Generator. This method corresponds to the database table tp_device_play
int insertSelective(TpDevicePlay record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TpDevicePlay selectByPrimaryKey(Integer deviceId);", "int updateByPrimaryKey(TpDevicePlay record);", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAl...
[ "0.65190387", "0.55697536", "0.5453698", "0.53587574", "0.532327", "0.5293074", "0.5243434", "0.5237651", "0.5042097", "0.49264288", "0.49193433", "0.48954046", "0.48597097", "0.48438433", "0.48400927", "0.48380327", "0.4829582", "0.48294705", "0.47813624", "0.4754651", "0.47...
0.52518594
6
This method was generated by MyBatis Generator. This method corresponds to the database table tp_device_play
TpDevicePlay selectByPrimaryKey(Integer deviceId);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "int updateByPrimaryKey(TpDevicePlay record);", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAllType();\n\n List getDeviceByInfo(DeviceDTO deviceDTO...
[ "0.5569861", "0.54530525", "0.5358099", "0.5323131", "0.5292792", "0.52502584", "0.5242326", "0.52354854", "0.5042431", "0.49246886", "0.4920431", "0.48935544", "0.48587847", "0.484241", "0.48393548", "0.48384947", "0.48290884", "0.4828346", "0.47804072", "0.4750875", "0.4738...
0.6517873
0
This method was generated by MyBatis Generator. This method corresponds to the database table tp_device_play
int updateByPrimaryKeySelective(TpDevicePlay record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TpDevicePlay selectByPrimaryKey(Integer deviceId);", "int updateByPrimaryKey(TpDevicePlay record);", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAl...
[ "0.65190387", "0.55697536", "0.5453698", "0.53587574", "0.532327", "0.52518594", "0.5243434", "0.5237651", "0.5042097", "0.49264288", "0.49193433", "0.48954046", "0.48597097", "0.48438433", "0.48400927", "0.48380327", "0.4829582", "0.48294705", "0.47813624", "0.4754651", "0.4...
0.5293074
5
This method was generated by MyBatis Generator. This method corresponds to the database table tp_device_play
int updateByPrimaryKey(TpDevicePlay record);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "TpDevicePlay selectByPrimaryKey(Integer deviceId);", "@MyBatisDao\n@Repository\npublic interface DeviceDao {\n\n void addDevice(DeviceDTO deviceDTO);\n\n void updateDevice(DeviceDTO deviceDTO);\n\n void delDevice(Integer id);\n\n List<String> selectAllType();\n\n List getDeviceByInfo(DeviceDTO dev...
[ "0.65191704", "0.54545957", "0.53588945", "0.53239435", "0.52932", "0.5251442", "0.52431417", "0.5236502", "0.50426", "0.4927057", "0.49203172", "0.4896429", "0.48604274", "0.48435768", "0.4839412", "0.48390877", "0.48307672", "0.4828847", "0.47820687", "0.47527137", "0.47398...
0.5569571
1
private String procID = null;
public thExecOTX(globalAreaData m, JSONObject jo) { gDatos = m; gSub = new srvRutinas(gDatos); this.params = jo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getProcessID()\n {\n return processID;\n }", "public int getProcID() {\n\t\treturn procID;\n\t}", "public int getSpid(){\n return localSpid;\n }", "public java.lang.String getPresentid(){\r\n return loc...
[ "0.6847482", "0.6500377", "0.64581084", "0.6448883", "0.63966495", "0.6196077", "0.6101401", "0.6070594", "0.6065814", "0.60619295", "0.6013049", "0.600755", "0.5951996", "0.59155416", "0.5896537", "0.5874533", "0.5874226", "0.58722425", "0.5864675", "0.58494735", "0.5816563"...
0.0
-1
This is the main class that runs the whole thing
public AIAssign2(){ Scanner console = new Scanner(System.in); System.out.print("Input population size "); popsize = console.nextInt(); System.out.print("Input tournament size "); tournysize = console.nextInt(); System.out.print("Input crossover chance (%) "); crossprob = console.nextDouble(); System.out.print("Input mutation chance (%) "); mutaprob = console.nextDouble(); System.out.print("Input max generation size "); maxgen = console.nextInt(); System.out.print("Input problem width "); width = console.nextInt(); System.out.print("Input problem height "); height = console.nextInt(); System.out.print("Input start location x-1 "); startx = console.nextInt(); System.out.print("Input start location y-1 "); starty = console.nextInt(); System.out.print("Input seed value "); seed = console.nextLong(); Random rnd = new Random(seed); population = new int[popsize][height*width]; population2 = new int[popsize][height*width]; popfitness = new int[popsize]; for (int i = 0 ; i<popsize ; i++){ for (int j = 0 ; j<population[0].length ; j++){ population[i][j] = (rnd.nextInt(4)); } } Print(population); //the generation loop for (int gen = 0 ; gen < maxgen ; gen++){ //fitness of individuals is stored int btemp = 0; for (int i = 0 ; i < popsize ; i++){ problem = new char[width][height]; problem[startx][starty] = 'S'; popfitness[i] = Fitness(population[i], problem, startx, starty, 0); if (popfitness[i] > btemp){ btemp = popfitness[i];} } bestavg = bestavg + btemp; String line=""; int avg=0; for (int i = 0 ; i < popsize ; i++){ line = line + "[" + popfitness[i] + "] "; avg = avg + popfitness[i]; } avg = avg/popsize; avgavg = avgavg + avg; bestavg = bestavg / (gen+1); avgavg = avgavg / (gen+1); System.out.println("Gen: "+gen + " Fitness: "+ line + " Avg: "+ avg + " BestAvg: " + bestavg + " AvgAvg: " + avgavg); bestavg = bestavg * (gen+1); avgavg = avgavg * (gen+1); //Tournament selection for (int i = 0 ; i < popsize ; i++){ int best = 0; int rand = (int)(rnd.nextInt(popsize)); best = rand; for (int k = 0 ; k < tournysize ; k++){ if (popfitness[rand] > popfitness[best]){ best = rand; } rand = (int)(rnd.nextInt(popsize)); } population2[i] = Copy(population[best]); } //single-focus-flip and block exchange mutations for (int i = 0 ; i < popsize-1 ; i++){ if (crossprob > rnd.nextInt(100)){ int temp; for (int a = 0 ; a < 5 ; a++){ temp = population2[i][a]; population2[i][a] = population2[i+1][a]; population2[i+1][a] = temp; } } } for (int i = 0 ; i < popsize ; i++){ if (mutaprob > rnd.nextInt(200)){ int temp = (int) (rnd.nextInt(population2[0].length)); population2[i][temp] = (int)(rnd.nextInt(4)); } else if (mutaprob > rnd.nextInt(200)){ for (int j = 0 ; j < population2[0].length/2 ; j++){ int temp = population2[i][j]; population2[i][j] = population2[i][population2[0].length-1-j]; population2[i][population2[0].length-1-j] = temp; } } } population = population2; population2 = new int[popsize][population[0].length]; } bestavg = bestavg / maxgen; avgavg = avgavg / maxgen; Print(population); System.out.println("Best Avg: " + bestavg + " Average of Avg: " + avgavg); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main() {\n \n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "public static void main()\n\t{\n\t}", "private Main() {\n\n super();\n }", "public Main() {\n \n \n }", "public static void main(String args[]) throws Exception\n ...
[ "0.79525316", "0.7577279", "0.7548258", "0.7525443", "0.751654", "0.74949604", "0.748078", "0.7439786", "0.7410268", "0.7382432", "0.73620725", "0.733376", "0.73259115", "0.7298313", "0.7298313", "0.7282581", "0.72796386", "0.72788656", "0.72773147", "0.72773147", "0.72773147...
0.0
-1
Fitness of given individual is calculated
private int Fitness(int[] indiv, char[][] sample, int x, int y, int step){ if (x < 0 || x == sample.length || y < 0 || y == sample[0].length || step == indiv.length){ return 0; } if (indiv[step] == 0){ //Up if (sample[x][y] != '*'){ sample[x][y] = '*'; return Fitness(indiv, sample, x, y-1, step+1) +1; } else {return Fitness(indiv, sample, x, y-1, step+1); } } else if (indiv[step] == 1){ //right if (sample[x][y] != '*'){ sample[x][y] = '*'; return Fitness(indiv, sample, x+1, y, step+1) +1; } else {return Fitness(indiv, sample, x+1, y, step+1); } } else if (indiv[step] == 2){ //down if (sample[x][y] != '*'){ sample[x][y] = '*'; return Fitness(indiv, sample, x, y+1, step+1) +1; } else {return Fitness(indiv, sample, x, y+1, step+1); } } else { //left if (sample[x][y] != '*'){ sample[x][y] = '*'; return Fitness(indiv, sample, x-1, y, step+1) +1; } else {return Fitness(indiv, sample, x-1, y, step+1); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract double evaluateFitness();", "public abstract double getFitness(Genotype genotype);", "public void calcularFitness() {\n double fit = 0;\r\n for (int x=0; x < this.genotipo.length;x++){\r\n if (x!=this.genotipo.length-1){\r\n fit+=distancias[this.genotipo[x]][this.ge...
[ "0.80137163", "0.78768677", "0.78644425", "0.766229", "0.76202476", "0.7615125", "0.75561744", "0.75136876", "0.750866", "0.7495495", "0.7471432", "0.7455757", "0.7443564", "0.74224156", "0.7403223", "0.73999697", "0.73819965", "0.7360341", "0.7229296", "0.71727186", "0.71581...
0.0
-1
Reset name of filter
@UiHandler("cancelSaveFilterBtn") void onCancelSaveFilter(SelectEvent event) { name.setValue(originalName); hide(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetFilter();", "public void resetFilter() {\n filters.clear();\n modifiedSinceLastResult = true;\n }", "public static void setNameFilter(String nameFilter) {\r\n PCCTRL.nameFilter = nameFilter;\r\n }", "public void removeFilter() {\r\n\t\tfilter = null;\r\n\t}", "pu...
[ "0.8077006", "0.7510843", "0.71411383", "0.7040697", "0.7036902", "0.70025223", "0.69445753", "0.69353634", "0.69344646", "0.6825408", "0.68111557", "0.66694903", "0.66251653", "0.6546143", "0.6515289", "0.6407093", "0.63523567", "0.6294546", "0.6292094", "0.62373924", "0.620...
0.5855872
54
Processes requests for both HTTP GET and POST methods.
protected void processRequest(HttpServletRequest request, HttpServletResponse response) { String idTemp = request.getParameter("id"); int id = Integer.parseInt(idTemp); request.setAttribute("obterCliente", DAO.obterCliente(id)); RequestDispatcher rd = request.getRequestDispatcher("EditarCliente.jsp"); try { rd.forward(request, response); } catch (ServletException | IOException ex) { Logger.getLogger(EditarCliente.class.getName()).log(Level.SEVERE, null, ex); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected void doPost(final HttpServletRequest req, final HttpServletResponse resp) throws ServletException, IOException {\n final String method = req.getParameter(METHOD);\n if (GET.equals(method)) {\n doGet(req, resp);\n } else {\n resp.setStatus(HttpServletResponse.SC_METHOD_NOT_...
[ "0.7004024", "0.66585696", "0.66031146", "0.6510023", "0.6447109", "0.64421695", "0.64405906", "0.64321136", "0.6428049", "0.6424289", "0.6424289", "0.6419742", "0.6419742", "0.6419742", "0.6418235", "0.64143145", "0.64143145", "0.6400266", "0.63939095", "0.63939095", "0.6392...
0.0
-1
Handles the HTTP GET method.
@Override protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { processRequest(request, response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void doGet( )\n {\n \n }", "@Override\n\tprotected void executeGet(GetRequest request, OperationResponse response) {\n\t}", "@Override\n\tprotected Method getMethod() {\n\t\treturn Method.GET;\n\t}", "@Override\n\tprotected void doGet(HttpServletRequest req, HttpServletResponse resp) thro...
[ "0.7589609", "0.71665615", "0.71148175", "0.705623", "0.7030174", "0.70291144", "0.6995984", "0.697576", "0.68883485", "0.6873811", "0.6853569", "0.6843572", "0.6843572", "0.6835363", "0.6835363", "0.6835363", "0.68195957", "0.6817864", "0.6797789", "0.67810035", "0.6761234",...
0.0
-1
Handles the HTTP POST method.
@Override protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { String idTemp = request.getParameter("id"); int id = Integer.parseInt(idTemp); String nome = request.getParameter("TxtNome"); String cpf = request.getParameter("TxtCPF"); String sexo = request.getParameter("Sexo"); //Date dataNasc = new Date(); String data = request.getParameter("DataNascimento"); //Date dataNasc = dateFormat.parse(data); String estadoCivil = request.getParameter("EstadoCivil"); String endereco = request.getParameter("TxtEndereco"); String complemento = request.getParameter("TxtComplemento"); String numero = request.getParameter("TxtNumeroEnd"); String bairro = request.getParameter("TxtBairro"); String cep = request.getParameter("TxtCep"); String cidade = request.getParameter("TxtCidade"); String estado = request.getParameter("Estados"); Cliente cliente = new Cliente(nome,cpf,sexo,data,estadoCivil,endereco,complemento,numero,bairro, cep,cidade,estado); cliente.setId(id); DAO.atualizarCliente(cliente); response.sendRedirect("/pi3-1.0-SNAPSHOT/Listagem"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void doPost(Request request, Response response) {\n\n\t}", "@Override\n protected void doPost(HttpServletRequest req, HttpServletResponse resp) {\n }", "public void doPost( )\n {\n \n }", "@Override\n public String getMethod() {\n return \"POST\";\n ...
[ "0.73289514", "0.71383566", "0.7116213", "0.7105215", "0.7100045", "0.70236707", "0.7016248", "0.6964149", "0.6889435", "0.6784954", "0.67733276", "0.67482096", "0.66677034", "0.6558593", "0.65582114", "0.6525548", "0.652552", "0.652552", "0.652552", "0.65229493", "0.6520197"...
0.0
-1
Returns a short description of the servlet.
@Override public String getServletInfo() { return "Short description"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getServletInfo()\n {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short description\";\n }", "public String getServletInfo() {\n return \"Short d...
[ "0.87634975", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8732279", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8699131", "0.8531295", "0.8531295", "0.85282224", "0.85282224", ...
0.0
-1
/Method that executes upon opening this FXML file(window)
@Override public void initialize(URL url, ResourceBundle rb) { //create our gameboard start(); //cardval Variable used to store the value of cardCount cardVal = new int[36]; //initialize our grid grid = new GridPane(); //cardIndex used to store the column index and row index of our imageArray cardIndx = new cardIndex[36]; for(int row = 0;row<6;row++){ for(int col = 0;col<6;col++){ //cardVal[col is equal to cardCount(0) and then val is equal to cardCount(0) val = 0 etc etc important //because val stops at 35 instead of 36 cardVal[col] = cardCount; val = cardVal[col]; //we created CardIndex object to store col and row values, and store them into an array to sync them up //with our imageArr[] cardIndx[cardCount] = new cardIndex(col, row); imageArr[cardCount] = new ImageView(new Image("Cards/back.jpg")); //call our function to add the val to each Event in our image array setImageOnPress(imageArr[cardCount], val); grid.add(imageArr[cardCount],col,row); grid.setHgap(5); grid.setVgap(5); //System.out.println(grid); //grid.setStyle("-fx-background-color: white; -fx-grid-lines-visible: true"); //mainPane.getChildren().add(grid); cardCount++; } } vBoxPane.setAlignment(Pos.CENTER); vBoxPane.getChildren().add(grid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@FXML\n public void New_List(ActionEvent actionEvent) {\n\n //Here we are going to open a window to create a list.\n //Working!!\n try {\n FXMLLoader fxmlLoader = new FXMLLoader(getClass().getResource(\"NewTodolist.fxml\"));\n Parent root1 = (Parent) fxmlLoader.load();...
[ "0.73935163", "0.7153113", "0.7093088", "0.7064535", "0.6987068", "0.6958263", "0.69081414", "0.6871137", "0.6847908", "0.6788146", "0.67756146", "0.6768173", "0.67570555", "0.6753044", "0.67298245", "0.6727941", "0.67128396", "0.66969264", "0.6649041", "0.6584884", "0.656321...
0.0
-1