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
Create a new week for a batch
@RequestMapping(value = "/week/new", method = RequestMethod.POST, consumes = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Long> createWeek( @RequestBody @Valid Week week ) { ResponseEntity<Long> returnEntity; try { returnEntity = new ResponseEntity<>(businessDelegate.createWeek(week), HttpStatus.CREATED); } catch (RuntimeException e) { returnEntity = new ResponseEntity<>(HttpStatus.BAD_REQUEST); } return returnEntity; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void generateWeeklySchedule(){\r\n for (int i = 0; i < numDayWorkWeek; i++)\r\n weeklySchedule.get(i).clear();\r\n\r\n int day = 0;\r\n int workHrs = 0;\r\n\r\n for (Task unfinishedTask: unfinished){\r\n if (day > numDayWorkWeek - 1) break;\r\n\r\n //if there is room for this task...
[ "0.65875065", "0.6558347", "0.65580714", "0.6380558", "0.6037874", "0.6023578", "0.58379006", "0.5832478", "0.5749997", "0.5721655", "0.5639546", "0.56266546", "0.55719304", "0.55510587", "0.5527126", "0.5523246", "0.55103236", "0.5507955", "0.5492847", "0.5482466", "0.547365...
0.6107663
4
Make sure popular links panel is on the homepage
@Override public void performTestCase() throws InterruptedException { assertTrue(waitAndGetElement(new ByXPath(popularLinksPanelId)).isDisplayed()); //click to UrlMaps page waitAndGetElement(new ByXPath(urlMapsLinkId)).click(); //validate urlMaps page contains data assertTrue(waitAndGetElement(new ByXPath(urlMapsPanelId)).isDisplayed()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isHomeLinkPresent() {\r\n\t\treturn isElementPresent(groupListSideBar.replace(\"Group List\", \"Home\"), SHORTWAIT);\r\n\t}", "boolean hasHasInstitutionHomePage();", "public boolean hasLinkPanel(ItemStack page);", "public void userIsOnHomePage(){\n\n assertURL(\"\\\"https://demo.nopcomm...
[ "0.6768518", "0.639202", "0.6329185", "0.6271072", "0.6158297", "0.61185116", "0.61052835", "0.6080955", "0.60260934", "0.59024435", "0.5855887", "0.5815508", "0.581216", "0.5786235", "0.57779056", "0.57753664", "0.57570004", "0.57506835", "0.57181036", "0.57181036", "0.57078...
0.0
-1
Tira ele dos grupos em que estah
public static void Remover(ChatSkeleton user) { for (Grupo b : ListaOnline.getGrupos()) { for (Usuario u : b.getGrupo()) { if (u.equals(user.getUser())) { b.getGrupo().remove(user.getUser()); } } } for (ChatSkeleton u : ListaOnline.getTodos()) { if (u.equals(user)) { ListaOnline.getTodos().remove(user); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);", "public void buscarGrado() {\n \tGrado grado = new Grado();\n \tgrado.setDescripcionSeccion(\"Primaria\");\n \tgrado.setNumGrado(4);\n \tgrado.setDescripcionUltimoGrado(\"NO\");\n \tString respuesta = negocio.buscarGrado(\"\", grado);\n ...
[ "0.71384245", "0.6910704", "0.68548", "0.64479995", "0.6398929", "0.6303028", "0.62719953", "0.6225404", "0.6165996", "0.616413", "0.6126549", "0.6092096", "0.6061155", "0.60437083", "0.6040832", "0.60344577", "0.59764737", "0.59674376", "0.59265316", "0.59151405", "0.5898921...
0.0
-1
Creates new form WCreateExam
public WCreateExam() { initComponents(); setLocationRelativeTo(null); this.setExamID(); this.updateTable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static AssessmentCreationForm openFillCreationForm(Assessment assm) {\n openCreationSearchForm(Roles.STAFF, WingsTopMenu.WingsStaffMenuItem.P_ASSESSMENTS, Popup.Create);\n\n Logger.getInstance().info(\"Fill out the required fields with valid data\");\n AssessmentCreationForm creationFor...
[ "0.646293", "0.62106127", "0.60245466", "0.60163295", "0.59857255", "0.5913901", "0.5814856", "0.57741356", "0.5720033", "0.5711805", "0.5692251", "0.56665283", "0.5635106", "0.562927", "0.56092143", "0.55785084", "0.5569844", "0.55604005", "0.5507355", "0.5501129", "0.550076...
0.70548064
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jPanel2 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); tfExamID = new javax.swing.JTextField(); jLabel2 = new javax.swing.JLabel(); jdtYear = new com.toedter.calendar.JYearChooser(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); cmbMonth = new mysd.C_CMBMonth(); cmbType = new mysd.C_CMBExamType(); jScrollPane1 = new javax.swing.JScrollPane(); tblExams = new javax.swing.JTable(); btnUpdate = new javax.swing.JButton(); btnEdit = new javax.swing.JButton(); btnSave = new javax.swing.JButton(); jLabel5 = new javax.swing.JLabel(); tfStartDate = new acr.component.CDateField(); tfEndDate = new acr.component.CDateField(); jLabel6 = new javax.swing.JLabel(); tfExamIDED = new javax.swing.JTextField(); setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); jLabel1.setText("Exam ID"); tfExamID.setFont(new java.awt.Font("Tahoma", 1, 18)); tfExamID.setHorizontalAlignment(javax.swing.JTextField.CENTER); tfExamID.setEnabled(false); jLabel2.setText("Exam Type"); jdtYear.addPropertyChangeListener(new java.beans.PropertyChangeListener() { public void propertyChange(java.beans.PropertyChangeEvent evt) { jdtYearPropertyChange(evt); } }); jLabel3.setText("Exam Month"); jLabel4.setText("Exam Year"); javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2); jPanel2.setLayout(jPanel2Layout); jPanel2Layout.setHorizontalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jLabel2) .addComponent(jLabel3) .addComponent(jLabel1) .addComponent(jLabel4)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tfExamID, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE) .addComponent(jdtYear, javax.swing.GroupLayout.PREFERRED_SIZE, 91, javax.swing.GroupLayout.PREFERRED_SIZE))) .addGroup(jPanel2Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(cmbType, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE) .addComponent(cmbMonth, javax.swing.GroupLayout.DEFAULT_SIZE, 184, Short.MAX_VALUE)))) .addContainerGap()) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(19, 19, 19) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel1) .addComponent(tfExamID, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel2) .addComponent(cmbType, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3) .addComponent(cmbMonth, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(19, 19, 19) .addComponent(jLabel4)) .addGroup(jPanel2Layout.createSequentialGroup() .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jdtYear, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE))) .addContainerGap(16, Short.MAX_VALUE)) ); tblExams.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null, null, null}, {null, null, null, null, null, null}, {null, null, null, null, null, null}, {null, null, null, null, null, null} }, new String [] { "Exam ID", "Exam Type", "Month", "Year", "Start Date", "End Date" } )); tblExams.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { tblExamsMouseClicked(evt); } }); jScrollPane1.setViewportView(tblExams); btnUpdate.setText("Update"); btnUpdate.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnUpdateActionPerformed(evt); } }); btnEdit.setText("Edit"); btnEdit.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnEditActionPerformed(evt); } }); btnSave.setText("Save"); btnSave.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnSaveActionPerformed(evt); } }); jLabel5.setText("Start Date"); jLabel6.setText("End Date"); tfExamIDED.setEditable(false); 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(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(btnUpdate)) .addGroup(layout.createSequentialGroup() .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 70, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addComponent(jLabel5) .addComponent(jLabel6)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(tfEndDate, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(tfStartDate, javax.swing.GroupLayout.PREFERRED_SIZE, 123, javax.swing.GroupLayout.PREFERRED_SIZE)))) .addGap(27, 27, 27)) .addGroup(layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 605, Short.MAX_VALUE) .addContainerGap()) .addGroup(layout.createSequentialGroup() .addComponent(tfExamIDED, javax.swing.GroupLayout.PREFERRED_SIZE, 166, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap(451, Short.MAX_VALUE)))) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnUpdate, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(btnEdit, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE)) .addComponent(btnSave, javax.swing.GroupLayout.PREFERRED_SIZE, 39, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(62, 62, 62) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(tfStartDate, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(tfEndDate, javax.swing.GroupLayout.PREFERRED_SIZE, 25, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6))) .addGroup(layout.createSequentialGroup() .addGap(15, 15, 15) .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 34, Short.MAX_VALUE) .addComponent(tfExamIDED, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 98, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) ); 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.7321233", "0.72922724", "0.72922724", "0.72922724", "0.7287021", "0.7250113", "0.7214902", "0.7209478", "0.71973455", "0.71915394", "0.71855843", "0.71602577", "0.7149222", "0.70949143", "0.70813066", "0.70579875", "0.6988272", "0.6978623", "0.6956488", "0.6954857", "0.694...
0.0
-1
dataimport menu choose file
public PIMPage()throws IOException { PageFactory.initElements(driver,this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void getDataFromFileOptionsOpen(ActionEvent event) throws Exception {\n\n //file choose\n FileChooser fileChooser = new FileChooser();\n SelectFileButton.setOnAction(e -> {\n try {\n FileImportNameTxtF.clear();\n File selectedFile = fileChooser.s...
[ "0.6715237", "0.6604768", "0.6521698", "0.64338666", "0.63294756", "0.6301105", "0.6294575", "0.6255624", "0.6253851", "0.62528974", "0.6196753", "0.61965793", "0.61751175", "0.6173541", "0.6164892", "0.6161224", "0.6152054", "0.6083292", "0.60170025", "0.6002604", "0.5990654...
0.0
-1
public T value; // OBSOLETE
public UnitObject(TimeInterval _interval, T _value) { this.interval = _interval; // this.value = _value; fun = new ConstantFunction<T>(_value); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getValue()\n {\n return value;\n }", "T value();", "public void setValue(T value) {\n/* 134 */ this.value = value;\n/* */ }", "public void setValue(T value) {\n/* 89 */ this.value = value;\n/* */ }", "public T value() {\n\t\treturn value;\n\t}", "public T get() {\n r...
[ "0.775646", "0.7708808", "0.7702368", "0.7684134", "0.7591462", "0.7555517", "0.7555517", "0.7541886", "0.7488189", "0.7401372", "0.7393616", "0.7380875", "0.735833", "0.734874", "0.734874", "0.734874", "0.734874", "0.7342023", "0.7321606", "0.72581214", "0.72581214", "0.72...
0.0
-1
/ A default getValue function this can be overridden to modify behaviour
public T getValue(float time) { return fun.getValue(new TimeInstant(time)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Value getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getVa...
[ "0.8434523", "0.8414944", "0.8414944", "0.8414944", "0.8414944", "0.8414944", "0.8414944", "0.8414944", "0.8408343", "0.8408343", "0.8408343", "0.8220053", "0.8220053", "0.8220053", "0.8220053", "0.8220053", "0.8103474", "0.8103474", "0.7997813", "0.79549587", "0.7933974", ...
0.0
-1
/ A default getValue function this can be overridden to modify behaviour. This function is only useful for constant unit objects.
public T getValue() { return getValue(interval.start); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Value getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getVa...
[ "0.72602445", "0.71686155", "0.71686155", "0.71686155", "0.71686155", "0.71686155", "0.71686155", "0.71686155", "0.71321476", "0.71321476", "0.71321476", "0.70573914", "0.69670343", "0.69670343", "0.69670343", "0.69561344", "0.6903985", "0.6903985", "0.6897375", "0.6880957", ...
0.0
-1
/ Method that merges two unit elements if possible. Result is stored in this element, second element remains unchanged. It is assumed that the interval of the second element comes after the interval of the first element. Note: should maybe return boolean, true if merge actually happened
public void merge(UnitObject<T> unit) { // placeholder }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Interval mergeInterval(Interval first, Interval second){\n Interval result = new Interval();\n result.start = Math.min(first.start,second.start);\n result.end = Math.max(first.end,second.end);\n return result;\n }", "private static boolean merge(int[] a, int[] b) {\n ...
[ "0.66110665", "0.6110672", "0.5968184", "0.5920309", "0.5856278", "0.58239985", "0.5733589", "0.57267565", "0.5716699", "0.5708867", "0.5683478", "0.56525564", "0.562403", "0.55616987", "0.5556611", "0.5530347", "0.5439759", "0.5415412", "0.5396924", "0.53868055", "0.53823125...
0.5468041
16
/ Compares only the starting value of the interval
public int compareTo(UnitObject<T> o) { if (interval.start < o.interval.start) return -1; else if (interval.start > o.interval.start) return 1; else return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isInInterval(int baseIndex);", "boolean isBeginInclusive();", "boolean isNewInterval();", "protected int findInterval( Double val ){\n\t\tfor( int i = 0; i < histogram.length; i++ ){\n\t\t\tif( (lowerBound + i * this.interval) >= val )\n\t\t\t\treturn Math.max( 0, i - 1 );\n\t\t}\n\t\treturn histogra...
[ "0.65889186", "0.6438975", "0.63567305", "0.6263915", "0.6202353", "0.61288035", "0.6124306", "0.59835327", "0.59700626", "0.59517473", "0.59489477", "0.5894521", "0.58921915", "0.58896047", "0.58656293", "0.58613193", "0.5848361", "0.5845927", "0.58257", "0.580939", "0.58091...
0.0
-1
Set the target endpoint for the connection.
public void setTarget(AbstractModelElement target, EditPart editPart) { if (target == null) { throw new IllegalArgumentException(); } this.target = target; this.targetEditPart = editPart; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void setEndpoint(String endpoint);", "public void setEndpoint(com.quikj.server.app.EndPointInterface endpoint) {\n\t\tthis.endpoint = endpoint;\n\t}", "public void setEndPoint(EndPoint endPoint) {\r\n\t\tthis.endPoint = endPoint;\r\n\t}", "public void setEndPoint(String _endPoint) {\n this._endPoint =...
[ "0.7280226", "0.722293", "0.7090138", "0.66645014", "0.6590243", "0.6473412", "0.63274413", "0.6324529", "0.6135884", "0.6114464", "0.6093543", "0.5969339", "0.5908152", "0.58982515", "0.5890205", "0.5889201", "0.58537954", "0.568455", "0.56658816", "0.563452", "0.5578107", ...
0.51763064
57
BufferedReader f = new BufferedReader(new FileReader("uva.in"));
public static void main(String[] args) throws IOException { BufferedReader f = new BufferedReader(new InputStreamReader(System.in)); PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out))); int n = Integer.parseInt(f.readLine()); StringTokenizer st = new StringTokenizer(f.readLine()); int[] d = new int[n]; ArrayList<Integer> order = new ArrayList<>(n); for(int i = 0; i < n; i++) { d[i] = Integer.parseInt(st.nextToken()); order.add(i); } Collections.sort(order, new Comparator<Integer>() { @Override public int compare(Integer o1, Integer o2) { return d[o2]-d[o1]; } }); for(int i = 0; i < n; i++) { order.set(i, 2*order.get(i)+1); } for(int i = 0; i < n-1; i++) { out.println(order.get(i) + " " + order.get(i+1)); } for(int i = 0; i < n; i++) { int dist = d[order.get(i)/2]; int next = order.get(i)+1; out.println(order.get(i+dist-1) + " " + next); if(i+dist >= order.size()) { order.add(next); } } f.close(); out.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void citire(FileReader f);", "public void readFile();", "public void readFromFile() {\n\n\t}", "public static void reading(String fileName)\n {\n\n }", "public static void main(String[] args) throws FileNotFoundException {\n\t\t\r\n\t\tFile filename = new File(\"D://normal.txt\");\r\n\t\tFileInputStr...
[ "0.6456592", "0.60469246", "0.5952863", "0.5848711", "0.5842592", "0.57053715", "0.5700967", "0.56979334", "0.56897235", "0.5683288", "0.5678162", "0.56638265", "0.56499773", "0.56280565", "0.5625181", "0.5607407", "0.55812883", "0.5528477", "0.5524296", "0.55229294", "0.5522...
0.0
-1
Para activar el sensor, el argumento debe ser un int cualquiera
public static void main(String[] args) { Sensor s = new Sensor(8); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSensorOn() {\n\n }", "public void accionProximidad(SensorEvent sensorEvent){\n String valProximidad = String.valueOf(sensorEvent.values[0]);\n Float valor = Float.parseFloat(valProximidad);\n tviewProx.setText(Float.toString(valor));\n\n //VALOR ES LO QUE ME DA EL S...
[ "0.6381367", "0.6095178", "0.59962404", "0.5986006", "0.5902217", "0.5872821", "0.58349943", "0.5831673", "0.57894665", "0.575039", "0.57484233", "0.57440686", "0.574088", "0.5720453", "0.57151896", "0.5703477", "0.5677051", "0.5669415", "0.56456774", "0.55957234", "0.5595694...
0.0
-1
TODO Autogenerated method stub
public static void main(String[] args) { syso }
{ "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 user on 2017/10/6.
@SqlMapper public interface PortalAreaAdminirationMapper { List<PortalAreaAdministrationListVo> getPage(PortalAreaAdminirationListCondition condition); Integer getCount(PortalAreaAdminirationListCondition condition); Integer save(PortalAreaAdminirationListCondition condition); Integer delete(PortalAreaAdminirationListCondition condition); Integer update(PortalAreaAdminirationListCondition condition); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "public final void mo51373a() {\n }", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Ove...
[ "0.61038446", "0.58966583", "0.5856801", "0.58364606", "0.57179147", "0.5715606", "0.5712023", "0.5712023", "0.56824446", "0.5677871", "0.5633738", "0.5595255", "0.5572124", "0.55598366", "0.5532318", "0.5531677", "0.551713", "0.5507629", "0.55031586", "0.54993576", "0.549879...
0.0
-1
TODO Autogenerated method stub
@Override public int add(OrderDetailBean detail) { return dao.add(detail); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int update(OrderDetailBean detail) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int delete(String orderId) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public List<OrderDetailBean> query(OrderDetailBean detail) { return dao.query(detail); }
{ "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
restart array cell state
private void restartArray() { for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { Start.shemaArray[i][j].baseModel.state = 0; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void restart() {\n ReadOnlyAssignmentList currentState = assignmentListStateList.get(currentStatePointer);\n assignmentListStateList.clear();\n assignmentListStateList.add(currentState);\n currentStatePointer = 0;\n }", "public void restart() {\n\t\td1 = 6;\n\t\td2 = 6;\n\t\...
[ "0.6963658", "0.6649018", "0.65408945", "0.65241766", "0.63348556", "0.6310886", "0.6222221", "0.6222047", "0.6188661", "0.6183465", "0.6174655", "0.61593264", "0.61472136", "0.6145644", "0.6125121", "0.61144215", "0.6099148", "0.6063148", "0.60530776", "0.604009", "0.6039871...
0.78848124
0
/ chek if we found "baba qga hause"
private boolean checkWinner(int secondI, int secondJ) { if (Start.shemaArray[secondI][secondJ].baseModel.baba == 1) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static boolean Ncontains(String word, char a) \n {\n \t// return true of false if the String match char a\n for(int x = 0; x < word.length(); x++)\n {\n if(word.charAt(x) == a)\n return false;\n }\n return true;\n }", "public static void main...
[ "0.6858984", "0.6592051", "0.6554811", "0.65523386", "0.6534867", "0.65332615", "0.6480764", "0.6465806", "0.64178926", "0.6399402", "0.63630474", "0.63439834", "0.6325846", "0.6325225", "0.6293427", "0.629038", "0.6281175", "0.6262256", "0.62442076", "0.6241426", "0.6222004"...
0.0
-1
/ check if the current position hasn't possible move
private boolean checkBoxSituation(int secondI, int secondJ) { int max = 0; if (secondI + 1 < 8) { if (checkBlueBox(secondI + 1, secondJ)) { max++; } } if (secondI - 1 > -1) { if (checkBlueBox(secondI - 1, secondJ)) { max++; } } if (secondJ + 1 < 8) { if (checkBlueBox(secondI, secondJ + 1)) { max++; } } if (secondJ - 1 > -1) { if (checkBlueBox(secondI, secondJ - 1)) { max++; } } if (max >= 3) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean isThereValidMove() {\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean canMove() {\r\n\t\treturn false;\r\n\t}", "public boolean canMove() {\n\n\tArrayList<Location> moveLocs = getValid(getLocation());\n\n\tif (isEnd == true) {\n\t return false;\n\t} \n\tif (!moveLocs.isEmpty()) {\n\t ...
[ "0.78442734", "0.76335067", "0.7576505", "0.7518208", "0.747652", "0.7472779", "0.74722755", "0.74367577", "0.7423927", "0.7423237", "0.7401134", "0.74006844", "0.7363534", "0.73451877", "0.7304077", "0.7303542", "0.72964144", "0.7293731", "0.72698027", "0.7241707", "0.723789...
0.0
-1
check is unknow territory is blue space
private boolean checkBlueBox(int i , int j) { if ( Start.shemaArray[i][j].bomb == 1) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isFullyExplored();", "private boolean isBlack(Point pos){\r\n Cells aux = model.getValueAt(pos);\r\n return (aux == Cells.BLACK || aux == Cells.BLACK_QUEEN);\r\n }", "public boolean isBlue()\n {\n // TODO: replace this line with your code\n }", "boolean isFalseCol...
[ "0.64540946", "0.6361941", "0.63102674", "0.624872", "0.6218272", "0.61493516", "0.61294943", "0.611387", "0.6086392", "0.6034445", "0.60324115", "0.5979573", "0.59730357", "0.5957277", "0.59485704", "0.5916175", "0.58770186", "0.58631444", "0.5861266", "0.5842565", "0.582304...
0.57649964
27
TODO event.registerServerCommand(new CommandLevel()); event.registerServerCommand(new CommandGame());
public static void load(FMLServerStartingEvent event) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void handleServerCmd() {\n\t\t\n\t}", "private void registerCommands() {\r\n\t\tif(getSettings().getBoolean(KEY_PREFIX+KEYS.HOME.toString())) {\r\n\t\t\t(new HomeCommand(this)).register();\r\n\t\t\t(new SetHomeCommand(this)).register();\r\n\t\t\t(new DelHomeCommand(this)).register();\r\n\t\t\...
[ "0.71644", "0.707374", "0.7066208", "0.70216125", "0.69727427", "0.6860261", "0.68475574", "0.67849755", "0.6782189", "0.66349304", "0.6616138", "0.6612454", "0.65645117", "0.6535822", "0.65085334", "0.6477293", "0.64551914", "0.6447688", "0.6432851", "0.6432286", "0.64194584...
0.0
-1
Created by chengmo on 2018/3/2.
@Transactional @Repository public interface TagParameterDAO extends JpaRepository<TagParameter, Long>, JpaSpecificationExecutor<TagParameter> { @Query(value = "SELECT * from tag_parameter as t where t.graph=:graph", nativeQuery = true) List<TagParameter> getTagParameters(@Param("graph") String graph); @Query(value = "SELECT * from tag_parameter as t where t.graph=:graph and t.id in(:ids)", nativeQuery = true) List<TagParameter> getTagParameters(@Param("graph") String graph, @Param("ids") Set<Long> ids); @Query(value = "SELECT * from tag_parameter as t where t.graph=:graph and t.type in(:types)", nativeQuery = true) List<TagParameter> getTagParametersByTypes(@Param("graph") String graph, @Param("types") Set<String> types); @Query(value = "SELECT * from tag_parameter as t where t.graph=:graph and t.reference=:reference", nativeQuery = true) TagParameter getTagParameterByReference(@Param("graph") String graph, @Param("reference") String reference); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r...
[ "0.6223942", "0.60617", "0.59577894", "0.5915094", "0.5877985", "0.5877985", "0.5849779", "0.5845078", "0.5833687", "0.58184737", "0.5817749", "0.5756408", "0.57512814", "0.5728568", "0.5728459", "0.5726123", "0.57170904", "0.57057595", "0.56900454", "0.5686225", "0.56810397"...
0.0
-1
Send message if require to Admins and Mods Logs mining activity if required
private void processLogging(HashMap<Player, Integer> miners, String oreType, String oreAbbrev) { Integer updatedOre; Integer existingOre=miners.get(player); String message; if (existingOre == null) { updatedOre=1; } else { updatedOre=existingOre+1; } miners.put(player, updatedOre); // send a message to admins and mods if a player has mined a multiple of ore blocks if (updatedOre%multiple==0) { message = player.getName() + " has broken a total of " + updatedOre + " diamond ore blocks"; sendMessageToAdmins(player, message); } if (XRayHacker.LOGGING_ENABLED) { if ((updatedOre == threshhold && !playerOnWatchList)) { XRayHacker.updateLoggingInitiatedFlag(true); message = "Logging of diamond mining started for " + player.getName() + "."; sendMessageToAdmins(player, message); } if (updatedOre >= threshhold || playerOnWatchList) { logMiningActivity(player, block, oreAbbrev, updatedOre); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void onMotdSent() {\r\n\t\tif (!loggedIn) {\r\n\t\t\tif (adminWindow != null) {\r\n\t\t\t\tadminWindow.setVisible(true);\r\n\t\t\t}\r\n\t\t\tdispose();\r\n\t\t\tloggedIn = true;\r\n\t\t}\r\n\t\t\r\n\t}", "public void notifyAdmins(){\n \tfor(PlayerHandler player : players){\n \t\tif(player.isAdmin())...
[ "0.63087976", "0.6261418", "0.62457657", "0.60884815", "0.6031792", "0.5784252", "0.5649035", "0.55559814", "0.5551763", "0.55121595", "0.5482707", "0.5466573", "0.5461011", "0.545419", "0.54426396", "0.54119664", "0.5403893", "0.5403192", "0.53968966", "0.5368278", "0.534247...
0.53973854
18
TODO Autogenerated method stub
@Override public void comprar() { super.comprar(); }
{ "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 LinkedList<Armamento> getArmamento() { return super.getArmamento(); }
{ "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 Dinero getDinero() { return super.getDinero(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public int getPuntuacion() { return super.getPuntuacion(); }
{ "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
Return and clean produced errors
public List<String> takeErrors() { final List<String> result = new ArrayList<String>(errors); errors.clear(); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void cleanErrorMessages() {\r\n\r\n }", "boolean documentFreeOfErrors();", "public void clearErrors() {\n super.resetErrors();\n }", "@Override\n public void clearError() {\n\n }", "public void correctErrors();", "public Vector getErrors() {\n \t\tif (parser.hasErrors()) {\n \t\...
[ "0.7273696", "0.683058", "0.65925854", "0.65839463", "0.6328371", "0.6281578", "0.62322223", "0.6127737", "0.6039607", "0.5996237", "0.5971219", "0.5958195", "0.5917344", "0.5904514", "0.5901027", "0.58798873", "0.5854199", "0.5807448", "0.58068234", "0.5789681", "0.5789681",...
0.66124296
2
Builds a classifier from given inputData
public abstract void build(ClassifierData<U> inputData);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void buildClassifier(Instances data) throws Exception {\n\r\n\t}", "public void buildClassifier(Instances data) throws Exception {\n\n // can classifier handle the data?\n getCapabilities().testWithFail(data);\n\n // remove instances with missing class\n data = new Instances(dat...
[ "0.70181465", "0.659205", "0.6389859", "0.6239377", "0.61966723", "0.5941471", "0.57358193", "0.5596247", "0.5580028", "0.55186665", "0.5491505", "0.5419674", "0.54111576", "0.53776443", "0.5286592", "0.5285821", "0.52788794", "0.526152", "0.52452314", "0.5187351", "0.5175662...
0.8239396
0
Tests the accuracy of the classifier on the given testData
public abstract double test(ClassifierData<U> testData);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void test(Corpus testData) {\n\t\t// cross validation\n\t\ttestBigramWithNB(testData);\n\t\ttestUnigramWithNB(testData);\n\t}", "public static void classfy(ArrayList<ArrayList<String>> dataset ,ArrayList<ArrayList<String>> testData,int k) {\n\t\tint index = 0;\r\n\t\tint count = 0;\r\n\t\tfor (ArrayList<S...
[ "0.7577974", "0.71972775", "0.70916194", "0.6758265", "0.67397976", "0.6687084", "0.6682531", "0.65563893", "0.65116054", "0.6481559", "0.6467696", "0.64302254", "0.64166844", "0.63232535", "0.6304048", "0.6284697", "0.6256022", "0.62079793", "0.61998457", "0.61796933", "0.61...
0.7553824
1
Prints the built classifier
public abstract void printClassifier();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toString(){\n\n String s;\n Exemplar cur = m_Exemplars;\n int i;\t\n\n if (m_MinArray == null) {\n return \"No classifier built\";\n }\n int[] nbHypClass = new int[m_Train.numClasses()];\n int[] nbSingleClass = new int[m_Train.numClasses()];\n for(i = 0; i<nbHypClass.leng...
[ "0.6725894", "0.6609139", "0.65836513", "0.6440624", "0.6259621", "0.61800796", "0.61357594", "0.60527164", "0.5941675", "0.5925126", "0.5848697", "0.5835162", "0.58067584", "0.5791836", "0.57693756", "0.5766604", "0.5752819", "0.5740322", "0.57210916", "0.5696799", "0.569679...
0.8001508
0
Function to encrpyt a plaintext with ChaCha20, returns the ciphertext
public static byte[] encryptChacha20(byte[] plainText, Key key, byte[] nonce, int counter) throws Exception { Cipher cipher = Cipher.getInstance("ChaCha20"); //Initialize the cipher for chacha20 ChaCha20ParameterSpec chacha20ParameterSpec = new ChaCha20ParameterSpec(nonce, counter); //Specify nonce and counter cipher.init(Cipher.ENCRYPT_MODE, key, chacha20ParameterSpec); //Initialize the cipher as encryption mode, with the key and param (counter + nonce) return cipher.doFinal(plainText); //Return the encrypted plaintext }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String cipherText(String str, String key)\n{\n String cipher_text=\"\";\n \n for (int i = 0; i < str.length(); i++)\n {\n // converting in range 0-25\n if(str.charAt(i) == ' ' || str.charAt(i) == '\\n')\n cipher_text+= str.charAt(i);\n else{ \n int...
[ "0.7086696", "0.6985176", "0.6875467", "0.6873842", "0.6805941", "0.67243826", "0.67189014", "0.6568994", "0.6519845", "0.65049404", "0.6499346", "0.64381886", "0.64348227", "0.64136004", "0.6408063", "0.6394528", "0.6369852", "0.63625664", "0.63569003", "0.6326768", "0.62626...
0.7125038
0
Function to decrypt a ciphertext with ChaCha20, returns the plain text
public static byte[] decryptChaCha20(byte[] cipherText, Key key, byte[] nonce, int counter) throws Exception { Cipher cipher = Cipher.getInstance("ChaCha20"); //Initialize the cipher for chacha20 ChaCha20ParameterSpec chacha20ParameterSpec = new ChaCha20ParameterSpec(nonce, counter); //Specify nonce and counter cipher.init(Cipher.DECRYPT_MODE, key, chacha20ParameterSpec); //Initialize the cipher as decryption mode, with the key and param (counter + nonce) return cipher.doFinal(cipherText); //Return the decrypted ciphertext }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String decrypt(String cipherText);", "public static void dec(String cipherText, String key) {\n char msg[] = cipherText.toCharArray();\n int msglen = msg.length;\n int i,j;\n \n // Creating new char arrays\n char keygenerator[] = new char[msglen];\n char encMsg[]...
[ "0.7653685", "0.6656813", "0.6628877", "0.66051537", "0.65934825", "0.6592738", "0.6573932", "0.65620893", "0.65338105", "0.65041584", "0.6492167", "0.64665705", "0.6393416", "0.6366623", "0.63644916", "0.635746", "0.6320572", "0.6304368", "0.63026756", "0.6287071", "0.628569...
0.6578806
6
Consume the item instance detected from an Activity or Fragment level by implementing the BarcodeUpdateListener interface method onBarcodeDetected.
interface BarcodeUpdateListener { @UiThread void onBarcodeDetected(Barcode barcode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG,\"Barcode detected\");\n }", "public void onRead(BarcodeData barcodeData) {\n }", "private void onBarcodeDetected(Barcode barcode) {\n Log.d(TAG, \"Detected barcode with value: \" + barcode.displayValue);\n\n Intent re...
[ "0.7363191", "0.70475775", "0.6966462", "0.64909124", "0.64397806", "0.64022785", "0.63802904", "0.61799425", "0.616065", "0.61473733", "0.60673845", "0.5988994", "0.5940511", "0.59117514", "0.58970386", "0.5896539", "0.5846039", "0.5614347", "0.5557898", "0.5544687", "0.5542...
0.6924067
3
New default connection for a graph element.
@Test public void testCreateConnections() { Element element = mock(Element.class); View<?> content = mock(View.class); Bounds bounds = Bounds.create(0d, 0d, 10d, 20d); when(element.getContent()).thenReturn(content); when(content.getBounds()).thenReturn(bounds); MagnetConnection c1 = ConnectionAcceptorControlImpl.createConnection(element); assertEquals(5, c1.getLocation().getX(), 0); assertEquals(10, c1.getLocation().getY(), 0); assertEquals(MagnetConnection.MAGNET_CENTER, c1.getMagnetIndex().getAsInt()); assertFalse(c1.isAuto()); // New default connection for wires. WiresConnection wiresConnection = mock(WiresConnection.class); when(wiresConnection.isAutoConnection()).thenReturn(true); WiresMagnet wiresMagnet = mock(WiresMagnet.class); when(wiresMagnet.getX()).thenReturn(122d); when(wiresMagnet.getY()).thenReturn(543d); when(wiresMagnet.getIndex()).thenReturn(7); MagnetConnection c2 = (MagnetConnection) ConnectionAcceptorControlImpl.createConnection(wiresConnection, wiresMagnet); assertEquals(122, c2.getLocation().getX(), 0); assertEquals(543, c2.getLocation().getY(), 0); assertEquals(7, c2.getMagnetIndex().getAsInt()); assertTrue(c2.isAuto()); // Asset connections to concrete locations, when no concrete magnets assigned. when(wiresConnection.getPoint()).thenReturn(new Point2D(122d, 543d)); final Connection pointConnection = ConnectionAcceptorControlImpl.createConnection(wiresConnection, null); assertEquals(122d, pointConnection.getLocation().getX(), 0); assertEquals(543d, pointConnection.getLocation().getY(), 0); // Connections (view magnets) can be nullified. assertNull(ConnectionAcceptorControlImpl.createConnection(null)); assertNull(ConnectionAcceptorControlImpl.createConnection(null, null)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "NodeConnection createNodeConnection();", "default void connect() { }", "protected Connection createConnectionFigure() {\n\t\treturn new NormConnectionFigure();\n\t}", "void setDefaultEndpoint(Endpoint defaultEndpoint);", "protected Connection createConnectionFigure() {\r\n\t\treturn new ImplicitCallFigure(...
[ "0.6452767", "0.6289261", "0.6096304", "0.5780503", "0.57768947", "0.57170373", "0.56531817", "0.5594248", "0.5574669", "0.5515564", "0.5486105", "0.5481157", "0.5480315", "0.5454744", "0.54461575", "0.5419929", "0.5396534", "0.5346123", "0.5344734", "0.5332367", "0.53225595"...
0.0
-1
StringDemo sd = new StringApplication ();
public static void main(String[] args) { StringDemo sd = new StringDemo(); sd.stringExample("Hi i am java 123"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tstringhandler obj=new stringhandler();\r\n\t\tobj.input();\r\n\t\tobj.display();\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tStringExample se = null;\r\n\t\tStringExample sq = new StringExample();\r\n\t\tSystem.out.println(se);\r\n\t\tSystem.out.print...
[ "0.6517604", "0.63150597", "0.6230147", "0.6201848", "0.61208266", "0.6054483", "0.597549", "0.59668785", "0.59433806", "0.5937765", "0.5876029", "0.5869245", "0.58595306", "0.5856648", "0.5856648", "0.58433306", "0.5802473", "0.5789591", "0.5787585", "0.5783114", "0.5780367"...
0.70500606
0
Equals and hashcode implementation
@Override public boolean equals(Object o) { if (this == o) return true; if (o == null || getClass() != o.getClass()) return false; if (!super.equals(o)) return false; SendSmsRequest that = (SendSmsRequest) o; if (from != null ? !from.equals(that.from) : that.from != null) return false; if (!to.equals(that.to)) return false; if (schedule != null ? !schedule.equals(that.schedule) : that.schedule != null) return false; if (!msg.equals(that.msg)) return false; if (callbackOption != that.callbackOption) return false; if (id != null ? !id.equals(that.id) : that.id != null) return false; return aggregateId != null ? aggregateId.equals(that.aggregateId) : that.aggregateId == null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n int hashCode();", "@Override \n int hashCode();", "@Override\n public int hashCode();", "@Override\n\t public int hashCode();", "@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn super.hashCode(); //Default implementation; may need to bring in line to equals\n\t\t}", "private E...
[ "0.78582865", "0.78252786", "0.7770217", "0.7735456", "0.76422197", "0.7628756", "0.7607693", "0.7607693", "0.7607693", "0.74313074", "0.74235076", "0.74235076", "0.74235076", "0.74235076", "0.73644006", "0.73510325", "0.73510325", "0.7337122", "0.72356045", "0.71112585", "0....
0.0
-1
Constructor instantiates a new PickResults object.
public CollisionResults() { nodeList = new ArrayList<CollisionData>(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Results(Blippy pBlippy)\n {\n super(pBlippy);\n }", "public Results() {\n\t\t\t// TODO Auto-generated constructor stub\n\t\t}", "public Result() {\r\n super();\r\n System.out.println(\"Result:Constructor\");\r\n }", "public PersonsResult() {\n }", "public RatingPeriodRes...
[ "0.6586605", "0.6509007", "0.6242095", "0.6188012", "0.61794287", "0.60740995", "0.60740995", "0.591635", "0.5862251", "0.58288205", "0.58164555", "0.57366335", "0.5691252", "0.56785464", "0.55926925", "0.5556687", "0.55494785", "0.54594207", "0.54556185", "0.540813", "0.5291...
0.47909495
100
addCollisionData places a new CollisionData object into the results list.
public void addCollisionData(CollisionData col) { nodeList.add(col); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addCollision(){\n if (collisionCounter == 4){\n return;\n }\n this.collisionCounter++;\n }", "void addCollisionObject(CollisionObjectWrapper co) {\n\tpendingObjects.put(co.getId(), co);\n }", "public void addCollidable(Group g) {\r\n\t\t _collisionList.add(g);\...
[ "0.6241267", "0.5846408", "0.55342007", "0.52645314", "0.5224253", "0.5162394", "0.5127957", "0.5107014", "0.50805324", "0.5076184", "0.5059431", "0.50271213", "0.5014329", "0.49493328", "0.49437538", "0.48987335", "0.48695952", "0.48690963", "0.4868791", "0.48577952", "0.484...
0.63646835
0
getNumber retrieves the number of collisions that have been placed in the results.
public int getNumber() { return nodeList.size(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int getNumberFound() {\n return numberFound;\n }", "@Override\n\tpublic int numOfCollisions() {\n\n\t\treturn this.collision;\n\t}", "public int getTotalCollisions(){\r\n return totalCollisions;\r\n }", "Object getNumberMatched();", "public int GetNumber() {\n int num = 0;...
[ "0.6479772", "0.63942784", "0.62524706", "0.61291194", "0.6103067", "0.59342396", "0.59009814", "0.58218557", "0.579052", "0.5749102", "0.5747953", "0.5747953", "0.573467", "0.57101065", "0.5684848", "0.5657445", "0.5632428", "0.5615309", "0.55983806", "0.5557266", "0.5556851...
0.0
-1
getCollisionData retrieves a CollisionData from a specific index.
public CollisionData getCollisionData(int i) { return nodeList.get(i); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public T getData(int index){\n if(index < 0 || index >= data.size())\n return null;\n\n //give back the data\n return data.get(index);\n }", "public int getData(int index) {\n return data_.get(index);\n }", "public int getData(int index) {\n return data_.get(index);\...
[ "0.5893133", "0.5767775", "0.5718861", "0.5541503", "0.5429567", "0.54049927", "0.53795195", "0.53299314", "0.53299314", "0.5328826", "0.5321546", "0.5286283", "0.5286283", "0.5281802", "0.5281802", "0.523701", "0.5227172", "0.5194466", "0.51585805", "0.5158382", "0.5158382",...
0.6269613
0
clear clears the list of all CollisionData.
public void clear() { nodeList.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clear() {\r\n\t\tdata.clear();\r\n\r\n\t}", "public void clearAllData() {\n atoms.clear();\n connections.clear();\n lines.clear();\n radical = null;\n }", "public void clearData()\r\n {\r\n \r\n }", "void clearData();", "public void clear() {\n ...
[ "0.6974827", "0.6925982", "0.6630541", "0.6628925", "0.6627674", "0.66249335", "0.66203016", "0.6615675", "0.65970355", "0.6592795", "0.657516", "0.65674686", "0.65511", "0.65378386", "0.6507204", "0.6476215", "0.6474219", "0.6461426", "0.6457637", "0.6444176", "0.64392364", ...
0.0
-1
addCollision is an abstract method whose intent is the subclass determines what to do when two Geometry object's bounding volumes are determined to intersect.
public abstract void addCollision(Geometry s, Geometry t);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract boolean collisionWith(CollisionObject obj);", "@Override\n\tpublic void createCollisionShape() {\n\t\t\n\t}", "public abstract void collide(InteractiveObject obj);", "public abstract void collideWith(Entity entity);", "public abstract void collision(SpaceThing thing);", "@Override\n\tpubl...
[ "0.68902594", "0.6712861", "0.6616847", "0.6545353", "0.65371096", "0.6452549", "0.64411193", "0.6398027", "0.6369918", "0.6343351", "0.6330849", "0.63219625", "0.62886107", "0.62537843", "0.6233612", "0.62089455", "0.62084126", "0.6205147", "0.6192625", "0.6188565", "0.61840...
0.8251752
0
processCollisions is an abstract method whose intent is the subclass defines how to process the collision data that has been collected since the last clear.
public abstract void processCollisions();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void processCollisions(){\n\t\tSet<String> allCollisionKeys = new HashSet<String>();\n \n\t\t// prepare a list of collisions to handle\n\t\tList<CollisionData> collisions = new ArrayList<CollisionData>();\n \n\t\tSet<Integer> types = collisionsTypes.keySet();\n \n\t\t// obtain every type for collision\n\t\t...
[ "0.75837183", "0.6347615", "0.6338171", "0.62350297", "0.619321", "0.6077365", "0.6010625", "0.5975551", "0.5905861", "0.58910555", "0.58682936", "0.5851678", "0.5836081", "0.58206034", "0.5793507", "0.5748259", "0.5717456", "0.57110935", "0.5655968", "0.5653861", "0.56406087...
0.81501067
0
using the compare to method, we will compare each element in the list to the next one
@Test (priority = 1) public void sortAlphabetical(){ for (int i = 0; i < allDepartments.getOptions().size()-1; i++) { String current = allDepartments.getOptions().get(i).getText(); String next = allDepartments.getOptions().get(i+1).getText(); System.out.println("comparing: " + current + " with "+ next); Assert.assertTrue(current.compareTo(next)<=0); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static List compareList(List<Integer> test, List<Integer> results) {\r\n\r\n if (test.size() > results.size()) {\r\n results = test;\r\n }\r\n\r\n return results;\r\n }", "List<Object> lessThanOrEqualsTo(Object value);", "public void bubbleSort(ArrayList <Integer> list){\n ...
[ "0.627645", "0.59938127", "0.59804326", "0.5823001", "0.58017385", "0.5646271", "0.55950785", "0.5584607", "0.5580421", "0.5557082", "0.55530834", "0.5548361", "0.55432034", "0.55099404", "0.5501137", "0.55005753", "0.5484074", "0.5470712", "0.5460866", "0.5435134", "0.541058...
0.5178461
52
remember you want URL to be passed through command prompt
public static void main(String[] args) throws ClientProtocolException, IOException { String url = "http://localhost:4444/index.html"; String url2 = "http://posttestserver.com/post.php"; // creates new client G52APRClient client = new G52APRClient(); // GET System.out.println(client.httpGet(url)); // HEAD //System.out.println(client.httpHead(url)); // POST String dataBody = "Testing POST method, it worked. "; //System.out.println(client.httpPost(url, dataBody)); // POSTARRAY // creating ArrayList ArrayList<NameValuePair> dataArray = new ArrayList<NameValuePair>(); dataArray.add(new BasicNameValuePair("Name", "Natalia")); dataArray.add(new BasicNameValuePair("Course", "Computer Science")); dataArray.add(new BasicNameValuePair("Age", "19")); //System.out.println(client.httpPost(url, dataArray)); // getConditional******************************************* // date which should return the body (last read before it was last // modified) String date1 = "Sun Nov 16 21:31:815 GMT 2013"; // date which should return the 304 status line (last read after it was // last modified) String date2 = "Sun Nov 16 21:31:815 GMT 2015"; //System.out.println(client.httpGetConditional(url, date1)); //System.out.println(client.httpGetConditional(url, date2)); // RUN TESTS FROM THIS MAIN TO ClientTests (testing for part 2 of // coursework) //ClientTests ct = new ClientTests(new G52APRClient()); //ct.runTests("http://cs.nott.ac.uk/~syn/webfiles/index.html"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) {\n\t\tString myUrl = \"http://github.com/abhi20aug\";\n\t\ttry {\n\t\t\tURL newUrl = new URL(myUrl);\n\t\t\tSystem.out.println(\"simple url\"+newUrl.toString());\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\...
[ "0.6853879", "0.6477443", "0.6324346", "0.63084227", "0.6284216", "0.6275229", "0.6247324", "0.62345815", "0.6229644", "0.60723674", "0.60476863", "0.60311216", "0.5997141", "0.59959334", "0.5993163", "0.5978467", "0.590974", "0.5861968", "0.5849108", "0.5846091", "0.58314526...
0.0
-1
TODO Autogenerated method stub
public String add() throws Exception { HttpServletRequest request = ServletActionContext.getRequest(); HttpServletResponse response = ServletActionContext.getResponse(); request.setCharacterEncoding("utf-8"); String careTheme = request.getParameter("careTheme"); String careTimeString = request.getParameter("careTime"); SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); Date careTime = sdf.parse(careTimeString); String careNexttimeString = request.getParameter("careNexttime"); Date careNexttime = sdf.parse(careNexttimeString); int customerId = Integer.parseInt(request.getParameter("customerId")); String carePeople = request.getParameter("carePeople"); String careWay = request.getParameter("careWay"); String careRemark = request.getParameter("careRemark"); String customerName = request.getParameter("customerName"); String isUsed = request.getParameter("isUsed"); CustomerCareInfo cci = new CustomerCareInfo(); cci.setCareTheme(careTheme); cci.setCareTime(careTime); cci.setCareNexttime(careNexttime); cci.setCarePeople(carePeople); cci.setCareRemark(careRemark); cci.setCareWay(careWay); cci.setCustomerId(customerId); cci.setCustomerName(customerName); cci.setIsUsed(isUsed); CustomerCareService dao = new CustomerCareServiceImpl(); mark = dao.add(cci); if(mark) { /*System.out.println(carePeople); System.out.println(careTime);*/ return SUCCESS; } else { return ERROR; } }
{ "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
Parse stop data from the file and add all stops to stop manager.
public void parse() throws IOException, StopDataMissingException, JSONException{ DataProvider dataProvider = new FileDataProvider(filename); parseStops(dataProvider.dataSourceToString()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseStopID(Set<String> stopID){\n \tSystem.out.println(\"start stop parsing\");\n String[] column = new String[]{\n \"stop_id\",\"stop_code\"\n };\n\n List<StopsTransit> beans;\n\n\n ColumnPositionMappingStrategy<StopsTransit> strategy =\n ...
[ "0.67589176", "0.63753337", "0.6271775", "0.6056147", "0.5747414", "0.56986636", "0.5594785", "0.55917376", "0.55834574", "0.5559136", "0.5520293", "0.549702", "0.54708904", "0.5395419", "0.5299453", "0.52857596", "0.52611375", "0.5256953", "0.52341104", "0.5147417", "0.51390...
0.70453984
0
Parse stop information from JSON response produced by Translink. Stores all stops and routes found in the StopManager and RouteManager.
public void parseStops(String jsonResponse) throws JSONException, StopDataMissingException { JSONArray Stop = new JSONArray(jsonResponse); for (int index = 0; index < Stop.length(); index++) { JSONObject stop = Stop.getJSONObject(index); parseStop(stop); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void parseStopSchedule(JSONObject object) throws JSONException\n {\n String info = \"\";\n\n // Get Stop Information\n JSONObject stopObject = object.getJSONObject(\"stop\");\n info += \"Stop: \" + stopObject.getString(\"key\") + \" - \"\n + stopObject.getString(\"name\") + \"\\n\\n...
[ "0.63309574", "0.62983143", "0.6065789", "0.5775774", "0.57070225", "0.56139755", "0.5576917", "0.55270505", "0.5500497", "0.54566616", "0.5440536", "0.5421789", "0.5418187", "0.53597367", "0.5325197", "0.5257354", "0.524339", "0.51599985", "0.5123624", "0.50689054", "0.50280...
0.6838292
0
This method is used to calculate employee's weekly pay
private static void calculateEmployeeWeeklyPay(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException { System.out.println("Enter Employee First Name: "); String firstName = reader.readLine(); System.out.println("Enter Employee Last Name: "); String lastName = reader.readLine(); System.out.println("Enter Employee Type (Salaried or Hourly or Commissioned): "); String employeeType = reader.readLine(); if (employeeType.equalsIgnoreCase("Salaried")) { System.out.println("Please enter your monthly salary: "); double monthlySalary = Double.parseDouble(reader.readLine()); final SalariedEmployee salariedEmployee = new SalariedEmployee(firstName, lastName, employeeType, monthlySalary, false); employeeDetails.add(salariedEmployee); salariedEmployeeEarningReport(salariedEmployee); } else if (employeeType.equalsIgnoreCase("Hourly")) { System.out.println("Please enter your hourly rate: "); double hourlyRate = Double.parseDouble(reader.readLine()); System.out.println("Please enter your weekly worked hours: "); double weeklyWorkedHours = Double.parseDouble(reader.readLine()); final HourlyEmployee hourlyEmployee = new HourlyEmployee(firstName, lastName, employeeType, weeklyWorkedHours, hourlyRate, false); employeeDetails.add(hourlyEmployee); hourlyEmployeeEarningReport(hourlyEmployee); } else if (employeeType.equalsIgnoreCase("Commissioned")) { System.out.println("Please enter your weekly sales amount: "); double weeklySalesAmount = Double.parseDouble(reader.readLine()); final CommissionedEmployee commissionedEmployee = new CommissionedEmployee(firstName, lastName, employeeType, weeklySalesAmount, false); employeeDetails.add(commissionedEmployee); commissionedEmployeeEarningReport(commissionedEmployee); } else { System.out.println("Invalid employee type"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double calculateWeeklyPay(){\r\n double weeklyPay = salary / 52.0;\r\n return weeklyPay;\r\n }", "@Override\n public double calculatePayDay()\n {\n double perWeekEarned = hourlyRate * hoursPerWeek;\n return (double)Math.round(perWeekEarned * 100) / 100;\n }", "pub...
[ "0.81439763", "0.7506096", "0.7434818", "0.74157476", "0.72080004", "0.7073465", "0.6934784", "0.6745882", "0.6660558", "0.66145873", "0.66077816", "0.65945786", "0.6570814", "0.6555925", "0.6552758", "0.65263623", "0.65152246", "0.64832336", "0.64016473", "0.6348226", "0.632...
0.68712157
7
This method is used to print the earning report of a salaried employee
private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) { System.out.format("%s\t\t\t%s\n", "Name", "Weekly Pay Amount"); System.out.println("===================================================================="); final StringBuilder employeeName = new StringBuilder(); employeeName.append(salariedEmployee.getFirstName()).append(" ").append(salariedEmployee.getLastName()); final NumberFormat formatter = NumberFormat.getCurrencyInstance(); System.out.format("%s\t\t\t%s", employeeName.toString(), formatter.format(salariedEmployee.getMonthlySalary() / 4)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override \n public String toString() \n { \n return String.format(\"salaried employee: %s%n%s: $%,.2f\",\n super.toString(), \"weekly salary\", getWeek...
[ "0.72260404", "0.7134632", "0.71149707", "0.6740287", "0.65809226", "0.6579418", "0.6562177", "0.6474682", "0.6452782", "0.63650924", "0.6361563", "0.63111913", "0.62485135", "0.62416774", "0.6217038", "0.62146336", "0.61879057", "0.6162815", "0.6157233", "0.6133299", "0.6125...
0.86862284
0
This method is used to print the earning report of an hourly employee
private static void hourlyEmployeeEarningReport(final HourlyEmployee hourlyEmployee) { System.out.format("%s\t\t\t%s\n", "Name", "Weekly Pay Amount"); System.out.println("===================================================================="); final StringBuilder employeeName = new StringBuilder(); employeeName.append(hourlyEmployee.getFirstName()).append(" ").append(hourlyEmployee.getLastName()); double weeklyPayAmount = 40 * hourlyEmployee.getHourlyRate(); // Rate will be doubled if it’s beyond 40 hours/week. if (hourlyEmployee.getWeeklyWorkedHours() > 40) { double overtime = hourlyEmployee.getWeeklyWorkedHours() - 40; double overtimePay = overtime * (hourlyEmployee.getHourlyRate() * 2); weeklyPayAmount += overtimePay; } final NumberFormat formatter = NumberFormat.getCurrencyInstance(); System.out.format("%s\t\t\t%s", employeeName.toString(), formatter.format(weeklyPayAmount)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void salariedEmployeeEarningReport(final SalariedEmployee salariedEmployee) {\r\n\t\tSystem.out.format(\"%s\\t\\t\\t%s\\n\", \"Name\", \"Weekly Pay Amount\");\r\n\t\tSystem.out.println(\"====================================================================\");\r\n\t\tfinal StringBuilder employeeName ...
[ "0.74494135", "0.66738683", "0.6577949", "0.6377804", "0.6374425", "0.6353882", "0.6211138", "0.6211061", "0.61167514", "0.6109261", "0.5981768", "0.5956424", "0.59467125", "0.59332025", "0.59322506", "0.59258366", "0.5902391", "0.5874628", "0.5854812", "0.5835949", "0.580529...
0.77725
0
This method is used to choose and reward a salaried employee
private static void rewardSalariedEmployee(final BufferedReader reader, final List<Employee> employeeDetails) throws IOException { System.out.print("Do you want to reward an employee? (y/n): "); String rewardFlag = reader.readLine(); if (!rewardFlag.isEmpty() || rewardFlag.equalsIgnoreCase("y")) { System.out.println("Please choose any salaried employee name for the reward: "); final String rewardedEmployeeName = reader.readLine(); boolean employeeFound = false; for (Employee employee : employeeDetails) { if (employee.getName().equalsIgnoreCase(rewardedEmployeeName)) { if (!employee.getClassType().equalsIgnoreCase("Salaried")) { System.out.println("\nERROR: Please choose only salaried employee for the reward"); employeeFound = true; } else if (employee.isRewarded()) { System.out.println("\nERROR: This employee has already been awarded, please choose another employee"); employeeFound = true; } else { employee.setRewarded(true); employeeFound = true; printEmployeeDetails(employeeDetails); } break; } } if (!employeeFound) { System.out.println("\nERROR: Employee not found!"); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void doCreateEmployee() {\n Scanner sc = new Scanner(System.in);\n Employee newEmployee = new Employee();\n int response;\n\n System.out.println(\"*** Hors Management System::System Administration::Create New Employee ***\");\n System.out.print(\"Enter First name>\");\n ...
[ "0.63277334", "0.62388915", "0.6126844", "0.5908046", "0.59019685", "0.5857189", "0.5835149", "0.5769849", "0.5705592", "0.5692954", "0.5680198", "0.5610442", "0.56014913", "0.5577", "0.5548099", "0.55440867", "0.55376023", "0.55181175", "0.5506366", "0.54985714", "0.5496383"...
0.67504627
0
This method is used to print the employee details.
private static void printEmployeeDetails(final List<Employee> employeeDetails) { String headerFormat = "%-25s%-20s%-20s%-20s%-20s%-20s\n"; String rowFormat = "%-25s%-20s%-20s%-20s%-20s%-20s\n"; System.out.println(); System.out.println("Employee details:"); System.out.println("============================================================================================================================="); System.out.format(headerFormat, "Name", "Class", "Hours", "Sales", "Rate", "Weekly Pay Amount"); System.out.println("============================================================================================================================="); final NumberFormat formatter = NumberFormat.getCurrencyInstance(); for (Employee employee : employeeDetails) { final StringBuilder employeeName = new StringBuilder(); employeeName.append(employee.getFirstName()).append(" ").append(employee.getLastName()); if (employee.getClassType().equalsIgnoreCase("Salaried")) { double monthlySalary = ((SalariedEmployee) employee).getMonthlySalary(); boolean isRewarded = employee.isRewarded(); if (isRewarded) { monthlySalary += monthlySalary * 0.1; } StringBuilder sb = new StringBuilder(); sb.append(formatter.format(monthlySalary / 4)); sb.append(isRewarded ? "*" : ""); System.out.format(rowFormat, employeeName.toString(), employee.getClassType(), "", "", "", sb.toString()); } else if (employee.getClassType().equalsIgnoreCase("Hourly")) { double weeklyWorkedHours = ((HourlyEmployee) employee).getWeeklyWorkedHours(); double hourlyRate = ((HourlyEmployee) employee).getHourlyRate(); double weeklyPayAmount = 40 * ((HourlyEmployee) employee).getHourlyRate(); // Rate will be doubled if it’s beyond 40 hours/week. if (((HourlyEmployee) employee).getWeeklyWorkedHours() > 40) { double overtime = ((HourlyEmployee) employee).getWeeklyWorkedHours() - 40; double overtimePay = overtime * (((HourlyEmployee) employee).getHourlyRate() * 2); weeklyPayAmount += overtimePay; } System.out.format(rowFormat, employeeName.toString(), employee.getClassType(), weeklyWorkedHours, "", formatter.format(hourlyRate), formatter.format(weeklyPayAmount)); } else { double weeklySales = ((CommissionedEmployee) employee).getWeeklySales(); double commissionRate = ((CommissionedEmployee) employee).getCommissionRate(); System.out.format(rowFormat, employeeName.toString(), employee.getClassType(), "", formatter.format(weeklySales), "", formatter.format(weeklySales * commissionRate)); } } System.out.println("\nNote: * A 10% bonus is awarded\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void printEmployeeDetail(){\n\t\tSystem.out.println(\"First name: \" + firstName);\n\t\tSystem.out.println(\"Last name: \" + lastName);\n\t\tSystem.out.println(\"Age: \" + age);\n\t\tSystem.out.println(\"Salary: \" + salary);\n\t\tSystem.out.println(firstName + \" has \" + car.color + \" \" + car.model + \" it's V...
[ "0.86426127", "0.79865575", "0.78874636", "0.7820998", "0.78063047", "0.75201005", "0.7424492", "0.7337442", "0.7336151", "0.7331718", "0.72877985", "0.72554225", "0.71868485", "0.71707046", "0.7155571", "0.70511425", "0.70186913", "0.698087", "0.6926412", "0.6897978", "0.687...
0.7593184
5
This method is used to load the employee details
private static void loadEmployeeDetails(final List<Employee> employeeDetails) { final SalariedEmployee salariedEmployee1 = new SalariedEmployee("James", "Hogan", "Salaried", 13200.00, true); final SalariedEmployee salariedEmployee2 = new SalariedEmployee("Joan", "Han", "Salaried", 10400.00, false); final HourlyEmployee hourlyEmployee1 = new HourlyEmployee("Jennifer", "Waltz", "Hourly", 45, 10.95, false); final HourlyEmployee hourlyEmployee2 = new HourlyEmployee("Moly", "Smith", "Hourly", 32, 15, false); final CommissionedEmployee commissionedEmployee = new CommissionedEmployee("Marry", "Butler", "Commissioned", 10000, false); employeeDetails.add(salariedEmployee1); employeeDetails.add(salariedEmployee2); employeeDetails.add(hourlyEmployee1); employeeDetails.add(hourlyEmployee2); employeeDetails.add(commissionedEmployee); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\t\r\n\tpublic List<Employee> getAllDetails()\r\n\t{\r\n\t\t\r\n\t\tList<Employee> empList =hibernateTemplate.loadAll(Employee.class);\r\n\t\t\r\n\t\treturn empList;\r\n\t}", "private void loadEmployeesFromDatabase() {\n Cursor cursor = mDatabase.getAllEmployees();\n\n if (cursor.moveT...
[ "0.70637125", "0.7017771", "0.700428", "0.69982475", "0.6944469", "0.69190645", "0.68120205", "0.67769647", "0.6752102", "0.6742692", "0.663137", "0.66176325", "0.66070396", "0.6578362", "0.6558353", "0.6530432", "0.65197337", "0.65132976", "0.6505257", "0.6492967", "0.646532...
0.7121047
0
Converts objects to Json
public String objectToJson(Object o){ Gson gson = new Gson(); String json = gson.toJson(o); return json; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract Object toJson();", "public abstract String toJson();", "public JsonObject toJson();", "public String toJson(Object obj){\n return new Gson().toJson(obj);\n }", "JSONObject toJson();", "JSONObject toJson();", "String toJSON();", "public String toJsonfrmObject(Object object) ...
[ "0.7857138", "0.7185203", "0.70883334", "0.70429426", "0.6979893", "0.6979893", "0.6969938", "0.681829", "0.6812914", "0.6786549", "0.6755135", "0.6738429", "0.6662659", "0.6641544", "0.6640691", "0.65919304", "0.65700835", "0.6557524", "0.6537391", "0.64670885", "0.6463336",...
0.68120325
9
Converts Json to a basic object type
public Object stringToObject(String s, Class c){ Gson gson = new Gson(); Object o = gson.fromJson(s, c); return o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "<T> T parseToObject(Object json, Class<T> classObject);", "T fromJson(Object source);", "public abstract void fromJson(JSONObject jsonObject);", "@SuppressWarnings(\"unchecked\")\n\tpublic static<T> T createObjectFromJSON(final JSONObject json) throws JSONException {\n\t\tif(json.has(\"type\")) {\n\t\t\tretu...
[ "0.72859555", "0.72023046", "0.703118", "0.6989617", "0.68373346", "0.6764001", "0.6691497", "0.66303885", "0.6609684", "0.65962285", "0.6574948", "0.6446123", "0.64023453", "0.63731533", "0.6361438", "0.63561547", "0.63448954", "0.62906545", "0.62822807", "0.6235275", "0.622...
0.0
-1
Takes a file name and converts the Json to a string
public String fileToString(String file){ String path = new File("./Users/Colin/AndroidStudioProjects/FlightCompare/app/json/flights.json").getAbsolutePath(); File fileObj = new File(path); Log.d("Reading JSON file", "File exists: " + fileObj.exists()); Log.d("Reading JSON file", "File is directory: " + fileObj.isDirectory()); Log.d("Reading JSON file", "File can read: " + fileObj.canRead()); Log.d("Reading JSON file", "Current directory: " + path); Log.d("Reading JSON file", "The path is: " + file); try(Scanner in = new Scanner(new File(file))){ StringBuilder sb = new StringBuilder(); while(in.hasNextLine()){ sb.append(in.nextLine()); sb.append('\n'); } in.close(); return sb.toString(); } catch (FileNotFoundException ex){ ex.printStackTrace(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static String readJsonFile (String fileName) {\n if (!fileName.endsWith(\".json\")){\n throw new IllegalArgumentException(\"Invalid file name\");\n }\n String jsonStr = \"\";\n try{\n isFileExistOrCreatIt(fileName);\n File jsonFile = new File(\"s...
[ "0.73262626", "0.72774357", "0.7165768", "0.7096283", "0.65093946", "0.64483833", "0.6441551", "0.63715804", "0.63233846", "0.62945324", "0.6268541", "0.62673223", "0.62526464", "0.62442106", "0.62354434", "0.6188096", "0.6169043", "0.6142823", "0.6133365", "0.60864085", "0.6...
0.7328905
0
Check for empty data in the form
public void onClick(View view) { Log.d("Edit","EDITED"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") ...
[ "0.7573968", "0.7534849", "0.75310034", "0.7370509", "0.73275816", "0.7204092", "0.69353586", "0.69203675", "0.6912917", "0.68874884", "0.68382347", "0.6822182", "0.67313755", "0.6723646", "0.6723252", "0.66730845", "0.6639112", "0.66060734", "0.66041636", "0.6594384", "0.656...
0.0
-1
Check for empty data in the form
public void onClick(View view) { Log.d("Edit1","EDITED1"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") ...
[ "0.7573968", "0.7534849", "0.75310034", "0.7370509", "0.73275816", "0.7204092", "0.69353586", "0.69203675", "0.6912917", "0.68874884", "0.68382347", "0.6822182", "0.67313755", "0.6723646", "0.6723252", "0.66730845", "0.6639112", "0.66060734", "0.66041636", "0.6594384", "0.656...
0.0
-1
Check for empty data in the form
public void onClick(View view) { Log.d("Parti","participants"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean haveEmptyField() {\n return getTextID(FIRST_NAME).isEmpty() ||\n getTextID(LAST_NAME).isEmpty() ||\n getTextID(ADDRESS).isEmpty();\n }", "private void checkForEmptyFields() throws EmptyTextFieldException {\n\n if (date == null || title.equals(\"\") ...
[ "0.7573968", "0.7534849", "0.75310034", "0.7370509", "0.73275816", "0.7204092", "0.69353586", "0.69203675", "0.6912917", "0.68874884", "0.68382347", "0.6822182", "0.67313755", "0.6723646", "0.6723252", "0.66730845", "0.6639112", "0.66060734", "0.66041636", "0.6594384", "0.656...
0.0
-1
Creates new form frmSecoes
public frmSecoes(int cod) { initComponents(); bd = new BD(); secaodao = new SecaoDAO(); secoes = secaodao.Abrir(cod); secoesapagar = new LinkedList<>(); adicionasecaotable(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "FORM createFORM();", "public Gui_lectura_consumo() {\n initComponents();\n centrarform();\n consumo_capturado.setEditable(false);\n limpiarCajas();\n \n \n }", "public frmCliente() {\n initComponents();\n CargarProvinciasRes();\n CargarProvincia...
[ "0.6238402", "0.61784", "0.61110514", "0.60792893", "0.6031616", "0.60188884", "0.5954459", "0.59466785", "0.5922898", "0.590882", "0.58809394", "0.58668", "0.5864636", "0.58399904", "0.5839257", "0.58265257", "0.5823138", "0.5816003", "0.58120054", "0.5803741", "0.57970554",...
0.67471176
0
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor.
@SuppressWarnings("unchecked") // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents private void initComponents() { jScrollPane1 = new javax.swing.JScrollPane(); tblSecoes = new javax.swing.JTable(); btnRemover = new javax.swing.JButton(); btnAtualizar = new javax.swing.JButton(); btnCancelar = new javax.swing.JButton(); setClosable(true); setTitle("Seções"); tblSecoes.setModel(new javax.swing.table.DefaultTableModel( new Object [][] { {null, null, null, null}, {null, null, null, null}, {null, null, null, null}, {null, null, null, null} }, new String [] { "Title 1", "Title 2", "Title 3", "Title 4" } )); jScrollPane1.setViewportView(tblSecoes); btnRemover.setBackground(new java.awt.Color(98, 155, 88)); btnRemover.setFont(new java.awt.Font("Tahoma", 0, 14)); // NOI18N btnRemover.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_remove.fw.png"))); // NOI18N btnRemover.setText(" Remover"); btnRemover.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnRemoverActionPerformed(evt); } }); btnAtualizar.setBackground(new java.awt.Color(98, 155, 88)); btnAtualizar.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N btnAtualizar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_confirm.fw.png"))); // NOI18N btnAtualizar.setText(" Atualizar"); btnAtualizar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnAtualizarActionPerformed(evt); } }); btnCancelar.setBackground(new java.awt.Color(183, 70, 53)); btnCancelar.setFont(new java.awt.Font("Tahoma", 0, 18)); // NOI18N btnCancelar.setIcon(new javax.swing.ImageIcon(getClass().getResource("/imagens/icon_cancel.fw.png"))); // NOI18N btnCancelar.setText(" Cancelar"); btnCancelar.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { btnCancelarActionPerformed(evt); } }); 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(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 856, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(30, 30, 30)) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addComponent(btnAtualizar, javax.swing.GroupLayout.PREFERRED_SIZE, 179, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(76, 76, 76) .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 161, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(210, 210, 210)))) .addGroup(layout.createSequentialGroup() .addGap(380, 380, 380) .addComponent(btnRemover) .addGap(0, 0, Short.MAX_VALUE)) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addGap(24, 24, 24) .addComponent(btnRemover, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(29, 29, 29) .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 220, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(41, 41, 41) .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(btnAtualizar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(btnCancelar, javax.swing.GroupLayout.PREFERRED_SIZE, 42, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(32, 32, 32)) ); 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.73197734", "0.72914416", "0.72914416", "0.72914416", "0.72862023", "0.72487676", "0.7213741", "0.7207628", "0.7196503", "0.7190263", "0.71850693", "0.71594703", "0.7147939", "0.7093137", "0.70808756", "0.70566356", "0.6987119", "0.69778043", "0.6955563", "0.6953879", "0.69...
0.0
-1
GENFIRST:event_btnRemoverActionPerformed TODO add your handling code here:
private void btnRemoverActionPerformed(java.awt.event.ActionEvent evt) { if (tblSecoes.getSelectedRow() >= 0){ if (JOptionPane.showConfirmDialog(RootPane, "Deseja Remover esta Seção?") == 0){ Secao secaoselect = (Secao) tblSecoes.getValueAt(tblSecoes.getSelectedRow(), 0); if (secoes.contains(secaoselect)){ secoes.remove(secaoselect); secoesapagar.add(secaoselect); } JOptionPane.showMessageDialog(RootPane, "Seção Removida com Sucesso!"); adicionasecaotable(); } } else { JOptionPane.showMessageDialog(RootPane, "Selecione uma Seção Por Favor!"); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void removeJButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_removeJButtonActionPerformed\n //remove current index from name and temp then redo edge and graph\n //check enabled\n int index = cityJList.getSelectedIndex();\n //determine if user still wants ...
[ "0.7400088", "0.73932374", "0.7340655", "0.71342355", "0.7099498", "0.69693196", "0.6968223", "0.6874113", "0.6747596", "0.6747596", "0.67355907", "0.67339146", "0.67267305", "0.67156255", "0.6700432", "0.6665", "0.66259015", "0.6621719", "0.6608114", "0.65946996", "0.6590357...
0.7253109
3
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.menu_commonone, menu); MenuItem item3 = menu.findItem(R.id.messager); MenuItem item4 = menu.findItem(R.id.search); item3.setIcon(R.drawable.openmessage); item4.setIcon(R.drawable.search); try{ if (loggedIn.equals("noValue")) { item3.setVisible(false); } else { item3.setVisible(true); }} catch (Exception e){ } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {...
[ "0.72500116", "0.7204146", "0.71987385", "0.7180757", "0.71107906", "0.7043322", "0.7041613", "0.7015376", "0.7013112", "0.6982869", "0.69475657", "0.6941377", "0.6937569", "0.69213736", "0.69213736", "0.6892679", "0.6887231", "0.6877873", "0.68772626", "0.68644464", "0.68644...
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.messager) { if (loggedIn.equals("noValue")) { Toast.makeText(this, "Please log in to continue.", Toast.LENGTH_SHORT).show(); } else { Notifications not = new Notifications(); Log.d("value", "bookname1"); Intent in = new Intent(getBaseContext(), Notifications.class); startActivity(in); } } if (id == R.id.search) { Intent intent = new Intent(this, SearchAllData.class); startActivity(intent); } //noinspection SimplifiableIfStatement if (id == R.id.action_settings) { return true; } switch (item.getItemId()) { case android.R.id.home: onBackPressed(); return true; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n ...
[ "0.7905288", "0.7806507", "0.7767581", "0.7728288", "0.76327986", "0.7622734", "0.75856835", "0.7531844", "0.74890584", "0.74584335", "0.74584335", "0.7439769", "0.7422939", "0.7404292", "0.7392902", "0.7388083", "0.73805684", "0.7371689", "0.7363277", "0.73572534", "0.734688...
0.0
-1
Sends a toast to the user stating that the request has been redirected, likely due to an issue with their internet connection requiring login, and that they should check that as well.
public static void sendRedirectionToast(final Context context) { Toast.makeText(context, R.string.redirected, Toast.LENGTH_LONG).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onFailureRedirection(String errorMessage);", "@Override\n public void onErrorResponse(VolleyError error) {\n if (dialog != null)\n dialog.dismiss();\n\n //Display appropriate toast message depending u...
[ "0.65593886", "0.6278014", "0.614524", "0.6142653", "0.6095078", "0.60688585", "0.58350265", "0.5800186", "0.5774887", "0.57418805", "0.57418805", "0.57290846", "0.57290846", "0.56884", "0.56475335", "0.56405044", "0.5630546", "0.5624369", "0.56193936", "0.5615833", "0.560609...
0.6412974
1
Resets just the dates to the default, today and today + 1.
public static void resetDates() { arrivalDate = LocalDate.now(); departureDate = arrivalDate.plusDays(1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void resetDates() {\r\n selectedDate = null;\r\n currentDate = Calendar.getInstance();\r\n }", "public void setTodayDate() {\n\t\tfinal Calendar c = Calendar.getInstance();\r\n\t\tmYear = c.get(Calendar.YEAR);\r\n\t\tmMonth = c.get(Calendar.MONTH);\r\n\t\tmDay = c.get(Calendar.DAY_OF_MONTH);\r\n\r\...
[ "0.7793106", "0.68948305", "0.68915355", "0.68183744", "0.6653867", "0.6586131", "0.6570233", "0.64882666", "0.6422526", "0.6412492", "0.63056433", "0.63009584", "0.6294728", "0.6284936", "0.6254395", "0.61471444", "0.6129954", "0.61172956", "0.6096859", "0.6040015", "0.60383...
0.74166423
1
Completely clears the search and sets the fields filled by a search to their defaults.
public static void clearSearch() { searchQuery = null; numberOfAdults = 0; childAges = null; resetDates(); FOUND_HOTELS.clear(); selectedHotel = null; selectedRoom = null; EXTENDED_INFOS.clear(); HOTEL_ROOMS.clear(); IMAGE_DRAWABLES.clear(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void clearSearch() {\n searchParam = \"\";\n lazyModel = null;\n listRemotoFake = null;\n first = 0;\n rows = 10;\n }", "private void clearFields() {\r\n keywords = \"\";\r\n searchBy = \"\";\r\n }", "public void clearSearch(){\n search.clear...
[ "0.79450816", "0.78933847", "0.76371646", "0.7496634", "0.74553186", "0.7400108", "0.7306756", "0.7198282", "0.69495785", "0.69354403", "0.6889268", "0.6865244", "0.68491566", "0.6777681", "0.67488664", "0.6692233", "0.6557228", "0.65520483", "0.6545203", "0.65363824", "0.650...
0.7436723
5
Adds a reservation object to an applicationpersistent, inmemory cache of reservations, sorted by date.
public static void addReservationToCache(final Reservation reservation) { RESERVATIONS.add(reservation); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void addReservation(Reservation reservation) {\n reservations.add(reservation);\n }", "private SiteReservation save(SiteReservation reservation){\n try {\n reservation = repo.save(reservation);\n }\n catch (RuntimeException e){\n throw new DayReservedEx...
[ "0.6474108", "0.58406377", "0.57780075", "0.5706776", "0.5688845", "0.56382966", "0.5580661", "0.5528651", "0.5517893", "0.54950637", "0.5470839", "0.5448547", "0.54453593", "0.5420819", "0.53910327", "0.5361245", "0.5356339", "0.5302475", "0.522004", "0.52134174", "0.5208307...
0.7482333
0
Gets the most recent reservation from the collection containing them.
public static Reservation getLatestReservation() { return RESERVATIONS.size() == 0 ? null : RESERVATIONS.iterator().next(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public V getLatest() {\n return lastItemOfList(versions);\n }", "Book getLatestBook();", "<T> Collection<T> getMostRecent(Class<T> t, int max);", "public Collection<ReservationHistoryDTO> getCurrentReservations() throws ResourceNotFoundException{\n\t\tRegisteredUser currentUser = (RegisteredUser) Securit...
[ "0.61128074", "0.61106026", "0.60392845", "0.59966505", "0.58818597", "0.57360154", "0.5649391", "0.5648818", "0.56367195", "0.55998313", "0.55704385", "0.5547236", "0.55375975", "0.55066586", "0.55062044", "0.54561174", "0.5437116", "0.5432974", "0.5405276", "0.53493655", "0...
0.76178586
0
exists due to advice found at HTTP connection reuse which was buggy prefroyo
private void setupHttpConnectionStuff() { if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) { System.setProperty("http.keepAlive", "false"); } if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) { try { final File httpCacheDir = new File(getCacheDir(), "http"); HttpResponseCache.install(httpCacheDir, TEN_MEGABYTES); } catch (IOException ioe) { Log.e(Constants.LOG_TAG, "Could not install http cache on this device."); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void disableConnectionReuseIfNecessary() {\n\t\t// HTTP connection reuse which was buggy pre-froyo\n\t\tif (hasHttpConnectionBug()) {\n\t\t\tSystem.setProperty(\"http.keepAlive\", \"false\");\n\t\t}\n\t}", "private static void disableConnectionReuseIfNecessary() {\n\t if (Integer.parseInt(Build....
[ "0.69844234", "0.6899843", "0.6874643", "0.6781195", "0.6366963", "0.62760276", "0.6179929", "0.6114569", "0.6075036", "0.6052142", "0.6018485", "0.59778166", "0.59661406", "0.5946922", "0.5918189", "0.59121335", "0.5889206", "0.5872022", "0.58338606", "0.5820319", "0.5788573...
0.5994069
11
TODO Autogenerated method stub /Intent intent=new Intent(OldObjectMain.this,Iguide.class); startActivity(intent); OldObjectMain.this.finish();
@Override public void onClick(View arg0) { AskHelpAdd.this.finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void goToMainAppAsGuide(Guide guide) {\n Bundle guideBundle = new Bundle();\n guideBundle.putSerializable(\"guideObj\",guide.getClass());\n Intent moveToMainAppAsGuide = new Intent( this, MainGuideActivity.class );\n moveToMainAppAsGuide.putExtras(guideBundle);\n startAct...
[ "0.7293891", "0.70356303", "0.66072774", "0.65231305", "0.65005976", "0.6411811", "0.6365273", "0.63331336", "0.6313695", "0.6309744", "0.63037485", "0.6294414", "0.620867", "0.61822575", "0.6152479", "0.6121659", "0.61186576", "0.6114265", "0.6089496", "0.60866576", "0.60841...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View arg0) { showwindow(presentadd_group); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public void onClick(View arg0) { upload(arg0); }
{ "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 onItemClick(AdapterView arg0, View arg1, int arg2, long arg3) { groupID = messages.get(arg2).getid(); selfriend.setText(messages.get(arg2).getname()); popupWindow.dismiss(); //myfriends.setText(messages.get(arg2).getname()); // popupWindow.dismiss(); // popupWindow = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExr...
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.608016...
0.0
-1
TODO Autogenerated method stub
@Override public boolean onTouchEvent(MotionEvent event) { if (popupWindow != null && popupWindow.isShowing()) { popupWindow.dismiss(); popupWindow = null; } return super.onTouchEvent(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
Exact equivalent of input parameters used in LObjBoolConsumer.
@SuppressWarnings("UnusedDeclaration") public interface LObjBoolPair<T> extends LTuple<Object> { int SIZE = 2; T first(); default T value() { return first(); } boolean second(); @Override default Object get(int index) { switch(index) { case 1: return first(); case 2: return second(); default: throw new NoSuchElementException(); } } /** Tuple size */ @Override default int tupleSize() { return SIZE; } /** Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it. */ static <T> int argHashCode(T a1,boolean a2) { final int prime = 31; int result = 1; result = prime * result + ((a1 == null) ? 0 : a1.hashCode()); result = prime * result + Boolean.hashCode(a2); return result; } /** Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal. */ static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) { return Null.equals(a1, b1) && // a2==b2; // } /** * Static equals() implementation that takes two tuples and checks if they are equal. * Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class * and how many more values there are. */ static boolean argEquals(LObjBoolPair the, Object that) { return Null.equals(the, that, (one, two) -> { // Intentionally all implementations of LObjBoolPair are allowed. if (!(two instanceof LObjBoolPair)) { return false; } LObjBoolPair other = (LObjBoolPair) two; return argEquals(one.first(), one.second(), other.first(), other.second()); }); } /** * Static equals() implementation that takes two tuples and checks if they are equal. */ public static boolean tupleEquals(LObjBoolPair the, Object that) { return Null.equals(the, that, (one, two) -> { // Intentionally all implementations of LObjBoolPair are allowed. if (!(two instanceof LObjBoolPair)) { return false; } LObjBoolPair other = (LObjBoolPair) two; return one.tupleSize() == other.tupleSize() && argEquals(one.first(), one.second(), other.first(), other.second()); }); } @Override default Iterator<Object> iterator() { return new Iterator<Object>() { private int index; @Override public boolean hasNext() { return index<SIZE; } @Override public Object next() { index++; return get(index); } }; } interface ComparableObjBoolPair<T extends Comparable<? super T>> extends LObjBoolPair<T>, Comparable<LObjBoolPair<T>> { @Override default int compareTo(LObjBoolPair<T> that) { return Null.compare(this, that, (one, two) -> { int retval = 0; return (retval = Null.compare(one.first(), two.first())) != 0 ? retval : // (retval = Boolean.compare(one.second(), two.second())) != 0 ? retval : 0; // }); } } abstract class AbstractObjBoolPair<T> implements LObjBoolPair<T> { @Override public boolean equals(Object that) { return LObjBoolPair.tupleEquals(this, that); } @Override public int hashCode() { return LObjBoolPair.argHashCode(first(),second()); } @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append('('); sb.append(first()); sb.append(','); sb.append(second()); sb.append(')'); return sb.toString(); } } /** * Mutable tuple. */ interface Mut<T,SELF extends Mut<T,SELF>> extends LObjBoolPair<T> { SELF first(T first) ; SELF second(boolean second) ; default SELF setFirst(T first) { this.first(first); return (SELF) this; } /** Sets value if predicate(current) is true */ default SELF setFirstIf(T first, LPredicate<T> predicate) { if (predicate.test(this.first())) { return this.first(first); } return (SELF) this; } /** Sets new value if predicate predicate(newValue, current) is true. */ default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) { if (predicate.test(first, this.first())) { return this.first(first); } return (SELF) this; } /** Sets new value if predicate predicate(current, newValue) is true. */ default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) { if (predicate.test(this.first(), first)) { return this.first(first); } return (SELF) this; } default SELF setSecond(boolean second) { this.second(second); return (SELF) this; } /** Sets value if predicate(current) is true */ default SELF setSecondIf(boolean second, LLogicalOperator predicate) { if (predicate.apply(this.second())) { return this.second(second); } return (SELF) this; } /** Sets new value if predicate predicate(newValue, current) is true. */ default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) { if (predicate.apply(second, this.second())) { return this.second(second); } return (SELF) this; } /** Sets new value if predicate predicate(current, newValue) is true. */ default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) { if (predicate.apply(this.second(), second)) { return this.second(second); } return (SELF) this; } default SELF reset() { this.first(null); this.second(false); return (SELF) this; } } public static <T> MutObjBoolPair<T> of() { return of( null , false ); } public static <T> MutObjBoolPair<T> of(T a1,boolean a2){ return new MutObjBoolPair(a1,a2); } public static <T> MutObjBoolPair<T> copyOf(LObjBoolPair<T> tuple) { return of(tuple.first(), tuple.second()); } /** * Mutable, non-comparable tuple. */ class MutObjBoolPair<T> extends AbstractObjBoolPair<T> implements Mut<T,MutObjBoolPair<T>> { private T first; private boolean second; public MutObjBoolPair(T a1,boolean a2){ this.first = a1; this.second = a2; } public @Override T first() { return first; } public @Override MutObjBoolPair<T> first(T first) { this.first = first; return this; } public @Override boolean second() { return second; } public @Override MutObjBoolPair<T> second(boolean second) { this.second = second; return this; } } public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf() { return comparableOf( null , false ); } public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableOf(T a1,boolean a2){ return new MutCompObjBoolPair(a1,a2); } public static <T extends Comparable<? super T>> MutCompObjBoolPair<T> comparableCopyOf(LObjBoolPair<T> tuple) { return comparableOf(tuple.first(), tuple.second()); } /** * Mutable, comparable tuple. */ final class MutCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T>,Mut<T,MutCompObjBoolPair<T>> { private T first; private boolean second; public MutCompObjBoolPair(T a1,boolean a2){ this.first = a1; this.second = a2; } public @Override T first() { return first; } public @Override MutCompObjBoolPair<T> first(T first) { this.first = first; return this; } public @Override boolean second() { return second; } public @Override MutCompObjBoolPair<T> second(boolean second) { this.second = second; return this; } } public static <T> ImmObjBoolPair<T> immutableOf(T a1,boolean a2){ return new ImmObjBoolPair(a1,a2); } public static <T> ImmObjBoolPair<T> immutableCopyOf(LObjBoolPair<T> tuple) { return immutableOf(tuple.first(), tuple.second()); } /** * Immutable, non-comparable tuple. */ @Immutable final class ImmObjBoolPair<T> extends AbstractObjBoolPair<T> { private final T first; private final boolean second; public ImmObjBoolPair(T a1,boolean a2){ this.first = a1; this.second = a2; } public @Override T first() { return first; } public @Override boolean second() { return second; } } public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableOf(T a1,boolean a2){ return new ImmCompObjBoolPair(a1,a2); } public static <T extends Comparable<? super T>> ImmCompObjBoolPair<T> immutableComparableCopyOf(LObjBoolPair<T> tuple) { return immutableComparableOf(tuple.first(), tuple.second()); } /** * Immutable, comparable tuple. */ @Immutable final class ImmCompObjBoolPair<T extends Comparable<? super T>> extends AbstractObjBoolPair<T> implements ComparableObjBoolPair<T> { private final T first; private final boolean second; public ImmCompObjBoolPair(T a1,boolean a2){ this.first = a1; this.second = a2; } public @Override T first() { return first; } public @Override boolean second() { return second; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private boolean getBoolean(String paramString, boolean paramBoolean) {\n }", "public T caseOpBool(OpBool object)\n {\n return null;\n }", "protected abstract Boolean applicable(Map<String, Object> parameters);", "BoolOperation createBoolOperation();", "public T caseValBool(ValBool object)\n {\n r...
[ "0.59284616", "0.5850165", "0.5765378", "0.56660336", "0.56593126", "0.5605081", "0.559667", "0.55782384", "0.552931", "0.5469051", "0.54520243", "0.54262733", "0.5395711", "0.5386412", "0.5384291", "0.538008", "0.53554016", "0.5351653", "0.5345926", "0.5327184", "0.5323572",...
0.5473392
9
Static hashCode() implementation method that takes same arguments as fields of the LObjBoolPair and calculates hash from it.
static <T> int argHashCode(T a1,boolean a2) { final int prime = 31; int result = 1; result = prime * result + ((a1 == null) ? 0 : a1.hashCode()); result = prime * result + Boolean.hashCode(a2); return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public int hashCode() {\n return Objects.hash(myInt, myLong, myString, myBool, myOtherInt);\n }", "public abstract int hashCode();", "@SuppressWarnings(\"UnusedDeclaration\")\npublic interface LObjBoolPair<T> extends LTuple<Object> \n {\n\n int SIZE = 2;\n\n\n T first();\n\n ...
[ "0.67341965", "0.6590731", "0.65655017", "0.6516689", "0.6516689", "0.6516689", "0.6504537", "0.6504537", "0.6504537", "0.6504537", "0.6458634", "0.6430919", "0.6430919", "0.6406573", "0.6401248", "0.63981724", "0.6375067", "0.63439304", "0.62692046", "0.62494683", "0.6249291...
0.58669555
63
Static equals() implementation that takes same arguments (doubled) as fields of the LObjBoolPair and checks if all values are equal.
static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) { return Null.equals(a1, b1) && // a2==b2; // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n ...
[ "0.716647", "0.70248806", "0.70100677", "0.64297146", "0.62162584", "0.6045461", "0.60242975", "0.5953244", "0.59492546", "0.5932037", "0.5912234", "0.58843875", "0.58843344", "0.5859845", "0.5858141", "0.58525395", "0.5851747", "0.58456", "0.58296555", "0.5824556", "0.579847...
0.6007662
7
Static equals() implementation that takes two tuples and checks if they are equal. Tuples are considered equal if are implementing LObjBoolPair interface (among others) and their LObjBoolPair values are equal regardless of the implementing class and how many more values there are.
static boolean argEquals(LObjBoolPair the, Object that) { return Null.equals(the, that, (one, two) -> { // Intentionally all implementations of LObjBoolPair are allowed. if (!(two instanceof LObjBoolPair)) { return false; } LObjBoolPair other = (LObjBoolPair) two; return argEquals(one.first(), one.second(), other.first(), other.second()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean tupleEquals(LObjBoolPair the, Object that) {\n return Null.equals(the, that, (one, two) -> {\n // Intentionally all implementations of LObjBoolPair are allowed.\n if (!(two instanceof LObjBoolPair)) {\n return false;\n }\n\n ...
[ "0.7989853", "0.74564725", "0.6533522", "0.6262413", "0.6217383", "0.6199891", "0.6196571", "0.61055654", "0.6075562", "0.60131025", "0.596823", "0.59558815", "0.58595264", "0.5756969", "0.5744192", "0.5729089", "0.57036215", "0.56890374", "0.564069", "0.5618284", "0.55846596...
0.674067
2
Static equals() implementation that takes two tuples and checks if they are equal.
public static boolean tupleEquals(LObjBoolPair the, Object that) { return Null.equals(the, that, (one, two) -> { // Intentionally all implementations of LObjBoolPair are allowed. if (!(two instanceof LObjBoolPair)) { return false; } LObjBoolPair other = (LObjBoolPair) two; return one.tupleSize() == other.tupleSize() && argEquals(one.first(), one.second(), other.first(), other.second()); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static <T> boolean argEquals(T a1,boolean a2, T b1,boolean b2) {\n return\n Null.equals(a1, b1) && //\n a2==b2; //\n }", "public boolean Equals(Pair rhs) {\n if(this.first == rhs.first &&\n this.second == rhs.second)\n return true;\n\n return false;\n ...
[ "0.6395972", "0.63267195", "0.6226341", "0.61683697", "0.61413264", "0.6116091", "0.6041172", "0.6035154", "0.60133046", "0.59941286", "0.59852487", "0.5935354", "0.5917981", "0.59003496", "0.58805454", "0.5872012", "0.5852087", "0.5828267", "0.58065104", "0.57981503", "0.579...
0.6985036
0
Sets value if predicate(current) is true
default SELF setFirstIf(T first, LPredicate<T> predicate) { if (predicate.test(this.first())) { return this.first(first); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMi...
[ "0.5986008", "0.55188686", "0.5479107", "0.54401684", "0.5439245", "0.54204345", "0.5377112", "0.53505856", "0.53299624", "0.5319342", "0.52817", "0.52546155", "0.52220535", "0.51959294", "0.51854277", "0.51810086", "0.51760554", "0.517124", "0.51251817", "0.51066566", "0.509...
0.53294986
9
Sets new value if predicate predicate(newValue, current) is true.
default SELF setFirstIf(T first, LBiPredicate<T,T> predicate) { if (predicate.test(first, this.first())) { return this.first(first); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMi...
[ "0.60006934", "0.5581882", "0.52968955", "0.52942586", "0.5293127", "0.52424175", "0.52401125", "0.52367747", "0.5220226", "0.5186571", "0.516681", "0.51546264", "0.51346004", "0.5121217", "0.50979984", "0.50901043", "0.50787485", "0.5077679", "0.5030916", "0.5020283", "0.500...
0.4974873
24
Sets new value if predicate predicate(current, newValue) is true.
default SELF setFirstIf(LBiPredicate<T,T> predicate, T first) { if (predicate.test(this.first(), first)) { return this.first(first); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcu...
[ "0.5702053", "0.5676041", "0.5441933", "0.53814626", "0.53559476", "0.5344194", "0.52817774", "0.52280575", "0.520287", "0.51958203", "0.5186019", "0.5171827", "0.5090885", "0.5028234", "0.50207907", "0.49758634", "0.49733618", "0.49602497", "0.4951166", "0.49450332", "0.4940...
0.487373
29
Sets value if predicate(current) is true
default SELF setSecondIf(boolean second, LLogicalOperator predicate) { if (predicate.apply(this.second())) { return this.second(second); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMi...
[ "0.5984474", "0.5516796", "0.54791754", "0.54405916", "0.5439595", "0.5421406", "0.5377935", "0.5351316", "0.5331222", "0.53274745", "0.5321055", "0.5283311", "0.5255572", "0.522244", "0.5196468", "0.51864713", "0.5182087", "0.51770544", "0.5172624", "0.51242846", "0.51072246...
0.49951357
32
Sets new value if predicate predicate(newValue, current) is true.
default SELF setSecondIf(boolean second, LLogicalBinaryOperator predicate) { if (predicate.apply(second, this.second())) { return this.second(second); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcurrent = getWrappedSelectorIndex(current);\n\t\t} else {\n\t\t\tcurrent = Math.max(current, mMi...
[ "0.60006934", "0.5581882", "0.52968955", "0.52942586", "0.5293127", "0.52424175", "0.52401125", "0.52367747", "0.5220226", "0.5186571", "0.516681", "0.51546264", "0.51346004", "0.5121217", "0.50979984", "0.50901043", "0.50787485", "0.5077679", "0.5030916", "0.5020283", "0.500...
0.49385604
27
Sets new value if predicate predicate(current, newValue) is true.
default SELF setSecondIf(LLogicalBinaryOperator predicate, boolean second) { if (predicate.apply(this.second(), second)) { return this.second(second); } return (SELF) this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "private void setValueInternal(int current, boolean notifyChange) {\n\t\tif (mValue == current) {\n\t\t\treturn;\n\t\t}\n\t\t// Wrap around the values if we go past the start or end\n\t\tif (mWrapSelectorWheel) {\n\t\t\tcu...
[ "0.5701735", "0.567706", "0.5440111", "0.53802073", "0.53554827", "0.53429127", "0.5283081", "0.52288485", "0.5201554", "0.5196137", "0.51866406", "0.51715565", "0.5090957", "0.5029188", "0.5022094", "0.49757457", "0.49742422", "0.4960465", "0.49500522", "0.49452335", "0.4940...
0.47954702
40
This is a repository interface for Investment details
@Repository public interface InvestmentRepository extends JpaRepository<Investment, Integer> { public List<Investment> findByinvestmentInvestorId(int investorId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface InviteRepository extends Repository<Invite> {\n}", "@Override\r\n public Class<Investment> getEntityType() {\n return Investment.class;\r\n }", "public interface InviteRepository extends CrudRepository<Invite, Integer> {\n List<Invite> findByEmail(String email);\n List <Invite> fi...
[ "0.6801583", "0.6676036", "0.6633593", "0.6602116", "0.6404072", "0.6396059", "0.604053", "0.59762585", "0.5971555", "0.5966714", "0.5946365", "0.59460473", "0.59278756", "0.5870428", "0.5855118", "0.58262163", "0.57567644", "0.5746025", "0.5737712", "0.57281035", "0.5721465"...
0.726334
0
DateAndTime constructor: hour, minute and second supplied
public DateAndTime(int hour, int minute, int second, int month, int day, int year) { if (hour < 0 || hour >= 24) throw new IllegalArgumentException("hour must be 0-23"); if (minute < 0 || minute >= 60) throw new IllegalArgumentException("minute must be 0-59"); if (second < 0 || second >= 60) throw new IllegalArgumentException("second must be 0-59"); this.hour = hour; this.minute = minute; this.second = second; // check if month in range if (month <= 0 || month > 12) throw new IllegalArgumentException( "month (" + month + ") must be 1-12"); // check if day in range for month if (day <= 0 || (day > daysPerMonth[month] && !(month == 2 && day == 29))) throw new IllegalArgumentException("day (" + day + ") out-of-range for the specified month and year"); // check for leap year if month is 2 and day is 29 if (month == 2 && day == 29 && !(year % 400 == 0 || (year % 4 == 0 && year % 100 != 0))) throw new IllegalArgumentException("day (" + day + ") out-of-range for the specified month and year"); // check for nonnegative years if (year < 0) { throw new IllegalArgumentException("year (" + year + ") must be greater than 0"); } this.month = month; this.day = day; this.year = year; System.out.printf( "DateAndTime object constructor for DateAndTime %s%n", this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public DateTime(final int year, final int month, final int day, final int hour, final int minute, final int second) {\n this(null, year, month, day, hour, minute, second);\n }", "public Time(long hour, long minute, long second) {\r\n\t\tthis.hour = hour;\r\n\t\tthis.minute = minute;\r\n\t\tthis.second ...
[ "0.7490668", "0.74391025", "0.71702254", "0.71512115", "0.70697397", "0.6959278", "0.6886207", "0.68845904", "0.6822506", "0.6817271", "0.68035173", "0.67923504", "0.6768003", "0.66717815", "0.664209", "0.6598843", "0.64553124", "0.6422888", "0.6418404", "0.6405137", "0.63905...
0.7964678
0
validate and set hour
public void setHour(int hour) { if (hour < 0 || hour >= 24) throw new IllegalArgumentException("hour must be 0-23"); this.hour = hour; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setHour(int hour) throws InvalidDateException {\r\n\t\tif (hour < 24 & hour >= 0) {\r\n\t\t\tthis.hour = hour;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter a realistic hour for the date (between 0 and 23) !\");\r\n\t\t}\r\n\t}", "public void setHour(int hour){\n if(ho...
[ "0.79209894", "0.7660724", "0.75577456", "0.72400194", "0.71984506", "0.7146316", "0.7010471", "0.6992469", "0.6941009", "0.69388753", "0.6860422", "0.6855962", "0.6695786", "0.6692523", "0.66528684", "0.6615622", "0.6545083", "0.6540104", "0.6410614", "0.6403631", "0.6390692...
0.7587189
2
validate and set minute
public void setMinute(int minute) { if (minute < 0 || minute >= 60) throw new IllegalArgumentException("minute must be 0-59"); this.minute = minute; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setMinute(int value) {\n this.minute = value;\n }", "public void setMinute(int minute) throws InvalidDateException {\r\n\t\tif (minute < 60 & minute >= 0) {\r\n\t\t\tthis.minute = minute;\r\n\t\t} else {\r\n\t\t\tthrow new InvalidDateException(\"Please enter ...
[ "0.76856345", "0.76606596", "0.761505", "0.7490553", "0.7289403", "0.71394736", "0.71306384", "0.71127254", "0.6789289", "0.678369", "0.6775174", "0.6765561", "0.67346364", "0.6708564", "0.662914", "0.6562724", "0.65306157", "0.6511293", "0.64461", "0.63807404", "0.63447887",...
0.77163154
0
validate and set second
public void setSecond(int second) { if (second < 0 || second >= 60) throw new IllegalArgumentException("second must be 0-59"); this.second = second; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setSecond(@NotNull S second) {\n Condition.argNotNull(\"second\", second);\n this.second = second;\n }", "@Override\r\n\t\tpublic E setSecond(E second) {\n\t\t\treturn pair.setSecond(second);\r\n\t\t}", "public void setSecond(V second) {\r\n\t\tthis.second = second;\r\n\t}", "@Ov...
[ "0.70856446", "0.6361905", "0.6276206", "0.61921954", "0.6108844", "0.6033085", "0.5817619", "0.57620233", "0.56099474", "0.5560786", "0.55570865", "0.5548216", "0.5530626", "0.55087465", "0.5489879", "0.54160947", "0.538465", "0.5380144", "0.5351246", "0.5337013", "0.5325775...
0.57132304
8
Get Methods get hour value
public int getHour() { return hour; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Integer getHour();", "public int getHour() { return this.hour; }", "public int getHour()\n {\n return hour;\n }", "public int getHour(){\n return hour;\n }", "public String getHours();", "Integer getStartHour();", "public Integer getHour() {\n return hour;\n }", "public d...
[ "0.832758", "0.80446076", "0.80116737", "0.7951062", "0.7887101", "0.77631855", "0.7653993", "0.7550536", "0.7537496", "0.7537496", "0.7524768", "0.7499852", "0.74854606", "0.7463203", "0.7413942", "0.7413942", "0.7364893", "0.73415977", "0.73282725", "0.7297467", "0.7182356"...
0.808581
1
convert to String in universaltime format (HH:MM:SS)
public String toUniversalString() { return String.format( "%02d:%02d:%02d %d/%d/%d", getHour(), getMinute(), getSecond(), month, day, year); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String toUniversalString() {\n return String.format(\"%02d:%02d:%02d\", hour, minutes, seconds);\n\n }", "public String toUniversalString()\r\n {\r\n DecimalFormat twoDigits = new DecimalFormat( \"00\" );\r\n\r\n return twoDigits.format( this.getHour() ) + \":\" +\r\n twoDigi...
[ "0.80046374", "0.7815428", "0.75898767", "0.75248414", "0.71624917", "0.7161535", "0.710841", "0.7094705", "0.7051629", "0.70079744", "0.6935209", "0.690322", "0.69021595", "0.68425685", "0.6828247", "0.6827858", "0.6818873", "0.68144214", "0.6807079", "0.6768991", "0.6767582...
0.7246816
4
convert to String in standardtime format (H:MM:SS AM or PM)
public String toString() { return String.format("%d:%02d:%02d %s %d/%d/%d", ((getHour() == 0 || getHour() == 12) ? 12 : getHour() % 12), getMinute(), getSecond(), (getHour() < 12 ? "AM" : "PM"), month, day, year); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getTimeString() {\n int hour = date.get(Calendar.HOUR);\n int minute = date.get(Calendar.MINUTE);\n\n String AM_PM = \"PM\";\n if (date.get(Calendar.AM_PM) == Calendar.AM) AM_PM = \"AM\";\n\n String hour_fixed = String.valueOf(hour);\n if (hour == 0) hour_fix...
[ "0.7770099", "0.766827", "0.748694", "0.73785627", "0.7375992", "0.7315918", "0.7280893", "0.7271658", "0.72604984", "0.72172993", "0.7215926", "0.719824", "0.71760523", "0.7153763", "0.71521586", "0.71110487", "0.70760655", "0.7063534", "0.7046052", "0.7015974", "0.69922906"...
0.6348413
94