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
Return the value associated with the column: check_opinion
public java.lang.String getCheckOpinion () { return checkOpinion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setCheckOpinion (java.lang.String checkOpinion) {\n\t\tthis.checkOpinion = checkOpinion;\n\t}", "public Integer getHighOpinion() {\n return highOpinion;\n }", "public String getOpinionFound() {\n if (OpinionFinding_Type.featOkTst && ((OpinionFinding_Type)jcasType).casFeat_opinionFound ...
[ "0.599743", "0.5506738", "0.5495229", "0.5229709", "0.5187985", "0.5138739", "0.51346815", "0.51330036", "0.5119929", "0.50696784", "0.50670177", "0.50624204", "0.5040266", "0.50369567", "0.5031764", "0.50263494", "0.50100076", "0.49941775", "0.4970659", "0.49392366", "0.4923...
0.68126535
0
Set the value related to the column: check_opinion
public void setCheckOpinion (java.lang.String checkOpinion) { this.checkOpinion = checkOpinion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public java.lang.String getCheckOpinion () {\n\t\treturn checkOpinion;\n\t}", "void setConfirmed(String value);", "@SuppressWarnings(\"null\")\n private void setIDCupon() {\n int id_opinion = 1;\n ResultSet rs = null;\n Statement s = null;\n //cb_TS.addItem(\"Seleccione una opini...
[ "0.58904654", "0.5753125", "0.56847984", "0.55484134", "0.5505187", "0.5395468", "0.5269351", "0.5243939", "0.5241723", "0.5237964", "0.5099469", "0.50934565", "0.5088146", "0.50838363", "0.5052276", "0.5043812", "0.50375485", "0.5017503", "0.50045174", "0.499354", "0.4977332...
0.69215083
0
Return the value associated with the column: is_rejected
public java.lang.Boolean getRejected () { return rejected; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getRejected() {\n return rejected;\n }", "public boolean getRejected() {\n return rejected;\n }", "public void setRejected(boolean value) {\n this.rejected = value;\n }", "public String getReject() {\n return reject;\n }", "public String getRejector() {\n ret...
[ "0.7102963", "0.7043231", "0.6812107", "0.6695766", "0.62820464", "0.6255999", "0.6225763", "0.6225763", "0.6215481", "0.61301345", "0.60277736", "0.597109", "0.59291315", "0.59291315", "0.59192777", "0.57441854", "0.566243", "0.5576732", "0.54775554", "0.5442128", "0.5318295...
0.6771641
3
Set the value related to the column: is_rejected
public void setRejected (java.lang.Boolean rejected) { this.rejected = rejected; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setRejected(boolean value) {\n this.rejected = value;\n }", "public com.example.DNSLog.Builder setRejected(boolean value) {\n validate(fields()[19], value);\n this.rejected = value;\n fieldSetFlags()[19] = true;\n return this;\n }", "public GetACDHistoryRequest setRejecte...
[ "0.805112", "0.7284399", "0.68703514", "0.6642701", "0.6610167", "0.64693385", "0.6227789", "0.6227789", "0.6165047", "0.61393213", "0.61292505", "0.6071017", "0.6071017", "0.5870062", "0.58534795", "0.5743453", "0.5713678", "0.56684196", "0.5637364", "0.557099", "0.557099", ...
0.72163326
2
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() { buttonGroup1 = new javax.swing.ButtonGroup(); jPanel3 = new javax.swing.JPanel(); jButton1 = new javax.swing.JButton(); jButton2 = new javax.swing.JButton(); jPanel1 = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel2 = new javax.swing.JLabel(); jPanel2 = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel5 = new javax.swing.JLabel(); jTextField1 = new javax.swing.JTextField(); jLabel7 = new javax.swing.JLabel(); jLabel8 = new javax.swing.JLabel(); jLabel9 = new javax.swing.JLabel(); jRadioButton1 = new javax.swing.JRadioButton(); jRadioButton2 = new javax.swing.JRadioButton(); jRadioButton3 = new javax.swing.JRadioButton(); jLabel6 = new javax.swing.JLabel(); jLabel10 = new javax.swing.JLabel(); jLabel11 = new javax.swing.JLabel(); jButton3 = new javax.swing.JButton(); jTextField2 = new javax.swing.JTextField(); jLabel13 = new javax.swing.JLabel(); jButton1.setFont(new java.awt.Font("Gill Sans MT", 0, 24)); // NOI18N jButton1.setText("Create"); jButton1.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton1ActionPerformed(evt); } }); jButton2.setFont(new java.awt.Font("Gill Sans MT", 0, 24)); // NOI18N jButton2.setText("Cancel"); jButton2.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton2ActionPerformed(evt); } }); javax.swing.GroupLayout jPanel3Layout = new javax.swing.GroupLayout(jPanel3); jPanel3.setLayout(jPanel3Layout); jPanel3Layout.setHorizontalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jButton1) .addGap(18, 18, 18) .addComponent(jButton2) .addGap(20, 20, 20)) ); jPanel3Layout.setVerticalGroup( jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel3Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel3Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jButton1) .addComponent(jButton2)) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jLabel1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Images/icons8_sewing_machine_128px.png"))); // NOI18N jLabel2.setFont(new java.awt.Font("Gill Sans MT", 0, 48)); // NOI18N jLabel2.setForeground(new java.awt.Color(102, 102, 255)); jLabel2.setText("Gangsa Tailor"); javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1); jPanel1.setLayout(jPanel1Layout); jPanel1Layout.setHorizontalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel1Layout.createSequentialGroup() .addContainerGap() .addComponent(jLabel1) .addGap(18, 18, 18) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); jPanel1Layout.setVerticalGroup( jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup() .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false) .addComponent(jLabel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jLabel1, javax.swing.GroupLayout.DEFAULT_SIZE, 153, Short.MAX_VALUE)) .addGap(23, 23, 23)) ); jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(102, 102, 255), 2), "Vermak", javax.swing.border.TitledBorder.DEFAULT_JUSTIFICATION, javax.swing.border.TitledBorder.DEFAULT_POSITION, new java.awt.Font("Gill Sans MT", 0, 24))); // NOI18N jLabel3.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel3.setText("No. Pesanan"); jLabel4.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel4.setText("XXXXXXXXXXXXXXX"); jLabel5.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel5.setText("Nama Pemesan"); jTextField1.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel7.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel7.setText("XXXXXXXXXXXXXXX"); jLabel8.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel8.setText("Tanggal"); jLabel9.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel9.setText("Jenis"); buttonGroup1.add(jRadioButton1); jRadioButton1.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jRadioButton1.setText("Potong"); jRadioButton1.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jRadioButton1MouseClicked(evt); } }); buttonGroup1.add(jRadioButton2); jRadioButton2.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jRadioButton2.setText("Mengecilkan"); jRadioButton2.addMouseMotionListener(new java.awt.event.MouseMotionAdapter() { public void mouseDragged(java.awt.event.MouseEvent evt) { jRadioButton2MouseDragged(evt); } }); jRadioButton2.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jRadioButton2MouseClicked(evt); } }); buttonGroup1.add(jRadioButton3); jRadioButton3.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jRadioButton3.setText("Tambal"); jRadioButton3.addMouseListener(new java.awt.event.MouseAdapter() { public void mouseClicked(java.awt.event.MouseEvent evt) { jRadioButton3MouseClicked(evt); } }); jLabel6.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel6.setText("Total"); jLabel10.setFont(new java.awt.Font("Tahoma", 0, 24)); // NOI18N jLabel10.setText("0,-"); jLabel11.setFont(new java.awt.Font("Gill Sans MT", 0, 24)); // NOI18N jLabel11.setText("RP"); jButton3.setFont(new java.awt.Font("Gill Sans MT", 0, 24)); // NOI18N jButton3.setText("Calculate"); jButton3.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { jButton3ActionPerformed(evt); } }); jTextField2.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel13.setFont(new java.awt.Font("Gill Sans MT", 0, 18)); // NOI18N jLabel13.setText("Kuantitas"); 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(jLabel5) .addComponent(jLabel9) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6) .addComponent(jLabel13)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addComponent(jTextField2) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 187, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 70, javax.swing.GroupLayout.PREFERRED_SIZE) .addGap(30, 30, 30) .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(jTextField1) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jRadioButton1) .addGap(18, 18, 18) .addComponent(jRadioButton2) .addGap(18, 18, 18) .addComponent(jRadioButton3) .addGap(0, 0, Short.MAX_VALUE)) .addGroup(jPanel2Layout.createSequentialGroup() .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 41, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jLabel10, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))) .addContainerGap()) .addGroup(jPanel2Layout.createSequentialGroup() .addGap(240, 240, 240) .addComponent(jButton3) .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) ); jPanel2Layout.setVerticalGroup( jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(jPanel2Layout.createSequentialGroup() .addContainerGap() .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel3, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel4) .addComponent(jLabel8, javax.swing.GroupLayout.PREFERRED_SIZE, 32, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel7)) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel5) .addComponent(jTextField1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel9) .addComponent(jRadioButton1) .addComponent(jRadioButton2) .addComponent(jRadioButton3)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jTextField2, javax.swing.GroupLayout.PREFERRED_SIZE, 28, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel13)) .addGap(18, 18, 18) .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) .addComponent(jLabel10, javax.swing.GroupLayout.PREFERRED_SIZE, 37, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel11, javax.swing.GroupLayout.PREFERRED_SIZE, 47, javax.swing.GroupLayout.PREFERRED_SIZE) .addComponent(jLabel6)) .addGap(18, 18, 18) .addComponent(jButton3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addContainerGap()) ); 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) .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addComponent(jPanel3, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addContainerGap()) ); layout.setVerticalGroup( layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(layout.createSequentialGroup() .addContainerGap() .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 175, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED) .addComponent(jPanel3, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, 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.73191476", "0.72906625", "0.72906625", "0.72906625", "0.72860986", "0.7248112", "0.7213479", "0.72078276", "0.7195841", "0.71899796", "0.71840525", "0.7158498", "0.71477973", "0.7092748", "0.70800966", "0.70558053", "0.69871384", "0.69773406", "0.69548076", "0.69533914", "...
0.0
-1
full design insert design == tailor
void ProcessInput() throws SQLException { if ("".equals(jTextField1.getText()) || "".equals(buttonGroup1.getSelection().getActionCommand()) || "".equals(jTextField2.getText())) {JOptionPane.showMessageDialog(null , "Isi Form dengan benar");} else { String nama = jTextField1.getText(); String tanggal = jLabel7.getText(); String jenis = buttonGroup1.getSelection().getActionCommand(); String kuantitas = jTextField2.getText(); String idPesanan = jLabel4.getText(); String pembayaran = jLabel10.getText(); sql1 = "INSERT INTO vermak(tanggal, nama, jenis, kuantitas) VALUES ('" +tanggal+"','" +nama+"','" +jenis+"','" +kuantitas+"')"; sql2 = "insert into payvermak(idPesanan, pembayaran) values ('"+idPesanan+"','"+pembayaran+"')"; stat = (com.mysql.jdbc.Statement) connection.prepareStatement(sql1); stat.execute(sql1); stat1 = (com.mysql.jdbc.Statement) connection.prepareStatement(sql2); stat1.execute(sql2); stat.close(); stat1.close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void designBasement() {\n\t\t\r\n\t}", "@Override\n\tpublic void insert(Design design) {\n\t\tdesignMapper.insert(design);\n\t}", "private void designCompleteSeatMapUi() {\n\n //load NetworkImageView\n loadNetworkImages();\n\n labelsLocalize();\n //passenger design\n d...
[ "0.68928915", "0.61074895", "0.60044056", "0.5662004", "0.560275", "0.5589867", "0.53751796", "0.5364643", "0.5318539", "0.5293806", "0.5281905", "0.52699465", "0.5268235", "0.5265847", "0.5263259", "0.525611", "0.5252247", "0.52518564", "0.524969", "0.5224895", "0.5208332", ...
0.0
-1
GENFIRST:event_jButton2ActionPerformed TODO add your handling code here: register form
private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) { this.dispose(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void fullNameRegisterActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void btnRegresarActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void jButton2ActionPerformed(java.awt.event.ActionEvent evt) {\n }", "private void passwordRegisterActionPerformed(java.awt.e...
[ "0.7314661", "0.72085303", "0.7191521", "0.7172441", "0.7166643", "0.7134459", "0.70401394", "0.702018", "0.69614947", "0.6911413", "0.68762577", "0.6843687", "0.6801158", "0.67420805", "0.67420805", "0.67420805", "0.67420805", "0.6727474", "0.6711301", "0.6668336", "0.666686...
0.0
-1
/ Find all of the candidate phone numbers. Order the list by Primary phone = "Y" as first number listed.
public List findCandidatePhones(Serializable candidateId) { Criteria criteria = HibernateUtil.getSessionFactory() .getCurrentSession().createCriteria(Phone.class); Object candidate = HibernateUtil.getCurrentSession().load(Candidate.class, candidateId); criteria.add(Restrictions.eq("candidate", candidate)); criteria = addOrder(criteria, "primary", ORDER_DESC); return criteria.list(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<String> getUniquePhoneNo();", "public void getPhoneNumbers() {\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.forEach(System.out::println);\n\t}", "java.util.List<com.demo.springprotobuff.Demoproto.Student.PhoneNumber> getPhoneList();", "java.util.List<cb.Careerbuilder.Company.PhoneNumber> \n get...
[ "0.58856976", "0.58350915", "0.5775883", "0.5741385", "0.54806566", "0.54541653", "0.54449916", "0.5426991", "0.54164916", "0.54164916", "0.5414466", "0.53270096", "0.53117496", "0.52855456", "0.52697766", "0.52475935", "0.52023774", "0.5186696", "0.51857173", "0.51842344", "...
0.5972772
0
Sort from high demand to low demand
@Override public int compareTo(UnconstrainedBidElement o) { return Double.compare(o.demandWatt, demandWatt); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void sort( int low, int high)\n {\n if (low > high)\n {\n /* pi is partitioning index, arr[pi] is\n now at right place */\n int pi = partition(low, high);\n\n // Recursively sort elements before\n // partition and after partition\n ...
[ "0.62841624", "0.62690663", "0.6238046", "0.62040514", "0.6069258", "0.6007396", "0.5986883", "0.59765947", "0.59445536", "0.5885657", "0.58325905", "0.581992", "0.5818587", "0.5804627", "0.5786931", "0.5782492", "0.57639664", "0.57603335", "0.57556015", "0.57553744", "0.5739...
0.55629003
36
Creates a simple UnconstrainedBid if you provide one running mode and demand value.
public UnconstrainedBid(UnconstrainedBidElement element, MarketBasis marketBasis) { this(Collections.<UnconstrainedBidElement> singleton(element), marketBasis); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n double minPriority = 0.0;\n double maxPriority = 1.0;\n\n // First make the...
[ "0.76920813", "0.59855026", "0.596352", "0.58749586", "0.57178414", "0.57161486", "0.557406", "0.5518618", "0.54898", "0.54768914", "0.54565346", "0.5419265", "0.5371085", "0.53300375", "0.52542186", "0.52293134", "0.51701003", "0.5165727", "0.51514685", "0.5062406", "0.50565...
0.57613367
4
Creates a simple UnconstrainedBid from a collection of bid elements and the market basis.
public UnconstrainedBid(Collection<UnconstrainedBidElement> elements, MarketBasis marketBasis) { if (elements == null || elements.isEmpty()) { throw new IllegalStateException("Cannot construct an empty UnconstrainedBid"); } this.elements = new TreeSet<UnconstrainedBidElement>(); this.elements.addAll(elements); this.marketBasis = marketBasis; constructBid(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n double minPriority = 0.0;\n double maxPriority = 1.0;\n\n // First make the...
[ "0.74819213", "0.71448606", "0.6430575", "0.5834654", "0.55380297", "0.55266076", "0.5513123", "0.55058116", "0.54745364", "0.537799", "0.53383464", "0.52154994", "0.5212431", "0.51200014", "0.5091742", "0.503911", "0.50350875", "0.4986684", "0.49617475", "0.4920207", "0.4911...
0.8150931
0
Prepares the Power Matcher bid.
private void constructBid() { Bid rawBid; double maxDemand = elements.first().demandWatt; // Minimum demand is also Max Production. double minDemand = elements.last().demandWatt; double minPriority = 0.0; double maxPriority = 1.0; // First make the ideal, continuous bid, that does not care about discrete running modes. rawBid = Bid.create(marketBasis) .add(priceOf(minPriority), maxDemand) .add(priceOf(maxPriority), minDemand) .build(); // Now construct actual bid double[] rawDemand = rawBid.getDemand(); newBid = new UnconstrainedBidElement[rawDemand.length]; for (int i = 0; i < rawDemand.length; i++) { newBid[i] = getClosest(rawDemand[i]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Before\n\tpublic void prepare() {\n\t\tbomb = new Special(SpecialType.NUKE);\n\t\tcom = new Commander(0, 0, 0, 1);\n\t\tbaseHP = com.getHealth();\n\t}", "public void prepare() {\r\n\t\tmyPreviousBet = 0;\r\n\t\tmyCurrentBet = 0;\r\n\t\tstage = 0;\r\n\t\tposition = -1;\r\n\t\tintel.reset();\r\n\t\tfor (int i = 0...
[ "0.5933246", "0.55425286", "0.54956645", "0.5392484", "0.536264", "0.5306825", "0.52789414", "0.5231887", "0.5221546", "0.52158344", "0.52153856", "0.5208622", "0.51798415", "0.5147247", "0.5131622", "0.51027083", "0.50827134", "0.5063159", "0.50400406", "0.4976501", "0.48838...
0.5369541
4
Returns the bid element closest to the demand value given as input.
private UnconstrainedBidElement getClosest(double demandWatt) { UnconstrainedBidElement best = null; double bestDistance = Double.MAX_VALUE; for (UnconstrainedBidElement e : elements) { double distance = Math.abs(demandWatt - e.demandWatt); if (best == null || distance < bestDistance) { best = e; bestDistance = distance; } } return best; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Coordinates closestPointB() {\n return closestPointB;\n }", "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n d...
[ "0.583562", "0.5740464", "0.56160045", "0.5545606", "0.54977137", "0.5475154", "0.5469573", "0.54109806", "0.53903276", "0.5386665", "0.53335536", "0.53328174", "0.53156704", "0.53002125", "0.52934045", "0.5275449", "0.5264278", "0.52315295", "0.52303", "0.52256835", "0.51872...
0.81474334
0
Returns the index that comes closest to the price
private double priceOf(double priceFraction) { return marketBasis.getMinimumPrice() + priceFraction * (marketBasis.getMaximumPrice() - marketBasis.getMinimumPrice()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private int calculateIndexOfClosestPoint(Position[] smoothedPath) {\n double[] distances = new double[smoothedPath.length];\n for (int i = 0/*lastClosestPointIndex*/; i < smoothedPath.length; i++) {\n distances[i] = Functions.Positions.subtract(smoothedPath[i], currentCoord).getMagnitude()...
[ "0.63207597", "0.61142725", "0.59211534", "0.5868824", "0.5824542", "0.5781286", "0.5776981", "0.5773154", "0.57616025", "0.57449454", "0.57426035", "0.57133937", "0.5710198", "0.57073075", "0.5675749", "0.56598556", "0.5635921", "0.5628465", "0.5608822", "0.5606028", "0.5556...
0.0
-1
Given a PriceInfo object, the UnconstrainedBidElement is returned that expresses which RunningMode the Unconstrained device should go to.
public UnconstrainedBidElement runningModeForPrice(Price price) { return newBid[price.getPriceIndex()]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "io.grpc.user.task.PriceCondition getCondition();", "private void constructBid() {\n Bid rawBid;\n double maxDemand = elements.first().demandWatt;\n // Minimum demand is also Max Production.\n double minDemand = elements.last().demandWatt;\n\n double minPriority = 0.0;\n ...
[ "0.47164", "0.4615696", "0.45672724", "0.4516371", "0.445015", "0.44156533", "0.43511775", "0.43299708", "0.4303648", "0.42750403", "0.4255609", "0.42546806", "0.42498285", "0.4215314", "0.41760403", "0.41667277", "0.4158972", "0.41580185", "0.41430247", "0.41354933", "0.4123...
0.6981807
0
Produces the Bid object on the basis of the prepared info.
public Bid toBid() { double[] demand = new double[newBid.length]; for (int i = 0; i < newBid.length; i++) { demand[i] = newBid[i].demandWatt; } return new Bid(marketBasis, demand); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "BInformation findOne(Long id);", "public Bid assembleBid(BidDTO bidDTO) {\r\n AuctionPersistenceHelper.validateNotNull(bidDTO, \"bidDTO\");\r\n\r\n CustomBid bid = new CustomBid(bidDTO.getBidderId(), bidDTO.getImageId(), bidDTO.getMaxAmount(),\r\n bidDTO.getTimestamp());\r\n\r\n ...
[ "0.60778654", "0.60376126", "0.5995017", "0.5921622", "0.5610566", "0.5578892", "0.5556809", "0.5549637", "0.5484341", "0.5474827", "0.54305565", "0.5418521", "0.54048103", "0.5359941", "0.52675515", "0.525616", "0.52552897", "0.52465487", "0.5246064", "0.5238638", "0.5233244...
0.59246767
3
write the token to Shared Preference
public static void writeAccessToken(Oauth2AccessToken token) { if (null == token) { return; } SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); sharedPref.setWeiboUID(token.getUid()); sharedPref.setWeiboAccessToken(token.getToken()); sharedPref.setWeiboExpiresTime(token.getExpiresTime()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void updateToken(String token){\n //todo something\n if (sharedPreferencesUtils != null){\n sharedPreferencesUtils.writeStringPreference(Contains.PREF_DEVICE_TOKEN, token);\n }else {\n sharedPreferencesUtils = new SharedPreferencesUtils(this);\n sharedPr...
[ "0.7654978", "0.7583154", "0.74124897", "0.73137784", "0.70741355", "0.69093466", "0.6848724", "0.68390214", "0.68082935", "0.6783555", "0.663972", "0.66027427", "0.6504394", "0.64461803", "0.64376265", "0.63845485", "0.6367403", "0.63639826", "0.63085747", "0.63021445", "0.6...
0.6684513
10
/ Set if user login nyftii by Weibo
public static void setIsMainAccount(boolean is) { SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); sharedPref.setWeiboMainAccount(is); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasWeixinLogin();", "boolean hasLoginapiavgrtt();", "int getLoginFlag();", "public boolean isLogin() {\n // Mengembalikan nilai boolean degan mengambil data dari pref KEY_IS_LOGIN\n return preference.getBoolean(Constants.KEY_IS_LOGIN, false);\n }", "public boolean logedIn(String lo...
[ "0.64690953", "0.6446348", "0.6366738", "0.6260299", "0.6156295", "0.61519206", "0.6138971", "0.6132651", "0.61197984", "0.6118711", "0.6118711", "0.6099967", "0.6092767", "0.6064161", "0.6036815", "0.60193884", "0.601509", "0.5987978", "0.5982802", "0.5976034", "0.59612924",...
0.59306246
22
/ Check if user login nyftii by Weibo
public static boolean isMainAccount() { SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); return sharedPref.isWeiboMainAccount(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasWeixinLogin();", "boolean hasLoginapiavgrtt();", "boolean hasLogin();", "boolean hasLogin();", "boolean hasLoginRequest();", "public static boolean checkUserFBLogin() {\n\t\tboolean isFbLogin = Pref.getBoolean(\n\t\t\t\tGeneralClass.temp_iUserFaceBookBLOGIN, false);\n\t\t// Log.e(\"is facebook...
[ "0.71436626", "0.7141804", "0.6701494", "0.6701494", "0.6679826", "0.6635429", "0.6410264", "0.638553", "0.6373526", "0.6316384", "0.629944", "0.6262721", "0.6243119", "0.62414134", "0.62197775", "0.6160781", "0.6159879", "0.6159752", "0.6154922", "0.6138429", "0.6138382", ...
0.0
-1
get the token info from shared preferences
public static Oauth2AccessToken readAccessToken() { Oauth2AccessToken token = new Oauth2AccessToken(); SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); token.setUid(sharedPref.getWeiboUID()); token.setToken(sharedPref.getWeiboAccessToken()); token.setExpiresTime(sharedPref.getWeiboExpiresTime()); return token; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static String getToken(Context context) {\r\n SharedPreferences preferences = context.getSharedPreferences(context.getString(R.string.shared_preferences), MODE_PRIVATE);\r\n return preferences.getString(context.getString(R.string.token), null);\r\n }", "private String m2194g() {\n return ...
[ "0.7736196", "0.69978434", "0.69323915", "0.68069404", "0.67990184", "0.6760051", "0.67505616", "0.6749331", "0.67442966", "0.6718089", "0.66156447", "0.6579099", "0.6498842", "0.64799607", "0.64765155", "0.64765155", "0.6460627", "0.64528626", "0.64528626", "0.64528626", "0....
0.0
-1
clear the token info in shared preferences
public static void clear() { SharedPrefWrapper sharedPref = SharedPrefWrapper.getInstance(); sharedPref.clearWeiboPref(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressLint(\"CommitPrefEdits\") // Preferences change needs to be synchronous\n public void invalidateToken() {\n preferences.edit().remove(getString(R.string.auth_token)).commit();\n validateToken();\n }", "private void clearSharedPreference() {\n //Instantiate SharedPreferences\n ...
[ "0.7690618", "0.75620395", "0.7518366", "0.7479749", "0.7407753", "0.7407753", "0.7407753", "0.72947407", "0.72113943", "0.7184273", "0.71417964", "0.71025705", "0.69603604", "0.6922531", "0.6864332", "0.6829412", "0.68191314", "0.6785413", "0.6735803", "0.67343146", "0.67099...
0.69186866
14
We create the heroes and add them to heroes list.
public void play() { List<String> playersData = getGameInput().getPlayersData(); for (int id = 0; id < playersData.size() / Constants.DATAENTITY; id++) { getHeroes().add(getHeroFactory().getHero( playersData.get(id * Constants.DATAENTITY), Integer.parseInt( playersData.get( id * Constants.DATAENTITY + Constants.INDEXPOSX)), Integer.parseInt( playersData.get( id * Constants.DATAENTITY + Constants.INDEXPOSY)), id)); } // We create the angels and add them to angels list. List<Integer> numOfAngels = getGameInput().getNumOfAngels(); List<String> angelsData = getGameInput().getAngelsData(); for (int i = 0; i < angelsData.size() / Constants.DATAENTITY; i++) { getAngels().add(getAngelsFactory().getAngel( angelsData.get(i * Constants.DATAENTITY), Integer.parseInt( angelsData.get( i * Constants.DATAENTITY + Constants.INDEXPOSX)), Integer.parseInt( angelsData.get( i * Constants.DATAENTITY + Constants.INDEXPOSY)))); } getUtl().prepareAdmins(); int angelCounter = 0; // To iterate through all angels only once. // We start the actual game. for (int i = 0; i < getMovements().size(); i++) { // For every round. getUtl().printRound(i + 1); // We start printing from round 1... for (int j = 0; j < getHeroes().size(); j++) { /* Apply overtime ability if the case and then hero chooses * strategy and moves if he is not rooted. Lastly we decrease * the amount of rounds that a hero must be affected by. */ if (!getHeroes().get(j).isDead()) { if (getHeroes().get(j).isAffectedByAoT()) { getUtl().applyAoT(getHeroes().get(j)); } if (!getHeroes().get(j).isRooted()) { getHeroes().get(j).chooseStrategy(); getHeroes().get(j).move(getMovements().get(i).get(j)); } if (getHeroes().get(j).isAffectedByAoT()) { getHeroes().get(j).setAffectedByAoTRounds( getHeroes().get(j).getAffectedByAoTRounds() - 1); } } } // Check if there are any players on the same terrain. for (int j = 0; j < getHeroes().size(); j++) { for (int k = 0; k < getHeroes().size(); k++) { if (k == j) { continue; // So a hero doesn't fight himself. } if ((getHeroes().get(j).getPosX() == getHeroes().get(k).getPosX()) && (getHeroes().get(j).getPosY() == getHeroes().get(k).getPosY())) { // If they are both alive, fight. if (!getHeroes().get(j).isDead() && !getHeroes().get(k).isDead()) { getUtl().fight(getHeroes().get(k), getHeroes().get(j), getMap()); } } } } // Selecting the angels that appear on round i for (int j = 0; j < numOfAngels.get(i); j++) { getUtl().spawnAngel(getAngels().get(angelCounter)); for (int k = 0; k < getHeroes().size(); k++) { /* Checking if the selected angel and player k are on the * same terrain. */ if (getAngels().get(angelCounter).getPosX() == getHeroes().get(k).getPosX() && (getAngels().get(angelCounter).getPosY() == getHeroes().get(k).getPosY())) { getUtl().affectHeroByAngel( getAngels().get(angelCounter), getHeroes().get(k)); } } angelCounter++; } // When round is complete, everyone can fight again for (AbstractHero hero : getHeroes()) { hero.setFought(false); } getUtl().getOutput().add("\n"); } printResults(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void addHero()\n {\n // Initial horizontal position\n int initialX = TILE_SIZE;\n\n // Instantiate the hero object\n theHero = new Hero(initialX);\n\n // Add hero in bottom left corner of screen\n addObject(theHero, initialX, 8 * TILE_SIZE);\n }", "public s...
[ "0.7195196", "0.7181735", "0.66577", "0.6606973", "0.65257144", "0.6458522", "0.6294697", "0.6283487", "0.6275812", "0.6218037", "0.62012804", "0.6181131", "0.616708", "0.6161108", "0.6155302", "0.61437404", "0.61336404", "0.61256677", "0.60748255", "0.6047377", "0.60447764",...
0.5843735
23
Method to print results to both console, and the output file.
public void printResults() { getUtl().getOutput().add("~~ Results ~~\n"); for (int i = 0; i < getHeroes().size(); i++) { if (getHeroes().get(i).isDead()) { getUtl().getOutput().add(getHeroes().get(i).getName(). toCharArray()[0] + " dead\n"); } else { getUtl().getOutput().add(getHeroes().get(i).getName(). toCharArray()[0] + " " + getHeroes().get(i).getLevel() + " " + getHeroes().get(i).getXp() + " " + getHeroes().get(i).getHp() + " " + getHeroes().get(i).getPosX() + " " + getHeroes().get(i).getPosY() + "\n"); } } // Write output to given outputPath. getGameFileWriter().write(getUtl().getOutput()); for (int i = 0; i < getUtl().getOutput().size(); i++) { // Write output to console as well. System.out.print(getUtl().getOutput().get(i)); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printer() throws Exception{\n File outputFile = new File(\"output.txt\");\n FileOutputStream is = new FileOutputStream(outputFile);\n OutputStreamWriter osw = new OutputStreamWriter(is);\n Writer w = new BufferedWriter(osw);\n w.write(this.result());\n w.close(...
[ "0.7296627", "0.70874953", "0.68632054", "0.6735694", "0.6682317", "0.6567568", "0.6470079", "0.642646", "0.63616997", "0.63398856", "0.63020456", "0.6269999", "0.6199159", "0.61945224", "0.61574525", "0.6137488", "0.61056197", "0.6075407", "0.60741335", "0.60691434", "0.5994...
0.7042826
2
TODO Autogenerated method stub
public static void main(String[] args) { List <String> color = new ArrayList<String>(5); color.add("Red"); color.add("Green"); color.add("Orange"); color.add("white"); color.add("black"); List<String>color2 =new ArrayList<String>(5); color2.add("red"); color2.add("Green"); color2.add("orange"); color2.add("White"); color2.add("Black"); ArrayList<String>color3 = new ArrayList<String>(); for(String temp:color) color3.add(color2.contains(temp)? "Yes" : "No"); System.out.println(color3); }
{ "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
only applies to JDO entities; ignore any view models
@Override public void process(final ProcessMethodContext processMethodContext) { final Class<?> cls = processMethodContext.getCls(); if(!JdoMetamodelUtil.isPersistenceEnhanced(cls)) { return; } final FacetedMethod holder = processMethodContext.getFacetHolder(); final MandatoryFacet existingFacet = holder.getFacet(MandatoryFacet.class); if(existingFacet != null) { if (existingFacet instanceof OptionalFacetDerivedFromJdoPrimaryKeyAnnotation) { // do not replace this facet; // we must keep an optional facet here for different reasons return; } if (existingFacet instanceof MandatoryFacetForPropertyAnnotation.Required) { // do not replace this facet; // an explicit @Property(optional=FALSE) annotation cannot be overridden by @Column annotation return; } } val jdoColumnAnnotation = processMethodContext.synthesizeOnMethod(Column.class) .orElse(null); boolean required = whetherRequired(processMethodContext, jdoColumnAnnotation); MandatoryFacet facet = jdoColumnAnnotation != null ? new MandatoryFacetDerivedFromJdoColumn(holder, required) : new MandatoryFacetInferredFromAbsenceOfJdoColumn(holder, required); // as a side-effect, will chain any existing facets. // we'll exploit this fact for meta-model validation (see #refineMetaModelValidator(), below) FacetUtil.addFacet(facet); // however, if a @Column was explicitly provided, and the underlying facet // was the simple MandatoryFacetDefault (from an absence of @Optional or @Mandatory), // then don't chain, simply replace. if(facet instanceof MandatoryFacetDerivedFromJdoColumn && facet.getUnderlyingFacet() instanceof MandatoryFacetDefault) { facet.setUnderlyingFacet(null); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public default boolean shouldHideEntity(){ return false; }", "public interface CreateEntityView<E extends SerializableEntity> extends EntityView {\r\n\r\n\t/**\r\n\t * Make save handler enabled\r\n\t * \r\n\t * @param enabled\r\n\t */\r\n\tvoid setSaveHandlerEnabled(boolean enabled);\r\n\t\r\n}", "@Override\n\...
[ "0.6614222", "0.61538786", "0.5648632", "0.56089944", "0.5599456", "0.55884653", "0.55849725", "0.5583739", "0.5570995", "0.5556187", "0.55396247", "0.5532778", "0.5494008", "0.54608285", "0.5452658", "0.54482746", "0.5424289", "0.5381088", "0.53808", "0.5352147", "0.5321035"...
0.0
-1
Create an empty linked list
public static void main(String[] args) { LinkedList<String> l_list=new LinkedList<String>(); // use add() method to add values in the linked list l_list.add("Elsa"); l_list.add("Anna"); l_list.add("Olaf"); l_list.add("Kristoff"); l_list.add("Sven"); // print the list System.out.println("The linked list : "+l_list); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static LinkedList createEmpty(){\n return new LinkedList();\n }", "public linkedList() { // constructs an initially empty list\r\n\r\n }", "public LinkedList()\n\t{\n\t\tthis.head = new Node(null);\n\t\tsize = 0;\n\t}", "public MyLinkedList() {\n this.size = 0;\n this.hea...
[ "0.83044136", "0.8013522", "0.7601059", "0.757973", "0.75515", "0.7474208", "0.74570006", "0.73786324", "0.7371807", "0.7358599", "0.73552686", "0.7343956", "0.7343327", "0.73238015", "0.7318552", "0.7302489", "0.7288595", "0.7287276", "0.7250483", "0.72292864", "0.72179246",...
0.0
-1
Check if the existing view is being reused, otherwise inflate the view
@Override public View getView(int position, View convertView, ViewGroup parent) { View listItemView = convertView; if(listItemView == null) { listItemView = LayoutInflater.from(getContext()).inflate( R.layout.activity_list_of_comments, parent, false); } Comment comment = (Comment) getItem(position); TextView commentView = (TextView) listItemView.findViewById(R.id.comment); commentView.setText(comment.getContent()); TextView nameView = (TextView) listItemView.findViewById(R.id.name); nameView.setText(comment.getOwnerName()); ImageView img = (ImageView) listItemView.findViewById(R.id.profilePicture); if(!(((Comment)getItem(position)).url.equals(""))) { Glide.with(context).load(((Comment) getItem(position)).getUrl()).into(img); } return listItemView; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void recycleCheck(){\n getScreenRect();\n\n //ok...seriously, I have no idea why I need to wrap it in post()\n //but if I don't, it won't be able to setHtml() again (the second time)\n //TODO investigate what the fuck is going on\n post(new Runnable() {\n @Overr...
[ "0.6012694", "0.58779305", "0.58611715", "0.58438414", "0.5720961", "0.57065964", "0.56830007", "0.5644921", "0.56100196", "0.5607899", "0.559502", "0.5574792", "0.5554565", "0.5554324", "0.5546893", "0.5541707", "0.55289835", "0.5515837", "0.5509366", "0.54928625", "0.548931...
0.0
-1
for each hierarchy of the underlying axis compute the number of levels (maxRootDistance minRootDistance).
void computeLevelCount() { Hierarchy[] hiers = axis.getHierarchies(); int hierarchyCount = axis.getHierarchies().length; levelCount = new int[hierarchyCount]; skipAllMember = new boolean[hierarchyCount]; for (int i = 0; i < hiers.length; i++) { levelCount[i] = Integer.MIN_VALUE; skipAllMember[i] = hiers[i].hasAll(); } Iterator it = axis.getPositions().iterator(); while (it.hasNext()) { Position p = (Position) it.next(); Member[] members = p.getMembers(); for (int i = 0; i < members.length; i++) { int count = members[i].getRootDistance() + 1; levelCount[i] = Math.max(levelCount[i], count); if (members[i].isAll()) skipAllMember[i] = false; } } // if the ALL member is not on the axis, we will not add it for (int i = 0; i < hierarchyCount; i++) { if (skipAllMember[i]) levelCount[i] -= 1; } // the number of members per position is the sum of all deltas totalLevelCount = 0; for (int i = 0; i < hierarchyCount; i++) totalLevelCount += levelCount[i]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public int howManyLevels()\r\n\t{\r\n\t\t// Formula is the ceiling of the log base 2 of (the current number of nodes + 1)\r\n\t\treturn (int) Math.ceil(Math.log(getCounter() + 1) / Math.log(2));\r\n\t}", "public int my_leaf_count();", "@Override\r\n\tpublic double getDepth()\r\n\t{\r\n\r\n\t\tList<Entity> root...
[ "0.6806952", "0.66247195", "0.6463324", "0.6347308", "0.6293308", "0.6292142", "0.6219339", "0.6101192", "0.6100711", "0.6035371", "0.60250765", "0.60235417", "0.5996644", "0.5980305", "0.5959059", "0.5952967", "0.59233546", "0.591472", "0.59113514", "0.5903417", "0.5881717",...
0.7932527
0
adds members to result array from right to left, starting at offset
private void addParents(Member[] result, int offset, int totalCount, int memberCount, Member member) { int fillCount = totalCount - memberCount; // fill from right to left because we want the parents to appear left offset = offset + totalCount - 1; for (int i = 0; i < fillCount; i++) result[offset--] = member; for (int i = 0; i < memberCount; i++) { result[offset--] = member; member = tree.getParent(member); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void shiftElements() {\n RadarContent[] tempArr = new RadarContent[length - 1];\n for (int i = 0; i < length - 1; i++) {\n tempArr[i] = arrProfiles[i + 1];\n }\n arrProfiles = tempArr;\n length--;\n }", "public void addAll(T[] arr, int from, int length);",...
[ "0.5951128", "0.54875064", "0.5486829", "0.5300673", "0.52373326", "0.5218501", "0.52056766", "0.5190524", "0.5179603", "0.51365083", "0.5131984", "0.51286364", "0.51159096", "0.50851816", "0.5044657", "0.5027547", "0.50217056", "0.49824125", "0.49350595", "0.49129406", "0.48...
0.5861666
1
returns the hierarchies of the underlying axis.
public Hierarchy[] getHierarchies() { return axis.getHierarchies(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "DataTree getMetricsHierarchy();", "public String hierarchy();", "public final List<Integer> getHierarchyGaps() {\r\n\t\tList<Integer> gaps = new ArrayList<Integer>();\r\n\t\tgaps.add(0);\r\n\t\tHeaderItem root = header.getFirstRoot();\r\n\t\tif(root == null)\r\n\t\t\treturn gaps;\r\n\t\twhile(root.hasRootsInN...
[ "0.64909345", "0.63334984", "0.59500694", "0.5677999", "0.56751466", "0.5554575", "0.55479187", "0.54099196", "0.54028094", "0.538225", "0.53423697", "0.53395164", "0.53248286", "0.5314858", "0.53127533", "0.52934265", "0.52657455", "0.5241315", "0.5211135", "0.5193195", "0.5...
0.88967526
0
===================================================================================// / Get Streams ===================================================================================//
public static Hessian2Output getOutputStream(String fileName) { FileOutputStream fos; try { fos = new FileOutputStream(fileName); BufferedOutputStream bos = new BufferedOutputStream(fos); Hessian2Output hos = new Hessian2Output(bos); Deflation dos = new Deflation(); return dos.wrap(hos); } catch (Exception e) { MessageGenerator.briefError("Problem opening stream for file: " + fileName); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Stream> getStreams() {\n return streams;\n }", "public List<String> streams() {\n return this.streams;\n }", "public static void streams() {\n\t\ttry {\n\t\t\tList<Stream> streams = PlatformClient.streams(getUser());\n\t\t\trender(streams);\n\t\t} catch (ApplicationException e) ...
[ "0.791386", "0.75775284", "0.7079734", "0.67107254", "0.6619809", "0.656527", "0.6478483", "0.6444843", "0.63799375", "0.6308846", "0.63045466", "0.6258603", "0.6251545", "0.6232803", "0.622128", "0.6205023", "0.6172768", "0.6093357", "0.60668916", "0.6058052", "0.6056789", ...
0.0
-1
===================================================================================// / Custom Read/Write File Functions for Device/WireEnumeration Class ===================================================================================//
public static HashMap<String, Integer> readHashMap(Hessian2Input dis, Integer[] allInts) { int count; HashMap<String, Integer> tileMap = null; String[] keys; try { // TODO - The following read is necessary, but could be removed in a future version dis.readInt();//size = dis.readInt(); count = dis.readInt(); tileMap = new HashMap<String, Integer>(count); keys = new String[count]; for (int i = 0; i < keys.length; i++) { keys[i] = dis.readString(); } for (int i = 0; i < count; i++) { tileMap.put(keys[i], allInts[dis.readInt()]); } } catch (IOException e) { MessageGenerator.briefErrorAndExit("Error in readHashMap()"); } return tileMap; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract void writeFile();", "public interface IOAdapter {\n /** Returns the IOAdapter identifier string.\n *\n */\n public String getIdentifierString();\n \n /** Attempts to read an object from the provided input stream.\n *\n * This method attempt to read an object to an i...
[ "0.5605614", "0.56004566", "0.55125016", "0.5480873", "0.5464527", "0.5403267", "0.53422487", "0.53405386", "0.53222954", "0.5300672", "0.5288892", "0.52545696", "0.5194486", "0.5184162", "0.5181705", "0.5160505", "0.5153376", "0.514312", "0.5126975", "0.5116231", "0.51119", ...
0.0
-1
===================================================================================// / Generic Read/Write Serialization Methods ===================================================================================// Loads a serialized Java object from fileName.
public static Object loadFromFile(String fileName) { File inputFile = new File(fileName); FileInputStream fis; BufferedInputStream bis; ObjectInputStream ois; Object o; try { fis = new FileInputStream(inputFile); bis = new BufferedInputStream(fis); ois = new ObjectInputStream(bis); o = ois.readObject(); ois.close(); bis.close(); fis.close(); } catch (FileNotFoundException e) { MessageGenerator.briefError("Could not open file: " + fileName + " , does it exist?"); return null; } catch (IOException e) { MessageGenerator.briefError("Trouble reading from file: " + fileName); return null; } catch (ClassNotFoundException e) { MessageGenerator.briefError("Improper file found: "); return null; } catch (OutOfMemoryError e) { MessageGenerator.briefError("The JVM ran out of memory trying to load the object in " + fileName + ". Try using the JVM switch to increase the heap space (" + "ex: java -Xmx1600M)."); return null; } return o; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object loadFromFile(String fileName) {\n\t Object obj = null;\n\t try{\n\t\t FileInputStream FIS = new FileInputStream((defaultPath+\"\\\\\" + fileName));\n\t\t ObjectInputStream onjIn = new ObjectInputStream(FIS);\n\t\t obj = onjIn.readObject();\n\t } catch (NoSuchFileException e){\n\t\t saveTo...
[ "0.72443855", "0.71708584", "0.7158897", "0.71536535", "0.7126305", "0.70566905", "0.70449346", "0.685623", "0.67531127", "0.6509979", "0.6485251", "0.64822805", "0.64727074", "0.6402265", "0.63566077", "0.6278439", "0.6244559", "0.6235899", "0.62268865", "0.62242454", "0.622...
0.7036106
7
Serialize the Object o to a the file specified by fileName.
public static boolean saveToFile(Object o, String fileName) { FileOutputStream fos = null; BufferedOutputStream bos = null; ObjectOutputStream oos = null; File objectFile = null; objectFile = new File(fileName); try { fos = new FileOutputStream(objectFile); bos = new BufferedOutputStream(fos); oos = new ObjectOutputStream(bos); oos.writeObject(o); oos.close(); bos.close(); fos.close(); } catch (FileNotFoundException e) { return false; } catch (IOException e) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void serialize(Object obj, String fileName) throws IOException {\n\t\tFileOutputStream fos = new FileOutputStream(fileName);\n\t\tObjectOutputStream oos = new ObjectOutputStream(fos);\n\t\toos.writeObject(obj);\n\n\t\tfos.close();\n\t}", "public static void writeObjectToFile(Serializable object, St...
[ "0.814712", "0.73666507", "0.7353468", "0.71307254", "0.7126318", "0.7108118", "0.70543617", "0.7008759", "0.6999937", "0.6888655", "0.6854973", "0.6848203", "0.68200946", "0.68014735", "0.6785502", "0.67849636", "0.6763344", "0.6754137", "0.6751749", "0.66192085", "0.6612584...
0.6989195
9
This is a simple method that writes the elements of an ArrayList of Strings into lines in the text file fileName.
public static void writeLinesToTextFile(ArrayList<String> lines, String fileName) { String nl = System.getProperty("line.separator"); try { BufferedWriter bw = new BufferedWriter(new FileWriter(fileName)); for (int i = 0; i < lines.size(); i++) { bw.write(lines.get(i) + nl); } bw.close(); } catch (IOException e) { MessageGenerator.briefErrorAndExit("Error writing file: " + fileName + File.separator + e.getMessage()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void writeFile(ArrayList<String> lines, String fileName)\n {\n try\n {\n // Create file \n FileWriter fstream = new FileWriter(fileName);\n BufferedWriter out = new BufferedWriter(fstream);\n for (String line: lines)\n {\n ...
[ "0.7970999", "0.78948766", "0.7451031", "0.66339445", "0.66238225", "0.65967226", "0.65767795", "0.6575745", "0.65720785", "0.6558649", "0.65493125", "0.6534843", "0.65261805", "0.6424454", "0.6322196", "0.63068265", "0.6282555", "0.6273648", "0.6256599", "0.6253218", "0.6221...
0.7927185
1
This is a simple method that will read in a text file and put each line in a string and put all the lines in an ArrayList. The user is cautioned not to open extremely large files with this method.
public static ArrayList<String> getLinesFromTextFile(String fileName) { String line = null; BufferedReader br; ArrayList<String> lines = new ArrayList<String>(); try { br = new BufferedReader(new FileReader(fileName)); while ((line = br.readLine()) != null) { lines.add(line); } } catch (FileNotFoundException e) { MessageGenerator.briefErrorAndExit("ERROR: Could not find file: " + fileName); } catch (IOException e) { MessageGenerator.briefErrorAndExit("ERROR: Could not read from file: " + fileName); } return lines; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<String> readToString(String filePath) {\n\t\tFile file = new File(filePath);\n\t\tArrayList<String> res = new ArrayList<String>();\n\t\tif (!file.exists()) {\n\t\t\treturn res;\n\t\t}\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(file);\n\t\t\tBufferedReader br = new BufferedReader(fr);\...
[ "0.73310566", "0.73187476", "0.7244205", "0.7232129", "0.7192646", "0.7170425", "0.711438", "0.70930713", "0.70892775", "0.70337653", "0.6958482", "0.6953548", "0.69324017", "0.6931086", "0.68773973", "0.68743396", "0.68658036", "0.6850324", "0.68472934", "0.68130696", "0.681...
0.7158289
6
===================================================================================// / Generic File Manipulation Methods ===================================================================================// Takes a file name and removes everything after the last '.' inclusive
public static String removeFileExtension(String fileName) { int endIndex = fileName.lastIndexOf('.'); if (endIndex != -1) { return fileName.substring(0, endIndex); } else { return fileName; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private String stripFileExtension(String fileName) {\n int locationOfDot = fileName.lastIndexOf('.');\n return fileName.substring(0, locationOfDot);\n }", "private String removeFileExtension(String filename) {\n int extensionIndex = filename.indexOf(CODE_FILE_EXTENSION);\n if (exte...
[ "0.76328874", "0.7359448", "0.72052634", "0.712982", "0.7092497", "0.68912673", "0.6875031", "0.68191665", "0.6770963", "0.6662376", "0.6626138", "0.6561874", "0.6549832", "0.6521244", "0.65034604", "0.64740616", "0.64344287", "0.6429838", "0.6386876", "0.63130605", "0.630204...
0.7513135
1
Creates a directory in the current path called dirName.
public static boolean makeDir(String dirName) { File dir = new File(dirName); if (!(dir.exists())) { return dir.mkdir(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void createDirectory(String srcDir, String nameDir) {\n try {\n Path path = Paths.get(srcDir + \...
[ "0.776137", "0.7711189", "0.7622578", "0.7582808", "0.74557114", "0.7378105", "0.70493084", "0.69500583", "0.6886825", "0.6759898", "0.67493856", "0.67252624", "0.66787666", "0.66014886", "0.6600305", "0.6575441", "0.655951", "0.65300745", "0.64912134", "0.6483837", "0.643113...
0.7524886
4
Creates a directory in the current path called dirName.
public static boolean makeDirs(String dirName) { return new File(dirName).mkdirs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void createDir(){\n\t\tPath path = Path.of(this.dir);\n\t\ttry {\n\t\t\tFiles.createDirectories(path);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void createDirectory(String srcDir, String nameDir) {\n try {\n Path path = Paths.get(srcDir + \...
[ "0.7761953", "0.77117425", "0.7621944", "0.7582399", "0.75241584", "0.7457002", "0.73768806", "0.7049972", "0.68862784", "0.6759008", "0.6751739", "0.6725161", "0.66778064", "0.660052", "0.66002345", "0.6575107", "0.655949", "0.6529112", "0.64925885", "0.6483453", "0.64302504...
0.6949092
8
Gets the size of the file in bytes.
public static long getFileSize(String fileName) { return new File(fileName).length(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getFileSize()\n throws IOException\n {\n return file.length();\n }", "public long getSize()\n\t{\n\t\treturn file.length() ;\n\t}", "public long size() {\n return file.length();\n }", "public static long size(File file) {\n\t\treturn file.length();\n\t}", "publi...
[ "0.8441944", "0.82988083", "0.8283543", "0.8107492", "0.80137855", "0.79849863", "0.7918594", "0.7804852", "0.7804852", "0.7760834", "0.7713304", "0.7653076", "0.7604042", "0.75575256", "0.74928755", "0.7492357", "0.7485215", "0.7482278", "0.74371046", "0.74079996", "0.739062...
0.72203106
28
Delete the file/folder in the file system called fileName
public static boolean deleteFile(String fileName) { // A File object to represent the filename File f = new File(fileName); // Make sure the file or directory exists and isn't write protected if (!f.exists()) throw new IllegalArgumentException( "Delete: no such file or directory: " + fileName); if (!f.canWrite()) throw new IllegalArgumentException("Delete: write protected: " + fileName); // If it is a directory, make sure it is empty if (f.isDirectory()) { String[] files = f.list(); if (files.length > 0) throw new IllegalArgumentException( "Delete: directory not empty: " + fileName); } // Attempt to delete it boolean success = f.delete(); if (!success) throw new IllegalArgumentException("Delete: deletion failed"); return success; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static void deleteFile(String fileName) {\n\t\tFile f = new File(fileName);\n\n\t\t// Make sure the file or directory exists and isn't write protected\n\t\tif (!f.exists())\n\t\t\treturn;\n\t\t// throw new IllegalArgumentException(\"Delete: no such file or directory: \" + fileName);\n\n\t\tif (!f.canWrite(...
[ "0.7816442", "0.7550028", "0.7354422", "0.7235794", "0.71656543", "0.7110614", "0.70545155", "0.7053526", "0.70301867", "0.6925733", "0.69103575", "0.6905375", "0.6898532", "0.68961567", "0.68190354", "0.6793942", "0.67584056", "0.6720652", "0.67026734", "0.66959447", "0.6690...
0.6402883
38
Deletes everything in the directory given by path, but does not delete the folder itself.
public static boolean deleteFolderContents(String path) { File currDirectory = new File(path); if (currDirectory.exists()) { try { for (File file : currDirectory.listFiles()) { if (file.isDirectory()) { if (!deleteFolder(file.getCanonicalPath())) { return false; } } else { if (!deleteFile(file.getCanonicalPath())) { return false; } } } } catch (IOException e) { return false; } return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void deleteDirectory(Path path) throws IOException {\n if (Files.isDirectory(path, LinkOption.NOFOLLOW_LINKS)) {\n try (DirectoryStream<Path> entries = Files.newDirectoryStream(path)) {\n for (Path entry : entries) {\n deleteDirectory(entry);\n ...
[ "0.80105096", "0.7883224", "0.7668979", "0.750973", "0.7477246", "0.7458504", "0.731934", "0.72630787", "0.72568166", "0.72416276", "0.7223308", "0.6871204", "0.6865109", "0.6858573", "0.669695", "0.66757077", "0.6665946", "0.6639811", "0.66284424", "0.66132236", "0.6516566",...
0.6717962
14
Delete the folder and recursively files and folders below
public static boolean deleteFolder(String folderName) { // A file object to represent the filename File f = new File(folderName); if (!f.exists() || !f.isDirectory()) { throw new IllegalArgumentException("Delete: no such directory: " + folderName); } for (File i : f.listFiles()) { if (i.isDirectory()) { deleteFolder(i.getAbsolutePath()); } else if (i.isFile()) { if (!i.delete()) { throw new IllegalArgumentException("Delete: deletion failed: " + i.getAbsolutePath()); } } } return deleteFile(folderName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void deleteFolder(File folder) {\r\nFile[] files = folder.listFiles();\r\nif(files!=null) { //some JVMs return null for empty dirs\r\nfor(File f: files) {\r\nif(f.isDirectory()) {\r\ndeleteFolder(f);\r\n} else {\r\nf.delete();\r\n}\r\n}\r\n}\r\nfolder.delete();\r\n}", "private void deleteDirectory(...
[ "0.7671761", "0.73998964", "0.73071927", "0.7283027", "0.7095871", "0.7066259", "0.7062983", "0.70174134", "0.70037675", "0.69962543", "0.69704205", "0.69408214", "0.6877099", "0.6870789", "0.6861422", "0.68416554", "0.6812918", "0.68016946", "0.67901635", "0.67474514", "0.67...
0.0
-1
Copies a file from one location (src) to another (dst). This implementation uses the java.nio channels (because supposedly it is faster).
public static boolean copyFile(String src, String dst) { FileChannel inChannel = null; FileChannel outChannel = null; try { inChannel = new FileInputStream(new File(src)).getChannel(); outChannel = new FileOutputStream(new File(dst)).getChannel(); inChannel.transferTo(0, inChannel.size(), outChannel); } catch (FileNotFoundException e) { MessageGenerator.briefError("ERROR could not find/access file(s): " + src + " and/or " + dst); return false; } catch (IOException e) { MessageGenerator.briefError("ERROR copying file: " + src + " to " + dst); return false; } finally { try { if (inChannel != null) inChannel.close(); if (outChannel != null) outChannel.close(); } catch (IOException e) { MessageGenerator.briefError("Error closing files involved in copying: " + src + " and " + dst); return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void copy(File src, File dst) throws IOException \r\n {\r\n InputStream in = new FileInputStream(src);\r\n OutputStream out = new FileOutputStream(dst);\r\n \r\n // Transfer bytes from in to out\r\n byte[] buf = new byte[1024];\r\n int len;\r\n while ((len = ...
[ "0.75873923", "0.71217906", "0.7062738", "0.70608366", "0.70234066", "0.70049524", "0.6988153", "0.6952991", "0.69445115", "0.68927735", "0.6890641", "0.68643355", "0.67602843", "0.6658637", "0.6624522", "0.6495369", "0.64596236", "0.6447394", "0.6445637", "0.639724", "0.6370...
0.66073406
15
Copies a folder and its files from the path defined in srcDirectoryPath to a new folder at dstDirectoryPath. If the recursive flag is set it will also recursively copy subfolders from the source to the destination.
public static boolean copyFolder(String srcDirectoryPath, String dstDirectoryPath, boolean recursive) { File srcDirectory = new File(srcDirectoryPath); File dstDirectory = new File(dstDirectoryPath + File.separator + srcDirectory.getName()); if (srcDirectory.exists() && srcDirectory.isDirectory()) { if (!dstDirectory.exists()) { dstDirectory.mkdirs(); } for (File file : srcDirectory.listFiles()) { if (!file.isDirectory()) { if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath() + File.separator + file.getName())) { return false; } } else if (file.isDirectory() && recursive) { if (!copyFolder(file.getAbsolutePath(), dstDirectory.getAbsolutePath(), true)) { return false; } } } return true; } MessageGenerator.briefError("ERROR: copyFolder() - Cannot find directory: " + srcDirectoryPath); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyDirectory(File srcDir, File dstDir) throws IOException {\n if (srcDir.isDirectory()) {\n if (!dstDir.exists()) dstDir.mkdir();\n String[] children = srcDir.list();\n for (int i = 0; i < children.length; i++) copyDirectory(new File(srcDir, children[i]),...
[ "0.69396544", "0.6768692", "0.67316717", "0.67314863", "0.66885555", "0.6422031", "0.6329417", "0.63249135", "0.62844706", "0.6098268", "0.5980226", "0.5958184", "0.58373326", "0.58210516", "0.5728974", "0.56002015", "0.5559889", "0.5510365", "0.5504858", "0.54736936", "0.537...
0.8050478
0
Copies the folder contents of the folder specified by src to folder specified as dst. It will copy all files in it to the new location. If the recursive flag is set, it will copy everything recursively in the folder src to dst.
public static boolean copyFolderContents(String src, String dst, boolean recursive) { File srcDirectory = new File(src); File dstDirectory = new File(dst); if (srcDirectory.exists() && srcDirectory.isDirectory()) { if (!dstDirectory.exists()) { MessageGenerator.briefError("ERROR: Could find destination directory " + dstDirectory.getAbsolutePath()); } for (File file : srcDirectory.listFiles()) { if (!file.isDirectory()) { if (!copyFile(file.getAbsolutePath(), dstDirectory.getAbsolutePath())) { return false; } } else if (file.isDirectory() && recursive) { if (!copyFolder(file.getAbsolutePath(), dst, true)) { MessageGenerator.briefError("ERROR: While copying folder " + file.getAbsolutePath() + " to " + dst + File.separator + file.getName()); return false; } } } return true; } MessageGenerator.briefError("ERROR: copyFolderContents() - Cannot find directory: " + src); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void copyFolder(File src, File dest) throws IOException {\n\n\t\tif (src.isDirectory()) {\n\n\t\t\t// if directory not exists, create it\n\t\t\tif (!dest.exists()) {\n\t\t\t\tdest.mkdir();\n\t\t\t\t// System.out.println(\"Directory copied from \" + src + \" to \" +\n\t\t\t\t// dest);\n\t\t\t}\n\n\t\t...
[ "0.7368847", "0.6643814", "0.6560944", "0.6516039", "0.64423186", "0.6346977", "0.63112146", "0.62963974", "0.6252431", "0.6084528", "0.6033176", "0.58585376", "0.58386433", "0.5795647", "0.5758667", "0.5713814", "0.5685403", "0.56608814", "0.56497777", "0.556959", "0.555254"...
0.75126386
0
===================================================================================// / Simple Device/WireEnumeration Load Methods & Helpers ===================================================================================// Gets and returns the value of the environment variable rapidSmithPathVariableName
public static String getRapidSmithPath() { String path = System.getenv(rapidSmithPathVariableName); if (path == null) { String nl = System.getProperty("line.separator"); MessageGenerator.briefErrorAndExit("Error: You do not have the " + rapidSmithPathVariableName + " set in your environment." + nl + " Please set this environment variable to the " + "location of your rapidSmith project." + nl + " For example: " + rapidSmithPathVariableName + "=" + "/home/fred/workspace/rapidSmith"); } if (path.endsWith(File.separator)) { path.substring(0, path.length() - 1); } return path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void read_Environment_Variable_for_Web() {\n\t\tProperties prop = new Properties();\n\t\tInputStream input = null;\n\n\t\ttry {\n\n\t\t\tinput = new FileInputStream(\"/Environment File/environmentVariableForWebProduction2.properties\");\n\n\t\t\t// load a properties file\n\t\t\tprop.load(input);\n\n\...
[ "0.53734446", "0.51003605", "0.47997066", "0.47489768", "0.47349554", "0.47343892", "0.46541125", "0.46541062", "0.46541062", "0.46019194", "0.4594151", "0.45935872", "0.45808595", "0.45693222", "0.4558617", "0.4509688", "0.44934484", "0.44922724", "0.44725934", "0.44532967", ...
0.6989275
0
Gets and returns the path of the folder where the part files resides for partName.
public static String getPartFolderPath(String partName) { return getRapidSmithPath() + File.separator + deviceFolderName + File.separator + PartNameTools.getFamilyNameFromPart(partName) + File.separator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n PartNameTools.removeSpeedGrade(partName) +\n deviceFileSuffix;\n }", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(part...
[ "0.6738737", "0.6427651", "0.5890102", "0.56374556", "0.5606001", "0.5560412", "0.5544312", "0.5518548", "0.54512113", "0.5411386", "0.539669", "0.5375006", "0.5371152", "0.52963436", "0.52871317", "0.527435", "0.52723444", "0.5246153", "0.5245809", "0.52437174", "0.52283096"...
0.82208693
0
Gets and returns the path of the folder where the family type resides.
public static String getPartFolderPath(FamilyType familyType) { familyType = PartNameTools.getBaseTypeFromFamilyType(familyType); return getRapidSmithPath() + File.separator + deviceFolderName + File.separator + familyType.toString().toLowerCase() + File.separator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object folderPath() {\n return this.innerTypeProperties() == null ? null : this.innerTypeProperties().folderPath();\n }", "String folderPath();", "public String getFolder() {\r\n return folder;\r\n }", "public String getFolder() {\n return myFolder;\n }", "publi...
[ "0.72026557", "0.65829694", "0.63535255", "0.63306123", "0.6173868", "0.6159837", "0.6138848", "0.6128212", "0.61078364", "0.6086962", "0.6085208", "0.5951799", "0.591318", "0.5906158", "0.5905738", "0.58979356", "0.5877598", "0.5865675", "0.5861688", "0.58572716", "0.5851643...
0.76652884
0
Gets the device file path and name for the given partName.
public static String getDeviceFileName(String partName) { return getPartFolderPath(partName) + PartNameTools.removeSpeedGrade(partName) + deviceFileSuffix; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getPartFolderPath(String partName) {\n return getRapidSmithPath() +\n File.separator +\n deviceFolderName +\n File.separator +\n PartNameTools.getFamilyNameFromPart(partName) +\n File.separator;\n }", "publi...
[ "0.71155334", "0.65394896", "0.6423224", "0.62183785", "0.5649399", "0.5603163", "0.5597417", "0.5597417", "0.55936825", "0.546949", "0.54440963", "0.5432678", "0.54264945", "0.5361976", "0.5361976", "0.5358276", "0.53270566", "0.5312807", "0.53097844", "0.52790415", "0.52738...
0.824896
0
Loads the appropriate Device file based on the part name. Accounts for speed grade in file name.
public static Device loadDevice(String partName) { String canonicalName = PartNameTools.removeSpeedGrade(partName); Device device = Device.getInstance(canonicalName); String path = getDeviceFileName(canonicalName); // Don't reload the device if same part is already loaded if (device.getPartName() != null) { return device; } if (!device.readDeviceFromCompactFile(path)) { return null; } else { return device; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n PartNameTools.removeSpeedGrade(partName) +\n deviceFileSuffix;\n }", "public static String getDeviceVersion(String partName) {\n String fileName = getDeviceFileName(pa...
[ "0.63575864", "0.5412033", "0.5268038", "0.5258099", "0.5086801", "0.5039787", "0.50303715", "0.49833027", "0.4977854", "0.48842767", "0.48823008", "0.48584256", "0.48565075", "0.48541427", "0.48453805", "0.4835859", "0.48229814", "0.48124847", "0.4778198", "0.4760918", "0.47...
0.74198574
0
Gets the wire enumerator file path and name for the given partName.
public static String getWireEnumeratorFileName(String partName) { return getPartFolderPath(partName) + wireEnumeratorFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WireEnumerator loadWireEnumerator(String partName) {\n FamilyType familyType = PartNameTools.getFamilyTypeFromPart(partName);\n return loadWireEnumerator(familyType);\n }", "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n ...
[ "0.6374881", "0.6274142", "0.624104", "0.56646854", "0.5602854", "0.54953724", "0.5410109", "0.5408847", "0.5369876", "0.5353706", "0.53518057", "0.5326175", "0.52866703", "0.52866703", "0.52719176", "0.51685905", "0.51661265", "0.51258755", "0.5105973", "0.5093399", "0.50917...
0.8340639
0
Gets the wire enumerator file path and name for the given familyType.
public static String getWireEnumeratorFileName(FamilyType familyType) { return getPartFolderPath(familyType) + wireEnumeratorFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WireEnumerator loadWireEnumerator(FamilyType familyType) {\n familyType = PartNameTools.getBaseTypeFromFamilyType(familyType);\n WireEnumerator we = WireEnumerator.getInstance(familyType);\n String path = getWireEnumeratorFileName(familyType);\n if (we.getFamilyName() != n...
[ "0.65200907", "0.5712707", "0.553505", "0.53496474", "0.5312365", "0.5300194", "0.52554137", "0.5196478", "0.5188126", "0.5188126", "0.5173538", "0.51576155", "0.5138546", "0.51155597", "0.5075129", "0.50509083", "0.50478566", "0.504318", "0.49961752", "0.49961752", "0.499617...
0.8282715
0
Loads the appropriate WireEnumerator file based on the part name. Accounts for speed grade in file name.
public static WireEnumerator loadWireEnumerator(String partName) { FamilyType familyType = PartNameTools.getFamilyTypeFromPart(partName); return loadWireEnumerator(familyType); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName) + wireEnumeratorFileName;\n }", "private void loadGame(String fileName){\n\n }", "public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade...
[ "0.62854284", "0.5414958", "0.539693", "0.5230656", "0.51569676", "0.5156216", "0.514615", "0.5144456", "0.5128416", "0.5105956", "0.50954235", "0.50939196", "0.5067629", "0.5065477", "0.50643617", "0.49891034", "0.4955332", "0.49296314", "0.4927469", "0.49252847", "0.4913319...
0.6824747
0
Loads the appropriate WireEnumerator file based on the part name. Accounts for speed grade in file name.
public static WireEnumerator loadWireEnumerator(FamilyType familyType) { familyType = PartNameTools.getBaseTypeFromFamilyType(familyType); WireEnumerator we = WireEnumerator.getInstance(familyType); String path = getWireEnumeratorFileName(familyType); if (we.getFamilyName() != null) { return we; } if (!we.readCompactEnumFile(path, familyType)) { return null; } else { return we; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static WireEnumerator loadWireEnumerator(String partName) {\n FamilyType familyType = PartNameTools.getFamilyTypeFromPart(partName);\n return loadWireEnumerator(familyType);\n }", "public static String getWireEnumeratorFileName(String partName) {\n return getPartFolderPath(partName...
[ "0.68276787", "0.6287996", "0.5411987", "0.53992623", "0.5228343", "0.51545465", "0.51544875", "0.514498", "0.51426524", "0.51045734", "0.509401", "0.50929093", "0.50665647", "0.50628555", "0.50617737", "0.4989126", "0.49533957", "0.49275434", "0.49261823", "0.49246347", "0.4...
0.5129278
9
Gets the primitive defs file path and name for the given partName.
public static String getPrimitiveDefsFileName(String partName) { return getPartFolderPath(partName) + primitiveDefFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static PrimitiveDefList loadPrimitiveDefs(String partName) {\n String path = getPrimitiveDefsFileName(partName);\n return (PrimitiveDefList) loadFromCompressedFile(path);\n }", "public static String getDeviceFileName(String partName) {\n return getPartFolderPath(partName) +\n ...
[ "0.6085435", "0.57054454", "0.57021487", "0.55579436", "0.5542031", "0.53877234", "0.5365647", "0.52937174", "0.5189506", "0.50776404", "0.49580577", "0.49058542", "0.4883252", "0.4862701", "0.48574033", "0.4784386", "0.4784386", "0.47276786", "0.472766", "0.46990108", "0.467...
0.8162444
0
Gets the primitive defs file path and name for the given familyType.
public static String getPrimitiveDefsFileName(FamilyType familyType) { return getPartFolderPath(familyType) + primitiveDefFileName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static PrimitiveDefList loadPrimitiveDefs(FamilyType familyType) {\n String path = getPrimitiveDefsFileName(familyType);\n return (PrimitiveDefList) loadFromCompressedFile(path);\n }", "public static String getWireEnumeratorFileName(FamilyType familyType) {\n return getPartFolderPa...
[ "0.6084121", "0.57490087", "0.5538324", "0.54633826", "0.54633826", "0.5440191", "0.51744765", "0.51244366", "0.50930166", "0.50416714", "0.49624225", "0.4928529", "0.49203768", "0.48771316", "0.48690113", "0.4850142", "0.48275736", "0.48177838", "0.4802585", "0.47800115", "0...
0.8127182
0
Loads the primitiveDefs file for the appropriate family based on partName.
public static PrimitiveDefList loadPrimitiveDefs(String partName) { String path = getPrimitiveDefsFileName(partName); return (PrimitiveDefList) loadFromCompressedFile(path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static PrimitiveDefList loadPrimitiveDefs(FamilyType familyType) {\n String path = getPrimitiveDefsFileName(familyType);\n return (PrimitiveDefList) loadFromCompressedFile(path);\n }", "public static String getPrimitiveDefsFileName(String partName) {\n return getPartFolderPath(part...
[ "0.6246849", "0.6030278", "0.5298074", "0.49681896", "0.4963549", "0.4875221", "0.4812668", "0.48081353", "0.47704986", "0.475768", "0.47449282", "0.47359276", "0.47350472", "0.47333214", "0.47255546", "0.47195908", "0.47060266", "0.46863264", "0.46518156", "0.46476555", "0.4...
0.7095659
0
Loads the primitiveDefs file for the appropriate family based on FamilyType.
public static PrimitiveDefList loadPrimitiveDefs(FamilyType familyType) { String path = getPrimitiveDefsFileName(familyType); return (PrimitiveDefList) loadFromCompressedFile(path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getPrimitiveDefsFileName(FamilyType familyType) {\n return getPartFolderPath(familyType) + primitiveDefFileName;\n }", "public static PrimitiveDefList loadPrimitiveDefs(String partName) {\n String path = getPrimitiveDefsFileName(partName);\n return (PrimitiveDefList) ...
[ "0.5973404", "0.5458087", "0.5264586", "0.5165199", "0.48974636", "0.48748818", "0.48507816", "0.4761601", "0.47573048", "0.47486424", "0.47483826", "0.4748127", "0.47310486", "0.47039953", "0.46953171", "0.46670195", "0.46636966", "0.46573243", "0.46323794", "0.46147212", "0...
0.74075985
0
Checks for all device files present in the current RapidSmith path and returns a list of strings of those part names available to be used by the tool.
public static ArrayList<String> getAvailableParts() { ArrayList<String> allParts = new ArrayList<String>(); String pattern = "_db.dat"; File dir = new File(getRapidSmithPath() + File.separator + "devices"); if (!dir.exists()) { MessageGenerator.briefErrorAndExit("ERROR: No part files exist. Please run " + Installer.class.getCanonicalName() + " to create part files."); } for (String partFamily : dir.list()) { File partDir = new File(dir.getAbsolutePath() + File.separator + partFamily); for (String part : partDir.list()) { if (part.endsWith(pattern)) { allParts.add(part.replace(pattern, "")); } } } return allParts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<FamilyType> getAvailableFamilies() {\n ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>();\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit(\"ERROR: No part fil...
[ "0.62152004", "0.61822", "0.5991184", "0.56929487", "0.5612432", "0.5562276", "0.5551752", "0.5538117", "0.54616725", "0.543583", "0.5384457", "0.5360708", "0.5352374", "0.5292658", "0.5269473", "0.5258233", "0.52327675", "0.5226592", "0.52200204", "0.52175087", "0.51972747",...
0.7431858
0
Checks for all device files present in the current RapidSmith family path and returns a list of strings of those part names available to be used by the tool within the specified family.
public static ArrayList<String> getAvailableParts(FamilyType type) { ArrayList<String> allParts = new ArrayList<String>(); String pattern = "_db.dat"; File dir = new File(getRapidSmithPath() + File.separator + "devices" + File.separator + type.toString().toLowerCase()); if (!dir.exists()) { MessageGenerator.briefErrorAndExit("ERROR: No part files exist. Please run " + Installer.class.getCanonicalName() + " to create part files."); } for (String part : dir.list()) { if (part.endsWith(pattern)) { allParts.add(part.replace(pattern, "")); } } return allParts; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static ArrayList<String> getAvailableParts() {\n ArrayList<String> allParts = new ArrayList<String>();\n String pattern = \"_db.dat\";\n File dir = new File(getRapidSmithPath() + File.separator + \"devices\");\n if (!dir.exists()) {\n MessageGenerator.briefErrorAndExit...
[ "0.71101815", "0.70349526", "0.56913495", "0.5380946", "0.525206", "0.5053311", "0.5051247", "0.50504565", "0.5044595", "0.5040266", "0.5030283", "0.5006646", "0.49990928", "0.49911714", "0.49641743", "0.49452916", "0.49300697", "0.49168497", "0.4913453", "0.48762476", "0.486...
0.6222587
2
This method returns an ArrayList of family types currently supported
public static ArrayList<FamilyType> getAvailableFamilies() { ArrayList<FamilyType> allFamilies = new ArrayList<FamilyType>(); File dir = new File(getRapidSmithPath() + File.separator + "devices"); if (!dir.exists()) { MessageGenerator.briefErrorAndExit("ERROR: No part files exist. Please run " + Installer.class.getCanonicalName() + " to create part files."); } for (String partFamily : dir.list()) { FamilyType type = PartNameTools.getFamilyTypeFromFamilyName(partFamily); if (type != null) allFamilies.add(type); } return allFamilies; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String [] getSupportedTypes();", "public static @NonNull List<TypeFamily> getAvailableFamilies() {\n Map<String, List<Typeface>> familyMap = new TreeMap<>(String.CASE_INSENSITIVE_ORDER);\n\n synchronized (TypefaceManager.class) {\n sortTypefaces();\n\n for (Typeface typeface :...
[ "0.73458916", "0.7291303", "0.703097", "0.6737232", "0.6731121", "0.66314155", "0.66041887", "0.64750946", "0.64611423", "0.6411751", "0.640337", "0.63609535", "0.6359856", "0.6287064", "0.6284606", "0.6254312", "0.6240989", "0.6231487", "0.6225156", "0.62140536", "0.61997145...
0.64721787
8
Looks at the current device file for the part name specified and retrieves its current device version.
public static String getDeviceVersion(String partName) { String fileName = getDeviceFileName(partName); String version; try { Hessian2Input his = FileTools.getInputStream(fileName); version = his.readString(); his.close(); } catch (FileNotFoundException e) { return null; } catch (IOException e) { return null; } return version; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Device loadDevice(String partName) {\n String canonicalName = PartNameTools.removeSpeedGrade(partName);\n Device device = Device.getInstance(canonicalName);\n String path = getDeviceFileName(canonicalName);\n\n // Don't reload the device if same part is already loaded\n ...
[ "0.6280809", "0.59067", "0.5833997", "0.5789312", "0.57692987", "0.55176586", "0.54400474", "0.532904", "0.530477", "0.519708", "0.5170874", "0.51291424", "0.51126647", "0.509921", "0.50729316", "0.5063867", "0.5043052", "0.5025811", "0.50200605", "0.5018973", "0.50040096", ...
0.7978883
0
This method will get and return the current time as a string formatted in the same way used in most Xilinx report and XDL files. The format used in the using the same syntax as SimpleDateFormat which is "EEE MMM dd HH:mm:ss yyyy".
public static String getTimeString() { SimpleDateFormat formatter = new SimpleDateFormat("EEE MMM dd HH:mm:ss yyyy"); return formatter.format(new java.util.Date()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String currentDateTime() {\r\n Calendar c = Calendar.getInstance();\r\n return String.format(\"%tB %te, %tY%n%tl:%tM %tp%n\", c, c, c, c, c, c);\r\n }", "public static final String CurrentTime() {\n\t\t\n\t\tfinal SimpleDateFormat DF = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tretur...
[ "0.80080456", "0.79747903", "0.7851599", "0.7829346", "0.7813123", "0.77848125", "0.7750272", "0.7726216", "0.7694695", "0.76890045", "0.76859283", "0.76755697", "0.76267445", "0.7608691", "0.7567472", "0.75658244", "0.7548397", "0.7519212", "0.7509286", "0.74990773", "0.7492...
0.799224
1
Gets and returns the file separator character for the given OS
public static String getDirectorySeparator() { if (FileTools.cygwinInstalled()) { return "/"; } else { return File.separator; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static String getSeparator() {\n return System.getProperty(\"file.separator\");\n }", "public String getFileSeparator() {\n\t\treturn File.separator;\n\t}", "public String getFileSeparator() {\n\t\treturn fileSeparator;\n\t}", "public String getFilesep() {\n\teval(\"filesep();\");\n\treturn ...
[ "0.74707735", "0.71675944", "0.70982444", "0.7063601", "0.67960745", "0.6637641", "0.6572021", "0.6431484", "0.63578224", "0.626412", "0.6238417", "0.6199048", "0.61924756", "0.6169333", "0.6137844", "0.61343235", "0.6132234", "0.613022", "0.6081673", "0.60576195", "0.6012678...
0.6716074
5
Checks if Cygwin is installed on the system
public static boolean cygwinInstalled() { return System.getenv("CYGWIN") != null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static boolean onWindows() {\n return System.getProperty(\"os.name\").toLowerCase(Locale.US).startsWith(\"windows\");\n }", "private boolean checkIfGccExists() {\n\t\tboolean itExists = false;\n\n\t\tLocalConfiguration local = LocalConfiguration.getInstance();\n\n\t\tString gcc = \"\";\n\t\t\n\t...
[ "0.62674356", "0.6251252", "0.6174279", "0.6078884", "0.6029735", "0.6014929", "0.597937", "0.57938194", "0.5754587", "0.56692135", "0.5535141", "0.5504379", "0.5458051", "0.54220843", "0.5350156", "0.5316704", "0.5253541", "0.51912755", "0.51835656", "0.51484334", "0.5128785...
0.86570966
0
/Change the filename depending on the dataset being used (data1.txt or data2.txt
public static void main(String[] args) { String fileName = "data1.txt"; //Load the data from the dataset file dataSet = getDataSet(fileName); //Setting up the output file String outputFileName = ""; if (fileName.indexOf(".") > 0) { outputFileName = fileName.substring(0, fileName.lastIndexOf(".")); } createFile(outputFileName+".csv"); //log the time the algorithm started long startTime = System.currentTimeMillis(); //Placeholder of the fittest individual fittestIndividual = new Individual(GENE_SIZE, NUM_RULES, COND_LEN); fittestIndividual.generateRulebase(); //Setup the mating pool matingPool = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN); //used to run the GA multiple times without doing it manually //set to 1 because we want to run the GA once for (int a = 0; a < 1; a++) { currentBest = new Individual(GENE_SIZE, NUM_RULES, COND_LEN); currentBest.generateRulebase(); //Generate a population generatePopulation(); //Initial calculation of the fitness calculateFitness(population); for (int i = 0; i < GENERATION; i++) { average = 0; //reset the average currentBestArray[i] = currentBest.getFitness(); tournamentSelect(population); //Calculate the fitness of the mating pool calculateFitness(matingPool); //Perfrom crossover on the mating pool crossover(matingPool); //Mutation mutation(matingPool); //Calculate the fitness of the mating pool calculateFitness(matingPool); //Evaluate the current population for (Individual individual : matingPool) { if (individual.getFitness() > currentBest.getFitness()) { currentBest = new Individual(individual); } average = average + individual.getFitness(); } //Replace the population with the new generation for (int j = 0; j < POP_SIZE; j++) { population[j] = new Individual(matingPool[j]); } averageArray[i] = average / POP_SIZE; } //Check whether the current best is fitter than the global fittest individual if (currentBest.fitness > fittestIndividual.fitness) { fittestIndividual = new Individual(currentBest); //copy the fittest individuals performance fittestArray = Arrays.copyOf(currentBestArray, currentBestArray.length); } } System.out.println("Best fitness generated for the dataset: " + fittestIndividual.fitness); //output the rules printRules(fittestIndividual.getRulebase()); //Save the performance data into the output file for (int i = 0; i < fittestArray.length; i++) { addToFile(i, fittestArray[i], averageArray[i]); } //close the file close(); //Evaluate the fitness agaisnt the dataset calculateFitness(fittestIndividual); double accuracyPercentage = ((double) 100 / dataSet.size()) * fittestIndividual.fitness; System.out.format("%.2f%% accuracy on the datase set.\n", accuracyPercentage); //Log the duration it took long duration = System.currentTimeMillis() - startTime; System.out.println("Completed in " + String.format("%02d min, %02d.%02d sec", TimeUnit.MILLISECONDS.toMinutes(duration), TimeUnit.MILLISECONDS.toSeconds(duration) - TimeUnit.MINUTES.toSeconds(TimeUnit.MILLISECONDS.toMinutes(duration)), TimeUnit.MILLISECONDS.toMillis(duration) - TimeUnit.SECONDS.toMillis(TimeUnit.MILLISECONDS.toSeconds(duration)) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void fillFilenames() {\r\n if (this.pl_LastFiles.getParam(\"nodelist-file\") != null\r\n && this.pl_LastFiles.getParam(\"edgelist-file\") != null) {\r\n this.nodefileText.setText(this.pl_LastFiles.getParam(\"nodelist-file\"));\r\n this.edgeFileText.setText(this.pl...
[ "0.6403794", "0.6060349", "0.6002582", "0.59790254", "0.5837944", "0.5823814", "0.57850915", "0.5744048", "0.56761754", "0.5672381", "0.56558406", "0.56466967", "0.5610044", "0.5593189", "0.55591935", "0.5552801", "0.55486244", "0.5544229", "0.5538526", "0.5535922", "0.553592...
0.0
-1
Function to generate the population
public static void generatePopulation() { population = setupArray(POP_SIZE, NUM_RULES, GENE_SIZE, COND_LEN); for (Individual individual : population) { for (int i = 0; i < individual.getGene().length; i++) { individual.gene[i] = bits.get(new Random().nextInt(2)); } individual.generateRulebase(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void genPopulation(int howMany)\r\n/* 30: */ {\r\n/* 31:54 */ this.pop.removeAllElements();\r\n/* 32:55 */ for (int i = 0; i < howMany; i++)\r\n/* 33: */ {\r\n/* 34:61 */ int[] clusterV = g.genRandomClusterSize();\r\n/* 35:62 */ Cluster c = new Cluster(g, clusterV);\r\n/* 36:63...
[ "0.74098724", "0.7264838", "0.7127019", "0.7022696", "0.6880698", "0.6831815", "0.6769527", "0.6757611", "0.66462135", "0.6613327", "0.6564401", "0.6554927", "0.64377934", "0.6401165", "0.63641316", "0.6329438", "0.6324009", "0.6275901", "0.62622046", "0.6245873", "0.62246776...
0.7968573
0
Function to print the final rulebase
public static void printRules(Rule[] rules) { System.out.println("\nRulebase generated\n------------------"); int i =1; for (Rule rule : rules) { String cond = ""; for (int j = 0; j < rule.cond.length; j++) { cond = cond + rule.cond[j]; } String output = rule.output; System.out.println("Rule" + i + " : " + cond + " = " + output); i++; } System.out.println("\n"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void printRule()\n {\n System.out.print(lhs + \" ::= \");\n for( String s : rhsSymbols)\n System.out.print(s + \" \");\n System.out.println();\n }", "public void printRules () {\n \n System.out.println(\"PRINTING RULESET ID : \" + this.id + \" (\" + this...
[ "0.7323201", "0.716277", "0.6863388", "0.6846885", "0.6590934", "0.65760094", "0.6510751", "0.6488212", "0.64400846", "0.63868046", "0.6331519", "0.6304158", "0.626944", "0.6266897", "0.62473595", "0.6221389", "0.61957866", "0.61789346", "0.61567354", "0.6144256", "0.61441326...
0.73313916
0
Function to calculate the fitness
public static void calculateFitness(Individual[] individuals) { for (Individual individual : individuals) { individual.fitness = 0; for (int i = 0; i < dataSet.size(); i++) { for (Rule rule : individual.rulebase) { boolean match = true; int[] data = dataSet.get(i).getVariables(); for (int j = 0; j < data.length; j++) { String variable = String.valueOf(data[j]); //String variable = "" + data[j]; String[] rulebase = rule.cond; if ((rulebase[j].equals(variable) != true) && (rulebase[j].equals("#") != true)) { match = false; } } if (match) { String output = String.valueOf(dataSet.get(i).getOutput()); if (rule.output.equals(output)) { individual.fitness++; } break; } } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public double fitness()\n/* */ {\n/* 40 */ return 1.0D / (1.0D + this.distance);\n/* */ }", "public void fitnessFunction()\n\t{\n\t\t\n\t}", "public void calcularFitness() {\n double fit = 0;\r\n for (int x=0; x < this.genotipo.length;x++){\r\n if (x!=this.genotipo.length-1){\...
[ "0.8361821", "0.8167407", "0.79105973", "0.7711532", "0.77038753", "0.7697704", "0.7679615", "0.7672538", "0.75694215", "0.7550145", "0.75392705", "0.74524695", "0.7426556", "0.73430794", "0.73025", "0.728373", "0.72608566", "0.7237468", "0.71930325", "0.71918017", "0.7125833...
0.6294994
61
Overloading the funtion to evaluate the accuracy
public static void calculateFitness(Individual individual) { individual.fitness = 0; for (int i = 0; i < dataSet.size(); i++) { for (Rule rule : individual.rulebase) { boolean match = true; int[] data = dataSet.get(i).getVariables(); for (int j = 0; j < data.length; j++) { String variable = String.valueOf(data[j]); //String variable = "" + data[j]; String[] rulebase = rule.cond; if ((rulebase[j].equals(variable) != true) && (rulebase[j].equals("#") != true)) { match = false; } } if (match) { String output = String.valueOf(dataSet.get(i).getOutput()); if (rule.output.equals(output)) { individual.fitness++; } break; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private double findAccuracy(){\n double[] prediciton = this.learner.test(this.VS);\n ClassificationEvaluator CE = new ClassificationEvaluator(prediciton, this.VS);\n double tmp = CE.returnAccuracy(); //find accuracy\n return tmp;\n }", "public double computeAccuracy(){\n\n\t\t//cou...
[ "0.8018519", "0.78133976", "0.754653", "0.74311167", "0.73813146", "0.7238109", "0.71904683", "0.7083658", "0.6995713", "0.68065107", "0.6717295", "0.658135", "0.65072036", "0.6504523", "0.6416764", "0.6408064", "0.6284413", "0.6284221", "0.6281203", "0.624441", "0.61785567",...
0.0
-1
Function that perform single point crossover
public static void crossover(Individual[] parent) { Individual[] children = new Individual[POP_SIZE]; for (int i = 0; i < POP_SIZE; i += 2) { Individual child1 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN); child1.generateRulebase(); Individual child2 = new Individual(GENE_SIZE, NUM_RULES, COND_LEN); child2.generateRulebase(); int crossOverPoint = new Random().nextInt(GENE_SIZE); for (int j = 0; j < crossOverPoint; j++) { child1.gene[j] = parent[i].gene[j]; child2.gene[j] = parent[i + 1].gene[j]; } for (int j = crossOverPoint; j < GENE_SIZE; j++) { child1.gene[j] = parent[i + 1].gene[j]; child2.gene[j] = parent[i].gene[j]; } child1.generateRulebase(); child2.generateRulebase(); children[i] = new Individual(child1); children[i + 1] = new Individual(child2); } matingPool = Arrays.copyOf(children, parent.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public OnePointCrossoverOne(Population p) {\n\t\tdoCrossover(p);\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void crossover() {\r\n\t\tfinal double CROSSOVER_PROB = 0.5;\r\n\t\tfor (int i=0; i<this.nChromosomes-(this.nChromosomes%2); i=i+2) {\r\n\t\t\tif (Math.random() < CROSSOVER_PROB) {...
[ "0.7270447", "0.71998024", "0.7098876", "0.68949467", "0.68752134", "0.6829374", "0.6783194", "0.6751559", "0.65501964", "0.65235925", "0.6507475", "0.64728266", "0.63798356", "0.624039", "0.62220716", "0.6182991", "0.613784", "0.61244595", "0.61023015", "0.60851264", "0.6082...
0.56435853
40
Funtion to perfrom mutation on the individuals depending on the mutation rate set
public static void mutation(Individual[] individuals) { for (int i = 0; i < POP_SIZE; i++) { for (int j = 0; j < GENE_SIZE; j++) { double randomNum = Math.random(); if (randomNum < MUTATION_RATE) { randomNum = Math.random(); ArrayList<String> bitsList = (ArrayList<String>) bits.clone(); for (int g = 0; g < bitsList.size(); g++) { if (individuals[i].gene[j].equals(bitsList.get(g))) { String bit = bitsList.get(g); bitsList.remove(g); int index; if (randomNum < 0.5) { index = 0; } else { index = 1; } individuals[i].gene[j] = bitsList.get(new Random().nextInt(2)); bitsList.add(bit); } } } } individuals[i].generateRulebase(); } matingPool = Arrays.copyOf(individuals, individuals.length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@SuppressWarnings(\"unchecked\")\r\n\t@Override\r\n\tpublic void mutation() {\r\n\t\tfinal double MUTATION_PROB = 0.1;\r\n\t\tfor (int i=0; i<this.nChromosomes; i++) {\r\n\t\t\tArrayList<Integer> chr = (ArrayList<Integer>) this.chromosomes.get(i);\r\n\t\t\tfor (int j=0; j<this.nViaPoints; j++) {\r\n\t\t\t\tdouble ...
[ "0.6906571", "0.6693045", "0.66277283", "0.6625278", "0.65804744", "0.6504858", "0.64911", "0.64629227", "0.6453081", "0.6371416", "0.628132", "0.618818", "0.6131652", "0.60709447", "0.6065904", "0.6057649", "0.6051788", "0.60459137", "0.60324514", "0.60068625", "0.5959208", ...
0.6673644
2
Function that performs selection from the mating pool
public static void tournamentSelect(Individual[] individulas) { int length = individulas.length; int p1, p2; Individual[] array = setupArray(length, NUM_RULES, GENE_SIZE, COND_LEN); for (int i = 0; i < individulas.length; i++) { p1 = new Random().nextInt(length); p2 = new Random().nextInt(length); if (individulas[p1].getFitness() >= individulas[p2].getFitness()) { array[i] = new Individual(individulas[p1]); } else { array[i] = new Individual(individulas[p2]); } } matingPool = Arrays.copyOf(array, length); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void select() {}", "public void select();", "void select();", "public void select ();", "private void select() {\n\t\tif (selected.equals(mealSelect) && !eating) {\n\t\t\tmakeMeal();\n\t\t} else if (selected.equals(snackSelect) && !eating) {\n\t\t\tmakeSnack();\n\t\t} else if (selected.equals(medici...
[ "0.62904", "0.6211202", "0.6094996", "0.6067151", "0.59301347", "0.5922139", "0.58332294", "0.56624424", "0.5650778", "0.55514956", "0.5511871", "0.5395395", "0.5394183", "0.5386361", "0.5362664", "0.53411573", "0.53305584", "0.5319776", "0.52918947", "0.52898395", "0.524069"...
0.0
-1
Function to set up the population and mating pools
public static Individual[] setupArray(int popSize, int numRules, int geneSize, int conditionLength) { Individual[] array = new Individual[popSize]; for (int i = 0; i < array.length; i++) { array[i] = new Individual(geneSize, numRules, conditionLength); array[i].generateRulebase(); } return array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initialisePools() {\r\n Integer[] bigPoolInts = {25, 50, 75, 100};\r\n Integer[] smallPoolInts = {1,2,3,4,5,6,7,8,9,10,1,2,3,4,5,6,7,8,9,10};\r\n bigPool = new ArrayList<Integer>( Arrays.asList(bigPoolInts) );\r\n smallPool = new ArrayList<Integer>(Arrays.asList(smallPoolIn...
[ "0.67860323", "0.6652782", "0.6584597", "0.65770096", "0.63856214", "0.63224804", "0.6102853", "0.6101659", "0.60077924", "0.59900695", "0.5963743", "0.59405535", "0.58872783", "0.58709353", "0.58621573", "0.584265", "0.58205277", "0.58203566", "0.58122694", "0.5797052", "0.5...
0.0
-1
Functions that handle the output file
public static void createFile(String name) { file = new File(name); try { if(file.exists()) { file.delete(); file.createNewFile(); }else file.createNewFile(); fileWriter = new FileWriter(file); fileWriter.append("Generation, "); fileWriter.append("Fitness, "); fileWriter.append("Average\n"); }catch (IOException e) { System.out.println(e); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract String FileOutput();", "public void outputToFile(String filemame)\n {\n }", "String getFileOutput();", "private static void textFilesOutput() {\n\n // make output directory if it doesn't already exist\n new File(\"output\").mkdirs();\n\n Output airportFlightCounter ...
[ "0.7707132", "0.7190524", "0.69420457", "0.66891474", "0.6594704", "0.65933716", "0.659054", "0.65433335", "0.64888877", "0.6408101", "0.6407278", "0.6325824", "0.6325662", "0.6300491", "0.62573546", "0.62436473", "0.622025", "0.62104416", "0.619657", "0.6195531", "0.6143254"...
0.0
-1
Funtion that reads the dataset and populate the arraylist
public static ArrayList<Data> getDataSet(String fileName) { ArrayList<Data> dataset = new ArrayList<>(); Scanner input = new Scanner(Main.class.getResourceAsStream(fileName)); input.nextLine(); String line = null; int size = 0; while (input.hasNextLine()) { String str = null; line = input.nextLine(); line = line.replace(" ", ""); size = line.length() - 1; Data data = new Data(size); for (int i = 0; i < line.length() - 1; i++) { data.variables[i] = Character.getNumericValue(line.charAt(i)); } data.setOutput(Character.getNumericValue(line.charAt(size))); dataset.add(data); } dataset.forEach((data) -> { System.out.println(data.printVariables() + " " + data.getOutput()); }); System.out.println("Data loaded"); COND_LEN = size; GENE_SIZE = (COND_LEN + 1) * NUM_RULES; return dataset; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void initDataset() {\r\n CollGestDBHelper collGestDBHelper = new CollGestDBHelper(activityContext);\r\n List<CollGestItem> listAllItems = collGestDBHelper.getAllGestItem();\r\n\r\n mDataset = new String[listAllItems.size()][7];\r\n System.out.println(\"++++++++++++++++++++++++++...
[ "0.7253073", "0.68867147", "0.67341787", "0.67047936", "0.66325814", "0.6527542", "0.6517953", "0.64986265", "0.6479019", "0.6429495", "0.6427154", "0.6421745", "0.6412567", "0.64078534", "0.6347321", "0.6321944", "0.63107693", "0.63107693", "0.63102525", "0.6279889", "0.6273...
0.6137654
27
This is the method to handle the get user permissions request.
public static void getUserPermissions(ArrayList<String> parameters, HashMap<String, ArrayList<String>> sessions, ObjectOutputStream oos) throws IOException { ArrayList<Integer> userPermissions; // check if correct number of parameters have been provided if (parameters.size() != 2) { oos.writeObject(new Response(StatusCodes.BAD_REQUEST, "Parameters Invalid")); } else { // check if token from parameters is valid and if session token has not yet expired if (sessions.containsKey(parameters.get(1)) && !hasTokenExpired(sessions, parameters.get(1))) { // check if the user exists if (Users.doesUserExists(parameters.get(0))) { // check if user is attempting to get their own permissions if (parameters.get(0).equals(sessions.get(parameters.get(1)).get(0))) { // get the user's permissions userPermissions = Users.getUserPermissionsFromDB(parameters.get(0)); if (userPermissions.isEmpty()) { oos.writeObject(new Response(StatusCodes.NO_CONTENT, userPermissions)); } else { oos.writeObject(new Response(StatusCodes.OK, userPermissions)); } } else { // check if the user has the "Edit Users" permission if (Users.userHasPermission(sessions.get(parameters.get(1)).get(0), ServerPermissions.EDIT_USERS)) { // get the user's permissions userPermissions = Users.getUserPermissionsFromDB(parameters.get(0)); if (userPermissions.isEmpty()) { oos.writeObject(new Response(StatusCodes.NO_CONTENT, userPermissions)); } else { oos.writeObject(new Response(StatusCodes.OK, userPermissions)); } } else { oos.writeObject(new Response(StatusCodes.FORBIDDEN, "Missing Permissions")); } } } else { oos.writeObject(new Response(StatusCodes.INTERNAL_ERROR, "User Does Not Exist")); } } else { oos.writeObject(new Response(StatusCodes.UNAUTHORISED, "Unauthorised Request")); } } // flush oos oos.flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n protected String requiredGetPermission() {\n return \"user\";\n }", "private void fetchPermissionsFromUser() {\n Log.d(TAG, \"in fetch permisssion s\");\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION)\n ...
[ "0.7293788", "0.7121141", "0.6960619", "0.6857262", "0.6766301", "0.6716588", "0.6710104", "0.65183866", "0.64779407", "0.6456909", "0.6429359", "0.64137334", "0.64137334", "0.6402126", "0.6370451", "0.63301337", "0.6324454", "0.6298752", "0.6266905", "0.6262366", "0.619409",...
0.0
-1
Empty Board has zero score:
@Test public void testBasicScorer() { assertEquals(0, stateScorer.scoreState(builder().build(), TwoPlayerKey.PLAYER_1)); //The other player has won if they occupy every node on the board: assertEquals(-1, stateScorer.scoreState(builder().allOccupiedBy(TwoPlayerKey.PLAYER_2).build(), TwoPlayerKey.PLAYER_1)); //I have won if I occupy every node on the board: assertEquals(1, stateScorer.scoreState(builder().allOccupiedBy(TwoPlayerKey.PLAYER_1).build(), TwoPlayerKey.PLAYER_1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static double getEmtpyScore(Game2048Board board) {\n double empty = 0;\n if (board.getEmptyTiles().size() < 4) {\n empty = (4 - board.getEmptyTiles().size());\n }\n return empty;\n }", "@Test\n public void emptyBoard() {\n Board b = new Board();\n for (int c = 0; c < b....
[ "0.8127512", "0.72658956", "0.71850985", "0.6989699", "0.6914524", "0.68576235", "0.6824944", "0.6730027", "0.66322017", "0.6619409", "0.6577767", "0.6547518", "0.6514565", "0.65016955", "0.65006876", "0.64846444", "0.64846444", "0.6478031", "0.64779365", "0.64566344", "0.645...
0.598688
82
///////////// to api ///////////////
public ArrayList<JSONObject> getGroups() { return groups; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "API createAPI();", "public api() {}", "public interface Api {\n /**{\"response\": {\"zbsVer\": 0, \"hostId\": \"001207C40173\", \"room\": [{\"type\": \"\\u603b\\u7ecf\\u7406\", \"roomId\": \"322\", \"name\": \"\\u603b\\u7ecf\\u7406\"}, {\"roomId\": \"350\", \"type\": \"\\u4e3b\\u5367\", \"name\": \"\\u4e3b\...
[ "0.62555206", "0.60394746", "0.60217977", "0.5856615", "0.58525693", "0.5814141", "0.5800721", "0.57763577", "0.57588416", "0.5729675", "0.57166016", "0.57138145", "0.57038224", "0.57014626", "0.56923723", "0.56891024", "0.568676", "0.56803536", "0.5668173", "0.56652224", "0....
0.0
-1
Method de lookup Method Download Image ? montando se houver algum campo do tipo bin?rio |DOWNLOADIMAGE|
public void findbyid() throws Exception { try { Con_contadorDAO con_contadorDAO = getCon_contadorDAO(); List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT); con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT(); } catch (Exception e) { e.printStackTrace(); setMsg("Falha ao realizar consulta!"); } finally { close(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Bitmap downloadImage(String theUrl){ \n\t \t//Log.i(\"ZZ\", \"AppDelegate downloadImage: \" + theUrl); \n\t \tdownloadInProgress = 1;\n\t InputStream in = null; \n\t \tBitmap bitmap = null;\n\t try{\n\t \tin = Obj_Downloader.OpenHttpConnection(theUrl);\n\t\t bitmap = ...
[ "0.65058637", "0.6499366", "0.64978504", "0.6446233", "0.6332163", "0.63258684", "0.6322505", "0.6292782", "0.6240417", "0.62266725", "0.6225085", "0.6211343", "0.61779195", "0.617279", "0.6150254", "0.6118683", "0.6070788", "0.60391456", "0.6025774", "0.60194236", "0.6017261...
0.0
-1
Volta para a p?gina de consulta
public void consult() throws Exception { // TODO Consult try { String page = "con_contadorConsult.jsp";// defina aqui a p?gina que deve ser chamada getResponse().sendRedirect(page); } catch (Exception e){} }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Jugador consultarGanador();", "private void pesquisar_cliente() {\n String sql = \"select id, empresa, cnpj, endereco, telefone, email from empresa where empresa like ?\";\n try {\n pst = conexao.prepareStatement(sql);\n //passando o conteudo para a caixa de pesquisa para o ?\...
[ "0.7037161", "0.66319335", "0.65171295", "0.6497654", "0.6399679", "0.63231623", "0.6232964", "0.6193185", "0.6183523", "0.6179034", "0.6143405", "0.6134854", "0.61124593", "0.6097397", "0.60811925", "0.60782045", "0.6059051", "0.60399055", "0.6036681", "0.6034706", "0.602690...
0.61060447
13
Bind certain fields regardless.
protected void onBind(HttpServletRequest request, Object command, BindException errors) throws Exception { RoleWrapperBean roleWrapperBean = (RoleWrapperBean) command; switch (getCurrentPage(request)) { case SELECT_ROLE_TYPE_IDX: String roleType = roleWrapperBean.getType(); Role role; List activeRolePermits; if (Role.isResourceRole(roleType)) { role = new ResourceRole(); activeRolePermits = getRoleManager().getActiveDomainObjectPermits(); } else { role = new AccessRole(); activeRolePermits = getRoleManager().getActiveAccessPermits(); } roleWrapperBean.setRole(role); roleWrapperBean.setAllPermits(activeRolePermits); roleWrapperBean.initSelectedPermitIds(); break; case ADD_ROLE_IDX: roleWrapperBean.setActive(RequestUtils.getBooleanParameter(request, ParameterConstants.ACTIVE, false)); break; case ADD_PERMISSIONS_IDX: if (RequestUtils.getStringParameters(request, "selectedPermitIds").length == 0) roleWrapperBean.setSelectedPermitIds(new String[0]); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void bindParameters() {\n\n\t}", "protected abstract void bindAttributes();", "@Override\n\tpublic void bindData() {\n\t\t\n\t}", "private void registerBindings(){\n\t\tdataBinder.registerBinding(\"supplier.supplierBusinessMode.name\", String.class, this.txtBusinessMode, \"text\");\n\t\td...
[ "0.68398464", "0.6770927", "0.6679339", "0.61201525", "0.6104499", "0.60580766", "0.5933005", "0.5877775", "0.5835359", "0.58232784", "0.580883", "0.5757864", "0.5751203", "0.57298076", "0.5701195", "0.5701195", "0.5653487", "0.56513745", "0.5638385", "0.5634393", "0.56094617...
0.0
-1
Informs the caller whether this symbol can match an empty string. This method always return false for terminals. For nonterminals the result depends on whether at least one of the rules can match an empty string.
abstract boolean canMatchEmptyString();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean canMatchEmptyString() {\n return false;\n }", "public abstract boolean canMatchEmpty();", "private static boolean isEmpty(CharSequence str) {\n if (str == null || str.length() == 0) {\n return true;\n } else {\n return false;\n }\n }", "...
[ "0.7431366", "0.72422653", "0.6685332", "0.66248447", "0.6597389", "0.6595952", "0.6583928", "0.65458894", "0.650351", "0.64903533", "0.6467551", "0.64649427", "0.6440644", "0.6426434", "0.64186984", "0.6393094", "0.6367335", "0.6363939", "0.6350581", "0.634398", "0.6333947",...
0.7691604
0
Informs the caller whether this symbol represents a keyword.
public abstract boolean isKeyword();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean hasKeyword();", "public boolean isKeyword(String keyword) {\n return this.keyword.equals(keyword); \n }", "public abstract boolean isKeyword(@Nullable String text);", "private boolean isKeyword(String value) {\n return Keywords.isKeyword(value);\n }", "@Override\r\n\t\t\tpublic boolea...
[ "0.7672841", "0.7537996", "0.7521649", "0.7287209", "0.7249502", "0.7249502", "0.7249502", "0.7193548", "0.7169915", "0.7098903", "0.6809181", "0.6578892", "0.65412986", "0.65412986", "0.6460717", "0.6374446", "0.63323784", "0.631234", "0.6164432", "0.61519647", "0.6141873", ...
0.8308562
0
Terminals cannot match an empty string.
boolean canMatchEmptyString() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract boolean canMatchEmptyString();", "public abstract boolean canMatchEmpty();", "@Test\n\tpublic void nonEmptyString() {\n\t\tString s = \" H \";\n\t\tassertFalse(\"Non empty string\", StringUtil.isEmpty(s));\n\t}", "public boolean matchAnyString() { return false; }", "@Test\n\tpublic...
[ "0.6783679", "0.6497611", "0.625346", "0.6213155", "0.5970202", "0.5952449", "0.5802201", "0.57204264", "0.56874347", "0.56805444", "0.56692195", "0.5654445", "0.5648734", "0.5636783", "0.56310326", "0.56115115", "0.5610524", "0.5599653", "0.5589505", "0.55781037", "0.5577281...
0.7044513
0
Constructs a Credentials object from the given user name and password.
public Credentials(String user, String password) { this.user = user; this.password = password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public BasicAuthenticationCredentials(String userName, String password) {\n this.userName = userName;\n this.password = password;\n }", "public AuthCredentials(String scheme,String name,String password)\n {\n this.scheme = scheme;\n this.name = name;\n this.password = password;\...
[ "0.7017165", "0.697871", "0.68900734", "0.6527128", "0.6463574", "0.6430392", "0.63986737", "0.63841194", "0.6373476", "0.6356686", "0.63195115", "0.63078535", "0.62380546", "0.61598444", "0.61018395", "0.5960485", "0.59485066", "0.5945105", "0.5936676", "0.5900106", "0.58712...
0.806244
0
Returns the user name from the credentials.
public String getUser() { return user; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUserName();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String getUsername();", "java.lang.String ge...
[ "0.8020829", "0.8020829", "0.8020829", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7911386", "0.7624974", "0.75287974", "0.75287974", "0.74504584", "0.73039156", "0.73039156", "0.73039156", "0.73039156", "0.730391...
0.0
-1
Returns the password from the credentials.
public String getPassword() { return password; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "java.lang.String getPassword();", "public java.lang.String getPassword();", "protected St...
[ "0.80181736", "0.80181736", "0.80181736", "0.80181736", "0.80181736", "0.80181736", "0.80181736", "0.7820969", "0.7630859", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.76140845", "0.75720257", "0.75429827", ...
0.0
-1
for set the calender date
@Override public void onDateSet(DatePicker view, int year, int month, int dayOfMonth) { Calendar c = Calendar.getInstance(); c.set(Calendar.YEAR,year); c.set(Calendar.MONTH,month); c.set(Calendar.DAY_OF_MONTH,dayOfMonth); String dateString = new SimpleDateFormat("YYYY-MM-d").format(c.getTime()); // String dateString = DateFormat.getDateInstance(DateFormat.LONG).format(c.getTime()); showDate.setText(dateString); // Toast.makeText(this, , Toast.LENGTH_SHORT).show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setDate() {\n\t\tthis.date = Integer.parseInt(this.year + String.format(\"%02d\", this.calenderWeek));\n\n\t}", "private void setDate() {\n Date date = new Date();\n SimpleDateFormat sdf = new SimpleDateFormat(\"yyyy-MM-dd\");\n datetxt2.setText(sdf.format(date));\n }", "pr...
[ "0.8000687", "0.77385324", "0.76336193", "0.76200175", "0.75840014", "0.75615597", "0.7517715", "0.750777", "0.74858606", "0.74580926", "0.7456949", "0.74235094", "0.7360789", "0.7360495", "0.73600835", "0.73504", "0.7344258", "0.73265857", "0.7322424", "0.7294543", "0.726577...
0.0
-1
for image cropping and set the image
protected void onActivityResult(int requestCode, int resultCode, Intent data) { super.onActivityResult(requestCode, resultCode, data); if (requestCode == CropImage.CROP_IMAGE_ACTIVITY_REQUEST_CODE) { CropImage.ActivityResult result = CropImage.getActivityResult(data); if (resultCode == RESULT_OK) { //getting Image to show Uri resultUri = result.getUri(); profilePic.setImageURI(resultUri); //getting image to save bitmap formate try{ bitmap = MediaStore.Images.Media.getBitmap(getContentResolver(),resultUri); imageChanged = true; }catch (IOException e){ e.printStackTrace(); } } else if (resultCode == CropImage.CROP_IMAGE_ACTIVITY_RESULT_ERROR_CODE) { Exception error = result.getError(); Toast.makeText(this, ""+error, Toast.LENGTH_SHORT).show(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void startCropImage() {\n }", "protected void cropImage() {\n if (mOptions.noOutputImage) {\n setResult(null, null, 1);\n } else {\n Uri outputUri = getOutputUri();\n mCropImageView.saveCroppedImageAsync(\n outputUri,\n ...
[ "0.77436864", "0.73960006", "0.72638065", "0.72053003", "0.7177328", "0.69454193", "0.6859116", "0.6769853", "0.6678344", "0.6675411", "0.6666623", "0.66623986", "0.6652028", "0.66408855", "0.6607674", "0.65730417", "0.6558339", "0.6542494", "0.6540304", "0.6514923", "0.65122...
0.62947166
32
TODO Autogenerated method stub
public static void main(String[] args) { String number="48982"; String number1=""; for(int i=number.length()-1;i>=0;i--) { number1=number1+number.charAt(i); } if(number.equalsIgnoreCase(number1)) { System.out.println("yes"); } else System.out.println("No"); }
{ "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
Use this factory method to create a new instance of this fragment using the provided parameters.
public static MenuFragment newInstance(String param1, String param2) { MenuFragment fragment = new MenuFragment(); Bundle args = new Bundle(); args.putString(ARG_PARAM1, param1); args.putString(ARG_PARAM2, param2); fragment.setArguments(args); return fragment; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static FragmentTousWanted newInstance() {\n FragmentTousWanted fragment = new FragmentTousWanted();\n Bundle args = new Bundle();\n fragment.setArguments(args);\n return fragment;\n }", "protected abstract Fragment createFragment();", "public void createFragment() {\n\n ...
[ "0.7259329", "0.72331375", "0.71140355", "0.69909847", "0.69902235", "0.6834592", "0.683074", "0.68134046", "0.6801526", "0.6801054", "0.67653185", "0.6739714", "0.6739714", "0.6727412", "0.6717231", "0.6705855", "0.6692112", "0.6691661", "0.66869426", "0.66606814", "0.664618...
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { final View view = inflater.inflate(R.layout.fragment_menu, container, false); loadingProgress = view.findViewById(R.id.loading_progress); recycler_menu = view.findViewById(R.id.recycler_menu); recycler_menu.setHasFixedSize(true); layoutManager = new GridLayoutManager(getContext(),2); recycler_menu.setLayoutManager(layoutManager); recycler_recommendation = view.findViewById(R.id.recycler_recommendation); recycler_recommendation.setHasFixedSize(true); recomLayoutManager = new LinearLayoutManager(getContext(), LinearLayoutManager.HORIZONTAL, false); recycler_recommendation.setLayoutManager(recomLayoutManager); menuRef.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { getAllMenus(dataSnapshot); } @Override public void onCancelled(DatabaseError databaseError) { } }); adsBanner.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { getBannerSlider(view, dataSnapshot); } @Override public void onCancelled(DatabaseError databaseError) { } }); recomRef.addListenerForSingleValueEvent(new ValueEventListener() { @Override public void onDataChange(DataSnapshot dataSnapshot) { getAllRecommendation(dataSnapshot); } @Override public void onCancelled(DatabaseError databaseError) { } }); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup...
[ "0.6740785", "0.6725086", "0.6722221", "0.66993004", "0.66919166", "0.6689273", "0.6687578", "0.6685118", "0.66772324", "0.66754", "0.66668403", "0.6666252", "0.6665723", "0.66613716", "0.6654354", "0.6651048", "0.6643431", "0.66391444", "0.6638131", "0.6634899", "0.6625316",...
0.0
-1
TODO: Rename method, update argument and hook method into UI event
public void onButtonPressed(Uri uri) { if (mListener != null) { mListener.onFragmentInteraction(uri); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void handle(ActionEvent event) {\n\n\t\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void handle(ActionEvent event) {\n\t\t\t\t\n\t\t\t}", "@...
[ "0.6619185", "0.65246344", "0.6473144", "0.6473144", "0.64351684", "0.6325494", "0.62368196", "0.6189416", "0.6158721", "0.61455715", "0.6123594", "0.6107332", "0.6101038", "0.6092755", "0.6049496", "0.6049496", "0.60442764", "0.604003", "0.604003", "0.6007846", "0.59999037",...
0.0
-1
This interface must be implemented by activities that contain this fragment to allow an interaction in this fragment to be communicated to the activity and potentially other fragments contained in that activity. See the Android Training lesson Communicating with Other Fragments for more information.
public interface OnFragmentInteractionListener { // TODO: Update argument type and name void onFragmentInteraction(Uri uri); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface FragmentInteraction {\n void switchToBoardView();\n void switchToPinsView();\n void switchToPins(PDKBoard pdkBoard);\n void switchToDescription(PDKPin pin);\n}", "public int...
[ "0.73252225", "0.7209547", "0.7136359", "0.71252084", "0.7123544", "0.7015349", "0.69774413", "0.69774413", "0.69774413", "0.6974346", "0.69687444", "0.6966675", "0.6961056", "0.69545686", "0.6944112", "0.69353503", "0.6930745", "0.69285405", "0.6923585", "0.69112146", "0.690...
0.0
-1
TODO: Update argument type and name
void onFragmentInteraction(Uri uri);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n public String getFirstArg() {\n return name;\r\n }", "@Override\n public int getNumberArguments() {\n return 1;\n }", "java.lang.String getArg();", "@Override\n public int getArgLength() {\n return 4;\n }", "Argument createArgument();", "@Override\r\n\tpublic ...
[ "0.7164074", "0.6946075", "0.6714363", "0.65115863", "0.63969076", "0.6375468", "0.63481104", "0.63162106", "0.6260299", "0.6208487", "0.6208487", "0.62070644", "0.6197276", "0.61806154", "0.6177103", "0.61530507", "0.61472267", "0.61243707", "0.60771817", "0.6054482", "0.599...
0.0
-1
REST API CALL TO GET ALL REVIEWS //
@GetMapping(produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> getReviews(HttpServletResponse response) { response.addHeader("Date", new Date().toString()); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate"); response.setHeader("Pragma","no-cache"); response.setHeader("Version","Mechanic API V-2.0"); response.setDateHeader("Expires", 0); return new ResponseEntity<>( reviewService.getReviews(), HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET\n\t@Path(\"{id}/reviews\")\n\t@Produces({MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON})\n\tpublic Response getApplicationReviews(\n\t\t\t@HeaderParam(\"ORSKey\") String orsKey,\n\t\t\t@HeaderParam(\"ShortKey\") String shortKey,\n\t\t\t@PathParam(\"id\") String id) {\n\t\tif (!Security.instance.isInte...
[ "0.6661866", "0.64716494", "0.63645", "0.60562927", "0.60100377", "0.597142", "0.5960234", "0.59572744", "0.59062123", "0.5895709", "0.5849172", "0.584878", "0.58207434", "0.5820127", "0.58148545", "0.5786213", "0.5782671", "0.5772473", "0.57391816", "0.57141376", "0.56970036...
0.604043
4
REST API CALL TO GET A REVIEW //
@GetMapping(value = "/{id}", produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> getReview(HttpServletResponse response, @PathVariable("id") int id) { response.addHeader("Date", new Date().toString()); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate"); response.setHeader("Pragma","no-cache"); response.setHeader("Version","Mechanic API V-2.0"); response.setDateHeader("Expires", 0); return new ResponseEntity<>( reviewService.getReview(id), HttpStatus.OK); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@GET(\"movie/{id}\")\n Call<PersonagemResponse> getMovieDetails(@Path(\"id\") int id, @Query(\"api_key\") String apiKey);", "@GET(\"replays/{id}\")\n Call<DataResponse<ReplayData>> getReplayData(@Path(\"id\") String replayId);", "@GET(\"movie/top_rated\")\n Call<MovieResponse>getTopRatedMovies(@Query(...
[ "0.6097326", "0.6090285", "0.603287", "0.59789103", "0.5827233", "0.5770909", "0.5751087", "0.5691706", "0.56676185", "0.56539685", "0.5642333", "0.5621537", "0.56162095", "0.5562897", "0.5553974", "0.55023456", "0.5491059", "0.5484024", "0.54412234", "0.5418125", "0.5414759"...
0.5466675
18
REST API CALL TO CREATE A REVIEW //
@PostMapping(produces = MediaType.APPLICATION_JSON_VALUE) public ResponseEntity<Object> createReview(Review review, HttpServletRequest request, HttpServletResponse response) { Review newReview = reviewService.createReview(review); response.addHeader("Job Created", request.getServerName() + ":" + request.getServerPort() + "/reviews/" + newReview.getId()); response.addHeader("Date", new Date().toString()); response.setHeader("Cache-Control","no-cache,no-store,must-revalidate"); response.setHeader("Pragma","no-cache"); response.setHeader("Version","Mechanic API V-2.0"); response.setDateHeader("Expires", 0); return new ResponseEntity<>(newReview, HttpStatus.CREATED); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface RankClient {\n @POST(\"api/givefeedback\")\n @FormUrlEncoded\n Call<Response> giverank (@Field(\"reviewer\") String reviewer,\n @Field(\"reviewee\") String reviewee,\n @Field(\"rank\") int rank);\n}", "@RequestMapping(value = \"/...
[ "0.55679375", "0.5504043", "0.5456362", "0.5398274", "0.53479946", "0.53284264", "0.5289597", "0.52650785", "0.526227", "0.52544636", "0.52537495", "0.52469385", "0.5208741", "0.51727444", "0.5133269", "0.5129325", "0.5127194", "0.5122195", "0.5092337", "0.50922", "0.5077228"...
0.534349
5