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 |
|---|---|---|---|---|---|---|
Internal implementation, normal users should not use it. | public void toMap(HashMap<String, String> map, String prefix) {
this.setParamSimple(map, prefix + "EvidenceName", this.EvidenceName);
this.setParamSimple(map, prefix + "EvidenceHash", this.EvidenceHash);
this.setParamSimple(map, prefix + "BusinessId", this.BusinessId);
this.setParamSimple(map, prefix + "EvidenceDescription", this.EvidenceDescription);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public final void mo51373a() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n protected void prot() {\n }",
"private stendhal() {\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@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 protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void init() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void smell() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"private void m50366E() {\n }",
"protected boolean func_70814_o() { return true; }",
"protected Problem() {/* intentionally empty block */}",
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initSelfData() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n public int retroceder() {\n return 0;\n }",
"protected Doodler() {\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"@Override\n protected void initialize() \n {\n \n }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\r\n\tpublic void init() {}",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void init() {\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n public void apply() {\n }",
"private TestsResultQueueEntry() {\n\t\t}",
"@Override\n void init() {\n }",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"private final void i() {\n }",
"protected void h() {}",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"private Unescaper() {\n\n\t}",
"@Override\r\n\tprotected void prepare()\r\n\t{\r\n\r\n\t}",
"private ArraySetHelper() {\n\t\t// nothing\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"private Util() { }",
"@Override\n public void init() {}",
"@Override public int describeContents() { return 0; }",
"public void method_4270() {}",
"@Override\n\t\tpublic void init() {\n\t\t}",
"@Override\n protected void initialize() {\n\n \n }",
"@Override\n\tpublic void apply() {\n\t\t\n\t}",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"protected abstract Set method_1559();",
"@Override\n public void init() {\n\n }",
"private void someUtilityMethod() {\n }",
"private void someUtilityMethod() {\n }",
"protected void init() {\n // to override and use this method\n }",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tprotected void intializeSpecific() {\n\r\n\t}",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"private TedCorrigendumHandler() {\n throw new AssertionError();\n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\n\tprotected void prepare() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"protected boolean func_70041_e_() { return false; }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"protected void additionalProcessing() {\n\t}",
"private void getStatus() {\n\t\t\n\t}",
"protected OpinionFinding() {/* intentionally empty block */}",
"@Override\r\n\tpublic void just() {\n\t\t\r\n\t}",
"@Override\n\tpublic void selfValidate() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public int describeContents() { return 0; }",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"private void assignment() {\n\n\t\t\t}"
] | [
"0.62574834",
"0.6217662",
"0.6024768",
"0.5982239",
"0.5965723",
"0.59330684",
"0.5920059",
"0.58351564",
"0.5781645",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57749504",
"0.57737285",
"0.57054734",
"0.5701363",
"0.56510806",
"0.56491816",
"0.56491816",
"0.5641364",
"0.5636646",
"0.5636101",
"0.5617263",
"0.56129867",
"0.56071395",
"0.56071395",
"0.5604147",
"0.5597464",
"0.5557192",
"0.5547823",
"0.5538959",
"0.5529547",
"0.5527831",
"0.55252886",
"0.5524415",
"0.55170584",
"0.55161196",
"0.55161196",
"0.5508306",
"0.55039597",
"0.5501735",
"0.5498203",
"0.5492665",
"0.54857016",
"0.54857016",
"0.5484164",
"0.5484164",
"0.54709655",
"0.54671437",
"0.5466405",
"0.54586643",
"0.54480445",
"0.5444829",
"0.544423",
"0.5431154",
"0.54291874",
"0.5428321",
"0.5426861",
"0.5424348",
"0.54216623",
"0.54197234",
"0.54126096",
"0.54122156",
"0.5410503",
"0.5408548",
"0.54017633",
"0.5393527",
"0.5393527",
"0.5393108",
"0.53811836",
"0.53811836",
"0.53765255",
"0.53727305",
"0.5371025",
"0.5368476",
"0.53672004",
"0.5362031",
"0.535984",
"0.53585947",
"0.535824",
"0.53558195",
"0.53554994",
"0.53553045",
"0.53553045",
"0.53553045",
"0.5353958",
"0.53527707",
"0.53524756",
"0.5351759",
"0.535174",
"0.53509206",
"0.53348345",
"0.5334606",
"0.533233",
"0.5331985",
"0.5331269",
"0.5331116",
"0.53306353",
"0.5328405"
] | 0.0 | -1 |
This method is called from within the constructor to initialize the form. WARNING: Do NOT modify this code. The content of this method is always regenerated by the Form Editor. | @SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {
mainPanel = new javax.swing.JPanel();
headerPanel = new javax.swing.JPanel();
headerLabel = new javax.swing.JLabel();
functionPanel = new javax.swing.JPanel();
panelInput = new javax.swing.JPanel();
txMa = new javax.swing.JTextField();
btnXoa = new javax.swing.JButton();
txTen = new javax.swing.JTextField();
txHo = new javax.swing.JTextField();
lbMa = new javax.swing.JLabel();
lbHo = new javax.swing.JLabel();
lbTen = new javax.swing.JLabel();
lbMonPhuTrach = new javax.swing.JLabel();
cbxMonPhuTrach = new javax.swing.JComboBox<>();
btnThem = new javax.swing.JButton();
btnSua = new javax.swing.JButton();
btnDocDS = new javax.swing.JButton();
btnTimKiem = new javax.swing.JButton();
btnNhapLai = new javax.swing.JButton();
panelTable = new javax.swing.JPanel();
scrollPaneDanhSachGiaoVien = new javax.swing.JScrollPane();
tbDanhSachGiaoVien = new javax.swing.JTable();
lbSoKetQuaTimThay = new javax.swing.JLabel();
headerPanel.setBackground(new java.awt.Color(255, 255, 255));
headerPanel.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(102, 102, 102), 1, true));
headerLabel.setFont(new java.awt.Font("Helvetica", 0, 24)); // NOI18N
headerLabel.setForeground(new java.awt.Color(23, 35, 51));
headerLabel.setText("Quản Lý Giáo Viên");
javax.swing.GroupLayout headerPanelLayout = new javax.swing.GroupLayout(headerPanel);
headerPanel.setLayout(headerPanelLayout);
headerPanelLayout.setHorizontalGroup(
headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(headerPanelLayout.createSequentialGroup()
.addGap(31, 31, 31)
.addComponent(headerLabel)
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
headerPanelLayout.setVerticalGroup(
headerPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(headerPanelLayout.createSequentialGroup()
.addContainerGap()
.addComponent(headerLabel, javax.swing.GroupLayout.DEFAULT_SIZE, 75, Short.MAX_VALUE)
.addContainerGap())
);
panelInput.setBackground(new java.awt.Color(255, 255, 255));
panelInput.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(102, 102, 102), 1, true));
panelInput.setForeground(new java.awt.Color(102, 102, 102));
txMa.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
txMa.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true));
txMa.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txMaActionPerformed(evt);
}
});
btnXoa.setBackground(new java.awt.Color(23, 35, 51));
btnXoa.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
btnXoa.setForeground(new java.awt.Color(255, 255, 255));
btnXoa.setText("Xóa");
btnXoa.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnXoaActionPerformed(evt);
}
});
btnXoa.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
btnXoaKeyPressed(evt);
}
});
txTen.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
txTen.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true));
txTen.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txTenActionPerformed(evt);
}
});
txHo.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
txHo.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(204, 204, 204), 1, true));
txHo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
txHoActionPerformed(evt);
}
});
lbMa.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
lbMa.setForeground(new java.awt.Color(23, 35, 51));
lbMa.setText("Mã");
lbHo.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
lbHo.setForeground(new java.awt.Color(23, 35, 51));
lbHo.setText("Họ");
lbTen.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
lbTen.setForeground(new java.awt.Color(23, 35, 51));
lbTen.setText("Tên");
lbMonPhuTrach.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
lbMonPhuTrach.setForeground(new java.awt.Color(23, 35, 51));
lbMonPhuTrach.setText("Môn phụ trách");
cbxMonPhuTrach.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
cbxMonPhuTrach.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { "...", "Toan Hoc", "Vat Ly", "Hoa Hoc", "Ngu Van", "Anh Van", "Giao Duc Cong Dan" }));
cbxMonPhuTrach.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cbxMonPhuTrachActionPerformed(evt);
}
});
btnThem.setBackground(new java.awt.Color(23, 35, 51));
btnThem.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
btnThem.setForeground(new java.awt.Color(255, 255, 255));
btnThem.setText("Thêm");
btnThem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnThemActionPerformed(evt);
}
});
btnThem.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
btnThemKeyPressed(evt);
}
});
btnSua.setBackground(new java.awt.Color(23, 35, 51));
btnSua.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
btnSua.setForeground(new java.awt.Color(255, 255, 255));
btnSua.setText("Sửa");
btnSua.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnSuaActionPerformed(evt);
}
});
btnSua.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
btnSuaKeyPressed(evt);
}
});
btnDocDS.setBackground(new java.awt.Color(120, 168, 252));
btnDocDS.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
btnDocDS.setForeground(new java.awt.Color(255, 255, 255));
btnDocDS.setText("Đọc DS");
btnDocDS.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnDocDSActionPerformed(evt);
}
});
btnDocDS.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
btnDocDSKeyPressed(evt);
}
});
btnTimKiem.setBackground(new java.awt.Color(23, 35, 51));
btnTimKiem.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
btnTimKiem.setForeground(new java.awt.Color(255, 255, 255));
btnTimKiem.setText("Tìm kiếm");
btnTimKiem.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnTimKiemActionPerformed(evt);
}
});
btnTimKiem.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
btnTimKiemKeyPressed(evt);
}
});
btnNhapLai.setBackground(new java.awt.Color(23, 35, 51));
btnNhapLai.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
btnNhapLai.setForeground(new java.awt.Color(255, 255, 255));
btnNhapLai.setText("Nhập lại");
btnNhapLai.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btnNhapLaiActionPerformed(evt);
}
});
btnNhapLai.addKeyListener(new java.awt.event.KeyAdapter() {
public void keyPressed(java.awt.event.KeyEvent evt) {
btnNhapLaiKeyPressed(evt);
}
});
javax.swing.GroupLayout panelInputLayout = new javax.swing.GroupLayout(panelInput);
panelInput.setLayout(panelInputLayout);
panelInputLayout.setHorizontalGroup(
panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelInputLayout.createSequentialGroup()
.addGap(40, 40, 40)
.addGroup(panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addGroup(panelInputLayout.createSequentialGroup()
.addGap(109, 109, 109)
.addComponent(btnTimKiem, javax.swing.GroupLayout.DEFAULT_SIZE, 104, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnNhapLai, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnThem, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnSua, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btnXoa, javax.swing.GroupLayout.DEFAULT_SIZE, 100, Short.MAX_VALUE))
.addGroup(panelInputLayout.createSequentialGroup()
.addGroup(panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lbMa)
.addComponent(txMa))
.addGap(29, 29, 29)
.addGroup(panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lbHo)
.addComponent(txHo))
.addGap(28, 28, 28)
.addGroup(panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lbTen)
.addComponent(txTen))
.addGap(33, 33, 33)
.addGroup(panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(lbMonPhuTrach)
.addGroup(panelInputLayout.createSequentialGroup()
.addComponent(cbxMonPhuTrach, javax.swing.GroupLayout.PREFERRED_SIZE, 129, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(18, 18, 18)
.addComponent(btnDocDS, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)))))
.addGap(11, 11, 11))
);
panelInputLayout.setVerticalGroup(
panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(panelInputLayout.createSequentialGroup()
.addGap(29, 29, 29)
.addGroup(panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(lbMa)
.addComponent(lbHo)
.addComponent(lbTen)
.addComponent(lbMonPhuTrach))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addGroup(panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(txMa, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txTen, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(txHo, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(cbxMonPhuTrach, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btnDocDS))
.addGap(33, 33, 33)
.addGroup(panelInputLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btnXoa)
.addComponent(btnThem)
.addComponent(btnSua)
.addComponent(btnNhapLai)
.addComponent(btnTimKiem))
.addContainerGap(29, Short.MAX_VALUE))
);
panelTable.setBackground(new java.awt.Color(255, 255, 255));
panelTable.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(102, 102, 102), 1, true));
scrollPaneDanhSachGiaoVien.setToolTipText("");
scrollPaneDanhSachGiaoVien.setFont(new java.awt.Font("Lucida Grande", 0, 24)); // NOI18N
tbDanhSachGiaoVien.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
tbDanhSachGiaoVien.setModel(new javax.swing.table.DefaultTableModel(
new Object [][] {
},
new String [] {
"STT", "Mã", "Họ", "Tên", "Môn phụ trách"
}
) {
Class[] types = new Class [] {
java.lang.Integer.class, java.lang.String.class, java.lang.String.class, java.lang.String.class, java.lang.String.class
};
public Class getColumnClass(int columnIndex) {
return types [columnIndex];
}
});
tbDanhSachGiaoVien.addMouseListener(new java.awt.event.MouseAdapter() {
public void mouseClicked(java.awt.event.MouseEvent evt) {
tbDanhSachGiaoVientbDSDSmouseClick(evt);
}
});
scrollPaneDanhSachGiaoVien.setViewportView(tbDanhSachGiaoVien);
javax.swing.GroupLayout panelTableLayout = new javax.swing.GroupLayout(panelTable);
panelTable.setLayout(panelTableLayout);
panelTableLayout.setHorizontalGroup(
panelTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(scrollPaneDanhSachGiaoVien, javax.swing.GroupLayout.Alignment.TRAILING)
);
panelTableLayout.setVerticalGroup(
panelTableLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelTableLayout.createSequentialGroup()
.addGap(0, 0, 0)
.addComponent(scrollPaneDanhSachGiaoVien, javax.swing.GroupLayout.DEFAULT_SIZE, 239, Short.MAX_VALUE)
.addGap(0, 0, 0))
);
lbSoKetQuaTimThay.setFont(new java.awt.Font("Helvetica", 0, 12)); // NOI18N
lbSoKetQuaTimThay.setText("Số kết quả tìm thấy");
javax.swing.GroupLayout functionPanelLayout = new javax.swing.GroupLayout(functionPanel);
functionPanel.setLayout(functionPanelLayout);
functionPanelLayout.setHorizontalGroup(
functionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, functionPanelLayout.createSequentialGroup()
.addGap(64, 64, 64)
.addGroup(functionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
.addComponent(panelTable, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(panelInput, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
.addGap(102, 102, 102))
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, functionPanelLayout.createSequentialGroup()
.addGap(97, 97, 97)
.addComponent(lbSoKetQuaTimThay)
.addGap(120, 656, Short.MAX_VALUE))
);
functionPanelLayout.setVerticalGroup(
functionPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, functionPanelLayout.createSequentialGroup()
.addGap(47, 47, 47)
.addComponent(panelInput, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(47, 47, 47)
.addComponent(panelTable, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGap(18, 18, 18)
.addComponent(lbSoKetQuaTimThay)
.addGap(49, 49, 49))
);
javax.swing.GroupLayout mainPanelLayout = new javax.swing.GroupLayout(mainPanel);
mainPanel.setLayout(mainPanelLayout);
mainPanelLayout.setHorizontalGroup(
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(headerPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addComponent(functionPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
mainPanelLayout.setVerticalGroup(
mainPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(mainPanelLayout.createSequentialGroup()
.addComponent(headerPanel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(0, 0, 0)
.addComponent(functionPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(mainPanel, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
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 initComponents();\n }",
"public AdjointForm() {\n initComponents();\n setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"public FormListRemarking() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n \n }",
"public FormPemilihan() {\n initComponents();\n }",
"public GUIForm() { \n initComponents();\n }",
"public FrameForm() {\n initComponents();\n }",
"public TorneoForm() {\n initComponents();\n }",
"public FormCompra() {\n initComponents();\n }",
"public muveletek() {\n initComponents();\n }",
"public Interfax_D() {\n initComponents();\n }",
"public quanlixe_form() {\n initComponents();\n }",
"public SettingsForm() {\n initComponents();\n }",
"public RegistrationForm() {\n initComponents();\n this.setLocationRelativeTo(null);\n }",
"public Soru1() {\n initComponents();\n }",
"public FMainForm() {\n initComponents();\n this.setResizable(false);\n setLocationRelativeTo(null);\n }",
"public soal2GUI() {\n initComponents();\n }",
"public EindopdrachtGUI() {\n initComponents();\n }",
"public MechanicForm() {\n initComponents();\n }",
"public AddDocumentLineForm(java.awt.Frame parent) {\n super(parent);\n initComponents();\n myInit();\n }",
"public BloodDonationGUI() {\n initComponents();\n }",
"public quotaGUI() {\n initComponents();\n }",
"public Customer_Form() {\n initComponents();\n setSize(890,740);\n \n \n }",
"public PatientUI() {\n initComponents();\n }",
"public myForm() {\n\t\t\tinitComponents();\n\t\t}",
"public Oddeven() {\n initComponents();\n }",
"public intrebarea() {\n initComponents();\n }",
"public Magasin() {\n initComponents();\n }",
"public RadioUI()\n {\n initComponents();\n }",
"public NewCustomerGUI() {\n initComponents();\n }",
"public ZobrazUdalost() {\n initComponents();\n }",
"public FormUtama() {\n initComponents();\n }",
"public p0() {\n initComponents();\n }",
"public INFORMACION() {\n initComponents();\n this.setLocationRelativeTo(null); \n }",
"public ProgramForm() {\n setLookAndFeel();\n initComponents();\n }",
"public AmountReleasedCommentsForm() {\r\n initComponents();\r\n }",
"public form2() {\n initComponents();\n }",
"public MainForm() {\n\t\tsuper(\"Hospital\", List.IMPLICIT);\n\n\t\tstartComponents();\n\t}",
"public LixeiraForm() {\n initComponents();\n setLocationRelativeTo(null);\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n setRequestFocusEnabled(false);\n setVerifyInputWhenFocusTarget(false);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 465, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 357, Short.MAX_VALUE)\n );\n }",
"public kunde() {\n initComponents();\n }",
"public MusteriEkle() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public frmMain() {\n initComponents();\n }",
"public DESHBORDPANAL() {\n initComponents();\n }",
"public frmVenda() {\n initComponents();\n }",
"public GUIForm() {\n initComponents();\n inputField.setText(NO_FILE_SELECTED);\n outputField.setText(NO_FILE_SELECTED);\n progressLabel.setBackground(INFO);\n progressLabel.setText(SELECT_FILE);\n }",
"public FrmMenu() {\n initComponents();\n }",
"public Botonera() {\n initComponents();\n }",
"public OffertoryGUI() {\n initComponents();\n setTypes();\n }",
"public JFFornecedores() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n setBackground(new java.awt.Color(255, 255, 255));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 983, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 769, Short.MAX_VALUE)\n );\n\n pack();\n }",
"public EnterDetailsGUI() {\n initComponents();\n }",
"public vpemesanan1() {\n initComponents();\n }",
"public Kost() {\n initComponents();\n }",
"public FormHorarioSSE() {\n initComponents();\n }",
"public UploadForm() {\n initComponents();\n }",
"public frmacceso() {\n initComponents();\n }",
"public HW3() {\n initComponents();\n }",
"public Managing_Staff_Main_Form() {\n initComponents();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents()\n {\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n getContentPane().setLayout(null);\n\n pack();\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setName(\"Form\"); // NOI18N\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 300, Short.MAX_VALUE)\n );\n }",
"public sinavlar2() {\n initComponents();\n }",
"public P0405() {\n initComponents();\n }",
"public IssueBookForm() {\n initComponents();\n }",
"public MiFrame2() {\n initComponents();\n }",
"public Choose1() {\n initComponents();\n }",
"public MainForm() {\n initComponents();\n\n String oldAuthor = prefs.get(\"AUTHOR\", \"\");\n if(oldAuthor != null) {\n this.authorTextField.setText(oldAuthor);\n }\n String oldBook = prefs.get(\"BOOK\", \"\");\n if(oldBook != null) {\n this.bookTextField.setText(oldBook);\n }\n String oldDisc = prefs.get(\"DISC\", \"\");\n if(oldDisc != null) {\n try {\n int oldDiscNum = Integer.parseInt(oldDisc);\n oldDiscNum++;\n this.discNumberTextField.setText(Integer.toString(oldDiscNum));\n } catch (Exception ex) {\n this.discNumberTextField.setText(oldDisc);\n }\n this.bookTextField.setText(oldBook);\n }\n\n\n }",
"public GUI_StudentInfo() {\n initComponents();\n }",
"public JFrmPrincipal() {\n initComponents();\n }",
"public Lihat_Dokter_Keseluruhan() {\n initComponents();\n }",
"public bt526() {\n initComponents();\n }",
"public Pemilihan_Dokter() {\n initComponents();\n }",
"public Ablak() {\n initComponents();\n }",
"@Override\n\tprotected void initUi() {\n\t\t\n\t}",
"@SuppressWarnings(\"unchecked\")\n\t// <editor-fold defaultstate=\"collapsed\" desc=\"Generated\n\t// Code\">//GEN-BEGIN:initComponents\n\tprivate void initComponents() {\n\n\t\tlabel1 = new java.awt.Label();\n\t\tlabel2 = new java.awt.Label();\n\t\tlabel3 = new java.awt.Label();\n\t\tlabel4 = new java.awt.Label();\n\t\tlabel5 = new java.awt.Label();\n\t\tlabel6 = new java.awt.Label();\n\t\tlabel7 = new java.awt.Label();\n\t\tlabel8 = new java.awt.Label();\n\t\tlabel9 = new java.awt.Label();\n\t\tlabel10 = new java.awt.Label();\n\t\ttextField1 = new java.awt.TextField();\n\t\ttextField2 = new java.awt.TextField();\n\t\tlabel14 = new java.awt.Label();\n\t\tlabel15 = new java.awt.Label();\n\t\tlabel16 = new java.awt.Label();\n\t\ttextField3 = new java.awt.TextField();\n\t\ttextField4 = new java.awt.TextField();\n\t\ttextField5 = new java.awt.TextField();\n\t\tlabel17 = new java.awt.Label();\n\t\tlabel18 = new java.awt.Label();\n\t\tlabel19 = new java.awt.Label();\n\t\tlabel20 = new java.awt.Label();\n\t\tlabel21 = new java.awt.Label();\n\t\tlabel22 = new java.awt.Label();\n\t\ttextField6 = new java.awt.TextField();\n\t\ttextField7 = new java.awt.TextField();\n\t\ttextField8 = new java.awt.TextField();\n\t\tlabel23 = new java.awt.Label();\n\t\ttextField9 = new java.awt.TextField();\n\t\ttextField10 = new java.awt.TextField();\n\t\ttextField11 = new java.awt.TextField();\n\t\ttextField12 = new java.awt.TextField();\n\t\tlabel24 = new java.awt.Label();\n\t\tlabel25 = new java.awt.Label();\n\t\tlabel26 = new java.awt.Label();\n\t\tlabel27 = new java.awt.Label();\n\t\tlabel28 = new java.awt.Label();\n\t\tlabel30 = new java.awt.Label();\n\t\tlabel31 = new java.awt.Label();\n\t\tlabel32 = new java.awt.Label();\n\t\tjButton1 = new javax.swing.JButton();\n\n\t\tlabel1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel1.setText(\"It seems that some of the buttons on the ATM machine are not working!\");\n\n\t\tlabel2.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel2.setText(\"Unfortunately these numbers are exactly what Professor has to use to type in his password.\");\n\n\t\tlabel3.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 18)); // NOI18N\n\t\tlabel3.setText(\n\t\t\t\t\"If you want to eat tonight, you have to help him out and construct the numbers of the password with the working buttons and math operators.\");\n\n\t\tlabel4.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tlabel4.setText(\"Denver's Password: 2792\");\n\n\t\tlabel5.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel5.setText(\"import java.util.Scanner;\\n\");\n\n\t\tlabel6.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel6.setText(\"public class ATM{\");\n\n\t\tlabel7.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel7.setText(\"public static void main(String[] args){\");\n\n\t\tlabel8.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel8.setText(\"System.out.print(\");\n\n\t\tlabel9.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel9.setText(\" -\");\n\n\t\tlabel10.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel10.setText(\");\");\n\n\t\ttextField1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\ttextField1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tlabel14.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel14.setText(\"System.out.print( (\");\n\n\t\tlabel15.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel15.setText(\"System.out.print(\");\n\n\t\tlabel16.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel16.setText(\"System.out.print( ( (\");\n\n\t\tlabel17.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel17.setText(\")\");\n\n\t\tlabel18.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel18.setText(\" +\");\n\n\t\tlabel19.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel19.setText(\");\");\n\n\t\tlabel20.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel20.setText(\" /\");\n\n\t\tlabel21.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel21.setText(\" %\");\n\n\t\tlabel22.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel22.setText(\" +\");\n\n\t\tlabel23.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel23.setText(\");\");\n\n\t\tlabel24.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel24.setText(\" +\");\n\n\t\tlabel25.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel25.setText(\" /\");\n\n\t\tlabel26.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel26.setText(\" *\");\n\n\t\tlabel27.setCursor(new java.awt.Cursor(java.awt.Cursor.DEFAULT_CURSOR));\n\t\tlabel27.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel27.setText(\")\");\n\n\t\tlabel28.setFont(new java.awt.Font(\"Dialog\", 0, 14)); // NOI18N\n\t\tlabel28.setText(\")\");\n\n\t\tlabel30.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel30.setText(\"}\");\n\n\t\tlabel31.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel31.setText(\"}\");\n\n\t\tlabel32.setFont(new java.awt.Font(\"Consolas\", 0, 14)); // NOI18N\n\t\tlabel32.setText(\");\");\n\n\t\tjButton1.setFont(new java.awt.Font(\"Segoe UI Semibold\", 0, 14)); // NOI18N\n\t\tjButton1.setText(\"Check\");\n\t\tjButton1.addActionListener(new java.awt.event.ActionListener() {\n\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent evt) {\n\t\t\t\tjButton1ActionPerformed(evt);\n\t\t\t}\n\t\t});\n\n\t\tjavax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n\t\tlayout.setHorizontalGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(28).addGroup(layout\n\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING).addComponent(getDoneButton()).addComponent(jButton1)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, 774, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t.addGap(92).addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15, GroupLayout.PREFERRED_SIZE, 145,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(2)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(37))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(174)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(7)))\n\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label23, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t20, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(20).addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(23).addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel10, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16, GroupLayout.PREFERRED_SIZE, 177,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10, GroupLayout.PREFERRED_SIZE, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED).addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addContainerGap(GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));\n\t\tlayout.setVerticalGroup(\n\t\t\t\tlayout.createParallelGroup(Alignment.LEADING).addGroup(layout.createSequentialGroup().addContainerGap()\n\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t.addComponent(label1, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t.addComponent(label2, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t.addGap(1)\n\t\t\t\t\t\t.addComponent(label3, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label4, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label5, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label6, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(label7, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup().addGroup(layout.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING).addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField1,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttextField2, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(19)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField5,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label14,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label18,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label17,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField4,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))\n\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label20, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label19, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField3, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE, GroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(78)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label27, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(76)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField11, GroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup().addGap(75)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label32,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField10,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addPreferredGap(ComponentPlacement.RELATED, 20,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tShort.MAX_VALUE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.TRAILING, false)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label15,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField8,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label21,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField7,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(27))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField9,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label22,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlayout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(3)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlabel23,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(29)))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label16,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField12,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout.createSequentialGroup()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGroup(layout\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.createParallelGroup(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tAlignment.TRAILING)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(label24,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addComponent(textField6,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE))\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.addGap(1))))))\n\t\t\t\t\t\t\t\t.addGroup(layout.createParallelGroup(Alignment.LEADING)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label25, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label28, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t\t\t\t\t.addComponent(label26, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)))\n\t\t\t\t\t\t.addGap(30)\n\t\t\t\t\t\t.addComponent(label31, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(25)\n\t\t\t\t\t\t.addComponent(label30, GroupLayout.PREFERRED_SIZE, GroupLayout.DEFAULT_SIZE,\n\t\t\t\t\t\t\t\tGroupLayout.PREFERRED_SIZE)\n\t\t\t\t\t\t.addGap(26).addComponent(jButton1).addPreferredGap(ComponentPlacement.RELATED)\n\t\t\t\t\t\t.addComponent(getDoneButton()).addContainerGap(23, Short.MAX_VALUE)));\n\t\tthis.setLayout(layout);\n\n\t\tlabel16.getAccessibleContext().setAccessibleName(\"System.out.print( ( (\");\n\t\tlabel17.getAccessibleContext().setAccessibleName(\"\");\n\t\tlabel18.getAccessibleContext().setAccessibleName(\" +\");\n\t}",
"public Pregunta23() {\n initComponents();\n }",
"public FormMenuUser() {\n super(\"Form Menu User\");\n initComponents();\n }",
"public AvtekOkno() {\n initComponents();\n }",
"public busdet() {\n initComponents();\n }",
"public ViewPrescriptionForm() {\n initComponents();\n }",
"public Ventaform() {\n initComponents();\n }",
"public Kuis2() {\n initComponents();\n }",
"public CreateAccount_GUI() {\n initComponents();\n }",
"public Carrera() {\n initComponents();\n }",
"public POS1() {\n initComponents();\n }",
"public EqGUI() {\n initComponents();\n }",
"public JFriau() {\n initComponents();\n this.setLocationRelativeTo(null);\n this.setTitle(\"BuNus - Budaya Nusantara\");\n }",
"@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n setBackground(new java.awt.Color(204, 204, 204));\n setMinimumSize(new java.awt.Dimension(1, 1));\n setPreferredSize(new java.awt.Dimension(760, 402));\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);\n this.setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 750, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGap(0, 400, Short.MAX_VALUE)\n );\n }",
"public nokno() {\n initComponents();\n }",
"public dokter() {\n initComponents();\n }",
"public ConverterGUI() {\n initComponents();\n }",
"public hitungan() {\n initComponents();\n }",
"public Modify() {\n initComponents();\n }",
"public frmAddIncidencias() {\n initComponents();\n }",
"public FP_Calculator_GUI() {\n initComponents();\n \n setVisible(true);\n }"
] | [
"0.732017",
"0.7291279",
"0.7291279",
"0.7291279",
"0.7286003",
"0.7249014",
"0.721411",
"0.720819",
"0.7196242",
"0.7190395",
"0.71849346",
"0.7159721",
"0.7148069",
"0.70934445",
"0.7079763",
"0.7056577",
"0.6987638",
"0.6978011",
"0.69549644",
"0.69530493",
"0.6945049",
"0.6942394",
"0.6935541",
"0.693223",
"0.6928088",
"0.6924428",
"0.69241494",
"0.691142",
"0.69106644",
"0.6893475",
"0.68921363",
"0.68898267",
"0.6889822",
"0.6888889",
"0.68830574",
"0.68813944",
"0.6881165",
"0.6877479",
"0.68752235",
"0.68747437",
"0.6871299",
"0.6859591",
"0.6856115",
"0.6855173",
"0.6855125",
"0.6854962",
"0.68530196",
"0.6852737",
"0.6852737",
"0.6843147",
"0.68370813",
"0.68366593",
"0.68283623",
"0.68281215",
"0.6825811",
"0.6823924",
"0.6823443",
"0.68169594",
"0.68156785",
"0.6809513",
"0.68092215",
"0.68091464",
"0.68080777",
"0.6806839",
"0.6802871",
"0.6795172",
"0.67944115",
"0.67920417",
"0.6790103",
"0.6789442",
"0.67882615",
"0.67874336",
"0.6782333",
"0.67663395",
"0.67655057",
"0.6765026",
"0.6756117",
"0.6755023",
"0.67517287",
"0.6751031",
"0.6743606",
"0.6738867",
"0.6737393",
"0.6735563",
"0.67327684",
"0.67275465",
"0.67266476",
"0.6719547",
"0.67160183",
"0.6713876",
"0.6713717",
"0.67084426",
"0.6706528",
"0.670407",
"0.67005676",
"0.670017",
"0.66990566",
"0.6697206",
"0.6694092",
"0.6691282",
"0.6689802"
] | 0.0 | -1 |
End of variables declaration//GENEND:variables | private void doc() {
if (gvBus.getDsgv()== null) {
try {
mhBus.docDSMH();
gvBus.docDSGV(mhBus.getDsmh());
} catch (Exception ex) {
Logger.getLogger(QuanLyGiaoVienGUI.class.getName()).log(Level.SEVERE, null, ex);
}
}
tbDanhSachGiaoVien.requestFocus();
showTable(gvBus.getDsgv());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void lavar() {\n\t\t// TODO Auto-generated method stub\n\t\t\n\t}",
"public void mo38117a() {\n }",
"@Override\r\n\tpublic void initVariables() {\n\t\t\r\n\t}",
"private void assignment() {\n\n\t\t\t}",
"private void kk12() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void mo21779D() {\n }",
"public final void mo51373a() {\n }",
"protected boolean func_70041_e_() { return false; }",
"public void mo4359a() {\n }",
"public void mo21782G() {\n }",
"private void m50366E() {\n }",
"public void mo12930a() {\n }",
"public void mo115190b() {\n }",
"public void method_4270() {}",
"public void mo1403c() {\n }",
"public void mo3376r() {\n }",
"public void mo3749d() {\n }",
"public void mo21793R() {\n }",
"protected boolean func_70814_o() { return true; }",
"public void mo21787L() {\n }",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo21780E() {\n }",
"public void mo21792Q() {\n }",
"public void mo21791P() {\n }",
"public void mo12628c() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public void mo97908d() {\n }",
"public void mo21878t() {\n }",
"public void mo9848a() {\n }",
"public void mo21825b() {\n }",
"public void mo23813b() {\n }",
"public void mo3370l() {\n }",
"public void mo21879u() {\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"public void mo21785J() {\n }",
"public void mo21795T() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void m23075a() {\n }",
"public void mo21789N() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"public void mo21794S() {\n }",
"public final void mo12688e_() {\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"public void mo6944a() {\n }",
"public static void listing5_14() {\n }",
"public void mo1405e() {\n }",
"public final void mo91715d() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void mo9137b() {\n }",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"public void func_70295_k_() {}",
"void mo57277b();",
"public void mo21877s() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void Tyre() {\n\t\t\r\n\t}",
"void berechneFlaeche() {\n\t}",
"public void mo115188a() {\n }",
"public void mo21880v() {\n }",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"public void mo21784I() {\n }",
"private stendhal() {\n\t}",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"public void mo56167c() {\n }",
"public void mo44053a() {\n }",
"public void mo21781F() {\n }",
"public void mo2740a() {\n }",
"public void mo21783H() {\n }",
"public void mo1531a() {\n }",
"double defendre();",
"private zzfl$zzg$zzc() {\n void var3_1;\n void var2_-1;\n void var1_-1;\n this.value = var3_1;\n }",
"public void stg() {\n\n\t}",
"void m1864a() {\r\n }",
"private void poetries() {\n\n\t}",
"public void skystonePos4() {\n }",
"public void mo2471e() {\n }",
"@Override\n\tprotected void getExras() {\n\n\t}",
"private void yy() {\n\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@AnyLogicInternalCodegenAPI\n private void setupPlainVariables_Main_xjal() {\n }",
"static void feladat4() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"public void init() { \r\n\t\t// TODO Auto-generated method\r\n\t }",
"public void furyo ()\t{\n }",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"protected void mo6255a() {\n }"
] | [
"0.6359434",
"0.6280371",
"0.61868024",
"0.6094568",
"0.60925734",
"0.6071678",
"0.6052686",
"0.60522056",
"0.6003249",
"0.59887564",
"0.59705925",
"0.59680873",
"0.5967989",
"0.5965816",
"0.5962006",
"0.5942372",
"0.5909877",
"0.5896588",
"0.5891321",
"0.5882983",
"0.58814824",
"0.5854075",
"0.5851759",
"0.58514243",
"0.58418584",
"0.58395296",
"0.5835063",
"0.582234",
"0.58090156",
"0.5802706",
"0.5793836",
"0.57862717",
"0.5784062",
"0.5783567",
"0.5782131",
"0.57758564",
"0.5762871",
"0.5759349",
"0.5745087",
"0.57427835",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.573309",
"0.57326084",
"0.57301426",
"0.57266665",
"0.57229686",
"0.57175463",
"0.5705802",
"0.5698347",
"0.5697827",
"0.569054",
"0.5689405",
"0.5686434",
"0.56738997",
"0.5662217",
"0.56531453",
"0.5645255",
"0.5644223",
"0.5642628",
"0.5642476",
"0.5640595",
"0.56317437",
"0.56294966",
"0.56289655",
"0.56220204",
"0.56180173",
"0.56134313",
"0.5611337",
"0.56112075",
"0.56058615",
"0.5604383",
"0.5602629",
"0.56002104",
"0.5591573",
"0.55856615",
"0.5576992",
"0.55707216",
"0.5569681",
"0.55570376",
"0.55531484",
"0.5551123",
"0.5550893",
"0.55482954",
"0.5547471",
"0.55469507",
"0.5545719",
"0.5543553",
"0.55424106",
"0.5542057",
"0.55410767",
"0.5537739",
"0.55269134",
"0.55236584",
"0.55170715",
"0.55035424",
"0.55020875"
] | 0.0 | -1 |
Enable 'Use CA defined CRL Distribution Point' and check that fields become disabled | @Test
public void e_crlDistributionPointsOptions() {
webDriver.findElement(By.id("cpf:cbusedefaultcrldistributionpoint")).click();
assertFalse("'CRL Distribution Point URI' did not become disabled",
webDriver.findElement(By.id("cpf:textfieldcrldisturi")).isEnabled());
assertFalse("'CRL Distribution Point URI' did not become disabled",
webDriver.findElement(By.id("cpf:textfieldcrlissuer")).isEnabled());
// Enable 'Freshest CRL' and check that new fields appeared
webDriver.findElement(By.id("cpf:cbusefreshestcrl")).click();
try {
assertEquals("'Use CA Defined Freshest CRL' was not disabled by default", "Off",
webDriver.findElement(By.id("cpf:cbusecadefinedfreshestcrl")).getAttribute("value"));
assertEquals("'Freshest CRL URI' had unexpected default value",
getPublicWebUrl() + "publicweb/webdist/certdist?cmd=deltacrl&issuer=CN=TestCA,O=AnaTom,C=SE",
webDriver.findElement(By.id("cpf:textfieldfreshestcrluri")).getAttribute("value"));
} catch (NoSuchElementException e) {
fail("Expected fields did not appear under 'X.509v3 extensions'");
}
// Enable 'Use CA Defined Freshest CRL' and 'Authority Information Access' and check that fields appear/are disabled
webDriver.findElement(By.id("cpf:cbusecadefinedfreshestcrl")).click();
webDriver.findElement(By.id("cpf:checkuseauthorityinformationaccess")).click();
try {
assertFalse("'Freshest CRL URI' did not become disabled",
webDriver.findElement(By.id("cpf:textfieldfreshestcrluri")).isEnabled());
assertEquals("'Authority Information Access' was not enabled by default", "On",
webDriver.findElement(By.id("cpf:checkuseauthorityinformationaccess")).getAttribute("value"));
assertEquals("'Use CA defined OCSP locator' was not disabled by default", "Off",
webDriver.findElement(By.id("cpf:checkusedefaultocspservicelocator")).getAttribute("value"));
assertEquals("'OCSP Service Locator URI' was not empty by default", "",
webDriver.findElement(By.id("cpf:textfieldocspservicelocatoruri")).getAttribute("value"));
assertEquals("'CA issuer URI' was not empty by default", "",
webDriver.findElement(By.id("cpf:caIssuers:textfieldcaissueruri")).getAttribute("value"));
webDriver.findElement(By.id("cpf:caIssuers:buttonaddcaissueruri"));
} catch (NoSuchElementException e) {
fail("Expected fields did not appear under 'X.509v3 extensions'");
}
// Enable 'Use CA defined OCSP locator' and 'Private Key Usage Period' and check that new fields become enabled
webDriver.findElement(By.id("cpf:checkusedefaultocspservicelocator")).click();
webDriver.findElement(By.id("cpf:cbuseprivkeyusageperiodnotbefore")).click();
WebElement startOffset = null;
WebElement periodLength = null;
try {
startOffset = webDriver.findElement(By.id("cpf:textfieldprivkeyusageperiodstartoffset"));
assertTrue("'Start offset' did not become enabled", startOffset.isEnabled());
assertEquals("'Start offset' had unexpected default value", "0d", startOffset.getAttribute("value"));
} catch (NoSuchElementException e) {
fail("Expected fields did not appear under 'X.509v3 extensions'");
}
// Set 'Start offset' and enable 'Period length'
startOffset.clear();
startOffset.sendKeys("1d");
webDriver.findElement(By.id("cpf:cbuseprivkeyusageperiodnotafter")).click();
try {
periodLength = webDriver.findElement(By.id("cpf:textfieldprivkeyusageperiodlength"));
assertTrue("'Period length' did not become enabled", periodLength.isEnabled());
assertEquals("'Period length' had unexpected default value", "2y", periodLength.getAttribute("value"));
} catch (NoSuchElementException e) {
fail("Expected fields did not appear under 'X.509v3 extensions'");
}
// Set 'Period length' and save
periodLength.clear();
periodLength.sendKeys("360d");
CertificateProfileHelper.save(webDriver, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void setEnableComponents(){\r\n awardAddDocumentForm.cmbDocumentType.setEnabled(true);\r\n awardAddDocumentForm.txtDescription.setEditable(true);\r\n awardAddDocumentForm.txtFileName.setEditable(false);\r\n awardAddDocumentForm.btnUpload.setEnabled(true);\r\n awardAddDocumentForm.btnOk.setEnabled(true);\r\n awardAddDocumentForm.btnCancel.setEnabled(true);\r\n awardAddDocumentForm.btnView.setEnabled(false);\r\n }",
"public void setPcr(boolean pcr) {\n this.pcr = pcr;\n }",
"private void checkEnabled() {\n }",
"public boolean hasCNCRNCYVRSN() {\n return fieldSetFlags()[3];\n }",
"void enableDigital();",
"boolean hasExpiredTrialLicense() {\n return false;\n }",
"public void setDSCComplianceEnabled(boolean value) {\n this.dscCompliant = value;\n }",
"protected boolean checkLicense() {\n\t\t\t\t\treturn false;\n\t\t\t\t}",
"public boolean isLicensed() {\n\t\tAdvancedConfigurationMeta acMeta = data.getAdvancedConfiguration();\n\t\tif (acMeta.getServiceType() == ServiceType.CVS) { return true; }\n\t\tif ((acMeta.getServiceType() == ServiceType.Web) && !Const.isEmpty(getCustomerID())) { return true; }\n\t\t// check product license\n\t\tif ((acMeta.getProducts() & MDPropTags.MDLICENSE_IPLocator) != 0 || (acMeta.getProducts() & MDPropTags.MDLICENSE_Community) != 0) { return true; }\n\t\treturn false;\n\t}",
"private void setClockID(boolean a) {\n//Khoa hoac mo khoa cho Cac JTextField\n this.txtExamDate.setEnabled(!a);\n }",
"private void enableFields() {\n\t\ttxtStockCenterName.setEnabled(false);\n\t\trdBtnPreferredNo.setEnabled(false);\n\t\trdBtnPreferredYes.setEnabled(false);\n\n\t\t//disable Facility Details fields\n\t\ttxtPharmacyName.setEnabled(false);\n\t\ttxtStreetAdd.setEnabled(false);\n\t\ttxtCity.setEnabled(false);\n\t\ttxtTel.setEnabled(false);\n\t\ttxtPharmacistName1.setEnabled(false);\n\t\ttxtPharmacyAssistant.setEnabled(false);\n\t\tgrpLabel.setEnabled(false);\n\n\t\tif(rdBtnAddStockCenter.getSelection()) {\n\t\t\ttxtStockCenterName.setEnabled(true);\n\t\t\tbtnSearch.setVisible(false);\n\t\t}\n\t\telse if(rdBtnUpdateStockCenter.getSelection()) {\n\t\t\ttxtStockCenterName.setEnabled(true);\n\t\t\tbtnSearch.setVisible(true);\n\t\t\tbtnSearch.setEnabled(true);\n\t\t}\n\t\telse {\n\t\t\ttxtPharmacyName.setEnabled(true);\n\t\t\ttxtStreetAdd.setEnabled(true);\n\t\t\ttxtCity.setEnabled(true);\n\t\t\ttxtTel.setEnabled(true);\n\t\t\ttxtPharmacistName1.setEnabled(true);\n\t\t\ttxtPharmacyAssistant.setEnabled(true);\n\t\t\tgrpLabel.setEnabled(true);\n\t\t\tbtnSearch.setVisible(false);\n\t\t}\n\n\t\t//}\n\t}",
"private void enableFields(boolean enability){\n txtReference.setEditable(enability);\n txtItem.setEditable(enability);\n txtDescription.setEditable(enability);\n txtBrand.setEditable(enability);\n txtModel.setEditable(enability);\n txtQuantity.setEditable(enability);\n txtUnit.setEditable(enability);\n txtProductDate.setEnabled(enability);\n txtOrigPrice.setEditable(enability);\n txtAgent.setEditable(enability);\n txtCurrency.setEditable(enability);\n txtCurrency.setEnabled(enability);\n txtContactPerson.setEnabled(enability);\n \n }",
"public boolean isAcuityEnabled()\n {\n return false;\n }",
"public boolean allParametersForAdvanceAccountingLinesSet() {\n // not checking the object code because that will need to be set no matter what - every advance accounting line will use that\n return (!StringUtils.isBlank(getParameterService().getParameterValueAsString(TravelAuthorizationDocument.class, TemConstants.TravelAuthorizationParameters.TRAVEL_ADVANCE_ACCOUNT, KFSConstants.EMPTY_STRING)) &&\n !StringUtils.isBlank(getParameterService().getParameterValueAsString(TravelAuthorizationDocument.class, TemConstants.TravelAuthorizationParameters.TRAVEL_ADVANCE_CHART, KFSConstants.EMPTY_STRING)));\n }",
"public void enable() {\n disabled = false;\n updateSign(true);\n circuit.enable();\n notifyChipEnabled();\n }",
"private void enableDisable() throws Exception\n\t{\n\t\tfor (String param : parameters.keySet())\n\t\t{\n\t\t\tif (piseMarshaller.getPrecond(param) != null)\n\t\t\t{\n\t\t\t\tElement element = parameters.get(param); \n\t\t\t\tif (processPrecond(param) == true)\n\t\t\t\t{\n\t\t\t\t\telement.enabled = true;\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\telement.enabled = false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public boolean hasCLAPPROVAL() {\n return fieldSetFlags()[5];\n }",
"public void enableBuyEntrance(){\r\n\t\tbuyEntrance = true;\r\n\t\tbuildHotel = true;\r\n\t}",
"private void setControlsEnabled(boolean value){\r\n txtRolodexId.setEditable(value);\r\n txtLastUpdate.setEditable(value);\r\n txtUpdateUser.setEditable(value);\r\n txtLastName.setEditable(value);\r\n txtFirstName.setEditable(value);\r\n txtMiddleName.setEditable(value);\r\n txtSuffix.setEditable(value);\r\n txtPrefix.setEditable(value);\r\n txtTitle.setEditable(value);\r\n txtSponsorCode.setEditable(value);\r\n txtOrganization.setEditable(value);\r\n txtAddress1.setEditable(value);\r\n txtAddress2.setEditable(value);\r\n txtAddress3.setEditable(value);\r\n txtCity.setEditable(value);\r\n txtCounty.setEditable(value);\r\n //Modified for case#3278 - State Combobox is made non editable\r\n cmbState.setEditable(false);\r\n cmbState.setEnabled(value);\r\n cmbState.setForeground(Color.black);\r\n cmbCountry.setEnabled(value);\r\n txtPostalCode.setEditable(value);\r\n txtPhone.setEditable(value);\r\n txtEMail.setEditable(value);\r\n txtFax.setEditable(value);\r\n txtComments.setEditable(value);\r\n }",
"public static void setConstructEnabled(boolean isEnabled){\n\t\taddButton.setEnabled(isEnabled);\n\t\tgenerateButton.setEnabled(isEnabled);\n\t\tclearButton.setEnabled(isEnabled);\n\t\tenableButton.setEnabled(isEnabled);\n\t\tdisableButton.setEnabled(isEnabled);\n\t\tpromoteButton.setEnabled(isEnabled);\n\t\tdemoteButton.setEnabled(isEnabled);\n\t\tradiusSpinner.setEnabled(isEnabled);\n\t\tgenerateAddressBook.setEnabled(isEnabled);\n\t}",
"public static void Ln10() {\r\n EBAS.L10_Timestamp.setText(GtDates.ldate);\r\n \r\n EBAS.L10_First_Sku.setEnabled(false);\r\n EBAS.L10_Qty_Out.setEnabled(false);\r\n EBAS.L10_First_Desc.setEnabled(false);\r\n EBAS.L10_Orig_Sku.setEnabled(false);\r\n EBAS.L10_Orig_Desc.setEnabled(false);\r\n EBAS.L10_Orig_Attr.setEnabled(false);\r\n EBAS.L10_Orig_Size.setEnabled(false);\r\n EBAS.L10_Orig_Retail.setEnabled(false);\r\n EBAS.L10_Manuf_Inspec.setEnabled(false);\r\n EBAS.L10_New_Used.setEnabled(false);\r\n EBAS.L10_Reason_DropDown.setEnabled(false);\r\n EBAS.L10_Desc_Damage.setEnabled(false);\r\n EBAS.L10_Cust_Satisf_ChkBox.setEnabled(false);\r\n EBAS.L10_Warranty_ChkBox.setEnabled(false);\r\n \r\n try {\r\n upDB();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n Logger.getLogger(EBAS.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"private void enableSet(){\n addSubmit.setDisable(true);\n removeSubmit.setDisable(true);\n setSubmit.setDisable(false);\n addCS.setDisable(true);\n removeCS.setDisable(true);\n setCS.setDisable(false);\n addIT.setDisable(true);\n removeIT.setDisable(true);\n setIT.setDisable(false);\n addECE.setDisable(true);\n removeECE.setDisable(true);\n setECE.setDisable(false);\n partTime.setDisable(true);\n fullTime.setDisable(true);\n management.setDisable(true);\n dateAddText.setDisable(true);\n dateRemoveText.setDisable(true);\n dateSetText.setDisable(false);\n nameAddText.setDisable(true);\n nameRemoveText.setDisable(true);\n nameSetText.setDisable(false);\n hourlyAddText.setDisable(true);\n annualAddText.setDisable(true);\n managerRadio.setDisable(true);\n dHeadRadio.setDisable(true);\n directorRadio.setDisable(true);\n //codeAddText.setDisable(true);\n hoursSetText.setDisable(false);\n }",
"public void enablePropertyDACConfig()\n {\n List<String> allowedValues = new LinkedList<String>();\n iPropertyDACConfig = new PropertyString(new ParameterString(\"DACConfig\", allowedValues));\n addProperty(iPropertyDACConfig);\n }",
"public void securityOn()\n {\n m_bSecurity = true;\n }",
"public void setEnabled(boolean aFlag) { _enabled = aFlag; }",
"public void setHasCorrelatedCRs(boolean value)\n\t{\n\t\thasCorrelatedCRs = value;\n\t}",
"@Override\n\tpublic void setEnabled(boolean flag) {\n\t\t\n\t}",
"public boolean verifyChangePayorDisabled() {\n\t\treturn !btnChangePayor.isEnabled();\n\t}",
"public void genRepCheck(){\r\n if (tx_cb.getValue() == null || paModules.getValue() == null || mainExciterSW.getValue() == null\r\n || filter.getValue() == null || switchPatch.getValue() == null || testLoad.getValue() == null\r\n || mainAntFeed.getValue() == null)\r\n genRep.setDisable(true);\r\n else\r\n genRep.setDisable(false);\r\n }",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating On Demand DMCA Restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-256\" })\n\tpublic void onDemanddmcaPlayerControls() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying On Demand DMCA restricted Player Controls MOBANDEVER-256\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getdmca().verifyOnDemandDMCA();\n\t\t\tgetPageFactory().getdmca().validatePlayerControls();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"boolean hasExternalAttributionCredit();",
"private void enableFieldBasedOnUpdateMethod() {\r\n if (updateMethod.getSelectedItem() == CompetitiveGroup.UpdateMethod.ALVAREZ_SQUIRE) {\r\n tfSynpaseDecayPercent.setEnabled(true);\r\n } else if (updateMethod.getSelectedItem() == CompetitiveGroup.UpdateMethod.RUMM_ZIPSER) {\r\n tfSynpaseDecayPercent.setEnabled(false);\r\n }\r\n }",
"private void lockButton(){\n\t\tconversionPdf_Txt.setEnabled(false);\n\t\tavisJury.setEnabled(false);\n\t\tstatistique.setEnabled(false);\n\t\tbData.setEnabled(false);\n\t\tbDataTraining.setEnabled(false);\n\t\tbCompare.setEnabled(false);\n\t}",
"@Override\n public void enableDisableDiscrete() {\n // empty bc mock\n }",
"void enableSecurity();",
"@org.junit.Before\n public void turnOffAllAccessDetection() {\n Settings.INSTANCE.set(Settings.SETT_MTD_ACCS, \"false\"); /* Not tested here. */\n Settings.INSTANCE.set(Settings.SETT_FLD_ACCS, \"false\"); /* Not tested here. */\n }",
"private void enableDisable() {\n fixDisplayName.setEnabled(automaticFix.isSelected());\n }",
"@Override\n\tpublic boolean isDlvPassPremiumAllowedTC() {\n\t\treturn false;\n\t}",
"private void init() {\n\t\t\n\t\tsetEnabled(true);\n\t}",
"private void jCheckBox1ActionPerformed(java.awt.event.ActionEvent evt) {\n if(price.isEnabled()){\n price.setEnabled(false);\n \n }else{\n price.setEnabled(true);\n }\n \n ;\n // if(price.enabled(true))\n // {}\n \n \n }",
"private void enableAdd(){\n addSubmit.setDisable(false);\n removeSubmit.setDisable(true);\n setSubmit.setDisable(true);\n addCS.setDisable(false);\n removeCS.setDisable(true);\n setCS.setDisable(true);\n addIT.setDisable(false);\n removeIT.setDisable(true);\n setIT.setDisable(true);\n addECE.setDisable(false);\n removeECE.setDisable(true);\n setECE.setDisable(true);\n partTime.setDisable(false);\n fullTime.setDisable(false);\n management.setDisable(false);\n dateAddText.setDisable(false);\n dateRemoveText.setDisable(true);\n dateSetText.setDisable(true);\n nameAddText.setDisable(false);\n nameRemoveText.setDisable(true);\n nameSetText.setDisable(true);\n hourlyAddText.setDisable(false);\n annualAddText.setDisable(false);\n managerRadio.setDisable(false);\n dHeadRadio.setDisable(false);\n directorRadio.setDisable(false);\n //codeAddText.setDisable(false);\n hoursSetText.setDisable(true);\n }",
"private void handleDDCTypeChange() {\n\t\tString ddc = cbDDC.getText();\n\n\t\tif (optionC[1].equals(ddc)) {\n\t\t\ttxtDDC_minPerLR.setEnabled(true);\n\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t} else {\n\t\t\ttxtDDC_minPerLR.setText(EMPTYSTRING);\n\t\t\ttxtDDC_minPerLR.setEnabled(false);\n\n\t\t\tif (optionC[0].equals(ddc)) {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(true);\n\t\t\t} else {\n\t\t\t\ttxtDDC_chargeArticle.setEnabled(false);\n\t\t\t\ttxtDDC_chargeArticle.setText(EMPTYSTRING);\n\t\t\t}\n\t\t}\n\t}",
"boolean updateEnabling();",
"public boolean needEnableExposureAdjustment() {\n if (CustomUtil.getInstance().getBoolean(CustomFields.DEF_CAMERA_ENABLE_COMPENSATION_OTHER_THAN_AUTO, true)) {\n return true;\n }\n return false;\n }",
"@Test(suiteName = \"NowPlaying\", testName = \"DMCA Restricted\", description = \"Validating DMCA restricted\", enabled = true, groups = {\n\t\t\t\"MOBANDEVER-220\" })\n\tpublic void dmcaRestrictedChannelNumber() {\n\t\tCommon common = new Common(driver);\n\t\tCommon.log(\"verifying DMCA restricted Channel Number MOBANDEVER-220\");\n\t\ttry {\n\t\t\tgetPageFactory().getEvehome().clickonMusic();\n\t\t\tcommon.scrollUntilTextExists(\"Dance/Electronic\");\n\t\t\tgetPageFactory().getEvehome().clickMucisSubRock();\n\t\t\tgetPageFactory().getEvehome().popChannel1();\n\t\t\tgetPageFactory().getCategory().nplChnumber();\n\t\t\tgetPageFactory().getEvehome().clickminimize();\n\t\t} catch (AndriodException ex) {\n\t\t\tCommon.errorlog(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t\tAssert.fail(\"Exception occured in : \" + this.getClass().getSimpleName() + \" : \" + ex.getMessage());\n\t\t}\n\t}",
"public static void Ln4() {\r\n EBAS.L4_Timestamp.setText(GtDates.ldate);\r\n \r\n EBAS.L4_First_Sku.setEnabled(false);\r\n EBAS.L4_Qty_Out.setEnabled(false);\r\n EBAS.L4_First_Desc.setEnabled(false);\r\n EBAS.L4_Orig_Sku.setEnabled(false);\r\n EBAS.L4_Orig_Desc.setEnabled(false);\r\n EBAS.L4_Orig_Attr.setEnabled(false);\r\n EBAS.L4_Orig_Size.setEnabled(false);\r\n EBAS.L4_Orig_Retail.setEnabled(false);\r\n EBAS.L4_Manuf_Inspec.setEnabled(false);\r\n EBAS.L4_New_Used.setEnabled(false);\r\n EBAS.L4_Reason_DropDown.setEnabled(false);\r\n EBAS.L4_Desc_Damage.setEnabled(false);\r\n EBAS.L4_Cust_Satisf_ChkBox.setEnabled(false);\r\n EBAS.L4_Warranty_ChkBox.setEnabled(false);\r\n \r\n try {\r\n upDB();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n Logger.getLogger(EBAS.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"void setManualCheck (boolean value);",
"public void disable() {\n disabled = true;\n circuit.disable();\n updateSign(true);\n notifyChipDisabled();\n }",
"private void setClock(boolean a) {\n this.txtExamDate.setEnabled(!a);\n this.txtCourseName.setEnabled(!a);\n }",
"public void setupInitEnable(){\n fwdButton.setEnabled(false);\n revButton.setEnabled(false);\n leftButton.setEnabled(false);\n rightButton.setEnabled(false);\n this.powerIcon.setEnabled(false);\n lServoWarn.setEnabled(false);\n rServoWarn.setEnabled(false); \n slideAuto.setEnabled(true); \n }",
"public void setRequireCreditCardVerification(boolean pRequireCreditCardVerification) {\n mRequireCreditCardVerification = pRequireCreditCardVerification;\n }",
"public void setStoreLeaseEligibilityInd(boolean value) {\n this.storeLeaseEligibilityInd = value;\n }",
"public boolean isEnabled() {\n\t\tboolean isLicensed = isLicensed();\n\t\t// Enabled only if there is an input email\n\t\tboolean noInputFields = Const.isEmpty(inIPAddress);\n\t\treturn isLicensed && !noInputFields;\n\t}",
"public void setEnabled(boolean bEnabled) {\n txtReferredBy.setEnabled(false);\n cbxProfession.setEnabled(bEnabled);\n cbxEducation.setEnabled(bEnabled);\n txtNotes1.setEnabled(bEnabled);\n txtNotes2.setEnabled(bEnabled);\n txtPartFamName.setEnabled(bEnabled);\n txtPartName.setEnabled(bEnabled);\n txtBirthPlc.setEnabled(bEnabled);\n cbxSpcEvt.setEnabled(bEnabled);\n txtSpclDate.setEnabled(bEnabled);\n txtChildNames.setEnabled(bEnabled);\n txtNumChildren.setEnabled(bEnabled);\n btnLookup.setEnabled(bEnabled);\n }",
"public void setDecalsEnabled(final boolean dEnabled) { decalsEnabled = dEnabled; }",
"static ValidationResult verifyCertificateCRLs(final X509Certificate cert,\r\n\t\t\t final PublicKey vaPublicKey,\r\n\t\t\t final List<String> overridingDistributionPoints) {\r\n\t\tif (cert == null) {\r\n\t\t\treturn ValidationResult.CORRUPT;\r\n\t\t}\r\n\r\n\t\tfinal List<String> crlDistPoints;\r\n\t\ttry {\r\n\t\t\tcrlDistPoints = overridingDistributionPoints == null || overridingDistributionPoints.isEmpty() ?\r\n\t\t\t\t\t\t\t\tgetCrlDistributionPoints(cert) :\r\n\t\t\t\t\t\t\t\t\toverridingDistributionPoints;\r\n\t\t}\r\n\t\tcatch (final IOException e) {\r\n\t\t\tLOGGER.severe(\"Error obteniendo los puntos de distribucion de CRL: \" + e); //$NON-NLS-1$\r\n\t\t\treturn ValidationResult.SERVER_ERROR;\r\n\t\t}\r\n\r\n\t\tLOGGER.info(\r\n\t\t\t\"El certificado con serie '\" + cert.getSerialNumber() + \"' tiene asociadas las siguientes CRL: \" + crlDistPoints //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t);\r\n\r\n\t\tfinal CertificateFactory cf;\r\n\t\ttry {\r\n\t\t\tcf = CertificateFactory.getInstance(\"X.509\"); //$NON-NLS-1$\r\n\t\t}\r\n\t\tcatch (final CertificateException e1) {\r\n\t\t\tLOGGER.severe(\"Error instanciando la factoria de certificados: \" + e1); //$NON-NLS-1$\r\n\t\t\treturn ValidationResult.SERVER_ERROR;\r\n\t\t}\r\n\r\n\t\tboolean checked = false;\r\n\t\tfor (final String crlDP : crlDistPoints) {\r\n\r\n\t\t\t// Descargamos\r\n\t\t\tfinal byte[] crlBytes;\r\n\t\t\ttry {\r\n\t\t\t\tcrlBytes = downloadCRL(crlDP);\r\n\t\t\t}\r\n\t\t\tcatch (final Exception e1) {\r\n\t\t\t\tLOGGER.severe(\"No se ha podido descargar la CRL (\" + crlDP + \"), se continuara con el siguiente punto de distribucion: \" + e1); //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\t\t\tcontinue;\r\n\t\t\t}\r\n\r\n\t\t\tfinal X509CRL crl;\r\n\t\t\ttry {\r\n\t\t\t\tcrl = (X509CRL)cf.generateCRL(new ByteArrayInputStream(crlBytes));\r\n\t\t\t}\r\n\t\t\tcatch (final Exception e) {\r\n\t\t\t\tLOGGER.severe(\"Error analizando la lista de revocacion: \" + e); //$NON-NLS-1$\r\n\t\t\t\treturn ValidationResult.SERVER_ERROR;\r\n\t\t\t}\r\n\t\t\t// Comprobamos la firma de la CRL\r\n\t\t\ttry {\r\n\t\t\t\tcrl.verify(vaPublicKey);\r\n\t\t\t}\r\n\t\t\tcatch (final Exception e) {\r\n\t\t\t\tLOGGER.severe(\"No se ha podido comprobar la firma de la CRL: \" + e); //$NON-NLS-1$\r\n\t\t\t\treturn ValidationResult.SERVER_ERROR;\r\n\t\t\t}\r\n\t\t\tif (crl.isRevoked(cert)) {\r\n\t\t\t\treturn ValidationResult.REVOKED;\r\n\t\t\t}\r\n\r\n\t\t\tchecked = true;\r\n\t\t}\r\n\r\n\t\tif (checked) {\r\n\t\t\treturn ValidationResult.VALID;\r\n\t\t}\r\n\t\treturn ValidationResult.UNKNOWN;\r\n\t}",
"public String getAllowAccout() {\n return allowAccout;\n }",
"public void setAgregaCC(boolean agregaCC)\r\n/* 369: */ {\r\n/* 370:426 */ this.agregaCC = agregaCC;\r\n/* 371: */ }",
"@Override\r\n\tpublic void setDisabled(boolean arg0) throws NotesApiException {\n\r\n\t}",
"@FXML\n void disableAnnualCode() {\n annualAddText.setDisable(true);\n managerRadio.setDisable(true);\n dHeadRadio.setDisable(true);\n directorRadio.setDisable(true);\n hourlyAddText.setDisable(false);\n }",
"private void enableControls(boolean b) {\n\n\t}",
"@Override\n\tpublic final void checkLicense() {\n\t}",
"public void onEnable() {\n PluginDescriptionFile pdfFile = this.getDescription();\n System.out.println( pdfFile.getName() + \" version \" + pdfFile.getVersion() + \" is enabled!\" );\n }",
"private void initAccess() {\n\t\tif (!Users.doesCurrentUserHaveAccess(Users.ACCESS_CLASS_BEGINNING_DATA_ENTRY) &&\n\t\t\t\t!this.getParentEditor().getNewRecord() &&\n\t\t\t\t!referenceNewPatron) {\n\t\t\treadOnly = true;\n\t\t\tsetFormToReadOnly();\n\t\t\t//research purpose\n\t\t\taddResearchPurpose.setEnabled(false);\n\t\t\tremoveResearchPurpose.setEnabled(false);\n\t\t\t//subject buttons\n\t\t\taddSubject.setEnabled(false);\n\t\t\tremoveSubject.setEnabled(false);\n\t\t\t//name buttons\n\t\t\taddName.setEnabled(false);\n\t\t\tremoveName.setEnabled(false);\n\t\t\teditNameRelationshipButton.setEnabled(false);\n // resource button\n addResourceButton.setEnabled(false);\n removeResourceButton.setEnabled(false);\n\t\t}\n\t}",
"public void enable() {\r\n m_enabled = true;\r\n }",
"public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}",
"@Override\n\tpublic void disabledInit() {\n\t\tRobot.driveSubsystem.setCoastMode();\n\t}",
"public void setIssrReq(boolean value) {\n this.issrReq = value;\n }",
"public boolean setEnabled(boolean enable);",
"c(boolean z) {\n super(1);\n this.$enable = z;\n }",
"@Override\n public void disabledInit() {\n //Diagnostics.writeString(\"State\", \"DISABLED\");\n }",
"public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}",
"public void disabledInit()\n\t{\n\t\t\n\t}",
"public static void Ln1() {\r\n EBAS.L1_Timestamp.setText(GtDates.ldate);\r\n\r\n EBAS.L1_First_Sku.setEnabled(false);\r\n EBAS.L1_Qty_Out.setEnabled(false);\r\n EBAS.L1_First_Desc.setEnabled(false);\r\n EBAS.L1_Orig_Sku.setEnabled(false);\r\n EBAS.L1_Orig_Desc.setEnabled(false);\r\n EBAS.L1_Orig_Attr.setEnabled(false);\r\n EBAS.L1_Orig_Size.setEnabled(false);\r\n EBAS.L1_Orig_Retail.setEnabled(false);\r\n EBAS.L1_Manuf_Inspec.setEnabled(false);\r\n EBAS.L1_New_Used.setEnabled(false);\r\n EBAS.L1_Reason_DropDown.setEnabled(false);\r\n EBAS.L1_Desc_Damage.setEnabled(false);\r\n EBAS.L1_Cust_Satisf_ChkBox.setEnabled(false);\r\n EBAS.L1_Warranty_ChkBox.setEnabled(false);\r\n \r\n try {\r\n upDB();\r\n } catch (ClassNotFoundException | SQLException ex) {\r\n Logger.getLogger(EBAS.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }",
"@Override\n\tpublic void initUpdate() {\n\t\tgetField(\"comACtype\").setUpdatable(false);\n\t\t\n\t\tGrant g = getGrant();\n\n\t\tif (g.hasResponsibility(\"COM_API\")) {\n\t\t\tList<ObjectField> fields = getFields();\n\t\t\tfor (ObjectField field : fields) {\n\t\t\t\tfield.setUpdatable(ObjectField.UPD_ALWAYS);\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"public void setAllowRecalcs(boolean b) {\n \t\tallowRecalcs = b;\n \t}",
"boolean hasAllowedCredit();",
"private void disableIfDissatisfied() {\n \t\tif ( !this.satisfiesPolygon() ) {\n \t\t\tthis.area.setEnabled( false );\n \t\t}\n \t}",
"public void setEnabled(boolean enabled) {\r\n\t}",
"protected void checkNeedAppearences(PreflightContext ctx, PDAcroForm acroForm)\n {\n if (acroForm.getCOSObject().getBoolean(ACROFORM_DICTIONARY_KEY_NEED_APPEARANCES, false))\n {\n addValidationError(ctx, new ValidationError(ERROR_SYNTAX_DICT_INVALID,\n \"NeedAppearance is present with the value \\\"true\\\"\"));\n }\n }",
"public void setRequiresTaxCertificate (boolean RequiresTaxCertificate)\n{\nset_Value (COLUMNNAME_RequiresTaxCertificate, Boolean.valueOf(RequiresTaxCertificate));\n}",
"protected boolean checkAAField()\n {\n if (this.pdWidget.getActions() != null)\n {\n ctx.addValidationError(new ValidationError(ERROR_ANNOT_FORBIDDEN_AA));\n return false;\n }\n return true;\n }",
"public void setEnabled(Boolean value) { this.myEnabled = value.booleanValue(); }",
"public void setEnabled(boolean enabled) {\n/* 960 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public void setNeedClientAuth(boolean flag)\n {\n needClientAuth = flag;\n }",
"@Override\n\tpublic boolean checkCNP() {\n\t\treturn false;\n\t}",
"@Test\n public void mustNotEnableMoreThanOnce() throws RemoteException {\n mHbmController.enable(mOnEnabled);\n\n // Should set the appropriate refresh rate for UDFPS and notify the caller.\n verify(mDisplayCallback).onHbmEnabled(eq(DISPLAY_ID));\n verify(mOnEnabled).run();\n\n // Second request to enable the UDFPS mode, while it's still enabled.\n mHbmController.enable(mOnEnabled);\n\n // Should ignore the second request.\n verifyNoMoreInteractions(mDisplayCallback);\n verifyNoMoreInteractions(mOnEnabled);\n }",
"@Override\r\n\tpublic void setDontSendLocalSecurityUpdates(boolean arg0)\r\n\t\t\tthrows NotesApiException {\n\r\n\t}",
"public boolean verifyPaymentPlanDisabled() {\n\t\treturn !divPaymentPlan.isEnabled();\n\t}",
"private void actionChangedEstimatorSettingsManual ()\r\n\t{\r\n\t\tmainFormLink.getComponentPanelLeft().getCombobobxEstimatorBacteriaType().setEnabled(true);\r\n\t\tmainFormLink.getComponentPanelLeft().getComboboxEstimatorDrugType().setEnabled(true);\r\n\t}",
"default T setCalendarAccessAuthorized(boolean value) {\n return amend(CALENDAR_ACCESS_AUTHORIZED_OPTION, value);\n }",
"private void enableFields() {\n\t\t\t\t\t\tholderMain.editTextParametername.setEnabled(true);\n\t\t\t\t\t\tholderMain.editTextParameterValue.setEnabled(true);\n\n\t\t\t\t\t}",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"void setEnabled(boolean enabled);",
"protected void initialize()\n\t{\n\t\tenable = SmartDashboard.getBoolean(RobotMap.EnableRespoolWinch);\n\t}",
"public final boolean aCL() {\n return false;\n }",
"final void habilitarcampos(boolean valor){\n TXT_CodCliente.setEnabled(valor);\n TXT_Aparelho.setEnabled(valor);\n TXT_Valor.setEnabled(valor);\n TXT_Informacao.setEnabled(valor); \n TXT_CodServico.setEnabled(valor); \n TXT_Clientes.setEnabled(valor); \n TXT_Serial.setEnabled(valor);\n TXT_Data.setEnabled(valor);\n}",
"public void setCriticalPath(){\n this.criticalPath = true;\n }"
] | [
"0.56208515",
"0.5607423",
"0.5601226",
"0.5571094",
"0.5488321",
"0.5454638",
"0.5440493",
"0.5362705",
"0.5328149",
"0.53260434",
"0.5324991",
"0.5321676",
"0.530301",
"0.52860606",
"0.52794766",
"0.52780026",
"0.5267699",
"0.5251991",
"0.5244967",
"0.5241449",
"0.52291465",
"0.5226148",
"0.5223934",
"0.52023566",
"0.5200525",
"0.5197601",
"0.51840526",
"0.5168657",
"0.5156175",
"0.5150013",
"0.511485",
"0.5092293",
"0.5086974",
"0.5066598",
"0.5064007",
"0.50574905",
"0.5051535",
"0.50508785",
"0.50491786",
"0.5046764",
"0.50432605",
"0.50203633",
"0.5019028",
"0.5007535",
"0.49861085",
"0.49832684",
"0.4981957",
"0.4973488",
"0.49690044",
"0.49673697",
"0.4959036",
"0.49578375",
"0.49568975",
"0.49501905",
"0.49340928",
"0.4932551",
"0.4925836",
"0.49166656",
"0.49165145",
"0.49159157",
"0.49144834",
"0.49112353",
"0.4911173",
"0.48924488",
"0.48921952",
"0.48811507",
"0.48807612",
"0.487328",
"0.48730025",
"0.48647043",
"0.4864233",
"0.4859865",
"0.4853235",
"0.48502052",
"0.48481253",
"0.48443612",
"0.48406005",
"0.48381674",
"0.48342296",
"0.48294485",
"0.48287842",
"0.48205304",
"0.48094872",
"0.48072624",
"0.47979817",
"0.4791481",
"0.47863835",
"0.4784449",
"0.47829324",
"0.47809353",
"0.47781348",
"0.47722137",
"0.4770745",
"0.4770745",
"0.4770745",
"0.4770745",
"0.47676733",
"0.47640097",
"0.4759561",
"0.4756271"
] | 0.6965929 | 0 |
Click boxes and fill text fields | @Test
public void h_qcStatementsEdit() {
webDriver.findElement(By.id("cpf:checkpkixqcsyntaxv2")).click();
webDriver.findElement(By.id("cpf:textfieldqcsemanticsid")).sendKeys("text");
webDriver.findElement(By.id("cpf:textfieldqcstatementraname")).sendKeys("text");
webDriver.findElement(By.id("cpf:checkqcetsiqcompliance")).click();
webDriver.findElement(By.id("cpf:checkqcetsisignaturedevice")).click();
webDriver.findElement(By.id("cpf:checkqcetsivaluelimit")).click();
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimitcur")).clear();
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimitcur")).sendKeys("text");
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimit")).clear();
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimit")).sendKeys("text");
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimitexp")).clear();
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimitexp")).sendKeys("text");
webDriver.findElement(By.id("cpf:checkqcetsiretentionperiod")).click();
// Check that two errors appear
assertEquals("Expected 2 error messages", 2,
webDriver.findElements(By.xpath("//td[contains(text(), 'Only decimal numbers are allowed in ETSI Value Limit Amount and Exponent fields.')]")).size());
// Clear invalid fields and keep doing clicky stuff
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimitcur")).clear();
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimit")).clear();
webDriver.findElement(By.id("cpf:textfieldqcetsivaluelimitexp")).clear();
webDriver.findElement(By.id("cpf:checkqcetsiretentionperiod")).click();
webDriver.findElement(By.id("cpf:checkqccustomstring")).click();
webDriver.findElement(By.id("cpf:textfieldqccustomstringtext")).sendKeys("text");
CertificateProfileHelper.save(webDriver, true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"protected void alusta() {\n \n panelTapahtuma.setFitToHeight(true);\n \n chooserTapahtumat.clear();\n chooserTapahtumat.addSelectionListener(e -> naytaTapahtuma());\n edits = TapahtumaController.luoKentat(gridTapahtuma);\n for (TextField edit: edits) {\n if (edit != null) {\n edit.setEditable(false);\n edit.setOnMouseClicked(e -> { if (e.getClickCount() > 1 ) muokkaa(getFieldId(e.getSource(),0)); } );\n edit.focusedProperty().addListener((a, o, n) -> kentta = getFieldId(edit, kentta));\n }\n }\n }",
"void fillInputBox() {\n\t\tBox inputs = Box.createVerticalBox();\n\n\t\tfor (int i = 0; i < overviewRule.listOfParametersNeeded.size(); i++) {\n\t\t\tJLabel input = new JLabel(overviewRule.listOfParametersNeeded.get(i));\n\t\t\tinputs.add(input);\n\t\t}\n\n\t\tinputBox.add(inputLabel);\n\n\t\tinputBox.add(inputs);\n\t}",
"public static void formfill() throws InterruptedException, MalformedURLException, ParseException {\n\t\t// get all formfields elements xpath \n\t\t\n\t\tList<MobileElement> formFields1 = AndroidLocators.findElements_With_Xpath(\n\t\t\t\t\"//*[@resource-id='in.spoors.effortplus:id/formLinearLayout']/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\");\n\t\t\n\t\t//get count of list\n\t\tint countOfFields = formFields1.size();\n\t\t\n\t\t//removing elements from list\n\t\tformFields1.clear();\n\n\t\t// get last element text\n\t\tString lastTxtElement = null;\n\t\tMobileActionGesture.flingVerticalToBottom_Android();\n\t\t\n\t\t//add elements to list\n\t\tformFields1.addAll(AndroidLocators.findElements_With_Xpath(\n\t\t\t\t\"//*[@resource-id='in.spoors.effortplus:id/formLinearLayout']/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\"));\n\t\t\n\t\t//get last element from list\n\t\tlastTxtElement = formFields1.get(formFields1.size() - 1).getText().replaceAll(\"[!@#$%&*(),.?\\\":{}|<>]\", \"\");\n\t\tSystem.out.println(\"===== Get the last element text ===== : \" + lastTxtElement);\n\t \n\t\t//removing elements from list\n\t\tformFields1.clear();\n\t\tMobileActionGesture.flingToBegining_Android();\n\n\t\t// add the elements to list present in first screen\n\t\tformFields1.addAll(AndroidLocators.findElements_With_Xpath(\n\t\t\t\t\"//*[@resource-id='in.spoors.effortplus:id/formLinearLayout']/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\"));\n\t\t//get count\n\t\tcountOfFields = formFields1.size();\n\t\tSystem.out.println(\"----- Before swiping, fields count is ----- : \" + countOfFields);\n\t\t\n\t\t// scroll and add elements to list until the lastelement\n\t\twhile (!formFields1.isEmpty()) {\n\t\t\tboolean flag = false;\n\t\t\tMobileActionGesture.verticalSwipeByPercentages(0.8, 0.2, 0.5);\n\t\t\tformFields1.addAll(AndroidLocators.findElements_With_Xpath(\n\t\t\t\t\t\"//*[@resource-id='in.spoors.effortplus:id/formLinearLayout']/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.LinearLayout/android.widget.TextView\"));\n\t\t\t\n\t\t\t// get count\n\t\t\tcountOfFields = formFields1.size();\n\t\t\tSystem.out.println(\"***** After swiping, fields count ***** : \" + countOfFields);\n\t\t\t\n\t\t\t// iterate and break the loop when last element found\n\t\t\tfor (int j = 0; j < countOfFields; j++) {\n\t\t\t\t// printing the elements in the list\n\t\t\t\tSystem.out.println(\"===== Form fields text ===== : \" + formFields1.get(j).getText());\n\t\t\t\tif (formFields1.get(j).getText().replaceAll(\"[!@#$%&*(),.?\\\":{}|<>]\", \"\").equals(lastTxtElement)) {\n\t\t\t\t\tSystem.out\n\t\t\t\t\t\t\t.println(\"----- Form fields text inside elements ----- : \" + formFields1.get(j).getText());\n\t\t\t\t\tflag = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (flag == true)\n\t\t\t\tbreak;\n\t\t}\n\t\tMobileActionGesture.flingToBegining_Android();\n\t\t// insert form data\n\t\tform_data_insertion(formFields1, countOfFields);\n\t}",
"public void limparCampos() {\n\t\tcodigoField.setText(\"\");\n\t\tdescricaoField.setText(\"\");\n\t\tcodigoField.setEditable(true);\n\t\tBorder border = BorderFactory.createLineBorder(Color.RED);\n\t\tcodigoField.setBorder(border);\n\t\tcodigoField.requestFocus();\n\t\tBorder border1 = BorderFactory.createLineBorder(Color.BLACK);\n\t\tdescricaoField.setBorder(border1);\n\t\t\n\t\t\n\t}",
"public void textBoxAction( TextBoxWidgetExt tbwe ){}",
"@Test\n\t @WebTest\n\t public void DemoTest1() throws InterruptedException {\n\t Grid.driver().get(\"http://www.google.com/\");\n\t \n\t TextField field = new TextField(\"id=lst-ib\");\n\n\t //Thread will wait until TextFiled element present in the browser\n\t WebDriverWaitUtils.waitUntilElementIsPresent(field.getLocator());\n\n\t //Search for the string 'SeLion' in the text box\n\t field.type(\"Selenium\\n\");\n\t }",
"private void setUpClickListerns ()\n\t{\n\t\tLinearLayout temp_layout ;\n\t\tButton temp_button ;\n\t\tfor (int i = 0 ; i<numPad.getChildCount() ; i++)\n\t\t{\n\t\t\ttemp_layout = (LinearLayout) numPad.getChildAt(i);\n\t\t\tfor (int j = 0;j< temp_layout.getChildCount() ; j++)\n\t\t\t{\n\t\t\t\ttemp_button = (Button) temp_layout.getChildAt(j);\n\t\t\t\ttemp_button.setOnClickListener(this);\n\t\t\t}\n\t\t}\n\t\t\n\t\tchangePass.setOnClickListener(this);\n\t\tclear.setOnClickListener(this);\n\t\tpassField.setFocusable(false);\n\t}",
"@Override //the numbers should only be set when the text field is focused\n public void handle(ActionEvent event) {\n String extractfrombutton = \"7\";\n if (inidep1.isFocused()) {\n inidep1.setText(inidep1.getText()+ extractfrombutton);\n }\n else if (intrate1.isFocused()) {\n intrate1.setText(intrate1.getText() + extractfrombutton);\n }\n else if (time1.isFocused()) {\n time1.setText(time1.getText() + extractfrombutton);\n }\n else if (futval1.isFocused()) {\n futval1.setText(futval1.getText() + extractfrombutton);\n }\n else if (inidep2.isFocused()) {\n inidep2.setText(inidep2.getText() + extractfrombutton);\n }\n else if (intrate2.isFocused()) {\n intrate2.setText(intrate2.getText() + extractfrombutton);\n }\n else if (time2.isFocused()) {\n time2.setText(time2.getText() + extractfrombutton);\n }\n else if (moncon.isFocused()) {\n moncon.setText(moncon.getText() + extractfrombutton);\n }\n else if (futval2.isFocused()) {\n futval2.setText(futval2.getText() + extractfrombutton);\n }\n else if (loanamt.isFocused()) {\n loanamt.setText(loanamt.getText() + extractfrombutton);\n }\n else if (intrate3.isFocused()) {\n intrate3.setText(intrate3.getText() + extractfrombutton);\n }\n else if (time3.isFocused()) {\n time3.setText(time3.getText() + extractfrombutton);\n }\n else if (monpay.isFocused()) {\n monpay.setText(monpay.getText() + extractfrombutton);\n }\n else if (noofpay.isFocused()) {\n noofpay.setText(noofpay.getText() + extractfrombutton);\n }\n else if (assetprice.isFocused()) {\n assetprice.setText(assetprice.getText() + extractfrombutton);\n }\n else if (loanterm.isFocused()) {\n loanterm.setText(loanterm.getText() + extractfrombutton);\n }\n else if (intrate4.isFocused()) {\n intrate4.setText(intrate4.getText() + extractfrombutton);\n }\n else if (monpay2.isFocused()) {\n monpay2.setText(monpay2.getText() + extractfrombutton);\n }\n }",
"public void setupTextFields(View v) {\n other = (EditText) v.findViewById(R.id.eText_Notes);\n totalTotes = (EditText) v.findViewById(R.id.eText_NumStacked);\n\n other.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setENOTES_COLUMN(other.getText().toString());\n }\n });\n\n totalTotes.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n ((ScoutFormActivity) getActivity()).getScoutForm().setEBONUSTOTAL_COLUMN(totalTotes.getText().toString());\n }\n });\n }",
"private void setupEditTexts() {\n EditText paino = findViewById(R.id.etWeight);\n EditText alaPaine = findViewById(R.id.etLowerBP);\n EditText ylaPaine = findViewById(R.id.etUpperBP);\n\n //Set the input filters\n paino.setFilters(new InputFilter[] { new InputFilterMinMax(0f, 999f)});\n alaPaine.setFilters(new InputFilter[] { new InputFilterMinMax(1, 999)});\n ylaPaine.setFilters(new InputFilter[] { new InputFilterMinMax(1, 999)});\n\n //Set listeners for the edit texts on when the user clicks something else on the screen while typing\n //When clicked outside, the keyboard closes\n paino.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n alaPaine.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n ylaPaine.setOnFocusChangeListener(new View.OnFocusChangeListener() {\n @Override\n public void onFocusChange(View v, boolean hasFocus) {\n MainActivity.hideKeyboard(getApplicationContext(), v);\n }\n });\n }",
"private void limpiarCampos(){\n\ntxtId.setText(\"\");\ntxtCosto.setText(\"\");\ntxtDestino.setText(\"\");\ntxtKilom.setText(\"\");\ntxtMatricula.setText(\"\");\n\n\n\n}",
"@Override\n public void handle(ActionEvent t) {\n iniciarTextFields();\n iniciarCalculos();\n lambda1.setText(\"\");\n miu1.setText(\"\");\n lambda1.setEditable(true);\n miu1.setEditable(true);\n }",
"private void editableEditTexts() {\n\t\tEditText etTitle = (EditText) findViewById(R.id.etRecipeTitle);\n\t\tEditText etDescription = (EditText) findViewById(R.id.etRecipeDescription);\n\t\tEditText etDirections = (EditText) findViewById(R.id.etDirectionsList);\n\n\t\tetTitle.setKeyListener(titleListener);\n\t\tetDescription.setKeyListener(descriptionListener);\n\t\tetDirections.setKeyListener(directionsListener);\n\n\t\tsetListViewOnClickListener();\n\n\t}",
"public void InsertText(String txt){\n driver.switchTo().frame(driver.findElement(IFRAMEID));\n WebElement inputBox = find(BOXID);\n inputBox.clear();\n inputBox.sendKeys(txt);\n\n }",
"private void blank() {\r\n txt_name.requestFocus();\r\n txt_id.setText(null);\r\n txt_name.setText(null);\r\n txt_bagian.setText(null);\r\n txt_telp.setText(null);\r\n txt_address.setText(null);\r\n\r\n }",
"public void clickButton()\n {\n fieldChangeNotify( 0 );\n }",
"public void saveTextBoxs(){\n dni[indice] = Long.parseLong(txtDni.getText());\n nombre[indice] = txtNombre.getText();\n apellido[indice] = txtApellido.getText();\n direccion[indice] = txtDireccion.getText();\n telefono[indice] = txtTelefono.getText();\n fNacimiento[indice] = txtFechaNacimiento.getText();\n loadTextBoxs();\n }",
"private void creatingElements() {\n\t\ttf1 = new JTextField(20);\n\t\ttf2 = new JTextField(20);\n\t\ttf3 = new JTextField(20);\n\t\tJButton btn = new JButton(\"Add\");\n\t\tbtn.addActionListener(control);\n\t\tbtn.setActionCommand(\"add\");\n\t\t\n\t\tJPanel panel = new JPanel();\n\t\tpanel.add(tf1);\n\t\tpanel.add(tf2);\n\t\tpanel.add(btn);\n\t\tpanel.add(tf3);\n\t\t\n\t\tthis.add(panel);\n\t\t\n\t\tthis.validate();\n\t\tthis.repaint();\t\t\n\t\t\n\t}",
"public void limpaTextFields() {\n tfMatricula.setText(\"\");\n tfNome.setText(\"\");\n tfDataNascimento.setText(\"\");\n tfTelefone.setText(\"\");\n tfSalario.setText(\"\");\n }",
"public void mo3285a() {\n if (StringUtils.m10803a(this.f7348a.getText().toString())) {\n this.f7348a.requestFocus();\n } else if (StringUtils.m10803a(this.f7349b.getText().toString())) {\n this.f7349b.requestFocus();\n }\n this.f7348a.requestFocus();\n }",
"public void loadTextBoxs(){\n txtIndice.setText(String.valueOf(indice));\n txtDni.setText(String.valueOf(dni[indice]));\n txtNombre.setText(nombre[indice]);\n txtApellido.setText(apellido[indice]);\n txtDireccion.setText(direccion[indice]);\n txtTelefono.setText(telefono[indice]);\n txtFechaNacimiento.setText(fNacimiento[indice]);\n }",
"public static void checkRepeatablefields() {\n\t\ttry {\n\t\t\tif (AndroidLocators.xpath(\"//*[@class='android.widget.LinearLayout']/android.widget.Button[@text='ADD']\")\n\t\t\t\t\t.isDisplayed()) {\n\t\t\t\tAndroidLocators.clickElementusingXPath(\"//*[@text='ADD']\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\" ---- Section fields form not found ---- \");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(e);\n\t\t}\n\t}",
"private void setupTextField() {\n getNodes();\n List<String> nodeLongNames = new LinkedList<String>(nodeIDs.keySet());\n TextFields.bindAutoCompletion(nodeSelectTextField, nodeLongNames.toArray());\n\n nodeSelectTextField.setOnAction(param -> {\n if(!new LinkedList<String>(nodeIDs.keySet()).contains(nodeSelectTextField.getText())) {\n nodeSelectTextField.setText(\"\");\n return;\n }\n longName = nodeSelectTextField.getText();\n nodeID = nodeIDs.get(longName);\n if(eventHandler != null) {\n eventHandler.handle(param);\n }\n });\n }",
"private void createTextField(int i){\n\t\tint x = 10, y = 10, width = 100, height = 100;\n\t\tint temp = 0;\n\t\t\n\t\ttextFields.add(new JTextField());\n\t\ttextFields.get(i).setVisible(false);\n\t\ttextFields.get(i).addActionListener(this);\n\t\t\n\t\tfor (int a = 0; a<i; a++){\n\t\t\tx += 110;\n\t\t\ttemp++;\n\t\t\tif(temp >= Integer.parseInt(askColumns.getText())){\n\t\t\t\ty += 140;\n\t\t\t\tx = 10;\n\t\t\t\ttemp = 0;\n\t\t\t}\t\n\n\t\t}\n\t\t\n\t\t\n\t\ttextFields.get(i).setBounds(x, y, width, height);\n\t\tthis.add(textFields.get(i));\t\n\t\ttextFields.get(i).revalidate();\n\t\ttextFields.get(i).repaint();\n\t\t\n\t}",
"public void addTextField(String label, String fill, int index) {\n //inflater needed to \"inflate\" layouts\n LayoutInflater inflater = (LayoutInflater) getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n //instantiate our data object.\n ElementTextField elementTextField = new ElementTextField(label, fill);\n //insert element data object in slot on page\n if (isLoading){\n currentPage.addElement(elementTextField);\n }else{\n currentPage.insertElement(index, elementTextField);\n }\n //we need to instantiate our xml fragment (text field) and bind it to the data object\n TextFieldBinding textFieldBinding = TextFieldBinding.inflate(inflater, null,false);\n textFieldBinding.setElementTextField(elementTextField);\n //get new view (our xml fragment -the text field) and add it to current view\n View newView = textFieldBinding.getRoot();\n if (isInspecting){\n EditText editText = newView.findViewById(R.id.label);\n editText.setFocusable(false);\n }\n linearLayoutBody.addView(newView, index);\n Context context = App.getContext();\n LogManager.reportStatus(context, \"INSPECTOR\", \"onTextField\");\n }",
"private void setDataInFields() \n {\n quantityTxtFld.setText(farmer.getCropQuantity()+\"\");\n quantityTxtFld.setEnabled(false);\n }",
"public void findUIElements() {\n nameField = (EditText) findViewById(R.id.NAMEFIELD);\n nameField.setHintTextColor(getResources().getColor(R.color.colorPrimary));\n enterButton = (Button) findViewById(R.id.ENTER);\n enterButton.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String name = nameField.getText().toString();\n if (name.length() > 0) {\n RealmManager.getInstance().createUser(name);\n finish();\n }\n }\n });\n }",
"@Test\n\tpublic void Test() {\n\t\tdriver.findElement(By.id(\"email\")).sendKeys(\"abc@gmail.com\");\n\t\tdriver.findElement(By.id(\"enterimg\")).click();\n\n\t\t// first and last name;\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"basicBootstrapForm\\\"]/div[1]/div[1]/input\")).sendKeys(\"Uyghur\");\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"basicBootstrapForm\\\"]/div[1]/div[2]/input\")).sendKeys(\"Wolf\");\n\n\t\t// address;\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"basicBootstrapForm\\\"]/div[2]/div/textarea\"))\n\t\t\t\t.sendKeys(\"Adelaide,Australia\");\n\n\t\t// email address\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"eid\\\"]/input\")).sendKeys(\"UyghurWolf@gmail.com\");\n\n\t\t// phone\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"basicBootstrapForm\\\"]/div[4]/div/input\")).sendKeys(\"123456\");\n\n\t\t// gender\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"basicBootstrapForm\\\"]/div[5]/div/label[1]/input\")).click();\n\n\t\t// hobbies\n\t\tdriver.findElement(By.id(\"checkbox2\")).click();\n\n\t\t// languages\n//\t\tdriver.findElement(By.id(\"msdd\")).sendKeys(\"Uyghur\");\n\t\t// *******Can't type in the box**********\n\n\t\t// skills\n\t\tdriver.findElement(By.id(\"Skills\")).sendKeys(\"Linux\");\n\n\t\t// country\n\t\tdriver.findElement(By.id(\"countries\")).sendKeys(\"AUS\");\n\n\t\t// DOB\n\t\tdriver.findElement(By.id(\"yearbox\")).sendKeys(\"2002\");\n\t\tdriver.findElement(By.xpath(\"//*[@id=\\\"basicBootstrapForm\\\"]/div[11]/div[2]/select\")).sendKeys(\"May\");\n\t\tdriver.findElement(By.id(\"daybox\")).sendKeys(\"23\");\n\n\t\t// password\n\t\tdriver.findElement(By.id(\"firstpassword\")).sendKeys(\"askme1234\");\n\n\t\t// confirm password\n\t\tdriver.findElement(By.xpath(\" //*[@id=\\\"secondpassword\\\"]\")).sendKeys(\"askme1234\");\n\n\t\t// submit button\n\t\tdriver.findElement(By.id(\"submitbtn\")).click();\n\n\t\t// refresh button\n\t//\tdriver.findElement(By.id(\"Button1\")).click();\n\t\t\n\n\t}",
"@When(\"^enter any value \\\"([^\\\"]*)\\\" in Sent to field$\")\npublic void enter_any_value_in_Sent_to_field(String arg1) throws Throwable \n{\n\t \n\tActions act = new Actions(driver);\n\t\n\tdriver.findElement(By.xpath(\"//input[@class='select2-search__field']\")).sendKeys(\"naveen\");\n Thread.sleep(2000);\n \n \n driver.findElement(By.xpath(\"//li[contains(text(),'naveen naveen')]\"));\n Thread.sleep(1000); \n \n \n\tact.sendKeys(Keys.RETURN).perform();\n Thread.sleep(3000);\n \n\tdriver.findElement(By.id(\"compose_message_title\")).sendKeys(\"Testing for Sending message\");\n\tThread.sleep(3000);\n\t\n\t\n\tdriver.findElement(By.cssSelector(\".cke_wysiwyg_frame\"));\n\tdriver.switchTo().frame(0);\n\twaitForElementToBeLoad(\"//body\");\n\tdriver.findElement(By.xpath(\"//body\")).click();\n\twaitForElementToBeLoad(\"//body/p\");\n\tdriver.findElement(By.xpath(\"//body/p\")).sendKeys(\"Hello Mr.Navven \\n This is for testing \\n From, \\n Ankita\");\n\tThread.sleep(3000);\n\tdriver.switchTo().defaultContent();\n\tThread.sleep(3000);\n\n \n}",
"private void jtxtbrand_code_toFocusGained(java.awt.event.FocusEvent evt) {\n jtxtbrand_code_to.setSelectionStart(0);\n jtxtbrand_code_to.setSelectionEnd(jtxtbrand_code_to.getText().length());\n}",
"public void inputRandomEmailToTextbox() {\r\n\t\twaitElementVisible(driver, RegisterForm.EMAIL_TEXTBOX);\r\n\t\tString emailAddress = \"auto06\" + getTodayString(\"ddMMyyHHmmss\")+\"@lv.com\";\r\n\t\tsendKeyElement(driver,RegisterForm.EMAIL_TEXTBOX, emailAddress);\r\n\t}",
"@FXML void editbtnpushed(ActionEvent event5) {\t\n\tLabel Orig[] = { TitleLabel, PositionLabel, RetributionLabel, DegreeLabel, BonusLabel, ContractTypeLabel, ContractTimeLabel, SectorLabel, RegionLabel, RetxTLabel, ExpLabel };\n\tint i = 0, k = -1;\n\tTextField TxtEd[] = { EditTitleField, EditPositionField, EditRetribution, EditDegreeField, EditBonusField };\n\tChoiceBox ChbEd[] = { EditTypeContBox, EditTimeContBox, EditSectorBOx, EditRegionBox, EditRetxTField, EditExpbox };\n\tString preset[] = { \"Modifica Tipo Contratto\", \"Modifica Tempo Contratto\", \"Modifica Settore\", \"Modifica Regione\", \n\t\t\t\"Modifica Tempo Retribuzione\", \"Modifica Esperienza\" };\n\tString s1[] = new String [12];\t\n\tfor ( i = 0; i < 11; i++ ) {\n\tif ( i < 5 ) { \n\t\tif (!TxtEd[i].getText().isEmpty()) {\n\t\ts1[i] = TxtEd[i].getText().toString(); }\n\telse { s1[i] = Orig[i].getText().toString(); }\n\t} \n\tif ( i > 4 ) { \n\t\t++k;\n\t\t if ( !ChbEd[k].getValue().toString().contentEquals(preset[k])) {\n\t\t\ts1[i] = ChbEd[k].getValue().toString(); }\n\t\telse { s1[i] = Orig[i].getText().toString(); } \n\t\t}\n\t} s1[11] = EditWorkInfoArea.getText().toString(); \n\t\tk = -1;\n\tfor ( i = 0; i < 11; i++ ) {\n\t\tif ( i < 5 ) { TxtEd[i].setText(s1[i]); } \n\t\tif ( i > 4 ) { \n\t\t\t++k;\n\t\t\tChbEd[k].setValue(s1[i]); }\n\t} \t\n\ttry {\n\t\tint n = 0, j = 0, p = 1, q = 2, email = 3, r = 4, s = 5, t = 6, u = 7, w = 8, v = 9, x = 10, y = 11, z = 12; i = 0; k = 0; \n\t BufferedReader reader = new BufferedReader(new FileReader(FileCerqoLavoroBusinessFactoryImpl.OFFERS_FILE_NAME));\n\t int lines = 0;\n\t while (reader.readLine() != null) {\n\t lines++; }\n\t reader.close(); int cont = lines / 13;\n\t File f = new File(FileCerqoLavoroBusinessFactoryImpl.OFFERS_FILE_NAME);\n \t StringBuilder sb = new StringBuilder();\n \t try (Scanner sc = new Scanner(f)) {\n \t String currentLine;\n \t boolean trovato = false;\n \t while ( sc.hasNext() && n < (lines) ) {\n \t currentLine = sc.nextLine();\n \t if ( n == j ) { sb.append(EditRegionBox.getValue().toString()+\"\\n\"); }\n\t if ( n == p ) { sb.append(EditSectorBOx.getValue().toString()+\"\\n\"); }\n\t if ( n == q ) { sb.append(EditTitleField.getText().toString()+\"\\n\"); }\n \t if ( n == r ) { sb.append(EditPositionField.getText().toString()+\"\\n\"); }\n \t if ( n == s ) { sb.append(EditTypeContBox.getValue().toString()+\"\\n\"); }\n \t if ( n == t ) { sb.append(EditTimeContBox.getValue().toString()+\"\\n\"); }\n \t if ( n == u ) { sb.append(EditRetribution.getText().toString()+\"\\n\"); }\n \t if ( n == v ) { sb.append(EditExpbox.getValue().toString()+\"\\n\"); }\n \t if ( n == w ) { sb.append(EditRetxTField.getValue().toString()+\"\\n\"); }\n \t if ( n == x ) { sb.append(EditBonusField.getText().toString()+\"\\n\"); }\n \t if ( n == y ) { sb.append(EditDegreeField.getText().toString()+\"\\n\"); }\n \t if ( n == z ) { sb.append(EditWorkInfoArea.getText().toString()+\"\\n\"); }\n \t if ( n != j && n != p && n != q && n != r && n != s && n != t && n != u && n != v && n != w && n != x && n != y && n != z ) {\n \t \tif ( n == (lines-1) ) { sb.append(currentLine); }\n\t \telse { sb.append(currentLine).append(\"\\n\"); }\n \t } n++; \n \t }\n \t }\n \t PrintWriter pw = new PrintWriter(f); pw.close();\n \t BufferedWriter writer = new BufferedWriter(new FileWriter(f, true));\n \t writer.append(sb.toString()); writer.close(); \t \n \t\tif ( !EditTitleField.getText().isEmpty() ) { TitleLabel.setText(EditTitleField.getText()); } \t\t\n \t\tif ( !EditPositionField.getText().isEmpty() ) { PositionLabel.setText(EditPositionField.getText()); } \t\t\n \t\tif ( !EditTypeContBox.getValue().contentEquals(\"Modifica Tipo Contratto\") ) { ContractTypeLabel.setText(EditTypeContBox.getValue()); } \t\t\n \t\tif ( !EditTimeContBox.getValue().contentEquals(\"Modifica Tempo Contratto\") ) { ContractTimeLabel.setText(EditTimeContBox.getValue()); } \t\t\n \t\tif ( !EditRetribution.getText().isEmpty()) { RetributionLabel.setText(EditRetribution.getText() ); } \t\t\n \t\tif ( !EditSectorBOx.getValue().contentEquals(\"Modifica Settore\") ) { SectorLabel.setText(EditSectorBOx.getValue()); } \t\t\n \t\tif ( !EditRegionBox.getValue().contentEquals(\"Modifica Regione\") ) { RegionLabel.setText(EditRegionBox.getValue()); } \t\t\n \t\tif ( !EditRetxTField.getValue().contentEquals(\"Modifica Tempo Retribuzione\") ) { RetxTLabel.setText(EditRetxTField.getValue()); } \t\t\n \t\tif ( !EditBonusField.getText().isEmpty() ) { BonusLabel.setText(EditBonusField.getText()); } \t\t\n \t\tif ( !EditDegreeField.getText().isEmpty() ) { DegreeLabel.setText(EditDegreeField.getText()); }\t\t \n Alert offmodAlert = new Alert(AlertType.CONFIRMATION);\n offmodAlert.setHeaderText(\"Operazione completata\");\n offmodAlert.setContentText(\"Hai modificato questa offerta\");\n offmodAlert.showAndWait(); \n\t} catch (Exception e) {\n\t e.printStackTrace();\n Alert ripmodAlert = new Alert(AlertType.ERROR);\n ripmodAlert.setHeaderText(\"Attenzione\");\n ripmodAlert.setContentText(\"Si è verificato un errore\");\n ripmodAlert.showAndWait();\n\t} \n}",
"public void EnterKitchenSlipData(String kitchenitem3,String quantity1){\n\r\n\t\taddnewkitchenitem.click();\r\n\t\ttry {\r\n\t\t\tThread.sleep(2000);\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\t\r\n\t\tdriver.findElement(By.xpath(Constants.Kitchenitemline)).sendKeys(kitchenitem3);\r\n\t\tdriver.findElement(By.xpath(Constants.quantityline)).sendKeys(quantity1);\r\n\t\t//kitchenitemname2.sendKeys(kitchenitem2);\r\n\r\n\t}",
"@Test\n public void sendKeys() {\n page.textInput.sendKeys(\"coffee\");\n waiter.waitForElementAttributeEqualsString(page.textInput, \"value\", \"coffee\", driver);\n //type into a <textarea> element\n //before typing, the textarea element displays a hint, but not an actual text (in the 'placeholder' attribute)\n //therefore the getAttribute(\"value\") method call returns an empty String\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"\", driver);\n page.textarea.sendKeys(\"1234567890\");\n //after typing, the text in the field will be \"1234567890\"\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"1234567890\", driver);\n //type the same text again and the text in the field becomes \"12345678901234567890\"\n page.textarea.sendKeys(\"1234567890\");\n waiter.waitForElementAttributeEqualsString(page.textarea, \"value\", \"12345678901234567890\", driver);\n }",
"public void verifyCheckboxesAndInputsAreWorking(){\r\n driver.switchTo().defaultContent();\r\n //clicking random checkboxes\r\n WebElement checkbox1 = driver.findElement(By.xpath(randomCheckboxOneXpathLocator));\r\n ((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", checkbox1);\r\n checkbox1.click();\r\n\r\n WebElement checkbox2 = driver.findElement(By.xpath(randomCheckboxTwoXpathLocator));\r\n ((JavascriptExecutor) driver).executeScript(\"arguments[0].scrollIntoView(true);\", checkbox2);\r\n checkbox2.click();\r\n driver.findElement(By.xpath(randomInputAreaXpathLocator)).sendKeys(\"This is a test message.\");\r\n }",
"private void enterCriteriaToSerachField(String text) {\n WebElement searchField = findElementWithWait(By.id(\"gh-ac\"));\n searchField.clear();\n searchField.sendKeys(text);\n searchField.sendKeys(Keys.RETURN);\n }",
"private void createFieldsComp() {\n Composite fieldComp = new Composite(shell, SWT.NONE);\n GridLayout gl = new GridLayout(2, false);\n GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n fieldComp.setLayout(gl);\n fieldComp.setLayoutData(gd);\n\n Label nameLbl = new Label(fieldComp, SWT.LEFT);\n nameLbl.setText(\"Name: \");\n\n caseNameText = new Text(fieldComp, SWT.SINGLE);\n gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false);\n gd.minimumWidth = 200;\n caseNameText.setLayoutData(gd);\n caseNameText.addKeyListener(new KeyAdapter() {\n\n @Override\n public void keyReleased(KeyEvent e) {\n super.keyReleased(e);\n if (e.character == SWT.CR || e.character == SWT.KEYPAD_CR) {\n if (verifySelection()) {\n close();\n }\n }\n }\n });\n }",
"public void clearTextFields(){\n jtxt_username.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_username.getText().equals(\"\")){\n jtxt_username.setText(\"Type in your username...\");\n }else{\n \n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_username.getText().contains(\"Type in your username...\")){\n jtxt_username.setText(\"\");\n }\n }\n });\n jpassword.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jpassword.getPassword().equals(\"\")){\n jpassword.setText(\"password\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jpassword.getPassword().equals(\"password\")){\n jpassword.setText(\"\");\n }\n }\n });\n // End of Login form clearTextFields()\n \n \n \n // Start of createSavingsAcc form clearTextFields()\n jTextField_Create_Savings_Acc_acchol.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_acchol.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_acchol.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_acchol.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_acchol.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_accnum.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_accnum.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_accnum.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_accnum.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_accnum.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_bal.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_bal.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_bal.setText(\"000\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_bal.getText().contains(\"000\")){\n jTextField_Create_Savings_Acc_bal.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_joindate.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_joindate.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_joindate.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_joindate.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_joindate.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_pass.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_pass.getPassword().equals(\"\")){\n jTextField_Create_Savings_Acc_pass.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_pass.getPassword().equals(\"xxx\")){\n jTextField_Create_Savings_Acc_pass.setText(\"\");\n }\n }\n });\n jTextField_Create_Savings_Acc_usern.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jTextField_Create_Savings_Acc_usern.getText().equals(\"\")){\n jTextField_Create_Savings_Acc_usern.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jTextField_Create_Savings_Acc_usern.getText().contains(\"xxx\")){\n jTextField_Create_Savings_Acc_usern.setText(\"\");\n }\n }\n });\n // End of createSavingsAcc form clearTextFields\n \n // Start of createNewCurrentAcc form clearTextFields\n jtxt_accno.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_accno.getText().equals(\"\")){\n jtxt_accno.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_accno.getText().contains(\"xxx\")){\n jtxt_accno.setText(\"\");\n }\n }\n });\n jtxt_holderName.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_holderName.getText().equals(\"\")){\n jtxt_holderName.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_holderName.getText().contains(\"xxx\")){\n jtxt_holderName.setText(\"\");\n }\n }\n });\n jtxt_joinDate.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_joinDate.getText().equals(\"\")){\n jtxt_joinDate.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_joinDate.getText().contains(\"xxx\")){\n jtxt_joinDate.setText(\"\");\n }\n }\n });\n jtxt_balance.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_balance.getText().equals(\"\")){\n jtxt_balance.setText(\"000\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_balance.getText().contains(\"000\")){\n jtxt_balance.setText(\"\");\n }\n }\n });\n jtxt_userName.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_userName.getText().equals(\"\")){\n jtxt_userName.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_userName.getText().contains(\"xxx\")){\n jtxt_userName.setText(\"\");\n }\n }\n });\n jpw_createCurrentAccPw.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jpw_createCurrentAccPw.getPassword().equals(\"\")){\n jpw_createCurrentAccPw.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jpw_createCurrentAccPw.getPassword().equals(\"xxx\")){\n jpw_createCurrentAccPw.setText(\"\");\n }\n }\n });\n jtxt_createCurrentAccPIN.addFocusListener(new FocusListener() {\n @Override\n public void focusLost(FocusEvent arg0) {\n if(jtxt_createCurrentAccPIN.getText().contains(\"\")){\n jtxt_createCurrentAccPIN.setText(\"xxx\");\n }\n }\n @Override\n public void focusGained(FocusEvent arg0) {\n // TODO Auto-generated method stub\n if(jtxt_createCurrentAccPIN.getText().contains(\"xxx\")){\n jtxt_createCurrentAccPIN.setText(\"\");\n }\n }\n });\n }",
"public List<String> TextInsideTextBoxes() {\n\tList<String> text_Of_Boxes=new ArrayList<String>();\n\tString text1=emailtextbox.getAttribute(\"placeholder\");\n\tString text2=passwordtextbox.getAttribute(\"placeholder\");\n\ttext_Of_Boxes.add(text1);\n\ttext_Of_Boxes.add(text2);\n\treturn text_Of_Boxes;\n}",
"public void saveInput() \n {\n for (int i = 0; i < 10; i++) \n userInput[i] = textFields[i].getText(); \n }",
"@When(\"^Enter all mandatory field$\")\npublic void enter_all_mandatory_field() throws Throwable\n{\n\tdriver.findElement(By.id(\"registration_firstname\")).sendKeys(\"Ankita\");\n\tdriver.findElement(By.id(\"registration_lastname\")).sendKeys(\"Chaudhari\");\n\tdriver.findElement(By.id(\"registration_email\")).sendKeys(\"chaudhariankit5454@gmail.com\");\n\tdriver.findElement(By.id(\"username\")).sendKeys(\"Ankitachaudhari5454\");\n\tdriver.findElement(By.id(\"pass1\")).sendKeys(\"Password@5454\");\n\tdriver.findElement(By.id(\"pass2\")).sendKeys(\"Password@5454\");\n\tdriver.findElement(By.id(\"registration_phone\")).sendKeys(\"1234567890\");\n\tdriver.findElement(By.id(\"registration_official_code\")).sendKeys(\"412216\");\n\tdriver.findElement(By.name(\"extra_skype\")).sendKeys(\"Ankita_Chaudari\");\n\tdriver.findElement(By.name(\"extra_linkedin_url\")).sendKeys(\"https://ankita.chaudhari.linkedIn.com\");\n Thread.sleep(1000);\n \n}",
"@Override\n public void startEdit() {\n super.startEdit();\n\n if (text_field == null) {\n createTextField();\n }\n setText(null);\n setGraphic(text_field);\n text_field.selectAll();\n }",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tString get=textField.getText();\r\n\t\t\t\t\t\ttextField_1.setText(get);\r\n\t\t\t\t\t}",
"private void initiateBlueEssencePurchaseFields(JFrame frame) {\r\n JLabel q5 = new JLabel(\"Make purchase for mainAccount or altAccount?\");\r\n// q5.setPreferredSize(new Dimension(1000, 100));\r\n// q5.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new Label(q5);\r\n frame.add(q5);\r\n\r\n JTextField account = new JTextField();\r\n// account.setPreferredSize(new Dimension(1000, 100));\r\n// account.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new TextField(account);\r\n frame.add(account);\r\n\r\n JLabel q6 = new JLabel(\"Name of the champion you wish to purchase?\");\r\n// q6.setPreferredSize(new Dimension(1000, 100));\r\n// q6.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new Label(q6);\r\n frame.add(q6);\r\n\r\n JTextField name = new JTextField();\r\n// name.setPreferredSize(new Dimension(1000, 100));\r\n// name.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new TextField(name);\r\n frame.add(name);\r\n\r\n ImageIcon icon = new ImageIcon(\"./data/shopicon.JPG\");\r\n JLabel label = new JLabel(icon);\r\n label.setPreferredSize(new Dimension(750, 100));\r\n frame.add(label);\r\n\r\n initiateBlueEssencePurchaseEnter(frame, account, name);\r\n }",
"private void loadBoxes() {\n\t\tBoxPanel.add(userNumTextBox);\n\t\tBoxPanel.add(userRdTextBox);\n\t\tBoxPanel.add(searchUser);\n\t\tRootPanel.get(\"box-window\").add(BoxPanel);\n\t\tuserNumTextBox.setFocus(true);\n\t\tuserRdTextBox.setFocus(true);\n\n\t\t// listen for mouse click on search key (to find user location)\n\t\tsearchUser.addClickHandler(new ClickHandler() {\n\t\t\tpublic void onClick(ClickEvent event) {\n\n\t\t\t\tfinal String num = userNumTextBox.getText().trim();\n\t\t\t\tuserNumTextBox.setFocus(true);\n\t\t\t\tfinal String rd = userRdTextBox.getText();\n\t\t\t\tuserRdTextBox.setFocus(true);\n\t\t\t\tul = new UserLocation(num, rd);\n\t\t\t\t// logger.log(Level.INFO, \"LatLong\" + \" \" + ul.getLat() + \",\" +\n\t\t\t\t// ul.getLong());\n\n\t\t\t}\n\t\t});\n\t}",
"@Override\r\n\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\t\t\td5.dispose();\r\n\t\t\t\t\t\t\t\ttextField_productID_input.requestFocusInWindow();\r\n\t\t\t\t\t\t\t}",
"private void initiateEarnBlueEssenceFields(JFrame frame) {\r\n JLabel q1 = new JLabel(\"Add amount to mainAccount or altAccount?\");\r\n new Label(q1);\r\n// q1.setPreferredSize(new Dimension(750, 100));\r\n// q1.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(q1);\r\n\r\n JTextField account = new JTextField();\r\n new TextField(account);\r\n// account.setPreferredSize(new Dimension(750, 100));\r\n// account.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(account);\r\n\r\n JLabel q2 = new JLabel(\"Amount of Blue Essence Earned\");\r\n new Label(q2);\r\n// q2.setPreferredSize(new Dimension(750, 100));\r\n// q2.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(q2);\r\n\r\n JTextField amount = new JTextField();\r\n new TextField(amount);\r\n// amount.setPreferredSize(new Dimension(750, 100));\r\n// amount.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(amount);\r\n\r\n ImageIcon icon = new ImageIcon(\"./data/be.JPG\");\r\n JLabel label = new JLabel(icon);\r\n label.setPreferredSize(new Dimension(750, 100));\r\n frame.add(label);\r\n\r\n initiateEarnBlueEssenceEnter(frame, account, amount);\r\n }",
"@Override\n public void mousePressed(MouseEvent e) {\n Object selected = comboBox.getSelectedItem();\n JTextField[] textFieldArray = new JTextField[] {idField, nameField, majorField};\n\n // Checks that fields aren't blank prior to continuing\n for (JTextField field : textFieldArray) {\n if (field.getText().equals(\"\")) {\n displayStatusPanel(\n \"Error: Input may not be blank.\",\n \"Error\",\n JOptionPane.WARNING_MESSAGE\n );\n return;\n }\n }\n\n if (selected.equals(\"Insert\")) {\n insertEntry();\n } else if (selected.equals(\"Delete\")) {\n deleteEntry();\n } else if (selected.equals(\"Find\")) {\n findEntry();\n } else if (selected.equals(\"Update\")) {\n updateEntry();\n }\n }",
"public void enterTextinTextbox(WebElement element, String text) {\n\n\t\telement.clear();\n\t\telement.sendKeys(text);\n\t}",
"public void enterTextInToInput(String xpath, String text) {\r\n WebElement input = webDriver.findElement(By.xpath(xpath));\r\n try {\r\n input.clear();\r\n input.sendKeys(text);\r\n logger.info(text + \" was inputed to input \");\r\n } catch (Exception e) {\r\n logger.error(\"Cannot work with input\");\r\n Assert.fail(\"Cannot work with input\");\r\n }\r\n\r\n\r\n }",
"private void jtxtbrand_code_frFocusGained(java.awt.event.FocusEvent evt) {\n jtxtbrand_code_fr.setSelectionStart(0);\n jtxtbrand_code_fr.setSelectionEnd(jtxtbrand_code_fr.getText().length());\n}",
"private void createForm(ArrayList<HashMap<String, String>> data) {\n\t\tLayoutInflater inflater = LayoutInflater.from(IPropertyRegistrationActivity.this);\n\t\tLinearLayout.LayoutParams params = new LinearLayout.LayoutParams(android.widget.LinearLayout.LayoutParams.MATCH_PARENT,\n\t\t\t\tandroid.widget.LinearLayout.LayoutParams.WRAP_CONTENT);\n\t\tparams.topMargin = 10;\n\n\t\tfields = data;\n\t\tLinearLayout layout = null;\n\t\tint len = fields.size();\n\t\tfor (int j = 0; j < len; j++) {\n\t\t\tfinal HashMap<String, String> field = fields.get(j);\n\t\t\tView fieldView = inflater.inflate(R.layout.iproperty_registration_dynamic_view_item, null);\n\n\t\t\tif (field.get(TYPE).equals(LABEL)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrLabel));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t} else if (field.get(TYPE).equals(PASSWORD)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEdit));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tif (field.get(NAME).contains(getString(R.string.phone)) || field.get(NAME).contains(getString(R.string.year))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_CLASS_NUMBER);\n\t\t\t\t} else if (field.get(NAME).contains(getString(R.string.website)) || field.get(NAME).contains(getString(R.string.email))) {\n\t\t\t\t\tedit.setInputType(InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS);\n\t\t\t\t}\n\t\t\t} else if (field.get(TYPE).equals(TEXTAREA)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditArea));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\n\t\t\t\tif (field.get(VALUE).toString().trim().length() > 0) {\n\t\t\t\t\tedit.setText(field.get(VALUE));\n\t\t\t\t} else {\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(MAP)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tfinal ImageView imgMap;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditMap));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\timgMap = ((ImageView) layout.findViewById(R.id.imgMap));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.state))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getAdminArea().replace(address.getCountryName() == null ? \"\" : address.getCountryName(), \"\")\n\t\t\t\t\t\t\t\t.replace(address.getPostalCode() == null ? \"\" : address.getPostalCode(), \"\"));\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} else if (field.get(NAME).equalsIgnoreCase(getString(R.string.city_town))) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tedit.setText(address.getSubAdminArea());\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\tedit.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\timgMap.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\teditMap = edit;\n\t\t\t\t\t\tIntent intent = new Intent(IPropertyRegistrationActivity.this, IjoomerMapAddress.class);\n\t\t\t\t\t\tstartActivityForResult(intent, GET_ADDRESS_FROM_MAP);\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(SELECT)) {\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrSpin));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tfinal Spinner spn;\n\t\t\t\tspn = ((Spinner) layout.findViewById(R.id.txtValue));\n\t\t\t\tspn.setAdapter(IjoomerUtilities.getSpinnerAdapter(field));\n\t\t\t\tif (field.get(NAME).equalsIgnoreCase(getString(R.string.country))) {\n\n\t\t\t\t\ttry {\n\t\t\t\t\t\tAddress address = IjoomerUtilities.getAddressFromLatLong(0, 0);\n\t\t\t\t\t\tString country = address.getCountryName();\n\t\t\t\t\t\tint selectedIndex = 0;\n\t\t\t\t\t\tJSONArray jsonArray = null;\n\n\t\t\t\t\t\tjsonArray = new JSONArray(field.get(OPTIONS));\n\t\t\t\t\t\tint optionSize = jsonArray.length();\n\t\t\t\t\t\tfor (int k = 0; k < optionSize; k++) {\n\t\t\t\t\t\t\tJSONObject options = (JSONObject) jsonArray.get(k);\n\n\t\t\t\t\t\t\tif (options.getString(VALUE).equalsIgnoreCase(country)) {\n\t\t\t\t\t\t\t\tselectedIndex = k;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tspn.setSelection(selectedIndex);\n\t\t\t\t\t} catch (Throwable e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\tspn.setSelection(0);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\n\t\t\t} else if (field.get(TYPE).equals(DATE)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getDateDialog(((IjoomerEditText) v).getText().toString(), true, new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(TIME)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getTimeDialog(((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setError(null);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\n\t\t\t} else if (field.get(TYPE).equals(MULTIPLESELECT)) {\n\t\t\t\tfinal IjoomerEditText edit;\n\t\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable));\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tedit = ((IjoomerEditText) layout.findViewById(R.id.txtValue));\n\t\t\t\tedit.setOnClickListener(new OnClickListener() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final View v) {\n\t\t\t\t\t\tIjoomerUtilities.getMultiSelectionDialog(field.get(NAME), field.get(OPTIONS), ((IjoomerEditText) v).getText().toString(), new CustomClickListner() {\n\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void onClick(String value) {\n\t\t\t\t\t\t\t\t((IjoomerEditText) v).setText(value);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\n\t\t\tif (field.get(REQUIRED).equalsIgnoreCase(\"1\")) {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME) + \" *\");\n\t\t\t} else {\n\t\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t}\n\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEdit)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditArea)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrSpin)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrEditClickable)).setVisibility(View.GONE);\n\t\t\t((LinearLayout) fieldView.findViewById(R.id.lnrLabel)).setVisibility(View.GONE);\n\n\t\t\tlayout = ((LinearLayout) fieldView.findViewById(R.id.lnrReadOnly));\n\t\t\tlayout.setVisibility(View.VISIBLE);\n\n\t\t\t((IjoomerTextView) layout.findViewById(R.id.txtLable)).setText(field.get(NAME));\n\t\t\t((IjoomerEditText) layout.findViewById(R.id.txtValue)).setText(field.get(VALUE));\n\t\t\tfieldView.setTag(field);\n\t\t\tlnr_form.addView(fieldView, params);\n\t\t}\n\t}",
"void addFocus();",
"public void onClick(Widget w) {\n\t\t\t\tHashSet existingFields = new HashSet();\n\t\t\t\tif (defList.size() > 0) {\n\t\t\t\t\tFactData d = (FactData) defList.get(0);\n\t\t\t\t\tfor (Iterator iterator = d.fieldData.iterator(); iterator.hasNext();) {\n\t\t\t\t\t\tFieldData f = (FieldData) iterator.next();\n\t\t\t\t\t\texistingFields.add(f.name);\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\tString[] fields = (String[]) sce.fieldsForType.get(type);\n\t\t\t\tfinal FormStylePopup pop = new FormStylePopup(\"images/rule_asset.gif\", \"Choose a field to add\");\n\t\t\t\tfinal ListBox b = new ListBox();\n\t\t\t\tfor (int i = 0; i < fields.length; i++) {\n\t\t\t\t\tString fld = fields[i];\n\t\t\t\t\tif (!existingFields.contains(fld)) b.addItem(fld);\n\t\t\t\t}\n\t\t\t\tpop.addRow(b);\n\t\t\t\tButton ok = new Button(\"OK\");\n\t\t\t\tok.addClickListener(new ClickListener() {\n\t\t\t\t\t\t\t\t\tpublic void onClick(Widget w) {\n\t\t\t\t\t\t\t\t\t\tString f = b.getItemText(b.getSelectedIndex());\n\t\t\t\t\t\t\t\t\t\tfor (Iterator iterator = defList.iterator(); iterator.hasNext();) {\n\t\t\t\t\t\t\t\t\t\t\tFactData fd = (FactData) iterator.next();\n\t\t\t\t\t\t\t\t\t\t\tfd.fieldData.add(new FieldData(f, \"\"));\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t outer.setWidget(1, 0, render(defList));\n\t\t\t\t\t\t\t\t pop.hide();\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t});\n\t\t\t\tpop.addRow(ok);\n\n\t\t\t\tpop.show();\n\t\t\t}",
"@When(\"^Fill all required fields$\")\t\t\t\t\t\n public void Fill_all_required_fields() throws Throwable \t\t\t\t\t\t\t\n {\t\t\n driver.findElement(By.id(\"firstName\")).sendKeys(\"Hala\");\t\n driver.findElement(By.id(\"lastName\")).sendKeys(\"Mohamed\");\n driver.findElement(By.id(\"username\")).sendKeys(\"halamohamed86757556\");\n driver.findElement(By.name(\"Passwd\")).sendKeys(\"halamohamed12345\");\n driver.findElement(By.name(\"ConfirmPasswd\")).sendKeys(\"halamohamed12345\");\n \n }",
"private void LimpiarCampos(){\n \n txtClave.setText(null);\n txtNombre.setText(null);\n txtPaterno.setText(null);\n txtMaterno.setText(null);\n txtTelefono.setText(null);\n txtCorreo.setText(null);\n cbxGenero.setSelectedIndex(0);\n cbxRol.setSelectedIndex(0);\n }",
"public void ClickToggleAll( ) {\n\t\t\tCHACKBOX_FIELD_LOCATOR.click();\n\t\t\t\n\t\t}",
"void setFocus();",
"private void jtxtwarehouse_codeFocusGained(java.awt.event.FocusEvent evt) {\n jtxtwarehouse_code.setSelectionStart(0);\n jtxtwarehouse_code.setSelectionEnd(jtxtwarehouse_code.getText().length());\n}",
"void resetTextFields();",
"private void createContents() {\n shell = new Shell(getParent(), SWT.SHELL_TRIM | SWT.BORDER);\n shell.setSize(450, 353);\n shell.setText(\"修改邮箱\");\n shell.setLayout(new FormLayout());\n\n Label lblNewLabel = new Label(shell, SWT.NONE);\n FormData fd_lblNewLabel = new FormData();\n fd_lblNewLabel.top = new FormAttachment(0, 31);\n fd_lblNewLabel.left = new FormAttachment(0, 50);\n lblNewLabel.setLayoutData(fd_lblNewLabel);\n lblNewLabel.setText(\"旧邮箱地址\");\n\n text = new Text(shell, SWT.BORDER);\n FormData fd_text = new FormData();\n fd_text.left = new FormAttachment(lblNewLabel, 62);\n fd_text.top = new FormAttachment(0, 31);\n text.setLayoutData(fd_text);\n\n Label label = new Label(shell, SWT.NONE);\n FormData fd_label = new FormData();\n fd_label.right = new FormAttachment(0, 126);\n fd_label.top = new FormAttachment(0, 99);\n fd_label.left = new FormAttachment(0, 50);\n label.setLayoutData(fd_label);\n label.setText(\"验证码\");\n\n text_1 = new Text(shell, SWT.BORDER);\n FormData fd_text_1 = new FormData();\n fd_text_1.left = new FormAttachment(text, 0, SWT.LEFT);\n fd_text_1.right = new FormAttachment(100, -47);\n fd_text_1.top = new FormAttachment(label, -3, SWT.TOP);\n text_1.setLayoutData(fd_text_1);\n\n Button button = new Button(shell, SWT.NONE);\n button.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n\n YanZhengma();\n\n }\n });\n FormData fd_button = new FormData();\n fd_button.right = new FormAttachment(100, -10);\n button.setLayoutData(fd_button);\n button.setText(\"获取验证码\");\n\n Button btnNewButton = new Button(shell, SWT.NONE);\n btnNewButton.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n try {\n changeEmail();\n } catch (BizException bizException) {\n bizException.printStackTrace();\n // SwtHelper.message(bizException.getMessage(),shell);\n }\n shell.dispose();\n\n\n }\n });\n FormData fd_btnNewButton = new FormData();\n fd_btnNewButton.right = new FormAttachment(0, 178);\n fd_btnNewButton.bottom = new FormAttachment(100, -10);\n fd_btnNewButton.left = new FormAttachment(0, 80);\n btnNewButton.setLayoutData(fd_btnNewButton);\n btnNewButton.setText(\"确认\");\n\n Button btnNewButton_1 = new Button(shell, SWT.NONE);\n btnNewButton_1.addSelectionListener(new SelectionAdapter() {\n @Override\n public void widgetSelected(SelectionEvent e) {\n shell.dispose();\n }\n });\n fd_text.right = new FormAttachment(btnNewButton_1, 0, SWT.RIGHT);\n fd_button.left = new FormAttachment(btnNewButton_1, 49, SWT.LEFT);\n FormData fd_btnNewButton_1 = new FormData();\n fd_btnNewButton_1.bottom = new FormAttachment(100, -10);\n fd_btnNewButton_1.right = new FormAttachment(100, -47);\n fd_btnNewButton_1.left = new FormAttachment(100, -157);\n btnNewButton_1.setLayoutData(fd_btnNewButton_1);\n btnNewButton_1.setText(\"返回\");\n\n Label label_1 = new Label(shell, SWT.NONE);\n FormData fd_label_1 = new FormData();\n fd_label_1.top = new FormAttachment(label, 49);\n fd_label_1.left = new FormAttachment(lblNewLabel, 0, SWT.LEFT);\n label_1.setLayoutData(fd_label_1);\n label_1.setText(\"新邮箱地址\");\n\n text_2 = new Text(shell, SWT.BORDER);\n fd_button.top = new FormAttachment(text_2, 19);\n FormData fd_text_2 = new FormData();\n fd_text_2.left = new FormAttachment(text, 0, SWT.LEFT);\n fd_text_2.right = new FormAttachment(100, -47);\n fd_text_2.top = new FormAttachment(label_1, -3, SWT.TOP);\n text_2.setLayoutData(fd_text_2);\n\n text.setText(email);\n }",
"private void jtxttotal_adm_qtyFocusGained(java.awt.event.FocusEvent evt) {\n jtxttotal_adm_qty.setSelectionStart(0);\n jtxttotal_adm_qty.setSelectionEnd(jtxttotal_adm_qty.getText().length());\n}",
"@Override\n public void onClick(ClickEvent event) {\n if (input.getValue().equals(PlaceholderHTML4.this.placeholder)) {\n input.cursorAt(0);\n } else {\n input.selectAll();\n }\n }",
"private TextBox[] drawMatch(TextBox boxBlue, TextBox boxRed, Group group, int level, Phase phase) {\n TextBox victoryBox = null;\n TextBox defaitBox = null;\n Color colorResultat = Color.color(1.0, 1.0, 0.0, 0.5);\n if (level % 2 == 0) {\n colorResultat = Color.color(0.0, 1.0, 1.0, 0.5);\n }\n if (phase.ordinal() == Phase.FINALE.ordinal() || phase.ordinal() == Phase.PETITE_FINALE.ordinal()) {\n victoryBox = new TextBox(new ParticipantBean(\"\", \"\"), widthRectangle, heightRectangle, Color.color(1.0, 1.0, 0.0, 0.5));\n defaitBox = new TextBox(new ParticipantBean(\"\", \"\"), widthRectangle, heightRectangle, Color.color(0.0, 1.0, 1.0, 0.5));\n\n //Create a TextBoxListner to prepare resultat\n TextBoxListner listner = new TextBoxListner(boxBlue, boxRed, victoryBox, defaitBox, phase);\n boxBlue.setListner(listner);\n boxRed.setListner(listner);\n listner.setParticipantClassementFinalListener(participantClassementFinalListener);\n\n } else if (phase.ordinal() == Phase.DEMI_FINALE.ordinal()) {\n victoryBox = drawMatch(boxBlue, boxRed, group, level);\n defaitBox = new TextBox(new ParticipantBean(\"\", \"\"), widthRectangle, heightRectangle, colorResultat);\n\n //Create a TextBoxListner to prepare resultat\n TextBoxListner listner = new TextBoxListner(boxBlue, boxRed, victoryBox, defaitBox);\n boxBlue.setListner(listner);\n boxRed.setListner(listner);\n defaitBox.setLayoutX(victoryBox.getLayoutX() + widthRectangle + spaceBetweenMatch);\n defaitBox.setLayoutY(victoryBox.getLayoutY());\n group.getChildren().add(defaitBox);\n }\n\n TextBox[] resultats = new TextBox[2];\n resultats[0] = victoryBox;\n resultats[1] = defaitBox;\n return resultats;\n }",
"public void fillFormAndSubmit() throws InterruptedException {\n System.out.print(WDUtil.getWebDriver().findElements(By.xpath(\"//input[@type='checkbox']\")).size() + \" | \");\n UIUtil.waitAndClick(modelSizeTopButton);\n //modelSizeTopButton.click();\n\n }",
"protected void doSetFocus() {\n \t\tif (getText() != null) {\n \t\t\tgetText().selectAll();\n \t\t\tgetText().setFocus();\n \t\t\tcheckSelection();\n \t\t\tcheckDeleteable();\n \t\t\tcheckSelectable();\n \t\t}\n \t}",
"public void InsertTextById(String by , String TexttoFill)\n\t{\n\t\n\t\tWebElement insertext = ConfigBrowsers.getDriver().findElement(By.id(by));\n\t\tinsertext.sendKeys(TexttoFill);\n\t}",
"private void myInit() {\n init_key();\n init_tbl_inventory();\n data_cols();\n focus();\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n jTextField1.grabFocus();\n }\n });\n\n }",
"private void makeControls() {\n Label label1 = new Label(\"Placement:\");\n textField = new TextField ();\n textField.setPrefWidth(300);\n\n // Task8 Start the game with the randomly selected piece placement\n textField.setText(\"AAO\");\n makePlacement(\"AAO\");\n\n Button button = new Button(\"Refresh\");\n button.setOnAction(new EventHandler<ActionEvent>() {\n @Override\n public void handle(ActionEvent e) {\n makePlacement(textField.getText());\n // Task8 Do not clear the textField in order to place pieces step by step.\n // textField.clear();\n }\n });\n HBox hb = new HBox();\n hb.getChildren().addAll(label1, textField, button);\n hb.setSpacing(10);\n hb.setLayoutX(130);\n hb.setLayoutY(VIEWER_HEIGHT - 50);\n controls.getChildren().add(hb);\n }",
"private void buildControls() {\n\t\tsetLayout(new FillLayout());\n\t\tSashForm child = new SashForm(this, SWT.VERTICAL);\n\t\ttable = new Table(child, SWT.FULL_SELECTION | SWT.MULTI | SWT.BORDER );\n\t\ttable.addSelectionListener(createSelctionListener());\n\t\tviewer = buildAndLayoutTable(table);\n\t\taddDNDSupport(viewer);\n\t\tattachContentProvider(viewer);\n\t\tattachLabelProvider(viewer);\n\t\tsingleRating = new RatingTable(child, null, SWT.HORIZONTAL, model);\n\t\t//Zum Debuggen ist das Textfeld sehr nützlich\n\t\t//Text target = new Text(child, SWT.NONE);\n\t\t//initDropTest(target);\n\t\t//child.setWeights(new int[] {2, 1, 1});\n\t\tchild.setWeights(new int[]{2, 1});\n\t\taddFilter(viewer);\n\t\tviewer.setInput(webtrace);\n\t}",
"private void addInputFields() {\n dogName = new JTextField();\n dogName.setBounds(205, 160, 140, 25);\n\n weight = new JTextField();\n weight.setBounds(205, 180, 140, 25);\n\n food = new JTextField();\n food.setBounds(205, 200, 140, 25);\n\n this.add(dogName);\n this.add(weight);\n this.add(food);\n }",
"public void setBoxes(String params) {\n\t\tfinal String[] paramsArray = params.split(\",\");\n\t\tint i=0;\n\t\tfor (Component c : this.westPanel.getComponents()) {\n\t\t if (c instanceof JTextField) {\n\t\t ((JTextField) c).setText(paramsArray[i]);\n\t\t \ti++;\n\t\t }\n\t\t}\n\t}",
"public void actionPerformed(ActionEvent e) {\n String text = textField1.getText();\n textField2.setText(text);\n\n }",
"public static void enterText(WebElement obj, String textVal, String objName) throws IOException{\r\n\t\tif(obj.isDisplayed()){\r\n\t\t\tobj.sendKeys(textVal);\r\n\t\t\tUpdate_Report(\"Pass\", \"enterText\", textVal+ \" is entered in \" + objName + \" field\");\r\n\t\t}else{\r\n\t\t\tUpdate_Report(\"Fail\", \"enterText\", objName + \" field is not displayed please check your application \");\r\n\t\t}\r\n\r\n\t}",
"public void clearEditTextBoxes()\n {\n \ttaskName.setText(\"\");\n \ttaskDetails.setText(\"\");\n \ttaskId.setText(\"\");\n \t//TODO Add alarm stuff here\n }",
"private void initTextFields()\n\t{\n\t\talpha_min_textfield.setText(String.valueOf(rangeSliders.get(\"alpha\").getLowValue()));\n\t\talpha_max_textfield.setText(String.valueOf(rangeSliders.get(\"alpha\").getHighValue()));\n\t\teta_min_textfield.setText(String.valueOf(rangeSliders.get(\"eta\").getLowValue()));\n\t\teta_max_textfield.setText(String.valueOf(rangeSliders.get(\"eta\").getHighValue()));\n\t\tkappa_min_textfield.setText(String.valueOf(rangeSliders.get(\"kappa\").getLowValue()));\n\t\tkappa_max_textfield.setText(String.valueOf(rangeSliders.get(\"kappa\").getHighValue()));\n\t\t\n\t\ttry {\n\t\t\t// Add listener for focus changes.\n//\t\t\tnumberOfDatasets_textfield.focusedProperty().addListener(new ChangeListener<Boolean>() {\n//\t\t\t @Override\n//\t\t\t public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue)\n//\t\t\t {\n//\t\t\t updateNumberOfDatasets(null);\n//\t\t\t }\n//\t\t\t});\n//\t\t\tnumberOfDivisions_textfield.focusedProperty().addListener(new ChangeListener<Boolean>() {\n//\t\t\t @Override\n//\t\t\t public void changed(ObservableValue<? extends Boolean> arg0, Boolean oldPropertyValue, Boolean newPropertyValue)\n//\t\t\t {\n//\t\t\t updateNumberOfDivisions(null);\n//\t\t\t }\n//\t\t\t});\n\t\t\t\n\t\t\t// Set initial values.\n\t\t\tnumberOfDatasetsToGenerate\t= Integer.parseInt(numberOfDatasets_textfield.getText());\n\t\t\tnumberOfDivisions\t\t\t= Integer.parseInt(numberOfDivisions_textfield.getText());\n\t\t\t\n\t\t\t// Disable number of divisions by default (since random sampling is enabled by default).\n\t\t\tnumberOfDivisions_textfield.setDisable(true);\n\t\t}\n\t\t\n\t\tcatch (NumberFormatException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void clickOn4KeysAndAssertTheTextDisplayedAfterEveryKeyPress()\n {\n driver.findElement(By.xpath(\"//a[contains(text(),'Key Presses')]\")).click();\n //(1)enter First Key\n driver.findElement(By.xpath(\"//input[@id='target']\")).sendKeys(\"A\");\n //collect the result\n String firstKey=driver.findElement(By.xpath(\"//p[@id='result']\")).getText();\n //expected result\n String expectedFirstKey=\"You entered: A\";\n //Assert.assertEquals(expectedFirstKey.equalsIgnoreCase());\n Assert.assertEquals(expectedFirstKey,firstKey);\n\n //(2)enter Second Key\n driver.findElement(By.xpath(\"//input[@id='target']\")).sendKeys(\"B\");\n //collect the result\n String secondKey=driver.findElement(By.xpath(\"//p[@id='result']\")).getText();\n //expected result\n String expectedSecondKey=\"You entered: B\";\n //Assert.assertEquals(expectedFirstKey.equalsIgnoreCase());\n Assert.assertEquals(expectedSecondKey,secondKey);\n\n //(3)enter Third Key\n driver.findElement(By.xpath(\"//input[@id='target']\")).sendKeys(\"C\");\n //collect the result\n String ThirdKey=driver.findElement(By.xpath(\"//p[@id='result']\")).getText();\n //expected result\n String expectedThirdKey=\"You entered: C\";\n //Assert.assertEquals(expectedFirstKey.equalsIgnoreCase());\n Assert.assertEquals(expectedThirdKey,ThirdKey);\n\n //(4)enter Fourth Key\n driver.findElement(By.xpath(\"//input[@id='target']\")).sendKeys(\"D\");\n //collect the result\n String fourthKey=driver.findElement(By.xpath(\"//p[@id='result']\")).getText();\n //expected result\n String expectedFourthKey=\"You entered: D\";\n //Assert.assertEquals(expectedFirstKey.equalsIgnoreCase());\n Assert.assertEquals(expectedFourthKey,fourthKey);\n }",
"@When(\"^enter the value in the search selenuim text box$\")\n\tpublic void enter_the_value_in_the_search_selenuim_text_box() throws Throwable {\n\t\tdriver.findElement(By.xpath(\"//input[@id='gsc-i-id1']\")).sendKeys(\"cucumber\");\n\t // throw new PendingException();\n\t}",
"public void LimpiarCampos() {\n\n txtIdAsignarPer.setText(\"\");\n txtNombreusu.setText(\"\");\n pswConfCont.setText(\"\");\n combPerf.setSelectedItem(\"\");\n pswContra.setText(\"\");\n txtDocumento.setText(\"\");\n }",
"private void populateForm() {\n Part selectedPart = (Part) PassableData.getPartData();\n partPrice.setText(String.valueOf(selectedPart.getPrice()));\n partName.setText(selectedPart.getName());\n inventoryCount.setText(String.valueOf(selectedPart.getStock()));\n partId.setText(String.valueOf(selectedPart.getId()));\n maximumInventory.setText(String.valueOf(selectedPart.getMax()));\n minimumInventory.setText(String.valueOf(selectedPart.getMin()));\n\n if (PassableData.isOutsourced()) {\n Outsourced part = (Outsourced) selectedPart;\n variableTextField.setText(part.getCompanyName());\n outsourced.setSelected(true);\n\n } else if (!PassableData.isOutsourced()) {\n InHouse part = (InHouse) selectedPart;\n variableTextField.setText(String.valueOf(part.getMachineId()));\n inHouse.setSelected(true);\n }\n\n\n }",
"@Override\r\n public void actionPerformed(ActionEvent e) {\n String texto = tf.getText();\r\n //lo seteo como texto en el Label\r\n lab.setText(texto);\r\n //refresco los componentes de la ventana\r\n validate();\r\n //combierto a mayuscula el texto del textfield\r\n tf.setText(texto.toUpperCase());\r\n //lo selecciono todo\r\n tf.selectAll();\r\n }",
"@Test\n public void EmplicitWaitTest() {\n\n Driver.getDriver().get(\"https://the-internet.herokuapp.com/dynamic_controls\");\n\n //click on enable\n Driver.getDriver().findElement(By.xpath(\"//form[@id='input-example']//button\")).click();\n\n\n // this is a class used to emplicit wait\n WebDriverWait wait = new WebDriverWait(Driver.getDriver(), 10);//creating object\n //this is when wait happens\n // we are waiting for certain element this xpath is clicable\n wait.until(//waiting\n ExpectedConditions.elementToBeClickable(//to click\n By.xpath(\"//input[@type='text']\")));//clicking by the xpath\n\n\n\n //eneter text\n\n Driver.getDriver().findElement(By.xpath(\"//input[@type='text']\")).sendKeys(\"Hello World\");\n\n\n }",
"public static void main(String[] args) throws AWTException {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"E:\\\\chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\t//driver.get(\"http://www.google.co.in\");\r\n\t\tdriver.get(\"http://www.leafground.com/pages/checkbox.html\");\r\n\t\t//Search elements\r\n\t\t\r\n\t\t//WebElement name=driver.findElement(By.name(\"q\"));\r\n\t\t//name.sendKeys(\"Tiruchy \\n\"); //Using SendKeys\r\n //name.sendKeys(\"Oracle\" +Keys.ENTER);\r\n\t\t//name.sendKeys(\"Pollachi\");\r\n\t\t//name.submit();\r\n\t\t/*Robot robot=new Robot();\r\n\t\trobot.keyPress(KeyEvent.VK_J);\r\n\t\trobot.keyRelease(KeyEvent.VK_J);\r\n\t\trobot.keyPress(KeyEvent.VK_A);\r\n\t\trobot.keyRelease(KeyEvent.VK_A);\r\n\t\trobot.keyPress(KeyEvent.VK_V);\r\n\t\trobot.keyRelease(KeyEvent.VK_V);\r\n\t\trobot.keyPress(KeyEvent.VK_A);\r\n\t\trobot.keyRelease(KeyEvent.VK_A);\r\n\t\trobot.keyPress(KeyEvent.VK_ENTER);\r\n\t\trobot.keyRelease(KeyEvent.VK_ENTER);*/\r\n\t\t\r\n\t\t//-------------------SendKeys Without Selenium--------------------------------------------\r\n\t\t\r\n\t\t// Robot class,sendkeys, activeElement\r\n\t\t\r\n\t\t/* JavascriptExecutor executor=(JavascriptExecutor) driver;\r\n\t\texecutor.executeScript(\"arguments[0].value='Pollachi'\", name); */\r\n\t\t\r\n\t\t/*driver.switchTo().activeElement();\r\n\t\tRobot robot=new Robot();\r\n\t\trobot.keyPress(KeyEvent.VK_J);\r\n\t\trobot.keyRelease(KeyEvent.VK_J);\r\n\t\trobot.keyPress(KeyEvent.VK_A);\r\n\t\trobot.keyRelease(KeyEvent.VK_A);\r\n\t\trobot.keyPress(KeyEvent.VK_V);\r\n\t\trobot.keyRelease(KeyEvent.VK_V);\r\n\t\trobot.keyPress(KeyEvent.VK_A);\r\n\t\trobot.keyRelease(KeyEvent.VK_A);\r\n\t\trobot.keyPress(KeyEvent.VK_ENTER);\r\n\t\trobot.keyRelease(KeyEvent.VK_ENTER); */\r\n\t\t\r\n\t\t//---------------select all check boxes------------\r\n\t\t\r\n\t\tList<WebElement> cb=driver.findElements(By.xpath(\"//input[@type='checkbox']\"));\r\n\t\tfor (WebElement element : cb) {\r\n\t\t\telement.click();\r\n\t\t\t\r\n\t\t}\r\n\t}",
"@Test\n public void enterTextInSearchField() {\n WebDriverWait wait = new WebDriverWait(driver, 5);\n\n // Afterwards, we need to inform WebDriver to wait until an expected condition is met\n // The ExpectedConditions class supplies many methods for dealing with scenarios that may occur before\n // executing the next Test Step\n }",
"private void popularTextFields(Promocao promocaoAntigo2) {\n\t\ttextFieldNome.setText(promocaoAntigo2.getNome());\n\t\ttextFieldDescricao.setText(promocaoAntigo2.getDescricao());\n\n\t}",
"public void emptyTextField(){\n spelerIDField.setText(\"\");\n typeField.setText(\"\");\n codeField.setText(\"\");\n heeftBetaaldField.setText(\"\");\n }",
"private void initiateRiotPointsPurchaseFields(JFrame frame) {\r\n JLabel q7 = new JLabel(\"Make purchase for mainAccount or altAccount?\");\r\n// q7.setPreferredSize(new Dimension(1000, 100));\r\n// q7.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new Label(q7);\r\n frame.add(q7);\r\n\r\n JTextField account = new JTextField();\r\n// account.setPreferredSize(new Dimension(1000, 100));\r\n// account.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new TextField(account);\r\n frame.add(account);\r\n\r\n JLabel q8 = new JLabel(\"Name of the champion you wish to purchase?\");\r\n// q8.setPreferredSize(new Dimension(1000, 100));\r\n// q8.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new Label(q8);\r\n frame.add(q8);\r\n\r\n JTextField name = new JTextField();\r\n// name.setPreferredSize(new Dimension(1000, 100));\r\n// name.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n new TextField(name);\r\n frame.add(name);\r\n\r\n ImageIcon icon = new ImageIcon(\"./data/shopicon.JPG\");\r\n JLabel label = new JLabel(icon);\r\n label.setPreferredSize(new Dimension(750, 100));\r\n frame.add(label);\r\n\r\n initiateRiotPointsPurchaseEnter(frame, account, name);\r\n }",
"@Override\n public void run() {\n TextInputEditText itemName = activityTestRule.getActivity().findViewById(R.id.sell_item_name),\n itemDesc = activityTestRule.getActivity().findViewById(R.id.sell_item_desc),\n itemPrice = activityTestRule.getActivity().findViewById(R.id.sell_item_price);\n\n itemName.setText(\"sddfg\");\n itemDesc.setText(\"dsfdsf\");\n itemPrice.setText(\"12.5\");\n\n activityTestRule.getActivity().findViewById(R.id.sell_button).performClick();\n }",
"private void setTextboxesToContainedData()\n {\n updateWeightTextFieldToStored(\"failure loading default\");\n updateSpriteTextFieldToStored(\"failure loading default\");\n }",
"private static void activateFinals() {\n finalTextField1.setEditable(true);\n finalTextField2.setEditable(true);\n }",
"public void setFocus();",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tadd_values_box();\n\t\t\t\tadd_button.setBounds(endof_box_pos + 5 , 0, 20,20);\n\t\t\t\tremove_button.setBounds(endof_box_pos + 30, 0, 20, 20);\n\t\t\t\tset_button.setBounds(endof_box_pos + 55, 0, 30, 20);\n\t\t\t\tString_box_pane.setSize(endof_box_pos + 110, 20);\n\t\t\t}",
"private void setAddrInputFields(){\n \ttextFieldCurrents.put(jTextFieldStart, jTextFieldStart.getText());\n\t\ttextFieldCurrents.put(jTextFieldEnd, jTextFieldEnd.getText());\n\t\tselectedFormat = jComboBoxFormat.getSelectedIndex();\n\t\tquickSearch = jCheckBoxQuickSearch.isSelected();\n }",
"public void fillForm() {\n\t\t// fills the name field with nameOfProject\n\t\tprojName.sendKeys(nameOfProject);\n\t\t// selects the first option from the 'Client partner' dropdown list\n\t\tSelect sel = new Select(clientList);\n\t\tsel.selectByIndex(1);\n\t\t// enters valid date data\n\t\tstartDate.sendKeys(\"06042018\");\n\t\tendDate.sendKeys(\"06052018\");\n\t}",
"private void initialize()\r\n\t{\r\n\t\tframe = new JFrame();\r\n\t\tframe.getContentPane().setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\tframe.setBounds(100, 100, 1200, 733);\r\n\t\tframe.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\r\n\r\n\t\tJLabel Enter = new JLabel(\"Enter the User Details\");\r\n\t\tEnter.setForeground(Color.WHITE);\r\n\t\tEnter.setBounds(398, 32, 392, 72);\r\n\t\tEnter.setFont(new Font(\"Bodoni MT Black\", Font.PLAIN, 32));\r\n\r\n\t\tJLabel lblName = new JLabel(\"First Name :\");\r\n\t\tlblName.setForeground(Color.WHITE);\r\n\t\tlblName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblName.setBounds(184, 179, 124, 25);\r\n\r\n\t\ttextField = new JTextField();\r\n\t\ttextField.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField.setBounds(347, 178, 171, 35);\r\n\t\ttextField.setColumns(10);\r\n\r\n\t\tJLabel lblAadharNo = new JLabel(\"Aadhar No :\");\r\n\t\tlblAadharNo.setForeground(Color.WHITE);\r\n\t\tlblAadharNo.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblAadharNo.setBounds(604, 179, 116, 25);\r\n\r\n\t\ttextField_1 = new JTextField();\r\n\t\ttextField_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_1.setBounds(740, 178, 296, 35);\r\n\t\ttextField_1.setColumns(10);\r\n\r\n\t\tJLabel lblAddress = new JLabel(\"Address :\");\r\n\t\tlblAddress.setForeground(Color.WHITE);\r\n\t\tlblAddress.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblAddress.setBounds(604, 242, 94, 25);\r\n\r\n\t\ttextField_2 = new JTextField();\r\n\t\ttextField_2.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_2.setBounds(740, 242, 296, 35);\r\n\t\ttextField_2.setColumns(10);\r\n\r\n\t\ttextField_3 = new JTextField();\r\n\t\ttextField_3.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_3.setBounds(740, 304, 171, 35);\r\n\t\ttextField_3.setColumns(10);\r\n\r\n\t\tJLabel lblPhoneNo = new JLabel(\"Phone No:\");\r\n\t\tlblPhoneNo.setForeground(Color.WHITE);\r\n\t\tlblPhoneNo.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblPhoneNo.setBounds(604, 309, 99, 25);\r\n\r\n\t\tJLabel label = new JLabel(\"\");\r\n\t\tlabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlabel.setBounds(398, 636, 392, 42);\r\n\t\tframe.getContentPane().add(label);\r\n\r\n\t\t\r\n\r\n\t\t\r\n\t\tJButton btnPrev = new JButton(\"prev\");\r\n\t\tbtnPrev.setBackground(new Color(255, 255, 102));\r\n\t\tbtnPrev.setIcon(null);\r\n\t\tbtnPrev.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnPrev.setBounds(0, 643, 106, 43);\r\n\t\tbtnPrev.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent arg0) \r\n\t\t\t{\r\n\t\t\t\tUsers u=new Users();\r\n\t\t\t\tframe.setVisible(false);\r\n\t\t\t\tu.frame.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tframe.getContentPane().setLayout(null);\r\n\t\tframe.getContentPane().add(Enter);\r\n\t\tframe.getContentPane().add(lblName);\r\n\t\tframe.getContentPane().add(textField);\r\n\t\tframe.getContentPane().add(lblAadharNo);\r\n\t\tframe.getContentPane().add(textField_1);\r\n\t\tframe.getContentPane().add(lblAddress);\r\n\t\tframe.getContentPane().add(textField_2);\r\n\t\tframe.getContentPane().add(textField_3);\r\n\t\tframe.getContentPane().add(lblPhoneNo);\r\n\r\n\t\tframe.getContentPane().add(btnPrev);\r\n\r\n\t\ttextField_4 = new JTextField();\r\n\t\ttextField_4.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_4.setBounds(347, 241, 171, 35);\r\n\t\tframe.getContentPane().add(textField_4);\r\n\t\ttextField_4.setColumns(10);\r\n\r\n\t\tJLabel lblMiddleName = new JLabel(\"Middle Name:\");\r\n\t\tlblMiddleName.setForeground(Color.WHITE);\r\n\t\tlblMiddleName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblMiddleName.setBounds(184, 241, 129, 26);\r\n\t\tframe.getContentPane().add(lblMiddleName);\r\n\r\n\t\ttextField_5 = new JTextField();\r\n\t\ttextField_5.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_5.setColumns(10);\r\n\t\ttextField_5.setBounds(347, 308, 171, 35);\r\n\t\tframe.getContentPane().add(textField_5);\r\n\t\t\r\n\t\tJLabel lblTestResult = new JLabel(\"Test Result :\");\r\n\t\tlblTestResult.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblTestResult.setForeground(Color.WHITE);\r\n\t\tlblTestResult.setBounds(184, 376, 124, 35);\r\n\t\tframe.getContentPane().add(lblTestResult);\r\n\t\t\r\n\t\ttextField_6 = new JTextField();\r\n\t\ttextField_6.setFont(new Font(\"Tahoma\", Font.PLAIN, 18));\r\n\t\ttextField_6.setBounds(347, 376, 171, 35);\r\n\t\tframe.getContentPane().add(textField_6);\r\n\t\ttextField_6.setColumns(10);\r\n\r\n\t\tJLabel lblLastName = new JLabel(\"Last Name:\");\r\n\t\tlblLastName.setForeground(Color.WHITE);\r\n\t\tlblLastName.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tlblLastName.setBounds(184, 308, 116, 26);\r\n\t\tframe.getContentPane().add(lblLastName);\r\n\t\t\r\n\t\tJButton btnSubmit = new JButton(\"Submit\");\r\n\t\tbtnSubmit.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (e.getSource() == btnSubmit)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t { \r\n\t\t\t\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\t\t Connection conn = null;\r\n\t\t\t\t conn = DriverManager.getConnection(\"jdbc:mysql://localhost/rto\",\"root\", \"\"); \r\n\t\t\t\t System.out.print(\"Database is connected !\");\r\n\t\t\t\t Statement stmt = conn.createStatement();\r\n\r\n\t\t\t\t String q1 = \"insert into users(FName,MName,LName,aadhar,address,phno) values('\" +textField.getText() + \r\n\t\t\t\t \"','\" + textField_4.getText()+ \"','\"+textField_5.getText()+\r\n\t\t\t\t \"',\"+textField_1.getText()+\",'\"+textField_2.getText()+\"',\"+textField_3.getText()+\")\";\r\n\t\t\t\t int a=stmt.executeUpdate(q1);\r\n\t\t\t\t label.setText(\"User Successfully Inserted.\");\r\n\t\t\t\t conn.close(); \r\n\t\t\t } \r\n\t\t\t catch(Exception ex) \r\n\t\t\t { \r\n\t\t\t System.out.println(ex); \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnSubmit.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnSubmit.setBounds(460, 480, 129, 42);\r\n\r\n\t\tframe.getContentPane().add(btnSubmit);\r\n\t\t\r\n\t\tJButton btnUpdate = new JButton(\"Update\");\r\n\t\tbtnUpdate.addActionListener(new ActionListener()\r\n\t\t{\r\n\t\t\tpublic void actionPerformed(ActionEvent e)\r\n\t\t\t{\r\n\r\n\t\t\t\tif (e.getSource() == btnUpdate)\r\n\t\t\t\t{\r\n\t\t\t\t\ttry\r\n\t\t\t { \r\n\t\t\t\t\t\t Class.forName(\"com.mysql.jdbc.Driver\"); \r\n\t\t\t\t Connection conn = null;\r\n\t\t\t\t conn = DriverManager.getConnection(\"jdbc:mysql://localhost/rto\",\"root\", \"\"); \r\n\t\t\t\t System.out.print(\"Database is connected !\");\r\n\t\t\t\t Statement stmt = conn.createStatement();\r\n\r\n\t\t\t\t String q1 = \"update users set D_Test='\" +textField_6.getText() + \"' where aadhar=\"+textField_1.getText();\r\n\t\t\t\t int a=stmt.executeUpdate(q1);\r\n\t\t\t\t label.setText(\"User Successfully Inserted.\");\r\n\t\t\t\t conn.close(); \r\n\t\t\t } \r\n\t\t\t catch(Exception ex) \r\n\t\t\t { \r\n\t\t\t System.out.println(ex); \r\n\t\t\t }\r\n\t\t\t }\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnUpdate.setFont(new Font(\"Tahoma\", Font.PLAIN, 20));\r\n\t\tbtnUpdate.setBounds(613, 480, 129, 42);\r\n\r\n\t\tframe.getContentPane().add(btnUpdate);\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tJLabel lblNewLabel = new JLabel(\"New label\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\tlblNewLabel.setIcon(new ImageIcon(\"C:\\\\Users\\\\LC\\\\eclipse-workspace\\\\RTOproject\\\\images\\\\pic8alter - Copy.png\"));\r\n\t\tlblNewLabel.setBounds(0, 11, 1182, 686);\r\n\t\tframe.getContentPane().add(lblNewLabel);\r\n\t\t\r\n\t\t\r\n\r\n\r\n\t}",
"private void createPageContent() \n\t{\n\t\tGridLayout gl = new GridLayout(4, true);\n gl.verticalSpacing = 10;\n\t\t\n\t\tGridData gd;\n\t\tfinal Label wiz1Label = new Label(shell, SWT.NONE);\n\t\twiz1Label.setText(\"Enter Fields\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\twiz1Label.setLayoutData(gd);\n\t\twiz1Label.pack();\n\t\tText nameInput = new Text(shell, SWT.BORDER);\n\t\tnameInput.setMessage(\"Name\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tnameInput.setLayoutData(gd);\n\t\tnameInput.pack();\n\t\t//Component\n\t\tText componentInput = new Text(shell, SWT.BORDER);\n\t\tcomponentInput.setMessage(\"Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcomponentInput.setLayoutData(gd);\n\t\tcomponentInput.pack();\n\t\t//school\n\t\tText schoolInput = new Text(shell, SWT.BORDER);\n\t\tschoolInput.setMessage(\"School\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tschoolInput.setLayoutData(gd);\n\t\tschoolInput.pack();\n\t\t//range\n\t\tText rangeInput = new Text(shell, SWT.BORDER);\n\t\trangeInput.setMessage(\"Range\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\trangeInput.setLayoutData(gd);\n\t\trangeInput.pack();\n\t\t//Effect\n\t\tText effectInput = new Text(shell, SWT.BORDER);\n\t\teffectInput.setMessage(\"Effect\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\teffectInput.setLayoutData(gd);\n\t\teffectInput.pack();\n\t\t//castingtime\n\t\tText castimeInput = new Text(shell, SWT.BORDER);\n\t\tcastimeInput.setMessage(\"Casting Time\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tcastimeInput.setLayoutData(gd);\n\t\tcastimeInput.pack();\n\t\t//materialcomponent\n\t\tText materialInput = new Text(shell, SWT.BORDER);\n\t\tmaterialInput.setMessage(\"Material Component\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tmaterialInput.setLayoutData(gd);\n\t\tmaterialInput.pack();\n\t\t//Savingthrow\n\t\tText savthrowInput = new Text(shell, SWT.BORDER);\n\t\tsavthrowInput.setMessage(\"Saving Throw\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tsavthrowInput.setLayoutData(gd);\n\t\tsavthrowInput.pack();\n\t\t//Focus\n\t\tText focusInput = new Text(shell, SWT.BORDER);\n\t\tfocusInput.setMessage(\"Focus\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 2;\n\t\tfocusInput.setLayoutData(gd);\n\t\tfocusInput.pack();\n\t\t//Duration\n\t\tText durationInput = new Text(shell, SWT.BORDER);\n\t\tdurationInput.setMessage(\"Duration\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdurationInput.setLayoutData(gd);\n\t\tdurationInput.pack();\n\t\t//spellresistance\n\t\tLabel resistanceLabel = new Label(shell, SWT.NONE);\n\t\tresistanceLabel.setText(\"Can Spell Be Resisted\");\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceLabel.setLayoutData(gd);\n\t\tresistanceLabel.pack();\n\t\tButton resistanceInput = new Button(shell, SWT.CHECK);\n\t\tgd = new GridData(GridData.CENTER, GridData.FILL, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tresistanceInput.setLayoutData(gd);\n\t\tresistanceInput.pack();\n\t\t//level\n\t\tText levelInput = new Text(shell, SWT.BORDER);\n\t\tlevelInput.setMessage(\"Level\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, false, false);\n\t\tlevelInput.setLayoutData(gd);\n\t\tlevelInput.pack();\n\t\t//Damage\n\t\tText damageInput = new Text(shell, SWT.BORDER);\n\t\tdamageInput.setMessage(\"Damage\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 1;\n\t\tdamageInput.setLayoutData(gd);\n\t\tdamageInput.pack();\n\t\t//DamageAlternative\n\t\tText damagealterInput = new Text(shell, SWT.BORDER);\n\t\tdamagealterInput.setMessage(\"Damage Alternative\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 2;\n\t\tdamagealterInput.setLayoutData(gd);\n\t\tdamagealterInput.pack();\n\t\n\t\t//description\n\t\t\n\t\tText descriptionInput = new Text(shell, SWT.WRAP | SWT.V_SCROLL);\n\t\tdescriptionInput.setText(\"Description (Optional)\");\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, false);\n\t\tgd.horizontalSpan = 4;\n\t\tgd.verticalSpan = 15;\n\t\tdescriptionInput.setLayoutData(gd);\n\t\tdescriptionInput.pack();\n\t\tLabel blank = new Label(shell, SWT.NONE);\n\t\tgd = new GridData(GridData.FILL, GridData.FILL, true, true);\n\t\tgd.horizontalSpan = 4;\n\t\tblank.setLayoutData(gd);\n\t\tblank.pack();\n\t\tButton save = new Button(shell, SWT.PUSH);\n\n\t\tsave.setText(\"Save\");\n\t\tsave.addListener(SWT.Selection, new Listener()\n\t\t{\n\t\t\tpublic void handleEvent(Event event)\n\t\t\t{\n\t\t\t\tBoolean checkfault = false;\n\t\t\t\tLinkedHashMap<String, String> a = new LinkedHashMap<String, String>();\n\t\t\t\tif(nameInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tnameInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(componentInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcomponentInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(schoolInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tschoolInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(castimeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tcastimeInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(levelInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\tcheckfault = true;\n\t\t\t\t\tlevelInput.setBackground(display.getSystemColor(SWT.COLOR_RED));\n\t\t\t\t}\n\t\t\t\tif(checkfault)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\ta.put(\"NAME\", nameInput.getText());\n\t\t\t\ta.put(\"COMPONENTS\", componentInput.getText());\n\t\t\t\ta.put(\"SCHOOL\", schoolInput.getText());\n\t\t\t\ta.put(\"CASTINGTIME\", castimeInput.getText());\n\t\t\t\ta.put(\"LEVEL\", levelInput.getText());\n\t\t\t\tif(resistanceInput.getSelection())\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"YES\");\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SPELLRESISTANCE\", \"NO\");\n\t\t\t\t}\n\t\t\t\tif(!materialInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"MATERIALCOMPONENT\", materialInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!savthrowInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"SAVINGTHROW\", savthrowInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!focusInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"FOCUS\", focusInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!durationInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DURATION\", durationInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damageInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGE\", damageInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!damagealterInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"DAMAGEALTERNATE\", damagealterInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!rangeInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"RANGE\", rangeInput.getText());\n\t\t\t\t}\n\t\t\t\tif(!effectInput.getText().equals(\"\"))\n\t\t\t\t{\n\t\t\t\t\ta.put(\"EFFECT\", effectInput.getText());\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\ta.put(\"DESCRIPTION\", descriptionInput.getText());\n\t\t\t\tnewspell = new SpellEntity(a);\n\t\t\t\tMain.gameState.abilities.put(newspell.getName(), newspell);\n\t\t\t\tMain.gameState.customContent.put(newspell.getName(), newspell);\n\t\t\t\tshell.close();\n\t\t\t}\n\t\t}\n\t\t);\n\t\tgd = new GridData(GridData.FILL, GridData.CENTER, false, false);\n\t\tgd.horizontalSpan = 1;\n\t\tsave.setLayoutData(gd);\n\t\tsave.pack();\n\t\tshell.setLayout(gl);\n\t\tshell.layout();\n\t\tshell.pack();\n//\t\t//wizard\n//\t\t\t\tfinal Composite wizPanel = new Composite(shell, SWT.BORDER);\n//\t\t\t\twizPanel.setBounds(0,0,WIDTH, HEIGHT);\n//\t\t\t\tfinal StackLayout wizLayout = new StackLayout();\n//\t\t\t\twizPanel.setLayout(wizLayout);\n//\t\t\t\t\n//\t\t\t\t//Page1 -- Name\n//\t\t\t\tfinal Composite wizpage1 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\twizpage1.setBounds(0,0,WIDTH,HEIGHT);\n//\t\t\t\t\n//\t\t\t\tfinal Label wiz1Label = new Label(wizpage1, SWT.NONE);\n//\t\t\t\twiz1Label.setText(\"Enter Name (required)\");\n//\t\t\t\twiz1Label.pack();\n//\t\t\t\tfinal Text wizpage1text = new Text(wizpage1, SWT.BORDER);\n//\t\t\t\twizpage1text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage1text.setText(\"FireBall\");\n//\t\t\t\tButton next1 = createNextButton(wizpage1);//TODO cancel and previous button\n//\t\t\t\tcreateBackButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage1, wizPanel, wizLayout);\n//\t\t\t\tnext1.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage1text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellname = wizpage1text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tSystem.out.println(\"PANIC: ITEM WIZARD PAGE 1 OUT\");\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz1Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t\t);\n//\t\t\t\t\n//\t\t\t\twizPages.add(wizpage1);\n//\t\t\t\t//Page2 -- component\n//\t\t\t\tfinal Composite wizpage2 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz2Label = new Label(wizpage2, SWT.NONE);\n//\t\t\t\twiz2Label.setText(\"Enter Component: (required)\");\n//\t\t\t\twiz2Label.pack();\n//\t\t\t\tfinal Text wizpage2text = new Text(wizpage2, SWT.BORDER);\n//\t\t\t\twizpage2text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage2text.setText(\"Fire\");\n//\t\t\t\tButton next2 = createNextButton(wizpage2);\n//\t\t\t\tcreateBackButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage2, wizPanel, wizLayout);\n//\t\t\t\tnext2.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage2text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellcomp = wizpage2text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz2Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage2);\n//\t\t\t\t//Page3 -- School\n//\t\t\t\tfinal Composite wizpage3 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz3Label = new Label(wizpage3, SWT.NONE);\n//\t\t\t\twiz3Label.setText(\"Enter School: (required)\");\n//\t\t\t\twiz3Label.pack();\n//\t\t\t\tfinal Text wizpage3text = new Text(wizpage3, SWT.BORDER);\n//\t\t\t\twizpage3text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage3text.setText(\"Descruction\");\n//\t\t\t\tButton next3 = createNextButton(wizpage3);\n//\t\t\t\tcreateBackButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage3, wizPanel, wizLayout);\n//\t\t\t\tnext3.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage3text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellschool = wizpage3text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz3Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage3);\n//\t\t\t\t//Page4 -- Range\n//\t\t\t\tfinal Composite wizpage4 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz4Label = new Label(wizpage4, SWT.NONE);\n//\t\t\t\twiz4Label.setText(\"Enter Range: (required)\");\n//\t\t\t\twiz4Label.pack();\n//\t\t\t\tfinal Text wizpage4text = new Text(wizpage4, SWT.BORDER);\n//\t\t\t\twizpage4text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage4text.setText(\"50 feet\");\n//\t\t\t\tButton next4 = createNextButton(wizpage4);\n//\t\t\t\tcreateBackButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage4, wizPanel, wizLayout);\n//\t\t\t\tnext4.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage4text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellrange = wizpage4text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz4Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage4);\n//\t\t\t\t//Page5 -- effect\n//\t\t\t\tfinal Composite wizpage5 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz5Label = new Label(wizpage5, SWT.NONE);\n//\t\t\t\twiz5Label.setText(\"Enter Effect: (required)\");\n//\t\t\t\twiz5Label.pack();\n//\t\t\t\tfinal Text wizpage5text = new Text(wizpage5, SWT.BORDER);\n//\t\t\t\twizpage5text.setBounds(50, 50, 250, 150);\n//\t\t\t\twizpage5text.setText(\"No effect\");\n//\t\t\t\tButton next5 = createNextButton(wizpage5);\n//\t\t\t\tcreateBackButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage5, wizPanel, wizLayout);\n//\t\t\t\tnext5.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelleffect = wizpage5text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz5Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage5);\n//\t\t\t\t//Page6 -- casting time\n//\t\t\t\tfinal Composite wizpage6 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz6Label = new Label(wizpage6, SWT.NONE);\n//\t\t\t\twiz6Label.setText(\"Enter Casting Time: (required)\");\n//\t\t\t\twiz6Label.pack();\n//\t\t\t\tfinal Text wizpage6text = new Text(wizpage6, SWT.BORDER);\n//\t\t\t\twizpage6text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage6text.setText(\"1 turn\");\n//\t\t\t\tButton next6 = createNextButton(wizpage6);\n//\t\t\t\tcreateBackButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage6, wizPanel, wizLayout);\n//\t\t\t\tnext6.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage5text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellcastime = wizpage6text.getText();\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz6Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage6);\n//\t\t\t\t//Page7 -- Material Component\n//\t\t\t\tfinal Composite wizpage7 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz7Label = new Label(wizpage7, SWT.NONE);\n//\t\t\t\twiz7Label.setText(\"Enter Material Component: (required)\");\n//\t\t\t\twiz7Label.pack();\n//\t\t\t\tfinal Text wizpage7text = new Text(wizpage7, SWT.BORDER);\n//\t\t\t\twizpage7text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage7text.setText(\"None\");\n//\t\t\t\tButton next7 = createNextButton(wizpage7);\n//\t\t\t\tcreateBackButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage7, wizPanel, wizLayout);\n//\t\t\t\tnext7.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage7text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellmaterial = wizpage7text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz7Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage7);\n//\t\t\t\t//Page8 -- saving throw\n//\t\t\t\tfinal Composite wizpage8 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz8Label = new Label(wizpage8, SWT.NONE);\n//\t\t\t\twiz8Label.setText(\"Enter Saving Throw: (required)\");\n//\t\t\t\twiz8Label.pack();\n//\t\t\t\tfinal Text wizpage8text = new Text(wizpage8, SWT.BORDER);\n//\t\t\t\twizpage8text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage8text.setText(\"Will negate XX\");\n//\t\t\t\tButton next8 = createNextButton(wizpage8);\n//\t\t\t\tcreateBackButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage8, wizPanel, wizLayout);\n//\t\t\t\tnext8.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage8text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellsaving = wizpage8text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz8Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage8);\n//\t\t\t\t//Page9 -- Focus\n//\t\t\t\tfinal Composite wizpage9 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz9Label = new Label(wizpage9, SWT.NONE);\n//\t\t\t\twiz9Label.setText(\"Enter Focus: (required)\");\n//\t\t\t\twiz9Label.pack();\n//\t\t\t\tfinal Text wizpage9text = new Text(wizpage9, SWT.BORDER);\n//\t\t\t\twizpage9text.setBounds(50, 50, 200, 100);\n//\t\t\t\twizpage9text.setText(\"A dart\");\n//\t\t\t\tButton next9 = createNextButton(wizpage9);\n//\t\t\t\tcreateBackButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage9, wizPanel, wizLayout);\n//\t\t\t\tnext9.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage9text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellfocus = wizpage9text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz9Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage9);\n//\t\t\t\t//Page10 -- Duration\n//\t\t\t\tfinal Composite wizpage10 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz10Label = new Label(wizpage10, SWT.NONE);\n//\t\t\t\twiz10Label.setText(\"Enter Duration: (required)\");\n//\t\t\t\twiz10Label.pack();\n//\t\t\t\tfinal Text wizpage10text = new Text(wizpage10, SWT.BORDER);\n//\t\t\t\twizpage10text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage10text.setText(\"5 Turns\");\n//\t\t\t\tButton next10 = createNextButton(wizpage10);\n//\t\t\t\tcreateBackButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage10, wizPanel, wizLayout);\n//\t\t\t\tnext10.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage10text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellduration = wizpage10text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz10Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage10);\n//\t\t\t\t//Page11 -- Level\n//\t\t\t\tfinal Composite wizpage11 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz11Label = new Label(wizpage11, SWT.NONE);\n//\t\t\t\twiz11Label.setText(\"Enter Level (required)\");\n//\t\t\t\twiz11Label.pack();\n//\t\t\t\tfinal Text wizpage11text = new Text(wizpage11, SWT.BORDER);\n//\t\t\t\twizpage11text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage11text.setText(\"1\");\n//\t\t\t\tButton next11 = createNextButton(wizpage11);\n//\t\t\t\tcreateBackButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage11, wizPanel, wizLayout);\n//\t\t\t\tnext11.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage11text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\ttry\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tif(Integer.parseInt(wizpage11text.getText()) >= 0)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspelllevel = String.valueOf(Integer.parseInt(wizpage11text.getText()));\n//\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\tcatch(NumberFormatException a)\n//\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz11Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage11);\n//\t\t\t\t//Page12 -- resistance\n//\t\t\t\tfinal Composite wizpage12 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tfinal Label wiz12Label = new Label(wizpage12, SWT.NONE);\n//\t\t\t\twiz12Label.setText(\"Enter Spell resistance: (Yes/No)\");\n//\t\t\t\twiz12Label.pack();\n//\t\t\t\tfinal Text wizpage12text = new Text(wizpage12, SWT.BORDER);\n//\t\t\t\twizpage12text.setBounds(50, 50, 150, 50);\n//\t\t\t\twizpage12text.setText(\"Yes\");\n//\t\t\t\tButton next12 = createNextButton(wizpage12);\n//\t\t\t\tcreateBackButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage12, wizPanel, wizLayout);\n//\t\t\t\tnext12.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage12text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\tspellresistance = wizpage12text.getText();\n//\t\t\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t\t\t{\n//\t\t\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t\t\t}\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twiz12Label.setBackground(display.getSystemColor(SWT.COLOR_RED));\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\t\t\t\n//\n//\n//\t\t\t\t\t}\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage12);\n//\t\t\t\t//Page13 - Description\n//\t\t\t\tfinal Composite wizpage13 = new Composite(wizPanel, SWT.NONE);\n//\t\t\t\tLabel wiz13Label = new Label(wizpage13, SWT.NONE);\n//\t\t\t\twiz13Label.setText(\"Enter Description (Optional)\");\n//\t\t\t\twiz13Label.pack(); \n//\t\t\t\tfinal Text wizpage13text = new Text(wizpage13, SWT.BORDER);\n//\t\t\t\twizpage13text.setBounds(50, 50, 300, 200);\n//\t\t\t\twizpage13text.setText(\"Description here\");\n//\t\t\t\tButton next13 = createNextButton(wizpage13);\n//\t\t\t\tcreateBackButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tcreateCancelButton(wizpage13, wizPanel, wizLayout);\n//\t\t\t\tnext13.addListener(SWT.Selection, new Listener()\n//\t\t\t\t{\n//\t\t\t\t\tpublic void handleEvent(Event event)\n//\t\t\t\t\t{\n//\t\t\t\t\t\tif(wizpage13text.getText() != \"\")\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = wizpage13text.getText();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tspellscript = \"<empty>\";\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tCreateVerificationPage(wizPanel, wizLayout);\n//\t\t\t\t\t\tif(wizpagenum < wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\twizpagenum++;\n//\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\twizLayout.topControl = wizPages.get(wizpagenum);\n//\t\t\t\t\t\t\twizPanel.layout();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if(wizpagenum == wizPages.size() - 1)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tshell.close();\n//\t\t\t\t\t\t}\n//\t\t\t\t\t}\n//\n//\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t\twizPages.add(wizpage13);\n//\t\t\t\t\n//\t\t\t\twizLayout.topControl = wizpage1;\n//\t\t\t\twizPanel.layout();\n\t}",
"private void initiateBuyRiotPointsFields(JFrame frame) {\r\n JLabel q3 = new JLabel(\"Make purchase for mainAccount or altAccount?\");\r\n new Label(q3);\r\n// q3.setPreferredSize(new Dimension(750, 100));\r\n// q3.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(q3);\r\n\r\n JTextField account = new JTextField();\r\n new TextField(account);\r\n// account.setPreferredSize(new Dimension(750, 100));\r\n// account.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(account);\r\n\r\n JLabel q4 = new JLabel(\"Amount of money you wish to spend (5, 10, 20, 35, 50, or 100)$\");\r\n new Label(q4);\r\n// q4.setPreferredSize(new Dimension(750, 100));\r\n// q4.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(q4);\r\n\r\n JTextField amount = new JTextField();\r\n new TextField(amount);\r\n// amount.setPreferredSize(new Dimension(750, 100));\r\n// amount.setFont(new Font(\"Arial\", Font.PLAIN, 40));\r\n frame.add(amount);\r\n\r\n ImageIcon icon = new ImageIcon(\"./data/rp.JPG\");\r\n JLabel label = new JLabel(icon);\r\n label.setPreferredSize(new Dimension(750, 100));\r\n frame.add(label);\r\n\r\n initiateBuyRiotPointsEnter(frame, account, amount);\r\n }",
"@Override\r\n public void onClick(View view) {\n CheckEditTextIsEmptyOrNot();\r\n\r\n if(CheckEditText)\r\n {\r\n // if CheckEditText is true\r\n EventDataFunction(ename_holder,edesc_holder,eloc_holder,edate_holder,etime_holder,elat_holder,elong_holder);\r\n }\r\n else\r\n {\r\n // if CheckEditText is false\r\n Toast.makeText(AdminActivity.this,\"Please fill all the fields.\",Toast.LENGTH_LONG).show();\r\n }\r\n }",
"public void changeFields() throws Exception {\n jTextField1.setText(String.valueOf(article.getItemCode()));\n jTextField2.setText(article.getName());\n jTextField3.setText(String.valueOf(article.getBrandCode()));\n jTextField4.setText(String.valueOf(article.getSalePrice()));\n jTextField5.setText(String.valueOf(article.getCostPrice()));\n jTextField6.setText(String.valueOf(article.getStock()));\n jTextField7.setText(article.getObservation());\n jTextField8.setText(String.valueOf(article.getHeadingCode()));\n \n }",
"private void makeFormattedTextField(){\n textField = new JTextField(\"\"+ShapeFactory.getRoundness(), 3);\n //add listener that happens after each type and make the field accept only numbers between 0 to 100\n textField.addKeyListener(new KeyAdapter() {\n @Override\n public void keyTyped(KeyEvent e) {\n super.keyTyped(e);\n typeEvent(e);\n }\n });\n }",
"private void monitorTextChange() {\n List<TextInputEditText> textInputEditTextList = new ArrayList<>();\n textInputEditTextList.add(tin_perLitrePrice); // first line is selected automatically\n textInputEditTextList.add(tin_fuelQuantityLitres);\n textInputEditTextList.add(tin_totalFuelPrice);\n textInputEditTextList.add(tin_currentKm);\n textInputEditTextList.add(tin_startingKm);\n textInputEditTextList.add(tin_distanceCovered);\n\n for (TextInputEditText item : textInputEditTextList) {\n\n\n item.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n Log.d(TAG, \"afterTextChanged: \");\n fabSaveFuelData.hide(); // hide save button\n tv_calculatedAverage_addEdit.setText(\"--km/l\");\n }\n });\n }\n\n // tv_input_fuel_date is a TextView so we need to add this separately\n tv_input_fuel_date.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n }\n });\n }"
] | [
"0.584722",
"0.57992685",
"0.5750022",
"0.5747897",
"0.571959",
"0.56997937",
"0.56962",
"0.5685259",
"0.5682355",
"0.56533873",
"0.56529295",
"0.559333",
"0.5592568",
"0.5587179",
"0.5572478",
"0.55677253",
"0.55578536",
"0.55560946",
"0.5549557",
"0.55361444",
"0.5531053",
"0.55229574",
"0.5510333",
"0.5508071",
"0.5483577",
"0.54827774",
"0.5480203",
"0.54780775",
"0.54775363",
"0.54589564",
"0.5457577",
"0.5456099",
"0.5455183",
"0.5454331",
"0.54514974",
"0.5437734",
"0.54160804",
"0.5413828",
"0.5404235",
"0.53845525",
"0.5381213",
"0.5378259",
"0.53739685",
"0.5358417",
"0.5355573",
"0.53512347",
"0.5342681",
"0.5340301",
"0.5339142",
"0.53343475",
"0.5322195",
"0.5316629",
"0.53152984",
"0.5310807",
"0.530517",
"0.5301692",
"0.53001994",
"0.5299902",
"0.5296766",
"0.5295071",
"0.52844703",
"0.5280829",
"0.5277305",
"0.5276961",
"0.527284",
"0.5271275",
"0.5269689",
"0.5265209",
"0.52616096",
"0.52592015",
"0.52485996",
"0.52426773",
"0.5241248",
"0.52404505",
"0.5238247",
"0.52376384",
"0.5232573",
"0.52306557",
"0.5227027",
"0.52260554",
"0.5221183",
"0.52204317",
"0.52183276",
"0.5208196",
"0.52052903",
"0.5204622",
"0.5203687",
"0.51984775",
"0.5195042",
"0.5193594",
"0.5190714",
"0.5188571",
"0.5180999",
"0.51760226",
"0.5171434",
"0.5170947",
"0.51584435",
"0.5155081",
"0.5152104",
"0.51490146",
"0.51251215"
] | 0.0 | -1 |
Builds a DRACMA client that point to the specified server. | public DRACMAClient(URI serverURI) {
this.serverURI = serverURI;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static IDiscordClient getBuiltDiscordClient(String token) {\r\n // The ClientBuilder object is where you will attach your params for configuring the instance of your bot.\r\n // Such as withToken, setDaemon etc\r\n return new ClientBuilder()\r\n .withToken(token)\r\n .withPingTimeout(1)\r\n .withRecommendedShardCount()\r\n .build();\r\n }",
"private Client buildClient() {\n\t\tClient client = new Client();\n\t\tclient.setName(clientNameTextBox.getValue());\n\t\tclient.setAddress(clientAddressTextBox.getValue());\n\t\tclient.setTelephone(clientTelephoneTextBox.getValue());\n\t\treturn client;\n\t}",
"@Override\n public SessionClient build() {\n Supplier<CompletableFuture<SessionClient>> proxyFactory = () -> CompletableFuture.completedFuture(\n new DefaultRaftSessionClient(\n primitiveName,\n primitiveType,\n serviceConfig,\n partitionId,\n DefaultRaftClient.this.protocol,\n selectorManager,\n sessionManager,\n readConsistency,\n communicationStrategy,\n threadContextFactory.createContext(),\n minTimeout,\n maxTimeout));\n\n SessionClient proxy;\n\n ThreadContext context = threadContextFactory.createContext();\n\n // If the recovery strategy is set to RECOVER, wrap the builder in a recovering proxy client.\n if (recoveryStrategy == Recovery.RECOVER) {\n proxy = new RecoveringSessionClient(\n clientId,\n partitionId,\n primitiveName,\n primitiveType,\n proxyFactory,\n context);\n } else {\n proxy = proxyFactory.get().join();\n }\n\n // If max retries is set, wrap the client in a retrying proxy client.\n if (maxRetries > 0) {\n proxy = new RetryingSessionClient(\n proxy,\n context,\n maxRetries,\n retryDelay);\n }\n return new BlockingAwareSessionClient(proxy, context);\n }",
"private static IDiscordClient createClient(String token, boolean login) {\n ClientBuilder clientBuilder = new ClientBuilder(); // Creates the ClientBuilder instance\r\n clientBuilder.withToken(token); // Adds the login info to the builder\r\n try {\r\n if (login) {\r\n return clientBuilder.login(); // Creates the client instance and logs the client in\r\n } else {\r\n return clientBuilder.build(); // Creates the client instance but it doesn't log the client in yet, you would have to call client.login() yourself\r\n }\r\n } catch (DiscordException e) { // This is thrown if there was a problem building the client\r\n e.printStackTrace();\r\n return null;\r\n }\r\n }",
"public Connector buildConnector(Server server, int serverPort);",
"@Override\n ManagedChannel createChannel(List<ServerInfo> servers) {\n checkArgument(!servers.isEmpty(), \"No management server provided.\");\n XdsLogger logger = XdsLogger.withPrefix(\"xds-client-channel-factory\");\n ServerInfo serverInfo = servers.get(0);\n String serverUri = serverInfo.getServerUri();\n logger.log(XdsLogLevel.INFO, \"Creating channel to {0}\", serverUri);\n List<ChannelCreds> channelCredsList = serverInfo.getChannelCredentials();\n ManagedChannelBuilder<?> channelBuilder = null;\n // Use the first supported channel credentials configuration.\n // Currently, only \"google_default\" is supported.\n for (ChannelCreds creds : channelCredsList) {\n if (creds.getType().equals(\"google_default\")) {\n logger.log(XdsLogLevel.INFO, \"Using channel credentials: google_default\");\n channelBuilder = GoogleDefaultChannelBuilder.forTarget(serverUri);\n break;\n }\n }\n if (channelBuilder == null) {\n logger.log(XdsLogLevel.INFO, \"Using default channel credentials\");\n channelBuilder = ManagedChannelBuilder.forTarget(serverUri);\n }\n\n return channelBuilder\n .keepAliveTime(5, TimeUnit.MINUTES)\n .build();\n }",
"@Override\n protected ServerBuilder<?> getServerBuilder() {\n try {\n ServerCredentials serverCreds = TlsServerCredentials.create(\n TlsTesting.loadCert(\"server1.pem\"), TlsTesting.loadCert(\"server1.key\"));\n NettyServerBuilder builder = NettyServerBuilder.forPort(0, serverCreds)\n .flowControlWindow(AbstractInteropTest.TEST_FLOW_CONTROL_WINDOW)\n .maxInboundMessageSize(AbstractInteropTest.MAX_MESSAGE_SIZE);\n // Disable the default census stats tracer, use testing tracer instead.\n InternalNettyServerBuilder.setStatsEnabled(builder, false);\n return builder.addStreamTracerFactory(createCustomCensusTracerFactory());\n } catch (IOException ex) {\n throw new RuntimeException(ex);\n }\n }",
"private SshClient createClient() {\n java.security.Security.addProvider(\n new org.bouncycastle.jce.provider.BouncyCastleProvider());\n final SshClient client = SshClient.setUpDefaultClient();\n client.setForwardingFilter(AcceptAllForwardingFilter.INSTANCE);\n client.setServerKeyVerifier(AcceptAllServerKeyVerifier.INSTANCE);\n return client;\n }",
"private OkHttpClient Create() {\n final OkHttpClient.Builder baseClient = new OkHttpClient().newBuilder()\n .connectTimeout(CONNECTION_TIMEOUT, TimeUnit.SECONDS)\n .writeTimeout(WRITE_TIMEOUT, TimeUnit.SECONDS)\n .readTimeout(READ_TIMEOUT, TimeUnit.SECONDS);\n\n // If there's no proxy just create a normal client\n if (appProps.getProxyHost().isEmpty()) {\n return baseClient.build();\n }\n\n final OkHttpClient.Builder proxyClient = baseClient\n .proxy(new java.net.Proxy(java.net.Proxy.Type.HTTP, new InetSocketAddress(appProps.getProxyHost(), Integer.parseInt(appProps.getProxyPort()))));\n\n if (!appProps.getProxyUsername().isEmpty() && !appProps.getProxyPassword().isEmpty()) {\n\n Authenticator proxyAuthenticator;\n String credentials;\n\n credentials = Credentials.basic(appProps.getProxyUsername(), appProps.getProxyPassword());\n\n // authenticate the proxy\n proxyAuthenticator = (route, response) -> response.request().newBuilder()\n .header(\"Proxy-Authorization\", credentials)\n .build();\n proxyClient.proxyAuthenticator(proxyAuthenticator);\n }\n return proxyClient.build();\n\n }",
"@Override\n public HelixZkClient buildZkClient(HelixZkClient.ZkConnectionConfig connectionConfig,\n HelixZkClient.ZkClientConfig clientConfig) {\n return new ZkClient(createZkConnection(connectionConfig),\n (int) clientConfig.getConnectInitTimeout(), clientConfig.getOperationRetryTimeout(),\n clientConfig.getZkSerializer(), clientConfig.getMonitorType(), clientConfig.getMonitorKey(),\n clientConfig.getMonitorInstanceName(), clientConfig.isMonitorRootPathOnly());\n }",
"public static Client createClient() {\n JacksonJaxbJsonProvider provider = new JacksonJaxbJsonProvider();\n provider.setAnnotationsToUse(new Annotations[]{Annotations.JACKSON});\n\n ClientConfig config = new ClientConfig(provider);\n //Allow delete request with entity\n config.property(ClientProperties.SUPPRESS_HTTP_COMPLIANCE_VALIDATION, true);\n //It helps to handle cookies\n config.property(ClientProperties.FOLLOW_REDIRECTS, Boolean.FALSE);\n //Allow PATCH\n config.property(HttpUrlConnectorProvider.SET_METHOD_WORKAROUND, true);\n\n Logger logger = Logger.getLogger(\"Client\");\n Feature feature = new LoggingFeature(logger, Level.INFO, LoggingFeature.Verbosity.PAYLOAD_ANY,\n null);\n\n //Allow self trusted certificates\n SSLContext sslcontext;\n try {\n sslcontext = SSLContext.getInstance(\"TLS\");\n sslcontext.init(null, new TrustManager[]{new X509TrustManager() {\n public void checkClientTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public void checkServerTrusted(X509Certificate[] arg0, String arg1) {\n }\n\n public X509Certificate[] getAcceptedIssuers() {\n return new X509Certificate[0];\n }\n }}, new java.security.SecureRandom());\n } catch (KeyManagementException | NoSuchAlgorithmException e) {\n throw new RuntimeException(e);\n }\n\n return ClientBuilder\n .newBuilder()\n .withConfig(config)\n .sslContext(sslcontext)\n .build()\n .register(feature)\n .register(MultiPartFeature.class);\n }",
"public void createClientFromCredential() {\n WebPubSubServiceAsyncClient serverClient = new WebPubSubServiceClientBuilder()\n .connectionString(\"<connection-string>\")\n .hub(\"<hub>>\")\n .buildAsyncClient();\n\n // wrap WebPubSubServiceAsyncClient.getClientAccessToken as WebPubSubClientCredential\n WebPubSubClientCredential clientCredential = new WebPubSubClientCredential(Mono.defer(() ->\n serverClient.getClientAccessToken(new GetClientAccessTokenOptions()\n .setUserId(\"<user-name>\")\n .addRole(\"webpubsub.joinLeaveGroup\")\n .addRole(\"webpubsub.sendToGroup\"))\n .map(WebPubSubClientAccessToken::getUrl)));\n\n // create WebPubSub client\n WebPubSubClient client = new WebPubSubClientBuilder()\n .credential(clientCredential)\n .buildClient();\n // END: readme-sample-createClientFromCredential\n }",
"public static MqmRestClient createClient(ServerConfiguration serverConfiguration) {\n\n if (!serverConfiguration.isValid()) {\n logger.warn(\"MQM server configuration is not valid\");\n return null;\n }\n\n MqmRestClient client = getMqmRestClientFactory().obtain(\n serverConfiguration.location,\n serverConfiguration.sharedSpace,\n serverConfiguration.username,\n serverConfiguration.password);\n\n try {\n client.validateConfigurationWithoutLogin();\n return client;\n } catch (SharedSpaceNotExistException e) {\n logger.warn(\"Invalid shared space\");\n } catch (LoginException e) {\n logger.warn(\"Login failed : \" + e.getMessage());\n } catch (RequestException e) {\n logger.warn(\"Problem with communication with MQM server : \" + e.getMessage());\n }\n\n return null;\n }",
"public Client connect(String server, String username, String password) {\n\t\tthis.server = server;\n\t\tclient = ClientHelper.createClient();\n\t\tif (debug)\n\t\t\tclient.addFilter(new LoggingFilter());\n\t\tclient.addFilter(new HTTPBasicAuthFilter(username, password));\n\n\t\treturn client;\n\t}",
"public static IOSClientBuilder.V2 builderV2() {\n return new OSClientBuilder.ClientV2();\n }",
"ConnectionClientTransport newClientTransport(SocketAddress serverAddress, String authority,\n @Nullable String userAgent, @Nullable ProxyParameters proxy);",
"@Override\n\t\tpublic DRPCClient create() throws Exception {\n\t\t\tMap<String, Object> config = Utils.readStormConfig();\n\t\t\treturn new DRPCClient(config, configuration.drpcHost,\n\t\t\t\t\tconfiguration.drpcPort, MAX_WAIT_TO_EXECUTE);\n\t\t}",
"public ch.epfl.dedis.proto.ServerIdentityProto.ServerIdentity.Builder getServerBuilder() {\n bitField0_ |= 0x00000002;\n onChanged();\n return getServerFieldBuilder().getBuilder();\n }",
"public AbstractRoClient(Iterable<String> servers, String realm, String serviceContextId, Version version)\n\t\t\tthrows NoRouteToHostException {\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"new AbstractRoClient: servers=\" + servers + \", realm=\" + realm + \", id=\" + serviceContextId + \", version=\" + version);\n\t\t}\n\n\t\tsetVersion(version);\n\t\tsetServiceContextId(serviceContextId);\n\t\t_realm = realm;\n\t\tif (servers != null) {\n\t\t\tfor (String s : servers) {\n\t\t\t\t_servers.add(s);\n\t\t\t}\n\t\t}\n\t\tcreateClient(null);\n\t}",
"public static Comms connect() {\r\n\t\tComms client = null;\r\n\t\ttry(ServerSocket server = new ServerSocket(4444)) {\r\n\t\t\tclient = new Comms(server.accept());\r\n\t\t} catch(Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn client;\r\n\t}",
"public Client create() {\n RequestProvider provider = RequestProviders.lookup();\n return provider.newClient(this);\n }",
"public void createClient() {\n FarmersBaseClient client = new FarmBeatsClientBuilder()\n .endpoint(\"https://<farmbeats resource name>.farmbeats-dogfood.azure.net\")\n .credential(new DefaultAzureCredentialBuilder().build())\n .buildFarmersBaseClient();\n }",
"@Override\n\tpublic void createClient() {\n\t\t\n\t}",
"Client getClient();",
"public DNS withClient(Client client) {\n\t\tthis.client = client;\n\t\treturn this;\n\t}",
"public ServerScheduledEventBuilder(Server server) {\n delegate = DelegateFactory.createServerScheduledEventBuilderDelegate(server);\n }",
"RESTClient(String serverName, String omasServerURL)\n {\n this.serverName = serverName;\n this.omasServerURL = omasServerURL;\n this.restTemplate = new RestTemplate();\n }",
"abstract ManagedChannel createChannel(List<ServerInfo> servers);",
"@Bean(name = \"stormpathClient\")\n @Autowired\n public Client getStormpathClient(BridgeConfig bridgeConfig) {\n ApiKey apiKey = ApiKeys.builder()\n .setId(bridgeConfig.getStormpathId().trim())\n .setSecret(bridgeConfig.getStormpathSecret().trim()).build();\n \n ClientBuilder clientBuilder = Clients.builder().setApiKey(apiKey);\n ((DefaultClientBuilder)clientBuilder).setBaseUrl(bridgeConfig.getStormpathBaseUrl());\n return clientBuilder.build(); \n }",
"public static Client getClient(){\n // Create a new client if it hasn't been created yet\n if(client == null) client = new Client(60000,60000);\n return client;\n }",
"public static OSClientV2 clientFromAccess(Access access) {\n return OSClientSessionV2.createSession(access);\n }",
"private MongoClient buildMongo(final AuthConfig c) {\n\t\ttry {\n\t\t\treturn new MongoClient(c.getMongoHost());\n\t\t} catch (MongoException e) {\n\t\t\tLoggerFactory.getLogger(getClass()).error(\n\t\t\t\t\t\"Failed to connect to MongoDB: \" + e.getMessage(), e);\n\t\t\tthrow e;\n\t\t}\n\t}",
"public Server createServer(Server server){\n\t\tlogger.info(\"Creating the Server with the given details\");\n\t\tint id = servers.size()+1+1000;\n\t\tlogger.info(\"The Server id is \"+id);\n\t\tserver.setServerId(id);\n\t\tserver.setServerStatus(ServerStatus.BUILDING);\n\t\tServerBuilder serverBuilder = new ServerBuilder(\"\"+id, server);\n\t\tserverBuilder.start();\n\t\tservers.put(id, server);\n\t\treturn server;\n\t}",
"private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }",
"private void createClient(String sessionId)\n\t\tthrows NoRouteToHostException {\n\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\tLOGGER.debug(\"createClient: session id=\" + sessionId);\n\t\t}\n\n\t\tDiameterClientFactory factory = DiameterClientFactory.getDiameterClientFactory();\n\t\tif (factory == null) {\n\t\t\tthrow new NoRouteToHostException(\"Cannot get the Diameter Client Factory\");\n\t\t}\n\n\t\tif (_servers.isEmpty()) {\n\t\t\ttry {\n\t\t\t\tsetDiameterClient(factory, null, sessionId);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\t\tLOGGER.debug(\"cannot access to the realm=\" + _realm, e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (getDiameterClient() == null) {\n\t\t\t\tthrow new NoRouteToHostException(\"Cannot access any Ro server\");\n\t\t\t}\n\t\t\treturn;\n\t\t}\n\n\t\tIterator<String> iter = _servers.iterator();\n\t\twhile (getDiameterClient() == null && iter.hasNext()) {\n\t\t\tString server = iter.next();\n\t\t\ttry {\n\t\t\t\tsetDiameterClient(factory, server, sessionId);\n\t\t\t}\n\t\t\tcatch (Exception e) {\n\t\t\t\tif (LOGGER.isDebugEnabled()) {\n\t\t\t\t\tLOGGER.debug(\"cannot access to the server=\" + server, e);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (getDiameterClient() == null) {\n\t\t\tthrow new NoRouteToHostException(\"Cannot access any Ro server\");\n\t\t}\n\t}",
"public static OSClientV2 clientFromAccess(Access access, Config config) {\n return OSClientSessionV2.createSession(access, null, null, config);\n }",
"private Socket createClient()\n\t{\n\t\tSocket client = null;\n\t\ttry {\n\t\t\tclient = this.server.accept();\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tinsertLogEntry(e.getMessage(), e.getStackTrace().toString());\n\t\t}\n\t\t\n\t\treturn client;\n\t}",
"String getTargetClient();",
"private static void createCouchbaseClient() {\n LOGGER.debug(\"Creating Couchbase Client\");\n String bucket = CONFIG.getString(\"couchbase.bucket\");\n String[] hosts = CONFIG.getString(\"couchbase.host\").split(\";\");\n String port = CONFIG.getString(\"couchbase.port\");\n String base = CONFIG.getString(\"couchbase.base\");\n\n List<URI> uris = new ArrayList<>();\n for (final String host : hosts) {\n uris.add(URI.create(\"http://\" + host + \":\" + port + \"/\" + base));\n }\n try {\n tapClient = new TapClient(uris, bucket, \"\");\n } catch (Exception ex) {\n LOGGER.error(\"Caught exception trying to connect to Couchbase\", ex);\n }\n }",
"public LogInfluxClient build() {\n LogInfluxClient logStatsdClient = new LogInfluxClient();\n logStatsdClient.setSendSink(sendSink);\n logStatsdClient.setCommonTags(commonTags);\n return logStatsdClient;\n }",
"Client createNewClient(Client client);",
"public BLATQueryClient(String client, String host, String port, String sequenceDir){\n\t\tthis.CLIENT = client;\n\t\tthis.HOST = host;\n\t\tthis.PORT = port;\n\t\tthis.SEQDIR = sequenceDir;\n\t\tthis.sessionID = RANDOM.nextInt();\n\t}",
"public Client() {\n _host_name = DEFAULT_SERVER;\n _port = PushCacheFilter.DEFAULT_PORT_NUM;\n }",
"public static DucktalesClient getClient() {\n \treturn client;\n }",
"public static Client create() {\n ClientConfig clientConfig = new ClientConfig(JacksonFeature.class,\n JacksonJaxbJsonProvider.class,\n JacksonJsonProvider.class);\n return ClientBuilder.newClient(clientConfig);\n }",
"private MemCachedClient initMemCachedClient(String[] servers, int maxConn, boolean sanitizeKeys) {\n\t\tInteger[] weights = new Integer[servers.length];\n\t\tfor (int i = 0; i < weights.length; i++) {\n\t\t\tweights[i] = 3;\n\t\t}\n\t\t// { 3 };\n\t\t// grab an instance of our connection pool\n\t\t// String server = StringUtils.join(servers);\n\t\t// int hasCode = server.hashCode();\n\t\tString poolName = \"pool\" + servers.hashCode();\n\t\t// logger.info(\"init poolName:\" + poolName + \" server:\" + server);\n\t\tSockIOPool pool = SockIOPool.getInstance(poolName);\n\n\t\tMemCachedClient mcc = new MemCachedClient(poolName);\n\n\t\t// mcc.setErrorHandler(new ErrorHandlerImpl());\n\t\t// set the servers and the weights\n\t\tpool.setServers(servers);\n\t\tpool.setWeights(weights);\n\n\t\t// set some basic pool settings\n\t\t// 5 initial, 5 min, and 250 max conns\n\t\t// and set the max idle time for a conn\n\t\t// to 6 hours\n\t\tpool.setInitConn(5);\n\t\tpool.setMinConn(5);\n\t\tpool.setMaxConn(maxConn);\n\t\tpool.setMaxIdle(1000 * 60 * 60 * 6);\n\n\t\t// set the sleep for the maint thread\n\t\t// it will wake up every x seconds and\n\t\t// maintain the pool size\n\t\tpool.setMaintSleep(30 * 1000);\n\n\t\t// set some TCP settings\n\t\t// disable nagle\n\t\t// set the read timeout to 3 secs\n\t\tpool.setNagle(false);\n\t\tpool.setSocketTO(3000);\n\t\tpool.setSocketConnectTO(0);\n\n\t\t// initialize the connection pool\n\t\tpool.initialize();\n\n\t\tmcc.setSanitizeKeys(sanitizeKeys);// 不要对key进行url编码\n\t\t// logger.info(\"connected poolName:\" + poolName + \" server:\" + server + \" maxConn:\" + maxConn);\n\t\t// lets set some compression on for the client\n\t\t// compress anything larger than 64k\n\t\t// mcc.setCompressEnable(true);\n\t\t// mcc.setCompressThreshold(64 * 1024);\n\t\treturn mcc;\n\t}",
"public Client() {\n initComponents();\n \n Server server = new Server();\n server.start();\n \n }",
"void startClient(String name, Config.ClientConfig config);",
"public AbaloneClient() {\n server = new AbaloneServer();\n clientTUI = new AbaloneClientTUI();\n }",
"public HttpClient build() {\n\t\tCloseableHttpClient httpClient = httpClientBuilder.build();\n\t\treturn new ApacheHttpClient(this.configuration, httpClient);\n\t}",
"public KVClient(String server, int port) {\n this.server = server;\n this.port = port;\n }",
"static Http2ClientBuilder builder() {\n return new Http2ClientBuilder();\n }",
"public StatsdClient(String prefix, String hostname, int port) throws StatsDClientException {\n this.hostname = hostname;\n this.prefix = prefix;\n this.port = port;\n\n this.lock = new ReentrantReadWriteLock();\n ScheduledThreadPoolExecutor exec = new ScheduledThreadPoolExecutor(1);\n exec.setRemoveOnCancelPolicy(true);\n\n Runnable refreshClient = new Runnable() {\n @Override\n public void run() {\n newClient();\n }\n };\n exec.scheduleAtFixedRate(refreshClient, CLIENT_TTL, CLIENT_TTL, TimeUnit.SECONDS);\n\n this.newClient();\n LOGGER.info(\"StatsdClient wrapper created. \" + this.hashCode());\n }",
"public void createClient() {\n client = new UdpClient(Util.semIp, Util.semPort, this);\n\n // Le paso true porque quiero que lo haga en un hilo nuevo\n client.connect(true);\n }",
"private static Dreamwork buildDreamwork(ServerTransportConfig serverTransportConfig){\n Dreamwork dreamwork = new Dreamwork(true,\n 20,\n serverTransportConfig.getBizPoolSize(),\n 60000,\n TimeUnit.MILLISECONDS,\n new LinkedBlockingDeque(1000),\n true\n );\n return dreamwork;\n }",
"@Override\r\n\tpublic Client consulterClient(Long codeClient) {\n\t\treturn dao.consulterClient(codeClient);\r\n\t}",
"private void createClient() {\n tc = new TestClient();\n }",
"private CuratorFramework createCurator() {\n // Create list of Servers\n final String serverStr = sharedZookeeperTestResource.getZookeeperConnectString();\n final List<String> serverList = Arrays.asList(Tools.splitAndTrim(serverStr));\n\n // Create config map\n final Map<String, Object> config = new HashMap<>();\n config.put(\"servers\", serverList);\n\n return CuratorFactory.createNewCuratorInstance(config, getClass().getSimpleName());\n }",
"public CompletableFuture<TarantoolConnection> singleConnection(InetSocketAddress serverAddress) {\n CompletableFuture<Channel> connectionFuture = new CompletableFuture<>();\n RequestFutureManager requestManager = new RequestFutureManager(config);\n TarantoolVersionHolder versionHolder = new TarantoolVersionHolder();\n ChannelFuture future = bootstrap.clone()\n .handler(new TarantoolChannelInitializer(config, requestManager, versionHolder, connectionFuture))\n .remoteAddress(serverAddress).connect();\n future.addListener((ChannelFutureListener) f -> {\n //TODO reconnect when failed\n if (!f.isSuccess()) {\n connectionFuture.completeExceptionally(new TarantoolClientException(\n \"Failed to connect to the Tarantool server\", f.cause()));\n }\n });\n return connectionFuture.thenApply(ch -> new TarantoolConnectionImpl(requestManager, versionHolder, ch));\n }",
"private Channel getServerClientChannel(ProcessSet processes, int id) {\r\n\t\tLayer[] qos = { new TcpCompleteLayer(), new TcpBasedPFDLayer(),\r\n\t\t\t\t// new BasicBroadcastLayer(), // new EagerRBLayer(),\r\n\t\t\t\tnew ServerClientApplLayer() };\r\n\r\n\t\t/* Create a QoS */\r\n\t\tQoS myQoS = null;\r\n\t\ttry {\r\n\t\t\tmyQoS = new QoS(\"ServerClient QoS for \" + \"client \" + id, qos);\r\n\t\t} catch (AppiaInvalidQoSException ex) {\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName()).severe(\"Invalid QoS\");\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName())\r\n\t\t\t\t\t.severe(ex.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\t/* Create a channel. Uses default event scheduler. */\r\n\t\tChannel channel = myQoS\r\n\t\t\t\t.createUnboundChannel(\"ServerClient channel for \" + \"client \"\r\n\t\t\t\t\t\t+ id);\r\n\t\t/*\r\n\t\t * Application Session requires special arguments: filename and . A\r\n\t\t * session is created and binded to the stack. Remaining ones are\r\n\t\t * created by default\r\n\t\t */\r\n\t\tServerClientApplSession sas = (ServerClientApplSession) qos[qos.length - 1]\r\n\t\t\t\t.createSession();\r\n\t\tsas.init(processes, this, this, false);\r\n\r\n\t\tChannelCursor cc = channel.getCursor();\r\n\r\n\t\t/*\r\n\t\t * Application is the last session of the array. Positioning in it is\r\n\t\t * simple\r\n\t\t */\r\n\t\ttry {\r\n\t\t\tcc.top();\r\n\t\t\tcc.setSession(sas);\r\n\t\t\tcc.bottom();\r\n\t\t\tChannelCursor ccc = this.zabChannel.getCursor();\r\n\t\t\tccc.bottom();\r\n\t\t\tcc.setSession(ccc.getSession());\r\n\t\t\tccc.up();\r\n\t\t\tcc.up();\r\n\t\t\tcc.setSession(ccc.getSession());\r\n\t\t} catch (AppiaCursorException ex) {\r\n\t\t\tLogger.getLogger(ServerAppl.class.getName()).severe(\r\n\t\t\t\t\t\"Unexpected exception in main. Type code:\" + ex.type);\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\treturn channel;\r\n\t}",
"public MdrCreater()\n {\n super();\n client = new RawCdrAccess();\n }",
"public OCSPCliente(String servidorURL)\r\n {\r\n this.servidorURL = servidorURL;\r\n }",
"public DelegateCredentialsProvider build() {\n return new DelegateCredentialsProvider(this);\n }",
"BuildClient createBuildClient();",
"static Http1Client create(Http1ClientConfig clientConfig) {\n return new Http1ClientImpl(WebClient.create(it -> it.from(clientConfig)), clientConfig);\n }",
"@Override\n\tpublic void createClient(Client clt) {\n\t\t\n\t}",
"private HttpClient getTemplateServerClient(String remoteSource) throws IOException {\n\n SocketFactory factory = (SocketFactory)mSocketFactories.get(remoteSource);\n\n if (factory == null) {\n\n int port = 80;\n String host = remoteSource.substring(TEMPLATE_LOAD_PROTOCOL.length());\n\n int portIndex = host.indexOf(\"/\");\n \n if (portIndex >= 0) {\n host = host.substring(0,portIndex); \n }\n String hostPort = host; \n portIndex = host.indexOf(\":\");\n if (portIndex >= 0) {\n try {\n port = Integer.parseInt(host.substring(portIndex+1));\n }\n catch (NumberFormatException nfe) {\n System.out.println(\"Invalid port number specified\");\n }\n host = host.substring(0,portIndex);\n }\n factory = new PooledSocketFactory(new PlainSocketFactory(InetAddress.getByName(host), \n port, 5000));\n \n if (factory != null) {\n mSocketFactories.put(hostPort, factory);\n }\n }\n return new HttpClient(factory);\n }",
"private static Client createDummyClient() {\n\n PhoneNumber num1 = new PhoneNumber(\"Arnold Schubert\",\"0151234567\", \"Ehemann\");\n PhoneNumber num2 = new PhoneNumber(\"Helene Schubert\",\"0171234567\", \"Tochter\");\n ArrayList<PhoneNumber> phoneNumbers1 = new ArrayList<>();\n phoneNumbers1.add(num1);\n phoneNumbers1.add(num2);\n DummyVitalValues vital1 = new DummyVitalValues();\n\n ArrayList<Integer> pictograms1 = new ArrayList<>();\n\n DummyClientMedicine medicine1 = new DummyClientMedicine(DummyMedicine.ITEMS_PRESCRIBED_Erna, DummyMedicine.ITEMS_TEMPORARY, DummyMedicine.ITEMS_SELF_ORDERED);\n\n Client c = new Client(0,R.drawable.erna, \"Erna\",\"Schubert\",\"17.08.1943\",medicine1,DummyNotes.ITEMS_Erna, DummyFixedNotes.ITEMS_Erna, DummyToDos.ITEMS_Erna, vital1.vitalValues, \"Diabetes mellitus, Adipositas, Schilddrüsenunterfuntion\",1,\"Blankenfelder Str. 82, 13127 Berlin\",phoneNumbers1, pictograms1);\n\n return c;\n }",
"public Client(Configuration config) {\n if (config == null)\n throw new IllegalArgumentException(\"Null argument supplied\");\n this.config = config;\n connectivityStatus = ConnectivityStatus.Initial;\n lastInteraction = new Date(0l);\n recentPeers = new PeerList();\n refreshInterval = 30000l;\n randomizedRefreshInterval = (int)(refreshInterval * (1 - 0.25 * new Random ().nextDouble()));\n myLinkLocalAdress = Inet6Address.getByAddress(,, LINKLOCAL)\n }",
"public BlueMeshService build(){\n BlueMeshService bms = new BlueMeshService();\n \n bms.setUUID(uuid);\n bms.setDeviceId(deviceId);\n bms.enableBluetooth(bluetoothEnabled);\n bms.setup();\n \n return bms;\n }",
"RESTClient(String serverName, String omasServerURL, String userId, String password)\n {\n this.serverName = serverName;\n this.omasServerURL = omasServerURL;\n\n RestTemplateBuilder restTemplateBuilder = new RestTemplateBuilder();\n\n this.restTemplate = restTemplateBuilder.basicAuthentication(userId, password).build();\n }",
"public CloseableHttpClient build() {\n\t\tCloseableHttpClient httpClient = httpClientBuilder.build();\n\t\treturn httpClient;\n\t}",
"public static IOSClientBuilder.V3 builderV3() {\n return new OSClientBuilder.ClientV3();\n }",
"public Configuration.Builder getClientIdAndClientSecretBuilder() {\n String clientId = \"0993a005480472a69fab10c2f9b8ad0d6bee7acf\";//getString(R.string.client_id);\n String clientSecret=\"oVsWjoQ2RHeHvZ8xK3yrtdHrG7YiN+rnHh4qqBfmscDbCwplTFzytAoVIVrXMnAQShuBYuA6fZftYL+AIvX5zRP8JXOs06dQcej1yeL/ACJSGuiKoQJbqdC6CELuP+Pl\";\n\n String codeGrantRedirectUri = \"deva://robokart\";\n Configuration.Builder configBuilder =\n new Configuration.Builder(clientId, clientSecret, SCOPE, null,\n null);\n configBuilder.setCacheDirectory(this.getCacheDir())\n .setUserAgentString(getUserAgentString(this))\n // Used for oauth flow\n .setCodeGrantRedirectUri(codeGrantRedirectUri);\n\n return configBuilder;\n }",
"public CachetClient(String url) {\n baseUrl = url;\n client = ClientBuilder.newClient();\n target = client.target(baseUrl);\n }",
"public Builder withDNS(String dnsServer) {\n\t\t\tthis.dnsServer = dnsServer; \n\t\t\treturn this;\n\t\t}",
"@Before\n public void buildClient() {\n BasicCookieStore cookieStore = new BasicCookieStore();\n\n // Build Apache Http Client to execute requests\n this.httpClient = HttpClientBuilder.create()\n .setDefaultCookieStore(cookieStore)\n .setRedirectStrategy(new LaxRedirectStrategy())\n .build();\n }",
"public PostBuilder() {\n httpClient = HttpClients.createDefault();\n httpPost = new HttpPost(localTesting ? \"http://localhost:8080\" : \"https://netflixstatistixserver.herokuapp.com\");\n attributes = new ArrayList<>();\n }",
"DatabaseClient newFinalClient();",
"static Http1ClientConfig.Builder builder() {\n return Http1ClientConfig.builder();\n }",
"public abstract Client getClient();",
"public NetworkClient(String server, int port) {\n\t\tthis.host = server;\n\t\tthis.port = port;\n\t}",
"@Override\n\tpublic void run() \n\t{\n\t\tcommunicator = com.zeroc.Ice.Util.initialize();\n GameServerPrx clientPrx = GameServerPrx.checkedCast(\n communicator.stringToProxy(\"client:default -h 58.167.142.74 -p 10002\")).ice_twoway().ice_secure(false).ice_collocationOptimized(false).ice_compress(true);\n\n if(clientPrx == null)\n {\n //If connection is failed due to server problems\n System.err.println(\"SB Connect: \" + \"Invalid proxy\");\n return;\n }\n System.out.println(\"SB Connect: \" + \"Connected\");\n Server server = new Server();\n server.address = ServerInfo.ADDRESS;\n server.UUID = ServerInfo.UUID;\n server.port = ServerInfo.PORT;\n server.name = ServerInfo.NAME;\n server.players = (short) players;\n\t\tclientPrx.sendServerDetails(server);\n\t\tSystem.out.println(\"SB Connect: \" + \"Data sent\");\n\t}",
"public ClientConfiguration() {\n serverIp = DEFAULT_SERVER_IP;\n serverPort = DEFAULT_SERVER_PORT;\n }",
"public DnsSrvResolverBuilder servers(List<String> servers) {\n return new DnsSrvResolverBuilder(reporter, retainData, cacheLookups, dnsLookupTimeoutMillis,\n retentionDurationMillis, servers, executor);\n }",
"private NettyServerBuilder getNettyServerBuilder(final String uds) {\n EventLoopGroup group;\n NettyServerBuilder builder = NettyServerBuilder.forAddress(new DomainSocketAddress(uds));\n if (SystemUtils.IS_OS_MAC) {\n group = new KQueueEventLoopGroup();\n builder.channelType(KQueueServerDomainSocketChannel.class);\n }\n else if (SystemUtils.IS_OS_LINUX) {\n group = new EpollEventLoopGroup();\n builder.channelType(EpollServerDomainSocketChannel.class);\n }\n else {\n throw new IllegalStateException(\"binding to unix:// addresses is only supported on Linux and macOS\");\n }\n builder.workerEventLoopGroup(group).bossEventLoopGroup(group);\n\n return builder;\n }",
"public Client() {}",
"public DistributedClient(BaseClient client, SimpleSocketConnectionData socketData, BaseTimeOut timeOut) throws ActionFailedException {\n this.client = client;\n BaseTimeOut baseTimeOut = new BaseTimeOut(0, 60000);\n DispatchClient dispatchClient = new DispatchClient(socketData.getIp(), socketData.getPort(), baseTimeOut, (String[]) null);\n String serviceClassName = client.getServiceClassName();\n Socket socketToService = dispatchClient.getServiceConnection(serviceClassName, 0);\n\n if (null != socketToService) {\n client.connect(socketToService, timeOut);\n System.out.println(client.getServiceId());\n }\n }",
"public static ManagementClientImpl createClient(final Endpoint endpoint, final OptionMap options, final ExecutorService executorService) {\n final OptionMap actual = OptionMap.builder().addAll(DEFAULT_OPTIONS).addAll(options).getMap();\n return internalCreateClient(endpoint, actual, executorService);\n }",
"public static Client shareClient() throws UnknownHostException {\n\n Client client = TransportClient.builder().build()\n .addTransportAddress(new InetSocketTransportAddress(InetAddress.getByName(\"127.0.0.1\"), 9300));\n return client;\n\n }",
"@NotNull\n public Server.Builder build() {\n return builder.compression(compressionSetting);\n }",
"public ServerA(){}",
"public TicketClient(@Value(\"${app.ticket-catalog.url}\") String serverUrl) {\n this.serverUrl = serverUrl;\n this.restTemplate = new RestTemplate();\n var requestFactory = new SimpleClientHttpRequestFactory();\n this.restTemplate.setRequestFactory(requestFactory);\n }",
"private URLConnection urlConnBuilder(URI base, URI resource) throws IOException {\n if (!resource.isAbsolute() && base != null) {\n resource = base.resolve(resource);\n }\n URL specURL = resource.toURL();\n URLConnection connection = specURL.openConnection();\n connection.setRequestProperty(\"Accept\", \"application/json\");\n connection.setRequestProperty(\"user-agent\", \"spymemcached vbucket client\");\n connection.setRequestProperty(\"X-memcachekv-Store-Client-Specification-Version\", CLIENT_SPEC_VER);\n\tif (restUsr != null) {\n\t try {\n\t\tconnection.setRequestProperty(\"Authorization\", buildAuthHeader(restUsr, restPwd));\n\t } catch (UnsupportedEncodingException ex) {\n\t\tthrow new IOException(\"Could not encode specified credentials for HTTP request.\", ex);\n\t }\n\t}\n\n return connection;\n\n }",
"public Client buscarClientePorId(String id){\n Client client = new Client();\n \n // Faltaaaa\n \n \n \n \n \n return client;\n }",
"public static DMSoapClientFactory newInstance(Properties properties) throws DMException {\r\n DMSoapClientFactory factory = new DMSoapClientFactory();\r\n factory.setProperties(properties);\r\n return factory;\r\n \r\n }",
"Client(String server, int port, String username, ClientGUI cg) {\n\t\tthis.server = server;\n\t\tthis.port = port;\n\t\tthis.username = username;\n\t\tthis.cg = cg; // Saved if in GUI mode or not\n\t}",
"@Test\n public void testClient() {\n try {\n MockWebServer server = new MockWebServer();\n server.enqueue(new MockResponse().setBody(\"hello, world!\"));\n server.start();\n HttpUrl baseUrl = server.url(\"\");\n ConnectionOptions opt = new ConnectionOptions(\"apikey\");\n opt.setHost(baseUrl.toString());\n ApiClientWrapper clientWrapper = new ApiClientWrapper(opt);\n TestApiService testService = clientWrapper.createService(TestApiService.class);\n assertTrue(testService.getEndpointValue().execute().isSuccessful());\n RecordedRequest request = server.takeRequest();\n assertEquals(\"/\" + AN_ENDPOINT_PATH, request.getPath());\n assertNotNull(request.getHeader(\"Authorization\"));\n assertTrue(request.getHeader(\"Authorization\").contains(\"Bearer\"));\n assertNotNull(request.getHeader(\"User-Agent\"));\n assertTrue(request.getHeader(\"User-Agent\").contains(ApiClientWrapper.UserAgent.MBED_CLOUD_SDK_IDENTIFIER));\n server.shutdown();\n } catch (IOException | InterruptedException e) {\n fail(e.getMessage());\n }\n }",
"private SslContext buildServerSslContext()\n throws SSLException\n {\n SslContextBuilder builder = SslContextBuilder.forServer(certFile, keyFile);\n if (verifyMode == VerifyMode.NO_VERIFY) {\n builder.trustManager(InsecureTrustManagerFactory.INSTANCE);\n } else {\n builder.trustManager(caFile);\n }\n if (verifyMode == VerifyMode.VERIFY) {\n builder.clientAuth(ClientAuth.OPTIONAL);\n } else if (verifyMode == VerifyMode.VERIFY_REQ_CLIENT_CERT) {\n builder.clientAuth(ClientAuth.REQUIRE);\n }\n return builder.build();\n }",
"private static MongoClient initMongoClient() {\n\n\t\tServerAddress sa = new ServerAddress(DomainConstans.mongodb_host, DomainConstans.mongodb_port);\n\t\tList<MongoCredential> mongoCredentialList = Lists\n\t\t\t\t.newArrayList(MongoCredential.createCredential(DomainConstans.mongodb_userName, DomainConstans.mongodb_databaseName, DomainConstans.mongodb_password.toCharArray()));\n\t\treturn new MongoClient(sa, mongoCredentialList);\n//\t\treturn new MongoClient(sa);\n\t}"
] | [
"0.6321974",
"0.55986166",
"0.55774444",
"0.555766",
"0.5507881",
"0.5485531",
"0.534167",
"0.5314649",
"0.5265301",
"0.5259501",
"0.52347416",
"0.5218156",
"0.5208793",
"0.5202485",
"0.5195705",
"0.5185272",
"0.51702845",
"0.5167503",
"0.5118007",
"0.51083416",
"0.509077",
"0.50840116",
"0.50787485",
"0.5059362",
"0.5056619",
"0.5046885",
"0.5042666",
"0.50417644",
"0.5019736",
"0.5014652",
"0.50088084",
"0.5007858",
"0.50016665",
"0.4989241",
"0.4982538",
"0.4969025",
"0.4964744",
"0.49592212",
"0.49518847",
"0.49472326",
"0.49335384",
"0.49326435",
"0.4926887",
"0.4924743",
"0.49202532",
"0.49151298",
"0.49147916",
"0.49114168",
"0.49075955",
"0.4901488",
"0.48946083",
"0.48926252",
"0.48907244",
"0.4872962",
"0.48664534",
"0.48619342",
"0.48521778",
"0.48326644",
"0.48109055",
"0.48065355",
"0.47975278",
"0.4796665",
"0.4793497",
"0.4792661",
"0.4782774",
"0.4782198",
"0.4777641",
"0.4775461",
"0.47689858",
"0.4755761",
"0.4739809",
"0.47323665",
"0.47247705",
"0.47238588",
"0.4714925",
"0.4712786",
"0.47106764",
"0.4708368",
"0.4682888",
"0.46797422",
"0.46741885",
"0.46711513",
"0.46559227",
"0.46538857",
"0.46510538",
"0.46464708",
"0.46433154",
"0.46384925",
"0.46375808",
"0.46309462",
"0.461583",
"0.4615531",
"0.4612979",
"0.4612215",
"0.46072096",
"0.4606166",
"0.4605845",
"0.45962742",
"0.4591122",
"0.45897025"
] | 0.6428394 | 0 |
Indexes the MXF file passed as parameter into DRACMA service. The DRACMA server must have access to the MXF file. | public String index(File mxfFile) throws DRACMAException {
String ticket = null;
URI uri = null;
try {
// request indexing
uri = new URIBuilder(serverURI).setPath(DRACMAClient.indexingPath).setParameter("file", mxfFile.getAbsolutePath()).build();
logger.debug("DRACMA indexing URI: " + uri);
HttpClient client = new DefaultHttpClient();
HttpUriRequest request = new HttpGet(uri);
HttpParams params = request.getParams();
params = params.setParameter("file", mxfFile.getAbsolutePath());
request.setParams(params);
HttpResponse response = client.execute(request);
if (response.getStatusLine().getStatusCode() == 200) {
HttpEntity entity = response.getEntity();
if (entity != null) {
// parse the response
Document dom = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(entity.getContent());
EntityUtils.consume(entity);
// retrieve the ticket
XPathExpression getTicket = XPathFactory.newInstance().newXPath().compile("/info/id/text()");
ticket = getTicket.evaluate(dom);
}
}
if (ticket == null)
throw new DRACMAException("Invalid ticket from response to indexing request...");
logger.debug("TICKET: " + ticket);
uri = new URIBuilder(serverURI).setPath(DRACMAClient.statusPath).setParameter("id", ticket).build();
logger.debug("DRACMA indexing status URI: " + uri);
} catch (IOException e) {
throw new DRACMAException("Unable to request indexing: network error...");
} catch (ParserConfigurationException | SAXException e) {
throw new DRACMAException("Unable to parse the response to indexing request...");
} catch (XPathExpressionException e) {
throw new DRACMAException("Unable to extract ticket from response to indexing request...");
} catch (URISyntaxException e) {
throw new DRACMAException("Unable to build a valid URI...\n" + e.getMessage());
}
do {
try {
HttpClient client = new DefaultHttpClient();
HttpUriRequest request = new HttpGet(uri);
HttpResponse response = client.execute(request);
if (response.getStatusLine().getStatusCode() == 200) {
HttpEntity entity = response.getEntity();
if (entity != null) {
// parse the response
Document dom = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(entity.getContent());
EntityUtils.consume(entity);
// retrieve the status
XPathExpression getStatus = XPathFactory.newInstance().newXPath().compile("/process_info/info[@context='indexing']/status/text()");
String status = getStatus.evaluate(dom);
switch (status) {
case "completed":
// retrieve the UMID
XPathExpression getUMID = XPathFactory.newInstance().newXPath().compile("/process_info/info[@context='indexing']/umid/text()");
return getUMID.evaluate(dom);
case "error":
throw new DRACMAException("Error indexing...");
default:
break;
}
}
}
logger.debug("Not finished yet -> waiting...");
Thread.sleep(5000);
} catch (ParserConfigurationException | SAXException | IOException e) {
e.printStackTrace();
} catch (XPathExpressionException e) {
e.printStackTrace();
} catch (InterruptedException e) {
e.printStackTrace();
}
} while (true);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main(String[] args) {\n File plasmadb = new File(\"D:\\\\dev\\\\proxy\\\\DATA\\\\PLASMADB\");\r\n File indexdb = new File(\"D:\\\\dev\\\\proxy\\\\DATA\\\\INDEX\");\r\n try {\r\n plasmaWordIndex index = new plasmaWordIndex(plasmadb, indexdb, true, 555, 1000, new serverLog(\"TESTAPP\"), false);\r\n Iterator containerIter = index.wordContainers(\"5A8yhZMh_Kmv\", plasmaWordIndex.RL_WORDFILES, true);\r\n while (containerIter.hasNext()) {\r\n System.out.println(\"File: \" + (indexContainer) containerIter.next());\r\n }\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n \r\n }",
"private int BinaryReadIndexFile(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched)\n {\n try\n {\n //Initialize the file object\n File LocalInputFile = new File(filename + \".ndx\");\n\n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(LocalInputFile);\n\n //Get the files lines number\n int mMaxFileLines = 0;\n while(indexFileFileScanner.hasNext())\n {\n //Read every line in the file\n indexFileFileScanner.nextLine();\n mMaxFileLines++;\n }\n\n //Index to the bottom part of the search area of the file\n int bottomFilePageIndex = 0;\n \n //Index to the top part of the search area of the file\n int topFilePageIndex = mMaxFileLines;\n\n //Index to the middle data page of the search area of the file\n int middleFilePageIndex;\n \n //Counter for the data page accesses\n int dataPageAccessesCounter = 0;\n \n //Status of the search process\n int searchStatus;\n\n //Search while there are data pages to access, if topFilePageIndex is greater than bottomFilePageIndex, the search fails automatically\n while (bottomFilePageIndex <= topFilePageIndex)\n {\n //Reinitialize the FileScanner object\n indexFileFileScanner = new Scanner(LocalInputFile);\n \n //Find the middle data page index\n middleFilePageIndex = (bottomFilePageIndex + topFilePageIndex)/2;\n\n //Skip the lines until the middle point\n SkipLines(indexFileFileScanner, middleFilePageIndex);\n\n //Fetch the data page from the file\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Execute the binary search in the page\n searchStatus = BinarySearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions, filename, middleFilePageIndex);\n\n //Count the data page access\n dataPageAccessesCounter++;\n\n //If the word's to be searched length is invalid or the word is found in the page, but is neither the first or the last word in the page\n if (searchStatus == -2 || searchStatus == -1)\n {\n //Complete the binary search\n break;\n }\n else if (searchStatus == -3)\n {\n //If the search must be continued in the top part of the search area of the file\n bottomFilePageIndex = middleFilePageIndex + 1;\n }\n else if (searchStatus == -4)\n {\n //If the search must be continued in the bottom part of the search area of the file\n topFilePageIndex = middleFilePageIndex - 1;\n }\n else\n {\n //Add the new data page accesses\n dataPageAccessesCounter += searchStatus;\n\n //Complete the binary search\n break;\n }\n }\n //Close the FileScanner object\n indexFileFileScanner.close();\n\n //Return the number of the data page file accesses\n return dataPageAccessesCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }",
"Mono<ServerResponse> indexing(ServerRequest request);",
"public void run() {\n\t\t\t\t\tboolean b = false;\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\tb = IreportRmiClient.rmiInterfactRemote.generateIndex();\r\n\t\t\t\t\t\tif (!b) {\r\n\t\t\t\t\t\t\t// 0个索引文件\r\n\t\t\t\t\t\t\tAddedOperator.log(\"索引到0个文件..可能你的路径配置错误,请查看服务端输出信息\",\r\n\t\t\t\t\t\t\t\t\tIreportConstant.WARN_);\r\n\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tAddedOperator.log(\"新建索引成功\", IreportConstant.RIGHT_);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} catch (RemoteException e) {\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t\tAddedOperator.log(\"新建索引错误:\" + e.getMessage(),\r\n\t\t\t\t\t\t\t\tIreportConstant.ERROR_);\r\n\t\t\t\t\t\tDialogFactory.showErrorMessageDialog(jb,\r\n\t\t\t\t\t\t\t\te.getMessage(), \"新建索引错误\");\r\n\t\t\t\t\t\tthrow new RuntimeException(e.getMessage());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t}",
"private File findIndex(File fastaFile) {\n\t\tString presumedPath = fastaFile.getAbsolutePath() + \".fai\";\n\t\tFile index = new File(presumedPath);\n\t\treturn index;\n\t}",
"public static void main(String[] args) throws IOException\r\n\t{\n\t\tif (args.length <= 0)\r\n\t\t{\r\n System.out.println(\"Expected corpus as input\");\r\n System.exit(1);\r\n }\r\n\r\n\t\t// Analyzer that is used to process TextField\r\n\t\tAnalyzer analyzer = new StandardAnalyzer();\r\n\r\n\t\t// ArrayList of documents in the corpus\r\n\t\tArrayList<Document> documents = new ArrayList<Document>();\r\n\r\n\t\t// Open the directory that contains the search index\r\n\t\tDirectory directory = FSDirectory.open(Paths.get(INDEX_DIRECTORY));\r\n\r\n\t\t// Set up an index writer to add process and save documents to the index\r\n\t\tIndexWriterConfig config = new IndexWriterConfig(analyzer);\r\n\t\tconfig.setOpenMode(IndexWriterConfig.OpenMode.CREATE);\r\n\t\tIndexWriter iwriter = new IndexWriter(directory, config);\r\n\r\n\r\n\t\tfor (String arg : args)\r\n\t\t{\r\n\r\n\t\t\t// Load the contents of the file\r\n\t\t\t//System.out.printf(\"Indexing \\\"%s\\\"\\n\", arg);\r\n\t\t\tString content = new String(Files.readAllBytes(Paths.get(arg)));\r\n\r\n\t\t\tString[] big = content.split(\".I\");\r\n\t\t\tfor (String a : big) {\r\n\t\t\t\tDocument doc = new Document();\r\n\t\t\t\tint count = 0;\r\n\t\t\t\tString[] small = a.split(\".A\");\r\n\t\t\t\tfor (String b : small) {\r\n\t\t\t\t\tif (count == 0) {\r\n\t\t\t\t\t\tdoc.add(new StringField(\"filename\", b, Field.Store.YES));\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tdoc.add(new TextField(\"content\", b, Field.Store.YES));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tcount++;\r\n\t\t\t\t}\r\n\t\t\t\tdocuments.add(doc);\r\n\t\t\t}\r\n\t\t\tfor (Document doc : documents) {\r\n\t\t\t\tSystem.out.println(doc.get(\"filename\"));\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Write all the documents in the linked list to the search index\r\n\t\tiwriter.addDocuments(documents);\r\n\r\n\t\t// Commit everything and close\r\n\t\tiwriter.close();\r\n\t\tdirectory.close();\r\n\t}",
"private boolean readFromIndex(){\n\t\tString file = \"./reverseIndex.txt\";\r\n\t\tFile reverseIndex = new File(file);\r\n\t\tif (reverseIndex.exists()){\r\n\t\t\ttry(\r\n\t\t\t\tBufferedReader reader = new BufferedReader(new FileReader(file));\r\n\t\t\t){\r\n\t\t\t\tString readSchema = \"(\\\\{[^\\\\}]+)\";\r\n\t\t\t\tPattern readPattern = Pattern.compile(readSchema);\r\n\t\t\t\tString line;\r\n\t\t\t\twhile ((line = reader.readLine()) != null){\r\n\t\t\t\t\tint iden = 0;\r\n\t\t\t\t\tString[] pair = line.split(\" \\\\| \");\r\n\t\t\t\t\tString fileName = pair[0];\r\n\t\t\t\t\tString tokenList;\r\n\t\t\t\t if (pair.length > 1){\r\n\t\t\t\t\t\ttokenList = pair[1];\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse{\r\n\t\t\t\t\t\ttokenList = \"\";\r\n\t\t\t\t\t}\r\n\t\t\t\t\tHashMap<Term, Integer> tempMap = new HashMap<Term, Integer>();\r\n\t\t\t\t\tMatcher readMatcher = readPattern.matcher(tokenList);\r\n\t\t\t\t\tString[] readResults = readMatcher.results().map(MatchResult::group).toArray(String[]::new);\r\n\t\t\t\t\tfor (int i = 0;i<readResults.length;++i){\r\n\t\t\t\t\t\tString[] valuePair = readResults[i].split(\" : \");\r\n\t\t\t\t\t\tString term = valuePair[0];\r\n\t\t\t\t\t\tTerm temp = new Term(term.substring(1),iden);\r\n\t\t\t\t\t\tiden++;\r\n\t\t\t\t\t\ttempMap.put(temp, Integer.parseInt(valuePair[1]));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tindex.put(fileName, new IndexedDoc(tempMap));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tcatch(Exception e){\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public PPIndexManager(FileHelper file_helper) {\n\t\tthis.file_helper = file_helper;\n\t}",
"public void createIndexOnProcessName() throws ServiceFailureException;",
"private int LinearReadIndexFile(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched)\n {\n try\n { \n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(new File(filename + \".ndx\"));\n\n //Counter for the data page accesses\n int dataPageCounter = 0;\n \n //Flag for the search process status\n boolean searchStatus = true;\n\n //\n int wordOccurrences = matchingPositions.size();\n \n //If the word to be searched length is valid, scan every data page in the file\n while(indexFileFileScanner.hasNext() && searchStatus)\n {\n //Fetch the data page into the ByteBuffer\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Search for the word to be searched in the data page\n searchStatus = LinearSearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions);\n\n //Count the data page access\n dataPageCounter++;\n\n //Check if there no more occurrences of the word to be searched\n if(!matchingPositions.isEmpty())\n {\n //If there are continue the search\n if(wordOccurrences != matchingPositions.size())\n {\n wordOccurrences = matchingPositions.size();\n }\n else\n {\n //Stop the search\n searchStatus = false;\n }\n }\n }\n \n //Close the FileScanner\n indexFileFileScanner.close();\n \n //Return the number of data page accesses\n return dataPageCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }",
"public void indexFileOrDirectory(String fileName) {\r\n\r\n addFiles(new File(fileName));\r\n\r\n int originalNumDocs = writer.numRamDocs();\r\n for (File f : queue) {\r\n try {\r\n Document doc = new Document();\r\n\r\n // Creation of a simpledateformatter in order to print the last-modified-date of our files.\r\n SimpleDateFormat sdf = new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss\");\r\n String date = sdf.format(f.lastModified());\r\n\r\n if (f.getName().endsWith(\".html\")) {\r\n\r\n // Creation of a jsoup document to help us with our html parsing.\r\n org.jsoup.nodes.Document htmlFile = Jsoup.parse(f, null);\r\n String body = htmlFile.body().text();\r\n String title = htmlFile.title();\r\n String summary = getSummary(htmlFile);\r\n\r\n\r\n doc.add(new TextField(\"contents\", body + \" \" + title + \" \" + date, Field.Store.YES));\r\n doc.add(new TextField(\"title\", title, Field.Store.YES));\r\n doc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\r\n doc.add(new TextField(\"modified-date\", date, Field.Store.YES));\r\n doc.add(new StringField(\"summary\", summary, Field.Store.YES));\r\n\r\n }\r\n else {\r\n String content = FileUtils.readFileToString(f, StandardCharsets.UTF_8);\r\n\r\n doc.add(new TextField(\"contents\", content + \" \" + date, Field.Store.YES));\r\n doc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\r\n doc.add(new TextField(\"modified-date\", date, Field.Store.YES));\r\n }\r\n doc.add(new StringField(\"filename\", f.getName(), Field.Store.YES));\r\n\r\n writer.addDocument(doc);\r\n System.out.println(\"Added: \" + f);\r\n } catch (Exception e) {\r\n System.out.println(\"Could not add: \" + f);\r\n }\r\n }\r\n\r\n int newNumDocs = writer.numDocs();\r\n System.out.println(\"\");\r\n System.out.println(\"************************\");\r\n System.out.println((newNumDocs - originalNumDocs) + \" documents added.\");\r\n System.out.println(\"************************\");\r\n\r\n queue.clear();\r\n }",
"int postFiles(String [] args,int startIndexInArgs) throws IOException {\n int filesPosted = 0;\n for (int j = 1; j < args.length; j++) {\n File srcFile = new File(args[j]);\n final StringWriter sw = new StringWriter();\n \n if (srcFile.canRead()) {\n info(\"POSTing file \" + srcFile.getName());\n postFile(srcFile, sw);\n filesPosted++;\n warnIfNotExpectedResponse(sw.toString(),SOLR_OK_RESPONSE);\n } else {\n warn(\"Cannot read input file: \" + srcFile);\n }\n }\n return filesPosted;\n }",
"private RequestResponse handleIndexRequest(Request request, Response response) throws ServiceException {\n response.type(\"application/json\");\n\n String core = request.params(\":core\");\n if (StringUtils.isEmpty(core)) {\n throw new ServiceException(\"Failed to provide an index core for the document\");\n }\n\n ContentDocument contentDocument = new RequestToContentDocument().convert(request);\n return this.searchService.index(core, contentDocument);\n }",
"void index(IDocument document, IIndexerOutput output) throws java.io.IOException;",
"private void createFileTableIndexes() throws Exception {\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index FILE_ID_INDEX_FILE on FILE(FILE_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index START_REVISION_ID_INDEX_FILE on FILE(START_REVISION_ID)\");\n \t\tdbManager\n \t\t\t\t.executeUpdate(\"create index END_REVISION_ID_INDEX_FILE on FILE(END_REVISION_ID)\");\n \t}",
"LuceneMemoryIndex createLuceneMemoryIndex();",
"private int LinearSearchAfterBinary(String filename, ArrayList<Integer> matchingPositions, String wordToBeSearched, int linesToSkip, boolean reverseFile)\n {\n try\n {\n //Try to open the index file using a Scanner\n Scanner indexFileFileScanner = new Scanner(new File(filename + \".ndx\"));\n\n //Counter for the data page accesses\n int dataPageCounter = 0;\n\n //Flag for the search process status\n boolean searchStatus = true;\n\n //Counter of the word matching\n int wordOccurrences = matchingPositions.size();\n\n //Check whether to search the top or the bottom part of the file\n if(reverseFile)\n {\n //Create an ArrayList object to store the part of the file to continue the search\n ArrayList<String> fileLines = new ArrayList<>();\n\n //Get the necessary lines from the file\n for(int index = 0; index < linesToSkip; index++)\n {\n fileLines.add(indexFileFileScanner.nextLine());\n }\n\n //If the word to be searched length is valid, scan every data page in the ArrayList, in reverse order\n while(fileLines.size() != dataPageCounter && searchStatus)\n {\n //Fetch the data page into the ByteBuffer\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(fileLines.get(fileLines.size() - dataPageCounter - 1), SizeConstants.getBufferSize()));\n\n //Search for the word to be searched in the data page\n searchStatus = LinearSearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions);\n\n //Count the data page access\n dataPageCounter++;\n\n //Check if there no more occurrences of the word to be searched\n if(!matchingPositions.isEmpty())\n {\n //If there are continue the search\n if(wordOccurrences != matchingPositions.size())\n {\n wordOccurrences = matchingPositions.size();\n }\n else\n {\n //Stop the search\n searchStatus = false;\n }\n }\n }\n }\n else\n {\n //Skip lines of the file\n SkipLines(indexFileFileScanner, linesToSkip);\n\n //If the word to be searched length is valid, scan every data page in the file\n while(indexFileFileScanner.hasNext() && searchStatus)\n {\n //Fetch the data page into the ByteBuffer\n ByteBuffer bytePageBuffer = ByteBuffer.wrap(StringToByteArrayTranslator(indexFileFileScanner.nextLine(), SizeConstants.getBufferSize()));\n\n //Search for the word to be searched in the data page\n searchStatus = LinearSearchBytePage(wordToBeSearched,bytePageBuffer.array(), matchingPositions);\n\n //Count the data page access\n dataPageCounter++;\n\n //Check if there no more occurrences of the word to be searched\n if(!matchingPositions.isEmpty())\n {\n //If there are continue the search\n if(wordOccurrences != matchingPositions.size())\n {\n wordOccurrences = matchingPositions.size();\n }\n else\n {\n //Stop the search\n searchStatus = false;\n }\n }\n }\n }\n\n //Close the FileScanner\n indexFileFileScanner.close();\n\n //Return the number of data page accesses\n return dataPageCounter;\n }\n catch (FileNotFoundException e)\n {\n //Catch the FileNotFoundException and inform the user\n System.out.println(\"File: \" + this.Filename + \" cannot be opened.\");\n e.printStackTrace();\n return 0;\n }\n }",
"public List<CorpusSearchHit> searchNext() {\n List<CorpusSearchHit> hits;\n Path file = fileIterator.next();\n\n hits = new ArrayList<>();\n try {\n MDCDocumentReader reader = new MDCDocumentReader();\n MDCDocument mdcDocument = reader.loadFile(file.toFile());\n List<MDCPosition> positions = query.doSearch(mdcDocument.getHieroglyphicTextModel().getModel());\n // see information about MDCPosition for more details.\n for (MDCPosition pos : positions) {\n hits.add(new CorpusSearchHit(file, pos.getIndex()));\n }\n result.addAll(hits);\n } catch (MDCSyntaxError | IOException e) {\n System.err.println(\"Error in file \" + file.toString());\n }\n\n return hits;\n }",
"public void start() throws Exception {\n\n createIndex();\n }",
"private void setIndexArray() throws IOException {\n\n byte[] recBuf = new byte[INDEX_RECORD_LENGTH];\n long rafPos = ShapeConst.SHAPE_FILE_HEADER_LENGTH;\n int iaIndex = 0;\n ArrayList indexArrayVector = new ArrayList(10000);\n\n raf.seek(rafPos);\n // loop over index records, until EOF\n while (raf.read(recBuf, 0, INDEX_RECORD_LENGTH) != -1) {\n IndexRecord ir = new IndexRecord(recBuf);\n\n // set ArrayVector item as index record\n indexArrayVector.add(ir);\n\n // array index adjustment\n ++iaIndex;\n\n // filepos adjustment\n rafPos = rafPos + INDEX_RECORD_LENGTH;\n raf.seek(rafPos);\n } // end of while\n\n // iaIndex holds Record Number\n RecordNum = iaIndex;\n\n // copy vector into indexArray\n indexArray = (IndexRecord[]) indexArrayVector.toArray(new IndexRecord[RecordNum]);\n }",
"private void indexDocument(File f) throws IOException {\n\n\t\tHashMap<String, StringBuilder> fm;\n\t\tif (!f.getName().equals(\".DS_Store\")) {\n\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(f));\n\n\t\t\tString s = \"\";\n\t\t\twhile ((s = br.readLine()) != null) {\n\n\t\t\t\tString temp = \"\";\n\n\t\t\t\tif (s.contains(\"<DOC>\")) {\n\n\t\t\t\t\ts = br.readLine();\n\n\t\t\t\t\twhile (!s.contains(\"</DOC>\")) {\n\n\t\t\t\t\t\ttemp += s + \" \";\n\n\t\t\t\t\t\ts = br.readLine();\n\t\t\t\t\t}\n\n\t\t\t\t\tfm = parseTags(temp);\n\t\t\t\t\tindexDocumentHelper(fm);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\n\t}",
"@ManagedOperation(description = \"Starts rebuilding the index\", displayName = \"Rebuild index\")\n void start();",
"public void controlIndex(String path)\n { \t \n \t JSONParser parser = new JSONParser();\n \t \n \t try\n \t {\n \t\t JSONArray array = (JSONArray)parser.parse(new FileReader(path));\n \t\t \n \t\t JSONObject jsonObject = new JSONObject();\n \t\t JSONObject metaObj;\n \t\t \n \t\t for(Object obj : array)\n \t\t {\n \t\t\t jsonObject = (JSONObject) obj;\n \t\t\t String p = jsonObject.get(\"p\").toString().replaceAll(\"\\\\\\\\\", \"/\");\n \t\t\t metaObj = (JSONObject) jsonObject.get(\"metadata\");\n \t\t\t \n \t\t\t String title = \"\";\n \t\t\t String description = \"\"; \n \t\t\t if(metaObj.get(\"title\")!=null)\n \t\t\t {\n \t\t\t\t title = metaObj.get(\"title\").toString();\n \t\t\t }\n \t\t\t if(metaObj.get(\"description\")!=null)\n \t\t\t {\n \t\t\t\t description = metaObj.get(\"description\").toString();\n \t\t\t }\n \t\t\t \n \t\t\t String id = p.substring(p.lastIndexOf(\"/\")+1,p.lastIndexOf(\".\"));\n \t\t\t \n \t\t\t performIndex(p,id,title,description);\n \t\t\t performMetaIndex(jsonObject.get(\"metadata\"),id);\n \t\t }\n \t\t fileWriter();\n \t\t }\n \t catch(Exception e)\n \t { \t\n \t\t e.printStackTrace();\n \t }\n }",
"public static void main(String[] args) throws Exception {\n String usage =\n \"Usage:\\tjava org.apache.lucene.demo.SearchFiles [-index dir] [-field f] [-repeat n] [-queries file] [-query string] [-raw] [-paging hitsPerPage]\\n\\nSee http://lucene.apache.org/core/4_1_0/demo/ for details.\";\n if (args.length > 0 && (\"-h\".equals(args[0]) || \"-help\".equals(args[0]))) {\n System.out.println(usage);\n System.exit(0);\n }\n\n String index = \"index\";\n String field = \"contents\";\n String queries = null;\n int repeat = 0;\n boolean raw = false;\n String queryString = null;\n int hitsPerPage = 10;\n String[] fileTypes = null;\n Date fileDate = null;\n Set<String> mFilesSet = new HashSet<>();\n DateFormat dateFormat = new SimpleDateFormat(\"yyyy-MM-dd\");\n String fileDateString = null;\n\n for (int i = 0; i < args.length; i++) {\n if (\"-index\".equals(args[i])) {\n index = args[i + 1];\n i++;\n } else if (\"-field\".equals(args[i])) {\n field = args[i + 1];\n i++;\n } else if (\"-queries\".equals(args[i])) {\n queries = args[i + 1];\n i++;\n } else if (\"-query\".equals(args[i])) {\n queryString = args[i + 1];\n i++;\n } else if (\"-repeat\".equals(args[i])) {\n repeat = Integer.parseInt(args[i + 1]);\n i++;\n } else if (\"-raw\".equals(args[i])) {\n raw = true;\n } else if (\"-paging\".equals(args[i])) {\n hitsPerPage = Integer.parseInt(args[i + 1]);\n if (hitsPerPage <= 0) {\n System.err.println(\"There must be at least 1 hit per page.\");\n System.exit(1);\n }\n i++;\n } else if(\"-filter\".equals(args[i])){\n filtering = true;\n }\n }\n\n if(filtering) {\n //read the filters file\n try (\n InputStream fis = new FileInputStream(\"filters.txt\");\n InputStreamReader isr = new InputStreamReader(fis, Charset.defaultCharset());\n BufferedReader br = new BufferedReader(isr);\n ) {\n //read first line which contains the types of the files to be searched\n Stream<String> lines;\n lines = br.lines();\n\n\n for (Iterator<String> i = lines.iterator(); i.hasNext(); ) {\n String line;\n line = i.next();\n if (line.startsWith(\"#\")) { //ignore comments in filters file\n } else if (line.startsWith(\"files: \")) {\n line = line.replaceFirst(\"files: \", \"\");\n fileTypes = line.split(\",\");\n mFilesSet.add(\"pdf\");\n mFilesSet.add(\"txt\");\n mFilesSet.add(\"epub\");\n for (int j = 0; j < fileTypes.length; j++) {\n mFilesSet.remove(fileTypes[j]); //remove from the hashset those file types parsed from the user file\n }\n } else if (line.startsWith(\"date:\")) {\n line = line.replaceFirst(\"date: \", \"\");\n fileDate = dateFormat.parse(line);\n fileDateString = line;\n //System.out.println(fileDateString);\n //System.out.println(\"Date: \" + fileDate.toString());\n }\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }\n\n IndexReader reader = DirectoryReader.open(FSDirectory.open(Paths.get(index)));\n IndexSearcher searcher = new IndexSearcher(reader);\n Analyzer analyzer = new MyAnalyzer();\n\n BufferedReader in = null;\n\n if (queries != null) {\n in = Files.newBufferedReader(Paths.get(queries), StandardCharsets.UTF_8);\n } else {\n in = new BufferedReader(new InputStreamReader(System.in, StandardCharsets.UTF_8));\n }\n\n QueryParser parser = new QueryParser(field, analyzer);\n BooleanQuery.Builder booleanQueryBuilder = new BooleanQuery.Builder();\n BooleanQuery booleanQuery = booleanQueryBuilder.build();\n while (true) {\n if (queries == null && queryString == null) {// prompt the user\n System.out.println(\"Enter query: \");\n }\n\n String line = queryString != null ? queryString : in.readLine();\n\n if (line == null || line.length() == -1) {\n break;\n }\n\n line = line.trim();\n if (line.length() == 0) {\n break;\n }\n\n Query query;\n\n if(filtering) {\n for (Iterator<String> iterator = mFilesSet.iterator(); iterator.hasNext(); ) {\n String mString = iterator.next();\n Query mQuery = new TermQuery(new Term(\"filetype\", mString));\n booleanQueryBuilder.add(mQuery, BooleanClause.Occur.MUST_NOT);\n }\n query = parser.parse(line);\n\n Date currentDate = new Date();\n BytesRef lowerTerm = new BytesRef(fileDateString);\n BytesRef upperTerm = new BytesRef(dateFormat.format(currentDate));\n //System.out.println(dateFormat.format(currentDate));\n TermRangeQuery dateQuery = TermRangeQuery.newStringRange(\"modified\",fileDateString,dateFormat.format(currentDate),false,false);\n //Query dateQuery = IntPoint.newRangeQuery(\"modified\", ((int) fileDate.getTime()),(int)currentDate.getTime());\n booleanQueryBuilder.add(dateQuery, BooleanClause.Occur.MUST);\n booleanQueryBuilder.add(query, BooleanClause.Occur.MUST);\n //booleanQueryBuilder.add(dateQuery, BooleanClause.Occur.MUST);\n\n booleanQuery = booleanQueryBuilder.build();\n //System.out.println(\"Query: \" + booleanQuery.toString());\n //System.out.println(\"Searching for: \" + query.toString(field));\n }\n else {\n query = parser.parse(line);\n }\n if (repeat > 0) { // repeat & time as benchmark\n Date start = new Date();\n for (int i = 0; i < repeat; i++) {\n searcher.search(query, 100);\n }\n Date end = new Date();\n System.out.println(\"Time: \" + (end.getTime() - start.getTime()) + \"ms\");\n }\n\n if(filtering){\n doPagingSearch(in, searcher, booleanQuery, hitsPerPage, raw, queries == null && queryString == null);\n }\n else {\n doPagingSearch(in, searcher, query, hitsPerPage, raw, queries == null && queryString == null);\n }\n if (queryString != null) {\n break;\n }\n }\n reader.close();\n\n }",
"public void indexFileOrDirectory(String fileName, String packageType) throws IOException {\n //===================================================\n //gets the list of files in a folder (if user has submitted\n //the name of a folder) or gets a single file name (is user\n //has submitted only the file name)\n //===================================================\n this.setThreadCount(this.queue.size());\n int originalNumDocs = writer.numDocs();\n startTime = System.currentTimeMillis();\n for (File f : queue) {\n LogReader lr = new LogReader(f.getAbsolutePath());\n \n Thread t = new Thread(new Runnable(){//Using thread \n\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\tcurrentThreadCount = currentThreadCount + 1;\n\t\t\t\t\tSystem.out.println(\"Number of thread: \" + currentThreadCount);\n\t\t\t\t\ttry {\n\t\t for (int cnt = 0; ; cnt++) {\n\t\t \tif(lr == null){\n\t\t \t\tSystem.out.println(\"hello\");\n\t\t \t}\n\t\t ArrayList<Package> list = lr.PackagesWrapper(2000);\n\t\t if (list == null || list.size() <= 0)\n\t\t {\n\t\t break;\n\t\t }\n\n\t\t int size = list.size();\n\t\t ArrayList<Document> docs = new ArrayList<Document>();\n\t\t for (int i = 0; i < size; i++)\n\t\t {\n\t\t Package p = list.get(i);\n\t\t Document doc = new Document();\n\t\t deWrapString(packageType, p, doc);\n\t\t \n\t\t docs.add(doc);\n\t\t }\n\n\t\t writer.addDocuments(docs);\n\n\t\t if (cnt != 0 && cnt % 10 == 0) {\n\t\t flush();\n\t\t currentTime = System.currentTimeMillis();\n\t\t \n\t\t System.out.println(\"Current document: \" + writer.numDocs() + \n\t\t \t\t\", current indexing rate: \" + (writer.numDocs()/ (currentTime - startTime)) * 1000);\n\t\t }\n\t\t }\n\t\t System.out.println(\"Added: \" + f);\n\t\t } catch (Exception e) {\n\t\t \te.printStackTrace();\n\t\t System.out.println(\"Could not add: \" + f);\n\t\t } finally {\n\t\t \tthreadCount--;\n\t\t }\n\t\t\t\t}\n \t\n });\n t.start(); \n /*\n try {\n for (int cnt = 0; ; cnt++) {\n ArrayList<Package> list = lr.PackagesWrapper(2000);\n if (list == null || list.size() <= 0)\n {\n break;\n }\n\n int size = list.size();\n ArrayList<Document> docs = new ArrayList<Document>();\n for (int i = 0; i < size; i++)\n {\n Package p = list.get(i);\n Document doc = new Document();\n this.deWrapString(packageType, p, doc);\n \n docs.add(doc);\n }\n\n writer.addDocuments(docs);\n\n if (cnt % 10 == 0) {\n flush();\n System.out.println(\"bulk count: \" + cnt);\n }\n }\n System.out.println(\"Added: \" + f);\n } catch (Exception e) {\n System.out.println(\"Could not add: \" + f);\n } finally {\n\n }*/\n }\n \n /*\n int newNumDocs = writer.numDocs();\n System.out.println(\"\");\n System.out.println(\"************************\");\n System.out.println((newNumDocs - originalNumDocs) + \" documents added.\");\n System.out.println(\"************************\");\n queue.clear();\n */\n }",
"ds.hdfs.generated.FileMetadata getFiles(int index);",
"public void createIndex(String dataDirPath){\n\t\tFile[] files = new File(dataDirPath).listFiles();\n\n\t\tfor (File file : files) {\n\t\t\tif(!file.isDirectory()\n\t\t\t\t\t&& !file.isHidden()\n\t\t\t\t\t&& file.exists()\n\t\t\t\t\t){\n\t\t\t\t//add to Map\n\t\t\t\t// m.put(file.getAbsolutePath(), new RankModel(file,0,getOutLinks(file.getAbsolutePath())));\n\t\t\t\tallFiles.add(file.getAbsolutePath());\n\t\t\t}else{\n\t\t\t\tcreateIndex(file.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t\t// return writer.numDocs();\n\t}",
"@Override\n\tpublic String indexData(String db, String filename,\n\t\t\tWeightComputer weightComputer, TextTransformer trans)\n\t\t\tthrows IOException {\n\t\tString cascades_collection=MongoDB.mongoDB.createCollection(db,\"cascades\",\" cascades from \"+filename+\" selon \"+this.toString()+\" avec \"+weightComputer+\" transform par \"+trans);\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(\"Indexation \"+filename);\n\t\t//ArrayListStruct<User> ret=new ArrayListStruct<User>();\n\t\tHashMap<String,User> users=new HashMap<String,User>();\n\t\tHashSet<Post> posts=new HashSet<Post>();\n\t\tHashSet<Cascade> cascades=new HashSet<Cascade>();\n\t\t\n\t\tStemmer stemmer=new Stemmer();\n\t\tBufferedReader lecteur=new BufferedReader(new FileReader(filename));\n\t\tBufferedReader lecteurW=new BufferedReader(new FileReader(this.cascadesWeightsFile));\n\t\ttry{\n\t\t\tString ligne;\n\t\t\tint nbl=0;\n\t\t\twhile((ligne=lecteur.readLine())!=null){\n\t\t\t\tnbl++;\n\t\t\t}\n\t\t\tSystem.out.println(nbl+\" lignes\");\n\t\t\tlecteur.close();\n\t\t\tlecteur=new BufferedReader(new FileReader(filename));\n\t\t\tint nb=0;\n\t\t\tint nbc=0;\n\t\t\tint nbinvalides=0;\n\t\t\tlecteur.readLine();\n\t\t\tlecteurW.readLine();\n\t\t\twhile(((ligne=lecteur.readLine())!=null)){ // && (nb<10000)){\n\t\t\t\t\t//System.out.println(ligne); \n\t\t\t\t\t\n\t\t\t\tligne=ligne.replaceAll(\"\\r\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\"\\\\r\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\"\\\\\\\\r\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\"\\n\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\"\\\\n\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\"\\\\\\\\n\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\"\\t\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\"\\\\t\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\"\\\\\\\\t\", \" \");\n\t\t\t\tligne=ligne.replaceAll(\" \", \" \");\n\t\t\t\tligne=ligne.replace(\"^ \", \"\");\n\t\t\t\t\t//System.out.println(ligne);\n\t\t\t\t\tString[] li=ligne.split(\" \");\n\t\t\t\t\tUser user;\n\t\t\t\t\t\n\t\t\t\t\tif (li.length>=2){\n\t\t\t\t\t\t//System.out.println(li[0]+\":\"+li[1]);\n\t\t\t\t\t\tHashMap<String,Post> pc=new HashMap<String,Post>();\n\t\t\t\t\t\tHashMap<String,Long> vusUsers=new HashMap<String,Long>();\n\t\t\t\t\t\tfor(int i=0;i<li.length;i++){\n\t\t\t\t\t\t\tString[] triplet=li[i].split(\",\");\n\t\t\t\t\t\t\tif (users.containsKey(triplet[1])){\n\t\t\t\t\t\t\t\tuser=users.get(triplet[1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\tuser=User.getUser(triplet[1]);\n\t\t\t\t\t\t\t\tusers.put(triplet[1],user);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlong t=Long.valueOf(triplet[2])+1;\n\t\t\t\t\t\t\tif(triplet[0].compareTo(\"i\")==0){\n\t\t\t\t\t\t\t\tt=0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif((!vusUsers.containsKey(user.getName())) || (vusUsers.get(user.getName())<t)){\n\t\t\t\t\t\t\t\tPost p=new Post(\"\",user,t,null);\n\t\t\t\t\t\t\t\tpc.put(user.getName(),p);\n\t\t\t\t\t\t\t\tvusUsers.put(user.getName(),t);\n\t\t\t\t\t\t\t\tposts.add(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(pc.size()>1){\n\t\t\t\t\t\t\tString wl=lecteurW.readLine();\n\t\t\t\t\t\t\tString[] ws=wl.split(\" \");\n\t\t\t\t\t\t\tHashMap<Integer,Double> weights=new HashMap<Integer,Double>();\n\t\t\t\t\t\t\tfor(int i=0;i<ws.length;i++){\n\t\t\t\t\t\t\t\tString[] st=ws[i].split(\",\");\n\t\t\t\t\t\t\t\tweights.put(Integer.parseInt(st[0])+add, Double.valueOf(st[1]));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tnbc++;\n\t\t\t\t\t\t\tCascade c=new ArtificialCascade(nbc,nbc+\"\",new HashSet<Post>(pc.values()),weights);\n\t\t\t\t\t\t\tc.indexInto(db, cascades_collection);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"ligne invalide :\" + ligne);\n\t\t\t\t\t\tnbinvalides++;\n\t\t\t\t\t\t//break;\n\t\t\t\t\t}\n\t\t\t\t\tnb++;\n\t\t\t\t\tif (nb%100==0){\n\t\t\t\t\t\tSystem.out.println(nb+\"/\"+nbl+\" lignes traitees\");\n\t\t\t\t\t}\n\n\t\t\t}\n\t\t\tSystem.out.println(nbinvalides+\" lignes invalides\");\n\t\t\t\n\t\t\t/*nb=0;\n\t\t\tnbl=posts.size();\n\t\t\tfor(Post post:posts){\n\t\t\t\tpost.indexInto(collection);\n\t\t\t\tif (nb%100==0){\n\t\t\t\t\tSystem.out.println(nb+\"/\"+nbl+\" posts inseres\");\n\t\t\t\t}\n\t\t\t\tnb++;\n\t\t\t}*/\n\t\t\tSystem.out.println(\"Creation indexs\");\n\t\t\tDBCollection col=MongoDB.mongoDB.getCollectionFromDB(db,cascades_collection);\n\t\t\tcol.ensureIndex(new BasicDBObject(\"id\", 1));\n\t\t}\n\t\tfinally{\n\t\t\tlecteur.close();\n\t\t\tlecteurW.close();\n\t\t}\n\t\t\n\t\treturn cascades_collection;\n\t}",
"@Override\r\n\t\tpublic boolean accept(File dir, String name) {\n\t\t\treturn indexFilenames.contains(name.toLowerCase());\r\n\t\t}",
"private static void createIndex() {\n XML_Shell workFile = new XML_Shell();\n String messageFromServer = ClientService.getLastMessageFromServer();\n\n try {\n XML_Manager.stringToDom(messageFromServer, workFile);\n } catch (SAXException | ParserConfigurationException | IOException | TransformerException e) {\n e.printStackTrace();\n }\n\n }",
"@Override\n\tpublic void indexObject(List<ModelKey> list) throws ASException {\n\t\t\n\t}",
"@Override\r\n\tprotected void indexDocument(PluginServiceCallbacks callbacks, JSONResponse jsonResults, HttpServletRequest request,\r\n\t\t\tIndexing indexing) throws Exception {\n\t\t\r\n\t}",
"@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }",
"@MBean(objectName = \"MassIndexer\",\n description = \"Component that rebuilds the index from the cached data\")\npublic interface MassIndexer {\n\n //TODO Add more parameters here, like timeout when it will be implemented\n //(see ISPN-1313, and ISPN-1042 for task cancellation)\n @ManagedOperation(description = \"Starts rebuilding the index\", displayName = \"Rebuild index\")\n void start();\n\n}",
"public int createIndex(String dataDirPath, FileFilter filter) throws IOException {\n\t\tFile[] files = new File(dataDirPath).listFiles();\r\n\t\tfor (int i = 0; i < files.length; i++) {\r\n\t\t\tif (!files[i].isDirectory() && !files[i].isHidden() && files[i].exists() && files[i].canRead()\r\n\t\t\t\t\t&& filter.accept(files[i])) {\r\n\t\t\t\tindexFile(files[i], (i % 2));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn writer.numDocs();\r\n\t}",
"public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}",
"private static void testFileSearch(TrackingServer ts) {\r\n\t\tString requestFormat = \"FIND=%s|FAILED_SERVERS=%s\";\r\n\t\tString finalRequest = null;\r\n\t\tStringBuilder failedPeer = null;\r\n\t\tts.readL.lock();\r\n\t\ttry {\r\n\t\t\tfor (Entry<String, HashSet<Machine>> entry : ts.filesServersMap.entrySet()) {\r\n\t\t\t\tfailedPeer = new StringBuilder();\r\n\t\t\t\tfor (Machine m : entry.getValue()) {\r\n\t\t\t\t\tfailedPeer.append(m.toString());\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tfinalRequest = String.format(requestFormat, entry.getKey(), failedPeer.toString());\r\n\t\t\t\tbyte[] result = ts.handleSpecificRequest(finalRequest);\r\n\t\t\t\tSystem.out.println(\"result of find=\" + Utils.byteToString(result) + \" entrySet=\" + entry.getValue());\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tts.readL.unlock();\r\n\t\t}\r\n\r\n\t}",
"public void indexFileOrDirectory(String fileName) throws IOException {\n\t// gets the list of files in a folder (if user has submitted\n\t// the name of a folder) or gets a single file name (is user\n\t// has submitted only the file name)\n\t// ===================================================\n\taddFiles(new File(fileName));\n\n\tint originalNumDocs = writer.numDocs();\n\tfor (File f : queue) {\n\t FileReader fr = null;\n\t try {\n\t\tDocument doc = new Document();\n\n\t\t// ===================================================\n\t\t// add contents of file\n\t\t// ===================================================\n\t\tfr = new FileReader(f);\n\t\tdoc.add(new TextField(\"contents\", fr));\n\t\tdoc.add(new StringField(\"path\", f.getPath(), Field.Store.YES));\n\t\tdoc.add(new StringField(\"filename\", f.getName(),\n\t\t\tField.Store.YES));\n\n\t\twriter.addDocument(doc);\n\t\t//System.out.println(\"Added: \" + f);\n\t } catch (Exception e) {\n\t\tSystem.out.println(\"Could not add: \" + f);\n\t } finally {\n\t\tfr.close();\n\t }\n\t}\n\n\tint newNumDocs = writer.numDocs();\n\tSystem.out.println(\"\");\n\tSystem.out.println(\"************************\");\n\tSystem.out\n\t\t.println((newNumDocs - originalNumDocs) + \" documents added.\");\n\tSystem.out.println(\"************************\");\n\n\tqueue.clear();\n }",
"public void index(List<Entity> entities) {\n\t\t\n\t}",
"private Reindex() {}",
"private Reindex() {}",
"private void performSearchUsingFileContents(File file) {\n try {\n FileUtility.CustomFileReader customFileReader =\n new FileUtility.CustomFileReader(file.getAbsolutePath()\n .replace(\".txt\", \"\"));\n\n String queryString = null; int i = 1;\n while ((queryString = customFileReader.readLineFromFile()) != null) {\n \t\n Query q = new QueryParser(Version.LUCENE_47, \"contents\",\n analyzer).parse(QueryParser.escape(queryString));\n\n collector = TopScoreDocCollector\n .create(100, true);\n searcher.search(q, collector);\n ScoreDoc[] hits = collector.topDocs().scoreDocs;\n\n Map<String, Float> documentScoreMapper =\n new HashMap<>();\n Arrays.stream(hits).forEach(hit ->\n {\n int docId = hit.doc;\n Document d = null;\n try {\n d = searcher.doc(docId);\n documentScoreMapper.put(d.get(\"path\"), hit.score);\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n\n SearchResult searchResult =\n new SearchResult(String.valueOf(i), documentScoreMapper);\n\n FileUtility.writeToFile(searchResult, SEARCH_RESULT_DIR + File.separator + i);\n i++;\n\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws CorruptIndexException, LockObtainFailedException, IOException, ParseException{\n\t\tboolean lucene_im_mem = false;\n\t\t//1. Build the Index with varying \"database size\"\n\t\tString dirName =\"/data/home/duy113/SupSearchExp/AIDSNew/\";\n//\t\tString dirName = \"/Users/dayuyuan/Documents/workspace/Experiment/\";\n\t\tString dbFileName = dirName + \"DBFile\";\n\t\tString trainQueryName= dirName + \"TrainQuery\";\n//\t\tString testQuery15 = dirName + \"TestQuery15\";\n\t\tString testQuery25 = dirName + \"TestQuery25\";\n//\t\tString testQuery35 = dirName + \"TestQuery35\";\n\t\tGraphDatabase query = new GraphDatabase_OnDisk(testQuery25, MyFactory.getSmilesParser());\n\t\tdouble[] minSupts = new double[4];\n\t\tminSupts[0] = 0.05; minSupts[1] = 0.03; minSupts[2] =0.02; minSupts[3] = 0.01;\n \t\tint lwIndexCount[] = new int[1];\n\t\tlwIndexCount[0] = 479;\t\n//\t\tSystem.out.println(\"Build CIndexFlat Left-over: \");\n//\t\tfor(int j = 3; j< 4; j++){\n//\t\t\tdouble minSupt = minSupts[j];\n//\t\t\tfor(int i = 4; i<=10; i = i+2){\n//\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n//\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n//\t\t\t\tif(i == 2){\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n//\t\t\t\t\tCIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n//\t\t\t\t}\n//\t\t\t\telse{\n//\t\t\t\t\tString featureBaseName = dirName + \"G_2\" + \"MinSup_\" + minSupt + \"/\";\n//\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat with Features \" + featureBaseName);\n//\t\t\t\t\tCIndexExp.buildIndex(featureBaseName, trainingDB, baseName, minSupt);\n//\t\t\t\t}\n//\t\t\t\tSystem.gc();\n//\t\t\t}\n//\t\t}\n\t\tSystem.out.println(\"Run Query Processing: \");\n\t\tfor(int j = 0; j< 4; j++){\n\t\t\tdouble minSupt = minSupts[j];\n\t\t\tfor(int i = 2; i<=10; i = i+2){\n\t\t\t\tString baseName = dirName + \"G_\" + i + \"MinSup_\" + minSupt + \"/\";\n\t\t\t\tGraphDatabase trainingDB = new GraphDatabase_OnDisk(dbFileName + i, MyFactory.getDFSCoder());\n\t\t\t\tGraphDatabase trainQuery = new GraphDatabase_OnDisk(trainQueryName, MyFactory.getSmilesParser());\t\t\n\t\t\t\tif(j!=0 || i!=2){\n\t\t\t\t\tSystem.out.println(baseName + \"LWindex\");\n\t\t\t\t\t//LWIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, trainQuery.getParser(),baseName, minSupt, lwIndexCount);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tLWIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndex\");\n\t\t\t\t\t//PrefixIndexExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\t\t\n\t\t\t\t\tSystem.out.println(baseName + \"PrefixIndexHi\");\n\t\t\t\t\t//PrefixIndexExp.buildHiIndex(trainingDB, trainingDB, 2, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tPrefixIndexExp.runHiIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"GPTree\");\n\t\t\t\t\t//GPTreeExp.buildIndex(trainingDB, trainingDB, baseName, minSupt);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tGPTreeExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexFlat\");\n\t\t\t\t\t//CIndexExp.buildIndex(trainingDB, trainQuery, trainingDB, baseName, minSupt, lwIndexCount[0]);\n\t\t\t\t\t//System.gc();\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\t\tCIndexExp.runIndex(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\t\tSystem.gc();\n\t\t\t\t}\n\t\t\t\tif(j==0&&i==2){\n\t\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\t\tCIndexExp.buildIndexTopDown(trainingDB, trainQuery, trainingDB,MyFactory.getUnCanDFS(), baseName, minSupt, 2*trainQuery.getTotalNum()/lwIndexCount[0] ); // 8000 test queries\n\t\t\t\t\t//System.gc();\n\t\t\t\t}\n\t\t\t\tSystem.out.println(baseName + \"CIndexTopDown: \" + lwIndexCount[0]);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, trainQuery, baseName, lucene_im_mem);\n\t\t\t\tCIndexExp.runIndexTopDown(trainingDB, query, baseName, lucene_im_mem);\n\t\t\t\tSystem.gc();\n\t\t\t}\n\t\t}\n\t\tAIDSLargeExp.main(args);\n\t}",
"Mono<ServerResponse> indexManagement(ServerRequest request);",
"public static void main(String[] args) throws IOException {\n boolean passed = false;\r\n if (args.length > 0) {\r\n File f = new File(args[0]);\r\n System.out.println(\"Indexing images in \" + args[0]);\r\n if (f.exists() && f.isDirectory()) passed = true;\r\n }\r\n if (!passed) {\r\n System.out.println(\"No directory given as first argument.\");\r\n System.out.println(\"Run \\\"ParallelIndexing <directory>\\\" to index files of a directory.\");\r\n System.exit(1);\r\n }\r\n\r\n // use ParallelIndexer to index all photos from args[0] into \"index\" ... use 6 threads (actually 7 with the I/O thread).\r\n ParallelIndexer indexer = new ParallelIndexer(6, \"index\", args[0]);\r\n // use this to add you preferred builders. For now we go for CEDD, FCTH and AutoColorCorrelogram\r\n indexer.addExtractor(CEDD.class);\r\n indexer.addExtractor(FCTH.class);\r\n indexer.addExtractor(AutoColorCorrelogram.class);\r\n indexer.run();\r\n System.out.println(\"Finished indexing.\");\r\n }",
"public long getFileIndex(){\n \tString fileName=file.getName();\n// \tSystem.out.println(\"fileName:\"+fileName);\n \tfinal long start = Long.parseLong(fileName.substring(0,\n\t\t\t\tfileName.length() - FILE_SUFFIX.length()));\n// \tSystem.out.println(\"start:\"+start);\n \treturn start;\n }",
"public IndexFile(String url, String rwflag) throws IOException {\n\n // delete file if it exists\n File file = new File(url + _shx);\n if (rwflag.indexOf('w') > -1 && file.exists())\n {\n file.delete();\n FileOutputStream os = new FileOutputStream(file, false);\n os.close();\n }\n file = null; \n raf = new RandomAccessFile(url + _shx, rwflag);\n // if the 2nd arg is true an empty header will be\n // written by FileHeader\n fh = new FileHeader(raf, rwflag.indexOf('w') > -1); \n fileMBR = fh.getFileMBR();\n offset = raf.length();\n\n if (offset < 100)\n {\n offset = ShapeConst.SHAPE_FILE_HEADER_LENGTH;\n } \n setIndexArray();\n }",
"protected static void startIndexing(Path p, int option) throws ClassNotFoundException, InstantiationException, IllegalAccessException, IOException {\n\n path = p.toString();\n //corpus = DirectoryCorpus.loadTextDirectory(p.toAbsolutePath(), \".txt\");// To run .txt files\n corpus = DirectoryCorpus.loadJsonTextDirectory(p.toAbsolutePath(), \".json\");\n\n if (option == 0) { //build index\n buildMode = true;\n queryMode = false;\n long startTime = System.nanoTime();\n Index index = posindexCorpus(corpus);\n diskWriter.WriteIndex(index, path);\n Disk_posIndex = new DiskPositionalIndex(path);\n long endTime = System.nanoTime();\n\n long elapsedTime = (endTime - startTime);\n double seconds = (double) elapsedTime / 1000000000.0;\n GUI.ResultsLabel.setText(\"Total Indexing Time: \" + new DecimalFormat(\"##.##\").format(seconds) + \" seconds\");\n\n } else { //query index\n buildMode = false;\n queryMode = true;\n Disk_posIndex = new DiskPositionalIndex(path);\n corpus.getDocuments();\n N = corpus.getCorpusSize();\n }\n\n }",
"@Test\n public void testFieldAlias() throws Exception {\n String[] files = new String[]{\n \"support/solr_test_documents/max_length_doc.txt\", \n };\n SolrServerUnitTestUtil.indexFiles(files);\n //Thread.sleep(1000000000L); \n \n //Find the post. Notice 255 characters seems to be Solr maximum token-size when searching\n SolrQuery query = new SolrQuery(\n //First 250 characters, wildcard search 1234567890......*\n \"1234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890*\"\n );\n QueryResponse response = solrServer.query(query);\n assertEquals(1L, response.getResults().getNumFound());\n \n \n }",
"entities.Torrent.FileInfo getFiles(int index);",
"public static void main(String[] args) throws IOException {\n\t\tif (args.length != 2) {\n\t\t\tSystem.err\n\t\t\t\t\t.println(\"You need to give database directory path and output directory path as arguments.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tdirectory = args[0];\n\t\toutputFilePath = args[1];\n\t\t// Get list of all files.\n\t\tFile[] listOfFiles = Util.getAllFiles(directory);\n\t\t// Get all the stop words in the sorted order.\n\t\tTreeMap<String, String> stopWords = Util\n\t\t\t\t.getStopWordsFromFile(stopWordFile);\n\t\tint numberOfFiles = listOfFiles.length;\n\t\t// 2D array to store the required information about each doc.\n\t\tInteger[][] docInfo = new Integer[numberOfFiles + 1][2];\n\t\tdouble timeForIndexVersion1 = 0.0d, timeForIndexVersion2 = 0.0d;\n\t\tlong startTime, endTime;\n\t\tif (numberOfFiles != 0) {\n\n\t\t\t// Starting creating Index version 1.\n\t\t\tstartTime = System.currentTimeMillis();\n\t\t\tfor (File file : listOfFiles) {\n\t\t\t\t// Get the doc id.\n\t\t\t\tint docId = Integer.parseInt(file.getName().substring(9));\n\t\t\t\t// For version 1:\n\t\t\t\t// do lemmatization\n\t\t\t\tMap<String, Integer> lemmasFromFile = lemmatizer\n\t\t\t\t\t\t.lemmatize(file);\n\t\t\t\t// remove stop words,\n\t\t\t\tMap<String, Integer> lemmasWoStopWords = Util.removeStopWords(\n\t\t\t\t\t\tlemmasFromFile, stopWords);\n\t\t\t\t// create index.\n\t\t\t\tindexVersion1.creatIndex(docId, lemmasWoStopWords);\n\t\t\t}\n\t\t\tendTime = System.currentTimeMillis();\n\t\t\t// calculate total time taken\n\t\t\ttimeForIndexVersion1 = (endTime - startTime) / 1000.0d;\n\n\t\t\t// indexVersion1.printIndex();\n\t\t\t// write uncompressed index of version 1 to a binary file.\n\t\t\tindexVersion1.writeIndexUncompressed(outputFilePath,\n\t\t\t\t\t\"Index_Version1.uncompress\");\n\t\t\t// compress index\n\t\t\tindexVersion1.compressIndex();\n\t\t\t// write compressed index of version 1 to a binary file.\n\t\t\tindexVersion1.writeIndexCompressed(outputFilePath,\n\t\t\t\t\t\"Index_Version1.compress\");\n\n\t\t\t// Starting creating Index version 2.\n\t\t\tstartTime = System.currentTimeMillis();\n\t\t\tfor (File file : listOfFiles) {\n\t\t\t\tint docId = Integer.parseInt(file.getName().substring(9));\n\t\t\t\t// For version 2:\n\t\t\t\t// generate tokens from the file\n\t\t\t\tMap<String, Integer> tokensFromFile = Util\n\t\t\t\t\t\t.getTokensFromFile(file);\n\t\t\t\t// do stemming\n\t\t\t\tMap<String, Integer> stemmedTokens = Util\n\t\t\t\t\t\t.getStemmedTokens(tokensFromFile);\n\t\t\t\t// remove stop words\n\t\t\t\tMap<String, Integer> stemmedTokensWoStopWords = Util\n\t\t\t\t\t\t.removeStopWords(stemmedTokens, stopWords);\n\t\t\t\t// update the information about current document.\n\t\t\t\tUtil.updateDocInfo(docInfo, docId, stemmedTokens,\n\t\t\t\t\t\tstemmedTokensWoStopWords);\n\t\t\t\t// System.out.println(\"DocId: \" + docId + \" Max Freq: \"\n\t\t\t\t// + docInfo[docId][0].toString() + \" Doc length: \"\n\t\t\t\t// + docInfo[docId][1].toString());\n\t\t\t\t// create index\n\t\t\t\tindexVersion2.creatIndex(docId, stemmedTokensWoStopWords);\n\n\t\t\t}\n\t\t\tendTime = System.currentTimeMillis();\n\t\t\t// calculate total time taken\n\t\t\ttimeForIndexVersion2 = (endTime - startTime) / 1000.0d;\n\t\t\t// write documents information to a binary file\n\t\t\twriteDocInfo(docInfo, outputFilePath, \"docs.info\");\n\t\t\t// write uncompressed index of version 2 to a binary file.\n\n\t\t\t// indexVersion2.printIndex();\n\t\t\tindexVersion2.writeIndexUncompressed(outputFilePath,\n\t\t\t\t\t\"Index_Version2.uncompress\");\n\t\t\t// compress index\n\t\t\tindexVersion2.compressIndex();\n\t\t\t// write compressed index of version 2 to a binary file.\n\t\t\tindexVersion2.writeIndexCompressed(outputFilePath,\n\t\t\t\t\t\"Index_Version2.compress\");\n\n\t\t\t// display the required information.\n\t\t\tdisplayOutput(timeForIndexVersion1, timeForIndexVersion2);\n\t\t} else {\n\t\t\tSystem.err.println(\"Empty folder\");\n\t\t}\n\t}",
"public void start(){\n\t\tboolean readFromFile = readFromIndex();\r\n\t\tif (!readFromFile){\t\r\n\t\t\tfor (int i = 0;i<1000;++i){\r\n\t\t\t\tString file = \"../crawler/pages/page\"+i+\".html\";\r\n\t\t\t\taddFile(file);\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void queryIndex() {\n if (predicate == TruePredicate.INSTANCE) {\n return;\n }\n\n // get indexes\n MapService mapService = nodeEngine.getService(SERVICE_NAME);\n MapServiceContext mapServiceContext = mapService.getMapServiceContext();\n Indexes indexes = mapServiceContext.getMapContainer(name).getIndexes();\n // optimize predicate\n QueryOptimizer queryOptimizer = mapServiceContext.getQueryOptimizer();\n predicate = queryOptimizer.optimize(predicate, indexes);\n\n Set<QueryableEntry> querySet = indexes.query(predicate);\n if (querySet == null) {\n return;\n }\n\n List<Data> keys = null;\n for (QueryableEntry e : querySet) {\n if (keys == null) {\n keys = new ArrayList<Data>(querySet.size());\n }\n keys.add(e.getKeyData());\n }\n\n hasIndex = true;\n keySet = keys == null ? Collections.<Data>emptySet() : InflatableSet.newBuilder(keys).build();\n }",
"@Override\n\tpublic int run(String[] args) throws Exception {\n\t\tPath inpath = null;\n\t\tPath outpath = null;\n\t\tPath filemap = null;\n\t\tboolean isSearch = false;\n\t\tboolean useMR = false;\n\t\tboolean useFilemap = false;\n\t\tboolean indexonly = false;\n\n\t\tList<String> other_args = new ArrayList<String>();\n\t\tfor (int i = 0; i < args.length; i++) {\n\t\t\tif (args[i].equals(\"-search\")) {\n\t\t\t\tisSearch = true;\n\t\t\t} else if (args[i].toLowerCase().equals(\"-usemr\")) {\n\t\t\t\tuseMR = true;\n\t\t\t} else if (args[i].toLowerCase().equals(\"-filemap\")) {\n\t\t\t\tfilemap = new Path(args[++i]);\n\t\t\t\tuseFilemap = true;\n\t\t\t} else if (args[i].toLowerCase().equals(\"-indexonly\")) {\n\t\t\t\tindexonly = true;\n\t\t\t} else if (args[i].contains(\"-\")) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tother_args.add(args[i]);\n\t\t}\n\n\t\tinpath = new Path(other_args.get(0));\n\t\toutpath = new Path(other_args.get(1));\n\t\tif (!useFilemap)\n\t\t\tfilemap = new Path(outpath.getParent().toString() + \"/filemap.txt\");\n\n\t\tif (!isSearch) {\n\t\t\tJobConf conf = new JobConf(getConf(), InvertedIndex.class);\n\t\t\tif (args.length == 3) {\n\t\t\t\tPath stop_word_path = new Path(other_args.get(2));\n\t\t\t\tif (FileSystem.get(conf).isFile(stop_word_path)) {\n\t\t\t\t\tDistributedCache.addCacheFile(stop_word_path.toUri(), conf);\n\t\t\t\t} else {\n\t\t\t\t\tFileStatus[] filestatus = FileSystem.get(conf).globStatus(\n\t\t\t\t\t\t\tnew Path(other_args.get(2) + \"/p*\"));\n\t\t\t\t\tfor (FileStatus fs : filestatus) {\n\t\t\t\t\t\tDistributedCache.addCacheFile(fs.getPath().toUri(),\n\t\t\t\t\t\t\t\tconf);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tconf.setBoolean(\"invertedindex.use.stopword\", true);\n\t\t\t}\n\t\t\tconf.setJobName(\"inverted index\");\n\t\t\tconf.setMapperClass(Map.class);\n\t\t\tconf.setCombinerClass(Combine.class);\n\t\t\tconf.setReducerClass(Reduce.class);\n\t\t\tconf.setOutputKeyClass(Text.class);\n\t\t\tconf.setOutputValueClass(Text.class);\n\t\t\tconf.setInputFormat(MyInputFormat.class);\n\n\t\t\tMyInputFormat.setInputPaths(conf, inpath);\n\t\t\tFileOutputFormat.setOutputPath(conf, outpath);\n\n\t\t\tFileSystem fs = FileSystem.get(conf);\n\t\t\tFSDataOutputStream os = fs.create(filemap);\n\n\t\t\tFileStatus[] inputnames = fs.globStatus(new Path(other_args.get(0)\n\t\t\t\t\t+ \"/*\"));\n\t\t\tBufferedWriter br = new BufferedWriter(new OutputStreamWriter(os));\n\t\t\tfor (int i = 0; i < inputnames.length; i++) {\n\t\t\t\tbr.append(i + \":\" + inputnames[i].getPath().getName());\n\t\t\t\tbr.newLine();\n\t\t\t}\n\t\t\tbr.close();\n\t\t\tconf.set(\"invertedindex.filename.map\", filemap.toString());\n\t\t\tJobClient.runJob(conf);\n\t\t}\n\n\t\tif (indexonly)\n\t\t\treturn 0;\n\n\t\tString word;\n\t\tBufferedReader ibr = new BufferedReader(\n\t\t\t\tnew InputStreamReader(System.in));\n\t\tif (useMR) {\n\t\t\tSystem.out.print(\"input some words(or 'q' to exit): \");\n\t\t\tPath searchOutput = new Path(outpath.getParent().toString()\n\t\t\t\t\t+ \"/search\");\n\t\t\twhile (!(word = ibr.readLine()).equals(\"q\")) {\n\t\t\t\tJobConf searchJob = new JobConf(getConf(), InvertedIndex.class);\n\t\t\t\tDistributedCache.addCacheFile(filemap.toUri(), searchJob);\n\t\t\t\tsearchJob.setJobName(\"Search\");\n\t\t\t\tsearchJob.set(\"search.word\", word.toLowerCase());\n\t\t\t\tsearchJob.setMapperClass(SearchMap.class);\n\t\t\t\tsearchJob.setReducerClass(SearchReduce.class);\n\t\t\t\tsearchJob.setInputFormat(KeyValueTextInputFormat.class);\n\t\t\t\tsearchJob.setOutputKeyClass(Text.class);\n\t\t\t\tsearchJob.setOutputValueClass(Text.class);\n\t\t\t\tKeyValueTextInputFormat.setInputPaths(searchJob, outpath);\n\t\t\t\tFileOutputFormat.setOutputPath(searchJob, searchOutput);\n\t\t\t\tJobClient.runJob(searchJob);\n\t\t\t\tFileSystem sfs = FileSystem.get(searchJob);\n\t\t\t\tFileStatus[] sout = sfs.globStatus(new Path(searchOutput\n\t\t\t\t\t\t.toString() + \"/p*\"));\n\t\t\t\tfor (FileStatus sfile : sout) {\n\t\t\t\t\tFSDataInputStream sin = FileSystem.get(searchJob).open(\n\t\t\t\t\t\t\tsfile.getPath());\n\t\t\t\t\tBufferedReader sbr = new BufferedReader(\n\t\t\t\t\t\t\tnew InputStreamReader(sin));\n\t\t\t\t\tString pr;\n\t\t\t\t\twhile ((pr = sbr.readLine()) != null)\n\t\t\t\t\t\tSystem.out.println(pr);\n\t\t\t\t\tsbr.close();\n\t\t\t\t}\n\t\t\t\tsfs.delete(searchOutput, true);\n\t\t\t\tSystem.out.print(\"input some words(or 'q' to exit): \");\n\t\t\t}\n\t\t} else {\n\t\t\tFileSystem fs = FileSystem.get(new Configuration());\n\t\t\tHashMap<String, String> fidpair = new HashMap<String, String>();\n\t\t\tHashMap<String, String> invertedindex = new HashMap<String, String>();\n\t\t\tFSDataInputStream is = fs.open(filemap);\n\t\t\tBufferedReader br = new BufferedReader(new InputStreamReader(is));\n\t\t\tparseFileMap(br, fidpair);\n\t\t\tbr.close();\n\t\t\tFileStatus[] iis = fs.globStatus(new Path(outpath.toString()\n\t\t\t\t\t+ \"/p*\"));\n\t\t\tfor (FileStatus ii : iis) {\n\t\t\t\tis = fs.open(ii.getPath());\n\t\t\t\tbr = new BufferedReader(new InputStreamReader(is));\n\t\t\t\tparseInvertedIndex(br, invertedindex);\n\t\t\t\tbr.close();\n\t\t\t}\n\n\t\t\tSystem.out.print(\"input a word(or 'q' to exit): \");\n\t\t\tString line;\n\t\t\twhile (!(line = ibr.readLine()).equals(\"q\")) {\n\t\t\t\tif (invertedindex.containsKey(line)) {\n\t\t\t\t\tString val = invertedindex.get(line);\n\t\t\t\t\tString outVal = parseOutValue(val, fidpair);\n\t\t\t\t\tSystem.out.println(outVal);\n\t\t\t\t}\n\t\t\t\tSystem.out.print(\"input a word(or 'q' to exit): \");\n\t\t\t}\n\t\t}\n\t\tibr.close();\n\t\treturn 0;\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tqueryIndexPattern();\n\t\t\n\t}",
"public String updateDSIndex(String dsID, String dschemaID, String attriName);",
"public JaccardSearcher(String docFilename) {\n super(docFilename);\n // TODO: YOUR CODE HERE\n\n // Instantiate the indexer\n // VSM MyCoolSearcher.Indexer is being used because we don't want to create static nested Builder class for the MyCoolSearcher.Indexer class\n indexer = new VectorSpaceModelIndexer.Builder(documents, stopWords).build();\n }",
"@RequestMapping(method=RequestMethod.GET, value =\"/file\")\n\t@ResponseStatus(HttpStatus.OK)\n\tpublic BatchStatus processFile() {\n\t\tSystem.out.println(\"Request received to process input transactions file\");\n\t\treturn FileProcessorService.processInputTransactionsFile();\n\t}",
"public static void main(String[] args) throws Exception {\n\t\tString aServerUrl = \"http://localhost:5820\";\n\n\t\t// first create a temporary database to use\n\t\tAdminConnection dbms = AdminConnectionConfiguration.toServer(aServerUrl).credentials(\"admin\", \"admin\").connect();\n\n\t\t// check whether there is no such database already, and if there is, drop it\t\t\n\t\tif (dbms.list().contains(\"waldoTest\")) {\n\t\t\tdbms.drop(\"waldoTest\");\n\t\t}\n\n\t\tdbms.memory(\"waldoTest\")\n\t\t .searchable(true)\n\t\t .create();\n\n\t\tdbms.close();\n\n\t\t// obtain a connection to the database\n\t\tConnection aConn = ConnectionConfiguration\n\t\t\t .to(\"waldoTest\")\t\t // the name of the db to connect to\n\t\t\t .server(aServerUrl)\n\t\t\t .credentials(\"admin\", \"admin\") // credentials to use while connecting\n\t\t\t .connect();\t\t\t\t // now open the connection\n\n\t\t// first things first, lets add some data into the index so that it can be queried and searched\n\n\t\taConn.begin();\n\t\taConn\n\t\t\t.add().io()\n\t\t\t.format(RDFFormat.RDFXML)\n\t\t\t.file(new File(\"data/catalog.rdf\"));\n\n\t\taConn.commit();\n\n\t\t// Lets try an example with the basic Waldo API\n\n\t\t// to start, we want to view this connection as a searchable connection, so we request a view of the connection\n\t\t// as a searchable connection\n\t\tSearchConnection aSearchConn = aConn.as(SearchConnection.class);\n\n\t\t// then we'll construct a searcher\n\t\tSearcher aSearch = aSearchConn.search()\n\t\t\t .limit(50) \t\t\t// as before we only want the top fifty results\n\t\t\t .query(\"mac\")\t\t// our search term\n\t\t\t .threshold(0.5);\t\t// Since Waldo is implemented over lucene, we can also specify a min threshold for our results\n\n\t\tSearchResults aSearchResults = aSearch.search();\n\n\t\t// and now we can just iterate over the search results\n\n\t\tIteration<SearchResult, QueryEvaluationException> resultIt = aSearchResults.iteration();\n\n\t\tSystem.out.println(\"\\nAPI results: \");\n\t\twhile (resultIt.hasNext()) {\n\t\t\tSearchResult aHit = resultIt.next();\n\n\t\t\tSystem.out.println(aHit.getHit() + \" with a score of: \" + aHit.getScore());\n\t\t}\n\n\t\t// don't forget to close your iteration!\n\t\tresultIt.close();\n\n\t\t// we can also re-use the searcher if we want to find the next set of results...\n\n\t\taSearch.offset(50); // we already found the first fifty, so lets grab the next set\n\n\t\taSearchResults = aSearch.search();\n\n\t\t// we can now check the next page of search results!\n\n\t\t// SPARQL syntax based on the LARQ syntax in Jena for doing the exact same thing directly in a query.\n\n\t\tString aQuery = \"SELECT DISTINCT ?s ?score WHERE {\\n\" +\n\t\t \"\\t?s ?p ?l.\\n\" +\n\t\t \"\\t( ?l ?score ) <\" + SearchConnection.MATCH_PREDICATE + \"> ( 'mac' 0.5 50 ).\\n\" +\n\t\t \"}\";\n\n\t\tSelectQuery query = aConn.select(aQuery);\n\n\t\tTupleQueryResult aResult = query.execute();\n\n\t\tSystem.out.println(\"Query results: \");\n\t\twhile (aResult.hasNext()) {\n\t\t\tBindingSet result = aResult.next();\n\n\t\t\tSystem.out.println(result.getValue(\"s\") + \" with a score of: \" + ((Literal) result.getValue(\"score\")).doubleValue());\n\t\t}\n\n\t\t// always close your connections when you're done\n\t\taConn.close();\n\t}",
"@Test\n public void bulkUploadTest() throws IOException {\n\n JsonArray result = searchService.matchAllQuery(getIndexes(), 10);\n assertEquals(6, result.size());\n }",
"public boolean setIndex(String name){\n\n //array to hold all database names from file\n ArrayList<String> dbNames = new ArrayList<String>();\n\n //create index if it doesn't exist\n File file = new File(\"databases/index.txt\");\n Scanner sc;\n FileWriter fw; \n\n try {\n sc = new Scanner(file); \n //read current database names to array\n String currName; \n if (sc.hasNextLine()){\n while(sc.hasNextLine()){\n currName = sc.nextLine();\n dbNames.add(currName);\n } \n }\n sc.close();\n\n //if database name already in index, exit\n if ( dbNames.contains(name) ){return true;}\n\n } catch(FileNotFoundException ex){}\n \n //add new database name to list of dbs\n dbNames.add(name);\n\n //create / overwrite index file\n try {\n fw = new FileWriter(\"databases/index.txt\");\n } catch (IOException ex2){\n System.out.println(\"ERROR: index not found and could not be created\");\n return false;\n }\n\n //write array of database names to file\n for (String dbName : dbNames){\n try {\n fw.write(dbName);\n fw.write(\"\\n\");\n } catch (IOException ex3) {\n System.out.println(\"ERROR: could not write to index\");\n }\n }\n\n try {\n fw.close();\n } catch (IOException ex4){\n System.out.println(\"ERROR: filewriter could not be closed\");\n return false;\n }\n\n return true;\n }",
"public ColumnarIndexScan() {\n\n\tString queryInput = null;\n\tBufferedReader in;\n\tString[] input = null;\n\tString DBName =\"\";\n\tString filename =\"\";\n\tString valueconstraint= \"\";\n\tString accesstype=\"\";\n\t\n\tList<List<String>> resultTuples = new ArrayList<>();\n\t//1.Tuples has to be inserted already and read in a columnarfile cf\n\t//2. retrieve tuples - COLUMNARFILENAME [(VALUECONSTRAINT)] ACCESSTYPE\n\tin = new BufferedReader(new InputStreamReader(System.in));\n\ttry {\n\t\tqueryInput = in.readLine();\n\t} catch (IOException e) {\n\t\te.printStackTrace();\n\t}\n\tinput = queryInput.split(\"\\\\s+\");\n\t\n\t//DBName = input[1];\n\tfilename = input[1];\n\tvalueconstraint = input[2];\n\taccesstype = input[3];\n\tSystem.out.println(filename);\n\tColumnarFile cf = insertRecords(filename+\".txt\"); \n\tSystem.out.println(\"working\");\n\tresultTuples = getFinalTuples(cf,valueconstraint,accesstype);\n\tSystem.out.println(resultTuples.toString());\n\t\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tIndexServer is = new IndexServer(3002,\"/src/P2Pfile/Peer2/filefolder\" );\n\t\t\tSystem.out.println(\"Peer2Server Start\");\n\t\t\tis.ConnectionAccept();\n\t\t\t\n\t\t\n\t\t\t\n\t\t}",
"public Index[] readIndexes(File file){\t\t\n\t\ttry{\n\t\t\tFileReader reader = new FileReader(file);\n\t\t\tBufferedReader buff = new BufferedReader(reader);\n\n\t\t\tboolean eof = false;\t\t//stores if the end of the file (eof) has been reached\n\t\t\tint numberOfRecords = 0;\n\n\t\t\t/**\n\t\t\t * @mastery achieves SL mastery factor 6 with the while loop\n\t\t\t */\n\t\t\twhile(!eof){\n\t\t\t\tString line = buff.readLine();\n\n\t\t\t\t/**\n\t\t\t\t * @mastery achieves SL mastery factor 4 with the if/else selection block\n\t\t\t\t */\n\t\t\t\tif(line == null){\n\t\t\t\t\teof = true;\t\t//the end of the file has been reached\n\t\t\t\t} else {\n\t\t\t\t\tnumberOfRecords++;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tbuff.close();\n\n\t\t\tIndex[] indexes = new Index[numberOfRecords];\n\n\t\t\tFileReader reader2 = new FileReader(file);\n\t\t\tBufferedReader buff2 = new BufferedReader(reader2);\n\n\t\t\tfor(int i=0;i<numberOfRecords;i++){\n\t\t\t\tString line = buff2.readLine();\n\t\t\t\tindexes[i] = new Index(line);\n\t\t\t}\n\n\t\t\tArrays.sort(indexes);\n\t\t\tbuff.close();\n\t\t\treader.close();\n\t\t\tbuff2.close();\n\t\t\treader2.close();\n\t\t\t\n\t\t\treturn indexes;\n\n\t\t} catch (Exception e){\n\t\t\treturn null;\n\t\t}\n\t}",
"public void printIndexMetrics(Directory index, boolean printMetricsToScreen, boolean printMetricsToFile){\n\t\t \n\t\ttry{\n\t\t\t //Creating our index\n\t\t\t IndexReader reader = DirectoryReader.open(index);\n\t\t\t \n\t\t\t //Need this map for metrics\n\t\t\t HashMap<String, HashSet<String>> hmap = convertIndexToMap(reader);\n\t\t\t \n\t\t\t HashMap<String, String> metrics = calculateMetrics(hmap, reader); \n\n\t\t\t //add the bad file metric... should probably just make this map global\n\t\t\t metrics.put(INDEX_METRIC_UNPARSABLE_CT, String.valueOf(numberOfUnparsableFiles));\n\t\t\t printMetrics(metrics, printMetricsToScreen, printMetricsToFile);\n\t\n\t\t\t reader.close(); \n\t\t}\n\t\tcatch(Exception e){\n\t\t\tSystem.out.println(\"There was some exception thrown during printing: \" + e.getStackTrace());\n\t\t}\n\t}",
"@Restrict(@Group(AuthApplication.DATA_OWNER_ROLE))\n public static Result postIndex(String das_uri) {\n \treturn index(das_uri);\n\t\t \n }",
"private void getIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // OPTIONAL (if not specified, then a specific index id should be provided)\n // The name of the collection for which to retrieve all indexes\n String collection = helper.getOptionalString(msg.body(), MSG_PROPERTY_COLLECTION);\n\n // OPTIONAL (if not specified, then a collection should be provided)\n // The id of the index that should be retrieved\n String id = helper.getOptionalString(msg.body(), MSG_PROPERTY_ID);\n\n // Either collection or id should be specified\n if (!ensureParameter(Arrays.asList(id, collection), Arrays.asList(MSG_PROPERTY_ID, MSG_PROPERTY_COLLECTION), msg)) return;\n \n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName); \n apiPath.append(API_PATH);\n if (id != null) {\n // retrieve specified index\n apiPath.append(\"/\").append(id);\n }\n else {\n // retrieve all indexes for specified collection\n apiPath.append(\"/?\").append(MSG_PROPERTY_COLLECTION).append(\"=\").append(collection);\n }\n \n httpGet(persistor, apiPath.toString(), headers, timeout, msg); \n }",
"public List<FileUpload> getFileUploads(int numberOfFileUploads, Long startIndex) throws AppException;",
"private void updateIndexMap(String file) {\n\t\ttry (Scanner s = new Scanner(new File(file))) {\n\t\t\twhile (s.hasNext()) {\n\t\t\t\tString word = TextParserUtil.cleanWord(s.next());\n\t\t\t\tString partition = word.substring(0, 1);\n\t\t\t\tif (indexedDir.get(partition) == null) {\n\t\t\t\t\tinsertPartitionEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) == null) {\n\t\t\t\t\tinsertWordEntry(file, word, partition);\n\t\t\t\t} else if (indexedDir.get(partition).get(word) != null) {\n\t\t\t\t\tupdateFileList(file, word, partition);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t} \n\t}",
"void initiateIndexing(HarvestResultDTO harvestResult) throws DigitalAssetStoreException;",
"public void run() {\n System.out.println(\"Running Indexing\");\n Indexer.index();\n }",
"public void testIndexCosts() {\n this.classHandler.applyIndexes();\n }",
"public static void main(String argv[]) throws IOException {\n if (argv.length < 2) {\n System.err.println(\"Usage: IndexServer <portnum> <inverted-index-filename>\");\n return;\n }\n\n // Parse args\n int i = 0;\n int portnum = -1;\n try {\n portnum = Integer.parseInt(argv[i++]);\n } catch (NumberFormatException nfe) {\n System.err.println(\"Cannot parse port number: \" + argv[i-1]);\n return;\n }\n File fname = new File(argv[i++]).getCanonicalFile();\n\n // Run server. Note that because server.serve() creates a new\n // thread, the process will not terminate even though serve() returns.\n IndexServer server = new IndexServer(portnum, fname);\n server.serve();\n }",
"public String createDSIndex(String dsID, String dschemaID, String attriName);",
"public static void main(String[] args) throws Exception {\n\t\tString index = args[0];\n\t\tString field = \"contents\";\n\t\tString queries = \"resources/query.txt\";\n\t\tString queryString = null;\n\t\tint hitsPerPage = 10;\n\n\t\tIndexReader reader = DirectoryReader.open(FSDirectory.open(new File(\n\t\t\t\tindex)));\n\t\tIndexSearcher searcher = new IndexSearcher(reader);\n\t\tFile stopWordsFile = new File(\"resources/stop.txt\");\n\t\tCharArraySet stopWordsCharArraySet = WordlistLoader.getWordSet(\n\t\t\t\tnew FileReader(stopWordsFile), Version.LUCENE_47);\n\t\tAnalyzer analyzer = new RomanianAnalyzerUsingAnotherConstructorForStopwordAnalyzer(\n\t\t\t\tVersion.LUCENE_47, stopWordsCharArraySet);\n\n\t\tBufferedReader in = null;\n\t\tin = new BufferedReader(new InputStreamReader(new FileInputStream(\n\t\t\t\tqueries), codification));\n\t\tQueryParser parser = new QueryParser(Version.LUCENE_47, field, analyzer);\n\t\twhile (true) {\n\t\t\tString line = in.readLine();\n\t\t\tif (line == null || line.length() == -1) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tline = line.trim();\n\t\t\tif (line.length() == 0) {\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\tQuery query = parser.parse(line);\n\t\t\tSystem.out.println(\"Looking for: \" + query.toString(field));\n\t\t\tdoPagingSearch(in, searcher, query);\n\n\t\t\tif (queryString != null) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treader.close();\n\t}",
"@Test\n public void testIndexMaintenanceWithIndexOnMethodGetEntries() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.getEntries() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }",
"public List<LsFileEntry> lsFiles() \n \tthrows CorruptObjectException, IOException {\n \t\tMap<String, LsFileEntry> cachedEntries = new TreeMap<String, LsFileEntry>(); \n \t\t\n \t\t//first read all the files which are the Index\n \t\tfinal DirCache cache = DirCache.read(db);\n \t\tfor (int i = 0; i < cache.getEntryCount(); i++) {\n \t\t\tfinal DirCacheEntry ent = cache.getEntry(i);\n \t\t\t\n \t\t\t//X TODO this is surely not enough ;)\n \t\t\tLsFileStatus fs = LsFileStatus.CACHED;\n \t\t\tLsFileEntry fileEntry = new LsFileEntry(ent.getPathString(), fs, ent.getObjectId());\n \t\t\tcachedEntries.put(ent.getPathString(), fileEntry);\n \t\t}\n \n \t\t// now read all the files on the disk\n \t\tSet<String> filesOnDisk = new TreeSet<String>(); \n \t\tFile workDir = db.getWorkDir();\n \t\taddFiles(filesOnDisk, \"\", workDir);\n \t\t\n \t\t// and now compare them. since both are already sorted because we used TreeMap and TreeSort\n \t\t// we can simply crawl over them end compare them. kind of a merge sort though...\n \t\tArrayList<LsFileEntry> fileEntries = new ArrayList<LsFileEntry>();\n \n \t\tIterator<String> cacheIt = cachedEntries.keySet().iterator();\n \t\tIterator<String> fileIt = filesOnDisk.iterator();\n \t\t\n \t\tString cachedPath = null;\n \t\tString fsPath = null;\n \t\twhile (cacheIt.hasNext() || fileIt.hasNext()) {\n \t\t\t\n \t\t\tif (cachedPath == null && cacheIt.hasNext()) {\n \t\t\t\tcachedPath = cacheIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath == null && fileIt.hasNext()) {\n \t\t\t\tfsPath = fileIt.next();\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && cachedPath.equals(fsPath)) {\n \t\t\t\t// oh found in both systems\n \t\t\t\tfileEntries.add(cachedEntries.get(cachedPath));\n \t\t\t\tcachedPath = null;\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (cachedPath != null && !fileEntries.contains(cachedPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(cachedPath, LsFileStatus.REMOVED, null));\n \t\t\t\tcachedPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tif (fsPath != null && !cachedEntries.keySet().contains(fsPath)) {\n \t\t\t\tfileEntries.add(new LsFileEntry(fsPath, LsFileStatus.OTHER, null));\n \t\t\t\tfsPath = null;\n \t\t\t\tcontinue;\n \t\t\t}\n \t\t\t\n \t\t\tcachedPath = null;\n \t\t\tfsPath = null;\n \t\t\t\n \t\t}\n \t\t\n \t\treturn fileEntries;\n \t}",
"@Test\n public void testProcessAll() throws TikaException, SAXException, IOException, Exception {\n PaperIndexer indexer = new PaperIndexer(BaseDirInfo.getPath(\"test.properties\"));\n indexer.processAll();\n\n Properties prop = indexer.getProperties();\n String paraIndexPath = prop.getProperty(\"para.index\");\n prop.setProperty(\"para.index\", paraIndexPath + \"/1\");\n\n final String[] indexes = { \"index\", \"para.index\", \"para.index.all\" };\n\n // Test global index and para index\n for (String indexPath : indexes) {\n File indexDir = new File(BaseDirInfo.getPath(indexer.getProperties().getProperty(indexPath)));\n try (Directory dir = FSDirectory.open(indexDir.toPath());\n IndexReader reader = DirectoryReader.open(dir)) {\n assertNotNull(reader); // reader must not be null\n\n int nDocs = reader.numDocs();\n assertNotEquals(nDocs, 0); // Number of docs must not be zero\n }\n }\n\n // Since we put one document in the test folder, we should have one folder in the para index\n prop.setProperty(\"para.index\", paraIndexPath);\n File[] dirs = new File(prop.getProperty(\"para.index\")).listFiles();\n assertEquals(dirs.length, 1);\n\n // clean folders\n indexer.removeIndexDirs();\n }",
"public IndexDatabase(String index_path) {\n int k;\n long p;\n try {\n pre_file = new RandomAccessFile(index_path + \"/sorted.kmc_pre\", \"r\");\n pre_file.seek(pre_file.length() - 8);\n header_pos = read_int(pre_file);\n pre_file.seek(pre_file.length() - 8 - header_pos);\n // read the index properties \n K = read_int(pre_file);\n mode = read_int(pre_file);\n ctr_size = read_int(pre_file);\n pre_len = read_int(pre_file);\n min_count = read_int(pre_file);\n max_count = read_int(pre_file);\n kmers_num = read_long(pre_file);\n suf_len = K - pre_len;\n key = new kmer(K, pre_len, suf_len);\n System.out.println(\"Indexing \" + kmers_num + \" kmers... \");\n // load the prefix file into the memory \n pre_file.seek(4);\n int q, len = 1 << (2 * pre_len);\n prefix_ptr = new long[len];\n MappedByteBuffer pre_buff;\n for (q = 0, p = 0; p < 8; ++p) {\n pre_buff = pre_file.getChannel().map(FileChannel.MapMode.READ_ONLY, 4 + p * len, len);\n for (k = 0; k < len / 8; ++k, ++q) {\n prefix_ptr[q] = read_long(pre_buff);\n }\n pre_buff = null;\n }\n pre_file.close();\n // mapping suffix file into the memory\n suf_rec_size = ctr_size + suf_len / 4;\n MAX_BYTE_COUNT = MAX_BYTE_COUNT / suf_rec_size * suf_rec_size;\n suf_parts_num = (int) ((kmers_num * suf_rec_size) % MAX_BYTE_COUNT == 0 ? (kmers_num * suf_rec_size) / MAX_BYTE_COUNT : (kmers_num * suf_rec_size) / MAX_BYTE_COUNT + 1);\n suf_parts_size = new long[suf_parts_num];\n suf_file = new RandomAccessFile(index_path + \"/sorted.kmc_suf\", \"r\");\n suf_buff = new MappedByteBuffer[suf_parts_num];\n for (k = 0; k < suf_parts_num; ++k) {\n suf_parts_size[k] = (int) (k == suf_parts_num - 1 ? (kmers_num * suf_rec_size) % MAX_BYTE_COUNT : MAX_BYTE_COUNT);\n suf_buff[k] = suf_file.getChannel().map(FileChannel.MapMode.READ_ONLY, 4 + k * suf_parts_size[0], suf_parts_size[k]);\n }\n // mapping pointers file into the memory\n MAX_BYTE_COUNT = MAX_BYTE_COUNT / POINTER_LENGTH * POINTER_LENGTH;\n ptr_parts_num = (int) ((kmers_num * POINTER_LENGTH) % MAX_BYTE_COUNT == 0 ? (kmers_num * POINTER_LENGTH) / MAX_BYTE_COUNT : (kmers_num * POINTER_LENGTH) / MAX_BYTE_COUNT + 1);\n ptr_parts_size = new long[ptr_parts_num];\n ptr_file = new RandomAccessFile(index_path + \"/pointers.db\", \"rw\");\n ptr_buff = new MappedByteBuffer[ptr_parts_num];\n for (k = 0; k < ptr_parts_num; ++k) {\n ptr_parts_size[k] = (int) (k == ptr_parts_num - 1 ? (kmers_num * POINTER_LENGTH) % MAX_BYTE_COUNT : MAX_BYTE_COUNT);\n ptr_buff[k] = ptr_file.getChannel().map(FileChannel.MapMode.READ_WRITE, k * ptr_parts_size[0], ptr_parts_size[k]);\n }\n } catch (IOException e) {\n System.out.println(e.getMessage());\n System.exit(1);\n }\n }",
"public void IndexADocument(String docno, String content) throws IOException {\n\t\t\n\t\tdocIdx.append(docno + \"\\n\");\n\t\n\t\tString[] tokens = content.split(\" \");\n\t\t\n\t\tfor(String word: tokens) {\n\t\t\tif(token.containsKey(word)) {\t\t\n\t\t\t\tLinkedHashMap<Integer, Integer> cur = token.get(word);\n\t\t\t\tif(cur.containsKey(docid))\n\t\t\t\t\tcur.put(docid, cur.get(docid)+1);\n\t\t\t\telse \n\t\t\t\t\tcur.put(docid, 1);\n\t\t\t} else {\n\t\t\t\tLinkedHashMap<Integer, Integer> cur = new LinkedHashMap<>();\n\t\t\t\tcur.put(docid, 1);\n\t\t\t\ttoken.put(word, cur);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\t++docid;\n\t\t\n\t\tif(docid % BLOCK == 0) \n\t\t\tsaveBlock();\t\n\t}",
"public void addIndex(){\n\t\tdbCol=mdb.getCollection(\"genericCollection\");\n\t\tstart=Calendar.getInstance().getTimeInMillis();\n\t\tdbCol.ensureIndex(new BasicDBObject(\"RandomGeo\", \"2d\"));\n\t\tstop = Calendar.getInstance().getTimeInMillis() - start;\n\t\tSystem.out.println(\"Mongo Index Timer \"+Long.toString(stop));\n\t}",
"protected abstract int applyGetIndex(CControlManager mgr, CDasherNode node);",
"@Override\r\n\tpublic String index() {\n\t\treturn \"服务器维护中。。。。\";\r\n\t}",
"public List<FFileInputDO> findByCondition(FFileInputDO FFileInput, long limitStart, long pageSize) throws DataAccessException;",
"@Test\n public void retrievesIndexFromLog() throws Exception {\n final String name = \"talk\";\n final Talks talks = new Talks.InDir();\n talks.create(\"\", name);\n talks.get(name).modify(\n new Directives().xpath(\"/talk\")\n .push().xpath(\"wire\").remove().pop()\n .add(\"wire\").add(\"href\").set(\"#2\").up().up()\n .add(\"archive\")\n .add(\"log\").attr(\"id\", \"1\").attr(\"title\", \"title1\")\n .attr(\"index\", \"1\").up()\n .add(\"log\").attr(\"id\", \"2\").attr(\"title\", \"title2\")\n .attr(\"index\", \"2\").up().up()\n .add(\"request\").attr(\"id\", \"a12345\")\n .add(\"author\").set(\"yegor256\").up()\n .add(\"args\").up()\n .add(\"type\").set(\"deploy\").up()\n );\n new IndexesRequests().execute(talks);\n MatcherAssert.assertThat(\n talks.get(name).read(),\n XhtmlMatchers.hasXPaths(\"/talk/request[@index='3']\")\n );\n }",
"public void createIndex(String dirPath) throws IOException {\n\n\t\tFile[] files = new File(dirPath).listFiles();\n\n\t\tfor (File f : files) {\n\t\t\tindexDocument(f);\n\t\t}\n\n\t\tclose();\n\t\tprintStatistics();\n\t}",
"public void onIndexUpdate();",
"private FileIndex loadIndex(File indexFile) {\n FileIndex idx = null;\n RepositoryDataInputStream din = null;\n try {\n din = new RepositoryDataInputStream(RepositoryImplUtil.getBufferedDataInputStream(indexFile),\n LayerConvertersProvider.getInstance(layeringSupport, layerDescriptor));\n //new RepositoryDataInputImpl(RepositoryImplUtil.getBufferedDataInputStream(indexFile));\n idx = FileIndexFactory.getDefaultFactory().readIndex(din);\n } catch (IOException ex) {\n RepositoryExceptions.throwException(\"IndexedStorageFile for file \" + indexFile, ex);//NOI18N\n } finally {\n if (din != null) {\n try {\n din.close();\n } catch (IOException ex) {\n }\n }\n }\n return idx;\n }",
"Boolean checkIndexing(Long harvestResultOid) throws DigitalAssetStoreException;",
"public static void main(String[] args) throws Exception {\n\t\t\tString indexPath = \"F:/IRS/search/pr/sig_index_naive\";\n\t\t\tString docsPath = \"F:/IRS/search/vldb_icse_id.txt\";\n\t\t\tDirectory dir = FSDirectory.open(Paths.get(indexPath));\n\t\t\tAnalyzer analyzer = new StandardAnalyzer();\n\t\t\tIndexWriterConfig iwc = new IndexWriterConfig(analyzer);\n\t\t\tIndexWriter writer = new IndexWriter(dir, iwc);\n\t\t\t\n\t\t\tFileReader f1 = new FileReader(docsPath);\n\t\t\tBufferedReader br = new BufferedReader(f1);\n\t\t\t\n\t\t\tdouble d;\n\t\t\t//String d=null;\n\t\t\tString lineTxt = null;\n\t\t\t\n\t\t\twhile ((lineTxt = br.readLine()) != null)\n\t\t {\n\t\t\t\t\t String[] splits = lineTxt.split(\"\\t\");\n\t\t\tDocument doc = new Document();\n\n\t\t\tdoc.add(new StringField(\"docid\", splits[0] , Field.Store.YES));\n\n\t\t\tdoc.add(new TextField(\"title\", splits[1], Field.Store.YES));\n\t\t\tdoc.add(new StringField(\"title\", splits[1], Field.Store.YES));\t\n\t\t\tdoc.add(new SortedField);\n\n\t\t\tdoc.add(new TextField(\"titlexn\", splits[2], Field.Store.YES));\n\t\t\tdoc.add(new StringField(\"titlexn\", splits[2], Field.Store.YES));\n\t\t\tdoc.add(new StringField(\"year\", splits[3], Field.Store.YES));\n\t\t\tdoc.add(new StringField(\"date\", splits[4], Field.Store.YES));\n\t\t\tdoc.add(new TextField(\"conf\", splits[7], Field.Store.YES));\n\t\t\tdoc.add(new StringField(\"conf\", splits[7], Field.Store.YES));\n\t\t\t\n\t\t\twriter.addDocument(doc);\n\t\t\t\n\t\t}\n\n\t\t\twriter.close();\n\t\t}",
"protected void index()\r\n\t{\n\t}",
"private void reLoadIndexesFromFileToIndexMap(File file) throws IOException {\n BufferedReader reader = new BufferedReader(new FileReader(file));\n for (String line = reader.readLine(); line != null; line = reader\n .readLine()) {\n String[] termIndex = line.split(\" \");\n String key = termIndex[0];\n LinkedList<TermPositions> value = new LinkedList<>();\n String postingList = termIndex[1];\n // split the posting lists 1:1,2,4;2:4\n String[] subPostings = postingList.split(\";\");\n for (String posting : subPostings) {\n String[] docPosting = posting.split(\":\");\n int docId = Integer.parseInt(docPosting[0]);\n String[] positions = docPosting[1].split(\",\");\n LinkedList<Integer> positionsList = new LinkedList<>();\n for (String position : positions) {\n positionsList.add(Integer.parseInt(position));\n }\n TermPositions termPositions = new TermPositions(docId, positionsList);\n value.add(termPositions);\n }\n indexMap.put(key, value);\n\n }\n\n }",
"private static Positional_inverted_index posindexCorpus(DocumentCorpus corpus) throws ClassNotFoundException, InstantiationException, IllegalAccessException, FileNotFoundException, IOException {\n\n NewTokenProcessor processor = new NewTokenProcessor();\n Iterable<Document> docs = corpus.getDocuments(); //call registerFileDocumentFactory first?\n\n List<Double> Doc_length = new ArrayList<>();\n Positional_inverted_index index = new Positional_inverted_index();\n\n double token_count = 0;\n\n // Iterate through the documents, and:\n for (Document d : docs) {\n //File f = new File(path + \"\\\\\" + d.getTitle());\n File f = new File(path + \"\\\\\" + d.getFileName().toString());\n double Filesize = f.length();\n //edited by bhavya\n double doc_weight = 0; //first entry in docweights.bin\n double doc_tokens = 0;\n double doc_length = 0;\n HashMap<String, Integer> tftd = new HashMap<>();\n // Tokenize the document's content by constructing an EnglishTokenStream around the document's content.\n Reader reader = d.getContent();\n EnglishTokenStream stream = new EnglishTokenStream(reader); //can access tokens through this stream\n N++;\n // Iterate through the tokens in the document, processing them using a BasicTokenProcessor,\n //\t\tand adding them to the HashSet vocabulary.\n Iterable<String> tokens = stream.getTokens();\n int i = 0;\n\n for (String token : tokens) {\n\n //adding token in index\n List<String> word = new ArrayList<String>();\n word = processor.processToken(token);\n //System.out.println(word.get(0));\n if (word.get(0).matches(\"\")) {\n continue;\n } else {\n\n index.addTerm(word.get(0), i, d.getId());\n\n }\n i = i + 1;\n\n //we check if token already exists in hashmap or not. \n //if it exists, increase its freq by 1 else make a new entry.\n if (tftd.containsKey(word.get(0))) {\n doc_tokens++;\n int count = tftd.get(word.get(0));\n tftd.replace(word.get(0), count + 1);\n } else {\n doc_tokens++;\n// token_count++; //gives total number of tokens.\n tftd.put(word.get(0), 1);\n }\n\n }\n double length = 0;\n double wdt = 0;\n\n double total_tftd = 0;\n for (Map.Entry<String, Integer> entry : tftd.entrySet()) {\n\n wdt = 1 + log(entry.getValue());\n\n length = length + pow(wdt, 2);\n total_tftd = total_tftd + entry.getValue();\n }\n token_count = token_count + doc_tokens;\n doc_weight = pow(length, 0.5);\n double avg_tftd = total_tftd / (double) tftd.size();\n\n Doc_length.add(doc_weight);\n Doc_length.add(avg_tftd);\n Doc_length.add(doc_tokens);\n Doc_length.add(Filesize);\n }\n Doc_length.add(token_count / N);\n\n DiskIndexWriter d = new DiskIndexWriter();\n d.write_doc(path, Doc_length);\n\n return index;\n }",
"public static void main(String[] args) throws IOException{\n\t\tint termIndex = 1;\n\t\t\n\t\t// startOffset holds the start offset for each term in\n\t\t// the corpus.\n\t\tlong startOffset = 0;\n\t\t\t\n\t\t// unique_terms is true if there are atleast one more\n\t\t// unique term in corpus.\n\t\tboolean unique_terms = true;\n\t\t\n\t\t\n\t\t//load the stopwords from the HDD\n\t\tString stopwords = getStopWords();\n\t\t\n\t\t// allTokenHash contains all the terms and its termid\n\t\tHashMap<String, Integer> allTermHash = new HashMap<String, Integer>();\n\t\t\n\t\t// catalogHash contains the term and its position in\n\t\t// the inverted list present in the HDD.\n\t\tHashMap<Integer, Multimap> catalogHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// finalCatalogHash contains the catalogHash for the invertedIndexHash\n\t\t// present in the HDD.\n\t\tHashMap<Integer, String> finalCatalogHash = new HashMap<Integer, String>();\n\t\t\n\t\t// token1000Hash contains the term and Dblocks for the first 1000\n\t\tHashMap<Integer, Multimap> token1000DocHash = new HashMap<Integer, Multimap>();\n\t\t\n\t\t// documentHash contains the doclength of all the documents in the corpus\n\t\tHashMap<String, String> documentHash = new HashMap<String, String>();\t\n\t\t\n\t\t// id holds the document id corresponding to the docNumber.\n\t\tint id = 1;\n\t\t\n\t\t// until all unique terms are exhausted\n\t\t// pass through the documents and index the terms.\n\t\t//while(unique_terms){\n\t\t\t\n\t\t\tFile folder = new File(\"C:/Naveen/CCS/IR/AP89_DATA/AP_DATA/ap89_collection\");\n\t\t\t//File folder = new File(\"C:/Users/Naveen/Desktop/TestFolder\");\n\t\t\tFile[] listOfFiles = folder.listFiles();\n\t\t\t\n\t\t\t//for each file in the folder \n\t\t\tfor (File file : listOfFiles) {\n\t\t\t if (file.isFile()) {\n\t\t\t \t\n\t\t\t \tString str = file.getPath().replace(\"\\\\\",\"//\");\n\t\t\t \t\n\t\t\t \t\n\t\t\t\t\t//Document doc = new Document();\n\t\t\t //System.out.println(\"\"+str);\n\t\t\t\t\t//variables to keep parse document.\n\t\t\t\t\tint docCount = 0;\n\t\t\t\t\tint docNumber = 0;\n\t\t\t\t\tint endDoc = 0;\n\t\t\t\t\tint textCount = 0;\n\t\t\t\t\tint noText = 0;\n\t\t\t\t\tPath path = Paths.get(str);\n\t\t\t\t\t\n\t\t\t\t\t//Document id and text\n\t\t\t\t\tString docID = null;\n\t\t\t\t\tString docTEXT = null;\n\t\t\t\t\t\n\t\t\t\t\t//Stringbuffer to hold the text of each document\n\t\t\t\t\tStringBuffer text = new StringBuffer();\n\t\t\t\t\t\n\t\t\t\t\tScanner scanner = new Scanner(path);\n\t\t\t\t\twhile(scanner.hasNext()){\n\t\t\t\t\t\tString line = scanner.nextLine();\n\t\t\t\t\t\tif(line.contains(\"<DOC>\")){\n\t\t\t\t\t\t\t++docCount;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"</DOC>\")){\n\t\t\t\t\t\t\t++endDoc;\n\t\t\t\t\t\t\tdocTEXT = text.toString();\n\t\t\t\t\t\t\t//docTEXT = docTEXT.replaceAll(\"[\\\\n]\",\" \");\n\t\t\t\t\t\t\tSystem.out.println(\"ID: \"+id);\n\t\t\t\t\t\t\t//System.out.println(\"TEXT: \"+docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stop words removed\n\t\t\t\t\t\t\tPattern pattern1 = Pattern.compile(\"\\\\b(?:\"+stopwords+\")\\\\b\\\\s*\", Pattern.CASE_INSENSITIVE);\n\t\t\t\t\t\t\tMatcher matcher1 = pattern1.matcher(docTEXT);\n\t\t\t\t\t\t\tdocTEXT = matcher1.replaceAll(\"\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// text with stemming\n\t\t\t\t\t\t\t//docTEXT = stemmer(docTEXT);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint docLength = 1;\n\t\t\t\t\t\t\t// regex to build the tokens from the document text\n\t\t\t\t\t\t\tPattern pattern = Pattern.compile(\"\\\\w+(\\\\.?\\\\w+)*\");\n\t\t\t\t\t\t\tMatcher matcher = pattern.matcher(docTEXT.toLowerCase());\n\t\t\t\t\t\t\twhile (matcher.find()) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor (int i = 0; i < matcher.groupCount(); i++) {\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// alltermHash contains term and term id\n\t\t\t\t\t\t\t\t\t// if term is present in the alltermHash\n\t\t\t\t\t\t\t\t\tif(allTermHash.containsKey(matcher.group(i))){\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tint termId = allTermHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t//if term is present in the token1000Hash\n\t\t\t\t\t\t\t\t\t\t//then update the dblock of the term.\n\t\t\t\t\t\t\t\t\t\tif(token1000DocHash.containsKey(termId)){\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockUpdate = token1000DocHash.get(termId);\n\t\t\t\t\t\t\t\t\t\t\t//Multimap<Integer, Integer> dBlockUpdate = token1000DocHash.get(matcher.group(i));\n\t\t\t\t\t\t\t\t\t\t\tif(dBlockUpdate.containsKey(id)){\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\t\tdBlockUpdate.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t//if term is not present in the token1000hash\n\t\t\t\t\t\t\t\t\t\t//then add the token with its dBlock\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termId, dBlockInsert);\t\n\t\t\t\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t// if the term is not present I will put the term into allTermHash\n\t\t\t\t\t\t\t\t\t// put corresponding value into the token1000DocHash and increment\n\t\t\t\t\t\t\t\t\t// termIndex\n\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\tallTermHash.put(matcher.group(i),termIndex);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\tMultimap<String, String> dBlockInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\tdBlockInsert.put(String.valueOf(id), String.valueOf(matcher.start()));\n\t\t\t\t\t\t\t\t\t\ttoken1000DocHash.put(termIndex, dBlockInsert);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\ttermIndex++;\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tdocLength++;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(id%1000 == 0){\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// then dump index file to HDD\n\t\t\t\t\t\t\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t// update catalog file\n\t\t\t\t\t\t\t\t\t// to populate catalogHash with the offset\n\t\t\t\t\t\t\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\t\t\t\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\t\t\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t\t\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\t\t\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\t\t\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\t\t\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\t\t\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//clear the token1000DocHash\n\t\t\t\t\t\t\t\t\ttoken1000DocHash.clear();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tdocumentHash.put(docID, \"\"+id+\":\"+docLength);\n\t\t\t\t\t\t\tid++;\n\t\t\t\t\t\t\ttext = new StringBuffer();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<DOCNO>\")){\n\t\t\t\t\t\t\t++docNumber;\n\t\t\t\t\t\t\tdocID = line.substring(8, 21);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(line.contains(\"<TEXT>\")){\n\t\t\t\t\t\t\t++textCount;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if((line.contains(\"<DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</DOC>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DOCNO>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FILEID>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<FIRST>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<SECOND>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</HEAD>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</BYLINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</UNK>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<DATELINE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</NOTE>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"</TEXT>\"))||\n\t\t\t\t\t\t\t\t(line.contains(\"<TEXT>\"))){\n\t\t\t\t\t\t\t ++noText;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(endDoc == docCount - 1){\n\t\t\t\t\t\t\ttext.append(line);\n\t\t\t\t\t\t\ttext.append(\" \");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t \t\n\t\t\t }//end of if - to check if this is a file and parse.\n\t\t\t \n\t\t\t}//end of for loop to load each file\n\t\t\t\n\t\t//}//end of while loop \n\t\t\n\t// write catalogfile to the hdd to check.\n\t\t\t\n\t\t\t// then dump index file to HDD\n\t\t\twriteInvertedIndex(token1000DocHash,\"token1000DocHash\");\n\t\t\t\n\t\t\t// update catalog file\n\t\t\t// to populate catalogHash with the offset\n\t\t\tfor(Entry<Integer, Multimap> entry : token1000DocHash.entrySet()){\n\t\t\t\tif(catalogHash.containsKey(entry.getKey())){\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catUpdate = catalogHash.get(entry.getKey());\n\t\t\t\t\tcatUpdate.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catUpdate);\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tint len = (entry.getKey()+\":\"+entry.getValue()).length();\n\t\t\t\t\t//String offset = String.valueOf(startOffset)+\":\"+String.valueOf(len);\n\t\t\t\t\tMultimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t\tcatInsert.put(String.valueOf(startOffset), String.valueOf(len));\n\t\t\t\t\tcatalogHash.put(entry.getKey(), catInsert);//entry.getValue());\n\t\t\t\t\tstartOffset += len+2;\n\t\t\t\t\t\n\t\t\t\t}\t\t\t\t\t\t\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\twriteInvertedIndex(catalogHash,\"catalogHash\");\n\t\t\tprintHashMapSI(allTermHash);\n\t\t\tprintHashMapSS(documentHash);\n\t\t\t\n\t\t\tlong InvIndstartOffset = 0;\n\t\t\t\n\t\t\t//write it to file\n \n\t\t\t//change the finalcatalogHash to the form termid:startoffset:length\n\t\t\tfor (Integer name: catalogHash.keySet()){\n\t String key = name.toString();\n\t String value = catalogHash.get(name).toString(); \n\t //System.out.println(key + \" \" + value); \n\t String finalTermIndex = genInvertedIndex(key, value);\n\t finalTermIndex = key+\":\"+finalTermIndex;\n\t int indexLength = finalTermIndex.length();\n\t \n\t \n\t PrintWriter writer = new PrintWriter(new BufferedWriter\n\t \t\t(new FileWriter(\"C:/Users/Naveen/Desktop/TestRuns/LastRun/InvertedIndex\", true)));\n\t writer.println(finalTermIndex);\n\t writer.close();\n\t \n\t //update the finalcatalogHash\n\t //Multimap<String, String> catInsert = ArrayListMultimap.create();\n\t\t\t\t//catInsert.put(String.valueOf(InvIndstartOffset), String.valueOf(indexLength));\n\t\t\t\tfinalCatalogHash.put(name, String.valueOf(InvIndstartOffset)+\":\"+String.valueOf(indexLength));//entry.getValue());\n\t\t\t\tInvIndstartOffset += indexLength+2;\n\t \n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\tprintHashMapIS(finalCatalogHash);\n\t\t\t\n\t}",
"public void start()\n {\n FileVector = FileHandler.getFileList( harvesterDirName , filterArray, false );\n iter = FileVector.iterator();\n }",
"double getFile(int index);",
"public abstract void updateIndex();",
"public void execute_downloadSelectNotesCommand_veryInvalidFileIndex() {\n DownloadSelectNotesCommand command = new DownloadSelectNotesCommand(INCORRECT_USERNAME,\n INCORRECT_PASSWORD, CORRECT_MODULE_CODE, VERY_INCORRECT_FILE_INDEX);\n assertCommandFailure(command, model, commandHistory, Messages.MESSAGE_FILE_INDEX_ERROR\n + DownloadSelectNotesCommand.NEWLINE_SEPARATOR + DownloadSelectNotesCommand.MESSAGE_USAGE);\n }",
"private void indexUpdates(UpdateQueryResult updates) {\r\n Iterator<HashMap<String, String>> i = updates.getIterator();\r\n while (i.hasNext()) {\r\n HashMap<String, String> values = i.next();\r\n \r\n \t// during index default solr fields are indexed separately\r\n \tString articleId = values.get(\"KnowledgeArticleId\");\r\n \tString title = values.get(\"Title\");\r\n \tvalues.remove(\"Title\");\r\n \tString summary = values.get(\"Summary\");\r\n \tvalues.remove(\"Summary\");\r\n \t\r\n \ttry {\r\n \t\tif (UtilityLib.notEmpty(articleId) && UtilityLib.notEmpty(title)) {\r\n \t\t\t// index sObject\r\n \t\t\t// default fields every index must have\r\n \t\t\tStringBuilder sb = new StringBuilder();\r\n \t\t\tContent c = new Content();\r\n \t\t\tc.setKey(articleId);\r\n \t\t\tsb.setLength(0);\r\n \t\t\tsb.append(summary);\r\n \t\t\tc.setData(sb.toString().getBytes());\r\n \t\t\tc.addMetadata(\"Content-Type\", \"text/html\");\r\n \t\t\tc.addMetadata(\"title\", title);\r\n \t\t\t\r\n \t\t\tLOG.debug(\"Salesforce Crawler: Indexing articleId=\"+articleId+\" title=\"+title+\" summary=\"+summary);\r\n \t\t\t\r\n \t\t\t// index articleType specific fields\r\n \t\t\tfor (Entry<String, String> entry : values.entrySet()) {\r\n \t\t\t\tc.addMetadata(entry.getKey(), entry.getValue().toString());\r\n \t\t\t\tif (!entry.getKey().equals(\"Attachment__Body__s\")) {\r\n \t\t\t\t\tLOG.debug(\"Salesforce Crawler: Indexing field key=\"+entry.getKey()+\" value=\"+entry.getValue().toString());\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tstate.getProcessor().process(c);\r\n \t\t}\r\n } catch (Exception e) {\r\n \tUtilityLib.errorException(LOG, e);\r\n \tstate.getStatus().incrementCounter(Counter.Failed);\r\n }\r\n }\r\n }",
"public void update_local_index(String record_size_file, String record_file,\n\t\t\tString record_line) {\n \tint record_size = 0;\n\t\tif (file_helper.fileIsExists(record_size_file)) {\n\t\t\tString record_size_line = file_helper.read(record_size_file);\n\t\t\tif (record_size_line != null) {\n\t\t\t\trecord_size = Integer.parseInt(record_size_line);\n\t\t\t}\n\t\t}\n \trecord_size++;\n \tfile_helper.save(record_size_file, record_size + \"\");\n \t\n \t// record\n \tString new_record_line = record_size + \"\\t\" + record_line + \"\\n\";\n\t\tLog.i(TAG, record_file + \" NEW: \" + new_record_line);\n \tfile_helper.append(record_file, new_record_line);\n\t}"
] | [
"0.5393199",
"0.52001196",
"0.5163727",
"0.5074096",
"0.50498915",
"0.5039605",
"0.5031876",
"0.5001891",
"0.49771374",
"0.4909781",
"0.4878671",
"0.4875294",
"0.48520118",
"0.4847523",
"0.48178682",
"0.4810346",
"0.48063612",
"0.4800216",
"0.478167",
"0.4773363",
"0.4753257",
"0.4751903",
"0.47384024",
"0.4728827",
"0.47215977",
"0.46995315",
"0.4685774",
"0.46832114",
"0.46801183",
"0.46734402",
"0.46607012",
"0.46588853",
"0.4650311",
"0.4634697",
"0.46305245",
"0.4618532",
"0.46174923",
"0.45971972",
"0.45889914",
"0.45882162",
"0.45882162",
"0.45800918",
"0.456944",
"0.45590687",
"0.45443532",
"0.45192438",
"0.4513016",
"0.45103058",
"0.4505881",
"0.45041546",
"0.45021272",
"0.4497167",
"0.44962066",
"0.44835734",
"0.44703156",
"0.44535282",
"0.44458997",
"0.44393563",
"0.44344598",
"0.4425761",
"0.44238985",
"0.44235927",
"0.44213906",
"0.4421361",
"0.44106367",
"0.4399872",
"0.43940526",
"0.43923953",
"0.43907362",
"0.43865323",
"0.43749768",
"0.43709013",
"0.43657887",
"0.4345472",
"0.43434647",
"0.4340861",
"0.43387806",
"0.43279666",
"0.43255612",
"0.4322969",
"0.43178174",
"0.4315569",
"0.43041337",
"0.4301649",
"0.4300207",
"0.42985377",
"0.42940414",
"0.42918992",
"0.4283219",
"0.4278326",
"0.4277603",
"0.4277522",
"0.42761254",
"0.42721292",
"0.42704442",
"0.426806",
"0.42680502",
"0.42672396",
"0.42643452",
"0.42577162"
] | 0.6881565 | 0 |
Updates the file path of specified resource, identified by the UMID. | public void update(String UMID, File file) throws DRACMAException {
try {
String path = DRACMAClient.updatePath + "/" + UMID + "/";
URI uri = new URIBuilder(serverURI).setPath(path).build(); // setParameter("path",
// file.getAbsolutePath())
logger.debug("DRACMA update URI " + uri);
HttpClient client = new DefaultHttpClient();
HttpUriRequest request = new HttpPut(uri);
List<NameValuePair> nameValuePairs = new ArrayList<NameValuePair>(1);
nameValuePairs.add(new BasicNameValuePair("path", file.getAbsolutePath()));
((HttpEntityEnclosingRequest) request).setEntity(new UrlEncodedFormEntity(nameValuePairs));
HttpResponse response = client.execute(request);
if (response.getStatusLine().getStatusCode() == 200) {
logger.debug("DRACMA success: " + response.getStatusLine().toString());
return;
} else {
throw new DRACMAException("DRACMA error: status code " + response.getStatusLine().getStatusCode() + "...");
}
} catch (IOException e) {
throw new DRACMAException("Unable to execute DRACMA update request...");
} catch (URISyntaxException e) {
throw new DRACMAException("Unable to create a valid URI...\n" + e.getMessage());
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void updateFileResource(Long fileId) {\n editResourceService.getVMFile(fileId, new AsyncCallback<VMFile>() {\n @Override\n public void onFailure(Throwable caught) {\n SC.warn(caught.getMessage());\n }\n\n @Override\n public void onSuccess(VMFile result) {\n FileTreeNode targetNode = (FileTreeNode) fileTreeNodeFactory.findTreeNode(tree, fileId);\n targetNode.setResource(result);\n }\n });\n }",
"public void updatePathAndFile(String path, String file){\r\n\t\tthis.path = path;\r\n\t\tthis.file = file;\r\n\t}",
"void updateFile() throws IOException;",
"void changeFilePath(String newFilePath);",
"@Override\r\n\tpublic void updateResourceInformation() {\n\t}",
"public void setResourcePath(String resourcePath) {\n //To change body of implemented methods use File | Settings | File Templates.\n }",
"@Override\n\tpublic void updateResourceInformation() {\n\t}",
"public void setNewFilePath(String newValue);",
"public void updateMessageResource(MessageResource messageResource, Long userID)\n throws MessageResourceSaveException, MessageResourceLoadException, AuthorisationException, InvalidUserIDException;",
"void documentFilePathUpdated(SingleDocumentModel model);",
"void documentFilePathUpdated(SingleDocumentModel model);",
"public void update(final String resolvedPathIdentifier,\n final DomElementCallback rootElementCallback) {\n final Document document = XmlUtils.readXml(fileManager\n .getInputStream(resolvedPathIdentifier));\n final Element root = document.getDocumentElement();\n if (rootElementCallback.doWithElement(document, root)) {\n fileManager.createOrUpdateTextFileIfRequired(\n resolvedPathIdentifier, XmlUtils.nodeToString(document),\n false);\n }\n }",
"public void update()\n {\n modifier = coral.getCurrentSubject();\n modified = new Date();\n try\n {\n persistence.save(this);\n }\n catch(SQLException e)\n {\n throw new BackendException(\"failed to update resource's persitent image\", e);\n }\n try\n {\n Resource impl = coral.getStore().getResource(getId());\n coralEventHub.getGlobal().fireResourceChangeEvent(impl, modifier);\n }\n catch(EntityDoesNotExistException e)\n {\n throw new BackendException(\"inconsistent data\", e);\n }\n }",
"public void setResourcePath(IPath path) {\n setResourcePath(path != null ? path.toString() : \"\");\n }",
"abstract public String updateData(String userId, String resourceName, long lastUpdate) throws IOException;",
"public void update(int idIndex, String inpuFilePath) {\n\t\tString url = IP + String.valueOf(PORT) + \"/update\";\n\t\thelper(url, idIndex, inpuFilePath);\n\t}",
"public void updatePath() {\n\t\tString oldPath = this.path;\n\t\tif (materializePath()) {\n\t\t\tPageAlias.create(this, oldPath);\n\t\t\tupdateChildPaths();\n\t\t}\n\t}",
"public void updatePath (DataSource pool,String path) throws SQLException {\r\n this.setPath(path);\r\n Connection conn=null;\r\n\t\ttry{\r\n conn=pool.getConnection();\r\n String query = \r\n \"update gene_list_analyses \"+\r\n \"set path = ? \"+\r\n \"where analysis_id = ?\";\r\n\r\n log.debug(\"in updateStatus. analysis = \"+this.getDescription());\r\n PreparedStatement pstmt = conn.prepareStatement(query, \r\n ResultSet.TYPE_SCROLL_INSENSITIVE,\r\n ResultSet.CONCUR_UPDATABLE);\r\n pstmt.setString(1, this.getPath());\r\n pstmt.setInt(2, this.getAnalysis_id());\t\r\n pstmt.executeUpdate();\r\n conn.close();\r\n conn=null;\r\n }catch(SQLException e){\r\n throw e;\r\n }finally{\r\n if (conn != null) {\r\n try { conn.close(); } catch (SQLException e) { ; }\r\n conn = null;\r\n }\r\n }\r\n\t}",
"int updateByPrimaryKey(EhrPersonFile record);",
"public void updateFile(String fname, String content) {\n\t\tprintMsg(\"running updateFiles() in \\\"\" + this.getClass().getName() + \"\\\" class.\");\n\t\tString text = null;\n\t\tPath filepath = Paths.get(theRootPath + System.getProperty(\"file.separator\") + fname);\n\t\tif(Files.exists(filepath)) {\n\t\t\tprintMsg(\"File \" + fname + \" exists, updating...\");\n\t\t\t\n\t\t\tif(content.isEmpty() || content == null) {\n\t\t\t\ttext = String.format(\"%s, testing appending text to an empty file.\\r\\n\", new Date());\n\t\t\t}\n\t\t\telse {\n\t\t\t\ttext = content + \"\\r\\n\";\n\t\t\t}\n\t\t\t\n\t\t\ttry {\n\t\t\t\tFiles.write(filepath, text.getBytes(), StandardOpenOption.APPEND);\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t}",
"public void setResource(URI resource) {\n this.resource = resource;\n }",
"public void changePath(String newPath){\n this.path=newPath;\n }",
"public abstract String getFullPath(final String resourcePath);",
"void updateProfilePhoto(int userId, String filename);",
"public void setResourceTo(ServiceCenterITComputingResource newResourceTo) {\n addPropertyValue(getResourcesProperty(), newResourceTo);\r\n }",
"int updateByPrimaryKey(PathologyInfo record);",
"private URI getRefinedResourceURI(Resource resource, String newName) {\n\t\tURI newUri = resource.getURI();\n\t\tString fileExtension = newUri.fileExtension();\n\t\tnewUri = newUri.trimSegments(1).appendSegment(newName).appendFileExtension(fileExtension);\n\t\treturn newUri; \n\t}",
"public void appendPath(String p_addToPath)\n throws MalformedURIException {\n if (p_addToPath == null || p_addToPath.trim().length() == 0) {\n return;\n }\n \n if (!isURIString(p_addToPath)) {\n throw new MalformedURIException(\n \"Path contains invalid character!\");\n }\n \n if (m_path == null || m_path.trim().length() == 0) {\n if (p_addToPath.startsWith(\"/\")) {\n m_path = p_addToPath;\n }\n else {\n m_path = \"/\" + p_addToPath;\n }\n }\n else if (m_path.endsWith(\"/\")) {\n if (p_addToPath.startsWith(\"/\")) {\n m_path = m_path.concat(p_addToPath.substring(1));\n }\n else {\n m_path = m_path.concat(p_addToPath);\n }\n }\n else {\n if (p_addToPath.startsWith(\"/\")) {\n m_path = m_path.concat(p_addToPath);\n }\n else {\n m_path = m_path.concat(\"/\" + p_addToPath);\n }\n }\n }",
"void resourceChanged(IPath workspacePath);",
"protected ValidatableResponse updateResource(String path, JSONObject newResource) throws JSONException {\n return given()\n .header(HEADER_AUTHORIZATION, authenticated())\n .contentType(ContentType.JSON)\n .body(newResource.toString())\n .when()\n .put(path)\n .then()\n .statusCode(204);\n }",
"void setResourceID(String resourceID);",
"public void setResource(int newResource) throws java.rmi.RemoteException;",
"public static void UpdateLineInFileByID(String i_FileName, String i_ID, StringBuilder i_StringToReplace,\n\t\t\tStringBuilder i_StringToReplaceWith) {\n\t}",
"public static URL adjustURL(URL resource) throws MalformedURLException {\n \t\tString urlStr = resource.getFile();\n \t\tif (urlStr.startsWith(\"file://\"))\n \t\t\turlStr.replaceFirst(\"file://localhost\", \"file://\");\n \t\telse\n \t\t\turlStr = \"file:///\" + urlStr;\n \t\treturn new URL(urlStr);\n \t}",
"private void updateFiles() {\n\t}",
"public native void addResourcePath(final String name, final String resourcePath, final int type);",
"int updateByPrimaryKey(DiaryFile record);",
"public Path saveOrUpdatePath(Path path);",
"public void setResourcefile (File file)\n {\n _resourcefile = file;\n }",
"public void setResourceFrom(ServiceCenterITComputingResource newResourceFrom) {\n addPropertyValue(getResourcesProperty(), newResourceFrom);\r\n// setPropertyValue(getResourcesProperty(), resourceTo);\r\n }",
"void setPath(String path);",
"int updateByPrimaryKeySelective(EhrPersonFile record);",
"void setResourceEndowment(String resourceName, double newResourceEndowment);",
"public void setRelPath (\r\n String strRelPath) throws java.io.IOException, com.linar.jintegra.AutomationException;",
"public void setOriginalFilePath(String newValue);",
"public void setResourcePath(String path) {\n appPathField.setText(path != null ? path : \"\");\n }",
"public void setResourcePath(String resourcePath) {\n _resourcePath = resourcePath;\n }",
"int updateByPrimaryKey(FileRecordAdmin record);",
"private String getResourcePath() {\n\t\tString reqResource = getRequest().getResourceRef().getPath();\n\t\treqResource = actualPath(reqResource, 1);\n\t\tLOGGERS.info(\"reqResourcePath---->\" + reqResource);\n\t\treturn reqResource;\n\t}",
"private void downPath(FileModel item) {\n if (item != null && item.getFile() != null) {\n File path = item.getFile();\n onPathChanged(this.path, path);\n if (path.isDirectory()) {\n this.path = path;\n load(null);\n }\n }\n }",
"public void setRWResource(RWResource theResource) {\n resource = theResource;\n }",
"private void writeValueToINI(FileOutputStream out, String key, String value) throws FileNotFoundException, IOException{\n // update the labtainerPath property\n //pathProperties.load(new FileInputStream(iniFile)); \n pathProperties.put(key, value);\n\n // write update to the ini File\n date = new Date();\n pathProperties.store(out, \"Updated: \"+ formatter.format(date));\n out.close();\n }",
"public void setResourcePath (String resourcePath) {\n this.resourcePath = resourcePath;\n }",
"private void saveResourceAndRelationshipWithPath(Resource resource, Path path, Endpoint endpoint){\n endpoint.addRelationshipToResourceAndPath(resource, path);\n endpointRepository.save(endpoint);\n }",
"abstract public void setRingResourcesDir(String path);",
"public static void setUniqueFileIdentifier(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, UNIQUEFILEIDENTIFIER, value);\r\n\t}",
"public void setResourcePath (String resourcePath) {\n this.resourcePath = resourcePath;\n }",
"int updateByPrimaryKey(TUserResources record);",
"public void setFullPath( String path )\n {\n if( file != null )\n {\n throw new RuntimeException( \"The path has already been set for this object.\" );\n }\n\n // Parse out multiple directories as needed.\n StringTokenizer st = new StringTokenizer( path, \"/\\\\\" );\n\n String current = st.nextToken();\n while( st.hasMoreTokens() )\n {\n this.parent = new FileIndex( this.parent, current );\n current = st.nextToken();\n }\n\n this.file = current;\n\n // Cache our full path\n if( parent == null )\n fullPath = this.file;\n else\n fullPath = parent.getFullPath() + \"/\" + this.file;\n }",
"public void setPath(String newPath) {\n String id = PREF_DEFAULTDIR + getId();\n idv.getStateManager().writePreference(id, newPath);\n }",
"private void updateResourceMetaInfo(COElementAbstract element) {\r\n\telement.setId(UUID.uuid());\r\n\telement.setIdParent(null);\r\n\tif (element.isCOContentResourceProxy()) {\r\n\t COContentResourceProxy coResProxy =\r\n\t\t (COContentResourceProxy) element;\r\n\t if (COContentResourceType.DOCUMENT.equals(coResProxy.getResource()\r\n\t\t .getType())) {\r\n\t\tContentResourceEdit newResource;\r\n\t\ttry {\r\n\t\t String uri =\r\n\t\t\t coResProxy.getResource().getProperty(\r\n\t\t\t\t COPropertiesType.IDENTIFIER,\r\n\t\t\t\t COPropertiesType.IDENTIFIER_TYPE_URI);\r\n\t\t newResource = contentHostingService.editResource(uri);\r\n\r\n\t\t newResource.getPropertiesEdit().addProperty(\r\n\t\t\t ResourceProperties.PROP_DESCRIPTION,\r\n\t\t\t coResProxy.getResource().getProperty(\r\n\t\t\t\t COPropertiesType.DESCRIPTION));\r\n\t\t newResource.getPropertiesEdit().addProperty(\r\n\t\t\t ResourceProperties.PROP_COPYRIGHT_CHOICE,\r\n\t\t\t coResProxy.getResource().getProperty(\r\n\t\t\t\t COPropertiesType.LICENSE));\r\n\t/*\r\n\t * SAKAI 11: check for \t ResourceProperties.PROP_TYPE_RESOURCE\r\n\t * \r\n\t * newResource.getPropertiesEdit().addProperty(\r\n\t\t\t ResourceProperties.PROP_TYPE_RESOURCE,\r\n\t\t\t coResProxy.getResource().getProperty(\r\n\t\t\t\t COPropertiesType.ASM_RESOURCE_TYPE));*/\r\n\r\n\t\t contentHostingService.commitResource(newResource,\r\n\t\t\t NotificationService.NOTI_NONE);\r\n\t\t} catch (PermissionException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (IdUnusedException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (TypeException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (InUseException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (OverQuotaException e) {\r\n\t\t e.printStackTrace();\r\n\t\t} catch (ServerOverloadException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t }\r\n\t} else {\r\n\t for (int i = 0; i < element.getChildrens().size(); i++) {\r\n\t\tCOElementAbstract childElement =\r\n\t\t\t(COElementAbstract) element.getChildrens().get(i);\r\n\t\tupdateResourceMetaInfo(childElement);\r\n\t }\r\n\t}\r\n }",
"public void setPath(String path)\r\n/* 21: */ {\r\n/* 22:53 */ this.path = path;\r\n/* 23: */ }",
"public String updateudat(String UID, String udat){\n\t\ttry {\n\t\t\treturn dorequest(strbaseUrlTas + \"?id=\" + UID + \"&udat=\" + URLEncoder.encode(udat,\"UTF-8\"));\n\t\t} catch (IOException e) {\n\t\t\t// Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\treturn \"error-update udat failed\";\n\t}",
"int updateByPrimaryKeySelective(PathologyInfo record);",
"DcsResourceDO findResourceForUpdate(String resourceId);",
"protected abstract String getResourcePath();",
"void update(String pathString, CacheEntry cacheEntry);",
"void update(FileInfo fileInfo);",
"int updateByPrimaryKey(TParklotstatusFile record);",
"public static void setOriginalFilename(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.set(model, instanceResource, ORIGINALFILENAME, value);\r\n\t}",
"public String getUPath() {\n return uPath;\n }",
"public void writeFile(IFile resource, IPath destinationPath)\n\t\t\tthrows CoreException;",
"public void setResource(ResourceInfo resource) {\n\t\tif (this.resource != null) {\n\t\t\tthrow new IllegalStateException(\"The resource pointer can only be set once for Resource [\" + name + \"]\");\n\t\t}\n\t\tthis.resource = resource;\n\t}",
"public void setResourcePath(String resourcePath) {\n\t\tthis.resourcePath = resourcePath;\n\t}",
"private void updateDatFile() {\n\t\tIOService<?> ioManager = new IOService<Entity>();\n\t\ttry {\n\t\t\tioManager.writeToFile(FileDataWrapper.productMap.values(), new Product());\n\t\t\tioManager = null;\n\t\t} catch (Exception ex) {\n\t\t\tDisplayUtil.displayValidationError(buttonPanel, StoreConstants.ERROR + \" saving new product\");\n\t\t\tioManager = null;\n\t\t}\n\t}",
"abstract public void setSoundResourcesDir(String path);",
"void openResource(String resourcePath);",
"public void setPath(String path);",
"public static void update(Resource resource){\n String newUpdate;\n String display = \"What would you like to update?\"+\n \"[1] Type: \" + resource.getType() + \"\\n\" +\n \"[2] Title: \" + resource.getName() + \"\\n\" +\n \"[3] Genre: \" + resource.getGenre() + \"\\n\" +\n \"[4] Author: \" + resource.getAuthor() + \"\\n\" +\n \"[5] Year: \" + resource.getYear() + \"\\n\" +\n \"[0] Exit\";\n\n int edit = getIntInput(display, 0,5);\n\n switch(edit){\n case 1:\n newUpdate = edit(\"type\", resource.getType());\n resource.setType(newUpdate);\n break;\n case 2:\n newUpdate = edit(\"title\", resource.getName());\n resource.setName(newUpdate);\n break;\n case 3:\n newUpdate = edit(\"genre\", resource.getGenre());\n resource.setGenre(newUpdate);\n break;\n case 4:\n newUpdate = edit(\"author\", resource.getAuthor());\n resource.setAuthor(newUpdate);\n break;\n case 5:\n newUpdate = edit(\"year\", resource.getYear());\n resource.setYear(newUpdate);\n break;\n case 0:\n break;\n default:\n JOptionPane.showMessageDialog(null, \"should not reach here\");\n }\n }",
"public void setResourceFile(File fileName) {\n resourceFile = fileName;\n }",
"int updateByPrimaryKey(FileSet record);",
"void setFilePath(Path filePath);",
"Source updateDatasourceZ3950IdFile(Source ds) throws RepoxException;",
"void setModBookFilePath(Path modBookFilePath);",
"void setImageResource(String imageResource) throws IOException;",
"int updateByPrimaryKey(Resource record);",
"@Override\n\tpublic void getPathToMRT() {\n\n\t}",
"private void upPath() {\n if (!path.equals(FilePathUtil.getRootPath())) {\n onPathChanged(path, new File(path.getParent()));\n path = new File(path.getParent());\n load(null);\n }\n }",
"private String initialFileSetup(String file_path, String user_id) {\n\n String[] path_components = file_path.split(\"/\");\n String desired_filename = path_components[path_components.length - 1];\n String absolute_path = new File(\"\").getAbsolutePath();\n absolute_path = absolute_path.concat(\"/Final\");\n new File(absolute_path).mkdirs();\n absolute_path = absolute_path.concat(\"/Pause\");\n new File(absolute_path).mkdirs();\n\n absolute_path = absolute_path.concat(\"/\".concat(user_id));\n new File(absolute_path).mkdirs();\n\n absolute_path = absolute_path.concat(\"/Pause_\".concat(desired_filename));\n\n return absolute_path;\n }",
"public void doUpdate() {\n fileChooser.setCurrentDirectory(new File(getPath()));\n fileChooser.rescanCurrentDirectory();\n }",
"@Test\r\n public void testUpdateFile() {\r\n System.out.println(\"updateFile\");\r\n InparseManager instance = ((InparseManager) new ParserGenerator().getNewApplicationInparser());\r\n try {\r\n File file = File.createTempFile(\"TempInpFile\", null);\r\n instance.setlocalPath(file.getAbsolutePath());\r\n } catch (IOException ex) {\r\n Logger.getLogger(ApplicationInparserTest.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n instance.updateFile();\r\n // no assertEquals needed because the method itself would throw an error\r\n // if an error occurs check your connection to the internet\r\n }",
"int updateByPrimaryKeySelective(DiaryFile record);",
"@Test( expected = IllegalStateException.class )\n public void testSetResource()\n {\n PathBuilder.instance().forReleaseIndexFile().setResource( resource );\n }",
"private Uri updateExternalFile(OPLocalRingtoneAdapter.RingtoneData ringtoneData) {\n OPMyLog.d(\"chenhl\", \"getKey:\" + ringtoneData.mUri);\n String str = ringtoneData.filepath;\n OPMyLog.d(\"chenhl\", \"path:\" + str);\n File file = new File(str);\n if (!file.exists()) {\n this.mHandler.post(new Runnable() {\n /* class com.oneplus.settings.ringtone.OPLocalRingtonePickerActivity.AnonymousClass4 */\n\n public void run() {\n OPLocalRingtonePickerActivity oPLocalRingtonePickerActivity = OPLocalRingtonePickerActivity.this;\n Toast.makeText(oPLocalRingtonePickerActivity, oPLocalRingtonePickerActivity.getString(C0017R$string.oneplus_file_not_exist), 0).show();\n }\n });\n return null;\n }\n playRingtone(300, this.mUriForDefaultItem);\n if (str == null || str.startsWith(\"/storage/emulated/legacy\") || str.startsWith(SDCARD_PATH)) {\n return this.mUriForDefaultItem;\n }\n File file2 = new File(checkDir() + file.getName());\n if (!file2.exists()) {\n copyFile(file, file2);\n }\n return updateDb(ringtoneData, file2.getAbsolutePath());\n }",
"public void setResource(ResourceVO newResource) {\n\tresource = newResource;\n}",
"public void updatefile_ipartner(Connection conn, int memberId, String filesystemname) {\n\t\tSystem.out.println(\"updatefile_ipartner DAO---\");\r\n\t\t// TODO Auto-generated method stub\r\n\t\tPreparedStatement ps = null;\r\n\t\tString sql =\" update partner set partnerpicture=? \"\r\n\t\t\t\t+ \" where memberId=? \";\r\n\t\ttry {\r\n\t\t\tps= conn.prepareStatement(sql);\r\n\t\t\tps.setString(1, filesystemname);\r\n\t\t\tps.setInt(2, memberId);\r\n\t\t\tint result = ps.executeUpdate();\r\n\t\t\tSystem.out.println(\"성공적으로 업데이트--\"+result);\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally {\r\n\t\t\ttry { ps.close(); } catch (SQLException e) { e.printStackTrace();\t\t\t}\r\n\t\t//\ttry { conn.close(); } catch (SQLException e) { e.printStackTrace();\t\t\t}\r\n\t\t}\r\n\t}",
"protected void setResource(final Resource resource) {\n this.resource = resource;\n }",
"public static void addOriginalFilename(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource, java.lang.String value) {\r\n\t\tBase.add(model, instanceResource, ORIGINALFILENAME, value);\r\n\t}",
"public void attributeChanged(Attribute attribute)\n\t\t\tthrows IllegalActionException {\n\t\tif (attribute == fileOrURL) {\n\t\t\t// NOTE: We do not want to close the file if the file\n\t\t\t// has not in fact changed. We check this by just comparing\n\t\t\t// name, which is not perfect...\n\t\t\tString newFileOrURL = ((StringToken) fileOrURL.getToken())\n\t\t\t\t\t.stringValue();\n\n\t\t\tif ((_previousFileOrURL != null)\n\t\t\t\t\t&& !newFileOrURL.equals(_previousFileOrURL)) {\n\t\t\t\t_previousFileOrURL = newFileOrURL;\n\t\t\t\t_openReader();\n\t\t\t}\n\t\t} else {\n\t\t\tsuper.attributeChanged(attribute);\n\t\t}\n\t}",
"public void setPath (\r\n String strPath) throws java.io.IOException, com.linar.jintegra.AutomationException;"
] | [
"0.6416762",
"0.5767141",
"0.55026394",
"0.54779744",
"0.540684",
"0.5403569",
"0.5399779",
"0.5368627",
"0.53596693",
"0.53462285",
"0.53462285",
"0.53148496",
"0.53112936",
"0.5299424",
"0.52934086",
"0.5236128",
"0.52341443",
"0.52189636",
"0.5206408",
"0.51967156",
"0.519016",
"0.5170878",
"0.51576084",
"0.51543325",
"0.5147035",
"0.50876665",
"0.508176",
"0.5065821",
"0.50655127",
"0.5059778",
"0.5057583",
"0.5034904",
"0.50324816",
"0.502896",
"0.5018428",
"0.50083333",
"0.5003127",
"0.49892965",
"0.498681",
"0.49703455",
"0.49579558",
"0.49542633",
"0.49488074",
"0.49410543",
"0.4935358",
"0.4914737",
"0.49125898",
"0.49063727",
"0.49038914",
"0.49017805",
"0.48923394",
"0.4885204",
"0.4865529",
"0.48551852",
"0.48545897",
"0.48527277",
"0.4848467",
"0.48456413",
"0.48378935",
"0.48260537",
"0.48247167",
"0.4815712",
"0.48105392",
"0.48066002",
"0.4805528",
"0.4793759",
"0.47919136",
"0.4788167",
"0.4786369",
"0.4786356",
"0.47863543",
"0.47824562",
"0.47794554",
"0.4778138",
"0.47763425",
"0.47754574",
"0.47751537",
"0.47719017",
"0.4767804",
"0.4761755",
"0.47607946",
"0.47595203",
"0.47587565",
"0.4758053",
"0.475607",
"0.47509634",
"0.47501045",
"0.47459316",
"0.47404492",
"0.47261807",
"0.4722435",
"0.47176465",
"0.4717576",
"0.47123164",
"0.4709814",
"0.47082976",
"0.4708157",
"0.47029918",
"0.46970308",
"0.4686317"
] | 0.6383591 | 1 |
hashCode() is used to find the bucket | @Override
public int hashCode() {
System.out.println("hashCode for " + roll_no);
return roll_no % 10;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int\thashCode();",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"public int hashCode();",
"int hashCode();",
"int hashCode();",
"@Override\n\t public int hashCode();",
"@Override\n int hashCode();",
"@Override\n public int hashCode();",
"@Override \n int hashCode();",
"public abstract int hashCode();",
"public int hashCode()\n {\n return hash;\n }",
"@Override\n public abstract int hashCode();",
"@Override\n public abstract int hashCode();",
"@Override\n public abstract int hashCode();",
"public int hashCode() {\n return hash.hashCode();\n }",
"public int hashCode() {\r\n \treturn super.hashCode();\r\n }",
"@Override\n public int hashCode() {\n return hashcode;\n }",
"@Override\n public int hashCode()\n {\n return hashCode;\n }",
"public int hashCode() {\r\n\t return super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\r\n\t}",
"@Override\n public int hashCode() {\n return hashCode;\n }",
"@Override\r\n public int hashCode()\r\n {\r\n if(this.isEmpty()) return 0;\r\n\r\n /**\r\n * En este caso es recomendable usar la funcion Arrays.hashCode porque\r\n * garantiza un hash unico para cada array.\r\n * Si se usa la suma, los objetos \"ab\" y \"ba\" tendrian el mismo hash.\r\n */\r\n return Arrays.hashCode(this.table);\r\n }",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"public int hashcode();",
"public final int hashCode() {\n return super.hashCode();\n }",
"@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn super.hashCode(); //Default implementation; may need to bring in line to equals\n\t\t}",
"public synchronized int hashCode() {\n\t\treturn super.hashCode();\n\t}",
"@Override\n public int hashCode()\n {\n return this.value.hashCode();\n }",
"public int hashCode() {\n/* 360 */ return Objects.hashCode(new Object[] { Long.valueOf(this.count), Double.valueOf(this.mean), Double.valueOf(this.sumOfSquaresOfDeltas), Double.valueOf(this.min), Double.valueOf(this.max) });\n/* */ }",
"@Override\n public int hashCode() {\n // name's hashCode is multiplied by an arbitrary prime number (13)\n // in order to make sure there is a difference in the hashCode between\n // these two parameters:\n // name: a value: aa\n // name: aa value: a\n return key.hashCode() * 13 + (value == null ? 0 : value.hashCode());\n }",
"public int hashCode()\n {\n return super.hashCode();\n }",
"public int hashCode() {\n return (name.ordinal() + 5) * 51;\n }",
"public int hashCode()\r\n\t{\n\t\treturn (i % 9); //this will make the values to store in the table based on size of hashtable is 9 and calculation will be (i %9)\r\n\t}",
"public int hashCode()\n {\n return values().hashCode();\n }",
"public int hashCode() {\n return 37 * 17;\n }",
"public int hashCode() { return super.hashCode(); }",
"public int hashCode(){\n\t\treturn toString().hashCode();\n\t}",
"@Override\n\t\tpublic int hashCode()\n\t\t{\n\t\t\treturn key.hashCode() * 31 + value.hashCode();\n\t\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn idx1.hashCode() * 811 + idx2.hashCode();\n\t}",
"public int hashCode() {\r\n\t\treturn this.value().hashCode();\r\n\t}",
"public int hashCode() {\n\treturn data.hashCode();\n }",
"public int hashCode() {\n return lho.hashCode() + op.hashCode() + rho.hashCode();\n }",
"@Override\r\n public int hashCode() {\r\n return super.hashCode();\r\n }",
"public int hashCode() {\n\t\treturn 14356 + historyIndex * 373 + dimension; \n\t\t// return some arbitrary number related to historyIndex and dimension\n\t}",
"public int hashCode() {\n\t\treturn toString().hashCode();\n\t}",
"public int hashCode() {\n return Objects.hashCode(this);\n }",
"@Override\n public int hashCode() { \n return this.toString().hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"public int hashCode() {\n return (7 + this.key.hashCode() + this.value.hashCode() / 5) \n + this.left.hashCode()\n + this.right.hashCode();\n }",
"public int hashCode() {\n\t\treturn hash(objects); //return the hash code of the objects\n\t}",
"public int hashCode() {\n\t\treturn new HashCodeBuilder().append(obox).append(wordOffsets).append(occlusions).toHashCode();\n\t}",
"@Override\n public int hashCode() {\n return Objects.hash(this.getValue());\n }",
"@Override\n public int hashCode() {\n return this.toString().hashCode();\n }",
"@Override\r\n public int hashCode() {\r\n return this.toString().hashCode();\r\n }",
"public int hashCode() {\n\treturn name.hashCode() ^ style ^ size;\n }",
"@Override\r\n\tpublic int hashCode() {\n\t\tint result=1,prime=31;\r\n\t\tresult = result * prime + tableName.hashCode();\r\n\t\tresult = result * prime + databaseName.hashCode();\r\n\t\tresult = result * prime + limit;\r\n\t\tresult = result * prime + offset;\r\n\t\tresult = result * prime + queryCondition.hashCode();\r\n\t\treturn result;\r\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn map.hashCode() ^ y() << 16 ^ x();\n\t}",
"@Override\n public int hashCode() {\n long longBits = Double.doubleToLongBits(this.size + this.unit.hashCode());\n return (int) (longBits ^ (longBits >>> 32));\n }",
"public int hashCode()\n {\n int hash = this.getClass().hashCode();\n\n hash = ( hash << 1 | hash >>> 31 ) ^ Arrays.hashCode(genome);\n\n return hash;\n }",
"@Override\n public int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode() {\n int hash = 7;\n hash = 29 * hash + Objects.hashCode(this.id);\n hash = 29 * hash + Objects.hashCode(this.name);\n return hash;\n }",
"@Override\n\t\tpublic int hashCode() {\n\t\t\treturn countMap.hashCode();\n\t\t}",
"public int hashCode() {\n return 0;\n }",
"@Override\n public int hashCode() {\n return 1;\n }",
"@Override\n\t\tpublic int hashCode() {\n\t\t\treturn (int) (this.sum * 100 + this.index);\n\t\t}",
"public int\thashCode() { return value; }",
"@Override\n public int hashCode() {\n return (this.key == null ? 0 : this.key.hashCode()) ^ (this.value == null ? 0 : this.value.hashCode());\n }",
"@Override\r\n\t\tpublic int hashCode() {\n\t\t\treturn 0;\r\n\t\t}",
"public int hashCode() {\n return c;\n }",
"@Override\n public final int hashCode() {\n return super.hashCode();\n }",
"@Override\n public int hashCode(\n ) {\n \tint h = hash;\n \tif (h == 0 && size > 0) {\n \t\th = 31 * parent.hashCode() + base.hashCode();\n \t\tif(! isPlaceHolder()) {\n \t\t\thash = h;\n \t\t}\n \t}\t\n return h;\n }",
"public int getHashCode(){\n return hashCode();\n }",
"public int hashCode()\n\t{\n\t\treturn y<<16+x;\n\t}",
"public int hashCode() {\r\n int result = 17;\r\n result = xCH(result, getTableDbName());\r\n result = xCH(result, getMemberAddressId());\r\n return result;\r\n }",
"public int hashCode() {\n/* 69 */ int var1 = super.hashCode();\n/* 70 */ var1 = 31 * var1 + this.allowedValues.hashCode();\n/* 71 */ return var1;\n/* */ }",
"public int hashCode() {\n if (hashCode != 0){\n return hashCode;\n }\n return hashCode = computeHash();\n }",
"@Override\n public int hashCode() {\n return Objects.hash(JMBAG);\n }",
"@Override\r\n\t\tpublic int hashCode() {\n\t\t\tsynchronized (mutex) {\r\n\t\t\t\treturn pair.hashCode();\r\n\t\t\t}\r\n\t\t}",
"@Override\n\tpublic int hashCode() {\n\t\t\n\t\treturn (int)id * name.hashCode() * email.hashCode();\n\t\t//int hash = new HashCodeBuilder(17,37).append(id).append(name); //can be added from Apache Commons Lang's HashCodeBuilder class\n\t}",
"public int hashCode()\n {\n return toString().hashCode();\n }",
"public int hashCode() {\n int hash = 0;\n hash = width;\n hash <<= 8;\n hash ^= height;\n hash <<= 8;\n hash ^= numBands;\n hash <<= 8;\n hash ^= dataType;\n hash <<= 8;\n for (int i = 0; i < bandOffsets.length; i++) {\n hash ^= bandOffsets[i];\n hash <<= 8;\n }\n for (int i = 0; i < bankIndices.length; i++) {\n hash ^= bankIndices[i];\n hash <<= 8;\n }\n hash ^= numBands;\n hash <<= 8;\n hash ^= numBanks;\n hash <<= 8;\n hash ^= scanlineStride;\n hash <<= 8;\n hash ^= pixelStride;\n return hash;\n }",
"@Override\n\tpublic int hashCode() {\n\t\treturn toString().hashCode();\n\t}",
"@Override\n\tpublic int hashCode() {\n\t\treturn toString().hashCode();\n\t}",
"@Override\r\n\tpublic int hashCode() {\n\t\tint result = 17;\r\n\t\tresult = 37*result+(int) (id ^ (id>>>32));\r\n\t\t//result = 37*result+(name==null?0:name.hashCode());\r\n\t\t//result = 37*result+displayOrder;\r\n\t\t//result = 37*result+(this.url==null?0:url.hashCode());\r\n\t\treturn result;\r\n\t}",
"@Override\r\n \tpublic int hashCode() {\r\n \t\t// Insert code to generate a hash code for the receiver here.\r\n \t\t// This implementation forwards the message to super. You may replace or supplement this.\r\n \t\t// NOTE: if two objects are equal (equals(Object) returns true) they must have the same hash code\r\n \t\treturn super.hashCode();\r\n \t}"
] | [
"0.8516446",
"0.8204077",
"0.8204077",
"0.8204077",
"0.8204077",
"0.8134817",
"0.8134817",
"0.81156975",
"0.80973953",
"0.80597454",
"0.80443096",
"0.8016762",
"0.79704577",
"0.7957808",
"0.7957808",
"0.7957808",
"0.7933477",
"0.7904257",
"0.7901471",
"0.78970665",
"0.78598684",
"0.7850612",
"0.7850612",
"0.7850612",
"0.78387165",
"0.78144085",
"0.7812435",
"0.7812435",
"0.7812435",
"0.7812435",
"0.7812435",
"0.7812435",
"0.7812435",
"0.7812435",
"0.7812435",
"0.7812435",
"0.7788536",
"0.77824616",
"0.7746486",
"0.77440304",
"0.77316195",
"0.77139974",
"0.7712328",
"0.771075",
"0.7709667",
"0.7709164",
"0.7702877",
"0.7700908",
"0.76930684",
"0.769082",
"0.76871634",
"0.7668941",
"0.7659583",
"0.76502126",
"0.76462543",
"0.76461625",
"0.76378393",
"0.7634225",
"0.76299983",
"0.7619262",
"0.7618422",
"0.7618422",
"0.7618422",
"0.7618422",
"0.7611143",
"0.7609828",
"0.76027477",
"0.7594869",
"0.75923216",
"0.75823194",
"0.7580968",
"0.7577741",
"0.75677717",
"0.756013",
"0.7560022",
"0.7559837",
"0.75507987",
"0.7547748",
"0.7547194",
"0.754707",
"0.7541187",
"0.7539239",
"0.753473",
"0.7533053",
"0.75251263",
"0.75230116",
"0.7522216",
"0.75169456",
"0.75145626",
"0.7505982",
"0.7505036",
"0.74997973",
"0.749802",
"0.7496047",
"0.7491931",
"0.74861497",
"0.74838686",
"0.74826247",
"0.74826247",
"0.7473681",
"0.74733543"
] | 0.0 | -1 |
equals() is used to check if objects are equal | @Override
public boolean equals(Object obj) {
System.out.println("equals(" + roll_no + "," + ((Element) obj).roll_no + ")");
return roll_no == (((Element) obj).roll_no);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean equals( Object obj );",
"public boolean equals(Object obj);",
"public boolean equals(Object object);",
"@Override public boolean equals(Object object);",
"@Override\n public boolean equals(Object obj) {\n return this == obj;\n }",
"@Override\n boolean equals(Object obj);",
"@Override \n boolean equals(Object obj);",
"boolean equals(Object object);",
"public boolean equals(Object o);",
"@Override\n public boolean equals(Object o) {\n return this == o;\n }",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Receta instance = new Receta();\n instance.setNombre(\"nom1\");\n Receta instance2 = new Receta();\n instance.setNombre(\"nom2\");\n boolean expResult = false;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }",
"@Override\n public boolean equals(Object obj) {\n return this == obj;\n }",
"boolean equals(Object obj);",
"boolean equals(Object obj);",
"public abstract boolean equals(Object o);",
"@Override\n public boolean equals(Object other) {\n return this == other;\n }",
"@Override\n boolean equals(Object o);",
"boolean equals(Object o);",
"boolean equals(Object o);",
"boolean equals(Object o);",
"boolean equals(Object o);",
"boolean equals(Object o);",
"@Override\n boolean equals(Object other);",
"public abstract boolean equals(Object other);",
"@Override\n public abstract boolean equals(Object obj);",
"@Override\n public boolean equals(Object obj) {\n \n //TODO: Complete Method\n \n return true;\n }",
"@Test\r\n\tpublic void testEquality(){\n\t\t assertEquals(object1, object2);\r\n\t}",
"@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}",
"@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}",
"@Override\r\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\r\n\t}",
"public boolean equals(java.lang.Object other){\n return false; //TODO codavaj!!\n }",
"@Test\n\tpublic void testEqualsObject_True() {\n\t\tbook3 = new Book(DEFAULT_TITLE, DEFAULT_AUTHOR, DEFAULT_YEAR, DEFAULT_ISBN);\n\t\tassertEquals(book1, book3);\n\t}",
"@Override\n public final boolean equals(final Object other) {\n return super.equals(other);\n }",
"@Override\n public final boolean equals( Object obj ) {\n return super.equals(obj);\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn this.hashCode() == obj.hashCode();\n\t}",
"@Test\n void equals1() {\n Student s1=new Student(\"emina\",\"milanovic\",18231);\n Student s2=new Student(\"emina\",\"milanovic\",18231);\n assertEquals(true,s1.equals(s2));\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn super.equals(obj);\n\t}",
"@Override public boolean equals(Object o) { // since 1.3.1\n // should these ever match actually?\n return (o == this);\n }",
"@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }",
"@Override\n\t\tpublic boolean equals(Object obj) {\n\t\t\treturn super.equals(obj);\n\t\t}",
"@Test\n public void testEquals01() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n SocialNetwork sn = new SocialNetwork();\n boolean result = sn.equals(otherObject);\n assertTrue(result);\n }",
"@Override\n\tpublic abstract boolean equals(Object other);",
"@Override\n\tpublic boolean equals(Object obj){\n\t\treturn super.equals(obj);\n\t}",
"@Override\r\n public boolean equals(Object obj) {\r\n return super.equals(obj);\r\n }",
"@Override\n public boolean equals(Object other) {\n if (other.getClass() == getClass()) {\n return hashCode() == other.hashCode();\n }\n\n return false;\n }",
"@Override\n\tpublic boolean equals(Object o) {\n\t\treturn super.equals(o);\n\t}",
"@Test\n public void testEquals() {\n System.out.println(\"Animal.equals\");\n Animal newAnimal = new Animal(252, \"Candid Chandelier\", 10, \"Cheetah\", 202);\n assertTrue(animal1.equals(newAnimal));\n assertFalse(animal2.equals(newAnimal));\n }",
"@Override\n public abstract boolean equals(Object other);",
"@Override\n public abstract boolean equals(Object other);",
"@Test\n public void testEquals02() {\n System.out.println(\"equals\");\n Object otherObject = new SocialNetwork();\n boolean result = sn10.equals(otherObject);\n assertFalse(result);\n }",
"public void testEqualsObject() {\n\t\t\tTipoNodoLeisure tipo1 = new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.0\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo2= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.1\")); //$NON-NLS-1$\n\t\t\tTipoNodoLeisure tipo3= new TipoNodoLeisure(Messages.getString(\"TipoNodoLeisureTest.2\")); //$NON-NLS-1$\n\t\t\tif (tipo1 != tipo1)\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.3\")); //$NON-NLS-1$\n\t\t\tif (!tipo1.equals(tipo2))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.4\"));\t\t\t //$NON-NLS-1$\n\t\t\tif (tipo1.equals(tipo3))\n\t\t\t\tfail(Messages.getString(\"TipoNodoLeisureTest.5\"));\t //$NON-NLS-1$\n\t\t}",
"@Override\n public boolean equals(final Object obj) {\n return super.equals(obj);\n }",
"@Override\n public final boolean equals(Object obj) {\n return super.equals(obj);\n }",
"@Override\n public boolean equals(Object o) {\n return true;\n }",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object outroObjecto = new RegistoExposicoes();\n RegistoExposicoes instance = new RegistoExposicoes();\n assertTrue(instance.equals(outroObjecto));\n }",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Reserva instance = new Reserva();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n \n }",
"@Override\n public boolean equals(Object obj) {\n return super.equals(obj);\n }",
"@Override\n public abstract boolean equals(final Object o);",
"@Override\n public abstract boolean equals(final Object o);",
"@Override\n public boolean equals(Object other) {\n return super.equals(other);\n }",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object object = null;\n Paciente instance = new Paciente();\n boolean expResult = false;\n boolean result = instance.equals(object);\n assertEquals(expResult, result);\n\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\tif (this == obj)\n\t\t\treturn true;\n\t\tif (obj == null)\n\t\t\treturn false;\n\t\tif (getClass() != obj.getClass())\n\t\t\treturn false;\n\t\treturn true;\n\t}",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Commissioner instance = new Commissioner();\n Commissioner instance2 = new Commissioner();\n instance.setLogin(\"genie\");\n instance2.setLogin(\"genie\");\n boolean expResult = true;\n boolean result = instance.equals(instance2);\n assertEquals(expResult, result);\n }",
"@Test\n void testEquals() {\n final boolean expected_boolean = true;\n\n // Properties for the objects\n final String username = \"username\";\n final String name = \"their_name\";\n final String password = \"password\";\n\n // Create two LoginAccount objects\n LoginAccount first_account = new LoginAccount(username, name, password);\n LoginAccount second_account = new LoginAccount(username, name, password);\n\n // Variable to check\n boolean objects_are_equal = first_account.equals(second_account);\n\n // Assert that the two boolean values are the same\n assertEquals(expected_boolean, objects_are_equal);\n }",
"private Equals() {}",
"public final boolean equals(Object obj) {\r\n return this == obj;\r\n }",
"@Override\n\tpublic boolean equal() {\n\t\treturn false;\n\t}",
"@Override\n public boolean equals(Object o1) {\n return super.equals(o1);\n }",
"@Override\r\n \tpublic boolean equals(final Object obj) {\r\n \t\t// Insert code to compare the receiver and obj here.\r\n \t\t// This implementation forwards the message to super. You may replace or supplement this.\r\n \t\t// NOTE: obj might be an instance of any class\r\n \t\treturn super.equals(obj);\r\n \t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn EqualsBuilder.reflectionEquals(this, obj);\n\t}",
"@Test\n public void equals() {\n assertTrue(semester.equals(new Semester(1, 0)));\n\n // same object -> returns true\n assertTrue(semester.equals(semester));\n\n // null -> returns false\n assertFalse(semester.equals(null));\n\n // different type -> returns false\n assertFalse(semester.equals(5));\n\n // different year -> returns false\n assertFalse(semester.equals(new Semester(2, 0)));\n\n // different index -> returns false\n assertFalse(semester.equals(new Semester(1, 1)));\n\n // different modules -> returns false\n Semester differentSemester = new Semester(1, 0);\n differentSemester.addModules(getTypicalModules());\n assertFalse(semester.equals(differentSemester));\n }",
"public boolean equals(Object object) {\n/* 4770 */ if (this == object)\n/* */ {\n/* 4772 */ return true;\n/* */ }\n/* 4774 */ if (object != null && object.getClass() == getClass()) {\n/* */ \n/* 4776 */ VolaTile tile = (VolaTile)object;\n/* 4777 */ return (tile.getTileX() == this.tilex && tile.getTileY() == this.tiley && tile.surfaced == this.surfaced);\n/* */ } \n/* 4779 */ return false;\n/* */ }",
"public boolean equal(Object obj1, Object obj2) {\n\t\treturn obj1.equals(obj2);\r\n\t}",
"public boolean equals(Object o) {\n return false;\n }",
"@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object obj = null;\r\n RevisorParentesis instance = null;\r\n boolean expResult = false;\r\n boolean result = instance.equals(obj);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Override\n\tpublic boolean equals(TestObject obj) {\n\t\treturn false;\n\t}",
"public boolean equals(Object o) {\n\t\treturn false;\n\t}",
"boolean canEqual(Object obj);",
"@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object o) {\n\t\treturn false;\n\t}",
"@Test\n public void equalsTest() {\n prepareEntitiesForEqualityTest();\n\n assertEquals(entity0, entity1);\n }",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean equals(Object obj) {\n\t\treturn false;\n\t}",
"@Test\r\n public void testEquals() {\r\n System.out.println(\"equals\");\r\n Object object = null;\r\n Integrante instance = new Integrante();\r\n boolean expResult = false;\r\n boolean result = instance.equals(object);\r\n assertEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Override\n\tpublic boolean equals(Object other)\n\t{\n\t\treturn false;\n\t}",
"@Test\r\n public void testEquals() {\r\n Articulo art = new Articulo();\r\n articuloPrueba.setCodigo(1212);\r\n art.setCodigo(1212);\r\n boolean expResult = true;\r\n boolean result = articuloPrueba.equals(art);\r\n assertEquals(expResult, result);\r\n }",
"public static boolean equals(Object obj1, Object obj2)\n {\n return obj1 == obj2;\n }",
"@Test\n public void testEquals() {\n\tSystem.out.println(\"equals\");\n\tObject obj = null;\n\tJenkinsBuild instance = new JenkinsBuild();\n\tboolean expResult = false;\n\tboolean result = instance.equals(obj);\n\tassertEquals(expResult, result);\n\tJenkinsBuild newObj = new JenkinsBuild();\n\tnewObj.setBuildNumber(0);\n\tnewObj.setSystemLoadId(\"\");\n\tnewObj.setJobName(\"\");\n\tassertEquals(expResult, instance.equals(newObj));\n }",
"@Test\n public void testEquals() {\n System.out.println(\"equals\");\n Object obj = null;\n Usuario instance = null;\n boolean expResult = false;\n boolean result = instance.equals(obj);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equals(object));\n assertTrue(\"attribute not equal to object\", object.equals(attribute));\n\n // current implementation checks only for identity\n// final Attribute clonedAttribute = (Attribute) attribute.clone();\n// assertTrue(\"attribute not equal to its clone\", attribute.equals(clonedAttribute));\n// assertTrue(\"clone not equal to attribute\", clonedAttribute.equals(attribute));\n\t}",
"public boolean isEqual(Object objectname1, Object objectname2, Class<?> voClass) {\n\t\treturn false;\n\t}"
] | [
"0.82082886",
"0.81053036",
"0.8102529",
"0.805797",
"0.803845",
"0.79782414",
"0.7974254",
"0.7951702",
"0.7944883",
"0.79212654",
"0.7883404",
"0.7871669",
"0.7850037",
"0.7850037",
"0.7847856",
"0.7840254",
"0.783657",
"0.78075737",
"0.78075737",
"0.78075737",
"0.78075737",
"0.78075737",
"0.7779299",
"0.7772217",
"0.77683574",
"0.7767295",
"0.77625155",
"0.77359986",
"0.77359986",
"0.77359986",
"0.7684809",
"0.76845956",
"0.76830757",
"0.7662403",
"0.76506853",
"0.76506853",
"0.7637069",
"0.7633593",
"0.7633593",
"0.7633593",
"0.7633593",
"0.7633593",
"0.7633593",
"0.7632055",
"0.7615247",
"0.7611091",
"0.7606386",
"0.76046026",
"0.7593695",
"0.7593367",
"0.75736535",
"0.7573021",
"0.75611025",
"0.7546437",
"0.7546437",
"0.7542063",
"0.75396955",
"0.75318265",
"0.7531445",
"0.7529347",
"0.75268465",
"0.7514898",
"0.75147665",
"0.7510303",
"0.7510303",
"0.7494594",
"0.7491007",
"0.74654245",
"0.74617636",
"0.74531806",
"0.7450845",
"0.74480724",
"0.744696",
"0.74450934",
"0.7436088",
"0.74295723",
"0.74205536",
"0.7419936",
"0.7398855",
"0.738252",
"0.7379968",
"0.7375705",
"0.7374835",
"0.7373698",
"0.7371174",
"0.7371174",
"0.7371174",
"0.7371174",
"0.7369927",
"0.735472",
"0.735472",
"0.735472",
"0.735472",
"0.7353099",
"0.7353087",
"0.73526394",
"0.7345934",
"0.73453236",
"0.73414135",
"0.73267037",
"0.7319952"
] | 0.0 | -1 |
the value by which to increment the knob The default constructor for the class | public MonteCarloVSmp()
{
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void knobGenerated( final BumpGenerator generator, final Knob knob );",
"public int getIncrement() {\n \tcheckWidget();\n \treturn increment;\n }",
"public Counter(int init){\n \tvalue = init;\n }",
"public void incValue(){\n\t\tif(this.value < 9){\n\t\t\tthis.value++;\n\t\t}\n\t\telse{\n\t\t\tthis.value = 0;\n\t\t}\n\t}",
"public double getIncrement() {\n return increment;\n }",
"public void setIncrement( final int value ) {\n checkWidget();\n if( value >= 1 && value <= maximum - minimum ) {\n increment = value;\n }\n }",
"public Counter(int val) {\r\n value = val;\r\n }",
"public void setIncrement(double increment) {\n this.increment = increment;\n }",
"public void setBikeNum(int NewValue){\n bike = NewValue;\n }",
"public Counter() {\r\n value = 0;\r\n }",
"public void increment(){\n value+=1;\n }",
"public void controllerChange(int channel, int number, int value) {\n // Here we print the controller number.\n println(number);\n // If we turn knob with id 104, draw a line\n // The vertical position of the line depends on how much we turn the knob\n if(number == 104) {\n float y = map(value, 0, 127, 0, height);\n line(0, y, width, y);\n }\n // If we turn knob with id 103, draw a circle\n // The size of the circle depends on how much we turn the knob\n if(number == 103) {\n ellipse(width/2, height/2, value*2, value*2);\n }\n}",
"public void increment() {\n\t\tif (m_bYear) {\n\t\t\tm_value++;\n\t\t\tif (m_value > 9999)\n\t\t\t\tm_value = 0;\n\t\t} else {\n\t\t\tm_value++;\n\t\t\tif (m_value > 11)\n\t\t\t\tm_value = 0;\n\n\t\t}\n\t\trepaint();\n\t}",
"private MsoSmartArtNodePosition(int value) { this.value = value; }",
"public void incQty() {\n b.qty.setText(\"\" + ++qty);\n\n }",
"private BNumericUpDown getNumStart() {\r\n\t\tif (numStart == null) {\r\n\t\t\tnumStart = new BNumericUpDown();\r\n\t\t}\r\n\t\treturn numStart;\r\n\t}",
"public void inc(){\n this.current += 1;\n }",
"public int increase() {\r\n return ++value;\r\n }",
"public OscillatorCalculator() {\n this(1);\n }",
"public Counter(int initial, String name, String comment, String date){\n value = initial;\n this.name = name;\n this.comment = comment;\n this.date = date;\n this.inital_value=initial;\n\n }",
"void set_num(ThreadContext tc, RakudoObject classHandle, double Value);",
"public void increment() { this.progressBar.setValue(++this.progressValue); }",
"@Override\n\t\tpublic void setValue(int n) {\n\t\t\tsuper.setValue(n);\n\t\t\tview.getDownpanel().getThicknessStatus().setThickness(n);\n\t\t\tview.getModel().setThickness(n);\n\t\t}",
"public Integer getIncrement() {\n return increment;\n }",
"public void IncrementCounter()\r\n {\r\n \tsetCurrentValue( currentValue.add(BigInteger.ONE)); \r\n \r\n log.debug(\"counter now: \" + currentValue.intValue() );\r\n \r\n }",
"public int getkValue() {\n return kValue;\n }",
"void setNextValue() {\n this.value = this.value * 2;\n }",
"public abstract void setCntGrnd(int cntGrnd);",
"@Override\r\n\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\tint val = Integer.parseInt(jt.getText());\r\n\t\t\tval++;\r\n\t\t\tjt.setText(val+\"\");\r\n\t\t\t\r\n\t\t}",
"public Knob(Context context, int drawable) {\r\n\t\t\tBitmapFactory.Options opts = new BitmapFactory.Options();\r\n\t\t\topts.inJustDecodeBounds = true;\r\n\t\t\timg = BitmapFactory.decodeResource(context.getResources(), drawable); \r\n\t\t}",
"void setUnitIncrement(Adjustable adj, int u);",
"public void setValue(int value);",
"public Counter(String name, Ref ref, int value) {\r\n\t\tthis.name = name;\r\n\t\tthis.value = value;\r\n\r\n\t\tsetRef(ref);\r\n\t\tbasis = ref.getTarget();\r\n\t}",
"void incrementTick();",
"public Symbol(int value)\n\t{\n\t\tthis.value = value;\n\t}",
"void onChanged(RulerWheel wheel, int oldValue, int newValue);",
"public void setUnitIncrement(int param1Int) {\n/* 730 */ this.unitIncrementSet = true;\n/* 731 */ putClientProperty(\"JScrollBar.fastWheelScrolling\", (Object)null);\n/* 732 */ super.setUnitIncrement(param1Int);\n/* */ }",
"private void control()\r\n\t\t{\n\t\tspinMin.addChangeListener(createMinListener());\r\n\t\tspinMax.addChangeListener(createMaxListener());\r\n\t\t}",
"protected void computeIncrement()\r\n\t{\r\n\t\tsuper.increment = this.userDefinedIncrement;\r\n\r\n\t\tdouble powerOfTen = Math.pow( 10, Math.abs( this.getRoundingPowerOfTen() ) );\r\n\r\n\t\t//---round the increment according to user defined power\r\n\t\tsuper.increment = super.round( super.increment, powerOfTen );\r\n\r\n\t\t//---if we round this down to zero, force it to the power of ten.\r\n\t\t//---for example, round to nearest 100, value = 35...would push down to 0 which is illegal.\r\n\t\tif( super.increment == 0 )\r\n\t\t{\r\n\t\t\tsuper.increment = powerOfTen;\r\n\t\t}\r\n\r\n\t\tsuper.setMinValue( super.round( this.userDefinedMinimum, powerOfTen ) );\r\n\t\tsuper.setMaxValue( super.getMinValue() + ( super.increment * super.getNumberOfScaleItems() ) );\r\n\r\n\t}",
"public Kicker() {\n m_kicker.configSelectedFeedbackSensor(FeedbackDevice.CTRE_MagEncoder_Relative, Constants.kPIDLoopIdx,\n Constants.kTimeoutMs);\n\n m_kicker.config_kF(0, Constants.kGains_Kicker.kF);\n m_kicker.config_kP(0, Constants.kGains_Kicker.kP);\n m_kicker.config_kI(0, Constants.kGains_Kicker.kI);\n m_kicker.config_kD(0, Constants.kGains_Kicker.kD);\n\n m_kicker.setSensorPhase(Constants.kKickerSensorPhase);\n\n m_kicker.configNominalOutputForward(0, Constants.kTimeoutMs);\n m_kicker.configNominalOutputReverse(0, Constants.kTimeoutMs);\n m_kicker.configPeakOutputForward(1, Constants.kTimeoutMs);\n m_kicker.configPeakOutputReverse(-1, Constants.kTimeoutMs);\n\n m_kicker.setInverted(Constants.kMotorInvert);\n\n }",
"public void addValue() {\n addValue(1);\n }",
"@Override\n public void valueChanged(double control_val) {\n playbackRate.setValue((float)control_val);\n // Write your DynamicControl code above this line\n }",
"public void increase() {\r\n\r\n\t\tincrease(1);\r\n\r\n\t}",
"public void setTuckNum(int NewValue){\n truck = NewValue;\n }",
"public abstract void setValue(int value);",
"public void setIncrement(Integer increment) {\n this.increment = increment;\n }",
"public void setValue(int value) {\r\n this.value = value;\r\n }",
"public void setValue(int v){\n\t\tif (colorSliderArrow.getValue() != v){\r\n\t\t\tcolorSliderArrow.setValue(v);\t\t\t\r\n\t\t}\r\n\t}",
"public myCounter(int startValue) {\n\t\tcounter = startValue;\n\t}",
"public void setThisClassQuantity() {\n quantity = spinnerValue + \" pieces\";\n }",
"public Frog() {\n frogCount += 1; // Modify the value in the constructor\n }",
"public void increase_BUIBYDryingFactor(){\r\n\tBUO=BUO+DF;\r\n}",
"public void setGrowIncrement(int inc) { growInc = inc; }",
"public Counter() {\n //this.max = max;\n }",
"public int increase()\n {\n return this.increase(1);\n }",
"public BrickControlPi() {\r\n\t}",
"public MutableInt(int newval) {\n value = newval;\n }",
"public LEDMeter() {\r\n\t\t\r\n\t\tthis(13, 100, \"LED Meter\", 50);\r\n\t}",
"public Node(int value) {\n\t\tthis.value = value;\n\t}",
"public PencilPen() {\n this(10.0);\n }",
"@Override\r\n\tprotected KDTextField getNumberCtrl() {\n\t\treturn null;\r\n\t}",
"public Builder setN(int value) {\n \n n_ = value;\n onChanged();\n return this;\n }",
"public void setCtr(Double ctr) {\r\n this.ctr = ctr;\r\n }",
"public KCard (Card.Color c, int value) {\n this.color = c;\n this.value = value;\n }",
"public void setTON(int value) {\r\n this.ton = value;\r\n }",
"void setSpinCount(long spinCount);",
"@Override\n public void onValueChanged(int i) {\n mTextViewDistance.setText(i + \" M\");\n // Delete old circle and draw the new circle with the radius given\n drawCircle(i);\n // Update the global variable RADIUS with the new value\n RADIUS = i;\n }",
"@Override\n public Integer get() {\n return ++counter;\n }",
"void setValue(int value);",
"@Override\n public void setValue (int newValue){\n super.setValue(newValue);\n updateChildesValues(newValue);\n\n }",
"public int setValue (int val);",
"public Vertex(int val)\r\n\t{\r\n\t\tthis.value=val;\r\n\t}",
"public void increment() {\n increment(1);\n }",
"public void setMuNext (int value) {\r\n Mu_next = value;\r\n }",
"@Override\n\tpublic void init() {\n\t\tcolorSpeed = new GenericKnob(0.05f, scale(50), \"Color rotate speed\");\n\t\tbassBounce = new GenericKnob(0.7f, scale(50), \"Bass Bounce\");\n\t\trequestUserControl(colorSpeed);\n\t\trequestUserControl(bassBounce);\n\t\t\n\t\t// Set up a nice jazzy gradient!\n\t\tColor purple = new Color(255, 0, 128);\n\t\tColor nightBlue = new Color(0, 14, 122);\n\t\tgradient = new RGBGradientCompoundLinear(new Color[]{Color.BLUE, purple, nightBlue, Color.BLACK, Color.BLUE}, new double[]{0.0, 0.25, 0.5, 0.75, 1.0});\n\t\t\n\t\t\n\t}",
"public Rumbler() {\n // Just a default rumble of 1 second 1 time on both joysticks.\n this(1.0, 0, 1, JoystickSelection.BOTH_JOYSTICKS, 1);\n }",
"public void setValue(int new_value){\n this.value=new_value;\n }",
"public Int(int value) { \n this.value = value; \n }",
"Myclass(){\n\t\tx+=1; //x=4 burada 4 olarak update edildi. Asagida 4 olarak kullanacagiz\n\t\tSystem.out.print(\"-x\" + x); //-x4\n\t}",
"void increase();",
"void increase();",
"public void setValue(int value)\n {\n // we have assumed value 1 for X and 10 for O\n this.value = value;\n }",
"public void setValue(int n) {\n\t\t\tthis.value = n;\n\t}",
"public void incLevel(int lvl){this.Level=this.XP/(100);}",
"public ThicknessSlider() {\n\t\t// Create a new JSlider with a vertical orientation, minimum value of 1,\n\t\t// maximum value of 20, and start value of defaultThickness\n \t\tsuper(JSlider.VERTICAL, 1, 20, defaultThickness);\n \t\t\n\t\tthis.setMajorTickSpacing(19);\n\t\tthis.setMinorTickSpacing(1);\n\t\tthis.setPaintTicks(true);\n\t\tthis.setPaintLabels(true);\n\t\tthis.setSnapToTicks(true);\n\t\tthis.setToolTipText(\"Change thickness of the brush\");\n\t\tthis.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t}",
"@Override\n\tpublic void init() {\n this.setColor(Color.PINK);\n \n\t}",
"public GoldCoin(){\r\n\t\tcoinNumber = ++totalCoin; //prefix so that coinNumber would start with 1\r\n\t}",
"public static void SetIncrement(int increment){\n\t\tm_Incrementer = increment;\n\t\tSystem.out.println(\"m_Incrementer set to: \"+ m_Incrementer);\n\t}",
"@Override\r\n\tpublic void setCurrent(double iCurrent) {\n\r\n\t}",
"public void add1() {\r\n value++;\r\n }",
"public LEDMeter(int width, int height, String caption, int value) {\r\n\r\n\t\tthis(width, height, MODEPEAK, \r\n\t\t\t DEFAULTFONTNAME, DEFAULTFONTSTYLE, DEFAULTFONTSIZE,\r\n\t\t\t caption, false, \"\", DEFAULTLABELPERCENT, value,\r\n\t\t\t true, DEFAULTNUMBEROFSECTIONS,\r\n\t\t\t PANELCOLOR, TEXTCOLOR);\r\n\t}",
"public IterativeCoordinateDemo() {\n super(true, GeodesicDisplays.R2_ONLY, LogWeightings.list());\n // ---\n spinnerTotal.setList(Arrays.asList(0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 50, 100));\n spinnerTotal.setValue(2);\n // spinnerTotal.addSpinnerListener(this::config);\n spinnerTotal.addToComponentReduced(timerFrame.jToolBar, new Dimension(50, 28), \"total\");\n // ---\n ManifoldDisplay geodesicDisplay = R2Display.INSTANCE;\n setGeodesicDisplay(geodesicDisplay);\n setBitype(Bitype.LEVERAGES1);\n actionPerformed(geodesicDisplay);\n addSpinnerListener(this);\n timerFrame.geometricComponent.addRenderInterfaceBackground(AxesRender.INSTANCE);\n }",
"public void setValue(int value)\n {\n this.value = value;\n }",
"void increaseAngle() {\n this.strokeAngle += 3;\n this.updateAcc();\n this.updateStick();\n }",
"private\tNum(int num) { value = num; }",
"private BNumericUpDown getNumEnd() {\r\n\t\tif (numEnd == null) {\r\n\t\t\tnumEnd = new BNumericUpDown();\r\n\t\t}\r\n\t\treturn numEnd;\r\n\t}",
"public myCounter() {\n\t\tcounter = 1;\n\t}",
"public IntegerProperty getControlAmplitude() {\n return this.inputAdjuster.getCurrentAmplitude();\n }",
"public void willGenerateKnob( final BumpGenerator generator, final AcceleratorNode node );",
"void setIntValue(int value)\n {\n this.value = value;\n }",
"@Override\r\n\t\t\tpublic void handle(ActionEvent event) {\n\r\n\t\t\t\tvalue[14]++;\r\n\t\t\t\tvalue[14] %= 3;\r\n\t\t\t\tif (value[14] == 0) {\r\n\t\t\t\t\tbtn[14].setText(\"0\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[14] == 1) {\r\n\t\t\t\t\tbtn[14].setText(\"1\");\r\n\t\t\t\t}\r\n\t\t\t\tif (value[14] == 2) {\r\n\t\t\t\t\tbtn[14].setText(\"X\");\r\n\t\t\t\t}\r\n\t\t\t}"
] | [
"0.67262244",
"0.60370916",
"0.60358083",
"0.602277",
"0.6009791",
"0.59807706",
"0.5968698",
"0.5929462",
"0.59098214",
"0.5856498",
"0.5855237",
"0.58505887",
"0.57971257",
"0.57068676",
"0.56971693",
"0.5689133",
"0.56844795",
"0.56828",
"0.5673492",
"0.5667592",
"0.56572425",
"0.56411785",
"0.56411296",
"0.5616759",
"0.56030744",
"0.5599004",
"0.55979055",
"0.5569144",
"0.55497116",
"0.554944",
"0.5538898",
"0.5538149",
"0.5536946",
"0.55285996",
"0.55260473",
"0.55202484",
"0.5518855",
"0.5511565",
"0.5506602",
"0.5494543",
"0.5487221",
"0.5470541",
"0.54609036",
"0.54558915",
"0.54479253",
"0.54404545",
"0.54300547",
"0.541386",
"0.5401458",
"0.54014504",
"0.54001296",
"0.5394541",
"0.5384715",
"0.5383968",
"0.5381809",
"0.5379089",
"0.5371718",
"0.5369528",
"0.5364614",
"0.53620476",
"0.53573453",
"0.5344433",
"0.5341414",
"0.5323083",
"0.53175247",
"0.5316619",
"0.53127724",
"0.5311522",
"0.5308675",
"0.53079486",
"0.5305214",
"0.53040326",
"0.53035414",
"0.5303126",
"0.53013223",
"0.5299281",
"0.52944565",
"0.5291171",
"0.529001",
"0.52868295",
"0.52868295",
"0.52867985",
"0.5286171",
"0.5284588",
"0.5280743",
"0.52788794",
"0.5278434",
"0.5278275",
"0.5277542",
"0.52773386",
"0.52612793",
"0.52585363",
"0.5256397",
"0.5255973",
"0.5249837",
"0.52422273",
"0.524153",
"0.5240807",
"0.523663",
"0.5234319",
"0.5226898"
] | 0.0 | -1 |
Main method for the program | public void main(String[] args) throws Exception
{
int V; // number of vertices for the current iteration
if(args.length != 6)
{
usage();
}
seed = Long.parseLong(args[0]);
lowerV = Integer.parseInt(args[1]);
upperV = Integer.parseInt(args[2]);
p = Double.parseDouble(args[3]);
T = Long.parseLong(args[4]);
increment = Integer.parseInt(args[5]);
// print the command line used to run this code
System.out.print("$ java pj2 MonteCarloPSeq");
for(String arg : args)
{
System.out.print(" " + arg);
}
System.out.println();
System.out.println("V\t\tAvg d");
for(int v1 = lowerV; v1 <= upperV; v1 += increment)
{
final DoubleVbl.Sum sumVbl = new DoubleVbl.Sum();
int vHold = v1;
double avg;
// do T trials in parallel
parallelFor(0, T - 1).exec(new LongLoop()
{
// Per-thread variables
ArrayList<Vertex> vertices;
Random rand;
Graph graph;
DoubleVbl.Sum thrSum;
/**
* initialize per-thread variables
*/
public void start()
{
rand = new Random(seed + rank());
graph = new Graph(rand);
thrSum = threadLocal(sumVbl);
}
/**
* Loop body
*/
public void run(long t)
{
vertices = graph.generateGraph(vHold, p);
// thrSum.reduce(new DoubleVbl((double)graph.diameter(vHold, vertices)));
thrSum.item += (double)graph.diameter(vHold, vertices);
}
});
avg = sumVbl.item / T;
System.out.println(vHold + "\t\t" + avg);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void main()\n\t{\n\t}",
"public static void main() {\n \n }",
"public static void main(){\n\t}",
"public static void main() {\n }",
"public static void main (String []args){\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main(String[] args) {\r\n \r\n }",
"public static void main (String args[]) {\n\t\t\n }",
"public static void main (String[]args) throws IOException {\n }",
"public static void main(String[] args) {\n \n\n }",
"public static void main(String[] args) {\n \n \n \n\t}",
"public static void main(String[] args){\n\t\t\n\t\t\n \t}",
"public static void main(String[] args) {\n \n \n \n \n }",
"public static void main (String[] args) {\r\n\t\t \r\n\t\t}",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t }",
"public static void main(String args[]){\n\t\t\n\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main(String[] args) {}",
"public static void main(String[] args) {}",
"public static void main(String []args){\n\n }",
"public static void main (String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\r\n// Use for unit testing\r\n }",
"public static void main (String [] args){\n\t}",
"public static void main(String[] args) {\n \r\n\t}",
"public static void main(String []args){\n }",
"public static void main(String []args){\n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[] args) {\n \n \n }",
"public static void main(String[]args) {\n\t\n\t\t\n\n}",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n }",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String args[]) throws IOException {\r\n\t\t\r\n\t}",
"static void main(String[] args)\n {\n }",
"public static void main(String args[]){\n \t\n \t\n }",
"public static void main(String args[]){\n\t\t\n\t}",
"public static void main(String[] args){\n \t\n }",
"public void main(){\n }",
"public static void main(String[] args) {\n\t \t\n\t \t\n\t}",
"public static void main(String[] args){\r\n\t\t\r\n\tSystem.out.println(\"main method(-)\");\r\n\t\r\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\t}",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public static void main(String[] args) {\n \n }",
"static void main(String[] args) {\n }",
"public static void main(String[] args)\r\t{",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args)\r\n {\n \r\n \r\n }",
"public static void main(String[] args) {\t\n\t\t\n\t}",
"public static void main(String[] args)\r\n {\r\n \r\n \r\n \r\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String[] args) throws IOException{\n\t\trunProgram();\n\t}",
"public void main(String[] args) {\n\t}",
"public static void main(String[] args) throws IOException {\n \t\n }",
"public static void main(String[] args) {\n \n\t}",
"public static void main(String[] args) {\n \n\t\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n\n\t\t\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\t\t\r\n\t}",
"public static void main (String[] args) {\n\n }",
"public static void main(String[] args) \n {\n\t \n\t \n\t \n}",
"public static void main (String[] args) {\n }",
"public static void main(String[] args){\n\t\t\r\n\t}",
"public static void main(String args[]){\n\t\t\r\n\t}",
"public static void main(String args[]) {\r\n }",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}",
"public static void main(String[] args) {\n\t\t\n\t}"
] | [
"0.8041567",
"0.79708755",
"0.7865191",
"0.777467",
"0.7710204",
"0.76813406",
"0.76813406",
"0.7661126",
"0.76543325",
"0.76535213",
"0.76462746",
"0.76346326",
"0.762552",
"0.7620088",
"0.7599436",
"0.75723624",
"0.75690097",
"0.75690097",
"0.7566402",
"0.7564669",
"0.7564669",
"0.7554005",
"0.75440717",
"0.75387555",
"0.75368154",
"0.7534266",
"0.75253445",
"0.75253445",
"0.75187236",
"0.75187236",
"0.7515798",
"0.7508951",
"0.7508951",
"0.7508951",
"0.7508951",
"0.7508951",
"0.7508951",
"0.7500169",
"0.7498883",
"0.7496153",
"0.7494691",
"0.7485963",
"0.7477546",
"0.7474335",
"0.7473391",
"0.7463776",
"0.74633664",
"0.7461613",
"0.74547154",
"0.74489945",
"0.74448323",
"0.7444528",
"0.744208",
"0.7442019",
"0.74409664",
"0.74365044",
"0.743062",
"0.7426949",
"0.7420374",
"0.7419893",
"0.7419666",
"0.74044293",
"0.74032605",
"0.74021554",
"0.7394967",
"0.73948336",
"0.73948336",
"0.73948336",
"0.73948336",
"0.73943985",
"0.73937315",
"0.73936236",
"0.7391135",
"0.73908246",
"0.73902774",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469",
"0.7388469"
] | 0.0 | -1 |
end main() Print a usage message and throw exception | private static void usage()
{
System.err.println("Usage: java pj2 MonteCarloVSmp <seed> <lowerV> <upperV> <p> <T> <increment>\n" +
"<seed> = Random seed\n" +
"<lowerV> = Lower bound of number of vertices\n" +
"<upperV> = Upper bound of number of vertices\n" +
"<p> = Edge probability\n" +
"<T> = Number of trials\n" +
"<increment> = the value by which to increment V (an integer)");
throw new IllegalArgumentException();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"final private static void usage () {\n\t\t usage_print () ;\n\t\t System.exit (0) ;\n }",
"public static void main(String[] args) throws Exception {\n if (args.length != 1) {\n usage();\n } else {\n\n }\n }",
"private static void printUsage() \r\n\t{\r\n\t\tSystem.err.println(\"Usage: java GeneBankSearch \"\r\n\t\t\t\t+ \"<0/1(no/with Cache)> <btree file> <query file> \"\r\n\t\t\t\t+ \"[<cache size>] [<debug level>]\\n\");\r\n\t\tSystem.exit(1); \r\n\t}",
"private static void printUsageExitError(){\n\t\tSystem.out.println(usage);\n\t\tSystem.exit(1);\n\t}",
"public void usageError(String msg) {\n System.err.println(\"Usage error: \" + msg + \"\\n\");\n printUsage(System.err);\n System.exit(1);\n }",
"private static void printUsageAndExit() {\n\t\t printUsageAndExit(null);\n\t\t }",
"private static void usage() {\n System.err.println(\"usage: Binomial degree(1..10)\");\n System.exit(-1);\n }",
"private static void help() {\n System.out.println(USAGE); \n System.exit(0);\n }",
"private static void printUsage() {\n\t\tSystem.out.println(errorHeader + \"Incorrect parameters\\nUsage :\"\n\t\t\t\t+ \"\\njava DaemonImpl <server>\\n With server = address of the server\"\n\t\t\t\t+ \" the DaemonImpl is executed on\");\n\t}",
"private static void printUsageAndExit() {\n printUsageAndExit(null);\n }",
"private static void usage(String argv[]) {\n\tSystem.out.println(\"Usage: java Sudoku\");\n System.exit(-1);\n }",
"void printUsage(){\n\t\tSystem.out.println(\"Usage: RefactorCalculator [prettyPrint.tsv] [tokenfile.ccfxprep] [cloneM.tsv] [lineM.tsv]\");\n\t\tSystem.out.println(\"Type -h for help.\");\n\t\tSystem.exit(1); //error\n\t}",
"public static void main(String[] args) throws Exception {\r\n\r\n\t\tthrow new Exception(\"anand\");\r\n\t\t\r\n\t}",
"private static void usage()\n {\n System.out.println(\"Lex\");\n System.exit(-1);\n }",
"private static void usage()\n {\n System.out.println(\"usage:\");\n System.out.println(\" ??? clock [-bg color] [-f fontsize] [-fg color]\");\n System.out.println(\" ??? formats\");\n System.out.println(\" ??? print [-f fmt] time\");\n System.out.println(\" ??? now [-r] [-f fmt]\");\n System.exit(1);\n }",
"public static void main(String[] args)\r\n\t{\n\t\t\r\n\t\tthrow new Test ();\r\n\t\t\r\n\t}",
"public static void usage()\r\n\t{\r\n\t\tSystem.err.println(\"Usage: java BetweennessCentrality <fileName>\\n\"\r\n\t\t\t\t+ \"<fileName> = a file in Graph File Format\");\r\n\t\tSystem.exit(0);\r\n\t}",
"private static void help() {\n\t\tHelpFormatter formater = new HelpFormatter();\n\t\tformater.printHelp(\"Main\", options);\n\t\tSystem.exit(0);\n\t}",
"public static void main(String[] args) {\n\t\tinvalidInput();\n\n\t}",
"public static void main(String[] args) throws IOException {\n\n\n\n }",
"public static void main(String[] arg) throws Exception{\n\t\t\n\t}",
"private static void doUsage() {\r\n\t\tSystem.out.println(\"Usage: SpellChecker [-i] <dictionary> <document>\\n\"\r\n\t\t\t\t+ \" -d <dictionary>\\n\" + \" -h\");\r\n\t}",
"private static void printUsage() {\n\t\tSystem.out.println(\"Usage: java UniqueUniqueChromosomeReconstructor [-h] input_file\");\n\t\tSystem.out.println(\" -h: Print usage information\");\n\t\tSystem.out.println(\" input_file: File containing input sequence data\");\n\t}",
"private static void help(){\r\n System.out.println(\"\\n\\t Something Went Wrong\\nType\\t java -jar nipunpassgen.jar -h\\t for mor info\");\r\n System.exit(0);\r\n }",
"private static void printUsage() {\r\n\t\t//TODO: print out clear usage instructions when there are problems with\r\n\t\t// any command line args\r\n\t\tSystem.out.println(\"This program expects three command-line arguments, in the following order:\"\r\n\t\t\t\t+ \"\\n -q for storing as a queue, -c for console output, and the input file name.\");\r\n\t}",
"private void displayUsage() {\r\n System.err.println(\"\\nUSAGE: java -classpath ... \" + \"DiscourseImportTool\");\r\n System.err.println(\"Option descriptions:\");\r\n System.err.println(\"\\t-h\\t usage info\");\r\n System.err.println(\"\\t-e, email\\t send email if major failure\");\r\n System.err.println(\"\\t-b\\t batchSize number of items to batch during import\");\r\n System.err.println(\"\\t-discourse\\t discourse id to run the generator on\");\r\n System.err.println(\"\\t-project\\t project id to add discourse to\");\r\n }",
"private static void usage( ) {\n System.err.\n\t println( \"Usage: java OnlineTicTacToe ipAddr ipPort(>=5000)\" );\n System.exit( -1 );\n }",
"public static void main(String... args) {\n int status;\n try {\n process(args);\n status = 0;\n } catch (IllegalArgumentException | NoSuchElementException ex) {\n printUsage(ex);\n status = 1;\n } catch (NoSuchMethodException ex) {\n log.error(\"Method not found \", ex);\n status = 2;\n } catch (Throwable ex) {\n ex.printStackTrace();\n status = 3;\n }\n System.exit(status);\n }",
"public void main(String[] args) throws IOException{\n }",
"protected static void printUsage() {\n\t}",
"private void help() {\n HelpFormatter formater = new HelpFormatter();\n\n formater.printHelp(\"Main\", options);\n System.exit(0);\n }",
"public static void main(String[] args) {\n if (args == null || args.length != 2) {\n printUsage();\n }\n }",
"public static void usage() {\n System.out.println(\"Usage: java <java-class> [-d] [-m <value>] FILENAME\");\n System.out.println(\"\\t -d \\t\\t Enable debug mode.\");\n System.out.println(\"\\t -m <value>\\t Set the maximum random value \" + \n \"to a specific integer value.\");\n System.out.println(\"\\t -n <value>\\t Set the number of iterations \" + \n \"for the test.\");\n System.out.println(\"\\n\");\n System.exit(1);\n }",
"private void help() {\n usage(0);\n }",
"public static void main(String[] args) {\n\n IllegalArgumentException illegalArgumentException = new IllegalArgumentException(\"illegal status run time\");\n System.out.println(Throwables.getStackTraceAsString(illegalArgumentException));\n }",
"public static void main(String[] args)throws Exception{\n\t}",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\talgoritmoConPosibilidadDeExcepcion();\n\t\t\tSystem.out.println(\"Estoy dentro del bloque que da error, justo despues de dar error\");\n\t\t} catch (ParseException | UnsupportedOperationException e) {\n\t\t\t// Proporciona el feedback al usuario de la aplicacion\n\t\t\tSystem.out.println(\"Ha ocurrido un error\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}",
"private static void usage() {\n System.out.println(\"Usage: java -jar ....jar [Options]\" + LINESEP + LINESEP);\n System.out.println(\"[Options]\" + LINESEP);\n System.out.println(\"-c --config\\tconfigfile\");\n System.out.println(\"-s --spectrum\\tspectrumfile\");\n System.out.println(\"-r --resultfile\\tWhere the result has to be written to.\");\n System.out.println(\"-q --sqlfile\\tWhere the query has to be written to.\");\n System.out.println(\"-p --ppm\\tThe ppm value which should be used for the spectrum.\");\n }",
"private static void printUsage() {\n System.err.println(\"\\n\\nUsage:\\n\\tAnalyzeRandomizedDB [-p] [-v] [--enzyme <enzymeName> [--mc <number_of_missed_cleavages>]] <original_DB> <randomized_DB>\");\n System.err.println(\"\\n\\tFlag significance:\\n\\t - p : print all redundant sequences\\n\\t - v : verbose output (application flow and basic statistics)\\n\");\n System.exit(1);\n }",
"public void helpByParamsError() {\n System.err.println(\"The command syntax is wrong.\");\n System.err.println(\"You can write the command in the following way:\");\n System.err.println(\"java -jar portScanner-1.5.jar ipOrElseDomain minPortRange maxPortRange [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar 127.0.0.1 0 65535 file.txt\");\n System.err.println(\"or else\");\n System.err.println(\"java -jar PortScanner-1.5.jar ipOrElseDomain [file-to-save-open-ports.txt]\");\n System.err.println(\"java -jar PortScanner-1.5.jar cloudflare.com file.txt\");\n System.err.println(\"The file is not obligatory option.\");\n System.exit(1);\n }",
"public static void errorAndExit() {\n System.out.println(\"USAGE:\");\n System.out.println(\"java MonkeySim <num_monkeys>\");\n System.out.println(\"<num_monkeys> must be a positive signed 32-bit integer\");\n System.exit(1);\n }",
"public static void main(String[] args) throws IOException {\n\r\n }",
"public static void main(String[] args) throws IOException {\n\t\t\n\t}",
"private static void printUsage(String error, CmdLineParser parser) {\n\tSystem.out.println(error);\n\tSystem.out.print(\"Usage: Main \");\n\tparser.printSingleLineUsage(System.out);\n\tSystem.out.println(\"\");\n\treturn;\n }",
"public static void main(String[] args) throws IOException, ParseException {\n\t}",
"public static void main(String[] args) throws IOException {\n }",
"public static void main(String[] args) throws IOException {\n\n }",
"public static void main(String[] args) throws IOException {\n\n }",
"private static void help() {\n HelpFormatter formater = new HelpFormatter();\n formater.printHelp(\"SGD-SVM\", options);\n System.exit(0);\n }",
"public static void printUsage(){\n \n System.out.println(\"USAGE:\\njava -jar LMB.jar inputfilename\\n\"\n + \"\\nWhere: LMB is the executable of this program\"\n + \"\\ninputfilename is a plaintext file located in the ./text/ folder\"\n + \"\\nAll output files will be created and written to the \\\"lm\\\" directory in root\");\n System.exit(1);\n \n }",
"public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"Suraj\");\n\t\t\n\t\ttry {\n\t\t\tthrow new Exception(\"Suraj Exception\");\n\t\t} catch (Exception e) {\n\t\t\t\n\t\t\te.printStackTrace();\n\t\t}\n\t\tSystem.out.println(\"Shinde\");\n\t\t\n\t\tString Exe_Flag = \"N\";\n\t\tif(Exe_Flag.equals(\"N\")) {\n\t\t\t\n\t\t\ttry {\n\t\t\t\tthrow new Exception(\"Execution flag is blank exception\");\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\t}",
"public static void main(String[] args) throws IOException {\n\r\n \r\n \r\n }",
"private void usageError(String error) {\n System.err.println(\"\\n\" + error);\n usage(-1);\n }",
"public static void main(String[] args) {\n\t\tint test = 0;\n\t\ttry{\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tif( test == 0 )\n\t\t\t\tthrow new Error(\"test\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t\tSystem.out.println(\"Hello World!\");\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException {\n\r\n\t}",
"private Main()\n {{\n System.err.println ( \"Internal error: \"+\n\t \"unexpected call to default constructor for Main.\" );\n System.exit(-127);\n }}",
"public static void main(String[] args) throws Exception {\n\t\t\n\t\t\n\n\t}",
"public static void usage () {\n System.out.println(\"Usage:\");\n System.out.println(\" i[nformation]\");\n System.out.println(\" r[egister] <course>\");\n System.out.println(\" u[nregister] <course>\");\n System.out.println(\" q[uit]\");\n }",
"private static void help() {\n System.out.println(\"usage: pgen <project name> <args>\");\n System.out.println(\"Arguments:\");\n System.out.println(\"\\t-h | -help : help menu\");\n System.out.println(\"\\t-s | -size <example file amount> : the amount of example files to create. Defaults to 2\");\n System.out.println(\"\\t-t | -template <template> : the template to use. Defaults to java_default\");\n System.out.println(\"\\t\\tValid Templates:\");\n System.out.println(\"\\t\\t\\t* java_default\");\n System.out.println(\"\\t\\t\\t* cpp_default\");\n System.out.println(\"\\t-kattis : fetches the problems from Kattis and creates a makefile and test script for them\");\n System.out.println(\"\\t-local : fetches nothing and creates empty example files\");\n System.exit(0);\n }",
"public static void main(String [] args) throws Exception{\n\t}",
"private void usage(int exitStatus) {\n System.out.println(USAGE);\n System.exit(exitStatus);\n }",
"public static void main (String[]args) throws IOException {\n }",
"public static void main(String[] args){\n try {\r\n // m.nada(0);\r\n } catch (Exception ex) {\r\n System.out.println(\"No hay error\");\r\n }\r\n }",
"public static void main(String[] args) \r\n\t{\r\n\t\tthrow e;\r\n\t}",
"final private static void usage_print () {\n\t\tSystem.out.println (NAME + ' ' + VERSION + ' ' + COPYRIGHT) ;\n\t\tSystem.out.println () ;\n\n\t\tSystem.out.println (\n\t\t \"Usage: java bcmixin.Main [<options>] <modelname> <equationname>\"\n\t\t) ;\n\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where [<options>] include any of the following:\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" -help\") ;\n\t\tSystem.out.println (\" Prints this helpful message, then exits.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\" where <modelname> means the model name that you want to work on.\") ;\n\t\tSystem.out.println () ;\n\t\tSystem.out.println (\"where <equationname> provides the equation name, which must end with .equation.\") ;\n\t\tSystem.out.println () ;\n }",
"public static void main(String[] args) throws IOException {\n\t}",
"public static void main(String[] args) throws Exception\n\t{\n\t}",
"public static void main(String[] args) throws Exception {\n }",
"public static void main(String[] args) throws Exception {\n }",
"public static void main(String[] args) throws Exception {\n }",
"public static void main(String[] args) throws Exception {\n }",
"public static void main(String[] args) throws Exception {\n }",
"public static void main(String[] args) throws Exception {\n }",
"@Test\n public void AppNoParams() {\n try{\n App.main(new String[]{});\n }catch(RuntimeException re){\n assertEquals(re.getMessage(),\"Insufficient arguments given. Needs [input file] [# processors]\");\n }\n }",
"static void usage() {\n System.out.println(\"java -jar domainchecker.jar [StartDomain] [EndDomain] [Extension]\");\n System.out.println(\"Ex: java -jar DomainChecker.jar aaaa zzzz .com .vn\");\n }",
"private static void printUsage(){\n\t\tSystem.err.println(\"USAGE : java -jar ExtractWebCamFeed <Web Cam Code> <Output File Path> <Image Count>\");\n\t\tSystem.err.println(\"Web Cam Code : \\n\\t1 : West Lawns Camera\");\n\t\tSystem.err.println(\"\\t2 : Memorial Union Camera Camera\");\n\t\tSystem.err.println(\"Output File Path : to store the path of the file ( must be .mov)\");\n\t\tSystem.err.println(\"Image Count : Specifies the length of the video \");\n\t}",
"public static void main(String[] args) throws Exception {\n\t}",
"public static void main(String[] args) throws Exception {\n\t}",
"public static void main(String[] args) throws Exception {\n\t}",
"public static void main(String[] args) {\n\r\n\t\tSystem.out.println(\"please print\");\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\n throw new NotImplementedException();\n }",
"private static void DisplayHelp() {\r\n System.out.println();\r\n System.out.println(\"Usage: Consumes messages from a topic/queue\");\r\n System.out.println();\r\n System.out.println(\" SampleConsumerJava [ < response_file ]\");\r\n System.out.println();\r\n return;\r\n }",
"private static void usage() {\n System.err.println(\"Usage: java org.apache.pdfbox.examples.pdmodel.PrintTextLocations <input-pdf>\");\n }",
"private static void usage()\n {\n System.err.println( \"Usage: java at.ac.tuwien.dbai.pdfwrap.ProcessFile [OPTIONS] <PDF file> [Text File]\\n\" +\n \" -password <password> Password to decrypt document\\n\" +\n \" -encoding <output encoding> (ISO-8859-1,UTF-16BE,UTF-16LE,...)\\n\" +\n \" -xmillum output XMIllum XML (instead of XHTML)\\n\" +\n \" -norulinglines do not process ruling lines\\n\" +\n \" -spaces split low-level segments according to spaces\\n\" +\n \" -console Send text to console instead of file\\n\" +\n \" -startPage <number> The first page to start extraction(1 based)\\n\" +\n \" -endPage <number> The last page to extract(inclusive)\\n\" +\n \" <PDF file> The PDF document to use\\n\" +\n \" [Text File] The file to write the text to\\n\"\n );\n System.exit( 1 );\n }",
"private static void help(){\n\t\tSystem.out.println(\"\\t\\tAge\\n\\tby Sayan Ghosh\\n\\n\"+\n\t\t\t\t\t\t\t\"Calculates Age of Person from Date of Birth (DD MM YYYY).\\n\"+\n\t\t\t\t\t\t\t\"Shows age in two forms:\\n\"+\n\t\t\t\t\t\t\t\t\"\\tAge in years, months, days\\n\"+\n\t\t\t\t\t\t\t\t\"\\tAge in years (as fraction)\\n\"+\n\t\t\t\t\t\t\t\"Syntax:\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age\\t\\t\\truns program and takes input\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age <dd mm yyyy>\\t\\tdirectly shows result taking dob as parameters\\n\"+\n\t\t\t\t\t\t\t\t\"\\tjava Age --help\\t\\t\\tshows this help\\n\");\n\t}",
"public static void main(String[] args) {\n\t\tcheckNumber(-1);\n\n\t\t}",
"static int printUsage() {\n\t System.out.println(\"netflix1Driver [-m <maps>] [-r <reduces>] <input> <output>\");\n\t ToolRunner.printGenericCommandUsage(System.out);\n\t return -1;\n\t }",
"public static void main(String[] args) throws Exception {\n\r\n\t}",
"public static void main(String args[]) throws Exception {\n }",
"private static void usage() {\n System.err.println(\"USAGE:\");\n System.err.println(\"\\tjava ConnectFour <HOST> <PORT> <PLAYER_NAME>\");\n System.err.println(\"\\t\\t<SERVER_HOST>: the host name or IP address of the server\");\n System.err.println(\"\\t\\t<SERVER_PORT>: the port number of the server\");\n System.err.println(\"\\t\\t<CLIENT_HOST>: the host name or IP address of the client\");\n System.err.println(\"\\t\\t<CLIENT_PORT>: the port number of the client\");\n System.err.println(\"\\t\\t<PLAYER_NAME>: the name of the player (must not include any whitespace)\");\n System.err.println(\"\\n\\t\\tExample: java ConnectFour localhost 6789 localhost 5678 Alex\");\n }",
"public static void main(String[] args) throws IOException {\n }",
"private static void usage()\n/* */ {\n/* 245 */ log.info(\"Usage: java org.apache.catalina.startup.Tool [<options>] <class> [<arguments>]\");\n/* */ }",
"public static void main(String[] args) {\n\t\ttry {\n\t\t\tExamples.ex7();\n\t\t}\n\t\t/*\n\t\t * no exception was geneated, so the catch block is skipped\n\t\t */\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"exception caught in main\");\n\t\t\tSystem.out.println(\"exception is \"+e);\n\t\t}\n\t\tSystem.out.println(\"some text in main\");\n\t\ttry {\n\t\t\tExamples.ex8();\n\t\t}\n\t\tcatch(Exception e) {\n\t\t\tSystem.out.println(\"Exception for ex8 caught\");\n\t\t\tSystem.out.println(\"exception is \"+e);\n\t\t}\n\t\t\n\t\tExamples.ex9();\n\t\t/*\n\t\t * this will compile but crash our program as ex10 produces arrayIndexOutofBoundsException\n\t\t * \n\t\t */\n\t\tExamples.ex10();\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"public static void main(String args[]) throws IOException {\r\n\t\t\r\n\t}",
"public static void main(String[] argv) throws Exception {\n\t}",
"public static void main(String[] args) {\n\t\tif (!processArguments(args)) {\n\t\t\tSystem.out.println(\"Invalid Arguments! Please try again..\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"@SuppressWarnings(\"resource\")\n\tpublic static void main(String[] args) {\n\t\t\n\t\t/*\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Lutfen yasinizi giriniz\");\n\t\tint yas = scan.nextInt();\n\t\t\n\t\tif (yas>=0) {\n\t\t\tSystem.out.println(\"Girdiginiz yas: \" + yas);\n\t\t}else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t}\n\t\t*/\n\n\t\t// Java'ya bir exception throw ettirmek için \"throw\" ve \"new\" keyword'leri kullanılır \n\t\t// Bu sekilde yazdigimizda java exception throw eder ama kodumuz da bloke olmus olur. \n\t\t// Bloke olmasını engellemek istersek kodu try - catch ile surround yapailiriz\n\t\t\n\t\t\n\t\tScanner scan = new Scanner(System.in);\n\t\tSystem.out.println(\"Lutfen yasinizi giriniz\");\n\t\tint yas = scan.nextInt();\n\t\t\n\t\ttry {\n\t\tif (yas>=0) {\n\t\t\tSystem.out.println(\"Girdiginiz yas: \" + yas);\n\t\t}else {\n\t\t\tthrow new IllegalArgumentException();\n\t\t} \n\t\t} catch(IllegalArgumentException e) {\n\t\t\te.printStackTrace();\n\t\t\t//System.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\tSystem.out.println(\"kod bloke olmamis\");\n\t\t\n\t\n\t\tscan.close();\n\t}",
"public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}",
"public static void main(String[] args){\n try {\n\t\ttest1();\n\t} catch (ParseException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t} catch (IOException e) {\n\t\t// TODO Auto-generated catch block\n\t\te.printStackTrace();\n\t} \n }"
] | [
"0.7867633",
"0.7775033",
"0.76219505",
"0.75422263",
"0.7391758",
"0.73656",
"0.7357025",
"0.73281294",
"0.73275447",
"0.7290386",
"0.7274532",
"0.7161108",
"0.70886135",
"0.7067733",
"0.7036753",
"0.70181686",
"0.6992541",
"0.6974842",
"0.69642067",
"0.6941653",
"0.6938091",
"0.69160193",
"0.69086224",
"0.6901312",
"0.6880932",
"0.68803346",
"0.6877145",
"0.6866655",
"0.68296456",
"0.68259335",
"0.6816912",
"0.68163335",
"0.68013114",
"0.67976236",
"0.6788383",
"0.6779838",
"0.6761715",
"0.6760215",
"0.673856",
"0.672867",
"0.67249906",
"0.67197347",
"0.67061204",
"0.6698158",
"0.6695656",
"0.6665481",
"0.66643345",
"0.66643345",
"0.666016",
"0.66530484",
"0.6652504",
"0.66364026",
"0.66317207",
"0.6601235",
"0.65978926",
"0.6588747",
"0.6588299",
"0.6583687",
"0.658331",
"0.65800047",
"0.6578222",
"0.6577285",
"0.6576849",
"0.65709513",
"0.6553625",
"0.65516293",
"0.6547972",
"0.65333045",
"0.65333045",
"0.65333045",
"0.65333045",
"0.65333045",
"0.65333045",
"0.652856",
"0.6526628",
"0.6521082",
"0.6520645",
"0.6520645",
"0.6520645",
"0.65201443",
"0.6519229",
"0.65080214",
"0.6504865",
"0.6496053",
"0.6494465",
"0.6494275",
"0.6488986",
"0.64868635",
"0.64835143",
"0.64779586",
"0.64771026",
"0.64755374",
"0.6466351",
"0.6462555",
"0.6447731",
"0.6443277",
"0.6443053",
"0.64425695",
"0.6440524",
"0.64261544"
] | 0.6975225 | 17 |
Get all entries from the table. | public List<MS> selectAllEntries() throws SQLException {
Connection connection = super.getDataSource().getConnection();
try {
PreparedStatement pstmt = connection
.prepareStatement("SELECT ID, NAME," + COMPONENT + ",TOTAL "
+ "FROM ROOT");
ResultSet rs = pstmt.executeQuery();
ArrayList<MS> list = new ArrayList<MS>();
while (rs.next()) {
MS ms = new MS();
ms.setId(new Integer(rs.getInt(1)));
ms.setSum(super.getSum(ms.getId()));
ms.setName(rs.getString(2));
ms.generateINumber();
ms.setMs(rs.getInt(3));
ms.setTotal(rs.getInt(4));
list.add(ms);
}
Collections.sort(list);;
return list;
} finally {
if (connection != null) {
connection.close();
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic List<Entry> getAllEntry() {\n\t\treturn entryDAO.getAllEntry();\n\t}",
"@Override\n\tpublic List<T> getAllEntry() {\n\t\treturn this.hibernateTemplate.find(\"from \"+this.classt.getName());\n\t}",
"public Cursor fetchAll() {\n\t\treturn db.query(tableName, fields, null, null, null, null, null);\n\t}",
"public Cursor fetchAllEntries() {\n return mDb.query(DATABASE_TABLE, null, null, null, null, null, null);\n }",
"@Override\n public List<T> findAll() {\n String getAllQuery = \"SELECT * FROM \" + getTableName();\n return getJdbcTemplate().query(getAllQuery,\n BeanPropertyRowMapper.newInstance(getEntityClass()));\n }",
"@Override\n public List<T> getAll() throws SQLException {\n\n return this.dao.queryForAll();\n\n }",
"public List<Row> getAllRows() {\n return this.allRows;\n }",
"public java.util.List<DataEntry> findAll();",
"public Cursor fetchAllEntries() {\n /*\n return database.query(\n DATABASE_TABLE, \n new String[] { ROWID, MAC_ADDRESS, LATITUDE, LONGITUDE, FREQUENCY, SIGNAL}, \n null,\n null, \n null,\n null, \n null);\n */\n \n // sql must NOT be ';' terminated\n String sql = \"SELECT \"+ ROWID + \", \" + MAC_ADDRESS + \", \" + LATITUDE + \", \" + LONGITUDE + \", \" \n + NETWORK_NAME + \", \" + CAPABILITIES + \", \" + FREQUENCY + \", \" + SIGNAL\n + \" FROM \" + DATABASE_TABLE;\n return database.rawQuery(sql, null);\n }",
"@Override\n\tpublic List<T> getAll() {\n\t\treturn getDao().findAll();\n\t}",
"Collection<V> getAllEntries();",
"public ArrayList<T> all() throws SQLException {\n\t\tPreparedStatement stmt = DatabaseConnection.get().prepareStatement(\"select * from \"+table_name() + order_string());\n\t\treturn where(stmt);\n\t}",
"public ArrayList<TEntity> getAll(){\n ArrayList<TEntity> list = new ArrayList<TEntity>();\n\n Cursor cursor = db.query(tableName, columns, null, null, null, null, null);\n\n cursor.moveToFirst();\n\n while (!cursor.isAfterLast()) {\n list.add(fromCursor(cursor));\n cursor.moveToNext();\n }\n\n return list;\n }",
"private HashMap<String, ArrayList<String>> getAllTableContents(String table) {\r\n return getAllTableContentsWhere(table, null, null);\r\n }",
"public Iterable<Entry<K, V>> entrySet() {\n ArrayList<Entry<K, V>> buffer = new ArrayList<>();\n for (int h = 0; h < capacity; h++)\n if (!isAvailable(h)) buffer.add(table[h]);\n return buffer;\n }",
"@Override\r\n\tpublic List<Trainee> getAll() {\n\t\treturn dao.getAll();\r\n\t}",
"public Collection<GlobalIdEntry> getAllEntries();",
"public ResultSet readAll() throws SQLException {\r\n String statement = \"SELECT * FROM appointments\";\r\n return conn.prepareStatement(statement).executeQuery();\r\n }",
"E[] getAll();",
"public static List<Address> GetAllRecordsFromTable() {\n\n return SQLite.select().from(Address.class).queryList();\n\n\n }",
"public Collection<T> getAll() throws DaoException;",
"public List selectAll() {\n\t\tList values = new ArrayList();\n\t\topen();\n\t\tCursor c = queryDB();\n\n\t\tif (c.moveToFirst()) {\n\t\t\tdo {\n\t\t\t//\tvalues.add(hydrateNewObject(c));\n\t\t\t} while (c.moveToNext());\n\t\t}\n\t\t\n\t\tc.close();\n\t\tclose();\n\t\t\n\t\treturn values;\n\t}",
"@Override\n\tpublic List<Record> getAllRecord() {\n\t\tSession session = HibernateSessionFactory.getSession();\n\t\tTransaction tx = session.beginTransaction();\n\t\ttry {\n\t\t\tlist = dao.findAll();\n\t\t\ttx.commit();\n\t\t} catch (RuntimeException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t\ttx.rollback();\n\t\t} finally {\n\t\t\tsession.close();\n\t\t}\n\n\t\treturn list;\n\t}",
"@Override\n\tpublic Stock getAllEntries(Stock tableData) {\n\t\t\n\tString sql = \"SELECT * from stockTable\";\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tprepStmt = connection.prepareStatement(sql);\n\t\t\tResultSet rs = \tprepStmt.executeQuery();\n\t\t\t\n\t\t\tint entryNumber = 0;\n\t\t\twhile(rs.next()){\n\t\t\n\t\t\t\ttableData.setHlr(rs.getInt(\"hlr\"));\n\t\t\t\ttableData.setSim(rs.getInt(\"sim\"));\n\t\t\t\ttableData.setCard(rs.getInt(\"card\"));\n\t\t\t\ttableData.setEasyLoad(rs.getInt(\"easyL\"));\n\t\t\t\ttableData.setEasyLoadReturn(rs.getInt(\"easyLR\"));\n\t\t\t\ttableData.setEasyPaisa(rs.getInt(\"easyP\"));\n\t\t\t\ttableData.setEasyPaisaReturn(rs.getInt(\"easyPR\"));\n\t\t\t\ttableData.setCash(rs.getInt(\"cash\"));\n\t\t\t}\n\t\t\tprepStmt.close();\n\t\t\t\n\t\t\treturn tableData;\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\tSystem.out.println(\"*** Error: Getting all entries of result set query not working.\");\n\t\t}\n\t\treturn tableData;\n\t\t\n\t}",
"public List<T> findAll() throws NoSQLException;",
"@Override\n\tpublic Customer[] readAll() {\n\n\t\tString selectQuery = String.format(\"SELECT * FROM %s ;\", TABLE_NAME);\n\t\tCustomer[] result = null;\n\n\t\ttry (Statement s = dbCon.createStatement()) {\n\t\t\tResultSet rS = s.executeQuery(selectQuery);\n\n\t\t\tArrayList<Customer> resultTmp = new ArrayList<Customer>();\n\n\t\t\twhile (rS.next()) {\n\t\t\t\tresultTmp.add(\tresultTmp.size(),\n\t\t\t\t\t\t\t\tnew Customer(rS.getInt(COLUMN_NAME_ID),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_FIRST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_LAST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_EMAIL),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_KNICKNAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getDate(COLUMN_NAME_BIRTHDATE).toLocalDate(),\n\t\t\t\t\t\t\t\t\t\t\trS.getDouble(COLUMN_NAME_CREDITS))\n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\trS.close();\n\n\t\t\tresult = new Customer[resultTmp.size()];\n\t\t\tresultTmp.toArray(result);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"An SQL error occured during retrieving all data from of customer table : \" + e.getMessage());\n\t\t}\n\n\t\treturn result;\n\t}",
"public Cursor getAllRowData() {\n String where = null;\n Cursor c = \tdb.query(true, DATA_TABLE, null,\n where, null, null, null, null, null);\n if (c != null) {\n c.moveToFirst();\n }\n return c;\n }",
"@Override\n\tpublic List<Order> readAll() {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT * FROM orders\");) {\n\t\t\tList<Order> orderList = new ArrayList<>();\n\t\t\twhile (resultSet.next()) {\n\t\t\t\torderList.add(modelFromResultSet(resultSet));\n\t\t\t}\n\t\t\treturn orderList;\n\t\t} catch (SQLException e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}",
"public List findAll() {\n\t\treturn dao.findAll();\r\n\t}",
"List<Bill> all() throws SQLException;",
"public void extractAllRows()\n\n\t{\n\t\topen();\n\n\t\tList<WebElement> rows= inTable(table).getRowElements();\n\t\tfor(WebElement e :rows)\n\t\t{\n\t\t\tSystem.out.println(e.getText());\n\t\t}\n\t}",
"List<T> getAll();",
"List<T> getAll();",
"List<T> getAll();",
"List<T> getAll();",
"List<T> getAll();",
"public Cursor fetchAllPreg() {\n\n return mDb.query(DATABASE_TABLE, new String[] {KEY_ROWID, KEY_TITLE, KEY_TIME,\n KEY_BODY}, null, null, null, null, null);\n }",
"@Override\n\tpublic List<Employee> queryAll() {\n\t\treturn dao.queryAll();\n\t}",
"@Override\r\n public List<Anggota> getAll() {\r\n List<Anggota> datas = new ArrayList<>();\r\n String query = \"SELECT *From Anggota\";\r\n try {\r\n\r\n PreparedStatement preparedStatement = connection.prepareStatement(query);\r\n ResultSet rs = preparedStatement.executeQuery();\r\n\r\n while (rs.next()) {\r\n Anggota anggota = new Anggota();\r\n anggota.setKdAnggota(rs.getString(1));\r\n anggota.setNmAnggota(rs.getString(2));\r\n anggota.setTelepon(rs.getString(3));\r\n anggota.setAlamat(rs.getString(4));\r\n datas.add(anggota);\r\n }\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(AnggotaDAO.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n\r\n return datas;\r\n\r\n }",
"public static Cursor selectAll(EntryDatabase instance) {\n SQLiteDatabase database = instance.getWritableDatabase();\n return database.rawQuery(\"SELECT * FROM entries\", null);\n }",
"@Override\n public List<R> getAll() {\n return onFindForList(getSession().createCriteria(entityClass).list());\n }",
"public List<T> getAll() {\n\t\treturn this.getAll(new ArrayList<String>(), false);\n\t}",
"public Object[] entrySet() {\n MyStack<Object> result = new MyStack<>();\n\n for (Object entry : this.table) {\n if (entry != null) {\n Entry<K, V> current = (Entry<K, V>) entry;\n\n while (current.hasNext()) {\n result.push(current);\n current = current.getNext();\n }\n result.push(current);\n }\n }\n return result.toArray();\n }",
"List<T> getAll() throws PersistException;",
"@Override\r\n\tpublic List<String> queryAll() {\n\t\tList<String> list = homePageDao.queryAll();\r\n\t\treturn list;\r\n\t}",
"public List<Table> selectAll() throws Exception {\n\t\treturn tableDao.selectAll();\r\n\t}",
"ArrayList<E> getAll();",
"public List<E> findAll() {\n return getDao().findAll();\n }",
"public List<Entity> getAll() {\n return entities;\n }",
"public ListIterator<T> getAllByRowsIterator() {\n\t\tAllByRowsIterator it = new AllByRowsIterator();\n\t\treturn it;\n\t}",
"public List<Employee> getAll() throws SQLException {\n Session session = currentSession();\n Transaction transaction = session.beginTransaction();\n List<Employee> list = session.createQuery(\"from Employee\",\n Employee.class).list();\n transaction.commit();\n session.close();\n return list;\n }",
"List fetchAll() throws AdaptorException ;",
"public static List<SqlRow> findAll() {\n\n try{\n List<SqlRow> queryFindAll = Ebean.createSqlQuery(\"SELECT * FROM pub_infoapi;\")\n .findList();\n return queryFindAll;\n }catch(Exception e){\n e.printStackTrace();\n return null;\n }\n }",
"public List<T> list()\n\t{\n\t\tfinal List<T> list = this.dao.findAll();\n\t\treturn list;\n\t}",
"public List<LeagueTableEntry> getTableEntries() {\n\t\treturn entries;\n\t}",
"public List<Registro> findAll() {\n SQLiteDatabase db = banco.getReadableDatabase();\n try {\n\n Cursor c = db.query(TABELA, null, null, null, null, null, null, null);\n\n return toList(c);\n } finally {\n db.close();\n }\n }",
"List<T> obtenerAll();",
"public List<Aflevering> readAll() {\n List<Aflevering> lijst = new ArrayList<>();\n try {\n ResultSet rs = sqlConnection.executeSql(\"SELECT * FROM AFLEVERING\");\n while(rs.next()) {\n lijst.add(new Aflevering(rs.getString(\"ID\"),\n rs.getString(\"Serie\"),\n rs.getString(\"Seizoen\"),\n rs.getString(\"Titel\"),\n rs.getString(\"Tijdsduur\")));\n }\n }\n catch(Exception e) {\n System.out.println(e);\n }\n return lijst;\n }",
"@Override\n\tpublic List<TblMulitData> getAll() {\n\t\treturn null;\n\t}",
"public Cursor getAllRows(){\n Cursor cursor = database.query(dbHelper.TABLE_USERS,allColumns,null,null,null,null,null);\n if (cursor != null){\n cursor.moveToNext();\n }\n return cursor;\n }",
"@SuppressWarnings({ \"unchecked\", \"static-access\" })\n\t@Override\n\t/**\n\t * Leo todos los empleados.\n\t */\n\tpublic List<Employees> readAll() {\n\t\tList<Employees> ls = null;\n\n\t\tls = ((SQLQuery) sm.obtenerSesionNueva().createQuery(\n\t\t\t\tInstruccionesSQL.CONSULTAR_TODOS)).addEntity(Employees.class)\n\t\t\t\t.list();// no creo que funcione, revisar\n\n\t\treturn ls;\n\t}",
"@Override\n\tpublic List<Employee> getAll() {\n\t\tList<Employee> list =null;\n\t\tEmployeeDAO employeeDAO = DAOFactory.getEmployeeDAO();\n\t\ttry {\n\t\t\tlist=employeeDAO.getAll();\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn list;\n\t}",
"@Override\n\tpublic List<Empresa> getAll() {\n\t\treturn empresaJpaRepository.findAll();\n\t}",
"public Cursor getAllData(String table){\n return db.rawQuery(\"SELECT * FROM \" + table, null);\n }",
"public CompletableFuture<Iterable<T>> findAll() {\n\t\treturn this.getAll().thenApply((ts) -> (Iterable<T>) ts);\n\t}",
"@Override\n\tpublic List<Generator> getAll() {\n\n\t\tList<Generator> result = new ArrayList<>();\n\n\t\ttry (Connection c = context.getConnection(); \n\t\t\tStatement stmt = c.createStatement()) {\n\n\t\t\tResultSet rs = stmt.executeQuery(getAllQuery);\n\n\t\t\twhile (rs.next()) {\n \tGenerator generator = new Generator(\n \t\trs.getInt(1),\n \t\trs.getString(2),\n \t\trs.getString(3),\n \t\trs.getInt(4),\n \t\trs.getInt(5),\n \t\trs.getInt(6)\n \t);\n\t\t\t\tresult.add(generator);\n\t\t\t}\n\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn result;\n\t\t}\n\t\treturn result;\n\n\t}",
"@SuppressWarnings(\"rawtypes\")\n\tpublic List<Census> retrieveAll()\n\t{\n\t\t\n\t\topen();\n\t\tList<Census> list=new LinkedList<Census>();\n\t\ttry\n\t\t{\n\t\t\tQuery query=DB.query();\n\t\t\tquery.constrain(Census.class);\n\t\t\t\n\t\t\tObjectSet result =query.execute();\n\t\t\t\n\t\t\twhile(result.hasNext())\n\t\t\t{\n\t\t\t\tlist.add((Census)result.next());\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tclose();\n\t\t}\n\t\t\n\t\t\n\t\treturn list;\n\t}",
"public ArrayList<HashMap<String, String>> retrieve(String tableName) {\n\n //GET Qualifiing Rows from DB\n select(tableName);\n\n return this.processRetrieve();\n }",
"public Cursor getAllData() {\n\n SQLiteDatabase db = this.getWritableDatabase();\n Cursor res = db.rawQuery(\"Select * from \" + TABLE_NAME, null);\n return res;\n }",
"public ResultSet fetchSelectAllUsers() {\r\n\t\ttry {\r\n\t\t\t/**\r\n\t\t\t*\tTo create connection to the DataBase\r\n\t\t\t*/\r\n\t\t\tnew DbConnection();\r\n\t\t\t/**\r\n\t\t\t*\tStore the table data in ResultSet rs and then return it\r\n\t\t\t*/\r\n\t\t\trs = stmt.executeQuery(SELECT_ALL_USERS_QUERY);\r\n\t\t} catch(SQLException SqlExcep) {\r\n\t\t\tSqlExcep.printStackTrace();\r\n\t\t} catch(ClassNotFoundException cnfExecp) {\r\n\t\t\tcnfExecp.printStackTrace();\r\n\t\t} finally {\r\n\t\t\t/*try {\r\n\t\t\t\tcloseDbConnection();\r\n\t\t\t} catch(SQLException SqlExcep) {\r\n\t\t\t\tSqlExcep.printStackTrace();\r\n\t\t\t}*/\r\n\t\t}\r\n\t\treturn rs;\r\n\t}",
"@Override\n\t\t\tpublic List<TestEntity> fetchAll() \n\t\t\t{\n\t\t\t\tList<TestEntity> tests = testDao.findAll();\n\t\t\t\treturn tests;\n\t\t\t}",
"@Override\r\n\tpublic List<T> findAll() {\n\t\treturn getSession().createQuery(\r\n\t\t\t\t\"FROM \"+clazz.getSimpleName())\r\n\t\t\t\t.list();\r\n\t}",
"public List<Item> getAll() {\r\n List<Item> list = new ArrayList<Item>();\r\n //Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n //trans = session.beginTransaction();\r\n\r\n list = session.createQuery(\"from Item\").list();\r\n\r\n //trans.commit();\r\n } catch (HibernateException e) {\r\n //if (trans != null) { trans.rollback(); }\r\n e.printStackTrace();\r\n } finally {\r\n //session.flush();\r\n session.close();\r\n }\r\n return list;\r\n }",
"@Override\r\n\tpublic List<EmployeeBean> getAllData() {\n\r\n\t\tEntityManager manager = entityManagerFactory.createEntityManager();\r\n\r\n\t\tString query = \"from EmployeeBean\";\r\n\r\n\t\tjavax.persistence.Query query2 = manager.createQuery(query);\r\n\r\n\t\tList<EmployeeBean> list = query2.getResultList();\r\n\t\tif (list != null) {\r\n\t\t\treturn list;\r\n\t\t} else {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"@Transactional(readOnly = true)\n\t@Override\n\tpublic List<T> findAll() {\n\t\treturn (List<T>) registroDao.findAll();\n\t}",
"@Override\n\tpublic List<SocialInsuranceRecord> selectAll() {\n\t\treturn dao.selectAll();\n\t}",
"public List<T> findAll() {\n\t Query q = getEntityManager().createQuery(\"select u from \" + getEntityClass().getSimpleName() + \" u\");\n\t return q.getResultList();\n\t }",
"@Override\n\tpublic List<Trainee> getAll() {\n\t\tQuery q=em.createQuery(\"select m from Trainee m\");\n\t\tList<Trainee> l=q.getResultList();\n\t\treturn l;\n\t}",
"public Cursor fetchAll() {\n\t\tCursor cursor = db.query(UserConstants.DB_TABLE, UserConstants.fields(), null, null, null, null, null);\n\t\treturn cursor;\n\t}",
"public List<Table> selectAll_en() throws Exception {\n\t\treturn tableDao.selectAll_en();\r\n\t}",
"@NonNull\n Collection<TObj> getAll() {\n Collection<TObj> result = new LinkedList<>();\n for (int countR = mData.size(), i = 0; i < countR; i++) {\n int rowKey = mData.keyAt(i);\n SparseArrayCompat<TObj> columns = mData.get(rowKey);\n for (int countC = columns.size(), j = 0; j < countC; j++) {\n int key = columns.keyAt(j);\n result.add(columns.get(key));\n }\n }\n return result;\n }",
"public static ArrayList<JournalEntry> readAllEntries() {\n // TODO: Why isn't it grabbing all entries\n final ArrayList<JournalEntry> resultList = new ArrayList<>();\n\n final String result = NetworkAdapter.httpRequest(READ_ALL_URL);\n try {\n JSONObject topJson = new JSONObject(result);\n for (Iterator<String> it = topJson.keys(); it.hasNext(); ) {\n String key = it.next();\n try {\n final JSONObject jsonEntry = topJson.getJSONObject(key);\n int date = jsonEntry.getInt(\"date\");\n int dayRating = jsonEntry.getInt(\"day_rating\");\n String entryText = jsonEntry.getString(\"entry_text\");\n String image = jsonEntry.getString(\"image\");\n String cacheId = null;\n try {\n cacheId = jsonEntry.getString(\"cache_id\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n String id = key;\n\n final JournalEntry entry = new JournalEntry(\n date,\n entryText,\n image,\n dayRating,\n id);\n entry.setCacheId(cacheId);\n resultList.add(\n entry);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n Log.i(TAG, \"Finished parsing all entries\");\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n\n return resultList;\n }",
"@Override\n\tpublic List<Map<String, Object>> readAll() {\n\t\treturn rolDao.readAll();\n\t}",
"public List<TimesheetRow> getAllTimesheetRows(){\n\t\treturn service.getAllTimesheetRows();\n\t}",
"@SuppressWarnings(\"unchecked\")\n\tpublic List<DbLotniskoEntity> getAll() {\n \tList<DbLotniskoEntity> airports = (List<DbLotniskoEntity>)getSession().createQuery(\"from kiwi.models.DbLotniskoEntity\").list();\n\n \treturn airports;\n }",
"public Cursor getAllRowsMain() {\n String where = null;\n Cursor c = db.query(true, MAIN_TABLE_NAME, ALL_KEYS_MAIN,\n where, null, null, null, null, null);\n if (c != null) {\n c.moveToFirst();\n }\n return c;\n }",
"@Override\r\n\tpublic ArrayList<Activitat> getAll() {\r\n\t\tint i = 0;\r\n\t\tqueryString = \"SELECT * FROM \" + ACTIVITATTABLENAME;\r\n\t\tArrayList<Activitat> llistaActivitats = null;\r\n\t\ttry {\r\n\t\t\ts = conexio.prepareStatement(queryString);\r\n\t\t\tResultSet rs = s.executeQuery();\r\n\t\t\tllistaActivitats = new ArrayList<Activitat>();\r\n\t\t\tActivitatFactory af = af = new ActivitatFactory();\r\n\t\t\twhile(rs.next()){\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\tCalendar cal = new GregorianCalendar();\r\n\t\t\t\tcal.setTime(rs.getDate(4));\r\n\t\t\t\t\r\n\t\t\t\tllistaActivitats.add(af.creaActivitat(rs.getString(2), rs.getString(3), cal, rs.getTimestamp(5),rs.getString(6),rs.getBoolean(7)));\r\n\t\t\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn llistaActivitats;\r\n\t}",
"public LiveData<List<PersonEntity>> getAllEntries() {\n return allPersonEntries;\n }",
"public Cursor getAllRows(String tableName) {\n Cursor c = db.rawQuery(\"SELECT * FROM [\"+tableName.replaceAll(\"\\\\s\", \"_\")+\"]\", null);\n if (c != null) {\n c.moveToFirst();\n }\n return c;\n }",
"public Cursor getAllFromTable(String tableName) {\n SQLiteDatabase db = dbHelper.getDatabase();\n db.beginTransaction();\n Cursor cursor = db.query(tableName, getProjection(tableName), null, null, null, null, null);\n db.endTransaction();\n return cursor;\n }",
"@SuppressWarnings(\"unchecked\")\n public List<T> retrieveAll() throws DAOException {\n String queryString = \"select e from \"\n + entityBeanType.getCanonicalName() + \" as e\"\n + \" where e.deleted is null or e.deleted = false\";\n Query query = Helper.checkEntityManager(entityManager).createQuery(\n queryString);\n\n try {\n // Involves an unchecked conversion:\n return query.getResultList();\n } catch (Exception e) {\n throw new DAOException(\"Failed to get all entities.\", e);\n }\n }",
"public static List<CentroDeCusto> readAll() {\n Query query = HibernateUtil.getSession().createQuery(\"FROM CentroDeCusto\");\n return query.list();\n }",
"public ResultSet getRecords(String table)\n\t{\n\t\tResultSet rs = null;\n\t\trs = source.select(\"select * from \" + table);\n\t\treturn rs;\n\t}",
"public Ruta[] findAll() throws RutaDaoException;",
"@Override\r\n\tpublic ArrayList<Board1> getAll() {\n\t\treturn dao.selectAll();\r\n\t}",
"public List<T> selectAll() {\n Logger logger = getLogger();\n List<T> objectList = new ArrayList<>();\n try (Connection connection = getConnection();\n PreparedStatement preparedStatement = connection.prepareStatement(getSelectAll())) {\n\n logger.info(\"Executing statement: \" + preparedStatement);\n ResultSet rs = preparedStatement.executeQuery();\n\n while (rs.next()) {\n T object = setObjectParams(rs);\n setObjectId(rs, object);\n objectList.add(object);\n }\n } catch (SQLException e) {\n logger.error(e.getMessage());\n }\n logger.info(\"Select all: success\");\n return objectList;\n }",
"@Override\n\tpublic List<finalDataBean> findAll() throws Exception {\n\t\treturn this.dao.findAll();\n\t}",
"@Override\r\n\tpublic List<Order> readAll() {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();\r\n\t\t\t\tResultSet resultSet = statement.executeQuery(\"SELECT o.customer_id, oi.order_id, \"\r\n\t\t\t\t\t\t+ \"GROUP_CONCAT(i.item_id, ',', i.name, ',', i.value, ',', oi.quantity SEPARATOR ';') items \"\r\n\t\t\t\t\t\t+ \"FROM orders o \"\r\n\t\t\t\t\t\t+ \"INNER JOIN orders_items oi \"\r\n\t\t\t\t\t\t+ \"ON o.order_id = oi.order_id \"\r\n\t\t\t\t\t\t+ \"INNER JOIN items i \"\r\n\t\t\t\t\t\t+ \"ON oi.item_id = i.item_id \"\r\n\t\t\t\t\t\t+ \"GROUP BY oi.order_id\");) {\r\n\t\t\tList<Order> orders = new ArrayList<>();\r\n\t\t\twhile (resultSet.next()) {\r\n\t\t\t\torders.add(modelFromResultSet(resultSet));\r\n\t\t\t}\r\n\t\t\treturn orders;\r\n\t\t} catch (SQLException e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn new ArrayList<>();\r\n\t}",
"public List<Item> getAll()\r\n {\r\n\r\n CriteriaQuery<Item> criteria = this.entityManager\r\n .getCriteriaBuilder().createQuery(Item.class);\r\n return this.entityManager.createQuery(\r\n criteria.select(criteria.from(Item.class))).getResultList();\r\n }",
"public Cliente[] findAll() throws ClienteDaoException;",
"public List findall() {\r\n log.debug(\"TwitterAccountHibernateDAO.findall\");\r\n List<T> t = find().list();\r\n \r\n return t;\r\n }"
] | [
"0.7566653",
"0.7400446",
"0.73344827",
"0.7304944",
"0.72851527",
"0.7254693",
"0.7155512",
"0.7154065",
"0.71352243",
"0.7066476",
"0.702403",
"0.70038915",
"0.6997071",
"0.6892584",
"0.6887235",
"0.6864706",
"0.6799774",
"0.67928153",
"0.67833924",
"0.67824143",
"0.6779799",
"0.6764381",
"0.6724935",
"0.6712439",
"0.6667861",
"0.6631538",
"0.6616295",
"0.66157514",
"0.6608209",
"0.658446",
"0.6522183",
"0.65166914",
"0.65166914",
"0.65166914",
"0.65166914",
"0.65166914",
"0.6500633",
"0.6496795",
"0.6484151",
"0.64830476",
"0.64763415",
"0.6475271",
"0.64746493",
"0.6445387",
"0.64423996",
"0.6422899",
"0.6412834",
"0.6402634",
"0.64012086",
"0.6396399",
"0.63866997",
"0.6381041",
"0.63649404",
"0.63635296",
"0.63580287",
"0.632864",
"0.6320073",
"0.6313893",
"0.6310294",
"0.6307226",
"0.6305337",
"0.63016945",
"0.6296177",
"0.6294786",
"0.6288679",
"0.6271375",
"0.62692773",
"0.62692165",
"0.62667024",
"0.62654096",
"0.62643045",
"0.62608266",
"0.6258774",
"0.6255196",
"0.62547356",
"0.62532645",
"0.624774",
"0.62475336",
"0.6246135",
"0.6243719",
"0.6240132",
"0.62375647",
"0.6229436",
"0.6223326",
"0.621582",
"0.62120473",
"0.6210016",
"0.62097657",
"0.6209308",
"0.6208265",
"0.6195477",
"0.6193773",
"0.6192494",
"0.61892873",
"0.61882764",
"0.6187792",
"0.6184446",
"0.61840117",
"0.6179902",
"0.61749053",
"0.6170918"
] | 0.0 | -1 |
copies an input stream into an array of bytes | protected byte[] stream2blob(InputStream is) throws IOException, IllegalArgumentException {
return StreamUtils.stream2blob(is);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static byte[] copyToByteArray(InputStream in) throws IOException {\n if (in == null) throw new IllegalArgumentException(\"No InputStream specified\");\n ByteArrayOutputStream out = new ByteArrayOutputStream(BUFFER_SIZE);\n copy(in, out);\n return out.toByteArray();\n }",
"private static byte[] readBytes(InputStream input, int length) throws IOException {\n\n int count = 0;\n byte[] buffer = new byte[length];\n\n while (count < length) count += input.read(buffer, count, length - count);\n\n return buffer;\n }",
"private static byte[] streamToBytes(InputStream in, int length)\n\t\t\tthrows IOException {\n\t\tbyte[] bytes = new byte[length];\n\t\tint count;\n\t\tint pos = 0;\n\t\twhile (pos < length\n\t\t\t\t&& ((count = in.read(bytes, pos, length - pos)) != -1)) {\n\t\t\tpos += count;\n\t\t}\n\t\tif (pos != length) {\n\t\t\tthrow new IOException(\"Expected \" + length + \" bytes, read \" + pos\n\t\t\t\t\t+ \" bytes\");\n\t\t}\n\t\treturn bytes;\n\t}",
"static byte[] streamToBytes(final InputStream in) throws IOException {\n return streamToBytes(in, new byte[7]);\n }",
"public InputStreamToByteArray(byte buf[]) {\n this(buf, 0, buf.length);\n }",
"public static byte[] writeToByteArray(InputStream is) throws IOException {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n byte[] buf = new byte[BUFFER_SIZE];\n int count = -1;\n while (is.available() > 0) {\n count = is.read(buf);\n os.write(buf, 0, count);\n }\n os.close();\n return os.toByteArray();\n }",
"private static byte[] getDataFromInputStream(final InputStream input) throws IOException {\r\n if (input == null) {\r\n return new byte[0];\r\n }\r\n int nBytes = 0;\r\n final byte[] buffer = new byte[BUFFER_SIZE];\r\n final ByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n while ((nBytes = input.read(buffer)) != -1) {\r\n baos.write(buffer, 0, nBytes);\r\n }\r\n return baos.toByteArray();\r\n }",
"public static byte[] toByteArray(final InputStream input) throws IOException {\n final ByteArrayOutputStream output = new ByteArrayOutputStream();\n copy(input, output);\n return output.toByteArray();\n }",
"public static byte[] readBytes(InputStream in) throws IOException\n\t{\n\t\tbyte[] buffer = new byte[8192];\n\t int bytesRead;\n\t ByteArrayOutputStream output = new ByteArrayOutputStream();\n\t while ((bytesRead = in.read(buffer)) != -1)\n\t {\n\t output.write(buffer, 0, bytesRead);\n\t }\n\t return output.toByteArray();\n\t}",
"public static byte[] inputStreamToBytes(InputStream in) {\r\n ByteArrayOutputStream out = new ByteArrayOutputStream();\r\n try {\r\n byte[] buffer = new byte[1024];\r\n int len;\r\n while ((len = in.read(buffer)) != -1) {\r\n out.write(buffer, 0, len);\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Error converting InputStream to byte[]: \"\r\n + e.getMessage());\r\n }\r\n return out.toByteArray();\r\n }",
"public static byte[] getBytesFromInputStream(InputStream is) throws IOException\n {\n ByteArrayOutputStream os = new ByteArrayOutputStream();\n byte[] buffer = new byte[0xFFFF];\n\n for (int len; (len = is.read(buffer)) != -1;)\n os.write(buffer, 0, len);\n\n os.flush();\n\n is.reset();\n return os.toByteArray();\n }",
"public static byte[] toByteArray(InputStream in) throws IOException {\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n copy(in, out);\n return out.toByteArray();\n }",
"public static byte[] dumpInputStream(InputStream instream) \n throws IOException {\n int lastindex = 0;\n int increment;\n byte[] A = new byte[2048];\n byte[] B;\n do {\n B = new byte[2*A.length];\n System.arraycopy(A, 0, B, 0, A.length);\n A = B;\n try {\n increment = instream.read(A, lastindex, A.length - lastindex);\n } catch (IOException e) {\n throw e;\n }\n if (increment == -1)\n /* EOF, no characters read */\n break;\n lastindex += increment;\n } while (lastindex >= A.length);\n\n /* copy A into B of precisely correct length */\n B = new byte[lastindex];\n System.arraycopy(A, 0, B, 0, B.length);\n return B;\n }",
"public static byte[] toByteArray(InputStream is) throws IOException {\r\n\t\tByteArrayOutputStream baos = new ByteArrayOutputStream();\r\n\t\tint reads = is.read();\r\n\r\n\t\twhile (reads != -1) {\r\n\t\t\tbaos.write(reads);\r\n\t\t\treads = is.read();\r\n\t\t}\r\n\r\n\t\treturn baos.toByteArray();\r\n\t}",
"public static byte[] inputToBytes(InputStream input) {\n try {\n return IOUtils.toByteArray(input);\n } catch (IOException e) {\n return null;\n }\n }",
"public static byte[] readBytes(InputStream is) throws IOException {\n ByteArrayOutputStream baos = null;\n try {\n baos = new ByteArrayOutputStream();\n int read = 0;\n byte[] buffer = new byte[BUFFER_SIZE];\n while ((read = is.read(buffer)) > 0) {\n baos.write(buffer, 0, read);\n }\n return baos.toByteArray();\n } finally {\n close(is);\n close(baos);\n }\n }",
"byte[] readBytes();",
"public static byte[] decodeToBytes(InputStream in) throws IOException {\n\t\tByteArrayOutputStream out = new ByteArrayOutputStream();\n\t\tdecode(in, out, false);\n\t\treturn out.toByteArray();\n\t}",
"@SuppressWarnings({\"all\"})\n public static byte[] read2Byte(InputStream is) {\n int read = -1;\n int total = -1;\n byte[] data = null;\n if (is != null) {\n try {\n total = is.available();\n data = new byte[total];\n read = is.read(data);\n } catch (Exception e) {\n logger.warn(\"read to byte[] meet an exception\", e);\n }\n }\n return data;\n }",
"public static byte[] toByteArray(final InputStream input, final int size) throws IOException {\n if (size < 0) {\n throw new IllegalArgumentException(\"Size must be equal or greater than zero: \" + size);\n }\n\n if (size == 0) {\n return new byte[0];\n }\n\n final byte[] data = new byte[size];\n int offset = 0;\n int readed;\n\n while (offset < size && (readed = input.read(data, offset, size - offset)) != EOF) {\n offset += readed;\n }\n\n if (offset != size) {\n throw new IOException(\"Unexpected readed size. current: \" + offset + \", excepted: \" + size);\n }\n\n return data;\n }",
"protected byte[] bytesFromInputStream (java.io.InputStream stream) {\n\tbyte[] rawBytes = null;\n\tint rawBytesLength = 0;\n\n\ttry {\n\t\tint bytesRead = 0;\n\t\tjava.util.Vector byteBuffers = new java.util.Vector();\n\t\tjava.util.Vector byteBufferLengths = new java.util.Vector();\n\t\twhile (bytesRead != -1) {\n\t\t\tbyte[] nextRawBytes = new byte[2000];\n\t\t\tbytesRead = stream.read(nextRawBytes);\n\t\t\tif (bytesRead > 0) {\n\t\t\t\trawBytesLength += bytesRead;\n\t\t\t\tbyteBuffers.addElement(nextRawBytes);\n\t\t\t\tbyteBufferLengths.addElement(new Integer(bytesRead));\n\t\t\t}\n\t\t}\n\n\t\tif (rawBytesLength > 0) {\n\t\t\trawBytes = new byte[rawBytesLength];\n\t\t\tint rawBytesPosition = 0;\n\t\t\tint byteBufferCount = byteBuffers.size();\n\t\t\tfor (int i = 0; i < byteBufferCount; i++) {\n\t\t\t\tbyte[] bytes = (byte[])byteBuffers.elementAt(i);\n\t\t\t\tbytesRead = ((Integer)byteBufferLengths.elementAt(i)).intValue();\n\t\t\t\tfor (int j = 0; j < bytesRead; j++)\n\t\t\t\t\trawBytes[rawBytesPosition + j] = bytes[j];\n\t\t\t\trawBytesPosition += bytesRead;\n\t\t\t}\n\t\t}\n\t}\n\tcatch (java.io.IOException exc) {\n\t\tRuntimeException rtExc = new RuntimeException(exc.getMessage());\n\t\trtExc.fillInStackTrace();\n\t\tthrow rtExc;\n\t}\n\t\n\treturn rawBytes;\n}",
"public static byte[] readBytes(InputStream inputStream) throws IOException {\n // this dynamically extends to take the bytes you read\n ByteArrayOutputStream byteBuffer = new ByteArrayOutputStream();\n\n // this is storage overwritten on each iteration with bytes\n int bufferSize = 1024;\n byte[] buffer = new byte[bufferSize];\n\n // we need to know how may bytes were read to write them to the byteBuffer\n int len = 0;\n while ((len = inputStream.read(buffer)) != -1) {\n byteBuffer.write(buffer, 0, len);\n }\n\n // and then we can return your byte array.\n return byteBuffer.toByteArray();\n }",
"private synchronized byte[] mReadBytes(InputStream oInput){\n nDataRcvd= nBytesAvailable(oInput);\n if (nDataRcvd==0)\n return null;\n byte[] buffer = new byte[nDataRcvd];\n try {\n nDataRcvd=oInput.read(buffer); //Read is a blocking operation\n } catch (IOException e) {\n e.printStackTrace();\n buffer= null;\n }\n return buffer;\n }",
"private byte[] readBuffer( DataInputStream in ) throws IOException{\n String factory = in.readUTF();\n int count = in.readInt();\n \n ByteArrayOutputStream out = new ByteArrayOutputStream( factory.length()*4 + 4 + count );\n DataOutputStream dout = new DataOutputStream( out );\n \n dout.writeUTF( factory );\n dout.writeInt( count );\n \n for( int i = 0; i < count; i++ ){\n int read = in.read();\n if( read == -1 )\n throw new EOFException( \"unexpectetly reached end of file\" );\n dout.write( read );\n }\n \n dout.close();\n return out.toByteArray();\n }",
"public static byte[] readAll(InputStream is) {\n\t\treturn readAll(is, 1024);\n\t}",
"static protected byte[] readContent( InputStream in )\n \t{\n \t\tBufferedInputStream bin = in instanceof BufferedInputStream\n \t\t\t\t? (BufferedInputStream) in\n \t\t\t\t: new BufferedInputStream( in );\n \t\tByteArrayOutputStream out = new ByteArrayOutputStream( 1024 );\n \t\tbyte[] buffer = new byte[1024];\n \t\tint readSize = 0;\n \t\ttry\n \t\t{\n \t\t\treadSize = bin.read( buffer );\n \t\t\twhile ( readSize != -1 )\n \t\t\t{\n \t\t\t\tout.write( buffer, 0, readSize );\n \t\t\t\treadSize = bin.read( buffer );\n \t\t\t}\n \t\t}\n \t\tcatch ( IOException ex )\n \t\t{\n \t\t\tlogger.log( Level.SEVERE, ex.getMessage( ), ex );\n \t\t}\n \t\treturn out.toByteArray( );\n \t}",
"public static byte[] toBytes(InputStream inputStream) {\n ByteArrayOutputStream outputStream = new ByteArrayOutputStream();\n try {\n fastCopy(inputStream, outputStream);\n return outputStream.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n outputStream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n return null;\n }",
"public byte[] readBytes() throws IOException {\n int length = in.readInt();\n byte[] bytes = new byte[length];\n in.readFully(bytes);\n return bytes;\n }",
"private static void copy(InputStream in, OutputStream out) throws IOException {\n byte[] buffer = new byte[4096];\n while (true) {\n int bytesRead = in.read(buffer);\n if (bytesRead < 0) {\n break;\n }\n out.write(buffer, 0, bytesRead);\n }\n }",
"static public byte[] getBytes(InputStream stream) throws IOException {\n if (stream instanceof BytesGetter) {\n BytesGetter buffer = (BytesGetter) stream;\n return buffer.getBytes();\n } else {\n try (InputStreamToByteArray in = new InputStreamToByteArray(stream)) {\n return in.getBytes();\n }\n }\n }",
"public static byte[] readBytes(InputStream in, int len, boolean isLE)\r\n throws IOException\r\n {\r\n if (len == 0)\r\n {\r\n return new byte[0];\r\n }\r\n byte[] bytes = new byte[len];\r\n int rlen = in.read(bytes);\r\n if (rlen != len)\r\n {\r\n throw new IOException(\"readBytes length is not match.\" + len\r\n + \" which is \" + rlen);\r\n }\r\n if (isLE)\r\n {\r\n bytes = reverseBytes(bytes);\r\n }\r\n return bytes;\r\n }",
"public void copyBytes(DataInput input, long numBytes) throws IOException {\n\t\tassert numBytes >= 0 : \"numBytes=\" + numBytes;\n\t\tlong left = numBytes;\n\t\tif (copyBuffer == null)\n\t\t\tcopyBuffer = new byte[COPY_BUFFER_SIZE];\n\t\twhile (left > 0) {\n\t\t\tfinal int toCopy;\n\t\t\tif (left > COPY_BUFFER_SIZE)\n\t\t\t\ttoCopy = COPY_BUFFER_SIZE;\n\t\t\telse\n\t\t\t\ttoCopy = (int) left;\n\t\t\tinput.readBytes(copyBuffer, 0, toCopy);\n\t\t\twriteBytes(copyBuffer, 0, toCopy);\n\t\t\tleft -= toCopy;\n\t\t}\n\t}",
"static byte[] m61444b(InputStream inputStream) throws IOException {\n ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n byte[] bArr = new byte[4096];\n while (true) {\n int read = inputStream.read(bArr);\n if (-1 == read) {\n return byteArrayOutputStream.toByteArray();\n }\n byteArrayOutputStream.write(bArr, 0, read);\n }\n }",
"public static byte[] readFullyByByteShort(InputStream in) throws IOException {\n int oneByte;\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n while((oneByte = in.read()) != -1){\n out.write(oneByte);\n }\n return out.toByteArray();\n }",
"void readBytes(byte[] into, int offset, int toRead) throws IOException;",
"private void readFromStream(InputStream in) throws IOException {\n\n\t\tdataValue = null;\t// allow gc of the old value before the new.\n\t\tbyte[] tmpData = new byte[32 * 1024];\n\n\t\tint off = 0;\n\t\tfor (;;) {\n\n\t\t\tint len = in.read(tmpData, off, tmpData.length - off);\n\t\t\tif (len == -1)\n\t\t\t\tbreak;\n\t\t\toff += len;\n\n\t\t\tint available = Math.max(1, in.available());\n\t\t\tint extraSpace = available - (tmpData.length - off);\n\t\t\tif (extraSpace > 0)\n\t\t\t{\n\t\t\t\t// need to grow the array\n\t\t\t\tint size = tmpData.length * 2;\n\t\t\t\tif (extraSpace > tmpData.length)\n\t\t\t\t\tsize += extraSpace;\n\n\t\t\t\tbyte[] grow = new byte[size];\n\t\t\t\tSystem.arraycopy(tmpData, 0, grow, 0, off);\n\t\t\t\ttmpData = grow;\n\t\t\t}\n\t\t}\n\n\t\tdataValue = new byte[off];\n\t\tSystem.arraycopy(tmpData, 0, dataValue, 0, off);\n\t}",
"public static void copy(byte[] in, OutputStream out) throws IOException {\n if (in == null) throw new IllegalArgumentException(\"No input byte array specified\");\n if (out == null) throw new IllegalArgumentException(\"No OutputStream specified\");\n out.write(in);\n }",
"public static void copy(InputStream input, OutputStream output) throws IOException {\n try {\n byte[] buffer = new byte[GCSFetcher.BUFFER_SIZE];\n int bytesRead = input.read(buffer);\n while (bytesRead != -1) {\n output.write(buffer, 0, bytesRead);\n bytesRead = input.read(buffer);\n }\n } finally {\n input.close();\n output.close();\n }\n }",
"public static void copyStream(InputStream input, OutputStream output,\n int expected) throws IOException {\n if (input == null || output == null) {\n return;\n }\n if (expected <= 0) {\n copyStream(input, output);\n }\n else {\n byte[] bytes = new byte[Math.min(expected, BUFSIZE)];\n\n int totalRead = 0;\n int bytesRead = 0;\n\n while (totalRead < expected) {\n bytesRead = input.read(bytes, 0, bytes.length);\n output.write(bytes, 0, bytesRead);\n totalRead = totalRead + bytesRead;\n }\n output.flush();\n }\n }",
"public byte[] read();",
"@Nullable\n public static byte[] readBytes(InputStream stream, int numBytes) {\n if (numBytes == 0) {\n return new byte[0];\n }\n\n byte[] result = new byte[numBytes];\n int readBytes = 0;\n while (readBytes < numBytes) {\n int numBytesToRead = numBytes - readBytes;\n int count;\n try {\n count = stream.read(result, readBytes, numBytesToRead);\n } catch (IOException e) {\n throw new RssStreamReadException(\"Failed to read data\", e);\n }\n if (count == -1) {\n if (readBytes == 0) {\n return null;\n } else {\n throw new RssEndOfStreamException(String.format(\n \"Unexpected end of stream, already read bytes: %s, remaining bytes to read: %s \",\n readBytes,\n numBytesToRead));\n }\n }\n readBytes += count;\n }\n\n return result;\n }",
"private void streamCopy(InputStream in, OutputStream out) throws IOException {\t \n\t\tsynchronized (in) {\n\t\t\tsynchronized (out) {\n\t\t\t\tbyte[] buffer = new byte[256];\n\t\t\t\twhile (true) {\n\t \t\tint bytesRead = in.read(buffer);\n\t \t\tif (bytesRead == -1) break;\n\t \t\tout.write(buffer, 0, bytesRead);\n\t \t}\n\t \t}\n\t }\n\t}",
"public void readBytes(byte[] buffer) throws IOException;",
"private void streamCopy(InputStream from, OutputStream to) {\r\n\t\ttry {\r\n\t\t\tint count = 0;\r\n\t\t\tbyte[] buffer = new byte[16*1024];\r\n\t\t\twhile ((count = from.read(buffer)) > 0) {\r\n\t\t\t\tto.write(buffer, 0, count);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\tEventLogger.logConnectionException(logger, socket, e);\r\n\t\t}\r\n\t}",
"public static void main(String[] args) {\n byte[] arr = {1, 2, 3, 4, 5};\n\n try {\n ByteArrayInputStream one = new ByteArrayInputStream(arr);\n System.out.println(one.available());\n\n for(int i = 0; i< arr.length; i++){\n\n int data = one.read();\n System.out.println(data);\n }\n one.close();\n }catch (Exception e){\n System.out.println(e.getMessage());\n\n\n }\n\n }",
"public InputStream asByteStream() {\n return new ByteArrayInputStream(rawBytes);\n }",
"public byte[] toByteArray() throws IOException\n {\n try (InputStream is = createInputStream())\n {\n return is.readAllBytes();\n }\n }",
"public byte[] toByteArray() throws IOException {\n/* */ COSInputStream cOSInputStream;\n/* 501 */ ByteArrayOutputStream output = new ByteArrayOutputStream();\n/* 502 */ InputStream is = null;\n/* */ \n/* */ try {\n/* 505 */ cOSInputStream = createInputStream();\n/* 506 */ IOUtils.copy((InputStream)cOSInputStream, output);\n/* */ }\n/* */ finally {\n/* */ \n/* 510 */ if (cOSInputStream != null)\n/* */ {\n/* 512 */ cOSInputStream.close();\n/* */ }\n/* */ } \n/* 515 */ return output.toByteArray();\n/* */ }",
"public static byte[] toByteArray(final Reader input, final Charset encoding) throws IOException {\n final ByteArrayOutputStream output = new ByteArrayOutputStream();\n copy(input, output, encoding);\n return output.toByteArray();\n }",
"public static byte[] readAndClose(final InputStream aInput) throws IOException{\n\t\tByteArrayOutputStream result = null;\n\t\tif (aInput != null) {\n\t\t\t//carries the data from input to output :\n\t\t\tfinal byte[] bucket = new byte[32*1024];\n\t\t\ttry {\n\t\t\t\t//Use buffering? No. Buffering avoids costly access to disk or network;\n\t\t\t\t//buffering to an in-memory stream makes no sense.\n\t\t\t\tresult = new ByteArrayOutputStream(bucket.length);\n\t\t\t\tint bytesRead = 0;\n\t\t\t\twhile(bytesRead != -1){\n\t\t\t\t\t//aInput.read() returns -1, 0, or more :\n\t\t\t\t\tbytesRead = aInput.read(bucket);\n\t\t\t\t\tif(bytesRead > 0){\n\t\t\t\t\t\tresult.write(bucket, 0, bytesRead);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfinally {\n\t\t\t\taInput.close();\n\t\t\t\t//result.close(); this is a no-operation for ByteArrayOutputStream\n\t\t\t}\n\t\t}\n\t\treturn result != null? result.toByteArray(): null;\n\t}",
"public byte[] getBinary() throws IOException {\n\r\n String contentType = null;\r\n int contentLength = -1;\r\n\r\n // a little weird - this will throw NoSuchElementException\r\n // if nothing was recieved\r\n contentType = connection.getContentType();\r\n contentLength = connection.getContentLength();\r\n\r\n log.info(\"contentType {} contentLength {}\", contentType, contentLength);\r\n\r\n InputStream raw;\r\n byte[] data = null;\r\n int initSize = (contentLength == -1) ? 65536 : contentLength;\r\n ByteArrayOutputStream bos = new ByteArrayOutputStream(initSize);\r\n InputStream in = null;\r\n // try {\r\n raw = connection.getInputStream();\r\n in = new BufferedInputStream(raw);\r\n\r\n byte[] tmp = new byte[initSize];\r\n int ret;\r\n while ((ret = in.read(tmp)) > 0) {\r\n log.debug(\"read {} bytes\", ret);\r\n bos.write(tmp, 0, ret);\r\n }\r\n /*\r\n * } catch (IOException e) { Logging.logException(e); }\r\n */\r\n\r\n data = bos.toByteArray();\r\n log.info(\"read {} bytes\", data.length);\r\n\r\n try {\r\n if (in != null) {\r\n in.close();\r\n }\r\n } catch (IOException e) {\r\n // don't care\r\n }\r\n\r\n /*\r\n * \r\n * try { // content size sent back data = new byte[contentLength]; int\r\n * bytesRead = 0; int offset = 0; while (offset < contentLength) { bytesRead\r\n * = in.read(data, offset, data.length - offset); if (bytesRead == -1)\r\n * break; offset += bytesRead; } in.close();\r\n * \r\n * if (offset != contentLength) { throw new IOException(\"Only read \" +\r\n * offset + \" bytes; Expected \" + contentLength + \" bytes\"); } } catch\r\n * (IOException e1) { Logging.logException(e1); error = e1.getMessage(); } }\r\n */\r\n\r\n /*\r\n * String filename = u.getFile().substring(filename.lastIndexOf('/') + 1);\r\n */\r\n\r\n /*\r\n * FileOutputStream out; try { out = new FileOutputStream(\"hello.mp3\");\r\n * out.write(data); out.flush(); out.close(); } catch (Exception e) { //\r\n * TODO Auto-generated catch block e.printStackTrace(); }\r\n */\r\n\r\n return data;\r\n }",
"private static void read(final InputStream istream, final byte[] bytes)\r\n throws IOException {\r\n int pos = 0;\r\n while (pos < bytes.length) {\r\n int read = istream.read(bytes, pos, bytes.length - pos);\r\n if (read < 0) {\r\n throw new RuntimeException(\"premature EOF\");\r\n }\r\n pos += read;\r\n }\r\n }",
"public\n static\n void\n fill( InputStream is,\n byte[] dest,\n int offset,\n int len )\n throws IOException\n {\n inputs.notNull( is, \"is\" );\n inputs.notNull( dest, \"dest\" );\n inputs.nonnegativeI( offset, \"offset\" );\n inputs.nonnegativeI( len, \"len\" );\n\n inputs.isTruef( \n offset + len <= dest.length,\n \"offset (%d) + length (%d) > dest.length (%d)\", \n offset, len, dest.length );\n\n while ( len > 0 )\n {\n int i = is.read( dest, offset, len ); \n if ( i < 0 ) throw new EOFException(); \n else\n {\n offset += i;\n len -= i;\n }\n }\n }",
"private static void copy(InputStream is, OutputStream os) throws IOException {\n\t\t int i;\n\t\t byte[] b = new byte[1024];\n\t\t while((i=is.read(b))!=-1) {\n\t\t os.write(b, 0, i);\n\t\t }\n\n\t\t}",
"default byte[] getBytes() throws IOException {\n try (InputStream is = getInputStream()) {\n return IOUtils.toByteArray(is);\n }\n }",
"public static InputStream makeCopy(InputStream input) throws IOException {\n ByteArrayOutputStream out = new ByteArrayOutputStream();\n copyStream(input, out);\n return new ByteArrayInputStream(out.toByteArray());\n }",
"public void copyStreamContent(InputStream inputStream, OutputStream outputStream)\r\n\tthrows IOException {\r\n\t\tbyte[] theCopyBuffer = new byte[BUFFER_SIZE];\r\n\t\tint theNumberOfBytesRead;\r\n\r\n\t\ttheNumberOfBytesRead = inputStream.read(theCopyBuffer);\r\n\t\twhile (theNumberOfBytesRead != -1) {\r\n\t\t\toutputStream.write(theCopyBuffer, 0, theNumberOfBytesRead);\r\n\t\t\ttheNumberOfBytesRead = inputStream.read(theCopyBuffer);\r\n\t\t}\r\n\t}",
"public static final void copyInputStream(int bufferSize, InputStream in, OutputStream out) throws IOException {\r\n\t\tbyte[] buffer = new byte[bufferSize];\r\n\t int len;\r\n\r\n\t while((len = in.read(buffer)) >= 0)\r\n\t out.write(buffer, 0, len);\r\n\r\n\t \r\n\t in.close();\r\n\t out.flush();\r\n\t out.close();\r\n\t \r\n\t}",
"public byte[] readBytes(int inNumberMessages) throws IOException;",
"private static void copyFile(InputStream is, OutputStream os) throws IOException {\n\n final byte[] buf = new byte[4096];\n int cnt = is.read(buf, 0, buf.length);\n while (cnt >= 0) {\n os.write(buf, 0, cnt);\n cnt = is.read(buf, 0, buf.length);\n }\n os.flush();\n }",
"public int setBytes(int index, InputStream in, int length)\r\n/* 264: */ throws IOException\r\n/* 265: */ {\r\n/* 266:283 */ ensureAccessible();\r\n/* 267:284 */ return in.read(this.array, index, length);\r\n/* 268: */ }",
"public static long copy(InputStream input, OutputStream output, byte[] buffer) throws IOException {\n long count = 0;\n int bytesRead = 0;\n while (-1 != (bytesRead = input.read(buffer))) {\n output.write(buffer, 0, bytesRead);\n count += bytesRead;\n }\n return count;\n }",
"public static byte[] readAll(InputStream is, int chunkSize) {\n\t\tif (chunkSize <= 0) {\n\t\t\tthrow new IllegalArgumentException(\"chunk size can't be <1\");\n\t\t}\n\t\tByteArrayOutputStream bos = new ByteArrayOutputStream();\n\t\tbyte[] bytes = new byte[chunkSize];\n\t\tint read;\n\t\ttry {\n\t\t\twhile (-1 != (read = is.read(bytes))) {\n\t\t\t\tbos.write(bytes, 0, read);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tthrow new WrappedException(e);\n\t\t} finally {\n\t\t\tclose(is);\n\t\t}\n\t\treturn bos.toByteArray();\n\t}",
"public byte[] readBytes() {\n\t\tif (bufferIndex == bufferLast)\n\t\t\treturn null;\n\n\t\tsynchronized (buffer) {\n\t\t\tint length = bufferLast - bufferIndex;\n\t\t\tbyte outgoing[] = new byte[length];\n\t\t\tSystem.arraycopy(buffer, bufferIndex, outgoing, 0, length);\n\n\t\t\tbufferIndex = 0; // rewind\n\t\t\tbufferLast = 0;\n\t\t\treturn outgoing;\n\t\t}\n\t}",
"public byte[] readBytes(int len) throws IOException {\n if (len > 1024) {\n throw new RuntimeException(String.format(\"Attempted to read %d bytes at once, file is probably corrupted.\", len));\n }\n byte[] buf = new byte[len];\n int n = 0;\n while (n < len) {\n int count = inputStream.read(buf, n, len - n);\n if (count < 0) {\n throw new EOFException();\n }\n n += count;\n }\n return buf;\n }",
"byte[] getBytes();",
"byte[] getBytes();",
"public static ByteBuffer byteBuffer(InputStream in) throws IOException {\n return byteBuf(in, FileChannel.MapMode.READ_WRITE, \"rw\");\n }",
"byte [] getBuffer ();",
"public void transfer(InputStream in, OutputStream out) throws IOException {\n int byteIn;\n while ((byteIn = in.read()) != -1) {\n out.write(byteIn);\n }\n out.flush();\n }",
"private DataInputStream readBuffer( DataInputStream in, int count ) throws IOException{\n byte[] buffer = new byte[ count ];\n int read = 0;\n while( read < count ){\n int input = in.read( buffer, read, count-read );\n if( input < 0 )\n throw new EOFException();\n read += input;\n }\n \n ByteArrayInputStream bin = new ByteArrayInputStream( buffer );\n DataInputStream din = new DataInputStream( bin );\n return din;\n }",
"public static void readFully(InputStream in, byte[] buffer) {\n int c = read(in, buffer);\n if (c != buffer.length) {\n String msg = c + \" != \" + buffer.length + \": \" + ByteUtils.toHex(buffer);\n throw new IORuntimeException(new EOFException(msg));\n }\n }",
"public static void transfer(InputStream in, OutputStream out, int offset, int size) throws IOException\n {\n // Read bytes and write to destination until eof\n byte[] buf = new byte[size];\n System.out.println(\"What is it here?\\n\"+buf);\n int lengthBuff = in.read(buf);\n System.out.println(\"The length is: \"+lengthBuff);\n while (lengthBuff != 0)\n {\n out.write(buf, 0, lengthBuff);\n }\n System.out.println(\"End!\");\n }",
"public byte[] readBytes() throws IOException {\n\t InputStream in = socket.getInputStream();\n\t DataInputStream dis = new DataInputStream(in);\n\n\t int len = dis.readInt();\n\t byte[] data = new byte[len];\n\t if (len > 0) {\n\t dis.readFully(data);\n\t }\n\t return data;\n\t}",
"private final byte[] readBuffer( int size ) throws IOException {\n byte[] buffer = new byte[ size ];\n\n int read = 0;\n while ( read < size ) {\n int next = dataSource.read( buffer, read, size - read );\n if ( next < 0 ) throw new IOException( \"End of Stream\" );\n read += next;\n\t}\n return buffer;\n }",
"public byte[] read(final byte[] src, final int offset)\n {\n final int length = length();\n bytes = new byte[length];\n for (int i = 0; i < length; i++)\n bytes[i] = src[offset + length - 1 - i];\n return bytes;\n }",
"public int writeBytes(InputStream in, int length)\r\n/* 617: */ throws IOException\r\n/* 618: */ {\r\n/* 619:628 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 620:629 */ return super.writeBytes(in, length);\r\n/* 621: */ }",
"public void readBytes(byte[] buffer, int offset, int length) throws IOException;",
"protected final int readBytes()\n throws IOException\n {\n _inputPtr = 0;\n _inputEnd = 0;\n if (_inputSource != null) {\n int count = _inputSource.read(_inputBuffer, 0, _inputBuffer.length);\n if (count > 0) {\n _inputEnd = count;\n }\n return count;\n }\n return -1;\n }",
"public byte[] toByteArray() {\n byte[] array = new byte[count];\n System.arraycopy(buf, 0, array, 0, count);\n return array;\n }",
"private static long copy(InputStream from, OutputStream to) throws IOException {\n byte[] buf = new byte[BUFFER];\n long total = 0;\n while (true) {\n int r = from.read(buf);\n if (r == -1) {\n break;\n }\n to.write(buf, 0, r);\n total += r;\n }\n return total;\n }",
"public byte[] readBytes(int inNumberMessages, int[] outNumberMessages) throws IOException;",
"public abstract byte[] toByteArray();",
"public abstract byte[] toByteArray();",
"public static void copyFileFromInputStream(InputStream is, String newPath) throws IOException {\n FileOutputStream fs = null;\n try {\n int bytesum = 0;\n int byteread = 0;\n if (is != null) {\n\n fs = new FileOutputStream(newPath);\n byte[] buffer = new byte[1024];\n int length;\n while ((byteread = is.read(buffer)) != -1) {\n bytesum += byteread;\n System.out.println(bytesum);\n fs.write(buffer, 0, byteread);\n }\n is.close();\n }\n } catch (Exception e) {\n System.out.println(\"Copy Failed\");\n e.printStackTrace();\n\n } finally {\n try {\n is.close();\n fs.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n\n }",
"InputStream getDataStream();",
"byte[] getByteContent() throws IOException;",
"public static void CopyStream(InputStream is, OutputStream os)\n {\n //int total = 0;\n //int size =0;\n\n try\n {\n byte[] bytes = new byte[DEFAULT_BUFFER_SIZE];\n int count;\n while ((count = is.read(bytes, 0, DEFAULT_BUFFER_SIZE)) != -1)\n os.write(bytes, 0, count);\n }\n catch (Exception exp)\n {\n exp.printStackTrace();\n }\n finally\n {\n closeSilently(is, os);\n }\n }",
"private byte[] read(int length) throws IOException {\n byte[] result = new byte[length];\n\n int read = 0;\n while (read < length)\n {\n int i = this.in.read(result, read, length - read);\n if (i == -1)\n throw new EOFException();\n read += i;\n }\n return result;\n }",
"public TypedBytesInput(DataInput in) {\n this.in = in;\n }",
"public void load(DataInput stream)\n throws IOException\n {\n final int MAX = 8192;\n byte[] abBuf = new byte[MAX];\n ByteArrayOutputStream streamRaw = new ByteArrayOutputStream(MAX);\n\n int of = 0;\n try\n {\n while (true)\n {\n byte b = stream.readByte();\n\n abBuf[of++] = b;\n\t\t\t\tif (of == MAX)\n {\n streamRaw.write(abBuf, 0, MAX);\n of = 0;\n }\n }\n }\n catch (EOFException e)\n {\n if (of > 0)\n {\n streamRaw.write(abBuf, 0, of);\n }\n }\n\n\n setBytes(streamRaw.toByteArray());\n }",
"private static int readFully(InputStream in, byte[] buf, int off, int len) throws IOException {\n/* 1144 */ if (len == 0)\n/* 1145 */ return 0; \n/* 1146 */ int total = 0;\n/* 1147 */ while (len > 0) {\n/* 1148 */ int bsize = in.read(buf, off, len);\n/* 1149 */ if (bsize <= 0)\n/* */ break; \n/* 1151 */ off += bsize;\n/* 1152 */ total += bsize;\n/* 1153 */ len -= bsize;\n/* */ } \n/* 1155 */ return (total > 0) ? total : -1;\n/* */ }",
"public static byte[] toByteArray(final Reader input, final String encoding) throws IOException {\n return toByteArray(input, Charset.forName(encoding));\n }",
"Stream<In> getInputStream();",
"public void read(DataInput in) throws IOException {\r\n int size = in.readInt();\r\n\r\n buffer = new byte[size];\r\n in.readFully(buffer);\r\n }",
"public static final void copyInputStream(InputStream in, OutputStream out) throws IOException {\r\n\t\tcopyInputStream(1024, in, out);\r\n\t}",
"public byte[] drain() {\n return drainTo(new ByteArrayOutputStream()).toByteArray();\n }",
"private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }",
"public byte[] toArray()\r\n {\r\n return _stream.toByteArray();\r\n }",
"Buffer copy();"
] | [
"0.724968",
"0.7153382",
"0.7123393",
"0.70056236",
"0.6962663",
"0.68631214",
"0.68394256",
"0.6834787",
"0.6824189",
"0.681164",
"0.6791364",
"0.67822784",
"0.6686952",
"0.666543",
"0.66433",
"0.6638023",
"0.66354936",
"0.6591613",
"0.6584414",
"0.65496",
"0.65230614",
"0.65118915",
"0.6379572",
"0.63452405",
"0.6339555",
"0.6310257",
"0.62756675",
"0.62119955",
"0.6182595",
"0.6174938",
"0.61704326",
"0.6141602",
"0.61391944",
"0.6128789",
"0.6051466",
"0.60467505",
"0.59881747",
"0.5980951",
"0.59693193",
"0.5962765",
"0.5904341",
"0.5902445",
"0.58746296",
"0.5860387",
"0.5832435",
"0.5832025",
"0.5829926",
"0.58072937",
"0.5783728",
"0.5778624",
"0.5742274",
"0.5720695",
"0.5698705",
"0.56924516",
"0.5684062",
"0.5679132",
"0.5673071",
"0.56709707",
"0.56575024",
"0.56547517",
"0.5647687",
"0.5636011",
"0.56332624",
"0.5632845",
"0.5629424",
"0.5619713",
"0.5619713",
"0.56067115",
"0.5601817",
"0.5587782",
"0.55797136",
"0.55733943",
"0.5571794",
"0.55646276",
"0.55630916",
"0.55608034",
"0.5559592",
"0.55595905",
"0.5554297",
"0.55478907",
"0.55446345",
"0.55311286",
"0.5529829",
"0.5529829",
"0.55247337",
"0.5517671",
"0.5506915",
"0.5496673",
"0.5490088",
"0.5474723",
"0.54727983",
"0.5469574",
"0.5467601",
"0.54671395",
"0.5462674",
"0.54595673",
"0.5454124",
"0.5426115",
"0.5417887",
"0.5414935"
] | 0.62441313 | 27 |
This constructor sets up the scope cache information. | public DocumentCreateCallbackHandler(NavigationDataCallback callback, String fileTypeName,
String fileScopeName, String fileName) {
this.callback = callback;
this.fileTypeName = fileTypeName;
this.fileScopeName = fileScopeName;
this.fileName = fileName;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public BaseScope() {\n\t}",
"public void init() {\n\t\tif (cache != null) {\n\t\t\tcache.dispose();\n\t\t\tcache = null;\n\t\t}\n\t\tcache = cacheFactory.create(CacheFactoryDirective.NoDCE, \"test\");\n\t}",
"public ScopeManager(){\n globalConstants = new HashMap<>();\n globalVariables = new HashMap<>();\n\n currentConstants = null;\n currentVariables = null;\n\n temporaryConstants = new ArrayList<>();\n temporaryVariables = new ArrayList<>();\n\n localVariableScopes = new HashMap<>();\n localConstantScopes = new HashMap<>();\n }",
"public MultiCache () {\n super();\n this.locals = new ArrayList<Coordinates>();\n this.stage = 0;\n }",
"public LibraryCache() {\n\t }",
"private FixtureCache() {\n\t}",
"public CacheManager()\n\t{\n\t}",
"public DescriptorCacheImpl() {\n super();\n \n LOG2.debug(\"New instance!\");\n \n _typeMap = new HashMap();\n _xmlNameMap = new HashMap();\n _missingTypes = new ArrayList();\n }",
"private void init() {\n clearCaches();\n }",
"public Cache() {\n this(null);\n }",
"@PostConstruct\n\tpublic void init() {\n\t // TODO create cacheTreeMgr using HashMap or EhCache\n cacheTree = new CacheTreeHashMap();\n\t cacheTree.init();\n\t}",
"@PostConstruct\n public void initCache() {\n cache = Collections.synchronizedMap(new HashMap<>(cacheCapacity, 1));\n }",
"protected void initializeCache() {\n if (cacheResults && initialized) {\n dataCache = new HashMap<String, Map<String, Map<String, BaseAttribute>>>();\n }\n }",
"public TeamCacheManager() {\r\n }",
"public AbstractCache() {\n }",
"public Scoped() {\n }",
"public CacheTracabilityFactoryImpl() {\n\t\tsuper();\n\t}",
"protected void initScopeInfo()\n {\n String className = null;\n Object target = getTarget();\n if (target != null)\n className = target.getClass().getName();\n setScopeInfo(new AbstractScopeInfo(getName(), className));\n }",
"public CacheService()\n {\n }",
"public CacheService()\n {\n }",
"public GlobalScope() {\n super(null);\n }",
"public ImcacheCacheManager() {\n this(CacheBuilder.heapCache());\n }",
"protected void initializeCache() {\n\t\tif (cache == null){\n\t\t\tcache = Collections.synchronizedMap(new HashMap());\n\t\t}\n\t\telse{\n\t\t\tcache.clear();\n\t\t}\n\t}",
"private DataCache() {\n this.people = new HashMap<>();\n this.events = new HashMap<>();\n this.personEvents = new HashMap<>();\n this.currentPersonEvents = new HashMap<>();\n this.eventTypes = new ArrayList<>();\n this.childrenMap = new HashMap<>();\n this.maleSpouse = new HashSet<>();\n this.femaleSpouse = new HashSet<>();\n this.paternalAncestorsMales = new HashSet<>();\n this.paternalAncestorsFemales = new HashSet<>();\n this.maternalAncestorsMales = new HashSet<>();\n this.maternalAncestorsFemales = new HashSet<>();\n }",
"public void init() {\n\t\tM_log.info(\"initialization...\");\n\t\t\n\t\t// register as an entity producer\n\t\tm_entityManager.registerEntityProducer(this, SakaiGCalendarServiceStaticVariables.REFERENCE_ROOT);\n\t\t\n\t\t// register functions\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_VIEW);\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_VIEW_ALL);\n\t\tfunctionManager.registerFunction(SakaiGCalendarServiceStaticVariables.SECURE_GCAL_EDIT);\n\t\t\n \t\t//Setup cache. This will create a cache using the default configuration used in the memory service.\n \t\tcache = memoryService.newCache(CACHE_NAME);\n\t}",
"public AddressCacheImpl() {\n\t\tthis(CACHE_SIZE_DEFAULT, 0L);\n\t}",
"protected ElevationDataCache() {\n }",
"public CacheFIFO()\r\n/* 16: */ {\r\n/* 17: 95 */ this(20);\r\n/* 18: */ }",
"public SearchCache() {\n this(CAPACITY, new Ticker());\n }",
"public HotrodCacheFactory() {\n }",
"protected void initialise() {\r\n loadDefaultConfig();\r\n loadCustomConfig();\r\n loadSystemConfig();\r\n if (LOG.isDebugEnabled()) {\r\n LOG.debug(\"--- Scope properties ---\");\r\n for (Iterator i = properties.keySet().iterator(); i.hasNext(); ) {\r\n String key = (String) i.next();\r\n Object value = properties.get(key);\r\n LOG.debug(key + \" = \" + value);\r\n }\r\n LOG.debug(\"------------------------\");\r\n }\r\n }",
"private UtilsCache() {\n\t\tsuper();\n\t}",
"public DependencyManager()\n\t{\n\t\tmap.put(VARIABLES, new ArrayList<>());\n\t\tmap.put(VARSTRATEGY, BASE_STRATEGY);\n\t}",
"public void init() throws CacheException {\n // no-op\n }",
"public PlusSpringCacheManager() {\n }",
"private void initialize() {\n\t\tcacheableImpl = new CacheableImpl();\n\t\tsetToolTipText(\"\");\n\t}",
"protected void createLookupCache() {\n }",
"private void init() {\n mMemoryCache = new LruCache<String, Bitmap>(DEFAULT_MEM_CACHE_SIZE) {\n /**\n * Measure item size in kilobytes rather than units which is more\n * practical for a bitmap cache\n */\n @Override\n protected int sizeOf(String key, Bitmap bitmap) {\n final int bitmapSize = getBitmapSize(bitmap) / 1024;\n return bitmapSize == 0 ? 1 : bitmapSize;\n }\n };\n }",
"public OldOldCache()\n {\n this(DEFAULT_UNITS);\n }",
"@Override\n\tpublic Object _init_(final IScope scope) {\n\t\treturn super._init_(this.scope);\n\t}",
"private FactoryCacheValet() {\n\t\tsuper();\n\t}",
"public void initialize() {\n\n // Calculate the average unit price.\n calculateAvgUnitPrice() ;\n\n // Calculate the realized profit/loss for this stock\n calculateRealizedProfit() ;\n\n this.itdValueCache = ScripITDValueCache.getInstance() ;\n this.eodValueCache = ScripEODValueCache.getInstance() ;\n }",
"public CachedSubsumptionGraph() {\n }",
"private CacheWrapper<AccessPointIdentifier, Integer> createCache() {\n return new CacheWrapper<AccessPointIdentifier, Integer>() {\n \n @Override\n public void put(AccessPointIdentifier key, Integer value) {\n cache.put(key, value);\n }\n \n @Override\n public Integer get(AccessPointIdentifier key) {\n if (cache.containsKey(key)) {\n hitRate++;\n }\n return cache.get(key);\n }\n \n \n };\n }",
"private void initialize() {\n this.traitMap = new HashMap<T, ITrait<T>>();\n this.traitList = new ArrayList<ITrait<T>>();\n this.observers = Collections.synchronizedList(new ArrayList<IStatisticsObserver>());\n this.dimensionName = \"UNNAMED\";\n\n }",
"private SalesOrderCache()\n\t{\n\t\tsalesOrders = new ArrayList<SalesOrder>();\n\t}",
"public LpgSvcCacheViewImpl() {\n }",
"public static CacheTracabilityFactory init() {\n\t\ttry {\n\t\t\tCacheTracabilityFactory theCacheTracabilityFactory = (CacheTracabilityFactory)EPackage.Registry.INSTANCE.getEFactory(\"http://www.eclipse.org/tracability/1.0\"); \n\t\t\tif (theCacheTracabilityFactory != null) {\n\t\t\t\treturn theCacheTracabilityFactory;\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\tEcorePlugin.INSTANCE.log(exception);\n\t\t}\n\t\treturn new CacheTracabilityFactoryImpl();\n\t}",
"private void initializeCache(int cacheSize){\n \t\tlruCache = new LRUCache(cacheSize);\n \t}",
"public ServiceCacheDB()\n\t{\n\t\tthis(0);\n\t}",
"public ScopedMap() {\n\t\tmap = new ArrayList<HashMap<K, V>>();\n\n\t}",
"public static void initPackage() {\n\t\t(new Branch()).getCache();\n\t\t(new Change()).getCache();\n\t\t(new Client()).getCache();\n\t\t(new DirEntry()).getCache();\n\t\t(new FileEntry()).getCache();\n\t\t(new Job()).getCache();\n\t\t(new Label()).getCache();\n\t\t(new User()).getCache();\n\t\tProperties props = System.getProperties();\n\t}",
"public void init() {\n\t\tList<Order> entries = new ArrayList<>();\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tentries.add(new Order(entries.size(), null, \"Bryce\", Statuses.IN_QUEUE, new java.util.Date(System.currentTimeMillis())));\n\t\tgetServletContext().setAttribute(\"entries\", entries);\n\t}",
"private HttpCache(@NonNull Context context) {\n mCache = new Cache(new File(context.getExternalCacheDir(), CacheConfig.FILE_DIR),\n CacheConfig.FILE_SIZE);\n }",
"public CacheTest() {\n }",
"public DefaultScopeDescription() {\n }",
"protected void initialize() {\n // Attribute Load\n this.attributeMap.clear();\n this.attributeMap.putAll(this.loadAttribute());\n // RuleUnique Load\n this.unique = this.loadRule();\n // Marker Load\n this.marker = this.loadMarker();\n // Reference Load\n this.reference = this.loadReference();\n }",
"public void init()\n {\n this.tripDict = new HashMap<String, Set<Trip>>();\n this.routeDict = new HashMap<String, Double>();\n this.tripList = new LinkedList<Trip>();\n this.computeAllPaths();\n this.generateDictionaries();\n }",
"public static void initialize() {\r\n\t\tgraph = null;\r\n\t\tmseeObjectNames = new HashMap<String, String>();\r\n\t\tmseeEventTypes = new HashMap<String, String>();\r\n\t\tmodifiedIdentifiers = new HashMap<String, String>();\r\n\t}",
"public ClassScope(String className) {\n\t\tthis.className = className;\n\n\t\tthis.publicVariables = new HashMap<String, JavaValue>();\n\t\tthis.privateVariables = new HashMap<String, JavaValue>();\n\n\t\tthis.publicMethods = new HashMap<String, JavaMethod>();\n\t\tthis.privateMethods = new HashMap<String, JavaMethod>();\n\t}",
"public CheckpointManager() {\n this(new HashMap<>());\n }",
"public Context() {\n this.mFunctionSet=new ArrayList();\n this.mTerminalSet=new ArrayList();\n this.mPrimitiveMap=new TreeMap();\n this.mCache=new MyLinkedHashMap(500, .75F, true);\n this.previousBest=Double.MAX_VALUE;\n}",
"public CacheAccess( final CompositeCache<K, V> cacheControl )\n {\n super(cacheControl);\n }",
"private void registerCaches(){\n // Initialize region arraylist\n prisoners = new HashMap<>();\n regions = QueryManager.getRegions();\n prisonBlocks = QueryManager.getPrisonBlocks();\n portals = QueryManager.getPortals();\n }",
"public HeapCacheBuilder() {\n this.name = \"imcache-heap-cache-\" + cacheNumber.incrementAndGet();\n }",
"private static Scope buildScope() {\n return Scope.build(Scope.R_BASICPROFILE, Scope.W_SHARE, Scope.R_EMAILADDRESS);\n }",
"public DataBaseCache(Context context) {\n mContext = context;\n }",
"private EagerInitilization(){}",
"Scope createScope();",
"public void init() throws CacheException {\r\n\t try {\r\n\t \tmanager = new CacheManager();\r\n ehcache = manager.getCache(E3_RESOURCE_GROUP);\r\n if (ehcache == null) {\r\n \tlogger.warn(\"Could not find configuration [\" + E3_RESOURCE_GROUP + \"]; using defaults.\");\r\n manager.addCache(E3_RESOURCE_GROUP);\r\n ehcache = manager.getCache(E3_RESOURCE_GROUP);\r\n logger.debug(\"started EHCache region: \" + E3_RESOURCE_GROUP);\r\n }\r\n\t }\r\n catch (net.sf.ehcache.CacheException e) {\r\n throw new CacheException(e);\r\n }\r\n \r\n\t\t\r\n\t}",
"public CacheService( CacheManager cachemanager )\n {\n this.cacheManager = cachemanager;\n }",
"private static Scope buildScope() {\n return Scope.build(Scope.R_BASICPROFILE, Scope.R_EMAILADDRESS);\n }",
"public AccountStorage() {\n accounts = new ConcurrentHashMap<>();\n minerMap = new ConcurrentHashMap<>();\n blockMap = new ConcurrentHashMap<>();\n initAccounts();\n logger.info(\"AccountStorage: New AccountStorage created.\");\n }",
"private void init() {\n\t\t\n\t\ttry{\t\t\t\n\t\t\tinfos = new HashMap<String, VariableInfo>();\n\t\t\t\n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\t\n\t\t\t\tif(this.problem.getNbrNeighbors(var) != 0){ // an isolated variable doesn't need a CryptoScheme and therefore no VariableInfo either\n\t\t\t\t\t\n\t\t\t\t\tVariableInfo info = new VariableInfo(var);\n\t\t\t\t\tinfos.put(var, info);\n\t\t\t\t\t\n\t\t\t\t\tinfo.cs = cryptoConstr.newInstance(this.cryptoParameter);\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//initialize request counter for my own variables\n\t\t\trequestCount = new HashMap<String,Integer>(); \n\t\t\tfor(String var : this.problem.getMyVars()){\n\t\t\t\trequestCount.put(var, 0);\n\t\t\t}\n\t\t\t\n\t\t\tthis.started = true;\t\n\t\t\t\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\t\t\n\t}",
"public LogAnalyzer()\n { \n // Create the array object to hold the hourly\n // access counts.\n hourCounts = new int[24];\n // Create the reader to obtain the data.\n reader = new LogfileReader();\n }",
"public RedisSortedSetCache() {\n cache = new HashMap<String, SortedSet<String>>();\n scores = new HashMap<String, Map<String, Double>>();\n }",
"public SpriteCache() {\n counter = 0;\n spritesToRender = new SparseArray<>();\n lock = new ReentrantLock();\n }",
"public static void init() {\n buildings = new HashMap<Long, JSONObject>();\n arr = new ArrayList();\n buildingOfRoom = new HashMap<Long, Long>();\n }",
"private void init()\n\t{\n\t\tif (_invData == null)\n\t\t\t_invData = new InvestigateStore.MappedStores();\n\t}",
"public void newScope() {\n Map<String, Type> scope = new HashMap<String, Type>();\n scopes.push(scope);\n Map<String, Type> typeScope = new HashMap<String, Type>();\n typeScopes.push(typeScope);\n }",
"@Override\n public Builder vocabCache(@NonNull VocabCache<VocabWord> vocabCache) {\n super.vocabCache(vocabCache);\n return this;\n }",
"VisitManager() {\r\n\t\tvisits = new TreeMap<String, VisitRecord>();\r\n\t}",
"public ImcacheCacheManager(BaseCacheBuilder cacheBuilder) {\n this.cacheBuilder = cacheBuilder;\n }",
"public Memory() {\r\n init();\n ruletables = new RuleTables(this);\n budgetfunctions = new BudgetFunctions(this);\r\n }",
"public SessionCacheController(AuthenticationController authenticationController){\n this.authenticationController = authenticationController;\n this.authenticationController.setAuthenticationListener(this);\n timeTables = new Timetables();\n appointments = new Appointments();\n tasks = new Tasks();\n messages = new Messages();\n substitutions = new Substitutions();\n files = new Files();\n announcements = new Announcements();\n excuseNotes = new ExcuseNotes();\n }",
"private void initialize()\r\n {\r\n this.workspace = null;\r\n this.currentUser = null;\r\n this.created = new Date();\r\n this.securityInfo = null;\r\n }",
"private VersionsCache(FileSystem fileSystem) {\n this.fileSystem = fileSystem;\n }",
"private void init() {\r\n final List<VCSystem> vcs = datastore.createQuery(VCSystem.class)\r\n .field(\"url\").equal(Parameter.getInstance().getUrl())\r\n .asList();\r\n if (vcs.size() != 1) {\r\n logger.error(\"Found: \" + vcs.size() + \" instances of VCSystem. Expected 1 instance.\");\r\n System.exit(-1);\r\n }\r\n vcSystem = vcs.get(0);\r\n\r\n project = datastore.getByKey(Project.class, new Key<Project>(Project.class, \"project\", vcSystem.getProjectId()));\r\n\r\n }",
"private Globals(){}",
"public BaseScope(Scope enclosingScope) {\n\t\tsetEnclosingScope(enclosingScope);\n\t}",
"@Override\n public void init(String PipelineName, String ModuleName)\n throws InitializationException {\n String CacheObjectName;\n\n // Do the inherited work, e.g. setting the symbolic name etc\n super.init(PipelineName, ModuleName);\n\n // Get the cache object reference\n CacheObjectName = PropertyUtils.getPropertyUtils().getPluginPropertyValue(PipelineName,\n ModuleName,\n \"DataCache\");\n CMR = CacheFactory.getGlobalManager(CacheObjectName);\n\n if (CMR == null) {\n message = \"Could not find cache entry for <\" + CacheObjectName + \">\";\n throw new InitializationException(message, getSymbolicName());\n }\n\n // Load up the mapping arrays, but only if we are the right type. This\n // allows us to build up ever more complex rating models, matching the\n // right model to the right cache\n if (CMR.get(CacheObjectName) instanceof RateCache) {\n RC = (RateCache) CMR.get(CacheObjectName);\n\n if (RC == null) {\n message = \"Could not find cache entry for <\" + CacheObjectName + \">\";\n throw new InitializationException(message, getSymbolicName());\n }\n }\n }",
"Scope(String name, Scope parent) {\n this.name = name;\n this.parent = parent;\n this.variables = new HashMap<>();\n }",
"public ProfileService() {\n \t\tthis(DEFAULT_ENDPOINT_NAME, DEFAULT_CACHE_SIZE);\n \t\tinitializeCache(DEFAULT_CACHE_SIZE);\n \t}",
"void addScope() {\n\t\tlist.addFirst(new HashMap<String, Sym>());\n\t}",
"public IndexedDiskCache(final IndexedDiskCacheAttributes cacheAttributes)\r\n {\r\n this(cacheAttributes, null);\r\n }",
"private void initialize() {\n first = null;\n last = null;\n size = 0;\n dictionary = new Hashtable();\n }",
"@Before\n\tpublic void init()\n\t{\n\t\tEntityManagerFactory entityManagerFactory = Persistence.createEntityManagerFactory(\"persistenceUnit\");\n\t\tEntityManager entityManager = entityManagerFactory.createEntityManager();\n\t\tcacheManager = new CacheManagerDefaultImpl();\n\t\t((CacheManagerDefaultImpl) cacheManager).setEntityManager(entityManager);\n\t}",
"public Cache(Integer size) {\n this.size = size;\n recentlyUsed = new ArrayList<K>();\n cache = new HashMap<>();\n }",
"public SymbolTable() {\n\t\tclassScope = new Hashtable<String, Values>();\n\t\tsubScope = new Hashtable<String, Values>();\n\t\tcurrScope = classScope;\n\t\tsubArgIdx = 0;\n\t\tsubVarIdx = 0;\n\t\tclassStaticIdx = 0;\n\t\tclassFieldIdx = 0;\n\t}",
"public TransliterationManager()\n\t{\n\t\tmap = new HashMap<String, ITransliterator>();\n\t\tcodings = new HashSet<String>();\n\t}",
"private void init() {\n filmCollection = new FilmCollection();\n cameraCollection = new CameraCollection();\n }"
] | [
"0.66424525",
"0.650742",
"0.65040046",
"0.64854676",
"0.6453113",
"0.6394374",
"0.6383629",
"0.6317999",
"0.6313633",
"0.62456375",
"0.6232093",
"0.6221993",
"0.6193561",
"0.6150201",
"0.6114762",
"0.6086843",
"0.6025974",
"0.5998688",
"0.5993863",
"0.5993863",
"0.5969118",
"0.5929661",
"0.59227973",
"0.5877428",
"0.5860838",
"0.5847553",
"0.5840056",
"0.58385324",
"0.5825021",
"0.5783454",
"0.57825035",
"0.57802093",
"0.57694304",
"0.5768546",
"0.5740231",
"0.57085687",
"0.57061946",
"0.56882334",
"0.5651563",
"0.56444526",
"0.5634787",
"0.56123847",
"0.5601643",
"0.55753773",
"0.55739653",
"0.55675113",
"0.5554924",
"0.5550897",
"0.5529936",
"0.5518127",
"0.5515206",
"0.5514281",
"0.5484428",
"0.5482165",
"0.5442474",
"0.5435906",
"0.5421752",
"0.5418877",
"0.5412859",
"0.53829473",
"0.53805864",
"0.5376323",
"0.5368648",
"0.5331786",
"0.5331282",
"0.5321338",
"0.5312981",
"0.5312008",
"0.52933866",
"0.5288981",
"0.52856314",
"0.528098",
"0.5277895",
"0.52768236",
"0.5252532",
"0.5246805",
"0.523429",
"0.5220236",
"0.5214928",
"0.52127594",
"0.52120006",
"0.5211943",
"0.52107596",
"0.5210529",
"0.5209339",
"0.5205287",
"0.5181081",
"0.5161649",
"0.5157023",
"0.515524",
"0.5149864",
"0.51495636",
"0.514886",
"0.51485276",
"0.51411575",
"0.51348513",
"0.5132695",
"0.5129731",
"0.512876",
"0.5125668",
"0.512212"
] | 0.0 | -1 |
THis method handles an asynchronous failure. | public void onFailure(Throwable caught) {
SC.say("Failed to add the entry : " + caught.getMessage());
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\t\tpublic void asyncFailure(long id, Exception e)\n\t\t\t\tthrows ConnectorException {\n\t\t\t\n\t\t}",
"void onFailure(Throwable error);",
"public void onFailure();",
"public void onFailure(Exception t);",
"@NonBlocking\n void error(Throwable throwable);",
"@Override\n public void onFailure(Exception error) {\n }",
"@Override\n public void onFailure() {\n }",
"void onFailure();",
"void onFailure();",
"void onFailure();",
"@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n }",
"@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }",
"@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }",
"@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }",
"@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }",
"private void handleErrorsInTask(String result) {\n Log.e(\"ASYNC_TASK_ERROR\", result);\n mListener.onWaitFragmentInteractionHide();\n }",
"@Override\n\t public void onFailure(Throwable caught) {\n\n\t }",
"private void handleErrorsInTask(String result) {\n Log.e(\"ASYNC_TASK_ERROR\", result);\n }",
"private void handleErrorsInTask(String result) {\n Log.e(\"ASYNC_TASK_ERROR\", result);\n }",
"@Override\n public void onFailure(Throwable t) {\n }",
"@Override\r\n public void onFailure(Throwable t) {\n }",
"@Override\r\n public void onFailure(Throwable t) {\n }",
"@Override\n public void onFailure(Throwable t) {\n }",
"@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t}",
"@Override\n\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\n public void onFailure(Throwable t) {\n isSucessful.compareAndSet(true, false);\n failedMessages.put(id.getName(), t.getMessage());\n handleIfFinished(t, isSucessful.get());\n }",
"@Override\n\t\tpublic void onFailure(Throwable caught) {\n\t\t}",
"@Override\n\t\tpublic void onFailure(Throwable caught) {\n\t\t}",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t}",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"public void onFailure(Throwable arg0) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n public void onFailure(Throwable caught) {\n }",
"public abstract void onFailure(FailureCode code, Throwable ex);",
"@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n }",
"@Override\r\n\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\t\t\t\t\r\n\t\t\t\t\t\t\t}",
"@Override\n public void onFailure(Throwable caught) {\n result.onFailure(caught);\n }",
"@Override\n\tpublic void onFailure(int result) {\n\n\t}",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t}",
"public void onFailure(Throwable caught) {\n if (attempt > 20) {\n fail();\n }\n \n int token = getToken();\n log(\"onFailure: attempt = \" + attempt + \", token = \" + token\n + \", caught = \" + caught);\n new Timer() {\n @Override\n public void run() {\n runAsync1(attempt + 1);\n }\n }.schedule(100);\n }",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n \t\t\t\tpublic void onFailure(Throwable caught)\r\n \t\t\t\t{\n \t\t\t\t}",
"@Override\n \t\t\t\tpublic void onFailure(Throwable caught) {\n \n \t\t\t\t}",
"@Override\r\n\t\t\tpublic void onFailure(Throwable caught) {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onFailure(Throwable caught) {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onFailure(Throwable caught) {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onFailure(Throwable caught) {\n\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onFailure(Throwable caught) {\n\r\n\t\t\t}",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n\t\t\t\t\t\tpublic void onFailure(Throwable caught)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}",
"@Override\n public void onFailure(IMqttToken asyncActionToken,\n Throwable exception) {\n\n }",
"void onFailure(String description);",
"@Override\n public void onResponse(PersistentTasksCustomMetadata.PersistentTask<?> task) {\n onFailure.accept(exception);\n }",
"@Override\r\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onFailure(Throwable caught) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t\t\t}",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"@Override\n public void onFailure(@NonNull Exception exception) {\n }",
"public void onFailure(Throwable caught) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void onTaskFail() {\n\t\t\n\t}",
"public void onFailure(Throwable caught) {\n\t\t\t\t\t}",
"void onFailure() {\n\t}",
"@Override\r\n\t\t\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\r\n\t\t\t\t\t\t\t\t\t}",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n\t\t\t\t\tpublic void onFailure(Object o) {\n\t\t\t\t\t}",
"@Nullable\n public ApolloException awaitFailure() {\n Await.latch(failureLatch, waitTimeMs);\n return failureContainer.get();\n }",
"@Override\n public void onFailure(int arg0) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n public void onError(Throwable e)\n {\n if (e instanceof RestException)\n {\n promise.done(((RestException) e).getResponse());\n }\n else\n {\n promise.fail(e);\n }\n }",
"@Override\n public void onFailure(Throwable t) {\n errorOut();\n }",
"@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Log.d(\"mqtt\", \"onFailure\");\n\n }",
"public void onFailure(Throwable caught) {\n\r\n\t\t\t}",
"void async(Callback<T> success, Callback<Throwable> error);",
"@Override\n\t\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\n\n\t\t\t\t\t\t\t}",
"@Override\n public void onFailure(@NonNull Exception e) {\n }",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onFailure(HttpException arg0, String arg1) {\n\t\t\t\t\t\thandler.sendEmptyMessage(HANDLER_NET_FAILURE);\n\t\t\t\t\t}",
"@Override\n\t\tpublic void onFailure(HttpException error, String msg) {\n\t\t\t\n\t\t}",
"@Override\n public void onFailure(IMqttToken asyncActionToken, Throwable exception) {\n Log.d(LOG_TAG, \"onFailure\");\n exception.printStackTrace();\n\n }",
"@Override\n public void onFailure(@NonNull Exception e) {\n }"
] | [
"0.7258891",
"0.7085109",
"0.69852394",
"0.69325054",
"0.6906847",
"0.6764198",
"0.6759581",
"0.6729436",
"0.6729436",
"0.6729436",
"0.67207927",
"0.67139477",
"0.67139477",
"0.67139477",
"0.67139477",
"0.6678466",
"0.6675003",
"0.66547376",
"0.66547376",
"0.6646782",
"0.662323",
"0.662323",
"0.6616337",
"0.6615129",
"0.6615129",
"0.6612955",
"0.66068786",
"0.6596441",
"0.6596441",
"0.6595779",
"0.6595779",
"0.6595779",
"0.6595779",
"0.65955603",
"0.65955603",
"0.6588815",
"0.6588815",
"0.6585286",
"0.6580477",
"0.6564272",
"0.656365",
"0.65612257",
"0.6559",
"0.6556817",
"0.65480715",
"0.65480715",
"0.65480715",
"0.65422654",
"0.6540529",
"0.6540529",
"0.6540529",
"0.6540529",
"0.65326375",
"0.6529959",
"0.652893",
"0.652893",
"0.652893",
"0.652893",
"0.652893",
"0.65223974",
"0.65223974",
"0.65219843",
"0.65171176",
"0.6516343",
"0.6502677",
"0.6495629",
"0.6495629",
"0.64864856",
"0.64850795",
"0.64850795",
"0.64850795",
"0.64850795",
"0.64850795",
"0.64850795",
"0.64850795",
"0.64850795",
"0.64850795",
"0.64850795",
"0.6481335",
"0.6465113",
"0.64626503",
"0.6458927",
"0.6458215",
"0.64503604",
"0.6447389",
"0.64431876",
"0.6436787",
"0.64341486",
"0.64341486",
"0.6426925",
"0.64254737",
"0.6411794",
"0.64100254",
"0.63872826",
"0.6380204",
"0.63756824",
"0.6369491",
"0.6369491",
"0.63694763",
"0.63660294",
"0.63385475"
] | 0.0 | -1 |
This method handles the successfull result. | public void onSuccess(Object result) {
if (fileTypeName.equals(Constants.FILE_TYPES[0])) {
ScopeCache.getInstance().addScope(fileScopeName);
this.callback.addChild(new NavigationTreeNode(fileScopeName,
"scope:" + fileScopeName, "document", "folder.png",
null, true, "",true,new ScopeMenu(callback)));
} else {
if (ScopeCache.getInstance().addScope(fileScopeName)) {
this.callback.addChild(new NavigationTreeNode(fileScopeName,
"scope:" + fileScopeName, "document", "folder.png",
null, true, "",true,new ScopeMenu(callback)));
}
String name = fileName + "." + DocumentFileSuffixLookup.getSuffix(fileTypeName);
if (fileTypeName.equals(Constants.FILE_TYPES[1])) {
CKEditorFactory factory = CKEditorFactory.getInstance(fileScopeName,name);
this.callback.addPanel(new NavigationTreeNode(name,
fileScopeName + "/" + name, "scope:" + fileScopeName, "text-html.png",
factory, true, "",false, new DocumentMenu(fileScopeName,name,factory)),
(ConsolePanel)factory.create());
} else if (fileTypeName.equals(Constants.FILE_TYPES[2])) {
SpreadSheetEditorFactory factory = SpreadSheetEditorFactory.getInstance(fileScopeName,name);
this.callback.addPanel(new NavigationTreeNode(name,
fileScopeName + "/" + name, "scope:" + fileScopeName, "x-office-spreadsheet.png",
factory, true, "",false, new DocumentMenu(fileScopeName,name,factory)),
(ConsolePanel)factory.create());
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void doResult() throws Exception {\n\t\tJSONObject map=new JSONObject(getResult());\n\t\tif(!\"ok\".equalsIgnoreCase(map.getString(\"status\"))){\n\t\t\tdoFailureResult();\n\t\t\treturn;\n\t\t}\n\t\tif(getHandler()!=null){\n\t\t\tMessage hmsg=getHandler().obtainMessage();\n\t\t\thmsg.obj=map;\n\t\t\thmsg.arg1=1;\n\t\t\tgetHandler().sendMessage(hmsg);\n\t\t\tsetHandler(null);\n\t\t}\n\t}",
"protected void handleResultSuccessful(final T result) {\n\t\tgetContentResultHolder().setVisible(true);\n\t}",
"protected void onPostSuccess(Result result) {\n }",
"@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\n\t\t\t\t\t\t\t\t\t\t}",
"@Override\n public void onSuccess(RpcResult<Void> result) {\n handleIfFinished(null, isSucessful.get());\n }",
"@Override\n public void onSuccess() {\n }",
"@Override\n public void onSuccess() {\n }",
"@Override\n public void onSuccess() {\n }",
"@Override\n public void onSuccess() {\n }",
"@Override\n public void onSuccess() {\n }",
"@Override\n\t\t\tpublic void onSuccess(Void result) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onSuccess(Void result) {\n\t\t\t}",
"@Override\n\t\t\tpublic void onSuccess(Void result) {\n\t\t\t}",
"@Override\n public void onSuccess() {\n }",
"@Override\n public void onSuccess(ResultSet result) {\n }",
"@Override\n\t\t\t\t\t\tpublic void onSuccess(ResponseInfo<String> result) {\n\t\t\t\t\t\t\tToast.makeText(AddIncomeActivity.this, \"保存成功!\",\n\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t}",
"@Override\n public void onSuccess() {\n }",
"@Override\n\t\t\t\t\tpublic void onSuccess(String result) {\n\n\t\t\t\t\t}",
"@Override\n public void onSucceed(Object valor) {\n }",
"@Override\n public void onSuccess(SendResult<Integer, String> result) {\n handleSuccess(key, value, result);\n }",
"@Override\n public void onSuccess(SendResult<Integer, String> result) {\n handleSuccess(key, value, result);\n }",
"@Override\n public void onSuccess(String result) {\n }",
"@Override\n public void onSuccess(int arg0, Header[] arg1, byte[] arg2) {\n CustomDialog.closeProgressDialog();\n JSONObject jsonObject;\n try {\n postState = true;\n jsonObject = new JSONObject(new String(arg2));\n String code = (String) jsonObject.get(\"code\");\n String str = (String) jsonObject.get(\"retinfo\");\n if (Constant.RESULT_CODE.equals(code)) {\n CustomToast.showShortToast(mContext, str);\n Intent i = new Intent();\n i.putExtra(\"flage\", true);\n setResult(2016, i);\n CrmVisitorSignAddInfoActivity.this.finish();\n } else {\n CustomToast.showShortToast(mContext, str);\n }\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\t\t\t\t\t\t\tpublic void success(Collection<Photo> result) {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\tpublic void onSuccess(ArrayList<InformationRequestEntity> result) {\n\t\t\t\tupdatedView(result);\r\n\t\t\t\t// Window.alert(\"Successfully added new Information Request in\r\n\t\t\t\t// Updated list\");\r\n\t\t\t}",
"@Override\n public void onSuccess(Boolean result) {\n\n }",
"@Override\n public void processResult(HttpResponseMessage response) {\n }",
"@Override\n public void onSuccess(Boolean result)\n {\n if (result)\n {\n System.out.println(\"user info successfully updated!\");\n Window.alert(\"Successfully updated!\");\n }\n else\n {\n System.out.println(\"something is wrong on the server side!\");\n }\n }",
"@Override\r\n\t\t\tpublic void onSuccess(User result) {\n if (formData.getCreator() == null) {\r\n \tformData.setCreator(result);\r\n \t} else {\r\n \t\tformData.setChangedBy(result);\r\n \t}\r\n // submit the data\r\n formService.saveFormData(formData, new EmitAsyncCallback<FormData>() {\r\n @Override\r\n\t\t\t\t\tpublic void onSuccess(FormData result) {\r\n \tProgressIndicator.hideProgressBar();\r\n Window.alert(appMessages.dataSavedSucessfully(\"\"+result.getFormDataId()));\r\n RefreshablePublisher.get().publish(\r\n \t\tnew RefreshableEvent(RefreshableEvent.Type.CAPTURE, result));\r\n view.close(false);\r\n }\r\n });\r\n }",
"@Override\n\t\tpublic boolean isSuccess() {\n\t\t\treturn false;\n\t\t}",
"@Override\n\tpublic void onSuccess() {\n\n\t}",
"protected abstract void onCustomSuccess(T result);",
"@Override\n public void onSuccess() {\n Log.d(\"haha\", \"添加数据成功,返回objectId为:\" + p2.getObjectId());\n }",
"@Override\n public void onSuccess() {\n }",
"@Override\n public void success(String data) {\n }",
"@Override\n\t\t\t\t\tpublic void onSuccess(String result) {\n\t\t\t\t\t\tpath_of_uploaded_file = result;\n\t\t\t\t\t\tontology.get(ontology.size() - 1).setFilePath(result);\n\t\t\t\t\t\tWindow.alert(\"Pass\");\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 1, ontology_class);\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 2, property_resource);\n\t\t\t\t\t\tgreetingService.greetServer(list, path_of_uploaded_file, 3, property_literal);\n\n\t\t\t\t\t\tontologies.addItem(ontology.get(ontology.size() - 1).getName());\n\n\t\t\t\t\t\t// logger.log(Level.SEVERE, baseURI);\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\t\tpublic void onSuccess(ObtenerEntidadDeCsvResult result) {\n\r\n\t\t\t\t\t}",
"@Override\n public void onSucces(String result) {\n JSONObject object = new JSONObject();\n boolean isSuccess = object.optBoolean(result);\n Log.hb(\"orderDetailBean.order_info.status after::\"+orderDetailBean.order_info.status);\n finish();\n }",
"public void onSuccess(Object result) {\n\t\t}",
"public void onSuccess(Object result) {\n\t\t}",
"public void onSuccess(Object result) {\n\t\t}",
"@Override\n\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t}",
"@Override\n\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t}",
"@Override\n\tprotected void handleResult(JSONObject obj) {\n\t\t\n\t}",
"@Override\n\t\t\t\tprotected void onPostExecute(Void result)\n\t\t\t\t{\n\t\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\t}",
"@Override\n protected void onPostExecute(String result) {\n\n }",
"@Override\n protected void onPostExecute(String result) {\n\n }",
"@Override\n\tpublic void finishSuccess() {\n\t\tSystem.err.println(\"finishSuccess\");\n\n\t}",
"@Override\n\tpublic void endSuccess() {\n\t\t\n\t}",
"@Override\n\t\t\t\t\tpublic void onSuccess(Object t) {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tJSONObject jsonObject = new JSONObject(t.toString());\n\t\t\t\t\t\t\tString code = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"code\");\n\t\t\t\t\t\t\tString msg = JsonGetInfo.getJsonString(jsonObject,\n\t\t\t\t\t\t\t\t\t\"msg\");\n\t\t\t\t\t\t\tif (!\"\".equals(msg)) {\n\t\t\t\t\t\t\t\tToast.makeText(SaveReceipptActivity.this, msg,\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (\"1\".equals(code)) {\n\t\t\t\t\t\t\t\tsetResult(1);\n\t\t\t\t\t\t\t\tfinish();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\tsuper.onSuccess(t);\n\t\t\t\t\t}",
"@Override\r\n\tprotected void processOk() {\n\t\tboolean isExito = consultarSustentoProxy.isExito();\r\n\t\tif (isExito) {\r\n\t\t\tint status = consultarSustentoProxy.getResponse().getStatus();\r\n\t\t\tif (status == 0) {\r\n\t\t\t\tList<SustentoTO> sustento = consultarSustentoProxy.getResponse().getListaSustento();\r\n\t\t\t\tadap = new EfficientAdapter(this, sustento);\r\n\t\t\t\tsetListAdapter(adap);\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tshowToast(consultarSustentoProxy.getResponse().getDescripcion());\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{\r\n\t\t\tprocessError();\r\n\t\t}\r\n\t\tsuper.processOk();\r\n\t}",
"@Override\n\t\t\t\tpublic void onSuccess(String[] result) {\n\t\t\t\t\tWindow.alert(\"UPLOADED\");\n\t\t\t\t}",
"@Override\r\n\t\tprotected void onPostExecute(Void result)\r\n\t\t{\n\t\t}",
"@Override\n protected void onPostExecute(Boolean result) {\n }",
"@Override\n protected void onPostExecute(Boolean result) {\n }",
"@Override\r\n public void onSuccess(RestRequest request, RestResponse result) {\n result.consumeQuietly();\r\n runOnUiThread(new Runnable() {\r\n\r\n @Override\r\n public void run() {\r\n // Network component doesn’t report app layer status.\r\n // Use the Mobile SDK RestResponse.isSuccess() method to check\r\n // whether the REST request itself succeeded.\r\n\r\n try {\r\n\r\n Log.d(\"APITest\", \"success entered\");\r\n\r\n }\r\n catch (Exception e) {\r\n //showError(MainActivity.this, e);\r\n }\r\n\r\n }\r\n });\r\n\r\n }",
"protected void handleResult(String result) {}",
"@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\tcRequesttype = true;\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}",
"@Override\n public void onSuccess(Void unused) {\n finish();\n }",
"@Override\n public void onSuccess(Void unused) {\n finish();\n }",
"@Override\n protected void onPostExecute(String result) {\n }",
"@Override\n protected void onPostExecute(String result) {\n }",
"@Override\n protected void onPostExecute(String result) {\n }",
"@Override\r\n\t\tprotected void onPostExecute(Void result) \r\n\t\t{\n\t\t}",
"@Override\n public void completed(Integer result, String attachment)\n {\n }",
"@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] response) {\n // Hide Progress Dialog\n prgDialog.hide();\n // try {\n // JSON Object\n// String str=new String(response);\n// JSONObject obj = new JSONObject(str);\n // When the JSON response has status boolean value assigned with true\n if(statusCode==200){\n\n // Display successfully registered message using Toast\n Toast.makeText(getApplicationContext(), \"Thanks for the Donation.Our representative will contact you shortly :)\", Toast.LENGTH_LONG).show();\n navigateToHomeActivity();\n }\n\n }",
"@Override\n public String execute() {\n return \"success\";\n }",
"@Override\r\n\t\t\t\t\tpublic void onSuccess(int statusCode, Header[] headers,\r\n\t\t\t\t\t\t\tJSONArray response) {\n\t\t\t\t\t\trepairInitLayout.setVisibility(View.GONE);\r\n\t\t\t\t\t\trepairInitBelowLayout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\trepairInitBelow2Layout.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t\tgetTopicDetailsInfos(response,\"init\");\r\n\t\t\t\t\t\tFlag = \"ok\";\r\n\t\t\t\t\t\tcRequesttype = true;\r\n//\t\t\t\t\t\tmaddapter.notifyDataSetChanged();\r\n\t\t\t\t\t\tsuper.onSuccess(statusCode, headers, response);\r\n\t\t\t\t\t}",
"@Override\r\n public void onResult(boolean result)\r\n {\n if (result) {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Successfully\"));\r\n } else {\r\n handler.sendMessage(handler.obtainMessage(SHOWTOAST, \"Set Fail\"));\r\n }\r\n }",
"public boolean performOk() {\r\n\t\treturn super.performOk();\r\n\t}",
"public void onSuccess(List<ContactDTO> result)\n {\n int size = result.size();\n if (endIndex >= 0)\n {\n if (endIndex < startIndex)\n {\n size = 0;\n }\n else\n {\n size = endIndex - startIndex + 1;\n }\n }\n // Create list for return - it is just requested records\n ListGridRecord[] list = new ListGridRecord[size];\n if (size > 0)\n {\n for (int i = 0; i < result.size(); i++)\n {\n if (i >= startIndex && i <= endIndex)\n {\n ListGridRecord record = new ListGridRecord();\n copyValues(result.get(i), record);\n list[i - startIndex] = record;\n }\n }\n }\n response.setStatus(RPCResponse.STATUS_SUCCESS);\n response.setData(list);\n // IMPORTANT: for paging to work we have to specify size of full\n // result set\n response.setTotalRows(result.size());\n processResponse(requestId, response);\n }",
"@Override\n public void onSetSuccess() {\n }",
"@Override\n public void onSetSuccess() {\n }",
"@Override\n protected void onPostExecute(Integer result) {\n super.onPostExecute(result);\n }",
"@Override\n\t\t\tpublic void uploadSuccess(DefaultPutRet ret) {\n\t\t\t\tSystem.out.println(ret.key+\" uoload sucess!!!\");\n\t\t\t\tsynchronized (this) {\n int row = fileKeys.indexOf(ret.key);\n resultTable.setValueAt(\"finish\", row, 2);\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t protected void onPostExecute(Boolean result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\t\n\t\t }",
"@Override\n\t\tpublic void onSuccess(Article result) {\n\t\t\tWindow.alert(result.toString());\n\t\t}",
"protected abstract void handleOk();",
"public void setResult() {\n }",
"@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t}",
"@Override\n\t\tprotected void onPostExecute(Void result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t}",
"@Override\n public void onSuccess(Object result, List params) {\n }",
"@Override\n public void onResponseSuccess(final String resp) {\n }",
"@Override\n protected void onPostExecute(Result result) {\n super.onPostExecute(result);\n isComplete = true;\n if (isCancelled() || isAborted()) {\n return;\n }\n\n if (exception != null) {\n onPostFault(exception);\n if (exceptionListener != null)\n exceptionListener.onException(exception);\n }\n\n // SUCCESS!\n else {\n onPostSuccess(result);\n if (completeListener != null) {\n completeListener.onComplete(result);\n }\n }\n }",
"@Override\n\t\t\t\t\tpublic void onSuccess(Integer result) {\n\t\t\t\t\t\tif (result == 0) {\n\t\t\t\t\t\t\tgetApplyDialog();\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToastUtil.showToast(context, \"无法获取游戏信息\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}",
"@Override\n\t\tprotected void onPostExecute(String result) {\n\t\t\tsuper.onPostExecute(result);\n\t\t\t\n\t\t\tif(response1.contains(\"success\"))\n\t\t\t{\n\t\t\t\trg_parsingmethod();\n\t\t\t}\n\t\t\telse {\n\t\t\t\tToast.makeText(getApplicationContext(), \"No new registrations\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}",
"@Override\n public void onSuccess(AuthResult authResult) {\n\n }",
"@Override\r\n\t\tprotected void onPostExecute(Object result) {\n\t\t\tsuper.onPostExecute(result);\r\n\t\t\tif (result != null && (Boolean) result) {\r\n\t\t\t\tIntent intent = new Intent();\r\n\t\t\t\tBundle bundle = new Bundle();\r\n\t\t\t\tbundle.putString(MainActivity.TAG, \"1000\");\r\n\t\t\t\tintent.putExtras(bundle);\r\n\t\t\t\tintent.setAction(ReciverContents.PaySuccess);\r\n\t\t\t\tactivcty.sendBroadcast(intent);\r\n\t\t\t}\r\n\r\n\t\t}",
"@Override\n public void onSuccess(int statusCode, Header[] headers, JSONObject response) {\n Toast.makeText(getActivity().getApplicationContext(),\n \"Jam SUCCEEDED!\", Toast.LENGTH_SHORT)\n .show();\n }",
"@Override\n\t\t\tpublic void onSuccess() {\n\t\t\t\tToast.makeText(MainActivity.this, \"submit success\", Toast.LENGTH_LONG).show();\n\t\t\t}",
"@Override\n public void onSuccess(Void aVoid) {\n finish();\n }",
"protected boolean gotResult (SurveyQuestion result) {\n _cache.questionUpdated(_survey, _questionIndex, result);\n Link.replace(Pages.ADMINZ, \"survey\", \"e\", _survey.surveyId);\n return true;\n }",
"@Override\n\t\tpublic void onSuccess(ResponseInfo<String> arg0)\n\t\t{\n\t\t\tHealthUtil.LOG_D(getClass(), \"result=\" + arg0.result);\n\t\t\tif (dialog.isShowing())\n\t\t\t{\n\t\t\t\tdialog.cancel();\n\t\t\t}\n\t\t\tswitch (responseCode)\n\t\t\t{\n\t\t\tcase GET_LIST:\n\t\t\t\treturnMsg(arg0.result, GET_LIST);\n\t\t\t\tbreak;\n\t\t\tcase GET_LIST_MORE:\n\t\t\t\treturnMsg(arg0.result, GET_LIST_MORE);\n\t\t\t\tbreak;\n\t\t\tcase ADD_REGISTER_ORDER:\n\t\t\t\treturnMsg(arg0.result, ADD_REGISTER_ORDER);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}",
"void onComplete(ResultModel result);",
"@Override\n public void onSuccess(Void v) {\n }",
"@Override\r\n\t\t\tpublic void onSuccess(Void result) {\n\t\t\t\tsynAlert.clear();\r\n\t\t\t\tauthenticationController.initializeFromExistingAccessTokenCookie(new AsyncCallback<UserProfile>() {\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\tsynAlert.handleException(caught);\r\n\t\t\t\t\t\tview.showLogin();\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t@Override\r\n\t\t\t\t\tpublic void onSuccess(UserProfile result) {\r\n\t\t\t\t\t\t// Signed ToU. Check for temp username, passing record, and then forward\r\n\t\t\t\t\t\tuserAuthenticated();\r\n\t\t\t\t\t}\r\n\t\t\t\t});\r\n\t\t\t}",
"@Override\n public void onSuccess(int statusCode, Header[] headers, byte[] server_response) {\n try {\n progress.dismiss();\n String response = String.valueOf(new String(server_response, \"UTF-8\"));\n // parse response\n XMLParser parser = new XMLParser();\n Document doc = parser.getDomElement(response, url);\n\n if (doc == null) {\n Dialog.simpleWarning(Lang.get(\"returned_xml_failed\"));\n } else {\n NodeList successNode = doc.getElementsByTagName(\"success\");\n if (successNode.getLength() > 0) {\n Element success = (Element) successNode.item(0);\n Config.context.setTitle(Title);\n\n login_form.setVisibility(View.VISIBLE);\n profile_layer.setVisibility(View.GONE);\n\n Account.logout();\n\n Dialog.toast(success.getTextContent());\n\n menu_logout.setVisible(false);\n menu_remove_account.setVisible(false);\n\n if (Config.activeInstances.contains(\"MyListings\")) {\n Config.activeInstances.remove(\"MyListings\");\n MyListings.removeInstance();\n\n Utils.removeContentView(\"MyListings\");\n }\n loginForm(login_form, Config.context);\n\n LoginManager.getInstance().logOut();\n dialog.dismiss();\n } else {\n NodeList errorNode = doc.getElementsByTagName(\"error\");\n\n if (errorNode.getLength() > 0) {\n // handle errors\n Element error = (Element) errorNode.item(0);\n Dialog.simpleWarning(Lang.get(error.getTextContent()));\n }\n }\n }\n\n } catch (UnsupportedEncodingException e1) {\n\n }\n }",
"@Override\n\t\t\tprotected void onPostExecute(String result) {\n\t\t\t\tsuper.onPostExecute(result);\n\t\t\t\tprogressDialog1.dismiss();\n\t\t\t\t\n\t\t\t\tif (result.length() != 0) {\n\t\t\t\t\tprogressDialog1.dismiss();\n\t\t\t\t\tLog.e(\"http response is \", result);\n\t\t\t\t\tSystem.out.println(\"order request result -----> \" + result);\n\n\t\t\t \tcheckingStatusCode(result);\n\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\t\t\t\tpublic void onSuccess(ResponseInfo<String> arg0) {\n\t\t\t\t\t\t\tnew HttpResultService(arg0.result,\n\t\t\t\t\t\t\t\t\tnew myHttpResultCallBack() {\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onData(boolean validity,\n\t\t\t\t\t\t\t\t\t\t\t\tObject obj) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tsuper.onData(validity, obj);\n\t\t\t\t\t\t\t\t\t\t\tif (validity) {\n\t\t\t\t\t\t\t\t\t\t\t\tArrayList<Recv_phoneCheck> list = (ArrayList<Recv_phoneCheck>) obj;\n\t\t\t\t\t\t\t\t\t\t\t\tfor (Recv_phoneCheck item : list) {\n\t\t\t\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tDao_Contacts\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.updatePhoneIfo(item);\n\t\t\t\t\t\t\t\t\t\t\t\t\t} catch (DbException e) {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// catch block\n\t\t\t\t\t\t\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tP.v(getClass()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t.getName()\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t+ \"更新数据失败\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onSuccess() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onRequestFail() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\t\t\t\tpublic void onFinally() {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\t\t\tupLoadPhones();\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}, Recv_phoneCheck.class, true);\n\t\t\t\t\t\t}",
"@Override\n public void onSuccess(int statusCode, cz.msebera.android.httpclient.Header[] headers, JSONObject response) {\n try {\n String status = response.getString(\"status\");\n if (status.contains(\"status not ok\")) {\n lt.error();\n Toast.makeText(activity, response.getString(\"error\"), Toast.LENGTH_LONG).show();\n } else {\n lt.success();\n }\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }",
"@Override\n\t protected void onPostExecute(String result) {\n\t }"
] | [
"0.71076566",
"0.70606345",
"0.6971303",
"0.6893712",
"0.68533766",
"0.677328",
"0.677328",
"0.677328",
"0.677328",
"0.6753911",
"0.67520005",
"0.67520005",
"0.67520005",
"0.66750187",
"0.66698164",
"0.66662604",
"0.6665839",
"0.66634566",
"0.665027",
"0.66237676",
"0.66237676",
"0.6616913",
"0.6611966",
"0.66013783",
"0.6600711",
"0.6587891",
"0.65786135",
"0.6564318",
"0.6498553",
"0.6493922",
"0.6473044",
"0.6437159",
"0.64367396",
"0.64324653",
"0.64239806",
"0.6410257",
"0.63969445",
"0.6395367",
"0.6388677",
"0.6388677",
"0.6388677",
"0.6354274",
"0.6354274",
"0.6345404",
"0.63430923",
"0.6325987",
"0.6325987",
"0.6318304",
"0.63126147",
"0.62969136",
"0.62911594",
"0.6279523",
"0.6278401",
"0.6274964",
"0.6274964",
"0.6266915",
"0.62500316",
"0.624373",
"0.6233316",
"0.6233316",
"0.6229723",
"0.6229723",
"0.6229723",
"0.6224825",
"0.6219133",
"0.6215938",
"0.6212826",
"0.6212206",
"0.6206866",
"0.6205916",
"0.62009704",
"0.6200792",
"0.6200792",
"0.61984986",
"0.6197331",
"0.61960644",
"0.61878884",
"0.6186111",
"0.6182195",
"0.6180158",
"0.6180158",
"0.61795014",
"0.61733305",
"0.61717224",
"0.61687654",
"0.6161186",
"0.61497265",
"0.61337996",
"0.6132661",
"0.6123468",
"0.61223096",
"0.6113378",
"0.61121136",
"0.60985374",
"0.6092168",
"0.60913086",
"0.60658956",
"0.6058528",
"0.60533875",
"0.60525143",
"0.60519546"
] | 0.0 | -1 |
Gets the path to the cache directory and pass it to deleteDir | public static void deleteCache(Context context) {
try {
File dir = context.getExternalCacheDir();
deleteDir(dir);
} catch (Exception e) { e.printStackTrace();}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic File getCacheDir() {\r\n\t\treturn CommonUtil.getCacheDir();\r\n\t}",
"private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}",
"protected File getCacheDirectory() {\n \t\treturn Activator.getDefault().getStateLocation().append(\"cache\").toFile(); //$NON-NLS-1$\n \t}",
"private File getCacheDir(Context context, String uniqueName) {\n\t\tStringBuilder cachePath = new StringBuilder();\n\t\tif(Environment.getExternalStorageState().equals(Environment.MEDIA_MOUNTED) || !Environment.isExternalStorageRemovable()){//API9\n\t\t\tcachePath.append(context.getExternalCacheDir().getPath());\n\t\t} else {\n\t\t\tcachePath.append(context.getCacheDir().getPath());\n\t\t}\n\t return new File(cachePath.toString() + File.separator + uniqueName);\n\t}",
"private static File createReserveDiskCacheDir(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context, false);\n\t\tFile individualDir = new File(cacheDir, \"lazy-cache\");\n\t\tif (individualDir.exists() || individualDir.mkdir()) {\n\t\t\tcacheDir = individualDir;\n\t\t}\n\t\treturn cacheDir;\n\t}",
"private static File getExternalCacheDir(Context context) {\n // TODO: This needs to be moved to a background thread to ensure no disk access on the\n // main/UI thread as unfortunately getExternalCacheDir() calls mkdirs() for us (even\n // though the Volley library will later try and call mkdirs() as well from a background\n // thread).\n return context.getExternalCacheDir();\n }",
"public static void deleteCache(Context context){\n File baseDir = getResourcesFolder(context);\n //basDir could be null if storage has not yet been selected (extreme cases where memory is too low)\n if(baseDir != null) {\n File[] content = baseDir.listFiles();\n if(content != null)\n for (File file : content)\n deleteRecursively(file);\n }\n }",
"public static void deleteCache(Context context) {\n Glide.get(context).clearMemory();\n\n try {\n File dir = context.getCacheDir();\n deleteDir(dir);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n\n }",
"public static void deleteCache(Context context) {\n try {\n File dir = context.getCacheDir();\n deleteDir(dir);\n } catch (Exception e) {}\n }",
"public synchronized void deleteCache() {\n\n for (final File f : Constants.CACHE_LOCATION.listFiles()) {\n if (!f.isDirectory()) {\n f.delete();\n }\n }\n\n logsByCharacterMap = Collections.emptyMap();\n }",
"public static File getExternalCacheDir(Context context) {\n\t\t// if (hasExternalCacheDir()) {\n\t\t// return context.getExternalCacheDir();\n\t\t// }\n\t\t// Before Froyo we need to construct the external cache dir ourselves\n\t\tfinal String cacheDir = FileUtils.sdPath + \"/pic_cache/\";\n\t\treturn new File(cacheDir);\n\t}",
"void deleteCache(URI location) {\n \t\tFile cacheFile = getCache(location);\n \t\t// delete the cache file if it exists\n \t\tsafeDelete(cacheFile);\n \t\t// delete a resumable download if it exists\n \t\tsafeDelete(new File(new File(cacheFile.getParentFile(), DOWNLOADING), cacheFile.getName()));\n \t}",
"public void clearDiskCache()\n {\n clearCache(cacheDirectory);\n }",
"public File getLocalCacheDirectory() {\n return pathsProvider.getLocalAcmCacheDir();\n }",
"@Override\r\n\tpublic void remDir(String path) {\n\t\t\r\n\t}",
"public static File getExternalCacheDir(Context context) {\n\n\t\tif (VersionUtils.hasFroyo()) {\n\t\t\treturn context.getExternalCacheDir();\n\n\t\t}\n\t\t// Before Froyo we need to construct the external cache dir ourselves\n\n\t\tfinal String cacheDir = \"/Android/data/\" + context.getPackageName() + \"/cache/\";\n\n\t\treturn new File(Environment.getExternalStorageDirectory().getPath() + cacheDir);\n\n\t}",
"public static void setImageIOCacheDir() {\n final String tmpDirProperty = System.getProperty(\"java.io.tmpdir\");\n if(tmpDirProperty == null || \"\".equals(tmpDirProperty)) {\n return;\n }\n // ensure that temp-dir exists because ImageIO requires it\n File tmpDir = new File(tmpDirProperty);\n if(!tmpDir.exists() && !tmpDir.mkdirs()) {\n throw new IllegalStateException(\"Could not create temporary directory \" + tmpDirProperty + \", full path \" + tmpDir.getAbsolutePath());\n }\n ImageIO.setCacheDirectory(tmpDir);\n }",
"public String nextCacheDir() {\n if (cacheDir != null) return cacheDir;\n // assign cacheDir\n int nVer = nextVersion();\n cacheDir = CacheDirectory.cacheDirName(identity, nVer+\"\");\n return cacheDir;\n }",
"public boolean clearCache() {\n File directory=new File(cacheDirectory);\n File[] files=directory.listFiles();\n boolean alldeleted=true;\n for (File file:files) {\n if (!engine.deleteTempFile(file)) { // this will delete files recursively for directories\n engine.logMessage(\"SYSTEM ERROR: Unable to delete cache for: \"+file.getAbsolutePath());\n alldeleted=false; \n }\n }\n return alldeleted;\n }",
"public File getDefaultDiskCacheDir() {\n if (mContext == null)\n throw new FIllegalArgumentException(\"Context can not be null\");\n return DiskCacheUtil.getDiskLruCacheDir(mContext);\n }",
"public static File getDiskCachePath(Context context, String uniqueName) {\n\n\t\t// Check if media is mounted or storage is built-in, if so, try and use\n\t\t// external cache dir\n\t\t// otherwise use internal cache dir\n\t\tfinal String cachePath = Utils.isExternalStorageMounted() ? Utils.getExternalCacheDir(context).getPath() : context\n\t\t\t\t.getCacheDir().getPath();\n\n\t\treturn new File(cachePath + File.separator + uniqueName);\n\t}",
"void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }",
"@Override\n\tpublic void delete()\n\t{\n\t\tcachedContent = null;\n\t\tFile outputFile = getStoreLocation();\n\t\tif ((outputFile != null) && outputFile.exists())\n\t\t{\n\t\t\tif (Files.remove(outputFile) == false)\n\t\t\t{\n\t\t\t\tlog.error(\"failed to delete file: \" + outputFile.getAbsolutePath());\n\t\t\t}\n\t\t}\n\t}",
"private static void clearCache(File cacheDir)\n {\n // Get the list of the files in the cache folder\n final File[] files = cacheDir.listFiles();\n\n // Perform a for loop to delete/remove all files\n for (File file : files)\n {\n file.delete();\n }\n // end of for (int i=0; i<files.length; i++)\n }",
"File prepareTempSourceDirectory() throws FileNotFoundException, IOException{\n\t\tFile tempfile = null;\n\t\tFile tempdir = null;\n\t\ttempfile = File.createTempFile(\"temp\", \"Delete\");\n\t\ttempdir = tempfile.getParentFile();\n\t\ttempfile.delete();\n\t\ttempdir = new File(tempdir, \"SAFS_UPDATE\");\n\t\ttempdir.mkdir();\n\n\t\tFile[] files = tempdir.listFiles();\n\t\tif(files != null && files.length > 0){\n\t\t\tfor(File file:files){\n\t\t\t\tif(file.isDirectory()) {\n\t\t\t\t\ttry{\n\t\t\t\t\t\tFileUtilities.deleteDirectoryRecursively(file.getAbsolutePath(), false);\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\t// java.lang.NoClassDefFoundError\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\ttry{\n\t\t\t\t\t\tfile.delete();\n\t\t\t\t\t}catch(Throwable x){\n\t\t\t\t\t\terrors.println(x.getClass().getName()+\": \"+x.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif(tempdir==null || !tempdir.isDirectory()) throw new IOException(\"Cannot deduce a root source directory for HTTP extraction.\");\n\t\treturn tempdir;\n\t}",
"public static void clear() {\n\t\tmemoryCache.clear();\n\n\t\t// Remove everything from file cache\n\t\tFile cachedFileDir = new File(diskCachePath);\n\t\tif (cachedFileDir.exists() && cachedFileDir.isDirectory()) {\n\t\t\tFile[] cachedFiles = cachedFileDir.listFiles();\n\t\t\tfor (File f : cachedFiles) {\n\t\t\t\tif (f.exists() && f.isFile()) {\n\t\t\t\t\tf.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static File createDownloadsPath(Activity activity, String[] urlDir) {\n\t\tFile path = null;\n\t\tFile cacheDir = null;\n\t\tif (sdAvailableWrite()) {\n\t\t\tpath = activity\n\t\t\t\t\t.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);\n\t\t\tcacheDir = new File(path + File.separator + \"santos\"\n\t\t\t\t\t+ File.separator + \"cache\" + File.separator\n\t\t\t\t\t+ urlDir[urlDir.length - 2]);\n\t\t} else {\n\t\t\tpath = Environment.getDataDirectory();\n\t\t\tcacheDir = new File(path + File.separator + \"data\" + File.separator\n\t\t\t\t\t+ \"com.es.santosinocentes\" + File.separator + \"cache\"\n\t\t\t\t\t+ File.separator + urlDir[urlDir.length - 2]);\n\t\t}\n\t\treturn cacheDir;\n\t}",
"public final String getCachePath() {\n\t\treturn cachePath;\n\t}",
"void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }",
"public String getFileSystemPath() {\n return getCacheDir().getAbsolutePath()\n + File.separator\n + getItemPath();\n }",
"public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}",
"private String getDownloadDir() throws IOException {\n if (!\"mounted\".equals(Environment.getExternalStorageState())) {\n return null;\n }\n String str = this.webView.getContext().getExternalFilesDir(null) + \"/socialsharing-downloads\";\n createOrCleanDir(str);\n return str;\n }",
"public void customRootDir() {\n //Be careful with case when res is false which means dir is not valid.\n boolean res = KOOM.getInstance().setRootDir(this.getCacheDir().getAbsolutePath());\n }",
"Object getDir();",
"@Override\n\tpublic synchronized void clear() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files != null) {\n\t\t\tfor (File file : files) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tmEntries.clear();\n\t\tmTotalSize = 0;\n\t\tVolleyLog.d(\"Cache cleared.\");\n\t}",
"public String getDir();",
"@VisibleForTesting\n public static void clearCachedPaths() {\n requireNonNull(CACHE, \"CACHE\");\n CACHE.asMap().clear();\n }",
"void invalidateCache( Path project );",
"public void createOrReadCache() {\n\t\tList<String> cachedDirectoryPaths = new ArrayList<>();\n\t\tFile file = new File(LevelEditor.SAVED_PATH_DATA);\n\t\tif (!file.exists()) {\n\t\t\t// Set the default paths first\n\t\t\tFileControl.lastSavedDirectory = new File(LevelEditor.defaultPath);\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\n\t\t\tcachedDirectoryPaths.add(FileControl.lastSavedDirectory.getAbsolutePath());\n\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"rw\")) {\n\t\t\t\tthis.storeCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"r\")) {\n\t\t\t\tthis.fetchCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\n\t\t\tFileControl.lastSavedDirectory = new File(cachedDirectoryPaths.get(LevelEditor.FileControlIndex));\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\t\t}\n\t}",
"private Step deleteLocalWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_LOCAL_WORK_DIR)\n .tasklet(deleteLocalWorkingDir)\n .build();\n }",
"public static void setDiskCacheDir(String dir) {\n sDiskCacheDir = dir;\n }",
"@Override\n public int clear() {\n return deleteContents(getCacheDir());\n }",
"static File m61441b(Context context) {\n File file = new File(context.getApplicationContext().getCacheDir(), \"picasso-cache\");\n if (!file.exists()) {\n file.mkdirs();\n }\n return file;\n }",
"public void clearCache() {\n\tmyCachedCrum = null;\n\tmyCachedRoot = null;\n\tmyCachedPath = MuSet.make();\n/*\nudanax-top.st:13116:CanopyCache methodsFor: 'operations'!\n{void} clearCache\n\t\"Clear the cache because the canopy has\n\t changed. This ought to destroy the cachedPath. \n\t This must be cleared after every episode!!!!!!\"\n\tmyCachedCrum _ NULL.\n\tmyCachedRoot _ NULL.\n\tmyCachedPath _ MuSet make.!\n*/\n}",
"String getDir();",
"public deleteDir_args(deleteDir_args other) {\n if (other.isSetAccessToken()) {\n this.accessToken = other.accessToken;\n }\n if (other.isSetPath()) {\n this.path = other.path;\n }\n }",
"private Step deleteHdfsWorkingDir() {\n return stepBuilderFactory.get(STEP_DELETE_HDFS_WORK_DIR)\n .tasklet(deleteHdfsWorkingDir)\n .build();\n }",
"public File getCacheRoot()\r\n {\r\n return cache.getCacheRoot();\r\n }",
"public void clearCache();",
"void deleteTagDirectory() {\n\n try {\n\n Log.i(\"Deleting Tag Directory\", tag_directory.toString());\n FileUtils.deleteDirectory(tag_directory);\n } catch (IOException e) {\n\n }\n\n }",
"private void removePolicyContextDirectory(){\n\tString directoryName = getContextDirectoryName();\n\tFile f = new File(directoryName);\n\tif(f.exists()){\n\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] files = f.listFiles();\n if (files != null && files.length > 0) {\n for (int i = 0; i < files.length; i++) {\n files[i].delete();\n }\n }\n //WORKAROUND: End \n\n\t if (!f.delete()) {\n String defMsg = \"Failure removing policy context directory: \"+directoryName;\n String msg=localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\tlogger.log(Level.SEVERE,msg);\n\t\tthrow new RuntimeException(defMsg);\n\t } else if(logger.isLoggable(Level.FINE)){\n\t\tlogger.fine(\"JACC Policy Provider: Policy context directory removed: \"+directoryName);\n\t }\n\n File appDir = f.getParentFile();\n // WORKAROUND: due to existence of timestamp file in given directory\n // for SE/EE synchronization\n File[] fs = appDir.listFiles();\n if (fs != null && fs.length > 0) {\n boolean hasDir = false;\n for (int i = 0; i < fs.length; i++) {\n if (fs[i].isDirectory()) {\n hasDir = true;\n break;\n }\n }\n if (!hasDir) {\n for (int i = 0; i < fs.length; i++) {\n fs[i].delete();\n }\n }\n }\n //WORKAROUND: End \n\n File[] moduleDirs = appDir.listFiles();\n if (moduleDirs == null || moduleDirs.length == 0) {\n if (!appDir.delete()) {\n String defMsg = \"Failure removing policy context directory: \" + appDir;\n String msg = localStrings.getLocalString(\"pc.file_delete_error\", defMsg);\n\t\t logger.log(Level.SEVERE,msg);\n\t\t throw new RuntimeException(defMsg);\n }\n }\n\t}\n }",
"private boolean deleteFilesNow(File cacheFile)\r\n {\r\n CacheFileProps props = new CacheFileProps(cacheFile);\r\n props.delete();\r\n long fileSize = cacheFile.length();\r\n boolean deleted = cacheFile.delete();\r\n if (deleted)\r\n {\r\n numFilesDeleted++;\r\n sizeFilesDeleted += fileSize;\r\n Deleter.deleteEmptyParents(cacheFile, cache.getCacheRoot());\r\n }\r\n \r\n return deleted;\r\n }",
"static File requestNewResourcesFolder(Context context){\n SharedPreferences sharedPreferences = context.getSharedPreferences(Values.PREFERENCES_NAME, Context.MODE_PRIVATE);\n File downloadPath = null;\n File[] folders = context.getExternalFilesDirs(null);\n if(hasWritableSd(context) && checkAvailableSpace(folders[1], 10)){\n downloadPath = folders[1];\n sharedPreferences.edit().putString(Values.DOWNLOAD_LOCATION, Values.LOCATION_EXTERNAL).apply();\n }\n else{\n if(checkAvailableSpace(folders[0], 10)){\n downloadPath = folders[0];\n sharedPreferences.edit().putString(Values.DOWNLOAD_LOCATION, Values.LOCATION_INTERNAL).apply();\n }\n }\n return downloadPath;\n }",
"void clearCache();",
"void clearCache();",
"public static String createFilePath(File cacheDir, String imageKey)\n {\n try\n {\n // Get the ABsolute Path of the Cache Directory. E.g /root/......\n String absolutePath = cacheDir.getAbsolutePath();\n // Use URLEncoder to make sure the file name is valid\n String validFileName = URLEncoder.encode(imageKey, \"UTF-8\");\n // Construct File Path\n return absolutePath + File.separator + validFileName;\n }\n catch (UnsupportedEncodingException e)\n {\n Log.e(\"DiskLruCache\", \"createFilePath - \" + e);\n }\n\n return null;\n }",
"public static void deleteTempMapset() {\r\n if ((getGrassMapsetFolder() != null) && (getGrassMapsetFolder().length() > 2)) {\r\n String tmpFolder;\r\n tmpFolder = new String(getGrassMapsetFolder().substring(0, getGrassMapsetFolder().lastIndexOf(File.separator)));\r\n if (new File(tmpFolder).exists()) {\r\n deleteDirectory(new File(tmpFolder));\r\n }\r\n }\r\n }",
"public List<File> listCacheDirs() {\n List<File> cacheDirs = new ArrayList<File>();\n File file = new File(parent);\n if(file.exists()) {\n File[] files = file.listFiles(new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n // TODO Auto-generated method stub\n return pathname.isDirectory() && \n pathname.getName().startsWith(CacheDirectory.cacheDirNamePrefix(identity));\n }\n \n });\n cacheDirs = Arrays.asList(files);\n }\n return cacheDirs;\n }",
"public static void initCacheFileByData(Context context) {\n\t\tfinal String imageDir = getAppFilesDirByData(context)+ CACHE_IMG_DIR_PATH;\n\t\tfinal File imageFileDir = new File(imageDir);\n\t\tif (!imageFileDir.exists()) {\n\t\t\timageFileDir.mkdirs();\n\t\t}\n\t}",
"public void deleteStorage() {\n deleteReportDir(reportDir_);\n reportDir_ = null;\n deleteReportDir(leftoverDir_);\n leftoverDir_ = null;\n }",
"@Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {\n try {\n try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {\n for (Path path : files)\n Files.delete(path);\n }\n }\n catch (IOException e) {\n throw new IgniteCheckedException(\"Failed to cleanup checkpoint directory from temporary files: \" + cpDir, e);\n }\n }",
"@Override\n public String getTempDir() {\n return Comm.getAppHost().getTempDirPath();\n }",
"@Test\n public void testGetDataAccessResultsDir() throws IOException {\n System.out.println(\"getDataAccessResultsDir\");\n\n final String key = \"saveDataDir\";\n File tempFile = null;\n try {\n tempFile = File.createTempFile(\"testfile\", \".txt\");\n\n final String path = tempFile == null ? \"\" : tempFile.getAbsolutePath();\n\n preferences.put(key, path);\n \n final File result = DataAccessPreferenceUtilities.getDir(key);\n\n // Verify mock is working correctly\n assertEquals(result, tempFile);\n\n // Verify no file is returned because it needs to be a directory\n final File expResult = null;\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDir(), expResult);\n } finally {\n // Cleanup\n if (tempFile != null && tempFile.exists()) {\n tempFile.delete();\n }\n }\n }",
"@Test\n public void testGetPreviousDataAccessResultsDir() throws IOException {\n System.out.println(\"getPreviousDataAccessResultsDir\");\n\n final String key = \"prevSaveDataDir\";\n File tempFile = null;\n try {\n tempFile = File.createTempFile(\"testfile\", \".txt\");\n\n final String path = tempFile == null ? \"\" : tempFile.getAbsolutePath();\n\n preferences.put(key, path);\n\n final File result = DataAccessPreferenceUtilities.getDir(key);\n\n // Verify mock is working correctly\n assertEquals(result, tempFile);\n\n // Verify no file is returned because it needs to be a directory\n final File expResult = null;\n assertEquals(DataAccessPreferenceUtilities.getPreviousDataAccessResultsDir(), expResult);\n } finally {\n // Cleanup\n if (tempFile != null && tempFile.exists()) {\n tempFile.delete();\n }\n }\n }",
"public File getStoreDir();",
"@Override\r\n\t\tpublic String getDir()\r\n\t\t\t{\n\t\t\t\treturn null;\r\n\t\t\t}",
"static boolean removeAllCacheFiles() {\n // delete cache files in a separate thread to not block UI.\n final Runnable clearCache = new Runnable() {\n public void run() {\n // delete all cache files\n try {\n String[] files = mBaseDir.list();\n // if mBaseDir doesn't exist, files can be null.\n if (files != null) {\n for (int i = 0; i < files.length; i++) {\n File f = new File(mBaseDir, files[i]);\n if (!f.delete()) {\n Log.e(LOGTAG, f.getPath() + \" delete failed.\");\n }\n }\n }\n } catch (SecurityException e) {\n // Ignore SecurityExceptions.\n }\n }\n };\n new Thread(clearCache).start();\n return true;\n }",
"public static String downloadDir() {\n\n String downloads = stringValue(\"treefs.downloads\");\n if(isNullOrEmpty(downloads)) {\n // default home location\n downloads = home() + File.separator + \"downloads\";\n } else {\n downloads = home() + File.separator + downloads;\n }\n\n System.out.println(\"downloadDir=\" + downloads);\n return downloads;\n }",
"@Override\n\t\tprotected String getCommand() {\n\t\t\treturn \"rm -rf \" + dataDir;\n\t\t}",
"public abstract void clearCache();",
"public void deleteTmpDirectory() {\n\t\tdeleteTmpDirectory(tmpDir);\n\t}",
"private static void cleanupLogcatCache(File cacheDir) {\n FLog.d(TAG, \"Cleaning up log files from cache dir\");\n if (cacheDir == null) {\n FLog.w(TAG, \"External storage not available. Can't cleanup cache\");\n return;\n }\n\n final File[] logFiles = cacheDir.listFiles(new FilenameFilter() {\n @Override\n public boolean accept(File dir, String filename) {\n return filename.toLowerCase().endsWith(\".log\");\n }\n });\n\n if (logFiles == null) {\n FLog.d(TAG, \"No log files to prune from cache\");\n return;\n }\n\n int count = 0;\n for (File logFile : logFiles) {\n count += logFile.delete() ? 1 : 0;\n }\n\n FLog.d(TAG, \"Pruned \" + count + \" log file(s) from cache\");\n }",
"public File mo12778a() {\n File externalCacheDir = context.getExternalCacheDir();\n if (externalCacheDir == null) {\n return null;\n }\n String str = str;\n return str != null ? new File(externalCacheDir, str) : externalCacheDir;\n }",
"public void clearCache() {\n\n\t\t// clearing form soft reference\n\t\tif (softCache != null) {\n\t\t\tsoftCache.clear();\n\t\t}\n\n\t\t// clearing from cache directory\n\t\tdeleteCacheFiles();\n\n\t}",
"public static File getTemporaryDirectory() {\r\n\t\tFile dir = new File(System.getProperty(\"java.io.tmpdir\", //$NON-NLS-1$\r\n\t\t\t\tSystem.getProperty(\"user.dir\", \".\"))); //$NON-NLS-1$ //$NON-NLS-2$\r\n\t\ttry {\r\n\t\t\treturn dir.getCanonicalFile();\r\n\t\t} catch (IOException e) {\r\n\t\t\treturn dir;\r\n\t\t}\r\n\t}",
"private void m50956b() {\n if (!C8626b.m50749b() && !C8626b.m50748a()) {\n try {\n File file = new File(this.f36887b.getExternalFilesDir(null) + \"/.logcache\");\n if (file.exists() && file.isDirectory()) {\n for (File file2 : file.listFiles()) {\n file2.delete();\n }\n }\n } catch (NullPointerException unused) {\n }\n }\n }",
"T decache(String key) throws IOException;",
"private void removeDataSourceDirectory(String dataSourceID){\n \n //If map \"dataSourcesDirectories\" contains the dataSourceID\n if(dataSourcesDirectories.containsKey(dataSourceID)){\n \n //Get directory associated to dataSourceID\n File dir = dataSourcesDirectories.get(dataSourceID);\n \n //List files contained in this directory\n File[] listOfFiles = dir.listFiles();\n \n //Delete each file contained in this directory\n for(File file : listOfFiles)\n file.delete();\n \n //Delete directory\n dir.delete();\n \n //Remove directory from map \"dataSourcesDirectories\"\n dataSourcesDirectories.remove(dataSourceID);\n \n }\n \n }",
"String getDirectoryPath();",
"public File getCacheFile() {\n return new File(cacheDir.getAbsolutePath() + File.separator + this.cacheFile);\n }",
"private String getTmpPath() {\n return getExternalFilesDir(null).getAbsoluteFile() + \"/tmp/\";\n }",
"public File getScratchDir();",
"void deleteDirectories() {\n\n if (story_directory != null && !newStoryReady) {\n deleteStoryDirectory();\n }\n\n if (tag_directory != null && !newStoryReady) {\n deleteTagDirectory();\n }\n\n if (cover_directory != null && !newStoryReady) {\n deleteCoverDirectory();\n }\n }",
"@Override\n\t protected void onDestroy() {\n\t super.onDestroy();\n\t try {\n\t trimCache(this);\n\t } catch (Exception e) {\n\t // TODO Auto-generated catch block\n\t e.printStackTrace();\n\t }\n\t }",
"@Override\n public boolean onCreate() {\n File[] files = getContext().getCacheDir().listFiles();\n for (File file : files) {\n String filename = file.getName();\n if (filename.endsWith(\".tmp\") || filename.startsWith(\"thmb_\")) {\n file.delete();\n }\n }\n return true;\n }",
"private static File getCachedFile(String baseUrl, String params) {\n int hashCode = (baseUrl + params).hashCode();\n return new File(System.getProperty(\"java.io.tmpdir\"), BL_CACHE_FILE + hashCode);\n }",
"private void flushCache()\n {\n Entry<Integer, String> eldestEntry;\n File oldestFile;\n long eldestFileSize;\n int count = 0;\n\n int MAX_DELETE_FILE = 4;\n int MAX_CACHE_FILE_ALLOW = 1000;\n\n while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n {\n eldestEntry = mLinkedHashMap.entrySet().iterator().next();\n oldestFile = new File(eldestEntry.getValue());\n eldestFileSize = oldestFile.length();\n mLinkedHashMap.remove(eldestEntry.getKey());\n oldestFile.delete();\n cacheSize = mLinkedHashMap.size();\n cacheByteSize -= eldestFileSize;\n count++;\n }// while (count < MAX_DELETE_FILE && (cacheSize > MAX_CACHE_FILE_ALLOW || cacheByteSize > maxCacheByteSize))\n }",
"public static void clearApplicationData(Context context) {\r\n File cache = context.getCacheDir();\r\n File appDir = new File(cache.getParent());\r\n if (appDir.exists()) {\r\n String[] children = appDir.list();\r\n for (String s : children) {\r\n if (!s.equals(\"lib\")) {\r\n deleteDir(new File(appDir, s));\r\n }\r\n }\r\n }\r\n }",
"public static File getTempDirectory() {\r\n\t\tFile tempdir = new File(System.getProperty(\"java.io.tmpdir\"));\r\n\t\treturn tempdir;\r\n\t}",
"private File getDataDir(){\n\t\tFile file = new File(this.configManager.getConfigDirectory() +\n\t\t\t\tFile.separator + \n\t\t\t\tDATA_DIR);\n\t\t\n\t\tif(!file.exists()){\n\t\t\tfile.mkdirs();\n\t\t}\n\t\t\n\t\treturn file;\n\t}",
"public void setLocalCacheDirectory(String dir) {\n\t\tlocalCacheDirectory = dir;\n\t\tif(dir == null) {\n\t\t\tcache.clear();\n\t\t\tSystem.out.println(\"INFO: Local cache directory is disabled\");\n\t\t}\n\t\telse {\n\t\t\tString indexFileName = localCacheDirectory + File.separator + \"service.idx\"; \n\t\t\ttry {\n\t\t\t\tFile indexFile = new File(indexFileName);\n\t\n\t\t\t\tcache = new Properties();\t\t\t\t\n\t\t\t\n\t\t\t\tcache.load(new FileInputStream(indexFile));\n\t\n\t\t\t\tSystem.out.println(\"INFO: Cache has been initialized with \" + cache.size() + \" entries\");\n\t\t\t} catch(FileNotFoundException e) {\n\t\t\t\tSystem.err.println(\"ERROR: Cache index file \" + indexFileName + \" cannot be found\");\n\t\t\t\tlocalCacheDirectory = null;\n\t\t\t} catch(IOException e) {\n\t\t\t\tSystem.err.println(\"ERROR: Cache index file \" + indexFileName + \" has an invalid format\");\n\t\t\t\tlocalCacheDirectory = null;\n\t\t\t}\t\n\t\t}\n\t}",
"public static void clearDirFiles(final List<String> pathList, final Handler handler) {\n if (pathList != null && !pathList.isEmpty()) {\n new Thread() {\n @Override\n public void run() {\n int delSizeM = 0;\n for (String path : pathList) {\n delSizeM += deleteFolder(path);\n }\n if(handler != null) {\n notifyHandler(handler, CACHE_CLEAR_COMPLETE_CODE, 0, delSizeM, delSizeM > 0);\n }\n };\n }.start();\n }\n }",
"String getScratchDirectoryPath(String name);",
"public static String getImageDownloadDir(Context context) {\n if (downloadRootDir == null) {\n initFileDir(context);\n }\n return imageDownloadDir;\n }",
"public static String getFilesStoreDir(Context ctx) {\n\t\tString filedir = \"\";\n\t\tif (XSSysUtil.existSDCard(ctx)) {\n\t\t\tfiledir = android.os.Environment.getExternalStorageDirectory()\n\t\t\t\t\t+ \"/\" + ctx.getPackageName();\n\t\t} else {\n\t\t\tfiledir = \"data/data/\" + ctx.getPackageName();\n\t\t}\n\n\t\tFile fFile = new File(filedir);\n\t\tif (!fFile.exists()) {\n\t\t\tboolean success = fFile.mkdirs();\n\t\t\tif(!success){\n\t\t\t\tLog.e(TAG, \"getFilesStoreDir()-->first mkdirs fail!\");\n\t\t\t}\n\t\t}\n\n\t\tfiledir += \"/Files\";\n\t\tfFile = new File(filedir);\n\t\tif (!fFile.exists()) {\n\t\t\tboolean success = fFile.mkdirs();\n\t\t\tif(!success){\n\t\t\t\tLog.e(TAG, \"getFilesStoreDir()-->second mkdirs fail!\");\n\t\t\t}\n\t\t}\n\t\treturn filedir;\n\t}",
"private String getFilePath(){\n\t\tif(directoryPath==null){\n\t\t\treturn System.getProperty(tmpDirSystemProperty);\n\t\t}\n\t\treturn directoryPath;\n\t}",
"private File getCache(String fileName)\n {\n File file = new File(getCacheDir(), fileName);\n\n if (file.exists() && file.length() > 0)\n {\n return file;\n } else\n {\n try\n {\n file = File.createTempFile(fileName, null, this.getCacheDir());\n } catch (IOException e)\n {\n e.printStackTrace();\n }\n }\n return file;\n }",
"public Path getDataDirectory();",
"private static String createAppSpecificLocalDir(String baseDir, String applicationIdString,\n String user, int dagIdentifier) {\n return baseDir + File.separator + \"usercache\" + File.separator + user + File.separator +\n \"appcache\" + File.separator + applicationIdString + File.separator + dagIdentifier;\n }",
"@Test\n public void testGetDataAccessResultsDir3() {\n System.out.println(\"getDataAccessResultsDir3\");\n\n final String key = \"saveDataDir\";\n\n preferences.put(key, System.getProperty(\"user.dir\"));\n\n final File expResult = new File(System.getProperty(\"user.dir\"));\n final Path expectedPath = Paths.get(expResult.getAbsolutePath());\n \n final File result = DataAccessPreferenceUtilities.getDir(key);\n final Path resultantPath = Paths.get(result.getAbsolutePath());\n\n assertEquals(resultantPath.normalize(), expectedPath.normalize());\n\n assertEquals(DataAccessPreferenceUtilities.getDataAccessResultsDir(), expResult);\n }"
] | [
"0.68091166",
"0.6784431",
"0.6539457",
"0.6486144",
"0.6350284",
"0.63093144",
"0.6284815",
"0.6208636",
"0.61820275",
"0.6139928",
"0.6085668",
"0.59294903",
"0.59055126",
"0.583982",
"0.58242536",
"0.565234",
"0.5636977",
"0.56033796",
"0.55406326",
"0.55290943",
"0.5527636",
"0.5520128",
"0.55063474",
"0.5484648",
"0.5462605",
"0.54572403",
"0.5448556",
"0.54432523",
"0.54061127",
"0.54053503",
"0.53833705",
"0.5379798",
"0.5351118",
"0.5351091",
"0.5346912",
"0.5332876",
"0.5296755",
"0.52861506",
"0.5282989",
"0.52824914",
"0.5278436",
"0.52479184",
"0.52225614",
"0.52171195",
"0.52153236",
"0.519734",
"0.51845384",
"0.5156474",
"0.51473165",
"0.51324356",
"0.5104508",
"0.5099183",
"0.50876564",
"0.5082696",
"0.5082696",
"0.5066627",
"0.5057682",
"0.5028244",
"0.50203836",
"0.5016883",
"0.50070596",
"0.50052315",
"0.5000737",
"0.49967062",
"0.49899682",
"0.49851814",
"0.4971901",
"0.49711832",
"0.49703333",
"0.4969263",
"0.49654338",
"0.495516",
"0.4949627",
"0.4925509",
"0.4920455",
"0.4908386",
"0.49038026",
"0.49010062",
"0.4889891",
"0.48864603",
"0.48811916",
"0.48801452",
"0.486399",
"0.48366177",
"0.48326418",
"0.48215055",
"0.48147994",
"0.48112282",
"0.48081437",
"0.47931337",
"0.47917205",
"0.47901216",
"0.47859913",
"0.47824174",
"0.477361",
"0.47726357",
"0.4758658",
"0.47582683",
"0.47461534",
"0.4744446"
] | 0.62878704 | 6 |
Recursively deletes all the content of a given directory | public static boolean deleteDir(File dir) {
if (dir != null && dir.isDirectory()) {
String[] children = dir.list();
for (int i = 0; i < children.length; i++) {
boolean success = deleteDir(new File(dir, children[i]));
if (!success) {
return false;
}
}
return dir.delete();
} else if(dir!= null && dir.isFile()) {
return dir.delete();
} else {
return false;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void deleteDirectory(String path, boolean recursive) throws IOException;",
"private void emptyDirectory(File dir){\n\n for (File file : Objects.requireNonNull(dir.listFiles())){\n if (file.isDirectory())\n {\n emptyDirectory(file);\n }\n file.delete();\n }\n }",
"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 }\n }\n }\n Files.delete(path);\n }",
"@Override\n public void removeDirectory(File directory, boolean recursive) throws FileNotFoundException, IOException {\n }",
"private void cleanDirectory(File dir) {\n File[] files= dir.listFiles();\n if (files!=null && files.length>0) {\n for (File file: files) {\n delete(file);\n }\n }\n }",
"public static void cleanDirectory(File dir) {\n if (dir.isDirectory()) {\n for (File f : dir.listFiles()) {\n cleanDirectory( f );\n }\n }\n dir.delete();\n }",
"private static void deleteDirectory(File directory) {\r\n File[] files = directory.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n } else {\r\n files[i].delete();\r\n }\r\n }\r\n // Now that the directory is empty. Delete it.\r\n directory.delete();\r\n }",
"private static void deleteDir(File file) {\n\t\tFile[] contents = file.listFiles();\n\t\tif (contents != null) {\n\t\t\tfor (File f : contents) {\n\t\t\t\tdeleteDir(f);\n\t\t\t}\n\t\t}\n\t\tfile.delete();\n\t}",
"public static void deleteDir(File dir) {\n\t if (dir.isDirectory()) {\n\t String[] children = dir.list();\n\t for (int i=0; i<children.length; i++) {\n\t File file = new File(dir, children[i]);\n\t log.info(\"Deleting file:\" + file.toString());\n\t file.delete();\n\t }\n\t }\n\t }",
"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 deleteRecursive(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteRecursive(child);\n }\n }\n fileOrDirectory.delete();\n }",
"public static void recursiveDelete(Path path) throws IOException {\n if (Files.isDirectory(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n Files.delete(file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (exc == null) {\n Files.delete(dir);\n return FileVisitResult.CONTINUE;\n } else {\n throw exc;\n }\n }\n });\n }\n }",
"public static void delTree(File file) {\r\n File[] files = file.listFiles();\r\n if (files != null) { \r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n delTree(files[i]);\r\n }\r\n }\r\n }\r\n files = file.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n files[i].delete();\r\n }\r\n }\r\n }",
"public void clearDirectory(File directory) {\n if (directory.exists()) {\n for (File file : directory.listFiles()) {\n file.delete();\n }\n }\n }",
"private static void deleteFileOrDir(File file)\n {\n if (file.isDirectory())\n {\n File[] childs = file.listFiles();\n for (int i = 0;i < childs.length;i++)\n {\n deleteFileOrDir(childs[i]);\n }\n }\n file.delete();\n }",
"public static void deleteDirectory(File dir) {\n\t\tif (dir.isDirectory()) {\n\t\t\t//directory is empty, then delete it\n\t\t\tif (dir.list().length == 0) {\n\t\t\t\tdir.delete();\n\t\t\t} else {\n\t\t\t\t//list all the directory contents\n\t\t\t\tString[] subFiles = dir.list();\n\t\t\t\tfor (int i = 0; i < subFiles.length; i++) {\n\t\t\t\t\t//construct the file structure\n\t\t\t\t\tFile fileDelete = new File(dir, subFiles[i]);\n\t\t\t\t\t//recursive delete\n\t\t\t\t\tdeleteDirectory(fileDelete);\n\t\t\t\t}\n\t\t\t\t//check the directory again, if empty then delete it\n\t\t\t\tif (dir.list().length == 0) {\n\t\t\t\t\tdir.delete();\n\t\t\t\t}\n\t\t\t}\n\t\t} else {\n\t\t\tdir.delete();\n\t\t}\n\t}",
"void deleteTagDirectory() {\n\n try {\n\n Log.i(\"Deleting Tag Directory\", tag_directory.toString());\n FileUtils.deleteDirectory(tag_directory);\n } catch (IOException e) {\n\n }\n\n }",
"public static void delete(File d) {\n\t\tif (d.isDirectory()) {\n\t\t\tfor (File f: d.listFiles()) delete(f);\n\t\t\td.delete();\n\t\t} else d.delete();\n\t}",
"public void cleanDirs() {\n\t\tfor (File f : files) {\n\t\t\tFileUtils.deleteDir(f.toString());\n\t\t}\n\t}",
"@Override\n public FileVisitResult postVisitDirectory(Path dir, IOException e) throws IOException{\n if (e == null) {\n Files.deleteIfExists(dir);\n }\n return FileVisitResult.CONTINUE;\n }",
"@Override\r\n\tpublic void remDir(String path) {\n\t\t\r\n\t}",
"public void deleteFiles(File directory) {\n File[] contents = directory.listFiles();\n if (contents != null) {\n for (File file : contents) {\n deleteFiles(file);\n }\n }\n directory.delete();\n }",
"public static void delete(File file) {\n\n\t\tif (file.isDirectory()) {\n\n\t\t\t// directory is empty, then delete it\n\t\t\tif (file.list().length == 0) {\n\n\t\t\t\tfile.delete();\n\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t// file.getAbsolutePath());\n\n\t\t\t} else {\n\n\t\t\t\t// list all the directory contents\n\t\t\t\tString files[] = file.list();\n\n\t\t\t\tfor (String temp : files) {\n\t\t\t\t\t// construct the file structure\n\t\t\t\t\tFile fileDelete = new File(file, temp);\n\n\t\t\t\t\t// recursive delete\n\t\t\t\t\tdelete(fileDelete);\n\t\t\t\t}\n\n\t\t\t\t// check the directory again, if empty then delete it\n\t\t\t\tif (file.list().length == 0) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t\t// System.out.println(\"Directory is deleted : \" +\n\t\t\t\t\t// file.getAbsolutePath());\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\t// if file, then delete it\n\t\t\tfile.delete();\n\t\t\t// System.out.println(\"File is deleted : \" +\n\t\t\t// file.getAbsolutePath());\n\t\t}\n\t}",
"public static void deleteDirectory(String path) throws KubernetesPluginException {\n Path pathToBeDeleted = Paths.get(path);\n if (!Files.exists(pathToBeDeleted)) {\n return;\n }\n try {\n Files.walk(pathToBeDeleted)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .forEach(File::delete);\n } catch (IOException e) {\n throw new KubernetesPluginException(\"Unable to delete directory: \" + path, e);\n }\n\n }",
"public static void deleteRecursively(File file) throws IOException {\n\t\tboolean successful = true;\n\t\tif (file.isDirectory()) {\n\t\t\tfor (File sub : file.listFiles()) {\n\t\t\t\tdeleteRecursively(sub);\n\t\t\t}\n\t\t\tsuccessful = file.delete();\n\t\t} else if (file.isFile()) {\n\t\t\tsuccessful = file.delete();\n\t\t}\n\t\tif (!successful) {\n\t\t\tthrow new IOException(\"Could not delete:\" + file.getName());\n\t\t}\n\t}",
"void deleteCoverDirectory() {\n\n try {\n\n Log.i(\"Deleting Covr Directory\", cover_directory.toString());\n FileUtils.deleteDirectory(cover_directory);\n } catch (IOException e) {\n\n }\n\n }",
"private void clean(Path path) throws IOException {\n if (Files.exists(path)) {\n Files.walkFileTree(path, new SimpleFileVisitor<>() {\n public FileVisitResult visitFile(Path path, BasicFileAttributes attributes) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n\n public FileVisitResult postVisitDirectory(Path path, IOException exception) throws IOException {\n Files.delete(path);\n return FileVisitResult.CONTINUE;\n }\n });\n }\n }",
"public static void cleanDirectory( File directory ) throws IOException\n {\n if ( !directory.exists() )\n {\n throw new IllegalArgumentException( I18n.err( I18n.ERR_17006_DOES_NOT_EXIST, directory ) );\n }\n\n if ( !directory.isDirectory() )\n {\n throw new IllegalArgumentException( I18n.err( I18n.ERR_17007_IS_NOT_DIRECTORY, directory ) );\n }\n\n File[] files = directory.listFiles();\n\n if ( files == null )\n {\n // null if security restricted\n throw new IOException( I18n.err( I18n.ERR_17008_FAIL_LIST_DIR, directory ) );\n }\n\n IOException exception = null;\n\n for ( File file : files )\n {\n try\n {\n forceDelete( file );\n }\n catch ( IOException ioe )\n {\n exception = ioe;\n }\n }\n\n if ( null != exception )\n {\n throw exception;\n }\n }",
"protected boolean cleanUpDir(File dir) {\n if (dir.isDirectory()) {\n LOG.info(\"Cleaning up \" + dir.getName());\n String[] children = dir.list();\n for (String string : children) {\n boolean success = cleanUpDir(new File(dir, string));\n if (!success)\n return false;\n }\n }\n // The directory is now empty so delete it\n return dir.delete();\n }",
"public void deleteDir() throws Exception\n{\n if(_repo!=null) _repo.close(); _repo = null;\n _gdir.delete();\n _gdir.setProp(GitDir.class.getName(), null);\n}",
"public static void deleteFolder(String path){\n List<CMSFile> files = CMSFile.find(\"name like '\" + path + \"%'\").fetch();\n for (CMSFile file: files){\n if (file.data != null && file.data.exists()) {\n file.data.getFile().delete();\n }\n file.delete();\n }\n }",
"public static void deleteEverythingInPath(String path) {\n try {\n Path rootPath = Paths.get(path);\n Files.walk(rootPath, FileVisitOption.FOLLOW_LINKS)\n .sorted(Comparator.reverseOrder())\n .map(Path::toFile)\n .peek(System.out::println)\n .forEach(File::delete);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"protected void deleteTmpDirectory(File file) {\n\t\tif (file.exists() && file.canWrite()) {\n\t\t\tif (file.isDirectory()) {\n\t\t\t\tFile[] files = file.listFiles();\n\t\t\t\tfor (File child : files) {\n\t\t\t\t\tif (child.isDirectory()) {\n\t\t\t\t\t\tdeleteTmpDirectory(child);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tfile.delete();\n\t\t}\n\t}",
"public static final void cleanDirectory(File directory) throws IOException {\n if (!directory.exists()) {\n throw new IllegalArgumentException(directory + \" does not exist\");\n }\n\n if (!directory.isDirectory()) {\n throw new IllegalArgumentException(directory + \" is not a directory\");\n }\n\n File[] files = directory.listFiles();\n if (files == null) { // null if security restricted\n throw new IOException(\"Failed to list contents of \" + directory);\n }\n\n IOException exception = null;\n for (File file : files) {\n try {\n forceDelete(file);\n } catch (IOException ioe) {\n exception = ioe;\n }\n }\n\n if (exception != null) {\n throw exception;\n }\n }",
"private static boolean deleteDir(File dir) {\n\n if (dir.isDirectory()) {\n String[] children = dir.list();\n for (int i=0; i<children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n }\n\n // The directory is now empty so now it can be smoked\n return dir.delete();\n }",
"private void clearClipsDirectory(){\n /* Citation : http://helpdesk.objects.com.au/java/how-to-delete-all-files-in-a-directory#:~:text=Use%20the%20listFiles()%20method,used%20to%20delete%20each%20file. */\n File directory = new File(Main.CREATED_CLIPS_DIRECTORY_PATH);\n File[] files = directory.listFiles();\n if(files != null){\n for(File file : files){\n if(!file.delete()) System.out.println(\"Failed to remove file \" + file.getName() + \" from \" + Main.CREATED_CLIPS_DIRECTORY_PATH);\n }\n }\n }",
"private void emptyTestDirectory() {\n // Delete the files in the /tmp/QVCSTestFiles directory.\n File tempDirectory = new File(TestHelper.buildTestDirectoryName(TEST_SUBDIRECTORY));\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }",
"public static synchronized void deleteDirectory(File directory) {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.deleteDirectory: [\" + directory.getPath() + \"]\");\n File[] firstDirectoryFiles = directory.listFiles();\n if (firstDirectoryFiles != null) {\n for (File file : firstDirectoryFiles) {\n file.delete();\n }\n }\n directory.delete();\n }",
"public void reset(File folder) {\n File[] listOfFiles = folder.listFiles();\n for(int x=0;x<listOfFiles.length;x++) {\n if(listOfFiles[x].isDirectory()) {\n this.reset(listOfFiles[x]);\n listOfFiles[x].delete();\n }\n }\n folder.delete();\n }",
"public static void deleteDirectoryTree(File fileOrDirectory) {\n if (fileOrDirectory.isDirectory()) {\n for (File child : fileOrDirectory.listFiles()) {\n deleteDirectoryTree(child);\n }\n }\n\n fileOrDirectory.delete();\n }",
"@Override\n public FileVisitResult postVisitDirectory(Path dir,\n IOException exc)\n throws IOException {\n Files.delete(dir);\n System.out.printf(\"Directory is deleted : %s%n\", dir);\n return FileVisitResult.CONTINUE;\n }",
"private static void deletePublicationDir(File pubDir) {\n System.out.println(\" Deleting contents of directory: \" + pubDir);\n for (File pubFile : pubDir.listFiles()) {\n if (pubFile.isFile()) {\n System.out.println(\" Deleting file: \" + pubFile);\n pubFile.delete();\n }\n }\n System.out.println(\" Now deleting directory: \" + pubDir);\n pubDir.delete();\n }",
"void deleteStoryDirectory() {\n\n try {\n\n Log.i(\"Deleting StoryDirectory\", story_directory.toString());\n FileUtils.deleteDirectory(story_directory);\n } catch (IOException e) {\n\n }\n\n }",
"public boolean delete(String path, boolean recurse) throws SystemException;",
"private static void doDeleteEmptyDir(String dir) {\n\n boolean success = (new File(dir)).delete();\n\n if (success) {\n System.out.println(\"Successfully deleted empty directory: \" + dir);\n } else {\n System.out.println(\"Failed to delete empty directory: \" + dir);\n }\n\n }",
"private synchronized static void deleteParents(File file) {\n if (file == null) {\n return;\n }\n\n File tmp = file;\n\n for (int i = 0; i < directoryLevels; i++) {\n File directory = tmp.getParentFile();\n File[] files = directory.listFiles();\n\n // Only delete empty directories\n if (files.length != 0) {\n break;\n }\n\n directory.delete();\n tmp = directory;\n }\n }",
"protected void deleteDirectory(String oneDir) {\n \n File[] listOfFiles;\n File cleanDir;\n\t\n cleanDir = new File(oneDir);\n if (!cleanDir.exists()) {// Nothing to do. Return; \n\t return;\n\t}\n listOfFiles = cleanDir.listFiles();\n if(listOfFiles != null) { \n for(int countFiles = 0; countFiles < listOfFiles.length; countFiles++) { \n if (listOfFiles[countFiles].isFile()) {\n listOfFiles[countFiles].delete();\n } else { // It is a directory\n String nextCleanDir = cleanDir + separator + listOfFiles[countFiles].getName();\n\t\t File newCleanDir = new File(nextCleanDir);\n deleteDirectory(newCleanDir.getAbsolutePath());\n } \n }// End for loop\n } // End if statement \n cleanDir.delete();\n }",
"private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}",
"private void recDelete(File file) {\n if (!file.exists()) {\n return;\n }\n if (file.isDirectory()) {\n File[] list = file.listFiles();\n if (list != null) {\n for (File f : list) {\n recDelete(f);\n }\n }\n }\n file.delete();\n }",
"private static boolean deleteDirectory(final File path) {\r\n if (path.exists()) {\r\n final File[] files = path.listFiles();\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n deleteDirectory(files[i]);\r\n }\r\n else {\r\n files[i].delete();\r\n }\r\n }\r\n }\r\n return (path.delete());\r\n }",
"private boolean deleteDir(File dir) {\r\n if (dir.isDirectory()) {\r\n \r\n //Borra todos los ficheros del directorio\r\n String[] children = dir.list();\r\n for (int i=0; i<children.length; i++) {\r\n boolean success = deleteDir(new File(dir, children[i]));\r\n if (!success) {\r\n return false;\r\n }\r\n }\r\n }\r\n \r\n //Ahora que el directorio está vacío, se puede borrar\r\n return dir.delete();\r\n }",
"public synchronized void cleanup() {\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) { // children will be null if the directory does\n\t\t\t\t\t\t\t\t// not exist.\n\t\t\tfor (int i = 0; i < children.length; i++) { // remove too small file\n\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\tif (!child.equals(new File(mStorageDirectory, NOMEDIA))\n\t\t\t\t\t\t&& child.length() <= MIN_FILE_SIZE_IN_BYTES) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static void cleanFolder(File outputFolder)\n {\n File[] files = outputFolder.listFiles();\n for (File file : files)\n {\n if (file.isDirectory())\n {\n cleanFolder(file);\n }\n else\n {\n if (file.delete())\n {\n Main.out(\"Deleted: \" + file);\n }\n else\n {\n Main.warn(\"Failed to delete file: \" + file);\n }\n }\n }\n }",
"private static boolean deleteDirectory(File directory) {\n\t if(directory.exists()){\n\t File[] files = directory.listFiles();\n\t if(null!=files){\n\t for(int i=0; i<files.length; i++) {\n\t if(files[i].isDirectory()) {\n\t deleteDirectory(files[i]);\n\t }\n\t else {\n\t files[i].delete();\n\t }\n\t }\n\t }\n\t }\n\t return(directory.delete());\n\t}",
"public static void deleteDirectory(File directory) {\n // LOG.debug(\"ics.core.io.FileUtils.deleteDirectory(): Deleting directory \"\n // + directory.toString());\n File[] files = directory.listFiles();\n for (int n = 0; n < files.length; n++) {\n File nextFile = files[n];\n\n // if it's a directory, delete sub-directories and files before\n // removing the empty directory\n if (nextFile.isDirectory() == true) {\n deleteDirectory(nextFile);\n } else {\n nextFile.delete(); // otherwise just delete the file\n // LOG.debug(\"ics.core.io.FileUtils.deleteDirectory(): Deleting file \"\n // + nextFile.toString());\n }\n }\n\n // finally, delete the specified directory\n if (directory.delete() == false) {\n LOG.warn(\"ics.core.io.FileUtils.deleteDirectory(): Unable to delete \"\n + directory.toString());\n }\n }",
"public static boolean recursiveDelete(File d) {\n // If d is not a directory, just delete it.\n if (!d.isDirectory())\n if (d.delete() == false) {\n return false;\n } else {\n return true;\n }\n else {\n // Construct a file list.\n File[] ar = d.listFiles();\n \n // Iterate through the file list.\n for (int i = 0; i < ar.length; i++) {\n // Recurse into directories. Deep directories will need a lot of stack space for this.\n if (ar[i].isDirectory()) {\n if (!recursiveDelete(ar[i])) {\n return false; // Failed!\n }\n }\n else {\n // Delete a file.\n if (!ar[i].delete()) {\n return false; // Failed!\n }\n }\n }\n \n //Delete the empty directory\n if (!d.delete()) {\n return false;\n } else {\n return true;\n } \n }\n }",
"public static native void deleteTreesBelow(String dir) throws IOException;",
"public void removeFolder(File path){\n if (path.isDirectory()){\n String subdirectories[] = path.list();\n for(String subdirectory: subdirectories){\n File file = new File(path.getPath()+\"\\\\\"+subdirectory);\n LOG.info(\"file.getAbsolutePath(): \"+file.getPath());\n if (file.isFile()){\n boolean isDeleted = file.delete();\n if (isDeleted){\n LOG.success(\"file was delete, path: \"+file.getPath());\n }else{\n LOG.error(\"file does not delete, path: \"+file.getPath());\n }\n }else{\n removeFolder(file);\n boolean folderIsDelete = file.delete();\n if (folderIsDelete){\n LOG.success(\"folder was delete, path: \"+file);\n }else{\n LOG.error(\"folder does not delete, path: \"+file);\n }\n }\n }\n }else {\n LOG.info(\"file.getAbsolutePath(): \"+path.getPath());\n }\n }",
"public static void deleteDir(File dir) throws RepositoryException {\n String list[] = dir.list();\n\n if (list == null) {\n return;\n }\n\n for (int i = 0; i < list.length; i++) {\n File file = new File(dir, list[i]);\n\n if (file.isDirectory()) {\n deleteDir(file);\n } else {\n if (!file.delete()) {\n throw new RepositoryException(EXCEPTION_LOCALIZER.format(\n \"cannot-delete-file\", file.getAbsolutePath()));\n }\n }\n }\n\n if (!dir.delete()) {\n throw new RepositoryException(EXCEPTION_LOCALIZER.format(\n \"directory-cannot-be-deleted\", dir.getAbsolutePath()));\n }\n }",
"public boolean folderCleaner(String folderPath, Boolean ifDeleteSubdirs, Boolean ifDeleteFiles, Boolean ifDeleteRoot, Boolean ifPrompt) throws IOException { \n folderPath = folderPath.replace(\"\\\\\", \"/\");\n if(folderPath.endsWith(\"/\")) { folderPath = folderPath.substring(0, folderPath.length() - 1); }\n File dir = new File(folderPath);\n String how = \"\", action = null;\n Boolean success = false;\n Boolean current = false;\n if (dir.exists() && dir.isDirectory()) { \n try{ \n success = true;\n String[] children = dir.list();\n if(children.length > 0) {\n action = \"CLEANED\";\n for (int i = 0; i < children.length; i++) {\n File child = new File(dir, children[i]);\n if(child.isDirectory()){ if(ifDeleteSubdirs) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteSubdirs) {System.out.print(\"DIRECTORY \");} }\n else { if(ifDeleteFiles) { FileUtils.forceDelete(child); } if(ifPrompt && ifDeleteFiles) {System.out.print(\" FILE \");} }\n \n current = !child.exists();\n success = success && current;\n if(current) { how = \" DELETED: \\\"\"; } else { how = \"NOT DELETED: \\\"\"; }\n if(ifPrompt && current) System.out.print(how + child.getAbsolutePath() + \"\\n\");\n }\n }\n // THE DIRECTORY IS EMPTY - DELETE IT IF REQUIRED\n if (ifDeleteRoot) { FileUtils.forceDelete(dir); success = success && !dir.exists(); action = \"DELETED\"; }\n if(ifPrompt && (!action.equals(null))) {\n if (success) { \n System.out.println(\"\\n\" + \"FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n } else {\n System.out.println(\"\\n\" + \"NOT FULLY \" + action + \" DIRECTORY: \\\"\" + folderPath.substring(folderPath.lastIndexOf(\"/\") + 1, folderPath.length()) + \"\\\"\\n\");\n }\n }\n } catch (Exception e) {} \n }\n return success;\n }",
"private static void deleteEmptyParentDirs(Path pkgDirPath, Path repoPath) throws IOException {\n Path pathsInBetween = repoPath.relativize(pkgDirPath);\n for (int i = pathsInBetween.getNameCount(); i > 0; i--) {\n Path toRemove = repoPath.resolve(pathsInBetween.subpath(0, i));\n if (!Files.list(toRemove).findAny().isPresent()) {\n Files.delete(toRemove);\n }\n }\n }",
"private void deleteDir(File fileDir)\n {\n try\n {\n FileHelper.deleteDir(fileDir);\n }\n catch (Exception e)\n {\n // ignore\n }\n }",
"public static void deleteDirectoryRecursively(Path pathToBeDeleted) throws IOException {\n\n Files.walk(pathToBeDeleted).sorted(Comparator.reverseOrder()).map(Path::toFile).forEach(File::delete);\n }",
"public static void deleteFileOrDirectory(KVFile file) {\n if (file.isDirectory()) {\n String[] children = file.list();\n for (String aChildren : children) {\n if (new KVFile(file, aChildren).isDirectory() && !aChildren.equals(\"PreinstalledMaps\") && !aChildren.equals(\"Maps\")) {\n deleteFileOrDirectory(new KVFile(file, aChildren));\n } else {\n new KVFile(file, aChildren).delete();\n }\n }\n }\n }",
"public static void deleteFile(File file){\r\n if(file.isFile()){\r\n file.delete();\r\n return;\r\n }\r\n if(file.isDirectory()){\r\n File[] childFile = file.listFiles();\r\n if(childFile == null || childFile.length == 0){\r\n file.delete();\r\n return;\r\n }\r\n for(File f : childFile){\r\n deleteFile(f);\r\n }\r\n file.delete();\r\n }\r\n }",
"private void cleanup() {\n File tmpdir = new File(System.getProperty(\"java.io.tmpdir\"));\n File[] backupDirs = tmpdir.listFiles(file -> file.getName().contains(BACKUP_TEMP_DIR_PREFIX));\n if (backupDirs != null) {\n for (File file : backupDirs) {\n try {\n FileUtils.deleteDirectory(file);\n log.info(\"removed temporary backup directory {}\", file.getAbsolutePath());\n } catch (IOException e) {\n log.error(\"failed to delete the temporary backup directory {}\", file.getAbsolutePath());\n }\n }\n }\n }",
"public static boolean deleteDirectory(File dir) {\n \n\t\tif (dir == null) { \n\t\t\treturn true;\n\t\t}\n\t\t\n\t\tFile candir;\n try {\n candir = dir.getCanonicalFile();\n } catch (IOException e) {\n return false;\n }\n \n // a symbolic link has a different canonical path than its actual path,\n // unless it's a link to itself\n if (!candir.equals(dir.getAbsoluteFile())) {\n // this file is a symbolic link, and there's no reason for us to\n // follow it, because then we might be deleting something outside of\n // the directory we were told to delete\n return false;\n }\n \n // now we go through all of the files and subdirectories in the\n // directory and delete them one by one\n File [] files = candir.listFiles();\n \n if (files != null) {\n for (int i = 0; i < files.length; i++) {\n File file = files[i];\n \n // in case this directory is actually a symbolic link, or it's\n // empty, we want to try to delete the link before we try\n // anything\n boolean deleted = file.delete();\n \n if (!deleted) {\n // deleting the file failed, so maybe it's a non-empty\n // directory\n if (file.isDirectory()) {\n \tdeleteDirectory(file);\n }\n \n // otherwise, there's nothing else we can do\n }\n }\n }\n \n // now that we tried to clear the directory out, we can try to delete it\n // again\n return dir.delete(); \n }",
"public static void cleanDirectory(final ContextualLogger logger, Path start) throws IOException {\n if (!start.toFile().exists()) {\n boolean didMake = start.toFile().mkdir();\n Assert.assertTrue(didMake);\n }\n // We need the directory to be a directory (as we don't want to follow symlinks anywhere in this delete operation).\n Assert.assertTrue(start.toFile().isDirectory());\n // We don't want to delete the starting directory, but we do want to delete everything in it.\n Files.walkFileTree(start, new FileVisitor<Path>() {\n @Override\n public FileVisitResult preVisitDirectory(Path dir, BasicFileAttributes attrs) throws IOException {\n // Do nothing.\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n // This clearly can't be the start.\n Assert.assertFalse(start.equals(file));\n // Delete the file.\n Files.delete(file);\n logger.output(\"Deleted file \" + file);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n logger.error(\"visitFileFailed: \\\"\" + file + \"\\\"\");\n throw exc;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(Path dir, IOException exc) throws IOException {\n if (null == exc) {\n // Make sure that this isn't the starting directory.\n if (!start.equals(dir)) {\n Files.delete(dir);\n logger.output(\"Deleted directory \" + dir);\n }\n } else {\n throw exc;\n }\n return FileVisitResult.CONTINUE;\n }\n }\n );\n }",
"public static void deleteFilesMatchingExpression(File root,\n \t\t\tString expression, boolean recurse) {\n \t\tif (root != null) {\n \t\t\tif (root.isDirectory()) {\n \t\t\t\tFile[] files = root.listFiles();\n \t\t\t\tif (files != null) {\n \t\t\t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\t\t\tif (recurse && files[i].isDirectory()) {\n \t\t\t\t\t\t\tdeleteFilesMatchingExpression(files[i], expression,\n \t\t\t\t\t\t\t\t\trecurse);\n \t\t\t\t\t\t} else if (files[i].isFile()) {\n \t\t\t\t\t\t\tif (files[i].getName().matches(expression)) {\n \t\t\t\t\t\t\t\tfiles[i].delete();\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t}",
"public static void deleteFilesInDirectory(File dir, boolean deleteDir) {\n \t\tif (dir != null && dir.isDirectory()) {\n \t\t\tFile[] files = dir.listFiles();\n \t\t\tif (files != null) {\n \t\t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\t\tif (files[i].isFile()) {\n \t\t\t\t\t\tfiles[i].delete();\n \t\t\t\t\t} else {\n \t\t\t\t\t\t// recursively delete\n \t\t\t\t\t\tdeleteFilesInDirectory(files[i], true);\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t\t// now delete the directory itself\n \t\t\tif (deleteDir) {\n \t\t\t\tdir.delete();\n \t\t\t}\n \t\t}\n \t}",
"public static void deleteFilesRecursive(String strPath) {\n\n File fileOrDirectory = new File(strPath);\n\n if (fileOrDirectory.isDirectory()){\n for (File child : fileOrDirectory.listFiles())\n deleteFilesRecursive(child.getPath());\n fileOrDirectory.delete();\n }else\n fileOrDirectory.delete();\n }",
"private void cleanFolder(File[] files) {\n \t\t\n \t\tif (files != null) {\n \t\t\t// Iterate the files\n \t\t\tfor (int i = 0; i < files.length; i++) {\n \t\t\t\tFile f = files[i];\n \t\t\t\t// If the file is a directory, remove its contents recursively\n \t\t\t\tif (f.isDirectory()) {\n \t\t\t\t\tcleanFolder(f.listFiles());\n \t\t\t\t}\n \t\t\t\t// Remove the file if it is a class file\n \t\t\t\tif (f.getName().endsWith(\".class\"))\n \t\t\t\t\tf.delete();\n \t\t\t}\n \t\t}\n \t}",
"public static void deleteDirectory(String directory){\n\t\tlog.info(\"Removing \" + directory + \" directory\");\n\t\tFile tempDir = new File(directory);\n\t\tdeleteDirectory(tempDir);\n\t\tlog.info(\"Finished removing directory\");\n\t}",
"private void cleanTempFolder() {\n File tmpFolder = new File(getTmpPath());\n if (tmpFolder.isDirectory()) {\n String[] children = tmpFolder.list();\n for (int i = 0; i < children.length; i++) {\n if (children[i].startsWith(TMP_IMAGE_PREFIX)) {\n new File(tmpFolder, children[i]).delete();\n }\n }\n }\n }",
"public static void deleteDirectory( File directory ) throws IOException\n {\n if ( !directory.exists() )\n {\n return;\n }\n\n if ( !isSymlink( directory ) )\n {\n cleanDirectory( directory );\n }\n\n if ( !directory.delete() )\n {\n throw new IOException( I18n.err( I18n.ERR_17004_UNABLE_DELETE_DIR, directory ) );\n }\n }",
"public static void deletePath(Path path) throws IOException {\n if (!Files.isDirectory(path) || Files.list(path).count() == 0) { Files.deleteIfExists(path); }\n else {\n try (Stream<Path> files = Files.list(path)) {\n files.forEach(p -> {\n try { deletePath(p); }\n catch (IOException e) { e.printStackTrace(); }\n });\n Files.delete(path);\n }\n }\n }",
"void deleteDirectories() {\n\n if (story_directory != null && !newStoryReady) {\n deleteStoryDirectory();\n }\n\n if (tag_directory != null && !newStoryReady) {\n deleteTagDirectory();\n }\n\n if (cover_directory != null && !newStoryReady) {\n deleteCoverDirectory();\n }\n }",
"private void delete(File file) {\n if (file.isDirectory()) {\n cleanDirectory(file);\n }\n file.delete();\n }",
"public static int deleteContents(File dir) {\n File[] files = dir.listFiles();\n if (files == null) {\n return 0;\n } else {\n return Stream.of(files)\n .mapToInt(file -> {\n if (file.isDirectory()) {\n int count = deleteContents(file);\n file.delete();\n return count;\n } else {\n return file.delete() ? 1 : 0;\n }\n })\n .sum();\n }\n }",
"public static void deleteDirectory(String inputDirectory) {\n File directory = new File(inputDirectory);\n //check if it is a directory\n if (directory.isDirectory()) {\n //check if the directory has children\n if (directory.listFiles().length == 0) {\n directory.delete();\n System.out.println(\"Directory is deleted: \"\n + directory.getAbsolutePath());\n } else {\n //ask user whether he wants to delete the directory\n System.out.println(\"The chosen directory contains few files.\");\n viewDirectory(inputDirectory);\n System.out.println(\"Do you really want to delete the whole directory: \\n 1.Yes\\n 2.No\");\n Scanner userInput = new Scanner(System.in);\n String userRes = userInput.nextLine();\n if (userRes.equalsIgnoreCase(\"yes\") || userRes.equalsIgnoreCase(\"1\")) {\n //delete files inside the directory one by one\n deleteFilesInsideDirectory(directory);\n //delete parent directory\n directory.delete();\n if (!directory.exists()) {\n System.out.println(\"Directory has been deleted.\");\n } else {\n System.out.println(\"Deletion failed\");\n }\n } else if (userRes.equalsIgnoreCase(\"no\") || userRes.equalsIgnoreCase(\"2\")) {\n System.out.println(\"Delete directory request cancelled by user.\");\n } else {\n deleteDirectory(inputDirectory);\n }\n }\n } else {\n System.out.println(\"Invalid path or directory.\");\n }\n }",
"public void removeIndex(String dir) {\n\t\tFile dirToRemove = new File(dir);\n\t\tFile[] contents = dirToRemove.listFiles();\n\t\tif (contents != null) {\n\t\t\tfor (File file : contents) {\n\t\t\t\tfile.delete();\n\t\t\t}\n\t\t}\n\t\tdirToRemove.delete();\n\t}",
"public static void deleteBundleParentDirectory(Bundle bundle) throws IOException {\n if (bundle != null) {\n Path bundleSource = bundle.getSource();\n File parent = bundleSource.getParent().toFile();\n if (parent.exists() && parent.isDirectory()) {\n File[] files = parent.listFiles();\n // We expect the directory to be empty or contain just one file (the ZIP bundle,\n // since the bundle files are stored temporarily in another temporary directory).\n if (files != null && files.length <= 1) {\n org.apache.commons.io.FileUtils.forceDelete(parent);\n }\n }\n }\n }",
"public static void delete(String source) {\n Path directory = Paths.get(source);\n try {\n Files.walkFileTree(directory, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(final Path file, final BasicFileAttributes attrs)\n throws IOException {\n Files.delete(file);\n return CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(final Path file, final IOException e) {\n return handleException(e);\n }\n\n private FileVisitResult handleException(final IOException e) {\n e.printStackTrace(); // replace with more robust error handling\n return TERMINATE;\n }\n\n @Override\n public FileVisitResult postVisitDirectory(final Path dir, final IOException e)\n throws IOException {\n if (e != null) {\n return handleException(e);\n }\n Files.delete(dir);\n return CONTINUE;\n }\n });\n } catch (IOException ex) {\n Logger.getLogger(FolderManager.class.getName()).log(Level.SEVERE, null, ex);\n delete(source);\n }\n }",
"public static boolean deleteFileRoot(String path) {\n try {\n if (!readReadWriteFile())\n RootTools.remount(path, \"rw\");\n\n if (new File(path).isDirectory()) {\n execute(\"rm -f -r \" + getCommandLineString(path));\n } else {\n execute(\"rm -r \" + getCommandLineString(path));\n }\n return true;\n } catch (Exception e) {\n e.printStackTrace();\n }\n return false;\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\tFile dir = new File(\"src/reports\");\n\t\t\t\tfor (File file : dir.listFiles())\n\t\t\t\tif (!file.isDirectory())\n\t\t\t\tfile.delete();\n\t\t\t\t}",
"@TestFor(issues = \"TW-42737\")\n public void test_directory_remove() throws Exception {\n CommitPatchBuilder patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.createFile(\"dir/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.createFile(\"dir2/file\", new ByteArrayInputStream(\"content\".getBytes()));\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Create dir with file\"));\n patchBuilder.dispose();\n\n RepositoryStateData state1 = myGit.getCurrentState(myRoot);\n\n patchBuilder = myCommitSupport.getCommitPatchBuilder(myRoot);\n patchBuilder.deleteDirectory(\"dir\");\n patchBuilder.commit(new CommitSettingsImpl(\"user\", \"Delete dir\"));\n patchBuilder.dispose();\n\n RepositoryStateData state2 = myGit.getCurrentState(myRoot);\n\n List<ModificationData> changes = myGit.getCollectChangesPolicy().collectChanges(myRoot, state1, state2, CheckoutRules.DEFAULT);\n then(changes).hasSize(1);\n then(changes.get(0).getChanges()).extracting(\"fileName\", \"type\").containsOnly(Tuple.tuple(\"dir/file\", VcsChange.Type.REMOVED));\n }",
"public static void deleteAllFile(File path) {\n File[] array = path.listFiles();\n\n for (File file : array) {\n if (file.isFile()) {\n file.delete();\n }\n }\n }",
"public static void deleteAll(File path, boolean includePath) throws IOException {\n\n Files.walkFileTree(path.toPath(), new FileTreeWalker(FileTreeWalker.Action.DELETE));\n\n if (includePath && path.exists() && !path.delete()) {\n throw new IOException(\"Failed to delete directory or file \"\n + path);\n }\n\n }",
"public static void deleteCache(Context context){\n File baseDir = getResourcesFolder(context);\n //basDir could be null if storage has not yet been selected (extreme cases where memory is too low)\n if(baseDir != null) {\n File[] content = baseDir.listFiles();\n if(content != null)\n for (File file : content)\n deleteRecursively(file);\n }\n }",
"@Override\n\tpublic boolean delete() {\n\t\tboolean result = false;\n\t\ttry{\n\t\t\tif (this.exists()) {\n\t\t\t\tif (this.isDirectory()) {\n\t\t\t\t\tif (this.listFiles() != null) {\n\t\t\t\t\t\tfor (java.io.File file : this.listFiles()) {\n\t\t\t\t\t\t\tif (file.isDirectory()) ((File) file).delete();\n\t\t\t\t\t\t\telse if (file.isFile()) super.delete();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tsuper.delete();\n\t\t\t\t} else if (this.isFile()) super.delete();\n\t\t\t}\n\t\t\t\n\t\t\tresult = true;\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn result;\n\t}",
"public static synchronized void emptyDerbyTestDirectory(final String derbyTestDirectory) {\n System.out.println(Thread.currentThread().getName() + \"********************************************************* TestHelper.emptyDerbyTestDirectory\");\n // Delete the files in the derbyTestDirectory directory.\n File tempDirectory = new File(derbyTestDirectory);\n File[] files = tempDirectory.listFiles();\n if (files != null) {\n for (File file : files) {\n if (file.isDirectory()) {\n File[] subFiles = file.listFiles();\n for (File subFile : subFiles) {\n if (subFile.isDirectory()) {\n File[] subSubFiles = subFile.listFiles();\n for (File subSubFile : subSubFiles) {\n subSubFile.delete();\n }\n }\n subFile.delete();\n }\n }\n file.delete();\n }\n }\n }",
"public static void deleteDirectory(String directory) {\n if (directory == null) {\n return;\n }\n\n File dir = new File(directory);\n if (dir.isDirectory() == false) {\n return;\n }\n\n deleteDirectory(dir);\n }",
"public static void deleteFilesMatchingExpression(String path,\n \t\t\tString expression, boolean recurse) {\n \t\tdeleteFilesMatchingExpression(new File(path), expression, recurse);\n \t}",
"public synchronized void cleanupSimple() {\n\t\tfinal int maxNumFiles = 1000;\n\t\tfinal int numFilesToDelete = 50;\n\n\t\tString[] children = mStorageDirectory.list();\n\t\tif (children != null) {\n\t\t\tif (children.length > maxNumFiles) {\n\t\t\t\tfor (int i = children.length - 1, m = i - numFilesToDelete; i > m; i--) {\n\t\t\t\t\tFile child = new File(mStorageDirectory, children[i]);\n\t\t\t\t\ttry {\n\t\t\t\t\t\tchild.delete();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public static boolean delete(File dir) {\r\n boolean success = true;\r\n File files[] = dir.listFiles();\r\n if (files != null) {\r\n for (int i = 0; i < files.length; i++) {\r\n if (files[i].isDirectory()) {\r\n // delete the directory and all of its contents.\r\n if (!delete(files[i])) {\r\n success = false;\r\n }\r\n }\r\n // delete each file in the directory\r\n if (!files[i].delete()) {\r\n success = false;\r\n }\r\n }\r\n }\r\n // finally delete the directory\r\n if (!dir.delete()) {\r\n success = false;\r\n }\r\n return success;\r\n }",
"public static final void deleteDirectory(File directory) throws IOException {\n if (!directory.exists()) {\n return;\n }\n\n cleanDirectory(directory);\n\n if (!directory.delete()) {\n throw new IOException(\"Unable to delete directory \" + directory + \".\");\n }\n }",
"public static boolean deleteDir(File dir) {\n if (dir != null && dir.isDirectory()) {\n String[] children = dir.list();\n for (int i = 0; i < children.length; i++) {\n boolean success = deleteDir(new File(dir, children[i]));\n if (!success) {\n return false;\n }\n }\n return dir.delete();\n }\n else if(dir!= null && dir.isFile()) return dir.delete();\n else return false;\n }",
"public static final void delete(final File file)\n\t{\n\t\tif (file.isDirectory())\n\t\t{\n\t\t\tfor (final String temp : file.list())\n\t\t\t{\n\t\t\t\tdelete(new File(file, temp));\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfile.delete();\n\t\t}\n\t}",
"private static void deleteDatabaseHelper(final Path path) {\n if (path != null) {\n\n try {\n if (!Files.isDirectory(path)) {\n Files.delete(path);\n } else {\n \n // see http://www.oracle.com/technetwork/articles/java/ma14-java-se-8-streams-2177646.html\n // for an explanation of streams and foreach\n Files.newDirectoryStream(path).forEach(filePath -> deleteDatabaseHelper(filePath));\n Files.delete(path);\n }\n\n } catch (IOException ex) {\n Logger.getLogger(ConnectionManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n }\n }",
"public static boolean deleteFolderContents(String path) {\n File currDirectory = new File(path);\n if (currDirectory.exists()) {\n try {\n for (File file : currDirectory.listFiles()) {\n if (file.isDirectory()) {\n if (!deleteFolder(file.getCanonicalPath())) {\n return false;\n }\n } else {\n if (!deleteFile(file.getCanonicalPath())) {\n return false;\n }\n }\n }\n } catch (IOException e) {\n return false;\n }\n return true;\n }\n return false;\n }",
"@Override public void cleanupTempCheckpointDirectory() throws IgniteCheckedException {\n try {\n try (DirectoryStream<Path> files = Files.newDirectoryStream(cpDir.toPath(), TMP_FILE_MATCHER::matches)) {\n for (Path path : files)\n Files.delete(path);\n }\n }\n catch (IOException e) {\n throw new IgniteCheckedException(\"Failed to cleanup checkpoint directory from temporary files: \" + cpDir, e);\n }\n }"
] | [
"0.77379507",
"0.7324838",
"0.7305839",
"0.72919655",
"0.71496016",
"0.7146413",
"0.7121877",
"0.70457333",
"0.7019922",
"0.698564",
"0.6923122",
"0.6872991",
"0.6801913",
"0.67389226",
"0.6738051",
"0.6733413",
"0.67212516",
"0.6705723",
"0.6629223",
"0.66243815",
"0.6594846",
"0.65630084",
"0.65583324",
"0.65405273",
"0.65313894",
"0.6503025",
"0.65006983",
"0.6494116",
"0.6491454",
"0.6478939",
"0.6448163",
"0.64463973",
"0.64311457",
"0.64294547",
"0.6421928",
"0.64155006",
"0.6410488",
"0.6408364",
"0.63983256",
"0.6394472",
"0.6388844",
"0.638367",
"0.63809747",
"0.6380199",
"0.63663274",
"0.63618845",
"0.63604546",
"0.6358988",
"0.63476056",
"0.6333593",
"0.6323466",
"0.6310172",
"0.63055485",
"0.6302592",
"0.6251387",
"0.6237766",
"0.62282723",
"0.6221817",
"0.6210441",
"0.6206117",
"0.6193213",
"0.6180634",
"0.61549664",
"0.61434406",
"0.6141765",
"0.6127732",
"0.6102595",
"0.6098259",
"0.6097648",
"0.60712916",
"0.60564685",
"0.60514134",
"0.6046497",
"0.604499",
"0.604195",
"0.6039305",
"0.60275865",
"0.60208774",
"0.601051",
"0.6003485",
"0.59898657",
"0.59799784",
"0.5966582",
"0.5962065",
"0.59492517",
"0.5938747",
"0.59209573",
"0.59130603",
"0.58962005",
"0.58816886",
"0.588062",
"0.5872764",
"0.5871618",
"0.5863263",
"0.5860731",
"0.58602464",
"0.58334756",
"0.58038473",
"0.5797429",
"0.5797291",
"0.5794974"
] | 0.0 | -1 |
Extracts ONLY the 3d models of the folder to the cache dir | public void extractPackage(String zipPath, String destPath) throws IOException {
File destDir = new File(destPath);
if(!destDir.exists()) {
destDir.mkdir();
}
ZipInputStream zipIn = new ZipInputStream(new FileInputStream((zipPath)));
ZipEntry entry = zipIn.getNextEntry();
while(entry != null) {
String filePath = destPath+File.separator+entry.getName();
//filePath = filePath.replaceAll(" ","_");
if(!entry.isDirectory()) {
Log.i("extract","Package Name: "+entry.getName());
Log.i("extract",filePath);
String[] temp = entry.getName().split("\\.");
if(validExtension(temp[temp.length-1].toLowerCase())) {
extractFile(zipIn,filePath);
}
//extractFile(zipIn,filePath);
} else {
File dir = new File(filePath);
dir.mkdirs();
}
zipIn.closeEntry();;
entry = zipIn.getNextEntry();
}
zipIn.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void loadCache() {\n if (!directory.exists()) {\n directory.mkdirs();\n }\n File[] files = this.directory.listFiles();\n if (files == null) {\n return;\n }\n for (File file : files) {\n if (file.getName().endsWith(\".json\")) {\n cache.put(file.getName().split(\".json\")[0], new JsonDocument(file));\n }\n }\n }",
"private void cacheFoldersFiles() throws Exception {\n\n ArrayList<FileManagerFile> files = new ArrayList<FileManagerFile>();\n if (fileCount > 0) {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'T'HH:mm:ss\");\n formatter.setTimeZone(TimeZone.getTimeZone(\"GMT\"));\n\n int offset = 0;\n int count = 1000;\n List<FileManagerFile> filelist;\n\n do {\n filelist = connection.getFileManager().getFileManagerFiles(count, offset);\n offset += count;\n for (FileManagerFile file : filelist) {\n if (file.getFolderId() == id) {\n files.add(file);\n }\n }\n } while (filelist.size() > 0 && files.size() < fileCount);\n }\n this.files = files;\n }",
"private void deleteModelData(boolean verbose) {\n File initialPath = getDir(MODEL_PATH, MODE_PRIVATE);\n File decompressedPath = new File(initialPath, modelName);\n\n if( decompressedPath.exists() ) {\n if( verbose )\n runOnUiThread(() -> Toast.makeText(ImageClassificationActivity.this,\n \"Deleting \"+modelName,Toast.LENGTH_SHORT).show());\n\n deleteDir(decompressedPath);\n } else {\n if( verbose )\n runOnUiThread(() -> Toast.makeText(ImageClassificationActivity.this,\n \"Nothing to delete\",Toast.LENGTH_SHORT).show());\n }\n }",
"public MarkerPackage(Context context) {\n models = new ArrayList<>();\n Log.i(\"mPackage\",\"Reached constructor\");\n File cacheDir = new File(context.getExternalCacheDir().getPath());\n populateList(cacheDir.listFiles());\n Collections.sort(models,new ModelComparator());\n //Collections.sort(models);\n for(MarkerModel path : models) {\n Log.i(\"mPackage\", path.getObj());\n }\n }",
"private void collectWorkspaceZDLModels(List<MetaModel> metamodels,\r\n\t\t\tIPath path, Map<IFile, Model> workspaceZDLs) {\r\n\r\n\t\tIResource res = wsroot.findMember(path);\r\n\r\n\t\tif ((res != null) && res.exists()) {\r\n\t\t\tfor (Map.Entry<IFile, Model> zdl : workspaceZDLs.entrySet()) {\r\n\t\t\t\tif (res.contains(zdl.getKey())) {\r\n\t\t\t\t\tmetamodels.add(new ZDLMetamodel(zdl.getValue()));\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void createOrReadCache() {\n\t\tList<String> cachedDirectoryPaths = new ArrayList<>();\n\t\tFile file = new File(LevelEditor.SAVED_PATH_DATA);\n\t\tif (!file.exists()) {\n\t\t\t// Set the default paths first\n\t\t\tFileControl.lastSavedDirectory = new File(LevelEditor.defaultPath);\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\n\t\t\tcachedDirectoryPaths.add(FileControl.lastSavedDirectory.getAbsolutePath());\n\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"rw\")) {\n\t\t\t\tthis.storeCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\ttry (RandomAccessFile raf = new RandomAccessFile(file, \"r\")) {\n\t\t\t\tthis.fetchCachedDirectories(raf, cachedDirectoryPaths);\n\t\t\t}\n\t\t\tcatch (IOException e) {\n\t\t\t\tDebug.exception(e);\n\t\t\t}\n\n\t\t\tFileControl.lastSavedDirectory = new File(cachedDirectoryPaths.get(LevelEditor.FileControlIndex));\n\t\t\tScriptEditor.lastSavedDirectory = FileControl.lastSavedDirectory;\n\t\t}\n\t}",
"Cache(ScotlandYardAIModel model){\n // Generates distances from everywhere with every configuration.\n List<ScotlandYardAIPlayer> allPossiblePlayers = new ArrayList<>();\n for(int start = 1; start < 200; start++)\n for(int taxi = 0; taxi < 12; taxi++)\n for(int bus = 0; bus < 9; bus++)\n for(int underground = 0; underground < 5; underground++)\n allPossiblePlayers.add(new ScotlandYardAIPlayer(start, taxi, bus, underground));\n // Creates a BFS object to generate all distances, then saves them to cache\n BFS allBfs = new BFS(model.getGraph(), allPossiblePlayers);\n for(int start = 1; start < 200; start++)\n for(int to = 1; to < 200; to++)\n for(int taxi = 0; taxi < 12; taxi++)\n for(int bus = 0; bus < 9; bus++)\n for(int underground = 0; underground < 5; underground++)\n distance[start][to][taxi][bus][underground] = (byte) allBfs.getDistances()[start][to][taxi][bus][underground].distance();\n\n // Generates number of valid moves\n for(int node = 1; node < 200; node++)\n for(int taxi = 0; taxi < 3; taxi++)\n for(int bus = 0; bus < 3; bus++)\n for(int underground = 0; underground < 3; underground++)\n for(int doublet = 0; doublet < 2; doublet++)\n for(int secret = 0; secret < 3; secret++)\n validMoves[node][taxi][bus][underground][doublet][secret] =\n model.getValidMovesForPlayer(\n new ScotlandYardAIPlayer(node, taxi, bus, underground, doublet, secret)\n ).size();\n }",
"public void prepareModel() {\n //Since many models have different scale amplitudes, we calculate a uniform scale factor for the model\n setScaleFactor();\n //Since the 3ds file does not provide normal values, we must calculate them ourselves\n calculateNormals();\n //Finally we need to setup the buffers for drawing\n setupBuffers();\n }",
"public void loadAllTextures()\n {\n int numChildren = androidRobot3DObject.numChildren();\n for(int i = 0;i<numChildren;i++)\n {\n String name = androidRobot3DObject.getChildAt(i).name();\n\n Log.d(\"min3d\", \"Texture name: \" + name);\n\n // The name is either extracted from the _mtl file\n // or directly from the *.3ds file\n // The name can be given directly into Blender\n if(name.indexOf(\"body\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_body\");\n }\n\n if(name.indexOf(\"head\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_head\");\n }\n\n if(name.indexOf(\"foot\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_foot\");\n }\n\n\n if(name.indexOf(\"arm\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_arm\");\n }\n\n if(name.indexOf(\"antenna\")!=-1)\n {\n androidRobot3DObject.getChildAt(i).textures().clear();\n androidRobot3DObject.getChildAt(i).textures().addById(\"squared_robot_antenna\");\n }\n }\n\n }",
"public void clearCache() {\n textureCache.clear();\n modelCache.clear();\n blockModelCache.clear();\n }",
"public void gatherAssets(AssetDirectory directory) {\r\n\r\n\t\tassets = directory;\r\n\t\tavatarTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tcombinedTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\r\n\t\t// Tiles\r\n\t\tlightTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_light\", Texture.class ));\r\n\t\tdarkTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_dark\", Texture.class ));\r\n\t\tallTexture = new TextureRegion(directory.getEntry( \"shared:solidCloud_all\", Texture.class ));\r\n\t\trainLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light\", Texture.class ));\r\n\t\trainDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark\", Texture.class ));\r\n\t\trainAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all\", Texture.class ));\r\n\t\tlightningLightTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light\", Texture.class ));\r\n\t\tlightningDarkTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark\", Texture.class ));\r\n\t\tlightningAllTexture = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all\", Texture.class ));\r\n\t\tcrumbleLightTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light\", Texture.class ));\r\n\t\tcrumbleDarkTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark\", Texture.class ));\r\n\t\tcrumbleAllTexture = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all\", Texture.class ));\r\n\r\n\t\trainLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_light_reduced\", Texture.class ));\r\n\t\trainDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_dark_reduced\", Texture.class ));\r\n\t\trainAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_cloud_all_reduced\", Texture.class ));\r\n\t\tlightningLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_light_reduced\", Texture.class ));\r\n\t\tlightningDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_dark_reduced\", Texture.class ));\r\n\t\tlightningAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:lightning_cloud_all_reduced\", Texture.class ));\r\n\t\tcrumbleLightTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_light_reduced\", Texture.class ));\r\n\t\tcrumbleDarkTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_dark_reduced\", Texture.class ));\r\n\t\tcrumbleAllTextureReduced = new TextureRegion(directory.getEntry( \"shared:rain_crumble_all_reduced\", Texture.class ));\r\n\r\n\t\t// Tutorial\r\n\t\ttutorial_signs = new TextureRegion[]{\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:camera_pan\", Texture.class)), //0\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_dash\", Texture.class)), //1\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_jump\", Texture.class)), //2\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_propel\", Texture.class)), //3\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:phobia_walk\", Texture.class)), //4\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_dash\", Texture.class)), //5\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_jump\", Texture.class)), //6\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_propel\", Texture.class)), //7\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:somni_walk\", Texture.class)), //8\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_switch\", Texture.class)), //9\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_separate\", Texture.class)), //10\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:spirit_unify\", Texture.class)), //11\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:dash_catch\", Texture.class)),\t //12\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"tutorial:propel_dash_vertical\", Texture.class))\t //13\r\n\r\n\t\t};\r\n\r\n\t\t// Base models\r\n\t\tsomniTexture = new TextureRegion(directory.getEntry(\"platform:somni_stand\",Texture.class));\r\n\t\tsomniIdleTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Idle\",Texture.class));\r\n\t\tsomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_walk_cycle\",Texture.class));\r\n\t\tsomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Jump_Dash\",Texture.class));\r\n\t\tsomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\",Texture.class));\r\n\t\tsomniFallTexture = new TextureRegion(directory.getEntry(\"platform:Somni_Falling\", Texture.class));\r\n\r\n\t\tphobiaTexture = new TextureRegion(directory.getEntry(\"platform:phobia_stand\",Texture.class));\r\n\t\tphobiaIdleTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Idle\",Texture.class));\r\n\t\tphobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_walk_cycle\",Texture.class));\r\n\t\tphobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Jump_Dash\",Texture.class));\r\n\t\tphobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\",Texture.class));\r\n\t\tphobiaFallTexture = new TextureRegion(directory.getEntry(\"platform:Phobia_Falling\", Texture.class));\r\n\r\n\r\n\t\t// Combined models\r\n\t\tsomniPhobiaTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_stand\",Texture.class));\r\n\t\tsomniPhobiaWalkTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_walk\",Texture.class));\r\n\t\tsomniPhobiaDashSideTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_side\",Texture.class));\r\n\t\tsomniPhobiaDashUpTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_dash_up\",Texture.class));\r\n\t\tphobiaSomniTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_stand\",Texture.class));\r\n\t\tphobiaSomniWalkTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_walk\",Texture.class));\r\n\t\tphobiaSomniDashSideTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_side\",Texture.class));\r\n\t\tphobiaSomniDashUpTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_dash_up\",Texture.class));\r\n\r\n\t\tsomniPhobiaHandsTexture = new TextureRegion(directory.getEntry(\"platform:somni_phobia_hands\",Texture.class));\r\n\t\tphobiaSomniHandsTexture = new TextureRegion(directory.getEntry(\"platform:phobia_somni_hands\",Texture.class));\r\n\t\tblueRingBigTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_big\",Texture.class));\r\n\t\tyellowRingBigTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_big\",Texture.class));\r\n\t\tblueRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:blue_ring_small\",Texture.class));\r\n\t\tyellowRingSmallTexture = new TextureRegion(directory.getEntry(\"platform:yellow_ring_small\",Texture.class));\r\n\t\tsomniHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_front\",Texture.class));\r\n\t\tsomniHandBackTexture = new TextureRegion(directory.getEntry(\"platform:somni_hand_back\",Texture.class));\r\n\t\tphobiaHandFrontTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_front\",Texture.class));\r\n\t\tphobiaHandBackTexture = new TextureRegion(directory.getEntry(\"platform:phobia_hand_back\",Texture.class));\r\n\r\n\t\tbackgrounds = new TextureRegion[] {\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_forest\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_gear\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_dreams\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_house\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_light_statues\", Texture.class)),\r\n\t\t\t\tnew TextureRegion(directory.getEntry(\"platform:background_dark_statues\", Texture.class)),\r\n\r\n\t\t};\r\n\r\n\r\n\t\tTextureRegion [] somnis = {somniIdleTexture,somniWalkTexture,somniDashSideTexture,somniDashUpTexture, somniFallTexture, somniDashUpTexture};\r\n\t\tsomnisTexture = somnis;\r\n\t\tTextureRegion [] phobias = {phobiaIdleTexture,phobiaWalkTexture,phobiaDashSideTexture,phobiaDashUpTexture, phobiaFallTexture, phobiaDashUpTexture};\r\n\t\tphobiasTexture = phobias;\r\n\t\tTextureRegion [] somniphobias = {somniPhobiaTexture,somniPhobiaWalkTexture,somniPhobiaDashSideTexture,somniPhobiaDashUpTexture, somniPhobiaDashUpTexture};\r\n\t\tsomniphobiasTexture = somniphobias;\r\n\t\tTextureRegion [] phobiasomnis = {phobiaSomniTexture,phobiaSomniWalkTexture,phobiaSomniDashSideTexture,phobiaSomniDashUpTexture, phobiaSomniDashUpTexture};\r\n\t\tphobiasomnisTexture = phobiasomnis;\r\n\t\tTextureRegion [] somniHands = {somniHandFrontTexture, somniHandBackTexture, somniPhobiaHandsTexture};\r\n\t\tsomniHandsTextures = somniHands;\r\n\t\tTextureRegion [] phobiaHands = {phobiaHandFrontTexture, phobiaHandBackTexture, phobiaSomniHandsTexture};\r\n\t\tphobiaHandsTextures = phobiaHands;\r\n\r\n\t\tanimationSpeed = new float[]{0.1f, 0.5f, 0.1f, 0.1f, 0.1f, 0.1f};\r\n\t\tframePixelWidth = new double[]{32, 64, 32, 32, 32, 32};\r\n\t\toffsetsX = new float[]{12, 19, 0, 0, 15, 0};\r\n\t\toffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tsecOffsetsX = new float[]{-20, -16, 52, 60, -18, 35, -18};\r\n\t\tsecOffsetsY = new float[]{0, 0, -80, -60, 0, -70, 0};\r\n\t\tthirdOffsetsX = new float[]{0, -18, -22, -22, 0, -22, 10, -15, 0, 0, 5, 0, 0, -20, 0, 0, -2, 0};\r\n\t\tthirdOffsetsY = new float[]{0, 0, 0, 0, 0, 0};\r\n\t\tdashAngles = new float[] {0, 0, -1.55f, 0, 0, 3.14f};\r\n\t\tpropelAngles = new float[] {0, 0, 0, 1.55f, 0, -1.55f};\r\n\r\n\r\n\t\t// Setup masking\r\n\t\tcircle_mask = new TextureRegion(directory.getEntry(\"circle_mask\",Texture.class));\r\n\t\tVector2 mask_size = new Vector2(circle_mask.getRegionWidth(), circle_mask.getRegionHeight());\r\n\t\tMIN_MASK_DIMENSIONS = new Vector2(mask_size).scl(mask_shrink_factor);\r\n\t\tmaskWidth = MIN_MASK_DIMENSIONS.x;\r\n\t\tmaskHeight = MIN_MASK_DIMENSIONS.y;\r\n\r\n\t\tsliderBarTexture = directory.getEntry( \"platform:sliderbar\", Texture.class);\r\n\t\tsliderKnobTexture = directory.getEntry( \"platform:sliderknob\", Texture.class);\r\n\r\n\t\tjumpSound = directory.getEntry( \"platform:jump\", SoundBuffer.class );\r\n\t\tfireSound = directory.getEntry( \"platform:pew\", SoundBuffer.class );\r\n\t\tplopSound = directory.getEntry( \"platform:plop\", SoundBuffer.class );\r\n\r\n\t\tconstants = directory.getEntry( \"constants\", JsonValue.class );\r\n\r\n\r\n\r\n\r\n\r\n//Gather sound assets\r\n\t\twinTrack = directory.getEntry(\"winTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setWinTrack(winTrack);\r\n\r\n\t\tfailTrack = directory.getEntry(\"failTrack\", SoundBuffer.class);\r\n\t\tSoundController.getInstance().setFailTrack(failTrack);\r\n\r\n\r\n\r\n//\t\tsomniTrack = directory.getEntry(\"somniTrack\", SoundBuffer.class);\r\n//\t\tphobiaTrackPath = directory.getEntry(\"phobiaTrack\", SoundBuffer.class);\r\n//\t\tcombinedTrackPath = directory.getEntry(\"combinedTrack\", SoundBuffer.class);\r\n\r\n\r\n//\t\tmenu drawables\r\n\t\torangeUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline_red\", Texture.class));\r\n\t\tblueUnderline = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pausemenu_underline\", Texture.class));\r\n\t\tblueRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:bluerectangle\", Texture.class));\r\n\t\tblueExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_blue\", Texture.class));\r\n\t\tblueResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_blue\", Texture.class));\r\n\t\tblueRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_blue\", Texture.class));\r\n\t\torangeRectangle = new TextureRegionDrawable(directory.getEntry(\"pause_menu:orangerectangle\", Texture.class));\r\n\t\torangeExit = new TextureRegionDrawable(directory.getEntry(\"pause_menu:exit_orange\", Texture.class));\r\n\t\torangeResume = new TextureRegionDrawable(directory.getEntry(\"pause_menu:resume_orange\", Texture.class));\r\n\t\torangeRestart = new TextureRegionDrawable(directory.getEntry(\"pause_menu:restart_orange\", Texture.class));\r\n\t\t//\t\tSliders\r\n\t\torangeSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_orange\", Texture.class));\r\n\t\tblueSlider = new TextureRegionDrawable(directory.getEntry(\"pause_menu:slider_blue\", Texture.class));\r\n\t\torangeKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_orange\", Texture.class));\r\n\t\tblueKnob = new TextureRegionDrawable(directory.getEntry(\"pause_menu:knob_blue\", Texture.class));\r\n\t\torangeSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_orange\", Texture.class));\r\n\t\tblueSound = new TextureRegionDrawable(directory.getEntry(\"pause_menu:sound_blue\", Texture.class));\r\n\t\tblueMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_blue\", Texture.class));\r\n\t\torangeMusicNote = new TextureRegionDrawable(directory.getEntry(\"pause_menu:musicnote_orange\", Texture.class));\r\n\r\n\t\tblueNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextblue\", Texture.class));\r\n\t\torangeNext = new TextureRegionDrawable(directory.getEntry(\"pause_menu:nextorange\", Texture.class));\r\n\r\n\t\tbluePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_blue\", Texture.class));\r\n\t\torangePauseButton = new TextureRegionDrawable(directory.getEntry(\"pause_menu:pause_button_red\", Texture.class));\r\n\t\tblurBackground = new TextureRegion(directory.getEntry(\"pause_menu:blur\", Texture.class));\r\n\r\n\r\n\t\tsuper.gatherAssets(directory);\r\n\r\n\r\n\t}",
"public void cacheResult(\n\t\tjava.util.List<ua.org.gostroy.guestbook.model.Entry3> entry3s);",
"@Override\n\tpublic void loadModels(ZipInputStream zin)\n\t{\n\t\tf_xmls = new JointFtrXml[1];\n\t\ts_models = null;\n\t\tZipEntry zEntry;\n\t\tString entry;\n\t\t\t\t\n\t\ttry\n\t\t{\n\t\t\twhile ((zEntry = zin.getNextEntry()) != null)\n\t\t\t{\n\t\t\t\tentry = zEntry.getName();\n\t\t\t\t\n\t\t\t\tif (entry.equals(ENTRY_CONFIGURATION))\n\t\t\t\t\tloadDefaultConfiguration(zin);\n\t\t\t\telse if (entry.startsWith(ENTRY_FEATURE))\n\t\t\t\t\tloadFeatureTemplates(zin, Integer.parseInt(entry.substring(ENTRY_FEATURE.length())));\n\t\t\t\telse if (entry.startsWith(ENTRY_FRAMES))\n\t\t\t\t\tloadFrames(zin);\n\t\t\t\telse if (entry.equals(ENTRY_LEXICA))\n\t\t\t\t\tloadLexica(zin);\n\t\t\t\telse if (entry.startsWith(ENTRY_MODEL))\n\t\t\t\t\tloadStatisticalModels(zin, Integer.parseInt(entry.substring(ENTRY_MODEL.length())));\n\t\t\t\telse if (entry.startsWith(ENTRY_WEIGHTS))\n\t\t\t\t\tloadWeightVector(zin, Integer.parseInt(entry.substring(ENTRY_WEIGHTS.length())));\n\t\t\t}\t\t\n\t\t}\n\t\tcatch (Exception e) {e.printStackTrace();}\n\t}",
"@Override\n protected String doInBackground(String... f_url) {\n Thread.currentThread().setName(\"DownloadModel\");\n File destinationZip,initialPath,decompressedPath;\n final String fileName;\n try {\n // Output stream\n initialPath = getDir(MODEL_PATH, MODE_PRIVATE);\n fileName = new File(f_url[0]).getName();\n destinationZip = new File(initialPath, new File(f_url[0]).getName());\n decompressedPath = new File(initialPath, modelName);\n\n // see if it can load the model\n runOnUiThread(() -> pDialog.setMessage(\"Loading \"+modelName));\n try {\n setStatus(ImageClassificationActivity.Status.LOADING);\n Log.i(TAG,\"before load model \"+decompressedPath.getPath());\n classifier.loadModel(decompressedPath);\n Log.d(TAG,\"loaded model \"+modelName);\n setStatus(ImageClassificationActivity.Status.IDLE);\n return null;\n } catch( IOException e ) {\n Log.w(TAG,\"Failed to load model on first attempt. Downloading\");\n Log.w(TAG,\" message = \"+e.getMessage());\n }\n\n // download the file\n downloadModelFile(destinationZip, decompressedPath, f_url[0]);\n\n } catch (IOException e) {\n Log.e(\"Error: \", e.getMessage());\n setStatus(ImageClassificationActivity.Status.ERROR);\n return null;\n }\n\n if( stopRequested ) {\n Log.i(TAG, \"Download stop requested. Cleaning up. \");\n if (destinationZip.exists() && !destinationZip.delete()) {\n Log.e(\"Error: \", \"Failed to delete \" + destinationZip.getName());\n }\n setStatus(ImageClassificationActivity.Status.WAITING);\n } else {\n // Try loading the model now that it's downloaded\n try {\n runOnUiThread(() -> pDialog.setMessage(\"Decompressing \" + fileName));\n\n Log.i(TAG, \"Decompressing \" + decompressedPath.getPath());\n setStatus(ImageClassificationActivity.Status.DECOMPRESSING);\n\n deleteModelData(false); // clean up first\n\n ZipFile zipFile = new ZipFile(destinationZip);\n zipFile.extractAll(initialPath.getAbsolutePath());\n if (!destinationZip.delete()) {\n Log.e(\"Error: \", \"Failed to delete \" + destinationZip.getName());\n }\n\n runOnUiThread(() -> pDialog.setMessage(\"Loading \" + modelName));\n setStatus(ImageClassificationActivity.Status.LOADING);\n classifier.loadModel(decompressedPath);\n setStatus(ImageClassificationActivity.Status.IDLE);\n } catch (IOException e) {\n Log.w(TAG, \"Failed to load model on second attempt.\");\n e.printStackTrace();\n setStatus(ImageClassificationActivity.Status.ERROR);\n }\n }\n\n return null;\n }",
"private void populateList(File[] filesList) {\n Log.i(\"mPackage\",\"FilesList: \"+filesList.length);\n for(File file : filesList) {\n //Log.i(\"mPackage\",\"Path: \"+file);\n if(file.isDirectory()) {\n populateList(file.listFiles());\n }\n else {\n MarkerModel markerModel = new MarkerModel();\n Boolean containsObj = false;\n for(File modelFile : filesList) {\n String[] extension = modelFile.getName().split(\"\\\\.\");\n if(extension[extension.length-1].equals(\"obj\")) {\n markerModel.setObj(modelFile.getPath());\n containsObj = true;\n }\n else if(extension[extension.length-1].equals(\"mtl\"))\n markerModel.setMtl(modelFile.getPath());\n else\n markerModel.addTexture(modelFile.getPath());\n }\n if(containsObj)\n models.add(markerModel);\n return;\n //models.add(file.getPath());\n //Log.i(\"mPackage\",\"Path: \"+file.getPath());\n }\n }\n }",
"public void syncCache() {\n for (String s : this.cache.keySet()) {\n JsonDocument document = this.cache.get(s);\n document.save(new File(directory, s + \".json\"));\n }\n }",
"@GuardedBy(\"mLock\") // Do not call outside this lock.\n private List<ModelFile> listAllModelsLocked() {\n if (mAllModelFiles == null) {\n final List<ModelFile> allModels = new ArrayList<>();\n // The update model has the highest precedence.\n if (new File(UPDATED_MODEL_FILE_PATH).exists()) {\n final ModelFile updatedModel = ModelFile.fromPath(UPDATED_MODEL_FILE_PATH);\n if (updatedModel != null) {\n allModels.add(updatedModel);\n }\n }\n // Factory models should never have overlapping locales, so the order doesn't matter.\n final File modelsDir = new File(MODEL_DIR);\n if (modelsDir.exists() && modelsDir.isDirectory()) {\n final File[] modelFiles = modelsDir.listFiles();\n final Pattern modelFilenamePattern = Pattern.compile(MODEL_FILE_REGEX);\n for (File modelFile : modelFiles) {\n final Matcher matcher = modelFilenamePattern.matcher(modelFile.getName());\n if (matcher.matches() && modelFile.isFile()) {\n final ModelFile model = ModelFile.fromPath(modelFile.getAbsolutePath());\n if (model != null) {\n allModels.add(model);\n }\n }\n }\n }\n mAllModelFiles = allModels;\n }\n return mAllModelFiles;\n }",
"public List<GameSceneSerializable> getGameSceneSerializables(String fileName){\n File directory = new File(fileName);\n File[] directoryListing = directory.listFiles();\n List<GameSceneSerializable> list = new ArrayList<>();\n if (directoryListing != null){\n for (File level : directoryListing){\n String path = level.getAbsolutePath();\n if (path.contains(DS_STORE)) {continue;}\n list.add(retrieveGameSceneSerializable(path));\n }\n }\n return list;\n }",
"private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }",
"private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }",
"private void loadGameFiles(){\n\t}",
"public MultiCache () {\n super();\n this.locals = new ArrayList<Coordinates>();\n this.stage = 0;\n }",
"public static void initCacheFileByData(Context context) {\n\t\tfinal String imageDir = getAppFilesDirByData(context)+ CACHE_IMG_DIR_PATH;\n\t\tfinal File imageFileDir = new File(imageDir);\n\t\tif (!imageFileDir.exists()) {\n\t\t\timageFileDir.mkdirs();\n\t\t}\n\t}",
"public void allLayers()\n\t{\n\t\tint totalLayers = this.psd.getLayersCount();\n\t\t\n\t\tLayer layer;\n\t\t\n\t\tfor (int i = totalLayers - 1; i >= 0; i--) {\n\t\t\tlayer = this.psd.getLayer(i);\n\t\t\t\n\t\t\tif (!layer.isVisible() || (layer.getType() == LayerType.NORMAL && layer.getWidth() == 0)) {\n\t\t\t\tthis.layersToRemove.add(layer);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tlayer.adjustPositionAndSizeInformation();\n\t\t\tthis.layerId++;\n\t\t\t\n\t\t\tif (LayerType.NORMAL == layer.getType()) {\n\t\t\t\t\n\t\t\t\tlayer.setUniqueLayerId(this.layerId);\n\t\t\t\tlayer.setGroupLayerId(0);\n\t\t\t\tlayer.setDepth(0);\n\t\t\t\t\n\t\t\t\tthis.layers.add(layer);\n\t\t\t\t\n\t\t\t} else if (LayerType.OPEN_FOLDER == layer.getType() || LayerType.CLOSED_FOLDER == layer.getType()) {\n\t\t\t\t\n\t\t\t\tlayer.setUniqueLayerId(this.layerId);\n\t\t\t\tlayer.setGroupLayerId(0);\n\t\t\t\tlayer.setDepth(0);\n\t\t\t\t\n\t\t\t\tthis.layers.add(layer);\n\t\t\t\t\n\t\t\t\tif (layer.getLayersCount() > 0) {\n\t\t\t\t\tthis.subLayers(layer, this.layerId, 1);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private static File createReserveDiskCacheDir(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context, false);\n\t\tFile individualDir = new File(cacheDir, \"lazy-cache\");\n\t\tif (individualDir.exists() || individualDir.mkdir()) {\n\t\t\tcacheDir = individualDir;\n\t\t}\n\t\treturn cacheDir;\n\t}",
"private void searchLocalFiles(TwitchVideoInfo videoInfo) {\n if (videoInfo.getState().equals(INITIAL)) {\n File playlist = new File(playlistFolderPath + videoInfo.getId() + \".m3u\");\n if (playlist.exists() && playlist.isFile() && playlist.canRead()) {\n videoInfo.setMainRelatedFileOnDisk(playlist);\n videoInfo.putRelatedFile(\"playlist\", playlist);\n\n try {\n InputStream is = new FileInputStream(playlist);\n Scanner sc = new Scanner(is);\n int i = 0;\n while (sc.hasNextLine()) {\n String line = sc.nextLine();\n File file = new File(line);\n if (file.exists()) {\n i++;\n String key = String.format(\"playlist_item_%04d\", i);\n videoInfo.putRelatedFile(key, file);\n }\n }\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n videoInfo.setState(DOWNLOADED);\n }\n\n ffmpegFileListFile = new File(playlistFolderPath + videoInfo.getId() + \".ffmpeglist\");\n if (ffmpegFileListFile.exists()) {\n videoInfo.putRelatedFile(\"ffmpegFileListFile\", ffmpegFileListFile);\n }\n\n File mp4Video = getVideoFile(videoInfo, true);\n\n if (mp4Video.exists() && mp4Video.isFile() && mp4Video.canRead()) {\n videoInfo.setMainRelatedFileOnDisk(mp4Video);\n videoInfo.putRelatedFile(\"mp4Video\", mp4Video);\n videoInfo.setState(CONVERTED);\n }\n }\n }",
"private MappedByteBuffer loadModelFile(Activity activity) throws IOException {\n AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);\n FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());\n FileChannel fileChannel = inputStream.getChannel();\n long startOffset = fileDescriptor.getStartOffset();\n long declaredLength = fileDescriptor.getDeclaredLength();\n return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);\n }",
"private void collectZDLModelsFromClasspath(IJavaProject project,\r\n\t\t\tList<MetaModel> metamodels, Map<IFile, Model> workspaceZDLs,\r\n\t\t\tIClasspathEntry[] classpath)\r\n\t\t\tthrows JavaModelException {\r\n\r\n\t\tfor (IClasspathEntry entry : classpath) {\r\n\t\t\tIPath path = entry.getPath();\r\n\r\n\t\t\tswitch (entry.getEntryKind()) {\r\n\t\t\t\tcase IClasspathEntry.CPE_SOURCE :\r\n\t\t\t\t\tcollectWorkspaceZDLModels(metamodels, path, workspaceZDLs);\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase IClasspathEntry.CPE_PROJECT :\r\n\t\t\t\t\tcollectWorkspaceZDLModels(metamodels, path, workspaceZDLs);\r\n\r\n\t\t\t\t\t// recursively follow the classpath of the project\r\n\t\t\t\t\tIProject proj = wsroot.getProject(path.lastSegment());\r\n\t\t\t\t\tif (proj.exists() && proj.isOpen()) {\r\n\t\t\t\t\t\tIJavaProject dependency = JavaCore.create(proj);\r\n\t\t\t\t\t\tcollectZDLModelsFromClasspath(dependency, metamodels,\r\n\t\t\t\t\t\t\tworkspaceZDLs, dependency.getRawClasspath());\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase IClasspathEntry.CPE_LIBRARY :\r\n\t\t\t\t\tSet<Model> deployed = ZDLMetamodelManager.INSTANCE\r\n\t\t\t\t\t\t.getDeployedZDLModels(path);\r\n\r\n\t\t\t\t\tfor (Model next : deployed) {\r\n\t\t\t\t\t\tmetamodels.add(new ZDLMetamodel(next));\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase IClasspathEntry.CPE_CONTAINER :\r\n\t\t\t\t\tif (path.segment(0).equals(PDE_REQUIRED_PLUGINS_CONTAINER)) {\r\n\t\t\t\t\t\tIClasspathContainer container = JavaCore\r\n\t\t\t\t\t\t\t.getClasspathContainer(path, project);\r\n\t\t\t\t\t\tcollectZDLModelsFromClasspath(project, metamodels,\r\n\t\t\t\t\t\t\tworkspaceZDLs, container.getClasspathEntries());\r\n\t\t\t\t\t}\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void copyFiles(String Language) {\n try {\n String filepath = mDataPath + \"/tessdata/\" + Language + \".traineddata\";\n AssetManager assetManager = getAssets();\n InputStream instream = assetManager.open(\"tessdata/\"+Language+\".traineddata\");\n OutputStream outstream = new FileOutputStream(filepath);\n byte[] buffer = new byte[1024];\n int read;\n while ((read = instream.read(buffer)) != -1) {\n outstream.write(buffer, 0, read);\n }\n outstream.flush();\n outstream.close();\n instream.close();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"private void readInfo3(final Element cacheInfo, final String indexdir) {\n\t\tfinal Long boolFields = Long.parseLong(cacheInfo\n\t\t\t\t.getAttributeValue(\"boolFields\"));\n\t\tfinal Long byteFields = Long.parseLong(cacheInfo\n\t\t\t\t.getAttributeValue(\"byteFields\"));\n\t\t\n\t\twaypId = cacheInfo.getAttributeValue(\"wayp\");\n\t\tname = cacheInfo.getAttributeValue(\"name\");\n\t\towner = cacheInfo.getAttributeValue(\"owner\");\n\n\t\tlat = Float.parseFloat(cacheInfo.getAttributeValue(\"lat\")\n\t\t\t\t.replace(',', '.'));\n\t\tlon = Float.parseFloat(cacheInfo.getAttributeValue(\"lon\")\n\t\t\t\t.replace(',', '.'));\n\n\t\thidden = getCalFromString(cacheInfo.getAttributeValue(\"hidden\"));\n\t\tfoundDate = getCalFromString(cacheInfo.getAttributeValue(\"status\"));\n\n\t\tdifficulty = extractByteFromLong(byteFields, \n\t\t\t\tOFFSET_DIFF);\n\t\tterrain = extractByteFromLong(byteFields, \n\t\t\t\tOFFSET_TERR);\n\t\ttype = extractByteFromLong(byteFields, \n\t\t\t\tOFFSET_TYPE);\n\t\tsize = extractByteFromLong(byteFields, \n\t\t\t\tOFFSET_SIZE);\n\t\tdnfLogs = extractByteFromLong(byteFields, \n\t\t\t\tOFFSET_DNF);\n\t\tarchived = extractBoolFromLong(boolFields, \n\t\t\t\tMASK_ARCHIVED);\n\t\tfound = extractBoolFromLong(boolFields, \n\t\t\t\tMASK_FOUND);\n\t\tincomplete = extractBoolFromLong(boolFields, \n\t\t\t\tMASK_INCOMPLETE);\n\t\tavailable = extractBoolFromLong(boolFields,\n\t\t\t\tMASK_AVAILABLE);\n\n\t\tif (CacheType.isAddiWpt(type.byteValue())) { additional = true; }\n\n\t\tdetails = new CacheDetails(waypId, indexdir);\n\t}",
"public void cargarModelo() {\n\t}",
"public StillModel loadModel(String filepath);",
"public static void loadCache() {\n\t\t // it is the temporary replacement to database. We should use DB instead\n\t Circle circle = new Circle();\n\t circle.setId(\"1\");\n\t shapeMap.put(circle.getId(),circle);\n\n\t Square square = new Square();\n\t square.setId(\"2\");\n\t shapeMap.put(square.getId(),square);\n\n\t Rectangle rectangle = new Rectangle();\n\t rectangle.setId(\"3\");\n\t \n\t Circle circle2 = new Circle();\n\t circle2.setId(\"4\");\n\t circle2.setType(\"Big Circle\");\n\t shapeMap.put(circle2.getId(),circle2);\n\t shapeMap.put(rectangle.getId(), rectangle);\n\t }",
"Mesh toModel(Mesh result);",
"protected void clearCaches() {\n // Primary class LocusDetailProxy cache\n IDaoManager manager = DaoManagerFactory.getManager(getSubsystem());\n if (manager != null) {\n manager.clearCache(org.tair.db.locusdetail.LocusDetailProxy.class.getName());\n }\n\n // Clear nested object caches\n \n // Child LocusUpdateHistory cache\n IDaoManager LocusUpdateHistoryManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusUpdateHistoryManager != null) {\n LocusUpdateHistoryManager.clearCache(org.tair.db.locusdetail.LocusUpdateHistory.class.getName());\n }\n \n // Child ModelFeature cache\n IDaoManager ModelFeatureManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ModelFeatureManager != null) {\n ModelFeatureManager.clearCache(org.tair.db.locusdetail.ModelFeature.class.getName());\n }\n \n // Child LocusGeneModelCdnaAlias cache\n IDaoManager LocusGeneModelCdnaAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelCdnaAliasManager != null) {\n LocusGeneModelCdnaAliasManager.clearCache(org.tair.db.locusdetail.LocusGeneModelCdnaAlias.class.getName());\n }\n \n // Child LocusGeneModelCdna cache\n IDaoManager LocusGeneModelCdnaManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelCdnaManager != null) {\n LocusGeneModelCdnaManager.clearCache(org.tair.db.locusdetail.LocusGeneModelCdna.class.getName());\n }\n \n // Child ProteinResourceLink cache\n IDaoManager ProteinResourceLinkManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinResourceLinkManager != null) {\n ProteinResourceLinkManager.clearCache(org.tair.db.locusdetail.ProteinResourceLink.class.getName());\n }\n \n // Child ProteinModelDomain cache\n IDaoManager ProteinModelDomainManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinModelDomainManager != null) {\n ProteinModelDomainManager.clearCache(org.tair.db.locusdetail.ProteinModelDomain.class.getName());\n }\n \n // Child ProteinModel Proxy cache\n IDaoManager ProteinModelManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ProteinModelManager != null) {\n ProteinModelManager.clearCache(org.tair.db.locusdetail.ProteinModel.class.getName());\n }\n \n // Child LocusGeneModelAnnotation cache\n IDaoManager LocusGeneModelAnnotationManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelAnnotationManager != null) {\n LocusGeneModelAnnotationManager.clearCache(org.tair.db.locusdetail.LocusGeneModelAnnotation.class.getName());\n }\n \n // Child PolymorphismSite cache\n IDaoManager PolymorphismSiteManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (PolymorphismSiteManager != null) {\n PolymorphismSiteManager.clearCache(org.tair.db.locusdetail.PolymorphismSite.class.getName());\n }\n \n // Child LocusGeneModel Proxy cache\n IDaoManager LocusGeneModelManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusGeneModelManager != null) {\n LocusGeneModelManager.clearCache(org.tair.db.locusdetail.LocusGeneModel.class.getName());\n }\n \n // Child LocusOtherName cache\n IDaoManager LocusOtherNameManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusOtherNameManager != null) {\n LocusOtherNameManager.clearCache(org.tair.db.locusdetail.LocusOtherName.class.getName());\n }\n \n // Child LocusPhysicalMapCoordinates cache\n IDaoManager LocusPhysicalMapCoordinatesManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusPhysicalMapCoordinatesManager != null) {\n LocusPhysicalMapCoordinatesManager.clearCache(org.tair.db.locusdetail.LocusPhysicalMapCoordinates.class.getName());\n }\n \n // Child LocusResourceLink cache\n IDaoManager LocusResourceLinkManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusResourceLinkManager != null) {\n LocusResourceLinkManager.clearCache(org.tair.db.locusdetail.LocusResourceLink.class.getName());\n }\n \n // Child LocusComment cache\n IDaoManager LocusCommentManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCommentManager != null) {\n LocusCommentManager.clearCache(org.tair.db.locusdetail.LocusComment.class.getName());\n }\n \n // Child LocusAttribution cache\n IDaoManager LocusAttributionManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusAttributionManager != null) {\n LocusAttributionManager.clearCache(org.tair.db.locusdetail.LocusAttribution.class.getName());\n }\n \n // Child LocusOtherSymbol cache\n IDaoManager LocusOtherSymbolManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusOtherSymbolManager != null) {\n LocusOtherSymbolManager.clearCache(org.tair.db.locusdetail.LocusOtherSymbol.class.getName());\n }\n \n // Child LocusPolymorphism Proxy cache\n IDaoManager LocusPolymorphismManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusPolymorphismManager != null) {\n LocusPolymorphismManager.clearCache(org.tair.db.locusdetail.LocusPolymorphism.class.getName());\n }\n \n // Child ReferencedLocus cache\n IDaoManager ReferencedLocusManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ReferencedLocusManager != null) {\n ReferencedLocusManager.clearCache(org.tair.db.locusdetail.ReferencedLocus.class.getName());\n }\n \n // Child Reference Proxy cache\n IDaoManager ReferenceManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (ReferenceManager != null) {\n ReferenceManager.clearCache(org.tair.db.locusdetail.Reference.class.getName());\n }\n \n // Child LocusBac cache\n IDaoManager LocusBacManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusBacManager != null) {\n LocusBacManager.clearCache(org.tair.db.locusdetail.LocusBac.class.getName());\n }\n \n // Child LocusEstAlias cache\n IDaoManager LocusEstAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusEstAliasManager != null) {\n LocusEstAliasManager.clearCache(org.tair.db.locusdetail.LocusEstAlias.class.getName());\n }\n \n // Child LocuslEst cache\n IDaoManager LocuslEstManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocuslEstManager != null) {\n LocuslEstManager.clearCache(org.tair.db.locusdetail.LocuslEst.class.getName());\n }\n \n // Child LocusCdnaAlias cache\n IDaoManager LocusCdnaAliasManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCdnaAliasManager != null) {\n LocusCdnaAliasManager.clearCache(org.tair.db.locusdetail.LocusCdnaAlias.class.getName());\n }\n \n // Child LocusCdna cache\n IDaoManager LocusCdnaManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusCdnaManager != null) {\n LocusCdnaManager.clearCache(org.tair.db.locusdetail.LocusCdna.class.getName());\n }\n \n // Child LocusAnnotation cache\n IDaoManager LocusAnnotationManager = DaoManagerFactory.getManager(\"org.tair.db.locusdetail\");\n if (LocusAnnotationManager != null) {\n LocusAnnotationManager.clearCache(org.tair.db.locusdetail.LocusAnnotation.class.getName());\n }\n }",
"private <T> void loadAllFromFolder(String name,Class<T> type){\n\t\tFileHandle dirHandle;\n\t\tif (Gdx.app.getType() == ApplicationType.Desktop) {\n\t\t dirHandle = new FileHandle(\"./bin/\"+name);\n\t\t \n\t\t} else {\n\t\t dirHandle = Gdx.files.internal(name);\n\t\t}\n\t\t \n\t\tfor (FileHandle entry: dirHandle.list()) {\n\t\t assetManager.load(entry.path(),type);\n\t\t}\n\t}",
"private void deleteCacheFiles() {\n\n\t\t// get the directory file\n\t\tFile cache = new File(Constants.CACHE_DIR_PATH);\n\n\t\t// check if we got the correct instance of that directory file.\n\t\tif (!cache.exists() || !cache.isDirectory())\n\t\t\treturn;\n\n\t\t// gets the list of files in the directory\n\t\tFile[] files = cache.listFiles();\n\t\t// deleting\n\n\t\tdeleteFiles(cache);\n\t\tfiles = null;\n\t\tcache = null;\n\n\t}",
"public ArrayList<ArrayList<String>> readthePathOfMusicFiles()\n {\n File file = new File(path);\n String[] names = file.list();// all directories inside dataset1 direcory\n ArrayList<ArrayList<String>> pathOfMusicFiles = new ArrayList<>();\n String artistName = \"\";\n String trackName = \"\";\n Mp3File song = null;\n for (int i = 0; i < names.length; i++) \n {\n File file1 = new File(path + '/' + names[i]);\n if (file1.isDirectory())\n {\n String[] fileNames = file1.list();\n for (String fileName : fileNames)// all files in directory\n {\n if (fileName.contains(\".mp3\") && !(fileName.charAt(0) == '.'))\n {\n try\n {\n song = new Mp3File(path + '/' + names[i] + '/' + fileName);\n }\n catch (UnsupportedTagException | InvalidDataException | IOException e)\n {\n e.printStackTrace();\n }\n if(song!=null && song.hasId3v1Tag())\n {\n ID3v1 id3v1Tag = song.getId3v1Tag();\n artistName = id3v1Tag.getArtist();\n trackName = id3v1Tag.getTitle();\n }\n if(song!=null && song.hasId3v2Tag())\n {\n ID3v2 id3v2tag = song.getId3v2Tag();\n artistName = id3v2tag.getArtist();\n trackName = id3v2tag.getTitle();\n }\n if(artistName != null && artistName.length() >= 1 && trackName != null && artistName.length() >= 1)\n {\n if(artistName.charAt(0) >= startChar && artistName.charAt(0) <= endChar)\n {\n ArrayList<String> songAttributes = new ArrayList<>();\n songAttributes.add(path + '/' + names[i] + '/' + fileName);\n songAttributes.add(artistName);\n songAttributes.add(trackName);\n pathOfMusicFiles.add(songAttributes);\n }\n }\n }\n }\n }\n }\n return pathOfMusicFiles;\n }",
"@InputFiles\n @Incremental\n @PathSensitive(PathSensitivity.RELATIVE)\n public abstract ConfigurableFileCollection getFeatureDexFolder();",
"public void reset() {\n\t\tmodelVertices.clear();\n\t\ttextureVertices.clear();\n\t\tnormalVertices.clear();\n\t\tgroups.clear();\n\t\tsegments.clear();\n\t\tDebug.info(\"Jay3dModel\",\"OBJModel is empty\");\n\t}",
"private void createDataModelFolders() {\n\n File dataFolder = new File(Environment.getExternalStorageDirectory() + \"/AGH_IM_DATA\");\n File modelFolder = new File(Environment.getExternalStorageDirectory() + \"/AGH_IM_MODEL\");\n\n boolean dataSuccess = true;\n boolean modelSuccess = true;\n if (!dataFolder.exists()) {\n try {\n dataSuccess = dataFolder.mkdirs();\n } catch (SecurityException e) {\n dataSuccess = false;\n }\n }\n\n if (!modelFolder.exists()) {\n try {\n modelSuccess = modelFolder.mkdirs();\n } catch (SecurityException e) {\n modelSuccess = false;\n }\n }\n\n String TAG = \"MainScreen\";\n if (dataSuccess) Log.d(TAG, \"Created AGH_IM_DATA folder\");\n else Log.d(TAG, \"Cannot create AGH_IM_DATA Folder\");\n if (modelSuccess) Log.d(TAG, \"Successfully created AGH_IM_MODEL folder\");\n else Log.d(TAG, \"Cannot create AGH_IM_MODEL Folder\");\n\n }",
"public List<File> listCacheDirs() {\n List<File> cacheDirs = new ArrayList<File>();\n File file = new File(parent);\n if(file.exists()) {\n File[] files = file.listFiles(new FileFilter() {\n @Override\n public boolean accept(File pathname) {\n // TODO Auto-generated method stub\n return pathname.isDirectory() && \n pathname.getName().startsWith(CacheDirectory.cacheDirNamePrefix(identity));\n }\n \n });\n cacheDirs = Arrays.asList(files);\n }\n return cacheDirs;\n }",
"public static ArrayList<Shape> loadOBJ(URL url, String unit) {\n ArrayList<Shape> shapes = new ArrayList<>();\n float factor = factorFromUnit(unit);\n\n Group g = null;\n try {\n g = Importer3D.load(url).getRoot();\n } catch (IOException e) {\n System.err.println(\"Error reading OBJ file \" + url);\n }\n\n // go through the group of objects\n // add all triangle meshes to the list\n for (Node n : g.getChildren()) {\n if (n instanceof MeshView) {\n //System.out.println(\"Adding shape\");\n MeshView mv = (MeshView) n;\n TriangleMesh m = (TriangleMesh) mv.getMesh();\n if (factor != 1.0f) {\n float[] data = m.getPoints().toArray(null);\n for (int i = 0; i < data.length; i++) {\n data[i] *= factor;\n }\n m.getPoints().clear();\n m.getPoints().addAll(data);\n }\n shapes.add(new Shape((MeshView) n));\n }\n }\n return shapes;\n }",
"public void process()\n\t{\n\t\tthis.layers = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * list of layers to remove\n\t\t */\n\t\tthis.layersToRemove = new ArrayList<Layer>();\n\t\t\n\t\t/**\n\t\t * find all layers we need to process in the document\n\t\t */\n\t\tthis.allLayers();\n\t\t\n\t\t/**\n\t\t * we'll remove all layers which are unused in psd\n\t\t */\n\t\tthis.removeUnusedLayers();\n\t\t\n//\t\tthis.discoverMaximumLayerDepth();\n\t\t\n\t\t/*this.showLayersInformation(this.layers);\n\t\tSystem.exit(0)*/;\n\t}",
"private void loadDirectoryUp() {\n\t\tString s = pathDirsList.remove(pathDirsList.size() - 1);\n\t\t// path modified to exclude present directory\n\t\tpath = new File(path.toString().substring(0,\n\t\t\t\tpath.toString().lastIndexOf(s)));\n\t\tfileList.clear();\n\t}",
"private static void initDirectories() {\n String storeName = System.getProperty(USER_DIR)\n + File.separator\n + QVCSConstants.QVCS_META_DATA_DIRECTORY\n + File.separator\n + QVCSConstants.QVCS_FILEID_STORE_NAME\n + \".dat\";\n File storeFile = new File(storeName);\n if (storeFile.exists()) {\n storeFile.delete();\n }\n deleteAuthenticationStore();\n initAuthenticationStore();\n\n deleteRoleProjectViewStore();\n initRoleProjectViewStore();\n\n initProjectProperties();\n }",
"public interface MultiLayerModel extends ReadOnlyModel {\n\n /**\n * filters image based on operation given.\n *\n * @param img the image\n * @param multiplier the number of times to filter\n * @param operation operation to do\n * @return array of pixels\n */\n List<List<Pixel>> filter(Image img, int multiplier, String operation);\n\n /**\n * transforms image based on operation given.\n *\n * @param img the image\n * @param operation operation to do\n * @return array of pixels\n */\n List<List<Pixel>> transform(Image img, String operation);\n\n /**\n * creates a layer in the model.\n */\n Layer createLayer();\n\n /**\n * A method used to set the given image.\n *\n * @param image the image\n * @param layer the layer\n */\n void setImage(Layer layer, Image image);\n\n /**\n * A method meant to determine the visibility of the layer, determined by the user; is true unless\n * the user specifies that the layer should be invisible.\n *\n * @param visibility the visibility\n * @param layer the layer\n */\n void setVisibility(Layer layer, boolean visibility);\n\n\n /**\n * Adds a layer to this model.\n *\n * @param whichLayer where to add layer\n * @param layer the layer\n */\n\n void addLayer(Layer layer, int whichLayer);\n\n\n /**\n * Creates an image from a pixelArray.\n *\n * @param pixelArray the array\n * @return the created Image\n */\n Image createImage(List<List<Pixel>> pixelArray);\n\n\n /**\n * Removes a layer from this model.\n *\n * @param whichLayer the layer to remove\n */\n void removeLayer(int whichLayer);\n\n\n /**\n * Determines if the layers all have same dimensions.\n *\n * @param layers the layers\n * @return the boolean true or false\n */\n boolean sameDimensions(List<Layer> layers);\n\n /**\n * Determines if the pixelArray as equal dimensions.\n *\n * @param pixelArray the pixelArray\n * @return the boolean true or false\n */\n boolean equalPixelArrayDim(List<List<Pixel>> pixelArray);\n\n /**\n * Gets top most visible layer.\n *\n * @return the top most visible layer\n */\n Layer getTopMostVisible();\n\n\n}",
"@Override\r\n\tpublic File getCacheDir() {\r\n\t\treturn CommonUtil.getCacheDir();\r\n\t}",
"public void loadMaze(){\n try {\n byte savedMazeBytes[] = null;\n InputStream in = new MyDecompressorInputStream(new FileInputStream(\"savedMaze.maze\"));\n savedMazeBytes = new byte[1000012];\n in.read(savedMazeBytes);\n in.close();\n this.maze=new Maze(savedMazeBytes);\n isMazeGenerated=true;\n setChanged();\n notifyObservers();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"private void removeOldFiles() {\n Set<File> existingFiles = new HashSet<File>();\n collectFiles(existingFiles);\n for (ResourceResponse r : cacheResponseProcessor.getResources()) {\n String remotePathId = r.pathId;\n String remotePath = localClasspathProcessor.getLocalClasspath().get(remotePathId);\n String localPath = localPathTranslation.get(remotePath);\n File localFile = new File(localPath);\n File file = new File(localFile, r.name);\n existingFiles.remove(file);\n }\n }",
"public Tile3D(Context context, int id, float w, float h) {\n\t // Setup vertex array buffer. Vertices in float. A float has 4 bytes\n\t ByteBuffer vbb = ByteBuffer.allocateDirect(12 * 4);\n\t vbb.order(ByteOrder.nativeOrder()); // Use native byte order\n\t vertexBuffer = vbb.asFloatBuffer(); // Convert from byte to float\n\t \n\t imageFileID = id;\n\t bitmap = BitmapFactory.decodeStream(context.getResources().openRawResource(imageFileID));\n\t //bitmap \n\t /*InputStream is= context.getResources().openRawResource(imageFileIDs);\n\t try {\n\t bitmap = BitmapFactory.decodeStream(is);\n\n\t } finally {\n\t //Always clear and close\n\t try {\n\t is.close();\n\t is = null;\n\t } catch (IOException e) {\n\t }\n\t }*/\n\t int imgWidth = bitmap.getWidth();\n\t int imgHeight = bitmap.getHeight();\n\t float faceWidth = w;\n\t float faceHeight = h;\n\t // Adjust for aspect ratio\n\t if (imgWidth > imgHeight) {\n\t faceHeight = faceHeight * imgHeight / imgWidth; \n\t }\n\t else {\n\t faceWidth = faceWidth * imgWidth / imgHeight;\n\t }\n\t float faceLeft = -faceWidth / 2;\n\t float faceRight = -faceLeft;\n\t float faceTop = faceHeight / 2;\n\t float faceBottom = -faceTop;\n\t \n\t \n\t \n\t // Define the vertices for this face\n\t float[] vertices = {\n\t faceLeft, faceBottom, 0.0f, // 0. left-bottom-front\n\t faceRight, faceBottom, 0.0f, // 1. right-bottom-front\n\t faceLeft, faceTop, 0.0f, // 2. left-top-front\n\t faceRight, faceTop, 0.0f, // 3. right-top-front\n\t };\n\t vertexBuffer.put(vertices); // Copy data into buffer\n\t\t vertexBuffer.position(0); // Rewind\n\t \n\t ByteBuffer tbb = ByteBuffer.allocateDirect(texCoords.length * 4);\n\t tbb.order(ByteOrder.nativeOrder());\n\t texBuffer = tbb.asFloatBuffer();\n\t \n\t texBuffer.put(texCoords);\n\t \n\t texBuffer.position(0); // Rewind\n\t \n\t }",
"@Override\n\tpublic synchronized void initialize() {\n\t\tFile[] files = mRootDirectory.listFiles();\n\t\tif (files == null) {\n\t\t\treturn;\n\t\t}\n\t\tfor (File file : files) {\n\t\t\tFileInputStream fis = null;\n\t\t\ttry {\n\t\t\t\tfis = new FileInputStream(file);\n\t\t\t\tCacheHeader entry = CacheHeader.readHeader(fis);\n\t\t\t\tentry.size = file.length();\n\t\t\t\tputEntry(entry.key, entry);\n\t\t\t} catch (IOException e) {\n\t\t\t\tif (file != null) {\n\t\t\t\t\tfile.delete();\n\t\t\t\t}\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\tif (fis != null) {\n\t\t\t\t\t\tfis.close();\n\t\t\t\t\t}\n\t\t\t\t} catch (IOException ignored) {\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"private void bakeItemModels() {\n/* 754 */ Iterator<ResourceLocation> var1 = this.itemLocations.values().iterator();\n/* */ \n/* 756 */ while (var1.hasNext()) {\n/* */ \n/* 758 */ ResourceLocation var2 = var1.next();\n/* 759 */ ModelBlock var3 = (ModelBlock)this.models.get(var2);\n/* */ \n/* 761 */ if (func_177581_b(var3)) {\n/* */ \n/* 763 */ ModelBlock var4 = func_177582_d(var3);\n/* */ \n/* 765 */ if (var4 != null)\n/* */ {\n/* 767 */ var4.field_178317_b = var2.toString();\n/* */ }\n/* */ \n/* 770 */ this.models.put(var2, var4); continue;\n/* */ } \n/* 772 */ if (isCustomRenderer(var3))\n/* */ {\n/* 774 */ this.models.put(var2, var3);\n/* */ }\n/* */ } \n/* */ \n/* 778 */ var1 = this.field_177599_g.values().iterator();\n/* */ \n/* 780 */ while (var1.hasNext()) {\n/* */ \n/* 782 */ TextureAtlasSprite var5 = (TextureAtlasSprite)var1.next();\n/* */ \n/* 784 */ if (!var5.hasAnimationMetadata())\n/* */ {\n/* 786 */ var5.clearFramesTextureData();\n/* */ }\n/* */ } \n/* */ }",
"static public void readRepository(){\n File cache_file = getCacheFile();\n if (cache_file.exists()) {\n try {\n // Read the cache acutally\n DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();\n DocumentBuilder builder = factory.newDocumentBuilder();\n Document document = builder.parse(cache_file);\n NodeList images_nodes = document.getElementsByTagName(\"image\");\n for (int i = 0; i < images_nodes.getLength(); i++) {\n Node item = images_nodes.item(i);\n String image_path = item.getTextContent();\n File image_file = new File(image_path);\n if (image_file.exists()){\n AppImage image = Resources.loadAppImage(image_path);\n images.add(image);\n }\n }\n }\n catch (Exception e) {\n throw new RuntimeException(e);\n }\n }\n }",
"public void loadModelMatrix(Terrain terrain){\n Matrix4f transformationMatrix = Maths.createTransformationMatrix(new Vector3f(terrain.getX(),0,terrain.getZ()),0,0,0,1);\n shader.loadTransformationMatrix(transformationMatrix);\n }",
"private void DeleteCMVMMVData() {\n String path = GetFilePath();\r\n File dir = new File(path);\r\n for (File file : dir.listFiles())\r\n if (!file.isDirectory())\r\n file.delete();\r\n DownloadCMVMMVFiles();//state, circle, ran, div\r\n }",
"private void getDataAssets(DataStageCache cache) throws IGCException {\n if (!getType().equals(JobType.SEQUENCE)) {\n mapDataStoreDetailsForJob(cache, \"reads_from_(design)\", job.getReadsFromDesign());\n mapDataStoreDetailsForJob(cache, \"writes_to_(design)\", job.getWritesToDesign());\n }\n }",
"public void WritePredictionImages() {\r\n\r\n\t\tString str = new String();\r\n\r\n\t\tModelSimpleImage img = new ModelSimpleImage();\r\n\t\tCDVector texture = new CDVector();\r\n\t\tint n = m_pModel.Rc().NRows();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\r\n\t\t\tm_pModel.Rc().Row(n - i - 1, texture); // take largest first\r\n\t\t\timg = m_pModel.ShapeFreeImage(texture, img);\r\n\t\t\t// str.format(\"Rc_image%02i.bmp\", i );\r\n\t\t\tstr = \"Rc_image\" + i + \".xml\";\r\n\t\t\tModelImage image = new ModelImage(img, str);\r\n\t\t\timage.saveImage(\"\", str, FileUtility.XML, false);\r\n\t\t}\r\n\t\tn = m_pModel.Rt().NRows();\r\n\t\tfor (int i = 0; i < n; i++) {\r\n\r\n\t\t\tm_pModel.Rt().Row(i, texture);\r\n\t\t\timg = m_pModel.ShapeFreeImage(texture, img);\r\n\t\t\t// str.format(\"Rt_image%02i.bmp\", i );\r\n\t\t\tstr = \"Rt_image\" + i + \".xml\";\r\n\t\t\tModelImage image = new ModelImage(img, str);\r\n\t\t\timage.saveImage(\"\", str, FileUtility.XML, false);\r\n\t\t}\r\n\t}",
"private void getBlenderData(){\n blender_Data = (Node) assetManager.loadModel(\"Models/Blender/CharDev.j3o\");\n System.out.println(\"First Node: \" + blender_Data.getName());\n \n /** Get the Blender scenes **/\n scene_Children = blender_Data.getChildren();\n System.out.println(\"Child Scenes: \" + scene_Children.size());\n \n /** Print the names of the Blender scenes **/\n for(int s = 0; s < scene_Children.size(); s++){\n System.out.println(\"Name : \" + scene_Children.get(s).getName());\n }\n \n boolean child = true;\n \n /** Get Blender data from j3o file **/\n animation_Scene = (Node) blender_Data.getChild(0);\n map_Scene = (Node) blender_Data.getChild(1);\n terrain_Scene = (Node) blender_Data.getChild(2);\n \n /** Get Animation Scene data **/\n System.out.println(\"Animation Scene child count: \" + animation_Scene.getChildren().size());\n int s1Count = animation_Scene.getChildren().size();\n for(int i = 0;i<s1Count;i++){\n //System.out.println(i + \": \" + animation_Scene.getChild(i).getName());\n }\n \n /** Get Player from Blender data **/\n getPlayer();\n \n /** Get Prefabs from Blender data **/\n getTilePrefabs();\n \n /** Get Map Scene data **/\n System.out.println(\"Map Scene child count: \" + map_Scene.getChildren().size());\n int s2Count = map_Scene.getChildren().size();\n for(int i = 0;i<s2Count;i++){\n //System.out.println(\"Child \" + i + \" name: \" + map_Scene.getChild(i).getName());\n }\n \n /** Get Terrain Scene data **/\n System.out.println(\"Terrain Scene child count: \" + terrain_Scene.getChildren().size());\n int s3Count = terrain_Scene.getChildren().size();\n for(int i = 0;i<s3Count;i++){\n //System.out.println(\"Child \" + i + \" name: \" + terrain_Scene.getChild(i).getName());\n }\n }",
"private void createTDenseDirectory() {\n File dense = new File(DenseLayerPath);\n dense.mkdir();\n }",
"protected Model makeModel()\n {\n LayerList layers = new LayerList();\n\n for (Layer layer : this.observered.getModel().getLayers())\n {\n if (layer instanceof TiledImageLayer) // share TiledImageLayers\n layers.add(layer);\n }\n\n Model model = new BasicModel();\n model.setGlobe(this.observered.getModel().getGlobe()); // share the globe\n model.setLayers(layers);\n\n return model;\n }",
"public static void dispose () {\n\t\tif (cachedStillModels != null) {\n\t\t\tfor (StillModel m : cachedStillModels.values()) {\n\t\t\t\tm.dispose();\n\t\t\t}\n\n\t\t\tcachedStillModels.clear();\n\t\t}\n\n\t\tif (cachedMaterials != null) {\n\t\t\tcachedMaterials.clear();\n\t\t}\n\t}",
"public static void preloadAllAssets() {\r\n\t\tbackground = new Image(fileURL(\"./assets/gifs/background.gif\"));\r\n\r\n\t\tbackgroundGif = new Background(new BackgroundImage(background, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT));\r\n\r\n\t\t//Michael Bay Mode gifs\r\n\t\tcollisionGif = new Image(fileURL(\"./assets/gifs/collision.gif\"));\r\n\t\trunAwayGif = new Image(fileURL(\"./assets/gifs/run_away.gif\"));\r\n\r\n\t\t//Regular Simulation Images \r\n\t\tearthImage = new ImagePattern(new Image(fileURL(\"./assets/images/earth.png\")));\r\n\t\tneptuneImage = new ImagePattern(new Image(fileURL(\"./assets/images/neptune.png\")));\r\n\t\tsunImage = new ImagePattern(new Image(fileURL(\"./assets/images/sun.png\")));\r\n\t\tstarImage = new ImagePattern(new Image(fileURL(\"./assets/images/star.png\")));\r\n\t\tmarsImage = new ImagePattern(new Image(fileURL(\"./assets/images/mars.png\")));\r\n\t\tmoonImage = new ImagePattern(new Image(fileURL(\"./assets/images/moon.png\")));\r\n\t\tasteroidImage = new ImagePattern(new Image(fileURL(\"./assets/images/asteroid.png\")));\r\n\r\n\t\t//Michael Bay mode images\r\n\t\tmichaelBayExplosionImage = new ImagePattern(new Image(fileURL(\"./assets/images/bay_explosion.jpg\")));\r\n\t\tmichaelBayPointingImage = new Image(fileURL(\"./assets/images/bay_pointing.jpg\"));\r\n\t\tmichaelBayGangsterImage = new ImagePattern(new Image(fileURL(\"./assets/images/bay_gangster.jpg\")));\r\n\t\tgenericExplosionImage = new ImagePattern(new Image(fileURL(\"./assets/images/generic_explosion.png\")));\r\n\t\tusaFlagImage = new Image(fileURL(\"./assets/images/usa_flag.jpg\"));\r\n\t\tusaBackground = new Background(new BackgroundImage(usaFlagImage, BackgroundRepeat.NO_REPEAT, BackgroundRepeat.NO_REPEAT, BackgroundPosition.DEFAULT, BackgroundSize.DEFAULT));\r\n\t}",
"private void removeFromCache() {\n int i = 0;\n int removeItem = random.nextInt(cache.size());\n for (ScopePath className : cache.keySet()) {\n if (i == removeItem) {\n cache.remove(className);\n break;\n }\n ++i;\n }\n }",
"FixedTextureCache()\n {\n textureMap = new HashMap();\n componentMap = new HashMap();\n }",
"private File extractResources() {\r\n\t\tif (org.opensourcephysics.display.OSPRuntime.appletMode)\r\n\t\t\treturn null;\r\n\t\tFile descTempDirectory = new File(getTemporaryDir() + \"DescriptionPages/\");\r\n\t\tif (!descTempDirectory.exists()) {\r\n\t\t\tif (!descTempDirectory.mkdirs()) {\r\n\t\t\t\tSystem.err.println(\r\n\t\t\t\t\t\t\"DescriptionPages : Could not create directory : \" + descTempDirectory.getAbsolutePath());\r\n\t\t\t\tJOptionPane.showMessageDialog(openPageButton, Memory.getResource(\"DescriptionPages.CannotExtractFiles\"),\r\n\t\t\t\t\t\tMemory.getResource(\"Error\"), JOptionPane.ERROR_MESSAGE);\r\n\t\t\t\treturn null;\r\n\t\t\t}\r\n\t\t}\r\n\t\t// System.err.println (\"Extracting description pages to folder :\r\n\t\t// \"+descTempDirectory.getAbsolutePath());\r\n\t\tfor (String filename : model._getClassEjsResources()) {\r\n\t\t\tif (extractToDirectory(filename, descTempDirectory, false) == null)\r\n\t\t\t\treturn null;\r\n\t\t}\r\n\t\textractToDirectory(\"/_ejs_library/css/ejss.css\", descTempDirectory, false); // New in %.3Failure to do this does\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// not invalidate the process\r\n\t\treturn descTempDirectory;\r\n\t}",
"PortalCacheModel getCacheModel();",
"private void initRendering() {\n\t\tmActivity.showDebugMsg(\" initRendering\");\n\t\tGLES20.glClearColor(0.0f, 0.0f, 0.0f, Vuforia.requiresAlpha() ? 0.0f : 1.0f);\n\n\t\tfor (Texture t : mTextures) {\n\t\t\tGLES20.glGenTextures(1, t.mTextureID, 0);\n\t\t\tGLES20.glBindTexture(GLES20.GL_TEXTURE_2D, t.mTextureID[0]);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MIN_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexParameterf(GLES20.GL_TEXTURE_2D, GLES20.GL_TEXTURE_MAG_FILTER, GLES20.GL_LINEAR);\n\t\t\tGLES20.glTexImage2D(GLES20.GL_TEXTURE_2D, 0, GLES20.GL_RGBA, t.mWidth, t.mHeight, 0, GLES20.GL_RGBA,\n\t\t\t\t\tGLES20.GL_UNSIGNED_BYTE, t.mData);\n\t\t}\n\n\t\tshaderProgramID = ArUtils.createProgramFromShaderSrc(\n\t\t\t\tShaders.CUBE_MESH_VERTEX_SHADER,\n\t\t\t\tShaders.CUBE_MESH_FRAGMENT_SHADER);\n\n\t\tvertexHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexPosition\");\n\t\ttextureCoordHandle = GLES20.glGetAttribLocation(shaderProgramID,\n\t\t\t\t\"vertexTexCoord\");\n\t\tmvpMatrixHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"modelViewProjectionMatrix\");\n\t\ttexSampler2DHandle = GLES20.glGetUniformLocation(shaderProgramID,\n\t\t\t\t\"texSampler2D\");\n\n\t\tif (!mModelIsLoaded) {\n\t\t\t//object = new Teapot();\n\t\t\tobject = mActivity.get3DObject();\n\t\t\tobjectScaleFloat *= object.getDefScale();\n\t\t\t//minObjectScale *= object.getDefScale();\n\t\t\t//maxObjectScale *= object.getDefScale();\n\n\t\t\tmActivity.showDebugMsg(\"Loading model Teapot\");\n\t\t\t// Hide the Loading Dialog\n\t\t\t//mActivity.loadingDialogHandler.sendEmptyMessage(LoadingDialogHandler.HIDE_DIALOG);\n\t\t}\n\n\t}",
"void massiveModeLoading( File dataPath );",
"private void initializeImageModels() {\n for(ImageModel model : GalleryFragment.listImageModel){\n imgList.add(model.getImagePath());\n }\n }",
"public BoxModel getWorldModel(IBlockAccess world, int x, int y, int z)\r\n/* 87: */ {\r\n/* 88: 89 */ int pipe_type = 0;int metadata = 0;int node_dir = 0;\r\n/* 89: 92 */ if (!(world.getTileEntity(x, y, z) instanceof INode)) {\r\n/* 90: 93 */ return new BoxModel();\r\n/* 91: */ }\r\n/* 92: 96 */ INode node = (INode)world.getTileEntity(x, y, z);\r\n/* 93: */ \r\n/* 94: 98 */ BoxModel boxes = node.getModel(node.getNodeDir());\r\n/* 95: 99 */ List pipe_boxes = getPipeModel(world, x, y, z, null);\r\n/* 96:101 */ if (pipe_boxes.size() > 1) {\r\n/* 97:102 */ boxes.addAll(pipe_boxes);\r\n/* 98: */ }\r\n/* 99:105 */ return boxes;\r\n/* 100: */ }",
"private void loadTiles(Board board) {\n TileSetCache tileSetCache = new TileSetCache();\n board.initializeTileSetCache(tileSetCache);\n board.createLayers();\n\n for (BoardLayer layer : board.getLayers()) {\n BoardLayerView layerView = new BoardLayerView(layer);\n this.addLayerView(layerView);\n }\n }",
"private void createDirectories()\r\n\t{\r\n\t\t// TODO: Do some checks here\r\n\t\tFile toCreate = new File(Lunar.OUT_DIR + Lunar.PIXEL_DIR\r\n\t\t\t\t\t\t\t\t\t+ Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t\ttoCreate = new File(Lunar.OUT_DIR + Lunar.ROW_DIR + Lunar.PROCESSED_DIR);\r\n\t\ttoCreate.mkdirs();\r\n\t\ttoCreate = null;\r\n\t}",
"public static Map<String, ArrayList<ImageDataModel>> getImageFolderMap(Activity activity) {\r\n imageFolderMap.clear();\r\n keyList.clear();\r\n imageDataModelList.clear();\r\n String BUCKET_ORDER_BY;\r\n Uri uri;\r\n Cursor cursor;\r\n int columnIndexDataPath, columnIndexFolderName, columnIndexTitleName,\r\n columnIndexDate, columnIndexSize, columnIndexBucketId, columnIndexAlbumId, columnIndexDuration;\r\n String absolutePathOfImage, folderName, imageTitle, fileDate, bucketId, AlbumId, fileSize, duration;\r\n\r\n /**\r\n * Fetching Audio type of files through content provider\r\n */\r\n /**\r\n * Fetching audio type of files through content provider\r\n */\r\n uri = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\r\n BUCKET_ORDER_BY = MediaStore.Audio.Media.DATE_MODIFIED + \" DESC\";\r\n String selection = MediaStore.Audio.Media.IS_MUSIC + \" != 0\";\r\n String[] projection1 = new String[]{MediaStore.Audio.AudioColumns.ALBUM,\r\n MediaStore.Audio.AudioColumns.ALBUM_ID,\r\n MediaStore.Audio.AudioColumns.DISPLAY_NAME,\r\n MediaStore.Audio.AudioColumns.DATA,\r\n MediaStore.Audio.AudioColumns.SIZE,\r\n MediaStore.Audio.AudioColumns.DATE_MODIFIED,\r\n\r\n MediaStore.Audio.AudioColumns.DURATION};\r\n\r\n cursor = activity.getContentResolver().query(uri, projection1, selection, null, BUCKET_ORDER_BY);\r\n if (cursor != null) {\r\n columnIndexFolderName = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.ALBUM);\r\n columnIndexAlbumId = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.ALBUM_ID);\r\n columnIndexTitleName = cursor\r\n .getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.DISPLAY_NAME);\r\n\r\n columnIndexDataPath = cursor.getColumnIndexOrThrow(MediaStore.Audio.AudioColumns.DATA);\r\n while (cursor.moveToNext()) {\r\n absolutePathOfImage = cursor.getString(columnIndexDataPath);\r\n folderName = Constant.AUDIO_FOLDER_NAME;\r\n imageTitle = cursor.getString(columnIndexTitleName);\r\n\r\n ImageDataModel imageDataModel = new ImageDataModel();\r\n imageDataModel.setFile(new File(absolutePathOfImage));\r\n imageDataModel.setFolderName(folderName);\r\n imageDataModel.setPath(absolutePathOfImage);\r\n imageDataModel.setImageTitle(imageTitle);\r\n imageDataModel.setBucketId(\"1\");\r\n imageDataModel.setTimeDuration(\"0\");\r\n imageDataModel.setSelected(false);\r\n if (FileUtils.isImageFile(absolutePathOfImage)) {\r\n imageDataModel.setImage(true);\r\n } else if (FileUtils.isVideoFile(absolutePathOfImage)) {\r\n imageDataModel.setVideo(true);\r\n } else if (FileUtils.isAudioFile(absolutePathOfImage)) {\r\n imageDataModel.setAudio(true);\r\n }\r\n if (imageDataModel.getFile().length() > 0) {\r\n imageDataModelList.add(imageDataModel);\r\n if (imageFolderMap.containsKey(folderName)) {\r\n imageFolderMap.get(folderName).add(imageDataModel);\r\n } else {\r\n ArrayList<ImageDataModel> listOfAllImages = new ArrayList<ImageDataModel>();\r\n listOfAllImages.add(imageDataModel);\r\n imageFolderMap.put(folderName, listOfAllImages);\r\n }\r\n }\r\n }\r\n cursor.close();\r\n }\r\n keyList.addAll(imageFolderMap.keySet());\r\n //Send notification through main thread\r\n new Handler(Looper.getMainLooper()).post(new Runnable() {\r\n @Override\r\n public void run() {\r\n GlobalBus.getBus().post(new LandingFragmentNotification(Constant.UPDATE_UI));\r\n }\r\n });\r\n return imageFolderMap;\r\n }",
"@InputFiles\n @Incremental\n @PathSensitive(PathSensitivity.RELATIVE)\n public abstract ConfigurableFileCollection getDexFolders();",
"public int init(String config) {\n\t\tFileUtils.deleteFolder(new File(FileUtils.DIR_S3_FILES_ON_LOCAL));\n\t\tFileUtils.createDirectory(FileUtils.DIR_S3_FILES_ON_LOCAL);\n\n\t\tFile opfile = new File(FileUtils.FINAL_LOCAL_OUTPUT);\n\t\tif (opfile.exists()) {\n\t\t\topfile.delete();\n\t\t}\n\t\tCopyFilesS3ToLocal objS3Local = new CopyFilesS3ToLocal();\n\t\treturn objS3Local.readS3FilesToLocal(config, FileUtils.DIR_S3_FILES_ON_LOCAL);\n\n\t}",
"private void loadBasePaths() {\n\n Log.d(TAG, \"****loadBasePaths*****\");\n List<FileInfo> paths = BaseMediaPaths.getInstance().getBasePaths();\n for (FileInfo path : paths) {\n\n }\n }",
"private static void initializeCache() {\n\t\t// prepare cache folder for this application instance\n\t\tFile cacheRoot = getApplicationCache();\n\n\t\ttry {\n\t\t\tfor (int i = 0; true; i++) {\n\t\t\t\tFile cache = new File(cacheRoot, String.format(\"%d\", i));\n\t\t\t\tif (!cache.isDirectory() && !cache.mkdirs()) {\n\t\t\t\t\tthrow new IOException(\"Failed to create cache dir: \" + cache);\n\t\t\t\t}\n\n\t\t\t\tfinal File lockFile = new File(cache, \".lock\");\n\t\t\t\tboolean isNewCache = !lockFile.exists();\n\n\t\t\t\tfinal RandomAccessFile handle = new RandomAccessFile(lockFile, \"rw\");\n\t\t\t\tfinal FileChannel channel = handle.getChannel();\n\t\t\t\tfinal FileLock lock = channel.tryLock();\n\n\t\t\t\tif (lock != null) {\n\t\t\t\t\t// setup cache dir for ehcache\n\t\t\t\t\tSystem.setProperty(\"ehcache.disk.store.dir\", cache.getAbsolutePath());\n\n\t\t\t\t\tint applicationRevision = getApplicationRevisionNumber();\n\t\t\t\t\tint cacheRevision = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tcacheRevision = new Scanner(channel, \"UTF-8\").nextInt();\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t// ignore\n\t\t\t\t\t}\n\n\t\t\t\t\tif (cacheRevision != applicationRevision && applicationRevision > 0 && !isNewCache) {\n\t\t\t\t\t\tLogger.getLogger(Main.class.getName()).log(Level.WARNING, String.format(\"App version (r%d) does not match cache version (r%d): reset cache\", applicationRevision, cacheRevision));\n\n\t\t\t\t\t\t// tag cache with new revision number\n\t\t\t\t\t\tisNewCache = true;\n\n\t\t\t\t\t\t// delete all files related to previous cache instances\n\t\t\t\t\t\tfor (File it : getChildren(cache)) {\n\t\t\t\t\t\t\tif (!it.equals(lockFile)) {\n\t\t\t\t\t\t\t\tdelete(cache);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif (isNewCache) {\n\t\t\t\t\t\t// set new cache revision\n\t\t\t\t\t\tchannel.position(0);\n\t\t\t\t\t\tchannel.write(Charset.forName(\"UTF-8\").encode(String.valueOf(applicationRevision)));\n\t\t\t\t\t\tchannel.truncate(channel.position());\n\t\t\t\t\t}\n\n\t\t\t\t\t// make sure to orderly shutdown cache\n\t\t\t\t\tRuntime.getRuntime().addShutdownHook(new Thread() {\n\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tCacheManager.getInstance().shutdown();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tlock.release();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\thandle.close();\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t// ignore, shutting down anyway\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t// cache for this application instance is successfully set up and locked\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// try next lock file\n\t\t\t\thandle.close();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tLogger.getLogger(Main.class.getName()).log(Level.WARNING, e.toString(), e);\n\t\t}\n\n\t\t// use cache root itself as fail-safe fallback\n\t\tSystem.setProperty(\"ehcache.disk.store.dir\", new File(cacheRoot, \"default\").getAbsolutePath());\n\t}",
"public void addToCache () {\n ArrayList <Location> gridCache = getGridCache();\n for (Location l : imageLocs) {\n gridCache.add (l);\n }\n }",
"private void extractCards() {\n String fileSeparator = System.getProperty(\"file.separator\");\n String path = System.getProperty(\"user.dir\");\n path = path + fileSeparator + \"Client\" + fileSeparator + \"src\" + fileSeparator + \"Images\" + fileSeparator;\n System.out.println(path);\n\n for (Picture p : cardlist) {\n BufferedImage image = null;\n try {\n image = javax.imageio.ImageIO.read(new ByteArrayInputStream(p.getStream()));\n File outputfile = new File(path + p.getName());\n ImageIO.write(image, \"png\", outputfile);\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"public static Model loadModel(File f)\n\t{\n\t\ttry\n\t\t{\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(f));\n\n\t\t\tModel m = new Model(f.getPath());\n\t\t\tMaterial cur = null;\n\t\t\tList<Material> mats = new ArrayList<Material>();\n\n\t\t\tString line;\n\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t{\n\t\t\t\t//Indicates a vertex\n\t\t\t\tif (line.startsWith(\"v \")) \n\t\t\t\t{\n\t\t\t\t\tfloat x = Float.valueOf(line.split(\" \")[1]);\n\t\t\t\t\tfloat y = Float.valueOf(line.split(\" \")[2]);\n\t\t\t\t\tfloat z = Float.valueOf(line.split(\" \")[3]);\n\t\t\t\t\tm.verts.add(new Vector3f(x, y, z));\n\t\t\t\t} \n\t\t\t\t//Indicates a vertex normal\n\t\t\t\telse if (line.startsWith(\"vn \")) \n\t\t\t\t{\n\t\t\t\t\tfloat x = Float.valueOf(line.split(\" \")[1]);\n\t\t\t\t\tfloat y = Float.valueOf(line.split(\" \")[2]);\n\t\t\t\t\tfloat z = Float.valueOf(line.split(\" \")[3]);\n\t\t\t\t\tm.norms.add(new Vector3f(x, y, z));\n\t\t\t\t} \n\t\t\t\t//Indicates a texture coordinate\n\t\t\t\telse if (line.startsWith(\"vt \")) \n\t\t\t\t{\n\t\t\t\t\tfloat x = Float.valueOf(line.split(\" \")[1]);\n\t\t\t\t\tfloat y = Float.valueOf(line.split(\" \")[2]);\n\t\t\t\t\tm.textureCoords.add(new Vector2f(x, y));\n\t\t\t\t} \n\t\t\t\t//Indicates a face\n\t\t\t\telse if (line.startsWith(\"f \")) \n\t\t\t\t{\n\t\t\t\t\t//If face is triangulated\n\t\t\t\t\tif(line.split(\" \").length == 4)\n\t\t\t\t\t{\t\t\t\n\t\t\t\t\t\tVector3f vertexIndices = new Vector3f(\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1].split(\"/\")[0]),\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2].split(\"/\")[0]),\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3].split(\"/\")[0]));\n\n\n\t\t\t\t\t\t//Instantiate as null for scope reasons\n\t\t\t\t\t\tVector3f textureIndices = null;\n\n\t\t\t\t\t\tif(!line.split(\" \")[1].split(\"/\")[1].equals(\"\")&&!(line.split(\" \")[1].split(\"/\")[1].equals(null)))\n\t\t\t\t\t\t\ttextureIndices = new Vector3f(\n\t\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1].split(\"/\")[1]),\n\t\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2].split(\"/\")[1]),\n\t\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3].split(\"/\")[1]));\n\n\t\t\t\t\t\tVector3f normalIndices = new Vector3f(\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[1].split(\"/\")[2]),\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[2].split(\"/\")[2]),\n\t\t\t\t\t\t\t\tFloat.valueOf(line.split(\" \")[3].split(\"/\")[2]));\n\n\t\t\t\t\t\tFace mf = new Face();\n\n\t\t\t\t\t\t//Instantiate all the arrays\n\t\t\t\t\t\tmf.normals = new Vector3f[3];\n\t\t\t\t\t\tmf.points = new Vector3f[3];\n\n\t\t\t\t\t\t//// SETUP NORMALS ////\n\t\t\t\t\t\tVector3f n1 = m.norms.get((int)normalIndices.x - 1);\n\t\t\t\t\t\tmf.normals[0] = n1;\n\t\t\t\t\t\tVector3f n2 = m.norms.get((int)normalIndices.y - 1);\n\t\t\t\t\t\tmf.normals[1] = n2;\n\t\t\t\t\t\tVector3f n3 = m.norms.get((int)normalIndices.z - 1);\n\t\t\t\t\t\tmf.normals[2] = n3;\n\n\t\t\t\t\t\t//// SETUP VERTICIES ////\n\t\t\t\t\t\tVector3f v1 = m.verts.get((int)vertexIndices.x - 1);\n\t\t\t\t\t\tmf.points[0] = v1;\n\t\t\t\t\t\tVector3f v2 = m.verts.get((int)vertexIndices.y - 1);\n\t\t\t\t\t\tmf.points[1] = v2;\n\t\t\t\t\t\tVector3f v3 = m.verts.get((int)vertexIndices.z - 1);\n\t\t\t\t\t\tmf.points[2] = v3;\n\n\t\t\t\t\t\t//// SETUP TEXTURE COORDS ////\n\t\t\t\t\t\tif(textureIndices!=null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmf.textureCoords = new Vector2f[3];\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfloat x1 = m.textureCoords.get((int)textureIndices.x - 1).x;\n\t\t\t\t\t\t\tfloat y1 = 1 - m.textureCoords.get((int)textureIndices.x - 1).y;\n\t\t\t\t\t\t\tVector2f t1 = new Vector2f(x1, y1);\n\t\t\t\t\t\t\tmf.textureCoords[0] = t1;\n\t\t\t\t\t\t\tfloat x2 = m.textureCoords.get((int)textureIndices.y - 1).x;\n\t\t\t\t\t\t\tfloat y2 = 1 - m.textureCoords.get((int)textureIndices.y - 1).y;\n\t\t\t\t\t\t\tVector2f t2 = new Vector2f(x2, y2);\n\t\t\t\t\t\t\tmf.textureCoords[1] = t2;\n\t\t\t\t\t\t\tfloat x3 = m.textureCoords.get((int)textureIndices.z - 1).x;\n\t\t\t\t\t\t\tfloat y3 = 1 - m.textureCoords.get((int)textureIndices.z - 1).y;\n\t\t\t\t\t\t\tVector2f t3 = new Vector2f(x3, y3);\n\t\t\t\t\t\t\tmf.textureCoords[2] = t3;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Set the face's material to the current material\n\t\t\t\t\t\tif(cur != null)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tmf.material = cur;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//Tell face to set up AABB\n\t\t\t\t\t\tmf.setUpAABB();\n\n\t\t\t\t\t\tm.faces.add(mf);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Indicates a reference to an exterior .mtl file\n\t\t\t\telse if(line.startsWith(\"mtllib \"))\n\t\t\t\t{\n\t\t\t\t\t//The file being referenced by mtllib call\n\t\t\t\t\tFile lib = new File(f.getParentFile()+File.separator+line.split(\" \")[1]);\n\n\t\t\t\t\t//Parse it and add all generated Materials to the mats list\n\t\t\t\t\tmats.addAll(parseMTL(lib, m));\n\t\t\t\t}\n\t\t\t\t//Telling us to use a material\n\t\t\t\telse if(line.startsWith(\"usemtl \"))\n\t\t\t\t{\n\t\t\t\t\tString name = line.split(\" \")[1];\n\n\t\t\t\t\tif(mats!=null)\n\t\t\t\t\t\t//Find material with correct name and use it\n\t\t\t\t\t\tfor(Material material : mats)\n\t\t\t\t\t\t\tif(material.name.equals(name))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tcur = material;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treader.close();\n\n\t\t\t//Tell model to set up AABB\n\t\t\tm.setUpAABB();\n\t\t\t\n\t\t\t//Remove the first element, because...\n\t\t\tm.faces.remove(0);\n\n\t\t\treturn m;\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n\t}",
"public static void makeGeometry(AssetManager am) {\n geom = am.loadModel(\"Models/container/container.j3o\");\n mat = new Material(am, \"Common/MatDefs/Misc/Unshaded.j3md\");\n Texture Tex = am.loadTexture(\n \"Textures/Container/Template/texture.png\");\n\n\n Colors.add(am.loadTexture(\n \"Textures/Container/blue.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/green.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/purple.png\"));\n Colors.add(am.loadTexture(\n \"Textures/Container/red.png\"));\n companyTextures.put(\"UPS\", am.loadTexture(\n \"Textures/Container/UPS.png\"));\n companyTextures.put(\"CocaCola\", am.loadTexture(\n \"Textures/Container/cocacola.png\"));\n companyTextures.put(\"McDonalds\", am.loadTexture(\n \"Textures/Container/mac.png\"));\n\n companyTextures.put(\"Grolsch\", am.loadTexture(\n \"Textures/Container/grolsch.png\"));\n companyTextures.put(\"Heineken\", am.loadTexture(\n \"Textures/Container/heineken.png\"));\n companyTextures.put(\"Nestle\", am.loadTexture(\n \"Textures/Container/nestle.png\"));\n companyTextures.put(\"Shell\", am.loadTexture(\n \"Textures/Container/shell.png\"));\n companyTextures.put(\"DeutschePost\", am.loadTexture(\n \"Textures/Container/post.png\"));\n companyTextures.put(\"PostBank\", am.loadTexture(\n \"Textures/Container/postbank.png\"));\n companyTextures.put(\"Airfrance\", am.loadTexture(\n \"Textures/Container/airfrance.png\"));\n\n companyTextures.put(\"BallastNedam\", am.loadTexture(\n \"Textures/Container/ballastnedam.png\"));\n companyTextures.put(\"Manpower\", am.loadTexture(\n \"Textures/Container/manpower.png\"));\n\n companyTextures.put(\"Lufthansa\", am.loadTexture(\n \"Textures/Container/lufthansa.png\"));\n companyTextures.put(\"Bayer\", am.loadTexture(\n \"Textures/Container/bayer.png\"));\n\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n companyTextures.put(\"Danone\", am.loadTexture(\n \"Textures/Container/danone.png\"));\n companyTextures.put(\"Ericsson\", am.loadTexture(\n \"Textures/Container/ericsson.png\"));\n\n\n companyTextures.put(\"OCE\", am.loadTexture(\n \"Textures/Container/oce.png\"));\n companyTextures.put(\"BeterBed\", am.loadTexture(\n \"Textures/Container/beterbed.png\"));\n\n companyTextures.put(\"TenCate\", am.loadTexture(\n \"Textures/Container/tencate.png\"));\n\n companyTextures.put(\"FederalExpress\", am.loadTexture(\n \"Textures/Container/fedex.png\"));\n companyTextures.put(\"IBM\", am.loadTexture(\n \"Textures/Container/IBM.png\"));\n companyTextures.put(\"KraftFoods\", am.loadTexture(\n \"Textures/Container/kraft.png\"));\n companyTextures.put(\"Hanjin\", am.loadTexture(\n \"Textures/Container/hanjin.png\"));\n companyTextures.put(\"CargoTrans\", am.loadTexture(\n \"Textures/Container/cargotrans.png\"));\n\n\n companyTextures.put(\"Metro\", am.loadTexture(\n \"Textures/Container/metro.png\"));\n companyTextures.put(\"Carrefour\", am.loadTexture(\n \"Textures/Container/carefour.png\"));\n companyTextures.put(\"Amstel\", am.loadTexture(\n \"Textures/Container/amstel.png\"));\n companyTextures.put(\"TransNL\", am.loadTexture(\n \"Textures/Container/transnl.png\"));\n companyTextures.put(\"Gilette\", am.loadTexture(\n \"Textures/Container/gillete.png\"));\n\n\n companyTextures.put(\"WalMart\", am.loadTexture(\n \"Textures/Container/walmart.png\"));\n companyTextures.put(\"Delhaize\", am.loadTexture(\n \"Textures/Container/delhaize.png\"));\n companyTextures.put(\"BASF\", am.loadTexture(\n \"Textures/Container/basf.png\"));\n companyTextures.put(\"SeaTrans\", am.loadTexture(\n \"Textures/Container/seatrans.png\"));\n companyTextures.put(\"DowChemical\", am.loadTexture(\n \"Textures/Container/dow.png\"));\n\n companyTextures.put(\"AXA\", am.loadTexture(\n \"Textures/Container/axe.png\"));\n companyTextures.put(\"LLyod\", am.loadTexture(\n \"Textures/Container/lloyd.png\"));\n \n companyTextures.put(\"GJMW\", am.loadTexture(\n \"Textures/Container/GJMW.png\"));\n companyTextures.put(\"WoodNorge\", am.loadTexture(\n \"Textures/Container/woodnorge.png\"));\n companyTextures.put(\"FlowersNL\", am.loadTexture(\n \"Textures/Container/flowersnl.png\"));\n \n companyTextures.put(\"FruitINT\", am.loadTexture(\n \"Textures/Container/fruitint.png\"));\n companyTextures.put(\"IntTrans\", am.loadTexture(\n \"Textures/Container/inttrans.png\"));\n companyTextures.put(\"MaasHolland\", am.loadTexture(\n \"Textures/Container/maasholland.png\"));\n\n mat.setTexture(\"ColorMap\", Tex);\n r = new Random();\n\n mat.setColor(\"Color\", ColorRGBA.White);\n\n geom.setMaterial(mat);\n }",
"public void loadSave(){\n if((new File(\"data.MBM\")).exists()){\n isNew = false;\n\n try {\n BufferedReader br = new BufferedReader(new FileReader(\"data.MBM\"));\n String line = br.readLine();\n \n while (line != null) {\n \n if(line.contains(\"outDir\")){\n String[] result = line.split(\":\");\n outputDir = new File(result[1]);\n if(outputDir.exists() == false){\n isNew = true;\n }\n }\n else if(line.contains(\"MBMWORLD\")){\n String[] result = line.split(\":\");\n //1 = filename\n //2 = world name\n //3 = path\n //4 = date\n addWorld(new File(result[3]), result[2]);\n worlds.get(numWorlds()-1).setLastBackup(result[4]);\n }\n \n line = br.readLine();\n }\n \n br.close();\n \n } catch(IOException e){\n System.out.println(e);\n }\n }\n }",
"static public Model load(String filename, int minFilter, int magFilter) throws Exception {\n\t\tString name = \"\";\n\n\t\t//Result:\n\t\tHashMap<Material, Mesh> meshes = new HashMap<Material, Mesh>();\n\t\t\n\t\tMaterial currentMaterial = null;\n\t\tHashMap<String, Material> materials = new HashMap<String, Material>();\n\t\tVector<float[]> coords = new Vector<float[]>(100);\n\t\tVector<float[]> normals = new Vector<float[]>(100);\n\t\tVector<float[]> textureCoords = new Vector<float[]>(100);\n\t\tHashMap<Material, HashMap<Integer, LinkedList<Integer>>> indicesByMaterial = new HashMap<Material, HashMap<Integer, LinkedList<Integer>>>();\n\t\t\n\t\tHashMap<String, Integer> verticesByIndex = new HashMap<String, Integer>();\n\t\tLinkedList<String> vertices = new LinkedList<String>();\n\t\t\n\t\t// Parse file:\n\t\tFile modelFile = new File(filename);\n\t\tFileInputStream fos = new FileInputStream(modelFile);\n\t\tScanner scanner = new Scanner(fos);\n\t\tscanner.useDelimiter(\"\\\\n\");\n\t\t\n\t\twhile (scanner.hasNext())\n\t\t{\n\t\t\tString currentLine = scanner.next();\n\t\t\tString[] s = currentLine.split(\"\\\\s+\");\n\t\t\t\n\t\t\t\n\t\t\tif (s.length == 0) { // UNNESSESARY || (s[0].startsWith(\"#\")) || (s[0].equals(\"g\"))) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if ((s[0].equals(\"g\")) && (name != null)) {\n\t\t\t\tname = s[1];\n\t\t\t}\n\t\t\telse if (s[0].equals(\"v\")) {\n\t\t\t\tfloat[] coord = {Float.valueOf(s[1]), Float.valueOf(s[2]), Float.valueOf(s[3])};\n\t\t\t\tcoords.add(coord);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"vn\")) {\n\t\t\t\tfloat[] normal = {Float.valueOf(s[1]), Float.valueOf(s[2]), Float.valueOf(s[3])};\n\t\t\t\tnormals.add(normal);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"vt\")) {\n\t\t\t\tfloat[] textureCoord = {Float.valueOf(s[1]), 1.0f - Float.valueOf(s[2])};\n\t\t\t\ttextureCoords.add(textureCoord);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"mtlib\")) {\n\t\t\t\tLinkedList<Material> loadedMaterials = MaterialLoader.load(modelFile.getParent() + File.separator + s[1], minFilter, magFilter);\n\t\t\t\tfor (Material material : loadedMaterials)\n\t\t\t\t\tmaterials.put(material.getName(), material);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"usemtl\")) {\n\t\t\t\tcurrentMaterial = materials.get(s[1]);\n\t\t\t}\n\t\t\telse if (s[0].equals(\"f\")) {\n\t\t\t\tint indexSize = s.length - 1;\n\t\t\t\t\n\t\t\t\t// Access indices by material:\n\t\t\t\tHashMap<Integer, LinkedList<Integer>> indicesByPrimitive = indicesByMaterial.get(currentMaterial);\n\t\t\t\tif (indicesByPrimitive == null) {\n\t\t\t\t\tindicesByPrimitive = new HashMap<Integer, LinkedList<Integer>>();\n\t\t\t\t\tindicesByMaterial.put(currentMaterial, indicesByPrimitive);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Access indices by primitive-type:\n\t\t\t\tLinkedList<Integer> indices = indicesByPrimitive.get(indexSize);\n\t\t\t\tif (indices == null) {\n\t\t\t\t\tindices = new LinkedList<Integer>();\n\t\t\t\t\tindicesByPrimitive.put(indexSize, indices);\n\t\t\t\t}\n\n\t\t\t\t// Iterate over indices:\n\t\t\t\tfor (int i = 0; i < indexSize; i++) {\n\t\t\t\t\t\n\t\t\t\t\t// 1. Index des Vertex ermitteln:\n\t\t\t\t\tInteger index = verticesByIndex.get(s[i + 1]);\n\t\t\t\t\tif (index == null) {\t\t\t// Dieser Vertex existiert noch nicht im VertexBuffer\n\t\t\t\t\t\tindex = vertices.size();\t// Nächsten freien Index ermitteln\n\t\t\t\t\t\tverticesByIndex.put(s[i + 1], index);\t// In Zuordnungstabelle Vertex-Index speichern\n\t\t\t\t\t\tvertices.add(s[i + 1]); \t// In Vertexbuffer eintragen\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// 2. Den Index des neuen / bekannten Vertex in der Indexliste dieses Material & Primitiventypes speichern:\n\t\t\t\t\tindices.add(index);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tscanner.close();\n\t\t\n\t\t// Vertices, Normalen und Texturcoords zusammenführen:\n\t\tFloatBuffer interleavedBuffer = BufferUtils.createFloatBuffer(vertices.size() * 8);\n\t\t\n\t\tfor (String vertex : vertices) {\n\t\t\t\n\t\t\t// Transform vertex indices from string to integer values:\n\t\t\tString[] s = vertex.split(\"/\");\n\t\t\tint[] indices = new int[s.length];\n\t\t\tfor (int i = 0; i < s.length; i++)\n\t\t\t\tindices[i] = Integer.parseInt(s[i]) - 1;\n\t\t\t\n\t\t\t// Add corresponding vertex data into the interleaved buffer:\n\t\t\tinterleavedBuffer.put(textureCoords.get(indices[1])[0]);\n\t\t\tinterleavedBuffer.put(textureCoords.get(indices[1])[1]);\n\t\t\t\n\t\t\tinterleavedBuffer.put(normals.get(indices[2])[0]);\n\t\t\tinterleavedBuffer.put(normals.get(indices[2])[1]);\n\t\t\tinterleavedBuffer.put(normals.get(indices[2])[2]);\n\t\t\t\n\t\t\tinterleavedBuffer.put(coords.get(indices[0])[0]);\n\t\t\tinterleavedBuffer.put(coords.get(indices[0])[1]);\n\t\t\tinterleavedBuffer.put(coords.get(indices[0])[2]);\n\t\t}\n\t\tinterleavedBuffer.flip();\n\t\t\n\t\ttry\n\t\t{\n\t\t\t// Iterate over faces of different material:\n\t\t\tfor (Map.Entry<Material, HashMap<Integer, LinkedList<Integer>>> iIndicesByPrimitive : indicesByMaterial.entrySet()) {\t\n\t\t\t\t\n\t\t\t\t// Apply material:\n\t\t\t\t//if (iIndicesByPrimitive.getKey() != null) iIndicesByPrimitive.getKey().render();\n\t\t\t\t\n\t\t\t\t// Create displaylist:\n\t\t\t\tint displayList = GL11.glGenLists(1);\n\t\t\t\t\n\t\t\t\t// Start outputting displaylist:\n\t\t\t\tGL11.glNewList(displayList, GL11.GL_COMPILE);\n\t\t\t\t\n\t\t\t\tGL11.glInterleavedArrays(GL11.GL_T2F_N3F_V3F, 0, interleavedBuffer);\n\t\t\t\t\n\t\t\t\tfor (Map.Entry<Integer, LinkedList<Integer>> iIndices : iIndicesByPrimitive.getValue().entrySet()) {\n\t\t\t\t\t\n\t\t\t\t\t// Convert index-list to buffer:\n\t\t\t\t\tIntBuffer indexBuffer = BufferUtils.createIntBuffer(iIndices.getValue().size());\n\t\t\t\t\tfor (Integer index : iIndices.getValue())\n\t\t\t\t\t\tindexBuffer.put(index);\n\t\t\t\t\tindexBuffer.flip();\n\t\t\t\t\t\n\t\t\t\t\t// Determine type of current face:\n\t\t\t\t\tint primitiveType;\n\t\t\t\t\n\t\t\t\t\tswitch (iIndices.getKey()) {\n\t\t\t\t\t\tcase 3: primitiveType = GL11.GL_TRIANGLES; break;\n\t\t\t\t\t\tcase 4:\tprimitiveType = GL11.GL_QUADS; break;\n\t\t\t\t\t\tdefault: primitiveType = GL11.GL_POLYGON;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// Render primitives:\n\t\t\t\t\tGL11.glDrawElements(primitiveType, indexBuffer);\n\t\t\t\t\t\n\t\t\t\t\t// On some devices, immediate mode is faster than VBs:\n\t\t\t\t\t/*GL11.glBegin(primitiveType);\n\t\t\t\t\tfor (int i = 0; i < iIndices.getValue().size(); i++) {\n\t\t\t\t\t\tGL11.glTexCoord2f(interleavedBuffer.get(indexBuffer.get(i)*8 + 0), interleavedBuffer.get(indexBuffer.get(i)*8 + 1));\n\t\t\t\t\t\tGL11.glNormal3f(interleavedBuffer.get(indexBuffer.get(i)*8 + 2), interleavedBuffer.get(indexBuffer.get(i)*8 + 3), interleavedBuffer.get(indexBuffer.get(i)*8 + 4));\n\t\t\t\t\t\tGL11.glVertex3f(interleavedBuffer.get(indexBuffer.get(i)*8 + 5), interleavedBuffer.get(indexBuffer.get(i)*8 + 6), interleavedBuffer.get(indexBuffer.get(i)*8 + 7));\n\t\t\t\t\t}\n\t\t\t\t\tGL11.glEnd();*/\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tGL11.glEndList();\n\t\t\t\t\n\t\t\t\t// Insert the mesh related to its material:\n\t\t\t\tmeshes.put(iIndicesByPrimitive.getKey(), new Mesh(displayList));\n\t\t\t}\n\t\t}\n\t\tcatch (Exception exception) {\n\t\t\t\n\t\t\t// Vertex-data is invalid, throw exception:\n\t\t\texception.printStackTrace();\n\t\t\tthrow new IOException(\"incompatible vertex-data\");\n\t\t}\n\t\tfinally {\n\t\t}\n\n\t\treturn new Model(meshes);\n\t}",
"public void loadModel(){\n remoteModel = new FirebaseCustomRemoteModel.Builder(dis).build();\n FirebaseModelManager.getInstance().getLatestModelFile(remoteModel)\n .addOnCompleteListener(new OnCompleteListener<File>() {\n @Override\n public void onComplete(@NonNull Task<File> task) {\n File modelFile = task.getResult();\n if (modelFile != null) {\n interpreter = new Interpreter(modelFile);\n // Toast.makeText(MainActivity2.this, \"Hosted Model loaded.. Running interpreter..\", Toast.LENGTH_SHORT).show();\n runningInterpreter();\n }\n else{\n try {\n InputStream inputStream = getAssets().open(dis+\".tflite\");\n byte[] model = new byte[inputStream.available()];\n inputStream.read(model);\n ByteBuffer buffer = ByteBuffer.allocateDirect(model.length)\n .order(ByteOrder.nativeOrder());\n buffer.put(model);\n //Toast.makeText(MainActivity2.this, dis+\"Bundled Model loaded.. Running interpreter..\", Toast.LENGTH_SHORT).show();\n interpreter = new Interpreter(buffer);\n runningInterpreter();\n } catch (IOException e) {\n // File not found?\n Toast.makeText(MainActivity2.this, \"No hosted or bundled model\", Toast.LENGTH_SHORT).show();\n }\n }\n }\n });\n }",
"private void clearCache() {\r\n for (int i = 1; i < neurons.length; i++) {\r\n for (int j = 0; j < neurons[i].length; j++) {\r\n neurons[i][j].clearCache();\r\n }\r\n }\r\n }",
"private void createGeneralScene(Group root3D){\n generateRunways(root3D);\n for(String runwayId: controller.getRunways()){\n genRunwayName(root3D, runwayId, runwayElevation);\n }\n generateLighting(root3D);\n pointCameraAt(new Point3D(0,0,0),root3D);\n }",
"private void createImageCache(){\n ImageCacheManager.getInstance().init(this,\n this.getPackageCodePath()\n , DISK_IMAGECACHE_SIZE\n , DISK_IMAGECACHE_COMPRESS_FORMAT\n , DISK_IMAGECACHE_QUALITY\n , ImageCacheManager.CacheType.MEMORY);\n }",
"public static Vector<Mesh> loadObj(String filename) {\n MeshReader mr = new MeshReader(filename);\n mr.read();\n return mr.getMeshes();\n }",
"private void createCache(byte[] buf) throws IOException {\n\t\tByteArrayInputStream bais = null;\n\t\tJarInputStream jis = null;\n\t\tbyte[] buffer = new byte[1024 * 4];\n\t\t\n\t\ttry {\n\t\t\tbais = new ByteArrayInputStream(buf);\n\t\t\tjis = new JarInputStream(bais);\n\t\t\tAttributes attr = jis.getManifest().getMainAttributes();\n\t\t\tmainClassName = attr != null ? attr.getValue(Attributes.Name.MAIN_CLASS) : null;\n\t\t\t\n\t\t\tfor (JarEntry entry = null; (entry = jis.getNextJarEntry()) != null; ) {\n\t\t\t\tString name = entry.getName();\n\t\t\t\t\n\t\t\t\tif (!entry.isDirectory()) {\n\t\t\t\t\tByteArrayOutputStream byteStream = new ByteArrayOutputStream();\n\t\t\t\t\t\n\t\t\t\t\tfor (int n = 0; -1 != (n = jis.read(buffer)); ) {\n\t\t\t\t\t\tbyteStream.write(buffer, 0, n);\n\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\tif (name.endsWith(\".class\")) {\n\t\t\t\t\t\tString className = name.substring(0, name.indexOf('.')).replace('/', '.');\n\t\t\t\t\t\tresources.put(className, byteStream.toByteArray());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tresources.put(name, byteStream.toByteArray());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbyteStream.close();\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tIOUtils.closeQuietly(jis);\n\t\t\tIOUtils.closeQuietly(bais);\n\t\t}\n\t}",
"private void cleanupStagingDir() {\n if (getApplicationId() != null) {\n dagUtils.cleanMr3Dir(getStagingDir(), sessionConf);\n }\n sessionScratchDir = null;\n }",
"public void populateCachedImages(File dir)\n {\n if (dir.exists())\n {\n File[] files = dir.listFiles();\n for (int i = 0; i < files.length; i++)\n {\n File file = files[i];\n if (!file.isDirectory())\n {\n //Record all filenames from the cache so we know which photos to retrieve from database\n cachedFileNames.add(file.getName());\n imageList.add(file);\n }\n }\n }\n }",
"private void init() {\n\n File folder = new File(MAP_PATH);\n File[] listOfFiles = folder.listFiles();\n\n for (int i = 0; i < Objects.requireNonNull(listOfFiles).length; i++) {\n this.mapFiles.add(new File(MAP_PATH + listOfFiles[i].getName()));\n }\n }",
"private void loadTextures() {\r\n int[] imgData;\r\n int width;\r\n int height;\r\n\r\n BitmapFactory.Options options = new BitmapFactory.Options();\r\n //圖片質量,數字越大越差\r\n options.inSampleSize = 1;\r\n Bitmap bitmap = BitmapFactory.decodeByteArray(path, 0, path.length, options);\r\n width = bitmap.getWidth();\r\n height = bitmap.getHeight();\r\n imgData = new int[width * height * 4];\r\n bitmap.getPixels(imgData, 0, width, 0, 0, width, height);\r\n bitmap.recycle();\r\n System.gc();\r\n\r\n mTextures.add(Texture.loadTextureFromIntBuffer(imgData, width, height));\r\n }",
"static File m61441b(Context context) {\n File file = new File(context.getApplicationContext().getCacheDir(), \"picasso-cache\");\n if (!file.exists()) {\n file.mkdirs();\n }\n return file;\n }",
"private void _generate(int versions) {\n\t \n\t \n\t \n\t _generate(); //V0\n\t \n\t File[] files = new File(System.getProperty(\"user.dir\")).listFiles();\n\t Model model = ModelFactory.createDefaultModel();\n\t //model.set\n\t\tfor(File file : files){\n\t\t\tif(!file.getName().contains(\"owl\")) continue;\n\t\t\ttry{\n\t\t\t\t\n\t\t\t\tFileInputStream in = new FileInputStream(file);\n\t\t\t\tmodel.read(in, \"http://example.com\", \"RDF/XML\");\t\t\t\n\t\t\t\tin.close();\n\t\t\t}\n\t\t\tcatch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tlong startingSize = model.size();\n\t\tmodel.close();\n\t double desSize = startingSize*(1+evoChange);\n\t int schemaEvol = (int)(strict*10);\n\t int schemaEvol2 = schemaEvol / (evoVersions-1);\n\t System.out.println(\"schema evol param: \" + schemaEvol2);\n\t int howManyDepts = (int) Math.floor(totalDeptsV0*evoChange);\n\t HashMap<Integer, String> newClasses = new HashMap<Integer, String>();\n\t for(int i = 0; i < schemaEvol; i++)\n\t\t newClasses.put(i,\"\");\n\n\t double evoChangeOriginal = evoChange;\n\t boolean pub = false, conf = false, journ = false, tech = false, \n\t\t\t book = false, thes = false, proj = false, even = false;\n\t HashMap<String, HashMap<Integer, Double>> initialWeightsMap = new HashMap<String, HashMap<Integer,Double>>();\n\t for(String key : fileWeightsMap.keySet()){\n\t\t HashMap<Integer, Double> innerClone = new HashMap<Integer, Double>();\n\t\t for(Integer innerKey : fileWeightsMap.get(key).keySet()){\n\t\t\t innerClone.put(innerKey, fileWeightsMap.get(key).get(innerKey));\n\t\t }\n\t\t initialWeightsMap.put(key, innerClone);\n\t }\n\t for(int vi = 0 ; vi < evoVersions-1; vi++){\n\t \t\n\t\t globalVersionTrigger = true;\n\t\t File dir = new File(System.getProperty(\"user.dir\")+\"/v\"+vi);\n dir.mkdirs();\n\t\t //assignFilters(classFilters);\n\t\t //System.out.println(\"current filters: \" + currentFilters.toString());\n\t \tint classForChange ;\n\t \n\t \t//the number of depts (files) to evolve, based on the defined evoChange parameter\t \n\t \n\t List<String> asList = new ArrayList<String>(fileWeightsMap.keySet());\n\t \n\t writer_log = new OwlWriter(this);\t \n writer_log.startLogFile(dir.getAbsolutePath()+\"/changes.rdf\");\n writer_log.start();\n\t for(int d = 0 ; d < howManyDepts ; d++){\n\t \t\n\t \t//System.out.println(\"aslist: \" + asList.size());\n\t \tif(asList.size() == 0) break;\n\t String randomFile = asList.get(random_.nextInt(asList.size()));\n\t instances_ = fileInstanceMap.get(randomFile);\n\t \n\t asList.remove(randomFile);\n\t \t\n\t //System.out.println(\"Selected file: \" + randomFile);\n\t writer_ = new OwlWriter(this);\n\t \n\t writer_.startFile(dir.getAbsolutePath()+\"/\"+randomFile);\n\t writer_.start();\n\t for(Integer nextClass : fileWeightsMap.get(randomFile).keySet()){\n\t \t\n\t \tclassForChange = nextClass;\n\t \t\n\t \tif(classForChange < 2) {\n\t \t\t\tcontinue;\n\t \t}\n\t \t\n\t \tif(classForChange == 4) continue;\n\t \tint totalIter = (int) Math.floor(2*initialWeightsMap.get(randomFile).get(classForChange))/howManyDepts;\n\t \t\n\t for(int i = 0; i < totalIter ; i++){\n\t \t\n\t \t_generateASection(classForChange, \n\t \t\t\tinstances_[classForChange].count ); \t \t\t\t\n\t }\n\t \n\t if(nextClass == 21 ){\n\t \twriter_log.addTypeClass(ontology+\"WebCourse\");\n\t \twriter_log.addSuperClass(ontology+\"WebCourse\", ontology+\"Course\");\n\t }\n\t else if(nextClass == 20 ){\n\t \twriter_log.addTypeClass(ontology+\"VisitingStudent\");\n\t \twriter_log.addSuperClass(ontology+\"VisitingStudent\", ontology+\"Student\");\n\t }\n\t else if(nextClass == 19 ){\n\t \twriter_log.addTypeClass(ontology+\"VisitingProfessor\");\n\t \twriter_log.addSuperClass(ontology+\"VisitingProfessor\", ontology+\"Professor\");\n\t }\n\t \n\t }\n\t \n\t for(int k = 0; k < schemaEvol2+1; k++){\n\t \t\n\t \tif(newClasses.isEmpty()) break;\n\t \tint newClass = _getRandomFromRange(0, newClasses.keySet().size()+1);\n\t \tint index = 0;\n\t \tfor(Integer s : newClasses.keySet()){\n\t \t\tif(index == newClass){\n\t \t\t\tnewClass = s;\n\t \t\t\tbreak;\n\t \t\t}\n\t \t\tindex++;\n\t \t}\n\t \t/*if(newClass == 1){\n\t \t_generatePublications();\n\t \tnewClasses.remove(newClass);\n\t }*/\n\t if(newClass == 2){\n\t \t_generateConferencePublications();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"ConferencePublication\");\n\t \twriter_log.addSuperClass(ontology+\"ConferencePublication\", ontology+\"Publication\");\n\t }\n\t if(newClass == 3){\n\t \t_generateJournalPublications();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"JournalArticle\");\n\t \twriter_log.addSuperClass(ontology+\"JournalArticle\", ontology+\"Publication\");\n\t }\n\t if(newClass == 4 ){\n\t \t_generateTechnicalReports();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"TechnicalReport\");\n\t \twriter_log.addSuperClass(ontology+\"TechnicalReport\", ontology+\"Publication\");\n\t }\n\t if(newClass == 5 ){\n\t \t_generateBooks();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"Book\");\n\t \twriter_log.addSuperClass(ontology+\"Book\", ontology+\"Publication\");\n\t }\n\t if(newClass == 6 ){\n\t \t_generateThesis();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"Thesis\");\n\t \twriter_log.addSuperClass(ontology+\"Thesis\", ontology+\"Publication\");\n\t }\n\t if(newClass == 7 ){\n\t \t_generateProjects();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"Project\");\n\t }\n\t if(newClass == 8){\n\t \t_generateEvents();\n\t \tnewClasses.remove(newClass);\n\t \twriter_log.addTypeClass(ontology+\"Event\");\n\t }\n\t }\n\t \n\t writer_.end();\n\t writer_.endFile();\n\t //correction\n\t //remainingUnderCourses_.\n\t remainingUnderCourses_.clear();\n\t \n\t for (int i = 0; i < UNDER_COURSE_NUM + (int) (UNDER_COURSE_NUM*evoChange); i++) {\n\t remainingUnderCourses_.add(new Integer(i));\n\t }\n\t remainingGradCourses_.clear();\n\t for (int i = 0; i < GRAD_COURSE_NUM + (int) (GRAD_COURSE_NUM*evoChange); i++) {\n\t remainingGradCourses_.add(new Integer(i));\n\t }\n\t remainingWebCourses_.clear();\n\t for (int i = 0; i < WEB_COURSE_NUM + (int) (WEB_COURSE_NUM*evoChange); i++) {\n\t remainingWebCourses_.add(new Integer(i));\n\t }\n\t \n\t assignWeights(randomFile);\t \t \n\t \n\t }\t\n\t evoChange = evoChange + evoVersions*evoChangeOriginal*evoChangeOriginal;\n\t \n\t writer_log.end();\n\t writer_log.endLogFile();\n\t \n\t \t\n\t }\n\t \n\t \n }",
"public static String[] getModels(String modelDirectory) {\n\t\tFile dir = new File(modelDirectory);\n\n\t\tLOG.info(\"Loading Models from... \" + dir.getAbsolutePath());\n\t\tList<String> models = new ArrayList<>();\n\t\tString[] modelNames = getModelNames();\n\n\t\tList<String> wildCardPath = Arrays.stream(modelNames).map(model -> {\n\t\t\treturn \"en-ner-\" + model + \"*.bin\";\n\t\t}).collect(Collectors.toList());\n\n\t\tFileFilter fileFilter = new WildcardFileFilter(wildCardPath,\n\t\t\t\tIOCase.INSENSITIVE);\n\t\tList<String> filePath = Arrays.asList(dir.listFiles(fileFilter))\n\t\t\t\t.stream().map(file -> file.getAbsolutePath())\n\t\t\t\t.collect(Collectors.toList());\n\t\treturn filePath.toArray(new String[filePath.size()]);\n\t}",
"@Override\n\tpublic void loadModel(String modelPath) {\n\t\tList<String> productList = new ArrayList<>();\n\t\tFileUtil util = new FileUtil();\n\t\tutil.loadWord(modelPath, productList);\n\t\ttrie = new Trie();\n\t\ttrie = trie.createTrie(productList);\n\t}",
"public static void fileManipulation(String path) {\r\n\t\t// Take all the info that found in the multiCSV function and put it in one CSVfolder\r\n\t\tMultiCSV CSVfolder=new MultiCSV();\r\n\t\tmultiCSV(path, CSVfolder) ;\r\n\t\t// Create one KML file\r\n\t\tfinalKML(CSVfolder.toKML);\r\n\t\t\r\n\t}",
"public static void findStructureFiles() {\n\t\tstructureFiles = new LinkedList<File>();\n\t\tLinkedList<File> unexploredDirectories = new LinkedList<File>();\n\t\tFile baseDir = new File(\"structures\");\n\t\t\n\t\tif (baseDir.exists() && baseDir.isDirectory()) {\n\t\t\t// load base directory's files\n\t\t\trecursiveFindStructureFiles(baseDir, unexploredDirectories);\n\t\t\t\n\t\t\t// load sub-directories' files, breadth-first\n\t\t\twhile (!unexploredDirectories.isEmpty()) {\n\t\t\t\trecursiveFindStructureFiles(unexploredDirectories.pop(), unexploredDirectories);\n\t\t\t}\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"Unable to locate structures folder.\");\n\t\t}\n\t}",
"private void cleanBuffersFromCache()\n {\n synchronized (myUsedKeys)\n {\n CacheProvider cache = getCache();\n for (PolylineModelData key : myPreviouslyUsedKeys)\n {\n if (!myUsedKeys.contains(key))\n {\n cache.clearCacheAssociation(key, PolylineDataBuffered.class);\n }\n }\n\n myPreviouslyUsedKeys.clear();\n myPreviouslyUsedKeys.addAll(myUsedKeys);\n }\n }"
] | [
"0.57748014",
"0.5336077",
"0.5100025",
"0.50977737",
"0.50965554",
"0.4997762",
"0.4844159",
"0.48264524",
"0.48262596",
"0.48069406",
"0.47619486",
"0.47497028",
"0.47030404",
"0.46943623",
"0.46509397",
"0.4646033",
"0.4631485",
"0.4593499",
"0.4592951",
"0.4592951",
"0.45915037",
"0.45752048",
"0.45666307",
"0.45651868",
"0.45599955",
"0.4557258",
"0.45510688",
"0.45493996",
"0.45400184",
"0.45284176",
"0.45211628",
"0.451738",
"0.45149618",
"0.45105913",
"0.45076394",
"0.4502806",
"0.45024773",
"0.45003432",
"0.44907936",
"0.44714138",
"0.44644806",
"0.44607234",
"0.4446035",
"0.4440846",
"0.44273323",
"0.44177932",
"0.44158447",
"0.4399347",
"0.43919516",
"0.43906364",
"0.43885285",
"0.43848866",
"0.43791607",
"0.4374438",
"0.43709004",
"0.43684578",
"0.4361935",
"0.43576533",
"0.43427384",
"0.4335057",
"0.43341112",
"0.43248186",
"0.43113673",
"0.4310691",
"0.43057787",
"0.43048334",
"0.42984217",
"0.42962816",
"0.42900646",
"0.42885968",
"0.42872593",
"0.4287043",
"0.42867273",
"0.42859352",
"0.42769316",
"0.4271921",
"0.42698044",
"0.42695093",
"0.42685166",
"0.42669135",
"0.42649418",
"0.42596427",
"0.42587358",
"0.42491454",
"0.42390874",
"0.4235404",
"0.42341772",
"0.42264375",
"0.42250162",
"0.42164212",
"0.4212289",
"0.42077702",
"0.4207692",
"0.42016524",
"0.42016193",
"0.41987258",
"0.4194644",
"0.41920298",
"0.41915017",
"0.41892406",
"0.41870978"
] | 0.0 | -1 |
Extracts a single file given the path to the file | public void extractFile(ZipInputStream zipIn, String filePath) throws IOException {
final int BUFFER_SIZE = (int) 1e8;
BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));
byte[] bytesIn = new byte[BUFFER_SIZE];
int read = 0;
while ((read = zipIn.read(bytesIn)) != -1) {
bos.write(bytesIn, 0, read);
}
bos.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Path getContent(String filename);",
"protected abstract InputStream getFile(final String path);",
"private static File extractFile(String sourcePath, String libFileName) throws IOException\n\t{\n\t\tFile file;\n\n\t\t// Get the md5 of the lib\n\t\ttry (InputStream input = readFile(sourcePath))\n\t\t{\n\t\t\tString hexStr = \"\";\n\t\t\tbyte[] md5 = Hash.md5(input);\n\t\t\tif (md5 != null)\n\t\t\t{\n\t\t\t\thexStr = Hash.bytesToHex(md5, 5);\n\t\t\t}\n\t\t\tfile = new File(System.getProperty(\"java.io.tmpdir\"), hexStr + \"_\" + libFileName);\n\t\t}\n\n\t\tif (file.exists())\n\t\t{\n\t\t\t// Do nothing\n\t\t\treturn file;\n\t\t}\n\n\n\t\ttry (InputStream input = readFile(sourcePath))\n\t\t{\n\t\t\ttry (FileOutputStream output = new FileOutputStream(file))\n\t\t\t{\n\t\t\t\tbyte[] buffer = new byte[4096];\n\t\t\t\twhile (true)\n\t\t\t\t{\n\t\t\t\t\tint length = input.read(buffer);\n\t\t\t\t\tif (length == -1)\n\t\t\t\t\t{\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\toutput.write(buffer, 0, length);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tcatch (IOException ex)\n\t\t\t{\n\t\t\t\tthrow new RuntimeException(\"Error extracting file: \" + sourcePath + \" to \" + file.getAbsolutePath(), ex);\n\t\t\t}\n\t\t}\n\n\t\treturn file;\n\t}",
"@Override\n public void handleExtracting(File file) {\n }",
"public File extract (Path archivePath, File destination) throws IOException\n\t{\n\t\tif (!Files.isRegularFile (archivePath))\n\t\t\tthrow new IOException (archivePath + \" is not a regular file\");\n\t\t\n\t\tif (destination.isDirectory ())\n\t\t\tdestination = destination.toPath ()\n\t\t\t\t.resolve (\"./\" + archivePath.normalize ().toString ()).normalize ()\n\t\t\t\t.toFile ();\n\t\t\n\t\tFiles.createDirectories (destination.toPath ().getParent ());\n\t\tFiles.copy (archivePath, destination.toPath (), Utils.COPY_OPTION);\n\t\t\n\t\treturn destination;\n\t}",
"private static void extractFile(final JarInputStream jarIn, final String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = jarIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }",
"File retrieveFile(String absolutePath);",
"public void retrieveFile(String fileName, String ext);",
"String getFile();",
"String getFile();",
"String getFile();",
"private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }",
"private void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }",
"FileObject getFile();",
"FileObject getFile();",
"public static String getFileFromUrl(final String url) {\n\t\treturn url.substring(url.lastIndexOf('/') + 1);\n\t}",
"public String getFile(String path){\n return target.path( path ).queryParam( \"view\", \"read\" ).request().get( String.class );\n }",
"private static void extractFile(ZipInputStream zipIn, String filePath) throws IOException {\n BufferedOutputStream bos = new BufferedOutputStream(new FileOutputStream(filePath));\n byte[] bytesIn = new byte[BUFFER_SIZE];\n int read = 0;\n while ((read = zipIn.read(bytesIn)) != -1) {\n bos.write(bytesIn, 0, read);\n }\n bos.close();\n }",
"private void extractFile() {\n try (BufferedReader buffered_reader = new BufferedReader(new FileReader(source_file))) {\n String line;\n while((line = buffered_reader.readLine()) != null) {\n String spaceEscaped = line.replace(\" \", \"\");\n //file was read, each line is one of the elements of the file_read_lines list\n //line 0 is keyword \"TELL\"\n //line 1 is the knowledge base\n //line 2 is the keyword \"ASK\"\n //line 3 is the query\n file_read_lines.add(spaceEscaped);\n }\n\n //generate list of Horn clauses (raw) from the KB raw sentence\n //replace \\/ by |\n String kbLine = file_read_lines.get(1).replace(\"\\\\/\", \"|\");\n rawClauses = Arrays.asList(kbLine.split(\";\"));\n //query - a propositional symbol\n query = file_read_lines.get(3);\n } catch (IOException e) {\n //Return error if file cannot be opened\n error = true;\n System.out.println(source_file.toString() + \" is not found!\");\n }\n }",
"private void getExtractWithFiles(){\n\t\ttry{\n\t\t\t\n\t\t\tFileInputStream fStream = new FileInputStream(tfile);\n\t\t\tfileBytes = new byte[(int)tfile.length()];\n\t\t\t\n\t\t\tfStream.read(fileBytes, 0, fileBytes.length);\n\t\t\tfileSize = fileBytes.length;\n\t\t}catch(Exception ex){\n\t\t\tSystem.err.println(\"File Packet \"+ex.getMessage());\n\t\t}\n\t}",
"public String textExtractor(String filePath) {\n\n StringBuilder textBuilder = new StringBuilder();\n try (BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(getClass().getResourceAsStream(\"/\" + filePath), \"UTF-8\"))) {\n while (bufferedReader.ready()) {\n textBuilder.append(bufferedReader.readLine()).append(\"/n\");\n }\n\n } catch (IOException exc) {\n exc.printStackTrace();\n }\n return textBuilder.toString();\n }",
"private static void extractArchive(Path sourcePath, Path targetPath) throws IOException {\n\n // TODO: janv_capgemini check if sourcePath is an archive and throw exception if not\n FileSystem fs = FileSystems.newFileSystem(sourcePath, null);\n\n Path path = fs.getPath(\"/\");\n Files.walkFileTree(path, new SimpleFileVisitor<Path>() {\n @Override\n public FileVisitResult visitFile(Path file, BasicFileAttributes attrs) throws IOException {\n\n Path relativePath = path.relativize(file);\n Path targetPathResolved = targetPath.resolve(relativePath.toString());\n Files.deleteIfExists(targetPathResolved);\n Files.createDirectories(targetPathResolved.getParent());\n Files.copy(file, targetPathResolved);\n return FileVisitResult.CONTINUE;\n }\n\n @Override\n public FileVisitResult visitFileFailed(Path file, IOException exc) throws IOException {\n\n // Log errors but do not throw an exception\n LOG.warn(\"An IOException occurred while reading a file on path {} with message: {}\", file, exc.getMessage());\n LOG.debug(\"An IOException occurred while reading a file on path {} with message: {}\", file,\n LOG.isDebugEnabled() ? exc : null);\n return FileVisitResult.CONTINUE;\n }\n });\n\n }",
"byte[] getFile(String filename) throws NoSuchFileException;",
"public static void extractFile(String zipFilePath, String inZipFilePath, String destDirectory) throws IOException {\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream(zipFilePath));\n ZipEntry entry = zipIn.getNextEntry();\n // iterates over entries in the zip file\n while (entry != null) {\n if (!entry.isDirectory() && inZipFilePath.equals(entry.getName())) {\n String filePath = entry.getName();\n int separatorIndex = filePath.lastIndexOf(File.separator);\n if (separatorIndex > -1)\n filePath = filePath.substring(separatorIndex + 1, filePath.length());\n filePath = destDirectory + File.separator + filePath;\n extractFile(zipIn, filePath);\n break;\n }\n zipIn.closeEntry();\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }",
"private static void getFile(String strFileName, String strURL, Boolean blnExtract)\r\n {\r\n String webPageContentsRaw = \"\";\r\n String webPageContentsCleaned = \"\";\r\n String webPageURL = strURL;\r\n INET net = new INET();\r\n\r\n\r\n\r\n if(!blnExtract)\r\n {\r\n System.out.println(strFileName);\r\n try {\r\n webPageContentsRaw = net.getURLRaw(webPageURL);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n webPageContentsCleaned = webPageContentsRaw.trim();\r\n\r\n if (strFileName.equals(strFileName.endsWith(\"data/FBIN.txt\")||strFileName.endsWith(\"data/World.txt\"))) {\r\n webPageContentsCleaned = net.getPREData(webPageContentsRaw);\r\n }\r\n\r\n webPageContentsCleaned = webPageContentsCleaned.trim();\r\n\r\n try {\r\n net.saveToFile(strFileName, webPageContentsCleaned);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }",
"public void testExtractDetailsUsingPath() {\n\t\t\n\t\tString href = when().\n\t\t\t\t\t\tget(\"http://jsonplaceholder.typicode.com/photos/1\").\n\t\t\t\t\t then().\n\t\t\t\t\t contentType(ContentType.JSON).\n\t\t\t\t\t body(\"albumId\", equalTo(1)).\n\t\t\t\t\t extract().\n\t\t\t\t\t path(\"url\");\n\t\tSystem.out.println(\"href : \" + href);\n\t\t\n\t\twhen().get(href).then().statusCode(200);\n\t}",
"java.lang.String getFilePath();",
"private File getFile(String path, String name)\r\n {\r\n File file = null;\r\n boolean found = false;\r\n String ext = \"\";\r\n\r\n for (int i = 0; i < name.length(); i++)\r\n ext += \"\" + ( (name.charAt(i) == '.') ? '\\\\' : name.charAt(i));\r\n\r\n while(ext.length() > 0 && !found)\r\n {\r\n file = new File(path + \"\\\\\" + ext + \".java\");\r\n found = file != null && file.exists() && file.isFile();\r\n ext = ext.substring(0, Math.max(0, ext.lastIndexOf('\\\\')));\r\n }\r\n\r\n return (found)?file:null;\r\n }",
"FileReference getFile(String fileName);",
"Path getFilePath();",
"public File extractTo (File destination) throws IOException\n\t{\n\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t.newDirectoryStream (zipfs.getPath (\"/\"));)\n\t\t{\n\t\t\tfor (Path file : directoryStream)\n\t\t\t{\n\t\t\t\textract (file, destination.toPath ());\n\t\t\t}\n\t\t}\n\t\treturn destination;\n\t}",
"void downloadingFile(String path);",
"protected void getFile(ZipEntry e) throws IOException {\n String zipName = e.getName();\n switch (mode) {\n case EXTRACT:\n if (zipName.startsWith(\"/\")) {\n if (!warnedMkDir)\n System.out.println(\"Ignoring absolute paths\");\n warnedMkDir = true;\n zipName = zipName.substring(1);\n }\n // if a directory, just return. We mkdir for every file,\n // since some widely-used Zip creators don't put out\n // any directory entries, or put them in the wrong place.\n if (zipName.endsWith(\"/\")) {\n return;\n }\n // Else must be a file; open the file for output\n // Get the directory part.\n int ix = zipName.lastIndexOf('/');\n if (ix > 0) {\n //String dirName = zipName.substring(0, ix);\n String fileName = zipName.substring(ix + 1, zipName.length());\n zipName = fileName;\n\n }\n String targetFile = this.unzipFileTargetLocation;\n File file = new File(targetFile);\n if (!file.exists())\n file.createNewFile();\n FileOutputStream os = null;\n InputStream is = null;\n try {\n os = new FileOutputStream(targetFile);\n is = zippy.getInputStream(e);\n int n = 0;\n while ((n = is.read(b)) > 0)\n os.write(b, 0, n);\n\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n if (os != null) {\n try {\n os.close();\n } catch (Exception ee) {\n ee.printStackTrace();\n }\n }\n }\n break;\n case LIST:\n // Not extracting, just list\n if (e.isDirectory()) {\n System.out.println(\"Directory \" + zipName);\n } else {\n System.out.println(\"File \" + zipName);\n }\n break;\n default:\n throw new IllegalStateException(\"mode value (\" + mode + \") bad\");\n }\n }",
"private static void extract (Path zipPath, Path destination)\n\t\tthrows IOException\n\t{\n\t\tif (Files.isDirectory (zipPath))\n\t\t{\n\t\t\ttry (DirectoryStream<Path> directoryStream = Files\n\t\t\t\t.newDirectoryStream (zipPath);)\n\t\t\t{\n\t\t\t\tfor (Path file : directoryStream)\n\t\t\t\t{\n\t\t\t\t\textract (file, destination);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPath fileOutZip = destination\n\t\t\t\t.resolve (\"./\" + zipPath.normalize ().toString ()).normalize ();\n\t\t\tFiles.createDirectories (fileOutZip.getParent ());\n\t\t\tFiles.copy (zipPath, fileOutZip, Utils.COPY_OPTION);\n\t\t}\n\t}",
"void getFile(String path, OutputStream stream) throws NotFoundException, IOException;",
"public static String getTXTfromAny(String path) {\r\n\r\n\t\tFile oldfile = new File(path);\r\n\t\tString filename = oldfile.getName();\r\n\t\tString newfile = \"\";\r\n\t\t\r\n\t\tfor (int i = 0; i < filename.length(); i++) {\r\n\t\t\tnewfile += filename.charAt(i);\r\n\t\t\tif (filename.charAt(i) == '.') {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\t\tnewfile += \"txt\";\r\n\t\t\r\n\t\tFile file2 = new File(\"./images/\"+ newfile);\r\n\t\tboolean success = oldfile.renameTo(file2);\r\n\t\tif (!success) {\r\n\t\t\tMessages.failedPhase1_3(oldfile);\r\n\t\t}else{\r\n\t\t\tMessages.succeedPhase1_3(oldfile, newfile);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn newfile;\r\n\r\n\t}",
"private static Optional<InputStream> openFile(Path name) {\n try {\n return Optional.of(Files.newInputStream(name, StandardOpenOption.READ));\n } catch (IOException e) {\n System.err.printf(\"Unable to open file %s for reading: %s\\n\", name, e.toString());\n }\n\n return Optional.empty();\n }",
"private static File getFile(String pathFile) {\n\t\tif(!pathFile.isEmpty()){\n\t\t\treturn new File(pathFile);\n\t\t}\n\t\treturn null;\n\t}",
"public static File getAsLocalFile(String name) throws IOException {\n \tif(!name.startsWith(\"/\")) name = \"/\"+name;\n \t\n \tURL url = NativeUtils.class.getResource(name);\n \tif(url == null) throw new FileNotFoundException(\"Unable to locate \"+name);\n \t\n \tFile file = null;\n \tif(url.getProtocol().equals(\"jar\")){\n \t\tfile = extractTmpFileFromJar(name, false);\n \t}else{\n \t\tfile = new File(url.getFile());\n \t}\n \treturn file;\n }",
"public static File extractTmpFileFromJar(String path, boolean deleteOnExit) throws IOException{\n \t\n // Prepare temporary file\n File temp = File.createTempFile(\"abcd\", \"efgh\");\n temp.delete();\n temp = new File(temp.getParentFile().getAbsolutePath() + path);\n if(deleteOnExit) temp.deleteOnExit();\n if(temp.exists()) return temp;\n \n // Prepare buffer for data copying\n byte[] buffer = new byte[1024];\n int readBytes;\n \n // Open and check input stream\n InputStream is = NativeUtils.class.getResourceAsStream(path);\n if (is == null) {\n throw new FileNotFoundException(\"File \" + path + \" was not found inside JAR.\");\n }\n \n // Open output stream and copy data between source file in JAR and the temporary file\n OutputStream os = new FileOutputStream(temp);\n try {\n while ((readBytes = is.read(buffer)) != -1) {\n os.write(buffer, 0, readBytes);\n }\n } finally {\n // If read/write fails, close streams safely before throwing an exception\n os.close();\n is.close();\n }\n \n return temp;\n }",
"private Object getFile(String path) throws Exception {\t\t\t\n\t\t \n\t\t FileInputStream fileIn = new FileInputStream(path);\n ObjectInputStream objectIn = new ObjectInputStream(fileIn);\n\n Object obj = objectIn.readObject();\n objectIn.close();\n \n return obj;\t\t\n\t}",
"public File getFile();",
"public File getFile();",
"public String readFromFile(String path) {\n BufferedReader br = null;\n String returnString =\"\";\n try {\n String sCurrentLine;\n br = new BufferedReader(new FileReader(path));\n while ((sCurrentLine = br.readLine()) != null) {\n returnString+=sCurrentLine;\n }\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n try {\n if (br != null)br.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n }\n return returnString;\n }",
"File getFile();",
"File getFile();",
"@Override\n public Output doExtract(File file, AbstractExtractor extractor,\n String encoding)\n {\n return null;\n }",
"protected File getFile(HttpServletRequest request) {\n String path = request.getPathInfo();\n\n // we want to extract everything after /spa/spaResources/ from the path info. This should cater for sub-directories\n String extractedFile = path.substring(path.indexOf('/', BASE_URL.length() - 1) + 1);\n File folder = SpaModuleUtils.getSpaStaticFilesDir();\n\n //Resolve default index.html\n if (extractedFile.endsWith(\"index.htm\") || !extractedFile.contains(\".\")) {\n extractedFile = \"index.html\";\n }\n\n File file = folder.toPath().resolve(extractedFile).toFile();\n if (!file.exists()) {\n log.warn(\"File with path '{}' doesn't exist\", file.toString());\n return null;\n }\n return file;\n }",
"abstract public InputStream retrieveContent( String path )\r\n throws Exception;",
"String extractPathWithinPattern(String pattern, String path);",
"public static String get(String path)\n {\n try\n {\n URI uri = new URI(path);\n String fragment = uri.getFragment();\n if (fragment != null)\n {\n File file = new File(fragment);\n if (file.exists())\n return file.toString();\n }\n\n // remove the fragment\n path = uri.getPath();\n }\n catch (URISyntaxException e)\n {\n // do nothing... fall through to the remaining code\n }\n\n // otherwise, try to load from full path\n\n if (cachedFiles == null)\n return null;\n\n for (Path cachedFile : cachedFiles)\n {\n if (cachedFile.toString().endsWith(path))\n {\n return cachedFile.toString();\n }\n if (cachedFile.getParent().toString().endsWith(path))\n {\n return cachedFile.toString();\n }\n }\n\n return null;\n }",
"@Override\n public String getFile(String fileName, String destDir) {\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.Event.GET_FILE.getId(), Tracer.Event.GET_FILE.getType());\n }\n\n // Parse the destination path\n if (!destDir.endsWith(File.separator)) {\n destDir += File.separator;\n }\n\n // Parse the file name\n DataLocation sourceLocation;\n try {\n sourceLocation = createLocation(fileName);\n } catch (IOException ioe) {\n ErrorManager.fatal(ERROR_FILE_NAME, ioe);\n return null;\n }\n if (sourceLocation == null) {\n ErrorManager.fatal(ERROR_FILE_NAME);\n return null;\n }\n\n // Ask the AP to\n String finalPath = mainAccessToFile(fileName, sourceLocation, AccessMode.R, destDir);\n\n if (Tracer.isActivated()) {\n Tracer.emitEvent(Tracer.EVENT_END, Tracer.getRuntimeEventsType());\n }\n\n return finalPath;\n }",
"String transcribeFile(String filePath);",
"String download(String path) throws IOException;",
"public static void copyfile(String filePath) {\n FileInputStream fis =null;\n FileOutputStream fos =null;\n try {\n fis = new FileInputStream(new File(filePath));\n fos = new FileOutputStream(new File(filePath+\".txt\"));\n byte[] bytes = new byte[1024];\n int temp=0;\n while ((temp = fis.read(bytes)) != -1) {\n fos.write(bytes, 0,temp);\n }\n// return fos.toByteArray();\n } catch (IOException e) {\n e.printStackTrace();\n// return null;\n } finally {\n try {\n if (fis !=null) {\n fis.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n try {\n if (fos !=null) {\n fos.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }",
"public void ReadFrom(String pathWithFileName) throws Exception\n {\n \tPath path = Paths.get(pathWithFileName);\n content = Files.readAllBytes(path);\n fileName = path.getFileName().toString(); \n contentType = null;\n }",
"String getFilePath();",
"public static File getTestFile( String path )\r\n {\r\n return new File( getBasedir(), path );\r\n }",
"private static String loadFile(String path){\n try {\n\n BufferedReader reader = new BufferedReader(new FileReader(path));\n StringBuilder sb = new StringBuilder();\n\n String line;\n while((line = reader.readLine()) != null){\n sb.append(line);\n sb.append('\\n');\n }\n\n reader.close();\n return sb.toString();\n\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n return null;\n } catch (IOException e) {\n e.printStackTrace();\n return null;\n }\n }",
"private File getFile(String fileName, String fileextension) {\n\t\treturn new File(outputDir + File.separator + fileName + \".\"\n\t\t\t\t+ fileextension);\n\t}",
"private void fileRead(String path)\n\t{\n\t\ttry\n\t\t{\n\t\t\t// create file\n\t\t\tFile file = new File(path);\n\t\t\tFileInputStream fileStream = new FileInputStream(file);\n\t\t\t\n\t\t\t// data read\n\t\t\tthis.dataContent = new byte[(int)file.length()];\n\t\t\tint ret = fileStream.read(this.dataContent, 0, (int)file.length());\n\t\t}\n\t\tcatch(FileNotFoundException e)\n\t\t{\n\t\t\tSystem.out.println(\"File Not Found : \" + e.getMessage());\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(\"Failed File Read : \" + e.getMessage());\n\t\t}\n\t\t\n\t}",
"public void extractPackage(String zipPath, String destPath) throws IOException {\n File destDir = new File(destPath);\n if(!destDir.exists()) {\n destDir.mkdir();\n }\n ZipInputStream zipIn = new ZipInputStream(new FileInputStream((zipPath)));\n ZipEntry entry = zipIn.getNextEntry();\n while(entry != null) {\n String filePath = destPath+File.separator+entry.getName();\n //filePath = filePath.replaceAll(\" \",\"_\");\n if(!entry.isDirectory()) {\n Log.i(\"extract\",\"Package Name: \"+entry.getName());\n Log.i(\"extract\",filePath);\n String[] temp = entry.getName().split(\"\\\\.\");\n if(validExtension(temp[temp.length-1].toLowerCase())) {\n extractFile(zipIn,filePath);\n }\n //extractFile(zipIn,filePath);\n } else {\n File dir = new File(filePath);\n dir.mkdirs();\n }\n zipIn.closeEntry();;\n entry = zipIn.getNextEntry();\n }\n zipIn.close();\n }",
"private String getFilename(String path) {\r\n\t\tint slashHere = path.lastIndexOf('/');\r\n\t\tif (slashHere == -1) {\r\n\t\t\treturn path;\r\n\t\t} else {\r\n\t\t\treturn path.substring(slashHere + 1);\r\n\t\t}\r\n\t}",
"public static FileSource fromPath(String filename) {\n return fromPath(filename, new SmarterMap());\n }",
"public FileWithFaultLocations getFile(final String file);",
"public File getFile() {\n\t\treturn new File(filepath);\n\t}",
"public static File jarFile(String path) {\n\t\treturn FileUtils.getFile(new File(JAR_DIR + StringUtils.substringAfterLast(path, \"/\")));\n\t}",
"public void get(String file) {\n\n }",
"private static File extractFromJar(String resource, String fileName, String suffix) throws IOException {\n URL res = Main.class.getResource(resource);\n\n // put this jar in a file system so that we can load jars from there\n File tmp;\n try {\n tmp = File.createTempFile(fileName,suffix);\n } catch (IOException e) {\n String tmpdir = System.getProperty(\"java.io.tmpdir\");\n IOException x = new IOException(\"Hudson has failed to create a temporary file in \" + tmpdir);\n x.initCause(e);\n throw x;\n }\n InputStream is = res.openStream();\n try {\n OutputStream os = new FileOutputStream(tmp);\n try {\n copyStream(is,os);\n } finally {\n os.close();\n }\n } finally {\n is.close();\n }\n tmp.deleteOnExit();\n return tmp;\n }",
"private static File resolveMetaFile(String path) {\n return new File(StringUtils.substringBefore(path, DEF_LOC_ARTIFACT) + DEF_REL_META + File.separator + \"project.tms.json\");\n }",
"public void extract(final File file, final File targetDir)\n throws IOException {\n final InputStream in = new java.io.FileInputStream(file);\n try {\n final MODCAParser parser = new MODCAParser(in);\n final ByteArrayOutputStream baout = new ByteArrayOutputStream();\n UnparsedStructuredField strucField;\n while ((strucField = parser.readNextStructuredField()) != null) {\n if (strucField.getSfTypeID() == 0xD3EE89) {\n final byte[] sfData = strucField.getData();\n println(strucField.toString());\n HexDump.dump(sfData, 0, this.printStream, 0);\n baout.write(sfData);\n }\n }\n\n final ByteArrayInputStream bin = new ByteArrayInputStream(\n baout.toByteArray());\n final DataInputStream din = new DataInputStream(bin);\n final long len = din.readInt() & 0xFFFFFFFFL;\n println(\"Length: \" + len);\n din.skip(4); // checksum\n final int tidLen = din.readUnsignedShort() - 2;\n final byte[] tid = new byte[tidLen];\n din.readFully(tid);\n String filename = new String(tid, \"ISO-8859-1\");\n final int asciiCount1 = countUSAsciiCharacters(filename);\n final String filenameEBCDIC = new String(tid, \"Cp1146\");\n final int asciiCount2 = countUSAsciiCharacters(filenameEBCDIC);\n println(\"TID: \" + filename + \" \" + filenameEBCDIC);\n\n if (asciiCount2 > asciiCount1) {\n // Haven't found an indicator if the name is encoded in EBCDIC\n // or not\n // so we use a trick.\n filename = filenameEBCDIC;\n }\n if (!filename.toLowerCase().endsWith(\".pfb\")) {\n filename = filename + \".pfb\";\n }\n println(\"Output filename: \" + filename);\n final File out = new File(targetDir, filename);\n\n final OutputStream fout = new java.io.FileOutputStream(out);\n try {\n IOUtils.copyLarge(din, fout);\n } finally {\n IOUtils.closeQuietly(fout);\n }\n\n } finally {\n IOUtils.closeQuietly(in);\n }\n }",
"public TypedFile getTypedFile(String path) {\r\n\tTypedFile f = new TypedFile(path);\r\n\tdeduceAndSetTypeOfFile(f);\r\n\treturn f;\r\n }",
"@VisibleForTesting\n\tDocument parseLocalFile(String url) throws IOException {\n\t\treturn Jsoup.parse(new File(url), \"UTF-8\", \"\");\n\t}",
"private String extractFileName(Part part) {\n\t String contentDisp = part.getHeader(\"content-disposition\");\r\n\t String[] items = contentDisp.split(\";\");\r\n\t for (String s : items) {\r\n\t if (s.trim().startsWith(\"filename\")) {\r\n\t // C:\\file1.zip\r\n\t // C:\\Note\\file2.zip\r\n\t String clientFileName = s.substring(s.indexOf(\"=\") + 2, s.length() - 1);\r\n\t clientFileName = clientFileName.replace(\"\\\\\", \"/\");\r\n\t int i = clientFileName.lastIndexOf('/');\r\n\t // file1.zip\r\n\t // file2.zip\r\n\t return clientFileName.substring(i + 1);\r\n\t }\r\n\t }\r\n\t return null;\r\n\t }",
"public InputStream readDocumentAsStream(String path) ;",
"public static File getFile(String name) {\n\t\treturn getFile(name, false);\n\t}",
"public static File getFile(String key) {\n\t\tArgumentNotValid.checkNotNullOrEmpty(key, \"String key\");\n\t\treturn new File(get(key));\n\t}",
"public static String getFilename(String path) {\n if (path == null) {\n return null;\n }\n String[] tokens = path.split(\"/\");\n if (tokens == null) {\n return null;\n }\n return tokens[tokens.length - 1];\n }",
"String getFilepath();",
"VirtualFile getFile(String uuid);",
"private File getFile(String filename) throws Exception {\n\t\tFile file = new File(filename);\n\t\tif (file.exists()) {\n\t\t\treturn file;\n\t\t} else if (!file.isAbsolute()) {\n\t\t\tfinal Resource r = context.getThisInstance().eResource();\n\t\t\tfinal Path p = new Path(r.getURI().segment(1) + File.separator + filename);\n\t\t\tfinal IFile f = ResourcesPlugin.getWorkspace().getRoot().getFile(p);\n\t\t\tif (f.exists()) {\n\t\t\t\treturn f.getRawLocation().makeAbsolute().toFile();\n\t\t\t}\n\t\t}\n\n\t\tthrow new Exception(\"Filename \" + filename + \" not found\");\n\n\t}",
"public GetFileRequest withFilePath(String filePath) {\n setFilePath(filePath);\n return this;\n }",
"DiscFileInfo getFileInfo(String path) throws IOException;",
"public void source(String path) throws Exception;",
"public File getFile(String key) {\n \tif( fileMap.containsKey(key) )\n \t\treturn fileMap.get(key);\n \t\n \treturn null;\n }",
"public static String getOutputFilePath(String path) {\n StringBuilder outputFilePath = new StringBuilder();\n String[] splittedPath = path.split(Constants.SLASH);\n outputFilePath.append(Constants.OUTPUT_FILE_LOCATION);\n outputFilePath.append(Constants.SLASH);\n outputFilePath.append(splittedPath[splittedPath.length - 1]\n .split(\"\\\\.\")[0]);\n outputFilePath.append(System.currentTimeMillis());\n outputFilePath.append(Constants.DOT_WAV);\n return outputFilePath.toString();\n }",
"private static final File readFile(final Shapefile shapefile, String pathFile)\n\t{\n\t\tpathFile += \".\" + shapefile.getType().toString().toLowerCase();//\".shp\";\n\n\t\tfinal Base64 decoder = new Base64();\n\t\tfinal byte[] shpBytes = decoder.decode(shapefile.getSource());\n\t\ttry\n\t\t{\n\t\t\tfinal FileOutputStream osf = new FileOutputStream(new File(pathFile));\n\t\t\tosf.write(shpBytes);\n\t\t\tosf.flush();\n\t\t\tosf.close();\n\t\t\treturn new File(pathFile);\n\t\t}\n\t\tcatch (final IOException e)\n\t\t{\n\t\t\tLOG.info(e.getMessage());\n\t\t\tthrow new RuntimeException(\"admin.shape.error.import\");\n\t\t}\n\t}",
"public static String getFilename(String pathfilename){\r\n\t\tString nameOfTheFile=pathfilename;\r\n\t\tboolean contentDisposition = false;\r\n\t\tString fileName;\r\n\t\tString parts[];\r\n\t\ttry {\r\n\t\t\tURL urlObj = new URL(pathfilename);\r\n\t\t\tURLConnection con = urlObj.openConnection();\r\n\t\t\tif(con.getHeaderField(\"Content-Disposition\")!=null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tparts = con.getHeaderField(\"Content-Disposition\").split(\"filename=\");\r\n\t\t\t\t\tnameOfTheFile = parts[1].replace(\"\\\"\", \"\");\r\n\t\t\t\t\tcontentDisposition=true;\r\n\t\t\t\t} catch (Exception e) {e.printStackTrace();}\r\n\t\t\t}\r\n\t\t\tif (contentDisposition==false){\r\n\t\t\t\t\tString urlPath = urlObj.getPath();\r\n\t\t\t\t\tif (!urlPath.endsWith(\"/\") && !urlPath.isEmpty()) {\r\n\t\t\t\t\t\tfileName = urlPath.substring(urlPath.lastIndexOf('/')+1).split(\":\")[0].trim();\r\n\t\t\t\t\t} else if (urlPath.endsWith(\"/\") && urlPath.length()>21){\r\n\t\t\t\t\t\tfileName = urlPath.substring(urlPath.lastIndexOf('/')-20).split(\"/\")[0].split(\":\")[0].trim();\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tfileName = \"index\" + urlObj.getHost();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tString ext = con.getContentType();\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\text = ext.substring(ext.lastIndexOf('/')+1).split(\";\")[0];\r\n\t\t\t\t\t} catch (Exception e) {ext = null;}\r\n\t\t\t\t\tif(ext!=null && !ext.equals(\"unknown\")) {\r\n\t\t\t\t\t\tif (!fileName.matches(\"[a-zA-Z0-9]*[.][a-zA-Z]+\")) {\r\n\t\t\t\t\t\t\tnameOfTheFile = fileName+\".\"+ext;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tnameOfTheFile = fileName;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t}\r\n\t\t}catch(Exception e) {e.printStackTrace();}\r\n\t\treturn nameOfTheFile;\r\n\t}",
"public void extract(String pathToPageFile, String baseUri) throws Exception {\n\n File file = new File(pathToPageFile);\n Document doc = Jsoup.parse(file, \"UTF-8\", baseUri);\n Elements links = doc.select(\"a[href]\");\n Elements media = doc.select(\"[src]\");\n Elements imports = doc.select(\"link[href]\");\n\n printf(\"\\nMedia: %d\", media.size());\n for (Element src: media) {\n printf(\" * %s: <%s>\", src.tagName(), src.attr(\"abs:src\"));\n }\n\n printf(\"\\nImports: %d\", imports.size());\n for (Element link: imports) {\n printf(\" * %s <%s> (%s)\", link.tagName(), link.attr(\"abs:href\"), link.attr(\"rel\"));\n }\n\n printf(\"\\nLinks: %d\", links.size());\n for (Element link: links) {\n printf(\" * %s <%s> (%s)\", link.tagName(), link.attr(\"abs:href\"), trim(link.text(), 35));\n }\n }",
"private static File parsePath(String path) {\n\t\tpath = (path == null ? \"\" : path.trim());\n\t\tif (path.startsWith(\"file://\")) {\n\t\t\tpath = path.substring(\"file://\".length());\n\t\t} else if (path.startsWith(\"file:\")) { \n\t\t\tpath = path.substring(\"file:\".length());\t\n\t\t}\n\t\t\n\t\tif (path.length() == 0 || path.equals(\".\")) {\n\t\t\tpath = System.getProperty(\"user.dir\", \".\"); // CWD\n\t\t} else {\t\n\t\t\t// convert separators to native format\n\t\t\tpath = path.replace('\\\\', File.separatorChar);\n\t\t\tpath = path.replace('/', File.separatorChar);\n\t\t\t\n\t\t\tif (path.startsWith(\"~\")) {\n\t\t\t\t// substitute Unix style home dir: ~ --> user.home\n\t\t\t\tString home = System.getProperty(\"user.home\", \"~\");\n\t\t\t\tpath = home + path.substring(1);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn new File(path);\n\t}",
"public String getFileNoPath() {\n if (fileType == HTTP) {\n return fileName.substring(fileName.lastIndexOf(\"/\") + 1);\n } else {\n return fileName.substring(fileName.lastIndexOf(File.separator) + 1);\n }\n }",
"public File findOne(String id) {\n\t\treturn fileDAO.selectOneById(id);\n\t}",
"public String getFileContent(String filePath) {\n\t\tString content = \"\";\n\t\t// get the path\n\t\tString path = filePath.substring(0, filePath.lastIndexOf(\"/\"));\n\t\t// get the file's name\n\t\tString name = filePath.substring(filePath.lastIndexOf(\"/\") + 1);\n\t\t// iterate through all the files to see if we can find it...\n\t\tfor (FileObjects t : getDirectory(path, directory).getFiles()) {\n\t\t\tif (name.equals(t.getName())) {\n\t\t\t\tcontent = t.getContent();\n\t\t\t}\n\t\t}\n\t\t// return the content of the file, or just an empty string if it's\n\t\t// empty.\n\t\treturn content;\n\n\t}",
"public static Path getFile(final String path) throws URISyntaxException {\n final URL resource = classLoader.getResource(path);\n checkIfFound(resource, path);\n final URI uri = resource.toURI();\n checkIfFound(uri, path);\n File file = new File(uri);\n checkIfFound(file, path);\n return file.toPath();\n }",
"protected void unpack( File file, File location )\n throws MojoExecutionException, NoSuchArchiverException\n {\n String archiveExt = FileUtils.getExtension( file.getAbsolutePath() ).toLowerCase();\n\n try\n {\n UnArchiver unArchiver = this.archiverManager.getUnArchiver( archiveExt );\n\n unArchiver.setSourceFile( file );\n\n unArchiver.setDestDirectory( location );\n\n unArchiver.extract();\n }\n catch ( IOException e )\n {\n throw new MojoExecutionException( \"Error unpacking file: \" + file + \"to: \" + location, e );\n }\n catch ( ArchiverException e )\n {\n throw new MojoExecutionException( \"Error unpacking file: \" + file + \"to: \" + location, e );\n }\n }",
"public String getFile(Element temp){\r\n\t\t//Element temp = getPlace(where,\"Characters\");\r\n\t\treturn temp.getChildText(\"Path\") + temp.getChildText(\"File\");\r\n\t}",
"public static String read(String path) {\r\n\t\t\r\n\t\t// open the file\r\n\t\tFile file = new File(path);\r\n\t\t\r\n\t\t\r\n\t\t// if the file does not exist return null\r\n\t\tif (!file.exists())\r\n\t\t\treturn null;\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString content = \"\";\r\n\t\t\r\n\t\t// write to the file\r\n\t\ttry {\r\n\t\t\t// open stream\r\n\t\t\tFileReader fReader = new FileReader(file);\r\n\t\t\tBufferedReader bufferedReader = new BufferedReader(fReader);\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t// read all the content of the file\r\n\t\t\tString current = bufferedReader.readLine();\r\n\t\t\twhile (current != null) {\r\n\t\t\t\tcontent = content.concat(current + \"\\n\");\r\n\t\t\t\tcurrent = bufferedReader.readLine();\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// close anything was opened\r\n\t\t\tbufferedReader.close();\r\n\t\t\tfReader.close();\r\n\r\n\t\t} catch (Exception e) {\r\n\r\n\t\t}\r\n\t\t\r\n\t\treturn content;\r\n\t}",
"private void getDetailsOfFiles(){\n\t\tString path = tfile.getAbsolutePath();\n\t\t\n\t\ttype = path.substring(path.lastIndexOf('.')+1);\n\t\t\n\t\tif(path.contains(\"/\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"/\")+1);\n\t\t}else if(path.contains(\"\\\\\")){\n\t\t\tfileName = path.substring(path.lastIndexOf(\"\\\\\")+1);\n\t\t}\n\t}",
"public T fileGet(String str, File file, AjaxStatus ajaxStatus) {\n byte[] bArr;\n try {\n if (isStreamingContent()) {\n ajaxStatus.file(file);\n bArr = null;\n } else {\n bArr = AQUtility.toBytes(new FileInputStream(file));\n }\n return transform(str, bArr, ajaxStatus);\n } catch (Exception e) {\n AQUtility.debug((Throwable) e);\n return null;\n }\n }",
"java.lang.String getFilename();"
] | [
"0.6106858",
"0.588623",
"0.5797788",
"0.57807684",
"0.57147926",
"0.5675636",
"0.56743336",
"0.5590712",
"0.5527258",
"0.5527258",
"0.5527258",
"0.55036336",
"0.55036336",
"0.5474728",
"0.5474728",
"0.5470454",
"0.54517937",
"0.5434819",
"0.5403967",
"0.5383904",
"0.5368473",
"0.53413814",
"0.5312462",
"0.52807873",
"0.52574307",
"0.52177054",
"0.5171701",
"0.5127036",
"0.5117264",
"0.5114828",
"0.51127774",
"0.5103795",
"0.50935143",
"0.50918835",
"0.50819594",
"0.50771827",
"0.5068059",
"0.5034678",
"0.5027529",
"0.5015403",
"0.5013052",
"0.5010575",
"0.5010575",
"0.5008499",
"0.4995931",
"0.4995931",
"0.49950802",
"0.49942476",
"0.49557367",
"0.49407208",
"0.49311668",
"0.49137908",
"0.49076843",
"0.49073464",
"0.49021107",
"0.48997286",
"0.489816",
"0.48975897",
"0.48964942",
"0.4887344",
"0.48842752",
"0.4881205",
"0.48796952",
"0.48777875",
"0.48772186",
"0.48708645",
"0.4868973",
"0.48623666",
"0.48556626",
"0.48487365",
"0.48485628",
"0.4840049",
"0.48364675",
"0.48137507",
"0.48107415",
"0.48089066",
"0.4805366",
"0.4804168",
"0.48005635",
"0.47934785",
"0.479196",
"0.47881177",
"0.47880188",
"0.47857028",
"0.47846723",
"0.47802612",
"0.47799584",
"0.47716445",
"0.4766416",
"0.47467172",
"0.47462294",
"0.47381002",
"0.47374177",
"0.47363225",
"0.47352937",
"0.47256896",
"0.47225678",
"0.47218367",
"0.4716969",
"0.47139153"
] | 0.53019273 | 23 |
Checks if extension is one of the accepted extensions | public Boolean validExtension(String extension) {
ArrayList<String> acceptedExtensions = new ArrayList<>();
acceptedExtensions.add("obj");
acceptedExtensions.add("mtl");
// acceptedExtensions.add("md2");
// acceptedExtensions.add("g3d");
// acceptedExtensions.add("g3dt");
//For testing purposes
acceptedExtensions.add("png");
acceptedExtensions.add("jpg");
Log.i("extract","Extension: "+extension);
for(int i = 0; i < acceptedExtensions.size(); i++) {
if(extension.equals(acceptedExtensions.get(i)))
return true;
}
return false;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean supportsExtension(String extension) {\n return extensions.stream().anyMatch(target -> target.equalsIgnoreCase(extension));\n }",
"public boolean validExtension(String what) {\n String[] ext = getExtensions();\n for (int i = 0; i < ext.length; i++) {\n if (ext[i].equals(what)) return true;\n }\n return false;\n }",
"private boolean isValidExtension(String url){\n for (String ext : IGNORED_EXTENSIONS) {\n if (url.contains(ext)) {\n return false;\n }\n }\n return true;\n }",
"public boolean isInputFileType(String extension);",
"boolean hasExtensionText();",
"public boolean matches(String ext)\r\n {\r\n for (String e : getExtensions())\r\n if (e.equals(ext))\r\n return true;\r\n\r\n return false;\r\n }",
"public boolean hasExtension(String extension) {\n int lastIndexOfDot = extension.lastIndexOf('.');\n if (lastIndexOfDot != -1) {\n extension = extension.substring(lastIndexOfDot + 1);\n }\n\n return extensions.contains(extension.toLowerCase());\n }",
"public static boolean acceptsExtension(String extension)\n\t{\n\t\tif (extension == null)\n\t\t\treturn false;\n\n\t\tfor (ImageWriter imageWriter : imageWriters)\n\t\t{\n\t\t\tif (imageWriter.isValidFileFormat(extension))\n\t\t\t\treturn true;\n\t\t}\n\n\t\treturn false;\n\t}",
"@objid (\"e20e1709-9e0b-4c6a-bf6c-3f3e7b57cdfe\")\n @Override\n boolean isExtension();",
"public boolean isCorrectExtFormat( String extension ) {\n try {\n int ext = Integer.parseInt( extension );\n } catch ( Exception e ){\n return false;\n }\n return true;\n }",
"public boolean isAllowedExtension(String fileExtenstion) throws DataServiceException {\r\n\t\tboolean isAllowed = false;\r\n\t\tInteger count = (Integer)queryForObject(\"document.query_isvalid_extension\",fileExtenstion);\r\n\t\tif (count == 1) {\r\n\t\t\tisAllowed = true;\r\n\t\t}\r\n\t\treturn isAllowed;\r\n\t}",
"private boolean isSourceType(String extension) {\n return srcFileName.toLowerCase().endsWith(extension);\n }",
"private boolean isValidExtension(String originalName) {\n String originalNameExtension = originalName.substring(originalName.lastIndexOf(\".\") + 1);\n switch(originalNameExtension) {\n case \"jpg\":\n case \"png\":\n case \"gif\":\n return true;\n }\n return false;\n }",
"private boolean isAbailableExtension(String value) {\n for (Extension extension : Extension.values()) {\n if (extension.getValue().equalsIgnoreCase(value)) {\n return true;\n }\n }\n return false;\n }",
"public boolean isExtension() {\n\t\treturn true;\n\t}",
"public static boolean checkFileType(String fileName) {\n\t\t// properties file has a comma delimited list of extensions\n\t\tString extension_value = PropertiesFile.getInstance().getProperty(\"accepted_ext\");\n\n\t\tif (extension_value != null) {\n\t\t\tString[] extensions = extension_value.split(\",\");\n\t\t\tfor (int i = 0; extensions != null && i < extensions.length; i++) {\n\t\t\t\tif (fileName.endsWith(extensions[i].trim()))\n\t\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public boolean hasExtensions() {\n return (buffer.get(0) & 0x10) == 0x010;\n }",
"public boolean isExtensionElement();",
"Boolean supportsMultipleExtensions();",
"public boolean isDefaultExtension(String what) {\n return what.equals(getDefaultExtension());\n }",
"@Override\r\n\tpublic boolean accept(File fich) {\n\t\treturn extension(fich);\r\n\t}",
"private boolean endsWithAny(String fileName, String[] extensions) {\r\n\r\n\t\t// Loop through the list of supported extensions\r\n\t\tfor (int i = 0; i < extensions.length; i++) {\r\n\t\t\tif (fileName.endsWith(extensions[i])) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"private boolean hasExtension(String namespace, TOSCAPlan buildPlan) {\n\t\treturn Utils.hasChildElementWithAttribute(buildPlan.getBpelExtensionsElement(), \"namespace\", namespace);\n\t}",
"Boolean has(String extension) {\n File f = new File(baseName + \".\" + extension);\n return f.exists();\n }",
"private boolean checkFile(String name) {\n return name.endsWith(extension);\n }",
"private boolean isSameExtension(ListGridRecord[] selectedNode, Extension extension) {\n boolean result = true;\n for (ListGridRecord record : selectedNode) {\n FileTreeNode node = (FileTreeNode) record;\n VMResource resource = node.getResource();\n if (resource instanceof VMDirectory) {\n result = false;\n break;\n }\n if (resource instanceof VMFile) {\n Extension selExtension = ((VMFile) resource).getExtension();\n if (selExtension != extension) {\n result = false;\n break;\n }\n }\n }\n return result;\n }",
"public boolean accept(File directory, String filname) {\n return filname.endsWith(extension); \r\n }",
"@Override\n public boolean accept(File file) {\n return file.getName().toUpperCase().endsWith(extension.toUpperCase());\n }",
"private boolean isAcceptableFile(File f) {\n \tif( f.getName().length() < 7 ) {\n \t\treturn false;\n \t}\n \t\n \tString extension = f.getName().substring( f.getName().length()-7, f.getName().length() );\n \tif ( !extension.equals(\".tessit\") ) {\n \t\treturn false;\n \t}\n \t\n \treturn true;\n }",
"private static boolean validateUrl(String urlString, List<String> extensions) {\n for (String extension: extensions) {\n if (urlString.length() > extension.length()) {\n if (urlString.substring(urlString.length() - extension.length()).equals(extension)) {\n return true;\n }\n }\n }\n return false;\n }",
"public static boolean verifyExtension(final String alias, final String path) {\n\t\tParametricFileType ft = getTypeFromAlias(alias);\n\t\tParametricFileType ft2 = getTypeFromFileName(path);\n\t\treturn ft.equals(ft2);\n\t}",
"boolean hasMimeType();",
"public boolean buildsFileType(String extension);",
"private static boolean checkFileType(String filename) {\r\n\t\treturn (filename.matches(\"(.*).bf\") || filename.matches(\"(.*).bmp\"));\r\n\t}",
"public boolean removeExtension(String extension) {\n return extensions.removeIf(target -> target.equalsIgnoreCase(extension));\n }",
"public boolean isWarningAudioFotmat(String extension) {\n\t\treturn warning.contains(extension);\n\t}",
"public static boolean isExtensionCommand(FtpCommandCode command) {\r\n \t\treturn ((command == XMD5) || (command == XCRC) || (command == XSHA1) \r\n \t\t\t\t|| (command == INTERNALSHUTDOWN) || (command == LIMITBANWIDTH));\r\n \t}",
"@Override\r\n public boolean accept(File file)\r\n {\n return FileUtil.getFileExtension(file.getPath(), true).toLowerCase().equals(EXT);\r\n }",
"String validateAllowedExtensions(File fileNamePath) {\n\t\tString fileName = fileNamePath.getName();\r\n\t\t\r\n\t\t//Get the index based on the extension into the string\r\n\t\tint lastIndex = fileName.lastIndexOf(\".\");\r\n\t\t\r\n\t\t//Get substring/extension from the string\r\n\t\tString extension = fileName.substring(lastIndex).toUpperCase();\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"GIF\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"JPG\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\tif (extension.equalsIgnoreCase(\"TXT\")) {\r\n\t\t\treturn extension;\r\n\t\t}\r\n\t\t\r\n\t\t// There is no extension for the file\r\n\t\tif (lastIndex == -1) {\r\n\t\t\treturn \"\";\r\n\t\t}\r\n\t\t\r\n\t\t// No valid extension\r\n\t\treturn \"\";\r\n\t\t\r\n\t}",
"@Override\n public boolean accept(File f) {\n return f.getName().endsWith(FILE_EXTENSION);\n }",
"boolean hasExtensionFeedItem();",
"private static String getFileTagsBasedOnExt(String fileExt) {\n String fileType = new Tika().detect(fileExt).replaceAll(\"/.*\", \"\");\n return Arrays.asList(EXPECTED_TYPES).contains(fileType) ? fileType : null;\n }",
"public boolean isaccept(File dir, String filename) {\n\t\treturn (filename.endsWith(\".mp3\")\r\n\t\t\t\t||filename.endsWith(\".mpga\")\r\n\t\t\t\t||filename.endsWith(\".ogg\")\r\n\t\t\t\t||filename.endsWith(\".wav\")\r\n\t\t\t\t||filename.endsWith(\".wma\")\r\n\t\t\t\t||filename.endsWith(\".wmv\"));\r\n\t}",
"@CheckForNull\n String getPreferredExtension();",
"List<String> getAllowedExtensions();",
"public boolean fileCheck(String fileName) {\n ArrayList<String> includes = new ArrayList(Arrays.asList(\".mp4\", \".mkv\", \".avi\"));\n ArrayList<String> excludes = new ArrayList(Arrays.asList(\".jpg\"));\n boolean check = false;\n\n for (String hasThis : includes) { //check for one of the key file formats\n if (fileName.contains(hasThis)) {\n check = true;\n break;\n }\n }\n\n for (String doesntHave : excludes) { // if it has any of these, void the original assesment and return false\n if (fileName.contains(doesntHave)) {\n return false;\n }\n }\n\n return check;\n }",
"public boolean isPistonExtension() {\n return this.type == Type.PISTONEXTENSION;\n }",
"String getExtension();",
"public boolean isLossyAudioFormat(String extension) {\n\t\treturn lossy.contains(extension);\n\t}",
"public static boolean hasAudioExtension(File file)\n {\n \tboolean hasAudio = false;\n \tString fn = file.getName().toLowerCase(Locale.getDefault());\n \tif(\tfn.endsWith(\"3gp\") || fn.endsWith(\"mp4\") ||\tfn.endsWith(\"m4a\") || fn.endsWith(\"aac\") ||\n \t\tfn.endsWith(\"ts\") || fn.endsWith(\"flac\") ||\tfn.endsWith(\"mp3\") || fn.endsWith(\"mid\") || \n \t\tfn.endsWith(\"xmf\") || fn.endsWith(\"mxmf\")|| fn.endsWith(\"rtttl\") || fn.endsWith(\"rtx\") || \n \t\tfn.endsWith(\"ota\") || fn.endsWith(\"imy\")|| fn.endsWith(\"ogg\") || fn.endsWith(\"mkv\") ||\n \t\tfn.endsWith(\"wav\") || fn.endsWith(\"wma\")\n \t\t) \n\t \thasAudio = true;\n\t \n \treturn hasAudio;\n }",
"public boolean hasDefaultExtension(SketchCode code) {\n return code.getExtension().equals(getDefaultExtension());\n }",
"boolean isUsingTPExtension();",
"private boolean isValidContentType(String sHTTPRequest) {\n String sFileType = getFileExtension(sHTTPRequest);\n return Arrays.asList(SUPPORTED_FILE_TYPES).contains(sFileType);\n }",
"public boolean isLosslessAudioFormat(String extension) {\n\t\treturn lossless.contains(extension);\n\t}",
"public static boolean isImage(String extension) {\n if (extension != null && (\n \t\textension.equalsIgnoreCase(JPG.toString())\n \t\t|| extension.equalsIgnoreCase(JPEG.toString())\n \t\t|| extension.equalsIgnoreCase(PNG.toString())\n \t\t|| extension.equalsIgnoreCase(BMP.toString()))) {\n return true;\n }\n return false;\n }",
"@SuppressLint(\"DefaultLocale\")\n\t\t@Override\n\t\tpublic boolean accept(File dir, String filename) {\n\t\t return filename.toLowerCase().endsWith(ext.toLowerCase());\n\t\t}",
"public static boolean hasAudioExtension(String string)\n {\n \tboolean hasAudio = false;\n \tif(!Util.isEmptyString(string))\n \t{\n\t \tString fn = string.toLowerCase(Locale.getDefault());\n\t \tif(\tfn.endsWith(\"3gp\") || fn.endsWith(\"mp4\") ||\tfn.endsWith(\"m4a\") || fn.endsWith(\"aac\") ||\n\t \t\tfn.endsWith(\"ts\") || fn.endsWith(\"flac\") ||\tfn.endsWith(\"mp3\") || fn.endsWith(\"mid\") || \n\t \t\tfn.endsWith(\"xmf\") || fn.endsWith(\"mxmf\")|| fn.endsWith(\"rtttl\") || fn.endsWith(\"rtx\") || \n\t \t\tfn.endsWith(\"ota\") || fn.endsWith(\"imy\")|| fn.endsWith(\"ogg\") || fn.endsWith(\"mkv\") ||\n\t \t\tfn.endsWith(\"wav\") || fn.endsWith(\"wma\")\n\t \t\t) \n\t \t\thasAudio = true;\n \t}\n \treturn hasAudio;\n }",
"public boolean isExtension(FeatureModel featureModel) throws OperationNotSupportedException, FMReasoningException {\n\t\tthrow new OperationNotSupportedException(\"Reasoning Operation Not Supported\");\n\t}",
"public static boolean checkFileExtension(final String checkFile, final String fileExtension) {\n\n boolean correctFileType = false;\n\n final int i = checkFile.lastIndexOf('.');\n if (i > 0) {\n final String checkExtension = checkFile.substring(i + 1);\n correctFileType = fileExtension.equals(checkExtension.toUpperCase(Locale.ENGLISH));\n }\n\n return correctFileType;\n }",
"public boolean producesFileType(String outputExtension);",
"String getFileExtension();",
"private static final native boolean isSupported()/*-{\n\t\treturn !!(chrome.extension);\n\t}-*/;",
"EnsureExtensionResponse ensureExtensions(EnsureExtensionRequest request);",
"public boolean hideExtension(String what) {\n return getHiddenExtensions().contains(what);\n }",
"protected abstract String getFileExtension();",
"public boolean isSupportedFile(String fileName)\r\n {\r\n return fileName.toLowerCase().endsWith(\".gtf\");\r\n }",
"public static boolean hasMimeType(String mimeType) {\n if (mimeType == null || mimeType.length() ==0) {\n return false;\n }\n return mimeTypeToExtensionMap.containsKey(mimeType);\n }",
"public boolean isHeaderFile(String ext);",
"public boolean hasExtensions() {\n /*\n // Can't load method instructions: Load method exception: bogus opcode: 00e5 in method: sun.security.x509.X509CRLEntryImpl.hasExtensions():boolean, dex: \n */\n throw new UnsupportedOperationException(\"Method not decompiled: sun.security.x509.X509CRLEntryImpl.hasExtensions():boolean\");\n }",
"public String getFileExtension();",
"@Override\r\n\tpublic boolean accept(File f) {\r\n\t\tif (f.isDirectory()) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tString extension = FileUtils.getExtension(f);\r\n\t\tif (extension == null) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (extension.equals(TIFF) || extension.equals(TIF)\r\n\t\t\t\t|| extension.equals(GIF) || extension.equals(JPEG)\r\n\t\t\t\t|| extension.equals(JPG) || extension.equals(PNG)) {\r\n\t\t\treturn true;\r\n\t\t} else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}",
"public static boolean checkFileExtension(final String checkFile, final Set<String> fileExtensions) {\n\n boolean correctFileType = false;\n\n final int i = checkFile.lastIndexOf('.');\n if (i > 0) {\n final String checkExtension = checkFile.substring(i + 1);\n correctFileType = fileExtensions.contains(checkExtension.toUpperCase(Locale.ENGLISH));\n }\n\n return correctFileType;\n }",
"private boolean properExtensionalImage(CompoundTerm term) {\n\t\tif (term.con().equals(Connector.ExtImage())) {\n\t\t\tIterator<AtomicTerm> i = term.comps().iterator();\n\t\t\ti.next(); // xxx (relation)\n\t\t\treturn i.next().equals(AtomicTerm.Placeholder());\n\t\t}\n\t\treturn false;\n\t}",
"public boolean accept(File f)\r\n {\r\n // Accepter le fichier si c'est un repertoire\r\n if (f.isDirectory())\r\n return true;\r\n\r\n String extension = FileUtil.getExtension(f);\r\n if ((extensionFilters == null) || (extensionFilters.isEmpty()))\r\n {\r\n if (extension == null)\r\n return true;\r\n else\r\n return false;\r\n }\r\n\r\n if (extension == null)\r\n return false;\r\n else\r\n return extensionFilters.contains(extension);\r\n }",
"@Test\n public void testAnalyzeFileByExtension() {\n incorrectValues(null, \"test.txt\");\n incorrectValues(\"\", \"test.txt\");\n incorrectValues(\"lof\", null);\n incorrectValues(\"file\", \"\");\n incorrectValues(\"resources\", \".png\");\n }",
"@Override\n public boolean accept(File f) {\n return f.isDirectory() || f.getName().endsWith(\".\" + ext);\n }",
"public boolean isKnownFileType(FileType t) {\n\treturn knownTypes.contains(t);\r\n }",
"public void addExtension(String extension)\r\n {\r\n // Verifions que l'extension passe en argument ne soit pas null !\r\n if (extension != null)\r\n {\r\n // Verifier que le vecteur des extensions n'est pas null\r\n if (extensionFilters == null)\r\n {\r\n // Creation du vecteur des extensions\r\n extensionFilters = new ArrayList();\r\n }\r\n\r\n // Ajout de l'extension passe en argument dans le vecteur des extensions\r\n // Ne prendre que l'extension et pas le '.' (\"jpg\" mais pas \".jpg\")\r\n int i = extension.lastIndexOf('.');\r\n if (i > 0 && i < extension.length() - 1)\r\n extensionFilters.add(extension.substring(i + 1).toLowerCase());\r\n else\r\n extensionFilters.add(extension.toLowerCase());\r\n }\r\n }",
"public static boolean acceptsFile(File file)\n\t{\n\t\treturn acceptsExtension(extractExtension(file.getName()));\n\t}",
"public void testGetExtension() throws Exception {\n Object[] test_values = {\n new String[]{\"/foo.bar\", \".bar\"},\n new String[]{\"foo.bar#a\", \".bar\"},\n new String[]{\"foo.bar?b=c\", \".bar\"},\n new String[]{\"foo.bar#a?b=c\", \".bar\"},\n new String[]{\"foo.bar\", \".bar\"},\n new String[]{\"foo/bar\", null},\n new String[]{\"/x.html\", \".html\"},\n new String[]{\"/foo.bar.org/x.y.z.html\", \".html\"}\n };\n for (int i = 0; i < test_values.length; i++) {\n String tests[] = (String[]) test_values[i];\n String test = tests[0];\n String expected = tests[1];\n\n String result = NetUtils.getExtension(test);\n String message = \"Test \" + \"'\" + test + \"'\";\n assertEquals(message, expected, result);\n }\n }",
"private static boolean isValidFileName(String name) {\n\t\tif(name.indexOf('.') != -1 && name.length() != 0) return true;\n\t\telse System.out.println(\"\\nFilenames must include the file's extension.\"); return false;\n\t}",
"public abstract String getFileExtension();",
"public boolean setFileExt() {\n\n String url = VideoURLs.get(0).toLowerCase();\n\n if (url.endsWith(\".mpg\")) {\n //isVideo = true;\n FileExt = \".mpg\";\n } else if (url.endsWith(\".mp3\")) {\n //isVideo = false;\n FileExt = \".mp3\";\n } else if (url.endsWith(\".m4a\")) {\n //isVideo = false;\n FileExt = \".m4a\";\n } else {\n //isVideo = true;\n FileExt = \".flv\";\n }\n\n Log.getInstance().write(Log.LOGLEVEL_TRACE, \"RecordingEpisode.setFileExt: FileExt = \" + FileExt);\n\n return true;\n }",
"public boolean accept(File f) {\n if(f.isDirectory()){\n return true;\n }\n String extension = getExtension(f);\n if(extension.equals(\"ascii\") || extension.equals(\"txt\") || extension.equals(\"asc\")){\n return true;\n }\n return false;\n }",
"private boolean checkFile(String filename, String[] extensions) {\n \n // flag to indicate the file was found\n boolean foundFile = false;\n \n // iterate through all the extensions\n for (String currentExtension : extensions) {\n \n // check if the file has the current extension\n if (filename.toLowerCase().endsWith(currentExtension)) {\n \n // set flag\n foundFile = true;\n \n // set configuration\n configuration.setChosenFilePattern(currentExtension);\n \n // break iteration\n break;\n }\n }\n \n // create a new file status\n File fileStatus = null;\n \n // check if a reference was found\n if (foundFile) {\n \n // create new instance\n fileStatus = new File(filename);\n \n // check if exists\n if (fileStatus.exists()) {\n \n // add file\n theFile = filename;\n \n // found it!\n return true;\n } else {\n \n // print message about it\n System.out.println(localization.getMessage(\"Error_FileDoesNotExist\", filename));\n \n // not found\n return false;\n }\n \n } else {\n \n // there's no extension, we will add them and see if something\n // is found\n for (String currentExtension : extensions) {\n \n // new file with extension\n fileStatus = new File(filename + currentExtension);\n \n // let's check it\n if (fileStatus.exists()) {\n \n // add file\n theFile = filename + currentExtension;\n \n // add reference\n configuration.setChosenFilePattern(currentExtension);\n \n // found it!\n return true;\n \n }\n \n }\n \n // print message about it\n System.out.println(AraraUtils.wrap(localization.getMessage(\"Error_FileDoesNotExistWithExtensionsList\", filename, getExtensionsList(extensions))));\n \n // file not found\n return false;\n \n }\n \n }",
"public void addFileType(String ext) {\n accepted.add(new GeneralFilter(ext.toLowerCase(), ext.toUpperCase()));\n }",
"public List<String> getFileExtensions()\n/* */ {\n/* 619 */ if ((useRegisteredSuffixPatternMatch()) && (this.contentNegotiationManager != null)) {\n/* 620 */ return this.contentNegotiationManager.getAllFileExtensions();\n/* */ }\n/* 622 */ return null;\n/* */ }",
"boolean hasAdGroupExtensionSetting();",
"boolean accept(String filename);",
"boolean hasCustomerExtensionSetting();",
"boolean hasCampaignExtensionSetting();",
"public void setExtensions(String extensions)\n {\n this.ext = extensions;\n }",
"public void setExtension(String extension) {\n this.extension = extension;\n }",
"public void setExtension(String extension) {\n this.extension = extension;\n }",
"@Override\n public boolean accept(File f) //SELECTING/ACCEPTING THE PARTICULAR FILES\n {\n if(f.isDirectory()) //ACCEPTS ALL DIRECTORY(E.G. C DRIVE)\n return true;\n\n String extension=f.getName().substring(f.getName().lastIndexOf(\".\")+1);//GETTING THE EXTENSION OF IMAGE NAME\n String allowed[]={\"jpg\",\"png\",\"gif\",\"jpeg\",\"bmp\"};\n for(String a:allowed)//FOR EACH LOOP\n {\n if(a.equals(extension))//IF EXTENSION MATCHES,,RETURN TRUE\n {\n return true;\n }\n else\n {\n return false;\n }\n }\n return false;//IF ANYTHING ELSE RETURN FALSE\n }",
"public boolean accept(File f) {\n\t if(f != null) {\n\t if(f.isDirectory()) {\n\t\t return true;\n\t }\n\t String extension = getExtension(f);\n\t if(extension != null && filters.get(getExtension(f)) != null) {\n\t\t return true;\n\t }\n\t }\n\t return false;\n }",
"private boolean isValidName(String guess_file) {\n int dot = guess_file.lastIndexOf(\".\");\n if (dot > 0) {\n String ext = guess_file.substring(dot + 1);\n if (!ext.equals(\"csv\")) {\n //We only want CSV files for parsing\n return false;\n }else if (ext.equals(\"csv\")){\n return true;\n }\n }\n return false;\n }",
"@Override\n\tpublic Boolean canParse(String fileName) {\n\t\treturn fileName.contains(\"gene_association.\") && !fileName.endsWith(\".gz\");\n\t}",
"public int lookupWriteFileExtension(String extension);",
"private boolean isDotAllowed()\r\n\t{\r\n\t\t//if the previous character is a dot then the dot is not allowed.\r\n\t\tif(isPreCharDot())\r\n\t\t\treturn false;\r\n\t\t//if the previous character is a evaluation symbol then the dot is allowed.\r\n\t\tif(isPreEvalSymobl())\r\n\t\t\treturn true;\r\n\t\t//if the last number has a dot then another dot is not allowed.\r\n\t\tString lastNum = getLastNumber(expression);\r\n\t\tif(lastNum.contains(\".\"))\r\n\t\t\treturn false;\r\n\t\treturn true;\r\n\t}"
] | [
"0.8216132",
"0.8118444",
"0.7583998",
"0.7581493",
"0.752883",
"0.7356166",
"0.7329855",
"0.731499",
"0.7247173",
"0.7142946",
"0.70110947",
"0.69174844",
"0.68877804",
"0.67801785",
"0.67556506",
"0.6751998",
"0.6737593",
"0.66900975",
"0.6639703",
"0.65061545",
"0.645188",
"0.64474034",
"0.64097",
"0.63892007",
"0.6362864",
"0.6355818",
"0.63473386",
"0.6314468",
"0.6255243",
"0.62403893",
"0.6233171",
"0.62124294",
"0.6209617",
"0.61890215",
"0.6123392",
"0.61169803",
"0.6094409",
"0.60812813",
"0.6066341",
"0.60375637",
"0.6026747",
"0.60256964",
"0.60023147",
"0.5998377",
"0.5997872",
"0.5995759",
"0.5967998",
"0.5967507",
"0.5962154",
"0.5949326",
"0.59425354",
"0.5937485",
"0.5917136",
"0.58876365",
"0.5875649",
"0.586922",
"0.58646995",
"0.58627",
"0.58522046",
"0.58282787",
"0.577625",
"0.57309496",
"0.5728203",
"0.57278943",
"0.5693834",
"0.5680684",
"0.56623256",
"0.5645125",
"0.56270397",
"0.56261146",
"0.5624955",
"0.5619475",
"0.56174093",
"0.5592415",
"0.55878127",
"0.558272",
"0.55812466",
"0.5570152",
"0.5556751",
"0.55450034",
"0.55424035",
"0.552474",
"0.5522857",
"0.5514831",
"0.5512544",
"0.5512344",
"0.5510548",
"0.5509478",
"0.55043983",
"0.5499213",
"0.54909223",
"0.5484782",
"0.5478458",
"0.5478458",
"0.5472883",
"0.5471865",
"0.54711175",
"0.5456528",
"0.5454226",
"0.54323906"
] | 0.8127901 | 1 |
TODO: Add class header comment. | public interface IOnBackPressed {
void onBackPressed();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private stendhal() {\n\t}",
"private Rekenhulp()\n\t{\n\t}",
"Object getClass_();",
"Object getClass_();",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"private TMCourse() {\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"@Override\n protected void initialize() {\n }",
"public OOP_207(){\n\n }",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\n\tpublic void classroom() {\n\t\t\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"private Infer() {\n\n }",
"@Override\n void init() {\n }",
"@Override\n public void init() {\n }",
"public Methods() {\n // what is this doing? -PMC\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"private MApi() {}",
"@Override\n protected void initialize() {\n\n \n }",
"private Solution() {\n /**.\n * { constructor }\n */\n }",
"@Override\n public void init() {}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\n public void initialize() { \n }",
"private MetallicityUtils() {\n\t\t\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n protected void init() {\n }",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"@Override\n public void initialize() {}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"@Override\n protected void prot() {\n }",
"@Override\n\tpublic void VisitClassNode(BunClassNode Node) {\n\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"private ClassUtil() {}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tprotected void initialize() {\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {}",
"private void __setClassDescription() {\n\t\tEOClassDescription cd = EOClassDescription.classDescriptionForClass(getClass());\n\t\tif (cd == null) {\n\t\t\tthrow new IllegalStateException(\"Unabled to find an EOClassDescription for objects of \" + getClass());\n\t\t}\n\t\t__setClassDescription(cd);\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n public void init() {\n\n }",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n public int describeContents() { return 0; }",
"private XhtmlUtils()\n\t{\n\t}",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"public _355() {\n\n }",
"private Marinator() {\n }",
"private Marinator() {\n }",
"public void method_4270() {}",
"public Pitonyak_09_02() {\r\n }",
"protected Doodler() {\n\t}",
"@Override\n public void initialize() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n public void initialize() {\n \n }",
"@Override\n public void init() {\n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"private Inspect() {\n }",
"private UsineJoueur() {}",
"@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}",
"public Clade() {}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\n public void initialize() {\n\n }",
"@Override\n public void initialize() {\n\n }",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}"
] | [
"0.7005788",
"0.6622339",
"0.66182435",
"0.66182435",
"0.6453211",
"0.64052355",
"0.6330594",
"0.6306951",
"0.63017744",
"0.63017744",
"0.63017744",
"0.63017744",
"0.63017744",
"0.63017744",
"0.6300069",
"0.6293018",
"0.62647474",
"0.6232812",
"0.6229104",
"0.62180686",
"0.6215477",
"0.61889464",
"0.6173495",
"0.6167234",
"0.6167234",
"0.61568",
"0.6146929",
"0.61243695",
"0.61118555",
"0.6107565",
"0.6107469",
"0.609735",
"0.6092236",
"0.6092236",
"0.60759664",
"0.6073525",
"0.6073525",
"0.6073525",
"0.60697615",
"0.6063627",
"0.60473907",
"0.60463995",
"0.60389423",
"0.6023009",
"0.60151154",
"0.6009766",
"0.6009766",
"0.6007253",
"0.60038483",
"0.5991201",
"0.5989002",
"0.59860134",
"0.59860134",
"0.5982694",
"0.59820235",
"0.59820235",
"0.59820235",
"0.59820235",
"0.59820235",
"0.597488",
"0.597488",
"0.597488",
"0.597488",
"0.597488",
"0.597488",
"0.597488",
"0.597488",
"0.597488",
"0.597488",
"0.5972085",
"0.59635603",
"0.5958185",
"0.5956467",
"0.5945287",
"0.5943342",
"0.5943342",
"0.59348905",
"0.59340036",
"0.59182906",
"0.5914736",
"0.5911445",
"0.58953166",
"0.58945256",
"0.5879523",
"0.58767235",
"0.5873863",
"0.5873863",
"0.5873382",
"0.58709097",
"0.5862911",
"0.5860564",
"0.58591545",
"0.5855781",
"0.5855145",
"0.5855145",
"0.5855145",
"0.584918",
"0.584918",
"0.5847147",
"0.5847147",
"0.5847147"
] | 0.0 | -1 |
OkHttpClient okHttpClient = new OkHttpClient(); | @OnClick(R.id.tv_guankan)
public void guankan() {
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Provides\n @Singleton\n OkHttpClient provideOkHttpClient() {\n OkHttpClient client = new OkHttpClient();\n return client;\n }",
"private static OkHttpClient m35241c() {\n return new OkHttpClient();\n }",
"public OkHttpClient okHttpClient ()\n {\n OkHttpClient okHttpClient = new OkHttpClient().newBuilder()\n .connectTimeout(60, TimeUnit.SECONDS)\n .readTimeout(60, TimeUnit.SECONDS)\n .writeTimeout(60, TimeUnit.SECONDS)\n .build();\n return okHttpClient;\n }",
"public static OkHttpClient getOkHttpClient() {\n return OK_HTTP_CLIENT;\n }",
"@Provides\n @Singleton\n public OkHttpClient providesOkHttpClient() {\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n OkHttpClient.Builder httpClient = new OkHttpClient.Builder();\n httpClient.addInterceptor(interceptor);\n\n return httpClient.build();\n\n }",
"private static OkHttpClient getOkHttpClient() {\n OkHttpClient.Builder okHttpClientBuilder = new OkHttpClient.Builder()\n .addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request original = chain.request();\n\n Request.Builder requestBuilder = original.newBuilder()\n .method(original.method(), original.body());\n\n addAdditionalHttpHeaders(requestBuilder);\n addParleyHttpHeaders(requestBuilder);\n\n Request request = requestBuilder.build();\n return chain.proceed(request);\n }\n })\n .connectTimeout(30, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS);\n\n applySslPinning(okHttpClientBuilder);\n\n return okHttpClientBuilder.build();\n }",
"@PostConstruct\n private void init(){\n\n okHttpClient = new OkHttpClient();\n\n// loadEtoroInstruments();\n\n }",
"@Provides\n @Singleton\n OkHttpClient provideOkHttpClient() {\n final HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor();\n loggingInterceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n\n OkHttpClient.Builder clientBuilder = new OkHttpClient.Builder()\n .addInterceptor(loggingInterceptor);\n\n return clientBuilder.build();\n }",
"private OkHttpClient createClient(){\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n return new OkHttpClient.Builder()\n .addInterceptor(logging)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(30, TimeUnit.SECONDS)\n .build();\n }",
"public TankOkHttpClient() {\n try {\n\n final TrustManager[] trustAllCerts = new TrustManager[] { new X509TrustManager() {\n\n @Override\n public X509Certificate[] getAcceptedIssuers() {\n return null;\n }\n\n @Override\n public void checkServerTrusted(X509Certificate[] chain, String authType) throws CertificateException {}\n\n @Override\n public void checkClientTrusted(X509Certificate[] chain, String authType) throws CertificateException {}\n } };\n\n // Setup SSL to accept all certs\n final SSLContext sslContext = SSLContext.getInstance(\"SSL\");\n sslContext.init(null, trustAllCerts, null);\n sslSocketFactory = sslContext.getSocketFactory();\n\n // Setup Cookie manager\n cookieManager.setCookiePolicy(CookiePolicy.ACCEPT_ALL);\n CookieHandler.setDefault(cookieManager);\n okHttpClient.setCookieHandler(cookieManager);\n\n okHttpClient.setConnectTimeout(30000, TimeUnit.MILLISECONDS);\n okHttpClient.setReadTimeout(30000, TimeUnit.MILLISECONDS); // Socket-timeout\n okHttpClient.setFollowRedirects(true);\n okHttpClient.setFollowSslRedirects(true);\n\n okHttpClient.setSslSocketFactory(sslSocketFactory);\n okHttpClient.setHostnameVerifier(new HostnameVerifier() {\n\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return true;\n }\n });\n\n } catch (Exception e) {\n LOG.error(\"Error setting accept all: \" + e, e);\n }\n }",
"public void initOkGo() throws IOException {\r\n mSPCookieStore = new SPCookieStore(this);\r\n HttpHeaders headers = new HttpHeaders();\r\n if (new SPCookieStore(this).getAllCookie().size() != 0) {\r\n headers.put(\r\n \"Set-Cookie\",\r\n String.valueOf(mSPCookieStore.getCookie(HttpUrl.parse(BaseUrl.HTTP_Get_code_auth))));\r\n }\r\n headers.put(\"version\", \"3.0\");\r\n headers.put(\"uid\", \"6f1a8e0eb24afb7ddc829f96f9f74e9d\");\r\n\r\n OkHttpClient.Builder builder = new OkHttpClient.Builder();\r\n // log相关\r\n HttpLoggingInterceptor loggingInterceptor = new HttpLoggingInterceptor(\"OkHttp\");\r\n loggingInterceptor.setPrintLevel(HttpLoggingInterceptor.Level.BODY); // log打印级别,决定了log显示的详细程度\r\n loggingInterceptor.setColorLevel(Level.INFO); // log颜色级别,决定了log在控制台显示的颜色\r\n builder.addInterceptor(loggingInterceptor); // 添加OkGo默认debug日志\r\n // 超时时间设置\r\n builder.readTimeout(10000, TimeUnit.MILLISECONDS); // 全局的读取超时时间\r\n builder.writeTimeout(10000, TimeUnit.MILLISECONDS); // 全局的写入超时时间\r\n builder.connectTimeout(10000, TimeUnit.MILLISECONDS); // 全局的连接超时时间\r\n builder.cookieJar(new CookieJarImpl(mSPCookieStore)); // 使用sp保持cookie,如果cookie不过期,则一直有效\r\n\r\n HttpsUtils.SSLParams sslParams = HttpsUtils.getSslSocketFactory(getAssets().open(\"server.cer\"));\r\n builder.sslSocketFactory(sslParams.sSLSocketFactory, sslParams.trustManager);\r\n // //配置https的域名匹配规则,使用不当会导致https握手失败\r\n builder.hostnameVerifier(HttpsUtils.UnSafeHostnameVerifier);\r\n\r\n // 其他统一的配置\r\n OkGo.getInstance()\r\n .init(this.getApplication()) // 必须调用初始化\r\n .setOkHttpClient(builder.build()) // 必须设置OkHttpClient\r\n .setCacheMode(CacheMode.NO_CACHE) // 全局统一缓存模式,默认不使用缓存,可以不传\r\n .setCacheTime(CacheEntity.CACHE_NEVER_EXPIRE) // 全局统一缓存时间,默认永不过期,可以不传\r\n .setRetryCount(3) // 全局统一超时重连次数,默认为三次,那么最差的情况会请求4次(一次原始请求,三次重连请求),不需要可以设置为0\r\n .addCommonHeaders(headers); // 全局公共头\r\n }",
"public void okhttpClick(View view) {\n\n\n String url = \"https://gank.io/api/add2gank\";\n RequestBody requestBody = new MultipartRequestBody()\n .addFormDataPart(\"pageNo\", \"1\")\n .addFormDataPart(\"pageSize\", \"50\")\n .addFormDataPart(\"platform\", \"android\");\n final Request request = new Request.Builder()\n .url(url)\n .tag(this)\n .post(requestBody)\n .build();\n\n OkHttpClient okHttpClient = new OkHttpClient();\n\n okHttpClient.newCall(request).enqueue(new Callback() {\n\n @Override\n public void onFailure(Call call, Exception e) {\n e.printStackTrace();\n Log.e(\"dengzi\", \"出错了\");\n }\n\n @Override\n public void onResponse(Call call, Response response) throws IOException {\n String result = response.string();\n Log.e(\"dengzi\", result);\n }\n });\n }",
"@Override\n protected String doInBackground(String... params){\n\n try {\n //1. Create okHttp Client object\n OkHttpClient client = new OkHttpClient();\n\n Endpoint endpoint = new Endpoint();\n\n //2. Define request being sent to the server\n\n Request request = new Request.Builder()\n .url(endpoint.getUrl())\n .header(\"Connection\", \"close\")\n .build();\n\n //3. Transport the request and wait for response to process next\n Response response = client.newCall(request).execute();\n String result = response.body().string();\n setCode(response.code());\n return result;\n }\n catch(Exception e) {\n return null;\n }\n }",
"@Override\n\t public void onCreate() {\n\t super.onCreate();\n\n\t instance = this;\n\t okHttp = new OkHttpClient();\n\t getDefaultSSLSocketFactory();\n\t }",
"private HttpClient() {\n\t}",
"public OkHttpDownloader(OkHttpClient client) {\n this.client = client;\n }",
"@NonNull\n public static OkHttpClient provideOkHttpClient(Application app) {\n File cacheDir = new File(app.getCacheDir(), \"http\");\n Cache cache = new Cache(cacheDir, DISK_CACHE_SIZE);\n\n OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder()\n .cache(cache);\n\n if (BuildConfig.DEBUG) {\n okHttpClient.addInterceptor(provideHttpLoggingInterceptor());\n }\n return okHttpClient.build();\n }",
"private static OkHttpClient getHttpClient(long timeout) {\n\n return new OkHttpClient\n .Builder()\n .connectTimeout(timeout, TimeUnit.SECONDS)\n .writeTimeout(10, TimeUnit.SECONDS)\n .readTimeout(30, TimeUnit.SECONDS)\n .build();\n }",
"public static Retrofit getClient() {\n if (retrofit==null) {\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n // set your desired log level\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n final OkHttpClient okHttpClient = new OkHttpClient.Builder()\n .readTimeout(120, TimeUnit.SECONDS)\n .connectTimeout(120, TimeUnit.SECONDS)\n .addInterceptor(logging)\n .build();\n\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();\n\n retrofit = new Retrofit.Builder()\n .client(client)\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n }\n return retrofit;\n }",
"private static OkHttpClient initializeRetrofitClients() {\n OkHttpClient.Builder okHttpBuilder = new OkHttpClient().newBuilder();\n okHttpBuilder.interceptors().add(new Interceptor() {\n @Override\n public okhttp3.Response intercept(@NonNull Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n // Nothing to add to intercepted request if:\n // a) Authorization value is empty because user is not logged in yet\n // b) There is already a header with updated Authorization value\n if (authorizationTokenIsEmpty() || alreadyHasAuthorizationHeader(originalRequest)) {\n return chain.proceed(originalRequest);\n }\n\n // Add authorization header with updated authorization value to intercepted request\n Request authorisedRequest = originalRequest.newBuilder()\n .header(\"Authorization\", \"Bearer \" + accessToken)\n .build();\n return chain.proceed(authorisedRequest);\n }\n });\n okHttpBuilder.authenticator(new Authenticator() {\n @Nullable\n @Override\n public Request authenticate(@NonNull Route route, @NonNull okhttp3.Response response) throws IOException {\n // Refresh your access_token using a synchronous api request\n ABBYYLingvoAPI abbyyLingvoAPI = getApi();\n\n Call<ResponseBody> myCall = abbyyLingvoAPI.getBasicToken();\n Response<ResponseBody> response1;\n try {\n response1 = myCall.execute();\n if (response1.isSuccessful()) {\n accessToken = response1.body().string();\n Log.d(Constants.LOG_TAG, \"basic response is success, got accessToken\");\n } else {\n Log.e(Constants.LOG_TAG, \"basic response isn't successful, response code is: \" + response1.code());\n }\n } catch (IOException e) {\n Log.e(Constants.LOG_TAG, \"basic response isn't successful cause error: \" + e.toString());\n }\n\n // Add new header to rejected request and retry it\n accessTokenRequest = response.request().newBuilder()\n .addHeader(\"Authorization\", \"Bearer \" + accessToken)\n .build();\n\n return accessTokenRequest;\n }\n });\n\n try {\n // Create a trust manager that does not validate certificate chains\n final TrustManager[] trustAllCerts = new TrustManager[]{\n new X509TrustManager() {\n @Override\n public void checkClientTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {\n }\n\n @Override\n public void checkServerTrusted(java.security.cert.X509Certificate[] chain, String authType) throws CertificateException {\n }\n\n @Override\n public java.security.cert.X509Certificate[] getAcceptedIssuers() {\n return new java.security.cert.X509Certificate[]{};\n }\n }\n };\n\n // Install the all-trusting trust manager\n final SSLContext sslContext = SSLContext.getInstance(\"SSL\");\n sslContext.init(null, trustAllCerts, new java.security.SecureRandom());\n // Create an ssl socket factory with our all-trusting manager\n final SSLSocketFactory sslSocketFactory = sslContext.getSocketFactory();\n\n okHttpBuilder.sslSocketFactory(sslSocketFactory);\n okHttpBuilder.hostnameVerifier(new HostnameVerifier() {\n @Override\n public boolean verify(String hostname, SSLSession session) {\n return true;\n }\n });\n\n return okHttpBuilder.build();\n } catch (Exception e) {\n throw new RuntimeException(e);\n }\n }",
"@Override\n public OkHttpClient customMake() {\n // just for OkHttpClient customize.\n final OkHttpClient.Builder builder = new OkHttpClient.Builder();\n // you can set the connection timeout.\n builder.connectTimeout(15_000, TimeUnit.MILLISECONDS);\n // you can set the HTTP proxy.\n builder.proxy(Proxy.NO_PROXY);\n // etc.\n return builder.build();\n }",
"private void httpSetup() {\n OkHttpClient client = new OkHttpClient.Builder()\n .readTimeout(5, TimeUnit.SECONDS)\n .writeTimeout(5, TimeUnit.SECONDS)\n .build();\n\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .client(client)\n .build();\n\n service = retrofit.create(ValidatorAPI.class);\n }",
"public static void init() {\n client = new OkHttpClient();\n\n //Construct a HTTP builder\n retrofit = new Retrofit.Builder()\n .client(client)\n .baseUrl(apiAddress)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n\n //Form an API to receive a token\n kedronService = retrofit.create(IKedronService.class);\n }",
"private APIClient() {\n }",
"private static HttpClient getNewHttpClient(){\n HttpParams params = new BasicHttpParams();\n return new DefaultHttpClient(params);\n }",
"@Provides\n OkHttpClient.Builder providesOkHttpClientBuilder(){\n return new OkHttpClient.Builder()\n .connectTimeout(10, TimeUnit.SECONDS)\n .writeTimeout(20,TimeUnit.SECONDS)\n .readTimeout(20,TimeUnit.SECONDS);\n //.addInterceptor(new MyInterceptor());\n }",
"private Globals(){\n HttpLoggingInterceptor interceptor = new HttpLoggingInterceptor();\n interceptor.setLevel(HttpLoggingInterceptor.Level.BODY);\n OkHttpClient client = new OkHttpClient.Builder().addInterceptor(interceptor).build();\n //Creem el Retrofit\n Retrofit retrofit = new Retrofit.Builder()\n .baseUrl(API_URL)\n .client(client)\n .addConverterFactory(ScalarsConverterFactory.create())\n .addConverterFactory(JacksonConverterFactory.create())\n .build();\n\n serveiRetrofit = retrofit.create(RetrofitAPI.class);\n }",
"private void initialize(){\n if(uri != null)\n httpUriRequest = getHttpGet(uri);\n httpClient = HttpClients.createDefault();\n }",
"public static void simple() throws IOException {\n OkHttpClient client = new OkHttpClient()\n .newBuilder()\n .connectTimeout(5, TimeUnit.SECONDS)\n .build();\n\n Request request = new Request.Builder()\n .url(\"http://www.ncq8.com/test.php\")\n .header(\"X-TEST\", \"test\")\n .header(\"User-Agent\", \"Chrome\")\n .build();\n\n\n Response response = client.newCall(request).execute();\n\n // 响应代码\n if (!response.isSuccessful()) {\n throw new IOException(\"服务器端错误: \" + response);\n }\n int httpCode = response.code();\n System.out.println(\"Status Code:\" + httpCode);\n\n // 单个响应头\n String server = response.header(\"Server\");\n System.out.println(\"Server:\" + server);\n\n // 响应头数组\n Headers headers = response.headers();\n for (int i = 0; i < headers.size(); i++) {\n System.out.println(headers.name(i) + \":\" +headers.value(i));\n }\n\n // 正文\n ResponseBody body = response.body();\n System.out.println(body.contentType().charset());\n System.out.println(body.contentType().type());\n System.out.println(body.contentLength());\n System.out.println(body.string());\n }",
"private HttpClientInfra() {}",
"private Api() {\n // Implement a method to build your retrofit\n buildRetrofit(BASE_URL);\n }",
"@Override\n public void onClick(View v) {\n sendRequestWithOkHttp();\n// intent = new Intent(MainActivity.this,JsonText.class);\n// startActivity(intent);\n// Toast.makeText(MainActivity.this,\"Success\",Toast.LENGTH_SHORT).show();\n }",
"private RetrofitClient(Context context){\n mRetrofit=new Retrofit.Builder()\n .baseUrl(NetworkUtility.BASEURL)\n .addConverterFactory(GsonConverterFactory.create())\n// .client(createClient(context))\n .build();\n }",
"public APIClient() {\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n // Build base url\n retrofit = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create(gson))\n .addCallAdapterFactory(RxJava3CallAdapterFactory.create())\n .build();\n }",
"public okhttp3.OkHttpClient getHttpClientInstance() {\r\n return configuration.getHttpClientInstance();\r\n }",
"private ParkingLotApi()\r\n {\r\n }",
"@Override\n public void failure(RetrofitError error) {\n\n Toast.makeText(getApplicationContext(),\"PLEASE CHECK INTERNET\",Toast.LENGTH_LONG).show();\n }",
"private void makeSampleHttpRequest(String url) {\r\n\r\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\r\n @Override\r\n public void onResponse(String response) {\r\n texto_a_imprimir = response.toString();\r\n //showToast(texto_a_imprimir);\r\n vistaprevia.setText(texto_a_imprimir);\r\n }\r\n }, new Response.ErrorListener() {\r\n @Override\r\n public void onErrorResponse(VolleyError error) {\r\n // Handle your error types accordingly.For Timeout & No connection error, you can show 'retry' button.\r\n // For AuthFailure, you can re login with user credentials.\r\n // For ClientError, 400 & 401, Errors happening on client side when sending api request.\r\n // In this case you can check how client is forming the api and debug accordingly.\r\n // For ServerError 5xx, you can do retry or handle accordingly.\r\n if( error instanceof NetworkError) {\r\n } else if( error instanceof ClientError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof ServerError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof AuthFailureError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof ParseError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof NoConnectionError) {\r\n texto_a_imprimir = error.toString();\r\n } else if( error instanceof TimeoutError) {\r\n texto_a_imprimir = error.toString();\r\n }\r\n showToast(error.getMessage());\r\n }\r\n });\r\n /*\r\n //Set a retry policy in case of SocketTimeout & ConnectionTimeout Exceptions. Volley does retry for you if you have specified the policy.\r\n jsonObjRequest.setRetryPolicy(new DefaultRetryPolicy(5000, DefaultRetryPolicy.DEFAULT_MAX_RETRIES, DefaultRetryPolicy.DEFAULT_BACKOFF_MULT));\r\n jsonObjRequest.setTag(TAG_REQUEST);\r\n mVolleyQueue.add(jsonObjRequest);\r\n */\r\n stringRequest.setShouldCache(true);\r\n stringRequest.setTag(TAG_REQUEST);\r\n mVolleyQueue.add(stringRequest);\r\n }",
"protected synchronized void createGoogleAPIClient() {\n googleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }",
"public void buildApiClient(){\n if(c==null){\n c = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }",
"public interface HttpClientInterface {\n\n Retrofit getClient();\n}",
"private MockarooPingHelper(){}",
"public static Retrofit getClient() {\n if (retrofit == null){ // Nos aseguramos que no se haya creado un objeto retrofit\n Gson gson = new GsonBuilder()\n .setLenient()\n .create();\n\n retrofit = new Retrofit.Builder() // Inicializamos el objeto Retrofit\n .baseUrl(BASE_URL) // Indicamos a cual sitio se estará conectando\n .addConverterFactory(GsonConverterFactory.create(gson)) // Indicamos cual será nuestro serializador y deserializador de objetos (JSON)\n .build(); // Construimos el objeto\n Log.w(\"Retrofit\",\"Retrofit Start\");\n }\n return retrofit;\n }",
"public static Retrofit getRetrofitInstance(String BASE_URL, final String c_username, final String c_password) {\n HttpLoggingInterceptor logging = new HttpLoggingInterceptor();\n\n\n\n /*OkHttpClient okHttpClient = new OkHttpClient().newBuilder().addInterceptor(new Interceptor() {\n @Override\n public okhttp3.Response intercept(Interceptor.Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n Request.Builder builder = originalRequest.newBuilder().header(\"Authorization\",\n Credentials.basic(c_username, c_password));\n\n Request newRequest = builder.build();\n return chain.proceed(newRequest);\n }\n })\n .addInterceptor(logging)\n .build();*/\n OkHttpClient okHttpClient = getUnsafeOkHttpClient(BASE_URL, c_username, c_password, logging);\n /*OkHttpClient.Builder okHttpClient = new OkHttpClient.Builder();\n okHttpClient.addInterceptor(new Interceptor() {\n @Override\n public okhttp3.Response intercept(Interceptor.Chain chain) throws IOException {\n Request originalRequest = chain.request();\n\n Request.Builder builder = originalRequest.newBuilder().header(\"Authorization\",\n Credentials.basic(c_username, c_password));\n\n Request newRequest = builder.build();\n return chain.proceed(newRequest);\n }\n });\n\n okHttpClient.connectTimeout(1, TimeUnit.MINUTES)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(15, TimeUnit.SECONDS);\n\n if (BuildConfig.DEBUG) {//only LOG REST for DEBUG\n logging.setLevel(HttpLoggingInterceptor.Level.BODY);\n logging.setLevel(HttpLoggingInterceptor.Level.HEADERS);\n okHttpClient.addInterceptor(logging);\n }\n*/\n\n if (retrofit == null) {\n retrofit = new retrofit2.Retrofit.Builder()\n .baseUrl(BASE_URL)\n\n //Add the converter//\n .addConverterFactory(GsonConverterFactory.create())\n .client(okHttpClient)\n //.client(okHttpClient.build())\n\n //Build the Retrofit instance//\n .build();\n }\n return retrofit;\n }",
"@Override\n protected String doInBackground(Void... params) {\n if(myApiService == null) {\n MyApi.Builder builder = new MyApi.Builder(AndroidHttp.newCompatibleTransport(), new AndroidJsonFactory(), null)\n // Local testing url (emulator is 10.0.2.2 or use local machine ip)\n // .setRootUrl(\"http://10.0.2.2:8080/_ah/api/\")\n .setRootUrl(\"https://androidjokes-155120.appspot.com/_ah/api/\");\n\n myApiService = builder.build();\n }\n\n // Grab a joke\n try {\n return myApiService.getJoke().execute().getData();\n } catch (IOException e) {\n return e.getMessage();\n }\n }",
"RestClientBuilder(){\n\n }",
"private URLHelper() {\n\n }",
"private static HttpClient createClient() {\n return HttpClients.createMinimal();\n }",
"public static Object httpClient() {\n return new Object();\n// return HttpClient.newBuilder()\n// .version(HttpClient.Version.HTTP_1_1)\n// .followRedirects(HttpClient.Redirect.NORMAL)\n// .connectTimeout(Duration.ofSeconds(300))\n// .build();\n }",
"public DefaultHttpRequest() {\n }",
"public ApiResponse() {\n }",
"@BeforeClass\n public static void createClient() {\n client = HttpClients.createDefault();\n }",
"public static OkHttpClient.Builder okHttpClientBuilder(OkHttpClient.Builder builder) {\n return builder;\n }",
"private RestClient() {\n }",
"public NetworkManager() {\n okHttpClient = new OkHttpClientProvider().getClient();\n retrofit = new RetrofitInstanceProvider(new RelatedTopicTypeAdapterFactory(), okHttpClient).getRetrofitInstance();\n }",
"@Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(getActivity(), \"Something went wrong!PLEASE CHECK YOUR NETWORK CONNECTION\", Toast.LENGTH_SHORT).show();\n\n\n }",
"GetResponse() {\n\t}",
"public interface ZhiHuApi {\n\n /**\n * A factory of ZhiHuApi, you do not need to create it every time for network.\n */\n class Factory {\n\n private static final Retrofit.Builder builder;\n\n static {\n builder = new Retrofit.Builder()\n .baseUrl(Constants.BASE_HTTP_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .addCallAdapterFactory(RxJavaCallAdapterFactory.create());\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz) {\n return create(clazz, HostType.HTTP);\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz, HostType type) {\n return create(clazz, type, false);\n }\n\n public static <T extends ZhiHuApi> T create(Class<T> clazz, HostType type, boolean retryOnFailue) {\n Retrofit retrofit = builder\n .client(OkHttpClientHelper.getClient(type, retryOnFailue))\n .build();\n return retrofit.create(clazz);\n }\n\n\n }\n}",
"public void loadFromNetworkWithAuth(final String ServiceTag,\n int RequestType,\n final String Url,\n final JSONObject JsonRequest,\n final OnTaskCompleted callback,\n final OnTaskError errorCallback){\n\n JsonObjectRequest jsonObjReq=new JsonObjectRequest(RequestType, Url, JsonRequest,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n Log.e(ServiceTag, response.toString());\n callback.onTaskCompleted(response);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n if (error instanceof TimeoutError || error instanceof NoConnectionError) {\n Toast.makeText(context,\"Error: Timeout\",Toast.LENGTH_LONG).show();\n } else if (error instanceof AuthFailureError) {\n Toast.makeText(context,\"Error: AuthFailure\",Toast.LENGTH_LONG).show();\n } else if (error instanceof ServerError) {\n String responseBody = null;\n try {\n responseBody = new String(error.networkResponse.data, \"utf-8\");\n JSONObject jsonObject = new JSONObject(responseBody);\n Log.e(\"Error-Msg\",jsonObject.getString(\"errorMessage\"));\n Toast.makeText(context, jsonObject.getString(\"errorMessage\"), Toast.LENGTH_LONG).show();\n errorCallback.onTaskError(jsonObject.getString(\"errorMessage\"));\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (JSONException e) {\n e.printStackTrace();\n }\n } else if (error instanceof NetworkError) {\n Toast.makeText(context,\"Error: Network issue\",Toast.LENGTH_LONG).show();\n } else if (error instanceof ParseError) {\n Toast.makeText(context,\"Error: Parse Error\",Toast.LENGTH_LONG).show();\n }\n }\n }){\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n HashMap<String, String> headers = new HashMap<String, String>();\n headers.put(\"Content-Type\", \"application/json\");\n headers.put(\"Authorization\", ConstantVariables.auth_token);\n return headers;\n }\n };\n jsonObjReq.setRetryPolicy(retryPolicy);\n if (checkInternetConnection() == true) {\n try{\n AppController.getInstance().addToRequestQueue(jsonObjReq, ServiceTag);\n }catch (Exception e){\n e.printStackTrace();\n }\n }\n\n }",
"protected synchronized void buildGoogleApiClient() {\n// mGoogleApiClient = new GoogleApiClient.Builder(this).addConnectionCallbacks(this).addOnConnectionFailedListener(this).addApi(LocationServices.API).build();\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n //.addApi(Places.GEO_DATA_API)\n //.addApi(Places.PLACE_DETECTION_API)\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }",
"private KubevirtNetworkingUtil() {\n }",
"private ApiUrlCreator() {\n }",
"public interface OkHttpDownFileCallBackListener {\r\n\r\n public void onError(Call call, Exception e, int errorCode);\r\n public void onResponse(File response, int successCode);\r\n public void inProgress(float progress, long total, int id);\r\n}",
"public static void initService() {\n Retrofit retrofit = new Retrofit.Builder().baseUrl(\"http://166.111.68.66:2042/news/\")\n .addConverterFactory(new Converter.Factory() {\n Gson gson = new Gson();\n\n @Override\n public Converter<ResponseBody, ?> responseBodyConverter(final Type type, final Annotation[] annotations, Retrofit retrofit) {\n return new Converter<ResponseBody, Object>() {\n @Override\n public Object convert(ResponseBody value) throws IOException {\n try {\n return gson.getAdapter(TypeToken.get(type)).fromJson(value.charStream());\n } finally {\n value.close();\n }\n }\n };\n }\n }).build();\n newsdetailHttpService = retrofit.create(GetNewsDetailService.NewsDetailHttpService.class);\n }",
"private JSONObject sendRequestWithOkHttp(int page) {\n JSONObject json = null;\n String url = \"\";\n if (chatroom_id != null) {\n url = String.format(\"http://13.112.156.96/api/asgn3/get_messages?%s&%s\", \"chatroom_id=\" + chatroom_id, \"page=\" + page);\n }\n OkHttpClient client = new OkHttpClient();\n Log.d(GET, url);\n Request request = new Request.Builder()\n .url(url)\n .build();\n try {\n Response response = client.newCall(request).execute();\n String responseData = response.body().string();\n json = new JSONObject(responseData);\n Log.d(GET, String.valueOf(json.get(\"status\")));\n } catch (Exception e) {\n e.printStackTrace();\n Log.d(GET, \"GET Request error\");\n }\n return json;\n }",
"public GoogleApiClient getGoogleApiClient(){\n return googleApiClient;\n }",
"private void initRetrofitClient() {\n if (this.mRetrofit != null) {\n this.mRetrofit = null;\n } else {\n // create new mRetrofit client\n Retrofit.Builder retrofitBuilder = new Retrofit.Builder()\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create());\n\n this.mRetrofit = retrofitBuilder.build();\n this.mPlaceCall = mRetrofit.create(PlaceCall.class);\n }\n }",
"private Connection() {\n\n//==================================================//\n\n\n //==============================//\n\n // client = new AsyncHttpClient(true, 0, 443);\n client = new AsyncHttpClient();\n client.setSSLSocketFactory(MySSLSocketFactory.getFixedSocketFactory());\n contentType = \"application/json\";\n client.setUserAgent(System.getProperty(\"http.agent\"));\n //Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\"\n // client.setUserAgent(\"Mozilla/5.0 (Windows NT 10.0; WOW64; rv:47.0) Gecko/20100101 Firefox/47.0\");\n client.setTimeout(20 * 1000);\n client.setResponseTimeout(20 * 1000);\n client.setConnectTimeout(20 * 1000);\n // client.setEnableRedirects(true);\n\n // Log.e(\"agentss\",System.getProperty(\"https.agent\"));\n gson = new GsonBuilder().serializeNulls().create();\n //client.getHttpClient().getConnectionManager().shutdown();\n/*\n try {\n KeyStore trustStore = KeyStore.getInstance(KeyStore.getDefaultType());\n trustStore.load(null, null);\n MySSLSocketFactory sf = new MySSLSocketFactory(trustStore);\n sf.setHostnameVerifier(MySSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER);\n client.setSSLSocketFactory(sf);\n }\n catch (Exception e) {\n }\n */\n\n }",
"private void buildGoogleApiClient() {\n Log.d(TAG, \"buildGoogleApiClient\");\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }",
"@Override\n public void onFailure(Request request, IOException e) {\n Toast.makeText(MainActivity.this, \"Request Failed\", Toast.LENGTH_SHORT).show();\n }",
"private void initializeGoogleApiClient() {\n\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(getContext())\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n\n }",
"@Test\n public void getUserTest() throws Exception{\n Context appContext = InstrumentationRegistry.getTargetContext();\n String userStr= AssetsUtils.ReadAssetTxtContent(appContext, Constants.ASSET_USER_INFO_PATH);\n\n OkHttpClient client=new OkHttpClient();\n Request request = new Request.Builder().url(Constants.USER_INFO_URL).build();\n String userRequestStr=\"\";\n try(Response response=client.newCall(request).execute()){\n userRequestStr=response.body().string();\n }\n assertEquals(userStr,userRequestStr);\n }",
"public RestClient(){\n }",
"protected synchronized void buildGoogleApiClient() {\n try {\n System.out.println(\"In GOOGLE API CLIENT\");\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API).build();\n mGoogleApiClient.connect();\n createLocationRequest();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private Response makeRequest(String url) throws IOException, IllegalStateException {\n // Make the request\n Request req = new Request.Builder()\n .url(url)\n .addHeader(\"token\", NOAA.KEY)\n .build();\n Response res = client.newCall(req).execute();\n return res;\n }",
"protected synchronized void buildGoogleApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this) //En este caso, necesitamos la api de google para recoger nuestra ubicacion\n .addOnConnectionFailedListener(this) // junto con la api FusedLocationProviderApi.\n .addApi(LocationServices.API)\n .build();\n mGoogleApiClient.connect();\n }",
"@Override\r\n\tpublic void onOk(HttpRequest paramHttpRequest, Object paramObject) {\n\r\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n\n pDialog = new ProgressDialog(this);\n pDialog.setMessage(\"Loading...\");\n pDialog.setCancelable(false);\n\n txtJsonData = (TextView) findViewById(R.id.txtJsonData);\n makeJsonObjReq(url);\n }",
"ResponseHandler createResponseHandler();",
"private Request() {}",
"private Request() {}",
"public static Retrofit apiService(Context context) {\n httpClientBuilder = new OkHttpClient.Builder()\n .connectTimeout(1, TimeUnit.MINUTES)\n .readTimeout(30, TimeUnit.SECONDS)\n .writeTimeout(15, TimeUnit.SECONDS);\n\n if (retrofit == null) {\n retrofit = new Retrofit.Builder()\n .baseUrl(Constants.BASE_URL_API)\n .client(httpClientBuilder.build())\n .addConverterFactory(GsonConverterFactory.create(gson))\n .build();\n }\n return retrofit;\n }",
"public static Retrofit getClient(final Context context) {\n //setup cache\n OkHttpClient okHttpClient = createCachedClient(context);\n retrofit = new Retrofit.Builder()\n .client(okHttpClient)\n .baseUrl(BASE_URL)\n .addConverterFactory(GsonConverterFactory.create())\n .build();\n return retrofit;\n }",
"protected synchronized void buildGoogleApiClient() {\r\n googleApiClient = new GoogleApiClient.Builder(this)\r\n .addConnectionCallbacks(this)\r\n .addOnConnectionFailedListener(this)\r\n .addApi(LocationServices.API)\r\n .build();\r\n }",
"private NetUtils() {\r\n\t}",
"public interface HttpClientFactory {\n CloseableHttpClient newHttpClient();\n}",
"public api() {}",
"protected synchronized void buildGoogleApiClient() {\n //Confirms no instance of GoogleApiClient has been instantiated\n if (mGoogleApiClient == null) {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .addApi(LocationServices.API)\n .build();\n }\n }",
"private void buildApiClient() {\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .addApi(Awareness.API)\n .addConnectionCallbacks(this)\n .build();\n mGoogleApiClient.connect();\n }",
"private void postRequest(RequestBody requestBody, String url) throws JSONException {\n System.out.println(url);\n OkHttpClient okHttpClient = new OkHttpClient();\n Request request = new Request\n .Builder()\n .post(requestBody)\n .url(url)\n .build();\n\n okHttpClient.newCall(request).enqueue(new Callback() {\n @Override\n public void onResponse(@NotNull Call call, @NotNull Response response) throws IOException {\n\n }\n\n @Override\n public void onFailure(final Call call, final IOException e) {\n }\n });\n }",
"public void buildPicasso() {\n OkHttpClient client = new OkHttpClient.Builder()\n .addInterceptor(new Interceptor() {\n @Override\n public Response intercept(Chain chain) throws IOException {\n Request newRequest = chain.request().newBuilder()\n .addHeader(\"Authorization\", \"Token \" + token)\n .build();\n return chain.proceed(newRequest);\n }\n })\n .build();\n Picasso.Builder picassoBuilder = new Picasso.Builder(context)\n .downloader(new OkHttp3Downloader(client));\n picasso = picassoBuilder.build();\n isPicasso = true;\n }",
"private GoogleApiClient getGoogleApiClient() {\n \n \tif (mGoogleApiClient == null) {\n\n //create location service so that we can interact with Geofence\n mGoogleApiClient = new GoogleApiClient.Builder(mContext)\n .addApi(LocationServices.API)\n .addConnectionCallbacks(this)\n .addOnConnectionFailedListener(this)\n .build();\n }\n return mGoogleApiClient;\n\n }",
"@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tthis.setContentView(R.layout.activity_httpclient);\r\n\t\ttv = (TextView) this.findViewById(R.id.tv_httpclient);\r\n\t\thandler = new MyHandler(tv, this);\r\n\t\ttestLocalIpAndMac();\r\n\t\tnew Thread(new Runnable() {\r\n\t\t\t@Override\r\n\t\t\tpublic void run() {\r\n\t\t\t\tString response = HttpHelper.doGet(myWebPageUrl);\r\n\t\t\t\tLog.i(getClass().getSimpleName(), \"response = \" + response);\r\n\t\t\t\tMessage msg = new Message();\r\n\t\t\t\tmsg.what = 0x001;\r\n\t\t\t\tmsg.obj = response;\r\n\t\t\t\thandler.sendMessage(msg);\r\n\t\t\t}\r\n\t\t})\r\n\t\t.start();\r\n\t}",
"@Override\n public void failure(RetrofitError error) {\n Toast.makeText(MainActivity.this, error.toString(), Toast.LENGTH_LONG).show();\n }",
"public TestServerApi()\r\n\t{\r\n\t\t\r\n\t}",
"public OkHttpDownloader(Context context) {\n\n\t\t// Create cache directory\n\t\tmCacheDir = new File(context.getApplicationContext().getCacheDir(), \"picasso-cache\");\n\t\tif (!mCacheDir.exists()) {\n\t\t\tmCacheDir.mkdirs();\n\t\t}\n\n\t\tmUrlFactory = new OkUrlFactory(MizuuApplication.getOkHttpClient());\n\n\t\ttry {\n\t\t\tmUrlFactory.client().setCache(new Cache(mCacheDir, calculateDiskCacheSize(mCacheDir)));\n\t\t} catch (IOException e) {}\n\n\t\t// Set context\n\t\tmContext = context;\n\t}",
"public HttpException() {\n }",
"public static RetrofitClient getInstance() {\n return OUR_INSTANCE;\n }",
"public API() {}",
"ApacheHttpClientBuilder getApacheHttpClientBuilder();",
"private void setupHttpConnectionStuff() {\n if (Build.VERSION.SDK_INT < Build.VERSION_CODES.FROYO) {\n System.setProperty(\"http.keepAlive\", \"false\");\n }\n if (Build.VERSION.SDK_INT > Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n try {\n final File httpCacheDir = new File(getCacheDir(), \"http\");\n HttpResponseCache.install(httpCacheDir, TEN_MEGABYTES);\n } catch (IOException ioe) {\n Log.e(Constants.LOG_TAG, \"Could not install http cache on this device.\");\n }\n }\n }"
] | [
"0.7947016",
"0.76104933",
"0.7402447",
"0.73981607",
"0.6883592",
"0.68664205",
"0.6806287",
"0.67987907",
"0.678789",
"0.6610432",
"0.6503174",
"0.63552916",
"0.635387",
"0.63436717",
"0.63353205",
"0.6283933",
"0.6214909",
"0.617844",
"0.61137116",
"0.6036244",
"0.6024305",
"0.6021836",
"0.6006983",
"0.59674126",
"0.59648985",
"0.5915336",
"0.5880679",
"0.5852413",
"0.5810677",
"0.58067226",
"0.5765024",
"0.5748228",
"0.57234865",
"0.5704967",
"0.56954956",
"0.5664855",
"0.5651512",
"0.5626501",
"0.56177145",
"0.5612815",
"0.56116664",
"0.5601301",
"0.5595365",
"0.5574899",
"0.55652213",
"0.5553134",
"0.55242157",
"0.5511564",
"0.5511118",
"0.55042297",
"0.5496594",
"0.5484617",
"0.54821837",
"0.54665875",
"0.5461431",
"0.545156",
"0.5437012",
"0.5421108",
"0.541827",
"0.5417367",
"0.5400286",
"0.5399795",
"0.53789556",
"0.53725976",
"0.53641856",
"0.5359046",
"0.535499",
"0.53531754",
"0.53404534",
"0.53395677",
"0.5331008",
"0.5327165",
"0.53255624",
"0.53245676",
"0.5318584",
"0.5317673",
"0.5310855",
"0.52998316",
"0.5281028",
"0.52718395",
"0.52718395",
"0.52691126",
"0.5262618",
"0.524645",
"0.52331656",
"0.52322865",
"0.52236706",
"0.52177995",
"0.5217402",
"0.5211691",
"0.52035785",
"0.5199884",
"0.5197523",
"0.5197",
"0.51873237",
"0.51851237",
"0.51847094",
"0.5178556",
"0.51783496",
"0.51776344",
"0.5176415"
] | 0.0 | -1 |
Initialising the mock object | @Before
public void setUp() throws Exception {
MockitoAnnotations.initMocks(this);
track=new Track();
track.setId(9);
track.setName("ekbaar");
track.setComments("nice");
list = new ArrayList<>();
list.add(track);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private Mocks() { }",
"private DataClayMockObject() {\n\n\t}",
"private void setUpMockObjects() {\n this.request = new CustomMockHttpServletRequest();\n byte[] content = { 4, 6, 7 };\n ServletInputStream inputStream = new DelegatingServletInputStream(\n new ByteArrayInputStream(content));\n this.request.inputStream = inputStream;\n\n this.response = new MockHttpServletResponse();\n\n this.setUpXmlRpcElementFactory();\n this.setUpXmlRpcRequestParser();\n this.setUpXmlRpcResponseWriter();\n this.setUpXmlRpcServiceExporterMap();\n }",
"@Before\n public void init() {\n entityKVStateStoreMock = Mockito.mock(KeyValueStore.class);\n processorContextMock = Mockito.mock(ProcessorContext.class);\n when(processorContextMock.getStateStore(\"dummy\")).thenReturn(entityKVStateStoreMock);\n\n // Let's create tested object.\n commandProcessor = new CommandProcessor(\"dummy\");\n commandProcessor.init(processorContextMock);\n }",
"@Before\n\tpublic void init() {\n\t\tbankingTransactionDTO = new BankingTransactionDTO();\n\t\tbankingTransactionDTO.setType(\"deposit\");\n\t\tbankingTransactionDTO.setAmount(100.77d);\n\n\t\t// mock initialization\n\n\t}",
"@Before\n\tpublic void init() {\n\t\tthis.acccountMock = new AccountDTO();\n\t\tthis.acccountMock.setId(ACCOUNT_ID);\n\t\tthis.acccountMock.setActive(true);\n\t\tthis.acccountMock.setBankingTransactions(new ArrayList<>());\n\n\t}",
"@BeforeEach\n\tvoid init() {\n\t\tcalculator = new Calculator();//but create the different object.\n\t\tSystem.out.println(\"init\");\n\t}",
"public void mock(){\n\n }",
"@BeforeEach\n void init() {\n player = Mockito.mock(Player.class);\n level = Mockito.mock(Level.class);\n pointCalculator = Mockito.mock(PointCalculator.class);\n game = new SinglePlayerGame(player, level, pointCalculator);\n }",
"@Stub\n\tpublic void init()\n\t{\n\t\t//\n\t}",
"@Before\n @Override\n public void init() {\n }",
"private MockClientFacade() {\n\t\t//this.c = Client.getInstance();\n\t}",
"@Before\n public void init() {\n DatabaseReference mockReference = mock(DatabaseReference.class);\n Task mockTask = mock(Task.class);\n mockAccount = mock(Account.class);\n when(mockReference.child(isA(String.class))).thenReturn(mockReference);\n when(mockReference.removeValue()).thenReturn(mockTask);\n doNothing().when(mockReference)\n .addListenerForSingleValueEvent(isA(ValueEventListener.class));\n }",
"@Before\n public void setup() {\n MockitoAnnotations.initMocks(this);\n\n historyList = Lists.newArrayList(new History(\"WWW1234\",\n \"Kuantan\",\n Long.valueOf(\"1542022506879\"),\n \"-sdsad\",\n 0.45,\n 1));\n\n historyPresenter = new HistoryPresenter(historyView, remoteDataSource,\n sharedPreferenceService);\n }",
"@Before\n\tpublic void init() {\n\t\tuserDao=new UsersDAO();\n\t\tentityManager=mock(EntityManager.class);\n\t\tuserDao.setEntityManager(entityManager);\n\t\t\n\t}",
"@Before\n public void init() {\n }",
"@BeforeEach\n void init() {\n carte = new Carte();\n planning = new Planning(carte);\n }",
"@Before\n public void init() throws Exception {\n TestObjectGraphSingleton.init();\n TestObjectGraphSingleton.getInstance().inject(this);\n\n mockWebServer.start();\n }",
"@Before\r\n\tpublic void init() {\r\n\t\tMockitoAnnotations.initMocks(this);\r\n\t\tmockMvc = MockMvcBuilders.standaloneSetup(tokenController).build();\r\n\r\n\t\t// mockMvc = MockMvcBuilders.webAppContextSetup(context).build();\r\n\t}",
"@Before\n\tpublic void setUp()\n\t{\n\t\tm_mockery = new Mockery();\n\t\tm_values = m_mockery.mock(KeyedValues.class);\n\t}",
"@Before\n\tpublic void init() {\n\t}",
"@Before\n\tpublic void setup() {\n\t\tMockitoAnnotations.initMocks(this);\n\t\n\t}",
"private void init() {\n\t\tinitProtocol();\n\t\tinitResultStorage();\n\t}",
"public MockPageContext() {\n super();\n MockPageContext.init();\n }",
"@Before\n\tpublic void setup(){\n\t\tMockitoAnnotations.initMocks(this);\n\t}",
"@Before\n\tpublic void setup() {\n\t\tMockitoAnnotations.initMocks(this);\n\t}",
"private void init() {\n }",
"@Before\n public void init() throws MxException {\n InjectorContainer.get().injectMembers( this );\n InjectorContainer.set( iInjector );\n testTaskDefinitionResource.setEJBContext( ejbContext );\n\n setAuthorizedUser( AUTHORIZED );\n setUnauthorizedUser( UNAUTHORIZED );\n\n initializeTest();\n\n Mockito.when( ejbContext.getCallerPrincipal() ).thenReturn( principal );\n Mockito.when( principal.getName() ).thenReturn( AUTHORIZED );\n constructTaskDefinitions();\n }",
"@Before\n\tpublic void setUp() {\n MockitoAnnotations.initMocks(this);\n PowerMockito.mockStatic(HashGeneratorUtil.class);\n\t}",
"public void setUp() {\n System.setProperty(\"dexmaker.dexcache\", getContext().getCacheDir().toString());\n MockitoAnnotations.initMocks(this);\n\n when(mContext.getSystemService(DEVICE_POLICY_SERVICE)).thenReturn(mDevicePolicyManager);\n\n mHelper = new UserProvisioningStateHelper(\n mContext,\n mUtils,\n mSettingsFacade,\n PRIMARY_USER_ID);\n }",
"@Before\n public void init(){\n mockClient = MockWebServiceClient.createClient(applicationContext);\n }",
"@Before\n public void init(){\n mockClient = MockWebServiceClient.createClient(applicationContext);\n }",
"@Before\n public void setUp() {\n MockitoAnnotations.initMocks(this);\n }",
"@Before\r\n\tpublic void initializeDefaultMockObjects()\r\n\t{\r\n\t\tconfigs = new ArrayList<Config>();\r\n\t\tscreenshots = new ArrayList<Screenshot>();\r\n\t\tprocessedImages = new ArrayList<ProcessedImage>();\r\n\t\ttestExecutions = new ArrayList<TestExecution>();\r\n\t\ttestEnvironments = new ArrayList<TestEnvironment>();\r\n\r\n\t\tinitializeDefaultTestExecution();\r\n\t\tinitializeDefaultTestEnvironment();\r\n\t\tinitializeDefaultScreenshot();\r\n\t}",
"@Before\n public void setup(){\n\tMockito.when(mockOroSecret.getOROSecretKey()).thenReturn(\"abc@123\");\n\tutility = TokenUtility.getInstance(mockOroSecret);\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"private void init() {\n }",
"@Before\n public void init(){\n }",
"@Before\n public void setUp() {\n MockitoAnnotations.initMocks(this);\n }",
"public void init() {}",
"public void init() {}",
"private MockClientNetworkModule() {\n\t\t// TODO complete this constructor\n\t}",
"protected void initialize() {\n \t\n }",
"public GetResponseTest() {\n\t\t/*\n\t\t * This constructor should not be modified. Any initialization code\n\t\t * should be placed in the setUp() method instead.\n\t\t */\n\n\t}",
"@Before\r\n\tpublic void setup(){\n\t\t\r\n\t\tMufasaRepository testAccounts = MufasaRepository.getInstance();\r\n\t\ttestAccounts.addMufasa( new Mufasa(\"firstName\", \"lastName\", \"username\", \"password\", 42) );\r\n\t\t\r\n\t\t//Mock create\r\n\t\texampleX= EasyMock.createMock(MufasaRepository.class);//what does this do?\r\n\t\ttestAccounts.tulosta();\r\n\t}",
"@Test\n public void init() {\n }",
"public void init() {\n \n }",
"protected void setUp() {\n // set up for test\n instance = new GeneralizationImpl();\n GeneralizableElement mockChild = EasyMock.createMock(GeneralizableElement.class);\n GeneralizableElement mockParent = EasyMock.createMock(GeneralizableElement.class);\n Classifier mockPowertype = EasyMock.createMock(Classifier.class);\n instance.setChild(mockChild);\n instance.setDiscriminator(TEST_DISCRIMINATORS[0]);\n instance.setParent(mockParent);\n instance.setPowertype(mockPowertype);\n\n }",
"protected void init() {\n }",
"protected void initialize() {}",
"protected void initialize() {}",
"@Before\n public void setUp()\n {\n m_instance = ConversationRepository.getInstance();\n m_fileSystem = FileSystem.getInstance();\n }",
"@Before\n public void setup() {\n MockitoAnnotations.initMocks(this);\n type = new IntegerType();\n }",
"public MockClass(String arg) {\n\t}",
"private void init() {\n\n\t}",
"public SwerveAutoTest() {\n // Initialize base classes.\n // All via self-construction.\n\n // Initialize class members.\n // All via self-construction.\n }",
"@Before\n public void init() {\n this.testMethodName = this.getTestMethodName();\n this.initialize();\n }",
"@Before\n public void setup() {\n //用于初始化@Mock注解修饰的组件\n MockitoAnnotations.initMocks(this);\n\n requestVO = new RoleRequestVO();\n requestVO.setName(\"ROLE_ADMIN\");\n\n role = new Role();\n role.setName(\"ROLE_ADMIN\");\n role.setId(new Random().nextLong());\n }",
"@Before\n\tpublic void setUp() throws Exception {\n\t\tMockitoAnnotations.initMocks(this);\n\t}",
"@Before\n\tpublic void setup() {\n\t\tMockitoAnnotations.initMocks(this);\n\t\ttn = new TreeNode(null);\n\t\tcs = new ColorMap();\n\t\tcsSpy = Mockito.spy(cs);\n\t\tln = new LeafNode(tn, csSpy);\n\t}",
"protected BaseTestObject()\n {\n\n fProp = new Properties(); // empty properties object\n fLog = TestLogger.getInstance(); // default level is DEBUG\n\n }",
"private void init() throws Exception{\n mapper = new ObjectMapper();\n\n // Create the linkRequest\n attribute = AttributeFixture.standardAttribute();\n\n\n }",
"public void init() { }",
"public void init() { }",
"protected void setUp() {\r\n auditDetail = new AuditDetail();\r\n }",
"@Before\n\tpublic void setup(){\n\t\ttarget = new MakeDaoImpl();\n\t\tmockEm = mock(EntityManager.class);\n\t\ttarget.setEm(mockEm);\n\t}",
"@Before\n public void setUp()\n {\n mockDependencies = new DefaultConfigurationParserMockDependencies();\n assertNotNull(\"'mockDependencies' should be non-null at the end of setup\", mockDependencies);\n mockDependencies.replayMocks();\n\n parser = new DefaultConfigurationParser(mockDependencies.getMockWidgetFactory());\n assertNotNull(\"'parser' should be non-null at the end of setup\", parser);\n }",
"@BeforeEach\n void init() {\n log.info(\"init\");\n }",
"@BeforeClass\n public void initMockito() {\n MockitoAnnotations.initMocks(this);\n }",
"public void init(){}",
"public void initialize() {\n // empty for now\n }",
"@Override\r\n\tpublic void init() {}",
"public void init() {\n\t\t}",
"@Before\n\tpublic void setUp() {\n\t\tm=new MoteurRPN();\n\t}",
"public void initialize()\n {\n }",
"@BeforeEach\n\tpublic void setup() throws Exception {\n\t\tGDACoreActivator activator = new GDACoreActivator(); // Make an instance to call method that sets static field!\n\t\tactivator.start(mockContext); // Inject the mock\n\n\t\tosgiServiceBeanHandler = new OsgiServiceBeanHandler();\n\t}",
"public void setUp() {\n instance = new LogMessage(type, id, operator, message, error);\n }",
"protected void setUp()\r\n {\r\n /* Add any necessary initialization code here (e.g., open a socket). */\r\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"public void init() {\n }",
"@Before\n \tpublic void init() throws SimpleDBException {\n assertNotNull(applicationContext);\n handlerAdapter = applicationContext.getBean(\"handlerAdapter\", HandlerAdapter.class);\n this.testClient = this.createTestClient();\n \t\trefreshRequestAndResponse();\n \t}",
"private void initialize() {\n }",
"protected void initialize() {\r\n }",
"protected void initialize() {\r\n }",
"public static void init() {}",
"protected void mockActivate() {\r\n this.bootstrapSettings = BootstrapConfiguration.getInstance();\r\n\r\n initializeProfileDirFromBootstrapSettings();\r\n initializeConfigurablePaths();\r\n loadRootConfiguration(false);\r\n initializeGeneralSettings();\r\n }",
"public void init() {\r\n\r\n\t}",
"public MockAbstractCarte() {\n super();\n }",
"protected void init(){\n }",
"@Before\n public void initialize() throws BeansException, MalformedURLException {\n wsClient = EasyMock.createMock(CaAERSParticipantServiceWSClient.class);\n xsltTransformer = EasyMock.createMock(XSLTTransformer.class);\n caAERSRegistrationServiceInvocationStrategy = new CaAERSRegistrationServiceInvocationStrategy(xsltTransformer,\n wsClient, RETRY_COUNT);\n caAERSUpdateRegistrationServiceInvocationStrategy = new CaAERSUpdateRegistrationServiceInvocationStrategy(\n xsltTransformer, wsClient, RETRY_COUNT);\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }",
"protected void initialize() {\n }"
] | [
"0.7481428",
"0.7283455",
"0.7092017",
"0.6983223",
"0.6944902",
"0.69329685",
"0.6841379",
"0.6841315",
"0.68073267",
"0.6798052",
"0.67582875",
"0.6734192",
"0.6718791",
"0.66902584",
"0.6687767",
"0.6670654",
"0.6641159",
"0.6636305",
"0.66218776",
"0.6609255",
"0.6606168",
"0.6603437",
"0.65665567",
"0.6531994",
"0.65231633",
"0.65128237",
"0.6506394",
"0.650282",
"0.650144",
"0.64961743",
"0.64938146",
"0.64938146",
"0.64884686",
"0.64882964",
"0.6477319",
"0.6462576",
"0.6462576",
"0.6462576",
"0.6462576",
"0.64457387",
"0.6434531",
"0.6421462",
"0.6421462",
"0.64165205",
"0.64118624",
"0.6404298",
"0.6395927",
"0.6395122",
"0.6384158",
"0.63809824",
"0.6379841",
"0.6374766",
"0.6374766",
"0.63715917",
"0.6369154",
"0.63483894",
"0.6348198",
"0.6342105",
"0.63401127",
"0.6340005",
"0.6335044",
"0.63162184",
"0.63103336",
"0.63102496",
"0.6309867",
"0.6309867",
"0.63073313",
"0.63011086",
"0.6300641",
"0.6300092",
"0.62863064",
"0.62860274",
"0.62781644",
"0.6269687",
"0.6262336",
"0.6257744",
"0.6256515",
"0.62552035",
"0.6253446",
"0.6248095",
"0.6247843",
"0.6247843",
"0.6247843",
"0.6247843",
"0.624647",
"0.62461257",
"0.6235095",
"0.6235095",
"0.6234685",
"0.62307876",
"0.62295574",
"0.6225215",
"0.62245136",
"0.62191236",
"0.62189645",
"0.62189645",
"0.62189645",
"0.62189645",
"0.62189645",
"0.62189645",
"0.62189645"
] | 0.0 | -1 |
Purpose: encapsulate access to DS by exposing find search through available values (e.g.: in local cache) | public interface SimpleDao<K, V> {
/**
* @param key for search
* @return value found by key
*/
Optional<V> find(@Nonnull K key);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface Queryable {\n\n /**\n * Query structure by Dewey key. This method returns a pointer to the item located by following\n * the Dewey key given as an argument. The search is relative, i.e., treats the root of this\n * structure as the overall root.\n * @param path\n * the key to search for, represented in [@link DeweyKey} array form\n * @return a pointer accessed through the key, or <code>null</code> if the structure does not\n * contain the argument path\n */\n Pointer query(int[] path);\n\n}",
"public interface LookupManager {\n\n /**\n * Look up a service instance by the service name.\n *\n * It selects one instance from a set of instances for a given service based on round robin strategy.\n *\n * @param serviceName The Service name.\n * @return The ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance lookupInstance(String serviceName);\n\n /**\n * Look up a list of service instances for a given service.\n *\n * It returns the complete list of the service instances.\n *\n * @param serviceName The Service name.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> lookupInstances(String serviceName);\n\n /**\n * Query for a service instance based on the service name and some filtering criteria on the service metadata.\n *\n * It returns a service instance from the service instance list based on round robin selection strategy.\n * The ServiceInstance list is of the specified Service.\n *\n * @param serviceName The Service name.\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance queryInstanceByName(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Query for all the ServiceInstances of the specified Service, which satisfy the query criteria on the service metadata.\n *\n * It returns all ServiceInstances of specified Service that satisfy the ServiceInstanceQuery.\n * The ServiceInstance list is of the specified Service.\n *\n * @param serviceName The Service name.\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> queryInstancesByName(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Query for one the ServiceInstances which satisfy the query criteria on the service metadata.\n *\n * It returns a service instance from the service instance list based on round robin selection strategy.\n * The ServiceInstance list have different Services.\n *\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public ServiceInstance queryInstanceByKey(ServiceInstanceQuery query);\n\n /**\n * Query for all the ServiceInstances which satisfy the query criteria on the service metadata.\n *\n * It returns all ServiceInstances of different Services which satisfy the query criteria.\n *\n * @param query The ServiceInstanceQuery for filtering the service instances.\n * @return The ServiceInstance list.\n * @throws ServiceException\n */\n public List<ServiceInstance> queryInstancesByKey(ServiceInstanceQuery query);\n\n /**\n * Get a ServiceInstance.\n *\n * It returns a ServiceInstances of the Service including the ServiceInstance of OperationalStatus DOWN.\n *\n * @param serviceName\n * the service name.\n * @param instanceId\n * the istanceId\n * @return\n * the ServiceInstance.\n * @throws ServiceException\n */\n public ServiceInstance getInstance(String serviceName, String instanceId);\n\n /**\n * Get all ServiceInstance List of the target Service, including the DOWN ServiceInstance.\n *\n * It will return all ServiceInstances of the Service including the ServiceInstance of OperationalStatus DOWN.\n *\n * @param serviceName\n * the service name.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances(String serviceName);\n\n /**\n * Get all ServiceInstances of the specified Service, including the DOWN ServiceIntance,\n * which satisfy the query criteria on the service metadata.\n *\n * It filter all ServiceInstances of the specified Service including the ServiceInstance of OperationalStatus DOWN,\n * against the ServiceInstanceQuery.\n *\n * @param serviceName\n * the Service name.\n * @param query\n * the ServiceInstanceQuery.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances(String serviceName, ServiceInstanceQuery query);\n\n /**\n * Get all the ServiceInstances, including the DOWN ServiceInstance, which satisfy the query criteria on the service metadata.\n *\n * It filters all ServiceInstances of different Services, including the DOWN ServiceInstance,\n * which satisfy the query criteria.\n *\n * @param query\n * the ServiceInstanceQuery criteria.\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstancesByKey(ServiceInstanceQuery query);\n\n /**\n * Get the all ServiceInstances in the ServiceDirectory including the DOWN ServiceInstance.\n *\n * @return\n * the ServiceInstance List.\n * @throws ServiceException\n */\n public List<ServiceInstance> getAllInstances();\n\n /**\n * Add a NotificationHandler to the Service.\n *\n * This method can check the duplicate NotificationHandler for the serviceName, if the NotificationHandler\n * already exists in the serviceName, do nothing.\n *\n * Throw IllegalArgumentException if serviceName or handler is null.\n *\n * @param serviceName\n * the service name.\n * @param handler\n * the NotificationHandler for the service.\n * @throws ServiceException\n */\n public void addNotificationHandler(String serviceName, NotificationHandler handler);\n\n /**\n * Remove the NotificationHandler from the Service.\n *\n * Throw IllegalArgumentException if serviceName or handler is null.\n *\n * @param serviceName\n * the service name.\n * @param handler\n * the NotificationHandler for the service.\n * @throws ServiceException\n */\n public void removeNotificationHandler(String serviceName, NotificationHandler handler) ;\n}",
"@Override\r\n\tpublic Set<Article> search(String keyworkds) {\n\t\treturn null;\r\n\t}",
"@Override\n public Data3DPlastic search() {\n return super.search();\n }",
"public Data getDataContaining(Address addr);",
"public abstract S getSearch();",
"default E find(String key, Object value) {\n\t\tSearchCritera searchCritera = new SearchCritera(key, value);\n\t\treturn find(() -> searchCritera);\n\t}",
"Iterable<Entry<K, V>> find(LegacyFindByCondition find);",
"public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}",
"@Deprecated\npublic interface LegacyIndexedStore<K, V> extends LegacyKVStore<K, V> {\n\n String ID_FIELD_NAME = \"_id\";\n\n /**\n * Creates a lazy iterable over items that match the provided condition, in\n * the order requested. Exposing the appropriate keys and values. Note that\n * each iterator is independent and goes back to the source data to collect\n * data. As such, if you need to use multiple iterators, it is better to cache\n * the results. Note that this may also be internally paginating so different\n * calls to hasNext/next may have different performance characteristics.\n *\n * Note that two unexpected outcomes can occur with this iterator.\n *\n * (1) It is possible some of the values of this iterator will be null. This\n * can happen if the value is deleted around the time the iterator is created\n * and when the value is retrieved.\n *\n * (2) This iterator could return values that don't match the provided\n * conditions. This should be rare but can occur if the value was changed\n * around the time the iterator is created.\n *\n * @param condition\n * The condition to match.\n * @return A lazy iterable over the matching items.\n */\n Iterable<Entry<K, V>> find(LegacyFindByCondition find);\n\n /**\n * Provide a count of the number of documents that match each of the requested\n * conditions.\n *\n * @param conditions\n * @return\n */\n List<Integer> getCounts(SearchQuery... conditions);\n\n /**\n * Definition of how to find data by condition.\n */\n @Deprecated\n public static class LegacyFindByCondition {\n private SearchQuery condition;\n private int pageSize = 5000;\n private int limit = Integer.MAX_VALUE;\n private int offset = 0;\n private final List<SearchFieldSorting> sort = new ArrayList<>();\n\n public LegacyFindByCondition() {\n }\n\n public LegacyFindByCondition setCondition(String condition, FilterIndexMapping mapping) {\n this.condition = SearchFilterToQueryConverter.toQuery(condition, mapping);\n return this;\n }\n\n public LegacyFindByCondition setCondition(SearchQuery query) {\n this.condition = query;\n return this;\n }\n\n public LegacyFindByCondition setPageSize(int pageSize) {\n this.pageSize = pageSize;\n return this;\n }\n\n public LegacyFindByCondition addSorting(SearchFieldSorting sorting) {\n this.sort.add(sorting);\n return this;\n }\n\n public LegacyFindByCondition addSortings(Collection<SearchFieldSorting> sort) {\n this.sort.addAll(sort);\n return this;\n }\n\n\n public LegacyFindByCondition setLimit(int limit){\n this.limit = limit;\n return this;\n }\n\n public LegacyFindByCondition setOffset(int offset){\n this.offset = offset;\n return this;\n }\n\n public SearchQuery getCondition() {\n return condition;\n }\n\n public int getPageSize() {\n return pageSize;\n }\n\n public List<SearchFieldSorting> getSort() {\n return sort;\n }\n\n public int getOffset() {\n return offset;\n }\n\n public int getLimit(){\n if(limit < pageSize){\n pageSize = limit;\n }\n return limit;\n }\n\n @Override\n public boolean equals(final Object other) {\n if (!(other instanceof LegacyIndexedStore.LegacyFindByCondition)) {\n return false;\n }\n LegacyFindByCondition castOther = (LegacyFindByCondition) other;\n return Objects.equal(condition, castOther.condition) && Objects.equal(pageSize, castOther.pageSize)\n && Objects.equal(limit, castOther.limit) && Objects.equal(offset, castOther.offset)\n && Objects.equal(sort, castOther.sort);\n }\n\n @Override\n public int hashCode() {\n return Objects.hashCode(condition, pageSize, limit, offset, sort);\n }\n\n\n }\n\n}",
"DataStore getDataStore ();",
"public interface ISearchService {\n public static final String cacheName = \"searchService\";\n\n String splitGoodsName(String goodsName);\n\n public List<Goods> sortByPrice(List<Goods> goodsList, boolean flag);\n\n public List<Goods> sortByTime(List<Goods> goodsList, boolean flag);\n\n public List<Goods> sortBySales(List<Goods> goodsList, boolean flag);\n\n List<Goods> getGoodsByWord(String goodsName);\n\n List<Goods> ascByPrice(String goodsName);\n\n List<Goods> ascBySales(String goodsName);\n\n List<Goods> ascByCreateTime(String goodsName);\n\n List<Goods> descByPrice(String goodsName);\n\n List<Goods> descBySales(String goodsName);\n\n List<Goods> descByCreateTime(String goodsName);\n}",
"io.dstore.values.StringValue getSearchValue();",
"private void search(Object value)\r\n\t\t{\n\r\n\t\t}",
"public interface EntityDao<E extends ControlledListEntity> {\n\n GroupingEntityCommon<? extends Hierarchy.GroupedHierarchyEntity> getGroupingEntityCommon();\n\n /**\n * Get an entity of type <E> by its unique identifier\n *\n * @param id The entity identifier\n * @return E\n */\n E getById(long id);\n\n /**\n * Retrieve an entity by its name\n *\n * @param name the name of entity to retrieve\n * @return The entity E or null\n */\n E getByName(String name);\n\n /**\n * Retrieve an entity using the given {@link Key}\n *\n * @param name the key to retrieve the entity\n * @return The entity E or null\n */\n E getByName(Key name);\n\n /**\n * Determine if an entity with the given name exists\n *\n * @param name the method or standard name to check\n * @return true if the name exists, false otherwise\n */\n boolean nameExists(Key name);\n\n /**\n * List all entities of type E. This list invocation includes any aliases as primaries\n *\n * @return List<E>\n */\n List<E> list();\n\n /**\n * List all entities of type <E> which satisfy a predicate\n *\n * @param predicate The predicate\n * @return List<E>\n */\n List<E> list(Predicate<E> predicate);\n\n /**\n * List the entities of type <E> filtered such that the field contains the search term\n *\n * @param field The name of the field used for filtering\n * @param contains The search term\n * @return A filtered list\n */\n List<E> list(String field, String contains);\n\n /**\n * Search for entities which match ANY of the given search terms.\n *\n * The nature of the search is specific to the entity. All entities will search names but specific subclasses may customise the\n * implementation, for example to search aliases, or for parameters to search CAS numbers.\n *\n * @param terms the terms to search for\n * @return a {@link List} of matching entities.\n */\n List<E> search(List<String> terms);\n\n\n /**\n * @return the set of field identifiers that are searchable for the entity <E>\n */\n Set<String> getSearchFields();\n\n /**\n * Retrieves a mashed version of the name from a cache.\n *\n * The name must exist in the cache or null will be returned.\n *\n * @param name the name by which to lookup a mash\n * @return the mashed version of the name if one is found in the cache, null otherwise\n */\n String lookupMashFromName(String name);\n\n /**\n * Retrieves a name from the cache given an exact mashed value\n * The mash must exist in the cache or null will be returned.\n *\n * @param mash a mashed version of a name (space reduced/normalised according to entity specific rules)\n * @return the proper name for the given mash if one is found in the cache, null otherwise\n */\n String lookupNameFromMash(final String mash);\n\n /**\n * A method to convert the reduce variation in name in case and spacing\n * to a standard format which acts as the key. Here so it can be overridden. The default functionality\n * is to convert to upper cases and reduce multiple spaces to a single space to create the lookup key.\n */\n String generateMash(String input);\n\n /**\n * Add a new entity of type <E>\n *\n */\n @Transactional void add(E entity);\n\n /**\n * Remove an entity of type <E>\n *\n * @param id The entity identifier\n * @throws IllegalArgumentException\n */\n @Transactional void removeById(long id) throws IllegalArgumentException;\n\n /**\n * Get the class of the entity being operated on\n */\n Class<E> getEntityClass();\n\n /**\n * Retrieve a DAO for a given DAO class\n * This is intended to allow access to the DAO's from a non-spring managed context\n *\n * @param daoClass the desired dao class\n * @return the spring managed dao for the given class\n */\n static <T extends EntityDao<? extends ControlledListEntity>> T getDao(Class<T> daoClass) {\n return SpringApplicationContextProvider.getApplicationContext().getBean(daoClass);\n }\n}",
"abstract public void search();",
"@Override\n\tpublic void search() {\n\t}",
"@Override\r\n\tpublic void search() {\n\r\n\t}",
"public interface ItemDAO extends DSpaceObjectDAO<Item> {\n\n public Iterator<Item> findAll(Context context, boolean archived) throws SQLException;\n\n public Iterator<Item> findAll(Context context, boolean archived, boolean withdrawn) throws SQLException;\n\n public Iterator<Item> findBySubmitter(Context context, EPerson eperson) throws SQLException;\n\n public Iterator<Item> findByMetadataField(Context context, MetadataField metadataField, String value, boolean inArchive) throws SQLException;\n\n public Iterator<Item> findByAuthorityValue(Context context, MetadataField metadataField, String authority, boolean inArchive) throws SQLException;\n\n public Iterator<Item> findArchivedByCollection(Context context, Collection collection, Integer limit, Integer offset) throws SQLException;\n\n public Iterator<Item> findAllByCollection(Context context, Collection collection) throws SQLException;\n\n}",
"public void otherRead(IDataHolder dc);",
"public abstract ServiceLocator find(String name);",
"@Override\n\tpublic List<F_P002_D005VO> searchAdd() throws DataAccessException {\n\t\treturn null;\n\t}",
"public Data getDefinedDataContaining(Address addr);",
"public interface EsSearchDao {\n\n EsQueryResult search(StoreURL storeURL, EsQuery esQuery);\n\n EsQueryResult searchByIds(StoreURL storeURL, EsQuery esQuery);\n\n EsQueryResult searchByFields(StoreURL storeURL, EsQuery esQuery);\n\n List<EsQueryResult> multiSearch(StoreURL storeURL, List<EsQuery> list);\n\n EsQueryResult searchByDSL(StoreURL storeURL, EsQuery esQuery);\n\n Object executeProxy(StoreURL storeURL, EsProxy esProxy);\n}",
"public abstract boolean getSensitiveSearch();",
"public interface HealthBlockRecordsDataService extends MotechDataService<HealthBlock> {\n\n /**\n * finds the Health Block details by its parent code\n *\n * @param stateCode\n * @param districtCode\n * @param talukaCode\n * @param healthBlockCode\n * @return HealthBlock\n */\n @Lookup\n HealthBlock findHealthBlockByParentCode(@LookupField(name = \"stateCode\") Long stateCode, @LookupField(name = \"districtCode\") Long districtCode,\n @LookupField(name = \"talukaCode\") Long talukaCode, @LookupField(name = \"healthBlockCode\") Long healthBlockCode);\n\n}",
"public interface IScapSyncSearch {\n\n /**\n * Get the Relative Search URL of this search.\n * @return page the Relative Search URL of this search\n */\n public String getSearchUrl();\n\n /**\n * Get the number of rows per page in this search.\n * @return int the number of rows in this search\n */\n public int getRowsPerPage();\n\n /**\n * Get the Starting Row of this search.\n * @return int the number of the Starting Row of this search\n */\n public int getStartRow();\n\n /**\n * Get the Ending Row of this search.\n * @return int the number of the Ending Row of this search\n */\n public int getEndRow();\n \n /**\n * Get the Total Rows of this search.\n * @return int the number of Total Rows of this search\n */\n public int getTotalRows(); \n\n /**\n * Get the number of the Current Page of this search.\n * @return int the Current Page of this search\n */\n public int getCurrentPage(); \n\n /**\n * Get the Sort Fields of this search.\n * @return sortFields[] and array containing the available Sort Fields\n */\n public IScapSyncSearchSortField[] getSortFields();\n \n /**\n * Get the Facets of this search.\n * @return IScapSyncSearchFacet[] an array containing the available Facets\n */\n public IScapSyncSearchFacet[] getFacets();\n \n /**\n * Get the Results of this search.\n * @return IScapSyncSearchResult[] an array containing the available Results\n */\n public IScapSyncSearchResult[] getResults();\n\n /**\n * Get the Pages of this search.\n * @return IScapSyncSearchPage[] an array containing the available Pages\n */\n public IScapSyncSearchPage[] getPages();\n\n}",
"public interface DNSDao {\n public List<DNS> getDNS() throws DataAccessException;\n public DNS getDNS(String dominio) throws DataAccessException;\n public void insertDNS(DNS dns);\n public void setTime(DNS dns);\n public void updateTime(DNS dns);\n public void remove(DNS dns);\n public boolean getRobots(String dominio);\n public List<DNS> getRobots() throws DataAccessException;\n}",
"public interface RiceDataDictionaryServiceInfc {\n\n /**\n * Get the RICE data object for the specified entry key\n * \n * @param entryKey\n * @return null if entry key not found\n */\n public DataObjectEntry getDataObjectEntry(String entryKey);\n}",
"private void searchFunction() {\n\t\t\r\n\t}",
"@In String search();",
"@Override\n\tpublic void find() {\n\n\t}",
"public void testSearchManagerWithInstantiation() {\n loadTestingData();\n\n Query<?> cacheQuery = createQuery(\"blurb:'playing'\", Person.class);\n\n try (CloseableIterator<?> found = cacheQuery.iterator()) {\n assertTrue(found.hasNext());\n found.next();\n assertFalse(found.hasNext());\n }\n }",
"void search( RealLocalizable reference );",
"protected abstract Object doLocalLookup( Name name )\n throws NamingException;",
"public interface AddressFinderService {\n Set<Address> findAddresses(String postcode);\n}",
"public abstract boolean lookup(Key key);",
"public interface SysConfigManager {\n\n /**\n * 根据魔筷的值,查找对应的配置,如店铺id对应的配置\n * @param sysConfigQTO\n */\n SysConfigDTO getSysConfigByValue(SysConfigQTO sysConfigQTO) throws RainbowException;\n\n List<SysConfigDTO> queryConfig(SysConfigQTO sysConfigQTO) throws RainbowException;\n\n List<SysConfigDTO> queryConfigOfAccount(String fieldName, String type) throws RainbowException;\n}",
"public interface DataAccess {\n String USER_PATH = \"user/%s\";\n String CARS_PATH = USER_PATH + \"/cars/%s\";\n String FUELENTRY_PATH = CARS_PATH + \"/fuel_entries/%s\";\n String REPAIRENTRY_PATH = CARS_PATH + \"/repair_entries/%s\";\n String OTHERENTRY_PATH = CARS_PATH + \"/other_entries/%s\";\n String REMINDERENTRY_PATH = USER_PATH + \"/reminders/%s\";\n\n\n void update(String path, Object object);\n void push(String path, Object object);\n void delete(String path);\n\n <T> void getAll(String path, MyList<T> list, Type typeOfT);\n\n String getUid();\n}",
"public interface SearchableList extends ListDataSource {\n Observable<List> queryList(String queryText, boolean barcodeSearch, Map<String, Object> searchParameters, AuthenticationInfo authenticationInfo, Parameters params);\n\n default Observable<ListItem> fetchItem(String id, AuthenticationInfo authenticationInfo, Parameters parameters) {\n throw new RuntimeException(\"This source does not support fetching a single item\");\n }\n}",
"public interface DataSource extends DataSourceBase {\n /***\n * @param authenticationInfo A HashMap of any authentication information that came through in the request headers from the mobile client\n * @param params a HashMap of the URL parameters included in the request.\n * @return The data source response that contains the list of data set items you want to return\n */\n DataSet getDataSet(AuthenticationInfo authenticationInfo, Parameters params);\n\n /***\n *\n * @param id The ID of the item to fetch\n * @param authenticationInfo a HashMap of any authentication information that came through in the request headers from the mobile client\n * @param parameters a HashMap of the URL parameters included in the request\n * @return The data source response that contains the data set item with the requested ID\n */\n\n DataSetItem getRecord(String id, AuthenticationInfo authenticationInfo, Parameters parameters);\n\n\n /**\n * @param queryDataItem The data set item containing the values to be searched on\n * @param authenticationInfo a HashMap of any authentication parameters that came through in the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the list of data set items which meet the search criteria\n */\n default DataSet queryDataSet(DataSetItem queryDataItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Search is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be created\n * @param authenticationInfo a Hashmap of any authentication parameters that came through the request headers\n * @param params a HashMap of the URL parameters included in the request\n * @return The data source response that contains the newly created data set item\n */\n default RecordActionResponse createRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Create is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be updated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the updated item.\n */\n\n default RecordActionResponse updateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Update is not supported on this web service\");\n }\n\n /**\n * @param dataSetItem The data set item to be validated\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request headers\n * @param params a Hashmap of the URL parameters included in the request\n * @return The DataSet that contains a single item that represents the validated item.\n */\n\n default RecordActionResponse validateRecord(DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Validation is not supported on this web service\");\n }\n\n /**\n * @param dataSetItemID the data set item ID that the event is related to\n * @param event the ATEvent object\n * @param authenticationInfo a HashMap of any authentication parameters that came from the request\n * @param params a Parameters object of any URL parameters from the request\n */\n default Response updateEventForDataSetItem(String dataSetItemID, Event event, AuthenticationInfo authenticationInfo, Parameters params) {\n return Response.success();\n }\n\n /**\n * This will update a list of data set items according to the given data set item\n *\n * @param primaryKeys a list of data set item IDs to update\n * @param dataSetItem the data set item values used to update. IMPORTANT: Only the attributes that are getting bulk updated will be included.\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return an DataSourceResponse\n */\n default DataSet bulkUpdateDataSetItems(List<String> primaryKeys, DataSetItem dataSetItem, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Bulk update is not supported by this web service\");\n }\n\n /**\n * @param dataSetItemID the ID of the data set item to delete\n * @param authenticationInfo a HashMap of any authentication parameters sent in the request\n * @param params a Parameters object of any URL parameters from the request\n * @return\n */\n default RecordActionResponse deleteRecord(String dataSetItemID, AuthenticationInfo authenticationInfo, Parameters params) {\n throw new UnsupportedOperationException(\"Delete is not supported on this web service\");\n }\n\n\n\n}",
"public interface QueryCaller<A extends CachedData> {\n List<A> getList(SynchronizedEveAccount acct, long contid, int maxresults, boolean reverse, AttributeSelector at,\n AttributeSelector... others) throws IOException;\n\n long getExpiry(SynchronizedEveAccount acct);\n }",
"public interface DocumentTypeQueryService extends XmlLoader {\n\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME, key=\"'{BO}' + 'documentTypeId=' + #p0\")\n public DocumentType findById(String documentTypeId);\n\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME, key=\"'{BO}' + 'name=' + #p0\")\n public DocumentType findByName(String name);\n\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME,\n key=\"'{BO}' + 'documentTypeId=' + #p0.getId() + '|' + 'name=' + #p0.getName() + '|' + 'label=' + #p0.getLabel() + '|' + 'active=' + #p0.isActive() +'docGroupName=' + #p1 + '|' + 'climbHierarchy=' + #p2\")\n public Collection<DocumentType> find(DocumentType documentType, String docGroupName, boolean climbHierarchy);\n\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME, key=\"'{BO}{root}' + 'documentTypeId=' + #p0.getId()\")\n public DocumentType findRootDocumentType(DocumentType docType);\n \n /**\n * Returns the DocumentType of the Document with the given ID. \n * \n * @since 2.3\n */\n @Cacheable(value= org.kuali.rice.kew.api.doctype.DocumentType.Cache.NAME, key=\"'{BO}' + 'documentId=' + #p0\")\n public DocumentType findByDocumentId(String documentId);\n \n}",
"public static void search() {\n\t\tList<Domain> domains = DomainService.findAll();\n\t\t\n\t\tlogger.info(\"{} domains selected to search\", domains.size());\n\t\t\n\t\tMap<String, Integer> sourceMap = getSourceMap();\n\t\tString currentDomain = \"\";\n\t\t\n\t\tMap<String, SearchResult> resultMap = new HashMap<String, SearchResult>();\n\t\t\n\t\tfor (Domain domain : domains) {\n\t\t\tcurrentDomain = domain.getName();\n\t\t\t\n\t\t\tlogger.info(\"{} domain searching started\", currentDomain);\n\t\t\t\n\t\t\t// The last search time prevents getting the same articles which were already retrieved at the last search\n\t\t\tString lastSearch = MongoService.getLastSearchTime(currentDomain);\t\t\t\n\t\t\tMongoService.setLastSearchTime(currentDomain, DatetimeUtil.getUTCDatetime());\n\t\t\t\n\t\t\tlogger.info(\"{} domain last searched {}\", currentDomain, lastSearch);\n\t\t\t\n\t\t\tList<String> domainKeywords = domain.getKeywords();\n\t\t\tList<Source> sources = domain.getSources();\n\t\t\t\n\t\t\tList<String> sourceNames = new ArrayList<String>();\n\t\t\tfor (Source source : sources) {\n\t\t\t\tsourceNames.add(source.getDomain());\n\t\t\t}\n\t\t\t\n\t\t\tList<Topic> topics = domain.getTopics();\n\t\t\t\n\t\t\t// If the domain contains any topic, get the topic keywords and merge them with the domain keywords. \n\t\t\tif (topics.size() > 0) {\n\t\t\t\tfor (Topic topic : topics) {\n\t\t\t\t\tList<String> topicKeywords = topic.getKeywords();\n\t\t\t\t\t\n\t\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, topicKeywords);\n\t\t\t\t\t\n\t\t\t\t\tfor (String id : ids) {\n\t\t\t\t\t\tif (resultMap.containsKey(id)) {\n\t\t\t\t\t\t\tSearchResult result = resultMap.get(id);\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tSearchResult result;\t\t\t\t\t\t\t\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\t\t\tarticle.attachTopic(topic);\n\t\t\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tList<String> ids = Searcher.search(sourceNames, lastSearch, domainKeywords, null);\n\t\t\t\t\n\t\t\t\tfor (String id : ids) {\n\t\t\t\t\tSearchResult result;\n\t\t\t\t\t\n\t\t\t\t\ttry {\n\t\t\t\t\t\tresult = new SearchResult(id);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tArticle article = result.getArticle();\n\t\t\t\t\tArticleDocument doc = result.getDoc();\n\t\t\t\t\tarticle.attachDomain(domain);\n\t\t\t\t\tarticle.setSourceId(sourceMap.get(doc.getSource()));\n\t\t\t\t\tresultMap.put(id, result);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\tfor (Map.Entry<String, SearchResult> entry : resultMap.entrySet())\n\t\t\t{\n\t\t\t\tlogger.info(\" {} : {}\", entry.getValue().getArticle().getTitle(), entry.getValue().getArticle().getUrl());\n\t\t\t}\n\t\t}\n\t\t\n\t\tinsertArticles(resultMap);\n\t}",
"public List<EntityPropertyLocation> find();",
"public interface SearchService {\n\n /**\n * Parameter that is appended to the generated links that contains the positive search terms and phrases of the\n * search expression. For several terms it occurs several times.\n */\n String PARAMETER_SEARCHTERM = \"search.term\";\n\n /**\n * Represents a result of the search consisting of a target page and one or more matching subresources. For use by\n * the search result renderer.\n */\n interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms with {@link #PARAMETER_SEARCHTERM} */\n @NotNull\n String getTargetUrl();\n\n /** The title of the search result. */\n @NotNull\n String getTitle();\n\n /** The score of the search result. */\n Float getScore();\n\n /**\n * One or more descendants of {@link #getTarget()} that potentially match the search expression. Mostly useful\n * for generating excerpts; can contain false positives in some search algorithms.\n */\n @NotNull\n List<Resource> getMatches();\n\n /** The fulltext search expression for which this result was found. */\n @NotNull\n String getSearchExpression();\n\n /**\n * A basic excerpt from the matches that demonstrates the occurrences of the terms from {@link\n * #getSearchExpression()} in this result. Might be empty if not applicable (e.g. if the search terms were found\n * in meta information). If there are several matches, we just give one excerpt. You might want to provide your\n * own implementation for that to accommodate for specific requirements.\n *\n * @return a text with the occurrences of the words marked with HTML tag em .\n */\n @NotNull\n String getExcerpt() throws SearchTermParseException;\n }\n\n /**\n * Fulltext search for resources. The resources are grouped if they are subresources of one target page, as\n * determined by the parameter targetResourceFilter.\n * <p>\n * Limitations: if the searchExpression consists of several search terms (implicitly combined with AND) this finds\n * only resources where a single property matches the whole search condition, i.e., all those terms. If several\n * resources of a page contain different subsets of those terms, the page is not found.\n *\n * @param context The context we use for the search.\n * @param selectors a selector string to determine the right search strategy, e.g. 'page'\n * @param root Optional parameter for the node below which we search.\n * @param searchExpression Mandatory parameter for the fulltext search expression to search for. For the syntax\n * see\n * {@link QueryConditionDsl.QueryConditionBuilder#contains(String)}\n * . It is advisable to avoid using AND and OR.\n * @param searchFilter an optional filter to drop resources to ignore.\n * @return possibly empty list of results\n * @see com.composum.sling.core.mapping.jcr.ResourceFilterMapping\n */\n @NotNull\n List<Result> search(@NotNull BeanContext context, @NotNull String selectors,\n @NotNull String root, @NotNull String searchExpression, @Nullable ResourceFilter searchFilter,\n int offset, @Nullable Integer limit)\n throws RepositoryException, SearchTermParseException;\n\n\n interface LimitedQuery {\n\n /**\n * Executes the query with the given limit; returns a pair of a boolean that is true when we are sure that all\n * results have been found in spite of the limit, and the results themselves.\n */\n Pair<Boolean, List<Result>> execQuery(int matchLimit);\n }\n\n /**\n * Execute the query with raising limit until the required number of results is met. We don't know in advance how\n * large we have to set the limit in the query to get all neccesary results, since each page can have an a priori\n * unknown number of matches. Thus, the query is executed with an estimated limit, and is reexecuted with tripled\n * limit if the number of results is not sufficient and there are more limits.\n *\n * @return up to limit elements of the result list with the offset first elements skipped.\n */\n @NotNull\n List<Result> executeQueryWithRaisingLimits(LimitedQuery limitedQuery, int offset, Integer limit);\n}",
"protected void createLookupCache() {\n }",
"public interface loadDataService {\n public List<Row> getComboContent( String sType,String comboType, Map<String,String[]> parameterMap , usersInfo loggedUser) throws Exception;\n public Result getGridContent(PagingObject po, String gridType,Map<String,String[]> parameterMap,String searchText , usersInfo loggedUser,String statusID,String from,String where ) throws Exception;\n public List<listInfo> loadStrukturList(String partID,long langID) throws Exception;\n public finalInfo getOrgInfo(long treeID) throws Exception;\n public categoryFinalInfo getCategoryInfo(long treeID) throws Exception;\n public carriersInfo getCariesInfo(long carryID) throws Exception;\n public carriersInfo getOrganizationInfo(long carryID) throws Exception;\n public List<contact> getOrgContacts(long treeID) throws Exception;\n public person getEmployeeInfo( long empId) throws Exception;\n public List<examples> getExamplesInfo(long exmpID,String langID) throws Exception;\n public List<contact> getPersonContact(long perID) throws Exception;\n public List<docList> loadQRphoto(Connection con, long exmplID,long picType) throws Exception;\n public List<docList> loadPhoto(Connection con, long exmplID,long picType) throws Exception;\n public List<docList> getExamplesPictures(Connection cc, long relID, long relType) throws Exception;\n public List<examples> getExamplesOperation(Connection cc, long relID, long langID) throws Exception;\n public int checkUser(String uName) throws Exception;\n public int checkDictRecord(String text, int dictType,String org,String pos) throws Exception ;\n public usersInfo loadUserInfo(String pID) throws Exception;\n public List<person> loadEmpList( int OrgID) throws Exception;\n public List<Row> getSelectContent( String type, Map<String, String[]> parameterMap , usersInfo loggedUser) throws Exception;\n public List<subjElement> getADVSearchMenuList(String partID) throws Exception;\n public String getADVInfo(String paramID,String paramVal,String val,String cond,String typ)throws Exception;\n public List<listInfo> loadComboForAdvancedSearch(String prmID,long parametr) throws Exception;\n public List<docList> loadRightPanelPhoto(long realID, int iType) throws Exception;\n public List<categoryFinalInfo> getCategoryStructure(long catID, int id) throws Exception;\n}",
"public void search() {\r\n \t\r\n }",
"@Override\n\tpublic void queryData() {\n\t\t\n\t}",
"public List<Data> search(Data C) {\n discAccesses = 0;\n return this.root.search(C);\n }",
"public interface DataModelOracleCache {\n\n /**\n * Retrieve the DataModelOracle for the specified Project path. The Path should resolve to a Project.\n * @param project The Path to the Project\n * @return DataModelOracle for the Project\n */\n DataModelOracle getDataModelOracle( Path project );\n\n /**\n * Set the DataModelOracle for the specified Project path. The Path should resolve to a Project.\n * @param project The Path to the Project\n * @param oracle The DataModelOracle for the Project\n */\n void setDataModelOracle( Path project,\n DataModelOracle oracle );\n\n /**\n * Invalidate the entire cache\n */\n void invalidateCache();\n\n /**\n * Invalidate the cache for a specific Project path. The path should resolve to a Project.\n * @param project The Path to the Project\n */\n void invalidateCache( Path project );\n}",
"public List<ServerServices> searchExternalService(int servId, String dataPort, String servicePort);",
"public interface StoreSearchService {\n /**\n * Returns the books for the given search.\n *\n * @param title the title of the book. To ignore this, leave it empty or use \"*\".\n * @param authors the authors of the book. To ignore this, leave it empty or use \"*\".\n * @param isbn the authors of the book. To ignore this, leave it empty or use \"*\".\n * @param publisher the publisher of the book. To ignore this, leave it empty or use \"*\".\n * @return the filtered books.\n */\n public Books getBooks(String title,String authors,String isbn,String publisher);\n}",
"public interface DataLocator<E> {\n\n E getData(int readLocation);\n\n void setData(int writeLocation1, E value);\n\n void writeAll(E[] newData, int length);\n\n int getCapacity();\n}",
"public IJustHaveALook giveConsult();",
"@Override\n public PWsdTaskdataDomain findByKey(PWsdTaskdataDomain pWsdTaskdataDomain) {\n return getPersistanceManager().load(getNamespace() + \".findByKey\", pWsdTaskdataDomain);\n }",
"public IData getStoreddata();",
"@Override\n\tpublic Solution localSearch() {\n\t\treturn this;\n\t}",
"public ResultsContainerI LSD() { Here all settings have been loaded already -- note that we should take a look at what\n\t\t// data the user has 'assigned', and make sure it makes sense\n\t\t//\n\n\t\tString[] lsdArgs = new String[ 2 ];\n\t\t\n\t\ttry {\n\n\t\t\t\n\t\t\tlsdArgs[ 0 ] = TDA.SETTING_TASKCHOICE + \"=\" + TDA.UI_TASK_LSD;\n\t\t\tlsdArgs[ 1 ] = TDA.SETTING_APPLICATIONMODE + \"=\" + TDA.UI_APPLICATIONMODE_API;\n\t\t\t\n\t\t\t\n\t\t\t// TODO to be on the safe side, examine the data that is used for running\n\t\t\t\n\t\t\t\n\t\t\tappTda_.assignData( lsdArgs );\n\t\t\tappTda_.executeTda();\n\t\t\tresultsContainer_ = appTda_.getResults();\n\t\t}\n\t\tcatch ( Exception e ) {\n\t\t\t\n\t\t\tresultsContainer_.addRegisteredResult( \n\t\t\t\t\tTDA.DATA_REGISTEREDRESULT_LSD_ERROR3,\n\t\t\t\t\te, \n\t\t\t\t\t\"[ERROR Tda.LSD()]\" );\n\t\t\t\n\t\t\tif ( TDA.DEBUG ) {\n\n\t\t\t\tSystem.out.println( \"[ERROR Tda.LSD-3] Exception encountered: \" + e.toString() );\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\n\t\treturn resultsContainer_;\t\t\n\t}",
"public interface Search {\n ArrayList<Section> searchSecByTitle(String info);\n\n ArrayList<Section> searchSecByCourse_id(String info);\n}",
"public interface DataWarehouseRepository {\n\tList<DwPerson> searchPeople(String query);\n\n\tList<DwTerm> getTerms();\n\n\tDwPerson getPersonByLoginId(String loginId);\n\n\tDwCourse findCourse(String subjectCode, String courseNumber, String effectiveTermCode);\n\n\tList<DwCourse> searchCourses(String query);\n\n\tList<DwSection> getSectionsByTermCodeAndUniqueKeys(String termCode, List<String> uniqueKeys);\n\n\tList<DwSection> getSectionsBySubjectCodeAndYear(String subjectCode, Long year);\n\n\tList<DwSection> getSectionsBySubjectCodeAndTermCode(String subjectCode, String termCode);\n\n\tList<DwCensus> getCensusBySubjectCodeAndTermCode(String subjectCode, String termCode);\n\n\tList<DwCensus> getCensusBySubjectCodeAndCourseNumber(String subjectCode, String courseNumber);\n}",
"protected Object localLookup( final Name name )\n throws NamingException\n {\n final Object value = doLocalLookup( name );\n\n // Call getObjectInstance for using any object factories\n try\n {\n final Name atom = name.getPrefix( 1 );\n return m_namespace.getObjectInstance( value, atom, this, getRawEnvironment() );\n }\n catch ( final Exception e )\n {\n final NamingException ne = new NamingException( \"getObjectInstance failed\" );\n ne.setRootCause( e );\n throw ne;\n }\n }",
"public interface BACSSettlementDataService extends BaseDataService<BACSSettlement, BACSSettlementDTO> {\r\n\r\n List<BACSSettlementDTO> findByStatus(String status);\r\n\r\n BACSSettlementDTO findBySettlementNumber(Long settlementNumber);\r\n \r\n BACSSettlementDTO findByFinancialServicesReference(Long financialServicesReferenceNumber); \r\n \r\n List<BACSSettlementDTO> findByOrderNumber(Long orderNumber);\r\n \r\n}",
"public interface PortfolioDataAccessService {\n\n /**\n * Find a Portfolio by portfolio id\n *\n * @param id\n * @return\n * @throws DataAccessException\n */\n Portfolio getById(int id) throws DataAccessException;\n}",
"@Override\n\tpublic List<P0001VO> searchAdd() throws DataAccessException {\n\t\treturn null;\n\t}",
"public EODataSource queryDataSource();",
"ArrayList<E> getWhere(String parameterName, String parameterValue, E dummyObject) throws DatabaseNotAccessibleException, DatabaseObjectNotFoundException, NoSuchFieldException;",
"public void search() {\n }",
"public interface fileSearch {\r\n /**\r\n * 根据Condition条件进行数据库的检索\r\n */\r\n List<Thing> search(Condition condition);\r\n}",
"static public tilda.data_test.Testing4View_Data lookupByAll() throws Exception\r\n {\r\n tilda.data_test._Tilda.TILDA__TESTING4VIEW Obj = new tilda.data_test.Testing4View_Data();\r\n Obj.initForLookup(0);\r\n\r\n\r\n return (tilda.data_test.Testing4View_Data) Obj;\r\n }",
"PersistentDataHolder getDataHolder();",
"public CacheEntry searchWithCache(String name) {\n CacheEntry entry = cacheHit(name);\n \n if (entry != null) return entry;\n \n // we grab serial number first; the worst that will happen is we cache a later\n // update with an earlier serial number, which would just flush anyway\n Object token = getCacheToken();\n DynamicMethod method = searchMethodInner(name);\n \n return method != null ? addToCache(name, method, token) : addToCache(name, UndefinedMethod.getInstance(), token);\n }",
"boolean getUseSearchResult();",
"public interface IStorageService {\n List<Storage> findStorageList();\n}",
"public interface MetricValuesByIpAndDateDAO<SK, K> {\n\t \n \t/**\n \t * Find by range.\n \t *\n \t * @param fromSCNmame the from sc nmame\n \t * @param toSCNmame the to sc nmame\n \t * @return the list\n \t */\n \tList<?> findByRange(K fromSCNmame, K toSCNmame);\n\n}",
"public interface IITDIndexDAO {\n\n /**\n * Inserts a list of itdIndices into the persistent storage.\n *\n * @param itdIndices A list of {@link ScripITD} instances.\n *\n * @return The number of successful inserts.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n int insert( final List<ScripITD> itdIndices )\n throws DataAccessException ;\n\n /**\n * Inserts an instance of ScripITD into the persistent storage.\n *\n * @param itdIndices A list of {@link ScripITD} instances.\n *\n * @return The number of successful inserts.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n int insert( final ScripITD itdIndex )\n throws DataAccessException ;\n\n /**\n * Returns a list of the latest Scrip ITD instances for all the symbols\n * for whom the intra day data is available.\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getLatestScripITD() throws DataAccessException ;\n\n /**\n * Returns a list of all the intra day ITD markers for the specified symbol\n * for the specified date.\n *\n * @param symbol The NSE symbol for which the ITD data has to be fetched\n * @param date The date for which the data has to be fetched.\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getScripITD( final String symbol, final Date date )\n throws DataAccessException ;\n\n /**\n * Returns a list of all the intra day ITD markers for the specified symbol\n * and the date range specified.\n *\n * @param symbol The NSE symbol for which the ITD data has to be fetched\n * @param start The start date of the date range\n * @param end The end date of the date range\n *\n * @return A list of {@link ScripITD}. If there are no intra day data for\n * the specified date, an empty list is returned, never null.\n *\n * @throws DataAccessException In case an exception is encountered during\n * the data access operation.\n */\n List<ScripITD> getScripITD( final String symbol, final Date start,\n final Date end )\n throws DataAccessException ;\n\n /**\n * Moves all records in the SCRIP_ITD_DATA table which have a date attribute\n * which is in the past, relative to the boundary date passed as parameter.\n * Please note that this operation does not delete the data from the live\n * table. If you want to delete the live data which has been archived, you\n * need to call on the deleteLiveRecords operation within the same transaction\n * boundary.\n *\n * @param boundary The date which implies that any record with date in the\n * past as compared to the boundary will be archived.\n *\n * @throws DataAccessException If an exception is encountered during the\n * archival process.\n */\n void archiveLiveRecords( final Date boundary )\n throws DataAccessException ;\n\n /**\n * Deletes all records in the SCRIP_ITD_DATA table which have a date attribute\n * which is in the past, relative to the boundary date passed as parameter.\n * Please note that this operation does not copy the data from the live\n * table to the archive table. If you want to copy the live data which is\n * about to be deleted, you need to call on the archiveLiveRecords\n * before this call, within the same transaction boundary.\n *\n * @param boundary The date which implies that any record with date in the\n * past as compared to the boundary will be deleted.\n *\n * @throws DataAccessException If an exception is encountered during the\n * archival process.\n */\n void deleteLiveRecords( final Date boundary )\n throws DataAccessException ;\n}",
"public interface Search {\n public List<Node> find(Node start, Node finish);\n public Node selectNode(List<Node> nodes);\n public List<Node> getPath(Node node);\n public List<Node> getAdjacent(Node node);\n}",
"public interface DataAnalyzeService {\n\n void saveFirstLevelLeakage(FirstLevelLeakage firstLevelLeakage);\n\n /**\n * //根据换热站id拿到换热站名称\n * //然后根据换热站名称去Heatstation表中拿到换热站对应的hid\n * //然后用hid去匹配plot表,拿到plot的名称\n * //根据plot名称去cardnumberAddress表匹配,拿到房卡号\n * @return\n * @param tagid\n */\n List<Cardnumberaddress> findCardNum4RlzTagId(Integer tagid);\n\n void saveSecondLeaveLeakage(SecondLevelLeakage secondLevelLeakage);\n\n /**\n * 查询电厂在定时任务表中指定时间内用量\n * @param beginTime\n * @param endTime\n * @return\n */\n double findDCHeatNumByFirstLevelLeakage(Long beginTime, Long endTime);\n\n /**\n * 查询热力站以及上级为电厂的贸易结算系统在任务表中指定时间内用量\n * @param beginTime\n * @param endTime\n * @return\n */\n double findRLZHeatNumBySecondLevelLeakage(Long beginTime, Long endTime);\n\n /**\n * 查询时间段内一级(电厂)漏损值和对应的时间\n * @param begin\n * @param end\n * @return leakageNumList 漏损值 timeList 漏损值对应的时间\n */\n HashMap<String, ArrayList> findFirstLeakageNumAndTimeByBeginTime2EndTime(Date begin, Date end);\n\n /**\n * 查询时间段内二级(热力站,贸易)漏损值和对应的时间\n * @param begin\n * @param end\n * @return\n */\n HashMap<String, ArrayList> findSecondLeakageNumAndTimeByBeginTime2EndTime(Date begin, Date end);\n\n /**\n * 查询时间段内一级(电厂)用量和对应时间\n * @param begin\n * @param end\n * @return\n */\n HashMap<String, ArrayList> findFirstHeatNumAndTimeByBeginTime2EndTime(Date begin, Date end);\n\n /**\n * 查询时间段内二级(热力站,贸易)用量,功率,温差和对应时间\n * @param begin\n * @param end\n * @return\n */\n HashMap<String, ArrayList> findSecondHeatNumAndTimeByBeginTime2EndTime(Date begin, Date end);\n\n void saveSecondLeaveLeakageSum(SecondLevelLeakageSum secondLevelLeakageSum);\n}",
"Object find(String name);",
"public V search(K key);",
"public interface DataView {\n\n /**\n * The name of the data store.\n * \n * @return\n */\n String getName();\n\n /**\n * Returns the value mapped to the given key.\n * \n * @param key\n * @return\n */\n <T> T getValue(DataKey<T> key);\n\n Object getValueRaw(String id);\n\n Collection<DataKey<?>> getDataKeysWithValues();\n\n Collection<String> getKeysWithValues();\n\n default Object getValueRaw(DataKey<?> key) {\n return getValueRaw(key.getName());\n }\n\n /**\n * \n * @param key\n * @return true if the store contains a value for the given key\n */\n <T> boolean hasValue(DataKey<T> key);\n\n /**\n * \n * @return the objects mapped to the key ids\n */\n // Map<String, Object> getValuesMap();\n\n public static DataView newInstance(DataStore dataStore) {\n return new DefaultCleanSetup(dataStore);\n }\n\n public static DataView empty() {\n return new DataView() {\n\n @Override\n public <T> T getValue(DataKey<T> key) {\n return null;\n }\n\n @Override\n public String getName() {\n return \"<empty>\";\n }\n\n // @Override\n // public Map<String, Object> getValuesMap() {\n // return Collections.emptyMap();\n // }\n\n @Override\n public <T> boolean hasValue(DataKey<T> key) {\n return false;\n }\n\n @Override\n public Object getValueRaw(String id) {\n return null;\n }\n\n @Override\n public Collection<DataKey<?>> getDataKeysWithValues() {\n return Collections.emptyList();\n }\n\n @Override\n public Collection<String> getKeysWithValues() {\n return Collections.emptyList();\n }\n };\n }\n\n default DataStore toDataStore() {\n return DataStore.newInstance(this);\n }\n}",
"public interface DataAPI {\n\t// Query\n\tDataTree getDataHierarchy(); // Tree List of Data and Datatypes\n\t\n\tDataTree getDatatypeHierarchy(); // Tree List of Datatypes\n\n\tDataTree getMetricsHierarchy(); // Tree List of Metrics and Metric\n\t\t\t\t\t\t\t\t\t\t\t// types\n\n\tArrayList<String> getAllDatatypeIds();\n\n\tMetadataProperty getMetadataProperty(String propid);\n\n\tArrayList<MetadataProperty> getMetadataProperties(String dtypeid, boolean direct);\n\n\tArrayList<MetadataProperty> getAllMetadataProperties();\n\n\tDataItem getDatatypeForData(String dataid);\n\n\tArrayList<DataItem> getDataForDatatype(String dtypeid, boolean direct);\n\n\tString getTypeNameFormat(String dtypeid);\n\n\tString getDataLocation(String dataid);\n\n\tArrayList<MetadataValue> getMetadataValues(String dataid, ArrayList<String> propids);\n\n\t// Write\n\tboolean addDatatype(String dtypeid, String parentid);\n\n\tboolean removeDatatype(String dtypeid);\n\n\tboolean renameDatatype(String newtypeid, String oldtypeid);\n\n\tboolean moveDatatypeParent(String dtypeid, String fromtypeid, String totypeid);\n\n\tboolean addData(String dataid, String dtypeid);\n\n\tboolean renameData(String newdataid, String olddataid);\n\n\tboolean removeData(String dataid);\n\n\tboolean setDataLocation(String dataid, String locuri);\n\n\tboolean setTypeNameFormat(String dtypeid, String format);\n\n\tboolean addObjectPropertyValue(String dataid, String propid, String valid);\n\n\tboolean addDatatypePropertyValue(String dataid, String propid, Object val);\n\n\tboolean addDatatypePropertyValue(String dataid, String propid, String val, String xsdtype);\n\n\tboolean removePropertyValue(String dataid, String propid, Object val);\n\n\tboolean removeAllPropertyValues(String dataid, ArrayList<String> propids);\n\n\tboolean addMetadataProperty(String propid, String domain, String range);\n\t\n\tboolean addMetadataPropertyDomain(String propid, String domain);\n\n\tboolean removeMetadataProperty(String propid);\n\t\n\tboolean removeMetadataPropertyDomain(String propid, String domain);\n\n\tboolean renameMetadataProperty(String oldid, String newid);\n\n\t// Sync/Save\n\tboolean save();\n\t\n\tvoid end();\n\t\n\tvoid delete();\n}",
"List<Card> search(String searchString) throws PersistenceCoreException;",
"public interface SerService {\n\n List<SService> findwithPageInfo(Integer pageNo, Integer pageSize);\n\n PageInfo<SService> getPageInfo(Integer pageSize);\n\n SService findById(Integer id);\n\n void modi(SService sService);\n\n void add(SService sService, String samePasswd);\n\n void setStateS(Integer id);\n\n void delS(Integer id);\n\n\n List<SService> findS(String osUsername, String unixHost, String status, Integer accountId);\n\n void updateCost(SService sService);\n}",
"ArrayList<E> getWhere(String parameterName, int parameterValue, E dummyObject) throws DatabaseNotAccessibleException, DatabaseObjectNotFoundException, NoSuchFieldException;",
"public interface FactRepository {\n\n List<Fact> find(String topic);\n}",
"public java.util.List<DataEntry> findAll();",
"public interface DaoInfoFinder {\n\n /**\n * 查询dao信息\n * @param roundEnvironment\n * @param daoProxyMap\n * @param elements\n */\n void findDaoProxy(RoundEnvironment roundEnvironment, Map<String, DaoInfo> daoProxyMap, Elements elements);\n}",
"private LookupUtil(){}",
"public interface Indexed {\n\n /**\n * index keyword and resource\n * @param resourceId keyword KAD id\n * @param entry published entry with keyword information\n * @param lastActivityTime current time from external system\n * @return percent of taken place in storage\n */\n int addKeyword(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n\n /**\n *\n * @param resourceId file KAD id\n * @param entry published entry with source information\n * @return true if source was indexed\n */\n int addSource(final KadId resourceId, final KadSearchEntry entry, long lastActivityTime);\n}",
"Map<GroupKey, List<Result>> get(String userName,\n List<AbstractFilter> filters,\n DiscoveryAttributes.AttributeType groupAttributeType,\n Group.GroupSortingAlgorithm groupSortingType,\n ResultsSorter.SortingMethod domainSortingMethod,\n SleuthkitCase caseDb, CentralRepository centralRepoDb) throws DiscoveryException {\n try {\n final SearchKey searchKey = new SearchKey(userName, filters, groupAttributeType,\n groupSortingType, domainSortingMethod, caseDb, centralRepoDb);\n return cache.get(searchKey);\n } catch (ExecutionException ex) {\n throw new DiscoveryException(\"Error fetching results from cache\", ex.getCause());\n }\n }",
"protected abstract void retrievedata();",
"public interface SearchStudentService {\n List<Student> searchStudentByName(String name);\n}",
"Data<User> getUserSearch(String user);",
"protected abstract IJustHaveALook make_giveConsult();",
"@Override\n public List<DVD> getSearchDVDs(String search)\n throws DVDLibraryPersistenceException {\n loadLibrary();\n ArrayList<DVD> allDVDs = new ArrayList<>(dvds.values());\n ArrayList<DVD> results = new ArrayList<>();\n allDVDs.stream().filter((d) -> (d.getTitle() != null && d.getTitle().toLowerCase().contains(search.toLowerCase()))).forEachOrdered((d) -> {\n results.add(d);\n });\n return results;\n }",
"void search();",
"void search();",
"public interface AnomalySearchService extends RemoteService {\r\n /**\r\n * Returns a list of available disease, or tumor, types\r\n *\r\n * @return list of disease types\r\n * @throws SearchServiceException\r\n */\r\n List<Disease> getDiseases() throws SearchServiceException;\r\n\r\n /**\r\n * Returns a list of ColumnType objects. These is used to build the anomaly filter UI.\r\n * The same objects are then sent through processFilter to execute the filter.\r\n *\r\n * @param disease Disease abbreviation\r\n * @return the list of ColumnType objects for this disease\r\n * @throws SearchServiceException\r\n */\r\n List<ColumnType> getColumnTypes(String disease) throws SearchServiceException;\r\n\r\n /**\r\n * Executes an anomaly filter. Returns the first page of anomaly results.\r\n *\r\n * @param filter Filter specifier\r\n * @return page of results\r\n * @throws SearchServiceException\r\n */\r\n Results processFilter(FilterSpecifier filter) throws SearchServiceException;\r\n\r\n /**\r\n * Fetches any page of anomaly results.\r\n *\r\n * @param page Page number to fetch. One-based\r\n * @return page of results\r\n * @throws SearchServiceException\r\n */\r\n Results getResultsPage(FilterSpecifier.ListBy listBy, int page) throws SearchServiceException;\r\n\r\n /**\r\n * Changes number of rows per page. Returns the first page again, with the new count.\r\n *\r\n * @param listBy\r\n * @param rowsPerPage\r\n * @return\r\n * @throws SearchServiceException\r\n */\r\n Results setRowsPerPage(FilterSpecifier.ListBy listBy, int rowsPerPage) throws SearchServiceException;\r\n\r\n /**\r\n * Sorts results by any column; returns the first page.\r\n *\r\n * @param sortspec the specifier\r\n * @return first resultspage\r\n * @throws SearchServiceException\r\n */\r\n Results sortResults(FilterSpecifier.ListBy listBy, SortSpecifier sortspec) throws SearchServiceException;\r\n\r\n /**\r\n * Returns information about a pathway, including a link to pathway graphic.\r\n *\r\n * @param sps\r\n * @return\r\n * @throws SearchServiceException\r\n */\r\n SinglePathwayResults getSinglePathway(SinglePathwaySpecifier sps) throws SearchServiceException;\r\n\r\n Results getPivotPage(FilterSpecifier.ListBy sourceListby, String rowName, FilterSpecifier filter) throws SearchServiceException;\r\n\r\n /**\r\n * Returns URL to the user guide.\r\n *\r\n * @return\r\n * @throws SearchServiceException\r\n */\r\n String getUserGuideLocation() throws SearchServiceException;\r\n\r\n /**\r\n * Returns URL to the HTML version of the user guide.\r\n *\r\n * @return\r\n */\r\n String getOnlineHelpLocation();\r\n\r\n /**\r\n * Returns tooltip text to be displayed in popups in the data browser.\r\n *\r\n * @return\r\n * @throws SearchServiceException\r\n */\r\n TooltipTextMap getTooltipText() throws SearchServiceException;\r\n\r\n /**\r\n * Client regularly sends keepalive message to server, so server will keep session open.\r\n * Allows servlet to dump session within a few minutes after user navigates away.\r\n */\r\n void keepAlive();\r\n\r\n /**\r\n * Method used by export functionality in main results tables. Since the result set is held by the server,\r\n * it's not necessary to serialize and send the results through the interface.\r\n *\r\n * @return the export file name\r\n * @throws SearchServiceException if needed\r\n */\r\n String exportResultsData(FilterSpecifier.ListBy listBy, String filename) throws SearchServiceException;\r\n\r\n /**\r\n * Method used by export functionality in pivot tables. Since the result set is held by the client,\r\n * it IS necessary to serialize and send the results through the interface.\r\n *\r\n * @return the export file name\r\n * @throws SearchServiceException if needed\r\n */\r\n String exportPivotResultsData(FilterSpecifier.ListBy listBy, String filename, Results results) throws SearchServiceException;\r\n\r\n\r\n /**\r\n * Serializable exception class which is thrown for any error that occurs on the server\r\n * which needs to be reported to the client.\r\n */\r\n public class SearchServiceException extends Exception implements IsSerializable {\r\n public SearchServiceException() {\r\n }\r\n\r\n public SearchServiceException(String message) {\r\n super(message);\r\n }\r\n\r\n public SearchServiceException(Throwable t) {\r\n super(t);\r\n }\r\n }\r\n\r\n}",
"private void find(StorageSupportParameter searchParam) throws Exception\n\t{\t\n\n\t\tWorkingInformationSearchKey searchkey = new WorkingInformationSearchKey();\n\t\tWorkingInformationSearchKey consignorkey = new WorkingInformationSearchKey();\n\t\t//#CM570191\n\t\t// Set Work flag\n\t\tsearchkey.setJobType(SystemDefine.JOB_TYPE_STORAGE);\n\t\tconsignorkey.setJobType(SystemDefine.JOB_TYPE_STORAGE);\n\t\t//#CM570192\n\t\t// Set the Consignor code. Mandatory Item. \n\t\tsearchkey.setConsignorCode(searchParam.getConsignorCode());\n\t\tconsignorkey.setConsignorCode(searchParam.getConsignorCode());\n\t\t\n\t\tif(!StringUtil.isBlank(searchParam.getFromStoragePlanDate())){\n\t\t\t//#CM570193\n\t\t\t// Start Storage plan date\n\t\t\tsearchkey.setPlanDate(searchParam.getFromStoragePlanDate(),\">=\");\n\t\t\tconsignorkey.setPlanDate(searchParam.getFromStoragePlanDate(),\">=\");\n\t\t}\t\t\n\t\t\n\t\tif(!StringUtil.isBlank(searchParam.getToStoragePlanDate())){\n\t\t\t//#CM570194\n\t\t\t// End Storage plan date\n\t\t\tsearchkey.setPlanDate(searchParam.getToStoragePlanDate(),\"<=\");\n\t\t\tconsignorkey.setPlanDate(searchParam.getToStoragePlanDate(),\"<=\");\n\t\t}\n\t\t\n\t\tif(!StringUtil.isBlank(searchParam.getItemCode())){\n\t\t\t//#CM570195\n\t\t\t// Item Code\n\t\t\tsearchkey.setItemCode(searchParam.getItemCode());\n\t\t\tconsignorkey.setItemCode(searchParam.getItemCode());\n\t\t}\n\t\t\n\t\t//#CM570196\n\t\t//Check Case , Piece Flag\n\t\tif(!StringUtil.isBlank(searchParam.getCasePieceflg()))\n\t\t{\t\t\t\n\t\t\t\n\t\t\tif(SystemDefine.CASEPIECE_FLAG_CASE.equals(searchParam.getCasePieceflg()))\n\t\t\t{\t\t\t\n\t\t\t\tsearchkey.setWorkFormFlag(SystemDefine.CASEPIECE_FLAG_CASE);\n\t\t\t\tconsignorkey.setWorkFormFlag(SystemDefine.CASEPIECE_FLAG_CASE);\n\t\t\t}else if(SystemDefine.CASEPIECE_FLAG_PIECE.equals(searchParam.getCasePieceflg()))\n\t\t\t{\t\t\t\n\t\t\t\tsearchkey.setWorkFormFlag(SystemDefine.CASEPIECE_FLAG_PIECE);\n\t\t\t\tconsignorkey.setWorkFormFlag(SystemDefine.CASEPIECE_FLAG_PIECE);\n\t\t\t}else if(SystemDefine.CASEPIECE_FLAG_NOTHING.equals(searchParam.getCasePieceflg()))\n\t\t\t{\t\t\t\n\t\t\t\tsearchkey.setWorkFormFlag(SystemDefine.CASEPIECE_FLAG_NOTHING);\n\t\t\t\tconsignorkey.setWorkFormFlag(SystemDefine.CASEPIECE_FLAG_NOTHING);\n\t\t\t}\n\t\t}\n\t\t\n\t\t//#CM570197\n\t\t// Work Status\n\t\tif(!StringUtil.isBlank(searchParam.getStatusFlagL()))\n\t\t{ \n\t\t\tif(searchParam.getStatusFlagL().equals(StorageSupportParameter.STATUS_FLAG_ALL))\n\t\t\t{\n\t\t\t\tsearchkey.setStatusFlag(WorkingInformation.STATUS_FLAG_DELETE,\"!=\");\n\t\t\t\tconsignorkey.setStatusFlag(WorkingInformation.STATUS_FLAG_DELETE,\"!=\");\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tsearchkey.setStatusFlag(searchParam.getStatusFlagL());\n\t\t\t\tconsignorkey.setStatusFlag(searchParam.getStatusFlagL());\n\t\t\t}\n\t\t}\n\t\t//#CM570198\n\t\t// Retrieves excluding ASRS Work. \n\t\tsearchkey.setSystemDiscKey(SystemDefine.SYSTEM_DISC_KEY_ASRS, \"!=\");\n\t\tconsignorkey.setSystemDiscKey(SystemDefine.SYSTEM_DISC_KEY_ASRS, \"!=\");\n\t\t\n\t\t//#CM570199\n\t\t// Set the order of acquisition. \t\t\n\t\tsearchkey.setConsignorCodeCollect(\"\");\n\t\tsearchkey.setConsignorNameCollect(\"\");\n\t\tsearchkey.setPlanDateCollect(\"\");\n\t\tsearchkey.setItemCodeCollect(\"\");\n\t\tsearchkey.setItemName1Collect(\"\");\n\t\tsearchkey.setWorkFormFlagCollect(\"\");\n\t\tsearchkey.setResultLocationNoCollect(\"\");\n\t\tsearchkey.setLocationNoCollect(\"\");\n\t\tsearchkey.setEnteringQtyCollect(\"\");\n\t\tsearchkey.setBundleEnteringQtyCollect(\"\");\n\t\tsearchkey.setHostPlanQtyCollect(\"\");\n\t\tsearchkey.setResultUseByDateCollect(\"\");\n\t\tsearchkey.setUseByDateCollect(\"\");\n\t\tsearchkey.setPlanEnableQtyCollect(\"\");\n\t\tsearchkey.setItfCollect(\"\");\n\t\tsearchkey.setBundleItfCollect(\"\");\n\t\t\n\t\t//#CM570200\n\t\t// Set the order of sorting. \n\t\tif (!StringUtil.isBlank(searchParam.getStatusFlagL()))\n\t\t{\n\t\t\tsearchkey.setPlanDateOrder(1,true);\n\t\t\tsearchkey.setItemCodeOrder(2,true);\n\t\t\tsearchkey.setWorkFormFlagOrder(3,true);\n\t\t\tsearchkey.setLocationNoOrder(4,true);\n\t\t\t\t\n\t\t\tif (WmsParam.IS_USE_BY_DATE_UNIQUEKEY)\n\t\t\t{\n\t\t\t\tsearchkey.setUseByDateOrder(5,true);\n\t\t\t}\t\n\t\t}\n\t\t\n\t\twFinder = new WorkingInformationFinder(wConn);\n\t\t//#CM570201\n\t\t// Cursor open\n\t\twFinder.open();\n\t\tint count = ((WorkingInformationFinder)wFinder).search(searchkey);\n\t\t//#CM570202\n\t\t// Initialization\n\t\twLength = count;\n\t\twCurrent = 0;\n\t\t\n\t\t//#CM570203\n\t\t// Acquire Consignor Name. \n\t\tconsignorkey.setConsignorNameCollect(\"\");\n\t\tconsignorkey.setRegistDateOrder(1, false);\n\n\t\tWorkingInformationFinder consignorFinder = new WorkingInformationFinder(wConn);\n\t\tconsignorFinder.open();\n\t\tint nameCountCsg = consignorFinder.search(consignorkey);\n\t\tif (nameCountCsg > 0 && nameCountCsg <= DatabaseFinder.MAXDISP)\n\t\t{\n\t\t\tWorkingInformation view[] = (WorkingInformation[]) consignorFinder.getEntities(0, 1);\n\n\t\t\tif (view != null && view.length != 0)\n\t\t\t{\n\t\t\t\twConsignorName = view[0].getConsignorName();\n\t\t\t}\n\t\t}\n\t\tconsignorFinder.close();\n\t}"
] | [
"0.5966431",
"0.59279376",
"0.5860728",
"0.5831969",
"0.57592845",
"0.57356757",
"0.56343186",
"0.556098",
"0.5533949",
"0.55084586",
"0.5503565",
"0.5503248",
"0.5498342",
"0.54917574",
"0.5456003",
"0.5422096",
"0.54041666",
"0.5383199",
"0.5382429",
"0.53789026",
"0.53211945",
"0.5315989",
"0.53140825",
"0.52991074",
"0.5293083",
"0.5291076",
"0.5275295",
"0.5262279",
"0.5251394",
"0.5234034",
"0.52281266",
"0.5219993",
"0.52089137",
"0.52069354",
"0.5196783",
"0.5191913",
"0.51848656",
"0.518177",
"0.51797396",
"0.5172434",
"0.51691145",
"0.51644903",
"0.5164376",
"0.51628894",
"0.51567173",
"0.51554525",
"0.515209",
"0.51448214",
"0.51336884",
"0.5126539",
"0.5121851",
"0.5119293",
"0.51177394",
"0.5108497",
"0.5103978",
"0.5103664",
"0.5102884",
"0.51008785",
"0.5093927",
"0.5086405",
"0.5085639",
"0.5084389",
"0.5074573",
"0.50742835",
"0.5072534",
"0.5072207",
"0.5069665",
"0.5069585",
"0.5067399",
"0.50670624",
"0.5063295",
"0.5059036",
"0.50587136",
"0.5056973",
"0.505625",
"0.50539845",
"0.5051854",
"0.5050914",
"0.50508964",
"0.504986",
"0.5038597",
"0.5037196",
"0.50346017",
"0.5030947",
"0.5027355",
"0.50191057",
"0.5017016",
"0.5012188",
"0.500496",
"0.4999882",
"0.49975854",
"0.49910685",
"0.4989525",
"0.49873546",
"0.49853915",
"0.49841002",
"0.49832147",
"0.49812675",
"0.49812675",
"0.49787816",
"0.49784476"
] | 0.0 | -1 |
TODO if 401 , delete all app data | public static void clearApplicationData(Context context) {
File cache = context.getCacheDir();
File appDir = new File(cache.getParent());
if (appDir.exists()) {
String[] children = appDir.list();
for (String s : children) {
if (!s.equals("lib")) {
deleteDir(new File(appDir, s));
}
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void clearAllAuthInfo();",
"Result deleteApp(String app);",
"public void deleteAllRequests() {\n try {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, null, null);\n db.execSQL(\"DROP TABLE IF EXISTS \" + TABLE_NAME);\n db.close();\n } catch (SQLException e) {\n e.printStackTrace();\n }\n }",
"@Test\n public void clearAppPermissionsTest() throws ApiException {\n String appId = null;\n Boolean naked = null;\n // api.clearAppPermissions(appId, naked);\n\n // TODO: test validations\n }",
"public static void clearAppList() {\n }",
"public void eraseData() {\n LOG.warn(\"!! ERASING ALL DATA !!\");\n\n List<User> users = userRepo.getAll();\n List<Habit> habits = habitsRepo.getAll();\n List<Goal> goals = goalRepo.getAll();\n List<RecoverLink> recoverLinks = recoverLinkRepo.getAll();\n List<RegistrationLink> registrationLinks = registrationLinkRepo.getAll();\n List<FriendRequest> friendRequests = friendRequestRepo.getAll();\n\n try {\n LOG.warn(\"Erasing friend requests\");\n for (FriendRequest friendRequest : friendRequests) {\n friendRequestRepo.delete(friendRequest.getId());\n }\n LOG.warn(\"Erasing habits\");\n for (Habit habit : habits) {\n habitsRepo.delete(habit.getId());\n }\n LOG.warn(\"Erasing recovery links\");\n for (RecoverLink recoverLink : recoverLinks) {\n recoverLinkRepo.delete(recoverLink.getId());\n }\n LOG.warn(\"Erasing registration links\");\n for (RegistrationLink registrationLink : registrationLinks) {\n registrationLinkRepo.delete(registrationLink.getId());\n }\n LOG.warn(\"Removing all friendships :(\");\n for (User user : users) {\n List<User> friends = new ArrayList<>(user.getFriends());\n LOG.warn(\"Erasing friends for user with id={}\", user.getId());\n for (User friend : friends) {\n try {\n LOG.warn(\"Erasing friendship between {} and {}\", user.getId(), friend.getId());\n userRepo.removeFriends(user.getId(), friend.getId());\n } catch (Exception e) {\n LOG.error(e.getMessage());\n }\n }\n }\n LOG.warn(\"Erasing user and their user goals\");\n for (User user : users) {\n List<UserGoal> userGoals = new ArrayList<>(user.getUserGoals());\n LOG.warn(\"Erasing user goals for user with id={}\", user.getId());\n for (UserGoal userGoal : userGoals) {\n userRepo.removeUserGoal(user.getId(), userGoal.getId());\n }\n userRepo.delete(user.getId());\n }\n LOG.warn(\"Erasing goals\");\n for (Goal goal : goals) {\n goalRepo.delete(goal.getId());\n }\n LOG.warn(\"!! DATA ERASED SUCCESSFULLY !!\");\n } catch (RepoException e) {\n LOG.error(e.getMessage());\n e.printStackTrace();\n }\n }",
"private void deleteAPIFromDB(API api) throws APIManagementException {\n\n APIIdentifier apiIdentifier = api.getId();\n int tenantId = APIUtil.getTenantId(APIUtil.replaceEmailDomainBack(apiIdentifier.getProviderName()));\n String tenantDomain = APIUtil.getTenantDomainFromTenantId(tenantId);\n // Get local scopes for the given API which are not already assigned for different versions of the same API\n Set<String> localScopeKeysToDelete = apiMgtDAO.getUnversionedLocalScopeKeysForAPI(api.getUuid(), tenantId);\n // Get the URI Templates for the given API to detach the resources scopes from\n Set<URITemplate> uriTemplates = apiMgtDAO.getURITemplatesOfAPI(api.getUuid());\n // Detach all the resource scopes from the API resources in KM\n Map<String, KeyManagerDto> tenantKeyManagers = KeyManagerHolder.getTenantKeyManagers(tenantDomain);\n for (Map.Entry<String, KeyManagerDto> keyManagerDtoEntry : tenantKeyManagers.entrySet()) {\n KeyManager keyManager = keyManagerDtoEntry.getValue().getKeyManager();\n if (keyManager != null) {\n try {\n keyManager.detachResourceScopes(api, uriTemplates);\n if (log.isDebugEnabled()) {\n log.debug(\"Resource scopes are successfully detached for the API : \" + apiIdentifier\n + \" from Key Manager :\" + keyManagerDtoEntry.getKey() + \".\");\n }\n // remove the local scopes from the KM\n for (String localScope : localScopeKeysToDelete) {\n keyManager.deleteScope(localScope);\n }\n if (log.isDebugEnabled()) {\n log.debug(\"Local scopes are successfully deleted for the API : \" + apiIdentifier\n + \" from Key Manager : \" + keyManagerDtoEntry.getKey() + \".\");\n }\n } catch (APIManagementException e) {\n log.error(\"Error while Detach and Delete Scope from Key Manager \" + keyManagerDtoEntry.getKey(), e);\n }\n }\n }\n deleteScopes(localScopeKeysToDelete, tenantId);\n apiMgtDAO.deleteAPI(api.getUuid());\n if (log.isDebugEnabled()) {\n log.debug(\"API : \" + apiIdentifier + \" is successfully deleted from the database and Key Manager.\");\n }\n }",
"private void clearCache() {\n List<User> users = null;\n try {\n Log.d(TAG, \"Clearing app cache\");\n users = sampleApp.getUsers();\n\n if (users == null) {\n /* We have no users */\n\n Log.d(TAG, \"Faield to Sign out/clear cache, no user\");\n } else if (users.size() == 1) {\n /* We have 1 user */\n\n /* Remove from token cache */\n sampleApp.remove(users.get(0));\n\n Log.d(TAG, \"Signed out/cleared cache\");\n\n }\n else {\n /* We have multiple users */\n\n for (int i = 0; i < users.size(); i++) {\n sampleApp.remove(users.get(i));\n }\n\n Log.d(TAG, \"Signed out/cleared cache for multiple users\");\n }\n\n Toast.makeText(getBaseContext(), \"Signed Out!\", Toast.LENGTH_SHORT)\n .show();\n\n } catch (MsalClientException e) {\n /* No token in cache, proceed with normal unauthenticated app experience */\n Log.d(TAG, \"MSAL Exception Generated while getting users: \" + e.toString());\n\n } catch (IndexOutOfBoundsException e) {\n Log.d(TAG, \"User at this position does not exist: \" + e.toString());\n }\n }",
"@Test\n public void deleteAppPermissionTest() throws ApiException {\n String appId = null;\n String username = null;\n Boolean naked = null;\n // api.deleteAppPermission(appId, username, naked);\n\n // TODO: test validations\n }",
"private void clearData() {\n em.createQuery(\"delete from ViajeroEntity\").executeUpdate();\n }",
"public void unregisterApplication(String internalAppId){\n\t\tString webServiceUrl = serviceProfile.getServiceApiUrl()+\"/\"+internalAppId;\n\t\tlogger.info(\"unregistering application \"+ webServiceUrl);\n\t\t\n\t\tResponseEntity<Void> response = restTemplate.exchange(webServiceUrl, HttpMethod.DELETE,\n null, Void.class);\n\t\tVoid body = response.getBody();\n\t}",
"public void delete(App obj) {\n getClient().delete(\n String.format(Routes.APP_DELETE, obj.getId())\n );\n obj.setId(null);\n }",
"public void deleteAllMappings() {\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tdb.delete(TABLE_APP, null, null);\n\t\t\n\t\tsynchronized(mappingLock) {\n\t\t\tinvalidateCache();\n\t\t}\n\n\t}",
"@Test\n public void testDeleteAllUserData() {\n storage().deleteAllUserData();\n createSomeUserData();\n Assertions.assertEquals(8, countStorageEntities());\n // ^ TODO Change to 9 after https://github.com/Apicurio/apicurio-registry/issues/1721\n // Delete all\n storage().deleteAllUserData();\n Assertions.assertEquals(0, countStorageEntities());\n }",
"public void clearAllNotClientCacheKeyOrDatabaseKey() {\n\t}",
"protected void getApps(){\n DBPermissions db =new DBPermissions();\n this.apps=db.getApps();\n db.close();\n }",
"public static void clearAllSavedUserData() {\n cacheUser = null;\n cacheAccessToken = null;\n getSharedPreferences().edit().clear().commit();\n }",
"@RequestMapping(value = \"/rest/application/{id}\", method = RequestMethod.DELETE,\n produces = \"application/json\")\n @Timed\n public void delete(@PathVariable String id, HttpServletResponse response) {\n log.debug(\"REST request to delete application : {}\", id);\n try {\n Application application = applicationRepository.findOne(id);\n if (application == null) {\n response.setStatus(HttpServletResponse.SC_NOT_FOUND);\n } else {\n deployer.delete(application);\n applicationRepository.delete(id);\n }\n } catch (CloudezzDeployException e) {\n log.error(\"Failed during delete app cfg\", e);\n response.setStatus(HttpServletResponse.SC_INTERNAL_SERVER_ERROR);\n }\n\n }",
"public void deleteUserData(){\n buttonResetDb.setOnClickListener(\n new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n app_db.truncateAllFactTables();\n Toast.makeText(MainActivity.this, \"DB Cleansed\", Toast.LENGTH_LONG).show();\n resetMainActivity();\n }\n }\n );\n }",
"public void removeAllData() {\n dbHelper.removeAllData(db);\n }",
"public void deleteData()\n {\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_NAME, null, null);\n //context.deleteDatabase(DATABASE_NAME);\n\n }",
"public void deleteApp(String packageName) throws SQLException {\n\t\tString dburl = prop.getProperty(\"dburl\");\n\t\tString dbuser = prop.getProperty(\"dbuser\");\n\t\tString dbpw = prop.getProperty(\"dbpw\");\n\t\tmethods_snw.deleteAppFromServer(dburl, dbuser, dbpw, packageName);\n\t}",
"public void cleanAppForHiddenSpace() {\n this.mService.mHwAMSEx.cleanAppForHiddenSpace();\n }",
"public void deleteDevices(){\n SQLiteDatabase db = getWritableDatabase();\n db.execSQL(\"delete from \"+devicesContract.deviceEntry.tableName);\n db.close();\n }",
"public void deleteAppUser(Long id) {\n\t\tappUserRepository.delete(id);\n\t\t\n\t}",
"void removeAllData() throws DatabaseNotAccessibleException;",
"public void resetAppData() {\n this.materials = new ArrayList<String>();\n this.shoplistGroc = new ArrayList<String>();\n this.shopListMat = new ArrayList<String>();\n this.pantry = new ArrayList<String>();\n this.unassignedChores = new ArrayList<Chore>();\n this.finishedChores = new ArrayList<Chore>();\n this.regUsers= new ArrayList<User>();\n this.adminUsers= new ArrayList<AdminUser>();\n this.currentUserId = 0;\n this.serialNumber = 1;\n }",
"private ArrayList<String> doDelete(){\n \t\tUserBean user = (UserBean) Util.loadDataFromLocate(this.getContext(), \"user\");\n \t\tString mobile = user.getPhone();\n \t\tString password = user.getPassword();\n \n \t\tjson = \"\";\n //\t\tString apiName = \"ad_delete\";\n \t\tArrayList<String> list = new ArrayList<String>();\n \t\tlist.add(\"mobile=\" + mobile);\n \t\tString password1 = Communication.getMD5(password);\n \t\tpassword1 += Communication.apiSecret;\n \t\tString userToken = Communication.getMD5(password1);\n \t\tlist.add(\"userToken=\" + userToken);\n \t\tlist.add(\"adId=\" + detail.getValueByKey(GoodsDetail.EDATAKEYS.EDATAKEYS_ID));\n \t\tlist.add(\"rt=1\");\n \t\t\n \t\treturn list;\t\t\n \t}",
"private static void deleteDB(String dbName) {\n\t\tString url = SERVER_URI_ADMIN_API + \"/\" + dbName + \"/\";\n\t\tSystem.out.println(\"url: \" + url);\n\n\t\tRestTemplate restTemplate = new RestTemplate();\n\n\t\ttry {\n\t\t\trestTemplate.delete(url);\n\t\t} catch (RestClientException e1) {\n\t\t\tSystem.out.println(\"Db was not deleted in sync gateway\");\n\t\t\t// e1.printStackTrace();\n\t\t}\n\n\t\tString urlcouchdb = \"http://@localhost:8091/pools/default/buckets/\"\n\t\t\t\t+ dbName;\n\t\t// flus database should be enabled\n\t\t/*\n\t\t * String urlServerCouch =\n\t\t * \"http://localhost:8091/pools/default/buckets/grocery-sync/controller/doFlush\"\n\t\t * ;\n\t\t * //\"http://admin:a1a2a3@localhost:8091/pools/default/buckets/\"+dbName+\n\t\t * \"/controller/doFlush\"; try{ restTemplate.delete(urlServerCouch);\n\t\t * }catch(RestClientException e){ e.printStackTrace(); }\n\t\t */\n\t\t// RestTemplate restTemplate = new RestTemplate();\n\t\tResponseEntity<String> response;\n\n\t\tHttpHeaders httpHeaders = createHeaders(\"user\", \"pass\");\n\n\t\tresponse = restTemplate.exchange(urlcouchdb, HttpMethod.DELETE,\n\t\t\t\tnew HttpEntity<Object>(httpHeaders), String.class);\n\n\t}",
"@Override\n\tpublic int delApp(int eid) {\n\t\treturn appdao.delapp(eid);\n\t}",
"protected void ClearData() {\n\t\t// TODO Auto-generated method stub\n\t\n\t\t sharedPreferences = this.getSharedPreferences(MyPREFERENCES, Context.MODE_PRIVATE);\n\t\t Editor editor = sharedPreferences.edit();\n\t\t if(sharedPreferences.contains(\"username\")||sharedPreferences.contains(\"password\")){\n\t\t\t editor.remove(\"username\");\n\t\t\t editor.remove(\"password\");\n\t\t }\n\t\t editor.clear();\n\t\t editor.commit();\n\t}",
"public void deleteApp(Appointment app, Date dat)\n {\n List z = cal.get(dat);\n boolean flag = true;\n int i = 0;\n while(flag){\n if(z.get(i)==app){\n z.remove(app);\n flag = false;\n }\n i++;\n }\n \n }",
"public void deleteUsers() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_USER, null, null);\n // db.close();\n Log.d(TAG, \"Deleted all user info from sqlite\");\n }",
"@Override\r\n\tpublic void deleteAllAccounts() {\n\t\t\r\n\t}",
"public void deleteAllData() {\n SQLiteDatabase db = getWritableDatabase();\n db.beginTransaction();\n try {\n db.delete(TABLE_HISTORY, null, null);\n db.delete(TABLE_LASTSCAN, null, null);\n db.delete(TABLE_SENSOR, null, null);\n db.delete(TABLE_SCANS, null, null);\n\n db.setTransactionSuccessful();\n } catch (Exception e) {\n\n } finally {\n db.endTransaction();\n }\n }",
"public void deleteDB(){\n \t\tSQLiteDatabase db = this.getWritableDatabase();\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS user\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS poll\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS time\");\n \t\tdb.execSQL(\"DROP TABLE IF EXISTS status\");\n \t\tonCreate(db);\n \t}",
"private void deleteAllPets() {\n// int rowsDeleted = getContentResolver().delete(ArtistsContracts.GenderEntry.CONTENT_URI, null, null);\n// Log.v(\"CatalogActivity\", rowsDeleted + \" rows deleted from pet database\");\n }",
"@AfterClass(alwaysRun = true)\n public void webAppDelete() throws Exception {\n\n webAppAdminClient.deleteWebAppFile(\"HelloWorldWebapp.war\", hostName);\n assertTrue(WebAppDeploymentUtil.isWebApplicationUnDeployed(\n backendURL, sessionCookie,\n \"HelloWorldWebapp.war\"), \"HelloWorldWebapp unDeployment failed\");\n }",
"private void handleClearDB() {\n try {\n ContentResolver contentResolver = this.mContext.getContentResolver();\n contentResolver.delete(KeyguardNotification.URI, null, null);\n contentResolver.notifyChange(KeyguardNotification.URI, null);\n } catch (Exception e) {\n Log.e(\"KeyguardNotifHelper\", \"handleClearDB\", e);\n }\n }",
"private static void clearDB()\n {\n if(getStatus().equals(\"no database\"))\n return;\n\n clearTable(\"myRooms\");\n clearTable(\"myReservations\");\n }",
"void delData();",
"private void deleteAllBooks() {\n int booksDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", booksDeleted + getString(R.string.all_deleted));\n }",
"public com.google.common.util.concurrent.ListenableFuture<com.google.protobuf.Empty> deleteApplication(\n org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);",
"public void removeAll(){\n SQLiteDatabase db = this.getWritableDatabase();\n db.delete(TABLE_GAS_SENSOR, null, null);\n // db.delete(DatabaseHelper.TAB_USERS_GROUP, null, null);\n }",
"public void resetTables(){\r\n try {\r\n SQLiteDatabase db = this.getWritableDatabase();\r\n // Delete All Rows\r\n db.delete(User.TABLE_USER_NAME, null, null);\r\n db.close();\r\n }catch(SQLiteDatabaseLockedException e){\r\n e.printStackTrace();\r\n }\r\n }",
"public void clearAllResponseData() {\n myExpData.clear();\n }",
"private void clearData() {\r\n em.createQuery(\"delete from MonitoriaEntity\").executeUpdate();\r\n }",
"public void deleteAllFromDB() {\r\n for (int i = 0; i < uploads.size(); i++) {\r\n FileUtil.deleteFile(uploads.get(i).getFilepath());\r\n }\r\n super.getBasebo().remove(uploads);\r\n }",
"public void clearAllAppMapCaches(){\n\t\tappmaps.clear();\n\t}",
"public void clearLoginInfo(){\n ProfileSharedPreferencesRepository.getInstance(application).clearLoginInfo();\n }",
"public void deleteAllToken() throws BusinessException;",
"void unsetCompanyBaseData();",
"@Override\n public void deleteAllPrivies() {\n }",
"public void clearAppointments(){\n appointments.clear();\n }",
"void cleanUpExpiredSessions() {\n try (TarantoolClient client = clientSource.getClient()) {\n client.select(getSpace(client), SPACE_EXPIRY_INDEX, Integer.MAX_VALUE, 0, Iter.LE);\n client.setLong(System.currentTimeMillis());\n Result result = client.execute();\n Set<UUID> ids = new HashSet<>();\n while (result.next()) {\n ids.add(new UUID(result.getLong(2), result.getLong(3)));\n }\n ids.forEach(id -> deleteById(id, client));\n if (logger.isDebugEnabled()) {\n logger.debug(\"Cleaned up \" + ids.size() + \" expired sessions\");\n }\n }\n }",
"private void cleanDatabase() {\n\t\tContentResolver cr = mContext.getContentResolver();\n\n\t\tCursor c = cr.query(\n\t\t\t\tConstantPasser.Favorites.CONTENT_URI_NO_NOTIFICATION,\n\t\t\t\tnew String[] { ConstantPasser.Favorites.APPWIDGET_ID }, null,\n\t\t\t\tnull, null);\n\t\ttry {\n\t\t\tAppWidgetHost widgetHost = ((XLauncher) mContext).getAppWidgetHost();\n\t\t\tint index = c.getColumnIndex(ConstantPasser.Favorites.APPWIDGET_ID);\n\t\t\twhile (c.moveToNext()) {\n\t\t\t\tint widgetId = c.getInt(index);\n\t\t\t\tif (Debug.MAIN_DEBUG_SWITCH){\n\t\t\t\t\tR2.echo(\"Invalid widget id : \" + widgetId);\n\t\t\t\t}\n\t\t\t\twidgetHost.deleteAppWidgetId(widgetId);\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t} finally {\n\t\t\tif (c != null){\n\t\t\t\tc.close();\n\t\t\t}\n\t\t}\n\n\t\t// clean and do not notify\n\n\t\tif (enableState.enableFolder || enableState.enableQuickEntries\n\t\t\t\t|| enableState.enableWidgets){\n\t\t\tcr.delete(ConstantPasser.Favorites.CONTENT_URI_NO_NOTIFICATION,\n\t\t\t\t\tnull, null);\n\t\t}\n\n\t\tif (enableState.enablePriorities){\n\t\t\tcr.delete(ConstantPasser.Applications.CONTENT_URI, null, null);\n\t\t}\n\n\t\t/* RK_ID: RK_THEME .AUT: zhanggx1 . DATE: 2012-03-31 . S */\n\t\tSettings.System.putString(cr, SettingsValue.KEY_SET_THEME, null);\n\t\t/* RK_ID: RK_THEME .AUT: zhanggx1 . DATE: 2012-03-31 . E */\n\t}",
"public static void tearDown() {\n reset();\n clear();\n APIConfig.getInstance().setAppId(null, null);\n APIConfig.getInstance().setDeviceId(null);\n APIConfig.getInstance().setToken(null);\n APIConfig.getInstance().setUserId(null);\n Leanplum.setApplicationContext(null);\n }",
"@Headers({\"Content-Type: application/json\", \"Cache-Control: no-cache\"})\n @DELETE(\"/userpreference/delete\")\n Call<Void> deleteAllUserPreference();",
"private void deleteOldData() {\n Date today = SunshineDateUtils.getNormalizedUtcDateForToday();\n weatherDao.deleteOldWeather(today);\n }",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void deleteAll() {\n\t\t\r\n\t}",
"@Override\n\tpublic void deleteAllUsers() {\n\t\t\n\t}",
"public void clean() {\n\t\tserver.clearPersistentData();\n\t\t_offlineMessages.clear();\n\t\t_onlineClients.clear();\n\t\t_clientFriends.clear();\n\t}",
"void remove(String installedAppId);",
"private void clearDeleteFriendAToServer() {\n if (reqCase_ == 14) {\n reqCase_ = 0;\n req_ = null;\n }\n }",
"public synchronized void purgeApplication(String appName) {\n File appDir = new File(appsDir, appName);\n if (!FilePathValidator.validateFile(appDir, appsDir)) {\n throw new ApplicationException(\"Application attempting to create files outside the apps directory\");\n }\n try {\n Tools.removeDirectory(appDir);\n } catch (IOException e) {\n throw new ApplicationException(\"Unable to purge application \" + appName, e);\n }\n if (appDir.exists()) {\n throw new ApplicationException(\"Unable to purge application \" + appName);\n }\n }",
"public com.google.protobuf.Empty deleteApplication(org.thethingsnetwork.management.proto.HandlerOuterClass.ApplicationIdentifier request);",
"public void deletedb()\n {\n this.appContext.deleteDatabase(DB_NAME);\n Log.d(\"testdeletedb\",\"done\");\n }",
"public void wipeDB() {\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tdb.delete(EventDataSQLHelper.TABLE, null, null);\n\t\tdb.close();\n }",
"@AfterClass (alwaysRun = true)\r\n\tpublic void cleanApp() throws Exception{\r\n\r\n\t\ttry {\r\n\t\t\tUtility.destroyTestVault();\r\n\t\t\tUtility.destroyTestVault(\"My Vault\");\r\n\t\t\tUtility.destroyUsers(xlTestDataWorkBook, \"DestroyUsers\");\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}",
"@AfterClass (alwaysRun = true)\r\n\tpublic void cleanApp() throws Exception{\r\n\r\n\t\ttry {\r\n\t\t\tUtility.destroyUsers(xlTestDataWorkBook);\r\n\t\t\tUtility.destroyTestVault();\r\n\r\n\t\t}//End try\r\n\r\n\t\tcatch(Exception e){\r\n\t\t\tthrow e;\r\n\t\t}//End Catch\r\n\t}",
"protected void deleteTenantMeta() {\n Db2Adapter adapter = new Db2Adapter(connectionPool);\n TenantInfo tenantInfo = getTenantInfo();\n try (ITransaction tx = TransactionFactory.openTransaction(connectionPool)) {\n try {\n if (tenantInfo.getTenantStatus() == TenantStatus.DROPPED) {\n adapter.deleteTenantMeta(adminSchemaName, tenantInfo.getTenantId());\n } else {\n throw new IllegalStateException(\"Cannot delete tenant meta data until status is \" + TenantStatus.DROPPED.name());\n }\n } catch (DataAccessException x) {\n // Something went wrong, so mark the transaction as failed\n tx.setRollbackOnly();\n throw x;\n }\n }\n\n }",
"@DELETE\n\t@Path(\"{id}\")\n\tpublic Response deleteApplication(@PathParam(\"id\") String id) {\n\t\tApplicationsDao.instance.delete(id);\n\t\treturn Response.noContent().build();\n\t}",
"public void clearDatabase() {\n\n\t\tObjectSet<Article> articles = db.query(Article.class);\n\t\tarticles.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<CreditCard> creditCards = db.query(CreditCard.class);\n\t\tcreditCards.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<Order> orders = db.query(Order.class);\n\t\torders.stream()\n\t\t\t.forEach(db::delete);\n\n\t\tObjectSet<OrderDetail> orderDetails = db.query(OrderDetail.class);\n\t\torderDetails.stream()\n\t\t\t.forEach(db::delete);\n\t\t\n\t\tSystem.out.println(\"\\nBase de dades esborrada per complet\");\n\t}",
"private void cleanupUserKeyRecords() {\n\t\tUserKeyRecord currentlyValid = null;\n\t\t//For all \"new\" entries: If there's another sandbox record (regardless of user)\n\t\t//which shares the sandbox ID, we can set the status of the new record to be\n\t\t//the same as the old record.\n\t\t\n\t\t//TODO: We dont' need to read these records, we can read the metadata straight.\n\t\tSqlStorage<UserKeyRecord> storage = app.getStorage(UserKeyRecord.class);\n\t\tfor(UserKeyRecord record : storage) {\n\t\t\tif(record.getType() == UserKeyRecord.TYPE_NORMAL) {\n\t\t\t\t\n\t\t\t\tif(record.getUsername().equals(username) && record.isCurrentlyValid() && record.isPasswordValid(password)) {\n\t\t\t\t\tif(currentlyValid == null) {\n\t\t\t\t\t\tcurrentlyValid = record;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tLogger.log(AndroidLogger.TYPE_ERROR_ASSERTION, \"User \" + username + \" has more than one currently valid key record!!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\telse if(record.getType() == UserKeyRecord.TYPE_NEW) {\n\t\t\t\t//See if we have another sandbox with this ID that is fully initialized.\n\t\t\t\tif(app.getStorage(UserKeyRecord.class).getIDsForValues(new String[] {UserKeyRecord.META_SANDBOX_ID, UserKeyRecord.META_KEY_STATUS}, new Object[] {record.getUuid(), UserKeyRecord.TYPE_NORMAL}).size() > 0) {\n\t\t\t\t\t\n\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Marking new sandbox \" + record.getUuid() + \" as initialized, since it's already in use on this device\");\n\t\t\t\t\t//If so, this sandbox _has_ to have already been initialized, and we should treat it as such.\n\t\t\t\t\trecord.setType(UserKeyRecord.TYPE_NORMAL);\n\t\t\t\t\tstorage.write(record);\n\t\t\t\t}\n\t\t\t} else if (record.getType() == UserKeyRecord.TYPE_PENDING_DELETE) {\n\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Cleaning up sandbox which is pending removal\");\n\t\t\t\t\n\t\t\t\t//See if there are more records in this sandbox. (If so, we can just wipe this record and move on) \n\t\t\t\tif(storage.getIDsForValue(UserKeyRecord.META_SANDBOX_ID, record.getUuid()).size() > 2) {\n\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Record for sandbox \" + record.getUuid() + \" has siblings. Removing record\");\n\t\t\t\t\t\n\t\t\t\t\t//TODO: Will this invalidate our iterator?\n\t\t\t\t\tstorage.remove(record);\n\t\t\t\t} else {\n\t\t\t\t\t//Otherwise, we should see if we can read the data, and if so, wipe it as well as the record.\n\t\t\t\t\tif(record.isPasswordValid(password)) {\n\t\t\t\t\t\tLogger.log(AndroidLogger.TYPE_MAINTENANCE, \"Current user has access to purgable sandbox \" + record.getUuid() + \". Wiping that sandbox\");\n\t\t\t\t\t\tUserSandboxUtils.purgeSandbox(this.getContext(), app, record,record.unWrapKey(password));\n\t\t\t\t\t}\n\t\t\t\t\t//Do we do anything here if we couldn't open the sandbox?\n\t\t\t\t}\n\t\t\t}\n\t\t\t//TODO: Specifically we should never have two sandboxes which can be opened by the same password (I think...)\n\t\t}\n\t}",
"private void removeApplication(final String keyspace) {\n\n Session superUserSession = PathStorePrivilegedCluster.getSuperUserInstance().rawConnect();\n\n if (PathStoreProperties.getInstance().role == Role.SERVER) this.forcePush(keyspace);\n\n logger.info(String.format(\"Forced push all entries for keyspace %s\", keyspace));\n\n SchemaInfo.getInstance().removeKeyspace(keyspace);\n\n QueryCache.getInstance().remove(keyspace);\n\n this.logger.info(String.format(\"Removed cache entries for keyspace %s\", keyspace));\n\n if (CredentialCache.getClients().remove(keyspace))\n this.logger.info(String.format(\"Removed temporary client account for keyspace %s\", keyspace));\n\n // called after schema info is removed so that the push server won't call on this keyspace and\n // throw an error\n // TODO: (Myles) do we need to wait for the push server to finish its current trip before\n // revoking permissions on that table\n CassandraAuthenticationUtil.revokeAccessToKeyspace(\n superUserSession, keyspace, Constants.PATHSTORE_DAEMON_USERNAME);\n\n this.logger.info(\n String.format(\n \"Revoked access to keyspace %s to %s\", keyspace, Constants.PATHSTORE_DAEMON_USERNAME));\n\n superUserSession.execute(\"drop keyspace if exists \" + keyspace);\n\n this.logger.info(String.format(\"Removed keyspace %s\", keyspace));\n\n Delete delete =\n QueryBuilder.delete().from(Constants.PATHSTORE_APPLICATIONS, Constants.NODE_SCHEMAS);\n delete\n .where(QueryBuilder.eq(Constants.NODE_SCHEMAS_COLUMNS.NODE_ID, this.nodeId))\n .and(QueryBuilder.eq(Constants.NODE_SCHEMAS_COLUMNS.KEYSPACE_NAME, keyspace));\n\n this.session.execute(delete);\n\n this.logger.info(\"Application removed \" + keyspace);\n }",
"public void deleteAllMember() {\n super.open();\n\n // 2. delete\n db.execSQL(\"delete from \"+ TABLE_MEMBER);\n\n // 3. close\n db.close();\n\n Log.d(\"deleteAllNotice\", \"success\");\n }",
"private void deleteAllBooks() {\n int rowsDeleted = getContentResolver().delete(BookEntry.CONTENT_URI, null, null);\n // Update the message for the Toast\n String message;\n if (rowsDeleted == 0) {\n message = getResources().getString(R.string.inventory_delete_books_failed).toString();\n } else {\n message = getResources().getString(R.string.inventory_delete_books_successful).toString();\n }\n // Show toast\n Toast.makeText(this, message, Toast.LENGTH_LONG).show();\n }",
"public void activeDirectorySignOutClearCache() {\n Log.d(TAG, \"AD signing out/clearing app cache\");\n List<IAccount> accounts = activeDirectoryApp.getAccounts();\n int accountsCount = accounts.size();\n for (int i = 0; i < accountsCount; i++) {\n activeDirectoryApp.removeAccount(accounts.get(i));\n }\n String message;\n switch (accountsCount) {\n case 0:\n message = \"Failed to Sign Out, no user\";\n break;\n case 1:\n message = \"Signed Out\";\n break;\n default:\n message = String.format(\"Signed Out for %d users\", accountsCount);\n break;\n }\n Log.i(TAG, message);\n getContentProvider().setUserAndLoadCache(null);\n getContentRefresher().switchFragment(FRAGMENT_LOGIN);\n }",
"void unsetIdVerificationResponseData();",
"public void deleteUsers() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_USER, null, null);\n db.close();\n\n Log.d(TAG, \"Deleted all user info from sqlite\");\n }",
"public void deleteUsers() {\n SQLiteDatabase db = this.getWritableDatabase();\n // Delete All Rows\n db.delete(TABLE_USER, null, null);\n db.close();\n\n Log.d(TAG, \"Deleted all user info from sqlite\");\n }",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"@Override\n\tpublic void deleteAll() {\n\n\t}",
"private void deleteAllBooks(){\n int rowsDeleted = getContentResolver().delete(BookContract.BookEntry.CONTENT_URI, null, null);\n Log.v(\"MainActivity\", rowsDeleted + \" rows deleted from database\");\n }",
"@RequestMapping(method=RequestMethod.DELETE, value = \"/item\", produces = \"application/json\")\n public void clearItems()\n {\n this.itemRepository.clearItems();\n }",
"@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tAppofferUtil.getIntsance().getList().clear();\n\t}",
"private void cleanupStagingDir() {\n if (getApplicationId() != null) {\n dagUtils.cleanMr3Dir(getStagingDir(), sessionConf);\n }\n sessionScratchDir = null;\n }",
"@Override\r\n\tpublic void clearDatabase() {\n\t\t\r\n\t}",
"public static void clean(Context context) {\n try (SQLiteDatabase db = new DatabaseFactory(context, null).getWritableDatabase()) {\n UploadingFilesRepository uploadRepo = new UploadingFilesRepository(db);\n Response response = uploadRepo.deleteAll();\n\n SyncQueueRepository syncRepo = new SyncQueueRepository(db);\n List<SyncQueueEntryModel> syncEntries = syncRepo.getAll();\n\n for (SyncQueueEntryModel syncEntry : syncEntries) {\n\n boolean isProcessing = syncEntry.getStatus() == SyncStateEnum.PROCESSING.getValue();\n boolean isQued = syncEntry.getStatus() == SyncStateEnum.QUEUED.getValue();\n\n if (isProcessing || isQued) {\n\n SyncQueueEntryDbo dbo = new SyncQueueEntryDbo(syncEntry);\n dbo.setProp(SynchronizationQueueContract._STATUS, SyncStateEnum.IDLE.getValue());\n\n Response updateResponse = syncRepo.update(dbo.toModel());\n }\n }\n } catch (Exception e) {\n\n }\n }",
"void removeAccessToken() {\n SharedPreferences prefs = // because rest also needs token\n context.getSharedPreferences(SHARED_PREFS_NAME, Context.MODE_PRIVATE);\n prefs.edit()\n .remove(KEY_ACCESS_TOKEN)\n .apply();\n // notification to all listeners\n state.onNext(new AuthState(false));\n\n }",
"public void deleteAll();",
"@Override\r\n\tpublic void deleteAll() {\n\r\n\t}",
"private void clearAccessToken() {\n SharedPreferences sharedPref = this\n .getSharedPreferences(getString(R.string.authorization_preference_file), Context.MODE_PRIVATE);\n if(sharedPref.contains(getResources().getString(R.string.authorization))){\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.remove(getResources().getString(R.string.authorization));\n editor.apply();\n }\n }",
"public void delete_database() {\n //deletes file and by doing so all the tables\n File file = new File(url);\n String path = \"..\" + File.separator + file.getPath();\n File file_path = new File(path);\n file_path.delete();\n }",
"public void clearSupportsPreauthOverage() {\n genClient.clear(CacheKey.supportsPreauthOverage);\n }",
"public void onClick(DialogInterface dialog, int which) {\n final Realm realm = Realm.getDefaultInstance();\r\n realm.executeTransactionAsync(new Realm.Transaction() {\r\n @Override\r\n public void execute(Realm realm) {\r\n realm.deleteAll();\r\n }\r\n }, new Realm.Transaction.OnSuccess() {\r\n @Override\r\n public void onSuccess() {\r\n realm.close();\r\n // TODO: 12/4/2016 add flag to clear all task\r\n startActivity(new Intent(MainActivity.this, LoginActivity.class));\r\n MainActivity.this.finish();\r\n }\r\n }, new Realm.Transaction.OnError() {\r\n @Override\r\n public void onError(Throwable error) {\r\n realm.close();\r\n Log.e(\"TAG\", \"onError: Error Logging out (deleting all data)\", error);\r\n }\r\n });\r\n finish();\r\n }"
] | [
"0.64652526",
"0.6457985",
"0.6406213",
"0.6375318",
"0.6356753",
"0.60901296",
"0.6076098",
"0.604611",
"0.6024006",
"0.59452385",
"0.5944248",
"0.5932019",
"0.59279925",
"0.5922958",
"0.5905736",
"0.590471",
"0.5896095",
"0.5890178",
"0.5868391",
"0.5847217",
"0.58465016",
"0.5842075",
"0.58418554",
"0.582707",
"0.58076143",
"0.5805146",
"0.5798864",
"0.5794005",
"0.57833064",
"0.578087",
"0.5777525",
"0.5774263",
"0.57702565",
"0.5770184",
"0.5757849",
"0.57517165",
"0.57060796",
"0.5690154",
"0.56762123",
"0.5666162",
"0.5660186",
"0.56549394",
"0.56379753",
"0.5631824",
"0.5616341",
"0.55854124",
"0.5583891",
"0.5580834",
"0.5571888",
"0.5558704",
"0.55556774",
"0.55551124",
"0.5553959",
"0.5546884",
"0.5540759",
"0.5538679",
"0.55384064",
"0.5526916",
"0.5526654",
"0.55211157",
"0.55211157",
"0.55211157",
"0.55211157",
"0.5513818",
"0.5504704",
"0.55033106",
"0.5490163",
"0.5488158",
"0.54880947",
"0.5487576",
"0.5486561",
"0.5485587",
"0.54803914",
"0.54753464",
"0.54718316",
"0.5468231",
"0.5464311",
"0.5463216",
"0.5461199",
"0.546082",
"0.5458925",
"0.5458631",
"0.5439447",
"0.5439447",
"0.5435844",
"0.5435844",
"0.5435844",
"0.54346097",
"0.54340386",
"0.5426752",
"0.5424549",
"0.5422298",
"0.54156494",
"0.54135346",
"0.5411",
"0.5407579",
"0.54073143",
"0.54053307",
"0.5404452",
"0.5402526"
] | 0.6595011 | 0 |
Test that rc name can be get and is correctly notified when changed | @Test
public void testRcName() {
int changeCnt[] = {0};
String name[] = {null};
mRC.getName(rcName -> {
changeCnt[0]++;
name[0] = rcName;
});
// check original name
assertThat(changeCnt[0], is(1));
assertThat(name[0], is("RC1"));
// check name change
mRcCore.updateName("newName");
assertThat(changeCnt[0], is(2));
assertThat(name[0], is("newName"));
// check name ref does not change when rc is removed
mRcCore.destroy();
assertThat(changeCnt[0], is(2));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testGetName() {\n System.out.println(\"ColorIOProviderNGTest.testGetName\");\n assertEquals(instance.getName(), ColorAttributeDescription.ATTRIBUTE_NAME);\n }",
"@Test\n\tpublic void testExternalNameUpdateWithEditorChange() throws Exception {\n\t\t// verify that the editor DOES NOT update when the name is externally changed\n\t\t//\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\n\t\tString editorName = \"EditorNameChange\";\n\t\tsetEditorEnumName(panel, editorName);\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tString oldName = enummDt.getName();\n\t\tString newName = oldName + \"_updated\";\n\t\tenummDt.setName(newName);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tString currentEditorName = getEditorEnumName(panel);\n\t\tassertEquals(editorName, currentEditorName);\n\t}",
"@Test\n public void getName() {\n assertTrue(channel.getDisplayName().equals(\"Together4Ever\"));\n }",
"ChangeName.Rsp getChangeNameRsp();",
"@Test\n\tpublic void testExternalNameUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tString oldName = enummDt.getName();\n\t\tString newName = oldName + \"_updated\";\n\t\tenummDt.setName(newName);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\t\tassertEquals(newName, en.getName());\n\t}",
"@Test\r\n\tpublic void getName() {\r\n\t\tassertEquals(\"Name was intialized as 'test'\", \"test\", testObj.getName());\r\n\t}",
"private void setChangeNameRsp(ChangeName.Rsp value) {\n if (value == null) {\n throw new NullPointerException();\n }\n rsp_ = value;\n rspCase_ = 16;\n }",
"private void handleNameCallback(NameCallback nc)\n throws IOException {\n System.out.print(nc.getPrompt());\n System.out.flush();\n nc.setName((new BufferedReader\n (new InputStreamReader(System.in))).readLine());\n }",
"@Test\n\tpublic void validName_changeState() throws IOException {\n\t\tint responseCode = 200;\n\t\tmainItem.changeState(\"lamp_woonkamer\", \"OFF\");\n\t\tassertTrue(mainItem.getConnection().getResponseCode() == responseCode);\n\t}",
"@Test\r\n public void getNameTest()\r\n {\r\n Assert.assertEquals(stub.getName(), NAME);\r\n }",
"com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();",
"public void testChangeName() {\n System.out.println(\"changeName\");\n String expResult = \"Anu\";\n //String result = new changeName('Anu', \"Shar\");\n assertEquals(expResult, result);\n }",
"@Test\n\tpublic void testExternalValueAndNameUpdate() throws Exception {\n\t\tEnum enummDt = createRedGreenBlueEnum();\n\t\tedit(enummDt);\n\n\t\tEnumEditorPanel panel = findEditorPanel(tool.getToolFrame());\n\t\tJTable table = panel.getTable();\n\t\tEnumTableModel model = (EnumTableModel) table.getModel();\n\n\t\tint transactionID = program.startTransaction(\"Test\");\n\t\tenummDt.add(\"Yellow\", 10);\n\t\tenummDt.add(\"Magenta\", 5);\n\n\t\t// note: this tests triggers a code path for updating the name that relies upon the name\n\t\t// being edited *after* new values are added above.\n\t\tString oldName = enummDt.getName();\n\t\tString newName = oldName + \"_updated\";\n\t\tenummDt.setName(newName);\n\t\tprogram.endTransaction(transactionID, true);\n\t\tprogram.flushEvents();\n\t\twaitForSwing();\n\n\t\tEnum en = getEnum(model);\n\n\t\tassertEquals(10, getValue(en, \"Yellow\"));\n\t\tassertEquals(5, getValue(en, \"Magenta\"));\n\t\tassertEquals(newName, en.getName());\n\t}",
"@Test\n public void getNameTest() {\n // expected name for e1\n String expected = \"Pepper Potts\";\n\n assertEquals(\"The expected value of name does not match the actual: \"\n , expected, e1.getName());\n }",
"ChangeName.Req getChangeNameReq();",
"@Test\r\n public void testGetname() {\r\n System.out.println(\"getname\");\r\n connection instance = new connection();\r\n String[] expResult = null;\r\n String[] result = instance.getname();\r\n assertArrayEquals(expResult, result);\r\n // TODO review the generated test code and remove the default call to fail.\r\n fail(\"The test case is a prototype.\");\r\n }",
"@Test\r\n\tpublic void testNameAccessors() {\r\n\r\n\t\t// Create a new Notification and use accessors to set the note name\r\n\t\tINotification note = new Notification(\"TestNote\");\r\n\r\n\t\t// test assertions\r\n\t\tAssert.assertEquals(\"Expecting note.getName() == 'TestNote'\", note.getName(), \"TestNote\");\r\n\t}",
"@Test()\n\tpublic void invalidName_changeState() throws IOException {\n\t\tint responseCode = 404;\n\t\tmainItem.changeState(\"S\", \"OFF\");\n\t\tassertTrue(mainItem.getConnection().getResponseCode() == responseCode);\n\t}",
"private void setChangeName() {\n\t\tChangeNameOpt.add(\"-cn\");\n\t\tChangeNameOpt.add(\"/cn\");\n\t\tChangeNameOpt.add(\"changename\");\n\n\t}",
"@Override\n public void peerDisplayNameChanged(CallPeerChangeEvent evt)\n {\n CallPeer sourcePeer = evt.getSourceCallPeer();\n \n if (sourcePeer.equals(callPeer))\n renderer.setPeerName((String) evt.getNewValue());\n }",
"public void setRc(int rc) {\n this.rc = rc;\n }",
"@Test\n public void test_Name() throws Exception {\n matchInvoke(serviceURL, \"PWDDIC_testSearch_name_req.xml\",\n \"PWDDIC_testSearch_name_res.xml\");\n }",
"@Test\n public void setNameTest() {\n e1.setName(\"Pepper Stark\");\n String expected = \"Pepper Stark\";\n\n assertEquals(\"The expected new name does not match the actual: \"\n , expected, e1.getName());\n }",
"public abstract boolean isNameAvailable(String readerName);",
"public void onChanged(String str) {\n if (str != null) {\n int hashCode = str.hashCode();\n if (hashCode != -1382453013) {\n if (hashCode != 2614219) {\n if (hashCode == 1055811561 && str.equals(\"DISCOVER\")) {\n C6903bc.m21474O().mo84347a(this.f85968a);\n }\n } else if (str.equals(\"USER\")) {\n }\n } else if (str.equals(\"NOTIFICATION\") && C6399b.m19944t()) {\n Context context = this.f85968a;\n StringBuilder sb = new StringBuilder(\"Player Type = \");\n sb.append(C43268o.m137252J());\n C10761a.m31404c(context, sb.toString(), 0).mo25750a();\n }\n }\n }",
"public void registryChange() {\n registryEvent(1);\n }",
"@Test\n public void testRcState() {\n int changeCnt[] = {0};\n DeviceState state[] = {null};\n mRC.getState(deviceState -> {\n changeCnt[0]++;\n state[0] = deviceState;\n });\n\n DeviceStateCore stateCore = mRcCore.getDeviceStateCore();\n\n // check initial state\n assertThat(changeCnt[0], is(1));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),\n causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),\n canBeConnected(false),\n hasNoConnectors(), hasNoActiveConnector()));\n\n Set<DeviceConnectorCore> connectors = new HashSet<>();\n // add a connector. canBeConnected should switch to true\n connectors.add(DeviceConnectorCore.LOCAL_WIFI);\n stateCore.updateConnectors(connectors).notifyUpdated();\n assertThat(changeCnt[0], is(2));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),\n causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),\n canBeConnected(true),\n hasConnectors(DeviceConnectorCore.LOCAL_WIFI), hasNoActiveConnector()));\n\n // add another connector\n connectors.add(DeviceConnectorCore.LOCAL_USB);\n stateCore.updateConnectors(connectors).notifyUpdated();\n assertThat(changeCnt[0], is(3));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),\n causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),\n canBeConnected(true),\n hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB), hasNoActiveConnector()));\n\n // move to connecting, canBeConnected should revert to false\n stateCore.updateConnectionState(DeviceState.ConnectionState.CONNECTING,\n DeviceState.ConnectionStateCause.USER_REQUESTED).notifyUpdated();\n assertThat(changeCnt[0], is(4));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTING),\n causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(false),\n canBeDisconnected(false),\n canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),\n hasNoActiveConnector()));\n\n // move to connected with an active local connector, canBeDisconnected should switch to true\n stateCore.updateConnectionState(DeviceState.ConnectionState.CONNECTED)\n .updateActiveConnector(DeviceConnectorCore.LOCAL_WIFI).notifyUpdated();\n assertThat(changeCnt[0], is(5));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTED),\n causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(false),\n canBeDisconnected(true),\n canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),\n activeConnector(DeviceConnectorCore.LOCAL_WIFI)));\n\n // mark as persisted, canBeForgotten should switch to true\n stateCore.updatePersisted(true).notifyUpdated();\n assertThat(changeCnt[0], is(6));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTED),\n causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(true), canBeDisconnected(true),\n canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),\n activeConnector(DeviceConnectorCore.LOCAL_WIFI)));\n\n // remove all connectors and disconnect\n stateCore.updateConnectors(Collections.emptySet()).updateActiveConnector(null)\n .updateConnectionState(DeviceState.ConnectionState.DISCONNECTED,\n DeviceState.ConnectionStateCause.CONNECTION_LOST).notifyUpdated();\n assertThat(changeCnt[0], is(7));\n assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),\n causeIs(DeviceState.ConnectionStateCause.CONNECTION_LOST), canBeForgotten(true),\n canBeDisconnected(false),\n canBeConnected(false), hasNoConnectors(), hasNoActiveConnector()));\n\n // check state ref does not change when rc is removed\n mRcCore.destroy();\n assertThat(changeCnt[0], is(7));\n }",
"private void setChangeNameRsp(\n ChangeName.Rsp.Builder builderForValue) {\n rsp_ = builderForValue.build();\n rspCase_ = 16;\n }",
"public void nameAccepted(String name) {\n\n String c = null;\n for(PlayerInterface p : onlinePlayers){\n if(p.getNickname().equals(name)){\n c = p.getWorkerRef().get(0).getColor();\n break;\n }\n\n }\n notifyPlayerAdded(name, c);\n\n }",
"@Override\n public void testGetName() {\n MatchSocket matchSocket = new MatchSocket(2);\n MatchRun matchRun = new MatchRun(matchSocket);\n\n Divinity divinity = new Divinity(\"Athena\", playerManager, matchSocket, matchRun);\n Assert.assertEquals(playerManager.getDivinityName(), divinity.getName());\n }",
"@Test\n public void testSetName() {\n service.setName(\"ServiceNew\");\n assertEquals(\"ServiceNew\", service.getName());\n \n }",
"@Test\n public void testGetName() {\n String result = service.getName();\n assertEquals(\"Servis\", result);\n \n }",
"@Test\n public void testGetCustomClassicConsolePort()\n {\n SmartProperties smart = new SmartProperties(\"testProperties/smart-classicConsolePort9999.properties\");\n assertEquals(1, smart.properties.size());\n assertEquals(9999, smart.getIntProperty(CLASSIC_CONSOLE_PORT));\n }",
"public void testGetSpecName() {\n assertEquals(mb.getSpecName(), System\n .getProperty(\"java.vm.specification.name\"));\n }",
"void changed(DiscoveryEvent e);",
"@Test\r\n\tpublic final void testGetRoomByName() {\n\t\tRoom actual = roomServices.getRoomByName(expected.getName());\r\n\t\tassertEquals(expected, actual);\r\n\t}",
"private void setChangeNameReq(ChangeName.Req value) {\n if (value == null) {\n throw new NullPointerException();\n }\n req_ = value;\n reqCase_ = 12;\n }",
"@SuppressWarnings({ \"static-method\", \"nls\" })\n @Test\n public final void testRetrieveKeyI18NPropertyCurrentLocale()\n {\n TestEasyPropertiesObject object = new TestEasyPropertiesObject();\n Assert.assertEquals(getExpectedYellowColorName(), object.getColorName());\n }",
"public void onNameChange(String newName) {\n\t\t\n\t}",
"@Test\n void getName() {\n assertEquals(\"roo\", roo.getName());\n }",
"public void testGetName() {\n String name = mb.getName();\n assertNotNull(name);\n assertTrue(name.length() > 0);\n }",
"public void setName(String aName)\n{\n if(RMUtils.equals(aName, getName())) return; // If value already set, just return\n Object oldValue = put(\"Name\", RMStringUtils.min(aName)); // Cache old value\n firePropertyChange(\"Name\", oldValue, RMStringUtils.min(aName), -1); // Set new value and fire PropertyChange\n}",
"public java.lang.String getWatcher(){\r\n return localWatcher;\r\n }",
"String getName() throws RemoteException;",
"@HTTP(\n method = \"GET\",\n path = \"/apis/config.openshift.io/v1/consoles/{name}/status\"\n )\n @Headers({ \n \"Accept: */*\"\n })\n KubernetesCall<Console> readConsoleStatus(\n @Path(\"name\") String name);",
"void willDisplayUpdate(String change) throws RemoteException;",
"@Override\n\tpublic Status onGetStatus(String name) {\n\t\treturn null;\n\t}",
"@Test\n public void testifyName() throws InterruptedException {\n onView(withId(R.id.name)).check(matches(isDisplayed()));\n }",
"private void testChangeConfig()\n {\n didChange = false;\n VideoOutputPort vop = hostRef.getMainVideoOutputPort(hscreenDef);\n if (vop != null && vop instanceof VideoOutputSettings)\n {\n VideoOutputSettings vops = (VideoOutputSettings) vop;\n VideoOutputConfiguration current = vops.getOutputConfiguration();\n VideoOutputPortListener listener;\n vops.addListener(listener = new VideoOutputPortListener()\n {\n public void configurationChanged(VideoOutputPort source, VideoOutputConfiguration oldConfig,\n VideoOutputConfiguration newConfig)\n {\n didChange = true; // change exception occurred\n print(\"Video Output Port Listener called for Configuration Changed\");\n }\n\n public void connectionStatusChanged(VideoOutputPort source, boolean status)\n {\n print(\"Video Output Port Listener called for Connection Status Changed\");\n }\n\n public void enabledStatusChanged(VideoOutputPort source, boolean status)\n {\n print(\"Video Output Port Listener called for Enabled Status Changed\");\n }\n });\n\n // try to change configuration\n try\n {\n vops.setOutputConfiguration(current); // set video to current\n\n try\n {\n Thread.sleep(300);\n }\n catch (InterruptedException ie)\n {\n }\n }\n catch (java.lang.SecurityException se)\n {\n print(\"Security Exception caught \" + se); // need\n // MonitorAppPermission(\"deviceController\")\n }\n catch (org.ocap.hardware.device.FeatureNotSupportedException fnse)\n {\n print(\"Feature Not Supported Exception caught \" + fnse);\n }\n catch (java.lang.IllegalArgumentException iae)\n {\n print(\"Illegal Argument Exception caught \" + iae);\n }\n // remove listener\n vops.removeListener(listener);\n\n notifyTestComplete(didChange ? 0 : 1, \"Did not receive configurationChanged exception\");\n }\n }",
"@Test\n public void testGetName() {\n System.out.println(\"getName\");\n Manager instance = new Manager();\n String expResult = \"\";\n String result = instance.getName();\n assertEquals(expResult, result);\n \n fail(\"The test case is a prototype.\");\n }",
"private void testAccessibleName(Component comp, AccessibleContext comp_AC) {\n String name = comp_AC.getAccessibleName();\n \n // LOG ONLY -/\n if(debugLog) System.err.println(LOG_CAPTION+\" - <testAccessibleName()> - accessibleName=\"+name);\n \n if (testSettings.AP_accessibleName && (name == null)){\n noName.add(comp);\n }\n }",
"public void testNewSeqCloneNamedSrcConflict() throws Exception\n {\n String accid = \"T00513\";\n MSRawAttributes raw = new MSRawAttributes();\n raw.setOrganism(\"mouse, laboratory\");\n raw.setCellLine(\"HeLa\");\n MolecularSource ms =\n msProcessor.processNewSeqSrc(accid, raw);\n assertEquals(new Integer(-40), ms.getMSKey());\n // check qc tables\n String sql = \"select count(*) from QC_MS_NameConflict \" +\n \"where _jobstream_key = \" + jobkey;\n ResultsNavigator nav = radar.executeQuery(sql);\n RowReference row = nav.getRowReference();\n nav.next();\n assertEquals(new Integer(1), row.getInt(1));\n\n }",
"@Test\n\tpublic void test_TCM__String_getName() {\n\t\tfinal Attribute attr = new Attribute(\"test\", \"value\");\n\t\tassertTrue(\"incorrect attribute name\", attr.getName().equals(\"test\"));\n\n\t}",
"@Test\n public void testGetCustomConsolePrompt()\n {\n SmartProperties smart = new SmartProperties(\"testProperties/smart-consolePrompt1.properties\");\n assertEquals(1, smart.properties.size());\n assertEquals(\"consolePrompt1\", smart.getProperty(CONSOLE_PROMPT));\n }",
"@Test\r\n public void testPrintNameAndResult() {\r\n \r\n String regNo = \"ABC123\";\r\n instance = new Controller(dbMgr);\r\n instance.printNameAndResult(regNo);\r\n \r\n }",
"protected void fireNameChanged() {\n\t\tfor(ReadingPointListener l : listeners) l.nameChanged(this);\n\t}",
"public void testChangeListener() throws Exception\n {\n checkFormEventListener(CHANGE_BUILDER, \"CHANGE\");\n }",
"@Test\n public void testGetSetName() {\n\n String name = \"name\";\n messtyp.setName(name);\n assertEquals(name, messtyp.getName());\n\n }",
"int getRc() {\n return rc;\n }",
"public boolean checkName(final String name) {\n\t\treturn channelName.equals(name);\n\t}",
"@Test\n public void tc_VerifyCaptionREGX_MemorizedValue() throws Exception\n {\n EN.BeginTest( TestName );\n\n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n\n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n\n OKW_Memorize_Sngltn.getInstance();\n // Set Value in \"Memory\"\n OKW_Memorize_Sngltn.getInstance().reset();\n OKW_Memorize_Sngltn.getInstance().set( \"Key1\", \"\\\\w{3} one and only Value\" );\n\n EN.SetValue( \"All_MethodsObj\", \"The one and only Value\" );\n // Kommen auch mehrere Sollwerte im Objekt ab?\n EN.VerifyCaptionREGX( \"All_MethodsObj\", \"${Key1}\" );\n\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"The one and only Value\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n\n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifyCaption()\", myClipBoard.getMethod() );\n }",
"public void resourceChanged(IResourceChangeEvent event) {\n \t\t\t\tbarrier[0] = TestBarrier.STATUS_START;\n \t\t\t\ttry {\n \t\t\t\t\tTestBarrier.waitForStatus(barrier, TestBarrier.STATUS_DONE);\n \t\t\t\t} catch (Throwable e) {\n \t\t\t\t\terror[0] = e;\n \t\t\t\t}\n \t\t\t}",
"void onPropertyChange(String name, String newValue);",
"public void objectChanged(NamingEvent evt) throws RemoteException;",
"@Override\n\tpublic String getName() {\n\t\treturn portmodifytesting.class.getSimpleName();\n\t}",
"@Test\n public void testGetName() {\n System.out.println(\"getName\");\n VM instance = null;\n String expResult = \"\";\n String result = instance.getName();\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }",
"private STATUS(String name) {\n this.name = name;\n }",
"@Test\n public void testSetName() {\n System.out.println(\"setName\");\n String name = \"Test\";\n Library instance = new Library();\n instance.setName(name);\n String result = instance.getName();\n assertEquals(name, result);\n }",
"static int type_of_rc(String passed){\n\t\treturn 1;\n\t}",
"@Test\n public void setGetName() {\n final CourseType courseType = new CourseType();\n final String NAME = \"name\";\n courseType.setName(NAME);\n\n assertSame(NAME, courseType.getName());\n }",
"@Test\n\tpublic void test_getName() {\n\tTennisPlayer c1 = new TennisPlayer(24,\"John Isner\");\n\tassertEquals(\"John Isner\",c1.getName());\n }",
"@Test\n\tpublic void setterAndGetterForNameAreWiredCorrectly() {\n\t\tDummyUnit unit = new DummyUnit(SYMBOL);\n\t\tunit.setName(NAME);\n\t\tassertEquals(NAME, unit.getName());\n\t}",
"@Test\r\n\tvoid testGetPlayerNameBySruShouldPass() {\r\n\t\tController ctrl = new Controller();\r\n\t\t\r\n\t\ttry {\r\n\t\t\tString name = ctrl.getPlayerNameBySru(1000);\r\n\t\t\tassertEquals(\"Adam West\", name);\r\n\t\t\r\n\t\t}catch(UnfoundPlayer e) {\r\n\t\t\tassertTrue(false);\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}",
"@Test\r\n\t@Order(1)\r\n void testName() {\r\n robot.setName(null);\r\n assertNotEquals(null, robot.getName(),\"Name test failed\\nREASON: null name not allowed!\");\r\n }",
"@Test\n public void validCodenameShouldReturnClues()\n {\n String codename = DatabaseHelper.getRandomCodename();\n assertTrue(DatabaseHelper.getCluesForCodename(codename).length > 0);\n }",
"boolean hasStatusChanged();",
"public String listen(String key, PropertyChangedCallback callback);",
"@Test\n public void testGetName() {\n System.out.println(\"getName\");\n Setting instance = Setting.factory(\"testname\", Setting.SETTING_TYPE.UND, new Object());\n String expResult = \"testname\";\n String result = instance.getName();\n assertEquals(expResult, result);\n\n }",
"@Test\n\tpublic void testActiveLoadBalancer_notifyNameService() throws IOException {\n\t\tSet<Server> servers = TestUtils.getServerSet(1);\n\t\tAbstractLoadBalancer activeLoadBalancer = new ActiveLoadBalancer(new LoadBalancerConnectionHandler(8001, TestUtils.getRemoteLoadBalancerSet(1)), TestUtils.getRemoteLoadBalancerSet(1),\n\t\t\t\tservers, new InetSocketAddress(\"localhost\", 8004), 1);\n\t\tServerSocketChannel nameServiceSocketChannel = getMockNameServiceSocketChannel();\n\t\tTestUtils.mockServerSockets(servers);\n\t\tThread activeLoadBalancerThread = new Thread(activeLoadBalancer);\n\t\tactiveLoadBalancerThread.start();\n\t\t\n\t\tSelector acceptSelector = Selector.open();\n\t\tnameServiceSocketChannel.configureBlocking(false);\n\t\tnameServiceSocketChannel.register(acceptSelector, SelectionKey.OP_ACCEPT);\n\t\tif (acceptSelector.select(1000) == 0) {\n\t\t\tthrow new SocketTimeoutException();\n\t\t}\n\t\tSocketChannel acceptedNameServiceSocketChannel = nameServiceSocketChannel.accept();\n\t\tByteBuffer buffer = ByteBuffer.allocate(5);\n\t\t\n\t\tSelector readSelector = Selector.open();\n\t\tacceptedNameServiceSocketChannel.configureBlocking(false);\n\t\tacceptedNameServiceSocketChannel.register(readSelector, SelectionKey.OP_READ);\n\t\tif (readSelector.select(1000) == 0) {\n\t\t\tthrow new SocketTimeoutException();\n\t\t}\n\t\tint bytesRead = acceptedNameServiceSocketChannel.read(buffer);\n\t\tassertEquals(5, bytesRead);\n\t\t\n\t\tbuffer.flip();\n\t\tMessageType messageType = MessageType.values()[buffer.get()];\n\t\tassertEquals(MessageType.HOST_ADDR_NOTIFY, messageType);\n\t\tint port = buffer.getInt();\n\t\tassertEquals(8001, port);\n\t\tactiveLoadBalancerThread.interrupt();\n\t\tacceptSelector.close();\n\t\treadSelector.close();\n\t\tnameServiceSocketChannel.close();\n\t}",
"private void setName(java.lang.String name) {\n System.out.println(\"setting name \"+name);\n this.name = name;\n }",
"public void providerStatusMessageChanged(PropertyChangeEvent evt);",
"@Test\n void setName() {\n assertEquals(\"Process\", new Process() {{\n setName(\"Process\");\n }}.getName());\n }",
"@Test(description = \"negative test for interface update with wrong interface name for TCL procedure 'testParents'\")\n public void exceptionUpdateWrongName()\n {\n final DataCollection data = new DataCollection(this);\n final InterfaceData inter = data.getInterface(\"TestInterface\");\n this.updateFailure(inter.getCIFileName(),\n \"mql mod interface \\\"${NAME}\\\"\\ntestParents -interface \"\n + inter.getName() + \"1\",\n UpdateException_mxJPO.Error.DM_INTERFACE_UPDATE_WRONG_NAME);\n }",
"@Test\n public void testSetName() {\n System.out.println(\"setName\");\n\n Setting instance = Setting.factory();\n String oldName = instance.getName();\n assertFalse(Setting.isNotUsed(oldName));\n String name = \"newName\";\n instance.setName(name);\n assertEquals(name, instance.getName());\n assertTrue(Setting.isNotUsed(oldName));\n assertFalse(Setting.isNotUsed(name));\n\n }",
"@Test\n\tpublic void testPetWhenGetNameViolet() {\n\t\tPet pet = new Pet(\"Violet\", \"arf\");\t\t\n\t\tString expect = \"Violet\";\n\t\tString result = pet.getPetName();\t\t\n\t\tassertEquals(expect, result);\t\n\t}",
"public void setName(String rname) {\n name = rname;\n }",
"@Test\n public void TestUCharactersGetName() throws InterruptedException {\n List threads = new LinkedList();\n for(int t=0; t<20; t++) {\n int codePoint = 47 + t;\n String correctName = UCharacter.getName(codePoint);\n GetNameThread thread = new GetNameThread(codePoint, correctName);\n thread.start();\n threads.add(thread);\n }\n ListIterator i = threads.listIterator();\n while (i.hasNext()) {\n GetNameThread thread = (GetNameThread)i.next();\n thread.join();\n if (!thread.correctName.equals(thread.actualName)) {\n errln(\"FAIL, expected \\\"\" + thread.correctName + \"\\\", got \\\"\" + thread.actualName + \"\\\"\");\n }\n }\n }",
"@Test\n public void testGetName()\n {\n assertThat(m_SUT.getName(), is(\"test name\"));\n }",
"public void run() {\n\t\t\t\n\t\t\tccListenerStarter() ;\n\t\t\t\n\t\t\toutPrintStream.println(\"#GETNAME\");\n\t\t\t\n\t\t}",
"public void testGetOrgnlName() {\r\n MarkAttendence ma = new MarkAttendence();\r\n String name = \"John_Cena\";\r\n String modifiedName = ma.getOrgnlName(name);\r\n assertEquals(modifiedName , \"John Cena\");\r\n }",
"public boolean notifiesOnChange(String id) throws IllegalArgumentException;",
"public static boolean notifyRC(ClientResponsePacket res) throws IOException {\n Socket rc_conn = null;\n ClientRequestPacket req_packet = new ClientRequestPacket();\n ClientResponsePacket res_packet = null;\n req_packet.setCommand(ProjectConstants.ADD_MEM_NODES);\n for (int i = 0; i < res.getRc_list().size(); i++) {\n rc_conn = new Socket(res.getRc_list().get(i).ip, ProjectConstants.RC_LISTEN_PORT);\n req_packet.setIp_address(host_address.getHostAddress());\n PacketTransfer.sendRequest(req_packet, rc_conn);\n res_packet = PacketTransfer.recv_response(rc_conn);\n System.out.println(\"Notified RC : \" + res_packet.getResponse_code());\n }\n syncUp(res_packet);\n return res_packet.getResponse_code() == ProjectConstants.SUCCESS;\n }",
"@Override\n public void onDeviceNameChange(BluetoothDevice device, String name) {\n Log.d(TAG, \"[onDeviceNameChange] device : \" + device.getAddress()\n + \", name : \" + name);\n// sendHandlerMessage(UPDATE_UI_FLAG, 0);\n updateScanDialog(UPDATE_UI_FLAG, device);\n }",
"public void testCmdUpdate_taskName_field() {\n\t\t// Initialize test variables\n\t\tCommandAction expectedCA;\n\t\tTask expectedTask;\n\t\tList<Task> expectedTaskList;\n\n\t\t/*\n\t\t * Test 2: Testing task name field (all ID are valid)\n\t\t */\n\t\tctf.initialize();\n\t\texpectedTaskList = null;\n\t\taddNewTask(TASK_NAME_1);\n\n\t\t// Test 2a: task name is null\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\t_testCmdUpdate.setParameter(CmdParameters.PARAM_NAME_TASK_ID, VALID_TASKID + \"\");\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 2b: task name is an empty String\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", EMPTY_STRING, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 2c: new task name is same as current task name (no changes)\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_1, null, null, null);\n\t\texpectedCA = new CommandAction(MSG_TASKNOUPDATE, false, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t\t// Test 2d: new task name is different from current task name (changes\n\t\t// made)\n\t\texpectedTaskList = new ArrayList<Task>();\n\t\t_testCmdUpdate = new CmdUpdate();\n\t\tsetParameters(VALID_TASKID + \"\", TASK_NAME_2, null, null, null);\n\t\texpectedTask = ctf.createExpectedTask(TASK_NAME_2, NO_TIME, NO_TIME, PRIORITY_TYPE.NORMAL);\n\t\texpectedTaskList.add(expectedTask);\n\t\texpectedCA = new CommandAction(String.format(MSG_TASKUPDATED, VALID_TASKID), true, expectedTaskList);\n\t\tctf.assertCommandAction(expectedCA, _testCmdUpdate.execute());\n\n\t}",
"public void verifyPresenterNameMatchedOnCourseInfoPage(String name) {\n \t Assert.assertEquals(presenterLabel.getText(),name);\n }",
"@Test\n public void testGetServerRemoto() throws ApplicationException {\n CommunicationFactory instance = CommunicationFactory.getFactory();\n String expResult = bundle.getString(IPropertiesConstants.COMM_REMOTE_CONNECTOR);\n String result = instance.getServer(\"cmcdell\").getClass().getName();\n assertEquals(expResult, result);\n }",
"void controllerChangeReceived(rwmidi.Controller cntrl){\n\t println(\"cc recieved\");\n\t println(\": \" + cntrl.getCC()) ;\n\n\t \n\t if(cntrl.getCC() == 2){\n\t modThresh1(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() == 3){\n\t modThresh2(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() ==4){\n\t modThresh3(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() == 5){ //// adjust skip\n\t modSkip(cntrl.getValue());\n\t }\n\t \n\t if(cntrl.getCC() == 6){ /// adjus scale\n\t modScale(cntrl.getValue());\n\t }\n\t}",
"public void onGetName(String user,String name);",
"@Test\n public void testRookLabel() {\n // initialize the complete chess board\n ChessBoard chessBoard = init(\"CHESS\");\n\n assertEquals(\"R\", chessBoard.getPiece(0, 0).getLabel());\n assertEquals(\"R\", chessBoard.getPiece(0, 7).getLabel());\n assertEquals(\"R\", chessBoard.getPiece(7, 0).getLabel());\n assertEquals(\"R\", chessBoard.getPiece(7, 7).getLabel());\n }"
] | [
"0.5928481",
"0.5757483",
"0.57461315",
"0.5451466",
"0.54374546",
"0.5430441",
"0.5402815",
"0.53927344",
"0.53687197",
"0.53247565",
"0.52085286",
"0.52017146",
"0.5189623",
"0.5166112",
"0.51268166",
"0.5105732",
"0.51051104",
"0.50993496",
"0.5093517",
"0.50847524",
"0.508087",
"0.5071212",
"0.5067724",
"0.5064471",
"0.5063555",
"0.50629073",
"0.50558096",
"0.50526434",
"0.5046136",
"0.50318384",
"0.5029661",
"0.50260043",
"0.50013304",
"0.49608454",
"0.49514312",
"0.494396",
"0.49186367",
"0.49121505",
"0.4892551",
"0.48920995",
"0.48895764",
"0.4888112",
"0.48874137",
"0.48835784",
"0.48811138",
"0.4868245",
"0.48675507",
"0.48611832",
"0.4849951",
"0.48498178",
"0.48475137",
"0.48471767",
"0.4841183",
"0.48384324",
"0.48357496",
"0.48319182",
"0.48286745",
"0.48272735",
"0.48268598",
"0.48254383",
"0.4819421",
"0.481387",
"0.4794214",
"0.4777488",
"0.47742677",
"0.47679406",
"0.47522354",
"0.47458562",
"0.47412682",
"0.47403976",
"0.4734742",
"0.4734382",
"0.47333676",
"0.47330442",
"0.47279513",
"0.4721936",
"0.4719671",
"0.4719382",
"0.47190642",
"0.4712728",
"0.47100762",
"0.47080046",
"0.47064072",
"0.470317",
"0.46967003",
"0.46956658",
"0.4695525",
"0.4693846",
"0.46937796",
"0.46864507",
"0.4685185",
"0.46845418",
"0.4679636",
"0.46789637",
"0.46767265",
"0.46723816",
"0.4670563",
"0.4660674",
"0.4655409",
"0.46550095"
] | 0.749228 | 0 |
Test that rc state can be get and is correctly notified when changed | @Test
public void testRcState() {
int changeCnt[] = {0};
DeviceState state[] = {null};
mRC.getState(deviceState -> {
changeCnt[0]++;
state[0] = deviceState;
});
DeviceStateCore stateCore = mRcCore.getDeviceStateCore();
// check initial state
assertThat(changeCnt[0], is(1));
assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),
causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),
canBeConnected(false),
hasNoConnectors(), hasNoActiveConnector()));
Set<DeviceConnectorCore> connectors = new HashSet<>();
// add a connector. canBeConnected should switch to true
connectors.add(DeviceConnectorCore.LOCAL_WIFI);
stateCore.updateConnectors(connectors).notifyUpdated();
assertThat(changeCnt[0], is(2));
assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),
causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),
canBeConnected(true),
hasConnectors(DeviceConnectorCore.LOCAL_WIFI), hasNoActiveConnector()));
// add another connector
connectors.add(DeviceConnectorCore.LOCAL_USB);
stateCore.updateConnectors(connectors).notifyUpdated();
assertThat(changeCnt[0], is(3));
assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),
causeIs(DeviceState.ConnectionStateCause.NONE), canBeForgotten(false), canBeDisconnected(false),
canBeConnected(true),
hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB), hasNoActiveConnector()));
// move to connecting, canBeConnected should revert to false
stateCore.updateConnectionState(DeviceState.ConnectionState.CONNECTING,
DeviceState.ConnectionStateCause.USER_REQUESTED).notifyUpdated();
assertThat(changeCnt[0], is(4));
assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTING),
causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(false),
canBeDisconnected(false),
canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),
hasNoActiveConnector()));
// move to connected with an active local connector, canBeDisconnected should switch to true
stateCore.updateConnectionState(DeviceState.ConnectionState.CONNECTED)
.updateActiveConnector(DeviceConnectorCore.LOCAL_WIFI).notifyUpdated();
assertThat(changeCnt[0], is(5));
assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTED),
causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(false),
canBeDisconnected(true),
canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),
activeConnector(DeviceConnectorCore.LOCAL_WIFI)));
// mark as persisted, canBeForgotten should switch to true
stateCore.updatePersisted(true).notifyUpdated();
assertThat(changeCnt[0], is(6));
assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.CONNECTED),
causeIs(DeviceState.ConnectionStateCause.USER_REQUESTED), canBeForgotten(true), canBeDisconnected(true),
canBeConnected(false), hasConnectors(DeviceConnectorCore.LOCAL_WIFI, DeviceConnectorCore.LOCAL_USB),
activeConnector(DeviceConnectorCore.LOCAL_WIFI)));
// remove all connectors and disconnect
stateCore.updateConnectors(Collections.emptySet()).updateActiveConnector(null)
.updateConnectionState(DeviceState.ConnectionState.DISCONNECTED,
DeviceState.ConnectionStateCause.CONNECTION_LOST).notifyUpdated();
assertThat(changeCnt[0], is(7));
assertThat(state[0], allOf(stateIs(DeviceState.ConnectionState.DISCONNECTED),
causeIs(DeviceState.ConnectionStateCause.CONNECTION_LOST), canBeForgotten(true),
canBeDisconnected(false),
canBeConnected(false), hasNoConnectors(), hasNoActiveConnector()));
// check state ref does not change when rc is removed
mRcCore.destroy();
assertThat(changeCnt[0], is(7));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testStateChange_MultiThreaded() throws Exception {\n MockConnection connection = new MockConnection(1000);\n ComponentState expected = createState();\n prepareConn(connection);\n new Thread(createOperator(connection)).start();\n new Thread(createOperator(connection)).start();\n new Thread(createOperator(connection)).start();\n new Thread(createOperator(connection)).start();\n new Thread(createOperator(connection)).start();\n waitFor(connection, expected);\n assertEquals(expected, connection.retrieveComponentState());\n verifyOperation(connection);\n }",
"com.polytech.spik.protocol.SpikMessages.StatusChanged getStatusChanged();",
"boolean hasStatusChanged();",
"@Test\r\n\tpublic void testGetState() {\r\n\t}",
"private void testChangeConfig()\n {\n didChange = false;\n VideoOutputPort vop = hostRef.getMainVideoOutputPort(hscreenDef);\n if (vop != null && vop instanceof VideoOutputSettings)\n {\n VideoOutputSettings vops = (VideoOutputSettings) vop;\n VideoOutputConfiguration current = vops.getOutputConfiguration();\n VideoOutputPortListener listener;\n vops.addListener(listener = new VideoOutputPortListener()\n {\n public void configurationChanged(VideoOutputPort source, VideoOutputConfiguration oldConfig,\n VideoOutputConfiguration newConfig)\n {\n didChange = true; // change exception occurred\n print(\"Video Output Port Listener called for Configuration Changed\");\n }\n\n public void connectionStatusChanged(VideoOutputPort source, boolean status)\n {\n print(\"Video Output Port Listener called for Connection Status Changed\");\n }\n\n public void enabledStatusChanged(VideoOutputPort source, boolean status)\n {\n print(\"Video Output Port Listener called for Enabled Status Changed\");\n }\n });\n\n // try to change configuration\n try\n {\n vops.setOutputConfiguration(current); // set video to current\n\n try\n {\n Thread.sleep(300);\n }\n catch (InterruptedException ie)\n {\n }\n }\n catch (java.lang.SecurityException se)\n {\n print(\"Security Exception caught \" + se); // need\n // MonitorAppPermission(\"deviceController\")\n }\n catch (org.ocap.hardware.device.FeatureNotSupportedException fnse)\n {\n print(\"Feature Not Supported Exception caught \" + fnse);\n }\n catch (java.lang.IllegalArgumentException iae)\n {\n print(\"Illegal Argument Exception caught \" + iae);\n }\n // remove listener\n vops.removeListener(listener);\n\n notifyTestComplete(didChange ? 0 : 1, \"Did not receive configurationChanged exception\");\n }\n }",
"@Test\n public void clientStateTest() {\n // TODO: test clientState\n }",
"@Override\n public void testPeriodic() {\n //Diagnostics.writeString(\"State\", \"TEST\");\n }",
"int getRc() {\n return rc;\n }",
"public RemoteControlTest() {\n // reset to initial state\n reset();\n // display \"ready\"\n TextLCD.print(READY);\t\t\n }",
"public void setRc(int rc) {\n this.rc = rc;\n }",
"long getStateChange();",
"@Override\r\n\tpublic boolean queryControlReceived(StateVariable stateVar) {\n\t\treturn true;\r\n\t}",
"public void test3_0ControlStatusListener() throws Exception {\n synchronized(mLock) {\n mHasControl = true;\n mInitialized = false;\n createListenerLooper(true, false, false);\n waitForLooperInitialization_l();\n\n getReverb(0);\n int looperWaitCount = MAX_LOOPER_WAIT_COUNT;\n while (mHasControl && (looperWaitCount-- > 0)) {\n try {\n mLock.wait();\n } catch(Exception e) {\n }\n }\n terminateListenerLooper();\n releaseReverb();\n }\n assertFalse(\"effect control not lost by effect1\", mHasControl);\n }",
"boolean hasChangeStatus();",
"private StateChangeMonitor() {\n\t\t// Create the registry of StateChangeListeners\n\t\tlisteners = new Hashtable();\n\t}",
"public void testHasPendingChanges() throws RepositoryException{\n boolean result = true;\n \n sessionControl.expectAndReturn(session.hasPendingChanges(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertEquals(jt.hasPendingChanges(), result);\n }",
"@Override\n public void testIfConnected() {\n }",
"public void resourceChanged(IResourceChangeEvent event) {\n \t\t\t\tbarrier[0] = TestBarrier.STATUS_START;\n \t\t\t\ttry {\n \t\t\t\t\tTestBarrier.waitForStatus(barrier, TestBarrier.STATUS_DONE);\n \t\t\t\t} catch (Throwable e) {\n \t\t\t\t\terror[0] = e;\n \t\t\t\t}\n \t\t\t}",
"@Test\r\n public void testChange() {\r\n final String topo = \"TOPO\";\r\n final String exec = \"exec\";\r\n final String alg = \"alg\";\r\n final String param1 = \"param1\";\r\n final String value1 = \"val1\";\r\n final String param2 = \"param2\";\r\n final String value2 = \"val2\";\r\n \r\n final int inPort = 1234;\r\n final int outPort = 4321;\r\n final int warmup = 50;\r\n final String host = \"localhost\";\r\n final String msgId = \"423de707-921e-4b30-8159-5e6b80011b81\";\r\n \r\n TestListener listener = new TestListener();\r\n AlgorithmChangeSignal signal = new AlgorithmChangeSignal(topo, exec, alg, msgId);\r\n listener.expect(signal);\r\n AlgorithmChangeSignal.notify(signal.createPayload(), topo, exec, listener);\r\n Assert.assertTrue(listener.receivedSignal());\r\n\r\n signal = new AlgorithmChangeSignal(topo, exec, alg, \"\");\r\n listener.expect(signal);\r\n AlgorithmChangeSignal.notify(signal.createPayload(), topo, exec, listener);\r\n Assert.assertTrue(listener.receivedSignal());\r\n\r\n List<ParameterChange> changes = new ArrayList<ParameterChange>();\r\n changes.add(new ParameterChange(param1, value1));\r\n changes.add(new ParameterChange(param2, value2));\r\n signal = new AlgorithmChangeSignal(topo, exec, alg, changes, msgId);\r\n listener.expect(signal);\r\n AlgorithmChangeSignal.notify(signal.createPayload(), topo, exec, listener);\r\n Assert.assertTrue(listener.receivedSignal());\r\n \r\n // instance reuse is not intended but ok here\r\n Map<AlgorithmChangeParameter, Serializable> params = new HashMap<AlgorithmChangeParameter, Serializable>();\r\n params.put(AlgorithmChangeParameter.INPUT_PORT, inPort);\r\n params.put(AlgorithmChangeParameter.OUTPUT_PORT, outPort);\r\n signal.setParameters(params);\r\n signal.setIntParameter(AlgorithmChangeParameter.WARMUP_DELAY, warmup);\r\n signal.setStringParameter(AlgorithmChangeParameter.COPROCESSOR_HOST, host);\r\n \r\n assertEquals(inPort, signal.getIntParameter(AlgorithmChangeParameter.INPUT_PORT, null));\r\n assertEquals(outPort, signal.getIntParameter(AlgorithmChangeParameter.OUTPUT_PORT, null));\r\n assertEquals(warmup, signal.getIntParameter(AlgorithmChangeParameter.WARMUP_DELAY, null));\r\n assertEquals(host, signal.getStringParameter(AlgorithmChangeParameter.COPROCESSOR_HOST, null));\r\n \r\n listener.expect(signal);\r\n AlgorithmChangeSignal.notify(signal.createPayload(), topo, exec, listener);\r\n Assert.assertTrue(listener.receivedSignal());\r\n }",
"public boolean isRC() { return isRC; }",
"@Test\n\tpublic void checkReady_test()\n\t{\n\t\tb.set(1,1, 'x');\n\t\tb.set(1,2, 'o');\n\t\tassertFalse(b.checkReady());\n\t}",
"public void refreshBalanceTestState() {\n this.setSuccessful = false;\n this.latch.setUpLatch(1);\n long beginTime = System.currentTimeMillis();\n Runnable updateTestResult = new Runnable() {\n /* class dji.sdksharedlib.hardware.abstractions.gimbal.DJIGimbalRoninMXAbstraction.AnonymousClass7 */\n\n public void run() {\n DataGimbalGetUserParams.getInstance().setInfos(new String[]{DJIGimbalRoninMXAbstraction.RONIN_COMMAND[23]}).start(new DJIDataCallBack() {\n /* class dji.sdksharedlib.hardware.abstractions.gimbal.DJIGimbalRoninMXAbstraction.AnonymousClass7.AnonymousClass1 */\n\n public void onSuccess(Object model) {\n int testResult = DJIGimbalParamInfoManager.read(DJIGimbalRoninMXAbstraction.RONIN_COMMAND[23]).value.intValue();\n if (((testResult >> 6) & 3) == 2) {\n DJIGimbalRoninMXAbstraction.this.setSuccessful = true;\n DJIGimbalRoninMXAbstraction.this.setIsTestingBalance(false);\n DJIGimbalRoninMXAbstraction.this.setPitchTestResult(BalanceTestResult.values()[(testResult >> 2) & 3]);\n DJIGimbalRoninMXAbstraction.this.setRollTestResult(BalanceTestResult.values()[(testResult >> 4) & 3]);\n DJIGimbalRoninMXAbstraction.this.latch.countDownLatch();\n return;\n }\n DJIGimbalRoninMXAbstraction.this.setIsTestingBalance(true);\n }\n\n public void onFailure(Ccode ccode) {\n }\n });\n }\n };\n while (System.currentTimeMillis() - beginTime < FusionEngine.RECENT_UPDATE_THRESHOLD_IN_MILLIS) {\n try {\n Thread.sleep(2000);\n updateBalanceTestPushInfo();\n new Thread(updateTestResult, \"ronimMxAbs1\").start();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n this.latch.waitForLatch(61);\n if (!this.setSuccessful) {\n setIsTestingBalance(false);\n setPitchTestResult(BalanceTestResult.UNKNOWN);\n setRollTestResult(BalanceTestResult.UNKNOWN);\n }\n updateBalanceTestPushInfo();\n }",
"private RCProxy() {\n\t\tstate = new DefaultState();\n\t\tSTBListener.instance().addObserver(this);\n\t}",
"public abstract int getState() throws RcsServiceException;",
"@Test(timeout = 10000L)\n public void testGetAndSetActiveState() throws Exception {\n CommonDriverAdminTests.testGetAndSetActiveState(client, nbNodes);\n }",
"public int getRc() {\n return rc;\n }",
"public boolean hasStatusChanged() {\n return typeCase_ == 5;\n }",
"@Test\n public void testRcName() {\n int changeCnt[] = {0};\n String name[] = {null};\n mRC.getName(rcName -> {\n changeCnt[0]++;\n name[0] = rcName;\n });\n\n // check original name\n assertThat(changeCnt[0], is(1));\n assertThat(name[0], is(\"RC1\"));\n\n // check name change\n mRcCore.updateName(\"newName\");\n assertThat(changeCnt[0], is(2));\n assertThat(name[0], is(\"newName\"));\n\n // check name ref does not change when rc is removed\n mRcCore.destroy();\n assertThat(changeCnt[0], is(2));\n }",
"public void test3_1EnableStatusListener() throws Exception {\n synchronized(mLock) {\n mInitialized = false;\n createListenerLooper(false, true, false);\n waitForLooperInitialization_l();\n\n mReverb2.setEnabled(true);\n mIsEnabled = true;\n getReverb(0);\n mReverb.setEnabled(false);\n int looperWaitCount = MAX_LOOPER_WAIT_COUNT;\n while (mIsEnabled && (looperWaitCount-- > 0)) {\n try {\n mLock.wait();\n } catch(Exception e) {\n }\n }\n terminateListenerLooper();\n releaseReverb();\n }\n assertFalse(\"enable status not updated\", mIsEnabled);\n }",
"protected abstract int newState();",
"@Test\n public void testTargetChangedNoModification() throws Exception {\n when(mockDifferentiator.isNew(Mockito.any(ByteBuffer.class))).thenReturn(false);\n final ConfigurationChangeNotifier testNotifier = mock(ConfigurationChangeNotifier.class);\n\n // In this case the WatchKey is null because there were no events found\n establishMockEnvironmentForChangeTests(null);\n\n verify(testNotifier, Mockito.never()).notifyListeners(Mockito.any(ByteBuffer.class));\n }",
"void currentStateChanged();",
"@Test\n\tpublic void testManualUpdate(){\n\tconditions = new CurrentConditionsDisplay(weatherData);\n\tweatherData.setMeasurements(75, 75, 75);\n\t//And: The data in what it is observing is updated\n\t//When: The CurrentConditionsDisplay is notified\n\t//Then: It should display the new measurements\n\t//See console for output\n\t}",
"@Test\n @DisplayName(\"State sees changes committed to backend if not modified on the state\")\n void dirtyRead() {\n backingStore.set(CHAD);\n final var state = createState();\n assertThat(state.get()).isEqualTo(CHAD);\n backingStore.set(DENMARK);\n assertThat(state.get()).isEqualTo(DENMARK); // Sees change\n state.put(ESTONIA);\n assertThat(state.get()).isEqualTo(ESTONIA);\n backingStore.set(FRANCE);\n assertThat(state.get()).isEqualTo(ESTONIA); // Does not see change\n }",
"public boolean hasStatusChanged() {\n return typeCase_ == 5;\n }",
"@Override\n\tpublic void connectionStatusChanged(int connectedState, String reason) {\n\n\t}",
"private void setComponentStatus() {}",
"@Override\r\n public boolean poll()\r\n {\n return state.isConnected();\r\n }",
"@Test\n\tpublic void validState_changeState() {\n\t\tString testState = \"OFF\";\n\t\tItem testItem = new Item().createItemFromItemName(\"lamp_woonkamer\");\n\t\ttestItem.changeState(testItem.getName(), testState);\n\t\tSystem.out.println(testItem.getState());\n\t\tassertEquals(testItem.getState(), testState);\n\t\t\n\t}",
"@Test\n public void updateStatusShouldTransitionCancellingReservationToCancelledWhenUpdatedToSucceeded() {\n Reservation reservation = new ReservationFactory().setStatus(ReservationStatus.CANCELLING).create();\n when(reservationRepoMock.getByReservationIdWithPessimisticWriteLock(reservation.getReservationId())).thenReturn(reservation);\n\n subject.updateStatus(reservation.getReservationId(), UpdatedReservationStatus.forNewStatus(ReservationStatus.SUCCEEDED));\n\n assertThat(reservation.getStatus(), is(ReservationStatus.CANCELLED));\n }",
"@Test\n public void testGameStateStack_OnPlayState(){\n\n System.out.println(gsm.getCurrentState());\n }",
"void notifyConnectionStateChanged(State state);",
"private void setMockControlStateToReplay() {\n this.xmlRpcElementFactoryControl.replay();\n this.xmlRpcRequestParserControl.replay();\n this.xmlRpcResponseWriterControl.replay();\n this.xmlRpcServiceExporterControl.replay();\n }",
"void state_REQState(){\r\n eccState = INDEX_REQState;\r\n alg_REQAlg();\r\n CNF.serviceEvent(this);\r\n state_START();\r\n}",
"@Test\r\n\tpublic void testChangesNotification() throws Exception {\r\n\t\tfinal AdvancedExampleComponent component = new AdvancedExampleComponent();\r\n\t\tfinal XMLBasedPropertyContainer container = new XMLBasedPropertyContainer(XMLBasedPropertyProvider\r\n\t\t\t\t.getInstance().getMetaPropertiesSet(component.getClass()), component);\r\n\r\n\t\tIChangesNotifierMonitor monitorMock = createMock(IChangesNotifierMonitor.class);\r\n\r\n\t\tmonitorMock.objectChanged(same(container), isA(ObjectChangedEvent.class));\r\n\t\texpectLastCall().once();\r\n\r\n\t\treplay(monitorMock);\r\n\r\n\t\tcontainer.addMonitor(monitorMock);\r\n\t\t// Won't work, because \"intProperty\" is served by XMLSetterGetterProperty which doesn't support monitoring.\r\n\t\t// container.getProperty(\"intProperty\").setValue(3);\r\n\t\t// Works, because \"floatProperty\" is served by XMLFieldProperty which support monitoring.\r\n\t\tcontainer.getProperty(\"floatProperty\").setValue(3);\r\n\t\tverify(monitorMock);\r\n\r\n\t}",
"void onStatusChanged(Status newStatus);",
"@Override\n\tpublic void stateChanged() {\n\t\t\n\t}",
"public abstract void stateChanged(STATE state);",
"int getMqttEnabledStateValue();",
"@Override\n public void syncState() {\n scheduledCounter.check();\n }",
"@Override\n public void run() {\n assertEquals(3, state.get());\n latch2.countDown();\n }",
"@Test\n public void setGetStatus() {\n final CourseType courseType = new CourseType();\n final Integer STATUS = 1;\n courseType.setStatus(STATUS);\n\n assertSame(STATUS, courseType.getStatus());\n }",
"private void getStatus() {\n\t\t\n\t}",
"@Test\n\tpublic void checkStatus() {\n\t\tclient.execute(\"1095C-16-111111\");\n\t}",
"public void testFirePropertyChangeEvent() {\n ModelElementChangeListenerMock listener = new ModelElementChangeListenerMock();\n instance.addModelElementChangeListener(listener);\n instance.firePropertyChangeEvent(new GuardImpl(), PropertyKind.ACTIVE, PropertyOperation.MODIFY, \"accuracy\");\n assertTrue(\"Failed to fire the event.\", listener.IsCalled());\n }",
"@Test\n public void roundTrip() throws RemoteException {\n mHbmController.enable(mOnEnabled);\n\n // Should set the appropriate refresh rate for UDFPS and notify the caller.\n verify(mDisplayCallback).onHbmEnabled(eq(DISPLAY_ID));\n verify(mOnEnabled).run();\n\n // Disable the UDFPS mode.\n mHbmController.disable(mOnDisabled);\n\n // Should unset the refresh rate and notify the caller.\n verify(mOnDisabled).run();\n verify(mDisplayCallback).onHbmDisabled(eq(DISPLAY_ID));\n }",
"private static void waitChanged() throws InterruptedException {\n synchronized (CONNECTIONS_CHANGE_FIRED) {\n if (!CONNECTIONS_CHANGE_FIRED.get()) {\n CONNECTIONS_CHANGE_FIRED.wait(10000);\n }\n }\n // reset property\n CONNECTIONS_CHANGE_FIRED.set(false);\n }",
"public void testIsLive() {\n boolean result = true;\n \n sessionControl.expectAndReturn(session.isLive(), result);\n sessionControl.replay();\n sfControl.replay();\n \n assertEquals(jt.isLive(), result);\n }",
"com.polytech.spik.protocol.SpikMessages.StatusChangedOrBuilder getStatusChangedOrBuilder();",
"private void verifyChanges() {\n System.out.println(\"Verify changes\"); \n }",
"boolean hasStateChange();",
"@Test\n public void testReplicatedBm()\n {\n generateEvents(\"repl-bm-test\");\n checkEvents(false, true);\n BackingMapListener.INSTANCE.assertContext();\n }",
"@Test\n public void testReplicatedClient()\n {\n generateEvents(\"repl-client-test\");\n checkEvents(true, false);\n }",
"public void test3_2ParameterChangedListener() throws Exception {\n synchronized(mLock) {\n mInitialized = false;\n createListenerLooper(false, false, true);\n waitForLooperInitialization_l();\n\n getReverb(0);\n mChangedParameter = -1;\n mReverb.setRoomLevel((short)0);\n\n int looperWaitCount = MAX_LOOPER_WAIT_COUNT;\n while ((mChangedParameter == -1) && (looperWaitCount-- > 0)) {\n try {\n mLock.wait();\n } catch(Exception e) {\n }\n }\n terminateListenerLooper();\n releaseReverb();\n }\n assertEquals(\"parameter change not received\",\n EnvironmentalReverb.PARAM_ROOM_LEVEL, mChangedParameter);\n }",
"@Test\n public void startPollingAuthStatusSuccess() throws Exception {\n // Arrange\n TestSubscriber<String> subscriber = new TestSubscriber<>();\n when(mAccess.getSessionId(anyString())).thenReturn(STRING_TO_RETURN);\n when(mAccess.getEncryptedPayload(anyString(), anyString())).thenReturn(STRING_TO_RETURN);\n // Act\n mSubject.startPollingAuthStatus(\"1234567890\").toBlocking().subscribe(subscriber);\n // Assert\n verify(mAccess).getSessionId(anyString());\n verify(mAccess).getEncryptedPayload(anyString(), anyString());\n subscriber.assertCompleted();\n subscriber.onNext(STRING_TO_RETURN);\n subscriber.assertNoErrors();\n }",
"@Override\n public int checkStatus(){\n return InputOutputController.STATUS_READY;\n }",
"protected boolean statusIs(String state)\n { return call_state.equals(state); \n }",
"@Test\n\tpublic void checkReady_test1()\n\t{\n\t\tb.set(0,0, 'x');\n\t\tb.set(0,1, 'o');\n\t\tb.set(1,0, 'x');\n\t\tb.set(0,2, 'o');\n\t\tb.set(2,0, 'x');\n\t\tassertTrue(b.checkReady());\n\t}",
"private synchronized void UI_RefreshConnStatus ()\r\n\t{\r\n\t\tTCPClient used=null;\r\n\t\tsynchronized (this)\r\n\t\t{\r\n\t\t\tused=_roboCOM;\r\n\t\t}\r\n\t\tLog.e(TAG, \"Is conection Active ACCE : \" + isConnectionActive());\r\n\t\t\r\n\t\tif (!isConnecting())\r\n\t\t{\r\n\t\t\tif (old_conn_status==-2) return;\r\n\t\t\told_conn_status=-2;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\tif (used!=null)\r\n\t\t{\r\n\t\t\tif (old_conn_status!=used.getConnStatus())\r\n\t\t\t{\r\n\t\t\t\told_conn_status=used.getConnStatus();\r\n\t\t\t\tLog.e(TAG,\"Connections Status ACCE : \" + used.getConnStatusStr());\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"@Test\n\tpublic void testUpdateStatusbarValue() {\n\t}",
"@Test\n\tpublic void validName_changeState() throws IOException {\n\t\tint responseCode = 200;\n\t\tmainItem.changeState(\"lamp_woonkamer\", \"OFF\");\n\t\tassertTrue(mainItem.getConnection().getResponseCode() == responseCode);\n\t}",
"@Test\n public void testOnEnterState() throws Exception {\n test.onEnterState(mockEcho);\n assertEquals(mockEchoGUI.currentLights, EchoLights.RESPONDING);\n assertEquals(mockEcho.currentState().getClass(), OnOff.class);\n }",
"Boolean getIsChanged();",
"public void statusRegisterUpdated()\n {\n Word newStatus = memory.read( Memory.OS_DDSR );\n\n // Check if this change entails the clearing of the Ready bit\n if( ( currentStatus.getValue() & DISK_READY_BIT ) != 0 )\n {\n if( (newStatus.getValue() & DISK_READY_BIT ) == 0 )\n {\n // We should initiate a new operation\n Word commandRegister = memory.read( Memory.OS_DDCR );\n Word blockRegister = memory.read( Memory.OS_DDBR );\n Word memoryRegister = memory.read( Memory.OS_DDMR );\n\n switch( commandRegister.getValue() )\n {\n case READ_COMMAND:\n handleReadDisk( blockRegister.getValue(), memoryRegister.getValue() );\n break;\n\n case WRITE_COMMAND:\n handleWriteDisk( blockRegister.getValue(), memoryRegister.getValue() );\n break;\n }\n\n // Now we just need to set the ready bit\n currentStatus = new Word( newStatus.getValue() | DISK_READY_BIT );\n memory.write( Memory.OS_DDSR, currentStatus.getValue() );\n\n }\n }\n }",
"@Test\n public void testInterfaceState() throws Exception {\n isisNeighbor.setNeighborState(IsisInterfaceState.DOWN);\n isisInterfaceState = isisNeighbor.neighborState();\n assertThat(isisInterfaceState, is(IsisInterfaceState.DOWN));\n }",
"public abstract void clientStatusChanged(ClientManager client, Object object);",
"protected void stateChanged() {\r\n\t\tsetChanged();\r\n\t\tnotifyObservers();\r\n\t}",
"boolean hasShotChangeDetectionConfig();",
"public void isChanged()\n\t{\n\t\tchange = true;\n\t}",
"protected synchronized void setChanged() {\n changed = true;\n }",
"@Test\n //checks for state switching (on/off)\n void SwitchStates() {\n Assertions.assertFalse(machine.isTurnedOn());\n\n //then, switch on and check if on\n machine.setTurnedOn(true);\n Assertions.assertTrue(machine.isTurnedOn());\n\n //switch off to see if turned off correctly\n machine.setTurnedOn(false);\n Assertions.assertFalse(machine.isTurnedOn());\n\n //and now check the inversion\n machine.flipSwitch();\n\n Assertions.assertTrue(machine.isTurnedOn());\n }",
"@Test\n public void startPollingAuthStatusAccessRequired() throws Exception {\n // Arrange\n TestSubscriber<String> subscriber = new TestSubscriber<>();\n when(mAccess.getSessionId(anyString())).thenReturn(STRING_TO_RETURN);\n when(mAccess.getEncryptedPayload(anyString(), anyString())).thenReturn(Access.KEY_AUTH_REQUIRED);\n // Act\n mSubject.startPollingAuthStatus(\"1234567890\").take(1, TimeUnit.SECONDS).toBlocking().subscribe(subscriber);\n // Assert\n subscriber.assertCompleted();\n subscriber.assertNoValues();\n subscriber.assertNoErrors();\n }",
"public void update() \n {\n System.out.print( \" \" + Integer.toHexString( subj.getState() ) ); \n}",
"public int getRC() {\n return this.rc;\n }",
"@Test\n public void testSetUpdateState_ChangeFromSubscribeAndListen() {\n indexDefinition.setUpdateState(IndexUpdateState.SUBSCRIBE_DO_NOT_LISTEN);\n indexDefinition.setSubscriptionTimestamp(42);\n\n indexDefinition.setUpdateState(IndexUpdateState.SUBSCRIBE_AND_LISTEN);\n assertEquals(42, indexDefinition.getSubscriptionTimestamp());\n }",
"public boolean wasChangeDetected() {\n return bChangeDetected;\n }",
"private static synchronized void checkAndUpdateComponentState(\n Component component, boolean isIncrement) {\n\n if (component.getRestartPolicyHandler().isLongLived()) {\n if (isIncrement) {\n // check if all containers are in READY state\n if (!component.upgradeStatus.areContainersUpgrading() &&\n !component.cancelUpgradeStatus.areContainersUpgrading() &&\n component.componentMetrics.containersReady.value() ==\n component.componentMetrics.containersDesired.value()) {\n component.setComponentState(\n org.apache.hadoop.yarn.service.api.records.ComponentState.STABLE);\n // component state change will trigger re-check of service state\n component.context.getServiceManager().checkAndUpdateServiceState();\n }\n } else{\n // container moving out of READY state could be because of FLEX down so\n // still need to verify the count before changing the component state\n if (component.componentMetrics.containersReady.value()\n < component.componentMetrics.containersDesired.value()) {\n component.setComponentState(\n org.apache.hadoop.yarn.service.api.records.ComponentState\n .FLEXING);\n } else if (component.componentMetrics.containersReady.value()\n == component.componentMetrics.containersDesired.value()) {\n component.setComponentState(\n org.apache.hadoop.yarn.service.api.records.ComponentState.STABLE);\n }\n // component state change will trigger re-check of service state\n component.context.getServiceManager().checkAndUpdateServiceState();\n }\n } else {\n // component state change will trigger re-check of service state\n component.context.getServiceManager().checkAndUpdateServiceState();\n }\n // triggers the state machine in component to reach appropriate state\n // once the state in spec is changed.\n component.dispatcher.getEventHandler().handle(\n new ComponentEvent(component.getName(),\n ComponentEventType.CHECK_STABLE));\n }",
"public static void crdHasTheExpectedInitialState(KubernetesClient client) {\n for (String kind : AbstractCommand.STRIMZI_KINDS) {\n String crdName = CrdUpgradeCommand.CRD_NAMES.get(kind);\n CustomResourceDefinition crd = client.apiextensions().v1beta1().customResourceDefinitions().withName(crdName).get();\n\n List<String> allVersions = crd.getSpec().getVersions().stream().map(CustomResourceDefinitionVersion::getName).collect(toList());\n List<String> storedVersions = crd.getSpec().getVersions().stream().filter(CustomResourceDefinitionVersion::getStorage).map(CustomResourceDefinitionVersion::getName).collect(toList());\n List<String> servedVersions = crd.getSpec().getVersions().stream().filter(CustomResourceDefinitionVersion::getServed).map(CustomResourceDefinitionVersion::getName).collect(toList());\n\n assertThat(storedVersions, hasItem(not(\"v1beta2\")));\n assertThat(storedVersions, hasItem(oneOf(\"v1alpha1\", \"v1beta1\")));\n assertThat(servedVersions, is(allVersions));\n\n assertThat(crd.getStatus().getStoredVersions(), hasItem(not(\"v1beta2\")));\n assertThat(crd.getStatus().getStoredVersions(), hasItem(oneOf(\"v1alpha1\", \"v1beta1\")));\n }\n }",
"void changed(State state, Exception e);",
"public int getCBRStatus();",
"@Override\n public void onStateChanged(boolean changed, BranchError error) {\n int credits = Branch.getInstance(getApplicationContext()).getCredits();\n Toast.makeText(getApplicationContext(), \"You have : \" + credits + \" credits.\",\n Toast.LENGTH_LONG).show();\n }",
"@Override\r\n\t\t\tpublic void onReadyChange(boolean ready) {\n\r\n\t\t\t}",
"private void changed() {\n // Ok to have a race here, see the field javadoc.\n if (!changed)\n changed = true;\n }",
"void controllerChangeReceived(rwmidi.Controller cntrl){\n\t println(\"cc recieved\");\n\t println(\": \" + cntrl.getCC()) ;\n\n\t \n\t if(cntrl.getCC() == 2){\n\t modThresh1(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() == 3){\n\t modThresh2(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() ==4){\n\t modThresh3(cntrl.getValue()); /// adjust threshold1\n\t }\n\t \n\t if(cntrl.getCC() == 5){ //// adjust skip\n\t modSkip(cntrl.getValue());\n\t }\n\t \n\t if(cntrl.getCC() == 6){ /// adjus scale\n\t modScale(cntrl.getValue());\n\t }\n\t}",
"public boolean isClockChangeCalled();",
"@Override\n\tpublic void getStatus() {\n\t\t\n\t}",
"@Test\n public void testClaimCurrStatus() {\n new ClaimFieldTester()\n .verifyEnumFieldStringValueExtractedCorrectly(\n FissClaim.Builder::setCurrStatusEnum,\n claim -> String.valueOf(claim.getCurrStatus()),\n FissClaimStatus.CLAIM_STATUS_MOVE,\n \"M\")\n .verifyStringFieldCopiedCorrectly(\n FissClaim.Builder::setCurrStatusUnrecognized,\n claim -> String.valueOf(claim.getCurrStatus()),\n RdaFissClaim.Fields.currStatus,\n 1);\n }",
"@Test\n public void test5() throws Exception {\n CuratorFramework client = ZKConfig.getClient();\n final NodeCache nodeCache = new NodeCache(client, \"/test/test1\", false);\n nodeCache.getListenable().addListener(new NodeCacheListener() {\n @Override\n public void nodeChanged() throws Exception {\n logger.info(\"getCurrentData:\" + nodeCache.getCurrentData());\n logger.info(\"stat : \"+nodeCache.getCurrentData().getStat());\n logger.info(\"path : \"+nodeCache.getCurrentData().getPath());\n logger.info(\"data : \"+new String(nodeCache.getCurrentData().getData()));\n }\n });\n nodeCache.start();\n while(true);\n }",
"boolean connected(int p, int q) {return false; /*mock*/}",
"public void test2_0SetEnabledGetEnabled() throws Exception {\n getReverb(0);\n try {\n mReverb.setEnabled(true);\n assertTrue(\"invalid state from getEnabled\", mReverb.getEnabled());\n mReverb.setEnabled(false);\n assertFalse(\"invalid state to getEnabled\", mReverb.getEnabled());\n } catch (IllegalStateException e) {\n fail(\"setEnabled() in wrong state\");\n } finally {\n releaseReverb();\n }\n }"
] | [
"0.621207",
"0.61297196",
"0.60783434",
"0.60195595",
"0.59558666",
"0.5909008",
"0.5829878",
"0.5819812",
"0.57991546",
"0.57934767",
"0.57587844",
"0.5744347",
"0.57083946",
"0.5682108",
"0.5644742",
"0.5607703",
"0.5588742",
"0.55874306",
"0.55556166",
"0.553713",
"0.55358464",
"0.55226845",
"0.55185896",
"0.55025965",
"0.54825634",
"0.5475394",
"0.54686093",
"0.54671824",
"0.5462046",
"0.5453541",
"0.54486763",
"0.5431387",
"0.5430561",
"0.5420185",
"0.5419497",
"0.5418117",
"0.5414102",
"0.5409167",
"0.5400228",
"0.53938323",
"0.5387524",
"0.53809214",
"0.53776",
"0.53713757",
"0.5362826",
"0.53528434",
"0.5344855",
"0.5341834",
"0.5335317",
"0.53351444",
"0.53328246",
"0.53208745",
"0.53193647",
"0.5318674",
"0.5299529",
"0.5299242",
"0.5297765",
"0.52953863",
"0.52939767",
"0.5288847",
"0.5288662",
"0.5284107",
"0.5271512",
"0.52580744",
"0.5254475",
"0.5248404",
"0.5234377",
"0.5232122",
"0.52238905",
"0.5222893",
"0.5221349",
"0.5220531",
"0.5220328",
"0.52138597",
"0.52046025",
"0.5197564",
"0.51933044",
"0.5172517",
"0.5169712",
"0.51614296",
"0.5159955",
"0.51599425",
"0.5155297",
"0.5153577",
"0.51535445",
"0.5138737",
"0.51348376",
"0.5131458",
"0.5125542",
"0.5118951",
"0.5118356",
"0.5115523",
"0.5113611",
"0.5113328",
"0.51127255",
"0.51122683",
"0.51113635",
"0.5109817",
"0.5100607",
"0.50987196"
] | 0.73873 | 0 |
if (WidgetDataBiz.getInstance(mContext).hasWidget(mContext)) sendStickyBroadcast(new Intent(Const.Widget.REFRESH_WIDGET_LIVE)); | @Override
protected void onStop() {
super.onStop();
PvBasicStateDataBiz.BASEFLAG = true;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_modu);\n\n String TAG = \"Modu\";\n SharedPreferences sharedPreferences = context.getSharedPreferences(TAG, Context.MODE_PRIVATE);\n\n Intent intent = new Intent(context, Splash.class);\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_SINGLE_TOP);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n\n ArrayList<HomeItem> homeItemList = new ArrayList<>();\n String homeList = sharedPreferences.getString(\"homeList\", \"\");\n Type listType = new TypeToken<ArrayList<HomeItem>>() {\n }.getType();\n\n Gson gson = new GsonBuilder().create();\n if (gson.fromJson(homeList, listType) != null) {\n homeItemList = gson.fromJson(homeList, listType);\n }\n\n if(homeItemList.size() == 0) {\n Log.d(\"로그\", \"widget show no item\");\n views.setTextViewText(R.id.tv_widget_day, \"\");\n views.setTextViewText(R.id.tv_widget_name, \"\");\n views.setTextViewText(R.id.tv_widget_price, \"등록된 상품이 없습니다.\");\n views.setOnClickPendingIntent(R.id.widget_box, pendingIntent);\n appWidgetManager.updateAppWidget(appWidgetId, views);\n return;\n }\n\n int index = 0;\n int count = 0;\n int min_day = homeItemList.get(0).getmDDay();\n for(int i=0; i< homeItemList.size(); i++){\n HomeItem item = homeItemList.get(i);\n if(item.getmDDay() < min_day){\n min_day = item.getmDDay();\n index = i;\n count = 0;\n }else if (item.getmDDay() == min_day){\n count += 1;\n }\n }\n\n views.setTextViewText(R.id.tv_widget_day, \"D-\".concat(String.valueOf(min_day)));\n views.setTextViewText(R.id.tv_widget_price, myFormatter.format(homeItemList.get(index).getmPrice()).concat(context.getResources().getString(R.string.tv_main_won)));\n views.setTextViewText(R.id.tv_widget_name, homeItemList.get(index).getmBrand());\n views.setOnClickPendingIntent(R.id.widget_box, pendingIntent);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"@Override\n public void onReceive(Context context, Intent intent) {\n if (LOGD)\n Log.d(TAG, \"OTDWidgetProvider got the action:\" + intent.getAction() + \" intent: \" + intent.toString());\n super.onReceive(context, intent);\n\n AppWidgetManager mgr = AppWidgetManager.getInstance(context);\n\n int appWidgetId = intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID,\n AppWidgetManager.INVALID_APPWIDGET_ID);\n\n if (intent.getAction().equals(RUN_ACTION)) {\n\n String extra = intent.getStringExtra(EXTRA_ITEM);\n Toast.makeText(context, \"Touched view \" + extra, Toast.LENGTH_SHORT).show();\n\n } else if (intent.getAction().equals(ACTION_DATE_CHANGED)) {\n int[] appWidgetIds = mgr.getAppWidgetIds(\n new ComponentName(context, OTDWidgetProvider.class)\n );\n for (int i = 0; i < appWidgetIds.length; i++) {\n updateAppWidget(context, mgr, appWidgetIds[i], false);\n }\n\n } else if (intent.getAction().equals(ACTION_REFRESH)) {\n Log.d(TAG, \"OTDWidgetProvider catch the intent: \" + intent.toString());\n\n refreshData(intent, context);\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);\n updateAppWidget(context, appWidgetManager, appWidgetId, false);\n\n } else if (intent.getAction().equals(ATDAppWidgetService.ACTION_IMAGE_LOADED)) {\n if (LOGD)\n Log.d(TAG, \" Image loaded ! widgetId:\" + intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID));\n\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);\n updateAppWidget(context, appWidgetManager, appWidgetId, false);\n\n }else if(intent.getAction().equals(ACTION_RATE)){\n //save action\n SettingsActivity.setNeedRate(context, false);\n\n Intent nIntent;\n\n try {\n nIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"market://details?id=\" + WIDGET_PACKAGE));\n } catch (android.content.ActivityNotFoundException anfe) {\n nIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://play.google.com/store/apps/details?id=\" + WIDGET_PACKAGE));\n }\n nIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(nIntent);\n\n int[] appWidgetIds = mgr.getAppWidgetIds(\n new ComponentName(context, OTDWidgetProvider.class)\n );\n for (int i = 0; i < appWidgetIds.length; i++) {\n updateAppWidget(context, mgr, appWidgetIds[i], false);\n }\n\n }else if(intent.getAction().equals(ACTION_RATE_NO)){\n //save action\n SettingsActivity.setNeedRate(context, false);\n\n int[] appWidgetIds = mgr.getAppWidgetIds(\n new ComponentName(context, OTDWidgetProvider.class)\n );\n for (int i = 0; i < appWidgetIds.length; i++) {\n updateAppWidget(context, mgr, appWidgetIds[i], false);\n }\n\n } else if (intent.getAction().equals(ATDAppWidgetService.ACTION_NO_DATA)) {\n if (LOGD)\n Log.d(TAG, \"No data received\" + intent.getIntExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID));\n\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);\n updateAppWidget(context, appWidgetManager, appWidgetId, true);\n } else {\n //super.onReceive(context, intent);\n }\n\n }",
"void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.yotacast);\n\n // Start/Stop\n PendingIntent pendingIntent;\n Intent intent = new Intent(context, MainActivity.class);\n intent.setAction(ACTION_UPDATE_CLICK);\n pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.buttonPlay, pendingIntent);\n\n // PREV\n PendingIntent pendingIntentPrev;\n Intent intentPrev = new Intent(context, MainActivity.class);\n intentPrev.setAction(ACTION_PREV_CLICK);\n pendingIntentPrev = PendingIntent.getActivity(context, 0, intentPrev, 0);\n views.setOnClickPendingIntent(R.id.buttonPrev, pendingIntentPrev);\n\n // FWD\n PendingIntent pendingIntentFwd;\n Intent intentFwd = new Intent(context, MainActivity.class);\n intentFwd.setAction(ACTION_FWD_CLICK);\n pendingIntentFwd = PendingIntent.getActivity(context, 0, intentFwd, 0);\n views.setOnClickPendingIntent(R.id.buttonFwd, pendingIntentFwd);\n\n // BACK\n PendingIntent pendingIntentBack;\n Intent intentBack = new Intent(context, MainActivity.class);\n intentBack.setAction(ACTION_BACK_CLICK);\n pendingIntentBack = PendingIntent.getActivity(context, 0, intentBack, 0);\n views.setOnClickPendingIntent(R.id.buttonBack, pendingIntentBack);\n\n\n // Toggle alert\n PendingIntent pendingIntentAlarm;\n Intent intentAlarm = new Intent(context, MainActivity.class);\n intentAlarm.setAction(ACTION_ALARM_CLICK);\n pendingIntentAlarm = PendingIntent.getActivity(context, 0, intentAlarm, 0);\n views.setOnClickPendingIntent(R.id.alarm, pendingIntentAlarm);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"private void notifyWidget() {\n if (getActivity() != null) {\n ComponentName widget = new ComponentName(getActivity().getApplication(),\n RecipeWidgetProvider.class);\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(getActivity());\n int[] ids = appWidgetManager.getAppWidgetIds(widget);\n appWidgetManager.notifyAppWidgetViewDataChanged(ids, R.id.widget_list);\n RecipeWidgetProvider widgetProvider = new RecipeWidgetProvider();\n widgetProvider.updateWidget(getActivity().getApplication(), ids);\n }\n }",
"@Override\n protected void onHandleIntent(Intent intent) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,\n TodayWidgetProvider.class));\n Context context = getApplicationContext();\n\n //Only today.\n Date fragmentdate = new Date(System.currentTimeMillis());\n SimpleDateFormat mformat = new SimpleDateFormat(\n getString(R.string.pager_fragment_date_format_1));\n dateString[0] = mformat.format(fragmentdate);\n\n Uri uri = DatabaseContract.ScoresTable.buildScoreWithDate();\n Cursor cursor = getContentResolver().query(uri, PROJECTION_COLUMNS, null, dateString,\n DatabaseContract.ScoresTable.DATE_COL + \" DESC\");\n\n\n if (cursor != null) {\n if (cursor.moveToFirst())\n buildString(cursor);\n cursor.close();\n }\n\n for (int appWidgetId : appWidgetIds) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_today_small);\n\n views.setTextViewText(R.id.widget_score, scoreContent);\n views.setImageViewResource(R.id.widget_icon, R.drawable.ic_launcher);\n\n //Intent to launch MainActivity\n Intent launchIntent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, launchIntent, 0);\n views.setOnClickPendingIntent(R.id.widget, pendingIntent);\n\n //Update Widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n\n Log.d(\"TodayWidgetUpdate\", \"service updated\");\n\n\n }",
"@Override\r\n\t public void onReceive(Context context, Intent intent) {\r\n\t final String action = intent.getAction();\r\n\t if (action.equals(AppWidgetManager.ACTION_APPWIDGET_DELETED)) {\r\n\t final int appWidgetId = intent.getExtras().getInt(AppWidgetManager.EXTRA_APPWIDGET_ID, AppWidgetManager.INVALID_APPWIDGET_ID);\r\n\t if (appWidgetId != AppWidgetManager.INVALID_APPWIDGET_ID) {\r\n\t this.onDeleted(context, new int[] { appWidgetId });\r\n\t }\r\n\t } else if (action.equals(ACTION_WIDGET_CONTROL)) {\r\n\t \tUri uri = intent.getData();\r\n\t \tRect widget_pos = intent.getSourceBounds();\r\n\t \tint widget_id = Integer.parseInt(uri.getQueryParameter(\"widget_id\"));\r\n\t if (widget_id != AppWidgetManager.INVALID_APPWIDGET_ID) {\r\n\t \tmake_widget_action(context, widget_id, widget_pos);\r\n\t }\t\r\n\t } else if (action.equals(ACTION_UPDATE_WIDGET_CONTEXT)) {\r\n\t \tUri uri = intent.getData();\r\n\t \tint widget_id = Integer.parseInt(uri.getQueryParameter(\"widget_id\"));\r\n\t if (widget_id != AppWidgetManager.INVALID_APPWIDGET_ID) { \t\r\n\t \tRemoteViews remote_views = new RemoteViews(context.getPackageName(), R.layout.widget);\r\n\t \tWidgetInstanceManager wim = get_instance(widget_id);\r\n\t \twim.ReinitializeWidgetBitmap(context);\r\n\t \t\tupdate_widget_view(AppWidgetManager.getInstance(context), widget_id, remote_views);\r\n\t } else super.onReceive(context, intent);\t\r\n\t } else {\r\n\t super.onReceive(context, intent);\r\n\t }\r\n\t }",
"@Override\n\tpublic void onUpdate(Context context, AppWidgetManager appWidgetManager,\n\t\t\tint[] appWidgetIds) {\n\t\tIntent intent_mainactivity = new Intent(context, StartActivity.class);\n\t\tPendingIntent pendingintent_mainactivity = PendingIntent.getActivity(context, 0, intent_mainactivity, 0);\n\t\t\n\t\tComponentName componentName = new ComponentName(context, PlayWidget.class);\n\t\twidget_view = new RemoteViews(context.getPackageName(), R.layout.widget);\n\t\twidget_view.setOnClickPendingIntent(R.id.widget_imageView, pendingintent_mainactivity);\n\t\t\n\t\t\n\t\tif(!MainService.isPlay){\n\t\t\twidget_view.setOnClickPendingIntent(R.id.ic_media_play, \n\t\t\t\t\tPendingIntent.getBroadcast(context, 1, new Intent(MainService.NOTIFY_PLAY), 0));\n\t\t\twidget_view.setViewVisibility(R.id.ic_media_stop, View.GONE);\n\t\t\twidget_view.setViewVisibility(R.id.ic_media_play, View.VISIBLE);\n\t\t} else {\n\t\t\twidget_view.setOnClickPendingIntent(R.id.ic_media_stop, \n\t\t\t\t\tPendingIntent.getBroadcast(context, 1, new Intent(MainService.NOTIFY_STOP), 0));\n\t\t\twidget_view.setViewVisibility(R.id.ic_media_play, View.GONE);\n\t\t\twidget_view.setViewVisibility(R.id.ic_media_stop, View.VISIBLE);\n\t\t}\n\t\t\n\t\twidget_view.setOnClickPendingIntent(R.id.ic_media_next, \n\t\t\t\tPendingIntent.getBroadcast(context, 1, new Intent(MainService.NOTIFY_NEXT), 0));\n\t\twidget_view.setOnClickPendingIntent(R.id.ic_media_previous, \n\t\t\t\tPendingIntent.getBroadcast(context, 1, new Intent(MainService.NOTIFY_PRE), 0));\n\n\t\tIntent intent = new Intent(context, RemoteViewService.class);\n\t\tintent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds);\n\t\twidget_view.setRemoteAdapter(R.id.widget_listview, intent);\n\n\t\tintent.setAction(COLLECTION_VIEW_ACTION);\n\t\tintent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds);\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\n // 设置intent模板\n widget_view.setPendingIntentTemplate(R.id.widget_listview, pendingIntent);\n\n\t\tupdate(list.get(listitem));\n\n\t\tappWidgetManager.updateAppWidget(componentName, widget_view);\n\t\t\n\t}",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n Intent buttonIntent = new Intent(context, PassiveJammerService.class);\n buttonIntent.setAction(ACTION_WIDGET_PASSIVE);\n PendingIntent pendingButtonIntent = PendingIntent.getService(context, 0, buttonIntent, 0);\n\n // wrap the whole widget layout in a view to capture button and text touch\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.passive_control_widget);\n views.setOnClickPendingIntent(R.id.passive_control_button, pendingButtonIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n //TODO check and start the Passive service to account for Android 11\n // can't create widget on screen if service already running...\n Log.d(\"PS_WIDGET\", \"press the button and update!\");\n\n /*\n Intent mainIntent = new Intent(context, MainActivity.class);\n mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(mainIntent);\n */\n\n\n ActivityManager manager = (ActivityManager) context.getSystemService(ACTIVITY_SERVICE);\n assert manager != null;\n for (ActivityManager.RunningServiceInfo service : manager.getRunningServices(Integer.MAX_VALUE)) {\n if (PassiveJammerService.class.getName().equals(service.service.getClassName())) {\n Toast.makeText(context, \"service already running\", Toast.LENGTH_SHORT).show();\n Log.d(\"PS_WIDGET\", \"service running\");\n }\n else {\n // Sam4 said service NOT started when it was, still worked though\n Toast.makeText(context, \"service NOT started\", Toast.LENGTH_SHORT).show();\n Log.d(\"PS_WIDGET\", \"service NOT running\");\n }\n }\n }\n }",
"@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tsuper.onReceive(context, intent);\n\n\t\tif (TASK_WIDGET_UPDATE.equals(intent.getAction())) {\n\t\t\tLog.d(LOG_TAG, \"Widget update\");\n\n DbAdapter dba = new DbAdapter(context);\n dba=dba.OpentoRead();\n\n mytasks = dba.getAllTasks();\n\n dba.Close();\n\n\t\t\t// Get the widget manager and ids for this widget provider, then call the shared\n\t\t\t// clock update method.\n\t\t\tComponentName thisAppWidget = new ComponentName(context.getPackageName(), getClass().getName());\n\t\t AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);\n\t\t int ids[] = appWidgetManager.getAppWidgetIds(thisAppWidget);\n\t\t for (int appWidgetID: ids) {\n\t\t\t\tupdateAppWidget(context, appWidgetManager, appWidgetID);\n\t\t \t\n\t\t }\n\t\t}\n\t}",
"@Override\n public void onEnabled(Context context) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(context);\n CharSequence widgetText = context.getString(R.string.appwidget_text);\n RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.my_widget);\n remoteViews.setTextViewText(R.id.widgetText, widgetText);\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_ONE_SHOT);\n remoteViews.setOnClickPendingIntent(R.id.widgetLogo, pendingIntent);\n ComponentName componentName = new ComponentName(context, MyWidget.class);\n appWidgetManager.updateAppWidget(componentName, remoteViews);\n }",
"@Override\r\n\t\tpublic void onUpdate(Context context, AppWidgetManager appWidgetManager,\r\n\t\t\t\tint[] appWidgetIds) {\n\t\t\tsuper.onUpdate(context, appWidgetManager, appWidgetIds);\r\n\t\t\tif(li!=null&&li.size()!=0){\r\n\t\t\t\t\r\n\t\t\t\tRemoteViews views=getTimeView(context);\r\n\t\t\t\tappWidgetManager.updateAppWidget(appWidgetIds, views);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tcontext.startService(new Intent(context,TimeService.class));\r\n\t\t\t\r\n\t\t\t//Log.v(\"sinanews\", \"sinanews service nnnnnnnnn\");\r\n\t\t}",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId, Integer color) {\n\n Log.d(TAG, \"updateAppWidget() \"+mybroadcast.isOrderedBroadcast());\n if(!mybroadcast.isOrderedBroadcast()){\n Log.d(TAG, \"registerReceiver()\");\n IntentFilter filter = new IntentFilter(Intent.ACTION_SCREEN_ON);\n filter.addAction(Intent.ACTION_SCREEN_OFF);\n context.getApplicationContext().registerReceiver(mybroadcast, filter);\n }\n\n // Construct the RemoteViews object\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.main_frame);\n\n // PINTAR RELOJ Y MANTENER UN MINUTO\n\n\n Paint paint = new Paint(Paint.ANTI_ALIAS_FLAG);\n paint.setStyle(Paint.Style.STROKE);\n paint.setStrokeWidth(paint.getStrokeWidth() + 8);\n paint.setColor(color);\n\n Bitmap bmp = Bitmap.createBitmap(110, 55, Bitmap.Config.ARGB_4444);\n Canvas canvas = new Canvas(bmp);\n canvas.drawCircle(canvas.getWidth() / 2, canvas.getHeight() / 2, canvas.getHeight() / 3, paint);\n\n views.setImageViewBitmap(R.id.image_view, bmp);\n //views.setTextViewText(R.id.appwidget_text, widgetText);\n ComponentName component = new ComponentName( context, MainFrame.class);\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.image_view);\n appWidgetManager.updateAppWidget(component, views);\n\n }",
"private void updateAppWidget(Context context, AppWidgetManager appWidgetManager, int appWidgetId)\n {\n RemoteViews views=new RemoteViews(context.getPackageName(), R.layout.new_app_widget);\n\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int i = 0; i < appWidgetIds.length; ++i) {\n\n Intent intent = new Intent(context, WidgetService.class);\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n\n final RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.widget_item);\n\n Cursor cursor = context.getContentResolver().query(ExpenseTrackerContract.WeatherEntry.CONTENT_URI, null, null, null, null);\n cursor.moveToFirst();\n\n rv.setTextViewText(R.id.tv_weather_description, cursor.getString(cursor.getColumnIndex(ExpenseTrackerContract.WeatherEntry.COLUMNS_DESCRIPTION)));\n\n double maxTemp = cursor.getDouble(cursor.getColumnIndex(ExpenseTrackerContract.WeatherEntry.COLUMNS_TEMP_MAX));\n double minTemp = cursor.getDouble(cursor.getColumnIndex(ExpenseTrackerContract.WeatherEntry.COLUMNS_TEMP_MIN));\n\n rv.setTextViewText(R.id.tv_max_min_temp, String.format(\"H %.0f\\u2103 : L %.0f\\u2103\", maxTemp, minTemp));\n Glide.with(context)\n .load(Constant.WEATHER_CONDITION_IMAGE_URL)\n .asBitmap()\n .into(new SimpleTarget<Bitmap>() {\n @Override\n public void onResourceReady(Bitmap resource, GlideAnimation<? super Bitmap> glideAnimation) {\n rv.setImageViewBitmap(R.id.iv_weather_condition_icon, resource);\n }\n });\n\n Intent toastIntent = new Intent(context, LoginActivity.class);\n PendingIntent toastPendingIntent = PendingIntent.getActivity(context, 0, toastIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n rv.setPendingIntentTemplate(R.id.container, toastPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetIds[i], rv);\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n mContext = context;\n for (int appWidgetId : appWidgetIds) {\n\n\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.my_stocks);\n Intent widgetIntent = new Intent(context, MyStocksActivity.class);\n PendingIntent pi = PendingIntent.getActivity(context, 0, widgetIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setPendingIntentTemplate(R.id.listView, pi);\n\n\n Intent i = new Intent(context, WidgetService.class);\n i.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n i.setData(Uri.parse(i.toUri(Intent.URI_INTENT_SCHEME)));\n views.setRemoteAdapter(R.id.listView, i);\n\n\n views.setEmptyView(R.id.listView, R.id.emptyList);\n\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }",
"private void onUpdate(Context context) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance\n (context);\n\n // Uses getClass().getName() rather than MyWidget.class.getName() for\n // portability into any App Widget Provider Class\n ComponentName thisAppWidgetComponentName =\n new ComponentName(context.getPackageName(), getClass().getName()\n );\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(thisAppWidgetComponentName);\n onUpdate(context, appWidgetManager, appWidgetIds);\n }",
"@TargetApi(Build.VERSION_CODES.HONEYCOMB)\n @Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager,\n int[] appWidgetIds) {\n for (int i = 0; i < appWidgetIds.length; ++i) {\n\n // Instantiate the RemoteViews object for the app widget layout.\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.widget_detail);\n\n // Create an Intent to launch MainActivity\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n rv.setOnClickPendingIntent(R.id.widget, pendingIntent);\n\n // Set up the RemoteViews object to use a RemoteViews adapter.\n // This adapter connects\n // to a RemoteViewsService through the specified intent.\n // This is how you populate the data.\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH) {\n setRemoteAdapter(context, rv);\n } else {\n setRemoteAdapterV11(context, rv);\n }\n\n //This flag is false for tablet, check sw600dp/bools.xml\n boolean useDetailActivity = context.getResources().getBoolean(R.bool.use_detail_activity);\n // Here we setup the a pending intent template. Individuals items of a collection\n // cannot setup their own pending intents, instead, the collection as a whole can\n // setup a pending intent template, and the individual items can set a fillInIntent\n // to create unique before on an item to item basis.\n Intent clickIntentTemplate = useDetailActivity ? new Intent(context, DetailActivity.class)\n : new Intent(context, MainActivity.class);\n PendingIntent clickPendingIntentTemplate = TaskStackBuilder.create(context)\n .addNextIntentWithParentStack(clickIntentTemplate)\n .getPendingIntent(0, PendingIntent.FLAG_UPDATE_CURRENT);\n rv.setPendingIntentTemplate(R.id.widget_list_view, clickPendingIntentTemplate);\n\n // The empty view is displayed when the collection has no items.\n // It should be in the same layout used to instantiate the RemoteViews\n // object above.\n rv.setEmptyView(R.id.widget_list_view, R.id.widget_list_empty_view);\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetIds[i], rv);\n }\n }",
"@Override\r\n\tpublic void onRefresh() {\n\t\tif (!isLoading) {\r\n\t\t\tbottomActivityId = 0;\r\n\t\t\tgetNotificationFromNetWork(\"1\", \"0\");\r\n\t\t}\r\n\t}",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.api_news_stand_widget);\n\n Intent intent = new Intent(context, WidgetService.class);\n\n String categoryValue = ApiNewsStandWidgetConfigureActivity.loadCategoryPref(context, appWidgetId);\n String sortByValue = ApiNewsStandWidgetConfigureActivity.loadSortByPref(context, appWidgetId);\n\n intent.putExtra(context.getString(R.string.category), categoryValue);\n intent.putExtra(context.getString(R.string.sortBy), sortByValue);\n\n intent.setData(Uri.fromParts(\"content\", String.valueOf(appWidgetId), null));\n\n views.setRemoteAdapter(R.id.widget_listView, intent);\n views.setTextViewText(R.id.Category, categoryValue);\n views.setTextViewText(R.id.SortBy, sortByValue);\n\n Intent appIntent = new Intent(context, WebViewActivity.class);\n PendingIntent appPendingIntent = PendingIntent.getActivity(context, 0,\n appIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n views.setPendingIntentTemplate(R.id.widget_listView, appPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"private static void updateAppWidget(Context context, AppWidgetManager\r\n appWidgetManager, int appWidgetId, int [] appWidgetIds) {\r\n RemoteViews remoteViews = new RemoteViews(context.getPackageName(), R.layout.astro_app_widget);\r\n\r\n AppWidgetTarget appWidgetTarget = new AppWidgetTarget(context, R.id.widget_image, remoteViews, appWidgetIds) {\r\n @Override\r\n public void onResourceReady(@NonNull Bitmap resource, @Nullable Transition<? super Bitmap> transition) {\r\n super.onResourceReady(resource, transition);\r\n }\r\n };\r\n\r\n /* Create a new intent that launches the MainActivity.class, as well as a pending Intent*/\r\n Intent intent = new Intent(context, MainActivity.class);\r\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, PendingIntent.FLAG_UPDATE_CURRENT);\r\n\r\n if (PhotoFragment.photo != null && PhotoFragment.photoUrl != null && PhotoFragment.videoUri == null) {\r\n /* If the photo exists, load it into the widget_image remote view */\r\n Uri photoUri = Uri.parse(PhotoFragment.photoUrl);\r\n\r\n if (photoUri != null) {\r\n GlideApp.with(context.getApplicationContext())\r\n .asBitmap()\r\n .load(photoUri)\r\n .placeholder(R.mipmap.ic_launcher)\r\n .transition(BitmapTransitionOptions.withCrossFade())\r\n .centerCrop()\r\n .into(appWidgetTarget);\r\n\r\n /* Set the text of the widget_image_title TextView to the photoTitle and make all\r\n * views visible */\r\n if (PhotoFragment.photoTitle != null) {\r\n remoteViews.setTextViewText(R.id.widget_image_title, PhotoFragment.photoTitle);\r\n }\r\n remoteViews.setViewVisibility(R.id.widget_image_title, View.VISIBLE);\r\n remoteViews.setViewVisibility(R.id.widget_image_label, View.VISIBLE);\r\n remoteViews.setViewVisibility(R.id.widget_image, View.VISIBLE);\r\n } else {\r\n remoteViews.setViewVisibility(R.id.widget_image_label, View.GONE);\r\n remoteViews.setViewVisibility(R.id.widget_image_title, View.GONE);\r\n remoteViews.setViewVisibility(R.id.widget_image, View.VISIBLE);\r\n remoteViews.setImageViewResource(R.id.widget_image, R.mipmap.ic_launcher);\r\n }\r\n } else {\r\n /* In case there is no photo, hide the image label and title, and show only the\r\n * ic_launcher logo */\r\n remoteViews.setViewVisibility(R.id.widget_image_label, View.GONE);\r\n remoteViews.setViewVisibility(R.id.widget_image_title, View.GONE);\r\n remoteViews.setViewVisibility(R.id.widget_image, View.VISIBLE);\r\n remoteViews.setImageViewResource(R.id.widget_image, R.mipmap.ic_launcher);\r\n }\r\n /* Set an OnClickPendingIntent to the widget */\r\n remoteViews.setOnClickPendingIntent(R.id.widget_layout,pendingIntent);\r\n appWidgetManager.updateAppWidget(appWidgetId,remoteViews);\r\n}",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n\n for (int appWidgetId : appWidgetIds) {\n views = new RemoteViews(context.getPackageName(), R.layout.mywidget);\n //views.setProgressBar(R.id.progress_bar2, 100,0,true);\n updateAppWidget(context, appWidgetManager, appWidgetId);\n appWidgetManager2=appWidgetManager;\n contextt=context;\n appWidgetId2=appWidgetId;\n SetAlarm(context,1,mywidget.class);\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n }",
"@Override\n\tpublic void onUpdate(Context ctxt, AppWidgetManager appWidgetManager,\n\t\t\tint[] appWidgetIds) {\n\t\t Log.w(LOG_TAG, \"onUpdate method called\");\n\t\t/* // Get all ids\n\t\t ComponentName thisWidget = new ComponentName(context,\n\t\t TaskWidget.class);\n\t\t int[] allWidgetIds = appWidgetManager.getAppWidgetIds(thisWidget);\n\n\t\t // Build the intent to call the service\n\t\t Intent intent = new Intent(context.getApplicationContext(),\n\t\t UpdateWidgetService.class);\n\t\t intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, allWidgetIds);\n\n\t\t // Update the widgets via the service\n\t\t context.startService(intent);*/\n for (int i=0; i<appWidgetIds.length; i++) {\n Intent svcIntent=new Intent(ctxt, WidgetService.class);\n\n svcIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetIds[i]);\n svcIntent.setData(Uri.parse(svcIntent.toUri(Intent.URI_INTENT_SCHEME)));\n\n RemoteViews widget=new RemoteViews(ctxt.getPackageName(),\n R.layout.main);\n\n widget.setRemoteAdapter(appWidgetIds[i], R.id.widgetLV,\n svcIntent);\n\n Intent clickIntent=new Intent(ctxt, EditActivity.class);\n PendingIntent clickPI=PendingIntent\n .getActivity(ctxt, 0,\n clickIntent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n\n// widget.setPendingIntentTemplate(R.id.widgetLV, clickPI);\n widget.setOnClickPendingIntent(R.id.button, clickPI);\n appWidgetManager.updateAppWidget(appWidgetIds[i], widget);\n }\n\t}",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.baking_new_app_widget);\n\n int lastClickedMealIndex = Prefs.getsInstance(context).getLastClickedIngredient();\n\n if (lastClickedMealIndex < 0) {\n views.setViewVisibility(R.id.rl_empty_state, View.VISIBLE);\n views.setViewVisibility(R.id.ll_filled_state, View.GONE);\n\n //set pending intent on the empty state prompt\n views.setOnClickPendingIntent(R.id.tv_empty_state_prompt, getOpenMainActivityPendingIntent(context));\n } else {\n views.setViewVisibility(R.id.rl_empty_state, View.GONE);\n views.setViewVisibility(R.id.ll_filled_state, View.VISIBLE);\n\n //set header text\n views.setTextViewText(R.id.tv_widget_header, context.getString(R.string.widget_header_text, DataUtil.getMealNameAt(context, lastClickedMealIndex)));\n\n //set pending intent on the widget header\n views.setOnClickPendingIntent(R.id.tv_widget_header, getOpenMainActivityPendingIntent(context));\n\n //set up the ListView\n setupGridListView(views, context);\n }\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n PlaybackService.startServiceToUpdateWidgets(context);\n }",
"@Override\n protected void onHandleIntent(Intent intent) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this, TodayWidgetProvider.class));\n\n //Get today's data from ContentProvider\n String location = Utility.getPreferredLocation(this);\n Uri weatherForLocationUri = WeatherContract.WeatherEntry.buildWeatherLocationWithDate(location, System.currentTimeMillis());\n Cursor cursor = getContentResolver().query(weatherForLocationUri, FORECAST_COLUMNS, null, null, WeatherContract.WeatherEntry.COLUMN_DATE + \" ASC\");\n if (cursor == null) {\n return;\n }\n if(!cursor.moveToFirst()) {\n cursor.close();\n return;\n }\n\n // Extract the weather data from the Cursor\n int weatherId = cursor.getInt(INDEX_WEATHER_ID);\n int weatherArtResourceId = Utility.getArtResourceForWeatherCondition(weatherId);\n String description = cursor.getString(INDEX_SHORT_DESC);\n double maxTemp = cursor.getDouble(INDEX_MAX_TEMP);\n String formattedMaxTemperature = Utility.formatTemperature(this, maxTemp);\n cursor.close();\n\n // for every created Widget\n for (int appWidgetId : appWidgetIds) {\n // add RemoteView\n RemoteViews views = new RemoteViews(\n getPackageName(),\n R.layout.widget_today_small);\n // Add the data to the RemoteViews\n views.setImageViewResource(R.id.widget_icon, weatherArtResourceId);\n views.setTextViewText(R.id.widget_temperature, formattedMaxTemperature);\n // Content Descriptions for RemoteViews were only added in ICS MR1\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {\n setRemoteContentDescription(views, description);\n }\n // add action when user taps on the Widget - Intent to launch MainActivity\n Intent launchIntent = new Intent(this, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);\n views.setOnClickPendingIntent(R.id.widget, pendingIntent);\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n\n }\n\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n\n //setup the intent such that it calls the service to populate the widget views\n Intent intent = new Intent(context, BucketListWidgetService.class);\n\n //add the app widget ID to the intent extras.\n intent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n\n //instantiate the RemoteViews object for the app widget layout\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.bucketlist_widget);\n //setup the adapter such that it populates the data\n rv.setRemoteAdapter(R.id.widget_listview, intent);\n //if there are no items in the bucket list, display this empty view\n rv.setEmptyView(R.id.widget_listview, R.id.empty_view);\n\n //setup onclick actions for the listview and empty view\n final Intent onClickIntent = new Intent(context, BucketListWidgetProvider.class);\n onClickIntent.setAction(BucketListWidgetProvider.CLICK_ACTION);\n onClickIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n onClickIntent.setData(Uri.parse(onClickIntent.toUri(Intent.URI_INTENT_SCHEME)));\n final PendingIntent onClickPendingIntent = PendingIntent.getBroadcast(context, 0, onClickIntent, PendingIntent.FLAG_UPDATE_CURRENT | PendingIntent.FLAG_IMMUTABLE);\n rv.setOnClickPendingIntent(R.id.empty_view, onClickPendingIntent);\n rv.setPendingIntentTemplate(R.id.widget_listview, onClickPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, rv);\n }\n\n super.onUpdate(context, appWidgetManager, appWidgetIds);\n }",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.hua_widget);\n\n Intent intent = new Intent();\n intent.setAction(\"lee.hua.click\");\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, intent,\n PendingIntent.FLAG_UPDATE_CURRENT);\n //设置点击事件,发送 PendingIntent\n views.setOnClickPendingIntent(R.id.widget_hua, pendingIntent);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"public static void startActionUpdateBakingWidget(Context context) {\n Intent intent = new Intent(context, Service_WidgetUpdate.class);\n intent.setAction(Constants.ACTION_UPDATE_DRIVER_WIDGET);\n context.startService(intent);\n }",
"@Override\n\tpublic void onUpdate(Context context, AppWidgetManager appWidgetManager,int[] appWidgetIds) {\n\t\tString title = \"Seleccione: \";\n\t\tRemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);\n\t\t\n\t\tviews.setTextViewText(R.id.txtMessage, title);\n\n\t\tint contador = 11;\n\t\t\n\t\tIntent startActivityIntent = new Intent(context, ResponseWidgetActivity.class);\n startActivityIntent.putExtra(WIDGET_KEY, contador);\n\t\tPendingIntent startActivityPendingIntent = PendingIntent.getActivity(context, 0, startActivityIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setOnClickPendingIntent(R.id.imageButton1, startActivityPendingIntent);\n\t\t\n\t\tComponentName myWidget = new ComponentName(context, WidgetProvider.class);\n\t AppWidgetManager manager = AppWidgetManager.getInstance(context);\n\t manager.updateAppWidget(myWidget, views);\n\t}",
"@Override\n public void run() {\n BookInfo.this.runOnUiThread(new Runnable() {\n @Override\n public void run() {\n mSwipyRefreshLayout.setRefreshing(false);\n }\n });\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n ComponentName watchWidget = new ComponentName(context, AbsenMainWidget.class);\n updateAppWidget(context, appWidgetManager, watchWidget);\n }",
"@Override\n protected void onHandleIntent(Intent intent) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,\n FishingCountWidgetProvider.class));\n\n // Get today's data from the ContentProvider\n int counter = 0;\n\n Cursor data = getContentResolver().query(\n FishingContract.FishingEntry.CONTENT_URI, COLUMNS, null,\n null, null);\n if (data != null) {\n if (data.moveToFirst()) {\n counter++;\n while (data.moveToNext()) {\n counter++;\n }\n }\n }\n\n data.close();\n // Perform this loop procedure for each widget\n for (int appWidgetId : appWidgetIds) {\n int layoutId = R.layout.widget_layout;\n RemoteViews views = new RemoteViews(getPackageName(), layoutId);\n\n // Add the data to the RemoteViews\n //views.setImageViewResource(R.id.ic_w_before, R.drawable.ic_w_before);\n // Content Descriptions for RemoteViews were only added in ICS MR1\n// if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.ICE_CREAM_SANDWICH_MR1) {\n// setRemoteContentDescription(views, getString(R.string.widget_fishing_counter));\n// }\n views.setTextViewText(R.id.fishing_counter, String.valueOf(counter));\n\n // Create an Intent to launch MainActivity\n Intent launchIntent = new Intent(this, ListActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);\n views.setOnClickPendingIntent(R.id.widget, pendingIntent);\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n\n // Release the wake lock provided by the BroadcastReceiver.\n// completeWakefulIntent(intent);\n }",
"public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n RemoteViews views = new RemoteViews(context.getPackageName(),\n R.layout.widget_popular_series);\n\n // Create an Intent to main activity and other to detail activity\n Intent mainIntent = new Intent(context, MainActivity.class);\n PendingIntent mainPendingIntent = PendingIntent.getActivity(context, 0, mainIntent, 0);\n views.setOnClickPendingIntent(R.id.widget, mainPendingIntent);\n\n Intent detailIntent = new Intent(context, ShowDetailActivity.class);\n PendingIntent detailPendingIntent = PendingIntent.getActivity(context, 0, detailIntent, 0);\n views.setPendingIntentTemplate(R.id.widget_list, detailPendingIntent);\n\n // Set up the collection \n setRemoteAdapter(context, views, appWidgetId);\n\n views.setEmptyView(R.id.widget_list, R.id.widget_empty);\n\n views.setTextViewText(R.id.widget_title, context.getString(R.string.title_widget_popular_shows));\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget_layout);\n for (int appWidgetId : appWidgetIds) {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n views.setEmptyView(R.id.list , R.id.empty_view);\n\n }",
"@Override\n\tpublic void onEnabled(Context context) {\n\t\tsuper.onEnabled(context);\n\t\tIntent intent = new Intent(context, UpdateWidgetService.class);\n\t\tcontext.startService(intent);\n\t}",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n // Construct the RemoteViews object\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.app_widget_top3);\n\n //klikken op widget titel TextView opent de app\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.titelTextView, pendingIntent);\n\n //update de UI\n String[] taaknamen = new TakenlijstDB(context).getWidgetTaken(3);\n views.setTextViewText(R.id.taak1TextView,\n taaknamen[0] == null ? \"\" : taaknamen[0]);\n views.setTextViewText(R.id.taak2TextView,\n taaknamen[1] == null ? \"\" : taaknamen[1]);\n views.setTextViewText(R.id.taak3TextView,\n taaknamen[2] == null ? \"\" : taaknamen[2]);\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager,\n int[] appWidgetIds)\n {\n // There may be multiple widgets active, so update all of them.\n for (int appWidgetId : appWidgetIds)\n {\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }",
"@Override\n public void onReceive(final Context context, Intent intent) {\n// PPApplicationStatic.logE(\"[IN_BROADCAST] DashClockBroadcastReceiver.onReceive\", \"xxx\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null) {\n dashClockExtension.updateExtension();\n }\n\n //final boolean refresh = (intent == null) || intent.getBooleanExtra(EXTRA_REFRESH, true);\n\n /*PPApplication.startHandlerThreadBroadcast();\n final Handler handler = new Handler(PPApplication.handlerThreadBroadcast.getLooper());\n handler.post(new Runnable() {\n @Override\n public void run() {\n PPApplicationStatic.logE(\"[IN_THREAD_HANDLER] PPApplication.startHandlerThread\", \"START run - from=DashClockBroadcastReceiver.onReceive\");\n\n PhoneProfilesDashClockExtension dashClockExtension = PhoneProfilesDashClockExtension.getInstance();\n if (dashClockExtension != null)\n {\n dashClockExtension.updateExtension();\n }\n }\n });*/\n\n }",
"public static void update(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds, boolean isLightMode)\n {\n\n Log.d(\"TEMPLETE_Widget\", \"Widget Update\");\n if(appWidgetManager == null && appWidgetIds == null)\n {\n Log.d(\"TEMPLETE_Widget\", \"In If with light mode: \" + String.valueOf(isLightMode));\n appWidgetManager = (AppWidgetManager)context.getSystemService(Context.APPWIDGET_SERVICE);\n appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(context, Template_Widget.class));\n\n RemoteViews views = new RemoteViews(context.getPackageName(),\n isLightMode ? R.layout.template_widget_light : R.layout.template_widget_dark);\n\n appWidgetManager.updateAppWidget(appWidgetIds,views);\n\n }else\n {\n Log.d(\"TEMPLETE_Widget\", \"In else\");\n for (int appWidgetId : appWidgetIds) {\n //For the BladeOS, you should always ONLY get 1. That is due that the BladeOS Launcher\n //Only has room from 1 Main Launcher page, Called the Rail.\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }\n\n }",
"public static boolean resetWidget(Context context) {\n if (mMetaDb == null || !mMetaDb.isOpen()) {\n openDB(context);\n }\n try {\n Log.i(AnkiDroidApp.TAG, \"Resetting widget status\");\n mMetaDb.execSQL(\"DROP TABLE IF EXISTS widgetStatus;\");\n mMetaDb.execSQL(\"DROP TABLE IF EXISTS smallWidgetStatus;\");\n openDB(context);\n return true;\n } catch (Exception e) {\n Log.e(\"Error\", \"Error resetting widgetStatus and smallWidgetStatus\", e);\n }\n return false;\n }",
"void onRefresh() {\n\t}",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = getGardenGridRemoteView(context, appWidgetId);\n views.setTextViewText(R.id.widget_title, String.format(context.getString(R.string.widget_recipe_title), getTitle(context, appWidgetId)));\n\n // broadcast to update widget id in RemoveViewFactory\n new RecipePreference().setWidgetToUpdateId(context, appWidgetId);\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.gv_widget);\n }",
"public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n // Create an Intent to refresh\n Intent refreshIntent = new Intent(context, WidgetProvider.class);\n refreshIntent.setAction(AppWidgetManager.ACTION_APPWIDGET_UPDATE);\n refreshIntent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_IDS, new int[]{appWidgetId});\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context, 0, refreshIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n\n // Get the layout for the App Widget\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.widget);\n views.setOnClickPendingIntent(R.id.rootView, pendingIntent);\n\n randomNumber = (int) (Math.random() * 100);\n Intent serviceIntent = new Intent(context, WidgetRemoteViewsService.class);\n serviceIntent.setData(Uri.fromParts(\"content\", String.valueOf(appWidgetId + randomNumber), null));\n views.setRemoteAdapter(R.id.listView, serviceIntent);\n\n // Tell the AppWidgetManager to perform an update on the current app widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n }",
"public static void startActionUpdateBakingWidgets(Context context){\n Intent intent = new Intent(context, BakingWidgetService.class);\n intent.setAction(ACTION_UPDATE_BAKING_WIDGETS);\n\n //Trigger it\n context.startService(intent);\n }",
"@Override\n\tpublic void onUpdate(Context context, AppWidgetManager appWidgetManager,\n\tint[] appWidgetIds) {\n\t\t\n\n\t\t/**\n\t\t * Starting a service that defines the onupdate function\n\t\t */\n\t\t context.startService(new Intent(context, UpdateService.class)); \n\t}",
"@Override\n protected void onHandleIntent(Intent intent) {\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this,\n StockWidget.class));\n\n Cursor data = getContentResolver().query(Contract.Quote.URI, STOCKS_COLUMNS, null,\n null, Contract.Quote.COLUMN_SYMBOL + \" ASC\");\n if (data == null) {\n return;\n }\n if (!data.moveToFirst()) {\n data.close();\n return;\n }\n\n String symbol = data.getString(INDEX_SYMBOL);\n float price = data.getFloat(INDEX_PRICE);\n float change = data.getFloat(INDEX_CHANGE);\n\n data.close();\n\n // Perform this loop procedure for each Today widget\n// for (int appWidgetId : appWidgetIds) {\n// int layoutId = R.layout.widget_today_small;\n// RemoteViews views = new RemoteViews(getPackageName(), layoutId);\n//\n// views.setTextViewText(R.id.widget_high_temperature, formattedMaxTemperature);\n//\n// // Create an Intent to launch MainActivity\n// Intent launchIntent = new Intent(this, MainActivity.class);\n// PendingIntent pendingIntent = PendingIntent.getActivity(this, 0, launchIntent, 0);\n// views.setOnClickPendingIntent(R.id.widget, pendingIntent);\n//\n// // Tell the AppWidgetManager to perform an update on the current app widget\n// appWidgetManager.updateAppWidget(appWidgetId, views);\n// }\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n // There may be multiple widgets active, so update all of them\n // Play around with the passed parameters to see how it affects the widget\n Log.d(\"TEMPLETE_Widget\", \"Widget onUpdate Received\");\n update(context,isLightMode(context));\n }",
"@RequiresApi(api = Build.VERSION_CODES.ICE_CREAM_SANDWICH)\n static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.baking_recipes_widget);\n\n Intent intent = new Intent(context, RecipesActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n\n views.setOnClickPendingIntent(R.id.widget_toolbar, pendingIntent);\n // Instruct the widget manager to update the widget\n Intent intnt = new Intent(context, WidgetService.class);\n views.setRemoteAdapter(R.id.widget_ingredients_list_view, intnt);\n\n Intent ingListIntent = new Intent(context, RecipeListActivity.class);\n PendingIntent ingPendingIntent = PendingIntent.getActivity(context, 0, ingListIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n views.setPendingIntentTemplate(R.id.widget_ingredients_list_view, ingPendingIntent);\n\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tAppWidgetManager appWidgetManger = AppWidgetManager.getInstance(context); \n\t\tint[] appIds = appWidgetManger.getAppWidgetIds(new ComponentName(context, PlayWidget.class));\n\t\tlistitem = intent.getIntExtra(\"current_music\", 0);\n\t\tLog.d(TAG,\"listitem : \"+listitem);\n\t\tString action = intent.getAction();\n\t\tif(action.equals(PLAY_STATUE)){\n\t\t\tintent.getBooleanExtra(\"isplay\", false);\n\n\t\t\tonUpdate(context,appWidgetManger,appIds);\n\t\t}\n\t\tif(action.equals(COLLECTION_VIEW_ACTION)) {\n\t\t\tint item = intent.getIntExtra(\"widget_item\", 0);\n\t\t\tLog.d(TAG,\"listitem : \"+item);\n\t\t}\n\t\tif(action.equals(UPDATE_ACTION)){\n//\t\t\tlistitem = intent.getIntExtra(\"current_music\", 0);\n\t\t\tonUpdate(context,appWidgetManger,appIds);\n\t\t}\n\t\t\n\t\tsuper.onReceive(context, intent);\n\t}",
"private void handleActionUpdateDriverWidget() {\n\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n int[] appWidgetIds = appWidgetManager\n .getAppWidgetIds(new ComponentName(this, WidgetProvider_Driver.class));\n\n //Trigger data update to handle the ListView widgets and force a data refresh\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.widget_list_view_orders);\n\n //Now update all widgets\n WidgetProvider_Driver.updateDriverWidgets(this, appWidgetManager, appWidgetIds);\n\n\n }",
"@Override\r\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n final int N = appWidgetIds.length;\r\n for (int i=0; i<N; i++) {\r\n updateAppWidget(context, appWidgetManager, appWidgetIds[i]);\r\n /*\r\n * Press the widget, send an broadcast to the broadcast receiver;\r\n * call onReceive() of the receiver.\r\n */\r\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.rotation_switcher);// get RemoteViews from xml file.\r\n Intent intent = new Intent(context, AutoSwitcherBroadcastReceiver.class); // MyReceiver.class is the receiver.\r\n PendingIntent pendingIntent = PendingIntent.getBroadcast(context,0,intent,0);\r\n views.setOnClickPendingIntent(R.id.myImageView, pendingIntent); // similar to setOnClickListener()\r\n appWidgetManager.updateAppWidget(appWidgetIds, views);\r\n }\r\n }",
"private void updateRemoteViews(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId, ArrayList<String> supplicationList)\n {\n intent = new Intent(context, WidgetService.class);\n openAppIntent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, openAppIntent, 0);\n Bundle extrasBundle = new Bundle();\n extrasBundle.putStringArrayList(WIDGET_LIST,supplicationList);\n extrasBundle.putInt(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n intent.putExtra(WIDGET_BUNDLE_STRING, extrasBundle);\n intent.setData(Uri.parse(intent.toUri(Intent.URI_INTENT_SCHEME)));\n RemoteViews rv = new RemoteViews(context.getPackageName(), R.layout.stories_widget);\n rv.setRemoteAdapter(R.id.list, intent);\n rv.setOnClickPendingIntent(R.id.widget_container, pendingIntent);\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetId, R.id.list);\n appWidgetManager.updateAppWidget(appWidgetId, rv);\n\n }",
"@Override \r\n\t public void onReceive(Context context, Intent intent) {\n\t\t \tsuper.onReceive(context, intent);\r\n\t\t \t\r\n\t\t \tif(intent.getAction().equals(\"android.appwidget.action.VIEW_MEMO_DETAIL\")) {\r\n\t\t \t\t\r\n\r\n\t\t \t\t\r\n\t\t \t} else if(intent.getAction().equals(\"android.appwidget.action.UPDATE_DESK_MEMO\")){\r\n\t\t\t\tFile f=new File(GlobalValue.datsavepath);\r\n\t\t\t\tif(!f.exists())\r\n\t\t\t\t\treturn;\r\n\t\t\t\t\r\n\t\t\t\tFile []files=f.listFiles();\r\n\t\t\t\tBitmap bitmap=null;\r\n\t\t\t\tif(files.length>0) {\r\n\t\t\t\t\tbitmap=FileUtils.readToNormal(files[0].getPath(),30,30,20);\t\r\n\t\t\t\t}\r\n\t\t \t\tRemoteViews remoteview=new RemoteViews(context.getPackageName(),R.layout.memowidget);\r\n\t\t \t\tif(bitmap!=null) {\r\n\t\t \t\tremoteview.setImageViewBitmap(R.id.Desk_Memo, bitmap);\r\n\t\t \t\t}\r\n\t\t \t\tAppWidgetManager appWidgetManager=AppWidgetManager.getInstance(context);\r\n\t\t\t\tappWidgetManager.updateAppWidget(new ComponentName(context,MemoWidgetProider.class), remoteview);\t\r\n\t\t \t}else {\r\n\t\t \t\t\r\n\t\t \t\tupdateMemo(context);\r\n\t\t \t}\r\n\t }",
"@Override\n\tpublic void onSmartWallAdShowing() {\n\t\t\n\t}",
"static void updateAppWidget(Context context, AppWidgetManager appWidgetManager,\n int appWidgetId) {\n RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.recipe_app_widget);\n\n Intent intent = new Intent(context, MainActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n views.setOnClickPendingIntent(R.id.appwidget_name, pendingIntent);\n\n RecipeDatabase db = RecipeDatabase.getInstance(context);\n AppExecutors.getInstance().diskIO().execute(new Runnable() {\n @Override\n public void run() {\n List<RecipeEntry> entries = db.recipeDao().getAllRecipes();\n if(entries != null && !entries.isEmpty()){\n RecipeEntry randomRecipe = entries.get(new Random().nextInt(entries.size()));\n StringBuilder fullIngredients = new StringBuilder(randomRecipe.getName() + \"\\n\\nIngredients\\n\");\n for(Ingredient ingredient : randomRecipe.getIngredients()){\n fullIngredients.append(context.getString(R.string.list_ingredients,\n String.valueOf(ingredient.getQuantity()),\n ingredient.getMeasure(),\n ingredient.getIngredient()));\n }\n\n views.setTextViewText(R.id.appwidget_name, fullIngredients);\n } else {\n views.setTextViewText(R.id.appwidget_name, context.getString(R.string.lbl_check_new_recipe_in_app));\n }\n\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }\n });\n }",
"public void onRefresh() {\n }",
"private void showIfPendingPushNotification() {\n if (mIsActivityResumedFromSleep) {\n PushNotificationMessageHandler.getInstance(this).showPendingPushNotification();\n PushNotificationMessageHandler.getInstance(this).clearPushNotificationFromBar();\n }\n }",
"public void bindDEAppWidget(Sentence latestSentence, int widgetType) {\n RemoteViews views = new RemoteViews(mContext.getPackageName(), R.layout.widget);\n views.setTextViewText(R.id.content, latestSentence.getContent());\n views.setTextViewText(R.id.day, latestSentence.getDateline());\n\n Intent launchIntent = new Intent(mContext, MainActivity.class);\n launchIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n launchIntent.setAction(\"launch list\");\n PendingIntent pendingIntent = PendingIntent.getActivity(mContext, 0, launchIntent, 0);\n views.setOnClickPendingIntent(R.id.launcher_icon, pendingIntent);\n if (latestSentence.getId() != null) {\n Intent detailIntent = new Intent(mContext, MainActivity.class);\n detailIntent.putExtra(Constants.KEY_WIDGET_SENTENCE_ID, latestSentence.getId());\n detailIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n detailIntent.setAction(\"launch detail\");\n pendingIntent = PendingIntent.getActivity(mContext, 0, detailIntent, PendingIntent.FLAG_UPDATE_CURRENT);\n }\n views.setOnClickPendingIntent(R.id.right_part, pendingIntent);\n AppWidgetManager.getInstance(mContext).updateAppWidget(new ComponentName(mContext,\n widgetType == TYPE_4_1 ? DEAppWidgetProvider41.class : DEAppWidgetProvider51.class), views);\n }",
"@Override\n public void onRefresh() {\n category = searchSpinner.getSelectedItem().toString();\n if(connection.isOnline(MainActivity.this)){\n swipeContainer.setVisibility(View.GONE);\n progressBar.setVisibility(View.VISIBLE);\n new LoadMeetsAsync().execute();\n }\n else {\n swipeContainer.setRefreshing(false);\n }\n }",
"@Override\n public void onEnabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }",
"@Override\n\tpublic void onReceive(Context context, Intent intent) {\n\t\tsuper.onReceive(context, intent);\n\t\t//no matter what user does, boot the service\n\t\tIntent intentt = new Intent(context, UpdateWidgetService.class);\n\t\tcontext.startService(intentt);\n\t}",
"private void startWidget() {\n\t\tIntent intent = new Intent();\n\t\tintent.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n\t\tsetResult(Activity.RESULT_OK, intent);\n\n\t\t// start your service\n\t\t// to fetch data from web\n\t\tIntent serviceIntent = new Intent(this, RemoteFetchService.class);\n\t\tserviceIntent\n\t\t\t\t.putExtra(AppWidgetManager.EXTRA_APPWIDGET_ID, appWidgetId);\n\t\tstartService(serviceIntent);\n\n\t\t// finish this activity\n\t\tthis.finish();\n\n\t}",
"static void updateAppWidget(final Context context, AppWidgetManager appWidgetManager,\n final int appWidgetId) {\n Intent intent = new Intent(context, RecipesActivity.class);\n PendingIntent pendingIntent = PendingIntent.getActivity(context, 0, intent, 0);\n // Construct the RemoteViews object\n final RemoteViews views = new RemoteViews(context.getPackageName(), R.layout.baking_widget_provider);\n Recipe recipe = RecipeDetailFragment.mSelectedRecipe;\n if(recipe!=null) {\n views.setTextViewText(R.id.widgetTitleLabel, recipe.getName());\n }\n // Instruct the widget manager to update the widget\n appWidgetManager.updateAppWidget(appWidgetId, views);\n }",
"@Override\n public void onRefresh() {\n if (CheckNetwork.isInternetAvailable(getApplicationContext()))\n {\n data.clear();\n mAdapter.notifyDataSetChanged();\n apiCall();\n }\n else\n {\n Toast.makeText(RideShareHome.this, \"Internet is not available\", Toast.LENGTH_SHORT).show();\n }\n swipeContainer.setRefreshing(false);\n }",
"@Override\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n for (int appWidgetId : appWidgetIds) {\n\n startServiceToDisplayList(appWidgetId, context);\n\n handleRemoteViewClick(context);\n\n updateAppWidget(context, appWidgetManager, appWidgetId);\n }\n }",
"@Override\n public void onRefresh() {\n isNetworkAvailable(connectionHandler, 5000);\n\n SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(getActivity());\n\n String initializedKey = getActivity().getString(R.string.pref_stocks_initialized_key);\n boolean initialized = prefs.getBoolean(initializedKey, false);\n\n QuoteSyncJob.syncImmediately(getActivity());\n\n if (!mConnected && adapter.getItemCount() == 0) {\n swipeRefreshLayout.setRefreshing(false);\n error.setText(getString(R.string.error_no_network));\n error.setVisibility(View.VISIBLE);\n } else if (!mConnected) {\n swipeRefreshLayout.setRefreshing(false);\n Toast.makeText(getActivity(), R.string.toast_no_connectivity, Toast.LENGTH_LONG).show();\n } else if (PrefUtils.getStocks(getActivity()).size() == 0) {\n swipeRefreshLayout.setRefreshing(false);\n error.setText(getString(R.string.error_no_stocks));\n error.setVisibility(View.VISIBLE);\n } else {\n error.setVisibility(View.GONE);\n }\n }",
"private void updateAppWidget(Context context,\n\t\t\tAppWidgetManager appWidgetManager, int appWidgetID) {\n RemoteViews remoteViews = new RemoteViews(context.getPackageName(),\n R.layout.main);\n\n\n appWidgetManager.updateAppWidget(appWidgetID, remoteViews);\n\t\tLog.d(LOG_TAG, \"updateAppWidget\");\n\t}",
"@Override\n public void onRefresh(PullRefreshLayout pullRefreshLayout) {\n pullRefreshLayout.postDelayed(new Runnable() {\n\n @Override\n public void run() {\n // TODO Auto-generated method stub\n refreshLayout.finishRefresh();\n }\n }, 2000);\n }",
"@TargetApi(Build.VERSION_CODES.JELLY_BEAN)\n private void newHongBaoNotification(Notification notification) {\n flags = false;\n // v8\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n mIsAutoEnterReceiveUi = true;\n }\n\n //prize modify for bug 44603 by zhaojian 20171205 start\n new Thread(new Runnable() {\n @Override\n public void run() {\n playHintAudio();\n }\n }).start();\n //prize modify for bug 44603 by zhaojian 20171205 end\n\n //Open WeChat's notification bar message\n final PendingIntent pendingIntent = notification.contentIntent;\n lock = NotifyHelper.isLockScreen(getContext());\n if(!lock) {\n Log.d(TAG,\"before is screen on\" + \", handler.hasMessages(1) = \"+handler.hasMessages(1));\n\n // prize add if-condition by zhaojian 20171031 start\n if(Build.VERSION.SDK_INT < Build.VERSION_CODES.N) {\n if(handler != null && handler.hasMessages(1)){\n handler.removeMessages(1);\n Message message = handler.obtainMessage(1);\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n handler.sendMessageDelayed(message,11000);\n }else {\n handler.sendMessageDelayed(message,13000);\n }\n }\n }\n // prize add if-condition by zhaojian 20171031 end\n\n Log.d(TAG,\"current activity = \" + getRunningActivityName());\n if(!KING_GLORY.equals(getRunningActivityName())){\n NotifyHelper.send(pendingIntent);\n }\n\n } else {\n Log.d(TAG,\"before is screen off\");\n beforeIsLock = true;\n //Bright screen\n wakeLock.acquire();\n wakeLock.release();\n //Make unlock\n Intent intent = new Intent(\"prize.set.keyguard.state\");\n intent.putExtra(\"hide\",true);\n intent.putExtra(\"secure\",true);\n getContext().sendBroadcast(intent);\n\n Log.d(TAG,\"top activity is :\"+getRunningActivityName());\n //If the light screen is the main interface, the delay processing, otherwise not delay processing\n if(\"com.tencent.mm.ui.LauncherUI\".equals(getRunningActivityName())){\n Log.d(TAG,\"is wechat main interface\");\n NotifyHelper.send(pendingIntent);\n }else{\n getHandler().postDelayed(new Runnable() {\n @Override\n public void run() {\n NotifyHelper.send(pendingIntent);\n }\n },300);\n Log.d(TAG,\"delay 300 ms to open notification\");\n }\n\n Message message = handler.obtainMessage(1);\n if(beforeIsLock){\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.N){\n handler.sendMessageDelayed(message,11000);\n }else {\n handler.sendMessageDelayed(message,13000);\n }\n }\n }\n }",
"@Override\n\t\tpublic void onReceive(Context arg0, Intent arg1) {\n\t\t\tString action = arg1.getAction();\n\t\t\tmContext = arg0;\n\t\t\t\n\t\t\tif(action.equals(\"com.example.timeshowactivity.OFF\")){\n\t\t\t mDelayFlag = 0;\n\t\t\t //WhetherSendIntent =false;\n\t\t\t setTimeShowState(false);\n\t\t\t Log.i(TAG,\"qiuyaobo onReceive com.example.timeshowactivity.OFF\");\n\t\t\t}else if(action.equals(\"com.example.timeshowactivity.ON\")){\n\t\t\t mDelayFlag = 1;\n\t\t\t\t//WhetherSendIntent =true;\n\t\t\t setTimeShowState(true);\n\t\t\t//Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive00com.example.timeshowactivity.ON***\");\n\t\t\t}else if(action.equals(\"android.intent.action.BOOT_COMPLETED\")){\n\t\t\t\tLog.d(\"ljz\", \"set hall\");\n\t\t\t\t//PowerManager pm = (PowerManager) arg0.getSystemService(Context.POWER_SERVICE);\n\t\t\t\t//pm.setHallSensor(true, 0);\n\t\t\t//Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive.....android.intent.action.BOOT_COMPLETED***\");\n\t\t\t\treturn;\n\t\t }else if (MTK_ACTION_UNREAD_CHANGED.equals(action)){\n\t\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ***onReceive.....MTK_ACTION_UNREAD_CHANGED***\");\n\t\t\t\t\t\t\tboolean lidOpen =SystemProperties.getBoolean(\"persist.sys.lidopen\",false);\n\t\t\t\t\t\t\tif(lidOpen){//hal is off ,at the same time a call is arriving,open the hal ,at hal Call interface,hang up the call ,we should display the TimeShow \n\t\t\t\t\t\t\t\t\tmDelayFlag = 1;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\tmDelayFlag = 0;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(!isIdle()){\n\t\t\t\t\t\t\t\treturn;//when we opened call waiting function ,we hanged up one call ,the other call has been activitied,at this time we cannot update TimeShow actovity if the TimeShow actovity on Background process!\n\t\t\t\t\t\t\t}\n\t\t\t\t\t MainActivity m = MainActivity.getInstance();\n\t\t\t\t\t if(m != null){\n\t\t\t\t\t m.updatetInfo();\n\t }\n\t }\n\t\n\t\t if(!isIdle()){\n\t\t\t\t\t\tIntent updateIncallTouchUi = new Intent(\"UPDATE_INCALLSCREEN_TOUCHUI\");\n\t\t\t\t\t\tmContext.sendBroadcast(updateIncallTouchUi);\n\t\n\t }\n\t\t \n\t\t long milliseconds = SystemClock.elapsedRealtime();\n\t\t long timeSinceLastEvent = milliseconds - mLastReceiveEventTime;\n\t\t mLastReceiveEventTime = milliseconds;\n\t\t mHandler.removeCallbacks(mDelayTimeTask);\n\t\t\t\n\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ******** flag=\" +mDelayFlag + \" timeSinceLastEvent=\"+timeSinceLastEvent);\n\t\t if(timeSinceLastEvent < DELAY_TIME){\n\t\t\t\t\t\tlong i;\n\t\t\t\t\t\ti= DELAY_TIME - timeSinceLastEvent;\n\t\t //Log.i(\"huangjun00\",\"TimeShowReceiver ***timeSinceLastEvent < DELAY_TIME..timeSinceLastEvent=\" +timeSinceLastEvent + \"; DELAY_TIME=\"+DELAY_TIME+\";i=\"+i);\n\t\t mHandler.postDelayed(mDelayTimeTask, DELAY_TIME - timeSinceLastEvent);\n\t\t return;\n\t\t }\n\t\n\t\t\t\tif(mDelayFlag == 0){\n\t\t\t\t\t\tMainActivity m = MainActivity.getInstance();\n\t\t\t\t\t\tLog.i(TAG,\" qiuyaobo onReceive mDelayFlag == 0 m=\" +m);\n\t\t\t\n\t\t\t\t\t\tif(m != null){\n\t\t\t\t\t\t m.finish();\n\t\t\t\t\t\t\t//m.moveTaskToBack(false);\n\t\t\t // m.onBackPressed();\n\t\t\t\t\t\t\t//ActivityManager am = (ActivityManager)mContext.getSystemService(Context.ACTIVITY_SERVICE);\n\t\t\t\t\t\t//\tam.forceStopPackage(\"com.example.timeshowactivity\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t}else if(mDelayFlag == 1){\n\t\t\n\t\t /// mTelephonyManager = (TelephonyManager) (mContext.getSystemService(Context.TELEPHONY_SERVICE));//hj\n\t\t // mTelephonyManager.listen(mPhoneStateListener, PhoneStateListener.LISTEN_CALL_STATE); //hj\n\t\t\t\t\n\t\t\t\t\tComponentName cn = new ComponentName(\"com.example.timeshowactivity\",\"com.example.timeshowactivity.MainActivity\");\n\t\t\t\t\tIntent intent = new Intent();\n\t\t\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\tintent.setComponent(cn);\n\t\t\t\t\tmContext.startActivity(intent);\n\t\t\t\t}\n\t\t\t\n\t\t}",
"@Override\r\n public void onRefresh() {\n\r\n refreshContent();\r\n\r\n }",
"@Override\n public void onRefresh() {\n }",
"protected void updateWidget(Context context, AppWidgetManager wManager,\n int widgetId, MarketData data)\n {\n int remoteViewsId = R.layout.price_widget;\n int priceFormatId = R.string.price_terse_format;\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.JELLY_BEAN)\n {\n Bundle options = wManager.getAppWidgetOptions(widgetId);\n int category = options.getInt(\n AppWidgetManager.OPTION_APPWIDGET_HOST_CATEGORY, -1);\n if(category == AppWidgetProviderInfo.WIDGET_CATEGORY_KEYGUARD)\n {\n remoteViewsId = R.layout.lockscreen_price_widget;\n priceFormatId = R.string.price_format;\n }\n }\n\n RemoteViews widgetViews = new RemoteViews(context.getPackageName(),\n remoteViewsId);\n\n String priceText = String.format( context.getString(priceFormatId),\n data.lastPrice);\n String currencyText = String.format(\n context.getString(R.string.currency_pair_format),\n data.baseCurrency, data.counterCurrency);\n String exchangeText =\n Exchanges.instance().label(context, data.exchangeName);\n\n widgetViews.setTextViewText(R.id.price, priceText);\n widgetViews.setTextViewText(R.id.currency, currencyText);\n widgetViews.setTextViewText(R.id.exchange, exchangeText);\n\n PendingIntent wIntent = PendingIntent.getActivity(context, 0,\n context.getPackageManager().getLaunchIntentForPackage(\n context.getPackageName()), 0);\n\n widgetViews.setOnClickPendingIntent(R.id.widget, wIntent);\n\n wManager.updateAppWidget(widgetId, widgetViews);\n }",
"private void handleActionUpdateBakingWidgets(){\n AppDatabase myDatabase = RecipeRoomSingleton.getInstance(this);\n //If it's empty, forget it.\n if(myDatabase.daoAccess().getAll().isEmpty())return;\n //Get the items\n ArrayList<Ingredient> ingredients = (myDatabase.daoAccess().getAll()).get(0).getIngredients();\n //Get the WidgetManager\n AppWidgetManager appWidgetManager = AppWidgetManager.getInstance(this);\n //Get the widget IDs\n int[] appWidgetIds = appWidgetManager.getAppWidgetIds(new ComponentName(this, BakingWidget.class));\n //Notify the manager that the data has changed for the listview\n appWidgetManager.notifyAppWidgetViewDataChanged(appWidgetIds, R.id.appwidget_listview);\n\n //Update the appwidget\n BakingWidget.updateAppWidget(this, appWidgetIds, appWidgetManager, ingredients);\n }",
"private void initWidget() {\n\t\taccount=(LinearLayout)findViewById(R.id.setting_account);\n\t\tabout=(LinearLayout)findViewById(R.id.setting_about);\n\t\tupdate=(LinearLayout)findViewById(R.id.setting_update);\n\t\thelp=(LinearLayout)findViewById(R.id.setting_help);\n\t\tfeedback=(LinearLayout)findViewById(R.id.setting_feedback);\n\t\texit=(LinearLayout)findViewById(R.id.setting_exit);\n\t\tprogressBar_downLoad=(ProgressBar)findViewById(R.id.progressBar_update);\n\t\t//应用\n\t\tsong=(LinearLayout)findViewById(R.id.song);\n\t\tvoachangsu=(LinearLayout)findViewById(R.id.voachangsu_btn);\n\t\tmeiyuzenmshuo=(LinearLayout)findViewById(R.id.meiyuzenmshuo);\n\t\tcet4=(LinearLayout)findViewById(R.id.cet4);\n\t\tvoavideo=(LinearLayout)findViewById(R.id.voavideo);\n\t\taccount.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent =new Intent();\n\t\t\t\tintent.setClass(mContext, AccountManagerActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\tabout.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent =new Intent();\n\t\t\t\tintent.setClass(mContext, AboutActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\tupdate.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tVersionManager.Instace(mContext).checkNewVersion(RuntimeManager.getAppInfo().versionCode, \n\t\t\t\t\t\tnew AppUpdateCallBack() {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void appUpdateSave(String version_code, String newAppNetworkUrl) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\tSettingActivity.this.version_code=version_code;\n\t\t\t\t\t\t\t\tappUpdateUrl=newAppNetworkUrl;\n\t\t\t\t\t\t\t\thandler.sendEmptyMessage(0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void appUpdateFaild() {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\thandler.sendEmptyMessage(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t@Override\n\t\t\t\t\t\t\tpublic void appUpdateBegin(String newAppNetworkUrl) {\n\t\t\t\t\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t});\n\t\t\t}\n\t\t});\n\t\thelp.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent=new Intent();\n\t\t\t\tintent.putExtra(\"isFirstInfo\", 1);\n\t\t\t\tintent.setClass(mContext, HelpActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\tfeedback.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent=new Intent();\t\t\t\n\t\t\t\tintent.setClass(mContext, FeedBackActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\texit.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t//注销用户,跳到登录页面\n\t\t\t\tAccountManager.Instace(mContext).loginOut();\n\t\t\t\tIntent intent=new Intent();\n\t\t\t\tintent.setClass(mContext,LoginActivity.class);\n\t\t\t\tstartActivity(intent);\n\t\t\t\tSettingActivity.this.finish();\n\t\t\t}\n\t\t});\n\t\tsong.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=209\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\tvoachangsu.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=201\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\tmeiyuzenmshuo.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=213\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\tcet4.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=207\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t\tvoavideo.setOnClickListener(new View.OnClickListener() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tIntent intent = new Intent();\n\t\t\t\tintent.setClass(mContext, WebActivity.class);\n\t\t\t\tintent.putExtra(\"url\", \"http://iyuba.com/apps.php?mod=app&id=217\");\n\t\t\t\tstartActivity(intent);\n\t\t\t}\n\t\t});\n\t}",
"private void updateAppWidget( Context context, AppWidgetManager manager, int wId )\n\t{\n\t\tMyConfigurationActivity.updateAppWidget( context, manager, wId );\n\t}",
"@Override\n\tpublic void onMyRefresh() {\n\t\t\n\t}",
"@Override\n\tpublic void onMyRefresh() {\n\t\t\n\t}",
"@Override\n public void onDisabled(Context context) {\n SetAlarm(context,1,mywidget.class);\n\n }",
"@Override\n protected void performUpdate(final WidgetHelperService service) {\n final RemoteViews views = new RemoteViews(service.getPackageName(),\n R.layout.widget_simple_with_stop);\n\n performUpdate(views, service);\n }",
"public boolean compatIsInitialStickyBroadcast(Intent it) {\n if(ConnectivityManager.CONNECTIVITY_ACTION.equals(it.getAction())) {\n if(!hasStartedWifi) {\n hasStartedWifi = true;\n return true;\n }\n }\n return false;\n }",
"@Override\r\n public void onUpdate(Context context, AppWidgetManager appWidgetManager, int[] appWidgetIds) {\n TimeTableWizardWidget.remoteViews = new RemoteViews(context.getPackageName(), R.layout.widget_horizontal_layout);\r\n //then refresh the table\r\n new DownloadWeekAsync(context, appWidgetManager).execute();\r\n }",
"public interface PtrHandler\n{\n /**\n * check can do refresh or not\n *\n * @param frame\n * @param content\n * @param header\n * @return\n */\n public boolean checkCanDoRefresh(final PtrFrameLayout frame, final View content, final View header);\n\n /**\n * when refresh begin\n *\n * @param frame\n */\n public void onRefreshBegin(final PtrFrameLayout frame);\n}",
"@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tLog.i(TAG, \"onCreate().\");\n\t\t// Check if data in SharedPreferences are the newest.\n\t\tSharedPreferences noteWidgetMap = this.getSharedPreferences(\"note_widget_map\",Context.MODE_PRIVATE);\n\t\tSharedPreferences widgetNoteMap = this.getSharedPreferences(\"widget_note_map\",Context.MODE_PRIVATE);\n\t\tSharedPreferences widgetDbMap = this.getSharedPreferences(\"widget_db_map\",Context.MODE_PRIVATE);\n\n\t\tMap<String, ?> map = widgetNoteMap.getAll();\n\t\tif (map == null) {\n\t\t\tLog.i(TAG, \"map is null!\");\n\t\t\treturn;\n\t\t}\n\t\tSet<String> keySet = map.keySet();\n\t\tif (keySet == null || keySet.isEmpty()) {\n\t\t\tLog.i(TAG, \"key is null\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tAppWidgetManager am = AppWidgetManager.getInstance(this);\n\t\tint appWidgetId;\n\t\tEditor noteWidgEditor = noteWidgetMap.edit();\n\t\tEditor widgetNoteEditor = widgetNoteMap.edit();\n\t\tEditor widgetDbEditor = widgetDbMap.edit();\n\t\t\n\t\tfor (String s : keySet) {\n\t\t\tappWidgetId = Integer.valueOf(s);\n\t\t\tif (am.getAppWidgetInfo(appWidgetId) == null) {\n\t\t\t\tLog.w(TAG, \"can not found appWidgetId \" + appWidgetId + \n\t\t\t\t\t\t\" in AppWidgetManager, so remove it from SharedPreferences\");\n\t\t\t\tString note = widgetNoteMap.getString(s, \"\");\n\t\t\t\tnoteWidgEditor.remove(note);\n\t\t\t\twidgetNoteEditor.remove(s);\n\t\t\t\twidgetDbEditor.remove(s);\n\t\t\t}\n\t\t}\n\t\tnoteWidgEditor.apply();\n\t\twidgetNoteEditor.apply();\n\t\twidgetDbEditor.apply();\n\t}",
"static void updateAppWidget(final Context context, final AppWidgetManager appWidgetManager,\n final int appWidgetId) {\n\n }",
"@Override\n public void onRefresh() {\n synchronizeContent();\n }",
"public void onRefresh() {\n\n //detect if there's a connection issue or not: if there's a connection problem stop refreshing and show message\n if (cM.getActiveNetworkInfo() == null) {\n Toast toast = Toast.makeText(getBaseContext(), R.string.no_internet, Toast.LENGTH_SHORT);\n toast.show();\n swiperefresh.setRefreshing(false);\n\n } else {\n\n Thread thread = new Thread(new Runnable() {\n @Override\n public void run() {\n DOMParser tmpDOMParser = new DOMParser();\n fFeed = tmpDOMParser.parseXml(feedURL);\n ListActivity.this.runOnUiThread(new Runnable() {\n\n @Override\n public void run() {\n if (fFeed != null && fFeed.getItemCount() > 0) {\n adapter.notifyDataSetChanged();\n swiperefresh.setRefreshing(false);\n }\n }\n });\n }\n });\n thread.start();\n }\n }",
"public void updateUIThread(Activity activity) {\n // This function sends a broadcast to the UI thread and refreshes the log list\n // You need to do it this way because you are not allowed to update the UI thread directly from async thread\n if(activity == null)\n return;\n\n Intent intent = new Intent(activity.getString(R.string.broadcastUpdateUIToSettingsActivity));\n intent.addFlags(Intent.FLAG_INCLUDE_STOPPED_PACKAGES); //If set, this intent will always match any components in packages that are currently stopped.\n intent.putExtra(\"FSTF_UpdateLog_KEY\", true);\n LocalBroadcastManager.getInstance(activity).sendBroadcast(intent);\n }",
"public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n LogHelper.log(String.format(\"Received action: %s\", action));\n\n if (action.equals(ACTION_EXPLICIT_UPDATE)) {\n // explicitly update widgets\n doExplicitUpdate(context, intent);\n } else {\n super.onReceive(context, intent);\n }\n }",
"@Override\n\tpublic void onEnabled(Context context) \n\t{\n\t\tPackageManager pm = context.getPackageManager();\n\t\tpm.setComponentEnabledSetting(\n\t\t\t\tnew ComponentName(\"de.fhe\", \"MyAppWidgetProvider\"),\n\t\t\t\tPackageManager.COMPONENT_ENABLED_STATE_ENABLED, \n\t\t\t\tPackageManager.DONT_KILL_APP );\n\t}",
"@Override\n public void onResume() {\n super.onResume();\n if (broad == null) {\n broad = new MyBroadcastReceiver();\n }\n\n IntentFilter intentFilter = new IntentFilter(Constant.REFRESH_FLAG);\n if (!StringUtil.isEmpty(mContext)) {\n mContext.registerReceiver(broad, intentFilter);\n }\n }",
"@Override\r\n\tpublic void onRefresh() {\n\r\n\t}",
"@Override\n public void run() {\n super.run();\n while (!isPaused) {\n Message msg = mHandler.obtainMessage();\n msg.arg1 = REFRESH;\n mHandler.sendMessage(msg);\n try {\n Thread.sleep(REFRESHINTERVAL);\n } catch (InterruptedException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n }",
"public RemoteViews buildUpdate(Context context) \n\t\t{\n\t\t\tRemoteViews updateViews = new RemoteViews(this.getPackageName(),\n\t\t\t\t\t\n\t\t\t\t\tR.layout.widget_layout);\n\t\t\t\t\t\t\t\n\t\t\t\t\t/**\n\t\t\t\t\t * opening the database and retrieving the word to be displayed on the widget\n\t\t\t\t\t */\n\t\t\t\t\ttry{\n\t\t\t\t\t SQLiteDatabase db;\n\t\t\t\t db = openOrCreateDatabase(\n\t\t\t\t \t\t\"vocab.db\"\n\t\t\t\t \t\t, SQLiteDatabase.CREATE_IF_NECESSARY\n\t\t\t\t \t\t, null\n\t\t\t\t \t\t);\n\t\t\t\t db.setVersion(1);\n\t\t\t\t db.setLocale(Locale.getDefault());\n\t\t\t\t db.setLockingEnabled(true);\n\t\t\t\t Random randomGenerator2 = new Random();\n\t\t\t\t int bb = randomGenerator2.nextInt(866);\n\t\t\t\t //Toast.makeText(getApplicationContext(), String.valueOf(bb),Toast.LENGTH_LONG).show();\n\t\t\t\t Cursor cur=db.query(\"words\",null,null,null,null,null,null);\n\t\t\t\t cur.moveToFirst();\n\t\t\t\t cur.moveToPosition(bb);\n\t\t\t\t String a=cur.getString(1);\n\t\t\t\t String b=cur.getString(2);\n\t\t\t\t //Toast.makeText(getApplicationContext(), a,Toast.LENGTH_LONG).show();\n\t\t\t\t updateViews.setTextViewText(R.id.widgetword,a.toUpperCase());\n\t\t\t\t updateViews.setTextViewText(R.id.widgetmeaning,b);\n\t\t\t\t Intent intent5=new Intent(context,Search1.class);\n\t\t\t\t\t\t Bundle bundle = new Bundle(); \n\t\t\t\t\t\t bundle.putString(\"wo\",a );\n\t\t\t\t\t\t intent5.putExtras(bundle);\n\t\t\t\t\t\t intent5.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t\t/**\n\t\t\t\t\t * setting the onclick activity for the widget\t \n\t\t\t\t\t */\n\t\t\t\t\t\tPendingIntent pendingIntent = PendingIntent.getActivity(context,0, intent5, PendingIntent.FLAG_CANCEL_CURRENT ); \n\t\t\t\t\t\tupdateViews.setOnClickPendingIntent(R.id.widget, pendingIntent);\n\t\t\t\t\tdb.close();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(Exception e)\n\t\t\t\t\t{\n\t\t\t\t\t\t Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t Toast.makeText(getApplicationContext(), e.toString(),Toast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\treturn updateViews;\n\t\t\t\n\t\t}",
"@Override\n\tpublic synchronized void onRefresh() {\n\t\ttry {\n\t\t\t// 此处可取当前时间,为刷新时间\n\t\t\tcurDate = new Date(System.currentTimeMillis());\n\t\t\tsdf = new SimpleDateFormat(\"MM-dd HH:mm\");\n\t\t\tif (System.currentTimeMillis() - time > 500) {\n\t\t\t\tURL = URL.substring(0, URL.lastIndexOf(\"_\") + 1);\n\t\t\t\tURL = URL + \"1.xml\";\n\t\t\t\tif (lsnb != null) {\n\t\t\t\t\tlsnb_temp.addAll(lsnb);\n\t\t\t\t\tlsnb = null;\n\t\t\t\t}\n\n\t\t\t\tnew AsyncLoadNews(lsnb, URL).execute();\n\t\t\t} else {\n\t\t\t\tToast toast = Toast.makeText(getActivity(), \"目前是最新数据!\",\n\t\t\t\t\t\tToast.LENGTH_LONG);\n\t\t\t\t// toast.getView().setBackgroundResource(R.drawable.red_toast_bg);\n\t\t\t\ttoast.getView().setPadding(20, 10, 20, 10);\n\t\t\t\ttoast.show();\n\t\t\t\tonLoadStop();\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"@Override\n public void onRefresh() {\n Log.d(\"DEBUG\", \"swipe refresh called\");\n populateTimeline(1L,Long.MAX_VALUE - 1);\n }",
"@Override\r\n\t\t\tpublic void onRefresh() {\n\r\n\t\t\t}",
"@Override\n\tpublic void onRefresh() {\n\n\t}",
"@Override\n\t\tpublic synchronized void onRefresh() {\n\t\t\ttry {\n\t\t\t\t//此处可取当前时间,为刷新时间\n\t\t\t\tcurDate = new Date(System.currentTimeMillis());\n\t\t\t\tsdf = new SimpleDateFormat(\"MM-dd HH:mm\");\n\t\t\t\tif(System.currentTimeMillis()-time>500){\n\t\t\t\t\tURL = URL.substring(0, URL.lastIndexOf(\"_\")+1);\n\t\t\t\t\tURL = URL+\"1.xml\";\n\t\t\t\t\tif(lsnb != null){\n\t\t\t\t\t\tlsnb_temp.addAll(lsnb);\n\t\t\t\t\t\tlsnb = null;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tnew AsyncLoadNews(flag,lsnb,URL).execute();\n\t\t\t\t}else{\n\t\t\t\t\tToast toast = Toast.makeText(getActivity(), \"目前是最新数据!\", Toast.LENGTH_LONG);\n//\t\t\t\t\ttoast.getView().setBackgroundResource(R.drawable.red_toast_bg);\n\t\t\t\t\ttoast.getView().setPadding(20, 10, 20, 10);\n\t\t\t\t\ttoast.show();\n\t\t\t\t\tonLoadStop();\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t}",
"@Override\n protected void onResume() {\n super.onResume();\n if (connection.isOnline(this)) new LoadMeetsAsync().execute();\n fab_toolbar.hide();\n }",
"@Override\n public void run() {\n linLayScreansNoInternetConnection.setVisibility(View.VISIBLE); // show inofrmation NO internet\n linLayScreansConnectingSignalR.setVisibility(View.VISIBLE); // show view SignalR connection ...\n linLayScreansConnectingMSSQL.setVisibility(View.VISIBLE); // show view MS SQL connection ...\n linearLayoutBottomButtons.setVisibility(View.GONE); // hide bottom buttons\n scroolViewScanner.setVisibility(View.GONE); // hide view scanner\n scroolViewDefect.setVisibility(View.GONE); // hide view deffect\n linLayOverView.setVisibility(View.GONE); // hide view Over View\n\n // stop signalR connection\n if (hubConnection != null) {\n hubConnection.stop();\n }\n\n // stop MS SQL connection - no need\n\n // stop service\n stopService(new Intent(ActivityScreans.this, ServiceNotifications.class));\n }"
] | [
"0.69929796",
"0.69500655",
"0.68184245",
"0.68082213",
"0.6666539",
"0.66559935",
"0.6643244",
"0.6581235",
"0.6556607",
"0.6554137",
"0.64139843",
"0.63309515",
"0.6294059",
"0.62823325",
"0.6276746",
"0.62703514",
"0.6243527",
"0.6237433",
"0.6201162",
"0.61994904",
"0.61988837",
"0.61525124",
"0.6140578",
"0.60515946",
"0.6045254",
"0.60287887",
"0.6025109",
"0.6021161",
"0.59990865",
"0.59704596",
"0.5953397",
"0.59488976",
"0.59265625",
"0.59262437",
"0.5923609",
"0.5898024",
"0.5879428",
"0.58654445",
"0.586032",
"0.58603084",
"0.5840224",
"0.5838897",
"0.58239645",
"0.5802535",
"0.58001524",
"0.5790382",
"0.57735455",
"0.5759765",
"0.5739824",
"0.5730206",
"0.57187283",
"0.5715691",
"0.5715536",
"0.57081544",
"0.5706642",
"0.56976336",
"0.5692357",
"0.5664959",
"0.5661198",
"0.56586456",
"0.5656712",
"0.5654656",
"0.5647258",
"0.5630787",
"0.56238973",
"0.5614304",
"0.5612757",
"0.5611913",
"0.5584267",
"0.5574729",
"0.5573824",
"0.55707055",
"0.5567578",
"0.55616623",
"0.5558402",
"0.5550227",
"0.5538975",
"0.5538975",
"0.5537819",
"0.55373544",
"0.55357504",
"0.5532574",
"0.5526221",
"0.5520391",
"0.5518576",
"0.54996055",
"0.5490806",
"0.5479122",
"0.54769945",
"0.5472436",
"0.54655087",
"0.54588276",
"0.5443203",
"0.5433882",
"0.5423562",
"0.54208535",
"0.5411751",
"0.53976166",
"0.5396905",
"0.53899705",
"0.5388615"
] | 0.0 | -1 |
this.music.setFramePosition(0); this.stopMusic(); System.out.println(this.name); this.music.loop(Clip.LOOP_CONTINUOUSLY); | public void playMusic() {
this.music.start();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void playLooped()\n {\n audioClip.loop(Clip.LOOP_CONTINUOUSLY);\n play();\n }",
"public void loop(){\n\t\t\n\t\tclip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\tplay();\n\t}",
"public void keepLooping() {\n\t\tif(!clip.isActive()) {\n\t\t\tstartSound();\n\t\t}\n\t}",
"public void loop() {\n\t\tmusic.loop();\n\t\tsyncPosition();\n\t}",
"public void loop() {\n try {\n if (clip != null) {\n new Thread() {\n public void run() {\n synchronized (clip) {\n clip.stop();\n clip.setFramePosition(0);\n clip.loop(Clip.LOOP_CONTINUOUSLY);\n }\n }\n }.start();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public static void startMusic()\n\t{\n\t\tmusic.loop();\n\t}",
"void stopMusic();",
"public void loopSound(boolean commence) {\n if ( commence ) {\n clip.setFramePosition(0);\n clip.loop( Clip.LOOP_CONTINUOUSLY );\n } else {\n clip.stop();\n }\n }",
"public static void loop(String filename) {\r\n\r\n InputStream path=load(filename);\r\n\r\n \r\n try\r\n {\r\n stop();\r\n soundLoop=AudioSystem.getClip();\r\n soundLoop.open(AudioSystem.getAudioInputStream(new BufferedInputStream(path)));\r\n soundLoop.loop(javax.sound.sampled.Clip.LOOP_CONTINUOUSLY);\r\n\r\n }catch(Exception fallo)\r\n {\r\n \r\n\r\n }\r\n \r\n }",
"public synchronized void pause(){\r\n if(currentLoop0) backgroundMusicLoop0.pause();\r\n else backgroundMusicLoop1.pause();\r\n }",
"public void game(){\n gameMusic.loop(pitch, volume);\n }",
"public void stop()\n {\n audioClip.stop();\n }",
"public synchronized void playAbruptLoop(String path){\r\n if(currentLoop0){\r\n if(backgroundMusicLoop0!=null) backgroundMusicLoop0.stopClip();\r\n currentLoop0 = false;\r\n backgroundMusicLoop1 = new MusicThread(path, currentLoop0);\r\n backgroundMusicLoop1.start();\r\n }else{\r\n if(backgroundMusicLoop1!=null) backgroundMusicLoop1.stopClip();\r\n currentLoop0 = true;\r\n backgroundMusicLoop0 = new MusicThread(path, currentLoop0);\r\n backgroundMusicLoop0.start();\r\n }\r\n }",
"public void run()\n\t{\n\t\t//this.clip.stop();\n\t\tthis.clip.setFramePosition(0);\n\t\tthis.clip.start();\n\t\t//this.clip.loop(1);\n\t}",
"@Override\n public void stopSound(){\n gameMusic.stop();\n }",
"public void StopMusic();",
"public void pauseSound() {\n\t\tclip.stop();\n\t}",
"public void play(String loopOption) {\n\t\ttry {\n\t\t\tthis.audioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t\tif (loopOption.equals(\"infinite\")) {\n\t\t\t\tthis.clip.loop(Clip.LOOP_CONTINUOUSLY);\n\t\t\t}\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void stopBackgroundMusic()\n {\n background.stop();\n }",
"public static void music (String fileName)\r\n {\r\n\tAudioPlayer MGP = AudioPlayer.player;\r\n\tAudioStream BGM;\r\n\tAudioData MD;\r\n\r\n\tContinuousAudioDataStream loop = null;\r\n\r\n\ttry\r\n\t{\r\n\t InputStream test = new FileInputStream (\"lamarBackgroundMusic.wav\");\r\n\t BGM = new AudioStream (test);\r\n\t AudioPlayer.player.start (BGM);\r\n\r\n\t}\r\n\tcatch (FileNotFoundException e)\r\n\t{\r\n\t System.out.print (e.toString ());\r\n\t}\r\n\tcatch (IOException error)\r\n\t{\r\n\t System.out.print (error.toString ());\r\n\t}\r\n\tMGP.start (loop);\r\n }",
"public void play() {\n\t\ttry {\n\t\t\taudioInput = AudioSystem.getAudioInputStream(this.music);\n\t\t\tclip.open(audioInput);\n\t\t\tclip.start();\n\t\t} catch (UnsupportedAudioFileException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (LineUnavailableException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public static void stopMusic() {\n\t\tcurrentMusic.stop();\n\t}",
"public synchronized void stopBackgroundAbruptly(){\r\n if(currentLoop0) backgroundMusicLoop0.stopClip();\r\n else backgroundMusicLoop1.stopClip();\r\n }",
"public void pauseSong()\n {\n if(!mute)\n {\n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n pclip.open(audioIn); \n pclip.start();\n pclip.loop(Clip.LOOP_CONTINUOUSLY);\n }catch(Exception e){}\n }\n }",
"public synchronized void resume(){\r\n if(currentLoop0) backgroundMusicLoop0.unpause();\r\n else backgroundMusicLoop1.unpause();\r\n }",
"public static void resumeCurrentSoundtrack() {\n\t\tif (GameFrame.settingsPanel.musicOn() && soundtrack[GameBoardModel.getLevel()-1] != null)\n\t\t\tsoundtrack[GameBoardModel.getLevel()-1].loop(Clip.LOOP_CONTINUOUSLY);\n\t}",
"public void continueSound() {\n\t\tclip.start();\n\t}",
"public void stop() {\n\t\tmusic.stop();\n\t}",
"public void ChangeMusic(int musicnum, boolean looping);",
"@Override\n public void playStop() {\n }",
"public static void stop() {\r\n\r\n if (soundLoop!=null)\r\n {\r\n soundLoop.stop();\r\n }\r\n }",
"public void playMusic() {\r\n try {\r\n File mFile = new File(Filepath);\r\n if (mFile.exists()) {\r\n AudioInputStream audioInput = AudioSystem.getAudioInputStream(mFile);\r\n Clip clip = AudioSystem.getClip();\r\n clip.open(audioInput);\r\n FloatControl gainControl = (FloatControl) clip.getControl(FloatControl.Type.MASTER_GAIN);\r\n gainControl.setValue(-25.0f); //reduces the volume by 25 decibels\r\n clip.start();\r\n clip.loop(Clip.LOOP_CONTINUOUSLY);\r\n\r\n } else {\r\n System.out.println(\"Music File not found\"); // will be thrown if music file is not in the file\r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n }\r\n }",
"public void gameOver(){\n gameOverMusic.loop(pitch, volume);\n }",
"private void initialMusic(){\n\n }",
"public void play() { \r\n if (midi) \r\n sequencer.start(); \r\n else \r\n clip.start(); \r\n timer.start(); \r\n play.setText(\"Stop\"); \r\n playing = true; \r\n }",
"public void play() {\n\t\t//If volume is not muted\n\t\tif (volume != Volume.MUTE) {\n\t\t\t//If the clip is running\n\t\t\tif (clip.isRunning()) {\n\t\t\t\tclip.stop(); //Stop it\n\t\t\t}\n\t\t\tclip.setFramePosition(0); //Rewind\n\t\t\tclip.start(); //Play again\n\t\t}\n\t}",
"public void play() {\n try {\n if (clip != null) {\n new Thread() {\n public void run() {\n synchronized (clip) {\n clip.stop();\n clip.setFramePosition(0);\n clip.start();\n }\n }\n }.start();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"@Override\n public void run() {\n // TODO Auto-generated method stub\n running = true;\n AudioFile song = musicFiles.get(currentSongIndex);\n song.play();\n while(running){\n if(!song.isPlaying()){\n currentSongIndex++;\n if(currentSongIndex >= musicFiles.size()){\n currentSongIndex = 0;\n }\n song = musicFiles.get(currentSongIndex);\n song.play();\n }\n try{\n Thread.sleep(1);\n }\n catch (InterruptedException e){\n e.printStackTrace();\n } \n }\n }",
"private void play()\n {\n if(AudioDetector.getInstance().isNoAudio())\n {\n return;\n }\n\n stop();\n musicPlayer.play();\n }",
"public void playSoundtrack() {\n if(this.musicEnabled) {\n try {\n Clip soundtrackClip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(new BufferedInputStream(Assets.soundTrack));\n soundtrackClip.open(inputStream);\n soundtrackClip.start();\n soundtrackClip.loop(Clip.LOOP_CONTINUOUSLY);\n } catch (Exception e) {\n e.printStackTrace();\n System.err.println(e.getMessage());\n }\n }\n }",
"public static void musicFirstLevel(){\n\t\ttry {\r\n\t\t\tbgmusicLevel = new Music(\"res/sound/firstLevel.wav\");\r\n\t\t\tbgmusicLevel.loop(1f, 0.1f);\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void playMusic() {\n\t\ttry {\n\t\t\tsoundManager.playMusic(\"bgroundmusic\");\n\t\t} catch (Exception e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t}",
"public void play() {\n\t\t\r\n\t}",
"@Override\r\n protected void playGameStartAudio() {\n\taudio.playClip();\r\n }",
"public void backgroundMusic(String path) {\n if (Objects.equals(playingFile, path)) return;\n playingFile = path;\n\n\n // stop if playing\n stop();\n\n if (path == null) {\n // nothing to play\n playingClip = null;\n return;\n }\n\n try {\n\n // find file\n final AudioInputStream stream = AudioSystem.getAudioInputStream(new File(path));\n\n // create player\n playingClip = AudioSystem.getClip();\n playingClip.open(stream);\n playingClip.loop(playingClip.LOOP_CONTINUOUSLY);\n\n // play\n playingClip.start();\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"public void playAudio() {\n\t\tmusic[currentSong].stop();\n\t\tcurrentSong++;\n\t\tcurrentSong %= music.length;\n\t\tmusic[currentSong].play();\n\t}",
"protected void stopTheSound(){\n mp.stop();\n }",
"public void run() \n {\n try\n {\n Clip clip = AudioSystem.getClip();\n AudioInputStream inputStream = AudioSystem.getAudioInputStream(getClass().getResource(sound));\n clip = AudioSystem.getClip();\n clip.open(inputStream);\n clip.start(); \n } catch (UnsupportedAudioFileException e) {\n \t\t\te.printStackTrace();\n } catch (IOException e) {\n \t\t\te.printStackTrace();\n } catch (LineUnavailableException e) {\n \t\t\te.printStackTrace();\n }\n }",
"public static void clic_sound() {\n\t\tm_player_clic.start();\n\t\tm_player_clic.setMediaTime(new Time(0));\n\t}",
"public static void stopMusic()\n\t{\n\t\tif (music != null && currentMusicFile != -1)\n\t\t{\n\t\t\tmusic.get(currentMusicFile).stop();\n\t\t\tcurrentMusicFile = -1;\n\t\t}\n\t}",
"public void stop() { \r\n timer.stop(); \r\n if (midi) \r\n sequencer.stop(); \r\n else \r\n clip.stop(); \r\n play.setText(\"Play\"); \r\n playing = false; \r\n }",
"public void pauseMusic() {\n\t\talSourcePause(musicSourceIndex);\n\t\talSourcePause(reverseSourceIndex);\n\t\talSourcePause(flangeSourceIndex);\n\t\talSourcePause(revFlangeSourceIndex);\n\t\talSourcePause(wahSourceIndex);\n\t\talSourcePause(revWahSourceIndex);\n\t\talSourcePause(wahFlangeSourceIndex);\n\t\talSourcePause(revWahFlangeSourceIndex);\n\t\talSourcePause(distortSourceIndex);\n\t\talSourcePause(revDistortSourceIndex);\n\t\talSourcePause(distortFlangeSourceIndex);\n\t\talSourcePause(revDistortFlangeSourceIndex);\n\t\talSourcePause(wahDistortSourceIndex);\n\t\talSourcePause(revWahDistortSourceIndex);\n\t\talSourcePause(wahDistortFlangeSourceIndex);\n\t\talSourcePause(revWahDistortFlangeSourceIndex);\n\t}",
"@Override\n public SoundClip getGameMusic(){\n return gameMusic;\n }",
"private void stop(){ player.stop();}",
"public synchronized void stopSound() {\r\n running = false;\r\n }",
"public static void playerRun()\n {\n runSound.playLooped();\n }",
"@Override\n\tpublic void OnGameStart() {\n\t\tsuper.OnGameStart();\n\t\tMusicManage.setLoopingMusic(tumMusic, true);\n\t\tMusicManage.playMusic(tumMusic);\n\t}",
"private void stopAudio() {\r\n // stop playback if possible here!\r\n }",
"public void pause() {\n\t\tmusic.pause();\n\t}",
"public synchronized void playSmoothLoop(String path){\r\n if(currentLoop0){\r\n if(backgroundMusicLoop0!=null) backgroundMusicLoop0.fadeOut();\r\n currentLoop0 = false;\r\n if(backgroundMusicLoop1==null){\r\n backgroundMusicLoop1 = new MusicThread(path, currentLoop0);\r\n backgroundMusicLoop1.startOnFadeIn();\r\n }else backgroundMusicLoop1.fadeIn();\r\n }else{\r\n if(backgroundMusicLoop1!=null) backgroundMusicLoop1.fadeOut();\r\n currentLoop0 = true;\r\n if(backgroundMusicLoop0==null){\r\n backgroundMusicLoop0 = new MusicThread(path, currentLoop0);\r\n backgroundMusicLoop0.startOnFadeIn();\r\n }else backgroundMusicLoop0.fadeIn();\r\n }\r\n }",
"public synchronized void stopBackgroundSmoothly(){\r\n if(currentLoop0) backgroundMusicLoop0.fadeOut();\r\n else backgroundMusicLoop1.fadeOut();\r\n }",
"public void foodSound(){\n if (enableSound){\r\n\t clip.play();\r\n }\r\n\t\t\r\n\t}",
"public void stopPlaying() {\n seq.stop();\n }",
"@Override\n\tpublic void play() {\n\t\t\n\t}",
"@Override\n public void run() {\n if(musicEnabled) {\n playSoundtrack();\n while (running) {\n if(!stack.isEmpty()) {\n Sound sound = stack.pop();\n sound.play(sound.loadInputStream());\n }\n }\n }\n }",
"@Override\r\n \tpublic void play() {\n \t\tFile file = new File(location);\r\n \t\tlong audioFileLength = file.length();\r\n \t\tAudioInputStream audioInputStream;\r\n \t\ttry {\r\n \t\t\taudioInputStream = AudioSystem.getAudioInputStream(file);\r\n \r\n \t\t\tAudioFormat format = audioInputStream.getFormat();\r\n \r\n \t\t\tint frameSize = format.getFrameSize();\r\n \t\t\tfloat frameRate = format.getFrameRate();\r\n \t\t\tdurationInSeconds = (audioFileLength / (frameSize * frameRate));\r\n \r\n \r\n \t\t\tLine.Info linfo = new Line.Info(Clip.class);\r\n \t\t\tLine line = AudioSystem.getLine(linfo);\r\n \t\t\tclip = (Clip) line;\r\n \t\t\t//clip.addLineListener(this);\r\n \t\t\tclip.open(audioInputStream);\r\n \t\t\tclip.start();\r\n \r\n \t\t} catch (UnsupportedAudioFileException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (IOException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t} catch (LineUnavailableException e) {\r\n \t\t\t// TODO Auto-generated catch block\r\n \t\t\te.printStackTrace();\r\n \t\t}\t\r\n \r\n \t}",
"public void playOnce() {\n mStopAtLoopEnd = true;\n mStartTimeMillis = 0;\n mCurrentLoopNumber = 0;\n cancelCallback();\n postCallback();\n }",
"public void stopSound(){\n p.stop(as);\n }",
"public void Play() {\n superPlaneGodMode = false;\r\n if (!musicPlaying)\r\n backgroundMusic.pause();\r\n if (musicPlaying)\r\n backgroundMusic.start();\r\n paused = false;\r\n }",
"public static void musicMainMenu(){\n\t\ttry {\r\n\t\t\tbgmusic = new Music(\"res/otherSounds/Menu.wav\");\r\n\t\t\tbgmusic.loop(1f, 0.2f);\r\n\t\t\t//System.out.println(bgmusic.getVolume()); \t\r\n\t\t} catch (SlickException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}",
"public void menu(){\n menuMusic.loop(pitch, volume);\n }",
"public void play(final Clip clip) {\n\t\tclip.stop();\n\t\tclip.setFramePosition(0);\n\t\tclip.start();\n\t\t//not sure if this makes sense without the 'multiple variations' system that he used.\n\t}",
"public void play(){\n\t\t\n\t}",
"private void startPlay() {\n isPlaying = true;\n isPaused = false;\n playMusic();\n }",
"@Override\n protected void onStop() {\n super.onStop();\n stopMusic();\n }",
"@Override\n\tpublic void play() {\n\n\t}",
"public void pause() {\n\t\tcurrentClip.stop();\n\t\tisPlaying = false;\n\t}",
"public void stop() {\n\t\tsound.stop();\n\t}",
"public void updateVolume(){\r\n if(currentLoop0) backgroundMusicLoop0.gainControl.setValue(Window.musicVolume);\r\n else backgroundMusicLoop1.gainControl.setValue(Window.musicVolume);\r\n }",
"public void reset() { \r\n stop(); \r\n if (midi) \r\n sequencer.setTickPosition(0); \r\n else \r\n clip.setMicrosecondPosition(0); \r\n audioPosition = 0; \r\n progress.setValue(0); \r\n }",
"public void play() {\n\t\tplay(true, true);\n\t}",
"public void stopSound() {\n metaObject.stopSound();\n }",
"public void run() {\n\t\t try {\n\t\t Clip clip = AudioSystem.getClip();\n\t\t //AudioInputStream inputStream = AudioSystem.getAudioInputStream(\n\t\t //Main.class.getResourceAsStream(\"/path/to/sounds/\" + url));\n\t\t //clip.open(inputStream);\n\t\t clip.start(); \n\t\t } catch (Exception e) {\n\t\t System.err.println(e.getMessage());\n\t\t }\n\t\t }",
"public void play() {\n\t\tmusic.play();\n\t\tsyncPosition();\n\t}",
"public void stop()\n {\n if(AudioDetector.getInstance().isNoAudio() || musicPlayer == null)\n {\n return;\n }\n\n\n musicPlayer.stop();\n }",
"@Override\n\tpublic void pause() {\n\t PhoneDevice.Settings.stopMusic();\n\t}",
"public void run()\r\n\t{\r\n\t\t// Audio Loop\r\n\t\ttry \r\n\t\t{\r\n\t\t\tp.realize();\r\n\t \r\n\t \t// Create record control for player\r\n\t \tRecordControl rc = (RecordControl)p.getControl(\"RecordControl\");\r\n\t \t\r\n\t \t// Create file to write to\r\n\t \tByteArrayOutputStream output = new ByteArrayOutputStream();\r\n\r\n\t \t// Configure record stream destination\r\n\t \trc.setRecordStream(output);\r\n\t \tp.start();\r\n\t \t\r\n\t \twhile(!doStop)\r\n\t \t{\r\n\t\t \trc.setRecordStream(output);\r\n\t\t \trc.startRecord();\r\n\t\t \t\r\n\t\t \t// sleep 1 milisecond\r\n\t \t\tThread.sleep(1);\r\n\t \t\t\r\n\t \t\t// commit file\r\n\t\t \t\trc.commit();\r\n\t\t \t \trc.stopRecord();\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t \t\r\n\t\t \t\tbyte[] recordedSoundArray = output.toByteArray();\r\n\t\t \t\tif(recordedSoundArray.length>44){\r\n\t\t\t \t\r\n\t\t\t\t // temporary array for stripped sound bytes\r\n\t\t\t\t byte soundonly[] = new byte[recordedSoundArray.length-44];\r\n\t\t\t\t \r\n\t\t\t\t // strip file header\r\n\t\t\t\t for(int i =0; i<soundonly.length; i++){\r\n\t\t\t\t \tsoundonly[i]=(byte)(recordedSoundArray[i+44]-floor.getLevel());\r\n\t\t\t\t }\r\n \r\n\t\t\t\t // update stream array in graph\r\n\t\t\t \tg.updateStreamData(soundonly);\r\n\t\t\t \t\r\n\t\t\t \t// set current display on graph\r\n\t\t\t \t//display.setCurrent(this);\r\n\t\t\t \t\r\n\t\t\t \t// update graph plot\r\n\t\t\t\t g.update();\r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t \r\n\t\t\t\t // warn if threshold reached\r\n\t\t\t \tif(AAnalyzer.samplesAboveThreshold(soundonly, m_alertThreshold)>(soundonly.length-50)/2*1/10){\r\n\t\t\t \t\t\r\n\t\t\t \t\tdouble loudestFrequency = g.getLoudestFrequency();\r\n\t\t\t \t\r\n\t\t\t \t\t// Scan through the match candidates and alert on a match\r\n\t\t\t \t\tboolean foundSpecificMatch = false;\r\n\t\t\t \t\tfor(int j = 0; j < m_sounds.length; j++)\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\tif(m_sounds[j].checkMatch(loudestFrequency))\r\n\t\t\t \t\t\t{\r\n\t\t\t \t\t\t\tfoundSpecificMatch = true;\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\t\r\n\t\t\t \t\tif(!foundSpecificMatch && loudestFrequency>100){\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\td.vibrate(2000);\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\t// Do a popup\r\n\t\t\t \t\t\tAlert curAlert = new Alert(\"Sound detected\", \"Unknown sound - \" + Double.toString(loudestFrequency), null, AlertType.ALARM);\r\n\t\t\t \t\t\tcurAlert.setTimeout(3000);\r\n\t\t\t \t\t\td.setCurrent(curAlert, d.getCurrent());\r\n\t\t\t \t\t\t\r\n\t\t\t \t\t\tThread.sleep(curAlert.getTimeout()+200);\r\n\t\t\t \t\t\tSystem.out.println(\"frequency hit: \"+ loudestFrequency);\r\n\t\t\t \t\t}\r\n\t\t\t \t}\r\n\t\t\t }\r\n\t\t \t\telse{\r\n\t\t \t\t}\r\n\t\t \toutput.reset();\r\n\t \t}\r\n\t \t\r\n\t \t// close streams\r\n\t \trc.stopRecord();\r\n\t \t\tp.stop();\r\n\t \t\tp.close();\r\n\t\t}\r\n\t\tcatch(Exception e)\r\n\t\t{\r\n\t\t\tSystem.out.println(e.toString());\r\n\t\t}\r\n\t}",
"public void stopPlaying() {\n \t\tisPlaying = false;\n \t}",
"public static void stopSong()\n {\n JSoundsMainWindowViewController.iAmPlaying = true;\n JSoundsMainWindowViewController.iAmPausing = false;\n JSoundsMainWindowViewController.iAmResuming = false;\n \n MusicPlayerControl.stopSong();\n }",
"private void play() {\n play(Animation.INDEFINITE);\n }",
"public void stop() {\n if (playingClip != null)\n playingClip.stop();\n }",
"@Override\r\n public void play()\r\n {\n\r\n }",
"public void StopClip() {\n clip.stop();\n }",
"public static void playBackGroundMusic(String path) {\n if (musicPlayer != null && musicPlayer.getSourceLocation() != null) {\n if (musicPlayer.getSourceLocation().equals(path)) {\n if (musicPlayer.isEndOfMediaReached()) {\n musicPlayer.seek(0);\n musicPlayer.play();\n }\n return;\n }\n musicPlayer.stop();\n }\n musicPlayer = new Player();\n musicPlayer.setSourceLocation(path);\n musicPlayer.play();\n }",
"public void stop() {\n\t\tstop(!playing);\n\t}",
"public static void playSoundOnce(Clip clip)\n { \n if (clip == null || clip.isRunning())\n return;\n \n clip.setFramePosition(0);\n clip.start();\n }",
"@Override\r\n public void show()\r\n {\r\n // De inmediato, ponemos en marcha una melodia\r\n if (!juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).isPlaying())\r\n {\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).play();\r\n juego.getAdminComponentes().get(\"Audios/bgmusic06.ogg\", Music.class).setLooping(true);\r\n }\r\n }",
"@Override\n\tpublic void nowPlaying() {\n\t}",
"@Override\n\t\t public void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tStopMusic(2);\n\t\t\t\t\t\tStopMusic(3);\n\n\t\t\t\t\t\ttry {\n\n\t\t\t \tTitle.timerstop = false;\n\t\t\t\t\t\t\tnew Title();\n\t\t\t\t\t\t\tframe.dispose();\n\t\t\t\t\t\t} catch (IOException e1) {\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t}\n\t\t\t\t\t\t \n\t\t }",
"public void specialSong()\n {\n if(!mute)\n {\n try {\n \n bclip.stop();\n \n // Open an audio input stream.\n //URL url = this.getClass().getClassLoader().getResource(\"Glitzville.wav\"); \n //if(lastpowerUp.equals(\"RAINBOW\"))\n URL url = this.getClass().getClassLoader().getResource(\"Mario Kart Starman.wav\");\n \n \n \n \n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n sclip = AudioSystem.getClip();\n // Open audio clip and load samples from the audio input stream.\n sclip.open(audioIn); \n \n sclip.start();\n \n \n } catch (UnsupportedAudioFileException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } catch (LineUnavailableException e) {\n e.printStackTrace();\n } \n }\n }"
] | [
"0.7855677",
"0.7770886",
"0.75457335",
"0.74839747",
"0.73067737",
"0.7275371",
"0.7242751",
"0.7195446",
"0.7185282",
"0.7174853",
"0.7168342",
"0.71077913",
"0.7102033",
"0.7082901",
"0.70357347",
"0.7020019",
"0.7008159",
"0.6999252",
"0.6993543",
"0.69756967",
"0.6969734",
"0.6961013",
"0.6936384",
"0.69128907",
"0.6895494",
"0.68939215",
"0.68754333",
"0.68724614",
"0.6870527",
"0.68705",
"0.68684447",
"0.6864028",
"0.6842086",
"0.68327916",
"0.6832385",
"0.6806198",
"0.6802716",
"0.67789155",
"0.6764565",
"0.67421436",
"0.67369515",
"0.6705482",
"0.66913843",
"0.66892403",
"0.66753596",
"0.6652857",
"0.6647566",
"0.664428",
"0.66385263",
"0.6632328",
"0.6627703",
"0.6615423",
"0.65806586",
"0.6573101",
"0.65661",
"0.65658474",
"0.6565528",
"0.65617687",
"0.6554189",
"0.6550515",
"0.65426844",
"0.653568",
"0.65351",
"0.65220904",
"0.6518644",
"0.65126747",
"0.65098834",
"0.65091944",
"0.6508567",
"0.650325",
"0.6500537",
"0.6484859",
"0.6482635",
"0.64818364",
"0.6465263",
"0.64496434",
"0.6440714",
"0.6432643",
"0.64209306",
"0.64205223",
"0.64176345",
"0.64164156",
"0.64130837",
"0.6411246",
"0.6400014",
"0.6393408",
"0.63914555",
"0.6388842",
"0.6383601",
"0.63772726",
"0.6370471",
"0.6349306",
"0.63355106",
"0.631979",
"0.63195497",
"0.63130605",
"0.63090944",
"0.6308826",
"0.6263443",
"0.6254496"
] | 0.67286116 | 41 |
end of constructor studnet | public void takeOnBus(Bus bus) {
bus.takeOnBus(1000);
this.money -= 1000;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Constructor() {\r\n\t\t \r\n\t }",
"public Constructor(){\n\t\t\n\t}",
"public CSSTidier() {\n\t}",
"public DesastreData() { //\r\n\t}",
"public Clade() {}",
"public Pasien() {\r\n }",
"private TMCourse() {\n\t}",
"public AntrianPasien() {\r\n\r\n }",
"public CMN() {\n\t}",
"private NfkjBasic()\n\t\t{\n\t\t\t\n\t\t}",
"public Anschrift() {\r\n }",
"public Lanceur() {\n\t}",
"public CyanSus() {\n\n }",
"public Pitonyak_09_02() {\r\n }",
"public PSRelation()\n {\n }",
"public Phl() {\n }",
"public Individual()\r\n\t{\r\n\t}",
"public contrustor(){\r\n\t}",
"public EnsembleLettre() {\n\t\t\n\t}",
"public InitialData(){}",
"private Rekenhulp()\n\t{\n\t}",
"protected Betaling()\r\n\t{\r\n\t\t\r\n\t}",
"public Parameters() {\n\t}",
"public ListParameter()\r\n\t{\r\n\t}",
"public Mannschaft() {\n }",
"public DABeneficios() {\n }",
"public HLCPaymentDetails() { }",
"protected Settlement() {\n // empty constructor\n }",
"public Final_parametre() {\r\n\t}",
"public HandicapParameterSet() {\n }",
"public TacChrtypmstVOImpl() {\n }",
"public DomainKnowledge() {\r\n\t\tthis.construct(3);\r\n\t}",
"serial() {\n super(1, 2, 3);\n }",
"public ItsNatImpl()\r\n {\r\n }",
"public Caso_de_uso () {\n }",
"private void __sep__Constructors__() {}",
"public CommAreaRecord() {\n\t}",
"public Methods() { // ini adalah sebuah construktor kosong tidak ada parameternya\n System.out.println(\"Ini adalah Sebuah construktor \");\n }",
"protected ParameterList(){\n //title = t;\n //cellWorld = cw;\n }",
"public SysSkillConferpo()\n {\n }",
"public Soil()\n\t{\n\n\t}",
"public TebakNusantara()\n {\n }",
"public GlAccountBank () {\n\t\tsuper();\n\t}",
"public SecurityMB() {\n }",
"public TdExpCurpDTO() {\n }",
"public Achterbahn() {\n }",
"public Chauffeur() {\r\n\t}",
"private StoneContract() {\n }",
"public Cgg_jur_anticipo(){}",
"public Patient() {\n\t\t\n\t}",
"public _355() {\n\n }",
"public C23317d() {\n }",
"public Salle() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public Payroll()\r\n\t{\r\n\t\t\r\n\t}",
"public Ctacliente() {\n\t}",
"public Tbdtokhaihq3() {\n super();\n }",
"public TTau() {}",
"public BaseParameters(){\r\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"public P2PFirstContact() {\n // The empty constructor\n }",
"public Tbdcongvan36() {\n super();\n }",
"public Aanbieder() {\r\n\t\t}",
"public LibMembership() {\n\t\t\n\t}",
"public WSDL() {\r\n\t\tthis(\"\", \"\");\r\n\t}",
"public Identity()\n {\n super( Fields.ARGS );\n }",
"Petunia() {\r\n\t\t}",
"public iptablesDBContract() {\n\t}",
"public Construct() {\n\tprefixes = new StringBuilder();\n\tvariables = new StringBuilder();\n\twheres = new StringBuilder();\n }",
"public StudentRecord() {}",
"protected PrintBill() \r\n\t{/* nothing needed, but this prevents a public no-arg constructor from being created automatically */}",
"public p7p2() {\n }",
"private Ognl() {\n }",
"public dc_wallet() {}",
"protected IBDS()\r\n {\r\n \tthis.modifyBuffer = new StringBuffer(300); // all update operations belong to this only\r\n this.nodeList = new ArrayList<int []>(50);\r\n this.lastUpdated = System.nanoTime();\r\n //this.objectArray = new ArrayList();\r\n }",
"public CDAccount() {\r\n\t\t//termOfCD = 0;\r\n\t\t//maturityDate = new DateInfo();\r\n\t}",
"public Commune() {\n\t\tsuper();\n\t\t// TODO Auto-generated constructor stub\n\t}",
"public DoctorRecord() {\n super(Doctor.DOCTOR);\n }",
"Customer() \n\t{\n\t}",
"public SlanjePoruke() {\n }",
"public Curso() {\r\n }",
"public Patient() {\r\n\r\n\t}",
"public NarrativeStructInterpreter()\n {\n\n }",
"public Desinscription() {\n\t\tsuper();\n\t\tinitialize();\n\t}",
"public CalccustoRequest()\r\n\t{\r\n\t}",
"public BankAcc(){\r\n //uses another constuctor\r\n this(593,2.5,\"Deg\",\"Deg\",\"Deg\");\r\n System.out.println(\"EMpty\");;\r\n }",
"Doctor(){\n super();\n }",
"public StudentChoresAMImpl() {\n }",
"public Produit() {\n\t\tsuper();\n\t}",
"public SceneFurniRecord ()\n {\n }",
"public NetworkData() {\n }",
"public TutorIndustrial() {}",
"public LaundryCard() {\n\t}",
"protected Sentence() {/* intentionally empty block */}",
"public Ov_Chipkaart() {\n\t\t\n\t}",
"public AccessSqlParser ()\n\t{\n\t}",
"public NEATTranscriberBain() {\n\t}",
"public CuentaDeposito() {\n super();\n }",
"public mapper3c() { super(); }",
"public StStatutesub() {\n }",
"DataGenModel()\n {\n }",
"private TrainingContract() {\n }"
] | [
"0.72647846",
"0.6896491",
"0.6810838",
"0.6771728",
"0.67310673",
"0.6725187",
"0.67211545",
"0.66867316",
"0.6668389",
"0.66459423",
"0.661089",
"0.6597855",
"0.6593129",
"0.6584109",
"0.65341306",
"0.65164834",
"0.6511564",
"0.6504987",
"0.6489535",
"0.6479201",
"0.6470281",
"0.6454247",
"0.6454067",
"0.6442057",
"0.6427014",
"0.6423006",
"0.6415352",
"0.6415125",
"0.64010924",
"0.6367639",
"0.6366227",
"0.6353702",
"0.6347662",
"0.63431334",
"0.63426185",
"0.6342016",
"0.63342077",
"0.63338846",
"0.63267475",
"0.6325401",
"0.6318769",
"0.63166344",
"0.6306705",
"0.6303975",
"0.6299027",
"0.62953913",
"0.6281726",
"0.6276522",
"0.6270166",
"0.6265865",
"0.6260625",
"0.6259303",
"0.6258476",
"0.6256431",
"0.6254517",
"0.625333",
"0.6252445",
"0.62520313",
"0.6250815",
"0.62507117",
"0.62480843",
"0.62469053",
"0.6246856",
"0.62421155",
"0.6236317",
"0.6232858",
"0.6230514",
"0.6229864",
"0.62291497",
"0.622586",
"0.6224448",
"0.6223721",
"0.6222737",
"0.62199765",
"0.6218893",
"0.62171954",
"0.6214541",
"0.6213634",
"0.62098134",
"0.62078685",
"0.6198695",
"0.6198504",
"0.6198497",
"0.6195694",
"0.619495",
"0.619333",
"0.6190017",
"0.61787045",
"0.6175104",
"0.6165033",
"0.615975",
"0.6158878",
"0.61571544",
"0.6154152",
"0.6153438",
"0.61530584",
"0.6151624",
"0.61515546",
"0.6150009",
"0.61473346",
"0.6146974"
] | 0.0 | -1 |
Limits for this version of the app This method does not verify message length | public Boolean CheckLimits(String phoneNumber, int bombAmount)
{
Boolean passed = true;
if (phoneNumber.length() < 9 || phoneNumber.length() > 11)
{
passed = false;
Toast.makeText(getApplicationContext(), "Invalid phone number. Re-enter valid 10 digit phone number", Toast.LENGTH_LONG).show();
return passed;
}
if (bombAmount > 100)
{
passed = false;
Toast.makeText(getApplicationContext(), "Cannot send more than 100 texts at a time", Toast.LENGTH_LONG).show();
return passed;
}
return passed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getFullMessageLength();",
"long countMessageLengthTill(long maxLength) throws IllegalStateException;",
"public abstract int getMessageSize();",
"public int getMaxTextLength() {\n/* 529 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"@Test\n public void testMaxMessageLength() throws Exception {\n int maxMessageLength = 10;\n CountDownLatch latch = new CountDownLatch(1);\n EventStreamClosedClient eventListener = new EventStreamClosedClient(latch);\n\n try (EventStream streamEvents = new WebSocketEventStream(uri, new Token(\"token\"), 0, 0,\n maxMessageLength, eventListener)) {\n latch.await(30, TimeUnit.SECONDS);\n Assert.assertTrue(streamEvents.isEventStreamClosed());\n Assert.assertEquals(CloseCodes.TOO_BIG.getCode(),\n eventListener.closeCode);\n String message = \"Message length exceeded the configured maximum (\" +\n maxMessageLength + \" characters)\";\n Assert.assertEquals(message, eventListener.closePhrase);\n }\n }",
"protected int supportedMessageParamLength() {\n return MessageUtils.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH;\n }",
"public int getMAX_LENGTH_MESSAGE() {\n\t\treturn MAX_LENGTH_MESSAGE;\n\t}",
"static C2395k m11990i() {\n return new C2395k(\"Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.\");\n }",
"Long payloadLength();",
"@Override\n public int getMessageSize()\n {\n return 0;\n }",
"@Test(expected=ProtocolDecoderException.class)\n public void sizeLimitDecodeTextFrameFailEarly1() throws Exception {\n ProtocolCodecSessionEx session = new ProtocolCodecSessionEx();\n IoBufferAllocatorEx<?> allocator = session.getBufferAllocator();\n ProtocolDecoder decoder = new WsDraftHixieFrameDecoder(allocator, 20);\n \n int dataSize = 30;\n StringBuffer data = new StringBuffer(dataSize);\n for ( int i=0; i<(dataSize); i++ ) {\n data.append((i%10));\n }\n IoBufferEx in = allocator.wrap(allocator.allocate(dataSize+1))\n .put((byte)0x00)\n .putString(data.toString(), UTF_8.newEncoder())\n .flip();\n // As soon as we sent part of a message that exceeds the limit it should throw the exception\n decoder.decode(session, (IoBuffer) in, session.getDecoderOutput());\n }",
"public GiftCardProductQuery messageMaxLength() {\n startField(\"message_max_length\");\n\n return this;\n }",
"public int getMaxLength();",
"public abstract int getMaxLength();",
"@Test\n public void decodePayload_shouldRejectMessagesThatAreTooLong() {\n List<List<ByteBuf>> testByteBufSlices =\n Utils.generateTestSlices(LENGTH_PREFIX_EXCEEDING_MAXIMUM_LENGTH);\n\n for (Iterable<ByteBuf> bufSlices : testByteBufSlices) {\n RpcByteBufDecoder<StatusMessage> decoder = encoding.createDecoder(StatusMessage.class);\n List<ByteBuf> usedBufs = new ArrayList<>();\n assertThatThrownBy(\n () -> {\n for (ByteBuf bufSlice : bufSlices) {\n assertThat(decoder.decodeOneMessage(bufSlice)).isEmpty();\n bufSlice.release();\n usedBufs.add(bufSlice);\n }\n decoder.complete();\n })\n .isInstanceOf(ChunkTooLongException.class);\n assertThat(usedBufs).allMatch(b -> b.refCnt() == 0);\n }\n }",
"@Test(expected=ProtocolDecoderException.class)\n public void sizeLimitDecodeTextFrameFailEarly2() throws Exception {\n ProtocolCodecSessionEx session = new ProtocolCodecSessionEx();\n IoBufferAllocatorEx<?> allocator = session.getBufferAllocator();\n ProtocolDecoder decoder = new WsDraftHixieFrameDecoder(allocator, 20);\n \n int dataSize = 30;\n StringBuffer data = new StringBuffer(dataSize);\n for ( int i=0; i<(dataSize); i++ ) {\n data.append((i%10));\n }\n IoBufferEx in = allocator.wrap(allocator.allocate(dataSize+1))\n .put((byte)0x00)\n .putString(data.toString(), UTF_8.newEncoder())\n .flip();\n decoder.decode(session, (IoBuffer) in.getSlice(10), session.getDecoderOutput());\n // Now if we send the next 12 bytes that should exceed the limit (first byte is control byte, doesn't count)\n decoder.decode(session, (IoBuffer) in.getSlice(12), session.getDecoderOutput());\n }",
"public int errorStringLength()\n {\n return frameLength() - offendingHeaderFrameLength() - ErrorFlyweight.HEADER_LENGTH;\n }",
"@Override\n protected int getExpectedOutgoingMessageSize() {\n return 256;\n }",
"public int getMaxLength(){\n return this.maxLength;\n }",
"public void testOtacTooLong()\n {\n form.setVerificationCode(\"123456789\");\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }",
"public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}",
"public LengthCheck(int maxLength) {\n this.maxLength = maxLength;\n }",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"public void setMaxTextLength(int max) {\n/* 520 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public ShortMessage(int maxLength) {\r\n\t\tthis.maxLength = maxLength;\r\n\t}",
"public int getMaxLength() {\r\n return MAX_LENGTH;\r\n }",
"public final int getMessageSize() {\n if (length == UNKNOWN_LENGTH) {\n throw new ProtocolException();\n }\n\n return length;\n }",
"private boolean validMessage(String message){\r\n //35 lines of text seems to be the max\r\n //TODO check if its a character limit and not a newline limit in iteration 4\r\n int newLines = 0;\r\n for(int i = 1; i < message.length(); i++)\r\n if(message.substring(i-1, i).equals(\".\")){\r\n newLines++;\r\n }\r\n return newLines <= this.lineBound;\r\n }",
"public int getMaxLength() {\r\n return _maxLength;\r\n }",
"public void testMaximumMessages() throws Exception {\n for (int i = 0; i < 1024 + 1; i++) {\n sendMessage(i);\n waitForMs(50);\n }\n\n sendMessage(0);\n waitForMs(40);\n // Check if the oldest one has been already evicted.\n CellBroadcastMessage cbmTest =\n (CellBroadcastMessage) mServiceIntentToVerify.getExtras().get(\"message\");\n CellBroadcastMessage cbm = new CellBroadcastMessage(createMessage(0));\n\n compareCellBroadCastMessage(cbm, cbmTest);\n mActivityIntentToVerify = null;\n }",
"public int getPayloadLength() {\n return buffer.limit() - 12;\n }",
"public int getMaxLength() {\n return maxLength;\n }",
"private static boolean checkLength(String password) {\n \treturn password.length() >= minLength;\n }",
"public int getProtocolDelimitedLength();",
"public void setMaxLength(int maxLength) {\r\n _maxLength = maxLength;\r\n }",
"int getServerPayloadSizeBytes();",
"private void checkLength(String value, int maxLength) throws WikiException {\r\n\t\tif (value != null && value.length() > maxLength) {\r\n\t\t\tthrow new WikiException(new WikiMessage(\"error.fieldlength\", value, Integer.valueOf(maxLength).toString()));\r\n\t\t}\r\n\t}",
"boolean checkLen(int epcbytes)\n {\n return true;\n }",
"protected abstract int getMaxDesiredSize();",
"@Test(expected = MessageValidationException.class)\r\n public void testValidate8() throws MessageValidationException {\r\n ProductRequestMsg instance = new ProductRequestMsg();\r\n //Too long\r\n instance.setMessage(\"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\");\r\n instance.setQuantity(1.0f);\r\n instance.setPickingDate(new Date());\r\n PartialUserMsg user = new PartialUserMsg();\r\n user.setId(167892L);\r\n instance.setRequester(user);\r\n ProductMsg product = new ProductMsg();\r\n product.setId(12L);\r\n instance.setProduct(product);\r\n instance.validate();\r\n }",
"int getMaxCharSize();",
"Boolean checkLength(String detail);",
"@Test(timeout = 4000)\n public void test52() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickSize(6372, 3, 2146363568);\n assertEquals(\"id=6372 askSize=2146363568\", string0);\n }",
"public Integer maxMessages();",
"public void setMaxLength(int maxLength){\n mMaxLengthOfString = maxLength;\n }",
"private void m689f(int i) {\n if (i >= 0) {\n long j = this.f522q;\n if (j != -1 && ((long) i) > j) {\n throw new TProtocolException(\"Length exceeded max allowed: \" + i);\n }\n return;\n }\n throw new TProtocolException(\"Negative length: \" + i);\n }",
"int getMaxPackLen()\n {\n return configfile.max_pack_len;\n }",
"@Test\n\tpublic void invalidLengthShort() {\n\t\tboolean result = validator.isValid(\"73602851\");\n\t\tassertFalse(result);\n\t}",
"public static int getMaxSize(){\n\t\treturn 2* 4;\n\t}",
"InputFilter[] checkUrlLengthLimit(final Context context);",
"public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }",
"int minLength();",
"public void setMaxLength(int value) {\n this.maxLength = value;\n }",
"public abstract long getMaxSize();",
"@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}",
"public PayloadMaxSizeExceededException(String message) {\n\t\tsuper(message);\n\t}",
"public void setLength(long length) { \n this.length = length; \n }",
"private boolean checkLengthPlateNumber(EditText text, TextInputLayout TFB, String massage) {\n if(text.getText().toString().length() > 10)\n {\n TFB.setErrorEnabled(true);\n TFB.setError(massage);\n return false;\n }\n else\n {\n TFB.setErrorEnabled(false);\n return true;\n }\n }",
"public static String validString(String message, int minLength, int maxLength){\n boolean success = false;\n String line = \"\";\n do {\n line = readLine(message).trim();\n if (inRange(line.length(), minLength, maxLength))\n success = true;\n else\n System.out.println(\"El número máximo de caracteres es \" + \n maxLength + \"... \");\n } while(!success);\n return line;\n }",
"public Boolean CheckLimits(String phoneNumber, int bombAmount, String messageToSend)\n {\n Boolean passed = true;\n if (phoneNumber.length() < 9 || phoneNumber.length() > 11)\n {\n passed = false;\n Toast.makeText(getApplicationContext(), \"Invalid phone number. Re-enter valid 10 digit phone number\", Toast.LENGTH_LONG).show();\n return passed;\n }\n if (bombAmount > 100)\n {\n passed = false;\n Toast.makeText(getApplicationContext(), \"Cannot send more than 100 texts at a time\", Toast.LENGTH_LONG).show();\n return passed;\n }\n if (messageToSend.length() > 140)\n {\n passed = false;\n Toast.makeText(getApplicationContext(), \"Bomb message cannot be greater than 140 characters\", Toast.LENGTH_LONG).show();\n return passed;\n }\n\n return passed;\n }",
"@Override\n public int getMaxCapacity() {\n return 156250000;\n }",
"private boolean checkLengthDeviceSerialEditText (EditText text, TextInputLayout TFB, String massage) {\n if(text.getText().toString().length() > 10 || text.getText().toString().length() < 10)\n {\n TFB.setErrorEnabled(true);\n TFB.setError(massage);\n return false;\n }\n else\n {\n TFB.setErrorEnabled(false);\n return true;\n }\n\n\n }",
"public boolean checkLength(String password) {\n return password.matches(\"^.{8,25}$\");\n }",
"pb4server.MaxPrisonBuffAskReq getMaxPrisonBuffAskReq();",
"private void checkInput(String input)throws Exception{\n\n if (input.getBytes(\"UTF-8\").length > 255){\n throw new IOException(\"Message too long\");\n\n }\n try {\n if (Integer.parseInt(input) < 0 || Integer.parseInt(input) > 65535) {\n throw new IOException(\"Port not valid\");\n }\n }catch (NumberFormatException e){\n //nothing should happen\n }\n }",
"public int get_length();",
"public int getMailBoxCapacity() { return mailBoxCapacity; }",
"protected void sequence_MaxLength(ISerializationContext context, MaxLength semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.LIMIT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.LIMIT__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.SURFACE__VALUE) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.SURFACE__VALUE));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getMaxLengthAccess().getNameMaxLengthKeyword_0_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getMaxLengthAccess().getValueINTTerminalRuleCall_2_0(), semanticObject.getValue());\n\t\tfeeder.finish();\n\t}",
"private boolean hasValidLength()\n {\n final int length = mTextInputLayout.getText().length();\n return (length >= mMinLen && length <= mMaxLen);\n }",
"public int getMaxChainLength(){\r\n return maxChainLength;\r\n }",
"@java.lang.Override\n public long getMaxEnvelopeQueueSize() {\n return maxEnvelopeQueueSize_;\n }",
"@Test\n public void testErrOnMaxPayloadLimit() {\n long expectedMaxPayload = 10;\n String serverInfo =\n \"INFO {\\\"server_id\\\":\\\"foobar\\\",\\\"version\\\":\\\"0.6.6\\\",\\\"go\\\":\\\"go1.5.1\\\",\\\"host\\\":\\\"%s\\\",\\\"port\\\":%d,\\\"auth_required\\\":false,\\\"ssl_required\\\":false,\\\"max_payload\\\":%d}\\r\\n\";\n\n TCPConnectionFactoryMock mcf = new TCPConnectionFactoryMock();\n String infoString = (String.format(serverInfo, \"mockserver\", 2222, expectedMaxPayload));\n // System.err.println(infoString);\n mcf.setServerInfoString(infoString);\n ConnectionFactory cf = new ConnectionFactory();\n try (Connection c = cf.createConnection(mcf)) {\n // Make sure we parsed max payload correctly\n assertEquals(c.getMaxPayload(), expectedMaxPayload);\n\n // Check for correct exception\n boolean exThrown = false;\n try {\n c.publish(\"hello\", \"hello world\".getBytes());\n } catch (IllegalArgumentException e) {\n assertEquals(ERR_MAX_PAYLOAD, e.getMessage());\n exThrown = true;\n } finally {\n assertTrue(\"Should have generated a IllegalArgumentException.\", exThrown);\n }\n\n // Check for success on less than maxPayload\n\n } catch (IOException | TimeoutException e) {\n fail(\"Connection to mock server failed: \" + e.getMessage());\n }\n }",
"protected boolean correctLength(final CommandSender sender, final int size, final int min, final int max) {\n\t\tif (size < min || size > max) {\n\t\t\tthis.help(sender, false);\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"@Test\n public void testEnsureBufferSizeExpandsToBeyondMaxBufferSize() {\n assertEnsureBufferSizeExpandsToMaxBufferSize(true);\n }",
"public void MaxlengthPhoneNumber() {\n\t\tCommonFunctions.elementAttributeContainsValue(PhoneNumber, \"maxlength\", \"10\");\n\t}",
"public void verifySearchLimit255() throws Exception {\n clickElement(eleToDoSearchInput, \"click to eleToDoSearchInput\");\n sendKeyTextBox(eleToDoSearchInput, maxLenghtString, \"send key to maxLenghtString\");\n validateMaxlenght(this.eleToDoSearchInput, \"To Do Search Input\", maxLenght);\n }",
"int getMaxSize();",
"public static boolean validatePacketLength(ByteArrayBuffer buf, int authTagLen)\n {\n int length = buf.getLength();\n int neededLength = 8 /* sender SSRC */ + 4 /* index */ + authTagLen;\n\n if (length < neededLength) {\n return false;\n }\n return true;\n }",
"private static SECSItemNumLengthBytes calculateMinimumNumberOfLengthBytes(int length)\n {\n SECSItemNumLengthBytes result = SECSItemNumLengthBytes.ONE;\n if (length > 255)\n {\n if (length < 65536)\n result = SECSItemNumLengthBytes.TWO;\n else\n result = SECSItemNumLengthBytes.THREE;\n }\n \n return result;\n }",
"private void sizeLimitDecodeTextFrame(int maxSize) throws Exception {\n ProtocolCodecSessionEx session = new ProtocolCodecSessionEx();\n IoBufferAllocatorEx<?> allocator = session.getBufferAllocator();\n ProtocolDecoder decoder = new WsDraftHixieFrameDecoder(allocator, maxSize);\n\n IoBufferEx in = allocator.wrap(allocator.allocate(14))\n .put((byte)0x00)\n .putString(\"Hello, world\", UTF_8.newEncoder())\n .put((byte)0xff)\n .flip();\n\n decoder.decode(session, (IoBuffer) in, session.getDecoderOutput());\n\n WsMessage out = (WsMessage)session.getDecoderOutputQueue().poll();\n assertEquals(new WsTextMessage(allocator.wrap(ByteBuffer.wrap(\"Hello, world\".getBytes(UTF_8)))), out);\n \n assertTrue(session.getDecoderOutputQueue().isEmpty());\n decoder.finishDecode(session, session.getDecoderOutput());\n\n assertTrue(session.getDecoderOutputQueue().isEmpty());\n assertFalse(in.hasRemaining());\n }",
"@Override\n public int numberOfMessages() {\n return messages.size();\n }",
"protected void checkMaxSizeText(String text, int maxLength, String error)\r\n\t\t\tthrows ArticleInputMaxSizeException {\r\n\t\tif (text.length() > maxLength) {\r\n\t\t\tthrow new ArticleInputMaxSizeException(error);\r\n\t\t}\r\n\t}",
"public boolean meetsMinimumLength(){\n\n return alg.meetsMinimumLength(input.getText().toString());\n }",
"@java.lang.Override\n public long getMaxEnvelopeQueueSize() {\n return maxEnvelopeQueueSize_;\n }",
"@Test\n public void testPasswordMinLength()\n {\n String invalid = repeatM(7);\n owner.setPassword(invalid);\n assertInvalid(owner, \"password\", \"Password must be at least 8 characters in length\", invalid);\n }",
"@Override\n protected long getMaxBytes(final PropertyContext context) {\n return Long.MAX_VALUE;\n }",
"protected int getPayloadLength() {\n if (data == null) {\n return 0;\n } else {\n return data.length;\n }\n }",
"protected abstract boolean reachedContractLimit(int size);",
"public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}",
"protected long getVerificationByteCount() {\n final long verificationByteCount = testVerificationByteCount >= 0 ?\n testVerificationByteCount :\n kvsImpl.getDefaultLOBVerificationBytes();\n\n return Math.min(lobSize, verificationByteCount);\n }",
"@Override\n public int getNumDialogsLimit() {\n return endpointHandler.getNumDialogsLimit();\n }",
"private void raiseLimitException() {\n\t\t\tthrow new DataBufferLimitException(\"Exceeded limit on max bytes to buffer : \" + getMaxInMemorySize());\n\t\t}",
"public static void m5827f() {\n if (f4669a != null) {\n f4669a.m12578a(\"webview_max_polling_error\", null);\n }\n Answers.getInstance().logCustom(new CustomEvent(\"webview_max_polling_error\"));\n }",
"public long maxResponseLength() {\n return get(MAX_RESPONSE_LENGTH);\n }",
"public void setLength(int length)\n {\n encryptionDictionary.setInt(\"Length\", length);\n }",
"@Test\n\tpublic void invalidLengthLong() {\n\t\tboolean result = validator.isValid(\"73102851691\");\n\t\tassertFalse(result);\n\t}",
"int getMaxVarcharSize();",
"public int getMaxCommunityLength() {\n return maxCommunityLength;\n }",
"public int getLovDataByteSize() {\n\t\treturn 0; // sometimes first 4 bytes give the length of data + 4 bytes for number\n\t}",
"public abstract int getMaxQlength();"
] | [
"0.689936",
"0.67089146",
"0.6464698",
"0.6345212",
"0.63249576",
"0.6242357",
"0.62230647",
"0.61975825",
"0.6182049",
"0.6170711",
"0.6101667",
"0.6076463",
"0.604028",
"0.6037958",
"0.5992413",
"0.5971771",
"0.5961429",
"0.59443736",
"0.59247184",
"0.5892307",
"0.5878121",
"0.5870378",
"0.58421284",
"0.58421284",
"0.58364105",
"0.5816431",
"0.5812818",
"0.5793053",
"0.5787302",
"0.57537633",
"0.5733176",
"0.57287395",
"0.57190186",
"0.57148516",
"0.5708891",
"0.57061505",
"0.5702524",
"0.5691497",
"0.5687536",
"0.5671066",
"0.5663714",
"0.5643586",
"0.563348",
"0.5606774",
"0.5590417",
"0.55724245",
"0.5563574",
"0.55283415",
"0.551709",
"0.54945046",
"0.54930747",
"0.54843056",
"0.54786855",
"0.5466972",
"0.5466344",
"0.5455779",
"0.5451364",
"0.5451206",
"0.54511",
"0.54440945",
"0.5442851",
"0.54348135",
"0.5426769",
"0.5422434",
"0.5420247",
"0.5416894",
"0.541344",
"0.54060155",
"0.54038155",
"0.539416",
"0.5383667",
"0.538275",
"0.5375398",
"0.5370942",
"0.5361615",
"0.5352703",
"0.53478366",
"0.5347647",
"0.5340997",
"0.53398407",
"0.5331258",
"0.53280574",
"0.53249335",
"0.5324722",
"0.53197086",
"0.53181326",
"0.53152746",
"0.5298192",
"0.5297137",
"0.52960664",
"0.52940667",
"0.5284317",
"0.52759486",
"0.5271208",
"0.52698857",
"0.5264758",
"0.5264284",
"0.5263584",
"0.5257377",
"0.52560115",
"0.5255951"
] | 0.0 | -1 |
Limits for this version of the app This method verifies message length | public Boolean CheckLimits(String phoneNumber, int bombAmount, String messageToSend)
{
Boolean passed = true;
if (phoneNumber.length() < 9 || phoneNumber.length() > 11)
{
passed = false;
Toast.makeText(getApplicationContext(), "Invalid phone number. Re-enter valid 10 digit phone number", Toast.LENGTH_LONG).show();
return passed;
}
if (bombAmount > 100)
{
passed = false;
Toast.makeText(getApplicationContext(), "Cannot send more than 100 texts at a time", Toast.LENGTH_LONG).show();
return passed;
}
if (messageToSend.length() > 140)
{
passed = false;
Toast.makeText(getApplicationContext(), "Bomb message cannot be greater than 140 characters", Toast.LENGTH_LONG).show();
return passed;
}
return passed;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"long getFullMessageLength();",
"long countMessageLengthTill(long maxLength) throws IllegalStateException;",
"Boolean checkLength(String detail);",
"private static boolean checkLength(String password) {\n \treturn password.length() >= minLength;\n }",
"@Test\n public void testMaxMessageLength() throws Exception {\n int maxMessageLength = 10;\n CountDownLatch latch = new CountDownLatch(1);\n EventStreamClosedClient eventListener = new EventStreamClosedClient(latch);\n\n try (EventStream streamEvents = new WebSocketEventStream(uri, new Token(\"token\"), 0, 0,\n maxMessageLength, eventListener)) {\n latch.await(30, TimeUnit.SECONDS);\n Assert.assertTrue(streamEvents.isEventStreamClosed());\n Assert.assertEquals(CloseCodes.TOO_BIG.getCode(),\n eventListener.closeCode);\n String message = \"Message length exceeded the configured maximum (\" +\n maxMessageLength + \" characters)\";\n Assert.assertEquals(message, eventListener.closePhrase);\n }\n }",
"private boolean hasValidLength()\n {\n final int length = mTextInputLayout.getText().length();\n return (length >= mMinLen && length <= mMaxLen);\n }",
"public abstract int getMessageSize();",
"boolean checkLen(int epcbytes)\n {\n return true;\n }",
"public int getMaxTextLength() {\n/* 529 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"public int getMaxLength();",
"public LengthCheck(int maxLength) {\n this.maxLength = maxLength;\n }",
"public boolean meetsMinimumLength(){\n\n return alg.meetsMinimumLength(input.getText().toString());\n }",
"private boolean validMessage(String message){\r\n //35 lines of text seems to be the max\r\n //TODO check if its a character limit and not a newline limit in iteration 4\r\n int newLines = 0;\r\n for(int i = 1; i < message.length(); i++)\r\n if(message.substring(i-1, i).equals(\".\")){\r\n newLines++;\r\n }\r\n return newLines <= this.lineBound;\r\n }",
"public int getMAX_LENGTH_MESSAGE() {\n\t\treturn MAX_LENGTH_MESSAGE;\n\t}",
"public abstract int getMaxLength();",
"public int getLength() {\r\n\t\treturn messageData.length;\r\n\t}",
"public boolean checkLength(String password) {\n return password.matches(\"^.{8,25}$\");\n }",
"@Test\n public void decodePayload_shouldRejectMessagesThatAreTooLong() {\n List<List<ByteBuf>> testByteBufSlices =\n Utils.generateTestSlices(LENGTH_PREFIX_EXCEEDING_MAXIMUM_LENGTH);\n\n for (Iterable<ByteBuf> bufSlices : testByteBufSlices) {\n RpcByteBufDecoder<StatusMessage> decoder = encoding.createDecoder(StatusMessage.class);\n List<ByteBuf> usedBufs = new ArrayList<>();\n assertThatThrownBy(\n () -> {\n for (ByteBuf bufSlice : bufSlices) {\n assertThat(decoder.decodeOneMessage(bufSlice)).isEmpty();\n bufSlice.release();\n usedBufs.add(bufSlice);\n }\n decoder.complete();\n })\n .isInstanceOf(ChunkTooLongException.class);\n assertThat(usedBufs).allMatch(b -> b.refCnt() == 0);\n }\n }",
"private boolean checkLengthPlateNumber(EditText text, TextInputLayout TFB, String massage) {\n if(text.getText().toString().length() > 10)\n {\n TFB.setErrorEnabled(true);\n TFB.setError(massage);\n return false;\n }\n else\n {\n TFB.setErrorEnabled(false);\n return true;\n }\n }",
"public int errorStringLength()\n {\n return frameLength() - offendingHeaderFrameLength() - ErrorFlyweight.HEADER_LENGTH;\n }",
"protected int supportedMessageParamLength() {\n return MessageUtils.DB2_JCC_MAX_EXCEPTION_PARAM_LENGTH;\n }",
"Long payloadLength();",
"private boolean checkLengthDeviceSerialEditText (EditText text, TextInputLayout TFB, String massage) {\n if(text.getText().toString().length() > 10 || text.getText().toString().length() < 10)\n {\n TFB.setErrorEnabled(true);\n TFB.setError(massage);\n return false;\n }\n else\n {\n TFB.setErrorEnabled(false);\n return true;\n }\n\n\n }",
"private boolean isLengthCorrect(final String token) {\n return token.length() == VALID_TOKEN_LENGTH;\n }",
"public int getMaxLength(){\n return this.maxLength;\n }",
"private void checkLength(String value, int maxLength) throws WikiException {\r\n\t\tif (value != null && value.length() > maxLength) {\r\n\t\t\tthrow new WikiException(new WikiMessage(\"error.fieldlength\", value, Integer.valueOf(maxLength).toString()));\r\n\t\t}\r\n\t}",
"public static boolean validatePacketLength(ByteArrayBuffer buf, int authTagLen)\n {\n int length = buf.getLength();\n int neededLength = 8 /* sender SSRC */ + 4 /* index */ + authTagLen;\n\n if (length < neededLength) {\n return false;\n }\n return true;\n }",
"public int getMaxLength() {\r\n return MAX_LENGTH;\r\n }",
"public void testOtacTooLong()\n {\n form.setVerificationCode(\"123456789\");\n validator.validate(form, errors);\n assertTrue(errors.hasErrors());\n }",
"@Override\n\tprotected void checkNumberOfInputs(int length) {\n\n\t}",
"public GiftCardProductQuery messageMaxLength() {\n startField(\"message_max_length\");\n\n return this;\n }",
"protected boolean correctLength(final CommandSender sender, final int size, final int min, final int max) {\n\t\tif (size < min || size > max) {\n\t\t\tthis.help(sender, false);\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}",
"public static String validString(String message, int minLength, int maxLength){\n boolean success = false;\n String line = \"\";\n do {\n line = readLine(message).trim();\n if (inRange(line.length(), minLength, maxLength))\n success = true;\n else\n System.out.println(\"El número máximo de caracteres es \" + \n maxLength + \"... \");\n } while(!success);\n return line;\n }",
"public int getMaxLength() {\r\n return _maxLength;\r\n }",
"public final int getMessageSize() {\n if (length == UNKNOWN_LENGTH) {\n throw new ProtocolException();\n }\n\n return length;\n }",
"public int getMaxLength() {\n return maxLength;\n }",
"@Test(expected=ProtocolDecoderException.class)\n public void sizeLimitDecodeTextFrameFailEarly1() throws Exception {\n ProtocolCodecSessionEx session = new ProtocolCodecSessionEx();\n IoBufferAllocatorEx<?> allocator = session.getBufferAllocator();\n ProtocolDecoder decoder = new WsDraftHixieFrameDecoder(allocator, 20);\n \n int dataSize = 30;\n StringBuffer data = new StringBuffer(dataSize);\n for ( int i=0; i<(dataSize); i++ ) {\n data.append((i%10));\n }\n IoBufferEx in = allocator.wrap(allocator.allocate(dataSize+1))\n .put((byte)0x00)\n .putString(data.toString(), UTF_8.newEncoder())\n .flip();\n // As soon as we sent part of a message that exceeds the limit it should throw the exception\n decoder.decode(session, (IoBuffer) in, session.getDecoderOutput());\n }",
"@Test\n\tpublic void invalidLengthShort() {\n\t\tboolean result = validator.isValid(\"73602851\");\n\t\tassertFalse(result);\n\t}",
"public boolean checkLength(Contribution contribution) {\n\t\tint longness= jdbc.queryForObject(\"select lineLength from stories where title=:title\", \n\t\t\t\tnew MapSqlParameterSource(\"title\", contribution.getTitle()), Integer.class);\n\t\tSystem.out.println(\"Your content: \"+contribution.getAddition().length()+\" the max length: \"+longness);\n\t\tif(contribution.getAddition().length() > longness) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"protected boolean validatePasswordMinLenght(final String password) {\r\n\t\tboolean status = true;\r\n\t\tSystemProp sysprop = SystemProp.getInstance();\r\n\r\n\t\ttry {\r\n\t\t\tint minlength = Integer.parseInt(sysprop\r\n\t\t\t\t\t.getValue(\"password.minlenght\"));\r\n\r\n\t\t\tif (password.length() < minlength) {\r\n\t\t\t\tstatus = false;\r\n\t\t\t}\r\n\t\t} catch (NumberFormatException e) {\r\n\t\t\tstatus = false;\r\n\t\t}\r\n\t\treturn status;\r\n\t}",
"int getMaxCharSize();",
"InputFilter[] checkUrlLengthLimit(final Context context);",
"int minLength();",
"public boolean checkDescription() {\n int size = description.length();\n return size >= 1 && size <= 256;\n }",
"protected void checkMaxSizeText(String text, int maxLength, String error)\r\n\t\t\tthrows ArticleInputMaxSizeException {\r\n\t\tif (text.length() > maxLength) {\r\n\t\t\tthrow new ArticleInputMaxSizeException(error);\r\n\t\t}\r\n\t}",
"@Test(expected=ProtocolDecoderException.class)\n public void sizeLimitDecodeTextFrameFailEarly2() throws Exception {\n ProtocolCodecSessionEx session = new ProtocolCodecSessionEx();\n IoBufferAllocatorEx<?> allocator = session.getBufferAllocator();\n ProtocolDecoder decoder = new WsDraftHixieFrameDecoder(allocator, 20);\n \n int dataSize = 30;\n StringBuffer data = new StringBuffer(dataSize);\n for ( int i=0; i<(dataSize); i++ ) {\n data.append((i%10));\n }\n IoBufferEx in = allocator.wrap(allocator.allocate(dataSize+1))\n .put((byte)0x00)\n .putString(data.toString(), UTF_8.newEncoder())\n .flip();\n decoder.decode(session, (IoBuffer) in.getSlice(10), session.getDecoderOutput());\n // Now if we send the next 12 bytes that should exceed the limit (first byte is control byte, doesn't count)\n decoder.decode(session, (IoBuffer) in.getSlice(12), session.getDecoderOutput());\n }",
"@Override\n public int getMessageSize()\n {\n return 0;\n }",
"public static boolean isValidLength(String test) {\n return test.length() <= MAX_CHARACTERS;\n }",
"@Test\n\tpublic void invalidLengthLong() {\n\t\tboolean result = validator.isValid(\"73102851691\");\n\t\tassertFalse(result);\n\t}",
"public int get_length();",
"public static boolean validateInputLength(String[] args) {\n return args.length == 3;\n }",
"public int getProtocolDelimitedLength();",
"public void testMaximumMessages() throws Exception {\n for (int i = 0; i < 1024 + 1; i++) {\n sendMessage(i);\n waitForMs(50);\n }\n\n sendMessage(0);\n waitForMs(40);\n // Check if the oldest one has been already evicted.\n CellBroadcastMessage cbmTest =\n (CellBroadcastMessage) mServiceIntentToVerify.getExtras().get(\"message\");\n CellBroadcastMessage cbm = new CellBroadcastMessage(createMessage(0));\n\n compareCellBroadCastMessage(cbm, cbmTest);\n mActivityIntentToVerify = null;\n }",
"public int getLength()\n {\n return encryptionDictionary.getInt( \"Length\", 40 );\n }",
"private void checkInput(String input)throws Exception{\n\n if (input.getBytes(\"UTF-8\").length > 255){\n throw new IOException(\"Message too long\");\n\n }\n try {\n if (Integer.parseInt(input) < 0 || Integer.parseInt(input) > 65535) {\n throw new IOException(\"Port not valid\");\n }\n }catch (NumberFormatException e){\n //nothing should happen\n }\n }",
"public void setMaxLength(int maxLength) {\r\n _maxLength = maxLength;\r\n }",
"protected abstract int getMaxDesiredSize();",
"public void verifySearchLimit255() throws Exception {\n clickElement(eleToDoSearchInput, \"click to eleToDoSearchInput\");\n sendKeyTextBox(eleToDoSearchInput, maxLenghtString, \"send key to maxLenghtString\");\n validateMaxlenght(this.eleToDoSearchInput, \"To Do Search Input\", maxLenght);\n }",
"public int checkAndGetTypeLength() {\n return checkAndGetTypeLength(this.byteArr);\n }",
"boolean testLength(Tester t) {\n return t.checkExpect(lob3.length(), 3) && t.checkExpect(los3.length(), 3)\n && t.checkExpect(los1.length(), 1) && t.checkExpect(new MtLoGamePiece().length(), 0);\n }",
"public int getPayloadLength() {\n return buffer.limit() - 12;\n }",
"public void MaxlengthPhoneNumber() {\n\t\tCommonFunctions.elementAttributeContainsValue(PhoneNumber, \"maxlength\", \"10\");\n\t}",
"private boolean validatePacket(String[] packet)throws NullPointerException\n\t{\n\n\t\tif(packet == null)\n\t\t{\n\t\t\tthrow new NullPointerException(\"Packet was null\");\n\t\t}\n\n\t\tfor(int i = 2 ; i< packet.length ; i++)\n\t\t{\n\t\t\tif(packet.length > MAX_SIZE)\n\t\t\t{\n\t\t\t\tthrow new StringIndexOutOfBoundsException(\"Message \" + (i-1)+\": \" + \"'\" + packet[i] + \"'\" + \"is to long\");\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"protected void checkSize(){\n if (size == data.length){\n resize( 2 * data.length);\n }\n }",
"static C2395k m11990i() {\n return new C2395k(\"Protocol message was too large. May be malicious. Use CodedInputStream.setSizeLimit() to increase the size limit.\");\n }",
"protected boolean isVmNameValidLength(VM vm) {\n\n // get VM name\n String vmName = vm.getvm_name();\n\n // get the max VM name (configuration parameter)\n int maxVmNameLengthWindows = Config.<Integer> GetValue(ConfigValues.MaxVmNameLengthWindows);\n int maxVmNameLengthNonWindows = Config.<Integer> GetValue(ConfigValues.MaxVmNameLengthNonWindows);\n\n // names are allowed different lengths in Windows and non-Windows OSs,\n // consider this when setting the max length.\n int maxLength = vm.getvm_os().isWindows() ? maxVmNameLengthWindows : maxVmNameLengthNonWindows;\n\n // check if name is longer than allowed name\n boolean nameLengthValid = (vmName.length() <= maxLength);\n\n // return result\n return nameLengthValid;\n }",
"public void tc_VerifyMaxLength_EnviromentVar() throws Exception\n {\n EN.BeginTest( TestName );\n \n // Testscript in Schlüsselwort-Notation\n EN.SelectWindow( \"Rechner\" );\n \n // Soll/Ist-Vergleich: Ist das Richtige Fenster gesetzt?\n // Check the Name, Called Method and Value of Actuel object\n assertEquals( \"NO VALUE\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n assertEquals( \"Rechner\", myClipBoard.getObjectName() );\n assertEquals( \"SelectWindow()\", myClipBoard.getMethod() );\n \n // Wert in \"All_MethodsObj\" setzen.\n EN.SetValue( \"All_MethodsObj\", \"${VerifyMaxLength}\" );\n // Prüfung des Schlüsselwortes?\n EN.VerifyMaxLength( \"All_MethodsObj\", \"${VerifyMaxLength}\" );\n \n // Check the Name, Called Method and Value of Actuel object\n //assertEquals( \"Wert 1\", myClipBoard.getValue().get( 0 ) );\n assertEquals( 1, myClipBoard.getValue().size() );\n \n assertEquals( \"Rechner.All_MethodsObj\", myClipBoard.getObjectName() );\n assertEquals( \"VerifyPlaceholder()\", myClipBoard.getMethod() );\n }",
"public boolean hasValidLength(String field, int maxLength) {\n return field.length() <= maxLength;\n }",
"public boolean mo9444d() {\n if (!isLengthGreaterZero()) {\n return false;\n }\n byte[] bArr = this.byteArr;\n if (bArr.length >= 32) {\n return IsFullyValid(bArr, checkAndGetTypeLength());\n }\n return true;\n }",
"private boolean isFull() {\n\t\treturn nbmsg==getSize();\n\t}",
"public void setMaxLength(int maxLength){\n mMaxLengthOfString = maxLength;\n }",
"@Test(expected = MessageValidationException.class)\r\n public void testValidate8() throws MessageValidationException {\r\n ProductRequestMsg instance = new ProductRequestMsg();\r\n //Too long\r\n instance.setMessage(\"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\"\r\n + \"messagemessagemessagemessagemessagemessagemessage\");\r\n instance.setQuantity(1.0f);\r\n instance.setPickingDate(new Date());\r\n PartialUserMsg user = new PartialUserMsg();\r\n user.setId(167892L);\r\n instance.setRequester(user);\r\n ProductMsg product = new ProductMsg();\r\n product.setId(12L);\r\n instance.setProduct(product);\r\n instance.validate();\r\n }",
"boolean hasMaxSize();",
"public Boolean CheckLimits(String phoneNumber, int bombAmount)\n {\n Boolean passed = true;\n if (phoneNumber.length() < 9 || phoneNumber.length() > 11)\n {\n passed = false;\n Toast.makeText(getApplicationContext(), \"Invalid phone number. Re-enter valid 10 digit phone number\", Toast.LENGTH_LONG).show();\n return passed;\n }\n if (bombAmount > 100)\n {\n passed = false;\n Toast.makeText(getApplicationContext(), \"Cannot send more than 100 texts at a time\", Toast.LENGTH_LONG).show();\n return passed;\n }\n\n return passed;\n }",
"public ShortMessage(int maxLength) {\r\n\t\tthis.maxLength = maxLength;\r\n\t}",
"public boolean verifyBuffer(Buffer buffer) {\n if (buffer.isDiscard()) {\n return true;\n }\n Object data = buffer.getData();\n if (buffer.getLength() < 0) {\n System.err.println(\"warning: data length shouldn't be negative: \" + buffer.getLength());\n }\n if (data == null) {\n System.err.println(\"warning: data buffer is null\");\n if (buffer.getLength() != 0) {\n System.err.println(\"buffer advertized length = \" + buffer.getLength() + \" but data buffer is null!\");\n return false;\n }\n } else if (data instanceof byte[]) {\n if (buffer.getLength() > ((byte[]) data).length) {\n System.err.println(\"buffer advertized length = \" + buffer.getLength() + \" but actual length = \" + ((byte[]) data).length);\n return false;\n }\n } else if ((data instanceof int[]) && buffer.getLength() > ((int[]) data).length) {\n System.err.println(\"buffer advertized length = \" + buffer.getLength() + \" but actual length = \" + ((int[]) data).length);\n return false;\n }\n return true;\n }",
"@Override\n protected int getExpectedOutgoingMessageSize() {\n return 256;\n }",
"public void setMaxTextLength(int max) {\n/* 520 */ throw new RuntimeException(\"Stub!\");\n/* */ }",
"private boolean validateServerMessage(ClientMessage clientMessage, ServerMessage serverMessage) {\n boolean isValid = false;\n try {\n byte[] hash = java.security.MessageDigest.getInstance(\"MD5\").digest(clientMessage.toString().getBytes());\n String encodedHash = new String(java.util.Base64.getEncoder().encode(hash));\n if ((serverMessage.getMessageType().equals(ServerMessage.MessageType.OK)) &&\n (encodedHash.equals(serverMessage.getPayload()))) {\n isValid = true;\n }\n } catch (java.security.NoSuchAlgorithmException e) {\n e.printStackTrace();\n }\n return isValid;\n }",
"public static boolean isAkParamLengthValid(String parameter, int length)\n {\n boolean ret = true;\n if (isConstantAkParamsDefined())\n {\n int i = getAkParamIndex(parameter);\n if (length != akParams_[i].len)\n {\n ret = false;\n Log.e(LOG_TAG, \"In configuration file, the AK parameter \" + parameter + \" values length \"\n + length + \" is NOT compatible to the defined length \" + akParams_[i].len);\n }\n }\n return ret;\n }",
"protected void sequence_MaxLength(ISerializationContext context, MaxLength semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.LIMIT__NAME) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.LIMIT__NAME));\n\t\t\tif (transientValues.isValueTransient(semanticObject, DrnPackage.Literals.SURFACE__VALUE) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, DrnPackage.Literals.SURFACE__VALUE));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getMaxLengthAccess().getNameMaxLengthKeyword_0_0(), semanticObject.getName());\n\t\tfeeder.accept(grammarAccess.getMaxLengthAccess().getValueINTTerminalRuleCall_2_0(), semanticObject.getValue());\n\t\tfeeder.finish();\n\t}",
"private int length() { return length; }",
"public void ensureMessageArraySizes(Message message){\n assertTrue(\"Expected array size to be less or equal to 10,000\", message.getHouse().size() <= 10000);\n assertTrue(\"Expected array size to be less or equal to 10,000\", message.getHouses().size() <= 10000);\n }",
"int getMaxSize();",
"private Boolean validateRequest() {\n\t\tint cell = 2;\n\t\t\n\t\t// If the length is over max_buffer bytes, the message is too long.\n\t\tif (receivePacket.getLength() > TFTPCommons.max_buffer) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// If the first two bytes aren't 0 1 or 0 2, then the message is malformed.\n\t\tif ((receiveData[0] != 0) | !((receiveData[1] == 1) | (receiveData[1] == 2))) {\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\t// Note which cell we're at now.\n\t\tint prev_cell = cell;\n\t\t\n\t\t// Fast-forward through the text to the first separator 0.\n\t\twhile (true) {\n\t\t\t// If cell equals length, the message is invalid,\n\t\t\t// likely because it was malformed.\n\t\t\tif (cell == receivePacket.getLength()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// If this is the first separator 0, break loop and go to next cell\n\t\t\t// Unless the first separator zero is the cell we started at,\n\t\t\t// then the message is invalid\n\t\t\tif (receiveData[cell] == 0) {\n\t\t\t\tif (cell == prev_cell) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcell++;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// Otherwise, go to next cell\n\t\t\t\tcell++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Note which cell we're at now.\n\t\tprev_cell = cell;\n\t\t\t\t\n\t\t// Fast-forward through the text to the second separator 0.\n\t\twhile (true) {\n\t\t\t// If cell equals length, the message is invalid,\n\t\t\t// likely because it was malformed.\n\t\t\tif (cell == receivePacket.getLength()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t\t// If this is the second separator 0, break loop and go to next cell.\n\t\t\t// Unless the first separator zero is the cell we started at,\n\t\t\t// then the message is invalid\n\t\t\tif (receiveData[cell] == 0) {\n\t\t\t\tif (cell == prev_cell) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\tcell++;\n\t\t\t\tbreak;\n\t\t\t} else {\n\t\t\t\t// Otherwise, go to next cell\n\t\t\t\tcell++;\n\t\t\t}\n\t\t}\n\t\t\n\t\t// At this point, we should have covered the whole message,\n\t\t// Unless it is malformed.\n\t\tif (cell == receivePacket.getLength()) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}",
"public abstract long getMaxSize();",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"private int zzMaxBufferLen() {\n return Integer.MAX_VALUE;\n }",
"protected long getVerificationByteCount() {\n final long verificationByteCount = testVerificationByteCount >= 0 ?\n testVerificationByteCount :\n kvsImpl.getDefaultLOBVerificationBytes();\n\n return Math.min(lobSize, verificationByteCount);\n }",
"public static void checkMaxLength(String name, int maxLength) throws MaxSizeExceededException{\n \n if(name.length()<maxLength) throw new MaxSizeExceededException(\"Length of name is too long! MaxLength=\" + maxLength + \", ActualLength=\" + name.length());\n }",
"public void checkCapacity(String target, long size) throws Exception;",
"int getMaxVarcharSize();",
"protected abstract boolean reachedContractLimit(int size);",
"public Integer getMaxLength() {\n\t\treturn maxLength;\n\t}",
"public void chkSize(int numberOfLinks)\n\t{\n\t\tint allWordsSize = allWords.size();\n\t\tif(numberOfLinks > allWordsSize)\n\t\t{\n\t\t\tSystem.out.println(\"Number too big\");\n\t\t\tuserInter.optionSelect();\n\t\t}\n\t}",
"public native boolean isLengthComputable() /*-{\n\t\treturn this.lengthComputable;\n\t}-*/;",
"public final void checkHostVariable(int declaredLength) throws StandardException\n\t{\n\t\t// stream length checking occurs at the JDBC layer\n\t\tint variableLength = -1;\n if ( _blobValue != null ) { variableLength = -1; }\n\t\telse if (stream == null)\n\t\t{\n\t\t\tif (dataValue != null)\n\t\t\t\tvariableLength = dataValue.length;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tvariableLength = streamValueLength;\n\t\t}\n\n\t\tif (variableLength != -1 && variableLength > declaredLength)\n\t\t\t\tthrow StandardException.newException(SQLState.LANG_STRING_TRUNCATION, getTypeName(), \n\t\t\t\t\t\t\tMessageService.getTextMessage(\n\t\t\t\t\t\t\t\tMessageId.BINARY_DATA_HIDDEN),\n\t\t\t\t\t\t\tString.valueOf(declaredLength));\n\t}",
"int getServerPayloadSizeBytes();",
"@Test(timeout = 4000)\n public void test52() throws Throwable {\n String string0 = EWrapperMsgGenerator.tickSize(6372, 3, 2146363568);\n assertEquals(\"id=6372 askSize=2146363568\", string0);\n }",
"@Test\r\n public void test_getContentLength_Accuracy() {\r\n assertEquals(\"incorrect default value\", 0, instance.getContentLength());\r\n instance.setContentLength(2);\r\n assertEquals(\"incorrect value after setting\", 2, instance.getContentLength());\r\n }"
] | [
"0.6874773",
"0.6844909",
"0.64564306",
"0.6271533",
"0.6243762",
"0.6243118",
"0.6239725",
"0.6193724",
"0.61604095",
"0.61222607",
"0.61200285",
"0.6099669",
"0.6073862",
"0.60686547",
"0.6041366",
"0.60290724",
"0.6023046",
"0.6004612",
"0.5999649",
"0.59765774",
"0.5974198",
"0.59396654",
"0.5936022",
"0.59147197",
"0.5888885",
"0.58762264",
"0.5862998",
"0.5841094",
"0.58406466",
"0.58386827",
"0.5801267",
"0.5790431",
"0.578771",
"0.5771986",
"0.57602364",
"0.57583433",
"0.5750407",
"0.574353",
"0.5717757",
"0.57106644",
"0.5707375",
"0.5683168",
"0.56398094",
"0.5628242",
"0.56201303",
"0.560529",
"0.55953604",
"0.5563917",
"0.5563096",
"0.5545697",
"0.55318093",
"0.55245763",
"0.55233043",
"0.54966813",
"0.54881227",
"0.5481568",
"0.54767007",
"0.5473388",
"0.5470918",
"0.5462807",
"0.5457854",
"0.5456731",
"0.54462135",
"0.54409677",
"0.54306823",
"0.54290295",
"0.5428359",
"0.54235584",
"0.5413976",
"0.5413527",
"0.5406607",
"0.5397972",
"0.5391689",
"0.53881705",
"0.5385105",
"0.53759885",
"0.536443",
"0.5363847",
"0.53601915",
"0.5353335",
"0.5351934",
"0.5350662",
"0.5349457",
"0.53381205",
"0.5328795",
"0.5327776",
"0.53199625",
"0.53199625",
"0.531878",
"0.5314181",
"0.5312731",
"0.53112966",
"0.530526",
"0.5304465",
"0.5302691",
"0.52747405",
"0.5272052",
"0.527143",
"0.52710223",
"0.52670074"
] | 0.5724791 | 38 |
Swapping our send button with our stop button 0 = send 1 = stop | public void SwapSendButton(int swap)
{
if (swap == 0)
{
findViewById(R.id.imageButton2).setVisibility(View.VISIBLE);
findViewById(R.id.imageButton3).setVisibility(View.GONE);
}
else if (swap == 1)
{
findViewById(R.id.imageButton2).setVisibility(View.GONE);
findViewById(R.id.imageButton3).setVisibility(View.VISIBLE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void stopPressed() {\n // display\n TextLCD.print(STOP);\n // reset\n reset();\n }",
"public void sendStop(){\n if (isNetworkGame()){\n sender.println(\"stop\");\n sender.flush();\n }\n }",
"public void sendBack(boolean button){\n\t\tb1 = button;\n\t\tif(button){\n\t\t\ts1.set(-speed0);\n\t\t\ts2.set(speed0);\n\t\t} else if(!trig) {\n\t\t\ts1.set(0);\n\t\t\ts2.set(0);\n\t\t}\n\t}",
"public void stopSending ();",
"public void goSendOrderButton(View view) { //is called by onClick function of Button in activity_main.xml\n if(WifiAvaible()) {\n try {\n fab.getProtocol().sendOrder(surface.getSeedbox().toString());\n OrderStatus.setText(\"Waiting for \\n\"+\"confirmation.\");\n } catch (Exception e) {\n //ErrorWindow\n }\n\n SendButton.setEnabled(false);\n }\n\n\n/*\n if(ClickCnt == 0) {\n mp.start();\n ClickCnt = 1;\n } else {\n ClickCnt = 0;\n mp.stop();\n try {\n mp.prepare();\n }\n catch (java.lang.Exception e)\n {\n // Do nothing\n }\n\n mp.seekTo(0);\n }*/\n }",
"public void resetButtonsMode() {\n host.getMidiOutPort(0).sendMidi(0xB0, 34, 1);\n }",
"@Override\n public void onClick(View control) {\n switch (control.getId()) {\n\n // Initiate bluetooth connection\n case R.id.connect:\n // Only make BT connection if device id was entered\n String id = deviceId.getText().toString();\n if (id.equals(\"\")) {\n Toast.makeText(getApplicationContext(), \"Enter the bluetooth receiver ID into the text field.\",\n Toast.LENGTH_SHORT).show();\n }\n else {\n connect(id);\n }\n break;\n\n // Stop the motors\n case R.id.stopMotors: {\n // Send stop message over bluetooth\n writeData(\"stop x\");\n break;\n }\n }\n }",
"private void butonStopTripActionPerformed(java.awt.event.ActionEvent evt) {\n Config.sendEvent(new events.TripEvent(false));\n\n }",
"public void sendBreak() {\n\tsPort.sendBreak(1000);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = BALLON;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OTHERBEACH;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"@Override\r\n\tpublic void onClick(View v) {\n\t\tswitch (v.getId()) {\r\n case R.id.sendd:\r\n buffer = new byte[]{'d'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendz:\r\n buffer = new byte[]{'z'};\r\n if (sendMessage(buffer) == -1) {\r\n Toast.makeText(getActivity(), \"失败,请检查连接!\", Toast.LENGTH_SHORT).show();\r\n } else {\r\n Toast.makeText(getActivity(), \"正在关闭,请稍后...\", Toast.LENGTH_SHORT).show();\r\n }\r\n break;\r\n case R.id.sendrclear:\r\n byte[] a = new byte[]{60,0,0};\r\n sendR(a);\r\n break;\r\n case R.id.sendrcloud:\r\n byte[] b = new byte[]{0,2,0};\r\n sendR(b);\r\n break;\r\n\r\n case R.id.sendrcloud2:\r\n byte[] c = new byte[]{127,2,0};\r\n sendR(c);\r\n break;\r\n\r\n case R.id.sendrrain:\r\n byte[] d = new byte[]{60,1,1};\r\n sendR(d);\r\n break;\r\n\r\n\t\tdefault:\r\n\t\t\tbreak;\r\n\t\t}\r\n\r\n\t}",
"private void transport_pause() {\n timerPause();\n playing = false;\n now_playing_play_button.setForeground(getDrawable(R.drawable.ic_play_arrow_50dp));\n }",
"private void sendSignal(){\n\t\tSystem.out.println(inputLine + \"test\");\n\t\tMessageContent messageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM);\n\t\tif(inputLine.equals(Constants.BUTTON_1_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_1_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_BEDROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_2_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_KITCHEN, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_3_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_LIVINGROOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_4_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.REMOTE_CONTROL_AGENT, Constants.PLACE_RANDOM, \"0\");\n\t\t\tSystem.out.println(\"oh yeah\");\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_ON)){\n\t\t\tmessageContent = new MessageContent(1, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}else if(inputLine.equals(Constants.BUTTON_5_OFF)){\n\t\t\tmessageContent = new MessageContent(0, Constants.SHUTTER, Constants.PLACE_LIVINGROOM);\n\t\t}\n\t\t\t\t\n\t\tString json = messageContent.toJSON();\n\t\tDFAgentDescription template = new DFAgentDescription();\n ServiceDescription sd = new ServiceDescription();\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\tsd.setType(Constants.SHUTTER);\n\t\tsd.setName(Constants.PLACE_LIVINGROOM);\n } else {\n\t\tsd.setType(Constants.AUTO_SWITCH);\n\t\tsd.setName(Constants.AUTO_SWITCH_AGENT);\n }\n template.addServices(sd);\n try {\n DFAgentDescription[] result = DFService.search(myAgent, template);\n if (result.length > 0) {\n ACLMessage request = new ACLMessage(ACLMessage.REQUEST);\n if (inputLine.equals(Constants.BUTTON_5_ON) || inputLine.equals(Constants.BUTTON_5_OFF)) {\n\t\t\t\trequest.setPerformative(ACLMessage.INFORM);\n }\n for (DFAgentDescription receiver : result) {\n if (!receiver.getName().equals(myAgent.getAID())) {\n request.addReceiver(receiver.getName());\n \n }\n }\n request.setContent(json);\n myAgent.send(request);\n }\n } catch(FIPAException fe) {\n fe.printStackTrace();\n }\n\n\n\t}",
"private JButton getCmdStop() {\r\n\t\tif (cmdStop == null) {\r\n\t\t\tcmdStop = new JButton();\r\n\t\t\tcmdStop.setText(\"\");\r\n\t\t\tcmdStop.setIcon(new ImageIcon(getClass().getResource(\"/Stop-48.png\")));\r\n\t\t\tcmdStop.setToolTipText(\"Stop all current operation.\");\r\n\t\t\tcmdStop.setEnabled(false);\r\n\t\t\tcmdStop.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\t\t\t\t\tchkproxy.cancel(true);\r\n\t\t\t\t\tcmdStart.setEnabled(true);\r\n\t\t\t\t\tcmdPause.setEnabled(false);\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdStop;\r\n\t}",
"@Override\r\n public void actionPerformed(ActionEvent ae) {\n taReceive.setText(\"\");\r\n }",
"public void stopBroadcast(){\r\n\t\tthePres.stopBroadcast();\r\n\t\tstartBtn.setLabel(\"Start Broadcast\");\r\n\t\tdrawer.stopTasking();\r\n\t\tisPlaying = false;\r\n\t\tcurrRateLabel.setText(\"0 \");\r\n\t}",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tdoSendOff(1001);\n\t\t\t\tsecondSynthButtonOn.setEnabled(true);\n\t\t\t\tsecondSynthButtonOff.setEnabled(false);\n\t\t\t\tslider2.setEnabled(false);\n\t\t\t\tslider2.setValue(0);\n\t\t\t\ttextBox2.setEnabled(false);\n\t\t\t\ttextBox2.setText(\"0\");\n\t\t\t}",
"public void togglePauseButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.TOGGLE_PAUSE_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }",
"public void enableDisableSendButton() {\r\n sendButton.setEnabled(topModel.isSendButtonEnabled());\r\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = PROPER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(nextStep+1>=showflag.length)\r\n\t\t\t\t\treturn ;\r\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tif(showflag[nextStep]){\r\n\t\t\t\t\tnextStep +=1;\r\n\t\t\t\t}else{\r\n\t\t\t\t\tfor(int i=nextStep;i>=0;i--){\r\n\t\t\t\t\t\tif(showflag[i]){\r\n\t\t\t\t\t\t\tnextStep= i+1;\r\n\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tif(nextStep==OK)\r\n\t\t\t\t\tmHandler.sendMessageDelayed(msg, waitTime);\r\n\t\t\t\telse\r\n\t\t\t\t\tmHandler.sendMessageDelayed(msg, waitTime);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"void beginSendData(){\n stopSendThread = false;\n final Thread thread = new Thread(new Runnable() {\n\n public void run() {\n while(!Thread.currentThread().isInterrupted() && !stopSendThread){\n try{\n try {\n Thread.currentThread().sleep(100);\n\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n String string = \":1\" + (char)speedLeft + (char)speedRight + \"@\";\n try {\n os.write(string.getBytes());\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n } catch (Exception e){\n e.printStackTrace();\n stopSendThread = true;\n }\n\n\n }\n\n }\n });\n thread.start();\n System.out.println(\"koniec funkcji startsend\");\n }",
"public void onClick(View arg0) {\n\t\tboolean isSTART = false;\n\t\tButton stopBtn = null;\n\t\tint command = 0;\n\t\tif (arg0.getId() == mBtn1Start.getId()) {\t\t\t\n\t\t\tcommand = TEST_SE0_NAK;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn1Stop;\n\t\t} else if (arg0.getId() == mBtn2Start.getId()) {\n\t\t\tcommand = TEST_J;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn2Stop;\n\t\t}else if (arg0.getId() == mBtn3Start.getId()) {\n\t\t\tcommand = TEST_K;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn3Stop;\n\t\t}else if (arg0.getId() == mBtn4Start.getId()) {\n\t\t\tcommand = TEST_PACKET;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn4Stop;\n\t\t}else if (arg0.getId() == mBtn5Start.getId()) {\n\t\t\tcommand = SUSPEND_RESUME;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn5Stop;\n\t\t}else if (arg0.getId() == mBtn6Start.getId()) {\n\t\t\tcommand = GET_DESCRIPTOR;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn6Stop;\n\t\t}else if (arg0.getId() == mBtn7Start.getId()) {\n\t\t\tcommand = SET_FEATURE;\n\t\t\tisSTART = true;\n\t\t\tstopBtn = mBtn7Stop;\n\t\t}\n\t\t\n\t\telse if (arg0.getId() == mBtn1Stop.getId()) {\t\t\t\t\n\t\t\tcommand = TEST_SE0_NAK;\n\t\t\tisSTART = false;\n\t\t} else if (arg0.getId() == mBtn2Stop.getId()) {\n\t\t\tcommand = TEST_J;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn3Stop.getId()) {\n\t\t\tcommand = TEST_K;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn4Stop.getId()) {\n\t\t\tcommand = TEST_PACKET;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn5Stop.getId()) {\n\t\t\tcommand = SUSPEND_RESUME;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn6Stop.getId()) {\n\t\t\tcommand = GET_DESCRIPTOR;\n\t\t\tisSTART = false;\n\t\t}else if (arg0.getId() == mBtn7Stop.getId()) {\n\t\t\tcommand = SET_FEATURE;\n\t\t\tisSTART = false;\n\t\t}\n\t\telse{\n\t\t\tShowDialog(\"Error\", \"Unknown button is pressed.\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(isSTART)\n\t\t{\n\t\t\tif(task != null)\n\t\t\t{\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\n\t\t\tTaskThread thr = new TaskThread();\n\t\t\tthr.setParam(command);\n\t\t\tthr.start();\n\t\t\t\n\t\t\tmakeOneBtnEnable(stopBtn);\n\t\t\ttask = new TaskRunnable();\n\t\t\ttask.start();\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif(task != null)\n\t\t\t{\t\t\n\t\t\t\ttask.mRun = false;\t\t\t\t\t\n\t\t\t\tif(!UsbIF.NativeStopTest(command))\n\t\t\t\t{\n\t\t\t\t\tShowDialog(\"Error\", \"NativeStopTest Fail.\");\n\t\t\t\t\tUsbIF.NativeCleanMsg();\n\t\t\t\t}\t\t\t\t\n\t\t\t\ttask = null;\t\n\t\t\t\tupdateAllBtn(true);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void onMessagePlayCompleted() {\n\t\tbtnSend.setEnabled(true);\n\t}",
"@Override\n public void run() {\n if (secondes-- <= 0) {\n btnSendCode.setClickable(true);\n btnSendCode.setBackgroundColor(GoagalInfo.getInItInfo().androidColor);\n btnSendCode.setText(\"发送验证码\");\n return;\n }\n btnSendCode.setClickable(false);\n btnSendCode.setText(\"重新发送(\" + secondes + \")\");\n btnSendCode.setBackgroundColor(Color.GRAY);\n handler.postDelayed(this, 1000);\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = OK;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"private void stopButtonActionPerformed() {\n if(ascopy != null) {\n ascopy.stopCopy();\n }\n\n if(ascopyREC != null) {\n ascopyREC.stopCopy();\n }\n\n copyStopped = true;\n stopButton.setEnabled(false);\n }",
"private void transport_play() {\n timerReset();\n playing = true;\n now_playing_play_button.setForeground(getDrawable(R.drawable.ic_pause_50dp));\n }",
"void stopHelloSender();",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == bt1) {\n\t\t\ttry {\n\t\t\t\tString s = tfnhap.getText();\n\t\t\t\tsenddata = new byte[s.length()];\n\t\t\t\treceivedata = new byte[1024];\n\t\t\t\tsenddata = s.getBytes();\n\t\t\t\tDatagramPacket send = new DatagramPacket(senddata, senddata.length, inet, 8892);\n\t\t\t\tmoi.send(send);\n\t\t\t\tDatagramPacket receive = new DatagramPacket(receivedata, receivedata.length);\n\t\t\t\tmoi.receive(receive);\n\t\t\t\tString kq = new String(receive.getData());\n\t\t\t\ttfkq.setText(kq);\n\n\t\t\t} catch (UnknownHostException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t} catch (IOException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tif (e.getSource() == bt2)\n\t\t\tSystem.exit(0);\n\t}",
"private void b_sendActionPerformed(java.awt.event.ActionEvent evt) { \r\n\t\tString nothing = \"\";\r\n\t\tif ((b_sendText.getText()).equals(nothing)) {\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttry {\r\n\t\t\t\ttellEveryone(\"Server\" + \":\" + b_sendText.getText() + \":\" + \"Chat\");\r\n\t\t\t\tPrint_Writer.flush(); // flushes the buffer\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t}\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\r\n\t\tb_sendText.setText(\"\");\r\n\t\tb_sendText.requestFocus();\r\n\r\n\t}",
"public void sendStopMessage() {\n // A default stop type message\n FirebaseMessage stopMessage = new FirebaseMessage(\"STOP\", null, \"STOP\");\n if (!messageQueue.offer(stopMessage)) {\n logger.error(\"The stop message could not be sent\");\n }\n }",
"public void powerOff() { //power_off\n String json = new Gson().toJson(new TelevisionModel(TelevisionModel.Action.OFF));\n String a = sendMessage(json);\n TelevisionModel teleM = new Gson().fromJson(a, TelevisionModel.class);\n System.out.println(\"Client Received \" + json);\n\n if (teleM.getAction() == TelevisionModel.Action.OFF) {\n isTurningOff = teleM.getValue();\n ui.updateArea(teleM.getMessage());\n }\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tif (!packetReaderThreadStarted) {\n\t\t\t\ttitanoboaPacketReader.setPort(Integer\n\t\t\t\t\t\t.parseInt(((EditText) findViewById(R.id.portEditText))\n\t\t\t\t\t\t\t\t.getText().toString()));\n\n\t\t\t\t// start packet reader\n\t\t\t\tpacketReaderThread = new Thread(titanoboaPacketReader);\n\t\t\t\tpacketReaderThreadStarted = true;\n\t\t\t\tpacketReaderThread.start();\n\n\t\t\t\t// start UI updater\n\t\t\t\tuiUpdateHandler.removeCallbacks(uiUpdateTask);\n\t\t\t\tuiUpdateHandler.post(uiUpdateTask);\n\n\t\t\t\t// toggle button label to Disconnect\n\t\t\t\tButton connectButton = ((Button) v);\n\t\t\t\tconnectButton.setText(getResources().getString(\n\t\t\t\t\t\tR.string.disconnect_button_label));\n\n\t\t\t} else {\n\t\t\t\t// stop packet reader\n\t\t\t\tpacketReaderThreadStarted = false;\n\t\t\t\tpacketReaderThread.interrupt();\n\n\t\t\t\t// stop UI updater\n\t\t\t\tuiUpdateHandler.removeCallbacks(uiUpdateTask);\n\n\t\t\t\t// toggle button label to Connect\n\t\t\t\tButton connectButton = ((Button) v);\n\t\t\t\tconnectButton.setText(getResources().getString(\n\t\t\t\t\t\tR.string.connect_button_label));\n\t\t\t}\n\n\t\t}",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tdoSendOff(1000);\n\t\t\t\tfirstSynthButtonOn.setEnabled(true);\n\t\t\t\tfirstSynthButtonOff.setEnabled(false);\n\t\t\t\tslider.setEnabled(false);\n\t\t\t\tslider.setValue(0);\n\t\t\t\ttextBox.setEnabled(false);\n\t\t\t\ttextBox.setText(\"0\");\n\t\t\t}",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\tmsgText.setText(null);\n\t\t\tsendEdit.setText(null);\n\t\t\tif(sppConnected || devAddr == null)\n\t\t\t\treturn;\n\t\t\ttry{\n\t\t\t btSocket = btAdapt.getRemoteDevice(devAddr).createRfcommSocketToServiceRecord(uuid);\n\t\t\t btSocket.connect();\n\t\t\t Log.d(tag,\"BT_Socket connect\");\n\t\t\t synchronized (MainActivity.this) {\n\t\t\t\tif(sppConnected)\n\t\t\t\t\treturn;\n\t\t\t\tbtServerSocket.close();\n\t\t\t\tbtIn = btSocket.getInputStream();\n\t\t\t\tbtOut = btSocket.getOutputStream();\n\t\t\t\tconected();\n\t\t\t}\n\t\t\t Toast.makeText(MainActivity.this,\"藍牙裝置已開啟:\" + devAddr, Toast.LENGTH_LONG).show();\n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t\tsppConnected =false;\n\t\t\t\ttry{\n\t\t\t\t\tbtSocket.close();\n\t\t\t\t}catch(IOException e1){\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\tbtSocket = null;\n\t\t\t\tToast.makeText(MainActivity.this, \"連接異常\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t}",
"private void sendButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_sendButtonActionPerformed\n String str = requestCommand.getText();\n sC.sendCommand(str); \n requestCommand.requestFocus();\n }",
"public void pressed() \r\n\t{\r\n\t\tparity = !parity;\r\n\t\t\r\n\t}",
"public void B_Button(){\n\t\tif(_martMenuVisible && !buyMenu && !sellMenu){\n\t\t\tthis.Down();\n\t\t\tthis.Down();\n\t\t\tthis.A_Button();\n\t\t}\n\t\t\n\t\tif(this.facingNPC() && this._movingTrainers.get(this._interruptedTrainer).isInterrupted() && !_menuVisible && !_pcVisible && !_martMenuVisible && !textTimer.isRunning() && !_approachTimer.isRunning() && !escapeTimerEnter.isRunning() && !escapeTimerLeave.isRunning()){\n\t\t\tif((this.facingWater() && _gbs.getSurf()) || (!this.facingWater()) && !_gbs.getSurf()){\n\t\t\t\t//Interrupt them, hear what they have to say.\n\t\t\t\tTrainer moving = this._movingTrainers.get(this._interruptedTrainer);\n\t\t\t\t//SysOut.print(\"Trainer name: \" + moving.getName());\n\t\t\t\t\n\t\t\t\t//Specifically for Cut and Strength\n\t\t\t\tif(moving.getName() == \"CutBush\"||moving.getName() == \"CutCan\" || moving.getName()==\"Swiper\"){\n\t\t\t\t\t//SysOut.print(\"Chose not to use Cut!\");\n\t\t\t\t\t_NPCpage=0;\n\t\t\t\t\t_busy=false;\n\t\t\t\t\tcompletionCheck=false;\n\t\t\t\t\t_dialogueVisible=false;\n\t\t\t\t\tmoving.setInterrupted(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tif(moving.getName() == \"Strength\"){\n\t\t\t\t\t//SysOut.print(\"Chose not to use Strength!\");\n\t\t\t\t\t_NPCpage=0;\n\t\t\t\t\t_busy=false;\n\t\t\t\t\tcompletionCheck=false;\n\t\t\t\t\t_dialogueVisible=false;\n\t\t\t\t\tmoving.setInterrupted(false);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\tif(hmTextVisible && _canSurf==1 && !textTimer.isRunning() && !_menuVisible && !_pcVisible && !_martMenuVisible){\n\t\t\t_busy=false;\n\t\t\tcompletionCheck=false;\n\t\t\thmTextVisible=false;\n\t\t\t_canSurf=0;\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t\tif(_menuVisible && !getCurrentMenu().isVisible())\n\t\t\tthis.Start();\n\t\t\n\t\tif(_gbs.map.isVisible()){\n\t\t\t_gbs.map.B_Button();\n\t\t\t_busy=false;\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tif(getCurrentMenu().isVisible()){\n\t\t\tif(_gbs.pbs.isVisible() || _gbs.ii.isVisible() || _gbs.ev.isVisible() || _gbs.map.isVisible() || _martMenuVisible){\n\t\t\t\tif(_gbs.pbs.isVisible())\n\t\t\t\t\t_gbs.pbs.B_Button();\n\t\t\t\tif(_gbs.ii.isVisible())\n\t\t\t\t\t_gbs.ii.B_Button();\n\t\t\t\tif(_gbs.ev.isVisible())\n\t\t\t\t\t_gbs.ev.B_Button();\n\t\t\t\tif(_martMenuVisible){\n\t\t\t\t\tif(buyMenu || sellMenu){\n\t\t\t\t\t\t_gbs.mart.B_Button();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\telse{\n\t\t\t\tgetCurrentMenu().setVisible(false);\n\t\t\t}\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t\tif(_pcVisible && !_menuTextVisible[0] && !_menuTextVisible[1]){\n\t\t\t//SysOut.print(\"PC IS VISIBLE\");\n\t\t\tif(!_bannerVisible && !_myCoursesVisible){\n\t\t\t\t_busy = false;\n\t\t\t\tcompletionCheck = false;\n\t\t\t\t_pcCursor.y = 173;\n\t\t\t\tthis.A_Button(); //Effectively moves the cursor to Quit and hits A button. Do this method.\n\t\t\t\t\n\t\t\t}\n\t\t\telse{\n\t\t\t\t//if(_bannerVisible){\n\t\t\t\t\t_bannerVisible = false;\n\t\t\t\t\t_gbs.bannerScreen._depTextVisible = false;\n\t\t\t\t\t_gbs.bannerScreen._oneLeft = false;\n\t\t\t\t\t_gbs.bannerScreen._cursor.y = _gbs.bannerScreen._1st;\n\t\t\t\t\t_menuTextVisible[0] = false;\n\t\t\t\t//}\n\t\t\t\t//if(_myCoursesVisible){\n\t\t\t\t\t_myCoursesVisible = false;\n\t\t\t\t\t_gbs.pcBoxScreen._cursor.y = 8;\n\t\t\t\t\t_menuTextVisible[1] = false;\n\t\t\t\t\t_gbs.pcBoxScreen.warningDisplayed = false;\n\t\t\t\t//}\n\t\t\t}\n\t\t\tthis.repaint();\n\t\t}\n\t\t\n\t}",
"public abstract void stopMsg();",
"private synchronized void stop(){\n this.go = false;\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tstopService(streamService);\n\t\t\t\tstartButton.setEnabled(true);\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tms.stop();\n\t\t\t\tmp.stop();\n\t\t\t\tfinish();\n\t\t\t}",
"private void setButtonsEnabledState() {\n if (mBroadcastingLocation) {\n mStartButton.setEnabled(false);\n mStopButton.setEnabled(true);\n } else {\n mStartButton.setEnabled(true);\n mStopButton.setEnabled(false);\n }\n }",
"private void syncButton(Button rtButton, DataObject data){\n boolean gettingData = isGettingData(); //Check if we're getting data\n if(streaming_rt && !gettingData) { //We want data and aren't getting it yet\n rtButton.setText(getResources().getString(R.string.stop_dl_rt));\n sendLogApp(); //Need to send logapp to start data transfer\n startRtDownload(data);\n }\n if(streaming_rt && gettingData) { //We want data and are already getting it\n rtButton.setText(getResources().getString(R.string.stop_dl_rt));\n startRtDownload(data); //Don't need to send logapp, data already incoming\n }\n if(!streaming_rt && gettingData) { //We want to stop getting data and are still getting it\n rtButton.setText(getResources().getString(R.string.start_dl_rt));\n sendLogApp(); //Need to send logapp to stop data transfer\n }\n if(!streaming_rt && !gettingData) { //We want to stop getting data but we already aren't getting it\n rtButton.setText(getResources().getString(R.string.start_dl_rt));\n //Don't need to send logapp, data transfer already stopped\n }\n }",
"private static void go_stop()throws AWTException {\n\t\ttry{\r\n\t\t\t//Robot robot = new Robot();\r\n\r\n\t\t\trobot.keyPress(KeyEvent.VK_S);\r\n\t\t\trobot.keyPress(KeyEvent.VK_S);\r\n\t\t}\r\n\t\tcatch(IllegalArgumentException e1) {\r\n\t\t\tSystem.err.println(\"Use: java Renderer <Local IPAddress> <Localport> <Remote IPAddress> <Remote Port>\");\r\n\t\t}\r\n\r\n\t}",
"private void jButtonConnectPressed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonConnectPressed\n // Start comms\n if (!swapDmt.isConnected())\n {\n // Update status\n updateStatus(\"Connecting...\");\n // Connect comms\n swapDmt.connect();\n\n // Check connection\n if (swapDmt.isConnected())\n {\n // Enable items\n setEnableMenus(true);\n // Clear list of motes\n jListSwapMotes.removeAll();\n // Change button text\n jButtonConnect.setText(\"Disconnect\");\n // Update status\n updateStatus(\"Connected\");\n }\n else\n {\n JOptionPane.showMessageDialog(null, \"Unable to start comms on \" + swapDmt.getPortName() + \"\\nPlease check serial modem\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n // Update status\n updateStatus(\"Disconnected\");\n }\n }\n // Stop comms\n else\n {\n // Update status\n updateStatus(\"Disconnecting...\");\n // Disconnect comms\n swapDmt.disconnect();\n\n // Check disconnection\n if (!swapDmt.isConnected())\n {\n // Disable items\n setEnableMenus(false);\n // Clear list of motes\n jListSwapMotes.removeAll();\n // Change button text\n jButtonConnect.setText(\"Connect\");\n // Update status\n updateStatus(\"Disconnected\");\n }\n else\n {\n JOptionPane.showMessageDialog(null, \"Unable to stop comms. Please check serial modem\", \"Warning\", JOptionPane.WARNING_MESSAGE);\n // Update status\n updateStatus(\"Connected\");\n }\n }\n }",
"public boolean isSendMsgEnableShutterButton() {\n return true;\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\n\t\t\t\tObject[] options = { \"YES\", \"NO\" };\n\t\t\t\tint response = JOptionPane.showOptionDialog(null,\n\t\t\t\t\t\t\" Do you want to interrupt speakers ?\", \"Confirm\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.PLAIN_MESSAGE,\n\t\t\t\t\t\tnull, options, options[0]);\n\n\t\t\t\tif (response == JOptionPane.YES_OPTION) {\n\t\t\t\t\ttalkingName.setText(\"\");\n\t\t\t\t\tif (iname != -1) {\n\t\t\t\t\t\tb[iname].setBackground(Color.BLUE);\n\t\t\t\t\t\tstatus = false;\n\t\t\t\t\t\tSystem.out.print(\"stop!\");\n\t\t\t\t\t\tsendStop();\n\t\t\t\t\t\t//notifyAll();\n\t\t\t\t\t\tstatusPanel.repaint();\n\t\t\t\t\t\tre();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}",
"private void jButton4ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButton4ActionPerformed\r\n try {\r\n\r\n if (isServing) {\r\n isServing = false;\r\n connection.listen(false);\r\n jButton5.setEnabled(true);\r\n jButton4.setText(\"Enable Server\");\r\n setTitle(\"ChatRSA \");\r\n ChatWindow.log(\"GRAY\", \"[ Server] - Closed\");\r\n } else {\r\n isServing = true;\r\n connection.listen(true);\r\n jButton5.setEnabled(false);\r\n jButton4.setText(\"Disable Server\");\r\n setTitle(\"ChatRSA - Server\");\r\n ChatWindow.log(\"GRAY\", \"[ Server] - Waiting for Connection ...\");\r\n }\r\n\r\n } catch (IOException ex) {\r\n ChatWindow.log(\"GRAY\", \"[ Error] - Maybe another server is already connected \");\r\n }\r\n }",
"private void startStop()\n\t\t{\n\t\tif(currentAlgo!=null)\n\t\t\t{\n\t\t\tif(isRunning())\n\t\t\t\t{\n\t\t\t\tbStartStop.setText(\"Stopping\");\n\t\t\t\tthread.toStop=true;\n\t\t\t\tcurrentAlgo.setStopping(true);\n\t\t\t\t}\n\t\t\telse\n\t\t\t\t{\n\t\t\t\tthread=new SteppingThread();\n\t\t\t\tbStartStop.setText(\"Stop\");\n\t\t\t\tthread.toStop=false;\n\t\t\t\tcurrentAlgo.setStopping(false);\n\t\t\t\tthread.start();\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent ae)\n\t{\n\t\tString command = ae.getActionCommand();\n\n\t\tif (command == \"Resign\")\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\tclient.sendToServer(new Move(-1, -1));\n\t\t\t}\n\t\t\tcatch (IOException e)\n\t\t\t{\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tresign = true;\n\t\t}\n\t\telse if (command == \"Exit\")\n\t\t{\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"private void switchPlayPause(){\n Intent mSwitchPlayStatus = new Intent(BROADCAST_switchPlayStatus);\n if (mIsPlaying==1) {\n mSwitchPlayStatus.putExtra(\"switchPlayStatus\", 1);\n sBtn_PlayResume.setImageResource(R.drawable.select_btn_play);\n } else if (mIsPlaying==2){\n mSwitchPlayStatus.putExtra(\"switchPlayStatus\",2);\n sBtn_PlayResume.setImageResource(R.drawable.select_btn_pause);\n }\n LocalBroadcastManager.getInstance(this).sendBroadcast(mSwitchPlayStatus);\n }",
"public void updateSendButtonText() {\r\n sendButton.setText(topModel.getSendButtonText());\r\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\t\r\n\t\t\t\tMessage msg = Message.obtain();\r\n\t\t\t\tnextStep = USER;\r\n\t\t\t\tmsg.what = nextStep;\r\n\t\t\t\tmHandler.sendMessage(msg);\r\n\t\t\t\tisPause =true;\r\n\t\t\t}",
"@Override\n public void onClick(View v) {\n Log.d(LOG_TAG, \"Pressed stop working button!\");\n vibrator.vibrate(VibrationEffect.createOneShot(30, 30));\n showEndShiftDialog();\n }",
"@Override\n public void handleMessage(Message msg) {\n super.handleMessage(msg);\n switch (msg.what) {\n case 1:\n // 添加更新ui的代码\n if (!isstop) {\n if(currentNum==0){\n getNumberBtn.setClickable(true);\n getNumberBtn.setText(\"重新发送验证码\");\n }else{\n getNumberBtn.setText(\"发送验证码(\"+currentNum+\")\");\n currentNum--;\n mHandler.sendEmptyMessageDelayed(1, 1000);\n }\n }\n break;\n case 2:\n break;\n }\n }",
"private void transport_resume() {\n timerResume();\n playing = true;\n now_playing_play_button.setForeground(getDrawable(R.drawable.ic_pause_50dp));\n }",
"@Override\n\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\tmainFrame.mainToolBar.jtb_stop.doClick();\n\t\t\t}",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif (btn1==e.getSource()) { //만약 버튼(btn1)클릭 시 동작\n\t\t\tto = tfphone.getText(); //텍스트필드(전화번호) 값가져와서 String to로 변형\n\t\t\ttext = tftext.getText(); //텍스트 필드(텍스트) 값자겨와서 String text로 변형 \n\t\t\t\t\t\t\t\t\t\t\t\t//문자전송(인자)가 String 이기때문에 String으로 변형해줘야함\n\t\t\tExampleSend ex = new ExampleSend(); //ExampleSend클래스 객체 생성\n\t\t\tex.문자전송(to, text);\n\t\t}\n\t\tif (btn2 == e.getSource()) {\n\t\t\ttfphone.setText(\"\");\n\t\t\ttftext.setText(\"\");\n\t\t}\n\t}",
"@Override\n\tpublic void msgTurnOff() {\n\t\t\n\t}",
"public void stopMotors(){\n\t\tsynchStop(MMXCOMMAND_BRAKE);\n\t}",
"public void setStopButton(JButton stop) {\n if (stopMatchButton != null) {\n ActionListener[] listeners = stopMatchButton.getActionListeners();\n for (ActionListener lis : listeners) {\n stopMatchButton.removeActionListener(lis);\n }\n }\n stopMatchButton = stop;\n stopMatchButton.addActionListener(new ActionListener() {\n @Override\n public void actionPerformed(ActionEvent e) {\n stopMatch();\n }\n });\n }",
"public static void resume()\n\t{\n\t\ttfBet.setEnabled(false);\n\t\tbtnPlay.setEnabled(false);\n\t\tbtnHit.setEnabled(true);\n\t\tbtnStay.setEnabled(true);\n\t\tbtnDouble.setEnabled(false);\n\t}",
"@Override\r\n public void onClick(View v)\r\n {\n if (\"\" != mSendOnBoardEdit.getText().toString()){\r\n DJIDrone.getDjiMainController().sendDataToExternalDevice(mSendOnBoardEdit.getText().toString().getBytes(),new DJIExecuteResultCallback(){\r\n\r\n @Override\r\n public void onResult(DJIError result)\r\n {\r\n // TODO Auto-generated method stub\r\n \r\n }\r\n \r\n });\r\n }\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tdoSendOn(440, 1001);\n\t\t\t\tsecondSynthButtonOn.setEnabled(false);\n\t\t\t\tsecondSynthButtonOff.setEnabled(true);\n\t\t\t\tslider2.setEnabled(true);\n\t\t\t\tslider2.setValue(2050);\n\t\t\t\ttextBox2.setEnabled(true);\n\t\t\t\ttextBox2.setText(\"440.0\");\n\t\t\t}",
"public void stop()\n\t{\n\t\tupdateState( MotorPort.STOP);\n\t}",
"private void brakeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_brakeActionPerformed\n\n roboLogic.brake();\n if (l.isRunning()) {\n l.stop();\n }\n if (r.isRunning()) {\n r.stop();\n }\n\n\n }",
"@Override\r\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(gw.getPause()) {\r\n\t\t\tgw.turnOnPostion();\r\n\t\t}\r\n\t}",
"public void stopRinging();",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(snake.getstatus() == snake.READY)\n\t\t\t\t{\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\telse if(snake.getstatus() == snake.RUNNING)\n\t\t\t\t{\n//\t\t\t\t\tstatusButton.setText(\"start\");\n\t\t\t\t\tstatusButton.setImageResource(R.drawable.start);\n\t\t\t\t\tsnake.pause();\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n//\t\t\t\t\tstatusButton.setText(\"pause\");\n\t\t\t\t\tstatusButton.setImageResource(R.drawable.pause);\n\t\t\t\t\tsnake.start();\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tr.stop();\n\t\t\t\treceiFromZte r2 = new receiFromZte();\n\t\t\t\tr2.start();\n\t\t\t\tsendAckToZte connection2 = new sendAckToZte(\"B\",Connection.ipaddress);\n\t\t\t\tconnection2.SendAcknowledgmnet();\n\t\t\t\t\n\t\t\t}",
"public void buttonClick() {\n if (soundToggle == true) {\n buttonClick.start();\n } // if\n }",
"public JButton getSend() {\n\t\treturn send;\n\t}",
"@Override\n\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\tif (button_BGM.getText().equals(\"배경음 : On\")){\n\t\t\t\tfor (int c1=0; c1<cliplist.size(); c1++){\n\t\t\t\t\tif (cliplist.get(c1).file_url.equals(\"ext/ChmpSlct_DraftMode(8bitS).wav\")){\n\t\t\t\t\t\tcliplist.get(c1).clip.stop();\n\t\t\t\t\t\tcliplist.get(c1).clip.close();\n\t\t\t\t\t\tcliplist.remove(c1);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbutton_BGM.setText(\"배경음 : off\");\n\t\t\t}\n\t\t\telse{\n\t\t\t\tGameClient.playSound(\"ext/ChmpSlct_DraftMode(8bitS).wav\");\n\t\t\t\tbutton_BGM.setText(\"배경음 : On\");\n\t\t\t}\n\t\t}",
"public void hideStartButton()\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.HIDE_START_BUTTON;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }",
"@Override\n\t\t\tpublic void actionPerformed(final ActionEvent evt) {\n\t\t\t\tdoSendOff(1002);\n\t\t\t\tthirdSynthButtonOn.setEnabled(true);\n\t\t\t\tthirdSynthButtonOff.setEnabled(false);\n\t\t\t\tslider3.setEnabled(false);\n\t\t\t\tslider3.setValue(0);\n\t\t\t\ttextBox3.setEnabled(false);\n\t\t\t\ttextBox3.setText(\"0\");\n\t\t\t}",
"public void stop (String message);",
"private void switchBtnActionPerformed(ActionEvent evt) {\r\n if(switchBtn.isSelected()) {\r\n switchBtn.setText(\"MIPS -> C\");\r\n switchBtnState = 1;\r\n }\r\n else {\r\n switchBtn.setText(\"C -> MIPS\");\r\n switchBtnState = -1;\r\n }\r\n }",
"private void stopGame() {\r\n gameThread.interrupt();\r\n gameWindow.getStartButton().setText(\"Start\");\r\n gameRunning = false;\r\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\ts_bstop=eadbstop.getText().toString();\n\t\t\t\ts_btime=eadbtime.getText().toString();\n\t\t\t\t\n\t\t\t\tnew BusStopUpdateApi().execute();\n\t\t\t\t\n\t\t\t}",
"@FXML\n\tpublic void handleAudioManipulatorStopButton() {\n\t\tcontroller.audioManipulatorStopAudio();\n\t\tbuttonPlay.setDisable(false);\n\t\tbuttonPause.setDisable(true);\n\t\tbuttonStop.setDisable(true);\n\t\tpaneMixerMainControls.setDisable(false);\n\t\tsliderLowPass.setDisable(false);\n\t\ttextFieldLowPass.setDisable(false);\n\t}",
"@Override\n public void actionPerformed(ActionEvent e) {\n client.sendMessage(new QuestionClickedMessage(getX(), getY()));\n if (mainGUI instanceof MainGUINetworked) {\n MainGUINetworked mainGUINetworked = (MainGUINetworked) mainGUI;\n mainGUINetworked.getJeopardyTimer().stop();\n }\n }",
"public void buttonPressed(String name) {\n\t\tif (name.equals(\"Play\") && isAlreadyPlaying == false && playbutton_enabled == true) { // Play\n\t\t\tplayButton.setEnabled(false);\n\t\t\tpauseButton.setEnabled(true);\n\t\t\tstopButton.setEnabled(true);\n\t\t\tplaybutton_enabled = false;\n\t\t\tenabled = true;\n\t\t\tpbutton_enabled = true;\n\t\t\tsbutton_enabled = true;\n\t\t\tslider.setEnabled(enabled);\n\t\t\ttapestry.setEnabled(enabled);\n\t\t\tisAlreadyPlaying = true;\n\t\t\tstate = 0;\n\t\t\tplayback();\n\t\t} else if (name.equals(\"Play\") && state == 1 && playbutton_enabled == true ) { // resume\n\t\t\tplayButton.setEnabled(false);\n\t\t\tpauseButton.setEnabled(true);\n\t\t\tstopButton.setEnabled(true);\n\t\t\tpbutton_enabled = true;\n\t\t\tsbutton_enabled = true;\n\t\t\tplaybutton_enabled = false;\n\t\t\tenabled = true;\n\t\t\tslider.setEnabled(enabled);\n\t\t\ttapestry.setEnabled(enabled);\n\t\t\tisAlreadyPlaying = true;\n\t\t\tstate = 0;\n\t\t\tisPause = false;\n\t\t\tplaySound.resume();\n\t\t\tvideoThread.interrupt();\n\t\t\tsoundThread.interrupt();\n\t\t} else if (name.equals(\"Pause\") && pbutton_enabled == true) { // Pause\n\t\t\tplayButton.setEnabled(true);\n\t\t\tpauseButton.setEnabled(false);\n\t\t\tstopButton.setEnabled(true);\n\t\t\tpbutton_enabled = false;\n\t\t\tplaybutton_enabled = true;\n\t\t\tsbutton_enabled = true;\n\t\t\tenabled = false;\n\t\t\tslider.setEnabled(enabled);\n\t\t\ttapestry.setEnabled(enabled);\n\t\t\tstate = 1;\n\t\t\tisPause = true;\n\t\t\tvideoThread.interrupt();\n\t\t\tsoundThread.interrupt();\n\t\t\tplaySound.pause();\n\t\t} else if (name.equals(\"Stop\") && sbutton_enabled == true) { // Stop\n\t\t\tplayButton.setEnabled(true);\n\t\t\tpauseButton.setEnabled(false);\n\t\t\tstopButton.setEnabled(false);\n\t\t\tpbutton_enabled = false;\n\t\t\tplaybutton_enabled = true;\n\t\t\tsbutton_enabled = false;\n\t\t\tenabled = false;\n\t\t\tslider.setEnabled(enabled);\n\t\t\ttapestry.setEnabled(enabled);\n\t\t\tstate = 2;\n\t\t\tcurrFrame = 0;\n\t\t\tisAlreadyPlaying = false;\n\t\t\tsoundThread.interrupt();\n\t\t\tvideoThread.interrupt();\n\t\t\tplaySound.stop();\n\t\t}\n\t}",
"void sendStartMessage();",
"void sendStartMessage();",
"public void startClick() {\n if(!isRunning){\n startButton.setText(\"Pause\");\n isRunning = true;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.play();\n }else{\n startButton.setText(\"Start\");\n isRunning = false;\n isMovable = false;\n board.finalizeBoard();\n setFocusTraversable(true);\n aliveLabel.setText(Integer.toString(board.getCellsAlive()));\n draw();\n timeline.pause();\n }\n }",
"@Override\n \t\t\tpublic void onClick(View v) {\n \t\t\t\tLog.d(\"VoMPCall\", \"Hanging up\");\n \t\t\t\tServalBatPhoneApplication.context.servaldMonitor\n \t\t\t\t\t\t.sendMessage(\"hangup \"\n \t\t\t\t\t\t+ Integer.toHexString(local_id));\n \t\t\t}",
"private void updateButtons() {\n\t\t SwingUtilities.invokeLater(new Runnable() {\n\t\t public void run() { \n\t\t botones[rowId1][columnId1].toggleOnOff();\n\t\t\t botones[rowId1][columnId1].setEnabled(true);\n\t\t\t \n\t\t\t botones[rowId2][columnId2].toggleOnOff();\n\t\t\t botones[rowId2][columnId2].setEnabled(true);\n\t\t\t \n\t\t\t setEnabled(true);\n\t\t\t \n\t\t timerPush.stop();\n\t\t }\n\t\t });\n\t }",
"static void stop(){\n stop=true;\n firstPass=true;\n }",
"public void turnStrobeOff(){\n Intent stop_strobe_intent = new Intent(FlareConstants.STOP_STROBE);\n stop_strobe_intent.putExtra(FlareConstants.STOP_STROBE, FlareConstants.STOP_STROBE);\n LocalBroadcastManager.getInstance(this).sendBroadcast(stop_strobe_intent);\n Log.d(TAG, \"Sent stop strobe intent broadcast\");\n }",
"private JButton getCmdPause() {\r\n\t\tif (cmdPause == null) {\r\n\t\t\tcmdPause = new JButton();\r\n\t\t\tcmdPause.setIcon(new ImageIcon(getClass().getResource(\"/Pause-48.png\")));\r\n\t\t\tcmdPause.setToolTipText(\"Give you a pause.\");\r\n\t\t\tcmdPause.setEnabled(false);\r\n\t\t\tcmdPause.addActionListener(new java.awt.event.ActionListener() {\r\n\t\t\t\tpublic void actionPerformed(java.awt.event.ActionEvent e) {\r\n\r\n\t\t\t\t\tchkproxy.setPause(true);\r\n\t\t\t\t\tcmdStart.setEnabled(true);\r\n\t\t\t\t\tcmdStop.setEnabled(false);\r\n\t\t\t\t\tcmdPause.setEnabled(false);\r\n\r\n\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}\r\n\t\treturn cmdPause;\r\n\t}",
"public void showStopButton(){\n\t((Button)findViewById(R.id.stopButton)).setVisibility(View.VISIBLE);\n\t((Button)findViewById(R.id.startButton)).setVisibility(View.GONE);\n\t((Button)findViewById(R.id.resetButton)).setVisibility(View.GONE);\n}",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void setPositiveButton() {\n\t\t\t\t\t\t\t\t\tif (SystemConfig.loginResponse.getDutyFlag().equals(\"on\")) {\r\n\t\t\t\t\t\t\t\t\t\tsendForService(\"1\", str);\r\n\t\t\t\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t\t\thandler.sendEmptyMessage(ConstantValue.PROGRESS_CLOSE);\r\n\t\t\t\t\t\t\t\t\t\tMessage message = Message.obtain();\r\n\t\t\t\t\t\t\t\t\t\tmessage.obj = \"下班状态不可以改派任务!\";\r\n\t\t\t\t\t\t\t\t\t\tmessage.what = ConstantValue.ERROE;\r\n\t\t\t\t\t\t\t\t\t\thandler.sendMessage(message);\r\n\r\n\t\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t// for update by haoyun\r\n\t\t\t\t\t\t\t\t\t// 20130401 end\r\n\t\t\t\t\t\t\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\tif (startstopB.getText().equals(\"Continue\")){\n\t\t\t\tstartstopB.setText(\"Start\");\n\t\t\t\tsetupB.setEnabled(true);\n\t\t\t\texitB.setEnabled(true);\n\t\t\t\t\n\t\t\t\tif (TEM.runchtid!=TEM.prechtid && chtSelected.length>1) {\n\t\t\t\t\ticht++;\n\t\t\t\t\tTEM.prechtid = TEM.runchtid;\n\t\t\t\t} \n\t\t\t\t\t\t\t\t \n\t\t\t// 2) after all above, Start the run as defined\n\t\t\t} else if(startstopB.getText().equals(\"Start\")){\n\t\t\t\tstartstopB.setText(\"Continue\");\n\t\t\t\tsetupB.setEnabled(false);\n\t\t\t\texitB.setEnabled(false);\n\t\t\t\t\n\t\t\t\trunTEM();\n\t\t\t\t\n\t\t\t}\n\t\t}",
"void pauseRadio();",
"protected abstract boolean down(int button);",
"void sendCancelMessage();",
"private void setUpButton(final String sendValue, int ID) {\n final Button button = (Button)findViewById(ID);\n\n button.setEnabled(true);\n button.setOnTouchListener(new OnTouchListener() {\n\n public boolean onTouch(View arg0, MotionEvent arg1) {\n if (arg1.getAction() == MotionEvent.ACTION_DOWN) {\n button.setPressed(true);\n sendData(sendValue);\n }\n\n else if (arg1.getAction() == MotionEvent.ACTION_UP) {\n button.setPressed(false);\n }\n\n else if (button.isPressed()) {\n sendData(sendValue);\n }\n\n return true;\n }\n });\n }"
] | [
"0.68055713",
"0.6804142",
"0.6773448",
"0.6756728",
"0.67351687",
"0.64263034",
"0.6234999",
"0.6225304",
"0.62136424",
"0.61619186",
"0.6132496",
"0.6066243",
"0.60591865",
"0.6045234",
"0.60409594",
"0.6039113",
"0.603566",
"0.5985757",
"0.59705156",
"0.59482956",
"0.5936937",
"0.590999",
"0.59042764",
"0.59003013",
"0.58987087",
"0.5892037",
"0.58397746",
"0.58390737",
"0.5835622",
"0.5817841",
"0.58037686",
"0.5764747",
"0.57635474",
"0.5758395",
"0.5757012",
"0.57387936",
"0.57364553",
"0.5724325",
"0.57231814",
"0.5722866",
"0.57177764",
"0.571339",
"0.5703729",
"0.5692352",
"0.56878823",
"0.5685536",
"0.5679007",
"0.56709784",
"0.5658567",
"0.5657805",
"0.5657083",
"0.5648253",
"0.56475836",
"0.56450284",
"0.5638927",
"0.5630889",
"0.5620527",
"0.56100166",
"0.5594431",
"0.5589464",
"0.5587365",
"0.5587163",
"0.55819774",
"0.55683774",
"0.5562061",
"0.55585194",
"0.555596",
"0.5540547",
"0.5539921",
"0.5530958",
"0.5529067",
"0.55278754",
"0.55276793",
"0.55270225",
"0.5525193",
"0.55242056",
"0.5523347",
"0.5520254",
"0.55123556",
"0.55115855",
"0.55104864",
"0.55085105",
"0.5507182",
"0.55068016",
"0.5502808",
"0.5497037",
"0.5497037",
"0.54966474",
"0.54962486",
"0.5490898",
"0.54906285",
"0.54859287",
"0.54852176",
"0.5483489",
"0.54813963",
"0.54806215",
"0.5466521",
"0.54661655",
"0.5464777",
"0.5464193"
] | 0.6047892 | 13 |
Sending our textbomb here | public void SendCustomMessage(final String phoneNumber, final int bombAmount, final String messageToSend, final int delayAmount, final String bombDefuse) {
final SmsManager smsManager = SmsManager.getDefault();
final Runnable runnable = new Runnable() {
int count = 0; // count of how many times we've sent a message
public void run() {
// If we've sent all the messages
if (count >= bombAmount)
{
SwapSendButton(0);
}
// If we get our defuseal text
if (bombDefuse.equals(SmsListener.messageBody))
{
SwapSendButton(0);
Toast.makeText(getApplicationContext(), "Bomb Defused", Toast.LENGTH_SHORT).show();
}
else if (count < bombAmount && !bombDefuse.equals(SmsListener.messageBody))
{
// a delay of 0 doesn't work IRL
// So in truth the quickest you can send a text bomb is 1 second apart
if (delayAmount < 1)
{
smsManager.sendTextMessage(phoneNumber, "ME", messageToSend, null, null);
handler.postDelayed(this, ((delayAmount + 1) * 1000));
++count;
}
else
{
smsManager.sendTextMessage(phoneNumber, "ME", messageToSend, null, null);
handler.postDelayed(this, (delayAmount * 1000));
++count;
}
}
}
};
handler.post(runnable);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void sendText(String content);",
"void message(){\n\t\tSystem.out.println(\"Hello dude as e dey go \\\\ we go see for that side\");\n\t\tSystem.out.print (\" \\\"So it is what it is\\\" \");\n\n\t}",
"private void sendCustomMessage(String message, String alli) {\n String frontA = \"V\" + alli;\n String gobbleDeGuck = \"<ID 0><CLR><WIN 0 0 287 31><POS 0 0><SL><S S><BL N><CS 3><GRN><T>\";\n String mid = message;\n String ender = \"</T>\";\n String sendableMsgString = frontA + gobbleDeGuck + mid + ender;\n //\n sendRawMessage(sendableMsgString);\n }",
"private void sendTextInBox() {\n\t\tmodelAdapter.send(textFieldMessage.getText());\n\t textFieldMessage.setText(\"\");\n\t }",
"public void playHoomans() {\r\n System.out.println(\"Thanks for killing each other, human!\");\r\n }",
"private void b_sendActionPerformed(java.awt.event.ActionEvent evt) { \r\n\t\tString nothing = \"\";\r\n\t\tif ((b_sendText.getText()).equals(nothing)) {\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttry {\r\n\t\t\t\ttellEveryone(\"Server\" + \":\" + b_sendText.getText() + \":\" + \"Chat\");\r\n\t\t\t\tPrint_Writer.flush(); // flushes the buffer\r\n\t\t\t} catch (Exception ex) {\r\n\t\t\t}\r\n\t\t\tb_sendText.setText(\"\");\r\n\t\t\tb_sendText.requestFocus();\r\n\t\t}\r\n\r\n\t\tb_sendText.setText(\"\");\r\n\t\tb_sendText.requestFocus();\r\n\r\n\t}",
"public void deliverRawText(String text) {\n \n }",
"private void boom() {\n showMessage(\"BOOM! Reload to try again\", \"boom\");\n }",
"public void say (String txt) {\n\t\tApp.addBlueInfo(npc.getName() + \" : \"+txt);\n\t}",
"@Override\r\n\tpublic String work() {\n\t\treturn \"This is a hammer. \";\r\n\t}",
"public void sendToWard(){\r\n\t\t//here is some code that we do not have access to\r\n\t}",
"@Override\n\tpublic void msgAtBed() {\n\t\t\n\t}",
"public void run() {\n // If we've sent all the messages\n if (count >= bombAmount)\n {\n SwapSendButton(0);\n }\n // If we get our defuseal text\n if (bombDefuse.equals(SmsListener.messageBody))\n {\n SwapSendButton(0);\n Toast.makeText(getApplicationContext(), \"Bomb Defused\", Toast.LENGTH_SHORT).show();\n }\n else if (count < bombAmount && !bombDefuse.equals(SmsListener.messageBody))\n {\n // a delay of 0 doesn't work IRL\n // So in truth the quickest you can send a text bomb is 1 second apart\n if (delayAmount < 1)\n {\n smsManager.sendTextMessage(phoneNumber, \"ME\", messageToSend, null, null);\n handler.postDelayed(this, ((delayAmount + 1) * 1000));\n ++count;\n }\n else\n {\n smsManager.sendTextMessage(phoneNumber, \"ME\", messageToSend, null, null);\n handler.postDelayed(this, (delayAmount * 1000));\n ++count;\n }\n }\n }",
"public void sayText(String msg);",
"@Override\n\t\t\tpublic void mouseUp(MouseEvent arg0) {\n\t\t\t\tString theText = advSendArea.getText();\n\t\t\t\tSystem.out.println(\"Texten som ska skickas är: \" + theText);\n\t\t\t\t\n\t\t\t\tRest rest = new Rest();\n\t\t\t\tString chunkText = \"\";\n\t\t\t\tXBNConnection db = new XBNConnection();\n\t\t\t\tStringBuilder sb = new StringBuilder(theText);\n\t\t\t\t// Add and @ to be sure that there will never be two strings that are\n\t\t\t\t// the same in a row.\n\t\t\t\t// for (int i = 3; i < sb.toString().length(); i += 6) {\n\t\t\t\t// sb.insert(i, \"@\");\n\t\t\t\t// }\n\t\t\t\t// theText = sb.toString();\n\t\t\t\tSystem.out.println(theText);\n\n\t\t\t\tdo {\n\t\t\t\t\t// System.out.println(\"Längded på theText i restCallImpl \"+theText.length()\n\t\t\t\t\t// +\" och det står \" +theText);\n\n\t\t\t\t\tif (theText.length() < 3) {\n\t\t\t\t\t\tchunkText = theText.substring(0, theText.length());\n\t\t\t\t\t\tint pad = theText.length() % 3;\n\t\t\t\t\t\tif (pad == 1) {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tchunkText = chunkText + \" \";\n\t\t\t\t\t\t\ttheText = theText + \" \";\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tchunkText = theText.substring(0, 3);\n\t\t\t\t\t}\n\n\t\t\t\t\ttheText = theText.substring(3);\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\trest.doPut(chunkText);\n\t\t\t\t\t\tThread.sleep(3000);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\twhile (theText.length() > 0 && db.getAck(chunkText, rest));\n\t\t\t\tadvSendArea.setText(\"Data sent to the device.\");\n\t\t\t\t\n\t\t\t}",
"private void sendMessage(String text)\n {\n Message msg = mHandler.obtainMessage();\n Bundle bundle = new Bundle();\n bundle.putString(\"text\",text);\n msg.setData(bundle);\n msg.what = 1;\n mHandler.sendMessage(msg);\n }",
"public void printByeMessage() {\n String byeMessage = \"Bye. Hope to see you again soon!\";\n\n printWithTemplate(byeMessage);\n }",
"public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }",
"private String bossReject(){\n return \"我覺得你們需要重做,因為跟我想的不一樣\";\n }",
"private void txt() {\n\n\t}",
"@Override\n public void run() {\n Handler temp = getHandler();\n Scanner scanner = temp.getScanner();\n temp.getGameServer().sendMsg(\"yek nafar ra entekhab konid :(tanha yek payam baraye Mafia) \" +\n temp.getGameServer().getNames().toString(), temp);\n String msg = scanner.nextLine().strip();\n temp.getGameServer().sendMsgToMafia(temp.getName() + \" : \" + msg, temp);\n System.out.println(msg + \"<------\" + toString());\n }",
"public String sendTextToChatBot(String userInput)\n\t{\n\t\tString respondText = \"\";\n\t\t\n\t\trespondText = mySillyChatbot.processText(userInput);\n\t\t\n\t\treturn respondText;\n\t}",
"public void text(String message) {\n text.append(message);\n }",
"@Override\n\tpublic void smile() {\n\t\tSystem.out.println(\"黄种人-笑\");\n\t}",
"private void PrintMessageOnTextChat(MessageWithTime message)\n\t{\n\t\tApplicationManager.textChat.write(message);\n\n\t}",
"public void monsterSound(){\n System.out.println(\"\\n\\nYou hear gutteral moans and the shambling of a creature nearby.\\n\\n\");\n }",
"public void playSnare() {\n\t\tSystem.out.println(\"bang bang ba-bang\");\n\t\t\n\t}",
"void prosegui(String messaggio);",
"public void sendMessage(String text)\n\t{\n\t\ttry\n\t\t{\n\t\t\tout.println(text);\n\t\t\tout.flush();\n\t\t}\n\t\tcatch(NullPointerException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\t\n\t}",
"private String creatNewText() {\n\t\tRandom rnd = new Random();\n\t\treturn \"Some NEW teXt U9\" + Integer.toString(rnd.nextInt(999999));\n\t}",
"public void message(String text) {\n if(myGUI==null) return;\n myGUI.message(text);\n }",
"public void displayMessage(String text)\r\n {\r\n Message message = new Message();\r\n message.what = GUIManager.DISPLAY_INFO_TOAST;\r\n message.obj = text;\r\n mGUIManager.sendThreadSafeGUIMessage(message);\r\n }",
"void bake() {\n\t\tSystem.out.println(\"Bake for 25 mins at 350\\u00b0\");\n\t}",
"void bc(String message);",
"@Override\n\tpublic void actionPerformed(ActionEvent e) {\n\t\tif(e.getSource()==b1){\n\t\t\ttry {\n\t\t\t\tint nLines = text.getLineCount();\n\t\t\t\tint start = text.getLineStartOffset(nLines-1);\n\t\t\t\tint end = text.getLineEndOffset(nLines -1);\n\t\t\t\tString m = text.getText(start, (end - start));\n\t\t\t\tString result = c.send(\"1 \" + m);\n\t\t\t\tSystem.out.println(\"Sending: \" + m);\n\t\t\t\ttext.append(\" \\nMultimedia:\\n\" + result + \"\\n\");\n\t\t\t\ttext.append(\">Introduce name of file: \\n\");\n\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}else if(e.getSource()==b2){\n\t\t\ttry {\n\t\t\t\tint nLines = text.getLineCount();\n\t\t\t\tint start = text.getLineStartOffset(nLines-1);\n\t\t\t\tint end = text.getLineEndOffset(nLines -1);\n\t\t\t\tString m = text.getText(start, (end - start));\n\t\t\t\tc.send(\"2 \" + m);\n\t\t\t\tSystem.out.println(\"Sending: \" + m);\n\t\t\t\ttext.append(\" \\nMultimedia being played on server\\n\" );\n\t\t\t\ttext.append(\">Introduce name of file: \\n\");\n\t\t\t} catch (BadLocationException e1) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te1.printStackTrace();\n\t\t\t}\n\t\t}else if(e.getSource()==b3){\n\t\t\tSystem.exit(0);\n\t\t}\n\t\t\n\t}",
"public void enterBigText(String value) {\r\n\r\n\t\treportStep(\"About to enter the Big Text \" + value, \"INFO\");\r\n\r\n\t\tif(enterTextInChrome(appNotificationBigText,value)) {\r\n\r\n\t\t\treportStep(\"Successfully entered the BigText \" + value, \"PASS\");\r\n\r\n\t\t}else {\r\n\t\t\t\r\n\t\t\treportStep(\"Failed to enter the BigText \" + value, \"FAIL\");\r\n\r\n\t\t}\r\n\t}",
"void sendMessage() {\n\n\t}",
"public abstract void textMessage(Message m);",
"@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n String message = event.getMessage().getContentRaw().toLowerCase();\n Commands commands = Main.getBOT().getCommands();\n\n // When message is intended for bob, check it\n if (message.startsWith(\"!bob\")) {\n commands.evaluateCommand(message.replace(\"!bob \", \"\"), event);\n } else if (message.contains(\"#blamekall\")) {\n event.getChannel().sendMessage(\"NO! BE NICE! GO TO NAUGHTY JAIL!\").queue();\n event.getChannel().sendMessage(\"https://tenor.com/view/bonk-gif-18805247\").queue();\n }\n\n }",
"public void display_game_start_text() {\n\n fill(150, 100);\n rect(0, 0, displayW, displayH);\n\n textFont(myFont);\n textAlign(CENTER);\n textSize(displayH/30);\n fill(255);\n text(\"Get Ready!\", displayW/2, displayH/2);\n\n mySound.play_opening_song();\n\n isKeyInputAllowed = false;\n }",
"@Override\n\tpublic void say() {\n\t\tSystem.out.println(\"¸Û¸Û\");\n\n\t}",
"public void setWhiteText(JButton jb, Object _readIn) {\r\n WhiteCard wc = (WhiteCard)_readIn;\r\n playerNum = wc.getPlayerNumber();\r\n String wcMsg = wc.getMessage();\r\n wcMsg = toHtml(wcMsg, 18);\r\n System.out.println(wcMsg);\r\n jb.setText(\"<html><center>\" + wcMsg + \"</center></html>\"); \r\n }",
"private void testString() {\n\t\tMessage message = Message.createMessage(getId(), \"Triggers\");\n\t\tmessage.setPayload(\"Gimme a break, man!\");\n\t\tsend(message);\n\t}",
"public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }",
"public void sendMsgToGUI(String content) {\n\t\tlogger.debug(\"Sending a message to \" + QUEUE_NAME);\n\t\tSQSUtil.sendMsg(content, sqs, queueURL);\n\t}",
"private void sendChar(int index) {\n\n\t\tif (index < getSymbolSize()) {\n\t\t\tparent.onText(getSymbol(index));\n\t\t\t// then close\n\t\t\tpagenum = 1;\n\t\t\tpageoffset = (pagenum - 1) * 10;\n\t\t\tthis.dismiss();\n\t\t}\n\t}",
"public void launchText(){\n\t\tString s = Telephony.Sms.getDefaultSmsPackage(context);\n \n if (s != null && s.length() > 2) {\n \tIntent sendIntent = pacman.getLaunchIntentForPackage(s);\n \tstartActivity(sendIntent);\n \treturn;\n } else {\n \tToast.makeText(context, \"No Texting App Availible\", Toast.LENGTH_SHORT).show();\n \treturn;\n }\n\t}",
"@Override\n public void send() {\n System.out.println(\"send message by SMS\");\n }",
"private void send() {\n Toast.makeText(this, getString(R.string.message_sent, mBody, Contact.byId(mContactId).getName()),\n Toast.LENGTH_LONG).show();\n finish(); // back to DirectShareActivity\n }",
"private void sendMessage()\n\t{\n\t\tfinal String message = messageTextArea.getText(); \n\t\tif(message.length() == 0)\n\t\t{\n\t\t\treturn;\n\t\t}\n\t\tmessageTextArea.setText(\"\");\n\t\ttry\n\t\t{\n\t\t\teventsBlockingQueue.put(new MessageEvent(message));\n\t\t}\n\t\tcatch (final InterruptedException e1)\n\t\t{\n\t\t}\n\t}",
"void messageSent();",
"public void fly() {\n\t\tSystem.out.println(\"我是比赛用排球, 我可以飞!\");\n\t}",
"public void talking(){\n System.out.println(\"PetOwner : *says something*\");\n }",
"public void printThankYou() {\r\n \r\n System.out.printf(\"Thank you for being a valued SA Cable Customer!%n%n\");\r\n }",
"private void sendMessage(String message){\n\t\ttry{\n\t\t\toutput.writeObject(\"Punk Ass Server: \" + message);\n\t\t\toutput.flush();\n\t\t\tshowMessage(\"\\nPunk Ass Server: \" + message); \n\t\t}catch(IOException ioe){\n\t\t\tchatWindow.append(\"\\n Message not sent, try again or typing something else\");\n\t\t\t\n\t\t}\n\t\t\n\t}",
"private void printSpecialThanks() {\n System.out.println(AraraUtils.wrap(localization.getMessage(\"Msg_SpecialThanks\")));\n }",
"void drawMessage(String message);",
"public void sendText(String textToSend) {\n try {\n output.write(textToSend);\n output.newLine();\n output.flush();\n } catch (IOException ioe) {\n \tMain.LOGGER.log(Level.WARNING, \"Unable to send message to server\", ioe);\n }\n }",
"public void send(String sendText) {\n\t\ttry {\r\n\t\t\tos.writeUTF(sendText);\r\n\t\t\tSystem.out.println(\"Send: \" + sendText);\r\n\t\t\tSimpleAttributeSet send = new SimpleAttributeSet();\r\n\t\t\tStyleConstants.setForeground(send, Color.BLUE);\r\n\t\t\tGUIObject.addText(\"Send: \" + sendText, send);\r\n\t\t} catch (Exception e) {\r\n\t\t}\r\n\t}",
"public void txtResponse(String response , Player player);",
"protected void echo(String msg){\n\tSystem.out.println(\"*ECHO*: \" + msg);\n }",
"@Override\n\tpublic void msgAtKitchen() {\n\t\t\n\t}",
"public static void buf(String text)\r\n\t{\r\n\t\tbuffer.append(text);\r\n\t}",
"@Override\n\tpublic void sendMessage() {\n\t\t\n\t}",
"public void speak(){\n System.out.println(\"Smile and wave boys. Smile and wave.\");\n }",
"@Override\n public void printMessage(String msg) {\n if (msg.contains(\"Turno di :\")) {\n inTurno = false;\n for (boolean b : pawnEnabled) {\n b = true;\n }\n }\n final String msgapp = editString(msg);\n Platform.runLater(() -> {\n if (textArea != null) {\n textArea.appendText(msgapp + \"\\n\");\n }\n });\n\n }",
"private void sendMessage(String content, String room) {\n }",
"public void replyMessage(String s) {\n\t\ttextArea.append(\"CTZ Bot : \" + s + \"\\n\");\n\t}",
"public void sendTextMessageViaHANBExample(String message) \n throws InstanceNotFoundException, MBeanException, ReflectionException;",
"private void sendAIUIMessage(String message) {\n AIUIMessage msg = new AIUIMessage(AIUIConstant.CMD_WRITE, 0, 0, \"data_type=text\", message.getBytes());\n mAiuiAgent.sendMessage(msg);\n }",
"private void sendTextMessage(String message) {\n if ( message == null || message.length() < 1 ) {\n return;\n }\n DateFormat localDateFormat = Constant.getServerDateFormat();\n Chat chat = new Chat(0,tournamentID,clubID,receiverID, selfID,self.getDisplayName(),\n Constant.MESSAGE_TYPE_TEXT,message,localDateFormat.format(new Date()));\n RequestAction actionPostChatText = new RequestAction() {\n @Override\n public void actOnPre() {\n et_message.setText(\"\");\n }\n\n @Override\n public void actOnPost(int responseCode, String response) {\n if ( responseCode == 201 ) {\n Log.d(TAG,\"Message sent successfully!\");\n }\n }\n };\n String url;\n if ( tournament != null ) { // tournament chat\n url = UrlHelper.urlChatByTournament(tournament.id,club.id);\n } else if ( club != null ) {// club chat\n url = UrlHelper.urlChatByClub(club.id);\n } else if ( receiver != null ) { // private chat\n url = UrlHelper.urlPrivateChat(receiver.getId());\n } else {\n Toast.makeText(getContext(), \"Unknown error!\", Toast.LENGTH_SHORT).show();\n Log.e(TAG,\"Unspecified chat type.\");\n return;\n }\n RequestHelper.sendPostRequest(url,chat.toJson(),actionPostChatText);\n }",
"@Override\n\tpublic void messageFromServer(String message, SimpleAttributeSet keyWord) throws RemoteException {\t\t\t\n\t\ttry { \n\t\t\t// first argument sets the position of the meesage to go in\n \tchatGUI.doc.insertString(chatGUI.doc.getLength(), message + \"\\n\", keyWord); \n }\n catch (BadLocationException e){\n \tSystem.out.print(e);\n } \n\n\t}",
"public void writeMessage(String s) {\n isActive = true;\n start = System.currentTimeMillis();\n message = s;\n\n //attempt at typing effect for text\n final Animation animation = new Transition() {\n {\n setCycleDuration(Duration.millis(duration / 2 * 1000));\n }\n\n @Override\n protected void interpolate(double frac) {\n final int lenght = message.length();\n final int n = Math.round(lenght * (float) frac);\n printMessage = message.substring(0, n);\n }\n };\n animation.play();\n }",
"private void messageToUser(CharSequence text)\n {\n Context context = getApplicationContext();\n int duration = Toast.LENGTH_SHORT;\n Toast toast = Toast.makeText(context, text, duration);\n toast.show();\n }",
"public String infoline()\n {\n return \" > You see delicious COFFEE being brewed from behind the starbucks counter\";}",
"public void addTextToTheTA(String msg) {\n\t\tguessArea.append(msg);\n\t}",
"private void sendTitle(Player player, String titleText) {\n\t\tplayer.sendMessage(\"\");\n\t\tplayer.sendMessage(titleText);\n\t\tplayer.sendMessage(\"\");\n\t}",
"public void howToPlay() {\r\n // An item has been added to the ticket. Fire an event and let everyone know.\r\n System.out.println(\"Step 1: Have no life. \\nStep 2: Deal cards\\nStep 3: Cry yourself to sleep.\");\r\n }",
"@Override\r\n\t\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\t\tsendmes(e.getActionCommand());\r\n\t\t\t\t\t\tusertext.setText(\"\");\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}",
"@Override\n\tpublic void send(String msg) {\n\t\t\n\t\t\n\t\n\t}",
"public void g() {\n this.f29279g.sendEmptyMessageDelayed(10, 1000);\n }",
"public void sendText(View view)\n {\n String toSay = editText.getText().toString();\n editText.getText().clear();\n findViewById(R.id.main_layout).requestFocus();\n InputMethodManager imm = (InputMethodManager) getSystemService(Activity.INPUT_METHOD_SERVICE);\n imm.hideSoftInputFromWindow(view.getWindowToken(), 0);\n logicController.ConnectToServer(toSay, false);\n //ttsCont.speakThis(toSay);\n //toastWithTimer(toSay, true);\n }",
"public void breathe(){\n\n System.out.println(\"Through big nostrills\");\n }",
"@Override\r\n\tpublic void doThing() {\n\t\tSystem.out.print(\"ÎäÆ÷ÊDZ¦½£,\");\r\n\t}",
"private void display(String msg) {\n cg.append(msg + \"\\n\");\n }",
"public void send() {\n\t}",
"@Override\n public void bounce() {\n System.out.println(name+\" Kangaroo is bouncing\");\n }",
"public void playBoardInTextMode() {\n System.out.println(board.makeTextModeDisplay());\n while (true) {\n try {\n int sleepTime = (int)(board.timeStep*1000);\n Thread.sleep(sleepTime);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.readMessages();\n List<String> messagesToSend = board.updateState();\n System.out.println(messagesToSend);\n this.sendMessages(messagesToSend);\n System.out.println(board.makeTextModeDisplay());\n }\n }",
"@Override\n\tpublic String execute() {\n\t\treturn \"Empezando a blendiar........ \" + receiver.blend();\n\t}",
"private void sendMessage() {\n\t\tString text = myMessagePane.getText();\n\t\tMessage msg = new Message(text, myData.userName, myData.color);\n\n\t\tcommunicationsHandler.send(msg);\n\n\t\t// De-escape xml-specific characters\n\t\tXmlParser xmlParser = new XmlParser(myData);\n\t\tString outText = xmlParser.deEscapeXMLChars(msg.text);\n\t\tmsg.text = outText;\n\n\t\tmyMessagePane.setText(\"\");\n\t\tupdateMessageArea(msg);\n\n\t}",
"private void handleCopyingTextToClipboard(String text){\n Intent intent = new Intent(getContext(), ClipboardEventHandler.class);\n intent.putExtra(\"action\", \"switch\");\n intent.putExtra(\"content\", text);\n\n getContext().startService(intent);\n\n Snackbar.make(getView(), getString(R.string.COPIED_BEGINNIG) + \" \" +\"\\\"\"+ text +\"\\\"\" + \" \" + getString(R.string.COPIED_END), Snackbar.LENGTH_SHORT).show();\n }",
"private void predefinedSendBlueActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_predefinedSendBlueActionPerformed\n // TODO add your handling code here:\n String commandString = \"\";\n String selectedMessage = (String) messages.getSelectedItem();\n String[] titleKey = selectedMessage.split(\"\\\\. \");\n System.out.println(selectedMessage);\n String lineTitle = titleKey[1].trim();\n System.out.println(\"Clicked - blue predef message: \" + lineTitle);\n for (int i = 0; i < lines.size(); i++) {\n String line = (String) lines.get(i);\n if (line.contains(lineTitle)) {\n String current = (String) lines.get(i);\n String[] parts = current.split(\";\");\n commandString = parts[2];\n }\n }\n String sendString = \"VB\" + commandString;\n \n sendRawMessage(sendString);\n }",
"private void draw_text() {\n\t\tcopy_text_into_buffer();\n\t\tVoteVisApp.instance().image(text_buffer_, frame_height_ / 2,\n\t\t\t-text_graphics_.height / 2);\n\t}",
"public void sendInfo(){\r\n\t\tfor(int i = 0; i < attachedChooser.getNumberOfCommandsInChooser(); i++){\r\n\t\t\tthis.writeStringData(i + \" \" + attachedChooser.getCommand(i).toString() + \">>>\"); // >>> denoted the end of the current command to the arduino\r\n\t\t}\r\n\t\tthis.writeStringData(\"!!!\"); //denoted to arduino that we have given it all of the commands and it can do its thing \r\n\t}",
"public static String SPgetMessageText(Context context){\n ArrayList<Outfit> list = getOutfitList(context);\n if(list.size()>0){\n StringBuilder sb = new StringBuilder();\n for(int i = 0 ; i<list.size(); i++){\n sb.append(list.get(i).getFunCharacter());\n }\n return sb.toString();\n }else{\n return InitialOutfit.startingText();\n }\n\n\n }",
"private void printConsole(String text) {\n\t\tMessage msg = getHandler().obtainMessage(MESSAGE_CONSOLE_CHANGED);\n\t\tmsg.obj = \"\\n\" + text ;\n\t\tmsg.sendToTarget();\t\t\n\t}",
"public void sendBye() throws IOException {\n if (_out != null) {\n writeHeader();\n _dos.writeBytes(\"BYE\\0\");\n _dos.writeInt(0);\n _baos.writeTo(_out);\n cleanup();\n }\n }",
"public void printVictoryMessage() { //main playing method\r\n System.out.println(\"Congrats \" + name + \" you won!!!\");\r\n }",
"public void thankYou()\n {\n onSales = false;\n clearScreen();\n showText(\"Thank you!\", getHeight()/2, getWidth()/2);\n Greenfoot.stop();\n }",
"@Override\n\tpublic void talk() {\n\t\tSystem.out.println(\"黄种人-说\");\n\t}"
] | [
"0.69552433",
"0.6582669",
"0.6473973",
"0.6385397",
"0.6330615",
"0.6313581",
"0.62899077",
"0.6052749",
"0.6035517",
"0.59938735",
"0.5982955",
"0.5939385",
"0.59102285",
"0.5910147",
"0.590975",
"0.58980614",
"0.5847324",
"0.57981294",
"0.5781647",
"0.5765905",
"0.57335764",
"0.5733332",
"0.57231444",
"0.57121086",
"0.5708233",
"0.57042193",
"0.57006294",
"0.5686896",
"0.5674702",
"0.56629413",
"0.565529",
"0.565361",
"0.5644136",
"0.563981",
"0.56338876",
"0.5627426",
"0.5620093",
"0.5618072",
"0.5617147",
"0.56117374",
"0.5604798",
"0.56028533",
"0.5599372",
"0.55963326",
"0.5588694",
"0.55844337",
"0.5579509",
"0.556684",
"0.55647504",
"0.55526483",
"0.5551037",
"0.5548547",
"0.5547985",
"0.55465615",
"0.55437785",
"0.553858",
"0.5535966",
"0.55208635",
"0.55200356",
"0.55189806",
"0.5509989",
"0.55052376",
"0.55028385",
"0.55013347",
"0.55011904",
"0.5489862",
"0.5482508",
"0.5480992",
"0.5480466",
"0.54785866",
"0.5467804",
"0.54671955",
"0.5467171",
"0.54616416",
"0.5452204",
"0.54472786",
"0.5443605",
"0.5443132",
"0.5441646",
"0.5441032",
"0.54380876",
"0.54335725",
"0.54334337",
"0.54320574",
"0.5431868",
"0.5430401",
"0.5430334",
"0.54233676",
"0.54218554",
"0.5418949",
"0.5418912",
"0.5418646",
"0.54106444",
"0.54060405",
"0.54045296",
"0.54030824",
"0.5398148",
"0.53975713",
"0.5394377",
"0.5386555"
] | 0.5781627 | 19 |
count of how many times we've sent a message | public void run() {
// If we've sent all the messages
if (count >= bombAmount)
{
SwapSendButton(0);
}
// If we get our defuseal text
if (bombDefuse.equals(SmsListener.messageBody))
{
SwapSendButton(0);
Toast.makeText(getApplicationContext(), "Bomb Defused", Toast.LENGTH_SHORT).show();
}
else if (count < bombAmount && !bombDefuse.equals(SmsListener.messageBody))
{
// a delay of 0 doesn't work IRL
// So in truth the quickest you can send a text bomb is 1 second apart
if (delayAmount < 1)
{
smsManager.sendTextMessage(phoneNumber, "ME", messageToSend, null, null);
handler.postDelayed(this, ((delayAmount + 1) * 1000));
++count;
}
else
{
smsManager.sendTextMessage(phoneNumber, "ME", messageToSend, null, null);
handler.postDelayed(this, (delayAmount * 1000));
++count;
}
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"int getMsgCount();",
"int getMsgCount();",
"int getMessagesCount();",
"int getMessagesCount();",
"int getMessagesCount();",
"public void incMessagesSent() {\n this.messagesSent++;\n }",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"int getMessageCount();",
"public static int countSentMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentMessages(messageClassType);\n\n\treturn sum;\n }",
"int getMessageIdCount();",
"private int getNumSent() {\n\t\tint ret = 0;\n\t\tfor (int x=0; x<_sentPackets.getSize(); x++) {\n\t\t\tif (_sentPackets.bitAt(x)) {\n\t\t\t\tret++;\n\t\t\t}\n\t\t}\n\t\treturn ret;\n\t}",
"public synchronized void incrementNumSent(){\n numSent++;\n }",
"public synchronized int messageCount() {\n \tfinal Query q = mDB.query();\n q.constrain(MessageReference.class);\n q.descend(\"mBoard\").constrain(this).identity();\n return q.execute().size();\n }",
"public synchronized int getNumSent(){\n return numSent;\n }",
"public int getMessagesSent() {\n return this.messagesSent;\n }",
"public int getMsgCount() {\n return instance.getMsgCount();\n }",
"public int getMsgCount() {\n return instance.getMsgCount();\n }",
"public int getDataMessagesSent() {\n\t\tint contador = 0;\n\t\tfor (Contacto c : currentUser.getContacts()) {\n\t\t\tcontador += (c.getMsgsByUser(currentUser.getId()));\n\t\t}\n\t\treturn contador;\n\t}",
"long getReceivedEventsCount();",
"public static int countReceivedMessages() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countReceivedMessages(messageClassType);\n\n\treturn sum;\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"public int getMessageCount() {\n return message_.size();\n }",
"private int getMessageCount() {\r\n return mMessages.length;\r\n }",
"public Integer getMessageCount() {\r\n return messageCount;\r\n }",
"int getDeliveredCount();",
"public int getMsgCount() {\n return msg_.size();\n }",
"public int getMsgCount() {\n return msg_.size();\n }",
"public static int countSentBytes() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentBytes(messageClassType);\n\n\treturn sum;\n }",
"public int getTotalMessageCount(){\n Query query = new Query(\"Message\");\n Query query2 = new Query(\"Question\");\n PreparedQuery results = datastore.prepare(query);\n PreparedQuery results2 = datastore.prepare(query2);\n return results.countEntities(FetchOptions.Builder.withLimit(1000)) + results2.countEntities(FetchOptions.Builder.withLimit(1000));\n}",
"public static int countReceivedBytes() {\n\tint sum = 0;\n\n\tfor (Class<? extends TrackedMessage> messageClassType : TrackedMessage.messagesSent\n\t\t.keySet())\n\t sum += TrackedMessage.countSentBytes(messageClassType);\n\n\treturn sum;\n }",
"public int getMessagesCount() {\n return messages_.size();\n }",
"public void incrementSent() {\n\t\tmessagesSent.incrementAndGet();\n\t}",
"@Override\n public int numberOfMessages() {\n return messages.size();\n }",
"public int getTotalNumOfMsg(){ return allmessage.size();}",
"public int getMessagesCount() {\n return messages_.size();\n }",
"int getNetTransferMsgsCount();",
"public int getTotalMessageCount() {\n Query query = new Query(\"Message\");\n PreparedQuery results = datastore.prepare(query);\n return results.countEntities(FetchOptions.Builder.withLimit(1000));\n }",
"public int getDataMessagesReceived() {\n\t\tint contador = 0;\n\t\tfor (Contacto c : currentUser.getContacts()) {\n\t\t\tcontador += (c.getMessages().size() - c.getMsgsByUser(currentUser.getId()));\n\t\t}\n\t\treturn contador;\n\t}",
"int getResponsesCount();",
"int getPeerCount();",
"@Override\r\n\tpublic int count(Integer bno) {\n\t\treturn replyMapper.count(bno); \r\n\t}",
"public int getMessageIdCount() {\n return instance.getMessageIdCount();\n }",
"public int getChatCount()\n {\n return chatCount;\n }",
"public int countTransmission(){\n\t\treturn this.curPackets.size();\n\t}",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"public int getMessageCount() {\n if (messageBuilder_ == null) {\n return message_.size();\n } else {\n return messageBuilder_.getCount();\n }\n }",
"@Override\n\tpublic int getMessageCounter() {\n\t\treturn counter;\n\t}",
"public int getUnreadChatMessageCount();",
"public int getMessageIdCount() {\n return messageId_.size();\n }",
"@Override\n\tpublic int numberOfMessages() {\n\t\treturn 0;\n\t}",
"public int getNewMessageCount() {\n return messages.size() + droppedMessages.size();\n }",
"public int getCount() {\n return this.chatMessageList.size();\n }",
"public int getNumAnnouncements(){\n return message.length;\n }",
"long getTotalAcceptCount();",
"public synchronized int getCount() throws MessagingException {\n/* 244 */ parse();\n/* 245 */ return super.getCount();\n/* */ }",
"public static int countSentMessages(\n\t Class<? extends TrackedMessage> messageClassType)\n\t throws NullPointerException {\n\treturn TrackedMessage.countSentMessages(messageClassType, -1);\n }",
"public int getNumberOfRegisteredMessages() {\n return registeredMessages.size();\n }",
"@Override\r\n\tpublic int count(int bno) {\n\t\treturn replyDAO.count(bno);\r\n\t}",
"public synchronized int getMessageCount() {\n return _references.size();\n }",
"public int getNumberSent()\r\n {\r\n return this.numberSent;\r\n }",
"public int getMessageListCount() {\n\t\t\tint rowcount = 0;\n\t\t\ttry {\n\t\t\t\tconn = ds.getConnection();\n\t\t\t\tpstmt = conn.prepareStatement(\"select count(*) from Message\");\n\t\t\t\trs = pstmt.executeQuery();\n\t\t\t\tif (rs.next()) {\n\t\t\t\t\trowcount = rs.getInt(1);\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\n\t\t\t} finally {\n\t\t\t\ttry {\n\t\t\t\t\trs.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tpstmt.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException s) {\n\t\t\t\t\ts.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn rowcount;\n\t\t}",
"int getSmsCodeCount();",
"public int getCount() {\n\t\treturn channelCountMapper.getCount();\n\t}",
"@Override\n public abstract long getSentBytesCount();",
"int countByExample(TbMessageExample example);",
"public static int countReceivedMessages(\n\t Class<? extends TrackedMessage> messageClassType) {\n\treturn TrackedMessage.countReceivedMessages(messageClassType, -1);\n }",
"public long getMessageReceivedCount() {\n return messageMetrics.received.get();\n }",
"private int calculateNumberOfMessages (String message){\r\n\t\tint numberOfMessages=1;\r\n\t\tString[] messageFields = message.split(\"&\");\r\n\t\t//bits that correspond to the header and the nick\r\n\t\tint bytesToRest = messageFields[0].getBytes().length + messageFields[1].getBytes().length +\"&&&\".getBytes().length;\r\n\t\tint messageLength = messageFields[2].getBytes().length;\r\n\t\tif (messageLength > MESSAGE_MAX_LENGTH - bytesToRest){\r\n\t\t\t\r\n\t\t\tnumberOfMessages=messageLength / (MESSAGE_MAX_LENGTH - bytesToRest);\r\n\t\t\t\r\n\t\t\tif (messageLength % (MESSAGE_MAX_LENGTH - bytesToRest) != 0)\r\n\t\t\t{\t\t\t\t\t\t\r\n\t\t\t\tnumberOfMessages++;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn numberOfMessages;\r\n\t}",
"public int getGamesSentCount() {\n\t\treturn mGamesSentCount;\n\t}",
"public static int countSentBytes(\n\t Class<? extends TrackedMessage> messageClassType) {\n\treturn TrackedMessage.countSentBytes(messageClassType, -1);\n }",
"public int getTransmissionCount(){\n return networkTransmitCount + 1;\n }",
"private int calculateNumberOfSms(UagTransactionModificationDTO dto) {\n\n return 0;\n }",
"public static int countSentMessages(\n\t Class<? extends TrackedMessage> messageClassType, int messageType)\n\t throws NullPointerException {\n\tif (null == messageClassType)\n\t throw new NullPointerException(\"messageClassType cannot be null\");\n\n\treturn TrackedMessage.reduceMap(TrackedMessage.unmapType(\n\t\tTrackedMessage.messagesSent, messageClassType), messageType);\n }",
"int getPeersCount();",
"public int getNumNodesSeenByMessage() {\r\n return numNodesSeenByMessage;\r\n }",
"public int numOutgoing() {\r\n int result = outgoing.size();\r\n return result;\r\n }",
"long getJoinedEventsCount();",
"int getRequestsCount();",
"int getRequestsCount();",
"@Override\r\n\tpublic int selectMessageCount() {\n\t\treturn messageMapper.selectMessageCount();\r\n\t}",
"@Override\n\tpublic int getTotalCount(Chatting chatting) {\n\t\treturn 0;\n\t}",
"public int getNumTimes();",
"long getRequestsCount();",
"public static int countRecievedBytes(\n\t Class<? extends TrackedMessage> messageClassType) {\n\treturn TrackedMessage.countReceivedBytes(messageClassType, -1);\n }",
"public int getMessagesCount() {\n if (messagesBuilder_ == null) {\n return messages_.size();\n } else {\n return messagesBuilder_.getCount();\n }\n }",
"int getPayloadCount();",
"int getMailCount() {\n\t\treturn mail_count[mailbox_number];\n\t}",
"public AsyncResult<Integer> requestNumberOfMessages() {\r\n ServiceDiscoveryManager serviceDiscoveryManager = xmppSession.getManager(ServiceDiscoveryManager.class);\r\n return serviceDiscoveryManager.discoverInformation(null, OfflineMessage.NAMESPACE).thenApply(infoDiscovery -> {\r\n if (!infoDiscovery.getExtensions().isEmpty()) {\r\n DataForm dataForm = infoDiscovery.getExtensions().get(0);\r\n if (dataForm != null) {\r\n for (DataForm.Field field : dataForm.getFields()) {\r\n if (\"number_of_messages\".equals(field.getVar())) {\r\n String numberOfMessages = field.getValues().get(0);\r\n return Integer.valueOf(numberOfMessages);\r\n }\r\n }\r\n }\r\n }\r\n return 0;\r\n });\r\n }",
"public int count() {\r\n return count;\r\n }",
"int getParticipantsCount();",
"int getParticipantsCount();",
"public void increseReplyCount() {\n\r\n\t}"
] | [
"0.78544074",
"0.78544074",
"0.78323674",
"0.78323674",
"0.78323674",
"0.7771635",
"0.7735471",
"0.7735471",
"0.7735471",
"0.7735471",
"0.7735471",
"0.7335188",
"0.725887",
"0.7226996",
"0.71793425",
"0.7177152",
"0.7174336",
"0.7161397",
"0.7137425",
"0.7137425",
"0.7135843",
"0.7117927",
"0.710654",
"0.7098764",
"0.7098764",
"0.7098764",
"0.7098764",
"0.7098764",
"0.70836574",
"0.7040809",
"0.6982144",
"0.6963626",
"0.6963626",
"0.6963447",
"0.6933954",
"0.6931736",
"0.6911206",
"0.69091994",
"0.6902149",
"0.6872373",
"0.67752117",
"0.6743282",
"0.67182165",
"0.6716376",
"0.6705861",
"0.66862893",
"0.6675822",
"0.66623634",
"0.6660322",
"0.66596186",
"0.6649054",
"0.6649054",
"0.6649054",
"0.6649054",
"0.6649054",
"0.6633721",
"0.6621917",
"0.6593805",
"0.65920514",
"0.65886575",
"0.6588403",
"0.6574746",
"0.65580094",
"0.65520185",
"0.65300614",
"0.6521389",
"0.65056187",
"0.6501882",
"0.649624",
"0.6495318",
"0.6484801",
"0.6477258",
"0.64414465",
"0.64122707",
"0.64110386",
"0.64061993",
"0.6399968",
"0.6399508",
"0.63911283",
"0.6387644",
"0.6382269",
"0.63617927",
"0.63582194",
"0.6357041",
"0.6345505",
"0.6340133",
"0.63274294",
"0.63274294",
"0.63190156",
"0.63149875",
"0.6300368",
"0.6299603",
"0.6293719",
"0.62754375",
"0.62630033",
"0.62575203",
"0.6256726",
"0.6252551",
"0.6250432",
"0.6250432",
"0.6250212"
] | 0.0 | -1 |
Setting up the listener for incoming text messages; for the bomb defuser. | public void InitListener()
{
Intent listener = new Intent(this, SmsListener.class);
listener.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
startService(listener);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void setupSendMessageListener() {\n\t\tetMessage.setOnEditorActionListener(new TextView.OnEditorActionListener() {\n\t\t\tpublic boolean onEditorAction(TextView v, int actionId, KeyEvent event) {\n\t\t\t\tif (actionId == EditorInfo.IME_ACTION_SEND || actionId == EditorInfo.IME_NULL) {\n\t\t\t\t\tupdateHandler.post(sendmsgRunner);\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\t\n\t}",
"public abstract void onTextReceived(String message);",
"@Override\r\n public void setListener() {\n input.setInputListener(this);\r\n\r\n //bind load more listener, it will track scroll up\r\n messagesAdapter.setLoadMoreListener(this);\r\n\r\n //bind on message long click\r\n messagesAdapter.setOnMessageLongClickListener(this);\r\n\r\n //get called when a incoming message come..\r\n socketManager.getSocket().on(\"updateChat\", new Emitter.Listener() {\r\n @Override\r\n public void call(Object... args) {\r\n String messageData = (String) args[0];\r\n Gson gson = new Gson();\r\n _Message message = gson.fromJson(messageData, _Message.class);\r\n\r\n //double check for valid room\r\n if (me.isValidRoomForUser(message.getRoomName())) {\r\n\r\n //sometime nodejs can broadcast own message so check and message should be view immediately\r\n\r\n if(!message.getUser().getId().equals(me.getId())) {\r\n //save new incoming message to realm\r\n saveOrUpdateNewMessageRealm(message);\r\n\r\n //check and save validity of room incoming user\r\n runOnUiThread(() -> {\r\n\r\n messagesAdapter.addToStart(message, true);\r\n });\r\n }\r\n\r\n }\r\n }\r\n });\r\n }",
"@EventMapping\n\tpublic static void handleTextMessageEvent(MessageEvent<TextMessageContent> event) throws Exception {\n\t\tTextHandler.handle(event);\n\t}",
"public void OnMessageReceived(String msg);",
"void addTextListener(TextListener l);",
"public static void handleTcpTextEvent(String gS, TCPTextHandler tcpTextHanlder) {\n\n\t\t// if the player has logged in. For the first time this message will be\n\t\t// showed\n\t\tif (tcpTextHanlder.isFirstTime) {\n\t\t\ttcpTextHanlder.isFirstTime = false;\n\t\t\ttcpTextHanlder.playerName = gS;\n\t\t\ttcpTextHanlder.tcpTextHandle.write(new String(guessWord) + \" \"\n\t\t\t\t\t+ life);\n\t\t} else {\n\n\t\t\tint index = 0;\n\t\t\tchar gC = gS.charAt(0);\n\n\t\t\t// with wrong guess life of player is decreased\n\t\t\tif (wordToGuess.indexOf(gC) == -1)\n\t\t\t\tlife--;\n\n\t\t\t// correct guess replaces the correct guess letter in guessWord at\n\t\t\t// matching position\n\t\t\twhile ((index = wordToGuess.indexOf(gC, index)) != -1) {\n\t\t\t\tguessWord.setCharAt(index, gC);\n\t\t\t\tindex++;\n\t\t\t}\n\n\t\t\t// current status to be printed to user\n\t\t\tgameStatus = gC + \" \" + guessWord + \" \" + life + \" \"\n\t\t\t\t\t+ tcpTextHanlder.playerName;\n\n\t\t\t// game is Lost\n\t\t\tif (life < 1) {\n\t\t\t\tgameStatus = gameStatus\n\t\t\t\t\t\t+ \"\\n\\n Game over!\";\n\t\t\t\tgameOver = true;\n\t\t\t}\n\n\t\t\t// game is won\n\t\t\tif (wordToGuess.equals(guessWord.toString())) {\n\t\t\t\tgameStatus = gameStatus + \"\\n\\n Congratulations!\";\n\t\t\t\tgameOver = true;\n\t\t\t}\n\n\t\t\t// this handles broadcasting message to the players console\n\t\t\teventDispatcher.BroadCastMessage(gameStatus);\n\n\t\t\t// this handles the condition when game is over\n\t\t\tif (gameOver == true) {\n\t\t\t\teventDispatcher.ClearHandlers();\n\t\t\t}\n\t\t}\n\t}",
"private void init() {\n\r\n\t\tmyTerminal.inputSource.addUserInputEventListener(this);\r\n//\t\ttextSource.addUserInputEventListener(this);\r\n\r\n\t}",
"void onNewMessage(String message);",
"@Override\n\tpublic void onMessage(Object arg0) {\n\t\t\n\t}",
"void onMessage(String message) throws IOException;",
"public void onMessage(Message arg0) {\n\r\n\t}",
"void onMessageReceived(Message message);",
"@Override\n\tpublic void StartListening()\n\t{\n\t\t\n\t}",
"@Override\n\tpublic void run() {\n\t\tregisterTab(\"chat\");\n\t\tregisterListener(\"COMMAND\");\n\t}",
"@Override\n public void handleTextMessage(WebSocketSession session, TextMessage message) throws IOException {\n// \tlogger.info(\"Server received text: {}\", message.getPayload());\n \tMessage msg = messageEncoderDecoder.deserialize(message.getPayload(), Message.class);\n\t\tlogger.info(\"Message received: {}\", msg.getClass().getSimpleName());\n\n \tif (msg instanceof MapCreateRequested)\n \t{\n \t\tlogger.info(\"MapCreateRequested received!\");\n \t\tmaps.registerNewMap(new WebSocketClient(session), \"initName\");\n \t}\n \telse if (msg instanceof GenericMapUpdateRequested)\n \t{\n \t\tlogger.info(\"MapUpdateRequested received!\");\n \t\tGenericMapUpdateRequested msgMapUpdateRequested = (GenericMapUpdateRequested)msg;\n \t\tGenericUpdateBlockCompleted updateBlockCompleted = msgMapUpdateRequested.update();\n\n \t\tmaps.processMapUpdates(new WebSocketClient(session), updateBlockCompleted);\n \t}\n }",
"public void onMessage(String message) {\n\t\t\n\t}",
"@Override\n\tpublic void textReceived(LinphoneCore lc, LinphoneChatRoom cr,\n\t\t\tLinphoneAddress from, String message) {\n\t\t\n\t}",
"void setupExternalMessages();",
"@Override\n public void onTextMessage(ReceivedTextMessage message) {\n //ignore the message\n }",
"@Override\n\t\t\tpublic void onMessage(Message message) {\n\t\t\t\tTextMessage msg = null;\n\t\t\t\t\n\t\t\t\tif(message instanceof TextMessage){\n\t\t\t\t\tmsg = (TextMessage)message;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Consumer:->Receiving message: \"+ msg.getText());\n\t\t\t\t\t} catch (JMSException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tSystem.out.println(\"Message of wrong type: \"+message.getClass().getName());\n\t\t\t\t}\n\t\t\t}",
"public void speakOut(final String text){\n\t\tif (listener != null){\n\t\t\thandler.post(new Runnable() {\n\t\t\t\t\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlistener.speakOut(text.trim());\t\t\t\t\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}",
"@Override\n\t\tpublic void onMessage(Message message) {\n\t\t\tTextMessage msg = null;\n\t\t\t\n\t\t\tif(message instanceof TextMessage){\n\t\t\t\tmsg = (TextMessage)message;\n\t\t\t\ttry {\n\t\t\t\t\tSystem.out.println(\"Consumer:->Receiving message: \"+ msg.getText());\n\t\t\t\t} catch (JMSException e) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.println(\"Message of wrong type: \"+message.getClass().getName());\n\t\t\t}\n\t\t}",
"public interface MessageReceivedListener {\n\t\n\t/**\n\t * Called when new command/message received\n\t * @param msg Command/message as String\n\t */\n\tpublic void OnMessageReceived(String msg);\n\t\n\t/**\n\t * Called when new file is incoming.\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileIncoming(int length);\n\t\n\t/**\n\t * Called when more data of a file has been transfered\n\t * @param data Byte array of data received\n\t * @param read The lenght of the data received as int\n\t * @param length Total length of data expected to be received\n\t * @param downloaded Total length of data actually received so far\n\t */\n\tpublic void OnFileDataReceived(byte[] data,int read, int length, int downloaded);\n\t\n\t/**\n\t * Called when file transfer is complete\n\t * @param got\n\t * @param expected\n\t */\n\tpublic void OnFileComplete();\n\t\n\t/**\n\t * Called when an error occur\n\t */\n\tpublic void OnConnectionError();\n\t\n\t/**\n\t * Called when socket has connected to the server\n\t */\n\tpublic void OnConnectSuccess();\n}",
"private void createAndListen() {\n\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onEmsgOpenedListener() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void addMessageReceivedListener(MessageReceivedListener messageReceivedListener) {\n\n\t}",
"private void listenToTextChanges(boolean listen) {\n \t\tif (listen) {\n \t\t\tif (fDocumentListener == null && fDocument != null) {\n \t\t\t\tfDocumentListener= new DocumentListener();\n \t\t\t\tfDocument.addDocumentListener(fDocumentListener);\n \t\t\t}\n \t\t} else if (!listen) {\n \t\t\tif (fDocumentListener != null && fDocument != null) {\n \t\t\t\tfDocument.removeDocumentListener(fDocumentListener);\n \t\t\t\tfDocumentListener= null;\n \t\t\t}\n \t\t}\n \t}",
"private void listen() {\n try {\n this.console.println(MapControl.checkListen(FireSwamp.getPlayer().getPlayerPosition(),\n FireSwamp.getCurrentGame().getGameMap()));\n } catch (MapControlException ex) {\n Logger.getLogger(GameMenuView.class.getName()).log(Level.SEVERE, null, ex);\n }\n }",
"public Server () {\n\t\t\n\t\tsuper(\"The best messager ever! \");\n\t\t//This sets the title. (Super - JFrame).\n\t\t\n\t\tuserText = new JTextField();\n\t\tuserText.setEditable(false);\n\t\tuserText.addActionListener(\n\t\t\t\tnew ActionListener() {\n\t\t\t\t\t\n\t\t\t\t\tpublic void actionPerformed(ActionEvent event) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tsendMessage(event.getActionCommand());\n\t\t\t\t\t\t//This returns whatever event was performed in the text field i.e the text typed in.\n\t\t\t\t\t\tuserText.setText(\"\");\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t);\n\t\t\n\t\tadd(userText,BorderLayout.NORTH);\n\t\tchatWindow = new JTextArea();\n\t\tadd(new JScrollPane (chatWindow));\n\t\tsetSize(800,600);\n\t\tsetVisible(true);\n\t\t\n\t\t\n\t\n\t\n\t}",
"private void setListener() {\n\t}",
"private void initListener() {\n }",
"@OnWebSocketMessage\n public void onText(Session session, String message) throws IOException {\n for (ClientListener listener : listeners)\n listener.onMessage(message);\n }",
"public void run() \n { \n String message; // String for incoming messages\n \n // listen for messages until stopped\n while ( keepListening ) \n { \n try \n { \n message = input.readLine(); // read message from client\n } // end try\n catch ( SocketTimeoutException socketTimeoutException ) \n {\n continue; // continue to next iteration to keep listening\n } // end catch\n catch ( IOException ioException ) \n {\n ioException.printStackTrace(); \n break;\n } // end catch\n\n // ensure non-null message\n if ( message != null ) \n {\n // tokenize message to retrieve user name and message body\n StringTokenizer tokenizer = new StringTokenizer( \n message, MESSAGE_SEPARATOR );\n\n // ignore messages that do not contain a user\n // name and message body\n if ( tokenizer.countTokens() == 2 ) \n {\n // send message to MessageListener\n messageListener.messageReceived( \n tokenizer.nextToken(), // user name\n tokenizer.nextToken() ); // message body\n } // end if\n else\n {\n // if disconnect message received, stop listening\n if ( message.equalsIgnoreCase(\n MESSAGE_SEPARATOR + DISCONNECT_STRING ) ) \n stopListening();\n } // end else\n } // end if\n } // end while \n \n try\n { \n input.close(); // close BufferedReader (also closes Socket)\n } // end try\n catch ( IOException ioException ) \n {\n ioException.printStackTrace(); \n } // end catch \n }",
"public interface BreakingBadCharactersListener {\n\n void onStarted();\n}",
"public synchronized void listen() {\n// synchronized (this) {\n try {\n String input;\n if ((input = in.readLine()) != null) {\n parseCommand(input);\n }\n } catch (IOException ex) {\n Logger.getLogger(ClientIO.class.getName()).log(Level.SEVERE, null, ex);\n }\n// }\n }",
"@Override\n\tpublic void onChatReceived(ChatEvent arg0) {\n\t\t\n\t}",
"void onAnything(String unformatedMessage);",
"public void onMessage( javax.jms.Message aMessage)\n {\n try\n {\n // Cast the message as a text message.\n // Otherwise report that invalid message arrived.\n if (aMessage instanceof javax.jms.TextMessage)\n {\n \tjavax.jms.TextMessage textMessage = (javax.jms.TextMessage) aMessage;\n\n \t// This handler reads a single String from the\n \t// message and prints it to the standard output.\n \ttry\n \t{\n \tString string = textMessage.getText();\n \tSystem.out.println( string );\n \t\t}\n \tcatch (javax.jms.JMSException jmse)\n \t{\n \t jmse.printStackTrace();\n \t}\n \t}\n\t\t\telse\n\t\t\t{\n\t\t\t System.out.println (\"Warning: A message was discarded because it could not be processed \" +\n\t\t\t \"as a javax.jms.TextMessage.\");\n\t\t\t }\n\n }\n catch (java.lang.RuntimeException rte)\n {\n rte.printStackTrace();\n }\n }",
"public interface Listener {\n \n /** Fires as each character is received */\n void onCharacter(Terminal terminal, char data);\n \n /** Fires when new data is received\n * @param numChars the number of chars received. May be negative if more characters were deleted than added.\n * @param input the input received since the last EOL\n */\n void onInput(Terminal terminal, int numChars, String current);\n \n /** Fires when an EOL is received */\n void onLine(Terminal terminal, String line);\n }",
"@Override\n public void onMessage(WebSocket webSocket, String text) {\n Message msg=new Message();\n msg.what=0x666;\n msg.obj=text;\n handler.sendMessage(msg);\n }",
"void onListeningStarted();",
"@Override\n public void onMessageReceived(@NotNull MessageReceivedEvent event) {\n String message = event.getMessage().getContentRaw().toLowerCase();\n Commands commands = Main.getBOT().getCommands();\n\n // When message is intended for bob, check it\n if (message.startsWith(\"!bob\")) {\n commands.evaluateCommand(message.replace(\"!bob \", \"\"), event);\n } else if (message.contains(\"#blamekall\")) {\n event.getChannel().sendMessage(\"NO! BE NICE! GO TO NAUGHTY JAIL!\").queue();\n event.getChannel().sendMessage(\"https://tenor.com/view/bonk-gif-18805247\").queue();\n }\n\n }",
"public interface OnJokeReceivedListener\n{\n void onJokeReceived(String joke);\n}",
"private void handleTextContent(String replyToken, Event event, TextMessageContent content)\n throws Exception {\n\t\t\n\t\tString text = content.getText();\n\n\t\tMessage response;\n\t\tList<Message> messages = new ArrayList<Message>();\n\t\tlog.info(\"Got text message from {}: {}\", replyToken, text);\n\t\t\n\t\tListSingleton singleton = ListSingleton.getInstance();\n\t\tindex = singleton.initiate(event.getSource().getUserId());\n\t\tcategories = singleton.getCategories();\n\t\tprofile = singleton.getProfile();\n\t\tmenu = singleton.getMenu();\n\t\t\n//\t\tint index = -1;\n//\t\tfor(int i=0;i<userList.size();i++) {\n//\t\t\tif(userList.get(i).equals(event.getSource().getUserId())) {\n//\t\t\t\tindex = i;\n//\t\t\t\tbreak;\n//\t\t\t}\n//\t\t}\n//\t\tif(index == -1) {\n//\t\t\tcategories = null;\n//\t\t\tprofile = null;\n//\t\t\tmenu = null;\n//\t\t\tindex = userList.size();\n//\t\t\tuserList.add(event.getSource().getUserId());\n//\t\t\tcatList.add(categories);\n//\t\t\tprofList.add(profile);\n//\t\t\tmenuList.add(menu);\n//\t\t}\n//\t\telse {\n//\t\t\tcategories = catList.get(index);\n//\t\t\tprofile = profList.get(index);\n//\t\t\tmenu = menuList.get(index);\n//\t\t}\n\t\t\n\t\tif (categories == null) {\t\t\n\t\t\tuser.addUser(event.getSource().getUserId());\n\t\t\tmessages.add(mainMenuMessage);\n\t\t\tmessages.add(getMenuTemplate());\n\t\t\tthis.reply(replyToken, messages); \n\t\t\tcategories = Categories.MAIN_MENU;\n\t\t}\n\t\telse {\n\t\t\tswitch (categories) {\n\t\t \t\tcase MAIN_MENU:\n\t\t \t\t\tresponse = new TextMessage(handleMainMenu(text, event));\n\t\t \t\t\tmessages.add(response);\n\t\t \t\t\tif (categories == Categories.MAIN_MENU) {\n\t\t \t\t\t\tmessages.add(getMenuTemplate());\n\t\t \t\t\t}\n\t\t \t\t\tthis.reply(replyToken, messages);\n\t\t \t\t\tbreak;\n\t\t \t\tcase PROFILE:\n\t\t \t\t\tString responseText = handleProfile(replyToken, text, event);\n\t\t \t\t\tif(!responseText.equals(\"\")) {\n\t\t\t \t\t\tresponse = new TextMessage(responseText);\n\t\t\t \t\t\tmessages.add(response);\n\t\t \t\t\t}\n\t\t \t\t\tif (categories == Categories.MAIN_MENU) {\n\t\t \t\t\t\tmessages.add(getMenuTemplate());\n\t\t \t\t\t}\n\t\t \t\t\tif(messages.size()!=0) {\n\t\t\t \t\t\tthis.reply(replyToken, messages);\n\t\t \t\t\t}\n\t\t \t\t\tbreak;\n\t\t \t\tcase FOOD:\n\t\t \t\t\tresponse = new TextMessage(handleFood(text));\n\t\t \t\t\tmessages.add(response);\n\t\t \t\t\tif (categories == Categories.MAIN_MENU) {\n\t\t \t\t\t\tmessages.add(getMenuTemplate());\n\t\t \t\t\t}\n\t\t \t\t\tthis.reply(replyToken, messages);\t \t\t\t\n\t\t \t\t\tbreak;\n\t\t \t\tcase MENU:\n\t\t \t\t\tresponse = new TextMessage(handleMenu(text, event));\n\t\t \t\t\tmessages.add(response);\n\t\t \t\t\tif (categories == Categories.MAIN_MENU) {\n\t\t \t\t\t\tmessages.add(getMenuTemplate());\n\t\t \t\t\t}\n\t\t \t\t\tthis.reply(replyToken, messages);\n\t\t \t\t\tbreak;\n\t\t \t\tcase CODE:\n\t\t \t\t\tString res = handleCode(text, event);\n\t\t \t\t\tbreak; \n\t\t \t\tcase CAMPAIGN:\n\t\t \t\t\tthis.replyText(replyToken, \"Please upload the coupon image.\");\n\t\t \t\t\tbreak;\n\t\t \t\tcase INIT:\n\t\t \t\t\tthis.handleInit();\n\t\t \t\t\tthis.replyText(replyToken, \"Database initialized.\");\n\t\t \t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsingleton.setValues(index, categories, profile, menu);\n }",
"@Override\n\tprotected void setListener() {\n\n\t}",
"@Override\n\tprotected void setListener() {\n\n\t}",
"@JmsListener(destination = \"mailbox-destination\", containerFactory = \"myJmsContainerFactory\")\n public void receiveTextMessage(String message) {\n System.out.println(\"Received <\" + message + \">\");\n }",
"@Override\n\tpublic void addTextProcessListener(TextProcessStatusListener listener) {\n\n\t\tlisteners.add(TextProcessStatusListener.class, listener);\n\t}",
"private DefaultListener() {\n }",
"protected void messageList() {\r\n\t\tif (smscListener != null) {\r\n\t\t\tmessageStore.print();\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"You must start listener first.\");\r\n\t\t}\r\n\t}",
"public interface OnAboutForMeMessageUpdateListener {\r\n void onAboutForMeMessage(String text);\r\n}",
"@Override\n public void handleTextMessage(WebSocketSession session, TextMessage message) throws IOException{\n Map data = new Gson().fromJson(message.getPayload(),Map.class);\n\n // see what type of message\n final String type = getValueFromMessage(message,\"type\");\n\n switch (type){\n case \"name\":\n // payload from frontend\n String username = getValueFromMessage(message,\"payload\");\n\n log.info(\"receive name: \"+ username);\n\n // build message to json\n TextMessage retJson = setJson(\"name\", \"Hi, \"+username);\n\n session.sendMessage(retJson);\n }\n }",
"private void receiveMessage(int index, String from, String text) {\n\t\tchathistory[index].append(\"\\n\" + from + \": \" + text);\n\n\t\t/* keep the text bar 'autoscrolling' */\n\t\tStyledTextContent doc = chathistory[index].getContent();\n\t\tint docLength = doc.getCharCount();\n\t\tif (docLength > 0) {\n\t\t\tchathistory[index].setCaretOffset(docLength);\n\t\t\tchathistory[index].showSelection();\n\t\t}\n\n\t}",
"@Override\n\tpublic void onMessage(CommandMessage msg) {\n\t}",
"private void notifyOnTextReceived(String message) {\n synchronized (globalLock) {\n if (isRunning) {\n onTextReceived(message);\n }\n }\n }",
"@Override\n\tpublic void onMessageRecieved(Message arg0) {\n\t\t\n\t}",
"void pharmacyListener(){\n \n }",
"public interface TypingListener {\n void onTyping(String roomId, String user, Boolean istyping);\n}",
"@Override\n\tpublic void setListener() {\n\n\t}",
"public TextDecoder(){\n messages = new TextMessage[10];\n msgCount = 0;\n }",
"@Override\r\n\tprotected void onGuiEvent(GuiEvent arg0) {\n\t\taddBehaviour(new SendMessage());\r\n\r\n\t}",
"public void onMessage(String message) {\n\t\t\t\t\tCometMessage msg = deserializeMessage(message);\n\t\t\t\t\tif(msg != null)\n\t\t\t\t\t\tlistener.onMessage(msg);\n\t\t\t\t}",
"public MyListener() {\r\n }",
"@OnWebSocketMessage\n\tpublic void onText(Session session, String message) throws IOException {\n\t\tif (onMessageEvent != null) {\n\t\t\ttry {\n\t\t\t\tonMessageEvent.invoke(parent, message);\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.err\n\t\t\t\t\t\t.println(\"Disabling webSocketEvent() because of an error.\");\n\t\t\t\te.printStackTrace();\n\t\t\t\tonMessageEvent = null;\n\t\t\t}\n\t\t}\n\t}",
"@Override\n public void userStartedTyping(){\n }",
"public interface OnMessageReceived {\n public void messageReceived(String message);\n }",
"public TextFileEvent()\n\t{}",
"public void processMessage()\n {\n \tif(messageContents.getMessage().containsCommand())\n {\n \tCommand command = new Command(messageContents);\n CommandProcessor commandProcessor = new CommandProcessor(joeBot, command);\n commandProcessor.processCommand();\n }\n else\n {\n Speech speech = new Speech(messageContents);\n SpeechProcessor speechProcessor = new SpeechProcessor(joeBot, speech);\n speechProcessor.processSpeech();\n }\n }",
"public interface OnMessageReceived {\n void messageReceived(String message);\n }",
"protected void handleMessage(Message msg) {}",
"public interface OnChatListener {\n void onSendMessage(Bundle b);\n }",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"@Override\r\n\tpublic void setListener() {\n\r\n\t}",
"@Override\n public void run() {\n Message message = new Message();\n message.what=1;\n handler.sendMessage(message);\n }",
"@Override\r\n\tprotected void listeners() {\n\t\t\r\n\t}",
"public void run() {\n\n\t\tinitListen(new OnReceivedListener() {\n\t\t\t@Override\n\t\t\tpublic void onReceived() throws Exception {\n\n\t\t\t\tmSocket.receive(new DatagramPacket(mQuickBuffer, mQuickBuffer.length));\n\t\t\t\tPacket packet = (Packet) deserialization(mQuickBuffer);\n\t\t\t\tif (packet.isAck()) {\n\t\t\t\t\tSR.updateBufferSlotTimerSender(packet.getSeq(), BufferSlotTimer.ACKED);\n\t\t\t\t\tSR.output.append(\"(S) - Acknowledgment for Packet \" + packet.getSeq() + \" has been Received \\n\");\n\t\t\t\t\tSR.updateBaseSnd();\n\t\t\t\t\tSR.getBufferSlotTimerSender(packet.getSeq()).stopTimerTimeout();\n\t\t\t\t\tSR.output.append(\"(S) - Timer for Packet \" + packet.getSeq() + \" has been stopped \\n\");\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t}",
"private void listen() {\n //Grap port/ip from UI\n String ip = m_ipField.getText().trim();\n try {\n ip = InetAddress.getByName(ip).getHostAddress(); //Validate IP Address\n } catch (UnknownHostException ex) {\n Logger.getLogger(StreamRecorderDisplay.class.getName()).log(Level.SEVERE, \"Poorly formatted IP Address: \" + m_ipField.getText(), ex);\n }\n int port = Integer.valueOf(m_portField.getText().trim());\n\n //Start detector\n m_dataDetector = new MulticastDataDetector(ip, port);\n m_dataDetector.addMulticastDataDetectionListener(this);\n new Thread(m_dataDetector).start();\n }",
"public void listener() {\n\t\tif (this.command.getMode().equals(Command.MODE_TRACK)) {\n\t\t\tFilterQuery filterQuery = new FilterQuery();\n\t\t\tfilterQuery.track(this.command.getKeywords().toArray(new String[this.command.getKeywords().size()]));\n\t\t\ttwitterStream.addListener(myListener);\n\t\t\ttwitterStream.filter(filterQuery);\n\t\t} else if (this.command.getMode().equals(Command.MODE_SAMPLE)) {\n\t\t\ttwitterStream.addListener(myListener);\n\t\t\ttwitterStream.sample();\n\t\t} else {\n\t\t\t// do search\n\t\t}\n\t}",
"public TcpClient(OnMessageReceived listener) {\n\n messageListener = listener;\n }",
"public void textReceived(String receivedText) throws SkypeException {\r\n }",
"public void initListener() {\n }",
"@Override\n public void userStoppedTyping(){\n }",
"@Override\r\n public void handleMessage(Message msg) {\n }",
"private void initMsgs() {\n }",
"private void initMsgs() {\n }",
"void addListener(BotListener l);",
"public void startListening();",
"@Override\n\tprotected void initListener() {\n\n\t}",
"public MessageHandler() {\n }",
"public void onMessage(Session session);",
"public interface OnMessageReceived {\n\t\tpublic void messageReceived(String message);\n\t}",
"@Override\n public void handleMessage(Message message) {}",
"public interface theListener {\n public void itemToSend(String s);\n }",
"@Override\n\tpublic void onMessage(Message m) {\n\t\t\t\ttry {\n\n\t\t\t\t\tTextMessage ms = (TextMessage) m;\n\n\t\t\t\t\tString linea = ms.getText();\n\n\t\t\t\t\tString args[] = linea.split(\" - \");\n\n\t\t\t\t\tif (args[0].equals(\"consulta2\")) {\n\t\t\t\t\t\t// Ver envios del usuario\n\t\t\t\t\t\tif (args[1].equals(\"1\")) {\t\t\t\t\t\n\t\t\t\t\t\t\t//registrarPedido(args[2], args[3], args[4], args[5]);\n\t\t\t\t\t\t}else if (args[1].equals(\"2\")) {\n\t\t\t\t\t\t\t//cambiarEstado(args[2], args[3]);\n\t\t\t\t\t\t}else if (args[1].equals(\"3\")) {\n\t\t\t\t\t\t\t//ArrayList<String> ejecuciones = consultarEjecucionDeEtapas(args[2], args[3], args[4]);\n\t\t\t\t\t\t\t//responderConEjecucionesDeEtapas(ejecuciones);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if (args[0].equals(\"respuesta2\")) {\n\t\t\t\t\t\t// Ver envios del usuario\n\n\t\t\t\t\t\tif ( args[1].equals(\"1\") || args[1].equals(\"2\") ) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}else if( args[1].equals(\"3\") ){\n\t\t\t\t\t\t\tString[] data = linea.substring( 16, ( linea.length() - 1 ) ).split(\"-\");\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tArrayList<String> ejec = new ArrayList<String>();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tfor (int i = 0; i < data.length; i++) {\n\t\t\t\t\t\t\t\tString data0 = data[i];\n\t\t\t\t\t\t\t\tejec.add(data0);\n\t\t\t\t\t\t\t\t\n//\t\t\t\t\t\t\t\t//Numero del Pedido\n//\t\t\t\t\t\t\t\tString numPedido = data0[0];\n//\t\t\t\t\t\t\t\t//Codigo de la EstaciÛn\n//\t\t\t\t\t\t\t\tString codEstacion = data0[1];\n//\t\t\t\t\t\t\t\t//Numero de ejecuciones\n//\t\t\t\t\t\t\t\tString numEjecuciones = data0[2];\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tlisten();\n\t\t\t\t}",
"public void setMessageListener(BeaterMessageListener l) {\n\t\tthis.listener = l;\n\t}",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.handleMessageEvent(e);\n }",
"public void handleMessageEvent(StunMessageEvent e) {\n delegate.handleMessageEvent(e);\n }",
"private void messageHandler(String read){\n\n try {\n buffer.append(read);\n }catch (MalformedMessageException e){\n System.out.println(\"[CLIENT] The message received is not in XML format.\");\n }\n\n while(!buffer.isEmpty()) {\n if (buffer.getPong()) pong = true;\n else if (buffer.getPing()) send(\"<pong/>\");\n else {\n try {\n clientController.onReceivedMessage(buffer.get());\n } catch (EmptyBufferException e) {\n System.out.println(\"[CLIENT] The buffer is empty!\");\n }\n }\n }\n\n }",
"protected void registerListener() {\r\n\t\t// do nothing\r\n\t}"
] | [
"0.68550736",
"0.67663634",
"0.62289625",
"0.6180865",
"0.6155658",
"0.608958",
"0.60203886",
"0.5996089",
"0.59704673",
"0.5927382",
"0.5909344",
"0.5873979",
"0.586534",
"0.5860572",
"0.5851081",
"0.5847136",
"0.5840751",
"0.5827843",
"0.5805046",
"0.5803168",
"0.5787896",
"0.57783043",
"0.5768075",
"0.5726247",
"0.5707087",
"0.5695207",
"0.5675507",
"0.56658745",
"0.56529886",
"0.5652705",
"0.5640025",
"0.56179553",
"0.56070393",
"0.5603734",
"0.5595636",
"0.55941635",
"0.5580093",
"0.55793303",
"0.55792254",
"0.55769247",
"0.5564369",
"0.5564",
"0.55384165",
"0.5530938",
"0.5528769",
"0.55104476",
"0.55104476",
"0.54993695",
"0.5489289",
"0.5472543",
"0.5471188",
"0.5448613",
"0.54483205",
"0.54442227",
"0.5439828",
"0.54312575",
"0.5421115",
"0.54201967",
"0.54196554",
"0.54187214",
"0.5417799",
"0.5416682",
"0.5414841",
"0.54137635",
"0.5412289",
"0.5411139",
"0.5410928",
"0.5408914",
"0.53959626",
"0.53953373",
"0.53924966",
"0.5387125",
"0.53857976",
"0.53857976",
"0.53732413",
"0.5368139",
"0.5360532",
"0.53601295",
"0.5359937",
"0.5357714",
"0.5353377",
"0.53524023",
"0.5352292",
"0.53510416",
"0.5349591",
"0.5349591",
"0.53462833",
"0.5339961",
"0.5333493",
"0.53320223",
"0.5328437",
"0.53268456",
"0.53249747",
"0.5322622",
"0.53219515",
"0.53145206",
"0.5309468",
"0.5308096",
"0.5308096",
"0.5307331",
"0.52891314"
] | 0.0 | -1 |
link "seekbar" with seek bar change listener | public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {
textViewDelay.setText("Delay: " + progress + " seconds"); //update "progress" value and pass it to textview
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void updateSeekbar(int position, int duration);",
"public interface SeekBarValueChangeListener {\n\n void valueChanged(int val);\n}",
"public void seekBarListener() {\n seekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n int progressChangedValue = 0;\n\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n progressChangedValue = progress;\n }\n\n public void onStartTrackingTouch(SeekBar seekBar) {\n // TODO Auto-generated method stub\n }\n\n public void onStopTrackingTouch(SeekBar seekBar) {\n progressTextView.setText(\"Your current progress is \" + progressChangedValue);\n Toast.makeText(MainActivity.this, \"Seek bar progress is :\" + progressChangedValue,\n Toast.LENGTH_SHORT).show();\n }\n });\n }",
"private void setSeekbarListener(){\n mTempSeekbar.setOnSeekBarChangeListener(new SeekBar.OnSeekBarChangeListener() {\n\n @Override\n public void onStopTrackingTouch(SeekBar seekBar) { }\n\n @Override\n public void onStartTrackingTouch(SeekBar seekBar) { }\n\n @Override\n public void onProgressChanged(SeekBar seekBar, int progress,boolean fromUser) {\n if(progress<=100 && progress>=0){\n // change display temp based on seekbar progress and update the view\n display_temp = Tools.roundToHalf((32-9)*progress/100.0+9);\n Log.v(TAG, \"onProgressChanged: temp:\"+display_temp+\"seekbar progress=\"+progress);\n updateControlView();\n // update the mercury of the thermometer\n ClipDrawable mMercuryClip = (ClipDrawable) mMercuryImg.getDrawable();\n mMercuryClip.setLevel(progress*100);\n }\n }\n });\n }",
"private void changeSeekbar() {\n\n seekbar.setProgress(mediaPlayer.getCurrentPosition());\n\n if(mediaPlayer.isPlaying())\n {\n runnable=new Runnable() {\n @Override\n public void run() {\n changeSeekbar();\n }\n };\n handler.postDelayed(runnable,1000);\n }\n\n }",
"private void seekChange(View v){\n \t//if(mediaPlayer.isPlaying()){\n\t \tSeekBar sb = (SeekBar)v;\n\t\t\tmediaPlayer.seekTo(sb.getProgress());\n\t\t//}\n }",
"public void onProgressChanged(SeekBar arg0, int progress, boolean fromUser) {\n }",
"void onStartTrackingTouch(SeekBar seekBar);",
"@Override\n public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {\n\n }",
"@Override\n\tpublic void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {\n\n\t}",
"public interface OnProgressChangedListener {\n void onProgressChanged(RoundSeekBar roundSeekBar, float progress);\n\n void onStartTrackingTouch(RoundSeekBar roundSeekBar);\n\n void onStopTrackingTouch(RoundSeekBar roundSeekBar);\n}",
"public void stateChanged(ChangeEvent evt){player.seek(slider.getValue());}",
"@Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\n }",
"private void setSeekBarListener() {\n\t\tseekBar.setOnSeekBarChangeListener(new OnSeekBarChangeListener(){\n\t\t\tint progress = 0;\n\n\t\t\t/**\n\t\t\t * When the SeekBar's progress changes, log it and print a Toast saying that the progress changed.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progressValue, boolean fromUser){\n\t\t\t\tprogress = progressValue;\n\t\t\t\ttextView.setText(\"Skill Level: \" + progress + \"/\" + seekBar.getMax());\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * When the user touches the SeekBar, print a Toast.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar){\n\t\t\t\t// do nothing\n\t\t\t}\n\n\t\t\t/**\n\t\t\t * When the user stops touching the SeekBar, change the text above it to show the selected value.\n\t\t\t */\n\t\t\t@Override\n\t\t\tpublic void onStopTrackingTouch(SeekBar seekBar){\n\t\t\t\tLog.v(LOG_TAG, \"Selected skill level \" + progress);\n\t\t\t}\n\t\t});\n\t}",
"@Override\n\tpublic void staticByActivityListener() {\n\t\tsb.setOnSeekBarChangeListener(this);\n\t}",
"public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"public void onStartTrackingTouch(SeekBar seekBar) {\n\n }",
"@Override\r\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\r\n\r\n }",
"@Override\n public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {\n if (arg0 == _seekBarSpeed) {\n double inc = ((double)arg1*2)/100;\n NotifyTimeDeltaChanged(inc);\n _textSpeed.setText(String.format(\"%.2f\", inc));\n } else {\n if (arg0 == _seekBarArgs[0]) {\n NotifyParameterChanged(0, arg1);\n _textArgs[0].setText(String.format(\"%d\", arg1));\n } else if (arg0 == _seekBarArgs[1]) {\n NotifyParameterChanged(1, arg1);\n _textArgs[1].setText(String.format(\"%d\", arg1));\n } else if (arg0 == _seekBarArgs[2]) {\n NotifyParameterChanged(2, arg1);\n _textArgs[2].setText(String.format(\"%d\", arg1));\n }\n }\n }",
"public void seek_callback(int drive, int physical_track);",
"public interface OnCircularSeekBarChangeListener {\r\n\r\n\t\tpublic abstract void onProgressChanged(CircularSeekBar circularSeekBar, int progress, boolean fromUser);\r\n\r\n\t\tpublic abstract void onStopTrackingTouch(CircularSeekBar seekBar);\r\n\r\n\t\tpublic abstract void onStartTrackingTouch(CircularSeekBar seekBar);\r\n\t}",
"@Override\n public void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n if (!fromUser)\n return;\n String tag = (String) seekBar.getTag();\n switch (tag) {\n case \"frames\":\n //Log.v(\"RenderSettings\", \"frames seekbar changed\");\n setFrames(seekBar.getProgress() + 2);\n break;\n case \"a\":\n //Log.v(\"RenderSettings\", \"'a' seekbar changed\");\n setA((seekBar.getProgress() + 1) / 1000.0f);\n break;\n case \"b\":\n //Log.v(\"RenderSettings\", \"'b' seekbar changed\");\n setB(seekBar.getProgress() / 100.0f + 1.0f);\n break;\n case \"P\":\n //Log.v(\"RenderSettings\", \"'P' seekbar changed\");\n setP(seekBar.getProgress() / 100.0f);\n break;\n default:\n Log.v(\"RenderSettings\", \"unknown seekbar changed.\");\n break;\n }\n }",
"@Override\r\n\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\tUtils.printLog(TAG, \"SeekBarListener onProgressChanged progress =\" + progress + \" fromUser =\" + fromUser);\r\n\t\t\tif (fromUser) {\r\n\r\n\t\t\t\tif (sEndTime > 0) {\r\n\t\t\t\t\tfinal long time = progress * (long) sEndTime / Utils.SeekBarLength;\r\n\t\t\t\t\tUtils.printLog(TAG, \"SeekBarListener mseekbariwidth=\" + mPlayerSeekar.getWidth() + \" onProgressChanged sEndTime =\" + sEndTime + \" time =\" + time);\r\n\t\t\t\t\tnew Thread(new Runnable() {\r\n\r\n\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\tpublic void run() {\r\n\t\t\t\t\t\t\t// TODO Auto-generated method stub\r\n\t\t\t\t\t\t\tmVideoContrl.seekTo((int) time);\r\n\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}).start();\r\n\t\t\t\t\tlong xoff = (mPlayerSeekar.getWidth() - Utils.SeekBarThumbLength) * (long) progress / Utils.SeekBarLength;\r\n\t\t\t\t\tseekBarPopWindow.showText(mPlayerSeekar, Utils.getTimeShort((int) time), (int) xoff, -22);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tmPlayerSeekar.setProgress(0);\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t}",
"public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"public void setOnSeekChangeListener(OnSeekChangeListener listener) {\n this.mSeekChangeListener = listener;\n }",
"@Override\n\t\t\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress, boolean fromUser) {\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\t\t\t\t\tpublic void onProgressChanged(SeekBar seekBar,\n\t\t\t\t\t\t\tint progress, boolean fromUser) {\n\t\t\t\t\t}",
"@Override\n\tpublic void onBufferingUpdate(MediaPlayer mp, int percent) {\n\t\tseekBarProgress.setSecondaryProgress(percent);\n\t}",
"private void primarySeekBarProgressUpdater() {\n \tseekBarProgress.setProgress((int)(((float)mediaPlayer.getCurrentPosition()/mediaFileLengthInMilliseconds)*100)); // This math construction give a percentage of \"was playing\"/\"song length\"\n\t\tif (mediaPlayer.isPlaying()) {\n\t\t\tRunnable notification = new Runnable() {\n\t\t public void run() {\n\t\t \tprimarySeekBarProgressUpdater();\n\t\t\t\t}\n\t\t };\n\t\t handler.postDelayed(notification,1000);\n \t}\n }",
"@Override\n public void onStartTrackingTouch(SeekBar arg0) {\n mp.seekTo(seek.getProgress());\n }",
"void onColorChanged(SeekBar seekBar, int color, boolean b);",
"@Override\r\n public void onStartTrackingTouch(SeekBar seekBar) {\n\r\n }",
"@Override\r\n public void onStartTrackingTouch(SeekBar seekBar) {\n\r\n }",
"@Override\r\n public void onStartTrackingTouch(SeekBar seekBar) {\n\r\n }",
"@Override\r\n public void onStartTrackingTouch(SeekBar seekBar) {\n\r\n }",
"@Override\r\n public void onStartTrackingTouch(SeekBar seekBar) {\n\r\n }",
"@Override\r\n public void onStartTrackingTouch(SeekBar seekBar) {\n\r\n }",
"@Override\r\n public void onStartTrackingTouch(SeekBar seekBar) {\n\r\n }",
"public void setseekbars()\n {\n red.setProgress(SV.getRed(selected));\n blue.setProgress(SV.getBlue(selected));\n green.setProgress(SV.getGreen(selected));\n }",
"@Override\r\n\t\t\t\t\t\t\t\tpublic void onStartTrackingTouch(SeekBar arg0) {\n\r\n\t\t\t\t\t\t\t\t}",
"@Override\n\tpublic void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {\n\t\tswitch (arg0.getId()) {\n\t\tcase R.id.sb_light:\n\t\t\tSystem.putInt(context.getContentResolver(),\n\t\t\t\t\tSystem.SCREEN_BRIGHTNESS, \n\t\t\t\t\targ1);\n\t\t\tbreak;\n\t\t//设置音量\n\t\tcase R.id.sb_sound:\n\t\t\tif(arg1 != system_sound){\n\t\t\t\taudio.setStreamVolume(AudioManager.STREAM_SYSTEM, arg1, AudioManager.FLAG_PLAY_SOUND);\n\t\t\t\tsystem_sound = arg1;\n\t\t\t}\n\t\t\tFyLog.d(TAG, \"the sound is: \" + arg1);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t}",
"public void onStartTrackingTouch(SeekBar seekBar) {\n\t}",
"public void onStartTrackingTouch(SeekBar seekBar) {\n\t}",
"@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress,\n\t\t\t\t\tboolean fromUser) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onProgressChanged(SeekBar bar, int progress, boolean fromuser) {\n mProgress = progress;\n mSeekBarFromUser = fromuser;\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\r\n\tpublic void seekableChanged(MediaPlayer mediaPlayer, int newSeekable)\r\n\t{\n\r\n\t}",
"@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }",
"private void primarySeekBarProgressUpdater() {\n seekBarProgress.setProgress((int) (((float) mediaPlayer.getCurrentPosition() / mediaFileLengthInMilliseconds) * 100)); // This math construction give a percentage of \"was playing\"/\"song length\"\n if (mediaPlayer.isPlaying()) {\n Runnable notification = new Runnable() {\n public void run() {\n primarySeekBarProgressUpdater();\n }\n };\n handler.postDelayed(notification, 1000);\n }\n }",
"@Override\n \t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n \n \t\t\t}",
"@Override\n\tpublic void onStartTrackingTouch(SeekBar arg0) {\n\n\t}",
"public void onStartTrackingTouch(SeekBar arg0) {\n\r\n\t\t\t}",
"@Override\n\t\t\t\t\t\t\tpublic void onStartTrackingTouch(SeekBar seekBar) {\n\n\t\t\t\t\t\t\t}",
"@Override\r\n\t\t\tpublic void onStartTrackingTouch(SeekBar arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onStartTrackingTouch(SeekBar arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void onStartTrackingTouch(SeekBar arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar)\n {\n }",
"@Override\n public void bindViewsListener() {\n seekbar.setOnSeekBarChangeListener(mOnSeekBarChangeListener);\n }",
"public interface solveProgress {\n\n public void updateProgress(SeekBar seekBar);\n}",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n \n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n \n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n \n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }",
"@Override\n \tpublic void onStartTrackingTouch(SeekBar seekBar)\n \t{\n \n \t}",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n\t\t\tpublic void onStartTrackingTouch(SeekBar arg0) {\n\n\t\t\t}",
"@Override\n public void onStartTrackingTouch(SeekBar arg0) {\n\n }",
"@Override\n\tpublic void onProgressChanged(SeekBar seekBar, int progress,\n\t\t\tboolean fromUser) {\n\n\t}",
"public void onStartTrackingTouch(SeekBar seekBar) {\n\t\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void onProgressChanged(SeekBar seekBar, int progress,\r\n\t\t\t\t\t\tboolean fromUser) {\n\t\t\t\t\td(\"gain bar progress changed to \" + progress);\r\n\t\t\t\t\talterGain(progress);\r\n\t\t\t\t}",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"public void onProgressChanged(SeekBar arg0, int arg1, boolean arg2) {\n\t\tint fProgress;\n\t\tfProgress = Math.round(arg1*180f/100f-90f);\n\t\tif (arg0.getId() == R.id.skPitch) {\n\t\t\tif( !bCalibrating && (rgCorrectionType.getCheckedRadioButtonId() == R.id.radio0))\n\t\t\t\tflPitch = fProgress;\n\t\t\tlblPitch.setText(\"Pitch: \" + String.valueOf(fProgress));\n\t\t}\n\t\tif (arg0.getId() == R.id.skRoll) {\n\t\t\tif( !bCalibrating && (rgCorrectionType.getCheckedRadioButtonId() == R.id.radio0))\n\t\t\t\tflRoll = fProgress;\n\t\t\tlblRoll.setText(\"Roll: \" + String.valueOf(fProgress));\n\t\t}\n\t}",
"public void onProgressChanged(SeekBar seekBar, int progress,\n\t\t\tboolean fromUser) {\n\t}",
"@Override\n public void onBufferingUpdate(MediaPlayer mp, int percent) {\n seekBarProgress.setSecondaryProgress(percent);\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n\n }",
"public interface OnRangeSeekBarChangeListener<T> {\n\n void onRangeSeekBarValuesChanged(TempRangeSeekBar<?> bar, T warnValue, T critValue);\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }",
"@Override\n public void onStartTrackingTouch(SeekBar seekBar) {\n }"
] | [
"0.7980733",
"0.76942885",
"0.769003",
"0.7640417",
"0.75451285",
"0.74989444",
"0.7479964",
"0.73666966",
"0.7353811",
"0.72812885",
"0.7254253",
"0.71433085",
"0.7093599",
"0.7071731",
"0.70561033",
"0.70181453",
"0.69695204",
"0.6945004",
"0.69419754",
"0.69154966",
"0.69002926",
"0.6893522",
"0.6887845",
"0.68715656",
"0.68715656",
"0.68715656",
"0.68715656",
"0.68715656",
"0.684923",
"0.68467456",
"0.68467456",
"0.68192625",
"0.68000036",
"0.6797913",
"0.6794318",
"0.67583656",
"0.6732079",
"0.6732079",
"0.6732079",
"0.6732079",
"0.6732079",
"0.6732079",
"0.6732079",
"0.67113173",
"0.6711178",
"0.67005",
"0.6695985",
"0.6695985",
"0.66802925",
"0.66802925",
"0.6677352",
"0.6674757",
"0.6668964",
"0.6668778",
"0.6668778",
"0.6664731",
"0.6664731",
"0.6664731",
"0.6661988",
"0.6656393",
"0.66449153",
"0.66402453",
"0.66382176",
"0.663326",
"0.663326",
"0.663326",
"0.6623045",
"0.662296",
"0.6620352",
"0.6617576",
"0.6617576",
"0.6617576",
"0.66146046",
"0.6609285",
"0.6603305",
"0.66022426",
"0.6580963",
"0.6577297",
"0.6575578",
"0.65739703",
"0.65622157",
"0.6558975",
"0.6548098",
"0.65266466",
"0.65249914",
"0.65249914",
"0.65076524",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463",
"0.65075463"
] | 0.0 | -1 |
TODO Autogenerated method stub | public void onStartTrackingTouch(SeekBar seekBar) {
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | public void onStopTrackingTouch(SeekBar seekBar) {
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Checking the value in our spinner | private void MonitorSpinner()
{
Spinner spinner = (Spinner) findViewById(R.id.spinnerMessageToSend);
try {
Field popup = Spinner.class.getDeclaredField("mPopup");
popup.setAccessible(true);
// Get private mPopup member variable and try cast to ListPopupWindow
android.widget.ListPopupWindow popupWindow = (android.widget.ListPopupWindow) popup.get(spinner);
// Set popupWindow height to 500px
popupWindow.setHeight(650);
}
catch (NoClassDefFoundError | ClassCastException | NoSuchFieldException | IllegalAccessException e) {
// silently fail...
}
final EditText message = (EditText) findViewById(R.id.editTextMessageToSend);
spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {
public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {
String item = adapterView.getItemAtPosition(i).toString();
// If we're not sending a custom message, we're not allowing the user
// to type anything into the editTextBox for custom message.
if (!item.equals("Custom"))
{
message.setEnabled(false);
}
else if (item.equals("Custom"))
{
message.setEnabled(true);
}
}
public void onNothingSelected(AdapterView<?> adapterView) {
return;
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private boolean hasSpinnerPrompt(String value) {\n if (value.contains(\"select\")) {\n return true;\n }\n return false;\n }",
"private void checkSpinnerText() {\n\n for (int i = 0; i < 8; i++) {\n\n // Opens the spinner\n onView(withId(R.id.notifyTime)).perform(click());\n String strToCheck = \"\";\n\n // Sets the proper string that will be checked, depending on the loop\n switch (i) {\n case 0:\n strToCheck = spinHint;\n break;\n case 1:\n strToCheck = s1;\n break;\n case 2:\n strToCheck = s2;\n break;\n case 3:\n strToCheck = s3;\n break;\n case 4:\n strToCheck = s4;\n break;\n case 5:\n strToCheck = s5;\n break;\n case 6:\n strToCheck = s6;\n break;\n case 7:\n strToCheck = s7;\n break;\n }\n\n // Clicks each spinner option and checks if it was selected correctly\n // http://stackoverflow.com/questions/31420839/android-espresso-check-selected-spinner-text\n onData(allOf(is(instanceOf(String.class)), is(strToCheck))).perform(click());\n onView(withId(R.id.notifyTime))\n .check(matches(withSpinnerText(containsString(strToCheck))));\n }\n }",
"private boolean checkSpinner(String postion, MaterialSpinner sp, String massage) {\n if(postion.equals(\"Select Task Type\") || postion.equals(\"Select Device Type\") || postion.equals(\"Select Customer\"))\n {\n\n sp.setError(massage);\n return false;\n }\n else\n {\n return true;\n }\n\n }",
"@Override\n public void ok()\n {\n section = ((Integer)spinner.getValue()).intValue();\n }",
"private boolean verifica(){\n if(et_nomeAddFamiliar.getText().length()>3 && spinnerParentesco.getSelectedItemPosition()>0){\n return true;\n }\n else return false;\n\n }",
"String getSpinnerText();",
"@Override\r\n public Integer getValue() {\n return (Integer) this.spinner.getValue();\r\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n SpinnerValue = (String)spinner.getSelectedItem();\n }",
"public void addListenerOnButton() {\n\n isempleado = (Spinner) findViewById(R.id.spinnerWifi);\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n\n\n Toast.makeText(getApplicationContext(), \"Spinner 1 \"+String.valueOf(isempleado.getSelectedItem()) +\n \"Spinner 2 : \"+ String.valueOf(spinner2.getSelectedItem()), Toast.LENGTH_LONG).show();\n\n\n }",
"public Object getValue() {\n return spinner.getValue();\n }",
"protected boolean validarCampos() {\n boolean cancel = true;\n if (((Values) tipoViviendaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.tipoVivienda));\n } else if (((Values) viaAccesoPrincipalSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.viaAccesoPrincipal));\n } else if (((Values) materialTechoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.materialTecho));\n } else if (((Values) materialPisoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.materialPiso));\n } else if (((Values) materialParedesSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.materialParedes));\n } else if (((Values) estadoTechoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.estadoTecho));\n } else if (((Values) estadoPisoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.estadoPiso));\n } else if (((Values) estadoParedSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.estadoPared));\n } else if (((Values) tipoHogarSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.tenenciaHogar));\n } else if ((((Values) tipoHogarSpinner.getSelectedItem()).getKey().equals(\"1\") ||\n ((Values) tipoHogarSpinner.getSelectedItem()).getKey().equals(\"2\")) &&\n ((Values) documentoHogarSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.documentoHogar));\n } else if (((Values) numCuartosSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.cuartos));\n } else if (((Values) numDormitoriosSpinner\n .getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.dormitorios));\n// focusView = numDormitoriosEditText;\n } else if (((Values) fuenteAguaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.fuenteAgua));\n } else if (((Values) ubicacionAguaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.ubicacionAgua));\n } else if (((Values) tratamientoAguaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.tratamientoAgua));\n } else if (((Values) servicioSanitarioSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.servicioSanitario));\n } else if (((Values) ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE)) &&\n !((Values) servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"6\")\n ) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.ubicacionSanitario));\n } else if (((Values) servicioDuchaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.servicioDucha));\n } else if (((Values) eliminaBasuraSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.eliminaBasura));\n } else if (((Values) tipoAlumbradoSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.tipoAlumbrado));\n } else if (codigoElectricoEditText.getText().toString().trim().equals(\"\") &&\n ((Values) tipoAlumbradoSpinner.getSelectedItem()).getKey().equals(\"1\")) {\n codigoElectricoEditText.setError(null);\n codigoElectricoEditText.clearFocus();\n codigoElectricoEditText.setError(getString(R.string.errorCampoRequerido));\n codigoElectricoEditText.requestFocus();\n } else if (((Values) energeticoCocinaSpinner.getSelectedItem()).getKey().equals(String.valueOf(Global.VALOR_SELECCIONE))) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.energeticoCocina));\n } else if (gasParaCalefonOpcion.getCheckedRadioButtonId() == -1) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.gasParaCalefon));\n } else if (terrenoAgropecuario.getCheckedRadioButtonId() == -1) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.terrenoAgropecuario));\n } else if (terrenoAgropecuarioSi.getCheckedRadioButtonId() == -1 &&\n terrenoAgropecuario.getCheckedRadioButtonId() == R.id.terrenoAgropecuarioOpcion1rb\n ) {\n getAlert(getString(R.string.validacion_aviso), getString(R.string.seleccione_pregunta) + getString(R.string.terrenoAgropecuarioSi));\n } else if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n ((Values)servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"6\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.seccion3MensajeNoCorrespondeDepartamento));\n\n }else {\n cancel = false;\n }\n if (!TextUtils.isEmpty(codigoElectricoEditText.getText().toString())) {\n\n if (codigoElectricoEditText.getText().toString().length() != 10) {\n codigoElectricoEditText.setError(getString(R.string.error_numero_medidor));\n codigoElectricoEditText.requestFocus();\n return true;\n }\n }\n return cancel;\n }",
"@Override\n public void onValueChange(NumberPicker picker, int oldVal, int newVal) {\n\n if(newVal<=0)\n {\n txtWellnessActivityTTHErrorMessage.setVisibility(View.VISIBLE);\n }\n else\n {\n txtWellnessActivityTTHErrorMessage.setVisibility(View.GONE);\n }\n }",
"public boolean hasValidItemSelected() {\n return !(autoComplete.getSelection() == null || ((Comboitem)autoComplete.getSelection()).getValue() == null);\n }",
"private void checkIfEnable(){\n //Control variable\n boolean ok = false;\n //Input from txtAmount\n Integer value = 0;\n String input = \"\";\n //Makes sure an item in the list has been clicked.\n for(int i = 0; i < this.names.length; i++){\n if(this.names[i] == this.chosenName){\n ok = true;\n }\n }\n if(ok){\n //Gets what is written in txtAmount\n input = this.txtAmount.getText().toString();\n try{\n value = Integer.parseInt(input);\n if((value > 0) && (value <= this.balance)){\n this.btnPay.setEnabled(true);\n this.lblAmountCheck.setText(\"\");\n }\n else if ((value <= 0) || (value > this.balance)){\n this.btnPay.setEnabled(false);\n this.lblAmountCheck.setText(\"Value is invalid or out of bounds\");\n }\n }\n catch(NumberFormatException e){\n this.btnPay.setEnabled(false);\n this.lblAmountCheck.setText(\"Value is invalid or out of bounds\");\n }\n }\n }",
"public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) {\n userType = (int) arg3;\n /* 将mySpinner 显示*/\n arg0.setVisibility(View.VISIBLE);\n }",
"@Override\n public void onItemSelected(MaterialSpinner view, int position, long id, Object item) {\n\n if(item.equals(\"Other\")){\n othereditText.setVisibility(View.VISIBLE);\n serviceSelected = othereditText.getText().toString().trim();\n }else{\n serviceSelected = item+\"\";\n }\n }",
"@Override\n public void onValueChange(NumberPicker picker, int oldVal, int newVal)\n {\n\n\n if(newVal>0)\n {\n txtWellnessActivityTTHErrorMessage.setVisibility(View.GONE);\n }\n }",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_25.setVisibility(View.INVISIBLE);\r\n item25_t= item25;\r\n item25 = 0;\r\n Log.i(TAG,\"item25\" + item25);\r\n }else{\r\n spinner_item_25.setVisibility(View.VISIBLE);\r\n item25 = item25_t;\r\n Log.i(TAG,\"item25\" + item25);\r\n }\r\n }",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_24.setVisibility(View.INVISIBLE);\r\n item24_t= item24;\r\n item24 = 0;\r\n Log.i(TAG,\"item24\" + item24);\r\n }else{\r\n spinner_item_24.setVisibility(View.VISIBLE);\r\n item24 = item24_t;\r\n Log.i(TAG,\"item24\" + item24);\r\n }\r\n }",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_22.setVisibility(View.INVISIBLE);\r\n item22_t= item22;\r\n item22 = 0;\r\n Log.i(TAG,\"item22\" + item22);\r\n }else{\r\n spinner_item_22.setVisibility(View.VISIBLE);\r\n item22 = item22_t;\r\n Log.i(TAG,\"item22\" + item22);\r\n }\r\n }",
"private void updateSpinner() {\n ArrayAdapter<CharSequence> adaptador = new ArrayAdapter(getContext(), android.R.layout.simple_spinner_item,nombresEnComboBox);\n spinner.setAdapter(adaptador);\n //guardo el item seleccionado del combo\n spinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n nombreDeLocSeleccionada[0] = (String) spinner.getAdapter().getItem(i);\n for (int j=0 ; j < listaLocalidades.size() ; j++){\n if (listaLocalidades.get(j).getNombreLocalidad().equals(nombreDeLocSeleccionada[0])) {\n idLoc = listaLocalidades.get(j).getIdLocalidad() ;\n break;\n }\n }\n //Toast.makeText(getActivity(), nombreDeLocSeleccionada[0], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n }",
"public String getAnswerText()\r\n\t {\r\n\t return spinner.getValue().toString();\r\n\t }",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_23.setVisibility(View.INVISIBLE);\r\n item23_t= item23;\r\n item23 = 0;\r\n Log.i(TAG,\"item23\" + item23);\r\n }else{\r\n spinner_item_23.setVisibility(View.VISIBLE);\r\n item23 = item23_t;\r\n Log.i(TAG,\"item23\" + item23);\r\n }\r\n }",
"public void spinner() {\n /**\n * calls if the tasks was weekly, if not, it will be automatically set to \"once\"\n */\n if(weekly) {\n String[] items = new String[]{activity.getResources().getString(R.string.sunday), activity.getResources().getString(R.string.monday), activity.getResources().getString(R.string.tuesday), activity.getResources().getString(R.string.wednesday), activity.getResources().getString(R.string.thursday), activity.getResources().getString(R.string.friday), activity.getResources().getString(R.string.saturday)};\n ArrayAdapter<String> frequencyAdapter = new ArrayAdapter<String>(activity.getBaseContext(), android.R.layout.simple_spinner_dropdown_item, items);\n weekday.setAdapter(frequencyAdapter);\n weekday.getBackground().setColorFilter(activity.getResources().getColor(R.color.colorAccent), PorterDuff.Mode.SRC_ATOP);\n weekday.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n\n day = String.valueOf(position + 1); //chosen day is stored\n\n }\n\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n } else {\n day = \"8\";\n weekday.setVisibility(View.GONE);\n }\n }",
"public void handleItemSpinnerChange(){\n String itemTypeText = itemType.getSelectedItem().toString();\n if(itemTypeText.equals(\"Computer\")){\n osTextView.setVisibility(View.VISIBLE);\n osInput.setVisibility(View.VISIBLE);\n printerTextView.setVisibility(View.INVISIBLE);\n printerType.setVisibility(View.GONE);\n }\n else if(itemTypeText.equals(\"Printer\")){\n osTextView.setVisibility(View.INVISIBLE);\n osInput.setVisibility(View.INVISIBLE);\n printerTextView.setVisibility(View.VISIBLE);\n printerType.setVisibility(View.VISIBLE);\n }\n }",
"private void itemtypeSpinner() {\n ArrayAdapter<CharSequence> staticAdapter = ArrayAdapter\n .createFromResource(getContext(), R.array.select_array,\n android.R.layout.simple_spinner_item);\n\n // Specify the layout to use when the list of choices appears\n staticAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n // Apply the adapter to the spinner\n mItemTypeSpinnerA2.setAdapter(staticAdapter);\n\n mItemTypeSpinnerA2.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n String itemtypeText = (String) parent.getItemAtPosition(position);\n if (itemtypeText.equals(\"Mobile Phones\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.VISIBLE);\n mInputLayoutItemImeiA2.setClickable(true);\n\n\n } else if (itemtypeText.equals(\"Laptops\")) {\n\n mInputLayoutSerialNoA2.setVisibility(View.VISIBLE);\n mInputLayoutSerialNoA2.setClickable(true);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n } else {\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n }\n\n\n\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mItemTypeSpinnerA2.getItemAtPosition(0);\n mInputLayoutSerialNoA2.setVisibility(View.GONE);\n mInputLayoutSerialNoA2.setClickable(false);\n mInputLayoutItemImeiA2.setVisibility(View.GONE);\n mInputLayoutItemImeiA2.setClickable(false);\n\n\n }\n });\n\n }",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_26.setVisibility(View.INVISIBLE);\r\n item26_t= item26;\r\n item26 = 0;\r\n Log.i(TAG,\"item26\" + item26);\r\n }else{\r\n spinner_item_26.setVisibility(View.VISIBLE);\r\n item26 = item26_t;\r\n Log.i(TAG,\"item26\" + item26);\r\n }\r\n }",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tif (spinner3.getSelectedItem().equals(\"Sedentary\")) {\n\t\t\t\t\tactive = 1.2;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Lightly Active\")) {\n\t\t\t\t\tactive = 1.375;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\n\t\t\t\t\t\t\"Moderately Active\")) {\n\t\t\t\t\tactive = 1.55;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Highly Active\")) {\n\t\t\t\t\tactive = 1.725;\n\t\t\t\t} else if (spinner3.getSelectedItem().equals(\"Extra Active\")) {\n\t\t\t\t\tactive = 1.9;\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onClick(View v) {\n String selectSpinner = objSpinner.getSelectedItem().toString();\n //Validamos la seleccion del spinner\n if (objSpinner.getSelectedItemPosition() != 0) {\n //Almacenamos la seleccion de RadioButton\n int selectRadio = objGroup.getCheckedRadioButtonId();\n int result = objConfigura.creaEntradaSalida(selectSpinner, selectRadio);\n if (result == 1) {\n Toast.makeText(objContext, \"Entrada guardada.\", Toast.LENGTH_SHORT).show();\n } else if (result == 2) {\n Toast.makeText(objContext, \"Salida guardada.\", Toast.LENGTH_SHORT).show();\n }\n objSpinner.setSelection(0);\n }else {\n Toast.makeText(objContext, \"Seleccione una clase de vehiculo.\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void onNothingSelected(AdapterView<?> parent) {\n // Toast.makeText(getApplicationContext(), \"nada en el spinner\", Toast.LENGTH_LONG).show();\n }",
"@Override\r\n public void onCheckedChanged(CompoundButton buttonView,\r\n boolean isChecked) {\n if(isChecked){\r\n spinner_item_21.setVisibility(View.INVISIBLE);\r\n item21_t= item21;\r\n item21 = 0;\r\n Log.i(TAG,\"item21\" + item21);\r\n }else{\r\n spinner_item_21.setVisibility(View.VISIBLE);\r\n item21 = item21_t;\r\n Log.i(TAG,\"item21\" + item21);\r\n }\r\n }",
"private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter fruitSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_fruit_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n fruitSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mTypeSpinner.setAdapter(fruitSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mTypeSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.apple))) {\n mFruit = FruitEntry.TYPE_APPLE;\n } else if (selection.equals(getString(R.string.banana))) {\n mFruit = FruitEntry.TYPE_BANANA;\n } else if (selection.equals(getString(R.string.peach))) {\n mFruit = FruitEntry.TYPE_PEACH;\n } else if (selection.equals(getString(R.string.pineapple))) {\n mFruit = FruitEntry.TYPE_PINEAPPLE;\n } else if (selection.equals(getString(R.string.strawberry))) {\n mFruit = FruitEntry.TYPE_STRAWBERRY;\n } else if (selection.equals(getString(R.string.watermelon))) {\n mFruit = FruitEntry.TYPE_WATERMELON;\n } else {\n mFruit = FruitEntry.TYPE_NOTSELECTED;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mFruit = FruitEntry.TYPE_NOTSELECTED;\n }\n });\n }",
"private void spinner() {\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.planets_array, R.layout.simple_spinner_item_new);\n// Specify the layout to use when the list of choices appears\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n// Apply the adapter to the spinner\n// dropDownViewTheme.\n planetsSpinner.setAdapter(adapter);\n planetsSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n Object itemAtPosition = parent.getItemAtPosition(position);\n Log.d(TAG, \"onItemSelected: \" + itemAtPosition);\n\n String[] stringArray = getResources().getStringArray(R.array.planets_array);\n Toast.makeText(DialogListActivity.this, \"选择 \" + stringArray[position], Toast.LENGTH_SHORT).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n Toast.makeText(DialogListActivity.this, \"未选择\", Toast.LENGTH_SHORT).show();\n }\n });\n }",
"public void Iniciar(View view){\n String auditoria = txt_NomAuditoria.getText().toString().trim();\n String sucursal = spinner.getSelectedItem().toString(); //obteniendo los valores del Spinner\n\n if (auditoria.isEmpty()){\n Toast.makeText(this, \"El Nombre de la Auditoria es Requerido\", Toast.LENGTH_SHORT).show();\n }\n else{\n if (sucursal.equals(\"Selecciona una opción\")){\n Toast.makeText(this, \"Selecciona una opción\", Toast.LENGTH_SHORT).show();\n }\n else {\n Intent colectar = new Intent(this, Colectar.class);\n colectar.putExtra(\"auditoria\", auditoria);\n colectar.putExtra(\"sucursal\", sucursal);\n startActivity(colectar);\n finish();\n }\n }\n }",
"@Override\n public void onClick(View v){\n EditText ec_local = (EditText)findViewById(R.id.pm_data_txt);\n EditText dd = (EditText)findViewById(R.id.dd);\n EditText mm = (EditText)findViewById(R.id.mm);\n EditText yyyy = (EditText)findViewById(R.id.yyyy);\n EditText qtde = (EditText)findViewById(R.id.qtde);\n Spinner dma = (Spinner)findViewById(R.id.dma);\n Spinner ec_eqp_id = (Spinner)findViewById(R.id.pm_eqp_tx);\n\n //Método de como transformar um String em Int: Integer.parseInt(myEditText.getText().toString())\n String id = ec_eqp_id.getSelectedItem().toString();\n String local = ec_local.getText().toString();\n String dia = dd.getText().toString();\n String mes = mm.getText().toString();\n String ano = yyyy.getText().toString();\n String qtd = qtde.getText().toString();\n String adm = dma.getSelectedItem().toString();\n\n \n if(TextUtils.isEmpty(local) || TextUtils.isEmpty(dia) || TextUtils.isEmpty(mes) || TextUtils.isEmpty(ano) || TextUtils.isEmpty(qtd)){\n Toast.makeText(getApplicationContext(),\"Insira as Informações Corretamente\",Toast.LENGTH_LONG).show();\n }else if (Integer.parseInt(mes)>12){\n Toast.makeText(getApplicationContext(), \"Mês Inválido\", Toast.LENGTH_LONG).show();\n }else if(Integer.parseInt(mes)==2 && Integer.parseInt(dia)>28){\n Toast.makeText(getApplicationContext(),\"Dia Inválido\",Toast.LENGTH_LONG).show();\n }else if((Integer.parseInt(mes)==1 || Integer.parseInt(mes)==3 || Integer.parseInt(mes)==5 || Integer.parseInt(mes)==7 || Integer.parseInt(mes)==8 || Integer.parseInt(mes)==10 || Integer.parseInt(mes)==12) && Integer.parseInt(dia)>31){\n Toast.makeText(getApplicationContext(),\"Dia Inválido\",Toast.LENGTH_LONG).show();\n }else if((Integer.parseInt(mes)==4 || Integer.parseInt(mes)==6 || Integer.parseInt(mes)==9 || Integer.parseInt(mes)==11) && Integer.parseInt(dia)>30){\n Toast.makeText(getApplicationContext(),\"Dia Inválido\",Toast.LENGTH_LONG).show();\n }else {\n BDController crud = new BDController(getBaseContext());\n int qt = Integer.parseInt(qtde.getText().toString());\n String resultado;\n //Realizando a inserção dos dados no banco de dados.\n String pei = \"\";\n if (adm.equals(\"Dia(s)\")) {\n pei = \"day\";\n } else if (adm.equals(\"Mes(es)\")) {\n pei = \"month\";\n } else if (adm.equals(\"Ano(s)\")) {\n pei = \"year\";\n }\n resultado = crud.insereDado(id, local, ano + \"-\" + mes + \"-\" + dia, qt, adm);\n\n Toast.makeText(getApplicationContext(), resultado, Toast.LENGTH_LONG).show();\n if (!resultado.equals(\"-1\")) {\n crud.updateEcDpm(qt,pei);\n Toast.makeText(getApplicationContext(), resultado, Toast.LENGTH_LONG).show();\n Intent it = new Intent(getApplicationContext(), Equips.class);\n startActivity(it);\n finish();\n }else{\n Toast.makeText(getApplicationContext(),\"Erro de BD\", Toast.LENGTH_LONG).show();\n }\n }\n\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view,\n int position, long id) {\n\n\n try{\n String s = \"\";\n Log.e(\"mytag\",\"(String) parent.getItemAtPosition(position):\"+(String) parent.getItemAtPosition(position).toString().trim());\n if (parent.getItemAtPosition(position).toString().trim().equals(\"בחר\")){\n s = \"-1\";\n }else{\n s = String.valueOf(ctype_map.get(parent.getItemAtPosition(position).toString().trim()).getCtypeID());\n }\n setCcustomerSpinner(s);\n }catch(Exception e){\n helper.LogPrintExStackTrace(e);\n }\n Log.e(\"mytag\", (String) parent.getItemAtPosition(position));\n //statusID = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusID();\n //statusName = db.getCallStatusByCallStatusName((String) parent.getItemAtPosition(position)).getCallStatusName();\n //Toast.makeText(getApplication(), \"status: \" + s, Toast.LENGTH_LONG).show();\n //Log.v(\"item\", (String) parent.getItemAtPosition(position));\n }",
"public void initSpinner() {\n }",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tif (spinner.getSelectedItem().equals(\"Kgs\")) {\n\t\t\t\t\tweight_unit = \"kgs\";\n\t\t\t\t} else {\n\t\t\t\t\tweight_unit = \"lbs\";\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tif (spinner1.getSelectedItem().equals(\"Feet and inches\")) {\n\t\t\t\t\tht_ft.setText(\"Feet\");\n\t\t\t\t\tin.setVisibility(View.VISIBLE);\n\t\t\t\t\tht_in.setVisibility(View.VISIBLE);\n\t\t\t\t\theight_unit = \"ft\";\n\t\t\t\t} else {\n\t\t\t\t\tht_ft.setText(\"cms\");\n\t\t\t\t\tin.setVisibility(View.INVISIBLE);\n\t\t\t\t\tht_in.setVisibility(View.INVISIBLE);\n\t\t\t\t\theight_unit = \"cm\";\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n item = parent.getItemAtPosition(position).toString();\n //beaconselected.setText(item);\n\n // Showing selected spinner item\n if(!item.equals(\"select a beacon\")){\n //Toast.makeText(parent.getContext(), \"Selected: \" + item, Toast.LENGTH_LONG).show();\n x++;\n beaconManager.stopRanging(beaconRegion);\n t=0;\n //Toast.makeText(this, \"Search stopped\", Toast.LENGTH_SHORT).show();\n }\n\n\n\n }",
"protected void mensajesAlerta() {\n\n// if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"1\") &&\n// ((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n// getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaCasaMaterialTecho));\n// }\n//\n// if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n// ((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n// getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaDepartamentoMaterialTecho));\n// }\n\n if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n ((Values)ubicacionAguaSpinner.getSelectedItem()).getKey().equals(\"2\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaUbicacionAgua));\n }\n\n if(((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"2\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"2\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaUbicacionSanitario));\n }\n\n if( ((Values)tipoViviendaSpinner.getSelectedItem()).getKey().equals(\"3\") &&\n Integer.parseInt(((Values)tipoHogarSpinner.getSelectedItem()).getKey()) < 3 &&\n ((Values)documentoHogarSpinner.getSelectedItem()).getKey().equals(\"1\") ){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idTipoViviendaTipoHogarDocumento));\n }\n\n if(((Values)materialTechoSpinner.getSelectedItem()).getKey().equals(\"6\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_materialTechoOpcionOtro));\n }\n\n if(((Values)servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"3\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idServicioSanitarioUbicacionSanitarioPozo));\n }\n\n if(((Values)servicioSanitarioSpinner.getSelectedItem()).getKey().equals(\"4\") &&\n ((Values)ubicacionSanitarioSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idServicioSanitarioUbicacionSanitarioDescarga));\n }\n\n if(((Values)viaAccesoPrincipalSpinner.getSelectedItem()).getKey().equals(\"6\") &&\n ((Values)eliminaBasuraSpinner.getSelectedItem()).getKey().equals(\"1\")){\n getAlert(getString(R.string.validacion_aviso),getString(R.string.mv_idViaAccesoPrincipalEliminanBasura));\n }\n }",
"public void onItemSelected(AdapterView<?> adapterView, \n\t\t View view, int i, long l) {\n\t\t \tString selected2 = colorGraySpin.getSelectedItem().toString();\n\t\t\t Toast.makeText(PainActivity.this,\"You Selected : \"\n\t\t\t + selected2,Toast.LENGTH_SHORT).show(); \n\t\t if (selected2.equals(\"Colorscale\")) {\n\t\t \t setColorBrush(false);\n\t\t } else{\n\t\t \t setColorBrush(true);\n\t\t }\n\t\t \t\n\t\t }",
"public void checkBtn(View v){\n int id = radioGroup.getCheckedRadioButtonId();\n\n radioButton= findViewById(id);\n estatSTR=radioButton.getText().toString();\n //Toast.makeText(this, \"select: \"+ radioButton.getText(),Toast.LENGTH_SHORT).show();\n txtEstat.setText(\"Estat com a \"+estatSTR);\n }",
"@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n String mselection = mSpinner.getSelectedItem().toString();\n Toast.makeText(getApplicationContext(), \"selected \" + mselection, 30).show();\n /**** do your code*****/\n\n if (mselection.equals(\"New Location\")){\n Intent i = new Intent(getApplicationContext(), NewLocation.class);\n startActivity(i);\n }\n }",
"private void select(JSpinner spinner) {\n/* 194 */ JComponent editor = spinner.getEditor();\n/* */ \n/* 196 */ if (editor instanceof JSpinner.DateEditor) {\n/* */ \n/* 198 */ JSpinner.DateEditor dateEditor = (JSpinner.DateEditor)editor;\n/* 199 */ JFormattedTextField ftf = dateEditor.getTextField();\n/* 200 */ Format format = dateEditor.getFormat();\n/* */ \n/* */ Object value;\n/* 203 */ if (format != null && (value = spinner.getValue()) != null) {\n/* */ \n/* 205 */ SpinnerDateModel model = dateEditor.getModel();\n/* 206 */ DateFormat.Field field = DateFormat.Field.ofCalendarField(model.getCalendarField());\n/* */ \n/* 208 */ if (field != null) {\n/* */ \n/* */ try {\n/* */ \n/* 212 */ AttributedCharacterIterator iterator = format.formatToCharacterIterator(value);\n/* 213 */ if (!select(ftf, iterator, field) && field == DateFormat.Field.HOUR0)\n/* */ {\n/* 215 */ select(ftf, iterator, DateFormat.Field.HOUR1);\n/* */ }\n/* 217 */ } catch (IllegalArgumentException iae) {}\n/* */ }\n/* */ } \n/* */ } \n/* */ }",
"private void spinnerAction() {\n Spinner spinnerphonetype = (Spinner) findViewById(R.id.activity_one_phonetype_spinner);//phonetype spinner declaration\n ArrayAdapter<CharSequence> adapter = ArrayAdapter.createFromResource(this,\n R.array.phone_spinner, android.R.layout.simple_spinner_item); //create the spinner array\n adapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item); //set the drop down function\n spinnerphonetype.setAdapter(adapter); //set the spinner array\n }",
"@Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n String taskType = adapterView.getItemAtPosition(i).toString();\n Log.d(TAG, \"SPINNER: \" + taskType);\n\n\n String[] tasks = getResources().getStringArray(R.array.tasktypelist);\n\n if (tasks.length > 0 && taskType.equals(tasks[0])) {\n taskParamsLayout.removeAllViews();\n\n piPointsNo = new EditText(MainActivity.this);\n piPointsNo.setInputType(InputType.TYPE_CLASS_NUMBER);\n piPointsNo.setHint(R.string.taskpi_help_points);\n\n taskParamsLayout.addView(piPointsNo);\n\n }\n\n else if (tasks.length > 1 && taskType.equals(tasks[1])) {\n taskParamsLayout.removeAllViews();\n\n Message msg=new Message();\n msg.obj=\"Wait! This task is a false one! :( \";\n toastHandler.sendMessage(msg);\n }\n\n else if (tasks.length > 2 && taskType.equals(tasks[2])) {\n taskParamsLayout.removeAllViews();\n\n Message msg=new Message();\n msg.obj=\"Wait! This task is a false one! :( \";\n toastHandler.sendMessage(msg);\n }\n\n }",
"@Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String item = parent.getItemAtPosition(position).toString();\n tuning = position;\n setUpDisplay();\n\n // Showing selected spinner item\n if (tuner1 == 3) {\n Toast.makeText(TunerActivity.this, \"\" + item, Toast.LENGTH_LONG).show();\n }\n }",
"private void setUpSpinner(){\n ArrayAdapter paymentSpinnerAdapter =ArrayAdapter.createFromResource(this,R.array.array_gender_option,android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line, then apply adapter to the spinner\n paymentSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n mPaymentSpinner.setAdapter(paymentSpinnerAdapter);\n\n // To set the spinner to the selected payment method by the user when clicked from cursor adapter.\n if (payMode != null) {\n if (payMode.equalsIgnoreCase(\"COD\")) {\n mPaymentSpinner.setSelection(0);\n } else {\n mPaymentSpinner.setSelection(1);\n }\n mPaymentSpinner.setOnTouchListener(mTouchListener);\n }\n\n mPaymentSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selectedPayment = (String)parent.getItemAtPosition(position);\n if(!selectedPayment.isEmpty()){\n if(selectedPayment.equals(getString(R.string.payment_cod))){\n mPaymentMode = clientContract.ClientInfo.PAYMENT_COD; // COD = 1\n }else{\n\n mPaymentMode = clientContract.ClientInfo.PAYMENT_ONLINE; // ONLINE = 0\n }\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n\n }\n });\n\n }",
"private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter supplierSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.array_supplier_options, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n supplierSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mSupplierSpinner.setAdapter(supplierSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mSupplierSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.supplier_one))) {\n mSupplier = BookEntry.SUPPLIER_ONE;\n } else if (selection.equals(getString(R.string.supplier_two))) {\n mSupplier = BookEntry.SUPPLIER_TWO;\n } else {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mSupplier = BookEntry.SUPPLIER_UNKNOWN;\n }\n });\n }",
"public void runSpinner() {\r\n addItemsOndifficultySpinner();\r\n addListenerOnButton();\r\n addListenerOnSpinnerItemSelection();\r\n }",
"private void setupSpinner() {\n // Create adapter for spinner. The list options are from the String array it will use\n // the spinner will use the default layout\n ArrayAdapter colourSpinnerAdapter = ArrayAdapter.createFromResource(this,\n R.array.phone_colour_array, android.R.layout.simple_spinner_item);\n\n // Specify dropdown layout style - simple list view with 1 item per line\n colourSpinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n\n // Apply the adapter to the spinner\n mColourSpinner.setAdapter(colourSpinnerAdapter);\n\n // Set the integer mSelected to the constant values\n mColourSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String selection = (String) parent.getItemAtPosition(position);\n if (!TextUtils.isEmpty(selection)) {\n if (selection.equals(getString(R.string.phone_colour_black))) {\n mColour = PhoneEntry.COLOUR_BLACK;\n } else if (selection.equals(getString(R.string.phone_colour_white))) {\n mColour = PhoneEntry.COLOUR_WHITE;\n } else if (selection.equals(getString(R.string.phone_colour_grey))){\n mColour = PhoneEntry.COLOUR_GREY;\n }\n else {\n mColour = PhoneEntry.COLOUR_UNKNOWN;\n }\n }\n }\n\n // Because AdapterView is an abstract class, onNothingSelected must be defined\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n mColour = PhoneEntry.COLOUR_UNKNOWN;\n }\n });\n\n }",
"@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\t\t\tint arg2, long arg3) {\n\t\t\t\t\t\tint position = gameSpinner.getSelectedItemPosition();\n\t\t\t\t\t\tif (macGames[+position] != \"-- Choose sport --\") {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t/*Toast.makeText(getApplicationContext(),\n\t\t\t\t\t\t\t\t\t\"You have selected \" + macGames[+position],\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();*/\n\t\t\t\t\t\t\tchosenGame = macGames[+position];\n\t\t\t\t\t\t}\n\t\t\t\t\t}",
"@FXML\n private void handleConfirm() {\n try {\n\n int value = Integer.parseInt(bet_field.getText());\n\n if ((value > 0) && (value <= currentPlayer.getWallet())) {\n currentPlayer.getCurrentHand().setBet(value);\n bet.setValue(value);\n }\n } catch (NumberFormatException err) {\n // Ne rien faire car c'est juste que le champ de la mise est vide\n }\n }",
"@Then(\"^I choose the park on combobox$\")\n public void i_choose_the_park_on_combobox() {\n onViewWithId(R.id.spinnerParks).click();\n onViewWithText(\"Parque D\").isDisplayed();\n onViewWithText(\"Parque D\").click();\n }",
"private void betOptionPane(){ \n SpinnerModel sModel = new SpinnerNumberModel(50,1,blackjackController.getHumanPlayer().getBudget(),5); \n JSpinner spinner = new JSpinner(sModel);\n\n Object[] inputFields = {\"Hey! \\nYour current budget is $\"+this.blackjackController.getHumanPlayer().getBudget()+\".\\n\", \"Declare your new bet : \", spinner, \"Good luck!\"};\n int option = JOptionPane.showConfirmDialog(this, inputFields, \"\", JOptionPane.OK_CANCEL_OPTION, JOptionPane.INFORMATION_MESSAGE);\n\n if (option == JOptionPane.OK_OPTION) {\n this.blackjackController.setBet((Integer) spinner.getValue());\n }else{\n this.dispose();\n }\n }",
"public void onItemSelected(AdapterView<?> spinner, View arg1, int position, long row_id) {\n switch (spinner.getId()) {\n case R.id.spin1: {\n if(position == 0) numbersOfTotalSets = 5;\n else numbersOfTotalSets = 3;\n break;\n }\n case R.id.spin2: {\n if(position == 0) setFinishingScore = 25;\n else setFinishingScore = 15;\n break;\n }\n case R.id.spin3: {\n if(position == 0) tieBreakerScore = 15;\n else tieBreakerScore = 25;\n break;\n }\n }\n }",
"@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1, int pos,\n long arg3) {\n financialYr = String.valueOf(chooseyrSpiner.getSelectedItem());\n\n }",
"@Override\n public void onClick(View v) {\n Spinner spinnerMonthList=(Spinner) findViewById(R.id.monthSpinner);\n // get selected radio button from radioGroup\n int selectedId = instrumentGroup.getCheckedRadioButtonId();\n\n // find the radiobutton by returned id\n RadioButton ChosenButton = (RadioButton) findViewById(selectedId);\n //Check for the ID representation and write feedback to a textview accordingly\n if (ChosenButton == findViewById(R.id.radio_Accordian)) {\n String ChosenMonth=(String) spinnerMonthList.getSelectedItem();\n String feedbackString = \"You have enrolled for Accordian Lessons on \"+ChosenMonth;\n txtViewDisplay.setText(feedbackString);\n }\n // find the radiobutton by returned id\n //Check for the ID representation and write feedback to a textview accordingly\n if (ChosenButton == findViewById(R.id.radio_Bassoon)) {\n String ChosenMonth=(String) spinnerMonthList.getSelectedItem();\n String feedbackString = \"You have enrolled for Bassoon Lessons on \"+ChosenMonth;\n txtViewDisplay.setText(feedbackString);\n }\n // find the radiobutton by returned id\n //Check for the ID representation and write feedback to a textview accordingly\n if (ChosenButton == findViewById(R.id.radio_Cello)) {\n String ChosenMonth=(String) spinnerMonthList.getSelectedItem();\n String feedbackString = \"You have enrolled for Cello Lessons on \"+ChosenMonth;\n txtViewDisplay.setText(feedbackString);\n }\n }",
"private void getUserBathroomsChoice() {\n int checkedChipId = mBinding.chipGroupBathrooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_bathroom) {\n mChipBathroomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_bathrooms) {\n mChipBathroomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_bathrooms) {\n mChipBathroomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_bathrooms) {\n mChipBathroomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_bathrooms) {\n mChipBathroomsInput = 5;\n } else {\n mChipBathroomsInput = 0;\n }\n }",
"private SpinnerModel geSpinnerModel(){\n return new SpinnerNumberModel(0, 0, null, 1);\n }",
"private void abilitySpinnerListener() {\n\t\tstrengthSpinner.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint holder = (Integer) strengthSpinner.getValue();\n\t\t\t\tint saveI = 0;\n\t\t\t\tfor (int i = 0; i < abilityScore.length; i++) {\n\t\t\t\t\tif (holder == abilityScore[i]) {\n\t\t\t\t\t\tstrengthPoints = abilityCost[i];\n\t\t\t\t\t\tsaveI = i - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (holder < 7) {\n\t\t\t\t\tstrengthSpinner.setValue(7);\n\t\t\t\t}\n\t\t\t\tif (holder > 18) {\n\t\t\t\t\tstrengthSpinner.setValue(18);\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tif (fantasyPoints - totalPoints < 0) {\n\t\t\t\t\tstrengthSpinner.setValue(holder - 1);\n\t\t\t\t\tstrengthPoints = abilityCost[saveI];\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tfantasyPointsLabel\n\t\t\t\t\t\t.setText(\"<html>\" + String.valueOf(fantasyPoints - totalPoints) + \"points<br>remaining</html>\");\n\t\t\t\tif (holder < abilityScoreBaseValue) {\t\n\t\t\t\t\tstrengthModifier = (holder - abilityScoreBaseValue - 1)/2;\n\t\t\t\t} else {\n\t\t\t\t\tstrengthModifier = (holder - abilityScoreBaseValue)/2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tstrengthModifierLabel.setText(\"<html>Modifier:<br>\" + String.valueOf(strengthModifier) + \"</html>\");\n\t\t\t\t\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t\tdexteritySpinner.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint holder = (Integer) dexteritySpinner.getValue();\n\t\t\t\tint saveI = 0;\n\t\t\t\tfor (int i = 0; i < abilityScore.length; i++) {\n\t\t\t\t\tif (holder == abilityScore[i]) {\n\t\t\t\t\t\tdexterityPoints = abilityCost[i];\n\t\t\t\t\t\tsaveI = i - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (holder < 7) {\n\t\t\t\t\tdexteritySpinner.setValue(7);\n\t\t\t\t}\n\t\t\t\tif (holder > 18) {\n\t\t\t\t\tdexteritySpinner.setValue(18);\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tif (fantasyPoints - totalPoints < 0) {\n\t\t\t\t\tdexteritySpinner.setValue(holder - 1);\n\t\t\t\t\tdexterityPoints = abilityCost[saveI];\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tfantasyPointsLabel\n\t\t\t\t\t\t.setText(\"<html>\" + String.valueOf(fantasyPoints - totalPoints) + \"points<br>remaining</html>\");\n\t\t\t\t\n\t\t\t\tif (holder < abilityScoreBaseValue) {\t\t\t\n\t\t\t\t\tdexterityModifier = ((holder - abilityScoreBaseValue - 1)/2);\n\t\t\t\t} else {\n\t\t\t\t\tdexterityModifier = (holder - abilityScoreBaseValue)/2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tdexterityModifierLabel.setText(\"<html>Modifier:<br>\" + String.valueOf(dexterityModifier) + \"</html>\");\n\t\t\t\t\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t\tconstitutionSpinner.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint holder = (Integer) constitutionSpinner.getValue();\n\t\t\t\tint saveI = 0;\n\t\t\t\tfor (int i = 0; i < abilityScore.length; i++) {\n\t\t\t\t\tif (holder == abilityScore[i]) {\n\t\t\t\t\t\tconstitutionPoints = abilityCost[i];\n\t\t\t\t\t\tsaveI = i - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (holder < 7) {\n\t\t\t\t\tconstitutionSpinner.setValue(7);\n\t\t\t\t}\n\t\t\t\tif (holder > 18) {\n\t\t\t\t\tconstitutionSpinner.setValue(18);\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tif (fantasyPoints - totalPoints < 0) {\n\t\t\t\t\tconstitutionSpinner.setValue(holder - 1);\n\t\t\t\t\tconstitutionPoints = abilityCost[saveI];\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tfantasyPointsLabel\n\t\t\t\t\t\t.setText(\"<html>\" + String.valueOf(fantasyPoints - totalPoints) + \"points<br>remaining</html>\");\n\t\t\t\t\n\t\t\t\tif (holder < abilityScoreBaseValue) {\n\t\t\t\t\tconstitutionModifier = ((holder - abilityScoreBaseValue - 1)/2);\n\t\t\t\t} else {\n\t\t\t\t\tconstitutionModifier = (holder - abilityScoreBaseValue)/2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tconstitutionModifierLabel.setText(\"<html>Modifier:<br>\" + String.valueOf(constitutionModifier) + \"</html>\");\n\t\t\t\t\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t\tintelligenceSpinner.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint holder = (Integer) intelligenceSpinner.getValue();\n\t\t\t\tint saveI = 0;\n\t\t\t\tfor (int i = 0; i < abilityScore.length; i++) {\n\t\t\t\t\tif (holder == abilityScore[i]) {\n\t\t\t\t\t\tintelligencePoints = abilityCost[i];\n\t\t\t\t\t\tsaveI = i - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (holder < 7) {\n\t\t\t\t\tintelligenceSpinner.setValue(7);\n\t\t\t\t}\n\t\t\t\tif (holder > 18) {\n\t\t\t\t\tintelligenceSpinner.setValue(18);\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tif (fantasyPoints - totalPoints < 0) {\n\t\t\t\t\tintelligenceSpinner.setValue(holder - 1);\n\t\t\t\t\tintelligencePoints = abilityCost[saveI];\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tfantasyPointsLabel\n\t\t\t\t\t\t.setText(\"<html>\" + String.valueOf(fantasyPoints - totalPoints) + \"points<br>remaining</html>\");\n\t\t\t\t\n\t\t\t\tif (holder < abilityScoreBaseValue) {\n\t\t\t\t\tintelligenceModifier = ((holder - abilityScoreBaseValue - 1)/2);\n\t\t\t\t} else {\n\t\t\t\t\tintelligenceModifier = (holder - abilityScoreBaseValue)/2;\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tintelligenceModifierLabel.setText(\"<html>Modifier:<br>\" + String.valueOf(intelligenceModifier) + \"</html>\");\n\t\t\t\t\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t\twisdomSpinner.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint holder = (Integer) wisdomSpinner.getValue();\n\t\t\t\tint saveI = 0;\n\t\t\t\tfor (int i = 0; i < abilityScore.length; i++) {\n\t\t\t\t\tif (holder == abilityScore[i]) {\n\t\t\t\t\t\twisdomPoints = abilityCost[i];\n\t\t\t\t\t\tsaveI = i - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (holder < 7) {\n\t\t\t\t\twisdomSpinner.setValue(7);\n\t\t\t\t}\n\t\t\t\tif (holder > 18) {\n\t\t\t\t\twisdomSpinner.setValue(18);\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tif (fantasyPoints - totalPoints < 0) {\n\t\t\t\t\twisdomSpinner.setValue(holder - 1);\n\t\t\t\t\twisdomPoints = abilityCost[saveI];\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tfantasyPointsLabel\n\t\t\t\t\t\t.setText(\"<html>\" + String.valueOf(fantasyPoints - totalPoints) + \"points<br>remaining</html>\");\n\t\t\t\t\n\t\t\t\tif (holder < abilityScoreBaseValue) {\t\t\t\n\t\t\t\t\twisdomModifier = ((holder - abilityScoreBaseValue - 1)/2);\n\t\t\t\t} else {\n\t\t\t\t\twisdomModifier = (holder - abilityScoreBaseValue)/2;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\twisdomModifierLabel.setText(\"<html>Modifier:<br>\" + String.valueOf(wisdomModifier) + \"</html>\");\n\t\t\t\t\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\n\t\t\t}\n\t\t});\n\n\t\tcharismaSpinner.addChangeListener(new ChangeListener() {\n\n\t\t\t@Override\n\t\t\tpublic void stateChanged(ChangeEvent e) {\n\t\t\t\tint holder = (Integer) charismaSpinner.getValue();\n\t\t\t\tint saveI = 0;\n\t\t\t\tfor (int i = 0; i < abilityScore.length; i++) {\n\t\t\t\t\tif (holder == abilityScore[i]) {\n\t\t\t\t\t\tcharismaPoints = abilityCost[i];\n\t\t\t\t\t\tsaveI = i - 1;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (holder < 7) {\n\t\t\t\t\tcharismaSpinner.setValue(7);\n\t\t\t\t}\n\t\t\t\tif (holder > 18) {\n\t\t\t\t\tcharismaSpinner.setValue(18);\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tif (fantasyPoints - totalPoints < 0) {\n\t\t\t\t\tcharismaSpinner.setValue(holder - 1);\n\t\t\t\t\tcharismaPoints = abilityCost[saveI];\n\t\t\t\t}\n\t\t\t\ttotalPoints = strengthPoints + dexterityPoints + constitutionPoints + intelligencePoints + wisdomPoints\n\t\t\t\t\t\t+ charismaPoints;\n\t\t\t\tfantasyPointsLabel\n\t\t\t\t\t\t.setText(\"<html>\" + String.valueOf(fantasyPoints - totalPoints) + \"points<br>remaining</html>\");\n\t\t\t\t\n\t\t\t\tif (holder < abilityScoreBaseValue) {\n\t\t\t\t\tcharismaModifier = ((holder - abilityScoreBaseValue - 1)/2);\n\t\t\t\t} else {\n\t\t\t\t\tcharismaModifier = (holder - 10)/2;\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcharismaModifierLabel.setText(\"<html>Modifier:<br>\" + String.valueOf(charismaModifier) + \"</html>\");\n\t\t\t\t\n\t\t\t\treference.validate();\n\t\t\t\treference.repaint();\n\t\t\t}\n\t\t});\n\n\t}",
"private int getSpinnerIndexByValue(Spinner spinner, String value) {\n int index = -1;\n for (int i =0; i<spinner.getCount();i++){\n if(spinner.getItemAtPosition(i).toString().equalsIgnoreCase(value)) {\n index = i;\n break;\n }\n }\n return index;\n }",
"private boolean validaSituacao() {\r\n\t\treturn Validacao.validaSituacao((String) this.situacao.getSelectedItem()) != 0;\r\n\t}",
"private void updateAndAlertListener() {\n\n\t\teditText.setText(getRoundedValue(value));\n\n\t\tif (changeListener != null) {\n\t\t\tchangeListener.onValueChange(this, value);\n\t\t}\n\t}",
"public void addListenerOnButton() {\n\n /* spinner1 = (Spinner) findViewById(R.id.spinner1);\n spinner2 = (Spinner) findViewById(R.id.spinner2);\n btnSubmit = (Button) findViewById(R.id.btnSubmit);\n\n btnSubmit.setOnClickListener(new View.OnClickListener() {\n\n @Override\n public void onClick(View v) {\n\n Toast.makeText(askquestion.this,\n \"OnClickListener : \" +\n \"\\nSpinner 1 : \"+ String.valueOf(spinner1.getSelectedItem()) +\n \"\\nSpinner 2 : \"+ String.valueOf(spinner2.getSelectedItem()),\n Toast.LENGTH_SHORT).show();\n }\n\n });*/\n }",
"public void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\n \t\t\tif(pos==0){\r\n \t\t\t\tSpinner spinner = (Spinner) findViewById(R.id.CourseSpinner);\r\n \t\t\t\tspinner.setVisibility(View.GONE);\r\n \t\t\t\tspinner = (Spinner) findViewById(R.id.PlayerSpinner);\r\n \t\t\t\tspinner.setVisibility(View.GONE);\r\n\r\n \t\t\t\tcalculatePlayerStats(0);\r\n \t\t\t}\r\n \t\t\t//Spinner position is \"By Course\". Shows the course spinner\r\n \t\t\telse if(pos==1){\r\n \t\t\t\tSpinner spinner = (Spinner) findViewById(R.id.CourseSpinner);\r\n \t\t\t\tspinner.setVisibility(View.VISIBLE);\r\n \t\t\t\tspinner = (Spinner) findViewById(R.id.PlayerSpinner);\r\n \t\t\t\tspinner.setVisibility(View.GONE);\r\n\r\n //Always use the default player for now\r\n \t\t\t\tcalculateCourseStats(courseSpinnerPosition, 0);\r\n \t\t\t}\r\n \t\t\t//Spinner position is \"Other Players\". Shows the player spinner\r\n \t\t\telse{\r\n \t\t\t\tSpinner spinner = (Spinner) findViewById(R.id.CourseSpinner);\r\n \t\t\t\tspinner.setVisibility(View.GONE);\r\n \t\t\t\tspinner = (Spinner) findViewById(R.id.PlayerSpinner);\r\n \t\t\t\tspinner.setVisibility(View.VISIBLE);\r\n\r\n \t\t\t\tcalculatePlayerStats(playerSpinnerPosition);\r\n \t\t\t}\r\n \t\t}",
"public void setValue(final Object value) {\n spinner.setValue(value);\n }",
"@Override\n\t\t\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n\t\t\t\t\t\tString sel = spinner.getSelectedItem().toString();\n\t\t\t\t\t\tLog.e(\"PowerSocketSensitive\", sel + \"\");\n\t\t\t\t\t}",
"private boolean checkInputValidation(){\n if(facility_EDT_value.getText().toString().trim().isEmpty()){\n Toast.makeText(getContext(), \"Please enter search value!\", Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }",
"@Override\n\t\t\tpublic void onClick(View arg0) {\n\t\t\t\tString ans1 = editbangundatar.getText().toString();\n\t\t\t\tint answer = Integer.parseInt(editbangundatar.getText().toString());\n\t\t\t\tif(answer == 16){\n\t\t\t\t\t\n\t\t\t\t\tToast.makeText(getActivity(), \"True\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tToast.makeText(getActivity(), \"Maaf, jawaban anda salah\", Toast.LENGTH_LONG).show();\n\t\t\t\t}\n\t\t\t}",
"public void checkAssetSelected() throws ParameterValuesException {\n\t\tif (gridTaiSan.getItemCount() == 0) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần tìm kiếm tài sản muốn lập thẻ\", null);\n\t\t}\n\t\tif (gridTaiSan.getSelection()[0] == null) {\n\t\t\tthrow new ParameterValuesException(\"Bạn cần chọn tài sản muốn lập thẻ\", null);\n\t\t}\n\t}",
"@Override\n public void onClick(View v) {\n String textoPrecoAlcool = precoAlcool.getText().toString();\n String textoPrecoGasolina = precoGasolina.getText().toString();\n\n //Converter valores de string para numericos\n Double valorAlcool = Double.parseDouble(textoPrecoAlcool);\n Double valorGasolina = Double.parseDouble(textoPrecoGasolina);\n\n if( textoPrecoAlcool.isEmpty() || textoPrecoGasolina.isEmpty()){\n resultado.setText(\"Nenhum valor passado para conversão!!\");\n }else {\n Double resultadoConversao = valorAlcool/valorGasolina;\n\n if( resultadoConversao >=0.7){\n //Gasolina compensa mais\n resultado.setText(\"É melhor utilizar gasolina.\");\n }else{\n resultado.setText(\"É melhor utilizar àlcool.\");\n }\n }\n }",
"private void getUserBedroomsChoice() {\n int checkedChipId = mBinding.chipGroupBedrooms.getCheckedChipId();\n if (checkedChipId == R.id.chip_1_bedroom) {\n mChipBedroomsInput = 1;\n } else if (checkedChipId == R.id.chip_2_bedrooms) {\n mChipBedroomsInput = 2;\n } else if (checkedChipId == R.id.chip_3_bedrooms) {\n mChipBedroomsInput = 3;\n } else if (checkedChipId == R.id.chip_4_bedrooms) {\n mChipBedroomsInput = 4;\n } else if (checkedChipId == R.id.chip_5_bedrooms) {\n mChipBedroomsInput = 5;\n } else {\n mChipBedroomsInput = 0;\n }\n }",
"private void delaySpinnerStateChanged() {//GEN-FIRST:event_delaySpinnerStateChanged\r\n controller.OnTimeChange(Integer.parseInt((delaySpinner.getValue().toString().trim())));\r\n }",
"public String getIndicatorValue(WebElement element){\n wait.until(ExpectedConditions.visibilityOf(element));\n return element.getAttribute(\"value\");\n }",
"@Override\n public void onClick(View view) {\n\n if (material_type.getSelectedItem().equals(\"--Select Material Type--\")) {\n Toast.makeText(Activity_Sell.this, \"Select Material Type to continue\", Toast.LENGTH_SHORT).show();\n } else {\n\n// LoadMaterialTypeSpinner();\n alertDialog.dismiss();\n getMaterial();\n /* getMaterialClasses();\n getMaterialDetails();\n getMaterialUnits();*/\n\n }\n }",
"@Override\r\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n switch (position) {\r\n case 0:\r\n mode = 1;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n case 1:\r\n mode = 2;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n case 2:\r\n mode = 3;\r\n //mode = spinner.getSelectedItem().toString();\r\n break;\r\n }\r\n }",
"@Override\n public void onItemSelected(AdapterView<?> arg0, View arg1,\n int arg2, long arg3) {\n\n String status = spinner.getItemAtPosition(arg2).toString();\n if (status.equals(\"ACTIVE\")) {\n status = \"TRUE\";\n }\n String surname = surnameText.getText().toString();\n if (surname.isEmpty()) {\n surname = null;\n }\n\n members = MemberDAL.getInstance(getBaseContext()).filterHospital(surname, status.equals(\"TRUE\"));\n\n MemberAdapter recyclerAdapter = new MemberAdapter(members);\n mRecyclerView.setAdapter(recyclerAdapter);\n mRecyclerView.setLayoutManager(new LinearLayoutManager(getBaseContext()));\n }",
"void checkUserName() {\n usernameChecked = false;\n signInUpController.checkUserName(userNameText.getText().toString(), new OnTaskListeners.Bool() {\n @Override\n public void onSuccess(Boolean result) {\n usernameChecked = true;\n if (result)\n uniqueUsername = false;\n else\n uniqueUsername = true;\n\n\n }\n });\n }",
"private void setSpinner(){\n for (String id : activity.getCollectedIDs()){\n if (activity.getCoinsCollection().containsKey(id)) {\n Coin tempCoin = activity.getCoinsCollection().get(id);\n assert tempCoin != null;\n if(!tempCoin.isBanked() && !tempCoin.isTransferred()) {\n spinnerItems.add(tempCoin);\n }\n }\n }\n\n //sort coins on gold value descending\n spinnerItems.sort((a, b) ->\n a.getValue() * activity.getExchangeRates().get(a.getCurrency())\n < b.getValue() * activity.getExchangeRates().get(b.getCurrency()) ? 1 : -1);\n\n ArrayAdapter<Coin> spinnerArrayAdapter = new ArrayAdapter<>(Objects.requireNonNull(getActivity()), R.layout.spinner_item, spinnerItems);\n spinnerArrayAdapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n\n spinner.setAdapter(spinnerArrayAdapter);\n }",
"@Override\n public void onLoadFinished(Loader<List<Integer>> loader, List<Integer> flagIntegers) {\n View loadingIndicator = findViewById(R.id.loading_spinner);\n loadingIndicator.setVisibility(View.GONE);\n\n // Keep data as this class attributes and update view\n if (flagIntegers.get(0) == 1) {\n Toast.makeText(StockDetail.this, getString(R.string.detail_stock_picking_validate_success), Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(StockDetail.this, getString(R.string.detail_stock_picking_validate_failed), Toast.LENGTH_LONG).show();\n }\n getLoaderManager().destroyLoader(VALIDATE_STOCK_PICKING_LOADER_ID);\n }",
"@Ignore\n @Test\n public void It_should_selected_percent_correctly() {\n onView(allOf(\n withId(R.id.simple_percentage_bar_view_selected_linear_layout),\n isDescendantOfA(withId(R.id.simple_percentage_bar))))\n .check(matches(withText(SELECTED_VALUE)));\n }",
"public boolean getValue()\n\t{\n\t\tString tmp;\n\t\tpatt = Pattern.compile(NAME_PATTERN);\n\t\ttmp = name.getText().toString();\n\t\tif(patt.matcher(tmp).matches()){\n\t\t\tvname = tmp;\n\t\t}\n\t\telse{\n\t\t\tname.setError(getString(R.string.error_nameTxt));\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\ttmp = home.getText().toString();\n\t\tif(tmp.length()!=0){\n\t\t\tif(patt.matcher(tmp).matches()){\n\t\t\t\tvhome=tmp;\n\t\t\t}\n\t\t\telse{\n\t\t\t\thome.setError(getString(R.string.error_homeTXt));\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\n\t}",
"public void onItemSelected(AdapterView<?> parent, View view, \r\n int pos, long id) {\n\t\tString word = (String) parent.getItemAtPosition(pos);\r\n\t\tif (!word.equalsIgnoreCase(\"select a word from this list\")) {\r\n\t\t\tToast.makeText(this, \"You selected \\\"\" + parent.getItemAtPosition(pos) + \"\\\" from the Spinner\", Toast.LENGTH_LONG).show();\r\n\t\t}\r\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\toptb=btnoptb.getText().toString();\n\t\t\t\tCheckAns(optb,currentPosition);\n\t\t\t\t//Log.e(\"ans\", optb);\n\n\t\t\t}",
"private void playerSpinnerSetup(){\r\n\t\tSpinner spinner = (Spinner) findViewById(R.id.PlayerSpinner);\r\n \t\r\n \tArrayAdapter<String> adapter = new ArrayAdapter<String>(Statistics.this, android.R.layout.simple_spinner_item, players);\r\n \tadapter.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n \tspinner.setAdapter(adapter);\r\n \t\r\n \tspinner.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n \t\tpublic void onItemSelected(AdapterView<?> parent, View view, int pos, long id) {\r\n \t\t\tcalculatePlayerStats(pos);\r\n \t\t\t\r\n \t\t\tplayerSpinnerPosition = pos;\r\n \t\t}\r\n\r\n \t\tpublic void onNothingSelected(AdapterView<?> parent) {\r\n \t\t}\r\n \t}); \t\r\n\t}",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> arg0, View arg1,\n\t\t\t\t\tint position, long arg3) {\n\t\t\t\tif (position == 1) {\n\t\t\t\t\t// show it\n\t\t\t\t\tsubjectSpinner.setVisibility(View.VISIBLE);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t// hide it\n\t\t\t\t\tsubjectSpinner.setVisibility(View.GONE);\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n\n if (s.length() > 0) {\n try {\n float value = Float.parseFloat(s.toString());\n sendBound(true, upperBoundCheck.isChecked() ,value);\n } catch (Exception e) {\n Toast toast = Toast.makeText(getActivity(), R.string.enter_valid_number,Toast.LENGTH_LONG);\n toast.show();\n }\n }\n }",
"public boolean isValidIndicator() {\r\n return validIndicator;\r\n }",
"private boolean estValide() {\n if (textFieldNom.getText() == null || textFieldNom.getText().isEmpty() || comboBoxVisibilite.getSelectionModel().getSelectedItem() == null\n || comboBoxType.getSelectionModel().getSelectedItem() == null) {\n erreurLabel.setText(\"Tous les champs doivent etre remplis\");\n return false;\n }\n erreurLabel.setText(\"\");\n return true;\n }",
"@SuppressLint(\"SetTextI18n\")\r\n @Override\r\n public void onClick(View view) {\n\r\n s1 = spinner[0].getSelectedItem().toString();\r\n s2 = spinner2[0].getSelectedItem().toString();\r\n Toast.makeText(dashboard.this, s1 + \" to \" + s2, Toast.LENGTH_SHORT).show();\r\n\r\n\r\n if (\"Mumbai\".equals(s1) && \"Mumbai\".equals(s2)) {\r\n tokens.setText(\"0 Tokens\");\r\n amount.setText(\"0\");\r\n }\r\n if (\"Mumbai\".equals(s1) && \"Panvel\".equals(s2)) {\r\n tokens.setText(\"3 Tokens\");\r\n amount.setText(\"100\");\r\n\r\n\r\n }\r\n if (\"Mumbai\".equals(s1) && \"Thane\".equals(s2)) {\r\n tokens.setText(\"1 Tokens\");\r\n amount.setText(\"40\");\r\n\r\n\r\n }\r\n if (\"Mumbai\".equals(s1) && \"Pune\".equals(s2)) {\r\n tokens.setText(\"3 Tokens\");\r\n amount.setText(\"120\");\r\n\r\n\r\n }\r\n if (\"Mumbai\".equals(s1) && \"Ratnagiri\".equals(s2)) {\r\n tokens.setText(\"5 Tokens\");\r\n amount.setText(\"150\");\r\n\r\n }\r\n if (\"Panvel\".equals(s1) && \"Panvel\".equals(s2)) {\r\n tokens.setText(\"0 Tokens\");\r\n amount.setText(\"0\");\r\n }\r\n if (\"Panvel\".equals(s1) && \"Thane\".equals(s2)) {\r\n tokens.setText(\"2 Tokens\");\r\n amount.setText(\"80\");\r\n }\r\n if (\"Panvel\".equals(s1) && \"Pune\".equals(s2)) {\r\n tokens.setText(\"3 Tokens\");\r\n amount.setText(\"120\");\r\n }\r\n if (\"Panvel\".equals(s1) && \"Ratnagiri\".equals(s2)) {\r\n tokens.setText(\"4 Tokens\");\r\n amount.setText(\"140\");\r\n\r\n }\r\n if (\"Panvel\".equals(s1) && \"Mumbai\".equals(s2)) {\r\n tokens.setText(\"3 Tokens\");\r\n amount.setText(\"100\");\r\n\r\n\r\n }\r\n if (\"Thane\".equals(s1) && \"Thane\".equals(s2)) {\r\n tokens.setText(\"0 Tokens\");\r\n }\r\n if (\"Thane\".equals(s1) && \"Pune\".equals(s2)) {\r\n tokens.setText(\"4 Tokens\");\r\n amount.setText(\"150\");\r\n\r\n\r\n }\r\n if (\"Thane\".equals(s1) && \"Ratnagiri\".equals(s2)) {\r\n tokens.setText(\"6 Tokens\");\r\n amount.setText(\"180\");\r\n\r\n }\r\n if (\"Thane\".equals(s1) && \"Mumbai\".equals(s2)) {\r\n tokens.setText(\"1 Tokens\");\r\n amount.setText(\"40\");\r\n\r\n\r\n }\r\n if (\"Thane\".equals(s1) && \"Panvel\".equals(s2)) {\r\n tokens.setText(\"2 Tokens\");\r\n amount.setText(\"80\");\r\n\r\n }\r\n if (\"Pune\".equals(s1) && \"Thane\".equals(s2)) {\r\n tokens.setText(\"4 Tokens\");\r\n amount.setText(\"160\");\r\n\r\n }\r\n if (\"Pune\".equals(s1) && \"Pune\".equals(s2)) {\r\n tokens.setText(\"0 Tokens\");\r\n amount.setText(\"0\");\r\n\r\n }\r\n if (\"Pune\".equals(s1) && \"Ratnagiri\".equals(s2)) {\r\n tokens.setText(\"3 Tokens\");\r\n amount.setText(\"120\");\r\n\r\n }\r\n if (\"Pune\".equals(s1) && \"Mumbai\".equals(s2)) {\r\n tokens.setText(\"4 Tokens\");\r\n amount.setText(\"150\");\r\n\r\n }\r\n if (\"Pune\".equals(s1) && \"Panvel\".equals(s2)) {\r\n tokens.setText(\"4 Tokens\");\r\n amount.setText(\"160\");\r\n\r\n }\r\n if (\"Ratnagiri\".equals(s1) && \"Thane\".equals(s2)) {\r\n tokens.setText(\"6 Tokens\");\r\n amount.setText(\"180\");\r\n\r\n\r\n }\r\n if (\"Ratnagiri\".equals(s1) && \"Pune\".equals(s2)) {\r\n tokens.setText(\"4 Tokens\");\r\n amount.setText(\"160\");\r\n\r\n }\r\n if (\"Ratnagiri\".equals(s1) && \"Ratnagiri\".equals(s2)) {\r\n tokens.setText(\"0 Tokens\");\r\n amount.setText(\"0\");\r\n }\r\n if (\"Ratnagiri\".equals(s1) && \"Mumbai\".equals(s2)) {\r\n tokens.setText(\"6 Tokens\");\r\n amount.setText(\"180\");\r\n\r\n }\r\n if (\"Ratnagiri\".equals(s1) && \"Panvel\".equals(s2)) {\r\n tokens.setText(\"5 Tokens\");\r\n amount.setText(\"150\");\r\n\r\n }\r\n if (\"Select Source Location\".equals(s1) || \"Select Destination Location\".equals(s2)) {\r\n Toast.makeText(dashboard.this, \" Please Choose both Source and Destination \", Toast.LENGTH_SHORT).show();\r\n\r\n }\r\n\r\n\r\n }",
"private void spinner() {\n spn_semester.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n id_database = position;\n if(spn_semester.getSelectedItemPosition() == 0){\n listadaptor1();\n }\n else if(spn_semester.getSelectedItemPosition() == 1){\n listadaptor2();\n }\n else{\n listadaptor3();\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing\n }\n });\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tInteger Amount = Integer.valueOf(editText.getText().toString());\n\t\t\t\t\t\t\tif ((Amount > 0) && (Amount <= item.GetNItem())){\n\t\t\t\t\t\t\t\tMainGameActivity.getPlayerFromBackpack().SetMoney(MainGameActivity.getPlayerFromBackpack().GetMoney() + Amount * item.GetPrice() / 2);\n\t\t\t\t\t\t\t\titem.SetNItem(item.GetNItem() - Amount);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tshowSellItem();\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* Showing message that Amount is not valid */\n\t\t\t\t\t\t\t\tTextView textError = (TextView) dialog.findViewById(R.id.messageItem);\n\t\t\t\t\t\t\t\ttextError.setText(\"Amount is not valid!\");\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"private void loadSupplierSpinner() {\n //Retrieve Suppliers list from database\n ArrayList<String> suppliers = getAllSuppliers();\n //Create Adapter for Spinner\n spinnerAdapter= new ArrayAdapter<String>(this, android.R.layout.simple_spinner_item, suppliers);\n // Specify dropdown layout style - simple list view with 1 item per line\n spinnerAdapter.setDropDownViewResource(android.R.layout.simple_dropdown_item_1line);\n // attaching data adapter to spinner\n mSpinner.setAdapter(spinnerAdapter);\n mSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener(){\n @Override\n public void onItemSelected(AdapterView<?> parent, View view, int position, long id) {\n String supplier = parent.getItemAtPosition(position).toString();\n // Showing selected spinner item\n //Toast.makeText(parent.getContext(), \"You selected: \" + supplier, Toast.LENGTH_LONG).show();\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> parent) {\n //Nothing for now\n }\n });\n }",
"@Override\n public void onClick(View v) {\n if (Model.isEmpty(rectanglePerimeterLET)) {\n rectanglePerimeterLET.setError(Html.fromHtml (\"<font color='red'>Enter value</font>\"));\n } else if (Model.isEmpty(rectanglePerimeterWET)) {\n rectanglePerimeterWET.setError(Html.fromHtml (\"<font color='red'>Enter value</font>\"));\n } else {\n double length, width, rectanglePerimeter;\n length = Double.parseDouble(rectanglePerimeterLET.getText().toString());\n width = Double.parseDouble(rectanglePerimeterWET.getText().toString());\n if (length <= 0) {\n rectanglePerimeterAnswerTV.setText(\"The variable l should be positive\");\n } else if (width <= 0) {\n rectanglePerimeterAnswerTV.setText(\"The variable w should be positive\");\n } else {\n rectanglePerimeter = 2 *(length+width);\n rectanglePerimeterAnswerTV.setText(String.format(\"%.02f\", rectanglePerimeter));\n }\n }\n }",
"@Override\n\t\t\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\t\tInteger Amount = Integer.valueOf(editText.getText().toString());\n\t\t\t\t\t\t\tif ((Amount > 0) && (Amount * item.GetPrice() <= MainGameActivity.getPlayerFromBackpack().GetMoney())){\n\t\t\t\t\t\t\t\tMainGameActivity.getPlayerFromBackpack().SetMoney(MainGameActivity.getPlayerFromBackpack().GetMoney() - Amount * item.GetPrice());\n\t\t\t\t\t\t\t\titem.SetNItem(item.GetNItem() + Amount);\n\t\t\t\t\t\t\t\tdialog.dismiss();\n\t\t\t\t\t\t\t\tshowBuyItem();\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t/* Showing message that Amount is not valid */\n\t\t\t\t\t\t\t\tTextView textError = (TextView) dialog.findViewById(R.id.messageItem);\n\t\t\t\t\t\t\t\ttextError.setText(\"Amount is not valid!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tif (spinner2.getSelectedItem().equals(\"female\")) {\n\t\t\t\t\tsex = \"female\";\n\t\t\t\t} else {\n\t\t\t\t\tsex = \"male\";\n\t\t\t\t}\n\t\t\t}",
"private boolean CheckParkSelection() {\n\t\tif (Park_ComboBox.getSelectionModel().isEmpty()) {\n\t\t\tif (!Park_ComboBox.getStyleClass().contains(\"error\"))\n\t\t\t\tPark_ComboBox.getStyleClass().add(\"error\");\n\t\t\tParkNote.setText(\"* Select park\");\n\t\t\treturn false;\n\t\t}\n\t\tPark_ComboBox.getStyleClass().remove(\"error\");\n\t\tParkNote.setText(\"*\");\n\t\treturn true;\n\t}",
"public void Operar(View vista)\n {\n String valor1 = et1.getText().toString();\n String valor2 = et2.getText().toString();\n int valor3=0;\n String texto=\"\";\n\n //Recolectamos el valor que el usuario ha marcado en el spinner\n String seleccionada = spinner.getSelectedItem().toString();\n\n //Si es sumar\n if(seleccionada.compareTo(\"Sumar\")==0)\n {\n valor3 = Integer.parseInt(valor1) + Integer.parseInt(valor2);\n texto = \"El valor de la Suma es: \"+valor3;\n }\n\n //Si es restar\n if(seleccionada.compareTo(\"Restar\")==0)\n {\n valor3 = Integer.parseInt(valor1) - Integer.parseInt(valor2);\n texto = \"El valor de la Resta es: \"+valor3;\n }\n\n //Si es multiplicar\n if(seleccionada.compareTo(\"Multiplicar\")==0)\n {\n valor3 = Integer.parseInt(valor1) * Integer.parseInt(valor2);\n texto = \"El valor de la Multiplicación es: \"+valor3;\n }\n\n //Si es dividir\n if(seleccionada.compareTo(\"Dividir\")==0)\n {\n valor3 = Integer.parseInt(valor1) / Integer.parseInt(valor2);\n texto = \"El valor de la Division es: \"+valor3;\n }\n\n //Si es mod\n if(seleccionada.compareTo(\"Modulo\")==0)\n {\n valor3 = Integer.parseInt(valor1) % Integer.parseInt(valor2);\n texto = \"El valor del Modulo es: \"+valor3;\n }\n\n tv3.setText(texto);\n }"
] | [
"0.699879",
"0.69299346",
"0.66384095",
"0.6524352",
"0.637915",
"0.63556224",
"0.6293214",
"0.6290685",
"0.62118995",
"0.61599135",
"0.61116034",
"0.6103301",
"0.6070524",
"0.6064544",
"0.6049819",
"0.59938353",
"0.5951198",
"0.59428513",
"0.5941995",
"0.5918427",
"0.5916004",
"0.5906611",
"0.5904598",
"0.5900689",
"0.5897766",
"0.58840925",
"0.5868355",
"0.58620656",
"0.58227354",
"0.5805375",
"0.5791453",
"0.57510024",
"0.57249206",
"0.57145345",
"0.5698542",
"0.56852174",
"0.5680979",
"0.56783366",
"0.5674442",
"0.5664763",
"0.56631005",
"0.5643934",
"0.56366223",
"0.5631409",
"0.5620021",
"0.561548",
"0.56124496",
"0.5605592",
"0.558747",
"0.5583527",
"0.5577727",
"0.55602163",
"0.55587006",
"0.554427",
"0.5525094",
"0.55140716",
"0.5513713",
"0.5507526",
"0.5505862",
"0.5504176",
"0.5492081",
"0.54867876",
"0.5476126",
"0.5463997",
"0.5455569",
"0.5440535",
"0.5437301",
"0.5431527",
"0.5427325",
"0.5417746",
"0.5415815",
"0.540952",
"0.54079217",
"0.54071075",
"0.5406539",
"0.53949183",
"0.5386815",
"0.53844935",
"0.53822905",
"0.53810865",
"0.5366809",
"0.53663033",
"0.5366147",
"0.5359345",
"0.53593105",
"0.53580296",
"0.5347567",
"0.5344016",
"0.53375536",
"0.53329176",
"0.53311497",
"0.53265345",
"0.5323034",
"0.5319167",
"0.53165704",
"0.5312287",
"0.5311353",
"0.53101814",
"0.53062856",
"0.5304216"
] | 0.54559225 | 64 |
If textview is clicked, we'll add an edit text box for typing a number in | public void MonitorTextView()
{
TextView textview = (TextView) findViewById(R.id.textViewDelayLength);
textview.setOnClickListener(new View.OnClickListener()
{
@Override
public void onClick(View v) {
EditText editText = (EditText) findViewById(R.id.editTextMessageDelay);
SeekBar seek = (SeekBar) findViewById(R.id.seekBarMessageDelay);
if (editText.getVisibility() == View.GONE)
{
editText.setVisibility(View.VISIBLE);
seek.setVisibility(View.GONE);
}
else if (editText.getVisibility() == View.VISIBLE)
{
editText.setVisibility(View.GONE);
seek.setVisibility(View.VISIBLE);
}
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void numberEvent(View view) {\n if (isNewOp)\n input.setText(\"\");\n isNewOp = false;\n String number = input.getText().toString();\n switch (view.getId()) {\n case R.id.oneBTN:\n number += \"1\";\n break;\n case R.id.twoBTN:\n number += \"2\";\n break;\n case R.id.threeBTN:\n number += \"3\";\n break;\n case R.id.fourBTN:\n number += \"4\";\n break;\n case R.id.fiveBTN:\n number += \"5\";\n break;\n case R.id.sixBTN:\n number += \"6\";\n break;\n case R.id.sevenBTN:\n number += \"7\";\n break;\n case R.id.eightBTN:\n number += \"8\";\n break;\n case R.id.nineBTN:\n number += \"9\";\n break;\n case R.id.zeroBTN:\n number += \"0\";\n break;\n case R.id.pointBTN:\n number += \".\";\n break;\n }\n input.setText(number);\n }",
"@Override\n\t\t\tpublic void onItemClick(AdapterView<?> parent, View view,\n\t\t\t\t\tint position, long id) {\n\t\t\t\tgrid_num_tv = (TextView) view.findViewById(R.id.grid_num_textView);\n\t\t\t\tString num = phone_num_edt.getText().toString() + grid_num_tv.getText().toString();\n\t\t\t\t\n\t\t\t\tnumber.add(grid_num_tv.getText().toString());\n\t\t\t\tphone_num_edt.setText(num);\n\t\t\t\t// to place the edittext cursor always right side of the entered number\n\t\t\t\tphone_num_edt.setSelection(phone_num_edt.getText().length());\n\t\t\t}",
"public void onClick(View view){ // that executes the following code.\n // Take the text input to the EditText field...\n String changeText = editV.getText().toString();\n // and set the TextView to that input.\n textV.setText(changeText);\n }",
"private void display() {\n TextView textview = (TextView) findViewById(R.id.textView);\n EditText editText = (EditText) findViewById(R.id.editNumber) ;\n textview.setText(\"TEXT\");\n editText.setText(\"\");\n\n }",
"@Override\n public void onClick(View view) {\n phoneNumberEditText.setText(phoneNumberEditText.getText().toString() + ((Button)view).getText().toString());\n }",
"public void OnNumberButtonClick (View v){\n try {\n Button b = (Button) v;\n if (mIsCalculating == false)\n expressionView.setText(\"\");\n if (mIsTyping == false) {\n resultView.setText(b.getText());\n mIsTyping = true;\n } else {\n resultView.setText(resultView.getText().toString() + b.getText());\n }\n } catch (Exception e) {\n\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\n\t\t\t\tif(0 != phone_num_edt.getText().length()){\n\t\t\t\t\t// To delete the last character in edittext\n\t\t\t\t\tphone_num_edt.getText().delete(phone_num_edt.getText().length() - 1,\n\t\t\t\t\t\t\tphone_num_edt.getText().length());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}",
"@Override\n public void onClick(View v) {\n String inputFieldText = ((TextView) findViewById(R.id.inputField)).getText().toString();\n\n // Set text to custom text, or if custom text is empty set to default hint\n if (inputFieldText.isEmpty()) {\n ((TextView) findViewById(R.id.text)).setText(\"Enter your OWN text!\");\n } else {\n ((TextView) findViewById(R.id.text)).setText(inputFieldText);\n }\n }",
"@Override\n public void onClick(View view) {\n String phoneNumber = phoneNumberEditText.getText().toString();\n // atata timp cat exista caractere in EditText => ele pot fi sterse\n if (phoneNumber.length() > 0) {\n // se sterge mereu ultima cifra / ultimul caracter\n phoneNumber = phoneNumber.substring(0, phoneNumber.length() - 1);\n phoneNumberEditText.setText(phoneNumber);\n }\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(phone_num_edt.getText().length() != 0){\n\t\t\t\t\tIntent callIntent = new Intent(Intent.ACTION_CALL);\n\t\t\t\t callIntent.setData(Uri.parse(\"tel:\" + phone_num_edt.getText().toString()));\n\t\t\t\t startActivity(callIntent);\n\t\t\t\t}else{\n\t\t\t\t\tphone_num_edt.setText(list.get(0).getCallnumber());\n\t\t\t\t\tphone_num_edt.setSelection(phone_num_edt.getText().length());\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onClick(View view) {\n\n if (false == String.valueOf(texto.getText()).isEmpty() && Integer.valueOf(String.valueOf(texto.getText())) > 0) {\n\n switch (contador) {\n\n case 0:\n case 1:\n\n\n valores[contador] = Integer.valueOf(String.valueOf(texto.getText()));\n\n contador++;\n\n texto.setText(\"\");\n\n texto.setHint(preguntas[contador - 1]);\n\n break;\n\n case 2:\n\n valores[2] = Integer.valueOf(String.valueOf(texto.getText()));\n\n cambiarPantalla(view);\n\n break;\n\n\n }\n\n } else {\n\n Toast.makeText(IntroducirDatosTemporizador.this, getString(R.string.inserteValor), Toast.LENGTH_LONG).show();\n\n }\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"9\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"9\");\n\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t}",
"public void add1(View view) {\n num+=1;\n n.setText(\"\"+num);\n }",
"private void display(int number) {\r\n TextView quantity_txt = (TextView) findViewById(R.id.quantity_textview);\r\n quantity_txt.setText(\"\" + number);\r\n }",
"public void setText(int str) { this.editText.setText(str); }",
"public void addNumbers (View view) {\n errorTrap();\n double sum = Double.parseDouble(num1.getText().toString()) + Double.parseDouble(num1.getText().toString());\n result.setText(\"SUM: \"+sum);\n }",
"@Override\r\n\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\ttx.setText(editText.getText().toString());\r\n\t\t\t\t\t}",
"public void buttonMod (View view){ expressionView.setText(expressionView.getText() + \"Mod\");}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tmListener.onAddPress(editContent.getEditableText().toString());\r\n\t\t\t\tdialog.dismiss();\r\n\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString no1=num1.getText().toString();\n\t\t\t\tfinal int num11=Integer.parseInt(no1);\n\t\t\t\t\n\t\t\t\tString no2=num2.getText().toString();\n\t\t\t\tfinal int num12=Integer.parseInt(no2);\n\t\t\t\tres=num11+num12;\n\t\t\t\tresult.setText(Integer.toString(res));\n\t\t\t\t\n\t\t\t}",
"private void addEdit(final int pos) {\n\t\tfinal AlertDialog.Builder b = new AlertDialog.Builder(this);\n\t\tb.setTitle(R.string.add_number);\n\t\tb.setCancelable(true);\n\t\tfinal EditText et = new EditText(this);\n\t\tif (pos >= 0) {\n\t\t\tet.setText(this.objects.get(pos));\n\t\t}\n\t\tb.setView(et);\n\t\tb.setNegativeButton(android.R.string.cancel, null);\n\t\tb.setPositiveButton(android.R.string.ok,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final DialogInterface dialog,\n\t\t\t\t\t\t\tfinal int which) {\n\t\t\t\t\t\tfinal String number = et.getText().toString();\n\t\t\t\t\t\tif (number == null || number.length() == 0) {\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tPreferences.this.setNumber(pos, number);\n\t\t\t\t\t\tPreferences.this.findViewById(R.id.add_hint)\n\t\t\t\t\t\t\t\t.setVisibility(View.GONE);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tb.setNeutralButton(R.string.contacts,\n\t\t\t\tnew DialogInterface.OnClickListener() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void onClick(final DialogInterface dialog,\n\t\t\t\t\t\t\tfinal int which) {\n\t\t\t\t\t\tfinal Intent intent = ContactsWrapper.getInstance()\n\t\t\t\t\t\t\t\t.getPickPhoneIntent();\n\t\t\t\t\t\tPreferences.this\n\t\t\t\t\t\t\t\t.startActivityForResult(intent, pos + 1);\n\t\t\t\t\t}\n\t\t\t\t});\n\t\tb.show();\n\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"3\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"3\");\n\t\t\t\t\t\t\t}\t\t\n\t\t\t\t\t\t}",
"@Override\r\n\t\t\tpublic boolean onKey(View v, int keyCode, KeyEvent event) {\n\t\t if ((event.getAction() == KeyEvent.ACTION_DOWN) &&\r\n\t\t (keyCode == KeyEvent.KEYCODE_ENTER)) {\r\n\t\t \t\r\n\t\t \tInteger position = (Integer)v.getTag();\r\n\t\t \t\r\n\t\t \tlistNumeric.get(position).setValeur(((EditText)v).getText().toString());\r\n\t\t \t\r\n\t\t\t\t\t//On pr�vient les listeners qu'il y a eu un clic sur l'EditText.\r\n\t\t\t\t\tsendListener(listNumeric.get(position), position);\r\n\t\t\t\t\tv.invalidate();\r\n\t\t\t\t\treturn true;\r\n\t\t }\r\n\t\t return false;\r\n\t\t\t}",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n\n }",
"private void display(int number)\n {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"4\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"4\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"6\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"6\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public void button0OnClick(View view){ display.setText(display.getText()+ \"0\");}",
"public void onClick(View view) {\n if(Ingredient.getText().length()>=0) {\n newRecipe.ingredients.add(Ingredient.getText().toString());\n //erase text box for next usage\n Ingredient.setText(\"\");\n\n }\n else {\n\n }\n\n }",
"@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_DEL) {\n // this is for backspace\n if(edtCodeNumber3.getSelectionStart() <= 0) {\n edtCodeNumber2.setText(\"\");\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n // do something\n edtCodeNumber2.requestFocus();\n }\n }, 50);\n }\n } else if (edtCodeNumber3.getText().toString().length() == 1)\n edtCodeNumber4.requestFocus();\n return false;\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView)\n findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n\n }",
"@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_DEL) {\n // this is for backspace\n if(edtCodeNumber5.getSelectionStart() <= 0) {\n edtCodeNumber4.setText(\"\");\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n // do something\n edtCodeNumber4.requestFocus();\n }\n }, 50);\n }\n } else if(edtCodeNumber5.getText().toString().length() == 1)\n edtCodeNumber6.requestFocus();\n return false;\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"2\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"2\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_DEL) {\n // this is for backspace\n if(edtCodeNumber4.getSelectionStart() <= 0) {\n edtCodeNumber3.setText(\"\");\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n // do something\n edtCodeNumber3.requestFocus();\n }\n }, 50);\n }\n } else if(edtCodeNumber4.getText().toString().length() == 1)\n edtCodeNumber5.requestFocus();\n return false;\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"5\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"5\");\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tTextView tv1 = (TextView) findViewById(R.id.textView1);\n\t\t\t\tTextView tv2 = (TextView) findViewById(R.id.textView2);\n\t\t\t\tTextView tv3 = (TextView) findViewById(R.id.textView3);\n\t\t\t\t\n\t\t\t\tint a = Integer.parseInt(tv1.getText().toString());\n\t\t\t\tint b = Integer.parseInt(tv2.getText().toString());\n\t\t\t\tHelloCal cal = new HelloCal();\n\t\t\t\tint c = cal.helloAdd(a,b);\n\t\t\t\tString str = cal.helloSay(); \n\t\t\t\ttv3.setText(str + Integer.toString(c));\n\t\t\t}",
"public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (edtCodeNumber2.getText().toString().length() == 1) //size as per your requirement\n {\n edtCodeNumber3.requestFocus();\n }\n }",
"public void onAddText(View view){\n setPage(view);\n int index = deleteView(view);\n addTextField(\"label:\", \"\", index);\n Toast.makeText(this, \"Short Query Added\", Toast.LENGTH_LONG).show();\n }",
"@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_DEL) {\n // this is for backspace\n if (edtCodeNumber2.getSelectionStart() <= 0) {\n edtCodeNumber1.setText(\"\");\n\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n public void run() {\n // do something\n edtCodeNumber1.requestFocus();\n }\n }, 50);\n }\n } else if(edtCodeNumber2.getText().toString().length() == 1)\n edtCodeNumber3.requestFocus();\n return false;\n }",
"public void onClickToJoEllen(View v) {\n SpannableStringBuilder activeValueSpan = (SpannableStringBuilder) mActiveValue.getText();\n String activeValueStr = activeValueSpan.toString();\n SpannableStringBuilder scoreSpan = (SpannableStringBuilder) jeScore.getText();\n String scoreVal1 = scoreSpan.toString();\n int addNum = Integer.parseInt(activeValueStr);\n int oldNum = Integer.parseInt(scoreVal1);\n int newNum = oldNum + addNum;\n int i = 1;\n jeScore.setText(Integer.toString(newNum));\n mActiveValue.setText(R.string.initval);\n db.enterScore(PLAYER1, addNum);\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"7\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"7\");\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}",
"public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (edtCodeNumber4.getText().toString().length() == 1) //size as per your requirement\n {\n edtCodeNumber5.requestFocus();\n }\n }",
"@Override\n public void onClick(View view) {\n //switch statement to determine which button was cliked\n switch (view.getId()){\n //case when number one was clicked\n case R.id.one:\n //if the the screen shows 0 then we just replace the 0 with 1, and set currentNumber\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(one.getText().toString());\n currentNumber = one.getText().toString();\n }else{\n //if the screen shows something besides 0, we concatenate whatever was on the\n //screen before plus the 1, and put it on the screen, and update current number\n //accordingly\n screen.setText(screen.getText().toString() + one.getText().toString());\n currentNumber = currentNumber + one.getText().toString();\n }\n break;\n\n //cases two - zero are same as case one except the number changes\n case R.id.two:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(two.getText().toString());\n currentNumber = two.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + two.getText().toString());\n currentNumber = currentNumber + two.getText().toString();\n }\n break;\n\n case R.id.three:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(three.getText().toString());\n currentNumber = three.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + three.getText().toString());\n currentNumber = currentNumber + three.getText().toString();\n }\n break;\n\n case R.id.four:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(four.getText().toString());\n currentNumber = four.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + four.getText().toString());\n currentNumber = currentNumber + four.getText().toString();\n }\n break;\n\n case R.id.five:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(five.getText().toString());\n currentNumber = five.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + five.getText().toString());\n currentNumber = currentNumber + five.getText().toString();\n }\n break;\n\n case R.id.six:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(six.getText().toString());\n currentNumber = six.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + six.getText().toString());\n currentNumber = currentNumber + six.getText().toString();\n }\n break;\n\n case R.id.seven:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(seven.getText().toString());\n currentNumber = seven.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + seven.getText().toString());\n currentNumber = currentNumber + seven.getText().toString();\n }\n break;\n\n case R.id.eight:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(eight.getText().toString());\n currentNumber = eight.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + eight.getText().toString());\n currentNumber = currentNumber + eight.getText().toString();\n }\n break;\n\n case R.id.nine:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(nine.getText().toString());\n currentNumber = nine.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + nine.getText().toString());\n currentNumber = currentNumber + nine.getText().toString();\n }\n break;\n\n case R.id.zero:\n if(screen.getText().toString().equals(\"0\")) {\n screen.setText(zero.getText().toString());\n currentNumber = zero.getText().toString();\n }else{\n screen.setText(screen.getText().toString() + zero.getText().toString());\n currentNumber = currentNumber + zero.getText().toString();\n\n }\n break;\n\n //case plus, minus, multiply, and divide are very similar, so comments here can be used\n //for all\n //When plus is clicked we will add the current number and plus sign to the numberAndOperands array\n //and update the screen accordingly\n case R.id.plus:\n //if the user is not performing operation on a result of a previous calculation\n //then this if statement will run\n if(!isContinueFromResult) {\n //if current number is not equal to \"\" that means user has a number before this\n //plus sign.\n if(!currentNumber.equals(\"\")) {\n //so we add the currentNumber and the + sign to the array list of Operands\n //and numbers and update the screen accordingly\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"+\");\n screen.setText(screen.getText().toString() + plus.getText().toString());\n }\n //if the current number is \"\" that means that the user is trying to click an\n //operand right after another operand. So in that case we do the following\n else{\n //replace the last operand with current operand\n String newScreen = screen.getText().toString().substring(0, screen.getText().toString().length() - 1) + \"+\";\n numbersAndOperands.remove(numbersAndOperands.size() - 1);\n numbersAndOperands.add(\"+\");\n screen.setText(newScreen);\n }\n }\n //else means that the user is performing an operation on a result from previous\n //calculations\n else{\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"+\");\n //so instead of updating the screen from what it already had, we update it\n //with current number and the operand, because inside the equals case the\n //current number is being set to the result of calculations\n screen.setText(currentNumber + plus.getText().toString());\n isContinueFromResult = false;\n }\n }\n //in the end we set the current number to \"\" because we want to keep track of\n //when the user is clicking numbers are Operands\n currentNumber = \"\";\n break;\n\n case R.id.minus:\n if(!isContinueFromResult) {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"-\");\n screen.setText(screen.getText().toString() + minus.getText().toString());\n }else{\n //replace the last operand with current\n String newScreen = screen.getText().toString().substring(0, screen.getText().toString().length() - 1) + \"-\";\n numbersAndOperands.remove(numbersAndOperands.size() - 1);\n numbersAndOperands.add(\"-\");\n screen.setText(newScreen);\n }\n }else {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"-\");\n screen.setText(currentNumber + minus.getText().toString());\n isContinueFromResult = false;\n }\n }\n currentNumber = \"\";\n break;\n\n case R.id.multiply:\n if(!isContinueFromResult) {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"*\");\n screen.setText(screen.getText().toString() + multiply.getText().toString());\n }else{\n //replace the last operand with current\n String newScreen = screen.getText().toString().substring(0, screen.getText().toString().length() - 1) + \"*\";\n numbersAndOperands.remove(numbersAndOperands.size() - 1);\n numbersAndOperands.add(\"*\");\n screen.setText(newScreen);\n }\n }else {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"*\");\n screen.setText(currentNumber + multiply.getText().toString());\n isContinueFromResult = false;\n }\n }\n currentNumber = \"\";\n break;\n\n case R.id.divide:\n if(!isContinueFromResult) {\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"/\");\n screen.setText(screen.getText().toString() + divide.getText().toString());\n }else{\n //replace the last operand with current\n String newScreen = screen.getText().toString().substring(0, screen.getText().toString().length() - 1) + \"/\";\n numbersAndOperands.remove(numbersAndOperands.size() - 1);\n numbersAndOperands.add(\"/\");\n screen.setText(newScreen);\n }\n }else{\n if(!currentNumber.equals(\"\")) {\n numbersAndOperands.add(currentNumber);\n numbersAndOperands.add(\"/\");\n screen.setText(currentNumber + divide.getText().toString());\n isContinueFromResult = false;\n }\n }\n currentNumber = \"\";\n break;\n\n\n\n case R.id.equals:\n //the following if statement will add the last number to the numbersAndOperands array\n if(!currentNumber.equals(\"\")){\n numbersAndOperands.add(currentNumber);\n }\n\n //if the last thing in the array numbersAndOperands is +-*/ that means it is an invalid\n //and we tell the user and it is invalid and do not do any calculations\n if(numbersAndOperands.get(numbersAndOperands.size() - 1).equals(\"+\") ||\n numbersAndOperands.get(numbersAndOperands.size() - 1).equals(\"-\") ||\n numbersAndOperands.get(numbersAndOperands.size() - 1).equals(\"*\") ||\n numbersAndOperands.get(numbersAndOperands.size() - 1).equals(\"/\")){\n Toast.makeText(getActivity(), \"Invalid\", Toast.LENGTH_SHORT).show();\n }\n //When the last thing in the array of numbersAndOperands is a number then we can\n //do the following and calculate the result\n else {\n numbersAndOperands.add(\"=\");\n currentNumber = \"\";\n screen.setText(screen.getText().toString() + equals.getText().toString());\n\n //find all the multiplications and divisions first, and do the calculations\n for (int i = 1; i < numbersAndOperands.size(); i++) {\n if (numbersAndOperands.get(i).equals(\"*\") || numbersAndOperands.get(i).equals(\"/\")) {\n if (numbersAndOperands.get(i).equals(\"*\")) {\n double n1 = Double.parseDouble(numbersAndOperands.get(i - 1));\n double n2 = Double.parseDouble(numbersAndOperands.get(i + 1));\n double result = n1 * n2;\n\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i - 1);\n numbersAndOperands.add(i - 1, result + \"\");\n i--;\n\n } else {\n double n1 = Double.parseDouble(numbersAndOperands.get(i - 1));\n double n2 = Double.parseDouble(numbersAndOperands.get(i + 1));\n double result = n1 / n2;\n\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i - 1);\n numbersAndOperands.add(i - 1, result + \"\");\n i--;\n }\n }\n }\n\n //find all the plus and minus and do the calculations\n for (int i = 1; i < numbersAndOperands.size(); i++) {\n if (numbersAndOperands.get(i).equals(\"+\") || numbersAndOperands.get(i).equals(\"-\")) {\n if (numbersAndOperands.get(i).equals(\"+\")) {\n double n1 = Double.parseDouble(numbersAndOperands.get(i - 1));\n double n2 = Double.parseDouble(numbersAndOperands.get(i + 1));\n double result = n1 + n2;\n\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i - 1);\n numbersAndOperands.add(i - 1, result + \"\");\n i--;\n } else {\n\n double n1 = Double.parseDouble(numbersAndOperands.get(i - 1));\n double n2 = Double.parseDouble(numbersAndOperands.get(i + 1));\n double result = n1 - n2;\n\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i);\n numbersAndOperands.remove(i - 1);\n numbersAndOperands.add(i - 1, result + \"\");\n i--;\n }\n }\n }\n\n //display the answer and prepare for the next round of the calculations if\n //the user were to perform calculations on the result\n screen.setText(screen.getText().toString() + numbersAndOperands.get(0));\n currentNumber = numbersAndOperands.get(0);\n numbersAndOperands.clear();\n isContinueFromResult = true;\n }\n break;\n\n //here we reset everything we are using to keep track of order of operations and all\n case R.id.clear:\n numbersAndOperands.clear();\n currentNumber = \"0\";\n screen.setText(\"0\");\n break;\n }\n\n\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (edtCodeNumber1.getText().toString().length() == 1) //size as per your requirement\n {\n edtCodeNumber2.requestFocus();\n }\n }",
"@Override\n public boolean onKey(View v, int keyCode, KeyEvent event) {\n if (keyCode == KeyEvent.KEYCODE_DEL) {\n // this is for backspace\n edtCodeNumber1.setText(\"\");\n } else if(edtCodeNumber1.getText().toString().length() == 1) {\n edtCodeNumber2.requestFocus();\n }\n return false;\n }",
"public void onTextChanged(CharSequence s, int start, int before, int count) {\n if (edtCodeNumber5.getText().toString().length() == 1) //size as per your requirement\n {\n edtCodeNumber6.requestFocus();\n }\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Utility.hideKeyBoard(editText, mContext);\n if (editText.getText().toString().trim().length() > 0) {\n motor_no.setText(editText.getText().toString().trim());\n } else {\n motor_no.setText(\"\");\n }\n }",
"@Override\n public void onClick(DialogInterface dialog, int which) {\n Utility.hideKeyBoard(editText, mContext);\n if (editText.getText().toString().trim().length() > 0) {\n pump_no.setText(editText.getText().toString().trim());\n } else {\n pump_no.setText(\"\");\n }\n }",
"@Override\n public void onClick(View v) {\n Integer amount_tries = (Integer.parseInt(tries_tv.getText().toString()) + 1);\n // putting it back as a String\n String new_tries = amount_tries.toString();\n // updating the tries textview to incremented value\n tries_tv.setText(new_tries);\n\n }",
"@Override\n public void onClick(View v) {\n String inputText = inputEditText.getText().toString();\n\n // Show the user's input text\n messageTextView.setText(inputText);\n\n }",
"private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\"+ number);\n }",
"private void displayQuantity(int number) {\n TextView ob = findViewById(R.id.quantity_text_view);\n ob.setText(\"\"+number);\n }",
"public void onClick(View v) {\n \tsetTxtViews();\n }",
"private void display(int number){\n TextView quantTV = (TextView) findViewById(R.id.quant_tv);\n quantTV.setText(\"\"+ number);\n }",
"private void appendText()\n\t{\n\t\tString fieldText = \"\";\n\t\tString newText = \"\";\n\t\tfieldText = entry.getText();\n\t\t\n\t\tif(fieldText.equals (\"0\"))\n\t\t{\n\t\t\tnewText += append;\n\t\t\tfieldText = newText;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tfieldText += append;\n\t\t\tentry.setText (fieldText);\n\t\t}\n\t\t\n\t\tentry.grabFocus ( );\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tif(phoneet.getText().toString().length()==11){\r\n\t\t\t\t\tphonell.setVisibility(View.GONE);\r\n\t\t\t\t\tyanzhengmall.setVisibility(View.VISIBLE);\r\n\t\t\t\t\tphonetv.setTextColor(getResources().getColor(R.color.bg_Black));\r\n\t\t\t\t\tyanzhengmatv.setTextColor(getResources().getColor(R.color.top_background));\r\n\t\t\t\t}else{\r\n\t\t\t\t\tToastUtil.showToast(RegisterActivity.this, \"手机号格式不正确\");\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n public void onClick(View view) {\n String phoneNumber = supplierPhoneEditText.getText().toString().trim();\n Intent intent = new Intent(Intent.ACTION_DIAL);\n intent.setData(Uri.parse(\"tel:\" + phoneNumber));\n startActivity(intent);\n }",
"@Override\n\t\tpublic void onClick(View v) {\n\t\t\t\t\n\t\t\tlist.add(et.getText().toString());\n\t\t\tadd();\n\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"8\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"8\");\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}",
"@Override\n public void onClick(View v) {\n String textoDigitado = caixaTexto.getText().toString();\n\n if (textoDigitado.isEmpty()) {\n // String vazia\n AlertDialog.Builder dialogo = new AlertDialog.Builder(MainActivity.this);\n dialogo.setMessage(\"Digite a idade do Cachorro!\");\n dialogo.setNeutralButton(\"Ok\", null);\n dialogo.show();\n\n } else {\n\n int valorDigitado = Integer.parseInt(textoDigitado);\n int resultadoFinal = valorDigitado * 7;\n\n resultadoIdade.setText(\"A idade do cachorro em anos humanos é \" + resultadoFinal + \" ano(s)\");\n\n }\n }",
"private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"public void b0 (View v) {\n Addtxt(\"0\");\n }",
"private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(number);\n }",
"@Override\n public void handle(KeyEvent t) {\n if(!receiver_id.getText().matches(\"[0-9]*\"))\n {\n receiver_id.setText(receiver_id.getText().replaceAll(\"[^\\\\d]\", \"\"));\n receiver_id.selectPositionCaret(receiver_id.getLength());receiver_id.deselect();\n }\n }",
"private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.valueOf(number));\n //quantityTextView.setText(new Integer(number).toString());\n }",
"@Override\r\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tBeginNewText();\r\n\t\t\t}",
"@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\tBoolean isBlank=false;\n\t\t\t\t\n\t \tint ldi=0;\n\t \tint rdi=0;\n\t \tDouble bqi=0.0;\n\t \tDouble eqi=0.0;\n\t \tString note=\"\";\n\t \tTimestamp timeStamp=null;\n\t \t\n\t\t\t\t\t\t\n\t\t\t\t\tif(mPickedTimeText!=null)\n\t \t{\n\t\t\t\t\t\tif(timeChanged)\n\t\t\t\t\t\t{\tif(newDate!=null)\n\t\t\t\t\t\t\t\ttimeStamp=new Timestamp(newDate.getTime());\n\t\t\t\t\t\t}\n\t \t\telse\n\t \t\t{\t//Long now = Long.valueOf(System.currentTimeMillis());\n\t \tif(mState==STATE_INSERT)\n\t \t\ttimeStamp=new Timestamp(preSetTime.getTime());\n\t \tif(mState==STATE_EDIT)\n\t \t\ttimeStamp=savedTS;\n\t \t\t}\n\t \t\t\n\t \t}\n\t\t\t\t\n\t\t\t\t\tif(ldEdit!=null)\n\t \t{\tString lds=ldEdit.getText().toString();\n\t \t\tldi= InputsValidation.intValidation(lds);\n\t \t\t//Log.i(\"onClicked-rb:\",\"rb1\");\n\t \t}\n\t \n\t \t\n\t \tif(rdEdit!=null)\n\t \t{\tString rds=rdEdit.getText().toString();\n\t \t\trdi= InputsValidation.intValidation(rds);\n\t \t\t//Log.i(\"onClicked-rb:\",\"rb2\");\n\t \t}\n\t \n\t \n\t \tif(bqEdit!=null)\n\t \t{\n\t \t\tif(bqChanged)\n\t \t\t{\n\t\t \t\tString bqs=bqEdit.getText().toString();\n\t\t \t\t\n\t\t \t\tbqi= (double) InputsValidation.doubleValidation(bqs);\n\t\t \t\tif(vup.equalsIgnoreCase(\"2\"))\n\t\t \t\t\t{\n\t\t \t\t\tbqi=bqi*30.00;\n\t\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\tbqi=bqSaved;\n\t \t\t}\n\t \t\t\n\t \t}\n\t \tif(eqEdit!=null)\n\t \t{\n\t \t\tif(eqChanged)\n\t \t\t{\n\t\t \t\tString eqs=eqEdit.getText().toString();\n\t\t \t\teqi= (double) InputsValidation.doubleValidation(eqs);\n\t\t \t\tif(vup.equalsIgnoreCase(\"2\"))\n\t\t \t\t\t{\n\t\t \t\t\teqi=eqi*30.00;\n\t\t \t\t\t}\n\t \t\t}\n\t \t\telse\n\t \t\t{\n\t \t\t\teqi=eqSaved;\n\t \t\t}\n\t \t}\n\t \t\n\t \t\n\t \tFeed feed=new Feed(timeStamp, ldi, rdi, bqi, eqi, note);\n\t \t\n\t \tupdateEvent(feed);\n\t \tsetResult(RESULT_OK);\t\n\t \tfinish();\n\t\t\t\t}",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"0\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"0\");\n\t\t\t\t\t\t\t}\t\n\t\t\t\t\t\t}",
"public void onTextChanged(CharSequence s, int start,int before, int count)\n {\n if(et1.getText().toString().length()==1) //size as per your requirement\n {\n et10.requestFocus();\n }\n }",
"@Override\n public void onClick(View view) {\n String enteredQuantity = etEditQuantity.getText().toString().trim();\n\n // Check to see if quantity has been entered and set it as the quantity if it has.\n if (!enteredQuantity.equals(\"\")) {\n quantity = Integer.parseInt(enteredQuantity);\n }\n\n // Set the quantity to zero if quantity has been entered and then removed,\n // so that the buttons work properly.\n if (enteredQuantity.equals(\"\")) {\n quantity = 0;\n }\n\n // Perform action on click.\n switch (view.getId()) {\n // Action to perform when the decrease button is clicked.\n case R.id.btn_decrease:\n // Don't allow quantity to go below zero.\n if (quantity == 0) {\n Toast.makeText(this, R.string.minimum_quantity,\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n // Decrease the quantity and set the value in the quantity TextView.\n quantity--;\n etEditQuantity.setText(String.valueOf(quantity));\n break;\n\n // Action to perform when the increase button is clicked.\n case R.id.btn_increase:\n // Increase the quantity and set the value in the quantity TextView.\n quantity++;\n etEditQuantity.setText(String.valueOf(quantity));\n break;\n\n // Action to perform when the order button is clicked.\n case R.id.btn_order:\n // Create an intent to call the supplier.\n Intent callSupplier = new Intent(Intent.ACTION_DIAL);\n callSupplier.setData(Uri.parse(\"tel:\" + supplierPhoneNumber));\n // Make sure an app is installed to complete this action.\n if (callSupplier.resolveActivity(getPackageManager()) != null) {\n // Start the intent if there is an app installed to handle the intent.\n startActivity(callSupplier);\n } else {\n // Show a toast if there isn't an app installed to handle the intent.\n Toast.makeText(getApplication(), R.string.install_phone_app,\n Toast.LENGTH_SHORT).show();\n }\n }\n }",
"public void clickFunction(View view){\n Toast.makeText(MainActivity.this, \"Hi there!\", Toast.LENGTH_LONG).show();\n\n // here we've created a variable \"myTextField\" of type \"EditText\" which collect the data from the ID i.e \"myTextField\" and convert the view ID into EditText type and stores into the variable.\n EditText myTextField = (EditText) findViewById(R.id.myTextField);\n\n // here the Log.i function is used to show the info to the logcat terminal which required two fields i.e Tag & the data to show (here the data is taken from the myTextField variable created above.\n Log.i(\"Info\",myTextField.getText().toString());\n }",
"private void displayQuantity(int number) {\n TextView quantityTextView = findViewById(R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"public void onTextChanged(CharSequence s, int start,int before, int count)\n {\n if(ett9.getText().toString().length()==1) //size as per your requirement\n {\n ett10.requestFocus();\n }\n }",
"@Override\n\tpublic void onFocusChange(View v, boolean hasFocus) {\n\t\tEditText et = (EditText) v;\n\t\tString txt = et.getText().toString();\n\t\tif (txt.equals(\"\")) {\n\t\t\tet.setText(\"0\");\n\t\t}\n\t}",
"public void onClick(View view) {\n Log.d(\"Edit1\",\"EDITED1\");\n\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsetToNormalStateTextItemView();\n\n\t\t\t\tif (mInnerEditText.getText().toString().length() > 0) {\n\t\t\t\t\t// if this situation , maybe user want to continue to input and all items who are needed to hide should be hide.\n\t\t\t\t\thideAllItems();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tmInnerEditText.setCursorVisible(true);\n\t\t\t\tmInnerEditText.requestFocus();\n\n\t\t\t\tif (mOnContactEditClickListener != null) {\n\t\t\t\t\tmOnContactEditClickListener.onContactEditClick();\n\t\t\t\t}\n\n\t\t\t\t\n\t\t\t}",
"public void showText(View view) {\n EditText editText = findViewById(R.id.editText_main);\n TextView textView = findViewById(R.id.text_phonelabel);\n if (editText != null) {\n // Assign to showString both the entered string and mSpinnerLabel.\n String showString = (editText.getText().toString() +\n \" - \" + mSpinnerLabel);\n // Display a Toast message with showString\n Toast.makeText(this, showString, Toast.LENGTH_SHORT).show();\n // Set the TextView to showString.\n textView.setText(showString);\n }\n }",
"private void display(int number) {\n TextView quantityTextView = (TextView) findViewById(R.id.quantity_text_view);\n quantityTextView.setText(String.format(\"%d\", number));\n }",
"public void btnNewQuote(View view){\n setupTextView();\n newQuote();\n quoteTextView.setText(Variables.quote);\n }",
"public void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tif( txt_showresult.getText().equals( \"0\" )){ \n\t\t\t\t\t\t\t\ttxt_showresult.setText(\"1\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t// if textfield show other value , add number after the value\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\ttxt_showresult.setText( txt_showresult.getText() + \"1\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}",
"public void textBoxAction( TextBoxWidgetExt tbwe ){}",
"public void otherButton(View view, int i) {\n\t\tEditText input = (EditText) this.findViewById(R.id.input);\n\t\tString in = input.getText().toString();\n\t\tint middle = input.getSelectionStart();\n\t\tString half1 = \"\", half2 = \"\";\n\t\tif(middle == 0) {\n\t\t\thalf2 = in;\n\t\t} else if(middle == in.length()) {\n\t\t\thalf1 = in;\n\t\t} else {\n\t\t\thalf1 = in.substring(0, middle);\n\t\t\thalf2 = in.substring(middle);\n\t\t}\n\t\tswitch (i) {\n\t\tcase 1:\n\t\t\tin = half1 + \"+\" + half2;\n\t\t\tbreak;\n\t\tcase 2:\n\t\t\tin = half1 + \"-\" + half2;\n\t\t\tbreak;\n\t\tcase 3:\n\t\t\tin = half1 + \"*\" + half2;\n\t\t\tbreak;\n\t\tcase 4:\n\t\t\tin = half1 + \"/\" + half2;\n\t\t\tbreak;\n\t\tcase 5:\n\t\t\tin = half1 + \" \" + half2;\n\t\t\tbreak;\n\t\tcase 6:\n\t\t\tin = \"\";\n\t\t\tinput.setTextColor(Color.BLACK);\n\t\t\tmiddle = -1;\n\t\t\tbreak;\n\t\tcase 7:\n\t\t\tin = half1 + \".\" + half2;\n\t\t\tbreak;\n\t\tcase 8:\n\t\t\tin = half1 + \"(\" + half2;\n\t\t\tbreak;\n\t\tcase 9:\n\t\t\tin = half1 + \")\" + half2;\n\t\t\tbreak;\n\t\t}\n\t\tinput.setText(in);\n\t\tinput.setSelection(middle + 1);\n\t}",
"@Override\n\tpublic void keyPressed(KeyEvent eee) {\n\t\tswitch (eee.getKeyCode()) {\n\t\tcase KeyEvent.VK_0:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(0);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD0:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(0);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_1:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(1);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD1:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(1);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_2:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(2);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD2:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(2);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_3:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(3);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD3:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(3);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_4:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(4);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD4:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(4);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_5:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(5);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD5:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(5);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_6:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(6);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD6:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(6);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_7:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(7);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD7:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(7);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_8:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(8);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD8:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(8);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_9:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(9);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tcase KeyEvent.VK_NUMPAD9:\n\t\t\tif (initialNumberField.toString().equals(\"0\"))\n\t\t\t\tinitialNumberField.delete(0, 1);\n\t\t\tinitialNumberField.append(9);\n\t\t\tnumbersField.setText(initialNumberField.toString());\n\t\t\teee.consume();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"Unexpexted (key presses)\");\n\t\t\teee.consume();\n\t\t}\n\t}",
"@Override\n public void onClick(View view) {\n Intent intent = new Intent(Intent.ACTION_DIAL, Uri.fromParts(\"tel\", tv_desc.getText().toString(), null));\n startActivity(intent);\n }",
"private void displayQuantity(int number) {\n TextView quantityTextView = (TextView) findViewById(\n R.id.quantity_text_view);\n quantityTextView.setText(\"\" + number);\n }",
"@Override\n public void onClick(View arg0) {\n ip = txt3.getText().toString();\n setWindow();\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tboolean isRegularPhoneNumber = phoneEditView.getText()\n\t\t\t\t\t\t.toString().matches(\"[0-9]{10}\");\n\t\t\t\tphoneCheckRes(isRegularPhoneNumber);\n\t\t\t}",
"public void onClick(View view) {\n // this is from the activity main\n TextView tv = (TextView) findViewById(R.id.tv1);\n EditText et = (EditText) findViewById(R.id.et1);\n\n }",
"public void buttonExpone (View v){\n expressionView.setText(expressionView.getText() + \"^\");\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\toptd=btnoptd.getText().toString();\n\t\t\t\tCheckAns(optd,currentPosition);\n\t\t\t\t//Log.e(\"ans\", optd);\n\t\t\t}",
"@Override\n public void onClick(View view) {\n if (view.getId() == R.id.btnSubmit) {\n tableNum = String.valueOf(textInput.getText());\n Intent intent = new Intent(this, PizzeriaMainActivity.class);\n intent.putExtra(CLE_DONNEES, tableNum);\n startActivity(intent);\n }\n }",
"public void onClick(View v) {\n\t\t\t\t\t\ttry {\n\t\t \t\t\t\tString phoneNumber = textViewsdt.getText().toString();\n\t\t \t\t\t \n\t\t \t\t\t\t\tIntent it = new Intent(Intent.ACTION_CALL);\n\t\t \t\t\t\t\tit.setData(Uri.parse(\"tel:\" + phoneNumber));\n\t\t \t\t\t\t\tstartActivity(it);\n\t\t \t\t\t\t}\n\t\t \t\t\t\tcatch (ActivityNotFoundException e) {\n\t\t \t\t\t\t\t// Exceptions\n\t\t \t\t\t\t}\n\t\t\t\t\t}",
"public void onTextChanged(CharSequence s, int start,int before, int count)\n {\n if(et1.getText().toString().length()==1) //size as per your requirement\n {\n et11.requestFocus();\n }\n }"
] | [
"0.69944954",
"0.69406533",
"0.6891249",
"0.688189",
"0.67538905",
"0.67288506",
"0.6713849",
"0.6568348",
"0.6559783",
"0.6544759",
"0.63825065",
"0.6380999",
"0.63775074",
"0.63763124",
"0.6361486",
"0.6339265",
"0.63141656",
"0.63128835",
"0.631272",
"0.6284663",
"0.6255012",
"0.6250584",
"0.62483364",
"0.62445134",
"0.6238046",
"0.6223086",
"0.62172025",
"0.6206521",
"0.6193474",
"0.6190717",
"0.6185607",
"0.6183441",
"0.6181143",
"0.6181143",
"0.6181143",
"0.6181143",
"0.6181143",
"0.6181143",
"0.6181143",
"0.61808586",
"0.6166738",
"0.6157451",
"0.61552626",
"0.615487",
"0.61516273",
"0.6146497",
"0.6142546",
"0.61404",
"0.61315465",
"0.6125894",
"0.61128193",
"0.6108971",
"0.6105744",
"0.61047375",
"0.609421",
"0.6093012",
"0.6090929",
"0.60887414",
"0.6072045",
"0.60686624",
"0.60632616",
"0.60566473",
"0.6055223",
"0.6053607",
"0.6045024",
"0.60421634",
"0.60362697",
"0.6034193",
"0.60207725",
"0.6019896",
"0.60121256",
"0.6003046",
"0.5998233",
"0.5997108",
"0.59893036",
"0.59879637",
"0.5985985",
"0.59786236",
"0.59698516",
"0.59646547",
"0.59637445",
"0.59606045",
"0.59562117",
"0.5955997",
"0.59554774",
"0.5954332",
"0.5948934",
"0.59476537",
"0.5937107",
"0.5926878",
"0.59241414",
"0.59239423",
"0.59231865",
"0.59033257",
"0.5897492",
"0.58901155",
"0.5889193",
"0.58802694",
"0.5879902",
"0.5879662",
"0.58787113"
] | 0.0 | -1 |
get destination to update file and set Uri TODO: First I wanted to store my update .apk file on internal storage for my app but apparently android does not allow you to open and install aplication with existing package from there. So for me, alternative solution is Download directory in external storage. If there is better solution, please inform us in comment | public void DownloadUpdate(String version)
{
String destination = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/";
String fileName = "textbomb.apk";
destination += fileName;
final Uri uri = Uri.parse("file://" + destination);
Log.d("textbomb.apk", "Dest: " + uri);
//Delete update file if exists
File file = new File(destination);
if (file.exists())
//file.delete() - test this, I think sometimes it doesnt work
file.delete();
//get url of app on server
String url = "https://github.com/wethegreenpeople/TextBomb/releases/download/" + version + "/textbomb.apk";
//set downloadmanager
DownloadManager.Request request = new DownloadManager.Request(Uri.parse(url));
request.setDescription("Textbomb");
request.setTitle("Textbomb");
//set destination
request.setDestinationUri(uri);
// get download service and enqueue file
final DownloadManager manager = (DownloadManager) context.getSystemService(Context.DOWNLOAD_SERVICE);
final long downloadId = manager.enqueue(request);
//set BroadcastReceiver to install app when .apk is downloaded
BroadcastReceiver onComplete = new BroadcastReceiver() {
public void onReceive(Context ctxt, Intent intent) {
File apkFile = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS) + "/textbomb.apk");
intent = new Intent(Intent.ACTION_VIEW);
Uri fileUri = android.support.v4.content.FileProvider.getUriForFile(context, context.getPackageName() + ".provider", apkFile);
intent.setDataAndType(fileUri, "application/vnd.android.package-archive");
intent.setFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);
ctxt.startActivity(intent);
}
};
//register receiver for when .apk download is compete
context.registerReceiver(onComplete, new IntentFilter(DownloadManager.ACTION_DOWNLOAD_COMPLETE));
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String openApkAndUpdatePackage(String fileName, Context mContext) {\n File file = new File(mContext.getExternalFilesDir(null), fileName);\n Intent unKnownSourceIntent = new Intent(Settings.ACTION_MANAGE_UNKNOWN_APP_SOURCES).setData(Uri.parse(String.format(\"package:%s\", mContext.getPackageName())));\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O) {\n if (!mContext.getPackageManager().canRequestPackageInstalls()) {\n ((Activity) mContext).startActivityForResult(unKnownSourceIntent, OPEN_APK_UPDATE_PACKAGE_CODE);\n } else {\n Uri fileUri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + \".provider\", file);\n Intent intent = new Intent(Intent.ACTION_VIEW, fileUri);\n intent.putExtra(Intent.EXTRA_NOT_UNKNOWN_SOURCE, true);\n intent.setDataAndType(fileUri, \"application/vnd.android.package-archive\");\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n mContext.startActivity(intent);\n }\n } else if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.N) {\n Intent intent1 = new Intent(Intent.ACTION_INSTALL_PACKAGE);\n Uri uri = FileProvider.getUriForFile(mContext, mContext.getPackageName() + \".provider\", file);\n mContext.grantUriPermission(mContext.getPackageName(), uri, Intent.FLAG_GRANT_READ_URI_PERMISSION);\n mContext.grantUriPermission(mContext.getPackageName(), uri, Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n intent1.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n intent1.setDataAndType(uri, \"application/*\");\n intent1.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n intent1.addFlags(Intent.FLAG_GRANT_WRITE_URI_PERMISSION);\n mContext.startActivity(intent1);\n } else {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n Uri uri = Uri.fromFile(file);\n intent.setDataAndType(uri, \"application/vnd.android.package-archive\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n mContext.startActivity(intent);\n }\n return fileName;\n }",
"@Override\n\tprotected void onPostExecute(String path) {\n\t\t//Remove Notificacions\n \t\tmNotificationManager.cancel(mId);\n \t\tIntent i = new Intent();\n\t i.setAction(Intent.ACTION_VIEW);\n\t File f = new File(path);\n\t f.setReadable(true, false);\n\t i.setDataAndType(Uri.fromFile(f), \"application/vnd.android.package-archive\" );\n\t i.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t Log.d(context.getString(R.string.app_name), \"Installing new version\");\n\t context.startActivity(i);\n\t}",
"private Uri updateExternalFile(OPLocalRingtoneAdapter.RingtoneData ringtoneData) {\n OPMyLog.d(\"chenhl\", \"getKey:\" + ringtoneData.mUri);\n String str = ringtoneData.filepath;\n OPMyLog.d(\"chenhl\", \"path:\" + str);\n File file = new File(str);\n if (!file.exists()) {\n this.mHandler.post(new Runnable() {\n /* class com.oneplus.settings.ringtone.OPLocalRingtonePickerActivity.AnonymousClass4 */\n\n public void run() {\n OPLocalRingtonePickerActivity oPLocalRingtonePickerActivity = OPLocalRingtonePickerActivity.this;\n Toast.makeText(oPLocalRingtonePickerActivity, oPLocalRingtonePickerActivity.getString(C0017R$string.oneplus_file_not_exist), 0).show();\n }\n });\n return null;\n }\n playRingtone(300, this.mUriForDefaultItem);\n if (str == null || str.startsWith(\"/storage/emulated/legacy\") || str.startsWith(SDCARD_PATH)) {\n return this.mUriForDefaultItem;\n }\n File file2 = new File(checkDir() + file.getName());\n if (!file2.exists()) {\n copyFile(file, file2);\n }\n return updateDb(ringtoneData, file2.getAbsolutePath());\n }",
"@NonNull\n private File getDownloadLocation() {\n System.out.println(\"Hello. in download start\");\n File root = android.os.Environment.getExternalStorageDirectory();\n File file = new File(root.getAbsolutePath() + \"/V2A\");\n if (!file.exists()) {\n file.mkdirs();\n }\n System.out.println(file.toString());\n System.out.println(\"Hello. in download end\");\n //Toast.makeText(this, \"Starting Download\", Toast.LENGTH_SHORT).show();\n\n return file;\n\n }",
"@Override\n public void onSuccess(ResponseInfo<File> responseInfo) {\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_DEFAULT);\n intent.setDataAndType(Uri.fromFile(new File(path)), \"application/vnd.android.package-archive\");\n startActivity(intent);\n finish();\n\n }",
"private void downloadApk(String url) {\n if (UpdateHelper.CheckForSDCard.isSDCardPresent()) {\n\n //check if app has permission to write to the external storage.\n if (EasyPermissions.hasPermissions(MainActivity.this, Manifest.permission.WRITE_EXTERNAL_STORAGE)) {\n new DownloadFileHelper(MainActivity.this).execute(url);\n\n } else {\n //If permission is not present request for it.\n EasyPermissions.requestPermissions(MainActivity.this, getString(R.string.write_file), WRITE_REQUEST_CODE, Manifest.permission.READ_EXTERNAL_STORAGE);\n }\n\n }\n }",
"private String setFileDestinationPath(){\n String filePathEnvironment = Environment.getExternalStorageDirectory().getAbsolutePath();\n Log.d(TAG, \"Full path edited \" + filePathEnvironment + \"/earwormfix/\" + generatedFilename + EXTENSION_JPG);\n return filePathEnvironment+ \"/earwormfix/\" + generatedFilename + EXTENSION_JPG;\n }",
"private void startDownload() {\n Uri uri = Uri.parse( data.getStringExtra(PARAM_URL) );\n dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request request = new DownloadManager.Request( uri );\n request.setAllowedNetworkTypes( DownloadManager.Request.NETWORK_MOBILE | DownloadManager.Request.NETWORK_WIFI)\n //移动网络情况下是否允许漫游。\n .setAllowedOverRoaming(false)\n .setTitle(\"更新\") // 用于信息查看\n .setDescription(\"下载apk\"); // 用于信息查看\n //利用此属性下载后使用响应程序打开下载文件\n //request.setMimeType(\"application/vnd.android.package-archive\");\n request.setDestinationInExternalPublicDir(Environment.DIRECTORY_DOWNLOADS, new Date().getTime()+\".apatch\");\n enqueue = dm.enqueue(request);\n }",
"public static void installApk(Context context, String filename) {\n\t\tString url = filename;\n\t\tLog.e(\"tag\", \"安装地址---》\" + url);\n\t\ttry {\n\t\t\tString command = \"chmod \" + \"777\" + \" \" + filename;\n\t\t\tRuntime runtime = Runtime.getRuntime();\n\t\t\truntime.exec(command);\n\t\t\tLog.d(\"tag\", \"chmod 777 ok\");\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tIntent intent = new Intent();\n\t\tintent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\tintent.setAction(Intent.ACTION_VIEW);\n\t\tintent.setDataAndType(Uri.parse(\"file://\" + url), \"application/vnd.android.package-archive\");\n\t\tcontext.startActivity(intent);\n\t}",
"@Override\n // Download file\n protected void onHandleIntent(@Nullable Intent intent) {\n String address = intent.getStringExtra(\"URL\");\n // Conecction with url\n HttpURLConnection connection = null;\n // Stream for save content\n OutputStream streamToFile = null;\n try {\n // Get filename from URL\n URL url = new URL(address);\n File file = new File(url.getFile());\n String fileName = file.getName();\n // Create new file\n DocumentFile directory = DocumentFile.fromTreeUri(this, uri);\n DocumentFile dFile = directory.createFile(\"\", fileName);\n // Make connection\n connection = (HttpURLConnection) url.openConnection();\n // Stream for fetching data\n DataInputStream dataInputStream = new DataInputStream(connection.getInputStream());\n // Initialize stream for writing\n streamToFile = getContentResolver().openOutputStream(dFile.getUri());\n\n //streamToFile = new FileOutputStream(f);\n // Buffor for data\n byte buffor[] = new byte[100];\n // Amount of readed data\n int gotBytes = dataInputStream.read(buffor, 0, 100);\n // Total readed data\n int totalBytes = 0;\n // Read untill end of file\n while (gotBytes != -1) {\n // Write read data to buffer\n streamToFile.write(buffor, 0, gotBytes);\n // How many bytes read\n gotBytes = dataInputStream.read(buffor, 0, 100);\n // Add readed bytes to total counter\n totalBytes += gotBytes;\n // Send message with readed bytes\n sendBroadcast(totalBytes);\n }\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n // Close connetions\n if (connection != null)\n connection.disconnect();\n\n if (streamToFile != null) {\n try {\n streamToFile.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n }",
"static File requestNewResourcesFolder(Context context){\n SharedPreferences sharedPreferences = context.getSharedPreferences(Values.PREFERENCES_NAME, Context.MODE_PRIVATE);\n File downloadPath = null;\n File[] folders = context.getExternalFilesDirs(null);\n if(hasWritableSd(context) && checkAvailableSpace(folders[1], 10)){\n downloadPath = folders[1];\n sharedPreferences.edit().putString(Values.DOWNLOAD_LOCATION, Values.LOCATION_EXTERNAL).apply();\n }\n else{\n if(checkAvailableSpace(folders[0], 10)){\n downloadPath = folders[0];\n sharedPreferences.edit().putString(Values.DOWNLOAD_LOCATION, Values.LOCATION_INTERNAL).apply();\n }\n }\n return downloadPath;\n }",
"public File buildLocalDownloadAppFile(int downloadedVersionCode) {\n \tStringBuilder sb = new StringBuilder(\"Warranty_\");\n \tsb.append(String.valueOf(downloadedVersionCode))\n \t.append(\".apk\");\n \treturn new File(getExternalStorageRoot(\".download\"), sb.toString());\n }",
"@SuppressLint(\"NewApi\")\r\n\tprivate void downloadFile() {\n\t\tLog.d(TAG, \"In fuction downloadFile()\");\r\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd-MM-yy\");\r\n \tCalendar cal = Calendar.getInstance();\r\n \tString programmaNameUnderscore = mName.replace(\" \", \"_\");\r\n \tprogrammaNameUnderscore = programmaNameUnderscore.replace(\",\",\"\");\r\n \tString fileName = programmaNameUnderscore + \"_\" + dateFormat.format(cal.getTime())+\".mp3\";\r\n \t\r\n \t\r\n\t\tRequest request = new Request(Uri.parse(mDownloadUrl));\r\n\t\trequest.setDescription(mName);\r\n \t// in order for this if to run, you must use the android 3.2 to compile your app\r\n \tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB) {\r\n \t request.allowScanningByMediaScanner();\r\n \t request.setNotificationVisibility(DownloadManager.Request.VISIBILITY_VISIBLE_NOTIFY_COMPLETED);\r\n \t}\r\n \trequest.setDestinationInExternalPublicDir(Environment.DIRECTORY_MUSIC, getString(R.string.download_subdir_test) + File.separator + fileName);\r\n\t}",
"public java.lang.CharSequence download(java.lang.String appId, java.lang.String url, long duration, java.lang.String folder) throws android.os.RemoteException;",
"@Override \r\n public void onDownloadStart(String url, String userAgent, String contentDisposition, String mimetype, \r\n\t long contentLength) {\n \tString filename = SDHelper.getAppDataPath() + File.separator \r\n\t\t\t\t\t+ getFilename(url);\r\n \tFile file =new File(filename);\r\n \tif (file.exists()) {\r\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\r\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\r\n\t\t\t\tString ext = getExt(file);\r\n\t\t\t\tString mark = null;\r\n\t\t\t if (ext.equalsIgnoreCase(\"doc\")||ext.equalsIgnoreCase(\"docx\"))\r\n\t\t\t\t\tmark = \"application/msword\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"xls\")||ext.equalsIgnoreCase(\"xlsx\"))\r\n\t\t\t\t\tmark = \"application/vnd.ms-excel\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"ppt\")||ext.equalsIgnoreCase(\"pptx\"))\r\n\t\t\t\t\tmark = \"application/vnd.ms-powerpoint\";\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"pdf\"))\r\n\t\t\t\t\tmark = \"application/pdf\";\r\n\t\t\t\t\r\n\t\t\t\telse if (ext.equalsIgnoreCase(\"apk\"))\r\n\t\t\t\t\tmark = \t\"application/vnd.android.package-archive\"; \r\n\t\t\t\tintent.setDataAndType(Uri.fromFile(file), mark);\r\n\t\t\t\tmContext.startActivity(intent);\r\n\r\n \t}\r\n \telse \r\n \t new getFileAsync().execute(url);\r\n \t\r\n \t}",
"@Override\n\t\t\tpublic void onSuccess(String path) {\n\t\t\t\ttry {\n\t\t\t\t\tFile file = new File(path);\n\t\t\t\t\tFileInputStream fis = new FileInputStream(file);\n\t\t\t\t\tif (fis == null) {\n\t\t\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t\t\t}\n\t\t\t\t\tint t_len = fis.available();\n\t\t\t\t\tbyte[] bytes = new byte[t_len];\n\t\t\t\t\tfis.read(bytes);\n\n\t\t\t\t\tString strJson = EncodingUtils.getString(bytes, \"UTF-8\");\n\t\t\t\t\tfis.close();\n\t\t\t\t\tfile.delete();\n\t\t\t\t\tif (strJson == null) {\n\t\t\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t\t\t}\n\n\t\t\t\t\tJSONObject jsonObject = JSON.parseObject(strJson);\n\n\t\t\t\t\tString newVersion = jsonObject.getString(KEY_VER);\n\t\t\t\t\tint nRet = DataUtils.compareVersion(curVersion, newVersion);\n\t\t\t\t\tif (nRet == -1) {\n\t\t\t\t\t\tapkDownloadUrl = jsonObject.getString(KEY_URL);\n\t\t\t\t\t\tcallBack.onCheckUpdate(1, jsonObject); // 有更新的版本\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcallBack.onCheckUpdate(0, null); // 无更新的版本\n\t\t\t\t\t}\n\n\t\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\tcallBack.onCheckUpdate(-1, null); // 检查出错\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t}",
"@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data)\n {\n //\"/storage/emulated/0/IRON-HID/captures\" <== can open~!!\n //\"file:///mnt/sdcard/Download/20141025_170314.jpg\"\n if (requestCode == CHOOSE_FILE_TO_UPLOAD)\n {\n if (resultCode == RESULT_OK)\n {\n Uri uri = data.getData();\n if (uri != null)\n {\n // Send file\n String filePath = uri.getPath();\n filePath = filePath.replace(\"file://\", \"\");\n mPutCommand += \" \" + filePath;\n mCommandManager.SendCommand(mPutCommand);\n }\n }\n }\n\n super.onActivityResult(requestCode, resultCode, data);\n }",
"@Override\n\t\t\tpublic void onSuccess(ResponseInfo<File> arg0) {\n\t\t\t\tdialog2.dismiss();\n\t\t\t\tToast.makeText(context, \"文件下载成功!\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t\tIntent intent = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tintent.setDataAndType(\n\t\t\t\t\t\tUri.fromFile(new File(file_path+filename)),\n\t\t\t\t\t\t\"application/vnd.android.package-archive\");\n\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\t\t\t\t((Activity) context).startActivityForResult(intent, 1);\n\t\t\t}",
"public String getPackageDownloadUrl();",
"@Override\n\t\t\tpublic void onSuccess(String url, File file)\n\t\t\t{\n\t\t\t\tsuper.onSuccess(url, file);\n\t\t\t\tmNotification.contentView.setViewVisibility(R.id.upgradeService_pb, View.GONE);\n\t\t\t\tmNotification.defaults = Notification.DEFAULT_SOUND;\n\t\t\t\tmNotification.contentIntent = mPendingIntent;\n\t\t\t\tmNotification.contentView.setTextViewText(R.id.upgradeService_tv_status, \"下载完成\");\n\t\t\t\tmNotification.contentView.setTextViewText(R.id.upgradeService_tv, \"100%\");\n\t\t\t\tmNotificationManager.notify(mNotificationId, mNotification);\n\t\t\t\tmNotificationManager.cancel(mNotificationId);\n\t\t\t\tSDPackageUtil.installApkPackage(getApplicationContext(), file.getPath());\n\t\t\t\tSDToast.showToast(\"下载完成\");\n\n\t\t\t}",
"private void openUpdate() {\n\t\tString url = MySoup.getUpdateLink(SITE);\n\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\ti.setData(Uri.parse(url));\n\t\tstartActivity(i);\n\t\tfinish();\n\t}",
"private static Uri getOutputMediaFileUri(){\n return Uri.fromFile(getOutputMediaFile());\n }",
"@Override public java.lang.CharSequence download(java.lang.String appId, java.lang.String url, long duration, java.lang.String folder) throws android.os.RemoteException\n{\nandroid.os.Parcel _data = android.os.Parcel.obtain();\nandroid.os.Parcel _reply = android.os.Parcel.obtain();\njava.lang.CharSequence _result;\ntry {\n_data.writeInterfaceToken(DESCRIPTOR);\n_data.writeString(appId);\n_data.writeString(url);\n_data.writeLong(duration);\n_data.writeString(folder);\nmRemote.transact(Stub.TRANSACTION_download, _data, _reply, 0);\n_reply.readException();\nif ((0!=_reply.readInt())) {\n_result = android.text.TextUtils.CHAR_SEQUENCE_CREATOR.createFromParcel(_reply);\n}\nelse {\n_result = null;\n}\n}\nfinally {\n_reply.recycle();\n_data.recycle();\n}\nreturn _result;\n}",
"private String getAbsoluteFilesPath() {\n\n //sdcard/Android/data/cucumber.cukeulator\n //File directory = getTargetContext().getExternalFilesDir(null);\n //return new File(directory,\"reports\").getAbsolutePath();\n return null;\n }",
"@Override\n public int onStartCommand(Intent intent, int flags, int startId) {\n Bundle bundle = intent.getExtras();\n String url = bundle.getString(\"downloadUrl\");\n PreferenceUtils.setString(UpdateVersionService.this, \"apkDownloadurl\", url);\n nm.notify(titleId, notification);\n downLoadFile(url);\n return Service.START_STICKY;\n }",
"public Uri getImageFileUri()\n {\n imagePath = new File(Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_PICTURES), \"Tuxuri\");\n Log.d(tag, \"Find \" + imagePath.getAbsolutePath());\n\n\n if (! imagePath.exists())\n {\n if (! imagePath.mkdirs())\n {\n Log.d(\"CameraTestIntent\", \"failed to create directory\");\n return null;\n }else{\n Log.d(tag,\"create new Tux folder\");\n }\n }\n\n // Create an image file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File image = new File(imagePath,\"TUX_\"+ timeStamp + \".jpg\");\n file = image;\n name = file.getName();\n path = imagePath;\n\n\n if(!image.exists())\n {\n try {\n image.createNewFile();\n } catch (IOException e) {\n // TODO Auto-generated catch block\n e.printStackTrace();\n }\n }\n return Uri.fromFile(image);\n }",
"private void redirectStore(String updateUrl) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(updateUrl));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(intent);\n }",
"@Override\n\tpublic File get(String url, String uid) {\n\t\tFile f = super.get(url, uid);\n\t\tif(f!=null && f.exists()){\n\t\t\treturn f;\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tString key = MD5.encode((uid+url).getBytes());\n\t\t\t\tSqlMediaManager smm = SqlMediaManager.getInstance();\n\t\t\t\tMediaValue mv = smm.getMedia(key);\n\t\t\t\tif(mv!=null && mv.localpath!=null){\n\t\t\t\t\tf = new File(Environment.getExternalStorageDirectory(), mv.localpath);\n\t\t\t\t\tLog.e(\"TAG\", \"zhw found f:\" + f.getAbsolutePath() + \", old name:\" + key);\n\t\t\t\t\treturn f;\n\t\t\t\t}\n\t\t\t}catch(Exception e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn f;\n\t\t}\n\n\t}",
"public static void installApp(Context context, File apkFile) {\n Intent install = new Intent(Intent.ACTION_VIEW);\n install.setDataAndType(Uri.fromFile(apkFile), \"application/vnd.android.package-archive\");\n install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(install);\n }",
"public void installApk(String filename) {\n // systemLib.Installapk(filename);\n // if (isregister == false) {\n // isregister = true;\n // IntentFilter intentFilter = new IntentFilter(MyIntent.ACTION_INSTALL_BEGIN);\n // intentFilter.addAction(MyIntent.ACTION_INSTALL_END);\n // mContext.registerReceiver(mReceiver, intentFilter);\n // }\n // //start the service\n // Intent startservice = new Intent();\n // startservice.setAction(MyIntent.ACTION_PROXY);\n // startservice.putExtra(MyIntent.EXTRA_OPERATION, MyIntent.EXTRA_INSTALL);\n // startservice.putExtra(MyIntent.EXTRA_ARG1, filename);\n // Log.print(\"startservice intent is \" + startservice);\n // mContext.startService(startservice);\n }",
"public static boolean downloadAndSaveUpdate(String updatePath, String fileOutputPath, String versionNumber)\n\t{\n\t\tSystem.out.println(\"Output path: \" + fileOutputPath);\n\t\tSystem.out.println(\"Complete path: \" + fileOutputPath + \"upatedJAR.jar\");\n\t\t\n\t\tURL updateURL;\n\t\ttry {\n\t\t\tupdateURL = new URL(updatePath);\n\t\t\tReadableByteChannel rbc = Channels.newChannel(updateURL.openStream());\n\t\t FileOutputStream fos = new FileOutputStream(fileOutputPath + \"StudyGuider\" + versionNumber + \".jar\");\n\t\t fos.getChannel().transferFrom(rbc, 0, 1 << 24);\n\t\t}\n\t\t/*catch (MalformedURLException e) {\n\t\t\t// invalid URL\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\t// write errors?\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\tcatch (Exception e) {\n\t\t\t// all other errors\n\t\t\tSystem.out.println(e);\n\t\t\treturn false; // Something went wrong, so return False, indicating the update failed.\n\t\t}\n\t\t\n\t\treturn true; // The operation completed successfully. Return true\n\t \n\t}",
"private void upgradeBundle(final net.wequick.small.Bundle bundle,\n final String urlStr, final File file,\n final OnUpgradeListener listener) {\n mHandler = new DownloadHandler(listener);\n new Thread() {\n @Override\n public void run() {\n try {\n URL url = new URL(urlStr);\n HttpURLConnection urlConn = (HttpURLConnection) url.openConnection();\n InputStream is = urlConn.getInputStream();\n // Save\n OutputStream os = new FileOutputStream(file);\n byte[] buffer = new byte[1024];\n int length;\n while ((length = is.read(buffer)) != -1) {\n os.write(buffer, 0, length);\n }\n os.flush();\n os.close();\n is.close();\n\n // While you finish downloading patch file, call this\n bundle.upgrade();\n\n Message.obtain(mHandler, 1).sendToTarget();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }.start();\n }",
"private void openDownloadedFolder() {\n if (new CheckForSDCard().isSDCardPresent()) {\n\n //Get Download Directory File\n File apkStorage = new File(\n Environment.getExternalStorageDirectory() + \"/\"\n + Utils.downloadDirectory);\n\n //If file is not present then display Toast\n if (!apkStorage.exists())\n Toast.makeText(MainActivity.this, \"Right now there is no directory. Please download some file first.\", Toast.LENGTH_SHORT).show();\n\n else {\n\n //If directory is present Open Folder\n\n /** Note: Directory will open only if there is a app to open directory like File Manager, etc. **/\n\n Intent intent = new Intent(Intent.ACTION_GET_CONTENT);\n Uri uri = Uri.parse(Environment.getExternalStorageDirectory().getPath()\n + \"/\" + Utils.downloadDirectory);\n intent.setDataAndType(uri, \"file/*\");\n startActivity(Intent.createChooser(intent, \"Open Download Folder\"));\n }\n\n } else\n Toast.makeText(MainActivity.this, \"Oops!! There is no SD Card.\", Toast.LENGTH_SHORT).show();\n\n\n }",
"@Override\n public void onUpdateCheckListener(String url) {\n AlertDialog alertDialog = new AlertDialog.Builder(this)\n .setTitle(getString(R.string.update_title))\n .setMessage(getString(R.string.update_message))\n .setPositiveButton(getString(R.string.update_option), (dialog, which) -> {\n // setting update url to retrieve later on permission grant listener\n UpdateHelper.setKeyUpdateUrl(url);\n downloadApk(url);\n }).setNegativeButton(getString(R.string.dismiss_text), (dialog, which) -> dialog.dismiss()).create();\n alertDialog.show();\n\n }",
"@Override\n protected void onPostExecute(String file_url) {\n // dismiss the dialog after the file was downloaded\n //dismissDialog(progress_bar_type);\n dismissProgress();\n showToast(String.valueOf(\"Download File Success to \") + filename);\n if (filePath != null) {\n File file = new File( filePath );\n Intent intent = new Intent(Intent.ACTION_VIEW);\n Uri fileUri = FileProvider.getUriForFile(getContext(),\n \"com.insurance.easycover\",\n file);\n intent.setData(fileUri);\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n startActivity(intent);\n }\n }",
"private File download( final File workDir, final URL url, final String displayName, final Boolean overwrite,\n final boolean checkAttributes, final boolean downloadFeeback )\n throws PlatformException\n {\n LOGGER.debug( \"Downloading [\" + url + \"]\" );\n File downloadedBundlesFile = new File( workDir, \"bundles/downloaded_bundles.properties\" );\n Properties fileNamesForUrls = loadProperties( downloadedBundlesFile );\n \n String downloadedFileName = fileNamesForUrls.getProperty( url.toExternalForm() );\n String hashFileName = \"\" + url.toExternalForm().hashCode();\n if( downloadedFileName == null )\n {\n // destination will be made based on the hashcode of the url to be downloaded\n downloadedFileName = hashFileName + \".jar\";\n \n }\n File destination = new File( workDir, \"bundles/\" + downloadedFileName );\n \n // download the bundle only if is a forced overwrite or the file does not exist or the file is there but is\n // invalid\n boolean forceOverwrite = overwrite || !destination.exists();\n if( !forceOverwrite )\n {\n try\n {\n String newFileName = validateBundleAndGetFilename( url, destination, hashFileName, checkAttributes );\n if( !destination.getName().equals( newFileName ) )\n {\n throw new PlatformException( \"File \" + destination + \" should have name \" + newFileName );\n }\n }\n catch( PlatformException ignore )\n {\n forceOverwrite = true;\n }\n }\n if( forceOverwrite )\n {\n try\n {\n LOGGER.debug( \"Creating new file at destination: \" + destination.getAbsolutePath() );\n destination.getParentFile().mkdirs();\n destination.createNewFile();\n BufferedOutputStream os = null;\n try\n {\n os = new BufferedOutputStream( new FileOutputStream( destination ) );\n StreamUtils.ProgressBar progressBar = null;\n if( LOGGER.isInfoEnabled() )\n {\n if( downloadFeeback )\n {\n progressBar = new StreamUtils.FineGrainedProgressBar( displayName );\n }\n else\n {\n progressBar = new StreamUtils.CoarseGrainedProgressBar( displayName );\n }\n }\n StreamUtils.streamCopy( url, os, progressBar );\n LOGGER.debug( \"Succesfully downloaded to [\" + destination + \"]\" );\n }\n finally\n {\n if( os != null )\n {\n os.close();\n }\n }\n }\n catch( IOException e )\n {\n throw new PlatformException( \"[\" + url + \"] could not be downloaded\", e );\n }\n }\n \n wrapNonBundleJar( destination, url );\n String newFileName = validateBundleAndGetFilename( url, destination, hashFileName, checkAttributes );\n File newDestination = new File( destination.getParentFile(), newFileName );\n if( !newFileName.equals( destination.getName() ) )\n {\n if( newDestination.exists() )\n {\n if( !newDestination.delete() )\n {\n throw new PlatformException( \"Cannot delete \" + newDestination );\n }\n }\n if( !destination.renameTo( newDestination ) )\n {\n throw new PlatformException( \"Cannot rename \" + destination + \" to \" + newDestination );\n }\n fileNamesForUrls.setProperty( url.toExternalForm(), newFileName );\n saveProperties( fileNamesForUrls, downloadedBundlesFile );\n }\n \n return newDestination;\n }",
"public static void openFile(Context context, File url) throws IOException {\n\n if ( null == url ) {\n QNotifications.showShortToast(context, \"Cannot read file\");\n return;\n }\n\n // Create URI\n File file = url;\n Uri uri = Uri.fromFile(file);\n\n Intent intent = new Intent(Intent.ACTION_VIEW);\n // Check what kind of file you are trying to open, by comparing the url with extensions.\n // When the if condition is matched, plugin sets the correct intent (mime) type,\n // so Android knew what application to use to open the file\n if ( url.toString().endsWith(\".doc\") || url.toString().contains(\".docx\") ) {\n // Word document\n intent.setDataAndType(uri, \"application/msword\");\n } else if ( url.toString().endsWith(\".pdf\") ) {\n // PDF file\n intent.setDataAndType(uri, \"application/pdf\");\n } else if ( url.toString().endsWith(\".ppt\") || url.toString().contains(\".pptx\") ) {\n // Powerpoint file\n intent.setDataAndType(uri, \"application/vnd.ms-powerpoint\");\n } else if ( url.toString().endsWith(\".xls\") || url.toString().contains(\".xlsx\") ) {\n // Excel file\n intent.setDataAndType(uri, \"application/vnd.ms-excel\");\n } else if ( url.toString().endsWith(\".zip\") || url.toString().contains(\".rar\") ) {\n // ZIP Files\n intent.setDataAndType(uri, \"application/zip\");\n } else if ( url.toString().endsWith(\".rtf\") ) {\n // RTF file\n intent.setDataAndType(uri, \"application/rtf\");\n } else if ( url.toString().endsWith(\".wav\") || url.toString().contains(\".mp3\") ) {\n // WAV audio file\n intent.setDataAndType(uri, \"audio/x-wav\");\n } else if ( url.toString().endsWith(\".gif\") ) {\n // GIF file\n intent.setDataAndType(uri, \"image/gif\");\n } else if ( url.toString().endsWith(\".jpg\") || url.toString().contains(\".jpeg\") || url.toString().contains(\".png\") ) {\n // JPG file\n intent.setDataAndType(uri, \"image/jpeg\");\n } else if ( url.toString().endsWith(\".txt\") ) {\n // Text file\n intent.setDataAndType(uri, \"text/plain\");\n } else if ( url.toString().endsWith(\".3gp\") || url.toString().contains(\".mpg\") || url.toString().contains(\".mpeg\") || url.toString().contains(\".mpe\") || url.toString().contains(\".mp4\") || url.toString().contains(\".avi\") ) {\n // Video files\n intent.setDataAndType(uri, \"video/*\");\n } else {\n // if you want you can also define the intent type for any other file\n\n // additionally use else clause below, to manage other unknown extensions\n // in this case, Android will show all applications installed on the device\n // so you can choose which application to use\n intent.setDataAndType(uri, \"*/*\");\n }\n\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n context.startActivity(intent);\n }",
"@Override\n protected void onPostExecute(String url) {\n final ProgressDialog progressDialog = new ProgressDialog(context);\n\n if(url==null){\n System.out.println(\"F\");\n return;\n }\n\n UpdateLibrary.with(context)\n\n // while downloading notification\n .setDownloadingNotificationTitle(context.getString(R.string.app_name))\n .setDownloadingNotificationText(context.getString(R.string.downloading_new_version))\n\n // before installing notification\n .setDownloadedNotificationSmallIconResource(R.mipmap.ic_launcher)\n .setDownloadedNotificationLargeIconResource(R.mipmap.ic_launcher)\n .setDownloadedNotificationTitle(context.getString(R.string.app_name))\n .setDownloadedNotificationText(context.getString(R.string.download_completed))\n\n .setUpdateReadyToDownloadListener(new UpdateReadyToDownloadListener() {\n @Override\n public void onReadyToDownload(final Context context, Uri uri) {\n UpdateLibrary.getUpdateManager().download(context);\n progressDialog.hide();\n }\n })\n .setUpdateDownloadStartedListener(new UpdateDownloadStartedListener() {\n @Override\n public void onDownloadStarted(Context context, Uri uri) {\n progressDialog.setMessage(context.getString(R.string.downloading_new_version));\n progressDialog.show();\n }\n })\n .setUpdateReadyToInstallListener(new UpdateReadyToInstallListener() {\n @Override\n public void onReadyToInstall(final Context context, Uri uri) {\n UpdateLibrary.getUpdateManager().install(context);\n progressDialog.hide();\n }\n })\n .setUpdateInstallStartedListener(new UpdateInstallStartedListener() {\n @Override\n public void onInstallStarted(Context context, Uri uri) {\n progressDialog.setMessage(context.getString(R.string.installing_new_version));\n progressDialog.show();\n }\n })\n\n .init(Uri.parse(url));\n }",
"private void openFile(String name){\n File path = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS);\n File file = new File(path, \"\"+name);\n\n Intent install = new Intent(Intent.ACTION_VIEW);\n install.setDataAndType(Uri.fromFile(file), \"application/pdf\");\n install.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(install);\n\n }",
"@Override\n public void onSuccess(ResponseInfo<File> arg0) {\n mProgressDialog.dismiss();\n MyUtils.installApk(context);\n }",
"@Override\n protected String doInBackground(String... f_url) {\n int count;\n try {\n URL url = new URL(f_url[0]);\n URLConnection connection = url.openConnection();\n connection.connect();\n // getting file length\n int lengthOfFile = connection.getContentLength();\n\n\n // input stream to read file - with 8k buffer\n InputStream input = new BufferedInputStream(url.openStream(), 8192);\n\n String timestamp = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm.ss\").format(new Date());\n\n //Extract file name from URL\n fileName = f_url[0].substring(f_url[0].lastIndexOf('/') + 1, f_url[0].length());\n\n //Append timestamp to file name\n fileName = timestamp + \"_\" + fileName;\n\n //External directory path to save file\n // folder = Environment.getExternalStorageDirectory() + \"Needyyy\";\n\n //Create androiddeft folder if it does not exist\n\n String folder = \"Needyyy\";\n// File f = new File(Environment.getExternalStorageDirectory(), folder);\n// if (!f.exists()) {\n// f.mkdirs();\n// }\n\n\n File directory = new File(Environment.getExternalStorageDirectory(), folder);\n\n if (!directory.exists()) {\n directory.mkdirs();\n }\n\n // Output stream to write file\n OutputStream output = new FileOutputStream(directory + fileName);\n\n byte data[] = new byte[1024];\n\n long total = 0;\n\n while ((count = input.read(data)) != -1) {\n total += count;\n // publishing the progress....\n // After this onProgressUpdate will be called\n publishProgress(\"\" + (int) ((total * 100) / lengthOfFile));\n Log.d(TAG, \"Progress: \" + (int) ((total * 100) / lengthOfFile));\n\n // writing data to file\n output.write(data, 0, count);\n }\n\n // flushing output\n output.flush();\n\n // closing streams\n output.close();\n input.close();\n return \"Downloaded at: \" + directory + fileName;\n\n } catch (Exception e) {\n// Log.e(\"Error: \", e.getMessage());\n }\n\n return \"Something went wrong\";\n }",
"private Uri getOutputMediaFileUri(){\n\t\treturn Uri.fromFile( getOutputMediaFile() );\n\t}",
"public void DownloadFromUrl(Context ctx) {\n\t\ttry {\r\n\t\t\tURL url = new URL(link);\r\n\t\t\tString root = Environment.getExternalStorageDirectory().toString();\r\n\t\t\tif (type.contentEquals(\"image\")) {\r\n\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER_IMG);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\tLog.d(\"ImageManager\", \"download begining\");\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\t\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\r\n\t\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\");\r\n\t\t\t\t/* Open a connection to that URL. */\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Define InputStreams to read from the URLConnection.\r\n\t\t\t\t */\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\r\n\r\n\t\t\t\t/*\r\n\t\t\t\t * Read bytes to the Buffer until there is nothing more to\r\n\t\t\t\t * read(-1).\r\n\t\t\t\t */\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\tif (cancel)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Convert the Bytes read to a String. */\r\n\t\t\t\tif (!cancel) {\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t\tLog.d(\"ImageManager\",\r\n\t\t\t\t\t\t\t\"download ready in\"\r\n\t\t\t\t\t\t\t\t\t+ ((System.currentTimeMillis() - startTime) / 1000)\r\n\t\t\t\t\t\t\t\t\t+ \" sec\");\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"award\")) {\r\n\t\t\t\t\r\n\t\t\t\tLog.e(\"download\",\" award here\");\r\n\t\t\t\t//TODO download files here\r\n\t\t\t\t Log.e(\"name\",name);\r\n\t\t\t\t Log.e(\"link\",link);\r\n\t\t\t\r\n\t\t\t\tFile file = new File(name);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\r\n\t\t\t\t\t\tis);\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tif(cancel) break;\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t}\r\n\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\tfos.close();\r\n\t\t\t\tif(cancel) file.delete();\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"video\")) {\r\n\r\n\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER_VIDEO);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\t\t\t\t// Log.v(\"fname\",fname);\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\t\t\t\tlong startTime = System.currentTimeMillis();\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\t\t\t\tLog.d(\"ImageManager\", \"download begining\");\r\n\t\t\t\tLog.d(\"ImageManager\", \"download url:\" + url);\r\n\t\t\t\tLog.d(\"ImageManager\", \"downloaded file name:\");\r\n\t\t\t\t/* Open a connection to that URL. */\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\t/*\r\n\t\t\t\t * Define InputStreams to read from the URLConnection.\r\n\t\t\t\t */\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\t// bookmarkstart\r\n\t\t\t\t/*\r\n\t\t\t\t * Read bytes to the Buffer until there is nothing more to\r\n\t\t\t\t * read(-1) and write on the fly in the file.\r\n\t\t\t\t */\r\n\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\tfinal int BUFFER_SIZE = 25 * 1024;\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is,\r\n\t\t\t\t\t\tBUFFER_SIZE);\r\n\t\t\t\tbyte[] baf = new byte[BUFFER_SIZE];\r\n\t\t\t\tint actual = 0;\r\n\t\t\t\twhile (actual != -1) {\r\n\t\t\t\t\tfos.write(baf, 0, actual);\r\n\t\t\t\t\tactual = bis.read(baf, 0, BUFFER_SIZE);\r\n\t\t\t\t\tif (cancel) {\r\n\t\t\t\t\t\tfile.delete();\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\r\n\t\t\t\tfos.close();\r\n\r\n\t\t\t\t// bookmarkend\r\n\t\t\t\tLog.d(\"ImageManager\",\r\n\t\t\t\t\t\t\"download ready in\"\r\n\t\t\t\t\t\t\t\t+ ((System.currentTimeMillis() - startTime) / 1000)\r\n\t\t\t\t\t\t\t\t+ \" sec\");\r\n\r\n\t\t\t\tString link = root + Constants.APP_FOLDER_IMG + name;\r\n\r\n\t\t\t}\r\n\t\t\telse if (type.contentEquals(\"audio\")) {\r\n\t\t\t\tLog.v(\"training\", \"in audio\");\r\n\r\n\t\t\t\tFile myDir = new File(Environment.getExternalStorageDirectory()\r\n\t\t\t\t\t\t.getAbsolutePath() + Constants.APP_FOLDER_AUDIO);\r\n\t\t\t\tmyDir.mkdirs();\r\n\t\t\t\tString fname = name;\r\n\r\n\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\tif (file.exists())\r\n\t\t\t\t\tfile.delete();\r\n\r\n\t\t\t\t// long startTime = System.currentTimeMillis();\r\n\t\t\t\tString url1 = url.toString().replaceAll(\" \", \"%20\");\r\n\t\t\t\turl = new URL(url1);\r\n\r\n\t\t\t\tURLConnection ucon = url.openConnection();\r\n\r\n\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\tBufferedInputStream bis = new BufferedInputStream(is);\r\n\r\n\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\tint current = 0;\r\n\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\tif (cancel)\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\t/* Convert the Bytes read to a String. */\r\n\t\t\t\tif (!cancel) {\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(file);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t}\r\n\r\n\t\t\t}// end of audio\r\n\t\t\telse{\r\n\t\t\t\ttry {\r\n\t\t\t\t\turl = new URL(link);\r\n\t\t\t\t\troot = Environment\r\n\t\t\t\t\t\t\t.getExternalStorageDirectory()\r\n\t\t\t\t\t\t\t.toString();\r\n\t\t\t\t\tLog.v(\"type is \", type.toString());\r\n\r\n\t\t\t\t\tString foldername = \"\";\r\n\t\t\t\t\tif (type.contentEquals(\"pdf\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.pdf);\r\n\t\t\t\t\telse if (type.contentEquals(\"ppt\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.ppt);\r\n\t\t\t\t\telse if (type.contentEquals(\"doc\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.doc);\r\n\t\t\t\t\telse if (type.contentEquals(\"xls\"))\r\n\t\t\t\t\t\tfoldername = activity.getString(R.string.xls);\r\n\t\t\t\t\telse if (type.contentEquals(\"video\"))\r\n\t\t\t\t\t\tfoldername = \"mobcast_videos\";\r\n\t\t\t\t\telse if (type.contentEquals(\"audio\"))\r\n\t\t\t\t\t\tfoldername = \"mobcast_audio\";\r\n\r\n\t\t\t\t\tFile myDir = new File(root + Constants.APP_FOLDER\r\n\t\t\t\t\t\t\t+ foldername);\r\n\r\n\t\t\t\t\tString fname = ename;\r\n\r\n\t\t\t\t\tmyDir.mkdirs();\r\n\r\n\t\t\t\t\t\r\n\t\t\t\t\tFile file = new File(myDir, fname);\r\n\t\t\t\t\tif (file.exists())\r\n\t\t\t\t\t\tfile.delete();\r\n\t\t\t\t\tURLConnection ucon = url.openConnection();\r\n\t\t\t\t\tInputStream is = ucon.getInputStream();\r\n\t\t\t\t\tBufferedInputStream bis = new BufferedInputStream(\r\n\t\t\t\t\t\t\tis);\r\n\t\t\t\t\tByteArrayBuffer baf = new ByteArrayBuffer(50);\r\n\t\t\t\t\tint current = 0;\r\n\t\t\t\t\twhile ((current = bis.read()) != -1) {\r\n\t\t\t\t\t\tbaf.append((byte) current);\r\n\t\t\t\t\t\tif(cancel) break;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tFileOutputStream fos = new FileOutputStream(\r\n\t\t\t\t\t\t\tfile);\r\n\t\t\t\t\tfos.write(baf.toByteArray());\r\n\t\t\t\t\tfos.close();\r\n\t\t\t\t\t\tif(cancel) file.delete();\r\n\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t} catch (IOException e) {\r\n\t\t\tLog.d(\"ImageManager\", \"Error: \" + e);\r\n\t\t}\r\n\r\n\t}",
"@SuppressLint(\"SimpleDateFormat\")\n public Uri getOutputImageFileUri(Context ctx) {\n\n String tstamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File file = new File(getTempDirectoryPath(ctx), \"IMG_\" + tstamp + \".jpg\");\n\n return Uri.fromFile(file);\n\n }",
"public File extractAndroidDriverAPK() {\n\t\t\n\t\tInputStream is = AndroidDriverAPKBuilder.class\n\t\t\t.getResourceAsStream(\"prebuild/android-driver-app-\"\n\t\t\t\t\t+\"0.11.0\" + \".apk\");\t\t\n\t\ttry {\n\t\t\tFile tmpAndroidDriver = File.createTempFile(\"android-driver\",\n\t\t\t\t\t\".apk\");\n\t\t\tIOUtils.copy(is, new FileOutputStream(tmpAndroidDriver));\n\t\t\tIOUtils.closeQuietly(is);\n\t\t\treturn tmpAndroidDriver;\n\t\t} catch (IOException ioe) {\n\t\t\tthrow new RuntimeException(ioe);\n\t\t}\n\t}",
"private File createDownloadLocalFile(String downloadFileUrl)\n {\n File dir = null;\n File ret = null;\n\n try {\n if (downloadFileUrl != null && !TextUtils.isEmpty(downloadFileUrl)) {\n int lastIndex = downloadFileUrl.lastIndexOf(\"/\");\n if (lastIndex > -1) {\n String downloadFileName = newFilename;\n File downloadDirectory = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);\n String downloadDirectoryPath =\n downloadDirectory.getPath()\n + File.separator\n + Constants.APP_NAME;\n\n dir = new File(downloadDirectoryPath);\n if(!dir.exists()){\n dir.mkdirs();\n }\n\n ret = new File(downloadDirectoryPath + \"/\" + downloadFileName);\n\n if (!ret.exists()) {\n ret.createNewFile();\n }\n }\n }\n }catch(IOException ex)\n {\n //Log.e(\"Download Manager\", ex.getMessage(), ex);\n }finally {\n return ret;\n }\n }",
"private static String convertUrlToFilePath(String url) {\n int index = url.lastIndexOf('.');\n\n StringBuffer filePath = new StringBuffer();\n\n filePath.append(application.getCacheDir().toString()).append(\"/\");\n\n filePath.append(ZentaoAPI.md5(url));\n if(index > -1) {\n filePath.append(url.substring(index));\n }\n return filePath.toString();\n }",
"public static File createDownloadsPath(Activity activity, String[] urlDir) {\n\t\tFile path = null;\n\t\tFile cacheDir = null;\n\t\tif (sdAvailableWrite()) {\n\t\t\tpath = activity\n\t\t\t\t\t.getExternalFilesDir(Environment.DIRECTORY_DOWNLOADS);\n\t\t\tcacheDir = new File(path + File.separator + \"santos\"\n\t\t\t\t\t+ File.separator + \"cache\" + File.separator\n\t\t\t\t\t+ urlDir[urlDir.length - 2]);\n\t\t} else {\n\t\t\tpath = Environment.getDataDirectory();\n\t\t\tcacheDir = new File(path + File.separator + \"data\" + File.separator\n\t\t\t\t\t+ \"com.es.santosinocentes\" + File.separator + \"cache\"\n\t\t\t\t\t+ File.separator + urlDir[urlDir.length - 2]);\n\t\t}\n\t\treturn cacheDir;\n\t}",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_main);\n txt_file_Name = findViewById(R.id.txt_file_Name);\n choose_file = findViewById(R.id.choose_file);\n Upload_file = findViewById(R.id.Upload_file);\n\n requestLocationPermission();\n\n//\n// if (retrofit == null) {\n// retrofit = new Retrofit.Builder()\n// .baseUrl(BASE_URL)\n// .addConverterFactory(GsonConverterFactory.create())\n// .build();\n// }\n\n choose_file.setOnClickListener(v -> {\n\n String manufacturer = Build.MANUFACTURER;\n Log.e(\"manufacturer\", manufacturer);\n\n if (manufacturer.contains(\"samsung\")) {\n Log.e(\"manufacturer\", \"samsung call\");\n Intent intent = new Intent(\"com.sec.android.app.myfiles.PICK_DATA\");\n intent.putExtra(\"CONTENT_TYPE\", \"*/*\");\n intent.addCategory(Intent.CATEGORY_DEFAULT);\n startActivityForResult(intent, REQUEST_FILE_CODE);\n } else {\n Intent chooser = new Intent(Intent.ACTION_GET_CONTENT);\n Uri uri = Uri.parse(Environment.getDownloadCacheDirectory().getPath().toString());\n chooser.addCategory(Intent.CATEGORY_OPENABLE);\n chooser.setDataAndType(uri, \"*/*\");\n\n try {\n PackageManager pm = getPackageManager();\n if (chooser.resolveActivity(pm) != null) {\n startActivityForResult(chooser, REQUEST_FILE_CODE);\n }\n\n } catch (android.content.ActivityNotFoundException ex) {\n\n Toast.makeText(MainActivity.this, \"Please install a File Manager.\"\n , Toast.LENGTH_SHORT).show();\n }\n }\n\n });\n\n Upload_file.setOnClickListener(v -> {\n\n if (FilePath != null\n && !FilePath.equalsIgnoreCase(\"\")){\n// UploadFile(new File(FilePath));\n// new UploadAsyncTask().execute();\n\n CreateProgressDialog(MainActivity.this);\n showProgress(\"Uploading Backup\");\n FileUploader fileUploader = new FileUploader(new File(FilePath),MainActivity.this);\n fileUploader.SetCallBack(new FileUploader.FileUploaderCallback() {\n @Override\n public void onError() {\n hideProgress();\n }\n\n @Override\n public void onFinish(String responses) {\n hideProgress();\n }\n\n @Override\n public void onProgressUpdate(int currentpercent, int totalpercent,String msg) {\n updateProgress(totalpercent,\"Uploading Backup\",msg);\n }\n });\n\n\n FilePath = \"\";\n txt_file_Name.setText(\"File Path\");\n }else {\n Toast.makeText(MainActivity.this,\"Select File\",Toast.LENGTH_SHORT).show();\n }\n\n });\n\n\n }",
"public Observable<File> downloadApk(Installation installation) {\n return downloadApk(installation.getPackageName(), installation.getVersion(), null);\n }",
"private void addDownloadJob(TvDataUpdateManager dataBase, Mirror mirror, Date date,\r\n String level, Channel channel, String country,\r\n DayProgramReceiveDH receiveDH, DayProgramUpdateDH updateDH,\r\n SummaryFile remoteSummary, SummaryFile localSummary)\r\n {\n if (remoteSummary == null) {\r\n return;\r\n }\r\n String completeFileName = DayProgramFile.getProgramFileName(date,\r\n country, channel.getId(), level);\r\n File completeFile = null;\r\n\r\n int levelIdx = DayProgramFile.getLevelIndexForId(level);\r\n\r\n\r\n boolean downloadTheWholeDayProgram;\r\n // Check whether we already have data for this day\r\n downloadTheWholeDayProgram = !(dataBase.isDayProgramAvailable(date, channel) && (completeFile = new File(mDataDir, completeFileName)).exists());\r\n if (!downloadTheWholeDayProgram) {\r\n // We have data -> Check whether the mirror has an update\r\n\r\n // Get the version of the file\r\n int localVersion;\r\n try {\r\n localVersion = localSummary.getDayProgramVersion(date, country, channel.getId(), levelIdx);\r\n if (localVersion == -1) {\r\n //not found, look into file itself\r\n if (completeFile == null) {\r\n completeFile = new File(mDataDir, completeFileName);\r\n }\r\n localVersion = DayProgramFile.readVersionFromFile(completeFile);\r\n //directly add it\r\n localSummary.setDayProgramVersion(date, country, channel.getId(), levelIdx, localVersion);\r\n //getChannelGroupById(channel.getGroup().getId()).saveLocalSummary();\r\n }\r\n \r\n if (localVersion == 255) {\r\n downloadTheWholeDayProgram = true;\r\n } else {\r\n\r\n\r\n // Check whether the mirror has a newer version\r\n boolean needsUpdate;\r\n int mirrorVersion = remoteSummary.getDayProgramVersion(date, country,\r\n channel.getId(), levelIdx);\r\n needsUpdate = (mirrorVersion > localVersion);\r\n\r\n\r\n if (needsUpdate) {\r\n // We need an update -> Add an update job\r\n String updateFileName = DayProgramFile.getProgramFileName(date,\r\n country, channel.getId(), level, localVersion);\r\n mDownloadManager.addDownloadJob(mirror.getUrl(),updateFileName, updateDH);\r\n }\r\n }\r\n\r\n } catch (Exception exc) {\r\n// // don't throw an exception; try to download the file again\r\n// throw new TvBrowserException(getClass(), \"error.5\",\r\n// \"Reading version of TV data file failed: {0}\",\r\n// completeFile.getAbsolutePath(), exc);\r\n downloadTheWholeDayProgram = true;\r\n }\r\n\r\n }\r\n\r\n if (downloadTheWholeDayProgram)\r\n {\r\n // We have no data -> Check whether the mirror has\r\n boolean needsUpdate;\r\n int mirrorVersion = remoteSummary.getDayProgramVersion(date, country,\r\n channel.getId(), levelIdx);\r\n needsUpdate = (mirrorVersion != -1);\r\n\r\n if (needsUpdate) {\r\n // We need an receive -> Add a download job\r\n mDownloadManager.addDownloadJob(mirror.getUrl(),completeFileName, receiveDH);\r\n }\r\n }\r\n }",
"private void launchImageFile(File imageFile){\n String dstPath = (Environment.getExternalStoragePublicDirectory(\n Environment.DIRECTORY_DOWNLOADS) + \"/\" + imageFile.getName());\n File dstFile = new File(dstPath);\n if (dstFile.exists()){\n try{\n Uri path = Uri.fromFile(dstFile);\n Intent objIntent = new Intent(Intent.ACTION_VIEW);\n objIntent.setDataAndType(path, \"image/*\");\n objIntent.setFlags(Intent. FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(objIntent);//Starting the video viewer\n } catch(Exception e){\n e.printStackTrace();\n }\n } else {\n Toast.makeText(this, \"Error: This file does not exist.\",\n Toast.LENGTH_SHORT).show();\n }\n }",
"@Override\n protected void onPostExecute(File result) {\n try {\n\n if(result!=null) {\n\n // we need to check the file size here\n if(result.length()<filesize){\n\n Log.d(\"DownloadData\",\"File size does not match\");\n Log.d(\"DownloadData\",\"Current size \"+String.valueOf(result.length()));\n Log.d(\"DownloadData\",\"Expected size \"+String.valueOf(filesize));\n String size = String.valueOf(filesize);\n new DownloadData().execute(url,size);\n return ;\n }else{\n\n filesdownloaded = filesdownloaded +1;\n Log.i(\"FileProgress\",\"Total files downloaded \"+String.valueOf(filesdownloaded));\n\n\n //Log.d(\"FileName\",result.getAbsolutePath());\n String unzipPath = Utils.getROOTDIR() + \"/data/\"+uriPath;\n //Log.d(\"Unzip \",unzipPath);\n //unzip(result.getAbsolutePath(), unzipPath);\n String csize = String.valueOf(filesize);\n UpdateRequest ur = new UpdateRequest();\n ur.setFilename(fileName.substring(fileName.lastIndexOf(\"/\")+1));\n ur.setFilesize(csize);\n ur.setUpdatedate(new SimpleDateFormat(\"yyyy-mm-dd\").format(new Date()));\n updateRequestDao.insert(ur);\n String attempts=\"0\";\n new UnZipTask().execute(result.getAbsolutePath(), unzipPath,url,String.valueOf(filesize),attempts);\n\n }\n\n\n }else{\n Log.i(\"FileProgress\",\"Failed to download file \"+url);\n //System.out.println(\"Failed to download file \"+url);\n Log.d(\"FailedDownload\",url);\n String size = String.valueOf(filesize);\n new DownloadData().execute(url,size);\n return ;\n }\n }\n catch(Exception ex) {\n ex.printStackTrace();\n Log.d(\"FailedDownload\",url);\n String size = String.valueOf(filesize);\n new DownloadData().execute(url,size);\n return ;\n }\n }",
"private Uri getOutputMediaFileUri(int mediaType) {\n //parvo triabva da se proveri dali ima external storage\n\n if (isExternalStorageAvailable()) {\n\n //sled tova vrashtame directoriata za pictures ili ia sazdavame\n //1.Get external storage directory\n String appName = SendMessage.this.getString(R.string.app_name);\n String environmentDirectory; //\n //ako snimame picture zapismave v papkata za kartiniki, ako ne v papkata za Movies\n\n if(mediaType == MEDIA_TYPE_IMAGE) {\n environmentDirectory = Environment.DIRECTORY_PICTURES;\n } else {\n environmentDirectory = Environment.DIRECTORY_MOVIES;\n }\n File mediaStorageDirectory = new File(\n Environment.getExternalStoragePublicDirectory(environmentDirectory),\n appName);\n\n //2.Create subdirectory if it does not exist\n if (! mediaStorageDirectory.exists()) {\n if (!mediaStorageDirectory.mkdirs()) {\n Log.e(TAG, \"failed to create directory\");\n return null;\n }\n }\n\n //3.Create file name\n String timeStamp = new SimpleDateFormat(\"yyyyMMdd_HHmmss\").format(new Date());\n File mediaFile;\n if (mediaType == MEDIA_TYPE_IMAGE) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"IMG_\" + timeStamp + \".jpg\");\n } else if (mediaType == MEDIA_TYPE_VIDEO) {\n mediaFile = new File(mediaStorageDirectory.getPath() + File.separator +\n \"MOV_\" + timeStamp + \".mp4\");\n } else {\n return null;\n }\n //4.Return the file's URI\n Log.d(TAG, \"File path: \" + Uri.fromFile(mediaFile));\n return Uri.fromFile(mediaFile);\n\n } else //ako niama external storage\n Log.d(\"Vic\",\"no external strogage, mediaUri si null\");\n return null;\n\n }",
"private String downloadFile(String strURL, int index, boolean delete)\n {\n int npos = strURL.lastIndexOf('/');\n if (npos == strURL.length()-1) { \n \tm_ErrorCode = 1;\n return null;\n }\n\n String filename = strURL.substring(npos+1);\n try {\n // setup streams to download and write to file\n String outputFilePath = Update.pathSD + filename;\n File fSettingsZip = new File(outputFilePath);\n if (fSettingsZip.exists()) { // todo: do we want this configurable?\n //m_logWriter.write(\"Deleting old file: \"+outputFilePath+\"\\n\");\n \tif (!delete)\n \t\treturn outputFilePath;\n \t\n \tfSettingsZip.delete();\n \t//return outputFilePath;\n }\n\n publishProgress(PROGRESS_DOWNLOAD, (int)(0.5 * index));\n //m_logWriter.write(\"Trying URL: \"+strURL+\", filename: \"+filename+\"\\n\");\n //m_logWriter.flush();\n URL url = new URL(strURL);\n HttpURLConnection conn = (HttpURLConnection)url.openConnection();\n conn.setRequestProperty(\"User-Agent\", \"Mozilla/5.0(Linux; U; Android 2.2; en-gb; LG-P500 Build/FRF91) AppleWebKit/533.0 (KHTML, like Gecko) Version/4.0 Mobile Safari/533.1\");\n conn.connect();\n\n mContentLength = conn.getContentLength();\n\n InputStream is = new BufferedInputStream(url.openStream(), 8192);\n OutputStream os = new BufferedOutputStream(new FileOutputStream(outputFilePath));\n byte data[] = new byte[1024];\n mTotalRead = 0;\n int read=0;\n //while ((read = is.read(data)) != -1)\n while (true) {\n if (isCancelled()) {\n outputFilePath = null;\n m_ErrorCode = 2;\n break;\n }\n \n if (m_DownloadStop)\n \tcontinue;\n \n if ((read = is.read(data)) == -1)\n \tbreak;\n\n mTotalRead += read;\n\n // progress if we know the content length\n if (mContentLength > 0)\n publishProgress(PROGRESS_DOWNLOAD, (int)(0.5 * (index + mTotalRead*100/mContentLength)));\n \tmPrecent = (int)mTotalRead*100 / mContentLength;\n // write to file\n os.write(data, 0, read);\n }\n\n // close and get ready to bail\n os.flush();\n os.close();\n is.close();\n filename = outputFilePath;\n }\n catch(Exception e) {\n filename = null;\n m_ErrorCode = 3;\n }\n\n return filename;\n }",
"@Override public void onClick(DialogInterface dialogInterface, int i) {\n DownloadUtils.DownloadApkWithProgress(context.getApplicationContext(),\n appVersion.getUpdateUrl());\n }",
"private static Uri saveFileAndAddToMediaStore(SquareImageButton button, Context context, File file, Uri uri, ContentResolver resolver) {\n // This will hold the uri of the newly saved file\n Uri newUri;\n // A file descriptor of an entry in the AssetManager\n AssetFileDescriptor assetFileDescriptor;\n\n try {\n // obtain read access to the file descriptor in the Asset manager\n assetFileDescriptor = resolver.openAssetFileDescriptor(uri, \"r\");\n }\n catch (FileNotFoundException e) {\n // The sound file could not be found and needs to be saved.\n assetFileDescriptor = null;\n }\n\n saveFileToDevice(context, file, assetFileDescriptor);\n\n newUri = insertSoundFileToMediaStore(button, file, resolver);\n return newUri;\n }",
"@Override\n protected Integer doInBackground(Void... params) {\n URL url = null;\n File file;\n File output_file;\n InputStream inputStream = null;\n FileOutputStream fos = null;\n try {\n url = new URL(url_link);\n HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection();\n file = new File(url_link);\n String name = file.getName();\n output_file = new File(Environment.getExternalStorageDirectory(), name);\n fos = new FileOutputStream(output_file.getPath());\n inputStream = httpURLConnection.getInputStream();\n path = output_file.getAbsolutePath();\n // output_file = new File(file.getPath());\n //fos = new FileOutputStream(Environment.getExternalStorageDirectory(),output_file);\n int count = 0;\n int total = 0;\n int filelength = httpURLConnection.getContentLength();\n byte bytes[] = new byte[filelength];\n while ((count = inputStream.read(bytes, 0, filelength)) != -1) {\n total += count;\n publishProgress((total * 100) / filelength);\n\n fos.write(bytes, 0, count);\n }\n\n } catch (MalformedURLException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return null;\n }",
"@Override\r\n protected String doInBackground(String... f_url) {\r\n int count;\r\n try {\r\n String root = Environment.getExternalStorageDirectory().toString();\r\n\r\n System.out.println(\"Downloading\");\r\n URL url = new URL(f_url[0]);\r\n\r\n URLConnection conection = url.openConnection();\r\n conection.connect();\r\n // getting file length\r\n int lenghtOfFile = conection.getContentLength();\r\n\r\n // input stream to read file - with 8k buffer\r\n InputStream input = new BufferedInputStream(url.openStream(), 8192);\r\n\r\n // Output stream to write file\r\n\r\n OutputStream output = new FileOutputStream(root+\"/downloadedfile.jpg\");\r\n byte data[] = new byte[1024];\r\n\r\n long total = 0;\r\n while ((count = input.read(data)) != -1) {\r\n total += count;\r\n\r\n // writing data to file\r\n output.write(data, 0, count);\r\n\r\n }\r\n\r\n // flushing output\r\n output.flush();\r\n\r\n // closing streams\r\n output.close();\r\n input.close();\r\n\r\n } catch (Exception e) {\r\n Log.e(\"Error: \", e.getMessage());\r\n }\r\n\r\n return null;\r\n }",
"public static void sideloadInstall(Context ctx, String assetFilename) {\n try {\n // Read .pbw from assets\n Intent intent = new Intent(Intent.ACTION_VIEW);\n File file = new File(ctx.getExternalFilesDir(null), assetFilename);\n InputStream is = ctx.getResources().getAssets().open(assetFilename);\n OutputStream os = new FileOutputStream(file);\n byte[] pbw = new byte[is.available()];\n is.read(pbw);\n os.write(pbw);\n is.close();\n os.close();\n\n // Install via Pebble Android app\n intent.setDataAndType(Uri.fromFile(file), \"application/pbw\");\n intent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n ctx.startActivity(intent);\n } catch (Exception e) {\n Toast.makeText(ctx, \"App install failed: \" + e.getLocalizedMessage(), Toast.LENGTH_LONG).show();\n }\n }",
"private static File getAssetLinkFile(MD5Key id) {\n \t\treturn new File(cacheDir.getAbsolutePath() + File.separator + id + \".lnk\");\n \t}",
"@Override\r\n protected void postAction() {\n\r\n if(mAutoUpdate && hasNewVersion()) {\r\n downloadAndInstallNewVersionApk();\r\n }\r\n\r\n isUpdating = false;\r\n }",
"public static void startUpdate(Context context, String url, String fileName, OnProgressListener progressListener) {\n mProgressListener = progressListener;\n Intent intent = new Intent(context, AppUpdateService.class);\n intent.setAction(ACTION_UPDATE);\n intent.putExtra(EXTRA_URL, url);\n intent.putExtra(EXTRA_FILE_NAME, fileName);\n context.startService(intent);\n }",
"private void downloadImage(String url, int version) {\n ContextWrapper cw = new ContextWrapper(getApplicationContext());\n // path to /data/data/yourapp/app_data/imageDir\n File directory = cw.getDir(\"imageDir\", Context.MODE_PRIVATE);\n // Create imageDir\n File myPath = new File(directory, \"profile.jpg\");\n try {\n URL downloadURL = new URL(url);\n HttpURLConnection conn = (HttpURLConnection) downloadURL.openConnection();\n int responseCode = conn.getResponseCode();\n if (responseCode != 200) {\n throw new Exception(\"Error in connection\");\n }\n InputStream is = conn.getInputStream();\n FileOutputStream os = new FileOutputStream(myPath);\n byte[] buffer = new byte[1024];\n int byteCount;\n while ((byteCount = is.read(buffer)) != -1) {\n os.write(buffer, 0, byteCount);\n }\n os.close();\n is.close();\n if (version > -1) {\n PrefManager.saveInt(DownloadService.this, \"VERSION\", version);\n }\n Log.d(\"com.ajs.glidetest\", \"download complete \" + version);\n PrefManager.saveBoolean(DownloadService.this, \"DOWNLOAD_OK\", true);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }",
"private void updateDatabaseFile() {\n Log.i(\"updateDatabaseFile\", \"Updating server app database\");\n try {\n FileInputStream inputStream = new FileInputStream(databaseFile);\n DropboxAPI.Entry response = MainActivity.mDBApi.putFileOverwrite(databaseFile.getName(), inputStream,\n databaseFile.length(), null);\n Log.i(\"updateDatabaseFile\", \"The uploaded file's rev is: \" + response.rev);\n } catch (Exception e) {\n Log.e(\"updateDatabaseFile\", e.toString(), e);\n }\n }",
"@Override\n public void copyImageIntoAppDir(Context context) {\n try {\n mImagePath.create(context, \"newFile\", \".jpg\");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n File destFile = mImagePath.getFile();\n\n// try {\n// Util.copyFile(srcFile, destFile);\n// } catch (IOException e) {\n// e.printStackTrace();\n// }\n\n String infoString = mImagePath.toString();\n\n Log.d(\"infoString \", \" \" + infoString);\n mContractview.showImageInfo(infoString);\n\n }",
"public static Uri UriParse(String url) {\n\t\ttry {\n\t\t\tUrlMedia = url;\n\t\t\tFile path = null;\n\t\t\tFile cacheDir;\n\t\t\tString[] urlDir = url.split(\"/\");\n\t\t\tif (sdAvailableWrite()) {\n\t\t\t\tpath = Environment.getExternalStorageDirectory();\n\t\t\t\tcacheDir = new File(path + File.separator + \"miramusei\"\n\t\t\t\t\t\t+ File.separator + \"cache\" + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 2]);\n\t\t\t} else {\n\t\t\t\tpath = Environment.getDataDirectory();\n\t\t\t\tcacheDir = new File(path + File.separator + \"data\"\n\t\t\t\t\t\t+ File.separator + \"com.miramusei.museum\"\n\t\t\t\t\t\t+ File.separator + \"cache\" + File.separator\n\t\t\t\t\t\t+ urlDir[urlDir.length - 2]);\n\t\t\t}\n\t\t\t// File cacheDir = new File(ruta+File.separator+ urlDir[8]);\n\t\t\tif (!cacheDir.exists()) {\n\t\t\t\tcacheDir.mkdirs();\n\n\t\t\t}\n\t\t\tcacheDirNameMedia = new File(cacheDir + File.separator\n\t\t\t\t\t+ urlDir[urlDir.length - 1]);\n\n\t\t\tif (!cacheDirNameMedia.exists() || cacheDirNameMedia.length() == 0) {\n\n\t\t\t\tThread downloadFile = new Thread() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tsuper.run();\n\t\t\t\t\t\t\tcacheDirNameMedia.createNewFile();\n\n\t\t\t\t\t\t\tInputStream is = (InputStream) new URL(UrlMedia)\n\t\t\t\t\t\t\t\t\t.getContent();\n\t\t\t\t\t\t\t// Uri jose=Uri.parse(url);\n\t\t\t\t\t\t\tFileOutputStream fo = new FileOutputStream(\n\t\t\t\t\t\t\t\t\tcacheDirNameMedia);\n\t\t\t\t\t\t\t// Drawable d = Drawable.createFromStream(is,\n\t\t\t\t\t\t\t// \"src name\");\n\t\t\t\t\t\t\tbyte[] buffer = new byte[2048];\n\t\t\t\t\t\t\tint length;\n\t\t\t\t\t\t\twhile ((length = is.read(buffer)) > 0) {\n\t\t\t\t\t\t\t\tfo.write(buffer, 0, length);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tfo.close();\n\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tcacheDirNameMedia.deleteOnExit();\n\t\t\t\t\t\t\tSystem.out.println(\"Error cacheando imagen\"\n\t\t\t\t\t\t\t\t\t+ e.getMessage());\n\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\tdownloadFile.start();\n\t\t\t\treturn Uri.parse(url);\n\n\t\t\t} else {\n\t\t\t\treturn Uri.fromFile(cacheDirNameMedia);\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\treturn null;\n\t\t}\n\t}",
"void installApp(String appPath);",
"private void updateMediaPackageID(MediaPackage mp, URI uri) throws IOException {\n InputStream in = null;\n HttpResponse response = null;\n try {\n if (uri.toString().startsWith(\"http\")) {\n HttpGet get = new HttpGet(uri);\n response = httpClient.execute(get);\n int httpStatusCode = response.getStatusLine().getStatusCode();\n if (httpStatusCode != 200) {\n throw new IOException(uri + \" returns http \" + httpStatusCode);\n }\n in = response.getEntity().getContent();\n } else {\n in = uri.toURL().openStream();\n }\n updateMediaPackageID(mp, in);\n in.close();\n } finally {\n IOUtils.closeQuietly(in);\n httpClient.close(response);\n }\n }",
"@Override\n protected void onHandleIntent(Intent intent) {\n String urlPath = intent.getStringExtra(URL);\n String fileName = intent.getStringExtra(FILENAME);\n File output = new File(Environment.getExternalStorageDirectory(),\n fileName);\n if (output.exists()) {\n output.delete();\n }\n\n InputStream stream = null;\n FileOutputStream fos = null;\n try {\n\n URL url = new URL(urlPath);\n stream = url.openConnection().getInputStream();\n InputStreamReader reader = new InputStreamReader(stream);\n fos = new FileOutputStream(output.getPath());\n int next = -1;\n while ((next = reader.read()) != -1) {\n fos.write(next);\n }\n // successfully finished\n result = Activity.RESULT_OK;\n\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n if (stream != null) {\n try {\n stream.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n if (fos != null) {\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n publishResults(output.getAbsolutePath(), result);\n }",
"public void updateDatabase(){\n executeSQLQuery(\"create table if not exists updates(id integer PRIMARY KEY,version integer,ejecutado integer)\\n\");\n try {\n AssetManager am = mContext.getAssets();\n String[] list = am.list(\"actualizaciones\");\n File[] files = new File[list.length];\n if (list != null){\n for (int i = 0; i < list.length; ++i) {\n File file = new File(list[i]);\n files[i]=file;\n }\n }\n\n /*ordenar por fecha*/\n// if (files != null && files.length > 1) {\n// Arrays.sort(files, new Comparator<File>() {\n// @Override\n// public int compare(File object1, File object2) {\n// return (int) ((object1.lastModified() > object2.lastModified()) ? object1.lastModified() : object2.lastModified());\n// }\n// });\n// }\n\n if(files!=null){\n for (int j=0;j<files.length;j++){\n File file = files[j];\n if (file.isDirectory()) {\n Log.d(\"Assets:\", file.getPath() + \" is Directory\");\n } else {\n\n Log.d(\"Assets:\", file.getPath() + \" is File\");\n Log.w(\"archivo\",file.getPath());\n //InputStream in = am.open(\"actualizaciones/680.txt\");\n String fileName = file.getPath();\n int version = Integer.parseInt(fileName.substring(0,fileName.lastIndexOf(\".\")));\n int versionDB = getDataBaseVersion();\n\n Log.i(\"version\",Integer.toString(version));\n Log.i(\"versionDB\",Integer.toString(versionDB));\n\n //if(version>versionDB){//es una actualizacion\n if(true){\n //Log.w(\"update\",\"la version es mayor que la de la bd\");\n int ejecutado = ejecutado(version);\n if(ejecutado==-1 || ejecutado==0){//\n Log.w(\"update\",\"se actualizara la base de datos\");\n InputStream in = am.open(\"actualizaciones/\"+fileName);\n\n BufferedReader r = new BufferedReader(new InputStreamReader(in));\n StringBuilder total = new StringBuilder();\n String line;\n while ((line = r.readLine()) != null) {\n total.append(\" \"+line+\" \");\n }\n\n String[] script = total.toString().split(\";\");\n for(int i=0;i<script.length;i++){\n if(script[i].trim().length()>0){\n Log.i(\"query\",\"ejecuntado el siguiente script: \"+script[i]);\n try{\n executeSQLQuery(script[i]);\n Log.w(\"exito\",\"ejecucion de script\");\n }catch(Exception ex){\n Log.e(\"fracaso\",\"hubo un problema al ejecutar la actualizacion de la base de datos\");\n }\n }\n }\n\n if(ejecutado==-1){\n executeSQLQuery(\"insert into updates(version,ejecutado) values(\"+version+\",1)\");\n }else{\n executeSQLQuery(\"update updates set ejecutado=0 where version=\"+version+\"\\n\");\n }\n\n\n }else{\n Log.w(\"update\",\"esta en base de datos y esta actualizado\");\n }\n }else {\n //Log.w(\"update\",\"no es necesario actualizar\");\n }\n }\n }\n\n /*actualizar estado de la actualizacion*/\n Cursor cursor=null;\n cursor = executeSelect(\"select * from updates\",cursor);\n while (cursor.moveToNext()){\n Log.i(\"version\",cursor.getInt(1)+\"\");\n Log.i(\"ejecutado\",cursor.getInt(2)+\"\");\n }\n }\n setDatabaseVersion();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n\n }",
"private Uri getPicOutputUri(){\n String filePath = getExternalFilesDir(Environment.DIRECTORY_PICTURES) + File.separator + String.valueOf(System.currentTimeMillis())+\".jpg\";\n return Uri.fromFile(new File(filePath));\n }",
"@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if(resultCode == RESULT_OK && requestCode ==200){\n Uri uri_img=data.getData();\n try{\n assert uri_img != null;\n InputStream input_img = updateView.getContext().getContentResolver().openInputStream(uri_img);\n DecodeImage_stream = BitmapFactory.decodeStream(input_img);\n chooseImage.setImageBitmap(DecodeImage_stream);\n }catch (FileNotFoundException f){\n Log.d(\"add new file not found:\",f.getMessage());\n }\n }\n }",
"private void copyFromAssets(AssetManager manager, String asset,\n File fileLocation, boolean overwrite) {\n // Only write to file if it does not exist already\n if (fileLocation.exists() && !overwrite) {\n return;\n }\n\n // Create necessary directory structure\n if (!fileLocation.getParentFile().exists() && !fileLocation.getParentFile().mkdirs()) {\n throw new IllegalArgumentException(\"Could not create directory: \" + fileLocation.getParentFile().getPath());\n }\n Log.d(this.getClass().getSimpleName(), \"Writing asset file: \" + asset + \" to \"\n + fileLocation.getAbsolutePath());\n InputStream inStream;\n try {\n inStream = new BufferedInputStream(manager.open(asset,\n AssetManager.ACCESS_STREAMING));\n } catch (IOException e) {\n Log.w(this.getClass().getSimpleName(), \"Could not read asset file: \" + asset);\n // don't throw - it is ok to miss a file in the app bundle (asset manager used with\n // different file configurations), just don't install in that case\n return;\n }\n try {\n OutputStream outStream = new BufferedOutputStream(new FileOutputStream(fileLocation));\n byte[] buffer = new byte[10240]; // 10KB\n int length = 0;\n while ((length = inStream.read(buffer)) >= 0) {\n outStream.write(buffer, 0, length);\n }\n outStream.close();\n inStream.close();\n } catch (IOException e) {\n throw new IllegalArgumentException(\"Could not write file to \" + fileLocation, e);\n }\n }",
"private void startDownload(String url) {\n\t\t\turl = \"http://www.it.com.cn/dghome/img/2009/06/23/17/090623_tv_tf2_13h.jpg\";\r\n\t\t\t//String url = \"http://down.mumayi.com/41052/mbaidu\";\r\n\t\t\tUri srcUri = Uri.parse(url);\r\n\t\t\tDownloadManager.Request request = new Request(srcUri);\r\n\t\t\trequest.setDestinationInExternalPublicDir(\r\n\t\t\t\tEnvironment.DIRECTORY_DOWNLOADS, \"/\");\r\n\t\t\trequest.setDescription(\"正在下载\");\r\n\t\t\t DownloadManager mDownloadManager = new DownloadManager(activity.getContentResolver(),\r\n\t\t\t\t\t activity.getPackageName());\r\n\t\t\tmDownloadManager.enqueue(request);\r\n\t\t }",
"public static String downloadFileFromURL(Context mContext, String urlLinkToDownloadFrom, String downloadedFileName) {\n int count;\n try {\n URL url = new URL(urlLinkToDownloadFrom);\n URLConnection connection = url.openConnection();\n connection.connect();\n InputStream input = new BufferedInputStream(url.openStream(), 8192);\n String newFileLocation = mContext.getExternalFilesDir(null).toString() + \"/\" + downloadedFileName;\n writeLog(LOG_LEVEL.INFO, \"File downloaded at: \" + newFileLocation);\n OutputStream output = new FileOutputStream(newFileLocation);\n byte[] data = new byte[1024];\n while ((count = input.read(data)) != -1) {\n output.write(data, 0, count);\n }\n output.flush();\n output.close();\n input.close();\n hideProgressDialog();\n return newFileLocation;\n } catch (Exception e) {\n writeLog(LOG_LEVEL.ERROR, e.getMessage());\n hideProgressDialog();\n return null;\n }\n }",
"@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n else if (id==R.id.share)\n {\n Toast.makeText(getApplicationContext(),\"Please Wait\",Toast.LENGTH_SHORT).show();\n dm = (DownloadManager) getSystemService(DOWNLOAD_SERVICE);\n DownloadManager.Request request = new DownloadManager.Request(\n Uri.parse(urlstring)).setDestinationInExternalPublicDir(\"/Society365\", legdername+\" - \"+timeperiod2+\".pdf\");\n\n request.setDescription(urlstring); //appears the same in Notification bar while downloading\n\n enqueue = dm.enqueue(request);\n }\n\n\n return super.onOptionsItemSelected(item);\n }",
"private Uri getOutputMediaFileUri(int type){\n return Uri.fromFile(getOutputMediaFile(type));\n }",
"public static String getPath(Context context, Uri uri) {\n String string;\n boolean bl = Build.VERSION.SDK_INT >= 19;\n if (bl && DocumentsContract.isDocumentUri((Context)context, (Uri)uri)) {\n Uri uri2;\n if (BikinFileActivity.isExternalStorageDocument(uri)) {\n String[] arrstring = DocumentsContract.getDocumentId((Uri)uri).split(\":\");\n boolean bl2 = \"primary\".equalsIgnoreCase(arrstring[0]);\n string = null;\n if (!bl2) return string;\n return (Object)Environment.getExternalStorageDirectory() + \"/\" + arrstring[1];\n }\n if (BikinFileActivity.isDownloadsDocument(uri)) {\n String string2 = DocumentsContract.getDocumentId((Uri)uri);\n return BikinFileActivity.getDataColumn(context, ContentUris.withAppendedId((Uri)Uri.parse((String)\"content://downloads/public_downloads\"), (long)Long.valueOf((String)string2)), null, null);\n }\n boolean bl3 = BikinFileActivity.isMediaDocument(uri);\n string = null;\n if (!bl3) return string;\n String[] arrstring = DocumentsContract.getDocumentId((Uri)uri).split(\":\");\n String string3 = arrstring[0];\n if (\"image\".equals((Object)string3)) {\n uri2 = MediaStore.Images.Media.EXTERNAL_CONTENT_URI;\n } else if (\"video\".equals((Object)string3)) {\n uri2 = MediaStore.Video.Media.EXTERNAL_CONTENT_URI;\n } else {\n boolean bl4 = \"audio\".equals((Object)string3);\n uri2 = null;\n if (bl4) {\n uri2 = MediaStore.Audio.Media.EXTERNAL_CONTENT_URI;\n }\n }\n String[] arrstring2 = new String[]{arrstring[1]};\n return BikinFileActivity.getDataColumn(context, uri2, \"_id=?\", arrstring2);\n }\n if (\"content\".equalsIgnoreCase(uri.getScheme())) {\n if (!BikinFileActivity.isGooglePhotosUri(uri)) return BikinFileActivity.getDataColumn(context, uri, null, null);\n return uri.getLastPathSegment();\n }\n boolean bl5 = \"file\".equalsIgnoreCase(uri.getScheme());\n string = null;\n if (!bl5) return string;\n return uri.getPath();\n }",
"private String downloadFolder(){\n\t\tFile home = new File(System.getProperty(\"user.home\"));\n\t\tFile folder = new File (home,\"Downloads/PaluDownloads\");\n\t\tif (!folder.exists()){\n\t\t\tfolder.mkdir();\n\t\t}\n\t\treturn folder.getAbsolutePath();\n\t}",
"void downloadingFile(String path);",
"public void getData(Context context) {\n try{\n // Datos locales\n PackageInfo pckginfo = context.getPackageManager().getPackageInfo(context.getPackageName(), 0);\n currentVersionCode = pckginfo.versionCode;\n currentVersionName = pckginfo.versionName;\n\n // Datos remotos\n String data = downloadHttp(new URL(INFO_FILE));\n JSONObject json = new JSONObject(data);\n latestVersionCode = json.getInt(\"versionCode\");\n latestVersionName = json.getString(\"versionName\");\n downloadURL = json.getString(\"downloadURL\");\n Log.d ( \"AutoUpdate\" , \"Data obtained successfully\" );\n } catch (JSONException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error with JSON\" , e);\n } catch (NameNotFoundException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error with Packete: S\" , e);\n } catch (IOException e) {\n Log.e ( \"AutoUpdate\" , \"There was an error downloading\" , e);\n }\n }",
"public interface Files \n{\n\t/**\n\t * Enum describing the three file types, internal, external\n\t * and absolut. Internal files are located in the asset directory\n\t * on Android and are relative to the applications root directory\n\t * on the desktop. External files are relative to the SD-card on Android\n\t * and relative to the home directory of the current user on the Desktop.\n\t * Absolut files are just that, absolut files that can point anywhere.\n\t * @author mzechner\n\t *\n\t */\n\tpublic enum FileType\n\t{\n\t\tInternal,\n\t\tExternal,\n\t\tAbsolut\n\t}\n\t\n\tpublic File getlastFile();\n\t\n\t/**\n\t * Returns an InputStream to the given file. If type is equal\n\t * to FileType.Internal an internal file will be opened. On Android\n\t * this is relative to the assets directory, on the desktop it is \n\t * relative to the applications root directory. If type is equal to\n\t * FileType.External an external file will be opened. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the filename is interpreted as an absolut filename. \n\t * \n\t * @param fileName the name of the file to open.\n\t * @param type the type of file to open.\n\t * @return the InputStream or null if the file couldn't be opened.\n\t */\n\t\n\tpublic InputStream readFile( String fileName, FileType type );\t\n\t\n\t/**\n\t * Returns and OutputStream to the given file. If\n\t * the file does not exist it is created. If the file\n\t * exists it will be overwritten. If type is equal\n\t * to FileType.Internal null will be returned as on Android assets can not be written. If type is equal to\n\t * FileType.External an external file will be opened. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the filename is interpreted as an absolut filename.\n\t * \n\t * @param filename the name of the file to open\n\t * @param type the type of the file to open\n\t * @return the OutputStream or null if the file couldn't be opened.\n\t */\n\tpublic OutputStream writeFile( String filename, FileType type );\n\t\t\n\t/**\n\t * Creates a new directory or directory hierarchy on the external\n\t * storage. If the directory parameter contains sub folders and \n\t * the parent folders don't exist yet they will be created. If type is equal\n\t * to FileType.Internal false will be returned as on Android new directories in the asset directory can not be created. If type is equal to\n\t * FileType.External an external directory will be created. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the directory is interpreted as an absolut directory name.\n\t * \n\t * @param directory the directory\n\t * @param type the type of the directory\n\t * @return true in case the directory could be created, false otherwise\n\t */\n\tpublic boolean makeDirectory( String directory, FileType type );\n\t\n\t\n\t/**\n\t * Lists the files and directories in the given directory. If type is equal\n\t * to FileType.Internal an internal directory will be listed. On Android\n\t * this is relative to the assets directory, on the desktop it is \n\t * relative to the applications root directory. If type is equal to\n\t * FileType.External an external directory will be listed. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the filename is interpreted as an absolut directory.\n\t * \n\t * @param directory the directory\n\t * @param type the type of the directory\n\t * @return the files and directories in the given directory or null if the directory is none existant\n\t */\n\tpublic String[] listDirectory( String directory, FileType type );\n\t\n\t\n\t/**\n\t * Returns a {@link FileDescriptor} object for a file. If type is equal\n\t * to FileType.Internal an internal file will be opened. On Android\n\t * this is relative to the assets directory, on the desktop it is \n\t * relative to the applications root directory. If type is equal to\n\t * FileType.External an external file will be opened. On Android this\n\t * is relative to the SD-card, on the desktop it is relative to the\n\t * current user's home directory. If type is equal to FileType.Absolut\n\t * the filename is interpreted as an absolut filename. \n\t * \n\t * @param filename the name of the file\n\t * @param type the type of the file\n\t * @return the FileDescriptor or null if the descriptor could not be created\n\t */\n\tpublic FileHandle getFileHandle( String filename, FileType type );\t\t\n}",
"@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\t//traverse the MTXX folder \n\t\tFile dir=new File(dirpath);\n\t\tif(!dir.isDirectory()){\n\t\t\tLog.v(\"myhome\", \"no dir\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tFile[] filelist=dir.listFiles();\n\t\tfor (int i=0;i<filelist.length;i++){\n\t\t\tFile curfile=filelist[i];\n\t\t\tif(curfile.isFile())\n\t\t\t\tmap.put(curfile.lastModified(), curfile.getName());\n\t\t}\n\t\t\n\t\t\n\t\t//sort all files by the time last modified, and get the latest photo\n\t\tArrayList<Map.Entry<Long,String>> list=new ArrayList<Map.Entry<Long,String>>(map.entrySet());\n\t\tCollections.sort(list, new Comparator<Map.Entry<Long, String>>() {\n\n\t\t\t@Override\n\t\t\tpublic int compare(Entry<Long, String> e1, Entry<Long, String> e2) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t\treturn (int) (e1.getKey()-e2.getKey());\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tString filename=list.get(list.size()-1).getValue();\n\t\tIntent result=new Intent();\n\t\tresult.putExtra(\"photouri\", Uri.fromFile(new File(dirpath+\"/\"+filename)));\n\t\tsetResult(RESULT_OK,result);\n\t\tfinish();\n\t\t\n\t}",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n String myurl=taskSnapshot.getDownloadUrl().toString();\n\n String filepathuri=filePath.toString();\n\n String filename=filepathuri.substring(filepathuri.lastIndexOf(\"/\")+1);\n uploadreferance(myurl,filename);\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n Intent intent = new Intent(Upload_files.this,navigation_bar.class);\n startActivity(intent);\n }",
"private File storeToUploadDir(InputStream is, String packageName) throws IOException {\n File uploadedFile = new File(uploadDir, FileType.APPDF.addExtension(random.nextInt() + \"_\" + packageName));\n ReadableByteChannel rbc = Channels.newChannel(is);\n FileOutputStream fos = new FileOutputStream(uploadedFile);\n fos.getChannel().transferFrom(rbc, 0, Long.MAX_VALUE);\n return uploadedFile;\n }",
"private void updateFiles() {\n\t}",
"@Override\n public void onClick(View v) {\n\n writeFile();\n\n File INTERNAL = getFilesDir();\n File EXT_DIR = getExternalFilesDir(Environment.DIRECTORY_PICTURES);\n File dataDir = Environment.getExternalStorageDirectory();\n\n Log.d(\"FILE\", \"INTERNAL: \" + INTERNAL.getAbsolutePath());\n Log.d(\"FILE\", \"EXTERNAL: \" + EXT_DIR.getAbsolutePath());\n Log.d(\"FILE\", \"DATA: \" + dataDir.getAbsolutePath());\n }",
"@Override\n protected String doInBackground(String... params) { //Busca que exista una actualizacion\n int auxX=0,auxY=0,auxZ=0;\n String url=\"\";\n String nombreApk=\"\";\n String base;\n String direccion;\n\n if(params.length==2){\n url = params[0];\n nombreApk = params[1];\n direccion = url+\"/\"+nombreApk+\".apk\";\n\n System.out.println(direccion);\n if(this.actualizar(direccion)){\n return direccion;\n }\n } else {\n if(params.length==5){\n url = params[0];\n nombreApk = params[1];\n auxX = Integer.parseInt(params[2]);\n auxY = Integer.parseInt(params[3]);\n auxZ = Integer.parseInt(params[4])+1;\n\n base = url+\"/\"+nombreApk;\n\n for(int x = auxX;x<10;x++){\n for(int y = auxY;y<10;y++){\n for(int z = auxZ;z<10;z++){\n direccion = base+\"_\"+x+\"_\"+y+\"_\"+z+\".apk\";\n System.out.println(direccion);\n\n if(this.actualizar(direccion)){\n return direccion;\n }\n }\n auxZ=0;\n }\n auxY=0;\n }\n }\n }\n return null;\n }",
"private File downloadFile(String osSdkRoot, ITaskMonitor monitor, boolean forceHttp) {\n String name = getParentPackage().getShortDescription();\n String desc = String.format(\"Downloading %1$s\", name);\n monitor.setDescription(desc);\n monitor.setResult(desc);\n String link = getUrl();\n if (!link.startsWith(\"http://\") && !link.startsWith(\"https://\") && !link.startsWith(\"ftp://\")) {\n Package pkg = getParentPackage();\n RepoSource src = pkg.getParentSource();\n if (src == null) {\n monitor.setResult(\"Internal error: no source for archive %1$s\", name);\n return null;\n }\n String repoXml = src.getUrl();\n int pos = repoXml.lastIndexOf('/');\n String base = repoXml.substring(0, pos + 1);\n link = base + link;\n }\n if (forceHttp) {\n link = link.replaceAll(\"https://\", \"http://\");\n }\n int pos = link.lastIndexOf('/');\n String base = link.substring(pos + 1);\n File tmpFolder = getTempFolder(osSdkRoot);\n if (!tmpFolder.isDirectory()) {\n if (tmpFolder.isFile()) {\n deleteFileOrFolder(tmpFolder);\n }\n if (!tmpFolder.mkdirs()) {\n monitor.setResult(\"Failed to create directory %1$s\", tmpFolder.getPath());\n return null;\n }\n }\n File tmpFile = new File(tmpFolder, base);\n if (tmpFile.exists()) {\n if (tmpFile.length() == getSize() && fileChecksum(tmpFile, monitor).equalsIgnoreCase(getChecksum())) {\n return tmpFile;\n }\n deleteFileOrFolder(tmpFile);\n }\n if (fetchUrl(tmpFile, link, desc, monitor)) {\n return tmpFile;\n } else {\n deleteFileOrFolder(tmpFile);\n return null;\n }\n }",
"private static Intent m63900a(Context context, long j, boolean z) {\n Intent intent;\n boolean z2 = false;\n Cursor a = C19410c.m63772a(context).mo51430a(new C19413c().mo51436a(j));\n try {\n if (!a.moveToFirst()) {\n if (a != null) {\n try {\n a.close();\n } catch (Exception unused) {\n }\n }\n return null;\n }\n String string = a.getString(a.getColumnIndexOrThrow(\"local_filename\"));\n if (C6319n.m19593a(string)) {\n if (a != null) {\n try {\n a.close();\n } catch (Exception unused2) {\n }\n }\n return null;\n }\n if (C19409f.m63770a(context, string)) {\n PackageManager packageManager = context.getPackageManager();\n intent = packageManager.getLaunchIntentForPackage(packageManager.getPackageArchiveInfo(new File(string).getAbsolutePath(), 1).packageName);\n } else {\n Uri b = m63903b(a, \"local_uri\");\n String a2 = m63901a(a, \"media_type\");\n if (!(b == null || a2 == null)) {\n if (new File(string).exists()) {\n intent = new Intent(\"android.intent.action.VIEW\");\n if (\"application/vnd.android.package-archive\".equals(a2)) {\n intent.setDataAndType(b, a2);\n } else if (\"file\".equals(b.getScheme())) {\n intent.setDataAndType(b, a2);\n } else {\n intent.setDataAndType(b, a2);\n }\n C19432k a3 = C19431j.m63881a();\n if (a3 != null) {\n z2 = a3.mo51464a(j, z);\n }\n }\n }\n if (a != null) {\n try {\n a.close();\n } catch (Exception unused3) {\n }\n }\n return null;\n }\n if (z2) {\n if (a != null) {\n try {\n a.close();\n } catch (Exception unused4) {\n }\n }\n return null;\n }\n if (a != null) {\n try {\n a.close();\n } catch (Exception unused5) {\n }\n }\n return intent;\n } finally {\n if (a != null) {\n try {\n a.close();\n } catch (Exception unused6) {\n }\n }\n }\n }",
"private String generateTargetFileUri(String fileUri) {\n return folderName.concat(fileUri);\n }",
"public void doUpdate() {\n fileChooser.setCurrentDirectory(new File(getPath()));\n fileChooser.rescanCurrentDirectory();\n }",
"public void onClick(View v) {\n\t\t\t\t\t try {\n\t\t\t\t\t\texistingEntry = mApi.metadata(\"/Getting Started.pdf\", 1, null, false, null);\n\t\t\t\t\t} catch (DropboxException e) {\n\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t}\n\t\t\t\t\tLog.i(\"DbExampleLog\", \"The file's rev is now: \" + existingEntry.rev);\n\t\t\t\t\tLog.i(\"DbExampleLog\", \"The file's rev is now: \" + existingEntry.size); \n\t\t\t\t\tLog.i(\"DbExampleLog\", \"The file's rev is now: \" + existingEntry.fileName());\n\t\t\t\t\t\t \n\t\t\t\t\t\t \n\t\t\t\t\t /*startActivity(intent);\n\t\t\t\t\t finish();*/\n\t\t\t\t }",
"File getTargetDirectory();",
"public void exportDbFileToDownloadFoler(final Activity curr_activity){\n buttonImportExportDB.setOnClickListener(\n new View.OnClickListener(){\n @Override\n public void onClick(View view) {\n try {\n app_utils.copyAppDbToDownloadFolder(curr_activity, getApplicationContext(), app_db.getDatabaseName());\n Toast.makeText(MainActivity.this, \"DB File copied to Download folder\", Toast.LENGTH_LONG).show();\n return;\n } catch (IOException e) {\n Toast.makeText(MainActivity.this, \"Error exporting to Download folder\", Toast.LENGTH_LONG).show();\n e.printStackTrace();\n }\n }\n }\n );\n }",
"@Override\n public void onClick(View v) {\n \tIntent in = new Intent(getApplicationContext(), DownloadFile.class);\n in.putExtra(\"url\", url_get_file);\n startActivityForResult(in, 100);\n }",
"private static Uri getOutputMediaFileUri(int type){\n\t return Uri.fromFile(getOutputMediaFile(type));\n\t}",
"private static void download(File gamedir, String manifest_url, boolean onlyForced, String... forceChecks) {\n try {\n /* old manifest file, doesn't need to be effectively present, checked later */\n File old_manifest_file = new File(gamedir, \"manifest.json\");\n\n /* old (on disk), current (on github), new (will replace old on disk) */\n JsonObject old_manifest = old_manifest_file.exists() ? new JsonParser().parse(new FileReader(old_manifest_file)).getAsJsonObject() : null;\n JsonObject current_manifest = getJsonObject(manifest_url);\n JsonObject new_manifest = new JsonObject();\n\n /* hashes & files arrays from the online json */\n JsonArray current_hashes = current_manifest.get(\"hashes\").getAsJsonArray();\n JsonArray files = new JsonArray();\n\n /* Collects the folders that have something wrong and need update, speeds up time (not looking for every file every time) */\n List<String> toUpdate = getFoldersToUpdate(current_manifest, old_manifest, current_hashes, gamedir);\n\n /* Starts to build the new manifest */\n new_manifest.add(\"hashes\", current_hashes);\n\n log();\n\n /* Looping the files to meet something that needs update */\n current_manifest.get(\"files\").getAsJsonArray().forEach(jsonElement -> {\n JsonObject obj = jsonElement.getAsJsonObject();\n\n /* Removing a folder that is not needed (and maybe harmful for the download/load process) */\n String path = obj.get(\"path\").getAsString().replaceAll(\"forgiacraft2/\", \"\");\n\n /* Getting only the first folder that corresponds to \"mods\", \"config\" or \"forge\" */\n String folder = path.split(\"/\")[0];\n\n if ((onlyForced && Arrays.asList(forceChecks).contains(folder)) || (!onlyForced && toUpdate.contains(folder))) {\n long size = obj.get(\"size\").getAsLong();\n String hash = obj.get(\"hash\").getAsString();\n\n File file = new File(gamedir, path);\n\n /* Initializes forge file since found in the manifest */\n if (obj.get(\"path\").getAsString().contains(\"/forge/\")) {\n forgeFile = file;\n }\n\n if (needsUpdate(file, old_manifest_file, old_manifest, obj, size, hash)) {\n performDownload(path, obj.get(\"download_url\").getAsString(), file);\n }\n\n try {\n //adds to the manifest the json object of the correspondent file downloaded\n files.add(obj);\n\n //removes and rewrites the files JsonArray\n if (new_manifest.get(\"files\") != null) {\n new_manifest.remove(\"files\");\n }\n\n new_manifest.add(\"files\", files);\n\n /* Prints the new manifest to file (performed every file downloaded) */\n Gson gson = new GsonBuilder().setPrettyPrinting().create();\n FileUtils.printFile(old_manifest_file, gson.toJson(new_manifest));\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n }\n\n });\n } catch (Exception ex) {\n log(gamedir.getAbsolutePath());\n\n StringWriter sw = new StringWriter();\n PrintWriter pw = new PrintWriter(sw);\n ex.printStackTrace(pw);\n log(sw.toString());\n ex.printStackTrace();\n }\n }",
"private static Uri getOutputMediaFileUri(int type){\r\n\t return Uri.fromFile(getOutputMediaFile(type));\r\n\t}"
] | [
"0.6485674",
"0.6357165",
"0.5974772",
"0.5943509",
"0.5909059",
"0.5857947",
"0.5841566",
"0.57332253",
"0.57184184",
"0.56841195",
"0.5677809",
"0.56340766",
"0.56193084",
"0.556573",
"0.5551368",
"0.55092233",
"0.5376266",
"0.5350675",
"0.5309568",
"0.53036463",
"0.5300923",
"0.52937603",
"0.5279461",
"0.5269475",
"0.52654064",
"0.52609515",
"0.52409273",
"0.52357346",
"0.52261233",
"0.52189475",
"0.5207132",
"0.52015245",
"0.51983476",
"0.51956254",
"0.5195421",
"0.5186701",
"0.5180123",
"0.515713",
"0.51394576",
"0.5111335",
"0.51093245",
"0.51083934",
"0.508933",
"0.508396",
"0.5068721",
"0.5062689",
"0.5054373",
"0.5051159",
"0.50483483",
"0.50471336",
"0.5044961",
"0.50374746",
"0.50374115",
"0.5036943",
"0.5035899",
"0.5031402",
"0.5031389",
"0.5028245",
"0.50064355",
"0.5004077",
"0.49989358",
"0.49932095",
"0.4985662",
"0.4976874",
"0.49762398",
"0.49626315",
"0.49619788",
"0.49616286",
"0.49602816",
"0.49580348",
"0.493225",
"0.4922763",
"0.49212298",
"0.49104136",
"0.49051407",
"0.49034175",
"0.49024957",
"0.48935702",
"0.48870674",
"0.48852798",
"0.4879312",
"0.48592684",
"0.48550522",
"0.48521468",
"0.48487663",
"0.48426372",
"0.48309457",
"0.48292518",
"0.4824839",
"0.4822611",
"0.48191014",
"0.4817892",
"0.48169893",
"0.48124576",
"0.48101476",
"0.4809883",
"0.48090038",
"0.48087856",
"0.47977838",
"0.47904766"
] | 0.71367 | 0 |
represents search facet provided by REST server | public interface Facet extends Linkable {
public String getId();
public String getLabel();
public List<FacetValue> getValues();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public interface mySolrInter extends SolrCrudRepository<CluesDocument,String> {\n @Query(value = \"*:*\")\n @Facet(fields = { \"brandName\" }, limit = 5)\n FacetPage<CluesDocument> findAllFacetOnName(Pageable page);\n}",
"public IScapSyncSearchFacet[] getFacets();",
"public abstract UIComponent getFacet(String name);",
"public SolrQueryResult query(Map<String, String> params) {\n SolrQuery query = new SolrQuery();\n\n /* enable facetting */\n query.setFacet(true);\n\n /* list of all filters; key: name to display, value: entity parameter */\n List<SolrQueryParameter> filter = new ArrayList<SolrQueryParameter>();\n\n /* list of partition filter */\n List<SolrQueryParameter> partitionFilter = new ArrayList<SolrQueryParameter>();\n\n /*\n * list of filter which have been set by the user (key = filtername, value =\n * list of selections)\n */\n Map<String, List<String>> activeFilterValues = new HashMap<String, List<String>>();\n\n /*\n * determine on which type is searched for (either 'Table' or 'Partition')\n */\n String typeFilterValue = params.get(TYPE);\n filter.add(new SolrQueryParameter(FILTER_TYPE, TYPE, FilterType.EXCLUSIVE, FacetSort.COUNT));\n if (typeFilterValue != null && typeFilterValue.equalsIgnoreCase(TYPE_PARTITION)) {\n typeFilterValue = TYPE_PARTITION;\n for (String parameter : metascopeParameterService.findDistinctParameters()) {\n partitionFilter.add(new SolrQueryParameter(\"Parameter: \" + parameter, parameter + \"_s\", FilterType.AND,\n FacetSort.INDEX));\n }\n for (SolrQueryParameter pFilter : partitionFilter) {\n query.addFacetField(pFilter.getName());\n query.add(\"f.\" + pFilter.getName() + \".facet.sort\", \"index\");\n String filterValue = params.get(pFilter.getName());\n if (filterValue != null && !filterValue.isEmpty()) {\n query.addFilterQuery(pFilter.getName() + \":\" + \"(\" + filterValue.replace(\",\", \" AND \") + \")\");\n }\n\n }\n } else {\n typeFilterValue = TYPE_TABLE;\n }\n query.addFilterQuery(\"{!tag=\" + TYPE + \"}\" + TYPE + \":\" + typeFilterValue);\n query.addFacetField(\"{!ex=\" + TYPE + \"}\" + TYPE);\n\n /* set solr search query parameter 'q' */\n String searchQueryValue = params.get(URLUtil.SEARCH_QUERY_PARAM);\n if (searchQueryValue == null || searchQueryValue.isEmpty()) {\n searchQueryValue = \"*\";\n query.setQuery(searchQueryValue);\n } else {\n String[] queryTerms = searchQueryValue.trim().split(\" \");\n String queryTerm = \"\";\n for (String term : queryTerms) {\n if (term.isEmpty()) {\n continue;\n }\n\n if (!queryTerm.isEmpty()) {\n queryTerm += \" AND \";\n }\n queryTerm += \"*\" + term + \"*\";\n }\n query.setQuery(queryTerm);\n query.setHighlight(true);\n query.setHighlightSimplePre(\"<b>\");\n query.setHighlightSimplePost(\"</b>\");\n query.setHighlightSnippets(100);\n query.set(\"hl.fl\", \"*\");\n }\n\n /* set the remaining filters */\n for (SolrQueryParameter queryFilter : facetFields) {\n filter.add(queryFilter);\n String value = params.get(queryFilter.getName());\n\n String filterQuery = \"\";\n String facetField = \"\";\n if (queryFilter.isExcludeFromFacet()) {\n if (value != null) {\n String[] multipleFilter = value.split(\",\");\n value = \"(\";\n for (int i = 0; i < multipleFilter.length; i++) {\n String filterValue = cleanseValue(multipleFilter[i]).replace(\" \", \"*\");\n value += \"(\" + filterValue + \")\";\n if (i < multipleFilter.length - 1) {\n value += \" \" + getOperator(queryFilter.getFilterType()) + \" \";\n }\n }\n value += \")\";\n }\n filterQuery = \"{!tag=\" + queryFilter.getName() + \"}\" + queryFilter.getName() + \":\" + value;\n facetField = \"{!ex=\" + queryFilter.getName() + \"}\" + queryFilter.getName();\n } else {\n if (value != null) {\n String[] multipleFilter = value.split(\",\");\n value = \"(\";\n for (int i = 0; i < multipleFilter.length; i++) {\n String filterValue = cleanseValue(multipleFilter[i]).replace(\" \", \"*\");\n value += \"(\" + filterValue + \")\";\n if (i < multipleFilter.length - 1) {\n value += \" \" + getOperator(queryFilter.getFilterType()) + \" \";\n }\n }\n value += \")\";\n }\n filterQuery = queryFilter.getName() + \":\" + value;\n facetField = queryFilter.getName();\n }\n\n if (value != null && !value.isEmpty()) {\n query.addFilterQuery(filterQuery);\n }\n query.addFacetField(facetField);\n\n if (queryFilter.getFacetSort().equals(FacetSort.INDEX)) {\n query.add(\"f.\" + queryFilter.getName() + \".facet.sort\", \"index\");\n }\n query.add(\"f.\" + queryFilter.getName() + \".facet.limit\", \"-1\");\n }\n\n /* set facet queries */\n Map<String, String> facetQueryMap = new HashMap<String, String>();\n long now = System.currentTimeMillis() / 1000;\n for (SolrFacetQuery solrFacetQuery : facetQueries) {\n for (SolrHourRange range : solrFacetQuery.getRanges()) {\n long from = range.getFrom() == Long.MAX_VALUE ? 0 : now - (range.getFrom() * 3600);\n String facetQueryString = solrFacetQuery.getName() + \":[\" + from + \" TO \" + now + \"]\";\n query.addFacetQuery(\"{!ex=\" + solrFacetQuery.getName() + \"}\" + facetQueryString);\n facetQueryMap.put(solrFacetQuery.getName() + range.getName(), facetQueryString);\n }\n String value = params.get(solrFacetQuery.getName());\n if (value != null) {\n String fq = \"{!tag=\" + solrFacetQuery.getName() + \"}\" + facetQueryMap.get(solrFacetQuery.getName() + value);\n query.addFilterQuery(fq);\n }\n }\n\n /* always sort the entities (for a deterministic view) */\n query.setSort(ID, ORDER.asc);\n\n /* set pagination information */\n int page = getPageParameter(params);\n int elements = getElementsParameter(params);\n query.setRows(elements);\n query.setStart((page - 1) * elements);\n\n /* execute the query */\n QueryResponse queryResponse = null;\n try {\n queryResponse = solrClient.query(query);\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n SolrDocumentList list = queryResponse.getResults();\n\n /* get table / view entities from local repository */\n List<SolrQueryResultEntity> resultEntities = new LinkedList<SolrQueryResultEntity>();\n String resultType = \"\";\n for (SolrDocument solrDocument : list) {\n String id = (String) solrDocument.get(ID);\n\n if (typeFilterValue.equalsIgnoreCase(TYPE_PARTITION)) {\n if (!searchQueryValue.equals(\"*\")) {\n resultEntities.add(new SolrQueryResultEntity(metascopeViewService.findByViewId(id), queryResponse\n .getHighlighting().get(id)));\n } else {\n resultEntities.add(new SolrQueryResultEntity(metascopeViewService.findByViewId(id)));\n }\n resultType = TYPE_PARTITION;\n } else if (typeFilterValue.equalsIgnoreCase(TYPE_TABLE)) {\n if (!searchQueryValue.equals(\"*\")) {\n resultEntities.add(new SolrQueryResultEntity(metascopeTableService.findByFqdn(id), queryResponse\n .getHighlighting().get(id)));\n } else {\n resultEntities.add(new SolrQueryResultEntity(metascopeTableService.findByFqdn(id)));\n }\n }\n }\n if (resultType.isEmpty()) {\n resultType = TYPE_TABLE;\n }\n\n filter.addAll(partitionFilter);\n\n /* get the facet values and counts */\n Map<String, List<SolrFacet>> facetValues = new HashMap<String, List<SolrFacet>>();\n for (SolrQueryParameter f : filter) {\n if (!f.getName().equals(URLUtil.SEARCH_QUERY_PARAM)) {\n List<SolrFacet> values = new ArrayList<SolrFacet>();\n FacetField facet = queryResponse.getFacetField(f.getName());\n for (Count count : facet.getValues()) {\n values.add(new SolrFacet(count.getName(), count.getCount()));\n }\n facetValues.put(f.getName(), values);\n }\n }\n\n /* remove the type filter */\n filter.remove(0);\n\n for (SolrFacetQuery solrFacetQuery : facetQueries) {\n filter\n .add(new SolrQueryParameter(solrFacetQuery.getDisplayName(), solrFacetQuery.getName(), FilterType.EXCLUSIVE));\n List<SolrFacet> values = new ArrayList<SolrFacet>();\n for (SolrHourRange range : solrFacetQuery.getRanges()) {\n long facetQueryCount = getFacetQueryCount(queryResponse, \"{!ex=\" + solrFacetQuery.getName() + \"}\"\n + facetQueryMap.get(solrFacetQuery.getName() + range.getName()));\n values.add(new SolrFacet(range.getName(), facetQueryCount));\n }\n facetValues.put(solrFacetQuery.getName(), values);\n }\n\n /* get the active filter values which have been selected by the user */\n addToActiveFilterValues(activeFilterValues, params, filter);\n\n /* is a search query */\n boolean isSearchQuery = (searchQueryValue != null && !searchQueryValue.isEmpty() && !searchQueryValue.equals(\"*\"))\n || hasActiveFilters(activeFilterValues);\n\n\n /* build and return the result */\n SolrQueryResult result = new SolrQueryResult().withResultEntities(resultEntities).withResultType(resultType)\n .withFilters(filter).withFacetValues(facetValues).withActiveFilterValues(activeFilterValues)\n .withSearchQuery(searchQueryValue).withPage(page).withElements(elements)\n .withTotalPages((int) Math.ceil(((double) list.getNumFound()) / elements)).withTotalResults(list.getNumFound())\n .withIsSearchRequest(isSearchQuery);\n return result;\n }",
"public String getSearchEndpoint();",
"public interface PortCompartmentFacet extends SimpleDeletedUuidsFacet\n{\n public FigureFacet getFigureFacet();\n}",
"public List<FacetRequest> facets() {\n return this.facets;\n }",
"Collection<Facet> createFacets(Aggregations aggResult, FilterContext filterContext, DefaultLinkBuilder linkBuilder);",
"public Object getFacet(String name, IProfile profile, Object targetObject, Class targetObjectType);",
"private List<Facet<P>> getFacetsFromResponse(final QueryResponse queryResponse) {\n if (queryResponse.getFacetFields() != null) {\n List<FacetField> facetFields = queryResponse.getFacetFields();\n List<Facet<P>> facets = Lists.newArrayListWithCapacity(facetFields.size());\n for (final FacetField facetField : facetFields) {\n P facetParam = solrField2ParamEnumMap.get(facetField.getName());\n Facet<P> facet = new Facet<P>(facetParam);\n\n List<Facet.Count> counts = Lists.newArrayList();\n if (facetField.getValues() != null) {\n for (final FacetField.Count count : facetField.getValues()) {\n String value = count.getName();\n if (Enum.class.isAssignableFrom(facetParam.type())) {\n value = SolrQueryUtils.getFacetEnumValue(facetParam, value);\n }\n counts.add(new Facet.Count(value, count.getCount()));\n }\n }\n facet.setCounts(counts);\n facets.add(facet);\n }\n return facets;\n }\n return Lists.newArrayList();\n }",
"public Object getFacet(String name, IProfile profile, Object targetObject);",
"SearchResponse search(Pageable pageable, QueryBuilder query, Collection<AggregationBuilder> aggregations);",
"public interface VendorProductSearchFacade extends ProductSearchFacade<ProductData>\r\n{\r\n\r\n\t/**\r\n\t * get categories data from facet data for setting to vendor data\r\n\t *\r\n\t * @param vendorCode\r\n\t * the target vendor data to set categories\r\n\t * @return the vendor data contains categories data\r\n\t */\r\n\tVendorData getVendorCategories(String vendorCode);\r\n}",
"public List<Facet> facets() {\n return this.facets;\n }",
"public SearchResult withFacets(java.util.Map<String, BucketInfo> facets) {\n setFacets(facets);\n return this;\n }",
"private FieldFacet(String name, List<TermQuery> queries) {\n this._name = name;\n this._queries = queries;\n }",
"public java.util.Map<String, BucketInfo> getFacets() {\n if (facets == null) {\n facets = new com.amazonaws.internal.SdkInternalMap<String, BucketInfo>();\n }\n return facets;\n }",
"public interface ElasticSearchCriteria {\n\n public void inGroup(String groupName);\n\n public void addParameterMatch(String parameter, String value);\n public void addParameterNotMatch(String parameter, String value);\n public void addParameterComparison(String parameter, String operator, Object value);\n public void addComplexFilter(JSONObject filter);\n\n public JSONObject toJSONObject();\n\n}",
"public FacetedQueryResult facetedQuery(String collection, Query query, QueryOptions queryOptions)\n throws IOException, SolrException {\n StopWatch stopWatch = StopWatch.createStarted();\n try {\n SolrQuery solrQuery = solrQueryParser.parse(query, queryOptions);\n QueryResponse response = solrManager.getSolrClient().query(collection, solrQuery);\n FacetedQueryResultItem item = toFacetedQueryResultItem(queryOptions, response);\n return new FacetedQueryResult(\"\", (int) stopWatch.getTime(), 1, 1, \"Faceted data from Solr\", \"\", item);\n } catch (SolrServerException e) {\n throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, e.getMessage(), e);\n }\n }",
"public QueryResponseInner withFacets(List<Facet> facets) {\n this.facets = facets;\n return this;\n }",
"@Test\n\tpublic void facetNarrowBysResultInCorrectProductCounts() {\n\t}",
"public interface SearchService {\n\n /**\n * Parameter that is appended to the generated links that contains the positive search terms and phrases of the\n * search expression. For several terms it occurs several times.\n */\n String PARAMETER_SEARCHTERM = \"search.term\";\n\n /**\n * Represents a result of the search consisting of a target page and one or more matching subresources. For use by\n * the search result renderer.\n */\n interface Result {\n\n /** The page which contains matches. */\n @NotNull\n Resource getTarget();\n\n /** The content child of the page which contains matches. */\n @NotNull\n Resource getTargetContent();\n\n /** A link that shows the target, including search terms with {@link #PARAMETER_SEARCHTERM} */\n @NotNull\n String getTargetUrl();\n\n /** The title of the search result. */\n @NotNull\n String getTitle();\n\n /** The score of the search result. */\n Float getScore();\n\n /**\n * One or more descendants of {@link #getTarget()} that potentially match the search expression. Mostly useful\n * for generating excerpts; can contain false positives in some search algorithms.\n */\n @NotNull\n List<Resource> getMatches();\n\n /** The fulltext search expression for which this result was found. */\n @NotNull\n String getSearchExpression();\n\n /**\n * A basic excerpt from the matches that demonstrates the occurrences of the terms from {@link\n * #getSearchExpression()} in this result. Might be empty if not applicable (e.g. if the search terms were found\n * in meta information). If there are several matches, we just give one excerpt. You might want to provide your\n * own implementation for that to accommodate for specific requirements.\n *\n * @return a text with the occurrences of the words marked with HTML tag em .\n */\n @NotNull\n String getExcerpt() throws SearchTermParseException;\n }\n\n /**\n * Fulltext search for resources. The resources are grouped if they are subresources of one target page, as\n * determined by the parameter targetResourceFilter.\n * <p>\n * Limitations: if the searchExpression consists of several search terms (implicitly combined with AND) this finds\n * only resources where a single property matches the whole search condition, i.e., all those terms. If several\n * resources of a page contain different subsets of those terms, the page is not found.\n *\n * @param context The context we use for the search.\n * @param selectors a selector string to determine the right search strategy, e.g. 'page'\n * @param root Optional parameter for the node below which we search.\n * @param searchExpression Mandatory parameter for the fulltext search expression to search for. For the syntax\n * see\n * {@link QueryConditionDsl.QueryConditionBuilder#contains(String)}\n * . It is advisable to avoid using AND and OR.\n * @param searchFilter an optional filter to drop resources to ignore.\n * @return possibly empty list of results\n * @see com.composum.sling.core.mapping.jcr.ResourceFilterMapping\n */\n @NotNull\n List<Result> search(@NotNull BeanContext context, @NotNull String selectors,\n @NotNull String root, @NotNull String searchExpression, @Nullable ResourceFilter searchFilter,\n int offset, @Nullable Integer limit)\n throws RepositoryException, SearchTermParseException;\n\n\n interface LimitedQuery {\n\n /**\n * Executes the query with the given limit; returns a pair of a boolean that is true when we are sure that all\n * results have been found in spite of the limit, and the results themselves.\n */\n Pair<Boolean, List<Result>> execQuery(int matchLimit);\n }\n\n /**\n * Execute the query with raising limit until the required number of results is met. We don't know in advance how\n * large we have to set the limit in the query to get all neccesary results, since each page can have an a priori\n * unknown number of matches. Thus, the query is executed with an estimated limit, and is reexecuted with tripled\n * limit if the number of results is not sufficient and there are more limits.\n *\n * @return up to limit elements of the result list with the offset first elements skipped.\n */\n @NotNull\n List<Result> executeQueryWithRaisingLimits(LimitedQuery limitedQuery, int offset, Integer limit);\n}",
"SearchResponse search(Pageable pageable, QueryBuilder query, AggregationBuilder aggregation);",
"public interface SearchQuerySet extends QuerySet\n{\n\n // for AbstractSearch\n public static final int STAT_MODELS = 1;\n public static final int STAT_CLUSTERS = 2;\n public static final int STAT_GENOMES = 4;\n public static final int STAT_MODEL_CLUSTERS = 8;\n\n public String getStatsById(Collection data);\n public String getStatsByQuery(String query);\n public String getStatsById(Collection data,int stats);\n public String getStatsByQuery(String query,int stats);\n \n // for BlastSearch\n public String getBlastSearchQuery(Collection dbNames, Collection keys, KeyTypeUser.KeyType keyType);\n \n //for ClusterIDSearch\n public String getClusterIDSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for ClusterNameSearch\n public String getClusterNameSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for DescriptionSearch\n public String getDescriptionSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for GoSearch \n public String getGoSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for GoTextSearch\n public String getGoTextSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for IdSearch\n public String getIdSearchQuery(Collection input, int limit, int[] DBs, KeyTypeUser.KeyType keyType);\n \n // for QueryCompSearch\n public String getQueryCompSearchQuery(String comp_id, String status, KeyTypeUser.KeyType keyType);\n \n // for QuerySearch\n public String getQuerySearchQuery(String queries_id, KeyTypeUser.KeyType keyType); \n \n // for SeqModelSearch\n public String getSeqModelSearchQuery(Collection model_ids, KeyTypeUser.KeyType keyType);\n \n // for UnknowclusterIdSearch\n public String getUnknownClusterIdSearchQuery(int cluster_id, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetSearch\n public String getProbeSetSearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for ProbeSetKeySearch\n public String getProbeSetKeySearchQuery(Collection input, int limit, KeyTypeUser.KeyType keyType);\n \n // for QueryTestSearch\n public String getQueryTestSearchQuery(String query_id, String version, String genome_id);\n \n // for QueryStatsSearch\n public String getQueryStatsSearchQuery(List query_ids,List DBs);\n \n // for PskClusterSearch\n public String getPskClusterSearchQuery(int cluster_id,KeyTypeUser.KeyType keyType);\n \n // for ClusterCorrSearch\n public String getClusterCorrSearchQuery(int cluster_id, int psk_id, KeyTypeUser.KeyType keyType);\n \n // for UnknownGenesSearch\n public String getUnknownGenesSearchQuery(Collection sources, KeyTypeUser.KeyType keyType);\n \n}",
"SearchResult<TimelineMeta> search(SearchQuery searchQuery);",
"Search getSearch();",
"public interface Service {\n\n @GET(\"search?show-fields=thumbnail\")\n Call<SearchResponseObject> getContent(@Query(\"page\") long page);\n\n @GET(\"search?show-fields=thumbnail\")\n Call<SearchResponseObject> getContent(@Query(\"section\") String filter, @Query(\"page\") long page);\n\n @GET(\"sections\")\n Call<SectionResponseObject> getSections();\n}",
"public abstract S getSearch();",
"public SearchResult addFacetsEntry(String key, BucketInfo value) {\n if (null == this.facets) {\n this.facets = new com.amazonaws.internal.SdkInternalMap<String, BucketInfo>();\n }\n if (this.facets.containsKey(key))\n throw new IllegalArgumentException(\"Duplicated keys (\" + key.toString() + \") are provided.\");\n this.facets.put(key, value);\n return this;\n }",
"private static void addSelection(String type,\n JSONObject jsonSel,\n SenseiRequest req,\n final Map<String, String[]> facetInfoMap)\n throws Exception\n {\n\n BrowseSelection sel = null;\n if(RequestConverter2.SELECTIONS_TERM.equals(type))\n {\n Iterator<String> iter = jsonSel.keys();\n if(iter.hasNext()){\n String facet = iter.next();\n JSONObject jsonParams = jsonSel.optJSONObject(facet);\n String value = jsonParams.optString(RequestConverter2.SELECTIONS_TERM_VALUE, null);\n if(facet!= null && value != null)\n {\n sel = new BrowseSelection(facet);\n String[] vals = new String[1];\n vals[0] = value;\n sel.setValues(formatValues(facet, vals, facetInfoMap));\n updateProperties(sel, jsonParams.optJSONObject(FilterConstructor.PARAMS_PARAM));\n req.addSelection(sel);\n }\n }\n }\n else if(RequestConverter2.SELECTIONS_TERMS.equals(type))\n {\n Iterator<String> iter = jsonSel.keys();\n if(iter.hasNext()){\n String facet = iter.next();\n JSONObject jsonParams = jsonSel.optJSONObject(facet);\n JSONArray values = jsonParams.optJSONArray(RequestConverter2.SELECTIONS_TERMS_VALUES);\n JSONArray excludes = jsonParams.optJSONArray(RequestConverter2.SELECTIONS_TERMS_EXCLUDES);\n String operator = jsonParams.optString(RequestConverter2.SELECTIONS_TERMS_OPERATOR, RequestConverter2.SELECTIONS_TERMS_OPERATOR_OR);\n if(facet!= null && (values != null || excludes != null))\n {\n sel = new BrowseSelection(facet);\n ValueOperation op = ValueOperation.ValueOperationOr;\n if(RequestConverter2.SELECTIONS_TERMS_OPERATOR_AND.equals(operator))\n op = ValueOperation.ValueOperationAnd;\n\n if(values != null && values.length()>0){\n sel.setValues(formatValues(facet, getStrings(values), facetInfoMap));\n }\n\n if(excludes != null && excludes.length()>0){\n sel.setNotValues(formatValues(facet, getStrings(excludes), facetInfoMap));\n }\n\n sel.setSelectionOperation(op);\n req.addSelection(sel);\n updateProperties(sel, jsonParams.optJSONObject(FilterConstructor.PARAMS_PARAM));\n }\n }\n }\n else if(RequestConverter2.SELECTIONS_RANGE.equals(type))\n {\n Iterator<String> iter = jsonSel.keys();\n if(iter.hasNext()){\n String facet = iter.next();\n JSONObject jsonParams = jsonSel.optJSONObject(facet);\n\n String upper = jsonParams.optString(RequestConverter2.SELECTIONS_RANGE_TO, \"*\");\n String lower = jsonParams.optString(RequestConverter2.SELECTIONS_RANGE_FROM, \"*\");\n boolean includeUpper = jsonParams.optBoolean(RequestConverter2.SELECTIONS_RANGE_INCLUDE_UPPER, true);\n boolean includeLower = jsonParams.optBoolean(RequestConverter2.SELECTIONS_RANGE_INCLUDE_LOWER, true);\n String left = \"[\", right = \"]\";\n if(includeLower == false)\n left = \"(\";\n if(includeUpper == false)\n right = \")\";\n\n String range = left + lower + \" TO \" + upper + right;\n if(facet!= null )\n {\n sel = new BrowseSelection(facet);\n String[] vals = new String[1];\n vals[0] = range;\n sel.setValues(vals);\n req.addSelection(sel);\n updateProperties(sel, jsonParams.optJSONObject(FilterConstructor.PARAMS_PARAM));\n }\n }\n }\n else if(RequestConverter2.SELECTIONS_PATH.equals(type))\n {\n Iterator<String> iter = jsonSel.keys();\n if(iter.hasNext()){\n String facet = iter.next();\n JSONObject jsonParams = jsonSel.optJSONObject(facet);\n\n String value = jsonParams.optString(RequestConverter2.SELECTIONS_PATH_VALUE, null);\n\n if(facet != null && value != null){\n sel = new BrowseSelection(facet);\n String[] vals = new String[1];\n vals[0] = value;\n sel.setValues(vals);\n\n if(jsonParams.has(RequestConverter2.SELECTIONS_PATH_STRICT)){\n boolean strict = jsonParams.optBoolean(RequestConverter2.SELECTIONS_PATH_STRICT, false);\n sel.getSelectionProperties().setProperty(PathFacetHandler.SEL_PROP_NAME_STRICT, String.valueOf(strict));\n }\n\n if(jsonParams.has(RequestConverter2.SELECTIONS_PATH_DEPTH)){\n int depth = jsonParams.optInt(RequestConverter2.SELECTIONS_PATH_DEPTH, 1);\n sel.getSelectionProperties().setProperty(PathFacetHandler.SEL_PROP_NAME_DEPTH, String.valueOf(depth));\n }\n\n req.addSelection(sel);\n updateProperties(sel, jsonParams.optJSONObject(FilterConstructor.PARAMS_PARAM));\n }\n }\n }\n else if(RequestConverter2.SELECTIONS_CUSTOM.equals(type))\n {\n ;\n }\n else if(RequestConverter2.SELECTIONS_DEFAULT.equals(type))\n {\n ;\n }\n \n }",
"public boolean useFacets() {\n\t\treturn loc.useFacets();\n\t}",
"public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws ServletException,\n IOException {\n String trail = pRequest.getParameter(TRAIL);\n String facetId = pRequest.getParameter(FACET_ID);\n Object ajouterFacetValueNodeListObj = pRequest.getObjectParameter(AJOUTER_FACET_VALUE_NODE_LIST);\n List<FacetValue> trailStringPairs = getCommerceFacetTrailTools().parseTrailStringIntoPairs(trail);\n\n if ((trailStringPairs != null) && !trailStringPairs.isEmpty() && !StringUtils.isBlank(facetId)) {\n List<AjouterFacetValue> selectedValuesForCurrentFacet = new LinkedList<AjouterFacetValue>();\n AjouterFacetValue ajFacetValue = null;\n\n // remove SRCH : PIVOT : or ROOT category facet\n trailStringPairs.remove(0);\n /* for (FacetValue fv : trailStringPairs) {\n if ((fv != null) && facetId.equalsIgnoreCase(fv.getFacet().getId())) {\n ajFacetValue = new AjouterFacetValue(fv, true);\n selectedValuesForCurrentFacet.add(ajFacetValue);\n }\n }*/\n if ((ajouterFacetValueNodeListObj != null) && (ajouterFacetValueNodeListObj instanceof List) &&\n !((List) ajouterFacetValueNodeListObj).isEmpty()) {\n selectedValuesForCurrentFacet.addAll(filterSelectedFacetValues(trailStringPairs,\n (List<FacetValueNode>)\n ajouterFacetValueNodeListObj));\n }\n if (selectedValuesForCurrentFacet != null) {\n pRequest.setParameter(AJOUTER_FACET_VALUE_LIST, selectedValuesForCurrentFacet);\n pRequest.serviceLocalParameter(OUTPUT, pRequest, pResponse);\n } else {\n pRequest.serviceLocalParameter(EMPTY, pRequest, pResponse);\n }\n\n } else {\n pRequest.serviceLocalParameter(EMPTY, pRequest, pResponse); // end if\n } // end if-else\n\n }",
"public String getSearchKey(){\n\t\tif (this.facetTiers == null || this.facetTiers.size() == 0)\n\t\t\treturn null;\n\t\treturn this.facetTiers.get(this.facetTiers.size()-1).getSearchValue();\n\t}",
"public interface FacetRef<V>\n{\n\t/**\n\t * Get the identifier of the facet. This should match the id as used in\n\t * {@link FacetQuery}.\n\t *\n\t * @return\n\t */\n\tString getId();\n\n\t/**\n\t * Get the value type.\n\t *\n\t * @return\n\t */\n\tClass<V> getValueType();\n}",
"public void setFacet(String facet)\n throws JspException\n {\n _facet = setRequiredValueAttribute(facet, \"facet\");\n }",
"protected FacetsConfig configFacets () {\n return new FacetsConfig ();\n }",
"List<SearchResult> search(SearchQuery searchQuery);",
"@Override\r\n\tpublic String getTagName() {\n\t\treturn \"PlaceSearchResponse\";\r\n\t}",
"SearchResult<TimelineMeta> search(SearchParameter searchParameter);",
"public SearchResponse search(SearchRequest request) throws SearchServiceException;",
"TSearchQuery createSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);",
"entities.Torrent.SearchResponse getSearchResponse();",
"public interface ArticleAPI {\n\n @GET(\"svc/search/v2/articlesearch.json\")\n Call<SearchAPIResponse> getSearchAPIResponse(@Query(\"q\") String searchTerm);\n\n}",
"SearchResultsType createSearchResultsType();",
"public native Facet getFacet(String facetId) /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n var ret = self.getFacet(facetId);\r\n if(ret == null || ret === undefined) return null;\r\n var retVal = @com.smartgwt.client.core.RefDataClass::getRef(Lcom/google/gwt/core/client/JavaScriptObject;)(ret);\r\n if(retVal == null) {\r\n retVal = @com.smartgwt.client.widgets.cube.Facet::new(Lcom/google/gwt/core/client/JavaScriptObject;)(ret);\r\n }\r\n return retVal;\r\n }-*/;",
"public void onSearchSubmit(String queryTerm);",
"ReagentSearch getReagentSearch();",
"@Override\n public String getServletInfo() {\n return \"Simple service that wraps the SOLR API to enable searching of ROI information\";\n }",
"public interface IFacetRepository {\n\t\n\t/**\n\t * Return the ProfileRepository\n\t */\n\tpublic IProfileRepository getProfileRepository();\n\n\t/**\n\t * Return the FacetFactory\n\t */\n\tpublic IFacetFactory getFacetFactory();\n\n\t/**\n\t * Return the FacetContextFactory\n\t */\t\n\tpublic IFacetContextFactory getFacetContextFactory();\n\t\n\t/**\n\t * Return the FacetDescriptorManager \n\t */\n\tpublic IFacetDescriptorManager getFacetDescriptorManager();\n\n\t/**\n\t * Method for retrieving facets. Uses <code>targetObject</code>'s \n\t * run-time type.\n\t * @return the facet (with assigned context if implementing IFacet) if found, null if not found \n\t */\n\tpublic Object getFacet(String name, IProfile profile, Object targetObject);\n\n\t/**\n\t * Method for retrieving facets. Uses passed <code>targetObjectClass</code>, therefore \n\t * you can pass null targetObjects ! \n\t * @return the facet (with assigned context if implementing) if found, null if not found \n\t */\n\tpublic Object getFacet(String name, IProfile profile, Object targetObject, Class targetObjectType);\n\n\n}",
"@RequestMapping(value={\"/search\"}, method={RequestMethod.GET})\n \tpublic ModelAndView handleSearch(@RequestParam(required=false) String q, @RequestParam(required=false,defaultValue=\"1\") Integer page){\n \t\tMap<String,Object> model = new HashMap<String,Object>();\n \t\t\n \t HashMap<String,Object> search = new HashMap<String,Object>();\n \t search.put(\"term\", \"\");\n \t search.put(\"total\",0);\n \n \t List<Map<String,String>> searchResult = new ArrayList<Map<String,String>>();\n \t if(StringUtils.isNotBlank(q)){\n \t \tsearch.put(\"term\", q);\n \t \tLimitedResult<List<NameConceptModelIF>> nameConceptModelList = null;\n \t \tint pageIndex = (page <= 0)?0:(page-1);\n \t \t//use page index +1 to avoid returning a bad page number\n \t\tsearch.put(\"pageNumber\", (pageIndex+1));\n \t\tsearch.put(\"pageSize\", searchService.getPageSize());\n \t\t//check if we want another page than the first one\n \t \tif(pageIndex > 0){\n \t \t\tnameConceptModelList = searchService.searchName(q,pageIndex);\n \t \t}\n \t \telse{\n \t \t\tnameConceptModelList = searchService.searchName(q);\n \t \t}\n \n \t\t search.put(\"total\",nameConceptModelList.getTotal_rows());\n \t\t List<Map<String,String>> searchResults = new ArrayList<Map<String,String>>();\n \t\t Map<String,String> searchRow = null;\n \t\t //TODO use objects directly instead of map\n \t\t for(NameConceptModelIF currNameConceptModel : nameConceptModelList.getRows()){\n \t\t \tif(currNameConceptModel.getClass().equals(NameConceptTaxonModel.class)){\n \t\t \t\tsearchRow = new HashMap<String,String>();\n \t\t \t\tsearchRow.put(\"type\",\"taxon\");\n \t\t \t\tsearchRow.put(\"name\", currNameConceptModel.getName());\n \t\t \t\tsearchRow.put(\"id\", currNameConceptModel.getTaxonId().toString());\n \t\t \t\tsearchRow.put(\"status\", currNameConceptModel.getStatus());\n \t\t \t\tsearchRow.put(\"namehtml\",((NameConceptTaxonModel)currNameConceptModel).getNamehtml());\n \t\t \t\tsearchRow.put(\"namehtmlauthor\",((NameConceptTaxonModel)currNameConceptModel).getNamehtmlauthor());\n \t\t \t\tsearchRow.put(\"rankname\",((NameConceptTaxonModel)currNameConceptModel).getRankname());\n \t\t \t\tsearchRow.put(\"parentid\",((NameConceptTaxonModel)currNameConceptModel).getParentid().toString());\n \t\t \t\tsearchRow.put(\"parentnamehtml\",((NameConceptTaxonModel)currNameConceptModel).getParentnamehtml());\n \t\t \t\tsearchResult.add(searchRow);\n \t\t \t}\n \t\t \telse if(currNameConceptModel.getClass().equals(NameConceptVernacularNameModel.class)){\n \t\t \t\tsearchRow = new HashMap<String, String>();\n \t\t \t\tsearchRow.put(\"type\",\"vernacular\");\n \t\t \t\tsearchRow.put(\"name\", currNameConceptModel.getName());\n \t\t \t\tsearchRow.put(\"id\", Integer.toString(((NameConceptVernacularNameModel)currNameConceptModel).getId()));\n \t\t \t\tsearchRow.put(\"status\", currNameConceptModel.getStatus());\n \t\t \t\tsearchRow.put(\"lang\",((NameConceptVernacularNameModel)currNameConceptModel).getLang());\n \t\t \t\tsearchRow.put(\"taxonid\",currNameConceptModel.getTaxonId().toString());\n \t\t \t\tsearchRow.put(\"taxonnamehtml\",((NameConceptVernacularNameModel)currNameConceptModel).getTaxonnamehtml());\n \t\t \t\tsearchResult.add(searchRow);\n \t\t \t}\n \t\t \telse{\n \t\t \t\t//logger\n \t\t \t\tsearchRow = null;\n \t\t \t}\n \t\t \tsearchResults.add(searchRow);\n \t\t }\n \t\t model.put(\"results\",searchResults);\n \t }\n \t \n \t model.put(\"search\",search);\n \t return new ModelAndView(\"search\", model);\n \t}",
"public interface ISearchView extends BaseView {\n String getInputContent();\n void setSearchResult(List<Person> data);\n}",
"ArtistCommunitySearch getArtistSearch();",
"TSearchQuery prepareSearchQuery(SearchQueryDefinitionAPI searchQueryDefinition);",
"@Test\n public void term_tag() throws AtlasBaseException {\n SearchParameters params = new SearchParameters();\n params.setTermName(SALES_TERM+\"@\"+SALES_GLOSSARY);\n params.setClassification(METRIC_CLASSIFICATION);\n\n List<AtlasEntityHeader> entityHeaders = discoveryService.searchWithParameters(params).getEntities();\n\n Assert.assertTrue(CollectionUtils.isNotEmpty(entityHeaders));\n for(AtlasEntityHeader e : entityHeaders){\n System.out.println(e.toString());\n }\n assertEquals(entityHeaders.size(), 4);\n }",
"SearchResponse query(SearchRequest request, Map<SearchParam, String> params);",
"public abstract ISearchCore getSearchCore();",
"public native void addFacet(String facetId) /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n self.addFacet(facetId);\r\n }-*/;",
"public HierarchicalFacet(String fieldName, String facetString){\n\t\tthis.count = 0;\n\t\tthis.fieldName = fieldName;\n\t\tthis.value = facetString;\n\t\t\n\t\tthis.facetTiers = unpackTiers(facetString);\n\t}",
"@java.lang.Override\n public com.clarifai.grpc.api.Search getSearch() {\n if (inputSourceCase_ == 10) {\n return (com.clarifai.grpc.api.Search) inputSource_;\n }\n return com.clarifai.grpc.api.Search.getDefaultInstance();\n }",
"public SearchResult clearFacetsEntries() {\n this.facets = null;\n return this;\n }",
"entities.Torrent.SearchRequest getSearchRequest();",
"public void performSearch() {\n History.newItem(MyWebApp.SEARCH_RESULTS);\n getMessagePanel().clear();\n if (keywordsTextBox.getValue().isEmpty()) {\n getMessagePanel().displayMessage(\"Search term is required.\");\n return;\n }\n mywebapp.getResultsPanel().resetSearchParameters();\n //keyword search does not restrict to spots\n mywebapp.addCurrentLocation();\n if (markFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(markFilterCheckbox.getValue());\n }\n if (contestFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setContests(contestFilterCheckbox.getValue());\n }\n if (geoFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setGeospatialOff(!geoFilterCheckbox.getValue());\n }\n if (plateFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setLicensePlate(plateFilterCheckbox.getValue());\n }\n if (spotFilterCheckbox != null) {\n mywebapp.getResultsPanel().getSearchParameters().setSpots(spotFilterCheckbox.getValue());\n }\n String color = getValue(colorsListBox);\n mywebapp.getResultsPanel().getSearchParameters().setColor(color);\n String manufacturer = getValue(manufacturersListBox);\n if (manufacturer != null) {\n Long id = new Long(manufacturer);\n mywebapp.getResultsPanel().getSearchParameters().setManufacturerId(id);\n }\n String vehicleType = getValue(vehicleTypeListBox);\n mywebapp.getResultsPanel().getSearchParameters().setVehicleType(vehicleType);\n// for (TagHolder tagHolder : tagHolders) {\n// mywebapp.getResultsPanel().getSearchParameters().getTags().add(tagHolder);\n// }\n mywebapp.getResultsPanel().getSearchParameters().setKeywords(keywordsTextBox.getValue());\n mywebapp.getMessagePanel().clear();\n mywebapp.getResultsPanel().performSearch();\n mywebapp.getTopMenuPanel().setTitleBar(\"Search\");\n //mywebapp.getResultsPanel().setImageResources(resources.search(), resources.searchMobile());\n }",
"@Override\n public Data3DPlastic search() {\n return super.search();\n }",
"public interface TrafikLabStationsRestService {\n\n List<StationTrafikLab> searchStations(String searchParam);\n}",
"public native String[] getFacetsHavingSelection() /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n var facets = self.getFacetsHavingSelection();\r\n if (facets == null) return null;\r\n return @com.smartgwt.client.util.JSOHelper::convertToArray(Lcom/google/gwt/core/client/JavaScriptObject;)(facets);\r\n }-*/;",
"TSearchResults createSearchResults(TSearchQuery searchQuery);",
"public QueryRequest withFacets(List<FacetRequest> facets) {\n this.facets = facets;\n return this;\n }",
"private String getUrlPlanetSearch() {\n return this.url + this.resource + this.resourceSearch;\n }",
"private void searchQuery(String query) {\n mSearchAheadServiceV3 = new SearchAheadService(this, API_KEY);\n\n String queryString = query;\n\n LatLng surreyBC = new LatLng(49.104599F, -122.823509F);\n\n List searchCollections = Arrays.asList(SearchCollection.AIRPORT, SearchCollection.ADMINAREA,\n SearchCollection.ADDRESS, SearchCollection.FRANCHISE, SearchCollection.POI);\n try {\n SearchAheadQuery searchAheadQuery = new SearchAheadQuery\n .Builder(queryString, searchCollections)\n .location(surreyBC)\n .limit(5)\n .build();\n\n mSearchAheadServiceV3.predictResultsFromQuery(searchAheadQuery,\n new SearchAheadService.SearchAheadResponseCallback() {\n\n @Override\n public void onSuccess(@NonNull SearchAheadResponse searchAheadResponse) {\n\n //Get search results from the request response\n List<SearchAheadResult> searchAheadResults = searchAheadResponse.getResults();\n\n //if we have requests\n if (searchAheadResults.size() > 0) {\n\n //clear the current data to display\n searchResultsData.clear();\n\n try {\n\n int size = (searchAheadResults.size() < 5) ? searchAheadResults.size() : 5;\n\n for (int i = size - 1; i >= 0; i--) {\n // create a hashmap\n HashMap<String, String> hashMap = new HashMap<>();\n\n AddressProperties addressProperties = searchAheadResults.get(i).getPlace().getAddressProperties();\n\n // convert image int to a string and place it into the hashmap with an images key\n hashMap.put(\"address\", searchAheadResults.get(i).getName());\n hashMap.put(\"city\", addressProperties.getCity() + \", \" + addressProperties.getStateCode());\n hashMap.put(\"lat\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLatitude()));\n hashMap.put(\"long\", String.valueOf(searchAheadResults.get(i).getPlace().getLatLng().getLongitude()));\n\n\n // add this hashmap to the list\n searchResultsData.add(hashMap);\n }\n\n //handle null pointer exception on address properties\n } catch (NullPointerException e) {\n e.printStackTrace();\n }\n\n //adapter inputs\n String[] from = {\n \"address\",\n \"city\",\n \"lat\",\n \"long\"\n };\n\n int[] to = {R.id.text_result_address, R.id.text_result_city, R.id.hidden_location_lat, R.id.hidden_location_long};\n\n searchAdapter = new SimpleAdapter(getApplicationContext(), searchResultsData, R.layout.item_search_result, from, to);\n mListViewSearch.setAdapter(searchAdapter);\n mListViewSearch.setVisibility(View.VISIBLE);\n } else {\n resetSearchAheadList();\n }\n }\n\n @Override\n public void onError(Exception e) {\n Log.e(\"MAPQUEST\", \"Search Ahead V3 Failure\", e);\n }\n });\n } catch (IllegalQueryParameterException e) {\n Log.e(\"Error performing search\", e.getMessage());\n }\n }",
"SearchResponse search(SearchRequest searchRequest) throws IOException;",
"public String getSearchValue(){\n\t\tif (this.facetTiers == null || this.facetTiers.size() == 0)\n\t\t\treturn null;\n\t\treturn this.facetTiers.get(this.facetTiers.size()-1).getIdentifier();\n\t}",
"entities.Torrent.LocalSearchResponse getLocalSearchResponse();",
"public interface ISearchView extends IView{\n void showLoadSearchResult(List<Map<String, Object>> data);\n void showLoadSearchHistory(List<SearchHistory> data);\n String getSearch();\n}",
"List<Revenue> search(String query);",
"public interface SearchCategory {\n /**\n * @return Internal name of the category as a search field.\n */\n public String getFieldName();\n\n /**\n * @return Human readable name for the category.\n */\n public String getCategoryLabel();\n}",
"List<TypeTreatmentPlanStatuses> search(String query);",
"public static interface SearchType\n\t{\n\t\t/**\n\t\t * Creates a search of this type with the given query\n\t\t * \n\t\t * @param search The search query\n\t\t * @param builder The search builder that is compiling the search\n\t\t * @return The compiled search object representing the given query\n\t\t */\n\t\tpublic abstract Search create(String search, SearchBuilder builder);\n\n\t\t/** @return All headers that may begin a search of this type */\n\t\tpublic abstract String [] getHeaders();\n\t}",
"void setTypeOfFacet(TypeOfFacet typeOfFacet);",
"public XSFacet getFacet(final String name) {\n // This method could not be decompiled.\n // \n // Original Bytecode:\n // \n // 0: fdiv \n // 1: dstore_2 \n // LocalVariableTable:\n // Start Length Slot Name Signature\n // ----- ------ ---- ---- -------------------------------------------\n // 0 2 0 this Lcom/sun/xml/xsom/impl/UnionSimpleTypeImpl;\n // 0 2 1 name Ljava/lang/String;\n // \n // The error that occurred was:\n // \n // java.lang.ArrayIndexOutOfBoundsException\n // \n throw new IllegalStateException(\"An error occurred while decompiling this method.\");\n }",
"public String buildSearchQuery() throws Exception\r\n { \r\n String query;\r\n \r\n searchContext.setText(getSearchString());\r\n \r\n if(!locations.isEmpty())\r\n {\r\n searchContext.setLocations(locations);\r\n }\r\n\r\n if (ext != null) {\r\n for (AdvancedSearchOptions option : ext.getAdvOptionsExtensions()) {\r\n option.setSearchParam(searchContext);\r\n }\r\n }\r\n \r\n // we always want to exclude CAT ignore & hidden rendition aspects\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_IGNORE);\r\n searchContext.setAspectToExclude(VeloConstants.ASPECT_HIDDEN_RENDITION);\r\n\r\n // we always want to exclude thumbnail types\r\n searchContext.addTypeToExclude(VeloConstants.TYPE_THUMBNAIL);\r\n \r\n query = searchContext.buildQuery(2);\r\n logger.debug(\"AdvancedSearchQuery:\" + query);\r\n \r\n return query;\r\n \r\n }",
"public native void addFacet(String facetId, boolean intoRows, int index) /*-{\r\n var self = this.@com.smartgwt.client.widgets.BaseWidget::getOrCreateJsObj()();\r\n self.addFacet(facetId, intoRows, index);\r\n }-*/;",
"public HierarchicalFacetTier(String facetString) throws InvalidHierarchicalFacetException {\n\t\t\tString facetComponents[] = facetString.split(searchSettings.getFacetSubfieldDelimiter(), 3);\n\t\t\tif (facetComponents.length > 0){\n\t\t\t\ttry {\n\t\t\t\t\tthis.tier = Integer.parseInt(facetComponents[0]);\n\t\t\t\t} catch (Exception e){\n\t\t\t\t\tthrow new InvalidHierarchicalFacetException(\"Invalid tier value.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (facetComponents.length > 1){\n\t\t\t\tthis.searchValue = facetComponents[1];\n\t\t\t} else {\n\t\t\t\t//If there isn't a search value\n\t\t\t\tthrow new InvalidHierarchicalFacetException(\"No search value provided.\");\n\t\t\t}\n\t\t\tif (facetComponents.length > 2){\n\t\t\t\tthis.displayValue = facetComponents[2];\n\t\t\t} else {\n\t\t\t\tthis.displayValue = this.searchValue;\n\t\t\t}\n\t\t}",
"@Override\n public Set<String> getFacetNames() {\n if (_subBrowsers.length == 0) {\n return null;\n }\n return _subBrowsers[0].getFacetNames();\n }",
"public void setFacets(java.util.Map<String, BucketInfo> facets) {\n this.facets = facets == null ? null : new com.amazonaws.internal.SdkInternalMap<String, BucketInfo>(facets);\n }",
"public GoodreadsResponse getSearchResults(String query, int page) throws JAXBException {\n String uri = this.apiServer + this.searchApiEndpoint + \"?q={query}&key={key}&page={page}\";\n return (GoodreadsResponse) unmarshaller.unmarshal(\n new ByteArrayInputStream(restTemplate.getForObject(uri, String.class, query, apiKey, page).getBytes()));\n }",
"private String buildFacetString(List<String> facetNames, List<String>facetValues ) {\n\t\t\n\t\tStringBuilder builder = new StringBuilder();\n\n\t\tif( facetNames != null && facetValues != null ) \n\t\t{\n\t\t\tint pairsCount = -1;\n\t\t\tif( facetNames.size() != facetValues.size() ) {\n\t\t\t\tpairsCount = facetNames.size() > facetValues.size() ? facetValues.size() : facetNames.size();\n\t\t\t\tlog.warn( \"facetNames and facetValues lists were of different sizes, your query may not be accurate\" );\n\t\t\t} else {\n\t\t\t\tpairsCount = facetNames.size();\n\t\t\t}\n\t\t\tfor( int i=0; i < pairsCount; i++ ) {\n\t\t\t\ttry {\n\t\t\t\t\tbuilder.append( \"&facets[\").append( facetNames.get( i )).append( \"][]=\" )\n\t\t\t\t\t\t.append( URLEncoder.encode( facetValues.get( i ), \"UTF-8\" ));\n\t\t\t\t} catch (UnsupportedEncodingException ignore) {\n\t\t\t\t}\n\t\t\t}\n\n\t\t} else {\n\t\t\tlog.error( \"facetNames or facetValues was null, you are defaulting to a regular query using no facet matching\" );\n\t\t}\n\n\t\treturn builder.toString();\n\t}",
"public interface GoogleBooksService {\n @GET(\"/books/v1/volumes\")\n void search(@Query(\"q\") String query, Callback<SearchResult> callback);\n}",
"public interface TaggedService {\n @GET(\"/v2/tagged\")\n Call<BaseBean<List<PostsItem>>> getTaggedPosts(@Query(\"tag\") String tag,\n @Query(\"filter\") String filter,\n @Query(\"before\") long timestamp,\n @Query(\"limit\") int limit);\n\n}",
"void searchView(String name);",
"public List<Entity> getEntitySearchResults(String type, String name, int limit) {\n\t\t//Type parameter will be one of -> {'Artist', 'Band', 'Label', 'Album', 'Track'}\n\t\tString URL = \"http://localhost:8081\" + type;\n\t\tSystem.out.println(\"Request made to: \" + URL);\n\t\tUriComponentsBuilder builder = UriComponentsBuilder.fromHttpUrl(URL)\n\t\t\t\t.queryParam(\"name\", name)\n\t\t\t\t.queryParam(\"limit\", limit);\n\t\tUriComponents components = builder.build(false);\n\t\tURI uri = components.toUri();\n\t\tList<Entity> entities = restTemplate.getForObject(uri, List.class);\n\t\treturn entities;\n\t}",
"public interface IScapSyncSearch {\n\n /**\n * Get the Relative Search URL of this search.\n * @return page the Relative Search URL of this search\n */\n public String getSearchUrl();\n\n /**\n * Get the number of rows per page in this search.\n * @return int the number of rows in this search\n */\n public int getRowsPerPage();\n\n /**\n * Get the Starting Row of this search.\n * @return int the number of the Starting Row of this search\n */\n public int getStartRow();\n\n /**\n * Get the Ending Row of this search.\n * @return int the number of the Ending Row of this search\n */\n public int getEndRow();\n \n /**\n * Get the Total Rows of this search.\n * @return int the number of Total Rows of this search\n */\n public int getTotalRows(); \n\n /**\n * Get the number of the Current Page of this search.\n * @return int the Current Page of this search\n */\n public int getCurrentPage(); \n\n /**\n * Get the Sort Fields of this search.\n * @return sortFields[] and array containing the available Sort Fields\n */\n public IScapSyncSearchSortField[] getSortFields();\n \n /**\n * Get the Facets of this search.\n * @return IScapSyncSearchFacet[] an array containing the available Facets\n */\n public IScapSyncSearchFacet[] getFacets();\n \n /**\n * Get the Results of this search.\n * @return IScapSyncSearchResult[] an array containing the available Results\n */\n public IScapSyncSearchResult[] getResults();\n\n /**\n * Get the Pages of this search.\n * @return IScapSyncSearchPage[] an array containing the available Pages\n */\n public IScapSyncSearchPage[] getPages();\n\n}",
"private RequestResponse handleSearchRequest(Request request, Response response) throws ServiceException {\n response.type(\"application/json\");\n\n String core = request.params(\":core\");\n if (StringUtils.isEmpty(core)) {\n throw new ServiceException(\"Failed to provide an index core for the document\");\n }\n\n SearchParameters searchParameters = new RequestToSearchParameters().convert(request);\n return this.searchService.query(core, searchParameters);\n }",
"@Override\n\tpublic ResponseObject queryByVisual(CommonParameters query, String strJson) {\n\t\treturn null;\n\t}",
"public String domainStatisticsForQuery(String query, List<String> fq) throws Exception {\n SolrQuery solrQuery = new SolrQuery();\n solrQuery.setQuery(query);\n solrQuery.setRows(0);\n solrQuery.set(\"facet\", \"false\");\n \n // default scale (by year)\n int startYear = PropertiesLoaderWeb.ARCHIVE_START_YEAR;\n int endYear = LocalDate.now().getYear() + 1; // add one since it is not incluced\n\n solrQuery.setParam(\"json.facet\",\n \"{domains:{type:terms,field:domain,limit:30,facet:{years:{type:range,field:crawl_year,start:\" + startYear + \",end:\" + endYear + \",gap:1}}}}\");\n\n for (String filter : fq) {\n solrQuery.addFilterQuery(filter);\n }\n SolrUtils.setSolrParams(solrQuery); //TODO not sure about this one\n NoOpResponseParser rawJsonResponseParser = new NoOpResponseParser();\n rawJsonResponseParser.setWriterType(\"json\");\n\n QueryRequest req = new QueryRequest(solrQuery);\n req.setResponseParser(rawJsonResponseParser);\n\n NamedList<Object> resp = solrServer.request(req);\n String jsonResponse = (String) resp.get(\"response\");\n return jsonResponse;\n }",
"public interface APIInterface {\r\n @GET(\"api.php/action=query&format=json&prop=pageimages%7Cpageterms&generator=prefixsearch&redirects=1&formatversion=2&piprop=thumbnail&pithumbsize=50&pilimit=10&wbptterms=description\")\r\n Call<SearchResponseModel> getDataList(@Query(\"gpssearch\") String name , @Query(\"gpslimit\") String gpsLimit);\r\n}",
"public void searchField(String name) {\r\n\t\tsafeType(addVehiclesHeader.replace(\"Add Vehicle\", \"Search\"), name);\r\n\t\t;\r\n\t}",
"@Override\n public SenseiRequest customizeRequest(SenseiRequest request)\n {\n request.setCount(request.getOffset()+request.getCount());\n request.setOffset(0);\n\n // Rewrite facet max count.\n Map<String, FacetSpec> facetSpecs = request.getFacetSpecs();\n if (facetSpecs != null) {\n for (Map.Entry<String, FacetSpec> entry : facetSpecs.entrySet()) {\n FacetSpec spec = entry.getValue();\n if (spec != null && spec.getMaxCount() < 50)\n spec.setMaxCount(50);\n }\n }\n\n // Rewrite fetchStoredFields for zoie store.\n if (!request.isFetchStoredFields())\n request.setFetchStoredFields(request.isFetchStoredValue());\n\n // Rewrite select list to include sort and group by fields:\n if (request.getSelectSet() != null)\n {\n List<String> selectList = request.getSelectList();\n SortField[] sortFields = request.getSort();\n if (sortFields != null && sortFields.length != 0)\n {\n for (int i = 0; i < sortFields.length; ++i)\n {\n if (sortFields[i].getType() != SortField.SCORE && sortFields[i].getType() != SortField.DOC)\n {\n String field = sortFields[i].getField();\n selectList.add(field);\n }\n }\n }\n String[] groupByFields = request.getGroupBy();\n if (groupByFields != null && groupByFields.length != 0)\n {\n for (int i = 0; i < groupByFields.length; ++i)\n {\n selectList.add(groupByFields[i]);\n }\n }\n String[] distinctFields = request.getDistinct();\n if (distinctFields != null && distinctFields.length != 0)\n {\n for (int i = 0; i < distinctFields.length; ++i)\n {\n selectList.add(distinctFields[i]);\n }\n }\n request.setSelectList(selectList);\n }\n\n return request;\n }",
"public static void main(String[] args) throws IOException{\n \n List<List<String>> results;\n String query = \"ADD QUERY OR CATEGORY FOR SEARCH\";\n \n //ADD USER ID WHO SEARCHES\n Long userId = 1;\n PersonalizedSearch searchObj = new PersonalizedSearch();\n \n final CredentialsProvider credsProvider = new BasicCredentialsProvider();\n credsProvider.setCredentials(AuthScope.ANY, new UsernamePasswordCredentials(\"elastic\",\"elastic\"));\n \n \n RestHighLevelClient client = new RestHighLevelClient(\n RestClient.builder(\n new HttpHost(\"localhost\",9200),\n new HttpHost(\"localhost\",9201))\n .setHttpClientConfigCallback(new RestClientBuilder.HttpClientConfigCallback() {\n @Override\n public HttpAsyncClientBuilder customizeHttpClient(HttpAsyncClientBuilder hacb) {\n return hacb.setDefaultCredentialsProvider(credsProvider);\n }\n }));\n \n /**\n * ---------COMMENT OUT ONE OF THE FOLLOWING TO DO A PERSONALIZED SEARCH FOR A SIGNED IN OR/AND AN ANONYMOUS USER--------\n */\n\n System.out.println(\"Starting collecting queryless/queryfull submissions...\");\n System.out.println(\"\");\n// searchObj.performQuerylessSearchWithPersonalization(client);\n// searchObj.performQueryfullSearchWithPersonalization(client);\n// results = searchObj.performPharm24PersonalizedQueryfullSearch(client, userId, query);\n// results = searchObj.performPharm24PersonalizedQuerylessSearch(client, userId, query);\n \n for(int i=0; i<results.size(); i++){\n for(int j = 0; j<results.get(i).size();j++){\n System.out.println(results.get(i).get(j));\n }\n System.out.println(\"-------RERANKED---------\");\n }\n\n System.out.println(\"\");\n System.out.println(\"I\\'m done!\");\n \n \n }",
"@RequestMapping(value = \"/search\", method = { RequestMethod.GET })\r\n\tpublic String search(Model model) {\n\t\tList<String> indexFieldNamesForMM = ecoreMetamodelService.getAllIndexTags();\r\n\t\tmodel.addAttribute(\"indexFieldNamesForMM\", indexFieldNamesForMM);\r\n\r\n\t\t// Tags for T. (statics)\r\n\t\t// Get all Transformations tags\r\n\t\tList<String> indexFieldNamesForT = atlTransformationService.getAllIndexTags();\r\n\t\tmodel.addAttribute(\"indexFieldNamesForT\", indexFieldNamesForT);\r\n\r\n\t\t// Tags for M. (dinamics)\r\n\t\t// Get all tags\r\n\t\tList<String> indexFieldNamesForM = modelService.getAllIndexTags();\r\n\r\n\t\t// Remove Metamodels and Transformations tags in order to find out only\r\n\t\t// the model tags.\r\n\t\tindexFieldNamesForM.removeAll(indexFieldNamesForMM);\r\n\t\tindexFieldNamesForM.removeAll(indexFieldNamesForT);\r\n\r\n\t\tmodel.addAttribute(\"indexFieldNamesForM\", indexFieldNamesForM);\r\n\r\n\t\treturn \"public.search\";\r\n\t}",
"@GET(\"w/api.php?action=opensearch&format=json&suggest&redirects=resolve\")\n Call<JsonElement> getSuggestionsFromSearch(@Query(\"search\") String search);"
] | [
"0.6969527",
"0.6687888",
"0.6264406",
"0.61900306",
"0.60583496",
"0.60135573",
"0.59831023",
"0.5969673",
"0.5943454",
"0.59177804",
"0.58529115",
"0.57789737",
"0.5750655",
"0.5648238",
"0.5644629",
"0.5639771",
"0.56341493",
"0.5552181",
"0.5542082",
"0.55045223",
"0.5496789",
"0.54894245",
"0.5471068",
"0.54510903",
"0.5431507",
"0.5419452",
"0.54183364",
"0.5381056",
"0.5372299",
"0.5369932",
"0.5366654",
"0.53521824",
"0.5351613",
"0.53392303",
"0.53111935",
"0.5310812",
"0.5307109",
"0.53054345",
"0.5297783",
"0.5293575",
"0.5272633",
"0.5272305",
"0.5272121",
"0.5263651",
"0.5254257",
"0.5251919",
"0.52332175",
"0.51908475",
"0.5175158",
"0.5168615",
"0.5168288",
"0.51623535",
"0.51548535",
"0.5146717",
"0.5143556",
"0.51425034",
"0.5140414",
"0.51150984",
"0.509905",
"0.5098188",
"0.5075982",
"0.5072902",
"0.5067086",
"0.5059588",
"0.50555634",
"0.50507385",
"0.5044112",
"0.50384945",
"0.5034738",
"0.50331783",
"0.50251067",
"0.5011437",
"0.5001468",
"0.49992633",
"0.49785864",
"0.4972446",
"0.4967075",
"0.49608594",
"0.4958465",
"0.49560317",
"0.49555707",
"0.49527475",
"0.4948196",
"0.49453247",
"0.49444014",
"0.4943476",
"0.49399498",
"0.49394453",
"0.49356377",
"0.4934218",
"0.4931657",
"0.49258465",
"0.49027863",
"0.48958373",
"0.48925546",
"0.48871624",
"0.48802972",
"0.48753494",
"0.48703656",
"0.48680696"
] | 0.5787004 | 11 |
BufferedReader br = new BufferedReader(new FileReader("./1.in")); BufferedWriter bw = new BufferedWriter(new FileWriter("./1.out")); | public static void main(String[] args)throws IOException{
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
BufferedWriter bw = new BufferedWriter(new OutputStreamWriter(System.out));
StringTokenizer st = new StringTokenizer(br.readLine());
int N = Integer.parseInt(st.nextToken());
int M = Integer.parseInt(st.nextToken());
int K = Integer.parseInt(st.nextToken());
st = new StringTokenizer(br.readLine());
int S = Integer.parseInt(st.nextToken());
int D = Integer.parseInt(st.nextToken());
Graph g = new Graph(N);
for(int i=0;i<M;i++){
st = new StringTokenizer(br.readLine());
int start = Integer.parseInt(st.nextToken());
int end = Integer.parseInt(st.nextToken());
int weight = Integer.parseInt(st.nextToken());
g.addEdge(start, end, weight);
}
List<Integer> taxes = new ArrayList<Integer>();
for(int i=0;i<K;i++){
int weight = Integer.parseInt(br.readLine());
taxes.add(weight);
}
int[] result;
result = dijkstra(g, S);
bw.write(Integer.toString(result[D])+"\n");
for(int i=0;i<K;i++){
g.addWeight2AllEdge(taxes.get(i));
result = dijkstra(g, S);
bw.write(Integer.toString(result[D])+"\n");
}
bw.flush();
bw.close();
br.close();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public EnigmaFile() throws Exception\n {\n\n String path = Main.class.getClassLoader().getResource(\"filein.txt\").getPath();\n File currentDirectory=new File(path);\n finstream = new FileInputStream(currentDirectory);\n\n\n String pathToWrite = path.replaceFirst(\"filein.txt\",\"fileout.txt\");\n File outputFile = new File(pathToWrite);\n br = new BufferedReader(new InputStreamReader(finstream));\n outputFile.createNewFile();\n FileWriter fileWrite = new FileWriter(outputFile.getAbsoluteFile());\n writer = new BufferedWriter(fileWrite);\n\n\n }",
"public static void main(String[] args) {\n\t\tFileReader fr=null;\r\n\t\tFileWriter fw=null;\r\n\t\ttry {\r\n\t\t\t//字节流以byte为单位,字符流以char为单位!!\r\n\t\t\tchar c[]=new char[1024];\r\n\t\t\tint n=0;//返回实际读取的长度\r\n\t\t\tfr=new FileReader(new File(\"d:/a.txt\"));\r\n\t\t\tfw=new FileWriter(new File(\"d:/b.txt\"));\r\n\t\t\twhile((n=fr.read(c))!=-1){\r\n\t\t\t\tfw.write(c, 0, n);\r\n\t\t\t}\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}finally{\r\n\t\t\ttry {\r\n\t\t\t\tfr.close();\r\n\t\t\t\tfw.close();\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"private void getFiles() {\n\t\ttry {\n\t\t\tFileReader fr = new FileReader(inputFileName);\n\t\t\tinputBuffer = new BufferedReader(fr);\n\n\t\t\tFileWriter fw = new FileWriter(outputFileName);\n\t\t\toutputBuffer = new BufferedWriter(fw);\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"File not found: \" + e.getMessage());\n\t\t\tSystem.exit(-2);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"IOException \" + e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(-3);\n\t\t}\n\t}",
"public static void main(String[] args) throws IOException {\n\n Writer writer = new FileWriter(\"/home/levon/number1.txt\");\n\n\n for (int i = 93000000; i <= 93999999; i++) {\n writer.write(\"0\"+i+'\\n');\n }\n writer.close();\n\n FileReader fileReader =new FileReader(\"/home/levon/number1.txt\");\n BufferedReader reader = new BufferedReader(fileReader);\n\n String s = reader.readLine();\n Writer writer1 = new BufferedWriter(new FileWriter(\"/home/levon/number2.txt\"));\n while (true)\n writer1.write(s + String.format(\"Hello %h\", \"Levon\"));\n }",
"public static void main(String[] args) throws IOException {\nFileInputStream fin=new FileInputStream(\"C:\\\\\\\\Users\\\\\\\\Dell\\\\\\\\Desktop\\\\\\\\input.txt\");\nFileOutputStream fout=new FileOutputStream(\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\Dell\\\\\\\\\\\\\\\\Desktop\\\\\\\\\\\\\\\\output.txt\");\nint c=0;\nwhile((c=fin.read())!=-1)\n{\n\tfout.write(c);\n}\nSystem.out.println(\"written completed\");\n\t}",
"public static void main (String [] args) throws IOException {\n BufferedReader f = new BufferedReader(new FileReader(\"test.in\"));\n // input file name goes above\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"test.out\")));\n // Use StringTokenizer vs. readLine/split -- lots faster\n StringTokenizer st = new StringTokenizer(f.readLine());\n\t\t\t\t\t\t // Get line, break into tokens\n int i1 = Integer.parseInt(st.nextToken()); // first integer\n int i2 = Integer.parseInt(st.nextToken()); // second integer\n out.println(i1+i2); // output result\n out.close(); // close the output file\n}",
"public static void main(String[] args) throws IOException {\n\t\tFileInputStream filin = new FileInputStream(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016.txt\"));\n\t\tFileOutputStream filout = new FileOutputStream(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016_2.txt\"));\n\t\tint val;\n\t\twhile((val = filin.read()) != -1)\n\t\t{\n\t\t\tfilout.write(val);\n\t\t}\n\t\tfilin.close();\n\t\tfilout.close();\n\t\tSystem.out.println(\"Completed\");\n\t\t\n\t\t//Char\n\t\tFileReader filrd = new FileReader(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016.txt\"));\n\t\tFileWriter filwr = new FileWriter(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016_3.txt\"));\n\t\tint val1;\n\t\twhile((val1 = filrd.read()) != -1)\n\t\t{\n\t\t\tfilwr.write(val1);\n\t\t}\n\t\tfilrd.close();\n\t\tfilwr.close();\n\t\tSystem.out.println(\"Character Completed\");\n\t\t//Buffer stream\n\t\tBufferedReader buffrd = new BufferedReader(new FileReader(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016.txt\")));\n\t\tBufferedWriter buffwr = new BufferedWriter(new FileWriter(new File(\"/home/prasanna/E-Books/H-Series/JPA/Java_03072016_4.txt\")));\n\t\tString val2;\n\t\twhile((val2 = buffrd.readLine()) != null)\n\t\t{\n\t\t\tbuffwr.write(val2);\n\t\t}\n\t\tbuffrd.close();\n\t\tbuffwr.close();\n\t\tSystem.out.println(\"Buffer Completed\");\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tString short_1_A_Path = args[0];\n\t\tString short_1_B_Path = args[1];\n\t\tString OutPutPath = args[2];\n\t\tString DataSetName = args[3];\n\t\ttry {\n\t\t\tint Num=0;\n\t\t\tString readtemp1=\"\";\n\t\t\tString readtemp2=\"\";\n\t\t\tint Short1_NumLeft=0;\n\t\t\tint Short1_NumRight=0;\n\t\t\tString encoding = \"utf-8\";\n\t\t\tFile file1 = new File(short_1_A_Path);\n\t\t\tFile file2 = new File(short_1_B_Path);\n\t\t\tif (file1.exists()&&file2.exists()) {\n\t\t\t\tInputStreamReader read1 = new InputStreamReader(new FileInputStream(file1), encoding);\n\t\t\t\tInputStreamReader read2 = new InputStreamReader(new FileInputStream(file2), encoding);\n\t\t\t\tBufferedReader bufferedReader1 = new BufferedReader(read1);\n\t\t\t\tBufferedReader bufferedReader2 = new BufferedReader(read2);\n\t\t\t\twhile ((bufferedReader1.readLine())!=null && (bufferedReader2.readLine())!= null)\n\t\t\t\t{\n\t\t\t\t\t//The second line.\n readtemp1=bufferedReader1.readLine();\n readtemp2=bufferedReader2.readLine();\t\t\t\t\t\t\n\t\t\t\t //Write left.\n\t\t\t\t\tFileWriter writer1 = new FileWriter(OutPutPath + DataSetName+\".left.fasta\",true);\n\t\t\t\t\twriter1.write(\">\"+(Short1_NumLeft++)+\"\\n\"+readtemp1+\"\\n\");\n\t\t\t\t\twriter1.close();\n\t\t\t\t\t//Write right.\t\n\t\t\t\t\tFileWriter writer2 = new FileWriter(OutPutPath + DataSetName+\".right.fasta\",true);\n\t\t\t\t\twriter2.write(\">\"+(Short1_NumRight++)+\"\\n\"+readtemp2+\"\\n\");\n\t\t\t\t\twriter2.close();\n\t\t\t\t\t//Write all.\t\n\t\t\t\t\tFileWriter writer3 = new FileWriter(OutPutPath + DataSetName+\".fasta\", true);\n\t\t\t\t\twriter3.write(\">\"+(Num)+\"\\n\"+readtemp1 +\"\\n\"+\">\"+(Num)+\"\\n\"+readtemp2+\"\\n\");\n\t\t\t\t\twriter3.close();\n\t\t\t\t\t//The third line.\n\t\t\t\t\tbufferedReader1.readLine();\n\t\t\t\t\tbufferedReader2.readLine();\n\t\t\t\t //The fourth line.\n\t\t\t\t\tbufferedReader1.readLine();\n\t\t\t\t\tbufferedReader2.readLine();\n\t\t\t\t}\n\t\t\t\tbufferedReader1.close();\n\t\t\t\tbufferedReader2.close();\n\t\t\t} \n\t\t\telse \n\t\t\t{\n\t\t\t\tSystem.out.println(\"File is not exist!\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\tSystem.out.println(\"Error liaoxingyu\");\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public void readAndWrite() {\n Scanner scanner = new Scanner(System.in);\n String s = scanner.nextLine();\n List<String> passedFiles = new ArrayList<>();\n copy(new File(s), true, passedFiles);\n\n }",
"public static void files() throws IOException {\n\n\n try {\n BufferedReader reader = new BufferedReader(new FileReader(\"D:\\\\Text.txt\"));\n String line;\n while ((line = reader.readLine()) != null) {\n Palindroms.palindromeByReverse(line);\n BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(\"D:\\\\output.txt\")));\n writer.append(line);\n writer.close();\n }\n reader.close();\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n System.out.println(\"Bye!\");\n }\n }",
"public static void main(String[] arg) {\n\t\tBufferedReader br = new BufferedReader(\r\n\t\t new FileReader(\"input.in\"));\r\n\r\n\t\t// PrintWriter class prints formatted representations\r\n\t\t// of objects to a text-output stream.\r\n\t\tPrintWriter pw = new PrintWriter(new\r\n\t\t BufferedWriter(new FileWriter(\"output.in\")));\r\n\r\n\t\t// Your code goes Here\r\n\r\n\t\tpw.flush();\r\n\t\tScanner sc = new Scanner(System.in);\r\n\t\tString x = sc.nextLine();\r\n\r\n\t\tSystem.out.println(\"hello world \" + x);\r\n\t}",
"public static void main(String[] args)throws Exception {\n\t\tSystem.out.println(\"=======1\");\r\n\t\tFileInputStream fi1 = new FileInputStream(\"d:/test/test.txt\");\r\n\t\tint ch1;\r\n\t\twhile ((ch1=fi1.read())!=-1) {\r\n\t\t\tSystem.out.print((char)ch1);\r\n\t\t}\r\n\t\tfi1.close();\r\n\t\t\r\n\t\tSystem.out.println();\r\n\t\tSystem.out.println(\"=======2\");\r\n\t\tFileInputStream fi2 = new FileInputStream(\"d:/test/test.txt\");\r\n\t\tint ch2;\r\n\t\tbyte[] bt = new byte[1024];\r\n\t\tint i=0;\r\n\t\twhile((ch2= fi2.read())!=-1) {\r\n\t\t\tbt[i] = (byte)ch2;\r\n\t\t\ti++;\r\n\t\t}\r\n\t\tSystem.out.println(new String(bt));\r\n\t\tfi2.close();\r\n\t\t\r\n\t\tSystem.out.println(\"=======3\");\r\n\t\tFileReader fReader =new FileReader(\"d:/test/test.txt\");\r\n\t\tBufferedReader bReader=new BufferedReader(fReader);\r\n\t\tString str = null;\r\n\t\twhile((str = bReader.readLine())!=null) {\r\n\t\t\tSystem.out.println(str);\r\n\t\t}\r\n\t\tbReader.close();\r\n\t\tfReader.close();\r\n\t\t\r\n\t\tSystem.out.println(\"=======4\");\r\n\t\tScanner sc = new Scanner (new File(\"d:/test/add.txt\"));\r\n\t\tint hap=0,value=0;\r\n\t\twhile(sc.hasNext()) {\r\n\t\t\tvalue = sc.nextInt();\r\n\t\t\tSystem.out.println(\"Êý×Ö:\"+value);\r\n\t\t\thap+=value;\r\n\t\t}\r\n\t\tSystem.out.println(\"ºÍ:\"+hap);\r\n\t\tsc.close();\r\n\t\t\r\n\t\tSystem.out.println(\"=======6\");\r\n\t\tFileWriter fw6 = new FileWriter(\"d:/test/fi6.txt\");\r\n\t\tScanner sc6= new Scanner(System.in);\r\n\t\tString str6=null; \r\n\t\twhile(!(str6=sc6.nextLine()).equals(\"\")) {\r\n\t\t\tfw6.write(str6 +\"\");\r\n\t\t}\r\n\t\tfw6.close();\r\n\t\t\r\n\t\tSystem.out.println(\"=======5\");\r\n\t\tFileOutputStream fos = new FileOutputStream(\"d:/test/fi5.txt\");\r\n\t\tint ch;\r\n\t\twhile((ch = System.in.read())!=13) {\r\n\t\t\tfos.write((byte)ch);\r\n\t\t}\r\n\t\tfos.close();\r\n\t\t\r\n\t\tSystem.out.println(\"=======7\");\r\n\t\tFileInputStream fi7 = new FileInputStream(\"c:/windows/win.ini\");\r\n\t\tFileOutputStream fo7 = new FileOutputStream(\"d:/test/fi7.txt\");\r\n\t\tint ch7;\r\n\t\twhile((ch7 = fi7.read())!=-1) {\r\n\t\t\t fo7.write((byte)ch7);\r\n\t\t}\r\n\t\tSystem.out.println(\"½áÊø\");\r\n\t\tfi7.close();\r\n\t\tfo7.close();\r\n\t\t\r\n\t\tSystem.out.println(\"=======8\");\r\n\t\tFileInputStream fi8 = new FileInputStream(args[0]);\r\n\t\tFileOutputStream fo8 = new FileOutputStream(args[1]);\r\n\t\tint ch8;\r\n\t\twhile((ch8 = fi8.read())!=-1) {\r\n\t\t\t fo8.write((byte)ch8);\r\n\t\t}\r\n\t\tSystem.out.println(\"½áÊø\");\r\n\t\tfi8.close();\r\n\t\tfo8.close();\r\n\t}",
"protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}",
"public static void main(String args[])\n {\n String FILENAME = \"myfile.txt\";\n\n // When used, the FileWriter object will immediately put it's output\n // to the file. So FileWriter output attempts to write to the file as\n // fast as possible. Maybe this is a good thing in some\n // circumstances, but I think it would be better to write data in\n // chunks. We employ a BufferedWriter object to capture the\n // FileWriter output into a collection of bytes that can be written\n // to the file.\n FileWriter fWriter = null;\n BufferedWriter bWriter = null;\n\n // Wrapping our attempt to write to the file inside a try / catch\n // statement allows us to trap some errors if they happen\n try\n {\n // Here is the content that we will write to the file.\n String fileContent = \"Dude, I'm totally writing to a file!!\";\n\n // These lines instantiate FileWriter and BufferedWriter objects.\n // When instantiating the FileWriter object we pass in the file\n // name that we are writing to. If no path is given in our\n // filename, the file will be created and written in the root\n // directory.\n fWriter = new FileWriter(FILENAME);\n\n // The BufferedWriter object is instantiated on this line and the\n // FileWriter object is passed in as an argument.\n bWriter = new BufferedWriter(fWriter);\n\n // Now that we have our buffer and writer objects created, we can\n // attempt to write content to the file. Here is what\n // (I think) this is doing. The BufferedWriter object will receive\n // the content to be written, and then pass that content as a\n // whole to the FileWriter so it can be written to the file as a\n // chunk. If we did not do it this way, the content would be read\n // passed into the FileWriter object, converted to bytes on the\n // fly, and immediately written, byte by byte as it is converted,\n // to the file. By buffering we are increasing the performance of\n // this action.\n bWriter.write(fileContent);\n }\n\n // The catch statement will trap and display any exception that is\n // created when we are attempting to create our writer objects, open\n // or create the file, or write content.\n catch(Exception e)\n {\n System.out.println(\"Unable to write to file : \" + e.getMessage());\n }\n\n // This 'finally' statement will always happen, regardless of what\n // happens in our try/catch statement. If we put this code into the\n // try statement and we received an error, it would never be\n // processed. Additionally, if we put this code at the bottom of our\n // program and ran into an error half way through, it would never be\n // processed. Placing the code into a finally statement allows us to\n // ensure that it is run every time.\n finally\n {\n // Another try and catch statement to trap any error that happens\n // when closing the files.\n try\n {\n // The last thing we want to do is close out our writer\n // objects. This is a best practice since if you leave the\n // writer open you are at best wasting system resources, and\n // at worst you could lock this file for editing while other\n // resources are trying to use it. We check to make sure it\n // is not already disposed of, and then we call the close()\n // method.\n if (bWriter != null) {\n bWriter.close();\n }\n\n if (fWriter != null) {\n fWriter.close();\n }\n }\n // Our final catch reveals any errors that popped up when we were\n // attempting to close the writer and buffer objects.\n catch (Exception e)\n {\n System.out.println(\"Unable to close writer objects :\"\n + e.getMessage());\n }\n }\n }",
"public void open(){\n try {\n output = new BufferedWriter(new FileWriter(training_path, true));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void main(String[] args) throws IOException {\n String param1, param2, param3;\n BufferedReader r1 = new BufferedReader(new InputStreamReader(System.in));\n param1 = r1.readLine();\n param2 = r1.readLine();\n param3 = r1.readLine();\n FileOutputStream fileOutputStream = new FileOutputStream(param1);\n FileInputStream fileInputStream2 = new FileInputStream(param2);\n FileInputStream fileInputStream3 = new FileInputStream(param3);\n while (fileInputStream2.available() > 0){\n int data = fileInputStream2.read();\n fileOutputStream.write(data);\n }\n while (fileInputStream3.available() > 0){\n int data = fileInputStream3.read();\n fileOutputStream.write(data);\n }\n fileInputStream2.close();\n fileInputStream3.close();\n fileOutputStream.close();\n }",
"public String VerticalOp(String name) {\n String line;\n try {\n BufferedReader br = new BufferedReader(new FileReader(file1));\n BufferedReader br2 = new BufferedReader(new FileReader(file2));\n BufferedWriter bw = new BufferedWriter(new FileWriter(name));\n\n do{\n line = br.readLine();\n bw.write(line);\n }while(line != null);\n\n do{\n line = br2.readLine();\n bw.write(line);\n }while(line != null);\n bw.flush();\n }\n catch(FileNotFoundException e) {\n System.out.println(\"ERROR: File does not exist. Please input a valid input file.\");\n }\n catch(IOException e) {\n System.out.println(\"ERROR: Failure while reading from file.\");\n }\n ++mProcCount;\n return name;\n }",
"public static void main(String[] args) throws Exception {\n\t\t\n\t\tPrintWriter pw = new PrintWriter(new FileWriter(\"first.txt\"));\n\t\tpw.println(\"Happy Birthday...\");\n\t\tpw.println(\"Smoking is injurious to health.\");\n\t\tpw.println(\"Hows you doing..\");\n\t\tpw.println(\"Dont be fool..\");\n\t\tpw.flush();\n\t\t\n\t\tFileReader fr = new FileReader(\"first.txt\");\n\t\tBufferedReader br = new BufferedReader(fr);\n\t\t\n\t\tBufferedWriter bwn = new BufferedWriter(new FileWriter(\"Second.txt\",true));\n\t\t\n\t\tString s = br.readLine(); // Reading line of First.txt and storing into String \n\t\t // This String pass into Second.txt write() method to write in Second.txt\n\t\twhile(s!=null) {\n\t\t\tbwn.write(s); // Writing first.txt line in Second.txt file // This Step is important\n\t\t\tbwn.newLine();\n\t\t\ts=br.readLine();\n\t\t}\n\t\tbwn.flush();\n\t\t\n\t}",
"public static void write2File(String fileName) throws IOException{\n BufferedWriter output = null;\n try {\n File file = new File(fileName);\n output = new BufferedWriter(new FileWriter(file));\n for(BufferIOIntercept ob : bufferIOList){\n \n output.write(ob.op + \",\" + ob.strategy + \",\" + ob.numberBte + \",\" + ob.blkSize + \",\" + ob.time + \"\\n\");\n }\n } catch ( IOException e ) {\n e.printStackTrace();\n } finally {\n if ( output != null ) output.close();\n }\n }",
"public static void main(String[] args) throws IOException {\n\t\tString line = new String(Files.readAllBytes(Paths.get(\"input.txt\")));\n\t\t\n\t\tFiles.write(Paths.get(\"outputh.txt\"), getOutput(line).getBytes(), StandardOpenOption.CREATE);\n\t\t\n\t}",
"public void write(String fileNameIn, String fileNameOut, String encoding) {\n StringBuilder sb = new StringBuilder();\n try {\n BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(new File(fileNameIn).getAbsoluteFile()), encoding));\n FileWriter out = new FileWriter(new File(fileNameOut).getAbsoluteFile());\n try {\n String s;\n String[] arr;\n int readLineCount = 0; //读取行数\n while ((s=in.readLine()) != null) {\n sb.append(s);\n sb.append(LINE_BREAK);\n readLineCount++;\n if (readLineCount >= 1000) { //当读到1000行时,执行写操作,然后清空sb\n out.write(sb.toString());\n sb.delete(0, sb.length());\n readLineCount = 0;\n }\n }\n if (readLineCount > 0) { //当跳出循环,读取行数显示大于0时,执行写操作,然后清空sb\n out.write(sb.toString());\n sb.delete(0, sb.length());\n readLineCount = 0;\n }\n } finally {\n out.close();\n in.close();\n }\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public void copiarFicheros(BufferedWriter bw, BufferedReader br) throws IOException {\n String linea = br.readLine();\n while (linea != null) {\n\n bw.write(linea);\n\n linea = br.readLine();\n }\n bw.flush();\n }",
"public static void main(String[] args) throws IOException {\n\t\tBufferedReader br = null;\n\t\tPrintWriter pw = null;\n\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(\"Input.txt\"));\n\t\t\tpw = new PrintWriter(new FileWriter(\"Output.txt\"));\n\t\t\tString str;\n\t\t\twhile ((str = br.readLine()) != null) {\n\t\t\t\t\n\t\t\t\tpw.println(str+\"|\");\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(e.toString());\n\t\t} finally {\n\t\t\tbr.close();\n\t\t\tpw.close();\n\t\t}\n\t}",
"public Game(BufferedReader in, PrintWriter out) {\n \tthis.in= in;\n \tthis.out =out;\n}",
"private void copyFile(InputStream ins, OutputStream outs) throws IOException {\n byte[] buffer = new byte[1024];\n int read;\n while((read = ins.read(buffer)) != -1) {\n outs.write(buffer, 0, read);\n }\n }",
"public static void main(String[] args) throws IOException {\n BufferedReader in = new BufferedReader(new FileReader(\"cave.in\"));\n PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(\"cave.out\")));\n new cave(in, out);\n in.close();\n out.close();\n }",
"public static void main(String[] args) throws IOException {\n\t\ttry {\n\t\t\tFileReader inReader=new FileReader(\"C:\\\\Users\\\\LavanyaKantamani\\\\Desktop\\\\Reader.txt\");\n\t\t\tFileWriter outWriter=new FileWriter(\"C:\\\\Users\\\\LavanyaKantamani\\\\Desktop\\\\HelloWorldWriter.txt\");\n\t\t\tint d;\n\t\t\twhile((d=inReader.read())!=-1) {\n\t\t\t\toutWriter.write(d);\n\t\t\t}\n\t\t}catch(FileNotFoundException e) {\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t}",
"public ThingToWriteFile(String filename) { \n\t\ttry { \t\n\t\t\tout = new BufferedWriter(new FileWriter(filename));\n\t\t}\n\t\tcatch (FileNotFoundException ee){\n\t\t\tSystem.out.println(\"File \" + filename + \" not found.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File \" + filename + \" cannot be read.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}",
"public void fileWriterReader() throws Exception {\n\t\tFileReader fr = new FileReader(\"C:\\\\Users\\\\rbajya.ORADEV\\\\Desktop\\\\Testing.txt\");\n//\t\tchar [] arr = {};\n//\t\tfr.read(arr);\n//\t\tSystem.out.println(Arrays.toString(arr));\n\t\t\n\t\tint i=0;\n\t\twhile((i=fr.read())!=-1){\n\t\t\tchar ch = (char)i;\n\t\t\tif(ch=='\\n'){\n\t\t\t\tSystem.out.print(ch);\n\t\t\t}else if(ch=='/'){\n\t\t\t\tchar ch1 = (char)fr.read();\n\t\t\t\tif(ch1=='/'){\n\t\t\t\t\tSystem.out.print(\"//\");\n\t\t\t\t\tint j=0;\n\t\t\t\t\twhile((j=fr.read())!=-1){\n\t\t\t\t\t\tSystem.out.print((char)j);\n\t\t\t\t\t\tif((char)j=='\\n'){\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse if(ch1=='*'){\n\t\t\t\t\tSystem.out.print(\"/*\");\n\t\t\t\t\tint j=0;\n\t\t\t\t\twhile((j=fr.read())!=-1){\n\t\t\t\t\t\tSystem.out.print((char)j);\n\t\t\t\t\t\tif((char)j=='*'){\n\t\t\t\t\t\t\tint k = fr.read();\n\t\t\t\t\t\t\tif('/'==(char)k){\n\t\t\t\t\t\t\t\tSystem.out.println(\"/\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tSystem.out.println((char)k);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tSystem.out.print(' ');\n\t\t\t}\n\t\t}\n\t\t\n\t}",
"private static void prepareOutputFile() {\n try {\n outputFileBuffer = new BufferedWriter(new FileWriter(PATH+OUTPUT_FILE_NAME));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public Reading1(BufferedReader in, PrintStream out) { // agrego al constructor conversation\n\t\tthis.in = in;\n\t\tthis.out = out;\n\t}",
"public static void main(String[] args) throws IOException{\n\t\tBufferedReader in =new BufferedReader(new FileReader(input));\r\n\tPrintWriter out = new PrintWriter(new FileWriter(output));\r\n\t\t\r\n\t\tint t = Integer.parseInt(in.readLine());\r\n\t\t\r\n\t\tfor(int i=1; i<=t; i++){\r\n\t\t\tout.print(\"Case #\"+i+\": \");\r\n\t\t\tint n = Integer.parseInt(in.readLine());\r\n\t\t\toneTest(n, in, out);\r\n\t\t\tout.println();\r\n\t\t}\r\n\t\tout.flush();\r\n\t}",
"@Test\n\tpublic void prepSourceFile() throws Exception {\n\t\t\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(\"source/source.txt\"));\n\t\tfor (int i = 0; i < 125; i++) {\n\t\t\tBufferedReader br = new BufferedReader(new FileReader(\"source/small-source.txt\"));\n\t\t\tfor (int j = 0; j < 80000; j++) {\n\t\t\t\tbw.write(br.readLine() + \"\\n\");\t\t\n\t\t\t}\n\t\t\tbr.close();\n\t\t}\n\t\tbw.close();\n\t}",
"public String VerticalOp() {\n String line;\n try {\n BufferedReader br = new BufferedReader(new FileReader(file1));\n BufferedReader br2 = new BufferedReader(new FileReader(file2));\n BufferedWriter bw = new BufferedWriter(new FileWriter(\"output\" + mProcCount + extension));\n\n do{\n line = br.readLine();\n bw.write(line);\n }while(line != null);\n\n do{\n line = br2.readLine();\n bw.write(line);\n bw.newLine();\n }while(line != null);\n bw.flush();\n }\n catch(FileNotFoundException e) {\n System.out.println(\"ERROR: File does not exist. Please input a valid input file.\");\n }\n catch(IOException e) {\n System.out.println(\"ERROR: Failure while reading from file.\");\n }\n ++mProcCount;\n return \"output\" + mProcCount + extension;\n }",
"public static void main(String [] args){\n writeFile1(\"1234567890987654321\");\n }",
"private void merge(Scanner file1, Scanner file2, BufferedWriter writer) throws IOException {\n double value1 = file1.nextDouble();\n double value2 = file2.nextDouble();\n\n while (value1 != Double.POSITIVE_INFINITY || value2 != Double.POSITIVE_INFINITY) {\n if (value1 <= value2) {\n writer.write(value1 + \" \");\n value1 = file1.hasNextDouble() ? file1.nextDouble() : Double.POSITIVE_INFINITY;\n } else {\n writer.write(value2 + \" \");\n value2 = file2.hasNextDouble() ? file2.nextDouble() : Double.POSITIVE_INFINITY;\n }\n }\n }",
"private void writeTest1File1() throws IOException{\n fillFile(1, true);\n }",
"private static void merge(String[] inFiles, String mergedFile){\n \n List<BufferedReader> readers = new ArrayList<BufferedReader>();\n //create list of Readers for all files \n for (int i = 0; i < inFiles.length; ++i) \n {\n try {\n BufferedReader bfr = new BufferedReader(new FileReader(inFiles[i]));\n readers.add(bfr); \n }\n catch (FileNotFoundException ex){ \n System.out.println(\"ERROR: File \" + inFiles[i] + \" was not found.\");\n }\n catch (Exception ex){ \n System.out.println(\"ERROR: Could not open \" + inFiles[i] + \".\");\n }\n }\n \n StringBuilder sb = new StringBuilder(); \n boolean stop = false;\n \n //read lines from each file simultaneously \n //and store them in string\n //until there are no more lines in any file \n while (!stop) { \n int emptyFile = 0; //number of files whose all lines have been read\n for (BufferedReader reader: readers)\n {\n try { //read one line from all files\n String line = reader.readLine(); \n if (line == null) \n emptyFile++; \n else {\n sb.append(line);\n sb.append(System.getProperty(\"line.separator\"));\n }\n }\n catch (IOException ex) {\n System.out.println(\"Error reading line.\");\n }\n }\n //stop when all lines from all files have been read\n if (emptyFile == readers.size()) \n stop = true;\n }\n \n //write the lines read from input files into destination file\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(mergedFile));\n writer.write(sb.toString()); \n try {\n writer.close();\n } \n catch(IOException ie) { }\n }\n catch (IOException ex) {\n System.out.println(\"ERROR: Could not open \" + mergedFile + \".\");\n }\n \n }",
"public static void WriteFile()throws java.io.FileNotFoundException,java.io.IOException\n {\n FileOutputStream out1= new FileOutputStream(\"Sample.bin\") ; \n String ab=\"Welcome to sample file\";\n out1.write(ab.getBytes());\n out1.flush();\n out1.close();\n }",
"public void mergeFiles(File fichero1, File fichero2, File destino) throws IOException {\n String choice = \"\";\n try (BufferedReader bfr1 = new BufferedReader(new FileReader(fichero1));\n BufferedReader bfr2 = new BufferedReader(new FileReader(fichero2));) {\n\n if (destino.exists()) {\n System.out.print(\"Ya existe el fichero de destino ¿Deseas sobreescribirlo?Escribe si o no: \");\n choice = Utils.getString();\n }\n if (choice.equalsIgnoreCase(\"si\")) {\n BufferedWriter bw = new BufferedWriter(new FileWriter(destino));\n copiarFicheros(bw, bfr1);\n copiarFicheros(bw, bfr2);\n }\n\n } catch (IOException ex) {\n System.out.println(\"Ha ocurrido un error inesperado vuelve a intentarlo\");\n }\n }",
"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 out.write(line);\n }\n //Close the output stream\n out.close();\n }\n catch (Exception e){//Catch exception if any\n System.err.println(\"Error: \" + e.getMessage());\n }\n }",
"public static void main(String[] args) throws IOException {\n\r\n\t\t\r\n\t\tString file = \"data/example.txt\";\r\n\t\t\r\n\t\t\r\n\t\t//2. Create object of FileWrite\r\n\t\t\r\n\t\tFileWriter fw = new FileWriter (file);\r\n\t\t\r\n\t\tfw.write(\"This is my example file\");\r\n\t\t\r\n\t\t//3. you have to close the file.\r\n\t\t\r\n\t\tfw.close();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public static void main(String[] args) {\r\n\r\n FileReadWrite frw = new FileReadWrite(\"ReadFromFile.txt\", \"OutputFile.txt\");\r\n try {\r\n frw.readAndWriteFile();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }",
"public CLI(BufferedReader in, Writer out) {\n\t\t_in = in;\n\t\t_out = out;\n\t}",
"public static void appendFile(PrintWriter pw, String file) throws IOException {\n\t\tfw = new FileWriter(file, true);\n\t\tmyFile = new File(file);\n\t\t//allows me to read file\n\t\tinFile = new Scanner(myFile);\n\t\t\n\t}",
"public static void main(String[] args) \r\n\t {\n\t FileInputStream ins = null;\r\n\t FileOutputStream outs = null;\r\n\t \r\n\t try\r\n\t {\r\n\t \t //input file -->abc.txt\r\n\t File infile =new File(\"C:\\\\Users\\\\omsai\\\\Desktop\\\\abc.txt\");\r\n\t \r\n\t //output file -->outfile\r\n\t File outfile =new File(\"C:\\\\Users\\\\omsai\\\\Desktop\\\\copy.txt\");\r\n\t \r\n\t ins = new FileInputStream(infile);\r\n\t outs = new FileOutputStream(outfile);\r\n\t \r\n\t byte[] buffer = new byte[1024];\r\n\t int length;\r\n\t \r\n\t //copy contents of inputfile to output file\r\n\t while ((length = ins.read(buffer)) > 0) {\r\n\t outs.write(buffer, 0, length);\r\n\t } \r\n\t \r\n\t //close input and output files\r\n\t ins.close();\r\n\t outs.close();\r\n\t \r\n\t \r\n\t System.out.println(\"File copied successfully!!\");\r\n\t } \r\n\t \r\n\t catch(IOException ioe) \r\n\t {\r\n\t ioe.printStackTrace();\r\n\t } \r\n\t }",
"public static void main(String[] args) {\n\t\tFile myFile = new File(\"newfile.txt\");\n\t\t/*try {\n\t\t\tboolean isCreated = myFile.createNewFile();\n\t\t\tif(isCreated) {\n\t\t\t\tSystem.out.println(\"Your file is created\");\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"File wasn't created, or it's already there\");\n\t\t\t}\n\t\t} catch (FileNotFoundException fnf){\n\t\t\tfnf.printStackTrace();\n\t\t} catch (IOException ioe) {\n\t\t\tioe.printStackTrace();\n\t\t} */\n\t\t\n\t\t////////////////////// WRITE TO A FILE //////////////////////////////\n\t\t/*\n\t\t * \n\t\t */\n\t\ttry{\n\t\t byte[] writeArr = {1,2,3,4,5};\n\t\t FileWriter os = new FileWriter(\"newfile.txt\");\n\t\t for(int i = 0; i < writeArr.length ; i++){\n\t\t os.write( writeArr[i] ); \n\t\t }\n\t\t os.close();\n\t\t \n\t\t \n\t\t FileReader is = new FileReader(\"newfile.txt\");\n\t\t BufferedReader bfr = new BufferedReader((is));\n\t\t bfr.readLine()\n\t\t int size = is.available();\n\t\t \n\t\t for(int i=0; i< size; i++){\n\t\t System.out.print(is.read() + \" \");\n\t\t }\n\t\t is.close();\n\t\t }catch(IOException e){\n\t\t System.out.print(\"Exception\");\n\t\t }\t\n\t\t\n\t\t\n\n\t}",
"static void readWrite(FileInputStream raf,BufferedOutputStream bw, long numBytes) throws IOException {\n byte[] buf = new byte[(int) numBytes];\n int val = raf.read(buf);\n if(val != -1) {\n\n bw.write(buf);\n bw.flush();\n }\n else {\n \tSystem.out.println(\"Error read\");\n }\n}",
"public void convert(File infile, File outfile) throws IOException, ParseException, NumberFormatException,\n java.text.ParseException {\n outfile = outfile.getAbsoluteFile();\n if (outfile.isDirectory()) {\n outfile = new File(outfile, \"sampletab.pre.txt\");\n }\n \n if (!outfile.getParentFile().exists()) {\n outfile.getParentFile().mkdirs();\n }\n \n convert(infile, new FileWriter(outfile));\n }",
"private static BufferedWriter createFileWriter(String filePath) {\n String[] pathComponents = filePath.split(\"/data/\");\n //to avoid heavy nesting in output, replace nested directory with filenames\n\n String output = pathComponents[0] + \"/out/rule_comparisons/\" + pathComponents[1].replace(\"/\",\"-\");\n\n File file = new File(output);\n try {\n //create file in this location if one does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n return new BufferedWriter(new FileWriter(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }",
"public static void main(String[] args) throws IOException {\n\t\tFile file = new File(\"fileAAA.txt\");\r\n\t\tPrintWriter output = new PrintWriter(file);\r\n\t\t\r\n\t\t//write name and age to file\r\n\t\toutput.println(\"Homer Akin\");\r\n\t\toutput.println(49);\r\n\t\toutput.close();\r\n\t\t\r\n\t\tScanner input = new Scanner(file);\r\n\t\tString name = input.nextLine();\r\n\t\tint age = input.nextInt();\r\n\t\t\r\n\t\tSystem.out.printf(\"Name: %s \\nAge : %d\",name, age);\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public void readFile();",
"private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }",
"@Test\n\tvoid test() throws IOException\n\t{\n\t\t\tFile f1=new File(\"testcase1.txt\");\n\t\t\tf1.createNewFile();\n\t\t\tFileWriter fileWriter;\n\t\t\tfileWriter = new FileWriter(f1.getPath());\n\t\t\tString str1=\"I am a test string and number one two three four five six seven eight nine ten eleven twelve.\";\n\t\t\tfileWriter.write(str1);\n\t\t fileWriter.close();\n\n\t\t /**\n\t\t * TO-DO\n\t\t * call formatter to get actual.txt\n\t\t */\n\t\t \n\t\t File f2=new File(\"expected1.txt\");\n\t\t\tf2.createNewFile();\n\t\t\tFileWriter fileWriter2 = new FileWriter(f2.getPath());\n\t\t\tString str2=\"I am a test string and number one two three four five six seven eight nine ten\\neleven twelve.\";\n\t\t\tfileWriter2.write(str2);\n\t\t fileWriter2.close();\n\t\t \t\t \n\t\t\tassertFalse(equalFile(\"testcase1.txt\",\"expected1.txt\"));\t\n\t}",
"@Test\n void fileWriter() {\n\n\n ArrayList<String> fileLines = Name_Sorter.fileRead(this.readFile, \"src/main/java/oop/assignment3/ex41/base/testFile-ex41\");\n Collections.sort(fileLines);\n this.writeFile = Name_Sorter.fileWriter(this.writeFile, fileLines, \"src/main/java/oop/assignment3/ex41/base/ex41-testOutputFile.txt\");\n boolean actualOutput = this.writeFile != null;\n Assertions.assertTrue(actualOutput);\n }",
"public static void main(String[] args) throws IOException {\n\t\tString FinalContigWritePath = args[0];\n\t\tString ContigAfterPath = args[1];\n\t\tString DataName = args[2];\n\t\tString RealString = CommonClass.readContigFile(ContigAfterPath);\n\t\t//Write.\n\t\tFileWriter writer1 = new FileWriter(FinalContigWritePath + \"contig.\" + DataName + \".changgeLines.fa\", true);\n\t\twriter1.write(RealString);\n\t\twriter1.close();\n\t\tSystem.out.println(\"File write process end!\");\n\t}",
"private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }",
"public static void main(String[] args) throws IOException {\n PrintWriter outputFile = new PrintWriter(\"ResultFile.txt\");\n\n outputFile.println(\"Line 1\");\n outputFile.println(\"Line 2\");\n outputFile.println(\"Line 3\");\n outputFile.println(\"Line 4\");\n\n\n outputFile.close();\n\n }",
"public static void main(String[] args) throws IOException {\n\t\tFileWriter fw = new FileWriter(\"C:\\\\Users\\\\shami\\\\OneDrive\\\\Desktop\\\\WriteData.txt\");\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(\"Hello I am Working\");\n\t\tbw.write(\"Hello I am Sleeping\");\n\t\tSystem.out.println(\"Hey Done\");\n\t\tbw.close();\n\t\t\n\n\t}",
"public void readAndWriteExample(){\n\t\tSystem.out.println(\"********************Read from a file in same package********************\");\n\t\tURL url = this.getClass().getResource(\"test2.txt\"); //Letar upp om det finns något som heter test.text bland mina filer\n\t\tFile f;\n\t\ttry {\n\t\t\tf = new File(url.toURI());\n\t\t\tif (f.exists()){\n\t\t\t\tSystem.out.println(url.toURI()+\"THE file: \"+ f.getName()+ \"and has the path: \"+ f.getAbsolutePath() );\n\t\t\t\tScanner s = new Scanner(f);\n\t\t\t\twhile (s.hasNext()){ // Read as long as there is anything to read;\n\t\t\t\t\tString string = s.nextLine();\n\t\t\t\t\tSystem.out.println(string);\n\t\t\t\t}\n\t\t\t\ts.close();\n\t\t\t}\n\t\t} catch (Exception e1) {\n\t\t\tSystem.out.println(\"No file found\");\n\t\t}\n\t\t\n\t\t\n\t\t//Read from the net\n\t\tSystem.out.println(\"********************Read from the net********************\");\n\t\ttry {\n\t\t\t\tURL mah = new URL(\"http://www.mah.se\");\n\t\t\t\tScanner s = new Scanner(mah.openStream());\n\t\t\t\twhile (s.hasNext()){\n\t\t\t\t\tString string = s.nextLine();\n\t\t\t\t\tSystem.out.println(string);\n\t\t\t\t}\n\t\t\t\ts.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t//Write to a local file\n\t System.out.println(\"********************Write to a local file********************\");\n\t\tURL url2 = this.getClass().getResource(\"test2.txt\");\n\t\tSystem.out.println(url2.getPath());\n\t\t\n\t\tFile f2;\n\t\t\ttry {\n\t\t\t\tf2 = new File(\"src/se/mah/k3/pfi2/lecture7/Test3.txt\");\n\t\t\t\tSystem.out.println(\"PATH: \"+ f2.getAbsolutePath());\n\t\t\t\tif (!f2.exists()){\n\t\t\t\t\tf2.createNewFile();\n\t\t\t\t}\n\t\t\t\tPrintWriter pw = new PrintWriter(f2);\n\t\t\t\tpw.println(\"Skriver till filen\");\n\t\t\t\tpw.println(\"Skriver till filen igen\");\n\t\t\t\tpw.close(); //Stänger filen\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t}",
"static void readWrites(FileInputStream raf,BufferedOutputStream bw, int numBytes,int indice) throws IOException {\n\n // System.out.println(\"frag num \"+ indice +\" Envoyé\");\n int nbsousfrag = numBytes/taillesousfrag; \n System.out.println(\"nombre des sous fragements : \" + nbsousfrag);\n int sousfragrest = numBytes % taillesousfrag;\n System.out.println(sousfragrest);\n for (int i=0; i < nbsousfrag; i++) { \n\t readWrite(raf,bw, taillesousfrag);\n \t System.out.println(\"sous frag num \"+ i +\" Envoyé\");\n\t}\n if (sousfragrest != 0) {\n\t\treadWrite(raf,bw, sousfragrest);\t\n\t}\n\n}",
"public static void main(String[] args) throws IOException {\n FileWriter fw = new FileWriter(new File(\"src/output_files/threesumA.txt\"));\n StringBuilder sb = new StringBuilder();\n // the rest input files\n String[] inputFiles = {\"src/input_files/8ints.txt\", \"src/input_files/1Kints.txt\", \"src/input_files/2Kints.txt\",\n \"src/input_files/2Kints.txt\", \"src/input_files/4Kints.txt\", \"src/input_files/8Kints.txt\",\n \"src/input_files/16Kints.txt\", \"src/input_files/32Kints.txt\"};\n int i = 8;\n for (String file : inputFiles) {\n In in = new In(file);\n int[] a = in.readAllInts();\n long startTime = System.nanoTime();\n int result = count(a);\n long elapsedTime = System.nanoTime() - startTime;\n sb.append(String.format(\"%d %d\\n\", i, elapsedTime));\n System.out.println(result);\n if (i == 8) {\n i = 1000;\n } else {\n i *= 2;\n }\n }\n fw.write(sb.toString());\n fw.close();\n }",
"public static void main(String[] args) throws IOException {\n\n\t\t\n\t\tFileReader fr = new FileReader(\"G:\\\\buf.txt\");\n\t\t\n\t\tMyBufferedReader bufr = new MyBufferedReader(fr);\n\t\t\n\t\tString len = null;\n\t\t\n\t\twhile((len = bufr.myReadLine()) != null){\n\t\t\tSystem.out.println(len);\n\t\t}\n\t\t\n\t\tbufr.myclose();\n\t}",
"public void fileReaderWriterExample() throws IOException {\n\t\t\n\t\ttry {\n\t\t\t fr = new FileReader(FILE_NAME);\n\t\t\t fw = new FileWriter(\"files/myfile.upper.csv\");\n\t\t\t \n\t\t\t int buffer;\n\t\t\t \n\t\t\t while((buffer = fr.read()) != -1) {\n\t\t\t\t if(Character.isLowerCase(buffer)) {\n\t\t\t\t\t fw.write(buffer - 32);\n\t\t\t\t } else {\n\t\t\t\t\t fw.write(buffer);\n\t\t\t\t }\n\t\t\t }\n\t\t} finally {\n\t\t\tfr.close();\n\t\t\tfw.close();\n\t\t}\n\t}",
"public void bufferedReaderWriterExample() throws IOException {\n\t\t\n\t\ttry {\n\t\t\tbr = new BufferedReader(new FileReader(FILE_NAME));\n\t\t\tbw = new BufferedWriter(new FileWriter(\"files/myfile.writer.csv\"));\n\t\t\t\n\t\t\tString line = \"\";\n\t\t\t\n\t\t\twhile((line = br.readLine()) != null) {\n\t\t\t\tbw.write(line.replaceAll(\"a\", \"REDACTED\") + \"\\n\");\n\t\t\t}\n\t\t} finally {\n\t\t\tbr.close();\n\t\t\tbw.close();\n\t\t}\n\t}",
"public void make(String readFileName, String writeFileName) throws IOException {\n try (BufferedWriter bw = new BufferedWriter(new FileWriter(writeFileName, append));\n BufferedReader br = new BufferedReader(new FileReader(readFileName))) {\n String expression;\n double res;\n while((expression=br.readLine())!=null){\n try {\n res = function.calculate(expression);\n bw.write(makeAnswer(expression, res));\n } catch (Exception ex) {\n bw.write(ex.getMessage());\n }\n bw.newLine();\n }\n }\n }",
"public void copy(String file1, String file2) throws FileNotFoundException{\r\n\t\tFile original = new File(file1);\r\n\t\tFile copied = new File(file2);\r\n\t\t\r\n\t\tScanner input = new Scanner(original);\r\n\t\tPrintWriter output = new PrintWriter(copied);//writes new file\r\n\t\t\r\n\t\twhile(input.hasNextLine()){\r\n\t\t\tString next = input.nextLine();\r\n\t\t\toutput.println(next);\t\t\t\r\n\t\t}\r\n\t\toutput.close();\r\n\t\tinput.close();\r\n\t}",
"public static void main(String[] args) throws IOException {\n // Use try-with-resources so that stream is handled correctly\n try (FileWriter writer = new FileWriter(\"file.txt\")) {\n writer.write(\"Hello world!\\n\");\n writer.write(\"I am writing to a text file :)\\n\");\n writer.flush();\n }\n\n // try-with-resources can manage multiple streams\n try (\n FileReader reader = new FileReader(\"file.txt\");\n // BufferedReader allows reading line by line\n BufferedReader bufferedReader = new BufferedReader(reader)\n ) {\n while (bufferedReader.ready()) {\n String line = bufferedReader.readLine();\n System.out.println(line);\n }\n }\n }",
"public void blankremover(String args) {\r\n\r\n Scanner file;\r\n PrintWriter writer;\r\n\r\n try {\r\n\r\n file = new Scanner(new File(args));\r\n writer = new PrintWriter(\"gpstest100.txt\");\r\n\r\n while (file.hasNext()) {\r\n String line = file.nextLine();\r\n if (!line.isEmpty()) {\r\n writer.write(line);\r\n writer.write(\"\\n\");\r\n }\r\n }\r\n\r\n file.close();\r\n writer.close();\r\n\r\n } catch (FileNotFoundException ex) {\r\n //Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);\r\n \t \r\n } \r\n \r\n}",
"private static void copyFile(File in, File out)\n\t{\n\t\ttry\n\t\t{\n\t\t\tFileChannel inChannel = new\tFileInputStream(in).getChannel();\n\t\t\tFileChannel outChannel = new FileOutputStream(out).getChannel();\n\t\t\tinChannel.transferTo(0, inChannel.size(), outChannel);\n\t\t\tinChannel.close();\n\t\t\toutChannel.close();\t\t\t\n\t\t} catch (Exception e)\n\t\t{\n\t\t\tDebug.e(\"RFO.copyFile(): \" + e);\n\t\t}\n\n\t}",
"public void testIO() throws FileNotFoundException, IOException {\n OutputStream output = new BufferedOutputStream(new FileOutputStream(\"testAlphabet.bin\"));\n this.write(output);\n output.close();\n InputStream input = new BufferedInputStream(new FileInputStream(\"testAlphabet.bin\"));\n Alphabet a = new Alphabet();\n a = read(input);\n input.close();\n if (this.DEBUG_compare(a)) {\n System.out.println(\"the two alphabets are the same : true\");\n } else {\n System.out.println(\"the two alphabets are the same : false\");\n }\n }",
"void run() throws IOException {\n\r\n\t\treader = new BufferedReader(new FileReader(\"input.txt\"));\r\n\r\n\t\tout = new PrintWriter(new FileWriter(\"output.txt\"));\r\n\t\ttokenizer = null;\r\n\t\tsolve();\r\n\t\treader.close();\r\n\t\tout.flush();\r\n\r\n\t}",
"void encryptFile(String inPath, String outPath) throws IOException {\n try (BufferedReader reader = new BufferedReader(new FileReader(inPath))) {\n try (PrintWriter writer = new PrintWriter(outPath)) {\n encryptFile(reader, writer);\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Output file not found\");\n }\n } catch (FileNotFoundException e) {\n System.out.println(\"Error: Input file not found\");\n }\n }",
"public static void main (String args[]) {\n \n int i=0, j=0;\n Character ch;\n Character ch1, ch2;\n ch1 = new Character(' ');\n ch2 = new Character('-');\n // FileReader fr = new FileReader(\"test.txt\");\n //FileWriter fw = new FileWriter(\"test-modify2.txt\");\n /* \n if(args.length !=2 ) {\n System.out.println(\"Usage: CopyFiles fl to f2\");\n return;\n }\n */\n try(BufferedReader br = new BufferedReader (new FileReader(\"test.txt\"));\n BufferedWriter bw = new BufferedWriter(new FileWriter(\"test-modify2.txt\"))) { \n \n //TODO Read while not meet space\n do {\n i = br.read();\n ch = (char)i;\n if ( ch.equals(ch1) ) {\n ch = ch2;\n bw.write(ch);\n //Write to output file\n //System.out.print(ch);\n } else { \n // Write to output file\n bw.write(ch);\n \n }\n //System.out.println(ch);\n } while (i != -1 );\n \n \n } catch (FileNotFoundException ex) {\n ex.printStackTrace();\n Logger.getLogger(CopyWithReplace.class.getName()).log(Level.SEVERE, null, ex);\n \n } catch (IOException ex) {\n ex.printStackTrace();\n Logger.getLogger(CopyWithReplace.class.getName()).log(Level.SEVERE, null, ex);\n } \n \n }",
"void citire(FileReader f);",
"public void FilesBufferWrite2Append() throws IOException {\n \ttry { \t\n \t\t\n \t \t/* This logic will check whether the file\n \t \t \t * exists or not. If the file is not found\n \t \t \t * at the specified location it would create\n \t \t \t * a new file*/\n \t \t \tif (!file.exists()) {\n \t \t\t file.createNewFile();\n \t \t \t}\n \t\t\n \t \t \t//KP : java.nio.file.Files.write - NIO is buffer oriented & IO is stream oriented!]\n \t\tString str2Write = \"\\n\" + LocalDateTime.now().toString() + \"\\t\" + outPrintLn + \"\\n\";\n \t\tFiles.write(Paths.get(outFilePath), str2Write.getBytes(), StandardOpenOption.APPEND);\n \t\t\n \t}catch (IOException e) {\n\t \t// TODO Auto-generated catch block\n\t \te.printStackTrace();\t\t\n\t\t\tSystem.out.print(outPrintLn);\n\t\t\tSystem.out.println(outPrintLn);\t\n \t}\n }",
"private static void generateForSingleFile() throws IOException {\n\t\tBufferedWriter out = new BufferedWriter(new FileWriter(singlePatternPath+ filename));\n\t\t\n\t\tIterator iter = countOne.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\tif(out!=null)\n\t\t\tout.close();\n\t\t\n\t\t\n\t\tBufferedWriter out1 = new BufferedWriter(new FileWriter(newSinglePatternPath+filename));\n\t\titer = countTwo.entrySet().iterator();\n\t\twhile(iter.hasNext()) {\n\t\t\tMap.Entry entry = (Entry) iter.next();\n\t\t\tInteger value = (Integer) entry.getValue();\n\t\t\tSequencePair key = (SequencePair) entry.getKey();//System.out.println(\"current\" + \"[\" + key.firstSeq +\":\"+key.secondSeq +\"]\" + \" ; \"+ value);\n\t\t\tout1.write(\"[\" + key.firstSeq + \":\" + key.secondSeq + \"]\" +\":\" +value + \"\\n\");\n\t\t}\n\t\t \n\t\tif(out1!=null)\n\t\t\tout1.close();\n\t}",
"public void setupFiles() {\n File inputDataFile = new File(inputFileName);\n try {\n inputFile = new Scanner(inputDataFile);\n FileWriter outputDataFileOA = new FileWriter(outputFileNameOA);\n FileWriter outputDataFileLL = new FileWriter(outputFileNameLL);\n outputFileOA = new PrintWriter(outputDataFileOA);\n outputFileLL = new PrintWriter(outputDataFileLL);\n outputFileOA.println(\"Output from open addressing hash table:\");\n outputFileOA.println();\n outputFileLL.println(\"Output from linked list hash table:\");\n outputFileLL.println();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }",
"public static void fileWriter(String fileName, Object printLine) throws NumberFormatException, IOException {\n // Create File:\n\t\t\t\tFile f = new File(Common.testOutputFileDir + fileName);\t\t\t\t \n\t\t\t // Write or add a String line into File:\t\n\t\t\t FileWriter fw = new FileWriter(f,true);\n\t\t\t PrintWriter pw = new PrintWriter(fw);\n\t\t\t pw.println(printLine);\n\t\t\t pw.close();\n\t\t\t}",
"public static BufferedWriter Writer(String path) throws IOException\n\t{\n\t\treturn new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path),\"UTF-8\"));\n\t}",
"public static void main(String[] args) throws IOException {\r\n\t\t\r\n\t\ttry {\r\n\t\tString inputfile = args[0]+\".txt\";\r\n\t\tString outputfile = args[1]+\".txt\";\r\n\t\tString outputfile2 = args[2]+\".txt\";\r\n\r\n\r\n\r\n\t\tFileInputStream textFile1 = new FileInputStream(inputfile);\r\n\t\tScanner scan = new Scanner(textFile1);\r\n\t\tBinaryTree bst = new BinaryTree();\r\n\t\t\r\n\t\t//reading input files and storing\r\n\t\twhile(scan.hasNextLine()){\r\n\t\t\t\r\n\t\tString s = scan.nextLine();\r\n\t\tchar code=s.charAt(0);\r\n\t\tint id = Integer.parseInt(s.substring(1, 8));\r\n\t\t\tString nah=s.substring(8,8+25);\r\n\t\t\tString name= nah.trim();\r\n\t\t\tString department=s.substring(33,37);\r\n\t\t\tString program=s.substring(37,40);\r\n\t\t\tchar year=s.charAt(41);\r\n\t\t\tNode n= new Node();\r\n\t\t\tStudent stu = new Student();\r\n\t\t\tn.code=code;\r\n\t\t\tstu.id=id;\r\n\t\t\tstu.name=name;\r\n\t\t\tstu.department=department;\r\n\t\t\tstu.program=program;\r\n\t\t\tstu.year=year;\r\n\t\t\tif(code=='I')\r\n\t\t\t\tbst.insert(stu);\r\n\t\t\telse if(code=='D')\r\n\t\t\t\tbst.deleteKey(stu);\r\n\t\t\telse\r\n\t\t\t\tSystem.out.println(\"Wrong code detected in input file. Should be I or D\");\r\n\t\t\t//System.out.println(\"Code: \" + code + \" ID: \" + stu.id + \" Name: \" + stu.name+ \" Dep: \" + stu.department + \" Program: \" + stu.program + \" Year: \"+ stu.year);\r\n\t\t}\r\n\t\t //Just changing the Stream so it will print to a file instead of console.\r\n\t\t PrintStream printStream = new PrintStream(new FileOutputStream(outputfile));\r\n\t\t System.setOut(printStream);\r\n\t\t System.out.println(\"\\nInorder traversal of binary tree is \");\r\n\t\t System.out.println(String.format(\"%-10s %-7s %-4s %-4s %-4s \",\"Name\",\" ID\",\"Department\",\"Program\",\"Year\"));\r\n\t\t bst.printInorder(outputfile);\r\n\t\t PrintStream printStream2 = new PrintStream(new FileOutputStream(outputfile2));\r\n\t\t System.setOut(printStream2);\r\n\t\t System.out.println(\"\\nBreadthFirst traversal of binary tree is \");\r\n\t\t System.out.println(String.format(\"%-10s %-7s %-4s %-4s %-4s \",\"Name\",\" ID\",\"Department\",\"Program\",\"Year\"));\r\n\t\t bst.printLevelOrder(outputfile2);\r\n\t\t \r\n\t\t} catch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"usage\");\r\n\t\t\te.printStackTrace();\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t\r\n\t}",
"public static void openTextFile() {\n\t\ttry {\n\t\t\tin1 = new Scanner(new File(file1));\n\t\t\tin2 = new Scanner(new File(file2));\n\t\t} catch(FileNotFoundException ex) {\n\t\t\tSystem.err.println(\"Error opening file\" + ex);\n\t\t\tSystem.exit(1);\n\t\t}\n\t}",
"public static void main(String[] args) {\n\r\n String contenido = \"\";\r\n\r\n try {\r\n FileReader in = new FileReader(\"./src/fichero_prueba.txt\");\r\n int c = in.read();\r\n\r\n while (c != -1) {\r\n contenido += (char) c;\r\n c = in.read();\r\n }\r\n in.close();\r\n } catch (IOException e){\r\n System.out.println(e.getMessage());\r\n }\r\n\r\n System.out.println(contenido);\r\n\r\n\r\n //LEER MENSAJE POR BLOQUES\r\n\r\n String contenido2 = \"\";\r\n\r\n try {\r\n BufferedReader inb = new BufferedReader(new FileReader(\"./src/fichero_prueba.txt\"));\r\n\r\n String linea = inb.readLine();\r\n while (linea!=null){\r\n contenido2 += linea+\"\\n\";\r\n linea = inb.readLine();\r\n }\r\n inb.close();\r\n } catch (IOException e){\r\n e.printStackTrace();\r\n }\r\n System.out.println(contenido2);\r\n\r\n }",
"public static void main(String[] args) {\n\t\tString cwd = System.getProperty(\"user.dir\");\t\t\n\t\tString targetFile = cwd + File.pathSeparator + \"target\" + File.pathSeparator + \"testfile.txt\";\n\t\ttry(FileOutputStream fout = new FileOutputStream(targetFile)){\n\t\t\tfout.write(args[0].getBytes());\n\t\t\tfout.write(System.getProperty(\"line.separator\").getBytes());\n\t\t\t//Did we write it..for real??\n\t\t\tFileReaderDemo.readFile(targetFile);\n\t\t}catch(IOException e) {\n\t\t\t\n\t\t}\n\t}",
"private static void readFile() throws IOException\r\n\t{\r\n\t\tString s1;\r\n\t\tFileReader fr = new FileReader(filename);\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\t\r\n\t\tSystem.out.println(\"\\ndbs3.txt File\");\r\n\t\twhile ((s1 = br.readLine())!=null)\r\n\t\t{\r\n\t\t\tSystem.out.println(s1);\r\n\t\t}//end while loop to read files\r\n\t\t\r\n\t\tbr.close();//close the buffered reader\r\n\t}",
"public abstract void open(BufferedReader br) throws IOException;",
"public static void main(String[] args) throws IOException {\n\t\t\n\t\tBufferedReader reader = new BufferedReader(new FileReader(\"F://file-data/data.txt\"));\n\t\tWriter writer = new FileWriter(new File(\"F://file-data/data-copy.txt\"));\n\t\tboolean flag = true;\n\t\twhile(flag) {\n\t\t\tString str = reader.readLine();\n\t\t\tif(str != null) {\n\t\t\t\twriter.write(str+\"\\n\");\n\t\t\t}else {\n\t\t\t\tflag = false;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treader.close();\n\t\twriter.close();\n\t}",
"private static String readFile(String file) throws IOException { //Doesn't work - possible error with FileReader\n //BufferedReader reader = new BufferedReader(new FileReader(file));\n //FileReader reader=new FileReader(file);\n\n\n FileReader file2 = new FileReader(file);\n System.out.println(\"Inside readFile\");\n BufferedReader buffer = new BufferedReader(file2);\n\n\n\n //String line = null;\n String line=\"\";\n\n StringBuilder stringBuilder = new StringBuilder();\n String ls = System.getProperty(\"line.separator\");\n try {\n while ((line = buffer.readLine()) != null) {\n System.out.println(line);\n stringBuilder.append(line);\n stringBuilder.append(ls);\n }\n return stringBuilder.toString();\n\n }finally{\n buffer.close();//https://stackoverflow.com/questions/326390/how-do-i-create-a-java-string-from-the-contents-of-a-file\n }\n /*Scanner scanner = null;\n scanner = new Scanner(file);\n StringBuilder stringBuilder = new StringBuilder();\n while (scanner.hasNextLine()) {\n String line = scanner.nextLine();\n stringBuilder.append(line);\n\n System.out.println(\"line: \"+line);\n }\n return stringBuilder.toString();*/\n\n }",
"public static void main(String[] args) throws IOException{\n\t\tString txtFileName = \"src\\\\stream\\\\step1\\\\source\\\\input\\\\not_today.txt\";\r\n\t\tString img1FileName = \"src\\\\stream\\\\step1\\\\source\\\\input\\\\bts1.jpg\";\r\n\t\tString img2FileName = \"src\\\\stream\\\\step1\\\\source\\\\input\\\\bts2.jpg\";\r\n\t\t\r\n\t\t// file name String - output\r\n\t\tString result_txt = \"src\\\\stream\\\\step1\\\\source\\\\output\\\\result_not_today.txt\";\r\n\t\tString result_img1 = \"src\\\\stream\\\\step1\\\\source\\\\output\\\\result_bts1_img.jpg\";\r\n\t\tString result_img2 = \"src\\\\stream\\\\step1\\\\source\\\\output\\\\result_bts2_img.jpg\";\r\n\t\t\r\n\t\t// node stream - input\r\n\t\tFileReader fr = new FileReader(txtFileName);\r\n\t\tFileInputStream fis1 = new FileInputStream(img1FileName);\r\n\t\tFileInputStream fis2 = new FileInputStream(img2FileName);\r\n\t\t\r\n\t\t// filter stream - input\r\n\t\tBufferedReader br = new BufferedReader(fr);\r\n\t\tDataInputStream dis1 = new DataInputStream(fis1);\r\n\t\tDataInputStream dis2 = new DataInputStream(fis2);\r\n\t\t\r\n\t\t// node stream - output\r\n\t\tFileOutputStream fos1 = new FileOutputStream(result_img1);\r\n\t\tFileOutputStream fos2 = new FileOutputStream(result_img2);\r\n\t\tPrintWriter pw = new PrintWriter(result_txt);\r\n\t\t\r\n\t\t// filter strea - output\r\n\t\tDataOutputStream dos1 = new DataOutputStream(fos1);\r\n\t\tDataOutputStream dos2 = new DataOutputStream(fos2);\r\n\t\t\r\n\t\t// Data reading & Stream closing\r\n\t\tString contents = null;\r\n\t\twhile((contents = br.readLine()) != null){\r\n\t\t\tpw.write(contents + \"\\n\");\r\n\t\t}\t\t\r\n\t\t\r\n\t\tpw.close();\r\n\t\t\r\n\t\tint data = 0;\r\n\t\ttry {\r\n\t\t\twhile((data = dis1.readInt()) != -1){\r\n\t\t\t\tdos1.writeInt(data);\r\n\t\t\t}\r\n\t\t} catch (EOFException e) {\r\n\t\t\tSystem.out.println(\"프린트 끝\");\r\n\t\t}finally{\r\n\t\t\tdos1.close();\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tdata = 0;\r\n\t\t\twhile((data = dis2.readInt()) != -1){\r\n\t\t\t\tdos2.writeInt(data);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tSystem.out.println(\"프린트 끝\");\r\n\t\t}finally{\r\n\t\t\tdos2.close();\r\n\t\t}\r\n\t\t\t\r\n\t}",
"public static void main(String[] args) {\n String file = System.getProperty(\"user.dir\") + \"\\\\src\\\\\" + TaskB.class.getName().replace(\".\", File.separator);\n String fileIn = file + \".java\";\n String fileOut = file + \".txt\";\n StringBuilder convert = new StringBuilder();\n try (BufferedReader reader = new BufferedReader(\n new FileReader(fileIn))) {\n Boolean commentOne = false;\n Boolean commentTwo = false;\n String chars = \"\";\n\n // text\n\n while (reader.ready()) {\n if (reader.ready()) {\n char currchar = (char) reader.read();\n chars = chars + currchar;\n\n if (chars.equals(\"/\" + \"*\")) {\n commentOne = true;\n commentTwo = true;\n convert.deleteCharAt(convert.length() - 1);\n }\n\n if (chars.equals(\"/\" + \"/\")) {\n commentOne = true;\n commentTwo = false;\n convert.deleteCharAt(convert.length() - 1);\n }\n\n // text\n\n if (!commentOne) {\n convert.append(chars.substring(chars.length() - 1));\n }\n\n if (chars.equals(\"\\r\\n\") && commentOne && !commentTwo) {\n commentOne = false;\n commentTwo = false;\n convert.append(chars);\n }\n\n if (chars.equals(\"*\" + \"/\") && commentOne && commentTwo) {\n commentOne = false;\n commentTwo = false;\n }\n chars = Character.toString(currchar);\n }\n\n /*\nmay be the end\n */\n }\n PrintWriter out = new PrintWriter(new FileWriter(fileOut));\n System.out.print(convert);\n out.print(convert);\n out.close();\n\n } catch (IOException e) {\n e.printStackTrace();\n // the end!\n }\n }",
"public static void main(String[] args) {\n\t\tString filename = \"src/y20161B/B-small-practice\";\n\t\t//String filename = \"src/y20161B/B-large-practice\";\n\n\t\tFileInputStream file;\n\t\tint T;\n\n\t\ttry {\n\t\t\tfile = new FileInputStream(filename+\".in\");\n\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(file));\n\n\t\t\tT = Integer.parseInt(in.readLine());\n\n\t\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(filename+\".out\"));\n\n\t\t\tfor (int i=0; i<T; i++) {\n\t\t\t\tint ind = i+1;\n\t\t\t\t// parser\n\t\t\t\tString buff[] = in.readLine().split(\" \");\n\t\t\t\tString C = buff[0];\n\t\t\t\tString J = buff[1];\n\t\t\t\t\n\t\t\t\t// calcul\n\t\t\t\tString res = solve(C, J);\n\t\t\t\t\n\t\t\t\tSystem.out.println(\"Result \"+i+\": \"+res);\n\t\t\t\tbw.write(\"Case #\"+ind+\": \"+res+\"\\n\");\n\t\t\t}\n\t\t\tbw.close();\n\n\t\t\tin.close();\n\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"public BufferedReader2(Reader in)\r\n\t{\r\n\t\tsuper(in);\r\n\t}",
"public static void main(String[] args) throws IOException {\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(args[1]));\n\t\ttry (BufferedReader br = new BufferedReader(new FileReader(args[0]))) {\n\t\t int n = Integer.parseInt(br.readLine());\n\t\t String line;\n\t\t for(int i=0;i<n;i++){\n\t\t \tHashSet<Integer> digits = new HashSet<>();\n\t\t \tint flag=0;\n\t\t \tint count=1;\n\t\t int input = Integer.parseInt(br.readLine());\n\t\t int original=input;\n\t\t while(input!=0){\n\t\t \t int source=input,originalSource=input;\n\t\t \t count++;\n\t\t \t while(source!=0){\n\t\t \t\t digits.add(source%10);\n\t\t \t\t source=source/10;\n\t\t \t }\n\t\t \t \n\t\t \t if(digits.size()==10){\n\t\t \t\t //System.out.println(\"Case #\"+(i+1)+\": \"+originalSource);\n\t\t \t\t bw.write(\"Case #\"+(i+1)+\": \"+originalSource+\"\\n\");\n\t\t \t\t flag=1;\n\t\t \t\t break;\n\t\t \t }\n\t\t \t input=original*count;\n\t\t }\n\t\t if(flag==0){\n\t\t \t //System.out.println(\"Case #\"+(i+1)+\": INSOMNIA\");\n\t\t \t bw.write(\"Case #\"+(i+1)+\": INSOMNIA\"+\"\\n\");\n\t\t }\n\t\t }\n\t\t \n\t\t}\n\t\tcatch(Exception e){\n\t\t\t\n\t\t}\n\t\tbw.close();\n\t}",
"public static void main(String[] args) {\n\t\tFileInputStream s=null;\n\t\tFileOutputStream b=null;\n\t\tbyte buffer[]=new byte[1000];\n\t\tint t;\n\t\t\t\ttry{\n\t\t\t\t\ts=new FileInputStream(\"dir/01.txt\");\n\t\t\t\t\t//用t来一个一个接受字节,每个汉字占2个字节。\n\t\t\t\t\t/*while((t=s.read())!=-1)\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println((char)t);\n\t\t\t\t\t}*/\n\t\t\t\t\tb=new FileOutputStream(\"dir/02.txt\");\n\t\t\t\t\t//先放在缓存区里,然后一股脑儿输出\n\t\t\t\t\tt=s.read(buffer,0,buffer.length);\n\t\t\t\t\tfor(int i=0;i<buffer.length;i++)\n\t\t\t\t\t\tSystem.out.print((char)buffer[i]);\n\t\t\t\t\t b.write(buffer);\n\t\t\t\t}\n\t\t\t\tcatch(IOException e){\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t\tfinally{\n\t\t\t\t\ttry{\n\t\t\t\t\t\ts.close();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(IOException e){\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\ttry{\n\t\t\t\t\t\tb.close();\n\t\t\t\t\t}\n\t\t\t\t\tcatch(IOException e){\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\n\t\t\t\n\t}",
"public String LateralOp(String name) {\n String line1, line2, tmpBuf1, tmpBuf2;\n try {\n BufferedReader br = new BufferedReader(new FileReader(file1));\n BufferedWriter bw = new BufferedWriter(new FileWriter(name));\n\n // Working with two files\n if (file2 != null) {\n BufferedReader br2 = new BufferedReader(new FileReader(file2));\n\n do{\n line1 = br.readLine(); line2 = br2.readLine();\n tmpBuf1 = line1 == null ? \"\" : line1;\n tmpBuf2 = line2 == null ? \"\" : line2;\n\n bw.write(tmpBuf1 + tmpBuf2);\n bw.newLine();\n }while (line1!= null || line2 != null);\n bw.flush();\n }\n // Working with spacers\n else{\n line2 = \"\";\n for (int i = 0; i < spaceCount; ++i) {\n line2 += spacer;\n }\n while((line1 = br.readLine()) != null) {\n bw.write(line1 + line2);\n bw.newLine();\n }\n bw.flush();\n }\n }\n catch (FileNotFoundException e) {\n System.err.println(\"ERROR: File does not exist. Please input a valid file.\");\n }\n catch (IOException e) {\n System.err.println(\"ERROR: Failure while reading from file.\");\n }\n return name;\n }",
"public static void main(String[] args) {\n\n\t\tFile f = new File(\"d:/Java/test.txt\");\n\t\tFileInputStream fis = new FileInputStream(f);\n\t\t\n\t\ttry {\n//\t\t\tFile f = new File(\"d:/Java/test.txt\");\n\t\t\t\n//\t\t\tFileInputStream fis = new FileInputStream(f);\n\t\t\n\t\t\tbyte[] all = new byte[(int)f.length()];\n\t\t\t\n\t\t\tfis.read(all);\n\t\t\tfor (byte b : all) {\n\t\t\t\tSystem.out.println(b);\n\t\t\t}\n\t\t\t\n//\t\t\tfis.close();\n\t\t\t\n\t\t\t\n\t\t\tFile f1 = new File(\"d:/Java/test.txt\");\n\t\t\tbyte data[] = {88,88,88};\n\t\t\tFileOutputStream fos = new FileOutputStream(f1);\n\t\t\tfos.write(data);\n\t\t\tfos.close();\n\t\t} \n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif (null != fis)\n\t\t\t\ttry {\n\t\t\t\t\tfis.close();\n\t\t\t\t} catch (IOException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t\t\n\t\tFile fclose = new File(\"d:/java/test.txt\");\n\t\ttry (FileInputStream fisclose = new FileInputStream(fclose)) {\n\t\t\tbyte [] allclose = new byte[(int)fclose.length()];\n\t\t\tfisclose.read(allclose);\n\t\t\tfor(byte b : allclose) {\n\t\t\t\tSystem.out.println(b);\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) throws IOException {\n\n BufferedWriter bw = new BufferedWriter(new FileWriter(\"lorem4.txt\"));\n bw.write(\"It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout. \");\n bw.newLine();\n bw.write(\"sahuashuashuashauh aubduabd augb ua auhuh\");\n\n bw.close();\n\n }",
"void readWriteFile() throws IOException{\n\t\t\t\t\n\t\t// Sorting before writing it to the file\n\t Map<String, Double> sortedRank = sortByValues(PageRank); \n\t\t\n // below code is used for finding the inlinks count, Comment the probablity sum in below iterator if uncommenting this line\n\t\t//Map<String, Integer> sortedRank = sortByinlinks(inlinks_count);\n\t\t\n\n\t\t//Writing it to the file\n\t\tFile file = new File(\"C:/output.txt\");\n\t\tBufferedWriter output = new BufferedWriter(new FileWriter(file,true));\n\t\tIterator iterator = sortedRank.entrySet().iterator();\n\t\tdouble s = 0.0;\n\t\t\twhile(iterator.hasNext()){\n\t\t\t\tMap.Entry val = (Map.Entry)iterator.next();\n\t\t\t\toutput.write(val.getKey() +\"\\t\"+ val.getValue()+ \"\\n\");\t\t\t\t\n\t\t\t\ts= s+ (double)val.getValue(); //Adding the Probablity ; Comment this line if using Inlink calculation\n\t\t\t}\n\t\t\tSystem.out.println(\"Probablity Sum : \"+s); //After convergence should be 1; ; Comment this line if using Inlink calculation\n\t\t\toutput.flush();\n\t\t\toutput.close();\n\t}",
"public static void main(String[] args) throws IOException {\n\n String path = \"D:\\\\GitHub\\\\Competetions\\\\CodeJam\\\\Code\\\\src\\\\B12016\\\\\";\n String input = \"bsmall.in\", output = \"bsmall.out\";\n FileInputStream fip = new FileInputStream(path + input);\n FileOutputStream fop = new FileOutputStream(path + output);\n in = fip;\n out = new PrintWriter(fop);\n B a = new B();\n a.solve();\n out.close();\n }",
"private static DataInputStream readFile(String f1, String f2, boolean writeToFile2) throws IOException {\n if(writeToFile2){\n return new DataInputStream(\n new BufferedInputStream(new FileInputStream(new RandomAccessFile(f1,\"r\").getFD())));\n }\n else{\n return new DataInputStream(\n new BufferedInputStream(new FileInputStream(new RandomAccessFile(f2,\"r\").getFD())));\n }\n }",
"protected abstract void writeFile();"
] | [
"0.6151837",
"0.60805196",
"0.5986489",
"0.59753",
"0.5968306",
"0.5961445",
"0.5909116",
"0.5859615",
"0.584645",
"0.58356464",
"0.57933146",
"0.57421464",
"0.5717384",
"0.5649268",
"0.56325185",
"0.56150657",
"0.5597652",
"0.55890846",
"0.5570966",
"0.55646247",
"0.556378",
"0.55579317",
"0.5528276",
"0.5521792",
"0.5503003",
"0.5500922",
"0.5456666",
"0.5446565",
"0.5444542",
"0.5439288",
"0.5414338",
"0.5381547",
"0.5366289",
"0.53536767",
"0.5319187",
"0.5309503",
"0.5301154",
"0.5297028",
"0.5293647",
"0.5260139",
"0.52568865",
"0.5252834",
"0.52455634",
"0.52447814",
"0.52260804",
"0.5222696",
"0.5206695",
"0.5205887",
"0.5204436",
"0.5203662",
"0.51844555",
"0.5182978",
"0.5170448",
"0.5167639",
"0.5158724",
"0.5155604",
"0.5152722",
"0.5147429",
"0.51471984",
"0.51467824",
"0.51406825",
"0.5124823",
"0.5123593",
"0.5115167",
"0.51112926",
"0.5111289",
"0.51079947",
"0.5098916",
"0.5093334",
"0.5085211",
"0.5081312",
"0.5080248",
"0.5080049",
"0.50768477",
"0.50765896",
"0.507118",
"0.50632805",
"0.5048132",
"0.5045451",
"0.50385153",
"0.5034159",
"0.5029892",
"0.50292",
"0.50282377",
"0.50196046",
"0.5019066",
"0.5016882",
"0.5012861",
"0.501285",
"0.5005507",
"0.50039554",
"0.5000586",
"0.49999532",
"0.49998176",
"0.49906424",
"0.49872315",
"0.49868593",
"0.4986273",
"0.49858868",
"0.49764428",
"0.49749622"
] | 0.0 | -1 |
Returns tokenvalue related to the initialization of the transaction This method is invoked for paypal express checkout | public Transaction initTransaction(MerchantStore store, Customer customer, BigDecimal amount, PaymentDTO payment,
IntegrationConfiguration configuration, IntegrationModule module) throws IntegrationException; | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public java.lang.String getToken(){\n return localToken;\n }",
"public String getTokenValue() { return tok; }",
"public java.lang.String getToken(){\r\n return localToken;\r\n }",
"public String getTokenResult() {\n return tokenResult;\n }",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"java.lang.String getToken();",
"public String getToken()\n {\n return token;\n }",
"public String getToken() {\r\n return token;\r\n }",
"public String getToken() {\r\n return token;\r\n }",
"public byte[] getToken() {\n\t\treturn this.token;\n\t}",
"public static String getToken() {\n \treturn mToken;\n }",
"public String getToken() {\n return token.get();\n }",
"public String getToken();",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return token;\n }",
"public String getToken() {\n return this.token;\n }",
"public String getProposedTransactionValue() {\n return proposedTransactionValue;\n }",
"private String getPaymentToken() {\r\n\t\tString paymentToken = \"\";\r\n\t\tUserItem currentUserItem = getSimpleWorksUserSessionConfiguration().getCurrentUser();\r\n\t\tOrderItem orderItem = getSimpleWorksUserSessionConfiguration().getOrderItem();\r\n\t\tif (orderItem != null) {\r\n\t\t\tpaymentToken = \"\" + orderItem.getOrderId();\r\n\t\t\t if (currentUserItem != null){\r\n\t\t\t\t paymentToken += \"#\" + currentUserItem.getUserId();\r\n\t\t\t }\r\n\t\t}\r\n\t\treturn paymentToken;\r\n\t}",
"public String getToken() {\n return this.token;\n }",
"public String getToken() {\n return this.token;\n }",
"public String token() {\n return Codegen.stringProp(\"token\").config(config).require();\n }",
"public String getToken() {\n\t\treturn token;\n\t}",
"public String getToken() {\n\t\treturn token;\n\t}",
"public String getToken() {\n return instance.getToken();\n }",
"public String getToken() {\n return instance.getToken();\n }",
"public String getToken() {\n return instance.getToken();\n }",
"public T getToken() {\n return this.token;\n }",
"public String getToken() {\n\n return this.token;\n }",
"GetToken.Req getGetTokenReq();",
"protected String getTokenConstant() {\r\n return null;\r\n }",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"String getToken();",
"public Token() {\n mTokenReceivedDate = new Date();\n }",
"public String getToken() {\n return token_;\n }",
"public String getToken() {\n return token_;\n }",
"public String getToken() {\n return token_;\n }",
"com.google.protobuf.ByteString\n getTokenBytes();",
"com.google.protobuf.ByteString\n getTokenBytes();",
"com.google.protobuf.ByteString\n getTokenBytes();",
"com.google.protobuf.ByteString\n getTokenBytes();",
"com.google.protobuf.ByteString\n getTokenBytes();",
"com.google.protobuf.ByteString\n getTokenBytes();",
"public String getStateToken() {\n\t\treturn stateToken;\n\t}",
"public DsByteString getToken() {\n return sToken;\n }",
"com.google.protobuf.ByteString\n getTokenBytes();",
"com.google.protobuf.ByteString\n getTokenBytes();",
"com.google.protobuf.ByteString\n getTokenBytes();",
"private static Tuple<Integer, String> getToken() {\n\t\tTuple<Integer, String> result = new Tuple<Integer, String>();\n\t\tresult = GETRequest(AUTH_URL, AUTH_HEADER, \"\", \"\");\n\t\treturn result;\n\t}",
"public byte[] getToken() {\n if (token_ != null)\n return primitiveGetToken();\n return null;\n }",
"public java.lang.String getSipTokenValue() {\r\n return sipTokenValue;\r\n }",
"String getTokenString();",
"public final DsByteString getTokenC() {\n return BS_ACCEPT_ENCODING_TOKEN;\n }",
"public String getSecurityToken()\r\n {\r\n return getAttribute(\"token\");\r\n }",
"public String getResultToken() {\n return resultToken;\n }",
"public String getToken()\n {\n return ssProxy.getToken();\n }",
"String getPrimaryToken();",
"public static String getToken() {\n String token = \"96179ce8939c4cdfacba65baab1d5ff8\";\n return token;\n }",
"public String token() {\n return this.token;\n }",
"public int getToken_num() {\n return this.token_num;\n }",
"@Nonnull\n public final String getToken() {\n return this.token;\n }",
"int getTokenStart();",
"GetToken.Res getGetTokenRes();",
"@Override\r\n public int getTokenId()\r\n {\r\n return this.tokenId;\r\n }",
"public com.google.protobuf.ByteString\n getTokenBytes() {\n return instance.getTokenBytes();\n }",
"public com.google.protobuf.ByteString\n getTokenBytes() {\n return instance.getTokenBytes();\n }",
"public com.google.protobuf.ByteString\n getTokenBytes() {\n return instance.getTokenBytes();\n }",
"public String getTokenKey()\r\n\t{\r\n\t\treturn TOKEN_KEY;\r\n\t}",
"public Date getTokenReceived() {\n return tokenReceived;\n }",
"@Override\n public String getStateToken() {\n return stateToken;\n }",
"public Token getToken() {\n return token;\n }",
"public BigDecimal getInitAmt() {\n return initAmt;\n }",
"Binder getToken(Binder data) {\n byte[] signedAnswer = data.getBinaryOrThrow(\"data\");\n try {\n if (publicKey.verify(signedAnswer, data.getBinaryOrThrow(\"signature\"), HashType.SHA512)) {\n Binder params = Boss.unpack(signedAnswer);\n // now we can check the results\n if (!Arrays.equals(params.getBinaryOrThrow(\"server_nonce\"), serverNonce))\n addError(Errors.BAD_VALUE, \"server_nonce\", \"does not match\");\n else {\n // Nonce is ok, we can return session token\n createSessionKey();\n Binder result = Binder.fromKeysValues(\n \"client_nonce\", params.getBinaryOrThrow(\"client_nonce\"),\n \"encrypted_token\", encryptedAnswer\n );\n\n version = Math.min(SERVER_VERSION, params.getInt(\"client_version\", 1));\n\n byte[] packed = Boss.pack(result);\n return Binder.fromKeysValues(\n \"data\", packed,\n \"signature\", myKey.sign(packed, HashType.SHA512)\n );\n }\n }\n } catch (Exception e) {\n addError(Errors.BAD_VALUE, \"signed_data\", \"wrong or tampered data block:\" + e.getMessage());\n }\n return null;\n }",
"private void m50363B() {\n try {\n TokenPaymentParams tokenPaymentParams = new TokenPaymentParams(this.f30711G0, this.f30708D0, this.f30709E0.getBrand(), this.f30737h0.getText().toString());\n StringBuilder sb = new StringBuilder();\n sb.append(this.f30720S.getString(C10232R.string.checkout_ui_callback_scheme));\n sb.append(\"://callback\");\n tokenPaymentParams.mo40895e(sb.toString());\n this.f30754y0.mo41066a(new Transaction((PaymentParams) tokenPaymentParams));\n this.f30728a.mo23628i(C11645a.f33474f, \"credit_card\");\n } catch (PaymentException e) {\n e.printStackTrace();\n }\n }",
"public Token getToken() {\r\n return _token;\r\n }",
"public final Token getRequireToken()\n {\n Token token = getModule();\n\n if (token.isNull())\n {\n token = getVersion();\n\n if (token.isNull())\n {\n if (((token = getToken(QuoteToken.class, 1))).isNull())\n {\n token = getToken(QuoteLikeToken.class, 1);\n }\n }\n }\n\n return token;\n }",
"@WebMethod\n public String getRequestToken() {\n String result = TokenService.getRequestToken();\n return result;\n }",
"public String getTokenId() {\n return tokenId;\n }",
"public Token getToken() {\n\t\treturn token;\n\t}",
"public Token getToken() {\n\t\treturn token;\n\t}",
"public Token getToken() {\n\t\treturn token;\n\t}",
"public PaymentTransaction() {\n\t\tsuper(\"PAYMENT_TRANSACTION\", edu.uga.csci4050.group3.jooq.team3.Team3.TEAM3);\n\t}",
"public String getValue_click_ActivateCoupon_Button(){\r\n\t\treturn click_ActivateCoupon_Button.getAttribute(\"value\");\r\n\t}",
"public Token getToken() {\n return this.token;\n }",
"@Override\n\n public void onSuccess(CardToken cardToken) {\n RequestManager.getInstance().init(getBaseContext());\n RequestManager.getInstance().paymentRequest(cardToken.getId());\n\n }",
"public TokenTransactions() {}",
"@Override\n\tpublic String getTokenId() {\n\t\treturn null;\n\t}",
"public int getAmount()\n {\n return this.transactionValue;\n }",
"private byte[] getTokenKey() throws InternalSkiException {\n return sysKey(TOKEN_KEY);\n }",
"public java.lang.String getMerchantTransNo () {\r\n\t\treturn merchantTransNo;\r\n\t}",
"@Override\n\tpublic long getTokenExpiryTime() {\n\t\treturn 0;\n\t}",
"int getTokenFinish();"
] | [
"0.5687337",
"0.56701016",
"0.5650977",
"0.5626827",
"0.5605005",
"0.5605005",
"0.5605005",
"0.5605005",
"0.5605005",
"0.5605005",
"0.5595498",
"0.5561577",
"0.5561577",
"0.55428535",
"0.553994",
"0.5539166",
"0.54949576",
"0.54942584",
"0.54942584",
"0.54942584",
"0.54942584",
"0.54942584",
"0.5484862",
"0.5482686",
"0.54641235",
"0.5463154",
"0.54407823",
"0.5425955",
"0.54017425",
"0.54017425",
"0.5386603",
"0.5386603",
"0.5386603",
"0.5378501",
"0.5375345",
"0.53406864",
"0.5340437",
"0.53313553",
"0.53313553",
"0.53313553",
"0.53313553",
"0.53313553",
"0.5328298",
"0.5288348",
"0.5288348",
"0.5288348",
"0.5283802",
"0.5283802",
"0.5283802",
"0.5283802",
"0.5283802",
"0.52718335",
"0.52691305",
"0.5248467",
"0.52467984",
"0.52467984",
"0.52467984",
"0.5227523",
"0.5221285",
"0.52079475",
"0.52010465",
"0.5186722",
"0.51835454",
"0.5132598",
"0.51314884",
"0.5127905",
"0.5100211",
"0.5097818",
"0.5097652",
"0.5089119",
"0.50815696",
"0.5047698",
"0.50401896",
"0.50297385",
"0.50297385",
"0.50297385",
"0.50296193",
"0.5006305",
"0.5002731",
"0.5000095",
"0.4997286",
"0.49969664",
"0.49862543",
"0.49844855",
"0.49761105",
"0.49505442",
"0.49467558",
"0.49345526",
"0.49345526",
"0.49345526",
"0.4929322",
"0.4928943",
"0.49183708",
"0.49160784",
"0.49066088",
"0.49034306",
"0.48989922",
"0.4898511",
"0.4895509",
"0.4895168",
"0.48906785"
] | 0.0 | -1 |
Busca una persona por su identificador | @Override
public Person findById(Long idPerson) {
return personRepository.findById(idPerson).get();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"Persona buscarPersonaPorId(Long id) throws Exception;",
"public Empleado buscarEmpleadoPorId(String identificacion){\n Empleado empleadoEncontrado = null ;\n for (int i = 0; i < listaEmpleados.size(); i++) {\n if(listaEmpleados.get(i).getIdentificacion().equalsIgnoreCase(identificacion)){\n empleadoEncontrado = listaEmpleados.get(i);\n }\n }\n return empleadoEncontrado;\n }",
"Name findNameByPersonPrimary(int idPerson);",
"public void personLookup() {\n\t\tSystem.out.print(\"Person: \");\n\t\tString entryName = getInputForName();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getName().equals(entryName))\n\t\t\t.forEach(n -> System.out.println(n));\n\t}",
"public PersonaDTO consultarPersona(Long idPersona) ;",
"private PersonaEnvio buscaPersonaPorNombre(PersonaEnvio personaRequest) throws NotariaException{\n\t\tPersonaEnvio respuesta = new PersonaEnvio();\n\t\tString nombrePersona = personaRequest.getNombrePersona().replaceAll(\"\\\\s+\", \" \").trim();\n\t\tList<DatoBusquedaPersona> lista = personaBo.findPersonaByName(nombrePersona);\n\t\tif (lista != null) {\n\t\t\trespuesta.setResultados(new ArrayList<DatoBusquedaPersona>(\n\t\t\t\t\tlista));\n\t\t\trespuesta.setNumeroResultados(lista.size());\n\t\t\trespuesta.setEstatus(\"Búsqueda correcta.\");\n\t\t\trespuesta.setExito(true);\n\t\t\treturn respuesta;\n\t\t} else {\n\t\t\trespuesta.setResultados(null);\n\t\t\trespuesta.setNumeroResultados(0);\n\t\t\trespuesta.setEstatus(\"No se encontraron resultados.\");\n\t\t\trespuesta.setExito(false);\n\t\t\treturn respuesta;\n\t\t}\n\t}",
"private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}",
"public void findPersonById(int i) {\n\t\t\n\t}",
"public Long getPersonaId();",
"public void GuardarPersonas()\r\n {\r\n System.out.print(\"Inserte su numero de cedula: \");\r\n setNumeroId(entrada.nextLine());\r\n System.out.print(\"Inserte su Primer Nombre: \");\r\n setNombre(entrada.nextLine());\r\n System.out.print(\"Inserte su Primer Apellido: \");\r\n setPrimerApellido(entrada.nextLine());\r\n System.out.print(\"Inserte su Segundo Apellido: \");\r\n setSegundoApellido(entrada.nextLine());\r\n System.out.print(\"Inserte su edad: \");\r\n setEdad(Integer.parseInt(entrada.nextLine()));\r\n System.out.print(\"Inserte su peso: \");\r\n setPeso(Float.valueOf(entrada.nextLine()));\r\n \r\n }",
"public void searchPerson() {\n\t\tSystem.out.println(\"*****Search a person*****\");\n\t\tSystem.out.println(\"Enter Phone Number to search: \");\n\t\tlong PhoneSearch = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneSearch) {\n\t\t\t\tSystem.out.print(\"Firstname \\tLastname \\tAddress \\t\\tCity \\t\\tState \\t\\t\\tZIP \\t\\tPhone \\n\");\n\t\t\t\tSystem.out.println(details[i]);\n\t\t\t}\n\t\t}\n\t}",
"public void damePersonaje(String personaje){\n this.personaje=personaje;\n\n\n\n }",
"public Persona getPersona(String nombre)\n {\n Persona p = new Persona();\n //Considerar almacenar todos los registros en un arrayList o\n //en un JsonArray y JsonObject\n try \n { \n PreparedStatement pstm = null; \n ResultSet rs = null;\n String query = \"SELECT * FROM Persona WHERE ID_User IN (SELECT ID_User FROM Usuario WHERE username = ?)\";\n pstm = con.prepareStatement(query);\n pstm.setString(1, nombre);\n rs = pstm.executeQuery();\n while(rs.next())\n {\n p.setIdPersona(rs.getInt(\"ID_Persona\"));\n p.setIdUser(rs.getInt(\"ID_User\"));\n p.setNombre(rs.getString(\"Nombre\"));\n p.setApellidoP(rs.getString(\"apellidoPaterno\"));\n p.setApellidoM(rs.getString(\"apellidoMaterno\")); \n }\n }catch(SQLException ex){\n ex.printStackTrace(); \n }\n return p;\n }",
"public List<Personagem> findByMembroId(String id);",
"Persona obtenerPersonaPorRut(Integer rut);",
"@Override\n public Pessoa buscar(int id) {\n try {\n for (Pessoa p : pessoa.getPessoas()){\n if(p.getCodPessoa()== id){\n return p;\n }\n }\n } catch (Exception ex) {\n Logger.getLogger(AnimalDAO.class.getName()).log(Level.SEVERE, null, ex);\n }\n return null;\n }",
"public static void actualizarRegistro(){\n int idActulizar = Integer.parseInt(JOptionPane.showInputDialog(\"Ingrese el ID a Actualizar\"));\n Scanner teclado = new Scanner(System.in); \n \n System.out.println(\"Actualizando.... \");\n //String anombre = teclado.nextLine();\n persona pa = new persona();\n pa.setNombre(teclado.nextLine());\n pa.setAp_paterno(teclado.nextLine());\n pa.setAp_materno(teclado.nextLine());\n pa.setDireccion(teclado.nextLine());\n pa.setSexo(teclado.nextLine());\n \n pd.actualizarPerosna(idActulizar, pa);\n // mostras los actualizados\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno());\n }\n }",
"public Persona(int idPersona){\n this.idPersona = idPersona;\n }",
"public void nyPerson() {\r\n System.out.println(\"Skriv inn navnet paa personen\");\r\n String person = scan.nextLine().toLowerCase();\r\n if (!personListe.containsKey(person)) {\r\n personListe.put(person, new Person(person));\r\n }\r\n else {\r\n System.out.println(\"Denne personen finnes alt!\");\r\n }\r\n }",
"public PersonaBean getPerson(String searched) {\r\n\t\ttry {\r\n\t\t\tConnectionUtils connectionUtils = new ConnectionUtils();\r\n\t\t\tConnection connection = connectionUtils.openConnection();\r\n\t\t\tPreparedStatement ps = connection.prepareStatement(\"select phone_number from person where name = ?\");\r\n\t\t\tps.setString(1, searched);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tPersonaBean person = null;\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tperson = new PersonaBean(searched, rs.getString(\"phone_number\"));\r\n\t\t\t}\r\n\t\t\treturn person;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}",
"void lookupAndSaveNewPerson();",
"void crearNuevaPersona(Persona persona);",
"public Person getUserById(int id);",
"Jugador consultarGanador();",
"public void identificacion(){\n System.out.println(\"¡Bienvenido gamer!\\nSe te solcitaran algunos datos con el fin de personalizar tu experiencia :)\");\n System.out.println(\"Porfavor, ingresa tu nombre\");\n nombre = entrada.nextLine();\n System.out.println(\"Bien, ahora, ingresa tu gamertag\");\n gamertag = entrada.nextLine();\n System.out.println(\"Ese es un gran gamertag, ahora, diseña tu id, recuerda que tiene que ser un numero entero\");\n id = entrada.nextInt();\n //se le pide al usuario que elija la dificultad del juego, cada dificultad invocara a un metodo distinto\n System.out.println(\"Instrucciones:\\nTienes un numero limitado de intentos, tendras que encontrar las minas para asi desactivarlas\\n¿Quien no queria ser un Desactivador de minas de niño?\");\n System.out.println(\"Selecciona la dificultad\\n1. Facil\\n2. Intermedia\\n3 .Dificil\\n4. Imposible\");\n decision = entrada.nextInt();\n //creo el objeto que me llevara al juego, mandandolo con mis variables recopiladas\n Buscaminas dear = new Buscaminas(nombre, gamertag, id);\n if (decision==1){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Facil\");\n //vamos para el juego\n dear.juego();\n }else if(decision==2){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Intermedia\");\n dear.juego1();\n\n }else if(decision==3){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Dificil\");\n dear.juego2();\n\n }else if(decision==4){\n System.out.println(\"Estamos listos para empezar :), La dificultad que has elegido es Imposible\");\n dear.juego3();\n\n }\n\n\n\n }",
"public void buscarEntidad(){\r\n\t\tlistaEstructuraDetalle.clear();\r\n\t\tPersona persona = null;\r\n\t\tList<EstructuraDetalle> lstEstructuraDetalle = null;\r\n\t\ttry {\r\n\t\t\tstrFiltroTextoPersona = strFiltroTextoPersona.trim();\r\n\t\t\tif(intTipoPersonaC.equals(Constante.PARAM_T_TIPOPERSONA_JURIDICA)){\r\n\t\t\t\tif (intPersonaRolC.equals(Constante.PARAM_T_TIPOROL_ENTIDAD)) {\r\n\t\t\t\t\tlstEstructuraDetalle = estructuraFacade.getListaEstructuraDetalleIngresos(SESION_IDSUCURSAL,SESION_IDSUBSUCURSAL);\r\n\t\t\t\t\tif (lstEstructuraDetalle!=null && !lstEstructuraDetalle.isEmpty()) {\r\n\t\t\t\t\t\tfor (EstructuraDetalle estructuraDetalle : lstEstructuraDetalle) {\r\n\t\t\t\t\t\t\tpersona = personaFacade.getPersonaPorPK(estructuraDetalle.getEstructura().getJuridica().getIntIdPersona());\r\n\t\t\t\t\t\t\tif (persona.getStrRuc().trim().equals(\"strFiltroTextoPersona\")) {\r\n\t\t\t\t\t\t\t\testructuraDetalle.getEstructura().getJuridica().setPersona(persona);\r\n\t\t\t\t\t\t\t\tlistaEstructuraDetalle.add(estructuraDetalle);\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tlog.error(e.getMessage(), e);\r\n\t\t}\r\n\t}",
"public Vendedor buscarVendedorPorNome(String nome);",
"public static Persona buscaSolicitante(String codigo){\n\t\tPersona solicitante=null;\n\t\tif((solicitante = buscaAlumno(codigo))!=null){\n\t\t\tSystem.out.println(\"Alumno \"+solicitante.getNombreCompleto());\n\t\t\treturn solicitante;\n\t\t}else if((solicitante=buscaProfesor(codigo))!=null){\n\t\t\tSystem.out.println(\"Profesor \"+solicitante.getNombreCompleto());\n\t\t\treturn solicitante;\n\t\t}\n\t\treturn solicitante;\n\t}",
"String getIdentifiant();",
"@SuppressWarnings({\"unchecked\"})\n Name findDistinctNameByIdPerson(int idPerson);",
"@SuppressWarnings({\"unchecked\"})\n List<Name> findNameByIdPerson(int idPerson);",
"PersonRegisterDo selectByPrimaryKey(Long id);",
"public Persona(int idPersona, String nombre, String apellido, String email, String telefono){\n this.idPersona = idPersona;\n this.nombre = nombre;\n this.apellido = apellido;\n this.email = email;\n this.telefono = telefono;\n \n }",
"@Override\r\n\tpublic void seleccionarPersona() {\n\t\t\r\n\t}",
"ParqueaderoEntidad agregar(String nombre);",
"public void peleaEn(int idPeleador,int idEmpresa){\n\t\t\n\t}",
"private static Person findPersonById(int id) {\n Person personReturn = null;\n\n for (Person person : persons) {\n if (id == person.getId()) {\n personReturn = person;\n }\n }\n\n return personReturn;\n }",
"public void visPerson(){\r\n System.out.println(\"Hvilken person vil du se?\");\r\n String person = scan.nextLine().toLowerCase();\r\n if(person.equals(\"*\")) {\r\n for(Person sample : personListe.values()) {\r\n sample.visInfo();\r\n }\r\n }\r\n if (personListe.containsKey(person)) {\r\n personListe.get(person).visInfo();\r\n }\r\n\r\n else {\r\n System.out.println(\"Den personen finnes ikke\");\r\n }\r\n\r\n\r\n }",
"public Persona buscarPersona(String cedula) {\n\t\treturn null;\r\n\t}",
"public Identificador(String name) {\r\n this.name = name;\r\n }",
"@SuppressWarnings({\"unchecked\"})\n Map findNameFromNameAndPhoneticNameByIdPerson(int idPerson);",
"public void findbyid() throws Exception {\n try {\n Con_contadorDAO con_contadorDAO = getCon_contadorDAO();\n List<Con_contadorT> listTemp = con_contadorDAO.getByPK( con_contadorT);\n\n con_contadorT= listTemp.size()>0?listTemp.get(0):new Con_contadorT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }",
"Person findPerson(String name);",
"public void registrarPersona() {\n\t\ttry {\n\t\t\tif (validaNumDocumento(getNumDocumentPersona())) {\n\t\t\t\t\tif (validaDireccion()) {\n\t\t\t\t\t\tif (validaApellidosNombres()) {\n\t\t\t\t\t\t\tPaPersona persona = new PaPersona();\n\t\t\t\t\t\t\tif (getActualizaPersona() != null && getActualizaPersona().equals(\"N\")) {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(Constante.RESULT_PENDING);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPersonaId(getPersonaId() == null ? Constante.RESULT_PENDING: getPersonaId());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tpersona.setTipoDocumentoId(Integer.valueOf(mapTipoDocumento.get(getTipoDocumento())));\n\t\t\t\t\t\t\tpersona.setNroDocIdentidad(getNumDocumentPersona());\n\t\t\t\t\t\t\t\n\n\t\t\t\t\t\t\tif (persona.getTipoDocumentoId() == Constante.TIPO_DOCUMENTO_RUC_ID) {\n\t\t\t\t\t\t\t\tpersona.setRazonSocial(getRazonSocial());\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tpersona.setPrimerNombre(getPrimerNombre());\n\t\t\t\t\t\t\t\tpersona.setSegundoNombre(getSegundoNombre());\n\t\t\t\t\t\t\t\tpersona.setApePaterno(getApellidoPaterno());\n\t\t\t\t\t\t\t\tpersona.setApeMaterno(getApellidoMaterno());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tPaDireccion direccion = new PaDireccion();\n\t\t\t\t\t\t\tdireccion.setDireccionId(getDireccionId() == null ? Constante.RESULT_PENDING: getDireccionId());\n\t\t\t\t\t\t\tif (getSelectedOptBusc().intValue() == 1) {\n\t\t\t\t\t\t\t\tdireccion.setTipoViaId(mapGnTipoVia.get(getCmbtipovia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setViaId(mapGnVia.get(getCmbvia().getValue()));\n\t\t\t\t\t\t\t\tdireccion.setLugarId(null);\n\t\t\t\t\t\t\t\tdireccion.setSectorId(null);\n\t\t\t\t\t\t\t\tdireccion.setNumero(numero);\n\t\t\t\t\t\t\t\tdireccion.setPersonaId(persona.getPersonaId());\n\n\t\t\t\t\t\t\t\tString direccionCompleta = papeletaBo.getDireccionCompleta(direccion,mapIGnTipoVia, mapIGnVia);\n\t\t\t\t\t\t\t\tif (direccionCompleta != null && direccionCompleta.trim().length() > 0) {\n\t\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(direccionCompleta);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdireccion.setDireccionCompleta(getDireccionCompleta());\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tBuscarPersonaDTO personaDto = getPersonaDto(persona, direccion);\n\t\t\t\t\t\t\tString personaPapeleta = (String) getSessionMap().get(\"personaPapeleta\");\n\t\t\t\t\t\t\tif (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"I\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosInfractor(personaDto);\n\t\t\t\t\t\t\t} else if (personaPapeleta != null\n\t\t\t\t\t\t\t\t\t&& personaPapeleta.equals(\"P\")) {\n\t\t\t\t\t\t\t\tRegistroPapeletasManaged registro = (RegistroPapeletasManaged) getManaged(\"registroPapeletasManaged\");\n\t\t\t\t\t\t\t\tregistro.setDatosPropietario(personaDto);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlimpiar();\n\t\t\t\t\t\t\tesContribuyente = (Boolean) getSessionMap().get(\"esContribuyente\");\n\t\t\t\t\t\t\tif (esContribuyente == true) {\t\n\t\t\t\t\t\t\t\tWebMessages.messageError(\"Es un Contribeyente s�lo se Actualiz� la Direcci�n para Papeletas, los otros datos es por DJ\");\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t\t\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t\t.messageError(\"Apellidos y nombres no valido\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tWebMessages\n\t\t\t\t\t\t\t\t.messageError(\"Especifique la direccion de la persona\");\n\t\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tWebMessages\n\t\t\t\t\t\t.messageError(\"Número de documento de identidad no valido\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}",
"List<Person> findByIdAndName(int id,String name);",
"public String getFamilyPerson(String familyId);",
"People getUser(int index);",
"List<PersonRegisterDo> selectByExample(PersonRegisterDoExample example);",
"public void mostrarPersona(){\r\n System.out.println(\"Nombre: \" + persona.getNombre());\r\n System.out.println(\"Cedula: \" + persona.getCedula());\r\n }",
"public void buscarPessoa(){\n\t\tstrCelular = CareFunctions.limpaStrFone(strCelular);\n\t\t System.out.println(\"Preparar \" + strCelular);//\n\t\t \n\t\tif (strCelular.trim().length() > 0){\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tList<Usuario> lstusuario = usuarioDAO.listPorcelular(strCelular);\n\t\t\tSystem.out.println(\"Buscou \" + lstusuario.size());\n\t\t\tsetBooIdentifiquese(false);\n\t\t\tif (lstusuario.size() > 0){\n\t\t\t\tusuario = lstusuario.get(0);\n\t\t\t\tsetBooSelecionouUsuario(true);\n\t\t\t}else{\n\t\t\t\tsetBooSelecionouUsuario(false);\t\t\t\t\n\t\t\t\tsetBooCadastrandose(true);\n\t\t\t\tusuario = new Usuario();\n\t\t\t\tusuario.setUsu_celular(strCelular);\n\t\t\t}\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Ahoe\", \"Bem Vindo\"));\t\n\t\t}else{\n\t\t\tSystem.out.println(\"Buscar \" + strCelular);//\n\t\t\tFacesContext.getCurrentInstance().addMessage(\n\t\t\t\t\tnull,\n\t\t\t\t\tnew FacesMessage(FacesMessage.SEVERITY_INFO,\n\t\t\t\t\t\t\t\"Você deve informar o Celular\", \"Não foi possível pesquisar\"));\t\t\t\n\t\t}\n\t}",
"public int buscar_usuario_id(VOUsuario usu) throws RemoteException {\n int linea=-1;\n int id=Integer.parseInt(usu.getId());\n try {\n FileReader fr = new FileReader(datos);\n BufferedReader entrada = new BufferedReader(fr);\n String s, texto=\"\";\n int n, num, l=0;\n boolean encontrado=false;\n while((s = entrada.readLine()) != null && !encontrado) {\n\n texto=s;\n n=texto.indexOf(\" \");\n texto=texto.substring(0, n);\n num=Integer.parseInt(texto);\n\n if(num==id) {\n encontrado=true;\n linea=l;\n }\n l++;\n }\n entrada.close();\n } catch (FileNotFoundException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n } catch (IOException e) {\n System.err.println(\"FileStreamsTest: \" + e);\n }\n return linea;\n }",
"@RDFSubject(prefix = \"persons:\")\n\tString getId();",
"public long getPersonId();",
"private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }",
"private String addPerson()\n {\n String phone = getPhone();\n System.out.println(\"Person tilføjet.\");\n System.out.println(\"\");\n return phone;\n }",
"@Override\n public Asesor getAsesor(String numeroPersonal) {\n Asesor asesor = null;\n ConexionSQL conexionSql = new ConexionSQL();\n Connection conexion = conexionSql.getConexion();\n try{\n PreparedStatement orden = conexion.prepareStatement(\"select * from asesor where numeroPersonal =?\");\n orden.setString(1, numeroPersonal);\n ResultSet resultadoConsulta = orden.executeQuery();\n if(resultadoConsulta.first()){\n String nombre;\n String idioma;\n String correo;\n String telefono;\n numeroPersonal = resultadoConsulta.getString(1);\n nombre = resultadoConsulta.getString(4) +\" \"+ resultadoConsulta.getString(6) +\" \"+ resultadoConsulta.getString(5);\n idioma = resultadoConsulta.getString(2);\n telefono = resultadoConsulta.getString(8);\n correo = resultadoConsulta.getString(7);\n asesor = new Asesor(numeroPersonal, nombre, idioma,telefono,correo);\n }else{\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"No se encuentra el asesor\");\n }\n }catch(SQLException | NullPointerException excepcion){\n Logger logger = Logger.getLogger(\"Logger\");\n logger.log(Level.WARNING, \"La conexión podría ser nula | la sentencia SQL esta mal\");\n }\n return asesor;\n }",
"public Usuario buscar(String email) {\n Usuario Usuario=null;\n //percorre toda a lista e checa se o Usuario existe\n for(Usuario u:listaUse){\n if (u.getEmail().equals(email) ){\n Usuario = u;\n return Usuario;\n }\n }\n return Usuario;\n }",
"public void findbyid() throws Exception {\n try {\n IPi_per_intDAO pi_per_intDAO = getPi_per_intDAO();\n List<Pi_per_intT> listTemp = pi_per_intDAO.getByPK(pi_per_intT);\n\n pi_per_intT = listTemp.size() > 0 ? listTemp.get(0) : new Pi_per_intT();\n\n } catch (Exception e) {\n easyLogger.error(e.getMessage(), e);\n setMsg(ERROR, \"Falha ao realizar consulta!\");\n } finally {\n close();\n }\n }",
"public void identificarPersona() {\n try {\n //Obtiene todas las huellas de la bd\n ResultSet rsIdentificar = identificarhue.executeQuery();\n \n //Si se encuentra la huella en la base de datos\n while(rsIdentificar.next()){\n //Lee la plantilla de la base de datos\n byte templateBuffer[] = rsIdentificar.getBytes(\"huellap\");\n //Crea una nueva plantilla\n Template referenceTemplate = new Template(templateBuffer);\n \n //compara las plantilas (actual vs bd)\n boolean coinciden = fingerprintSDK.verify(template,referenceTemplate);\n \n //Si encuentra coincidencia entonces envia true y si no entonces envia false\n if (coinciden){ \n objpantprincipal.coincidehuella(true);\n return;\n }\n else{\n objpantprincipal.coincidehuella(false);\n }\n } \n \n } catch (SQLException e) { \n initDB();\n identificarPersona();\n } catch (GrFingerJavaException e) {\n Toolkit.getDefaultToolkit().beep();\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }",
"@Override\n\t@Transactional\n\tpublic List<Cliente> getClienteByAnyWord(String nombre, Long idcliente, Long idGrupo, Long idPunto) {\n\t\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\t\tList<Cliente> cliente =getCurrentSession().createQuery(\"select clientes from Grupo g join g.clientes clientes where clientes.nombre like '\"+nombre+\"%\"+\"'\"+\"and g.id=\"+idGrupo+\" and clientes.activo=1\").list();\n\n\t\t\t\treturn cliente;\n\t}",
"public static void regPerson(){\n\t\tSystem.out.println(\"Skriv inn navnet, trykk enter, skriv så inn alder, trykk enter, og til slutt skriv inn bosted og trykk enter!\");\n\t}",
"public void searchByName() {\n System.out.println(\"enter a name to search\");\n Scanner sc = new Scanner(System.in);\n String fName = sc.nextLine();\n Iterator itr = list.iterator();\n while (itr.hasNext()) {\n Contact person = (Contact) itr.next();\n if (fName.equals(person.getFirstName())) {\n List streamlist = list.stream().\n filter(n -> n.getFirstName().\n contains(fName)).\n collect(Collectors.toList());\n System.out.println(streamlist);\n }\n }\n }",
"public static void gereCandidatos() {\n\t\tString idE, titulo, op, numCandidatos, nomeP;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint check = 0, num, i;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tString msgServer = \"\";\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao a qual pretende adicionar uma lista de candidatos:\");\n\t\tidE = sc.nextLine();\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o titulo da lista:\");\n\t\t\ttitulo = sc.nextLine();\n\t\t\tif(verificarLetras(titulo) && titulo.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO titulo apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nO que pretende fazer?\\n(1) Adicoes (2) Remocoes\");\n\t\t\top = sc.nextLine();\n\t\t\tif(op.equals(\"1\") || op.equals(\"2\")) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 2\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\tswitch(op) {\n\t\t\tcase \"1\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a adicionar:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\tint tries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.adicionaCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a remover:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\ttries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.removeCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n public Cliente buscarCliente(String cedula) throws Exception {\r\n return entity.find(Cliente.class, cedula);//busca el cliente\r\n }",
"People getUser();",
"Person fetchPersonById(Person person);",
"public static void main(String[] args) {\n char resp = 's';\n int cont = 0;\n\n ArrayList listaPersonajes = new ArrayList();\n ArrayList<Personaje> lista_buena = new ArrayList();\n lista_buena.add(new Personaje(\"mago\", \"humano\", \"norfair\", 1.68, 88, \"vende chiles\", 150, \"juan\"));\n lista_buena.add(new Personaje(\"picaro\", \"enano\", \"zebes\", 2.58, 350, \"YES\", 185, \"Ricardo\"));\n lista_buena.add(new Personaje(\"barbaro\", \"humano\", \"maridia\", 1.50, 500, \"es inutil\", 158, \"egroj\"));\n lista_buena.add(new Personaje(\"clerigo\", \"elfo\", \"crateria\", 1.70, 55, \"es muy creido\", 85, \"pipe\"));\n while (resp == 's' || resp == 's') {\n System.out.println(\"0 Salir\");\n System.out.println(\"1 Crear Personaje\");\n System.out.println(\"2 Modificar personaje\");\n System.out.println(\"3 Ver atributos de personaje\");\n System.out.println(\"4 Eliminar personaje\");\n System.out.println(\"5 Combate\");\n System.out.print(\"ingrese opcion\");\n int opcion = leer.nextInt();\n\n switch (opcion) {\n case 0:\n System.exit(0);\n break;\n case 1:\n if (cont > 4) {\n System.out.println(\"no se pueden mas personajes\");\n break;\n }\n System.out.println(\"clerigo, barbaro, mago o picaro\");\n System.out.print(\"Eliga su Clase: \");\n String clase = leer.next();\n if (clase.contains(\"clerigo\") || clase.contains(\"barbaro\") || clase.contains(\"mago\") || clase.contains(\"picaro\")) {\n\n } else {\n System.out.println(\"usted no puede elejir esa clase\");\n System.out.print(\"Eliga su Clase: \");\n clase = leer.next();\n }\n\n //\n listaPersonajes.add(cont, clase);\n System.out.println(\"Ingrese su nombre\");\n String nombre = leer.next();\n listaPersonajes.add(cont, nombre);\n //\n System.out.println(\"mediano, enano, elfo o humano\");\n System.out.print(\"ingrese raza: \");\n String raza = leer.next();\n if (raza.contains(\"mediano\") || raza.contains(\"enano\") || raza.contains(\"elfo\") || raza.contains(\"humano\")) {\n\n } else {\n System.out.println(\"no puede ser de esa raza\");\n System.out.print(\"ingrese raza:\");\n raza = leer.next();\n }\n listaPersonajes.add(cont, raza);\n System.out.println(\"ingrese estatura: \");\n double estatura = leer.nextDouble();\n listaPersonajes.add(cont, estatura);\n //\n System.out.println(\"ingrese peso: \");\n double peso = leer.nextDouble();\n listaPersonajes.add(cont, peso);\n //\n System.out.println(\"ingrese edad: \");\n int edad = leer.nextInt();\n listaPersonajes.add(cont, edad);\n //\n System.out.println(\"ingrese descripcion: \");\n leer.nextLine();\n String descrip = leer.nextLine();\n listaPersonajes.add(cont, descrip);\n //\n System.out.println(\"norfair ,brinstar , maridia, zebes o crateria\");\n System.out.print(\"ingrese nacionalidad: \");\n String nacion = leer.next();\n //\n if (nacion.contains(\"norfair\") || nacion.contains(\"brinstatr\") || nacion.contains(\"maridia\") || nacion.contains(\"zebes\") || nacion.contains(\"crateria\")) {\n\n } else {\n System.out.println(\"no puede ser de esa region: \");\n System.out.print(\"ingrese nacionalidad: \");\n nacion = leer.next();\n }\n\n //\n lista_buena.add(new Personaje(clase, raza, nacion, estatura, edad, descrip, peso, nombre));\n cont++;\n break;\n case 2:\n System.out.println(\"que posicion de pesonaje desea modificar\");\n int perso_mod = leer.nextInt();\n modificacion(perso_mod, lista_buena);\n break;\n case 3:\n\n for (Object o : lista_buena) {\n System.out.println(o);\n System.out.println();\n }\n\n break;\n case 4:\n System.out.println(\"Que personaje desea eliminar\");\n int elim = leer.nextInt();\n lista_buena.remove(elim);\n break;\n case 5:\n System.out.println(\"no funcio\");\n break;\n default:\n resp = 'n';\n }\n }\n\n }",
"private Equipo buscarEquipoPorNombre(String buscado) {\n for (int i = 0; i < equipos.size(); i++) {\n if (equipos.get(i).getNombre().equalsIgnoreCase(buscado)) {\n return equipos.get(i);\n }\n }\n return null;\n }",
"public Cuenta buscarCuentaId(String num)\n\t{\n\n\t\tCliente p;\n\n\t\tSet<String> ll = clientes.keySet();\n\t\tList<String> li = new ArrayList<String>(ll);\n\t\tListIterator<String> it = li.listIterator();\n\t\tListIterator<Cuenta> cu;\n\t\tCuenta c;\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\tp = clientes.get(it.next());\n\t\t\tcu = p.getCuentas().listIterator();\n\t\t\twhile(cu.hasNext())\n\t\t\t{\n\t\t\t\tc = cu.next();\n\t\t\t\tif (c.getId() == Long.parseLong(num))\n\t\t\t\t\treturn c;\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\treturn null;\n\t\t\n\t}",
"public List<Usuario> buscarPorNombre(String nombre) throws SQLException {\n PreparedStatement preSt = connection.prepareStatement(USUARIOS_POR_NOMBRE);\n preSt.setString(1, \"%\" + nombre + \"%\");\n ResultSet result = preSt.executeQuery();\n\n List<Usuario> usuario = new LinkedList<>();\n\n while (result.next()) {\n usuario.add(new Usuario(\n result.getInt(Usuario.USUARIO_ID_DB_NAME),\n result.getString(Usuario.NOMBRE_DB_NAME),\n result.getString(Usuario.PROFESION_DB_NAME),\n result.getString(Usuario.PASSWORD_DB_NAME)\n ));\n }\n System.out.println(\"Usuarios: \" + usuario.size());\n return usuario;\n }",
"public Persona(String nombre) {\n this.nombre = nombre;\n }",
"private void muestraPersona(JSONArray genero) {\n\tJSONArray a = (JSONArray) genero.get(0);\n\t// txtId.setText(Long.toString( (Long) a.get(0)) );\n\t//txtBuscar.setText((String) a.get(1));\n\t// textFecha.setText((String) a.get(2));\n\t// textUsu.setText((String) a.get(4));\n\tcodTemporal = a.get(0).toString();\n\n\thabilita(true, false, false, false, false, true, false, true, true);\n }",
"public static void main(String[] args) {\n\t\t\r\n\tString nombre = leerTexto(\"Ingrese un nombre:\");\r\n\tint edad = leerNumero(\"Ingrese su edad:\");\r\n\tString rut = leerTexto(\"Ingresa el RUT:\");\r\n\tchar genero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tfloat peso = leerNumero(\"Ingrese peso:\");\r\n\tfloat altura = leerNumero(\"Ingrese la altura:\");\r\n\tPersona claudia = new Persona(nombre, rut, edad, genero, peso, altura);\r\n\t\r\n\tnombre = leerTexto(\"Ingrese un nombre:\");\r\n\tedad = leerNumero(\"Ingrese su edad:\");\r\n\trut = leerTexto(\"Ingresa el RUT:\");\r\n\tgenero = leerTexto(\"Ingresa el genero: (M/F/O)\").charAt(0);\r\n\tPersona juliano = new Persona(nombre, rut, edad, genero);\r\n\t\r\n\tPersona noelia = new Persona();\r\n\tnoelia.setNombre(leerTexto(\"Ingresa un nombre\"));\r\n\tnoelia.setEdad(leerNumero(\"Ingresa la edad\"));\r\n\tnoelia.setRut(leerTexto(\"Ingresa el RUT\"));\r\n\tnoelia.setGenero(leerTexto(\"Ingresa el genero\").charAt(0));\r\n\tnoelia.setAltura(leerNumero(\"Ingresa la altura\"));\r\n\tnoelia.setPeso(leerNumero(\"Ingresa el peso\"));\r\n\t\r\n\tPersona[] perso = new Persona[3];\r\n\tperso[0] = claudia;\r\n\tperso[1] = juliano;\r\n\tperso[2] = noelia;\r\n\t\r\n\tfor (Persona persona : perso) {\r\n\t\tif (persona.calcularIMC()==Persona.PESO_BAJO) {\r\n\t\t\tescribir(\"Pongale sus buenas cazuelas\");\r\n\t\t}else {\r\n\t\t\tif (persona.calcularIMC()==Persona.PESO_IDEAL) {\r\n\t\t\t\tescribir(\"Estamos tiki taka\");\r\n\t\t\t}else {\r\n\t\t\t\tescribir(\"Menos coffe break!\");\r\n\t\t\t}\r\n\t\t}\r\n\t\t//Mayor de edad\r\n\t\tescribir(\"La persona \" + persona.getNombre() + \" es mayor de edad? \" + persona.esMayorDeEdad());\r\n\t\t//Mostrar el toString()\r\n\t\tescribir(persona.toString());\r\n\t }\r\n\t}",
"public void searchPerson() {\r\n\r\n\t/*get values from text filed*/\r\n\tname = tfName.getText();\r\n\r\n\t/*clear contents of arraylist if there are any from previous search*/\r\n\tpersonsList.clear();\r\n\r\n // intialize recordNumber to zero\r\n\trecordNumber = 0;\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to search.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*get an array list of searched persons using PersonDAO*/\r\n\t\tpersonsList = pDAO.searchPerson(name);\r\n\r\n\t\tif(personsList.size() == 0)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No record found.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/*downcast the object from array list to PersonInfo*/\r\n\t\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\t\ttfName.setText(person.getName());\r\n\t\t\ttfAddress.setText(person.getAddress());\r\n\t\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\t\ttfEmail.setText(person.getEmail());\r\n\t\t}\r\n\t}\r\n\r\n }",
"public Persona personasolicitudByDNI(String per_id) throws Exception {\r\n\t\tPersona f = null;\r\n\t\tResultSet consulta = conDao\r\n\t\t\t\t.consultaSQL(\"SELECT p.per_id as dni , p.per_nombres as nombres, \"\r\n\t\t\t\t\t\t+ \" p.per_apellidos as apellidos, p.per_correo as correo, \"\r\n\t\t\t\t\t\t+ \" f.fun_cargo as cargo, f.fun_jefe_inmediato as jefe, f.fun_gerencia as gerencia, f.fun_direccion as direccion, \"\r\n\t\t\t\t\t\t+ \" (select pe.per_nombres||' '||pe.per_apellidos \"\r\n\t\t\t\t\t\t+ \" from gen_persona pe where pe.per_id=f.fun_jefe_inmediato) as nombreJefe, \"\r\n\t\t\t\t\t\t+ \" (select pe.per_correo from gen_persona pe where pe.per_id=f.fun_jefe_inmediato) as correojefeinmediato\"\r\n\t\t\t\t\t\t+ \" FROM gen_persona p INNER JOIN gen_usuario u ON p.per_id = u.per_id \"\r\n\t\t\t\t\t\t+ \" INNER JOIN gen_funcionario f on f.per_id = u.per_id \"\r\n\t\t\t\t\t\t+ \" WHERE p.per_id = '\" + per_id + \"'\");\r\n\t\tif (consulta != null) {\r\n\t\t\tconsulta.next();\r\n\t\t\tf = new Persona();\r\n\t\t\tf.setPerDNI(consulta.getString(\"dni\"));\r\n\t\t\tf.setPerNombres(consulta.getString(\"nombres\"));\r\n\t\t\tf.setPerApellidos(consulta.getString(\"apellidos\"));\r\n\t\t\tf.setPerCorreo(consulta.getString(\"correo\"));\r\n\t\t\tf.setCargo(consulta.getString(\"cargo\"));\r\n\t\t\tf.setJefeInmediato(consulta.getString(\"jefe\"));\r\n\t\t\tf.setPerGerencia(consulta.getString(\"gerencia\"));\r\n\t\t\tf.setPerDireccion(consulta.getString(\"direccion\"));\r\n\t\t\tf.setCorreoJefeInmediato(consulta.getString(\"correojefeinmediato\"));\r\n\t\t}\r\n\t\treturn f;\r\n\t}",
"List<Persona> obtenerTodasLasPersona();",
"public abstract SmartObject findIndividualName(String individualName);",
"public void getPassportOfPerson(String s) {\n Optional<Person> per = personRepo.findById(s);\n if(per.isEmpty())\n System.out.println(\"person is empty at 456\");\n else {\n //print passport id of person\n System.out.println(per.get().getPassport().getPassId());\n System.out.println(per.get().getPassport().getPassNum());\n }\n\n }",
"public int buscarCuenta (String cuenta){// busca el dni de los jugadores pasando un parametro cuenta valido\r\n\t\tString cadena=\"SELECT Dni_Jugador FROM jugadores where Cuenta_Bancaria='\"+cuenta+\"'\";\r\n\t\ttry{\r\n\t\t\tthis.abrir();\r\n\t\t\ts=c.createStatement(); // similar al anterior\r\n\t\t\treg=s.executeQuery(cadena);\r\n\t\t\twhile(reg.next()){ //mientras exista un próximo registro, retorna 1 o 0 si no hay mas registros\r\n\t\t\t\ts.close();\r\n\t\t\t\tthis.cerrar();\r\n\t\t\t\treturn 1;\r\n\t\t\t}\r\n\t\t\ts.close();\r\n\t\t\tthis.cerrar();\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t\tcatch ( SQLException e){\r\n\t\t\tthis.cerrar();\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t}",
"public Empleado SearchOne(String apellido) throws SQLException {\r\n ResultSet rs;\r\n /*Sentencia SQL*/\r\n String sql = \"SELECT * FROM empleados WHERE apellido = ?\";\r\n PreparedStatement sentencia = conexion.prepareStatement(sql);\r\n /*Setteamos los valores de la sentencia*/\r\n sentencia.setString(1, apellido);\r\n /*Ejecutar la sentencia*/\r\n sentencia.execute();\r\n rs = sentencia.getResultSet();\r\n rs.next();\r\n /*Guardamos los datos en el objeto*/\r\n Empleado emp = new Empleado(rs.getInt(\"emp_no\"), rs.getString(\"apellido\"), rs.getString(\"oficio\"), rs.getInt(\"dir\"), rs.getDate(\"fecha_alt\"), rs.getFloat(\"salario\"), rs.getFloat(\"comision\"), rs.getInt(\"dept_no\")); \r\n return emp;\r\n }",
"public UsuarioDTO consultarUsuario(String idAfiliado);",
"public int getIdPersona(){\n return idPersona;\n}",
"public void consultarListasPersonas(){\n SQLiteDatabase db = conn.getReadableDatabase();\n Personal personal = null;\n listaPersonales = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM personal\", null);\n while(cursor.moveToNext()){\n personal = new Personal();\n personal.setId(cursor.getInt(0));\n personal.setNombre(cursor.getString(1));\n personal.setApellido(cursor.getString(2));\n personal.setHoraEntrada(cursor.getInt(3));\n personal.setHoraSalida(cursor.getInt(4));\n personal.setId_laboratorio(cursor.getInt(5));\n listaPersonales.add(personal);\n }\n db.close();\n obtenerLista();\n }",
"public List<Usuario> buscaUsuarioNome(String nome) {\r\n\t\tList<Usuario> retorno = new LinkedList<Usuario>();\r\n\r\n\t\tfor (Usuario usuario : listaDeUsuarios) {\r\n\t\t\tif (usuario.getNome().equals(nome)) {\r\n\t\t\t\tretorno.add(usuario);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn retorno;\r\n\t}",
"public void cargarNombre() {\n\n System.out.println(\"Indique nombre del alumno\");\n nombre = leer.next();\n nombres.add(nombre);\n\n }",
"public Vehiculo buscarVehiculo(String patente) {\n return vehiculos.get(patente);\n }",
"public People getPeopleById(Long id);",
"public void findbyid() throws Exception {\n try {\n Ume_unidade_medidaDAO ume_unidade_medidaDAO = getUme_unidade_medidaDAO();\n List<Ume_unidade_medidaT> listTemp = ume_unidade_medidaDAO.getByPK( ume_unidade_medidaT);\t \n\n ume_unidade_medidaT= listTemp.size()>0?listTemp.get(0):new Ume_unidade_medidaT();\n \n } catch (Exception e) {\n e.printStackTrace();\n setMsg(\"Falha ao realizar consulta!\");\t\n } finally {\n\tclose();\n }\n }",
"public PersonManage queryPersonCnameById(String id) {\n\t\treturn getSqlSession().selectOne(NAME_SPACE+\".findById\",id);\n\t}",
"public List<PersonEntity> obtenerDatosPersonasPorId(int idCliente) {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes filtrando por ID\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONA_ID(), PersonEntity.class)\n\n\t\t\t\t\t// Entradas\n\t\t\t\t\t.registerStoredProcedureParameter(1, Integer.class, ParameterMode.IN)\n\n\t\t\t\t\t// Parametros\n\t\t\t\t\t.setParameter(1, idCliente);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONA_ID() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}",
"@Override\n\tpublic void searchByID() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Patient's ID\").toString().equals(search))\n\t\t\t\tSystem.out.print(\n\t\t\t\t\t\t++count + \" Name:\" + jsnobj.get(\"Patient's name\") + \" ID:\" + jsnobj.get(\"Patient's ID\")\n\t\t\t\t\t\t\t\t+ \" Mobile:\" + jsnobj.get(\"Mobile\") + \" Age:\" + jsnobj.get(\"Age\"));\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}",
"public void mostraDoctorsPerEspecialitat() throws SQLException, IOException {\n\n\t\tmostraEspecialitats();\n\t\t\n\t\tBufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\t\tSystem.out.println(\"Introduce el ID de la especialidad:\");\n\t\tint id=Integer.parseInt(br.readLine());\n\t\tStatement st=conn.createStatement();\n\t\tResultSet rs=st.executeQuery(\"SELECT doc_number, d.name, address,city,phone FROM doctor d, speciality s WHERE d.speciality=s.id AND s.id=\"+id);\n\t\t\n\t\tSystem.out.println(\"################################\");\n\t\tSystem.out.println(\"#### DOCTORES ###\");\n\t\tSystem.out.println(\"################################\\n\");\n\t\t\n\t\twhile(rs.next()){\n\t\t\tSystem.out.println(\"\\tIdentificador: \"+rs.getString(\"doc_number\")+\"\\n\\tNombre: \"+rs.getString(\"name\")+\"\\n\\tDireccion: \"+rs.getString(\"address\")+\"\\n\\tCiudad: \"+rs.getString(\"city\")+\"\\n\\tTeléfono: \"+rs.getString(\"phone\"));\n\t\t\tSystem.out.println(\"\\t----------\");\n\t\t}\n\t\trs.close();\n\t\tst.close();\n\t}",
"String selectNumeroManifiestoAeat(final Long srvcId);",
"public boolean buscarPorIdentificador(String identificador){\n Nodo_Bodega Temporal = Nodo_bodega_inicial;\n if(Size==0){\n return false;\n }else{\n if(Temporal.obtenerIdentificador().equals(identificador)){\n return true;\n }\n }\n \n while(Temporal.obtenerSiguiente()!= null){\n Temporal = Temporal.obtenerSiguiente();\n if(Temporal.obtenerIdentificador().equals(identificador)){\n return true;\n }\n }\n return false;\n }",
"public Etiqueta buscador(String nombreEtiqueta){\n for(int i = 0;i < listaEtiquetas.size();i++){\n if(this.listaEtiquetas.get(i).getEtiqueta().equals(nombreEtiqueta)){ //Si coincide el nombre de la etiqueta, se retorna\n return this.listaEtiquetas.get(i);\n }\n }\n return null;\n }",
"@Override\n\tpublic Ingrediente buscarIngredientePorNombre(String nombre) {\n\t\t\n\t final Session session = this.sessionFactory.getCurrentSession();\n\t return (Ingrediente) session.createCriteria(Ingrediente.class)\n\t .add(Restrictions.eq(\"nombre\",nombre) )\n\t .uniqueResult();\n\t \n \n \n\t\t//\n\n\t/*\t\n\t\t//1.native query CASO DONDE SOLO PUEDO USARLO? \n\tSQLQuery query =\tsessionFactory.getCurrentSession().createSQLQuery(\"SELECT * FROM ingrediente where nombre like '%\"+nombre+\"%'\");\n\t List <Ingrediente> ingredientes = query.list();\n\t\n\t //2.queries no se si importe bien el query\n\t\n\t \tQuery query2 =\tsessionFactory.getCurrentSession().createQuery(\"from auto where id=:id\");\n\t\tquery2.setString(\"id\",nombre);\n\t\t\n\t\tIngrediente ingredientes2 =(Ingrediente) query.uniqueResult();\n\t\t\t\n\t\tDIO VERDE\n\t\t\n\t\treturn null;*/\n\t}",
"public ProfesorImpl buscarPorID(int ID, String ruta)\n\t{\n\t\tFile fichero = null;\n\t\tFileReader reader = null;\n\t\tBufferedReader br = null;\n\t\tProfesorImpl profesor = null;\n\t\t\n\t\ttry\n\t\t{\n\t\t\tfichero = new File(ruta);\n\t\t\treader = new FileReader(fichero);\n\t\t\tbr = new BufferedReader(reader);\n\t\t\t\n\t\t\t//int IDLeidoStr = reader.read();\n\t\t\t//String registro = br.readLine(); //Lee el primer registro\n\t\t\t\n\t\t\tString linea = br.readLine();\t//Leer la primera línea\n\t\t\tString IDLeido = null;\n\t\t\tString[] array = null;\n\t\t\t\n\t\t\tif(linea != null)\t//Si el registro no está vacio\n\t\t\t{\n\t\t\t\tarray = linea.split(\",\");\t\t\t//guardar los campos\n\t\t\t\tIDLeido = array[0];\t\t\t\t\t//El primer ID\n\t\t\t}\n\t\t\twhile(linea != null && Integer.parseInt(IDLeido) != ID)\t\t//Si el registro no está vacío ni coincide con la ID a buscar.\n\t\t\t{\n\t\t\t\tlinea = br.readLine();\t\t//leer otra línea\n\t\t\t\tif(linea != null)\n\t\t\t\t{\n\t\t\t\t\tarray = linea.split(\",\");\n\t\t\t\t\tIDLeido = array[0]; \t//El ID del siguiente\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(linea != null)\t\t\t//Si ha encontrado el ID\n\t\t\t{\n\t\t\t\tString nombre = array[1];\n\t\t\t\tString sexoStr = array[2];\n\t\t\t\tString edadStr = array[3];\n\t\t\t\t\n\t\t\t\t//System.out.println(\"\" + IDLeido + nombre + sexoStr + edadStr);\n\t\t\t\t\n\t\t\t\tchar sexo = sexoStr.charAt(0);\n\t\t\t\tint edad = Integer.parseInt(edadStr);\n\t\t\t\t\n\t\t\t\tprofesor = new ProfesorImpl(ID, nombre, sexo, edad);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tSystem.out.println(e);\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\ttry\n\t\t\t{\n\t\t\t\treader.close();\n\t\t\t\t//entradaFichero.close();\n\t\t\t}\n\t\t\tcatch(IOException e)\n\t\t\t{\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn profesor;\n\t}",
"@Override\n\tpublic Person findPerson(String login) {\n\t\t// Queries komen in EJB\n\t\t\n\t\tQuery q = em.createQuery(\"SELECT p FROM Person p WHERE p.login = :login\");\n\t\tq.setParameter(\"login\", login);\n\t\tList<Person> persons=new ArrayList<>();\n\t\t\n\t\tpersons = q.getResultList();\n\t\t\n\t\tif(persons.size() == 1){\n\t\t\treturn persons.get(0);\n\t\t}\n\t\telse return null;\n\t}",
"public Empleado buscarPorId(Short idEmpleado) {\n\t\tEmpleado empleado;\n\t\templeado = entityManager.find(Empleado.class, idEmpleado);\n\t\t//JPAUtil.shutdown();\n\t\treturn empleado;\n\t}",
"public Tipo findByFullName(String nombre) throws TipoDaoException;",
"public String generaIDPortalEmpleo(EmpresaPorAutorizarVO vo){\n\t\tString idPortalEmpleo = \"\";\t\t\n\t\tint digitoVerificador = 1;\n\t\tFormat formatter = new SimpleDateFormat(\"yyMMdd\");\t\t\n\t\ttry {\n\t\t\tDomicilioVO domicilio = vo.getDomicilio();\n\t\t\tif(vo.getIdTipoPersona() == Constantes.TIPO_PERSONA.PERSONA_FISICA.getIdTipoPersona()){\n\t\t\t\t//Tipo de Persona Física\n\t\t\t\tif(vo.getApellido2().isEmpty()){\n\t\t\t\t\t//Primeras tres letras del apellido paterno\n\t\t\t\t\t//System.out.println(\"--original--strApellido1:\" + vo.getApellido1());\n\t\t\t\t\tString strApellido1 = convertAccents(vo.getApellido1());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido1:\" + strApellido1);\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido1.substring(0, 3);\t\n\t\t\t\t} else {\n\t\t\t\t\t//Primeras dos letras del apellido paterno\n\t\t\t\t\t//Primera letra del apellido materno\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"--original--strApellido1:\" + vo.getApellido1());\n\t\t\t\t\tString strApellido1 = convertAccents(vo.getApellido1());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido1:\" + strApellido1);\t\t\t\t\t\n\t\t\t\t\t//System.out.println(\"--original--strApellido2:\" + vo.getApellido2());\n\t\t\t\t\tString strApellido2 = convertAccents(vo.getApellido2());\n\t\t\t\t\t//System.out.println(\"--modificado--strApellido2:\" + strApellido2);\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido1.substring(0, 2);\n\t\t\t\t\tidPortalEmpleo = idPortalEmpleo + strApellido2.substring(0, 1);\n\t\t\t\t}\n\t\t\t\t//Primera letra del nombre\n\t\t\t\t//System.out.println(\"--original--strNombre:\" + vo.getNombre());\n\t\t\t\tString strNombre = convertAccents(vo.getNombre());\n\t\t\t\t//System.out.println(\"--modificado--strNombre:\" + strNombre);\t\t\t\t\t\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + strNombre.substring(0, 1);\n\t\t\t\t//Fecha de nacimiento en formato yymmdd\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + formatter.format(vo.getFechaNacimiento());\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t} else {\n\t\t\t\t//Tipo de Persona Moral\t\t\t\t\t\n\t\t\t\tString strRazonSocial = convertAccents(vo.getRazonSocial());\n\t\t\t\t//Primeras tres letras de razón social\n\t\t\t\t//COMENTAR EN PRODUCCION\t\t\t\t\t\t\t\t\t\n\t\t\t\tif (strRazonSocial.length() < 3) \n\t\t\t\t\tstrRazonSocial = StringUtils.rightPad(strRazonSocial, 3, \"X\");\n\t\t\t\t/**/\t\t\n\t\t\t\t//TERMINA COMENTAR EN PRODUCCION\t\t\t\t\n\t\t\t\t//\n\t\t\t\t//System.out.println(\"--modificado--strRazonSocial:\" + strRazonSocial);\t\t\t\t\t\t\t\t\t\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + strRazonSocial.substring(0, 3);\t\n\t\t\t\t//Fecha de acta en formato yymmdd\n\t\t\t\tidPortalEmpleo = idPortalEmpleo + formatter.format(vo.getFechaActa());\n\t\t\t}\n\t\t\tidPortalEmpleo = idPortalEmpleo + domicilio.getCodigoPostal();\t\t\t\n\t\t\t//Código verificador (1)\t\t\t\t\n\t\t\tEmpresaPorAutorizarDAO epaDAO = new EmpresaPorAutorizarDAO();\n\t\t\tdigitoVerificador = epaDAO.obtenerDigitoVerificador(idPortalEmpleo, vo.getIdTipoPersona());\t\n\t\t\t//rellenar\n\t\t\tint lenId = idPortalEmpleo.length();\n\t\t\t//System.out.println(\"------digitoVerificador:\" + digitoVerificador);\n\t\t\tint lenDigito = String.valueOf(digitoVerificador).length();\n\t\t\t//System.out.println(\"------lenDigito:\" + lenDigito);\n\t\t\tint intRelleno = PORTAL_ID_SIZE - (lenId + lenDigito);\n\t\t\t//System.out.println(\"------intRelleno:\" + intRelleno);\n\t\t\tString strRelleno = \"\";\n\t\t\tif(intRelleno>0){\n\t\t\t\tfor(int i=0; i<intRelleno; i++){\n\t\t\t\t\tstrRelleno = strRelleno + \"0\";\n\t\t\t\t}\t\t\t\t\n\t\t\t}\n\t\t\t//System.out.println(\"------strRelleno:\" + strRelleno);\n\t\t\tidPortalEmpleo = idPortalEmpleo + strRelleno + digitoVerificador;\n\t\t\t//System.out.println(\"------idPortalEmpleo:\" + idPortalEmpleo);\n\t\t\n\t\t} catch (RuntimeException e) {\n\t\t\tlogger.error(e.toString());\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t} catch (SQLException e) {\n\t\t\tlogger.error(e.toString());\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t} catch (Exception e) {\n\t\t\tlogger.error(e.toString());\t\t\t\n\t\t\te.printStackTrace();\n\t\t\tthrow new PersistenceException(e);\n\t\t}\t\t\n\t\treturn idPortalEmpleo;\n\t}"
] | [
"0.71048063",
"0.63827324",
"0.62477523",
"0.6215129",
"0.609532",
"0.6070061",
"0.60552406",
"0.6051394",
"0.60333604",
"0.60136",
"0.6009478",
"0.5951756",
"0.5895132",
"0.58860385",
"0.58395195",
"0.58337355",
"0.5813369",
"0.58063316",
"0.58003443",
"0.57954705",
"0.5770743",
"0.576317",
"0.57586324",
"0.5757937",
"0.5753531",
"0.5740585",
"0.57363445",
"0.5730754",
"0.5725141",
"0.5707671",
"0.5673914",
"0.5645328",
"0.5644453",
"0.5629243",
"0.5625152",
"0.55980337",
"0.5590999",
"0.5556276",
"0.5555444",
"0.55524176",
"0.55365205",
"0.5535586",
"0.5510704",
"0.5509478",
"0.5502481",
"0.5496636",
"0.5492567",
"0.54705274",
"0.5469089",
"0.5468971",
"0.54649425",
"0.5463374",
"0.5448553",
"0.54470515",
"0.5439498",
"0.54379797",
"0.543726",
"0.5420518",
"0.5415132",
"0.54069805",
"0.54041296",
"0.5404069",
"0.5392385",
"0.5391115",
"0.538505",
"0.53840125",
"0.5383931",
"0.53678906",
"0.5366112",
"0.5362898",
"0.5362869",
"0.53619605",
"0.53618616",
"0.53600806",
"0.5355785",
"0.53551465",
"0.5354973",
"0.5349394",
"0.5348637",
"0.53448576",
"0.53373986",
"0.5336931",
"0.5336362",
"0.5335865",
"0.53347504",
"0.53318703",
"0.53303146",
"0.5319523",
"0.5317537",
"0.53171265",
"0.53076124",
"0.53071105",
"0.5301623",
"0.5297973",
"0.52912503",
"0.5284726",
"0.52792454",
"0.5277054",
"0.52766514",
"0.52760524",
"0.52741605"
] | 0.0 | -1 |
Recupera la lista de personajes | @Override
public List<Person> getPeople() {
return this.personRepository.findAll();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<String> getListe()\n\t\t\t{\n\t\t\t\treturn personnes;\n\t\t\t}",
"public void obtenerLista(){\n listaInformacion = new ArrayList<>();\n for (int i = 0; i < listaPersonales.size(); i++){\n listaInformacion.add(listaPersonales.get(i).getId() + \" - \" + listaPersonales.get(i).getNombre());\n }\n }",
"List<Persona> obtenerTodasLasPersona();",
"public List<persona> listar() {\n\t\tList<persona>lista= new ArrayList<>();\n\t\t\n\t\tString sql=\"SELECT * FROM TABLA.TABLA;\";\n\t\ttry {\n\t\t\n\t\tcon = c.conectar();\n\t\tps= con.prepareStatement(sql);\n\t\trs=ps.executeQuery();\n\t\t\n\t\twhile(rs.next()) {\n\t\t\tPersona p= new persona();\n\t\t\tp.setId(rs.getString(1));\n\t\t\tp.setNom(rs.getString(2));\n\t\t\tlista.add(p);\n\t\t}\n\t}catch (Exception e) {\n\t\t\n\t}return lista;\n\t\n\t}",
"public ArrayList< UsuarioVO> listaDePersonas() {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios\");\r\n\t ResultSet res = consulta.executeQuery();\r\n\t while(res.next()){\r\n\t\t UsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }",
"public List<PersonEntity> obtenerDatosPersonas() {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONAS(), PersonEntity.class);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONAS() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}",
"public ArrayList<Personne> getListPersonne() {\n\t\treturn listPersonne;\n\t}",
"public void restartPersonajes() {\n this.listaPersonajes = new ArrayList<Personaje>();\n }",
"@Override\n public Retorno_MsgObj obtenerLista() {\n PerManejador perManager = new PerManejador();\n\n return perManager.obtenerLista(\"Inscripcion.findAll\", null);\n }",
"private void reposicionarPersonajes() {\n // TODO implement here\n }",
"public List<Person> createPerson() throws ParseException {\n\t\tList<Person> lespersons = new ArrayList<Person>();\n\t\tint numOfPersons = manager.createQuery(\"Select p From Person p\", Person.class).getResultList().size();\n\n if (numOfPersons == 0) {\n \tSimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n \tPerson p1 = new Person(\"dupont\", \"paul\", \"paul.dupont@gg.fr\", \"M\", \"http://\", simpleDateFormat.parse(\"06/12/1965\"));\n \tPerson p2 = new Person(\"durand\", \"gerard\", \"gerard.durand@gg.fr\", \"F\", \"http://\", simpleDateFormat.parse(\"06/04/1965\"));\n \tPerson p3 = new Person(\"Pierre\", \"martin\", \"pierre.martin@gg.fr\", \"M\", \"http://\", simpleDateFormat.parse(\"06/08/1965\"));\n \tp1.getListAmis().add(p2);\n \tp2.getListAmis().add(p1);\n \tp2.getListAmis().add(p3);\n manager.persist(p1);\n manager.persist(p2);\n manager.persist(p3);\n lespersons.add(p1);\n lespersons.add(p2);\n lespersons.add(p3);\n }\n return lespersons;\n\t}",
"public List<PersonaDTO> consultarPersonas() ;",
"@Override\n\tpublic List<Person> getListPeople() {\n\t\tList<Person> people = new ArrayList<>();\n\t\tpeople.add(new Person(\"Juan\", 25));\n\t\tpeople.add(new Person(\"Ana\", 30));\n\t\tpeople.add(new Person(\"Eva\", 42));\n\t\tpeople.add(new Person(\"Piter\", 27));\n\t\tLOG.info(\"HELLO FROM SERVICE\");\n\t\treturn people;\n\t}",
"ArrayList<Professor> professoresFormPend();",
"java.util.List<com.ljzn.grpc.personinfo.PersoninfoMessage> \n getPersonInfoList();",
"public ListaJugadores recuperarJugadores() throws SQLException {\n ListaJugadores listaJugadores = null;\n try {\n getConexion();\n String consulta = \"SELECT nombre FROM JUGADORES\";\n Statement statement = conexion.createStatement();\n ResultSet registros = statement.executeQuery(consulta);\n while (registros.next()) {\n String nombre = registros.getString(\"nombre\");\n Jugador jugador = new Jugador(nombre);\n listaJugadores.agregarJugador(jugador);\n }\n } finally {\n closeConexion();\n }\n return listaJugadores;\n }",
"public List<Persona> todasLasPersonas(){\n\n Iterable<Persona> ite=repo.findAll();\n Iterator<Persona> it=ite.iterator();\n List<Persona> actualList = new ArrayList<Persona>();\n while (it.hasNext()) {\n actualList.add(it.next());\n }\n\n return actualList;\n }",
"public static void llenarListaProcesados() {\n List<String> lista = Datos.getInstance().getDocumentos();\n if (lista == null) {\n return;\n }\n modelProcesados.clear();\n for (String s : lista) {\n modelProcesados.addElement(s);\n }\n\n }",
"List<Reservation> trouverlisteDeReservationAyantUneDateDenvoieDeMail();",
"public static void listarRegistros() {\n System.out.println(\"\\nLISTA DE TODOS LOS REGISTROS\\n\");\n for (persona ps: pd.listaPersonas()){\n System.out.println(ps.getId()+ \" \"+\n ps.getNombre()+ \" \"+\n ps.getAp_paterno()+ \" \"+ \n ps.getAp_materno()+ \" DIRECCION: \"+ \n ps.getDireccion()+ \" SEXO: \"+ ps.getSexo());\n }\n }",
"public void consultarListasPersonas(){\n SQLiteDatabase db = conn.getReadableDatabase();\n Personal personal = null;\n listaPersonales = new ArrayList<>();\n Cursor cursor = db.rawQuery(\"SELECT * FROM personal\", null);\n while(cursor.moveToNext()){\n personal = new Personal();\n personal.setId(cursor.getInt(0));\n personal.setNombre(cursor.getString(1));\n personal.setApellido(cursor.getString(2));\n personal.setHoraEntrada(cursor.getInt(3));\n personal.setHoraSalida(cursor.getInt(4));\n personal.setId_laboratorio(cursor.getInt(5));\n listaPersonales.add(personal);\n }\n db.close();\n obtenerLista();\n }",
"public List<Joueur> List_Joueur_HommesForComboBox() \r\n {\r\n List<Joueur> j = new ArrayList<>();\r\n String req= \"SELECT * FROM personne WHERE datedestruction is NULL and role = 'Joueur' and sexe='Homme' \";\r\n try {\r\n ResultSet res = ste.executeQuery(req);\r\n while (res.next()) {\r\n \r\n Joueur Jou = new Joueur(\r\n res.getInt(\"idpersonne\"),\r\n \r\n res.getString(\"nom\"),\r\n res.getString(\"prenom\")\r\n );\r\n j.add(Jou);\r\n \r\n System.out.println(\"------- joueurs selectionné avec succés----\");\r\n \r\n }\r\n \r\n } catch (SQLException ex) {\r\n System.out.println(\"----------Erreur lors methode : List_Joueur_Hommes()------\");\r\n }\r\n return j;\r\n \r\n}",
"@Override\r\n\tpublic List<PersonneDTO> getAllPersonne() {\n\t\treturn daoPersonne.getAllPersonne();\r\n\t}",
"@Override\n\tpublic List<Personne> findAllPersonnesConnexion() {\n\t\treturn dao.findAllPersonnesConnexion();\n\t}",
"public List<Person> getPersonList(){\n return personList;\n }",
"@Override\n\tpublic List<Personne> findAllPersonnesAdresse() {\n\t\treturn dao.findAllPersonnesAdresse();\n\t}",
"List<ParqueaderoEntidad> listar();",
"public List<Personname> getPersonnames() {\r\n\r\n if (this.personnames == null) {\r\n\r\n this.personnames = new ArrayList<Personname>();\r\n\r\n }\r\n\r\n return this.personnames;\r\n\r\n }",
"private void carregaLista(Boolean mensagemPrivada) {\n\t\trecuperarListaDeMensagens();\n\t}",
"public static ArrayList<Puntaje> getListadoPuntajes(String jugador)\n {\n ArrayList<Puntaje> listado = new ArrayList<>();\n String rutaPuntaje = \"src/recursos/puntaje.txt\"; \n try \n {\n File archivo = new File(rutaPuntaje);\n if(!archivo.exists())\n return listado;\n\n listado = listadoPuntajes(rutaPuntaje,jugador); \n }\n catch(Exception ex)\n {\n return listado;\n } \n return listado; \n }",
"public ArrayList<InfoMensaje> getMensajes(String usuario) throws Exception;",
"public List<Person> getAllPerson() {\n \t\n //Collection<Person> c = personMap.values();\n List<Person> list = new ArrayList<Person>();\n //list.addAll(c);*/\n list = queryExecutor.selectAll();\n return list;\n }",
"private void getParticipantes() {\n mParticipantes = estudioAdapter.getParticipantes(MainDBConstants.estado + \"= '\" + Constants.STATUS_NOT_SUBMITTED+ \"'\", null);\n //ca.close();\n }",
"java.util.List<People>\n getFriendListList();",
"public ArrayList <String>GroupePers(Personne p1) throws SQLException{\n\t\t\tArrayList <String> groupe = new ArrayList<String>();\n\t\t\tString req =\"Select NomGroupe from Groupe where NomComptePers= ?\";\n\t\t\tPreparedStatement ps=DBConfig.getInstance().getConn().prepareStatement(req);\n\t\t\tps.setString(1,p1.getNomComptePers());\n\t\t\tResultSet rs = ps.executeQuery();\n\t\t\twhile (rs.next()) {\n\t\t\t\t\n\t\t\t\tgroupe.add(rs.getString(1));\n\t\t\t}\n\t\t\treturn groupe;\n\t\t\t\n\t\t}",
"public ArrayList<DatosNombre> listaNombre(){\n \n ArrayList<DatosNombre> respuesta = new ArrayList<>();\n Connection conexion = null;\n JDBCUtilities conex = new JDBCUtilities();\n \n try{\n conexion= conex.getConnection();\n \n String query = \"SELECT usuario, contrasenia, nombre\"\n + \" FROM empleado\"\n + \" WHERE estado=true\";\n \n PreparedStatement statement = conexion.prepareStatement(query);\n ResultSet resultado = statement.executeQuery();\n \n while(resultado.next()){\n DatosNombre consulta = new DatosNombre();\n consulta.setUsuario(resultado.getString(1));\n consulta.setContrasenia(resultado.getString(2));\n consulta.setNombreAnt(resultado.getString(3));\n \n respuesta.add(consulta);\n }\n }catch(SQLException e){\n JOptionPane.showMessageDialog(null, \"Error en la consulta \" + e);\n }\n return respuesta;\n }",
"public static ArrayList<Puntaje> listadoPuntajes(String ruta, String jugador)\n { \n ArrayList<String> listadoPuntajes = helper.HelperArchivo.leerLineasArchivo(ruta);\n ArrayList<Puntaje> listado = new ArrayList<>(); \n int nivel;\n double puntajeGanado;\n \n for(String puntaje : listadoPuntajes)\n {\n System.out.println(\"puntaje=\"+puntaje);\n String[] puntajePart = puntaje.split(\",\"); \n if(jugador.equalsIgnoreCase(puntajePart[0]))\n { \n nivel = Integer.parseInt(puntajePart[1]);\n puntajeGanado = Double.parseDouble(puntajePart[2]); \n listado.add(new Puntaje(jugador,nivel,puntajeGanado));\n } \n } \n return listado;\n }",
"@Override\r\n\tpublic Collection<PersonaDTO> obtenerListaPersona(Integer codigoCompania) throws ERPException{\r\n\t\treturn this.personaDAO.obtenerListaPersona(codigoCompania);\r\n\t}",
"@GetMapping(\"/listeJoueurs\")\r\n\t@JsonView(Views.Joueur.class)\r\n\t@Transactional\r\n\tpublic List<Joueur> getListejoueurs() {\n\t\treturn partieContext.getParties().get(0).getLstJoueurs();\r\n\t}",
"public ArrayList<ArrayList<String>> listeProjet() throws RemoteException{\r\n\t\t\tArrayList<ArrayList<String>> list = new ArrayList<ArrayList<String>>();\r\n\t\t\t\r\n\t\t String requete=\"Select p_id, p_titre, t_debprojet, t_finprojet From projet, association, groupeassoc,\" +\r\n\t\t \t\t\t\t\" typeprojet Where ga_idetudiant =\" + _etudiant.getId() + \" AND ga_idgroupe = a_idgroupe \" +\r\n\t\t \t\t\t\t\" AND a_idprojet = p_id AND p_idtype = t_id\";\r\n\t\t System.out.println(\"requete : \" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t ArrayList <String> projet = new ArrayList<String>();\r\n\t\t \r\n\t\t String[] line = null;\r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \tArrayList<String> tmp = new ArrayList<String>();\r\n\t\t \tline = data.nextElement();\r\n\t\t \tprojet.add(data.getColumnValue(\"p_id\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"p_titre\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"t_debprojet\"));\r\n\t\t \ttmp.add(data.getColumnValue(\"t_finprojet\"));\r\n\t\t \tlist.add(tmp);\r\n\t\t }\r\n\t\t \r\n\t\t int cpt = 0;\r\n\t\t for (String i : projet){\r\n\t\t \tString note = null;\r\n\t\t \tString requete2 = \"select n_note from note where n_idprojet = \" + i + \" and n_idetudiant = \" +\r\n\t\t \t_etudiant.getId();\r\n\t\t \t\r\n\t\t \tSystem.out.println(\"requete : \" + requete2);\r\n\t\t\t DataSet data2 = database.executeQuery(requete2);\r\n\t\t\t if (!data2.hasMoreElements()) {\r\n\t\t\t \tnote = \"non noté\";\r\n\t\t\t }\r\n\t\t\t else{\r\n\t\t\t \t System.out.println(\"note\");\r\n\t\t\t\t\t note = data2.getColumnValue(\"n_note\");\r\n\t\t\t }\r\n\t\t\t list.get(cpt).add(note);\r\n\t\t\t ++cpt;\r\n\t\t }\r\n\t\t \r\n\t\t for (int i = 0 ; i < list.size() ; ++i)\r\n\t\t {\r\n\t\t \tSystem.out.println(list.get(i));\r\n\t\t }\r\n\t\t \r\n\t\t return list;\r\n\t\t}",
"public List<Jogador> getListaJogadores() {\n terminarAVez();\n return this.listaJogadores;\n }",
"public String[] listadoJugadoresEnMesa() {\n\n\t\tString[] listado = new String[this.jugadoresEnMesa.size()];\n\n\t\tfor (int i = 0; i < this.jugadoresEnMesa.size(); i++)\n\t\t\tlistado[i] = String.format(\"%d - %s\", (i + 1), this.jugadoresEnMesa.get(i).info());\n\n\t\treturn listado;\n\t}",
"@Override\n\tpublic List<Personne> findAllPErsonne() {\n\t\treturn dao.findAllPErsonne();\n\t}",
"public List<Fortaleza> listarFortalezas(){\r\n return cVista.listarFortalezas();\r\n }",
"private void addPersonnageToGame() throws PersonnageOnMultipleJoueurException {\n\t\t\n\t\t// liste de personnage venant d'un joueur\n\t\tList<Personnage> listePersonnageFromJoueur;\n\t\t\n\t\t// liste venant de TurnManager, qui représente la totalité des personnages\n\t\tList<Personnage> listePersonnageFromTurnManager = this.getListePersonnage();\n\t\t\n\t\tIterator<Joueur> iteratorOverListeJoueur = this.getListeJoueur().iterator();\n\t\tIterator<Personnage> iteratorOverListePersonnage;\n\t\n\t\tPersonnage personnage;\n\t\n\t\t// on boucle sur la liste de joueurs\n\t\twhile(iteratorOverListeJoueur.hasNext()){\n\t\t\t\n\t\t\t// on récupère la liste des personnages du joueur suivant\n\t\t\tlistePersonnageFromJoueur = iteratorOverListeJoueur.next().getListePersonnage();\n\t\t\titeratorOverListePersonnage = listePersonnageFromJoueur.iterator();\n\t\t\t\n\t\t\t// on boucle sur la liste de personnages du joueur\n\t\t\twhile(iteratorOverListePersonnage.hasNext()){\n\t\t\t\t\n\t\t\t\t// on récupère le personnage suivant\n\t\t\t\tpersonnage = iteratorOverListePersonnage.next();\n\t\t\t\t\n\t\t\t\t// si le personnage n'existe pas on l'ajoute dans la liste\n\t\t\t\tif(!listePersonnageFromTurnManager.contains(personnage)){\n\t\t\t\t\tlistePersonnageFromTurnManager.add(personnage);\n\t\t\t\t}\n\t\t\t\t// si il existe déjà, il y a une erreur\n\t\t\t\telse {\n\t\t\t\t\tthrow new PersonnageOnMultipleJoueurException();\t\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"java.util.List<People>\n getUserList();",
"@Override\r\n\tpublic List<Person> getPeople() {\n\t\tList<Person> personList = new ArrayList<Person>();\r\n\t\tpersonList.add(getPerson(234L));\r\n\t\tpersonList.add(getPerson(123L));\r\n\t\tpersonList.add(getPerson(345L));\r\n\t\tpersonList.add(getPerson(42L));\r\n\t\treturn personList ;\r\n\t}",
"private void seePerso() {\n\t\tfor (int i = 0; i < persoList.size(); i++) {\n\t\t\tPersonnage perso = persoList.get(i);\n\t\t\tSystem.out.println(\"id : \" + i);\n\t\t\tSystem.out.println(perso);\n\t\t}\n\n\t\tSystem.out.println(\"souhaitez vous modifier un personnage ? o/n\");\n\t\tif (sc.nextLine().toLowerCase().contentEquals(\"o\")) {\n\t\t\tSystem.out.println(\"Lequel ? id\");\n\t\t\tint id = sc.nextInt();\n\t\t\tsc.nextLine();\n\t\t\tchangePerso(id);\n\t\t}\n\t}",
"@Override\n\tpublic List<ActividadesMejora> leerActividad() {\n\n\t\tConnection con = null;\n\t\tStatement stm = null;\n\t\tResultSet rs = null;\n\n\t\tString sql = \"SELECT idactividadmejora, actividadesmejora.nombre as nombre, fechainicio, fechatermino, estado, detalle, profesional_id_profesional, cliente_id_cliente, profesional.nombre || ' ' || apellido as profesional, nombreempresa as cliente FROM actividadesmejora INNER JOIN profesional ON profesional_id_profesional=id_profesional INNER JOIN cliente ON cliente_id_cliente=id_cliente\";\n\n\t\tList<ActividadesMejora> listaActividades = new ArrayList<ActividadesMejora>();\n\n\t\ttry {\n\t\t\tcon = ConexionSingleton.getConnection();\n\t\t\tstm = con.createStatement();\n\t\t\trs = stm.executeQuery(sql);\n\t\t\twhile (rs.next()) {\n\t\t\t\tActividadesMejora c = new ActividadesMejora();\n\t\t\t\tc.setIdActMejora(rs.getInt(\"idactividadmejora\"));\n\t\t\t\tc.setNombre(rs.getString(\"nombre\"));\n\t\t\t\tc.setFechaInicio(rs.getString(\"fechainicio\"));\n\t\t\t\tc.setFechaTermino(rs.getString(\"fechatermino\"));\n\t\t\t\tc.setEstado(rs.getString(\"estado\"));\n\t\t\t\tc.setDetalle(rs.getString(\"detalle\"));\n\t\t\t\tc.setProfesional(rs.getString(\"profesional\"));\n\t\t\t\tc.setCliente(rs.getString(\"cliente\"));\n\t\t\t\tlistaActividades.add(c);\n\t\t\t}\n\t\t\tstm.close();\n\t\t\trs.close();\n\t\t\tcon.close();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Error: Clase ActividadesMejoraDao, metodo leerActividad \");\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn listaActividades;\n\t}",
"public List<Person> getListSynchronsprecher() {\n\t\treturn this.listSynchronsprecher;\n\t}",
"public List<Propriedade> getListaDePropriedadesComMonopolio(){\r\n List<Propriedade> proComMonopolio = new ArrayList<>();\r\n for(Propriedade pro: this.propriedadesDoJogador){\r\n for(String cor: this.monopolioNoGrupoDeCor){\r\n if(pro.getCor().equals(cor)){\r\n proComMonopolio.add(pro);\r\n break;\r\n }\r\n }\r\n }\r\n \r\n return proComMonopolio;\r\n }",
"@ManyToMany//(cascade = {CascadeType.PERSIST, CascadeType.MERGE})\n public List<Person> getParticipants() {\n return participants;\n }",
"@Override\n\tpublic ArrayList<Object[]> parEmplo(String puesto) {\n\t\tfor (Employe emplo : treeMap.values()) {\n\t\t\tif (emplo.getClass().getName().substring(13).equals(puesto)) {\n\t\t\t\t// System.out.println(emplo);\n\t\t\t\tObject[] aux = { emplo.getId(), emplo.getNom(),\n\t\t\t\t\t\templo.getPrenom(), emplo.getDate_N(), emplo.getSexe(),\n\t\t\t\t\t\templo.getRue(), emplo.getNumero(), emplo.getVille(),\n\t\t\t\t\t\templo.getPay(), emplo.getTelef(),\n\t\t\t\t\t\templo.getClass().getName().substring(13) };\n\t\t\t\tarray1.add(aux);\n\t\t\t}\n\t\t}\n\t\treturn array1;\n\t}",
"public ArrayList<String> getNombrePropiedades(){\n ArrayList<String> listaPropiedades = new ArrayList();\n \n for(TituloPropiedad propiedad :propiedades){\n listaPropiedades.add(propiedad.getNombre());\n }\n return listaPropiedades;\n }",
"@Override\r\n public void mostrarProfesores(){\n for(Persona i: listaPersona){\r\n if(i instanceof Profesor){\r\n i.mostrar();\r\n }\r\n }\r\n }",
"public void mailList() {\n for (int index = 0; index < emails.size(); index++) {\n Mensagem mensagem = emails.get(index);\n System.out.println(\"Email \" + index + \": \");\n System.out.println(\"De: \" + mensagem.remetente);\n System.out.println(\"Para: \" + mensagem.destinatario + \"\\n\");\n }\n }",
"public DefaultListModel<Person> getAllPeopleDLM()\r\n\t{\r\n\t\tDefaultListModel<Person> list = new DefaultListModel<Person>();\r\n\t\t\r\n\t\tfor(Person person : this.getAllPeople())\r\n\t\t\tlist.addElement(person);\r\n\t\t\r\n\t\treturn list;\r\n\t}",
"private static void eleccionJugadores() throws ListaVaciaException{\n\t\tif(jugadores.sizeJugadores()>=2){//la lista de jugadores debe ser superior a 1 para poder añadirlos a la lista de participantes\n\t\t\tdo{\n\t\t\t\t\n\t\t\t\tSystem.out.println(jugadores.toString()+\"\\n\"+\"---MAS DE 1 JUGADOR---\");\n\t\t\t\t\ttry {\n\t\t\t\t\t\tjugadorAJugar(Teclado.leerCadena(\"Nombre:\"));//nombre de los jugadores que jugaran en la partida\n\t\t\t\t\t} catch (NombreNoValidoException | JugadorYaExisteException | JugadorNoExisteException e) {\n\t\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t}while(DeseaContinuar.deseaContinuar(\"¿Otro Jugador?(s/n)\") || jugadores.sizeJugadores()<2);\n\t\t}else\n\t\t\tthrow new ListaVaciaException(\"La lista debe contener > 1 jugadores\");\n\t}",
"public List<Proveedores> listProveedores() {\r\n\t\tString sql = \"select p from Proveedores p\";\r\n\t\tTypedQuery<Proveedores> query = em.createQuery(sql, Proveedores.class);\r\n\t\tSystem.out.println(\"2\");\r\n\t\tList<Proveedores> lpersonas = query.getResultList();\r\n\t\treturn lpersonas;\r\n\t}",
"public List<Professor> listarTodos() throws BDException {\n\t\treturn professores;\r\n\t}",
"private void muestraPersona(JSONArray genero) {\n\tJSONArray a = (JSONArray) genero.get(0);\n\t// txtId.setText(Long.toString( (Long) a.get(0)) );\n\t//txtBuscar.setText((String) a.get(1));\n\t// textFecha.setText((String) a.get(2));\n\t// textUsu.setText((String) a.get(4));\n\tcodTemporal = a.get(0).toString();\n\n\thabilita(true, false, false, false, false, true, false, true, true);\n }",
"public ArrayList<Person> getAll() throws IOException, JSONException {\n\t\tif(persons.isEmpty()){\n\t\t\tpersons=getAllFromServer();\n\t\t}\n\t\treturn persons;\n\t}",
"@Override\r\n\tpublic List<Object> consultarVehiculos() {\r\n\t\t\r\n\t\tFormat formato = new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\");\r\n\t\t\r\n\t\treturn AdminEstacionamientoImpl.getParqueadero().stream().map(\r\n\t\t\t\t temp -> {HashMap<String, String> lista = new HashMap<String, String>(); \r\n\t\t\t\t lista.put( \"placa\", temp.getVehiculo().getPlaca() );\r\n\t\t\t\t lista.put( \"tipo\", temp.getVehiculo().getTipo() );\r\n\t\t\t\t lista.put( \"fechaInicio\", formato.format( temp.getFechaInicio() ) );\r\n\r\n\t\t\t\t return lista;\r\n\t\t\t\t }\r\n\t\t\t\t).collect(Collectors.toList());\r\n\t}",
"public static void gereCandidatos() {\n\t\tString idE, titulo, op, numCandidatos, nomeP;\n\t\tScanner sc = new Scanner(System.in);\n\t\tint check = 0, num, i;\n\t\tArrayList<Pessoa> listaCandidatos = new ArrayList<>();\n\t\tString msgServer = \"\";\n\t\t\n\t\tSystem.out.println(\"\\nInsira o id da eleicao a qual pretende adicionar uma lista de candidatos:\");\n\t\tidE = sc.nextLine();\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nInsira o titulo da lista:\");\n\t\t\ttitulo = sc.nextLine();\n\t\t\tif(verificarLetras(titulo) && titulo.length()>0) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nO titulo apenas pode conter letras\");\n\t\t\t}\n\t\t}while(check==0);\n\t\t\n\t\tcheck = 0;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nO que pretende fazer?\\n(1) Adicoes (2) Remocoes\");\n\t\t\top = sc.nextLine();\n\t\t\tif(op.equals(\"1\") || op.equals(\"2\")) {\n\t\t\t\tcheck = 1;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tSystem.out.println(\"\\nA opcao so pode conter digitos de 1 a 2\");\n\t\t\t}\n\t\t}while(check==0);\n\t\tcheck = 0;\n\t\t\n\t\tswitch(op) {\n\t\t\tcase \"1\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a adicionar:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\tint tries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.adicionaCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\tbreak;\n\t\t\tcase \"2\":\n\t\t\t\tdo {\n\t\t\t\t\tSystem.out.println(\"\\nInsira numero de elementos:\");\n\t\t\t\t\tnumCandidatos = sc.nextLine();\n\t\t\t\t\tif(verificarNumeros(numCandidatos)) {\n\t\t\t\t\t\tif (Integer.parseInt(numCandidatos) > 0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tSystem.out.println(\"\\nO numero so pode conter digitos\");\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tnum = Integer.parseInt(numCandidatos);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tfor (i=0; i<num;i++) {\n\t\t\t\t\tdo {\n\t\t\t\t\t\tSystem.out.println(\"\\nInsira o nome do elemento a remover:\");\n\t\t\t\t\t\tnomeP = sc.nextLine();\n\t\t\t\t\t\tif(verificarLetras(nomeP) && nomeP.length()>0) {\n\t\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t\t}\n\t\t\t\t\t\telse {\n\t\t\t\t\t\t\tSystem.out.println(\"\\nO nome apenas pode conter letras\");\n\t\t\t\t\t\t}\n\t\t\t\t\t}while(check==0);\n\t\t\t\t\tPessoa novaP = new Pessoa(nomeP);\n\t\t\t\t\tlistaCandidatos.add(novaP);\n\t\t\t\t\tcheck = 0;\n\t\t\t\t}\n\t\t\t\n\t\t\t\tcheck = 0;\n\t\t\t\ttries = 0;\n\t\t\t\tdo {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tmsgServer = rmiserver.removeCandidatos(idE, titulo, listaCandidatos);\n\t\t\t\t\t\tSystem.out.println(msgServer);\n\t\t\t\t\t\tSystem.out.println(\"\\n\");\n\t\t\t\t\t\tcheck = 1;\n\t\t\t\t\t} catch (RemoteException e1) {\n\t\t\t\t\t\t// Tratamento da Excepcao da chamada RMI addCandidatos\n\t\t\t\t\t\tif(tries == 0) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(6000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries > 0 && tries < 24) {\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tThread.sleep(1000);\n\t\t\t\t\t\t\t\t//faz novo lookup\n\t\t\t\t\t\t\t\trmiserver = (RMI_S_I) Naming.lookup(\"rmi://\"+registryIP+\":\"+registryPort+\"/rmi\");\n\t\t\t\t\t\t\t\trmiserver.subscribeConsola((ADMIN_C_I)consola);\n\t\t\t\t\t\t\t\ttries = 0;\n\t\t\t\t\t\t\t} catch (RemoteException | InterruptedException | MalformedURLException | NotBoundException e) {\n\t\t\t\t\t\t\t\t// FailOver falhou\n\t\t\t\t\t\t\t\ttries++;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else if(tries >= 24) {\n\t\t\t\t\t\t\tSystem.out.println(\"Impossivel realizar a operacao devido a falha tecnica (Servidores RMI desligados).\");\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(check==0);\n\t\t\t\tcheck = 0;\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t}\n\t}",
"@Override\r\n public ArrayList<Mensaje> leerTodosLosMensajes() {\n ArrayList<Mensaje> m = (ArrayList<Mensaje>) session.createCriteria(Mensaje.class).list();\r\n cerrarTodo();\r\n return m;\r\n }",
"public ArrayList<UsuarioVO> consultarPersona(int documento) {\r\n\t ArrayList< UsuarioVO> miUsuario = new ArrayList< UsuarioVO>();\r\n\t Conexion conex= new Conexion();\r\n\t \r\n\t try {\r\n\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM usuarios where cedula_usuario = ? \");\r\n\t consulta.setInt(1, documento);\r\n\t ResultSet res = consulta.executeQuery();\r\n\t \r\n\t if(res.next()){\r\n\t\tUsuarioVO persona= new UsuarioVO();\r\n\t persona.setCedula_usuario(Integer.parseInt(res.getString(\"cedula_usuario\")));\r\n\t persona.setEmail_usuario(res.getString(\"email_usuario\"));\r\n\t persona.setNombre_usuario(res.getString(\"nombre_usuario\"));\r\n\t persona.setPassword(res.getString(\"password\"));\r\n\t persona.setUsuario(res.getString(\"usuario\"));\r\n\t \r\n\t miUsuario.add(persona);\r\n\t }\r\n\t res.close();\r\n\t consulta.close();\r\n\t conex.desconectar();\r\n\t \r\n\t } catch (Exception e) {\r\n\t JOptionPane.showMessageDialog(null, \"Error en la Consulta del Usuario\\n\"+e);\r\n\t }\r\n\t return miUsuario;\r\n\t }",
"public List<ProgressionCourrier> getAllUsers() {\n Query q = getEntityManager().createQuery(\"select U from ProgressionCourrier U order by U.nomPrenoms\");\n // set parameters\n List<ProgressionCourrier> suggestions = q.getResultList();\n\n // avoid returing null to managed beans\n if (suggestions == null) {\n suggestions = new ArrayList<>();\n }\n\n // return the suggestions\n return suggestions;\n\n }",
"ArrayList<String> showUsersRecive() throws SQLException {\r\n String queryMittente = \"SELECT DISTINCT username FROM users JOIN tweet on users.username = tweet.destinatario GROUP BY (username)\";\r\n //Oggetti per interrogare il db\r\n Statement statement=null;\r\n connection=DBConnection.connect();\r\n ResultSet resultSet=null;\r\n //Lista messaggi\r\n ArrayList<String> usersList = new ArrayList<>();\r\n\r\n try {\r\n statement=connection.createStatement();\r\n resultSet = statement.executeQuery(queryMittente);\r\n while(resultSet.next()){\r\n String username = resultSet.getString(\"username\");\r\n usersList.add(username);\r\n }\r\n\r\n return usersList;\r\n }catch (SQLException e){\r\n e.printStackTrace();\r\n }finally {\r\n if (connection!=null) connection.close();\r\n if (statement!=null) statement.close();\r\n if(resultSet!=null) resultSet.close();\r\n }\r\n return null;\r\n }",
"public void listarProvincia() {\n provincias = JPAFactoryDAO.getFactory().getProvinciaDAO().find();\n// for(int i=0;i<provincias.size();i++ ){\n// System.out.println(\"lista:\"+provincias.get(i).getNombreprovincia());\n// }\n }",
"public ArrayList<CandidatoBean> listarCandidatos() {\r\n\r\n Query query = em.createNamedQuery(\"Candidato.findAll\");\r\n ArrayList<CandidatoBean> listCandidatos = new ArrayList<>();\r\n\r\n for (Candidato candidato : (List<Candidato>) query.getResultList()) {\r\n listCandidatos.add(modelMapper.map(candidato, CandidatoBean.class));\r\n }\r\n em.close();\r\n em = null;\r\n return listCandidatos;\r\n }",
"@Override\n\tpublic List<Persona> getPersona() throws SQLException {\n\t\tList<Persona> listaPersona1 = new ArrayList<Persona>();\n\t\t\n Single<List<DbRow>> rows = dbClient.execute(exec -> exec\n \t\t.createQuery(\"select * from persona;\").execute()).collectList();\n \n try {\n List<DbRow> listasPersonas = rows.get();\n \n if(!listasPersonas.isEmpty()) {\n \t\n \tfor(int i=0; i< listasPersonas.size(); i++) {\n \t\tPersona p = new Persona();\n \t\tp.setId((int)listasPersonas.get(i).column(\"id\").value());\n \t\tp.setNombre((String)listasPersonas.get(i).column(\"nombre\").value());\n \t\tp.setDireccion((String)listasPersonas.get(i).column(\"direccion\").value());\n \t\tp.setCorreo((String)listasPersonas.get(i).column(\"correo\").value()); \t\t\n \t\tlistaPersona1.add(p);\n \t}\n \t\n }\n // listasPersonas.forEach(System.out::println);\n \n } catch (InterruptedException e) {\n e.printStackTrace();\n return null;\n } catch (ExecutionException e) {\n e.printStackTrace();\n return null;\n }\n return listaPersona1;\n\t\t\n\t}",
"public List<Perfil> listaPerfilContacto(Perfil perfil) {\n\t\tList<Perfil> lista = perfilDAOImp.listaPerfilContacto(perfil);\n\t\treturn lista;\n\t}",
"public static String buscarTodosLosLibros() throws Exception{ //BUSCARtODOS no lleva argumentos\r\n //primero: nos conectamos a oracle con la clase conxion\r\n \r\n Connection con=Conexion.conectarse(\"system\",\"system\");\r\n //segundo: generamos un statemenr de sql con la conexion anterior\r\n Statement st=con.createStatement();\r\n //3: llevamos a cabo la consulta select \r\n ResultSet res=st.executeQuery(\"select * from persona\"); //reset arreglo enmutado de java estructura de datos\r\n System.out.println(\"depues del select\");\r\n int indice=0;\r\n ArrayList<persona> personas=new ArrayList<persona>();\r\n while(res.next()){ //del primero hasta el ultimo prod que vea SI PONGO SECUENCIA NO ENTRA AL WHILE\r\n Integer id= res.getInt(1); \r\n String nombre=res.getString(2);\r\n String empresa=res.getString(3);\r\n Integer edad=res.getInt(4);\r\n String telefono=res.getString(5);\r\n \r\n ///llenamos el arrayList en cada vuelta\r\n personas.add(new persona(id,nombre,empresa,edad,telefono));\r\n \r\n System.out.println(\"estoy en el array list despues del select\");\r\n }\r\n \r\n //el paso final, transformamos a objeto json con jackson\r\n ObjectMapper maper=new ObjectMapper(); //mapeo a objeto jackson\r\n \r\n st.close();\r\n con.close();\r\n System.out.println(\"convirtiendo el json\");\r\n return maper.writeValueAsString(personas);\r\n \r\n }",
"public void getFkp() throws SQLException{\n \n ResultSet rset = dh.getPerson();\n \n fkp = new ArrayList<>();\n \n int i = 0;\n while(rset.next()){\n fkp.add(new Person(rset.getString(\"Nome\")));\n }\n }",
"public ListaJugadores() {\n\n\t\tListaJugadores.numListasJugadores++;\n\n\t\tthis.id = ListaJugadores.numListasJugadores;\n\n\t\tthis.jugadoresEnMesa = new ArrayList<Jugador>();\n\t\tthis.cargarJugadoresEnMesa();\n\n\t\tif (ListaJugadores.jugadoresRetirados == null) {\n\t\t\tListaJugadores.jugadoresRetirados = new ArrayList<Jugador>();\n\t\t\tthis.cargarJugadoresRetirados();\n\t\t}\n\n\t}",
"public static List<ViajeEntidad> getListaViajesEntidad(){\n List<ViajeEntidad> viajes = new ArrayList<>();\n Date date = new Date();\n ViajeEntidadPK viajePK = new ViajeEntidadPK();\n TaxiEntidad taxiByPkPlacaTaxi = new TaxiEntidad();\n ClienteEntidad clienteByPkCorreoCliente = new ClienteEntidad();\n clienteByPkCorreoCliente.setPkCorreoUsuario(\"gerente11@gerente.com\");\n TaxistaEntidad taxistaByCorreoTaxi = new TaxistaEntidad();\n taxistaByCorreoTaxi.setPkCorreoUsuario(\"gerente11@gerente.com\");\n OperadorEntidad agendaOperador = new OperadorEntidad();\n agendaOperador.setPkCorreoUsuario(\"gerente11@gerente.com\");\n\n viajePK.setPkPlacaTaxi(\"CCC11\");\n viajePK.setPkFechaInicio(\"2019-01-01 01:01:01\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"DDD11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n viajePK.setPkPlacaTaxi(\"EEE11\");\n viajes.add(new ViajeEntidad(viajePK, \"2019-01-01 02:01:01\",\"5000\", 2, \"origen\",\"destino\", \"agenda\", \"agenda2\", taxiByPkPlacaTaxi, clienteByPkCorreoCliente, taxistaByCorreoTaxi, agendaOperador));\n\n return viajes;\n }",
"public List<Person> getListRegisseure() {\n\t\treturn this.listRegisseure;\n\t}",
"public List<RjMes> getAllRjMes()throws Exception{\n\t\tList<RjMes> lista=new LinkedList<RjMes>();\n\t\ttry{\n\t\t\tStringBuffer SQL=new StringBuffer(\"SELECT mes_id,descripcion,estado FROM \").append(Constante.schemadb).append(\".rj_mes order by mes_id asc\");\n\t\t\t\n\t\t\tPreparedStatement pst=connect().prepareStatement(SQL.toString());\n\t\t\tResultSet rs=pst.executeQuery();\n\t\t\twhile(rs.next()){\n\t\t\t\tRjMes obj=new RjMes(); \n\t\t\t\tobj.setMesId(rs.getString(\"mes_id\"));\n\t\t\t\tobj.setDescripcion(rs.getString(\"descripcion\"));\n\t\t\t\tobj.setEstado(rs.getString(\"estado\"));\n\t\t\t\tlista.add(obj);\n\t\t\t}\n\t\t\t\n\t\t}catch(Exception e){\n\t\t\tthrow(e);\n\t\t}\n\t\treturn lista;\n\t}",
"public static List getAllNames() {\n List polovniautomobili = new ArrayList<>();\n try {\n CONNECTION = DriverManager.getConnection(URL, USERNAME, PASSWORD);\n String query = \"SELECT naziv FROM polovni\";\n try (PreparedStatement ps = CONNECTION.prepareStatement(query)) {\n ResultSet result = ps.executeQuery();\n while (result.next()) {\n String naziv = result.getString(\"naziv\");\n polovniautomobili.add(naziv);\n\n }\n\n ps.close();\n CONNECTION.close();\n }\n CONNECTION.close();\n } catch (SQLException ex) {\n Logger.getLogger(Register.class.getName()).log(Level.SEVERE, null, ex);\n }\n return polovniautomobili;\n }",
"private void carregarPacienteAtivoList() {\n\t\tthis.setPacienteList(new ArrayList<Paciente>());\n\t\tthis.getPacienteList().addAll(this.getPacienteDAO().getPacienteAtivoList());\n\t}",
"@Override\n\tpublic List<Message> findAll() {\n\t\tSystem.err.println(\"Vao dây\" + url);\n\t\tfor (Message massage : messRepository.findAll()) {\n\t\t\tSystem.err.println(\"massage ==>\" + massage.getUsername());\n\t\t}\n\t\treturn (List<Message>) messRepository.findAll();\n\t}",
"public void ConsultaVehiculosSQlite() {\n preguntas = mydb.getCartList();\n for( int i = 0 ; i < preguntas.size() ; i++ ){\n //Toast.makeText(getApplicationContext(), preguntas.get( i ).getPregunta(), Toast.LENGTH_SHORT).show();\n persons.add(new Solicitud(\"Pregunta \" + String.valueOf(i+1) +\": \"+preguntas.get( i ).getPregunta(),\"Fecha: \"+ preguntas.get( i ).getFecha(), R.drawable.solicitudes,\"Motivo: \"+preguntas.get( i ).getMotivo(),\"Observacion: \"+preguntas.get( i ).getObservacion(),\"\"));\n }\n }",
"public void GetVehiculos() {\n String A = \"&LOCATION=POR_ENTREGAR\";\n String Pahtxml = \"\";\n \n try {\n \n DefaultListModel L1 = new DefaultListModel();\n Pahtxml = Aso.SendGetPlacas(A);\n Lsvehiculo = Aso.Leerxmlpapa(Pahtxml);\n Lsvehiculo.forEach((veh) -> {\n System.out.println(\"Placa : \" + veh.Placa);\n L1.addElement(veh.Placa);\n });\n \n Lista.setModel(L1);\n \n } catch (Exception ex) {\n Logger.getLogger(Entrega.class.getName()).log(Level.SEVERE, null, ex);\n }\n \n }",
"public ArrayList<Cliente> listaDeClientes() {\n\t\t\t ArrayList<Cliente> misClientes = new ArrayList<Cliente>();\n\t\t\t Conexion conex= new Conexion();\n\t\t\t \n\t\t\t try {\n\t\t\t PreparedStatement consulta = conex.getConnection().prepareStatement(\"SELECT * FROM clientes\");\n\t\t\t ResultSet res = consulta.executeQuery();\n\t\t\t while(res.next()){\n\t\t\t \n\t\t\t int cedula_cliente = Integer.parseInt(res.getString(\"cedula_cliente\"));\n\t\t\t String nombre= res.getString(\"nombre_cliente\");\n\t\t\t String direccion = res.getString(\"direccion_cliente\");\n\t\t\t String email = res.getString(\"email_cliente\");\n\t\t\t String telefono = res.getString(\"telefono_cliente\");\n\t\t\t Cliente persona= new Cliente(cedula_cliente, nombre, direccion, email, telefono);\n\t\t\t misClientes.add(persona);\n\t\t\t }\n\t\t\t res.close();\n\t\t\t consulta.close();\n\t\t\t conex.desconectar();\n\t\t\t \n\t\t\t } catch (Exception e) {\n\t\t\t //JOptionPane.showMessageDialog(null, \"no se pudo consultar la Persona\\n\"+e);\n\t\t\t\t System.out.println(\"No se pudo consultar la persona\\n\"+e);\t\n\t\t\t }\n\t\t\t return misClientes; \n\t\t\t }",
"java.util.List<java.lang.Long> getParticipantsList();",
"@GetMapping(\"/personas\")\n\tpublic List<Persona> allPersonas(){\n\t\treturn personaRepository.findAll();\n\t\t\n\t}",
"public void agregarListHijos(Persona hijo){\n Persona ite;\n\n if(hijos_Ambos.nextHijo==null && used==true){\n hijos_Ambos.nextHijo = hijo;\n\n }else{\n ite=hijos_Ambos.nextHijo;\n while(ite.nextHijo!=null){\n ite=ite.nextHijo;\n }\n ite.nextHijo=hijo;\n } \n\n }",
"public List<PersonEntity> obtenerDatosPersonasPorId(int idCliente) {\n\n\t\ttry {\n\n\t\t\tlog.info(\"Procediendo a obtener el detalle de los clientes filtrando por ID\");\n\t\t\tStoredProcedureQuery storedProcedureQuery = entityManager\n\t\t\t\t\t\n\t\t\t\t\t// Definicion\n\t\t\t\t\t.createStoredProcedureQuery(prop.getPROCEDURE_OBTENER_PERSONA_ID(), PersonEntity.class)\n\n\t\t\t\t\t// Entradas\n\t\t\t\t\t.registerStoredProcedureParameter(1, Integer.class, ParameterMode.IN)\n\n\t\t\t\t\t// Parametros\n\t\t\t\t\t.setParameter(1, idCliente);\n\n\t\t\t@SuppressWarnings(\"unchecked\")\n\t\t\tList<PersonEntity> res = storedProcedureQuery.getResultList();\n\n\t\t\tlog.info(\"Lista consultada exitosamente\");\n\t\t\tlog.info(\"Recorriendo lista de salida...\");\n\t\t\tfor (PersonEntity p : res) {\n\t\t\t\tlog.info(\"Persona : \" + p);\n\t\t\t}\n\n\t\t\treturn res;\n\n\t\t} catch (Exception e) {\n\t\t\tlog.error(\"Error al consultar procedure [\" + prop.getPROCEDURE_OBTENER_PERSONA_ID() + \"] , Detalle > \" + e.getMessage());\n\t\t}\n\n\t\treturn null;\n\t}",
"public List<Perfil> perfilListar() {\r\n\r\n try {\r\n ControladorPerfil ctrlperfil = new ControladorPerfil();\r\n return ctrlperfil.getListaPerfil();\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n return new ArrayList<>();\r\n }\r\n }",
"public List<Location> listarPorAnunciante() throws SQLException {\r\n \r\n //OBJETO LISTA DE COMODOS\r\n List<Location> enderecos = new ArrayList<>(); \r\n \r\n //OBJETO DE CONEXÃO COM O BANCO\r\n Connection conn = ConnectionMVC.getConnection();\r\n \r\n //OBJETO DE INSTRUÇÃO SQL\r\n PreparedStatement pStatement = null;\r\n \r\n //OBJETO CONJUNTO DE RESULTADOS DA TABELA IMOVEL\r\n ResultSet rs = null;\r\n \r\n try {\r\n \r\n //INSTRUÇÃO SQL DE LISTAR IMÓVEIS\r\n pStatement = conn.prepareStatement(\"select * from pessoa inner join anuncio inner join imagem inner join imovel inner join location inner join comodo\");\r\n \r\n //OBJETO DE RESULTADO DA INSTRUÇÃO\r\n rs = pStatement.executeQuery();\r\n \r\n //PERCORRER OS DADOS DA INSTRUÇÃO\r\n while(rs.next()) {\r\n \r\n //OBJETO UTILIZADO PARA BUSCA\r\n Location endereco = new Location();\r\n \r\n //PARAMETROS DE LISTAGEM\r\n endereco.setCep(rs.getString(\"cep\"));\r\n endereco.setRua(rs.getString(\"rua\"));\r\n endereco.setNumero(rs.getInt(\"numero\"));\r\n endereco.setBairro(rs.getString(\"bairro\"));\r\n endereco.setCidade(rs.getString(\"cidade\"));\r\n endereco.setUf(rs.getString(\"uf\"));\r\n\r\n //OBJETO ADICIONADO A LISTA\r\n enderecos.add(endereco); \r\n }\r\n \r\n //MENSAGEM DE ERRO\r\n } catch (SQLException ErrorSql) {\r\n JOptionPane.showMessageDialog(null, \"Erro ao listar do banco: \" +ErrorSql,\"erro\", JOptionPane.ERROR_MESSAGE);\r\n\r\n //FINALIZAR/FECHAR CONEXÃO\r\n }finally {\r\n ConnectionMVC.closeConnection(conn, pStatement, rs);\r\n } \r\n return enderecos;\r\n }",
"public List<UserProfile> getProfiliGestiti() {\r\n\t\tList<UserProfile> profili = getProfili();\r\n\t\t// siccome tiro su i profili ordinati per id,\r\n\t\t// so per certo che il primo � l'amministratore\r\n\t\t//profili.remove(0);\r\n\t\treturn profili;\r\n\t}",
"public Enumeration<String> getPersonList() {\r\n\t\treturn this.persons.keys();\r\n\t}",
"@Override\r\n\tpublic ArrayList<Person> getAllPersons() {\n\t\treturn null;\r\n\t}",
"public Persona getPersona(String nombre)\n {\n Persona p = new Persona();\n //Considerar almacenar todos los registros en un arrayList o\n //en un JsonArray y JsonObject\n try \n { \n PreparedStatement pstm = null; \n ResultSet rs = null;\n String query = \"SELECT * FROM Persona WHERE ID_User IN (SELECT ID_User FROM Usuario WHERE username = ?)\";\n pstm = con.prepareStatement(query);\n pstm.setString(1, nombre);\n rs = pstm.executeQuery();\n while(rs.next())\n {\n p.setIdPersona(rs.getInt(\"ID_Persona\"));\n p.setIdUser(rs.getInt(\"ID_User\"));\n p.setNombre(rs.getString(\"Nombre\"));\n p.setApellidoP(rs.getString(\"apellidoPaterno\"));\n p.setApellidoM(rs.getString(\"apellidoMaterno\")); \n }\n }catch(SQLException ex){\n ex.printStackTrace(); \n }\n return p;\n }",
"static public void addPersona(Persona c) { //metodo para añadir a lista y actualizar la lista en tiempo real\r\n listaPersona.add(c);\r\n listaG.setListaGrafica();\r\n \r\n \r\n \r\n }",
"public ArrayList<String> getNombreTodosJefes() {\r\n\t\treturn this.controlador.getNombreTodosJefes();\r\n//\t\treturn nombreJefesDepartamento;\r\n\t}",
"public List getTrabajadores();",
"public List<Contact> getParticipants()\n {\n return new LinkedList<Contact>(participants.values());\n }",
"List<Plaza> consultarPlazas();",
"public ArrayList<TypeProjet> listeAllTypeProjet() throws RemoteException{\r\n\t\t\tArrayList<TypeProjet> list = new ArrayList<TypeProjet>();\r\n\t\t\t\r\n\t\t\t\r\n\t\t String requete = \"select t_id, t_nom from typeprojet where t_cursus ='\" + _etudiant.getCursus() +\r\n\t\t \t\t\t\t\"' AND CURRENT_DATE >= t_debinscr AND CURRENT_DATE <= t_fininscr\";\r\n\t\t System.out.println(\"requete listeAllTypeProjet: \" + requete);\r\n\t\t DataSet data = database.executeQuery(requete);\r\n\t\t \t \r\n\t\t while (data.hasMoreElements()) {\r\n\t\t \tint t_id = Integer.parseInt(data.getColumnValue(\"t_id\"));\r\n\t\t \tString t_nom = data.getColumnValue(\"t_nom\");\r\n\t\t \r\n\t\t \tlist.add(new TypeProjetImpl (t_id, t_nom));\r\n\t\t }\r\n\t\t System.out.println(\"_____________________________________________\");\r\n\t\t for (TypeProjet i : list)\r\n\t\t \tSystem.out.println(i.get_id() + \" \" + i.get_nom());\r\n\t\t System.out.println(\"______________________________________________\");\r\n\t\t \t\t \r\n\t\t return list;\r\n\t\t}",
"public static void main(String[] args) {\n char resp = 's';\n int cont = 0;\n\n ArrayList listaPersonajes = new ArrayList();\n ArrayList<Personaje> lista_buena = new ArrayList();\n lista_buena.add(new Personaje(\"mago\", \"humano\", \"norfair\", 1.68, 88, \"vende chiles\", 150, \"juan\"));\n lista_buena.add(new Personaje(\"picaro\", \"enano\", \"zebes\", 2.58, 350, \"YES\", 185, \"Ricardo\"));\n lista_buena.add(new Personaje(\"barbaro\", \"humano\", \"maridia\", 1.50, 500, \"es inutil\", 158, \"egroj\"));\n lista_buena.add(new Personaje(\"clerigo\", \"elfo\", \"crateria\", 1.70, 55, \"es muy creido\", 85, \"pipe\"));\n while (resp == 's' || resp == 's') {\n System.out.println(\"0 Salir\");\n System.out.println(\"1 Crear Personaje\");\n System.out.println(\"2 Modificar personaje\");\n System.out.println(\"3 Ver atributos de personaje\");\n System.out.println(\"4 Eliminar personaje\");\n System.out.println(\"5 Combate\");\n System.out.print(\"ingrese opcion\");\n int opcion = leer.nextInt();\n\n switch (opcion) {\n case 0:\n System.exit(0);\n break;\n case 1:\n if (cont > 4) {\n System.out.println(\"no se pueden mas personajes\");\n break;\n }\n System.out.println(\"clerigo, barbaro, mago o picaro\");\n System.out.print(\"Eliga su Clase: \");\n String clase = leer.next();\n if (clase.contains(\"clerigo\") || clase.contains(\"barbaro\") || clase.contains(\"mago\") || clase.contains(\"picaro\")) {\n\n } else {\n System.out.println(\"usted no puede elejir esa clase\");\n System.out.print(\"Eliga su Clase: \");\n clase = leer.next();\n }\n\n //\n listaPersonajes.add(cont, clase);\n System.out.println(\"Ingrese su nombre\");\n String nombre = leer.next();\n listaPersonajes.add(cont, nombre);\n //\n System.out.println(\"mediano, enano, elfo o humano\");\n System.out.print(\"ingrese raza: \");\n String raza = leer.next();\n if (raza.contains(\"mediano\") || raza.contains(\"enano\") || raza.contains(\"elfo\") || raza.contains(\"humano\")) {\n\n } else {\n System.out.println(\"no puede ser de esa raza\");\n System.out.print(\"ingrese raza:\");\n raza = leer.next();\n }\n listaPersonajes.add(cont, raza);\n System.out.println(\"ingrese estatura: \");\n double estatura = leer.nextDouble();\n listaPersonajes.add(cont, estatura);\n //\n System.out.println(\"ingrese peso: \");\n double peso = leer.nextDouble();\n listaPersonajes.add(cont, peso);\n //\n System.out.println(\"ingrese edad: \");\n int edad = leer.nextInt();\n listaPersonajes.add(cont, edad);\n //\n System.out.println(\"ingrese descripcion: \");\n leer.nextLine();\n String descrip = leer.nextLine();\n listaPersonajes.add(cont, descrip);\n //\n System.out.println(\"norfair ,brinstar , maridia, zebes o crateria\");\n System.out.print(\"ingrese nacionalidad: \");\n String nacion = leer.next();\n //\n if (nacion.contains(\"norfair\") || nacion.contains(\"brinstatr\") || nacion.contains(\"maridia\") || nacion.contains(\"zebes\") || nacion.contains(\"crateria\")) {\n\n } else {\n System.out.println(\"no puede ser de esa region: \");\n System.out.print(\"ingrese nacionalidad: \");\n nacion = leer.next();\n }\n\n //\n lista_buena.add(new Personaje(clase, raza, nacion, estatura, edad, descrip, peso, nombre));\n cont++;\n break;\n case 2:\n System.out.println(\"que posicion de pesonaje desea modificar\");\n int perso_mod = leer.nextInt();\n modificacion(perso_mod, lista_buena);\n break;\n case 3:\n\n for (Object o : lista_buena) {\n System.out.println(o);\n System.out.println();\n }\n\n break;\n case 4:\n System.out.println(\"Que personaje desea eliminar\");\n int elim = leer.nextInt();\n lista_buena.remove(elim);\n break;\n case 5:\n System.out.println(\"no funcio\");\n break;\n default:\n resp = 'n';\n }\n }\n\n }"
] | [
"0.70641947",
"0.688697",
"0.6743041",
"0.66080344",
"0.6548103",
"0.65056735",
"0.6455698",
"0.6415016",
"0.6379863",
"0.6362849",
"0.63417554",
"0.63122964",
"0.62927157",
"0.6277748",
"0.6250328",
"0.62491256",
"0.6222832",
"0.6221644",
"0.6201822",
"0.62000245",
"0.6153383",
"0.6141051",
"0.6117148",
"0.6092503",
"0.60849863",
"0.60558254",
"0.6053015",
"0.6037753",
"0.60357547",
"0.6032892",
"0.60200036",
"0.60125655",
"0.59980315",
"0.59936845",
"0.598117",
"0.5971935",
"0.59704113",
"0.5968765",
"0.59650105",
"0.5946201",
"0.59248596",
"0.5924531",
"0.5903061",
"0.5881032",
"0.5872232",
"0.58620787",
"0.5859216",
"0.58425134",
"0.5840075",
"0.58377564",
"0.5837308",
"0.583172",
"0.58280087",
"0.5826015",
"0.58246624",
"0.5819271",
"0.580825",
"0.57951516",
"0.5794213",
"0.5791966",
"0.579043",
"0.5784227",
"0.57812",
"0.57798046",
"0.5772884",
"0.5762529",
"0.5760566",
"0.5756175",
"0.5752577",
"0.5750986",
"0.5738364",
"0.57260555",
"0.57257015",
"0.5723771",
"0.57232124",
"0.5721955",
"0.5712107",
"0.57071984",
"0.5693273",
"0.5686724",
"0.5680095",
"0.5676337",
"0.5669431",
"0.56653714",
"0.5656139",
"0.5655729",
"0.5655175",
"0.5654281",
"0.56454414",
"0.56402826",
"0.5638994",
"0.5638629",
"0.5636208",
"0.5630271",
"0.56296706",
"0.56292325",
"0.5623554",
"0.562272",
"0.5612754",
"0.56108326",
"0.5607971"
] | 0.0 | -1 |
For scroll driven by nonfling gesture, the first onScrollChange callback triggers start event and the action_up event indicates scroll's stopping. | @Test
public void testSlowScroll() {
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));
detector.onScrollChanged();
assertThat(scrollStateListener.startCount).isEqualTo(1);
detector.onScrollChanged();
detector.onScrollChanged();
detector.onScrollChanged();
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));
assertThat(scrollStateListener.startCount).isEqualTo(1);
assertThat(scrollStateListener.stopCount).isEqualTo(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {\n }",
"public abstract void onScrollUp();",
"@Override\r\n public void onDownMotionEvent() {\n mFirstScroll = mDragging = true;\r\n }",
"void onScroll(boolean bDragging);",
"@Override\n public void onScrollStarted(\n int scrollOffsetY, int scrollExtentY, boolean isDirectionUp) {\n hide();\n }",
"@Override\r\n public boolean onScroll(float displacement, float delta, float velocity) {\n return false;\r\n }",
"@Override\r\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\r\n\t\t\tfloat arg3) {\n\t\treturn false;\r\n\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView arg0, int arg1) {\n\t\t\t\treturn ;\n\t\t\t}",
"@Override\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\t\t\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\t\t\tfloat arg3)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n\t\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\t\tbForceScrollDown = false;\n\t\t\t\t}",
"public void onScrollStateChanged(AbsListView arg0, int scrollState) {\n\t\tcurrentScrollState = scrollState;\n\t\tif (valorUltimo <= 0)\n\t\t\tisScrollCompleted();\n\t}",
"@Override\n public void onAbsoluteScrollChange(int i) {\n }",
"private void onUp()\n\t{\n\t\tsynchronized (HorizontalListView.this)\n\t\t{\n\t\t\tif (!mFlinging)\n\t\t\t{\n\t\t\t\treadjustScrollToMiddleItem();\n\t\t\t}\n\t\t}\n\t}",
"void onFastScrollStop(FastScroller fastScroller);",
"@Override\n\t\t\tpublic void onScrollingStarted(WheelView view) {\n\t\t\t}",
"public void onPageScrollStateChanged(int arg0) {\n }",
"@Override\r\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n\r\n if (scrollState == SCROLL_STATE_IDLE) {\r\n\r\n if (getScrollYDistance() > 0) {\r\n setListener();\r\n LogManager.i(\"=============onScrollStateChanged\");\r\n }\r\n// LogManager.i(\"=============getScrollYDistance()=\" + getScrollYDistance());\r\n }\r\n }",
"public void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Test\n public void testFling() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n detector.onDraw();\n detector.onDraw();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"@Override\n public void onScrollingStarted(WheelView wheel) {\n\n }",
"@Override\n public void onScrollingStarted(WheelView wheel) {\n\n }",
"@Override\n public void onScrollingStarted(WheelView wheel) {\n\n }",
"public void scrollStart(State state);",
"void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY);",
"@Override\r\n public void onUpOrCancelMotionEvent(ScrollState scrollState) {\n if (scrollState == ScrollState.DOWN) {\r\n// if(scrollY <= 0){\r\n// showBannersView();\r\n// }\r\n// Intent intent = new Intent(Constants.ACTION_TOGGLE_FLOAT);\r\n// intent.putExtra(Constants.EXTRA_NAME_FLOAT_ENABLED, true);\r\n// getActivity().sendBroadcast(intent);\r\n } else if (scrollState == ScrollState.UP) {\r\n// Intent intent = new Intent(Constants.ACTION_TOGGLE_FLOAT);\r\n// intent.putExtra(Constants.EXTRA_NAME_FLOAT_ENABLED, false);\r\n// getActivity().sendBroadcast(intent);\r\n } else {\r\n // Even if onScrollChanged occurs without scrollY changing, toolbar should be adjusted\r\n }\r\n }",
"@Override\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n this.currentScrollState = scrollState;\n try {\n isScrollCompleted();\n } catch (Exception ex) {\n\n }\n }",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n //if there are no items in list, end method\n if(totalItemCount == 0) return;\n\n //if there are items in list, check if first visible item in list has changed\n if (isSameRow(firstVisibleItem)) {\n //if same, check top position of first visible item to see if scroll threshold is met\n int newScrollY = getTopItemScrollY();\n\n //check if scroll threshold is met\n boolean isSignificantDelta = Math.abs(mLastScrollY - newScrollY) > mScrollThreshold;\n\n //if change is significant\n if (isSignificantDelta) {\n //check scroll direction\n if (mLastScrollY > newScrollY) {\n //scroll up event\n onScrollUp();\n } else {\n //scroll down event\n onScrollDown();\n }\n }\n\n //set last scroll top position\n mLastScrollY = newScrollY;\n } else {\n //first visible item in list has changed, check change direction\n if (firstVisibleItem > mPreviousFirstVisibleItem) {\n //first visible item is greater, scroll up event\n onScrollUp();\n } else {\n //first visible item is less, scroll down event\n onScrollDown();\n }\n\n //save top position of first visible item\n mLastScrollY = getTopItemScrollY();\n\n //save item position of first visible item\n mPreviousFirstVisibleItem = firstVisibleItem;\n }\n }",
"public void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"boolean canScrollUp();",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n final int offsetY = AbsListViewHelper.calculateOffset(view);\n mIgnoreOnScrollListener = false;\n onScrollChanged(getWrapped(), mWrapped.getScrollX(), offsetY, mLastScrollX, mLastScrollY);\n mIgnoreOnScrollListener = true;\n }",
"@Override\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n //does nothing\n }",
"@Override\n\t\t\tpublic void onScroll(AbsListView view, int firstVisibleItem,\n\t\t\t\t\tint visibleItemCount, int totalItemCount) {\n\t\t\t\tif(firstVisibleItem==0){\n\t\t\t\t\tswipeLayout.setEnabled(true);\n\t\t\t\t}else{\n\t\t\t\t\tswipeLayout.setEnabled(false);\n\t\t\t\t}\n\n\t\t\t\tif(mLastFirstVisibleItem<firstVisibleItem)\n\t\t\t\t{\n\t\t\t\t\t//\t\t Log.i(\"SCROLLING DOWN\",\"TRUE\");\n\t\t\t\t\tAnimation slideUp = AnimationUtils.loadAnimation(getActivity(), R.anim.slide_up);\n\t\t\t\t\tstatuslyt.startAnimation(slideUp);\n\n\t\t\t\t}\n\t\t\t\tif(mLastFirstVisibleItem>firstVisibleItem)\n\t\t\t\t{\n\t\t\t\t\t//\t\t Log.i(\"SCROLLING UP\",\"TRUE\");\n\t\t\t\t}\n\t\t\t\tmLastFirstVisibleItem=firstVisibleItem;\n\t\t\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView arg0, int arg1) {\n\t\t\t}",
"@Override\r\n public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)\r\n {\n return false;\r\n }",
"public interface UniScrollListener\n{\n void onScrollChanged(int x, int y, int oldX, int oldY);\n}",
"@Test\n public void testDoubleFling() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n\n // second fling\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onDraw();\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n detector.onScrollChanged();\n detector.onDraw();\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n detector.onDraw();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"public void onScroll(State state, int positionY);",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView arg0, int arg1) {\n\n\t\t\t}",
"@Override\n public boolean scrolled(int arg0) {\n return false;\n }",
"@Override\n public boolean onInterceptTouchEvent(MotionEvent ev) {\n if (this.mAutoScroll || this.mTouchedWhenAutoScroll) {\n int action = ev.getAction();\n switch (action) {\n case MotionEvent.ACTION_DOWN:\n this.mTouchedWhenAutoScroll = true;\n stopAutoScroll();\n break;\n }\n }\n return super.onInterceptTouchEvent(ev);\n }",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0)\n\t\t{\n\t\t\t\n\t\t}",
"@Override\n\t\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t\t\t}",
"@Override\n public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,\n float distanceY) {\n return false;\n }",
"@Override\r\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,\n float distanceY) {\n return false;\n }",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }",
"@Override\n public void onScrollDown() {\n Go_UpButton.setVisibility(View.VISIBLE);\n }",
"private void onScrollerFinished(Scroller scroller) {\n\t\tif (scroller == mFlingScroller) {\n\t\t\tif (!ensureScrollWheelAdjusted()) {\n\t\t\t\tupdateInputTextView();\n\t\t\t}\n\t\t\t// onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);\n\t\t} else {\n\t\t\t// if (mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {\n\t\t\tupdateInputTextView();\n\t\t\t// }\n\t\t}\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\tLog.i(\"\", \"Enter hereeeeeeeeeeeeeeeeeeeee(onPageScrollStateChanged!!!\");\n\t\t\t}",
"@Override\n public boolean onTouchEvent(MotionEvent e) {\n final boolean ret = super.onTouchEvent(e);\n\n int action = e.getActionMasked();\n if (action == MotionEvent.ACTION_UP) {\n if (!mWasFlingCalledForGesture) {\n ((CarLayoutManager) getLayoutManager()).settleScrollForFling(this, 0);\n }\n mWasFlingCalledForGesture = false;\n }\n\n return ret;\n }",
"@Override\r\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public boolean scrolled(int amount) {\n return false;\n }",
"@Override\n public boolean scrolled(int amount) {\n return false;\n }",
"@Override\n public boolean scrolled(int amount) {\n return false;\n }",
"@Override\n public boolean scrolled(int amount) {\n return false;\n }",
"@Override\r\n\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t}",
"@Override\r\n\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t}",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n }",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n }",
"@Override\r\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\tLogUtil.print(\"scrolling--->\"\r\n\t\t\t\t\t\t+ schoolListView.getFirstVisiblePosition());\r\n\t\t\t\tswitch (scrollState) {\r\n\t\t\t\t// 当不滚动时\r\n\t\t\t\tcase OnScrollListener.SCROLL_STATE_IDLE:// 是当屏幕停止滚动时\r\n\t\t\t\t\tscrollFlag = false;\r\n\t\t\t\t\t// 判断滚动到底部\r\n\t\t\t\t\tif (schoolListView.getLastVisiblePosition() == (schoolListView\r\n\t\t\t\t\t\t\t.getCount() - 1)) {\r\n\t\t\t\t\t\t// toTopBtn.setVisibility(View.VISIBLE);\r\n\t\t\t\t\t}\r\n\t\t\t\t\t// 判断滚动到顶部\r\n\t\t\t\t\tif (schoolListView.getFirstVisiblePosition() == 0) {\r\n\t\t\t\t\t\t// toTopBtn.setVisibility(View.GONE);\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase OnScrollListener.SCROLL_STATE_TOUCH_SCROLL:// 滚动时\r\n\t\t\t\t\tscrollFlag = true;\r\n\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase OnScrollListener.SCROLL_STATE_FLING:// 是当用户由于之前划动屏幕并抬起手指,屏幕产生惯性滑动时\r\n\t\t\t\t\tscrollFlag = false;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}",
"@Override\n\tprotected void onScrollChanged(int l, int t, int oldl, int oldt) {\n\t\tsuper.onScrollChanged(l, t, oldl, oldt);\n\t\tif (mListener != null) {\n\t\t\tmListener.scrollOritention(l, t, oldl, oldt);\n\t\t}\n\t}"
] | [
"0.6740298",
"0.66762984",
"0.6507507",
"0.64972866",
"0.64004314",
"0.6306189",
"0.6296011",
"0.62554353",
"0.62487215",
"0.62487215",
"0.62487215",
"0.62487215",
"0.6242023",
"0.62391514",
"0.6216716",
"0.6214671",
"0.6157688",
"0.6092166",
"0.6075639",
"0.604922",
"0.6046845",
"0.60186374",
"0.6011277",
"0.60099614",
"0.60099614",
"0.60099614",
"0.60012645",
"0.5970978",
"0.5968314",
"0.59290475",
"0.5927939",
"0.5918791",
"0.5914072",
"0.5894972",
"0.58845925",
"0.58804125",
"0.5877746",
"0.58732593",
"0.5869395",
"0.58630943",
"0.5854301",
"0.5827893",
"0.582668",
"0.58262575",
"0.5817693",
"0.58152366",
"0.58152366",
"0.58152366",
"0.58152366",
"0.58152366",
"0.581101",
"0.5803605",
"0.5802056",
"0.5802056",
"0.5793827",
"0.5793827",
"0.5793827",
"0.5793827",
"0.5793827",
"0.57893294",
"0.57893294",
"0.57893294",
"0.57893294",
"0.57893294",
"0.57893294",
"0.57893294",
"0.5788235",
"0.5787698",
"0.5780083",
"0.57766265",
"0.5776442",
"0.5776442",
"0.5774544",
"0.5768839",
"0.5762762",
"0.5762762",
"0.5762762",
"0.576175",
"0.57604754",
"0.57587785",
"0.5749276",
"0.5749276",
"0.5749276",
"0.5749276",
"0.5749276",
"0.5749276",
"0.5749276",
"0.5749276",
"0.5749276",
"0.5749276",
"0.5734481",
"0.5734481",
"0.5734481",
"0.5734481",
"0.57279974",
"0.57279974",
"0.57258576",
"0.57258576",
"0.5716796",
"0.5713745"
] | 0.6333191 | 5 |
For scroll driven by fling gesture, the first onScrollChange callback triggers start event and then detector checks if there's an onScrollChanged() callback between onDraw() to determine if scroll stops. | @Test
public void testFling() {
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));
detector.onScrollChanged();
assertThat(scrollStateListener.startCount).isEqualTo(1);
detector.onScrollChanged();
detector.onScrollChanged();
detector.onScrollChanged();
detector.fling();
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));
detector.onDraw();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onScrollChanged();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onDraw();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onScrollChanged();
detector.onDraw();
detector.onDraw();
assertThat(scrollStateListener.startCount).isEqualTo(1);
assertThat(scrollStateListener.stopCount).isEqualTo(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testDoubleFling() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n\n // second fling\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onDraw();\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n detector.onScrollChanged();\n detector.onDraw();\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n detector.onDraw();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"@Override\n public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {\n }",
"@Test\n public void testSlowScroll() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"void onScroll(boolean bDragging);",
"@Test\n public void testFlingHoldAndRelease() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n\n // touch the list hold on the scrolling.\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onDraw();\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n detector.onScrollChanged();\n\n // release the finger.\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"@Override\r\n public boolean onScroll(float displacement, float delta, float velocity) {\n return false;\r\n }",
"@Override\n\t\t\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\t\t\tfloat arg3)\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\r\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n\r\n if (scrollState == SCROLL_STATE_IDLE) {\r\n\r\n if (getScrollYDistance() > 0) {\r\n setListener();\r\n LogManager.i(\"=============onScrollStateChanged\");\r\n }\r\n// LogManager.i(\"=============getScrollYDistance()=\" + getScrollYDistance());\r\n }\r\n }",
"@Override\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n this.currentScrollState = scrollState;\n try {\n isScrollCompleted();\n } catch (Exception ex) {\n\n }\n }",
"void onScrollChange(View v, int scrollX, int scrollY, int oldScrollX, int oldScrollY);",
"private void onScrollDetected() {\n swipeRefreshLayout.setEnabled(false); // don't allow refreshes if we are scrolling\n }",
"@Override\r\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\r\n\t\t\tfloat arg3) {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onScroll(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"private void onScrollerFinished(Scroller scroller) {\n\t\tif (scroller == mFlingScroller) {\n\t\t\tif (!ensureScrollWheelAdjusted()) {\n\t\t\t\tupdateInputTextView();\n\t\t\t}\n\t\t\t// onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);\n\t\t} else {\n\t\t\t// if (mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {\n\t\t\tupdateInputTextView();\n\t\t\t// }\n\t\t}\n\t}",
"public void computeScroll() {\n /* 93 */\n if (this.mChartTouchListener instanceof PieRadarChartTouchListener) {\n /* 94 */\n ((PieRadarChartTouchListener) this.mChartTouchListener).computeScroll();\n /* */\n }\n /* */\n }",
"@Override\n\tprotected void onScrollChanged(int l, int t, int oldl, int oldt) {\n\t\tsuper.onScrollChanged(l, t, oldl, oldt);\n\t\tif (mListener != null) {\n\t\t\tmListener.scrollOritention(l, t, oldl, oldt);\n\t\t}\n\t}",
"public void onScrollStateChanged(AbsListView arg0, int scrollState) {\n\t\tcurrentScrollState = scrollState;\n\t\tif (valorUltimo <= 0)\n\t\t\tisScrollCompleted();\n\t}",
"void onFastScrollStart(FastScroller fastScroller);",
"@Override\n public void onScrollingStarted(WheelView wheel) {\n\n }",
"@Override\n public void onScrollingStarted(WheelView wheel) {\n\n }",
"@Override\n public void onScrollingStarted(WheelView wheel) {\n\n }",
"public void onScroll(State state, int positionY);",
"@Override\n\tprotected void onScrollChanged(int l, int t, int oldl, int oldt) {\n\t\tsuper.onScrollChanged(l, t, oldl, oldt);\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onScrollingStarted(WheelView view) {\n\t\t\t}",
"void onFastScrollStop(FastScroller fastScroller);",
"public void onPageScrollStateChanged(int arg0) {\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView arg0, int arg1) {\n\t\t\t}",
"public void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView arg0, int arg1) {\n\n\t\t\t}",
"public void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"private void onScrollReleaseDetected() {\n if (profileContainer.getScrollY() == 0)\n swipeRefreshLayout.setEnabled(true); // we are back to scroll 0 so allow refreshes again\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView arg0, int arg1) {\n\t\t\t\treturn ;\n\t\t\t}",
"void onScrollChanged(ObservableHorizontalScrollView view, int l, int t);",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n this.currentFirstVisibleItem = firstVisibleItem;\n this.currentVisibleItemCount = visibleItemCount;\n this.totalItem = totalItemCount;\n\n try {\n isScrollCompleted();\n } catch (Exception ex) {\n\n }\n }",
"@TargetApi(Build.VERSION_CODES.KITKAT)\r\n @Override\r\n public void run() {\n verify(obj2).onScrolled();\r\n }",
"@Override\n protected void onScrollChanged(int l, int t, int oldl, int oldt) {\n super.onScrollChanged(l, t, oldl, oldt);\n\n }",
"@Override\n public void onScroll(float scrollProgressPercent) {\n }",
"void onScrollingStarted(RulerWheel wheel);",
"@Override\n public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent1, float velocityX, float velocityY) {\n mScroller.forceFinished(true);\n mIsFling = true;\n mScroller.fling(\n (int) mOffset,\n 0,\n (int) -velocityX,\n (int) velocityY,\n 0,\n (int) mMaxOffset,\n 0,\n 0);\n // Invalidates to trigger computeScroll()\n ViewCompat.postInvalidateOnAnimation(ScaleView.this);\n return true;\n }",
"@Override\r\n public void onDownMotionEvent() {\n mFirstScroll = mDragging = true;\r\n }",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t\t}",
"@Override\n @SuppressLint(\"ClickableViewAccessibility\")\n public boolean onTouchEvent(MotionEvent ev) {\n if (mScroller != null && mScroller.onTouchEvent(ev)) return true;\n if (mScroller != null && mGestureDetector == null) {\n mGestureDetector = new GestureDetector(getContext(), new GestureDetector.SimpleOnGestureListener() {\n @Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n // If fling happens, index bar shows\n mScroller.show();\n return super.onFling(e1, e2, velocityX, velocityY);\n }\n });\n }\n if (mGestureDetector != null) mGestureDetector.onTouchEvent(ev);\n if (mScroller != null && ev.getAction() == MotionEvent.ACTION_UP) postInvalidate();\n return super.onTouchEvent(ev);\n }",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t}",
"@Override\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n if (onScrollListener != null) {\n onScrollListener.onScrollStateChanged(view, scrollState);\n }\n }",
"@Override\r\n public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX, float distanceY)\r\n {\n return false;\r\n }",
"public void onScroll(NMapView arg0, MotionEvent arg1, MotionEvent arg2) {\n\n }",
"@Override\n\t\tpublic void OnDoubleFingerStartScroll(MotionEvent ev, int direction) {\n\n\t\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\n\t}",
"@Override\r\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t\t\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0)\n\t\t{\n\t\t\t\n\t\t}",
"@Override\n public void onScrolled(LinearLayoutManager layoutManager, int dx, int dy) {\n if (layoutManager.findFirstCompletelyVisibleItemPosition() == 0) {\n Log.d(TAG, \"onNotBottom\");\n // Its at top\n Log.d(TAG, \"top\");\n if (isScrolling) {\n isScrolling = false;\n // if (view != null) view.mostrarProgressBar();\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n String tipoCargaConLoadMore = \"ConLoadMore\";\n initObtenerListaChat(idGrupoChat, pageCount, tipoCargaConLoadMore);\n Log.d(TAG, \"isScrolling\" + pageCount);\n\n }\n }, 2000);\n Log.d(TAG, \"onNotBottom\");\n }\n }\n\n\n\n /* int visibleItemCount = layoutManager.getChildCount();\n int totalItemCount = layoutManager.getItemCount();\n int pastVisibleItems = layoutManager.findFirstVisibleItemPosition();\n if (pastVisibleItems + visibleItemCount >= totalItemCount) {\n //End of list\n Log.d(TAG, \"onBottomReachedListener\");\n } else {\n\n if (isScrolling) {\n isScrolling = false;\n // if (view != null) view.mostrarProgressBar();\n Handler handler = new Handler();\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n String tipoCargaConLoadMore = \"ConLoadMore\";\n initObtenerListaChat(idGrupoChat, pageCount, tipoCargaConLoadMore);\n Log.d(TAG, \"isScrolling\" + pageCount);\n\n }\n }, 2000);\n Log.d(TAG, \"onNotBottom\");\n }\n\n\n }*/\n }",
"@Override\n public void onAbsoluteScrollChange(int i) {\n }",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n //if there are no items in list, end method\n if(totalItemCount == 0) return;\n\n //if there are items in list, check if first visible item in list has changed\n if (isSameRow(firstVisibleItem)) {\n //if same, check top position of first visible item to see if scroll threshold is met\n int newScrollY = getTopItemScrollY();\n\n //check if scroll threshold is met\n boolean isSignificantDelta = Math.abs(mLastScrollY - newScrollY) > mScrollThreshold;\n\n //if change is significant\n if (isSignificantDelta) {\n //check scroll direction\n if (mLastScrollY > newScrollY) {\n //scroll up event\n onScrollUp();\n } else {\n //scroll down event\n onScrollDown();\n }\n }\n\n //set last scroll top position\n mLastScrollY = newScrollY;\n } else {\n //first visible item in list has changed, check change direction\n if (firstVisibleItem > mPreviousFirstVisibleItem) {\n //first visible item is greater, scroll up event\n onScrollUp();\n } else {\n //first visible item is less, scroll down event\n onScrollDown();\n }\n\n //save top position of first visible item\n mLastScrollY = getTopItemScrollY();\n\n //save item position of first visible item\n mPreviousFirstVisibleItem = firstVisibleItem;\n }\n }",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\n\t\t}",
"@Override\n\tpublic void onScroll(AbsListView view, int firstVisibleItem,\n\t\t\tint visibleItemCount, int totalItemCount) {\n\t\tif (totalItemCount > 0) {\n\t\t\tboolean init = false;\n\t\t\tif (mStartPos == -1) {\n\t\t\t\tinit = true;\n\t\t\t}\n\t\t\tmStartPos = firstVisibleItem;\n\t\t\tif (mStartPos + Constants.DEF_NUM >= totalItemCount) {\n\t\t\t\tmRefNum = totalItemCount - mStartPos - 1;// header\n\t\t\t} else {\n\t\t\t\tmRefNum = Constants.DEF_NUM;\n\t\t\t}\n\t\t\tif (init) {\n\t\t\t\trushIconThread();\n\t\t\t}\n\t\t}\n\n\t}",
"public void scrollStart(State state);",
"@Override\n\t\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\r\n\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t}",
"@Override\r\n\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t}",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n final int offsetY = AbsListViewHelper.calculateOffset(view);\n mIgnoreOnScrollListener = false;\n onScrollChanged(getWrapped(), mWrapped.getScrollX(), offsetY, mLastScrollX, mLastScrollY);\n mIgnoreOnScrollListener = true;\n }",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\tLog.i(\"\", \"Enter hereeeeeeeeeeeeeeeeeeeee(onPageScrollStateChanged!!!\");\n\t\t\t}",
"public void computeScroll() {\n if (!this.mDragHelper.continueSettling(true)) return;\n if (!this.mCanSlide) {\n this.mDragHelper.abort();\n return;\n }\n ViewCompat.postInvalidateOnAnimation((View)this);\n }",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n public boolean onScroll(MotionEvent e1, MotionEvent e2, float distanceX,\n float distanceY) {\n return false;\n }",
"private void loadScrollState() {\n AppExecutors.getInstance().mainThread().execute(() ->\r\n mScrollViewFinal.scrollTo(0, mActivityPreferences\r\n .getInt(getScrollType(mIsRedWine), 0)));\r\n }",
"@Override\r\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n }"
] | [
"0.73893017",
"0.6864866",
"0.67754096",
"0.6756407",
"0.65989834",
"0.65514255",
"0.6547124",
"0.65165913",
"0.6513605",
"0.65055865",
"0.6496494",
"0.64486736",
"0.6423904",
"0.6423904",
"0.6423904",
"0.6423904",
"0.6403115",
"0.6361747",
"0.63577884",
"0.63352376",
"0.63005316",
"0.62922984",
"0.62922984",
"0.62922984",
"0.62837994",
"0.6258297",
"0.6247873",
"0.6229374",
"0.6196431",
"0.6191752",
"0.61758924",
"0.6153117",
"0.61530507",
"0.61503494",
"0.6069879",
"0.6057568",
"0.6052679",
"0.60472226",
"0.60439634",
"0.6037153",
"0.6015166",
"0.60103333",
"0.59982926",
"0.59853405",
"0.59853405",
"0.59853405",
"0.59853405",
"0.59853405",
"0.5983756",
"0.5983756",
"0.5983756",
"0.5983756",
"0.5983756",
"0.59730315",
"0.5959755",
"0.5958335",
"0.5934291",
"0.59294087",
"0.59224975",
"0.5918702",
"0.5918702",
"0.5918702",
"0.591546",
"0.5910089",
"0.5910089",
"0.5910089",
"0.5910089",
"0.5910089",
"0.5910089",
"0.5910089",
"0.5908802",
"0.5907584",
"0.59030694",
"0.5901718",
"0.59016865",
"0.59016865",
"0.58953834",
"0.5892665",
"0.58892626",
"0.5888616",
"0.5888616",
"0.588851",
"0.5885626",
"0.5884707",
"0.58781976",
"0.58781976",
"0.58781976",
"0.58781976",
"0.58781976",
"0.58781976",
"0.58781976",
"0.58781976",
"0.58781976",
"0.58781976",
"0.5877658",
"0.5877537",
"0.5874731",
"0.5870256",
"0.5870256",
"0.5860383"
] | 0.75283885 | 0 |
After the 1st fling, user fling the list again before its stopping scroll. | @Test
public void testDoubleFling() {
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));
detector.onScrollChanged();
assertThat(scrollStateListener.startCount).isEqualTo(1);
detector.onScrollChanged();
detector.onScrollChanged();
detector.onScrollChanged();
detector.fling();
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));
detector.onDraw();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onScrollChanged();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onDraw();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onScrollChanged();
// second fling
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));
detector.onDraw();
detector.onScrollChanged();
assertThat(scrollStateListener.startCount).isEqualTo(1);
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onDraw();
detector.onScrollChanged();
detector.fling();
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));
detector.onDraw();
detector.onScrollChanged();
detector.onDraw();
detector.onScrollChanged();
assertThat(scrollStateListener.startCount).isEqualTo(1);
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onDraw();
detector.onDraw();
assertThat(scrollStateListener.startCount).isEqualTo(1);
assertThat(scrollStateListener.stopCount).isEqualTo(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void testFling() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n detector.onDraw();\n detector.onDraw();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"@Override\n public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent1, float velocityX, float velocityY) {\n mScroller.forceFinished(true);\n mIsFling = true;\n mScroller.fling(\n (int) mOffset,\n 0,\n (int) -velocityX,\n (int) velocityY,\n 0,\n (int) mMaxOffset,\n 0,\n 0);\n // Invalidates to trigger computeScroll()\n ViewCompat.postInvalidateOnAnimation(ScaleView.this);\n return true;\n }",
"@Override\n\t\t\t\t\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY){\n\t\t\t\t\t\tSystem.out.println(\"fling\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n mScroller.show();\n return super.onFling(e1, e2, velocityX, velocityY);\n }",
"private void fling(int velocityY) {\n\t\tmPreviousScrollerY = 0;\n\n\t\tif (velocityY > 0) {\n\t\t\tmFlingScroller\n\t\t\t\t\t.fling(0, 0, 0, velocityY, 0, 0, 0, Integer.MAX_VALUE);\n\t\t} else {\n\t\t\tmFlingScroller.fling(0, Integer.MAX_VALUE, 0, velocityY, 0, 0, 0,\n\t\t\t\t\tInteger.MAX_VALUE);\n\t\t}\n\n\t\tinvalidate();\n\t}",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n float scrollTheta = vectorToScalarScroll(\n velocityX,\n velocityY,\n e2.getX() - mPieBounds.centerX(),\n e2.getY() - mPieBounds.centerY());\n mScroller.fling(\n 0,\n (int) getPieRotation(),\n 0,\n (int) scrollTheta / FLING_VELOCITY_DOWNSCALE,\n 0,\n 0,\n Integer.MIN_VALUE,\n Integer.MAX_VALUE);\n\n // Start the animator and tell it to animate for the expected duration of the fling.\n if (Build.VERSION.SDK_INT >= 11) {\n mScrollAnimator.setDuration(mScroller.getDuration());\n mScrollAnimator.start();\n }\n return true;\n }",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2,\n float velocityX, float velocityY) {\n return false;\n }",
"private void scrollerFinished()\n\t{\n\t\tif (!mFingerDown)\n\t\t{\n\t\t\treadjustScrollToMiddleItem();\n\t\t}\n\t\t\n\t}",
"void onFastScrollStop(FastScroller fastScroller);",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n return false;\n }",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n return false;\n }",
"@FXML\n private void handleFilteredListPanelScrollDown() {\n filteredTaskListPanel.scrollToNext();\n }",
"@Override\n public void onFlingStarted() {\n Timber.d(\"A fling just started\");\n\n }",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\tfloat velocityY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\tfloat velocityY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\tfloat velocityY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\tfloat velocityY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\tfloat velocityY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\tfloat velocityY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\tfloat velocityY) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\tfloat velocityY) {\n\t\treturn false;\n\t}",
"@Override\r\n\tpublic void onScroll(AbsListView view, int firstVisibleItem,\r\n\t\t\tint visibleItemCount, int totalItemCount) {\n\r\n\t\tint offset = lastIndex - firstVisibleItem;\r\n\r\n\t\tif (offset < 0 || firstVisibleItem == 0) {\r\n\t\t\t// 证明现在listView往上移动\r\n\t\t\tif (quickTols != null) {\r\n\r\n\t\t\t\tquickTols.setVisibility(View.INVISIBLE);\r\n\t\t\t}\r\n\t\t} else if (offset > 0) {\r\n\t\t\tif (quickTols != null) {\r\n\t\t\t\tquickTols.setVisibility(View.VISIBLE);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t\tlastIndex = firstVisibleItem;\r\n\t}",
"@SuppressLint(\"NewApi\")\n @Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n float x = e1.getX() - e2.getX();\n float x2 = e2.getX() - e1.getX();\n if (x > FLING_MIN_DISTANCE && Math.abs(velocityX) > FLING_MIN_VELOCITY) {\n //Left: last week\n //Toast.makeText(AccountKeep.this, \"Move left\", Toast.LENGTH_SHORT).show();\n cc = cc.plusDays(7);\n year = cc.getYear();\n month = cc.getMonthValue();\n day = cc.getDayOfMonth();\n DayOfWeek dayOfWeek = cc.getDayOfWeek();\n monthView.setText(String.valueOf(month));\n week_list.clear();\n week_list.addAll(myDateUtils.GetWeekAndDay(cc, dayOfWeek));\n simpleAdapter.notifyDataSetChanged();\n weekRecords.clear();\n try {\n records = myDb.getAllAccount();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n GetThisWeekList(records, weekRecords);\n myAdapter.setData(weekRecords);\n myAdapter.notifyDataSetChanged();\n budgetDefault = GetNewBudgetLeft();\n SnackbarShow();\n\n } else if (x2 > FLING_MIN_DISTANCE && Math.abs(velocityX) > FLING_MIN_VELOCITY) {\n //Right next week\n //Toast.makeText(AccountKeep.this, \"Move left\", Toast.LENGTH_SHORT).show();\n cc = cc.minusDays(7);\n year = cc.getYear();\n month = cc.getMonthValue();\n day = cc.getDayOfMonth();\n DayOfWeek dayOfWeek = cc.getDayOfWeek();\n monthView.setText(String.valueOf(month));\n week_list.clear();\n week_list.addAll(myDateUtils.GetWeekAndDay(cc, dayOfWeek));\n simpleAdapter.notifyDataSetChanged();\n weekRecords.clear();\n try {\n records = myDb.getAllAccount();\n } catch (ParseException e) {\n e.printStackTrace();\n }\n GetThisWeekList(records, weekRecords);\n myAdapter.setData(weekRecords);\n myAdapter.notifyDataSetChanged();\n //myAdapter.notifyItemRangeChanged(0, weekRecords.size());\n budgetDefault = GetNewBudgetLeft();\n SnackbarShow();\n\n }\n return false;\n }",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2,\n float velocityX, float velocityY) {\n return true;\n }",
"@Override\n\t\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n\t\t\t\tfloat velocityY) {\n\t\t\treturn false;\n\t\t}",
"@Override\n\tpublic boolean onFling(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\r\n public void onDownMotionEvent() {\n mFirstScroll = mDragging = true;\r\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView arg0, int arg1) {\n\t\t\t\treturn ;\n\t\t\t}",
"@Override\n public void run() {\n if (mItem != 0) {\n\n if (isFrist == true) {\n mCurrentItem = 0;\n isFrist = false;\n } else {\n if (mCurrentItem == bannerListView.size() - 1) {\n mCurrentItem = 0;\n } else {\n mCurrentItem++;\n }\n }\n viewpager.setCurrentItem(mCurrentItem);\n }\n viewpager.postDelayed(mPagerAction, 2500);\n }",
"@FXML\n private void handleFilteredListPanelScrollToFirst() {\n filteredTaskListPanel.scrollToFirst();\n }",
"@Test\n public void testFlingHoldAndRelease() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n\n // touch the list hold on the scrolling.\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onDraw();\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n detector.onScrollChanged();\n\n // release the finger.\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"@Override\n\t\tpublic void onScroll(AbsListView view, int firstVisibleItem,\n\t\t\t\tint visibleItemCount, int totalItemCount) {\n\t\t\tif (totalItemCount > 0 && totalItemCount < TOTAL_ITEM_FOUND - 1) {\n\t\t\t\tBoolean endOfList = false;\n\t\t\t\tendOfList = (visibleItemCount + firstVisibleItem == totalItemCount) ? true\n\t\t\t\t\t\t: false;\n\t\t\t\tif (endOfList && !KEY_IS_LOADING) {\n\t\t\t\t\tKEY_IS_LOADING = true;\n\t\t\t\t\tswitch (tab_interested_fan.getCheckedRadioButtonId()) {\n\t\t\t\t\tcase R.id.btn_Interested:\n\t\t\t\t\t\tif(KEY_IS_SEARCHING)\n\t\t\t\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_IDOL_SEARCHING, totalItemCount + 1, true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_IDOL_LISTING,\n\t\t\t\t\t\t\t\t\ttotalItemCount + 1, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase R.id.btn_Fan:\n\t\t\t\t\t\tif(KEY_IS_SEARCHING)\n\t\t\t\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_FAN_SEARCHING, totalItemCount + 1, true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tLoadListFriend(Const.TYPE_FRIEND_FAN_LISTING,\n\t\t\t\t\t\t\t\t\ttotalItemCount + 1, true);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}",
"private void onScrollerFinished(Scroller scroller) {\n\t\tif (scroller == mFlingScroller) {\n\t\t\tif (!ensureScrollWheelAdjusted()) {\n\t\t\t\tupdateInputTextView();\n\t\t\t}\n\t\t\t// onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);\n\t\t} else {\n\t\t\t// if (mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {\n\t\t\tupdateInputTextView();\n\t\t\t// }\n\t\t}\n\t}",
"@Override\r\n\t\tpublic void onScroll(AbsListView view, int firstVisibleItem,\r\n\t\t\t\tint visibleItemCount, int totalItemCount) {\n\t\t\tvisibleLastIndex = firstVisibleItem + visibleItemCount - 1;\r\n\t\t}",
"private void onUp()\n\t{\n\t\tsynchronized (HorizontalListView.this)\n\t\t{\n\t\t\tif (!mFlinging)\n\t\t\t{\n\t\t\t\treadjustScrollToMiddleItem();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void refresh() {\n\t\thandler.postDelayed(new Runnable() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\trefreshListView.stopRefresh();\n\t\t\t}\n\t\t}, 2000);\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {\n mImageFetcher.setPauseWork(true);\n } else {\n mImageFetcher.setPauseWork(false);\n }\n\t\t\t}",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem,\n int visibleItemCount, int totalItemCount) {\n boolean loadMore = /* maybe add a padding */\n firstVisibleItem + visibleItemCount >= totalItemCount-1;\n // xHelper.log(\"goapp\",\"onScroll\");\n if(loadMore==true && totalItemCount!=0 && isLoadingThreads==false && isMoreOld) {\n loadMoreOld();\n }\n }",
"public void recallScrollPos() {\n if (_primaryPlot!=null) {\n recallScrollPos(_scrollInfo.get(_primaryPlot).makeCopy());\n }\n }",
"@Override\n\t\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\t\tbForceScrollDown = false;\n\t\t\t\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(RecyclerView recyclerView,\n\t\t\t\t\tint newState) {\n\t\t\t\tsuper.onScrollStateChanged(recyclerView, newState);\n\t\t\t\tif (newState == RecyclerView.SCROLL_STATE_IDLE\n\t\t\t\t\t\t&& lastVisibleItem + 1 == mTiXianJiLuAdapter\n\t\t\t\t\t\t\t\t.getItemCount()) {\n\t\t\t\t\tswiperefreshlayout.setRefreshing(true);\n\t\t\t\t\tcurPage++;\n\t\t\t\t\tJiaoYiJiLuExec.getInstance().getTiXianJiLuList(mHandler,\n\t\t\t\t\t\t\tManagerUtils.getInstance().yjtc.getId(),\n\t\t\t\t\t\t\tcurPage, pageSize,\n\t\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_S,\n\t\t\t\t\t\t\tNetworkAsyncCommonDefines.GET_TXJL_LIST_F);\n\t\t\t\t}\n\n\t\t\t}",
"private void stopScrolling() {\n mScroller.forceFinished(true);\n if (Build.VERSION.SDK_INT >= 11) {\n mAutoCenterAnimator.cancel();\n }\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\tif(scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING){\n\t\t\t\t\tmImageFetcher.setPauseWork(true);\n\t\t\t\t}else{\n\t\t\t\t\tmImageFetcher.setPauseWork(false);\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onScroll(AbsListView view, int firstVisibleItem,\n\t\t\t\t\tint visibleItemCount, int totalItemCount) {\n\t\t\t\tif(firstVisibleItem==0){\n\t\t\t\t\tswipeLayout.setEnabled(true);\n\t\t\t\t}else{\n\t\t\t\t\tswipeLayout.setEnabled(false);\n\t\t\t\t}\n\n\t\t\t\tif(mLastFirstVisibleItem<firstVisibleItem)\n\t\t\t\t{\n\t\t\t\t\t//\t\t Log.i(\"SCROLLING DOWN\",\"TRUE\");\n\t\t\t\t\tAnimation slideUp = AnimationUtils.loadAnimation(getActivity(), R.anim.slide_up);\n\t\t\t\t\tstatuslyt.startAnimation(slideUp);\n\n\t\t\t\t}\n\t\t\t\tif(mLastFirstVisibleItem>firstVisibleItem)\n\t\t\t\t{\n\t\t\t\t\t//\t\t Log.i(\"SCROLLING UP\",\"TRUE\");\n\t\t\t\t}\n\t\t\t\tmLastFirstVisibleItem=firstVisibleItem;\n\t\t\t}",
"private void scrollList(final int scrolledDistance) {\n mListTop = mListTopStart + scrolledDistance;\n if (mRotationEnabled) {\n mListRotation = -(DEGREES_PER_SCREEN * mListTop) / getHeight();\n }\n requestLayout();\n }",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n this.currentFirstVisibleItem = firstVisibleItem;\n this.currentVisibleItemCount = visibleItemCount;\n this.totalItem = totalItemCount;\n\n try {\n isScrollCompleted();\n } catch (Exception ex) {\n\n }\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\tif (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {\n\t\t\t\t\tmImageFetcher.setPauseWork(true);\n\t\t\t\t} else {\n\t\t\t\t\tmImageFetcher.setPauseWork(false);\n\t\t\t\t}\n\t\t\t}",
"@Override\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n this.currentScrollState = scrollState;\n try {\n isScrollCompleted();\n } catch (Exception ex) {\n\n }\n }",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX,\n float velocityY) {\n try {\n if (Math.abs(e1.getY() - e2.getY()) > SWIPE_MAX_OFF_PATH)\n return false;\n // right to left swipe\n if (e1.getX() - e2.getX() > SWIPE_MIN_DISTANCE\n && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) {\n viewFlipper.setInAnimation(slideLeftIn);\n viewFlipper.setOutAnimation(slideLeftOut);\n viewFlipper.showNext();\n setNextViewItem();\n return true;\n\n } else if (e2.getX() - e1.getX() > SWIPE_MIN_DISTANCE\n && Math.abs(velocityX) > SWIPE_THRESHOLD_VELOCITY) {\n viewFlipper.setInAnimation(slideRightIn);\n viewFlipper.setOutAnimation(slideRightOut);\n viewFlipper.showPrevious();\n setPrevViewItem();\n return true;\n\n }\n } catch (Exception e) {\n // nothing\n }\n return false;\n }",
"@Override\r\n public boolean onScroll(float displacement, float delta, float velocity) {\n return false;\r\n }",
"@Override\n public boolean scrolled(int amount) {\n return false;\n }",
"@Override\n public boolean scrolled(int amount) {\n return false;\n }",
"@Override\n public boolean scrolled(int amount) {\n return false;\n }",
"@Override\n public boolean scrolled(int amount) {\n return false;\n }",
"@FXML\n private void handleMainListPanelScrollDown() {\n mainTaskListPanel.scrollToNext();\n }",
"protected boolean scroll(int amount) {\n\t// Does nothing\n\treturn false;\n}",
"public void fling(int velocityX, int velocityY) {\n\t\tint startX = mScrollLeft;\n\t\tint startY = mScrollTop;\n\t\t\n\t\tmScroller.fling(startX, startY, -velocityX, -velocityY, mRightBound, 0,\n\t\t\t\tmBottomBound, 0);\n \n\t\tinvalidate();\n\t}",
"@Override\n public void onScroll(AbsListView view,\n int firstVisibleItem,\n int visibleItemCount,\n int totalItemCount) {\n return;\n }",
"void onFastScrollStart(FastScroller fastScroller);",
"@Override\n\tpublic void onScroll(AbsListView view, int firstVisibleItem,\n\t\t\tint visibleItemCount, int totalItemCount) {\n\t\tif (totalItemCount > 0) {\n\t\t\tboolean init = false;\n\t\t\tif (mStartPos == -1) {\n\t\t\t\tinit = true;\n\t\t\t}\n\t\t\tmStartPos = firstVisibleItem;\n\t\t\tif (mStartPos + Constants.DEF_NUM >= totalItemCount) {\n\t\t\t\tmRefNum = totalItemCount - mStartPos - 1;// header\n\t\t\t} else {\n\t\t\t\tmRefNum = Constants.DEF_NUM;\n\t\t\t}\n\t\t\tif (init) {\n\t\t\t\trushIconThread();\n\t\t\t}\n\t\t}\n\n\t}",
"@Override\r\n public void onScrollStateChanged(AbsListView view, int scrollState) {\n\r\n if (scrollState == SCROLL_STATE_IDLE) {\r\n\r\n if (getScrollYDistance() > 0) {\r\n setListener();\r\n LogManager.i(\"=============onScrollStateChanged\");\r\n }\r\n// LogManager.i(\"=============getScrollYDistance()=\" + getScrollYDistance());\r\n }\r\n }",
"@Override\n public void run() {\n\n lvMusics.smoothScrollBy(-80, 10);\n handler.postDelayed(run_scroll_up, 1000);\n }",
"public void onRepeat() {\n\t\t// TODO Auto-generated method stub\n\t\tLastWholeDelta = 0;\n\t}",
"@FXML\n private void handleFilteredListPanelScrollUp() {\n filteredTaskListPanel.scrollToPrevious();\n }",
"@Override\n\t\t\tpublic boolean scrolled(int amount) {\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\n\t\t\tpublic boolean scrolled(int amount) {\n\t\t\t\treturn false;\n\t\t\t}",
"@Override\r\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\r\n\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\tfinal ListView lw = (ListView) view.findViewById(R.id.listView_calldata);\n\n\t\t\t if(scrollState == 0) \n\t\t\t Log.i(\"a\", \"scrolling stopped...\");\n\n\n\t\t\t if (view.getId() == lw.getId()) {\n\t\t\t final int currentFirstVisibleItem = lw.getFirstVisiblePosition();\n\t\t\t if (currentFirstVisibleItem > mLastFirstVisibleItem) {\n\t\t\t //mIsScrollingUp = false;\n\t\t\t Log.i(\"a\", \"scrolling down...\");\n\t\t\t \n\t\t\t if (gridView.getVisibility() == View.VISIBLE) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tgridView.setVisibility(View.GONE);\n\t\t\t\t\t\t\tdialPad_collapse_iv.setImageResource(R.drawable.ic_action_collapse);\n\t\t\t }\n \n\t\t\t } else if (currentFirstVisibleItem < mLastFirstVisibleItem) {\n\t\t\t //mIsScrollingUp = true;\n\t\t\t Log.i(\"a\", \"scrolling up...\");\n\t\t\t \n\t\t \n\t\t\t }\n\n\t\t\t mLastFirstVisibleItem = currentFirstVisibleItem;\n\t\t\t } \n\t\t\t}",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n //if there are no items in list, end method\n if(totalItemCount == 0) return;\n\n //if there are items in list, check if first visible item in list has changed\n if (isSameRow(firstVisibleItem)) {\n //if same, check top position of first visible item to see if scroll threshold is met\n int newScrollY = getTopItemScrollY();\n\n //check if scroll threshold is met\n boolean isSignificantDelta = Math.abs(mLastScrollY - newScrollY) > mScrollThreshold;\n\n //if change is significant\n if (isSignificantDelta) {\n //check scroll direction\n if (mLastScrollY > newScrollY) {\n //scroll up event\n onScrollUp();\n } else {\n //scroll down event\n onScrollDown();\n }\n }\n\n //set last scroll top position\n mLastScrollY = newScrollY;\n } else {\n //first visible item in list has changed, check change direction\n if (firstVisibleItem > mPreviousFirstVisibleItem) {\n //first visible item is greater, scroll up event\n onScrollUp();\n } else {\n //first visible item is less, scroll down event\n onScrollDown();\n }\n\n //save top position of first visible item\n mLastScrollY = getTopItemScrollY();\n\n //save item position of first visible item\n mPreviousFirstVisibleItem = firstVisibleItem;\n }\n }",
"@Override\n public void run() {\n moveScrollDown();\n }",
"private void updateUi (){\n //get the first list item postion\n int currentPosition =listView.getFirstVisiblePosition();\n //append the new recipes to listview\n RecipeAdapter adapter = new RecipeAdapter(this , recipesList);\n listView.setAdapter(adapter);\n // Setting new scroll position to continue\n listView.setSelectionFromTop(currentPosition + 1, 0);\n }",
"@Override\n\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n\t\tif (pic != null && (Math.abs(velocityX) > 5000 || Math.abs(velocityY) > 5000)) {\n\t\t\tobjects.remove(pic);\n\t\t\tpic = null;\n\t\t}\n\t\treturn false;\n\t}",
"@Override\n public void run() {\n\n lvMusics.smoothScrollBy(80, 10);\n handler.postDelayed(run_scroll_up, 1000);\n }",
"private void sendScroll() {\n\t\tfinal Handler handler = new Handler();\n\t\tnew Thread(new Runnable() {\n\t\t\t@Override\n\t\t\tpublic void run() {\n\t\t\t\twhile (mTopIndex <= mFinalIndex) {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t} catch (InterruptedException e) {\n\n\t\t\t\t\t}\n\t\t\t\t\thandler.post(new Runnable() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\t\tmTopIndex += 0.1;\n\t\t\t\t\t\t\tscrollView.scrollBy(0, (int) mTopIndex);\n\t\t\t\t\t\t\tif (mTopIndex >= mFinalIndex) {\n\t\t\t\t\t\t\t\tmTopIndex = 0;\n\t\t\t\t\t\t\t\tscrollView.fullScroll(ScrollView.FOCUS_UP);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// Check if scroll completed or not\n\t\t\t\t\t\t\tif (mFirstScroll && (mPrevY == scrollView.getScrollY())) {\n\t\t\t\t\t\t\t\tmFinalIndex = mTopIndex + 5;\n\t\t\t\t\t\t\t\tmFirstScroll = false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmPrevY = scrollView.getScrollY();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t}\n\t\t\t}\n\t\t}).start();\n\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\tif (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_IDLE\n\t\t\t\t\t\t&& listView.getLastVisiblePosition() == listView.getCount() - 1)\n\t\t\t\t{\n\t\t\t\t\tif(list.size() != 0)\n\t\t\t\t\t\tload();\n\t\t\t\t}\n\t\t\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView absListView, int scrollState)\n\t\t\t{\n\t\t\t\tif (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING)\n\t\t\t\t{\n\t\t\t\t\tmImageDownloaderActivity.setPauseWork(true);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tmImageDownloaderActivity.setPauseWork(false);\n\t\t\t\t}\n\t\t\t}",
"@Override\r\n\t\tpublic void run() {\n\t\t\tpostInvalidate();\r\n\t\t\t//postDelayed(this, SCROLLER_DISTANCE);\r\n\t\t}",
"@Override\n\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\tswitch (scrollState) {\n\t\tcase OnScrollListener.SCROLL_STATE_IDLE:\n\t\t\trushIconThread();\n\t\t\tbreak;\n\t\t}\n\t}",
"private void doTheAutoRefresh() {\n handler.postDelayed(new Runnable() {\n @Override\n public void run() {\n\n setDatatoList();\n }\n }, 120000);\n }",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem,\n int visibleItemCount, int totalItemCount) {\n View mFirstChild = view.getChildAt(0);// 获取可见Item的第一个View\n if (mFirstChild == mListHeaderView && mFirstChild.getTop() == 0) {\n mPullRefreshScroll.setMode(Mode.PULL_FROM_START);// 设置为下拉刷新\n } else {\n if (mPullRefreshScroll.getState() == State.RESET) {\n mPullRefreshScroll.setMode(Mode.DISABLED);\n } else if (mFirstChild == mListHeaderView\n && (-mFirstChild.getTop()) > mListHeaderView\n .getHeight() / 2) {\n // 上滑距离超过HeaderView高度一半时,取消刷新,并停止异步任务\n mPullRefreshScroll.onRefreshComplete();\n if (mRefreshWeather != null)\n mRefreshWeather.cancel(true);\n }\n }\n }",
"@Override\n public void onScrollStateChanged(AbsListView absListView, int scrollState) {\n // ensures smoother scrolling\n if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {\n imageRequestQueue.stop();\n } else {\n imageRequestQueue.start();\n }\n }",
"public void checkScroll()\n {\n if (player.getY() <= 300)\n {\n removeObject (startingPlatform);\n scrollEverything();\n score += 5;\n counter.setValue (score);\n }\n }",
"public void mo2783j(List<RecyclerView.C0145a0> list) {\n int size = list.size();\n while (true) {\n size--;\n if (size >= 0) {\n list.get(size).f996a.animate().cancel();\n } else {\n return;\n }\n }\n }",
"@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tif (initFlag)\n\t\t\t\t\t\tmListView.smoothScrollToPosition(mSelectedPosition);\n\t\t\t\t\telse\n\t\t\t\t\t\tmListView.setSelection(mSelectedPosition);\n\t\t\t\t}",
"@Override\n\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\tif (scrollState == OnScrollListener.SCROLL_STATE_IDLE\n && lastVisibleIndex == adapter.getCount() && lastVisibleIndex != 0) {\n // 当滑到底部时自动加载\n pg.setVisibility(View.VISIBLE);\n bt.setVisibility(View.GONE);\n loadMoreData();\n\n }\n\t}",
"@FXML\n private void handleFilteredListPanelScrollToLast() {\n filteredTaskListPanel.scrollToLast();\n }",
"public void performUpdateReset() {\n switchToPage(NavDrawerAdapter.FLUFF_ID);\n\t}",
"@Override\n public void onScrollChanged(int scrollY, boolean firstScroll, boolean dragging) {\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) \n\t\t\t{\n\t\t\t\tif (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) \n\t\t\t\t{\n\t\t\t\t\t// Before Honeycomb pause image loading on scroll to help with performance\n\t\t\t\t\tif (!Utils.hasHoneycomb()) \n\t\t\t\t\t{\n\t\t\t\t\t\tmain.imageLoader.setPauseWork(true);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tmain.imageLoader.setPauseWork(false);\n\t\t\t\t}\n\t\t\t}",
"public abstract void scroll(long ms);",
"private void loadScrollState() {\n AppExecutors.getInstance().mainThread().execute(() ->\r\n mScrollViewFinal.scrollTo(0, mActivityPreferences\r\n .getInt(getScrollType(mIsRedWine), 0)));\r\n }",
"@Override\n public boolean scrolled(final int amount) {\n return false;\n }",
"@Override\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount){\n if (totalItemCount < cargadosAnterior) {\n this.paginaActual = 0;\n this.cargadosAnterior = totalItemCount;\n if (totalItemCount == 0) { this.cargando = true; }\n }\n\n // si el estado es cargando y el número de elementos actual es mayor que el número de elementos anterior,\n // es que ya hemos terminado la carga, por lo que cargando pasaría a false.\n if (cargando && (totalItemCount > cargadosAnterior)) {\n cargando = false;\n cargadosAnterior = totalItemCount;\n paginaActual++;\n }\n\n // If it isn’t currently loading, we check to see if we have breached\n // the visibleThreshold and need to reload more data.\n // If we do need to reload some more data, we execute onLoadMore to fetch the data.\n if (!cargando && (totalItemCount - visibleItemCount)<=(firstVisibleItem + bajoLista)) {\n //cargaMas(paginaActual+1, totalItemCount);\n cargaMas(paginaActual, totalItemCount);\n cargando = true;\n }\n }",
"@Override\n public void onScrollChange(NestedScrollView v, int scrollX, int scrollY, int oldScrollX, int oldScrollY) {\n if (scrollY > oldScrollY + 12 && extendedFloatingActionButton.isExtended())\n {\n extendedFloatingActionButton.shrink();\n }\n\n // the delay of the extension of the FAB is set for 12 items\n if (scrollY < oldScrollY - 12 && !extendedFloatingActionButton.isExtended()) {\n extendedFloatingActionButton.extend();\n }\n\n // if the nestedScrollView is at the first item of the list then the\n // extended floating action should be in extended state\n if (scrollY == 0) {\n extendedFloatingActionButton.extend();\n }\n }",
"public void nextFrame() {\n\t\tfor (int i = 0; i < numFlakes; i++) {\n\t\t\tflakes[i].nextFrame();\n\t\t}\n\t}",
"private void onScrollDetected() {\n swipeRefreshLayout.setEnabled(false); // don't allow refreshes if we are scrolling\n }",
"@Override\n public void onScroll(AbsListView absListView, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\n if (totalItemCount - visibleItemCount <= firstVisibleItem) {\n autoLoadPosts();\n }\n }",
"@Override\n\tpublic void onScroll(AbsListView view, int firstVisibleItem,\n\t\t\tint visibleItemCount, int totalItemCount) {\n\t\tif (mCurrentScrollState == SCROLL_STATE_TOUCH_SCROLL\n\t\t\t\t&& firstVisibleItem == 0\n\t\t\t\t&& mHeaderLinearLayout.getBottom() >= 0\n\t\t\t\t&& mHeaderLinearLayout.getBottom() < mHeaderHeight) {\n\t\t\tif (mPullRefreshState == NONE_PULL_REFRESH) {\n\t\t\t\tmPullRefreshState = ENTER_PULL_REFRESH;\n\t\t\t}\n\t\t} else if (mCurrentScrollState == SCROLL_STATE_TOUCH_SCROLL\n\t\t\t\t&& firstVisibleItem == 0\n\t\t\t\t&& mHeaderLinearLayout.getBottom() >= mHeaderHeight) {\n\t\t\tif (mPullRefreshState == ENTER_PULL_REFRESH\n\t\t\t\t\t|| mPullRefreshState == NONE_PULL_REFRESH) {\n\t\t\t\tmPullRefreshState = OVER_PULL_REFRESH;\n\t\t\t\tmDownY = mMoveY;\n\t\t\t\tmHeaderTextPull.setText(\"放开刷新数据\");\n\t\t\t\tmHeaderPullDownImageView.setVisibility(View.GONE);\n\t\t\t\tmHeaderReleaseDownImageView.setVisibility(View.VISIBLE);\n\t\t\t}\n\t\t} else if (mCurrentScrollState == SCROLL_STATE_TOUCH_SCROLL\n\t\t\t\t&& firstVisibleItem != 0) {\n\t\t\tif (mPullRefreshState == ENTER_PULL_REFRESH) {\n\t\t\t\tmPullRefreshState = NONE_PULL_REFRESH;\n\t\t\t}\n\t\t} else if (mCurrentScrollState == SCROLL_STATE_FLING) {\n\t\t\tif (mPullRefreshState == NONE_PULL_REFRESH) {\n\t\t\t\tif (firstVisibleItem == 0) {\n\t\t\t\t\tsetSelection(1);\n\t\t\t\t} else {\n\t\t\t\t\tsetSelection(firstVisibleItem);\n\t\t\t\t}\n\n\t\t\t}\n\t\t}\n\n\t\tif ((totalItemCount - visibleItemCount - firstVisibleItem) <= 3) {\n\n\t\t\tmFooterTextView.setText(R.string.listview_footer_hint_ready);\n\t\t\tmFooterProgressBar.setVisibility(View.VISIBLE);\n\t\t\tif (mRefreshListener != null) {\n\t\t\t\tmRefreshListener.more();\n\t\t\t}\n\t\t\tmFooterTextView.setText(R.string.listview_footer_hint_normal);\n\t\t}\n\t}",
"@Override\n\tpublic boolean scrolled(int amount) {\n\t\treturn false;\n\t}"
] | [
"0.66425115",
"0.6615452",
"0.64987874",
"0.6447748",
"0.6424241",
"0.63050956",
"0.6268932",
"0.62598366",
"0.62203705",
"0.62163264",
"0.6215364",
"0.6190439",
"0.614799",
"0.61232984",
"0.61232984",
"0.61232984",
"0.61232984",
"0.61232984",
"0.61232984",
"0.61232984",
"0.61232984",
"0.6119662",
"0.6109025",
"0.6106909",
"0.6074924",
"0.6067444",
"0.6067444",
"0.6023081",
"0.60129434",
"0.60052836",
"0.5983311",
"0.5969049",
"0.5918391",
"0.5910675",
"0.59080744",
"0.5878537",
"0.58440936",
"0.58405185",
"0.5823028",
"0.58209443",
"0.5816667",
"0.581662",
"0.58123434",
"0.58117306",
"0.5808105",
"0.5780389",
"0.5774259",
"0.57709926",
"0.57649654",
"0.57356405",
"0.57334614",
"0.57257307",
"0.57257307",
"0.57257307",
"0.57257307",
"0.57134485",
"0.5703529",
"0.5693174",
"0.5684842",
"0.5661388",
"0.5655352",
"0.5649036",
"0.5646494",
"0.56311476",
"0.5629018",
"0.5615901",
"0.5615901",
"0.5610268",
"0.5609425",
"0.5608345",
"0.56064314",
"0.5592205",
"0.558673",
"0.5586357",
"0.55862206",
"0.55825377",
"0.5582052",
"0.5580489",
"0.55790675",
"0.55772525",
"0.55726296",
"0.5571196",
"0.556785",
"0.5561854",
"0.5559578",
"0.55568415",
"0.5555218",
"0.5552811",
"0.5541446",
"0.55411696",
"0.55401903",
"0.55365473",
"0.55331326",
"0.55314523",
"0.55178493",
"0.5506396",
"0.55049956",
"0.5494772",
"0.54936147",
"0.5493021"
] | 0.6675932 | 0 |
After the 1st fling, user pauses the the scrolling by touch the list and then release. | @Test
public void testFlingHoldAndRelease() {
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));
detector.onScrollChanged();
assertThat(scrollStateListener.startCount).isEqualTo(1);
detector.onScrollChanged();
detector.onScrollChanged();
detector.onScrollChanged();
detector.fling();
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));
detector.onDraw();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onScrollChanged();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onDraw();
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onScrollChanged();
// touch the list hold on the scrolling.
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));
detector.onDraw();
detector.onScrollChanged();
assertThat(scrollStateListener.startCount).isEqualTo(1);
assertThat(scrollStateListener.stopCount).isEqualTo(0);
detector.onDraw();
detector.onScrollChanged();
// release the finger.
detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));
assertThat(scrollStateListener.startCount).isEqualTo(1);
assertThat(scrollStateListener.stopCount).isEqualTo(1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n public void onDownMotionEvent() {\n mFirstScroll = mDragging = true;\r\n }",
"private void scrollerFinished()\n\t{\n\t\tif (!mFingerDown)\n\t\t{\n\t\t\treadjustScrollToMiddleItem();\n\t\t}\n\t\t\n\t}",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n if (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {\n mImageFetcher.setPauseWork(true);\n } else {\n mImageFetcher.setPauseWork(false);\n }\n\t\t\t}",
"@Test\n public void testDoubleFling() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n\n // second fling\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onDraw();\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n detector.onScrollChanged();\n detector.onDraw();\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n detector.onDraw();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n mScroller.show();\n return super.onFling(e1, e2, velocityX, velocityY);\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\tif(scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING){\n\t\t\t\t\tmImageFetcher.setPauseWork(true);\n\t\t\t\t}else{\n\t\t\t\t\tmImageFetcher.setPauseWork(false);\n\t\t\t\t}\n\t\t\t}",
"void onFastScrollStop(FastScroller fastScroller);",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) {\n\t\t\t\tif (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) {\n\t\t\t\t\tmImageFetcher.setPauseWork(true);\n\t\t\t\t} else {\n\t\t\t\t\tmImageFetcher.setPauseWork(false);\n\t\t\t\t}\n\t\t\t}",
"public void pause() {\r\n fPause = true;\r\n }",
"@Test\n public void testFling() {\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_DOWN));\n detector.onScrollChanged();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.onScrollChanged();\n detector.fling();\n detector.onTouchEvent(createFakeEvent(MotionEvent.ACTION_UP));\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onDraw();\n assertThat(scrollStateListener.stopCount).isEqualTo(0);\n detector.onScrollChanged();\n detector.onDraw();\n detector.onDraw();\n assertThat(scrollStateListener.startCount).isEqualTo(1);\n assertThat(scrollStateListener.stopCount).isEqualTo(1);\n }",
"public void run() {\n if (gui.getPauseState()) {\n this.gui.scroll(false);\n }\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView absListView, int scrollState)\n\t\t\t{\n\t\t\t\tif (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING)\n\t\t\t\t{\n\t\t\t\t\tmImageDownloaderActivity.setPauseWork(true);\n\t\t\t\t} else\n\t\t\t\t{\n\t\t\t\t\tmImageDownloaderActivity.setPauseWork(false);\n\t\t\t\t}\n\t\t\t}",
"private void onUp()\n\t{\n\t\tsynchronized (HorizontalListView.this)\n\t\t{\n\t\t\tif (!mFlinging)\n\t\t\t{\n\t\t\t\treadjustScrollToMiddleItem();\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\t\t\t\t\tpublic boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY){\n\t\t\t\t\t\tSystem.out.println(\"fling\");\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\n\t\t\t\t\t}",
"@Override\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tscrollY = smsList.getFirstVisiblePosition();\n\t}",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n float scrollTheta = vectorToScalarScroll(\n velocityX,\n velocityY,\n e2.getX() - mPieBounds.centerX(),\n e2.getY() - mPieBounds.centerY());\n mScroller.fling(\n 0,\n (int) getPieRotation(),\n 0,\n (int) scrollTheta / FLING_VELOCITY_DOWNSCALE,\n 0,\n 0,\n Integer.MIN_VALUE,\n Integer.MAX_VALUE);\n\n // Start the animator and tell it to animate for the expected duration of the fling.\n if (Build.VERSION.SDK_INT >= 11) {\n mScrollAnimator.setDuration(mScroller.getDuration());\n mScrollAnimator.start();\n }\n return true;\n }",
"public void run() {\n if (gui.getPauseState()) {\n this.gui.scroll(true);\n }\n }",
"@Override\n public boolean onFling(MotionEvent motionEvent, MotionEvent motionEvent1, float velocityX, float velocityY) {\n mScroller.forceFinished(true);\n mIsFling = true;\n mScroller.fling(\n (int) mOffset,\n 0,\n (int) -velocityX,\n (int) velocityY,\n 0,\n (int) mMaxOffset,\n 0,\n 0);\n // Invalidates to trigger computeScroll()\n ViewCompat.postInvalidateOnAnimation(ScaleView.this);\n return true;\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView view, int scrollState) \n\t\t\t{\n\t\t\t\tif (scrollState == AbsListView.OnScrollListener.SCROLL_STATE_FLING) \n\t\t\t\t{\n\t\t\t\t\t// Before Honeycomb pause image loading on scroll to help with performance\n\t\t\t\t\tif (!Utils.hasHoneycomb()) \n\t\t\t\t\t{\n\t\t\t\t\t\tmain.imageLoader.setPauseWork(true);\n\t\t\t\t\t}\n\t\t\t\t} \n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\tmain.imageLoader.setPauseWork(false);\n\t\t\t\t}\n\t\t\t}",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2,\n float velocityX, float velocityY) {\n return false;\n }",
"@Override\r\n\t public void onPause() {\n\t \tsuper.onPause();\r\n\t \t StaticStore.LogPrinter('e',\"onPause() ListSelection\");\r\n\t \t StaticStore.midlet.onPauseCalled();\r\n\t }",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n return false;\n }",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2, float velocityX, float velocityY) {\n return false;\n }",
"public void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"private void stopScrolling() {\n mScroller.forceFinished(true);\n if (Build.VERSION.SDK_INT >= 11) {\n mAutoCenterAnimator.cancel();\n }\n }",
"@Override\n\t\t\tpublic void onScroll(AbsListView view, int firstVisibleItem,\n\t\t\t\t\tint visibleItemCount, int totalItemCount) {\n\t\t\t\tif(firstVisibleItem==0){\n\t\t\t\t\tswipeLayout.setEnabled(true);\n\t\t\t\t}else{\n\t\t\t\t\tswipeLayout.setEnabled(false);\n\t\t\t\t}\n\n\t\t\t\tif(mLastFirstVisibleItem<firstVisibleItem)\n\t\t\t\t{\n\t\t\t\t\t//\t\t Log.i(\"SCROLLING DOWN\",\"TRUE\");\n\t\t\t\t\tAnimation slideUp = AnimationUtils.loadAnimation(getActivity(), R.anim.slide_up);\n\t\t\t\t\tstatuslyt.startAnimation(slideUp);\n\n\t\t\t\t}\n\t\t\t\tif(mLastFirstVisibleItem>firstVisibleItem)\n\t\t\t\t{\n\t\t\t\t\t//\t\t Log.i(\"SCROLLING UP\",\"TRUE\");\n\t\t\t\t}\n\t\t\t\tmLastFirstVisibleItem=firstVisibleItem;\n\t\t\t}",
"public abstract void scroll(long ms);",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\t\t\r\n\t}",
"@Override\n public boolean onFling(MotionEvent e1, MotionEvent e2,\n float velocityX, float velocityY) {\n return true;\n }",
"@Override\n public void run() {\n\n try {\n Thread.sleep(300);\n } catch (InterruptedException e1) {\n e1.printStackTrace();\n }\n\n while (running) {\n\n Platform.runLater(this::scrollY);\n\n try {\n sleep(15);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n }",
"@Override\n\t\t\tpublic void onScrollStateChanged(AbsListView arg0, int arg1) {\n\t\t\t\treturn ;\n\t\t\t}",
"@Override\n public void onFlingStarted() {\n Timber.d(\"A fling just started\");\n\n }",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\n\t\t\t}",
"@Override\r\n public void pause() {\r\n\r\n }",
"@Override\r\n public void pause() {\r\n\r\n }",
"@Override\n public void run() {\n\n lvMusics.smoothScrollBy(-80, 10);\n handler.postDelayed(run_scroll_up, 1000);\n }",
"@Override\n\t\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\t\n\t\t\t\t}",
"@Override\n public void run() {\n if (mItem != 0) {\n\n if (isFrist == true) {\n mCurrentItem = 0;\n isFrist = false;\n } else {\n if (mCurrentItem == bannerListView.size() - 1) {\n mCurrentItem = 0;\n } else {\n mCurrentItem++;\n }\n }\n viewpager.setCurrentItem(mCurrentItem);\n }\n viewpager.postDelayed(mPagerAction, 2500);\n }",
"@Override\n public void run() {\n\n lvMusics.smoothScrollBy(80, 10);\n handler.postDelayed(run_scroll_up, 1000);\n }",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"@Override\n\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\n\t}",
"private void fling(int velocityY) {\n\t\tmPreviousScrollerY = 0;\n\n\t\tif (velocityY > 0) {\n\t\t\tmFlingScroller\n\t\t\t\t\t.fling(0, 0, 0, velocityY, 0, 0, 0, Integer.MAX_VALUE);\n\t\t} else {\n\t\t\tmFlingScroller.fling(0, Integer.MAX_VALUE, 0, velocityY, 0, 0, 0,\n\t\t\t\t\tInteger.MAX_VALUE);\n\t\t}\n\n\t\tinvalidate();\n\t}",
"public void start(){\n //Set pausing to false\n pausing = false;\n next();\n }",
"@Override\n\t\tpublic void pause() {\n\t\t \n\t\t}",
"@Override\n public void run() {\n moveScrollDown();\n }",
"@Override\r\n public void onPageScrollStateChanged(int arg0) {\n\r\n }",
"@Override\r\n\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t}",
"@Override\r\n\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\n\tpublic boolean onFling(MotionEvent arg0, MotionEvent arg1, float arg2,\n\t\t\tfloat arg3) {\n\t\treturn false;\n\t}",
"@Override\r\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\t\r\n\t\t\t}",
"@Test\n\tpublic void scroll_multy_fingure_tap() {\n\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0) {\n\t\t\t\n\t\t}",
"@Override\r\n\t\t\tpublic void onPageScrollStateChanged(int arg0) {\n\r\n\t\t\t}",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }",
"@Override\n public void onPageScrollStateChanged(int arg0) {\n \n }",
"@Override\n\tpublic void pause() \n\t{\n\n\t}",
"@Override\r\n\tpublic void pause() {\n\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\r\n\t}",
"@Override\r\n\tpublic void pause() {\n\r\n\t}",
"@Override\n\t\tpublic void onPageScrollStateChanged(int arg0)\n\t\t{\n\t\t\t\n\t\t}",
"public void recallScrollPos() {\n if (_primaryPlot!=null) {\n recallScrollPos(_scrollInfo.get(_primaryPlot).makeCopy());\n }\n }",
"void onScroll(boolean bDragging);",
"private void onScrollerFinished(Scroller scroller) {\n\t\tif (scroller == mFlingScroller) {\n\t\t\tif (!ensureScrollWheelAdjusted()) {\n\t\t\t\tupdateInputTextView();\n\t\t\t}\n\t\t\t// onScrollStateChange(OnScrollListener.SCROLL_STATE_IDLE);\n\t\t} else {\n\t\t\t// if (mScrollState != OnScrollListener.SCROLL_STATE_TOUCH_SCROLL) {\n\t\t\tupdateInputTextView();\n\t\t\t// }\n\t\t}\n\t}",
"@Override\r\n public void pause() {\n }",
"@Override\r\n public void pause() {\n }",
"@Override\r\n public void pause() {\n }",
"public void stop()\n\t{\n\t\tindex = 0;\n\t\tlastUpdate = -1;\n\t\tpause();\n\t}",
"@Override\n\tpublic void pause()\n\t{\n\n\t}",
"@Override\n \tpublic void pause() {\n \t}",
"private void pause() {\n\t\t// TODO\n\t}",
"@Override\r\n\tprotected void onPause() {\n\t\tsuper.onPause();\r\n\t\tHomeView.home_pressed = \"wait\";\r\n\t\ttry {\r\n\t\t\tscanLeDevice(false);\r\n\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// mLeDeviceListAdapter.clear();\r\n\r\n\t}",
"void onFastScrollStart(FastScroller fastScroller);"
] | [
"0.6341789",
"0.6274423",
"0.6236458",
"0.62354773",
"0.62012434",
"0.61802864",
"0.6162923",
"0.6130988",
"0.6116016",
"0.61134",
"0.6068013",
"0.6053939",
"0.6045373",
"0.60407424",
"0.6032962",
"0.5996316",
"0.5987256",
"0.59428287",
"0.59410536",
"0.5929263",
"0.5874858",
"0.5867859",
"0.5858842",
"0.5845488",
"0.582112",
"0.5815721",
"0.57994384",
"0.5789133",
"0.5789133",
"0.5789133",
"0.5789133",
"0.5789133",
"0.5789133",
"0.5789133",
"0.5789133",
"0.5789133",
"0.5782836",
"0.57706475",
"0.5765379",
"0.57611305",
"0.57554746",
"0.57554746",
"0.57554746",
"0.57554746",
"0.57554746",
"0.57554746",
"0.57554746",
"0.57554746",
"0.57554746",
"0.57554746",
"0.5745794",
"0.5745794",
"0.57201695",
"0.5719142",
"0.57130164",
"0.5712858",
"0.5707767",
"0.5707767",
"0.5707767",
"0.5707767",
"0.5707767",
"0.5707767",
"0.5707767",
"0.570726",
"0.5703586",
"0.57016313",
"0.5695718",
"0.569306",
"0.5692328",
"0.5692328",
"0.56864864",
"0.56864864",
"0.5681711",
"0.5679972",
"0.56789464",
"0.56789464",
"0.56760293",
"0.56736183",
"0.56736183",
"0.56644654",
"0.56585306",
"0.56585306",
"0.56585306",
"0.56585306",
"0.56585306",
"0.56585306",
"0.56585306",
"0.5651574",
"0.5648153",
"0.56431186",
"0.5641697",
"0.5641672",
"0.5641672",
"0.5641672",
"0.56413245",
"0.56386024",
"0.56319124",
"0.56311846",
"0.5623985",
"0.56239194"
] | 0.6435367 | 0 |
TODO: put/take it to/from processing stack | public NamespaceContext getNamespaceContext() {
LOGGER.entering(JsonXmlStreamReader.class.getName(), "getNamespaceContext");
NamespaceContext result = new JsonNamespaceContext();
LOGGER.exiting(JsonXmlStreamReader.class.getName(), "getNamespaceContext", result);
return result;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n \tpublic void process() {\n \t\t\r\n \t}",
"@Override\n\tpublic void processing() {\n\n\t}",
"@Override\n public Object preProcess() {\n return null;\n }",
"StackManipulation cached();",
"public void process() {\n\t}",
"protected void additionalProcessing() {\n\t}",
"@Override\n\tpublic String process() {\n\t\treturn null;\n\t}",
"@Override\n\tpublic void processingInstruction() {\n\t\t\n\t}",
"@Override\n public void preprocess() {\n }",
"@Override\n\tpublic void startProcessing() {\n\n\t}",
"@Override\n public void preprocess() {\n }",
"public void intermediateProcessing() {\n //empty\n }",
"@Override\n\tpublic void processData() {\n\t\t\n\t}",
"public void processing();",
"void preProcess();",
"public void process() {\n\n }",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic Map<String, Object> preProccess() {\n\t\treturn null;\n\t}",
"@Override\r\n\tprotected void processExecute() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"@Override\r\n\tprotected void processFinish() {\n\r\n\t}",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"public void preprocess() {\n }",
"@Override\n\tpublic void process() throws Exception {\n\n\t}",
"private synchronized BackStep peek() {\r\n\t\t\treturn stack[top];\r\n\t\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}",
"SporadicProcess getSporadic();",
"protected abstract StackManipulation preparation();",
"@Override\r\n\tpublic void process() {\n\t\tSystem.out.println(\"this is singleBOx \" + this.toString());\r\n\t}",
"private void workOnQueue() {\n }",
"@Override\n public void capture() {\n }",
"private ISuspendableSchedulableProcess currentStep() {\n if (!processQ_NonInterruptable.isEmpty()) {\r\n return processQ_NonInterruptable.peek();\r\n } else {\r\n return processQ_Interruptable.peek();\r\n }\r\n }",
"public void postProcessing() {\n //empty\n }",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void processInput() {\n\t}",
"public void process();",
"@Override\r\n\tprotected void processTarget() {\n\r\n\t}",
"@Override\r\n\tprotected void processTarget() {\n\r\n\t}",
"public void smell() {\n\t\t\n\t}",
"private ProcessorUtils() { }",
"@SuppressWarnings(\"unused\")\n private void _read() {\n }",
"@Override\n\t\t\tpublic void onProcess(int process) {\n\t\t\t}",
"public void before() {\n process = Thread.currentThread();\n }",
"public void prepareForDeferredProcessing() {\n\n }",
"public interface ProcessContext extends Serializable {\r\n /**\r\n * answer with the current summary state of the processing context\r\n */\r\n Object getState();\r\n\r\n /**\r\n * Set the summary state of the processing context\r\n *\r\n * @param state to be set\r\n */\r\n void setState(Object state);\r\n}",
"void execute()\n\t{\n\t\tVM.top++;\n\t\tVM.opStack[VM.top] = arg();\n\t\tVM.pc++;\n\t}",
"void process();",
"void process();",
"@Override\n\tpublic void process(Exchange arg0) throws Exception {\n\t\t\n\t}",
"@Override\n\tprotected Object run() {\n\t\treturn null;\n\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public final void mo51373a() {\n }",
"@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autEndProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autEndProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\n\t\t\t}",
"@Override\r\n\tpublic void run(ImageProcessor ip) {\n\t\t\r\n\t}",
"public int getProcessedDataOffset() { return 0; }",
"@Override\n\tpublic void preBacktrack() {\n\t\t\n\t}",
"public abstract void onProcess();",
"Object peek();",
"@Override\r\n\tprotected void compute() {\n\t\t\r\n\t}",
"public ChannelPipeline method_4119() {\n return null;\n }",
"@Override\n\tpublic void GetOut() {\n\t\t\n\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\t\tpublic void autInitProcess() {\n\t\t\t\t\t\r\n\t\t\t\t}",
"@Override\r\n\t\t\tprotected void restoreContext() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"private void processConcept() {\r\n Concept currentConcept = (Concept) concepts.takeOut();\r\n if (currentConcept != null) {\r\n currentTerm = currentConcept.getTerm();\r\n concepts.putBack(currentConcept); // current Concept remains in the bag all the time\r\n currentConcept.fire(); // a working cycle\r\n }\r\n }",
"public void process(Object value) {\n\t\t//empty\n\t}",
"@Override\n public void capture() {\n captureMySpace();\n }",
"@Override\n public void capture() {\n captureMySpace();\n }",
"@Override\n public void capture() {\n captureMySpace();\n }",
"void processQueue();",
"@Override\n\tpublic void call() {\n\t\t\n\t}",
"@Override\r\n\tpublic void visit(ParkB parkB) {\n\t\t\r\n\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\t\n\t\t}",
"@Override\n\t\tpublic void run() {\n\t\t\tsuper.run();\n\t\t\tpreserved(bitmap);\n\t\t}",
"public final void rq() {\n this.state = 0;\n this.bbo = 0;\n this.bbz = 256;\n }",
"private ProcessedDynamicData( ) {\r\n super();\r\n }",
"@Override\n\t\tpublic void run() {\n\n\t\t}",
"@Override\n public MessageProcessor next() {\n return null;\n }",
"private final void push(Object ob) {\r\n\t\teval_stack.add(ob);\r\n\t}",
"@Override\n public void run() {\n\tprocess();\n }",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\r\n\t\t\tpublic void autInitProcess() {\n\t\t\t\t\r\n\t\t\t}"
] | [
"0.6543154",
"0.61939126",
"0.60941625",
"0.5968729",
"0.5920094",
"0.5912903",
"0.58382475",
"0.5838146",
"0.5740897",
"0.5740705",
"0.5724716",
"0.57004315",
"0.5675113",
"0.56593686",
"0.56532794",
"0.56422096",
"0.5562188",
"0.5542512",
"0.5533527",
"0.5498286",
"0.5498286",
"0.5498286",
"0.54930174",
"0.54930174",
"0.54930174",
"0.54930174",
"0.54884547",
"0.54809916",
"0.54656935",
"0.54244787",
"0.5418548",
"0.54146844",
"0.5381586",
"0.537754",
"0.5349769",
"0.5338557",
"0.53382903",
"0.5316438",
"0.5309541",
"0.53083766",
"0.53083766",
"0.52898175",
"0.52673763",
"0.5246052",
"0.5245957",
"0.5224595",
"0.5220044",
"0.52107316",
"0.51997274",
"0.51992935",
"0.51992935",
"0.5194151",
"0.5190349",
"0.5188242",
"0.5188242",
"0.5180097",
"0.51621103",
"0.51541513",
"0.51541513",
"0.5153636",
"0.5153412",
"0.5153412",
"0.5153412",
"0.5153412",
"0.5153412",
"0.5151759",
"0.51513964",
"0.5111798",
"0.5110177",
"0.51093006",
"0.5101345",
"0.5098368",
"0.50949836",
"0.50919086",
"0.5087695",
"0.5087695",
"0.50841564",
"0.5077102",
"0.5077102",
"0.5071296",
"0.50709283",
"0.50709254",
"0.50709254",
"0.50709254",
"0.5064393",
"0.506395",
"0.5058926",
"0.5057274",
"0.5057274",
"0.50524074",
"0.5050505",
"0.50492",
"0.50453204",
"0.5044982",
"0.5038591",
"0.50363946",
"0.5033834",
"0.5033834",
"0.5033834",
"0.5033834",
"0.5033834"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void drive() {
System.out.println("I am crashing");
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO: burasi azericeye gore duzenlenmeli | public Map<String, KelimeTipi> kokTipiAdlari() {
Map<String, KelimeTipi> tipMap = new HashMap<String, KelimeTipi>();
tipMap.put("IS", ISIM);
tipMap.put("FI", FIIL);
tipMap.put("SI", SIFAT);
tipMap.put("SA", SAYI);
tipMap.put("YA", YANKI);
tipMap.put("ZA", ZAMIR);
tipMap.put("SO", SORU);
tipMap.put("IM", IMEK);
tipMap.put("ZAMAN", ZAMAN);
tipMap.put("HATALI", HATALI);
tipMap.put("EDAT", EDAT);
tipMap.put("BAGLAC", BAGLAC);
tipMap.put("OZ", OZEL);
tipMap.put("UN", UNLEM);
tipMap.put("KI", KISALTMA);
return tipMap;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private static void cajas() {\n\t\t\n\t}",
"private void poetries() {\n\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"private void strin() {\n\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"void berechneFlaeche() {\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"public void mo38117a() {\n }",
"@Override\n\tpublic void einkaufen() {\n\t}",
"private UsineJoueur() {}",
"private void remplirUtiliseData() {\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"public void listar() {\n\t\t\n\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"public void leerAlimentos();",
"private void kk12() {\n\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tprotected void interr() {\n\t}",
"private void limpiarDatos() {\n\t\t\n\t}",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"private void remplirPrestaraireData() {\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"private Rekenhulp()\n\t{\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"public void Tyre() {\n\t\t\r\n\t}",
"public void verliesLeven() {\r\n\t\t\r\n\t}",
"public String limpiar()\r\n/* 509: */ {\r\n/* 510:529 */ return null;\r\n/* 511: */ }",
"@Override\n\tpublic void trabajar() {\n\n\t}",
"protected boolean func_70814_o() { return true; }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"private void logika_rozpocznij(){\n\t}",
"public final void mo51373a() {\n }",
"@Override\n\tpublic void nghe() {\n\n\t}",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"public void baocun() {\n\t\t\n\t}",
"public void mo21877s() {\n }",
"static void feladat4() {\n\t}",
"@Override\n\tpublic void verkaufen() {\n\t}",
"@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}",
"@Override\n\tpublic void recreo() {\n\n\t}",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void smell() {\n\t\t\n\t}",
"public void trenneVerbindung();",
"void unableToListContents();",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"void zmniejszBieg();",
"public void skystonePos4() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic boolean livre() {\n\t\treturn true;\n\t}",
"@Override\n\tpublic void coba() {\n\t\t\n\t}",
"Groepen maakGroepsindeling(Groepen aanwezigheidsGroepen);",
"@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}",
"Petunia() {\r\n\t\t}",
"public void mo12930a() {\n }",
"static void feladat9() {\n\t}",
"@Override\n\tvoid geraDados() {\n\n\t}",
"private zza.zza()\n\t\t{\n\t\t}",
"@Override\n\tpublic void dibuja() {\n\t\t\n\t}",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void alterar() {\n\t\t\n\t}",
"public void disparar(){}",
"abstract void uminus();",
"public void mo9848a() {\n }",
"@Override\n\tpublic void yürü() {\n\n\t}",
"private void remplirFabricantData() {\n\t}",
"protected void mo6255a() {\n }",
"IEmpleado next();",
"@Override\r\n\tpublic void loeschen() {\r\n//\t\tsuper.leuchterAbmelden(this);\r\n\t\tsuper.loeschen();\r\n\t}",
"@Override\n\tpublic void erstellen() {\n\t\t\n\t}",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"public void sendeSpielfeld();",
"public void mo55254a() {\n }",
"public void mo5382o() {\n }",
"public void mo6081a() {\n }"
] | [
"0.63174355",
"0.6221615",
"0.5999411",
"0.59972",
"0.58953667",
"0.58371514",
"0.57854384",
"0.5778206",
"0.576094",
"0.57493615",
"0.5714099",
"0.56752366",
"0.5657692",
"0.5608561",
"0.5605786",
"0.5587421",
"0.5584294",
"0.5560035",
"0.5557611",
"0.5544589",
"0.55431867",
"0.55372924",
"0.5534428",
"0.5534232",
"0.55339646",
"0.552504",
"0.5509249",
"0.5509249",
"0.5504398",
"0.5488389",
"0.5480702",
"0.54754114",
"0.5471843",
"0.5470728",
"0.5468643",
"0.54665005",
"0.5462239",
"0.5440401",
"0.54168683",
"0.5413049",
"0.53844446",
"0.5381676",
"0.5371303",
"0.5371303",
"0.5358305",
"0.5349924",
"0.5346858",
"0.5344933",
"0.53380543",
"0.53335035",
"0.5321178",
"0.53172225",
"0.5316261",
"0.5315438",
"0.53122973",
"0.53080225",
"0.5301315",
"0.5276073",
"0.5272589",
"0.52714175",
"0.5269867",
"0.52607524",
"0.52555275",
"0.525338",
"0.5253331",
"0.5252201",
"0.525204",
"0.5243381",
"0.52400535",
"0.52400535",
"0.52400535",
"0.52400535",
"0.52400535",
"0.52400535",
"0.52400535",
"0.52349705",
"0.5227958",
"0.52264637",
"0.5219476",
"0.5208083",
"0.5201768",
"0.5201058",
"0.5199152",
"0.51952565",
"0.5193376",
"0.51900345",
"0.5189852",
"0.5188969",
"0.5187009",
"0.5186871",
"0.51755744",
"0.5174135",
"0.5166754",
"0.51648974",
"0.51634145",
"0.5157557",
"0.5155939",
"0.51426244",
"0.51412916",
"0.51319003",
"0.5131355"
] | 0.0 | -1 |
Caracteres de escape Para quebra uma linha dentro deu cadeia de caracteres usamos \n | public static void main(String[] args) {
System.out.println("Quebra \nde linha");
// \t indica tabulação
System.out.println("1 \t 2 \t 3");
// \\ permite o uso de \ dentro da String
System.out.println("12\\07\\2019");
// \' permite uso de aspa dentro da String
System.out.println("\'1\'");
// \" permite uso de aspas dentro da String
System.out.println("\"1\"");
// \b uso de backspace(apaga letra anterior)
System.out.println("abc\bdefg");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static String escape(String s) {\n return s.replaceAll(\"\\\\n\", Matcher.quoteReplacement(\"\\\\n\"))\n .replaceAll(\"\\\\r\", Matcher.quoteReplacement(\"\\\\r\"))\n .replaceAll(\"\\\\033\", Matcher.quoteReplacement(\"\\\\033\"));\n }",
"public static void multiLineWithEscape()\r\n {\n System.out.print(\"Hello! \\nHello! \\nHello!\\n\\n\");\r\n }",
"CharSequence escape(char c);",
"private static String addEscapes(String text, char[] escapedChars, String escapeDelimiter) {\n\t\tfor (int i = 0; i < text.length(); i++) {\n\t\t\tif (inArray(text.charAt(i), escapedChars)) {\n\t\t\t\ttext = text.substring(0, i) + escapeDelimiter + text.charAt(i) + text.substring(i + 1, text.length());\n\t\t\t\ti += escapeDelimiter.length();\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn text;\n\t}",
"private static String escape(String in) {\n // After regexp escaping \\\\\\\\ = 1 slash, \\\\\\\\\\\\\\\\ = 2 slashes.\n\n // Also, the second args of replaceAll are neither strings nor regexps, and\n // are instead a special DSL used by Matcher. Therefore, we need to double\n // escape slashes (4 slashes) and quotes (3 slashes + \") in those strings.\n // Since we need to write \\\\ and \\\", we end up with 8 and 7 slashes,\n // respectively.\n return in.replaceAll(\"\\\\\\\\\", \"\\\\\\\\\\\\\\\\\").replaceAll(\"\\\"\", \"\\\\\\\\\\\\\\\"\");\n }",
"public static final String escapeForIntro(String string) {\n String str = string;\n str = replace(str, \"\\r\\n\", \"<br>\");\n str = replace(str, \"\\n\", \"<br>\");\n str = replace(str, \"'\", \"\\\\'\");\n return replace(str, \"\\r\", \"\");\n\n }",
"public final void mNEWLINE() throws RecognitionException {\n try {\n int _type = NEWLINE;\n // /Users/benjamincoe/HackWars/C.g:168:9: ( ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' ) )\n // /Users/benjamincoe/HackWars/C.g:169:5: ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\n {\n // /Users/benjamincoe/HackWars/C.g:169:5: ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\n int alt3=3;\n int LA3_0 = input.LA(1);\n\n if ( (LA3_0=='\\r') ) {\n int LA3_1 = input.LA(2);\n\n if ( (LA3_1=='\\n') ) {\n alt3=1;\n }\n else {\n alt3=2;}\n }\n else if ( (LA3_0=='\\n') ) {\n alt3=3;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"169:5: ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\", 3, 0, input);\n\n throw nvae;\n }\n switch (alt3) {\n case 1 :\n // /Users/benjamincoe/HackWars/C.g:169:6: '\\\\r\\\\n'\n {\n match(\"\\r\\n\"); \n\n\n }\n break;\n case 2 :\n // /Users/benjamincoe/HackWars/C.g:170:9: '\\\\r'\n {\n match('\\r'); \n\n }\n break;\n case 3 :\n // /Users/benjamincoe/HackWars/C.g:171:9: '\\\\n'\n {\n match('\\n'); \n\n }\n break;\n\n }\n\n //input.setLine(input.getLine()+1); \n \tchannel=HIDDEN;\n\n }\n\n this.type = _type;\n }\n finally {\n }\n }",
"private void writeEscaped(String in)\n\t\tthrows IOException\n\t{\n\t\tfor(int i=0, n=in.length(); i<n; i++)\n\t\t{\n\t\t\tchar c = in.charAt(i);\n\t\t\tif(c == '\"' || c == '\\\\')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t\telse if(c == '\\r')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('r');\n\t\t\t}\n\t\t\telse if(c == '\\n')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('n');\n\t\t\t}\n\t\t\telse if(c == '\\t')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('t');\n\t\t\t}\n\t\t\telse if(c == '\\b')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('b');\n\t\t\t}\n\t\t\telse if(c == '\\f')\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('f');\n\t\t\t}\n\t\t\telse if(c <= 0x1F)\n\t\t\t{\n\t\t\t\twriter.write('\\\\');\n\t\t\t\twriter.write('u');\n\n\t\t\t\tint v = c;\n\t\t\t\tint pos = 4;\n\t\t\t\tdo\n\t\t\t\t{\n\t\t\t\t\tencoded[--pos] = DIGITS[v & HEX_MASK];\n\t\t\t\t\tv >>>= 4;\n\t\t\t\t}\n\t\t\t\twhile (v != 0);\n\n\t\t\t\tfor(int j=0; j<pos; j++) writer.write('0');\n\t\t\t\twriter.write(encoded, pos, 4 - pos);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\twriter.write(c);\n\t\t\t}\n\t\t}\n\t}",
"public final void mNEWLINE() throws RecognitionException {\r\n try {\r\n int _type = NEWLINE;\r\n int _channel = DEFAULT_TOKEN_CHANNEL;\r\n // Satmc.g:194:5: ( ( '\\\\r' )? '\\\\n' )\r\n // Satmc.g:194:7: ( '\\\\r' )? '\\\\n'\r\n {\r\n // Satmc.g:194:7: ( '\\\\r' )?\r\n int alt6=2;\r\n int LA6_0 = input.LA(1);\r\n\r\n if ( (LA6_0=='\\r') ) {\r\n alt6=1;\r\n }\r\n switch (alt6) {\r\n case 1 :\r\n // Satmc.g:194:7: '\\\\r'\r\n {\r\n match('\\r'); \r\n\r\n }\r\n break;\r\n\r\n }\r\n\r\n\r\n match('\\n'); \r\n\r\n }\r\n\r\n state.type = _type;\r\n state.channel = _channel;\r\n }\r\n finally {\r\n \t// do for sure before leaving\r\n }\r\n }",
"private String escapeValue(String value) {\n Matcher match = escapePattern.matcher(value);\n String ret = match.replaceAll(\"\\\\\\\\\\\\\\\\\");\n return ret.replace(\"\\\"\", \"\\\\\\\"\").replace(\"\\n\", \" \").replace(\"\\t\", \" \");\n }",
"private static String[] escape(String[] args) {\n String[] result;\n\n result = new String[args.length];\n for (int i = 0; i < result.length; i++) {\n result[i] = escape(args[i]);\n }\n return result;\n }",
"private static String escape(String arg) {\n int max;\n StringBuilder result;\n char c;\n\n max = arg.length();\n result = new StringBuilder(max);\n for (int i = 0; i < max; i++) {\n c = arg.charAt(i);\n switch (c) {\n case '\\'':\n case '\"':\n case ' ':\n case '\\t':\n case '&':\n case '|':\n case '(':\n case ')':\n case '\\n':\n result.append('\\\\');\n result.append(c);\n break;\n default:\n result.append(c);\n break;\n }\n }\n return result.toString();\n }",
"private boolean escape() {\r\n return backslash() && (\r\n (digits() && (CHAR(';') || true)) || SET(\"rnqdgb\"));\r\n }",
"private static String escapeString(final String input) {\n switch (input) {\n case \"\\\\n\":\n return \"\\n\";\n case \"\\\\r\":\n return \"\\r\";\n case \"\\\\t\":\n return \"\\t\";\n case \"\\\\_\":\n return \" \";\n default:\n return input;\n }\n }",
"public final void mNEWLINE() throws RecognitionException\n\t{\n\t\ttry\n\t\t{\n\t\t\tfinal int _type = AshvmLexer.NEWLINE;\n\t\t\tfinal int _channel = BaseRecognizer.DEFAULT_TOKEN_CHANNEL;\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:5: ( ( ( '\\\\r' )?\n\t\t\t// '\\\\n' ) )\n\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:9: ( ( '\\\\r' )?\n\t\t\t// '\\\\n' )\n\t\t\t{\n\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:9: ( ( '\\\\r'\n\t\t\t\t// )? '\\\\n' )\n\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:10: ( '\\\\r'\n\t\t\t\t// )? '\\\\n'\n\t\t\t\t{\n\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:10: (\n\t\t\t\t\t// '\\\\r' )?\n\t\t\t\t\tint alt4 = 2;\n\t\t\t\t\tfinal int LA4_0 = this.input.LA(1);\n\n\t\t\t\t\tif ((LA4_0 == '\\r'))\n\t\t\t\t\t{\n\t\t\t\t\t\talt4 = 1;\n\t\t\t\t\t}\n\t\t\t\t\tswitch (alt4)\n\t\t\t\t\t{\n\t\t\t\t\t\tcase 1:\n\t\t\t\t\t\t// D:\\\\Programmieren\\\\projects\\\\ashvm\\\\Ashvm.g:783:11:\n\t\t\t\t\t\t// '\\\\r'\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tthis.match('\\r');\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tthis.match('\\n');\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tthis.state.type = _type;\n\t\t\tthis.state.channel = _channel;\n\t\t}\n\t\tfinally\n\t\t{\n\t\t}\n\t}",
"private static void escape(CharSequence s, Appendable out) throws IOException {\n for (int i = 0; i < s.length(); i++) {\n char ch = s.charAt(i);\n switch (ch) {\n case '\"':\n out.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n out.append(\"\\\\\\\\\");\n break;\n case '\\b':\n out.append(\"\\\\b\");\n break;\n case '\\f':\n out.append(\"\\\\f\");\n break;\n case '\\n':\n out.append(\"\\\\n\");\n break;\n case '\\r':\n out.append(\"\\\\r\");\n break;\n case '\\t':\n out.append(\"\\\\t\");\n break;\n case '/':\n out.append(\"\\\\/\");\n break;\n default:\n // Reference: http://www.unicode.org/versions/Unicode5.1.0/\n if ((ch >= '\\u0000' && ch <= '\\u001F')\n || (ch >= '\\u007F' && ch <= '\\u009F')\n || (ch >= '\\u2000' && ch <= '\\u20FF')) {\n String ss = Ascii.toUpperCase(Integer.toHexString(ch));\n out.append(\"\\\\u\");\n out.append(Strings.padStart(ss, 4, '0'));\n } else {\n out.append(ch);\n }\n }\n }\n }",
"public final void mNEWLINE() throws RecognitionException {\n\t\ttry {\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:316:17: ( ( '\\\\r' )? '\\\\n' )\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:316:18: ( '\\\\r' )? '\\\\n'\n\t\t\t{\n\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:316:18: ( '\\\\r' )?\n\t\t\tint alt2=2;\n\t\t\tint LA2_0 = input.LA(1);\n\t\t\tif ( (LA2_0=='\\r') ) {\n\t\t\t\talt2=1;\n\t\t\t}\n\t\t\tswitch (alt2) {\n\t\t\t\tcase 1 :\n\t\t\t\t\t// /Users/probst/workspace/MiniJava_A6/src/compiler/Frontend/MiniJava.g:316:18: '\\\\r'\n\t\t\t\t\t{\n\t\t\t\t\tmatch('\\r'); \n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t}\n\n\t\t\tmatch('\\n'); \n\t\t\t}\n\n\t\t}\n\t\tfinally {\n\t\t\t// do for sure before leaving\n\t\t}\n\t}",
"private Token scanNewlineSeparator() {\n Pair<Integer, Integer> pos = new Pair<>(in.line(), in.pos());\n c = in.read();\n return new Token(\"\\n\", TokenType.SEPARATOR, pos);\n }",
"private String getLineSeparator(String givenStr) {\n if (givenStr.indexOf(\"\\r\\n\") == -1) {\n return \"\\n\";\n } else {\n return \"\\r\\n\";\n }\n }",
"private void newline() {}",
"public interface EscapeMarker {}",
"protected static String br() {\n return \"\\r\\n\";\n }",
"protected String escape( String text )\n {\n return text.replaceAll( \"([`\\\\|*_])\", \"\\\\\\\\$1\" );\n }",
"default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }",
"public CharacterEscapes getCharacterEscapes()\n/* */ {\n/* 659 */ return this._characterEscapes;\n/* */ }",
"public static String escapeControlCharactersAndQuotes(CharSequence seq) {\n int len = seq.length();\n StringBuilder sb = new StringBuilder(seq.length() + 1);\n escapeControlCharactersAndQuotes(seq, len, sb);\n return sb.toString();\n }",
"private static String escape(String value, String chars) {\n\t\treturn escape(value, chars, \"\\\\\\\\\");\n\t}",
"private String escape(String s) {\r\n StringBuilder sb = new StringBuilder();\r\n for (int i = 0; i < s.length(); ) {\r\n int ch = s.codePointAt(i);\r\n i += Character.charCount(ch);\r\n if (' ' <= ch && ch <= '~') sb.append((char)ch);\r\n else {\r\n sb.append(\"\\\\\");\r\n sb.append(ch);\r\n if (i < s.length()) {\r\n ch = s.charAt(i);\r\n if (ch == ';' || ('0' <= ch && ch <= '9')) sb.append(';');\r\n }\r\n }\r\n }\r\n return sb.toString();\r\n }",
"private void eatEscaped(int esc) {\n position++;\n while (position < length) {\n int c = data.charAt(position);\n\n if (c == esc) {\n // check for end of file\n if (position + 1 >= length) {\n tokenStart++;\n tokenEnd = position;\n isEscaped = true;\n position++;\n return;\n\n }\n\n int next = data.charAt(position + 1);\n if (next == '\\t' || next == '\\n' || next == '\\r' || next == ' ') {\n // get rid of the quotes\n tokenStart++;\n tokenEnd = position;\n isEscaped = true;\n position++;\n return;\n }\n\n } else {\n // handle 'xxxNEWLINE => 'xxx\n if (c == '\\r' || c == '\\n') {\n tokenEnd = position;\n return;\n }\n }\n position++;\n }\n\n tokenEnd = position;\n }",
"private static String escape_PN_LOCAL_ESC(String x) {\n\n int N = x.length() ;\n boolean escchar = false ;\n for ( int i = 0 ; i < N ; i++ ) {\n char ch = x.charAt(i) ;\n if ( needsEscape(ch, (i==N-1)) ) {\n escchar = true ;\n break ;\n }\n }\n if ( ! escchar )\n return x ;\n StringBuilder sb = new StringBuilder(N+10) ;\n for ( int i = 0 ; i < N ; i++ ) {\n char ch = x.charAt(i) ;\n // DOT only needs escaping at the end\n if ( needsEscape(ch, (i==N-1) ) )\n sb.append('\\\\') ;\n sb.append(ch) ;\n }\n return sb.toString() ;\n }",
"public static String lineBreak() {\n return \"\\n*****************************************************\\n\";\n }",
"protected String add_escapes(String str) {\n StringBuffer retval = new StringBuffer();\n char ch;\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case 0:\n continue;\n case '\\b':\n retval.append(\"\\\\b\");\n continue;\n case '\\t':\n retval.append(\"\\\\t\");\n continue;\n case '\\n':\n retval.append(\"\\\\n\");\n continue;\n case '\\f':\n retval.append(\"\\\\f\");\n continue;\n case '\\r':\n retval.append(\"\\\\r\");\n continue;\n case '\\\"':\n retval.append(\"\\\\\\\"\");\n continue;\n case '\\'':\n retval.append(\"\\\\\\'\");\n continue;\n case '\\\\':\n retval.append(\"\\\\\\\\\");\n continue;\n default:\n if ((ch = str.charAt(i)) < 0x20 || ch > 0x7e) {\n String s = \"0000\" + Integer.toString(ch, 16);\n retval.append(\"\\\\u\" + s.substring(s.length() - 4, s.length()));\n } else {\n retval.append(ch);\n }\n continue;\n }\n }\n return retval.toString();\n }",
"String escChr(char pChar) throws Exception;",
"public void escreverLinha(String linha){\n \n try {\n \n getBufferEscrita().append(linha + \"\\n\");\n } catch (IOException e) {\n \n System.err.printf(\"Erro, não foi possivel escrever a linha no arquivo: %s!\", e);\n }\n }",
"public static String newline() {\n return System.getProperty(JavaSystemProperty.LINE_SEPARATOR);\n }",
"private static String fixPrintWriterNewLine(String decodedString) {\n StringBuilder fixedString = new StringBuilder();\n for(int i = 0; i < decodedString.length(); i++) {\n\n if(decodedString.charAt(i) == '\\n' ) {\n fixedString.append(\"\\r\\n\");\n }\n else {\n fixedString.append(decodedString.charAt(i));\n }\n }\n return fixedString.toString();\n }",
"static String escapeLiteral(LiteralRule rule) {\n String specialChars = \".[]{}()*+-?^$|\";\n StringBuilder sb = new StringBuilder();\n\n for (int i = 0; i < rule.value.length(); ++i) {\n char c = rule.value.charAt(i);\n if (specialChars.indexOf(c) != -1) {\n sb.append(\"\\\\\");\n }\n\n sb.append(c);\n }\n\n return sb.toString();\n }",
"public static void escape() {\n \n // print vs. println\n \n System.out.print(\"Hello Class!\"); // next thing prints on same line\n System.out.println(\"It is Tuesday.\"); // next thing prints on next line\n \n System.out.println(); // prints a blank line\n \n \n // OUTPUT \n System.out.println(2); // you can put text or numbers in a print statement\n System.out.println(1 + 2 * 3); // you can also do math!\n // (order of operations)\n \n // Escape Sequences: \n // special characters denoted with the \\ (the escape character)\n \n // \\n --> new line \n System.out.print(\"Hello! \\n\\n\\n\\n\");\n System.out.println(\"He\\nllo!\");\n \n // \\t --> tab \n System.out.println(\"Hi\\tHi\");\n System.out.println(\"Hi\\t\\t\\t\\tHi\");\n \n // \\\\ --> \\\n System.out.println(\"\\\\\");\n \n // \\\" --> \" \n System.out.println(\"She said \\\"Java is the best!\\\"\");\n \n // You try!\n // Make a new class PrintQuote.java\n // Think of a quote or saying that you know \n // Output that saying with visible \" \" around it \n // Use a method to print your quote!\n \n // Example output: \"That's the way the cookie crumbles.\"\n \n \n \n \n \n \n \n }",
"public static String nl2br(String text) {return text.replaceAll(\"\\n\",\"<br />\");}",
"private static String escape(String value, String chars, String escapeSequence) {\n\t\tString escaped = value;\n\t\t\n\t\tif (escaped == null) {\n\t\t\treturn \"\";\n\t\t}\n\t\t\n\t\tfor (char ch : chars.toCharArray()) {\n\t\t\tescaped = escaped.replaceAll(String.valueOf(ch), escapeSequence + ch);\n\t\t}\n\t\n\t\treturn escaped;\n\t}",
"@Test\n void should_describe_escaped_chars() {\n final char backspace = 8;\n final char tab = 9;\n final char lineFeed = 10;\n final char carriageReturn = 13;\n final char doubleQuote = 0x22;\n final char singleQuote = 0x27;\n final char backslash = 0x5C;\n // --end-->\n\n assertEquals(EscapedChars.BACKSPACE.getValue(), backspace);\n assertEquals(EscapedChars.TAB.getValue(), tab);\n assertEquals(EscapedChars.LINE_FEED.getValue(), lineFeed);\n assertEquals(EscapedChars.CARRIAGE_RETURN.getValue(), carriageReturn);\n assertEquals(EscapedChars.DOUBLE_QUOTE.getValue(), doubleQuote);\n assertEquals(EscapedChars.SINGLE_QUOTE.getValue(), singleQuote);\n assertEquals(EscapedChars.BACKSLASH.getValue(), backslash);\n }",
"public static String getLineSeparator() {\r\n // /- - - - - - - - - - - - - - - - - - - - - -\r\n // Because 'CR + LF' caused many trouble!\r\n\t\t// And Now 'LF' have little trouble. \r\n\t\t// \r\n // return System.getProperty(\"line.separator\");\r\n // - - - - - - - - - -/\r\n\t\treturn \"\\n\";\r\n }",
"public static String escapeJS(String inText)\n {\n return inText\n .replaceAll(\"(?<!\\\\\\\\)'\", \"\\\\\\\\'\")\n .replaceAll(\"(?<!\\\\\\\\)\\\"\", \"\\\\\\\\\\\"\")\n .replaceAll(\"\\n\", \"\\\\\\\\n\");\n }",
"public static String convertLineBreak(String input) {\n return input.replace(\"\\r\\n\", \"\\n\").replace('\\r', '\\n').replaceAll(\"[\\000-\\010\\013\\014\\016-\\037]\", \" \");\n }",
"public static boolean isNewLineCharacter(char c)\n {\n return (c == '\\r') || (c == '\\n');\n }",
"public boolean isNewLine(char c) {\n\t\treturn c == '\\n' || c == '\\r';\n\t}",
"public final void mLINEBREAK() throws RecognitionException {\n try {\n int _type = LINEBREAK;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // Office.g:984:10: ( ( ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' ) ) )\n // Office.g:985:2: ( ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' ) )\n {\n // Office.g:985:2: ( ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' ) )\n // Office.g:985:3: ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\n {\n // Office.g:985:3: ( '\\\\r\\\\n' | '\\\\r' | '\\\\n' )\n int alt10=3;\n int LA10_0 = input.LA(1);\n\n if ( (LA10_0=='\\r') ) {\n int LA10_1 = input.LA(2);\n\n if ( (LA10_1=='\\n') ) {\n alt10=1;\n }\n else {\n alt10=2;\n }\n }\n else if ( (LA10_0=='\\n') ) {\n alt10=3;\n }\n else {\n NoViableAltException nvae =\n new NoViableAltException(\"\", 10, 0, input);\n\n throw nvae;\n\n }\n switch (alt10) {\n case 1 :\n // Office.g:985:4: '\\\\r\\\\n'\n {\n match(\"\\r\\n\"); \n\n\n\n }\n break;\n case 2 :\n // Office.g:985:13: '\\\\r'\n {\n match('\\r'); \n\n }\n break;\n case 3 :\n // Office.g:985:20: '\\\\n'\n {\n match('\\n'); \n\n }\n break;\n\n }\n\n\n }\n\n\n _channel = 99; \n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n \t// do for sure before leaving\n }\n }",
"public static String escapeRegexChar(char c) {\n return (META_CHARS.contains(c) ? \"\\\\\" : \"\") + c;\n }",
"private void lineBreak()\n\t{\n\t\tlog += String.format(\"%n\");\n\t\tfor(int i = 0; i < 25; i++)\n\t\t\tlog += \"-\";\n\t\tlog += String.format(\"%n\");\n\t}",
"protected static String showLineSeparators(String string) {\n\tif (string == null) return null;\n\tStringBuffer buffer = new StringBuffer();\n\tint length = string.length();\n\tfor (int i = 0; i < length; i++) {\n\t\tchar car = string.charAt(i);\n\t\tswitch (car) {\n\t\t\tcase '\\n': \n\t\t\t\tbuffer.append(\"\\\\n\\n\"); //$NON-NLS-1$\n\t\t\t\tbreak;\n\t\t\tcase '\\r':\n\t\t\t\tif (i < length-1 && string.charAt(i+1) == '\\n') {\n\t\t\t\t\tbuffer.append(\"\\\\r\\\\n\\n\"); //$NON-NLS-1$\n\t\t\t\t\ti++;\n\t\t\t\t} else {\n\t\t\t\t\tbuffer.append(\"\\\\r\\n\"); //$NON-NLS-1$\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbuffer.append(car);\n\t\t\t\tbreak;\n\t\t}\n\t}\n\treturn buffer.toString();\n}",
"private void eatMultiline() {\n int prev = ';';\n int pos = position + 1;\n\n while (pos < length) {\n int c = data.charAt(pos);\n if (c == ';' && (prev == '\\n' || prev == '\\r')) {\n position = pos + 1;\n // get rid of the ;\n tokenStart++;\n\n // remove trailing newlines\n pos--;\n c = data.charAt(pos);\n while (c == '\\n' || c == '\\r') {\n pos--;\n c = data.charAt(pos);\n }\n tokenEnd = pos + 1;\n\n isEscaped = true;\n return;\n } else {\n // handle line numbers\n if (c == '\\r') {\n lineNumber++;\n } else if (c == '\\n' && prev != '\\r') {\n lineNumber++;\n }\n\n prev = c;\n pos++;\n }\n }\n\n position = pos;\n }",
"private void writeEsc(char ch[], int start, int length, boolean isAttVal) throws IOException {\n\t\tescapeHandler.escape(ch, start, length, isAttVal, output);\n\t}",
"private boolean endline() {\r\n return (CHAR('\\r') || true) && CHAR('\\n');\r\n }",
"private void _appendCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1807 */ if (escCode >= 0) {\n/* 1808 */ if (this._outputTail + 2 > this._outputEnd) {\n/* 1809 */ _flushBuffer();\n/* */ }\n/* 1811 */ this._outputBuffer[(this._outputTail++)] = '\\\\';\n/* 1812 */ this._outputBuffer[(this._outputTail++)] = ((char)escCode);\n/* 1813 */ return;\n/* */ }\n/* 1815 */ if (escCode != -2) {\n/* 1816 */ if (this._outputTail + 5 >= this._outputEnd) {\n/* 1817 */ _flushBuffer();\n/* */ }\n/* 1819 */ int ptr = this._outputTail;\n/* 1820 */ char[] buf = this._outputBuffer;\n/* 1821 */ buf[(ptr++)] = '\\\\';\n/* 1822 */ buf[(ptr++)] = 'u';\n/* */ \n/* 1824 */ if (ch > 'ÿ') {\n/* 1825 */ int hi = ch >> '\\b' & 0xFF;\n/* 1826 */ buf[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1827 */ buf[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1828 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1830 */ buf[(ptr++)] = '0';\n/* 1831 */ buf[(ptr++)] = '0';\n/* */ }\n/* 1833 */ buf[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1834 */ buf[(ptr++)] = HEX_CHARS[(ch & 0xF)];\n/* 1835 */ this._outputTail = ptr; return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1839 */ if (this._currentEscape == null) {\n/* 1840 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1842 */ escape = this._currentEscape.getValue();\n/* 1843 */ this._currentEscape = null;\n/* */ }\n/* 1845 */ int len = escape.length();\n/* 1846 */ if (this._outputTail + len > this._outputEnd) {\n/* 1847 */ _flushBuffer();\n/* 1848 */ if (len > this._outputEnd) {\n/* 1849 */ this._writer.write(escape);\n/* 1850 */ return;\n/* */ }\n/* */ }\n/* 1853 */ escape.getChars(0, len, this._outputBuffer, this._outputTail);\n/* 1854 */ this._outputTail += len;\n/* */ }",
"public static String createBreaks(String input) {\r\n char[] chars = input.toCharArray();\r\n int len = chars.length;\r\n StringBuffer buf = new StringBuffer(len);\r\n int count = 0;\r\n int cur = 0; \r\n for (int i = 0; i < len; i++) { \r\n if (chars[i] == '\\n') {\r\n buf.append(chars, cur, i - cur).append(BR_TAG);\r\n cur = i + 1;\r\n } \r\n else if (chars[i] == '\\r' && i < len - 1 && chars[i + 1] == '\\n') {\r\n buf.append(chars, cur, i - cur).append(BR_TAG);\r\n i++;\r\n cur = i + 1;\r\n }\r\n\r\n count++;\r\n } \r\n buf.append(chars, cur, len - cur);\r\n return buf.toString();\r\n }",
"static public String escapeCommand(String command) {\n String res = command.replaceAll(\"'\", \"'\\\\\\\\''\");\n return \"'\" + res + \"'\";\n }",
"default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }",
"public static String javaStringEscape(String str)\n {\n test:\n {\n for (int i = 0; i < str.length(); i++) {\n switch (str.charAt(i)) {\n case '\\n':\n case '\\r':\n case '\\\"':\n case '\\\\':\n break test;\n }\n }\n return str;\n }\n StringBuilder sb = new StringBuilder();\n for (int i = 0; i < str.length(); i++) {\n char ch = str.charAt(i);\n switch (ch) {\n default:\n sb.append(ch);\n break;\n case '\\n':\n sb.append(\"\\\\n\");\n break;\n case '\\r':\n sb.append(\"\\\\r\");\n break;\n case '\\\"':\n sb.append(\"\\\\\\\"\");\n break;\n case '\\\\':\n sb.append(\"\\\\\\\\\");\n break;\n }\n }\n return sb.toString();\n }",
"private static String handleEscapes(String s) {\n final String UNLIKELY_STRING = \"___~~~~$$$$___\";\n return s.replace(\"\\\\\\\\\", UNLIKELY_STRING).replace(\"\\\\\", \"\").replace(UNLIKELY_STRING, \"\\\\\");\n }",
"public String escape(String source) {\r\n\t\treturn null;\r\n\t}",
"public void newLine() {\n text.append(\"\\n\");\n }",
"public static final String escape(int count) {\n if (count == 1)\n return ESCAPE;\n return repeat(\"ESCAPE\"/*I18nOK:EMS*/, count);\n }",
"public static void checkNewLine(List<Token> tokenList) {\r\n\t\tfor (Token tk : tokenList) {\r\n\t\t\tif(tk.getName().contains(\"\\n\"))\r\n\t\t\t{\r\n\t\t\t\ttk.getFeatures().setLexicalType(String.valueOf(Lexical.NEW_LINE));\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public interface Escaper {\n\n /**\n * Escape one character, returning an escaped version of it if one is\n * needed, and otherwise returning null.\n *\n * @param c A character\n * @return A character sequence to replace the character with, or null if no\n * escaping is needed\n */\n CharSequence escape(char c);\n\n /**\n * Returns an escaped version of the input character sequence using this\n * Escaper.\n *\n * @param input The input\n * @return The escaped version of it\n */\n default String escape(CharSequence input) {\n return Strings.escape(input, this);\n }\n\n /**\n * Escape a character with contextual information about the current position\n * and the preceding character (will be 0 on the first character); a few\n * escapers that respond to things like delimiters and camel casing make use\n * of this; the default is simply to call <code>escape(c)</code>\n *\n * @param c The character to escape\n * @param index The index of the character within the string\n * @param of The total number of characters in this string\n * @param prev The preceding character\n * @return A CharSequence if the character cannot be used as-is, or null if\n * it can\n */\n default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }\n\n /**\n * For use when logging a badly encoded string. Converts unencodable\n * characters to hex and ISO control characters to hex or their standard\n * escaped Java string representation if there is one (e.g. 0x05 ->\n * \"<0x05>\" but \\n -> \"\\n\").\n *\n * @param cs The character set.\n * @return A string representation that does not include raw unencodable or\n * control characters.\n */\n static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }\n\n /**\n * Returns an escaper which does not escape the specified character, but\n * otherwise behaves the same as its parent.\n *\n * @param c A character\n * @return a new escaper\n */\n default Escaper ignoring(char c) {\n return c1 -> {\n if (c1 == c) {\n return null;\n }\n return this.escape(c);\n };\n }\n\n /**\n * Combine this escaper with another, such that the passed escaper is used\n * only on characters this escaper did not escape.\n *\n * @param other Another escaper\n * @return A new escaper\n */\n default Escaper and(Escaper other) {\n return new Escaper() {\n @Override\n public CharSequence escape(char c) {\n CharSequence result = Escaper.this.escape(c);\n return result == null ? other.escape(c) : result;\n }\n\n @Override\n public CharSequence escape(char c, int index, int of, char prev) {\n CharSequence result = Escaper.this.escape(c, index, of, prev);\n return result == null ? other.escape(c, index, of, prev) : result;\n }\n };\n }\n\n /**\n * Returns a new escaper which will also escape the passed character by\n * prefixing it with \\ in output.\n *\n * @param c A character\n * @return A new escaper\n */\n default Escaper escaping(char c) {\n return and((char c1) -> {\n if (c1 == c) {\n return \"\\\\\" + c;\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping \" characters.\n *\n * @return A new escaper\n */\n default Escaper escapeDoubleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Adds the behavior of escaping ' characters.\n *\n * @return A new escaper\n */\n default Escaper escapeSingleQuotes() {\n return and((char c) -> {\n if (c == '\"') {\n return \"\\\\\\\"\";\n }\n return null;\n });\n }\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces in unicode character names with\n * underscores. Uses programmer-friendly character names for commonly used\n * characters (e.g. \\ is \"Backslash\" instead of the unicode name \"reverse\n * solidus\" (!). Useful when you have some text that needs to be converted\n * into a variable name in generated code and be recognizable as what it\n * refers to.\n */\n public static Escaper JAVA_IDENTIFIER_DELIMITED = new SymbolEscaper(true);\n\n /**\n * Converts some text incorporating symbols into a legal Java identifier,\n * separating symbol names and spaces using casing. Uses programmer-friendly\n * character names for commonly used characters (e.g. \\ is \"Backslash\"\n * instead of the unicode name \"reverse solidus\" (!). Useful when you have\n * some text that needs to be converted into a variable name in generated\n * code and be recognizable as what it refers to.\n */\n public static Escaper JAVA_IDENTIFIER_CAMEL_CASE = new SymbolEscaper(false);\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities.\n */\n public static Escaper BASIC_HTML = c -> {\n switch (c) {\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the usual HTML to SGML entities, plus escaping @, { and }, which\n * can otherwise result in javadoc build failures if they appear in code\n * samples.\n */\n public static Escaper JAVADOC_CODE_SAMPLE = c -> {\n switch (c) {\n case '@':\n return \"@\";\n case '{':\n return \"{\";\n case '}':\n return \"}\";\n case '\"':\n return \""\";\n case '\\'':\n return \"'\";\n case '&':\n return \"&\";\n case '<':\n return \"<\";\n case '>':\n return \">\";\n case '©':\n return \"©\";\n case '®':\n return \"®\";\n case '\\u2122':\n return \"™\";\n case '¢':\n return \"¢\";\n case '£':\n return \"£\";\n case '¥':\n return \"¥\";\n case '€':\n return \"€\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes double quotes, ampersands, less-than and greater-than to their\n * SGML entities, and replaces \\n with <br>.\n */\n public static Escaper HTML_WITH_LINE_BREAKS = c -> {\n CharSequence result = BASIC_HTML.escape(c);\n if (result == null) {\n switch (c) {\n case '\\r':\n result = \"\";\n break;\n case '\\n':\n result = \"<br>\";\n }\n }\n return result;\n };\n\n /**\n * Replaces \\n, \\r, \\t and \\b with literal strings starting with \\.\n */\n public static Escaper NEWLINES_AND_OTHER_WHITESPACE = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\b':\n return \"\\\\b\";\n default:\n return null;\n }\n };\n\n /**\n * Escapes the standard characters which must be escaped for generating\n * valid lines of code in Java or Javascript - \\n, \\r, \\t, \\b, \\f and \\.\n * Does <i>not</i> escape quote characters (this may differ based on the\n * target language) - call escapeSingleQuotes() or escapeDoubleQuotes() to\n * create a wrapper around this escaper which does that.\n */\n public static Escaper CONTROL_CHARACTERS = c -> {\n switch (c) {\n case '\\n':\n return \"\\\\n\";\n case '\\r':\n return \"\\\\r\";\n case '\\t':\n return \"\\\\t\";\n case '\\b':\n return \"\\\\b\";\n case '\\f':\n return \"\\\\f\";\n case '\\\\':\n return \"\\\\\\\\\";\n default:\n return null;\n }\n };\n\n /**\n * Omits characters which are neither letters nor digits - useful for\n * hash-matching text that may have varying amounts of whitespace or other\n * non-semantic formatting differences.\n */\n public static Escaper OMIT_NON_WORD_CHARACTERS = c -> {\n return !Character.isDigit(c) && !Character.isLetter(c) ? \"\"\n : Character.toString(c);\n };\n}",
"public static String escape(String source) {\n return escape(source, -1, true);\n }",
"private boolean skipNewline() {\n\t\tif (nextChar == '\\n') {\n\n\t\t\tnextChar = getChar();\n\t\t\treturn true;\n\t\t}\n\t\tif (nextChar == '\\r') {\n\t\t\tlineNumber++;\n\t\t\tcolumnNumber = 1;\n\t\t\tnextChar = getChar();\n\n\t\t\t// skip over next char if '\\n'\n\t\t\tif (nextChar == '\\n')\n\t\t\t\tnextChar = getChar();\n\t\t\treturn true;\n\t\t}\n\t\t// newline char not found\n\t\treturn false;\n\t}",
"public static String encodeEscapes(@Nullable String inString)\n {\n if(inString == null)\n return \"\";\n\n // replace all special characters with some equivalent\n StringBuilder result = new StringBuilder();\n for(int i = 0; i < inString.length(); i++)\n {\n char c = inString.charAt(i);\n int pos = s_escapes.indexOf(c);\n\n if(pos >= 0)\n result.append(s_marker + pos + s_marker);\n else\n result.append(c);\n }\n\n return result.toString();\n }",
"private boolean isNewLine(int nextVal) {\n\t\treturn nextVal == CR || nextVal == LF || nextVal == EOF;\n\t}",
"static Escaper escapeUnencodableAndControlCharacters(Charset cs) {\n CharsetEncoder enc = cs.newEncoder();\n return c -> {\n switch (c) {\n case '\\t':\n return \"\\\\t\";\n case '\\r':\n return \"\\\\r\";\n case '\\n':\n return \"\\\\n\";\n }\n if (!enc.canEncode(c) || Character.isISOControl(c)) {\n return \"<0x\" + Strings.toHex(c) + \">\";\n }\n return null;\n };\n }",
"default CharSequence escape(char c, int index, int of, char prev) {\n return escape(c);\n }",
"public static void drawStringMultiLine(MatrixStack matrixStack, FontRenderer fontRenderer, String string, int x, int y, int color) \n {\n String[] lines = string.split(\"\\\\\\\\n\");\n for (int i = 0; i < lines.length; i++) \n {\n String line = lines[i];\n fontRenderer.drawString(matrixStack, line, x, y + (fontRenderer.FONT_HEIGHT * i), color);\n }\n }",
"private static String escapeWhitespace( final String input )\n {\n return input.replaceAll( \"\\\\ \", \"\\\\\\\\ \" );\n }",
"private static String normalizeLineEndings(String input) {\n return NON_UNIX_LINE_ENDING.matcher(input).replaceAll(\"\\n\");\n }",
"private void writeQuotedAndEscaped(CharSequence string) {\n if (string != null && string.length() != 0) {\n int len = string.length();\n writer.write('\\\"');\n\n for (int i = 0; i < len; ++i) {\n char cp = string.charAt(i);\n if ((cp < 0x7f &&\n cp >= 0x20 &&\n cp != '\\\"' &&\n cp != '\\\\') ||\n (cp > 0x7f &&\n isConsolePrintable(cp) &&\n !isSurrogate(cp))) {\n // quick bypass for direct printable chars.\n writer.write(cp);\n } else {\n switch (cp) {\n case '\\b':\n writer.write(\"\\\\b\");\n break;\n case '\\t':\n writer.write(\"\\\\t\");\n break;\n case '\\n':\n writer.write(\"\\\\n\");\n break;\n case '\\f':\n writer.write(\"\\\\f\");\n break;\n case '\\r':\n writer.write(\"\\\\r\");\n break;\n case '\\\"':\n case '\\\\':\n writer.write('\\\\');\n writer.write(cp);\n break;\n default:\n if (isSurrogate(cp) && (i + 1) < len) {\n char c2 = string.charAt(i + 1);\n writer.format(\"\\\\u%04x\", (int) cp);\n writer.format(\"\\\\u%04x\", (int) c2);\n ++i;\n } else {\n writer.format(\"\\\\u%04x\", (int) cp);\n }\n break;\n }\n }\n }\n\n writer.write('\\\"');\n } else {\n writer.write(\"\\\"\\\"\");\n }\n }",
"protected String escape(String replacement) {\n return replacement.replace(\"\\\\\", \"\\\\\\\\\").replace(\"$\", \"\\\\$\");\n }",
"private static String removeNewline(String content) {\n if (StringUtil.isNotEmpty(content)) {\n content = content.replaceAll(StringConstants.LF, EMPTY);\n content = content.replace(StringConstants.CR, EMPTY);\n return content;\n }\n return content;\n }",
"private void backslash() {\n // currentIndex points to '\\\\' character, so we move it to the next character\n ++currentIndex;\n \n // If wrong usage of '\\\\'\n if( !( \n currentIndex < dataLength && \n ( Character.isDigit( data[currentIndex] ) || data[currentIndex] == '\\\\' ) \n )\n ) {\n throw new LexerException(\"Wrong '\\' usage.\");\n }\n }",
"private static String escape(String s) {\r\n\t\tif (s == null)\r\n\t\t\treturn null;\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tescape(s, sb);\r\n\t\treturn sb.toString();\r\n\t}",
"private int _prependOrWriteCharacterEscape(char[] buffer, int ptr, int end, char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1727 */ if (escCode >= 0) {\n/* 1728 */ if ((ptr > 1) && (ptr < end)) {\n/* 1729 */ ptr -= 2;\n/* 1730 */ buffer[ptr] = '\\\\';\n/* 1731 */ buffer[(ptr + 1)] = ((char)escCode);\n/* */ } else {\n/* 1733 */ char[] ent = this._entityBuffer;\n/* 1734 */ if (ent == null) {\n/* 1735 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1737 */ ent[1] = ((char)escCode);\n/* 1738 */ this._writer.write(ent, 0, 2);\n/* */ }\n/* 1740 */ return ptr;\n/* */ }\n/* 1742 */ if (escCode != -2) {\n/* 1743 */ if ((ptr > 5) && (ptr < end)) {\n/* 1744 */ ptr -= 6;\n/* 1745 */ buffer[(ptr++)] = '\\\\';\n/* 1746 */ buffer[(ptr++)] = 'u';\n/* */ \n/* 1748 */ if (ch > 'ÿ') {\n/* 1749 */ int hi = ch >> '\\b' & 0xFF;\n/* 1750 */ buffer[(ptr++)] = HEX_CHARS[(hi >> 4)];\n/* 1751 */ buffer[(ptr++)] = HEX_CHARS[(hi & 0xF)];\n/* 1752 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1754 */ buffer[(ptr++)] = '0';\n/* 1755 */ buffer[(ptr++)] = '0';\n/* */ }\n/* 1757 */ buffer[(ptr++)] = HEX_CHARS[(ch >> '\\004')];\n/* 1758 */ buffer[ptr] = HEX_CHARS[(ch & 0xF)];\n/* 1759 */ ptr -= 5;\n/* */ }\n/* */ else {\n/* 1762 */ char[] ent = this._entityBuffer;\n/* 1763 */ if (ent == null) {\n/* 1764 */ ent = _allocateEntityBuffer();\n/* */ }\n/* 1766 */ this._outputHead = this._outputTail;\n/* 1767 */ if (ch > 'ÿ') {\n/* 1768 */ int hi = ch >> '\\b' & 0xFF;\n/* 1769 */ int lo = ch & 0xFF;\n/* 1770 */ ent[10] = HEX_CHARS[(hi >> 4)];\n/* 1771 */ ent[11] = HEX_CHARS[(hi & 0xF)];\n/* 1772 */ ent[12] = HEX_CHARS[(lo >> 4)];\n/* 1773 */ ent[13] = HEX_CHARS[(lo & 0xF)];\n/* 1774 */ this._writer.write(ent, 8, 6);\n/* */ } else {\n/* 1776 */ ent[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1777 */ ent[7] = HEX_CHARS[(ch & 0xF)];\n/* 1778 */ this._writer.write(ent, 2, 6);\n/* */ }\n/* */ }\n/* 1781 */ return ptr; }\n/* */ String escape;\n/* */ String escape;\n/* 1784 */ if (this._currentEscape == null) {\n/* 1785 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1787 */ escape = this._currentEscape.getValue();\n/* 1788 */ this._currentEscape = null;\n/* */ }\n/* 1790 */ int len = escape.length();\n/* 1791 */ if ((ptr >= len) && (ptr < end)) {\n/* 1792 */ ptr -= len;\n/* 1793 */ escape.getChars(0, len, buffer, ptr);\n/* */ } else {\n/* 1795 */ this._writer.write(escape);\n/* */ }\n/* 1797 */ return ptr;\n/* */ }",
"@Test\r\npublic void separadorNuevaLinea() {\r\n try {\r\n assertEquals(Calculadora.add(\"2,4\\n6\"), 12);\r\n assertEquals(Calculadora.add(\"2\\n4,6\"), 12);\r\n assertEquals(Calculadora.add(\"2\\n4\\n6\"), 12);\r\n assertEquals(Calculadora.add(\"2\\n4\"), 6);\r\n assertEquals(Calculadora.add(\"2\\n4\\n6\\n8\\n10\"), 30);\r\n assertEquals(Calculadora.add(\"2\\n4\\n6\\n8\\n10,12\"), 42);\r\n } catch (Exception ex) {\r\n fail(\"Error probando la calculadora con separador(es) de nueva línea\");\r\n }\r\n}",
"public static String nl() {\n return nl;\n }",
"static public void printesc(String s) {\n for (int i = 0; i < s.length(); i++) {\n if (s.charAt(i) >= ' ') {\n System.out.append(s.charAt(i));\n } else {\n System.out.append(\"\\\\\" + (int) s.charAt(i));\n }\n }\n System.out.println();\n }",
"public static byte[] replaceCR( byte[] bytes )\r\n\t{\r\n\t\tbyte[] newBytes = new byte[ bytes.length ];\r\n\t\t\r\n\t\tint j = 0;\r\n\t\tfor( int i = 0; i < bytes.length; i++ )\r\n\t\t{\r\n\t\t\tif ( '\\r' != bytes[ i ] ) { newBytes[ j ] = bytes[ i ]; j++; }\r\n\t\t}\r\n\t\treturn( newBytes );\r\n\t}",
"protected String addToMultiLineField(String current, String newline){\n\t\tif(current == null)\n\t\t\tcurrent = \"\";\n\t\t\n\t\tif(newline == null)\n\t\t\tnewline = \"\";\n\t\t\n\t\treturn current +\"\\r\\n\" + newline;\t\n\t}",
"public String[] displayLineSeparators(String[] input) {\n\t\tfor (int i = 0; i < input.length; i++) {\n\t\t\tif (input[i] != null) {\n\t\t\t\tinput[i] = input[i].replaceAll(\"\\\\n\", \"\\\\\\\\n\");\n\t\t\t\tinput[i] = input[i].replaceAll(\"\\\\r\", \"\\\\\\\\r\");\n\t\t\t}\n\t\t}\n\t\treturn input;\n\n\t}",
"private void _prependOrWriteCharacterEscape(char ch, int escCode)\n/* */ throws IOException, JsonGenerationException\n/* */ {\n/* 1636 */ if (escCode >= 0) {\n/* 1637 */ if (this._outputTail >= 2) {\n/* 1638 */ int ptr = this._outputTail - 2;\n/* 1639 */ this._outputHead = ptr;\n/* 1640 */ this._outputBuffer[(ptr++)] = '\\\\';\n/* 1641 */ this._outputBuffer[ptr] = ((char)escCode);\n/* 1642 */ return;\n/* */ }\n/* */ \n/* 1645 */ char[] buf = this._entityBuffer;\n/* 1646 */ if (buf == null) {\n/* 1647 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1649 */ this._outputHead = this._outputTail;\n/* 1650 */ buf[1] = ((char)escCode);\n/* 1651 */ this._writer.write(buf, 0, 2);\n/* 1652 */ return;\n/* */ }\n/* 1654 */ if (escCode != -2) {\n/* 1655 */ if (this._outputTail >= 6) {\n/* 1656 */ char[] buf = this._outputBuffer;\n/* 1657 */ int ptr = this._outputTail - 6;\n/* 1658 */ this._outputHead = ptr;\n/* 1659 */ buf[ptr] = '\\\\';\n/* 1660 */ buf[(++ptr)] = 'u';\n/* */ \n/* 1662 */ if (ch > 'ÿ') {\n/* 1663 */ int hi = ch >> '\\b' & 0xFF;\n/* 1664 */ buf[(++ptr)] = HEX_CHARS[(hi >> 4)];\n/* 1665 */ buf[(++ptr)] = HEX_CHARS[(hi & 0xF)];\n/* 1666 */ ch = (char)(ch & 0xFF);\n/* */ } else {\n/* 1668 */ buf[(++ptr)] = '0';\n/* 1669 */ buf[(++ptr)] = '0';\n/* */ }\n/* 1671 */ buf[(++ptr)] = HEX_CHARS[(ch >> '\\004')];\n/* 1672 */ buf[(++ptr)] = HEX_CHARS[(ch & 0xF)];\n/* 1673 */ return;\n/* */ }\n/* */ \n/* 1676 */ char[] buf = this._entityBuffer;\n/* 1677 */ if (buf == null) {\n/* 1678 */ buf = _allocateEntityBuffer();\n/* */ }\n/* 1680 */ this._outputHead = this._outputTail;\n/* 1681 */ if (ch > 'ÿ') {\n/* 1682 */ int hi = ch >> '\\b' & 0xFF;\n/* 1683 */ int lo = ch & 0xFF;\n/* 1684 */ buf[10] = HEX_CHARS[(hi >> 4)];\n/* 1685 */ buf[11] = HEX_CHARS[(hi & 0xF)];\n/* 1686 */ buf[12] = HEX_CHARS[(lo >> 4)];\n/* 1687 */ buf[13] = HEX_CHARS[(lo & 0xF)];\n/* 1688 */ this._writer.write(buf, 8, 6);\n/* */ } else {\n/* 1690 */ buf[6] = HEX_CHARS[(ch >> '\\004')];\n/* 1691 */ buf[7] = HEX_CHARS[(ch & 0xF)];\n/* 1692 */ this._writer.write(buf, 2, 6);\n/* */ }\n/* */ return;\n/* */ }\n/* */ String escape;\n/* */ String escape;\n/* 1698 */ if (this._currentEscape == null) {\n/* 1699 */ escape = this._characterEscapes.getEscapeSequence(ch).getValue();\n/* */ } else {\n/* 1701 */ escape = this._currentEscape.getValue();\n/* 1702 */ this._currentEscape = null;\n/* */ }\n/* 1704 */ int len = escape.length();\n/* 1705 */ if (this._outputTail >= len) {\n/* 1706 */ int ptr = this._outputTail - len;\n/* 1707 */ this._outputHead = ptr;\n/* 1708 */ escape.getChars(0, len, this._outputBuffer, ptr);\n/* 1709 */ return;\n/* */ }\n/* */ \n/* 1712 */ this._outputHead = this._outputTail;\n/* 1713 */ this._writer.write(escape);\n/* */ }",
"private String avoidErrorChar (String original) {\n\t\tStringBuffer modSB = new StringBuffer();\n\t\tfor (int j=0; j < original.length(); j++) {\n\t\t\tchar c = original.charAt(j);\n\t\t\tif (c == '\\n') {\n\t\t\t\tmodSB.append(\"\\\\n\"); // rimpiazzo il ritorno a capo con il simbolo \\n\n\t\t\t} else if (c == '\"') {\n\t\t\t\tmodSB.append(\"''\"); // rimpiazzo le doppie virgolette (\") con due apostofi ('')\n\t\t\t} else if ((int)c > 31 || (int)c !=127){ // non stampo i primi 32 caratteri di controllo\n\t\t\t\tmodSB.append(c);\n\t\t\t}\n\t\t}\n\t\treturn modSB.toString();\n\t}",
"public String cyclifyWithEscapeChars() {\n return cyclify();\n }",
"private void newline() {\n if (enableSplitting) {\n if (out.length() != 0) {\n out.append(System.lineSeparator());\n }\n out.append(\" \".repeat(depth)); // two spaces indent is sufficient\n } else {\n out.append(\" \"); // just a separator between two tokens\n }\n }",
"public void newLine()\n {\n rst += NEW_LINE;\n }",
"public static String escape(String string) {\n\t\t\n\t\tif (string == null) {\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tStringBuilder output = new StringBuilder(string.length());\n\t\t\n\t\tfor (int i = 0; i < string.length(); i++) {\n\t\t\tchar ch = string.charAt(i);\n\t\t\tString hex = Integer.toHexString(ch).toUpperCase();\n\t\t\t\n\t\t\t// handle unicode\n\t\t\tif (ch > 0xfff) {\n\t\t\t\toutput.append(\"\\\\u\").append(hex);\n\t\t\t} else if (ch > 0xff) {\n\t\t\t\toutput.append(\"\\\\u0\").append(hex);\n\t\t\t} else if (ch > 0x7f) {\n\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t} else if (ch < 32) {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\\b':\n\t\t\t\t\toutput.append(\"\\\\b\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\n':\n\t\t\t\t\toutput.append(\"\\\\n\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\t':\n\t\t\t\t\toutput.append(\"\\\\t\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\f':\n\t\t\t\t\toutput.append(\"\\\\f\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\r':\n\t\t\t\t\toutput.append(\"\\\\r\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tif (ch > 0xf) {\n\t\t\t\t\t\toutput.append(\"\\\\u00\").append(hex);\n\t\t\t\t\t} else {\n\t\t\t\t\t\toutput.append(\"\\\\u000\").append(hex);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tswitch (ch) {\n\t\t\t\tcase '\"':\n\t\t\t\t\toutput.append(\"\\\\\\\"\");\n\t\t\t\t\tbreak;\n\t\t\t\tcase '\\\\':\n\t\t\t\t\toutput.append(\"\\\\\\\\\");\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\toutput.append(ch);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn output.toString();\n\t}",
"public final void mRULE_NEWLINE() throws RecognitionException {\n try {\n int _type = RULE_NEWLINE;\n int _channel = DEFAULT_TOKEN_CHANNEL;\n // InternalDSL.g:16725:14: ( ( '\\\\r' | '\\\\n' )+ )\n // InternalDSL.g:16725:16: ( '\\\\r' | '\\\\n' )+\n {\n // InternalDSL.g:16725:16: ( '\\\\r' | '\\\\n' )+\n int cnt22=0;\n loop22:\n do {\n int alt22=2;\n int LA22_0 = input.LA(1);\n\n if ( (LA22_0=='\\n'||LA22_0=='\\r') ) {\n alt22=1;\n }\n\n\n switch (alt22) {\n \tcase 1 :\n \t // InternalDSL.g:\n \t {\n \t if ( input.LA(1)=='\\n'||input.LA(1)=='\\r' ) {\n \t input.consume();\n\n \t }\n \t else {\n \t MismatchedSetException mse = new MismatchedSetException(null,input);\n \t recover(mse);\n \t throw mse;}\n\n\n \t }\n \t break;\n\n \tdefault :\n \t if ( cnt22 >= 1 ) break loop22;\n EarlyExitException eee =\n new EarlyExitException(22, input);\n throw eee;\n }\n cnt22++;\n } while (true);\n\n\n }\n\n state.type = _type;\n state.channel = _channel;\n }\n finally {\n }\n }",
"private static boolean isLineTerminator(final char c) {\r\n\r\n if ((c == '\\n') || (c == '\\r') || (c == '\\u0085') || (c == '\\u2028') || (c == '\\u2029')) {\r\n return true;\r\n }\r\n\r\n return (false);\r\n }",
"public static void writeWithSystemNewlines (BufferedWriter writer, String string)\n\t\t\tthrows IOException {\n\t\tfor (int i=0; i<string.length(); i++) {\n\t\t\tchar c = string.charAt(i);\n\t\t\tif (c == '\\n')\n\t\t\t\twriter.newLine();\n\t\t\telse\n\t\t\t\twriter.write(c);\n\t\t}\n\t}",
"public static String rot13(String encodeLine){\n String line = \"\";\n for (int i = 0; i < encodeLine.length(); i++) {\n char c = encodeLine.charAt(i);\n if (c >= 'a' && c <= 'm') c += 13;\n else if (c >= 'A' && c <= 'M') c += 13;\n else if (c >= 'n' && c <= 'z') c -= 13;\n else if (c >= 'N' && c <= 'Z') c -= 13;\n line +=c;\n }\n return line;\n }",
"char unescChr(String pEscaped) throws Exception;",
"private static String escapeSequences(String currentString) {\n return currentString.replace(\"\\\\\\\"\", \"\\\"\").replace(\"\\\\\\\\\", \"\\\\\");\n }",
"public static String combineTextWithNewline(String... text) {\r\n return Arrays.asList(text).stream()\r\n .map(content -> content.strip())\r\n .collect(Collectors.joining(NEWLINE));\r\n }",
"public static String replaceInverseBreakLine(String text) {\n\t\treturn text != null ? replace(text, \"<br/>\", \"\\n\") : null;\n\t}",
"@Override\n\tpublic SerializableString getEscapeSequence(int ch) {\n\t\t// no further escaping (beyond ASCII chars) needed:\n\t\treturn null;\n\t}"
] | [
"0.66082495",
"0.6264032",
"0.6062649",
"0.6030458",
"0.6005954",
"0.58850914",
"0.5876658",
"0.5874479",
"0.5856422",
"0.5852646",
"0.58524966",
"0.5837094",
"0.5818092",
"0.58036387",
"0.57918036",
"0.57819533",
"0.5780858",
"0.5765876",
"0.5755242",
"0.5751392",
"0.5739693",
"0.57372314",
"0.5731383",
"0.572142",
"0.5714693",
"0.5689492",
"0.56891084",
"0.56783795",
"0.56331486",
"0.5624699",
"0.5614621",
"0.5603784",
"0.55655473",
"0.5530057",
"0.5493641",
"0.5491933",
"0.54861206",
"0.54688895",
"0.5422154",
"0.5409749",
"0.54095286",
"0.53964835",
"0.53774136",
"0.5354635",
"0.53427345",
"0.5295579",
"0.5266876",
"0.5265014",
"0.5255419",
"0.52197003",
"0.5197346",
"0.5185253",
"0.51837",
"0.5171832",
"0.51695627",
"0.5163111",
"0.5151062",
"0.5146715",
"0.51426107",
"0.51374656",
"0.5134122",
"0.5118131",
"0.510918",
"0.5092179",
"0.5068098",
"0.50673085",
"0.50663966",
"0.5066108",
"0.50631464",
"0.505657",
"0.504214",
"0.5040093",
"0.503985",
"0.5032982",
"0.50306946",
"0.5030186",
"0.5022658",
"0.50149196",
"0.5006704",
"0.5001156",
"0.49857885",
"0.49733824",
"0.49709013",
"0.49646294",
"0.49633622",
"0.4953033",
"0.49519652",
"0.4948358",
"0.49472597",
"0.4932691",
"0.49098253",
"0.49052548",
"0.48870128",
"0.48864394",
"0.48860043",
"0.48824263",
"0.4873317",
"0.48730302",
"0.48728916",
"0.48719347"
] | 0.5628904 | 29 |
Check if there is any category selected | public void btnStart(View view) {
String[][] subCategories = new String[CANT_CATEGORY][CANT_SUBCATEGORY];
if (isSelectedCategory(subCategories)){
final DatabaseReference myRef = database.getReference().child(Utils.REF_USERS)
.child(id_user).child(Utils.REF_CATEGORY);
//Get the categories selected and get the subcategories selected
final Map<String,Object> allCategories = new HashMap();
String categories = "";
for (int i=0; i<CANT_CATEGORY; i++){
String subCat = "";
for (int j=0; j<CANT_SUBCATEGORY; j++){
if (!(subCategories[i][j] == null)) {
subCat += subCategories[i][j];
if (j < CANT_SUBCATEGORY-1 ) {
if (subCategories[i][j + 1] != null)
subCat += ",";
}
}
}
if (!subCat.isEmpty()){
allCategories.put("/"+i+"/"+Utils.REF_SUBCATEGORY, subCat);
categories += i +",";
}
}
//Remove the last character from the categories, it mean the ","
final String category = categories.substring(0,categories.length()-1);
//Remove the data exists in database to rewrite
myRef.removeValue(new DatabaseReference.CompletionListener() {
@Override
public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
//Store in db in firebase
myRef.updateChildren(allCategories, new DatabaseReference.CompletionListener() {
@Override
public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
Gson gson = new Gson();
String subCategoriesJSON = gson.toJson(allCategories);
Log.d("pruebaJsonCat", subCategoriesJSON);
Log.d("pruebaJsonCat", category);
appPreferences.saveDataString(Utils.KEY_CATEGORY, category);
appPreferences.saveDataString(Utils.KEY_SUBCATEGORY, subCategoriesJSON);
startActivity(new Intent(ProfileActivity.this, TabsPublication.class)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK));
}
});
}
});
} else {
Toast.makeText(this, "Por favor selecione al menos una categoria.", Toast.LENGTH_SHORT).show();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"boolean hasCategory();",
"Integer checkCategory(Integer choice, \n List<DvdCategory> categories) throws DvdStoreException;",
"public void selectCategory() {\n\t\t\r\n\t}",
"private void checkCategoryPreference() {\n SharedPreferences sharedPrefs = getSharedPreferences(Constants.MAIN_PREFS, Context.MODE_PRIVATE);\n String json = sharedPrefs.getString(Constants.CATEGORY_ARRAY, null);\n Type type = new TypeToken<ArrayList<Category>>(){}.getType();\n ArrayList<Category> categories = new Gson().fromJson(json, type);\n if(categories == null) {\n categories = new ArrayList<>();\n Category uncategorized = new Category(Constants.CATEGORY_UNCATEGORIZED, Constants.CYAN);\n categories.add(uncategorized);\n String jsonCat = new Gson().toJson(categories);\n SharedPreferences.Editor prefsEditor = sharedPrefs.edit();\n prefsEditor.putString(Constants.CATEGORY_ARRAY, jsonCat);\n prefsEditor.apply();\n }\n }",
"boolean hasGroupByCategory();",
"void selectCategory() {\n // If user is the active player, ask for the user's category.\n if (activePlayer.getIsHuman()) {\n setGameState(GameState.CATEGORY_REQUIRED);\n }\n // Or get AI active player to select best category.\n else {\n Card activeCard = activePlayer.getTopMostCard();\n activeCategory = activeCard.getBestCategory();\n }\n\n logger.log(\"Selected category: \" + activeCategory + \"=\" +\n activePlayer.getTopMostCard().getCardProperties()\n .get(activeCategory));\n logger.log(divider);\n\n setGameState(GameState.CATEGORY_SELECTED);\n }",
"public void chooseCategory(String category) {\n for (Category c : categories) {\n if (c.getName().equals(category)) {\n if (c.isActive()) {\n c.setInActive();\n } else {\n c.setActive();\n }\n }\n }\n for (int i = 0; i < categories.size(); i++) {\n System.out.println(categories.get(i).getName());\n System.out.println(categories.get(i).isActive());\n }\n }",
"private boolean tieneCategorias(){\n String valor = \"\";\n try {\n ResultSet resultado = buscador.getResultSet(\"select conCategorias from JERARQUIA where correlativo = '\" + IDJerarquia + \"'\");\n if (resultado.next()) {\n valor += resultado.getObject(\"conCategorias\").toString(); //IDRaiz\n }\n } catch (SQLException e) {\n System.out.println(\"*SQL Exception: *\" + e.toString());\n }\n if(valor.equalsIgnoreCase(\"true\")) //Si utiliza categorias\n return true;\n return false;\n }",
"public void onCategoryClicked(String category){\n\t\tfor(int i = 0 ; i < mData.getStatistics().size(); i++){\r\n\t\t\tif(mData.getStatistics().get(i).getCategory().equals(category)){\r\n\t\t\t\tif(mData.getStatistics().get(i).getDueChallenges() == 0){\r\n\t\t\t\t\tmGui.showToastNoDueChallenges(mData.getActivity());\r\n\t\t\t\t} else {\r\n\t\t\t\t\t//Start activity challenge (learn session) with category and user \t\r\n\t\t\t\t\tNavigation.startActivityChallenge(mData.getActivity(), mData.getUser(), category);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\t\t\t\r\n\t}",
"@Override\n\tpublic void verifyCategories() {\n\t\t\n\t\tBy loc_catNames=MobileBy.xpath(\"//android.widget.TextView[@resource-id='com.ionicframework.SaleshuddleApp:id/category_name_tv']\");\n\t\tPojo.getObjSeleniumFunctions().waitForElementDisplayed(loc_catNames, 15);\n\t\tList<AndroidElement> catNames=Pojo.getObjSeleniumFunctions().getWebElementListAndroidApp(loc_catNames);\n\t\tList<String> catNamesStr=new ArrayList<String>();\n\t\t\n\t\t\n\t\tfor(AndroidElement catName:catNames)\n\t\t{\n\t\t\tcatNamesStr.add(catName.getText().trim());\n\t\t}\n\t\t\n\t\tif(catNamesStr.size()==0)\n\t\t{\n\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", false);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tPojo.getObjUtilitiesFunctions().logTestCaseStatus(\"Verify that catgory names are correct\", BuildSpGamePage.expectedData.get(\"Categories\").containsAll(catNamesStr));\n\n\t\t}\n\t\t}",
"private boolean isInCategory(Location location, List<String> choosenCategories) {\n for(String category : choosenCategories) {\n if(location.getSubCategory().equals(category) || location.getSubCategory() == category)\n return true;\n }\n return false;\n }",
"boolean hasProductBiddingCategoryConstant();",
"@Override\n\t\t\t\tpublic void actionPerformed(ActionEvent e) {\n\t\t\t\t\tvalidateCategory(myCategory);\n\t\t\t\t}",
"public boolean isSetCatName() {\n return this.catName != null;\n }",
"boolean hasPageCategoryId();",
"boolean restrictCategory(){\n\n\n if((!top.isEmpty()||!bottom.isEmpty())&&!suit.isEmpty()){\n Toast.makeText(this, \"상의/하의와 한벌옷은 동시에 설정할 수 없습니다.\", Toast.LENGTH_SHORT).show();\n return false;\n }\n\n\n detail_categories = new ArrayList<>(Arrays.asList(top_detail,bottom_detail,suit_detail,\n outer_detail,shoes_detail,bag_detail,accessory_detail));\n\n for (int kindNum=0; kindNum<7; kindNum++){\n String category = categories.get(kindNum); //해당 종류(ex.상의)에 설정된 카테고리명 받아옴\n String kind = Utils.getKey(Utils.Kind.kindNumMap,kindNum); //종류명 받아옴\n\n if(!category.isEmpty()){ //카테고리가 설정 되어있다면\n String detail_category = detail_categories.get(kindNum); //디테일 카테고리 받아옴\n Iterator<ClothesVO> cloListIter = clothesList.iterator();\n int remain_items=0;\n\n if(detail_category.isEmpty()){ //카테고리만 설정되어 있다면\n while (cloListIter.hasNext()) {\n ClothesVO clothes = cloListIter.next();\n String cloKind = clothes.getKind();\n if(cloKind.equals(kind)){\n if(!clothes.getCategory().equals(category))\n cloListIter.remove(); //해당 종류에 해당 카테고리가 아닌 옷들을 제거\n else\n remain_items+=1; //제거되지 않은 옷\n }\n\n if(kindNum == Utils.Kind.TOP || kindNum == Utils.Kind.BOTTOM){\n if(\"한벌옷\".equals(cloKind))\n cloListIter.remove();\n }else if(kindNum == Utils.Kind.SUIT){\n if(\"상의\".equals(cloKind) || \"하의\".equals(cloKind))\n cloListIter.remove(); //제거\n }\n }\n }else{ //디테일 카테고리도 설정되어 있다면\n while (cloListIter.hasNext()) {\n ClothesVO clothes = cloListIter.next();\n String cloKind = clothes.getKind();\n if(cloKind.equals(kind)){\n if(!clothes.getDetailCategory().equals(detail_category))\n cloListIter.remove();//해당 종류에 해당 세부 카테고리가 아닌 옷들을 제거\n else\n remain_items+=1; //제거되지 않은 옷\n }\n\n if(kindNum == Utils.Kind.TOP || kindNum == Utils.Kind.BOTTOM){\n if(\"한벌옷\".equals(cloKind))\n cloListIter.remove();\n }else if(kindNum == Utils.Kind.SUIT){\n if(\"상의\".equals(cloKind) || \"하의\".equals(cloKind))\n cloListIter.remove(); //제거\n }\n }\n }\n\n if(remain_items==0){\n if(!detail_category.isEmpty()){\n category = detail_category;\n }\n\n// if(recommendedDCate!=null ){\n// List<String>recommendedDCateArray = Arrays.asList(recommendedDCate);\n// if(!recommendedDCateArray.contains(category)){\n// Toast.makeText(this, \"해당 날씨에 맞지 않는 <\"+category+\"> 카테고리가 설정에 포함되어 있습니다.\", Toast.LENGTH_LONG).show();\n// return false;\n// }\n// }\n\n Toast.makeText(this, \"설정한 <\"+category+\"> 카테고리의 옷이 없거나 해당 날씨에 맞지 않습니다. \\n더 많은 옷을 추가해보세요.\", Toast.LENGTH_LONG).show();\n return false;\n }\n }\n }\n\n return true;\n }",
"boolean hasPageCategoryDescription();",
"public boolean findNewCategory(String value) {\n Boolean isCheckCategory = null;\n waitForClickableOfElement(categoryDropdownEle, \"CategoryDropdown\");\n waitForJSandJQueryToLoad();\n clickElement(categoryDropdownEle, \"CategoryDropdown\");\n for (WebElement tdElement : tableOfCategoryDropdown) {\n String strSearchValue = null;\n try {\n waitForVisibleElement(tdElement, \"Get category name in list\");\n strSearchValue = tdElement.getText();\n } catch (Exception ex) {\n }\n getLogger().info(\"SearchValue = \" + strSearchValue);\n if (strSearchValue.equals(value)) {\n isCheckCategory = true;\n //Click anywhere to exit vefify\n eleAuvenirIncTxt.click();\n break;\n } else {\n isCheckCategory = false;\n }\n }\n getLogger().info(\"isCheckCategory is: \" + isCheckCategory);\n return isCheckCategory;\n }",
"public boolean hasGroupByCategory() {\n return groupByCategory_ != null;\n }",
"public boolean isPodkategorie(int box, DefaultMutableTreeNode selected){\n if (selected != null){\n boolean stav = false;\n DefaultMutableTreeNode currentNode = najdiPolozku(box, root);\n if (currentNode==null){\n currentNode=root;\n }\n if(selected.isRoot()){\n return true;\n }\n Tag sel_tag = (Tag) selected.getUserObject();\n do{\n Tag t = (Tag) currentNode.getUserObject();\n if (t.getID() == sel_tag.getID()){\n stav = true;\n }\n if (currentNode.getParent() == null){\n currentNode = null;\n }else{\n currentNode = (DefaultMutableTreeNode) currentNode.getParent();\n }\n }while(currentNode != null && stav == false);\n return stav;\n }else{ \n return true;\n }\n }",
"private void listCategory() {\r\n \r\n cmbCategoryFilter.removeAllItems();\r\n cmbCategory.removeAllItems();\r\n \r\n cmbCategoryFilter.addItem(\"All\");\r\n for (Category cat : Category.listCategory()) {\r\n cmbCategoryFilter.addItem(cat.getName());\r\n cmbCategory.addItem(cat.getName());\r\n }\r\n \r\n }",
"private void showCategoryMenu() {\n if(CategoryMenu == null) {\n CategoryMenu = new PopupMenu(getActivity(), CategoryExpand);\n CategoryMenu.setOnMenuItemClickListener(this);\n\n MenuInflater inflater = CategoryMenu.getMenuInflater();\n inflater.inflate(R.menu.category_menu, CategoryMenu.getMenu());\n }\n\n if(Equival.isChecked()){\n Toaster toaster = new Toaster(getContext());\n toaster.standardToast(getText(R.string.err_modify_category).toString());\n }\n else CategoryMenu.show();\n setFromCategoryTitleToMenu();\n }",
"@Override\n protected void onSelected(Category category) {\n setSelectedCategory(category);\n messageUtil.infoEntity(\"status_selected_ok\", getPart().getCategory());\n }",
"public static void checkCategoryInDb() {\n try {\n Category category = Category.listAll(Category.class).get(0);\n\n } catch (Exception e) {\n Category undefinedCategory = new Category();\n undefinedCategory.setCategoryId(1);\n undefinedCategory.setCategoryName(\"Others\");\n undefinedCategory.save();\n }\n }",
"public void testMarkAllItemsSelectedInCategory()\n\t{\n\t\t// Arrange\n\t\taddListWith6Items(\"testlist\");\n\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, true);\n\t\tActivitiesDataSource allLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tActivityBean newList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tCategoryBean newCategory1 = newList.getCategory(\"cat1\");\n\t\tCategoryBean newCategory2 = newList.getCategory(\"cat2\");\n\t\tassertTrue(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertTrue(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t\t\n\t\t// Act\n\t\tservice.markAllItemsSelectedInCategory(17l, false);\n\t\tallLists = service.getActivitiesWithChildren(new Long[]\n\t\t{}, true);\n\t\tnewList = allLists.getActivity(\"testlist\");\n\n\t\t// Assert\n\t\tnewCategory1 = newList.getCategory(\"cat1\");\n\t\tnewCategory2 = newList.getCategory(\"cat2\");\n\t\tassertFalse(newCategory1.getEntry(\"item1\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item2\").getIsSelected());\n\t\tassertFalse(newCategory1.getEntry(\"item3\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item4\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item5\").getIsSelected());\n\t\tassertFalse(newCategory2.getEntry(\"item6\").getIsSelected());\n\t}",
"@Override\n\t\t\t\t\tpublic void onSelcted(Category mParent, Category category) {\n\t\t\t\t\t\tif (view == solverMan) {\n\t\t\t\t\t\t\tsolverCategory = category;\n\t\t\t\t\t\t\tsolverMan.setContent(category.getName());\n\t\t\t\t\t\t} else {// check is foucs choose person\n\t\t\t\t\t\t\tChooseItemView chooseItemView = (ChooseItemView) view\n\t\t\t\t\t\t\t\t\t.findViewById(R.id.common_add_item_title);\n\n\t\t\t\t\t\t\tfor (Category mCategory : mGuanzhuList) {\n\t\t\t\t\t\t\t\tif (category.getId().equals(mCategory.getId())) {\n\t\t\t\t\t\t\t\t\t// modify do nothing.\n\t\t\t\t\t\t\t\t\tif (!category.getName().equals(\n\t\t\t\t\t\t\t\t\t\t\tchooseItemView.getContent())) {\n\t\t\t\t\t\t\t\t\t\tshowToast(\"该关注人已经在列表了\");// not in\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// current\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// chooseItem,but\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// other already\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// has this\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// name.\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tchooseItemView.setContent(category.getName());\n\n\t\t\t\t\t\t\tAddItem addItem = (AddItem) chooseItemView.getTag();\n\t\t\t\t\t\t\t// 关注人是否已经存在,就只更新\n\t\t\t\t\t\t\tfor (Category mCategory : mGuanzhuList) {\n\t\t\t\t\t\t\t\tif (addItem.tag.equals(mCategory.tag)) {\n\t\t\t\t\t\t\t\t\t// modify .\n\t\t\t\t\t\t\t\t\tmCategory.setName(category.getName());\n\t\t\t\t\t\t\t\t\tmCategory.setId(category.getId());\n\t\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tLog.i(TAG,\n\t\t\t\t\t\t\t\t\t\"can not find the select item from fouc:\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}",
"@Override\n public void onCategorySelected(Category category) {\n productList.clear();\n\n ArrayList<ProductHeader> tempList;\n if (notSelectedYet) {\n tempList = allProducts;\n } else if (isMaleSelected) {\n tempList = maleList;\n } else {\n tempList = femaleList;\n }\n\n for (ProductHeader product : tempList) {\n if (product.getCategory() == category.getId()) {\n productList.add(product);\n }\n }\n\n categoryText.setText(category.getName());\n\n checkAvailability();\n productAdapter.notifyDataSetChanged();\n }",
"public boolean hasCategory(String category)\n\t{\n\t\treturn categories.contains(category);\n\t}",
"@Override\n\t\t\tpublic void onNothingSelected(AdapterView<?> parent) {\n\t\t\t\tcategory = parent.getItemAtPosition(0).toString();\n\t\t\t\t\n\t\t\t}",
"public void loadBooksOfCategory(){\n long categoryId=mainActivityViewModel.getSelectedCategory().getMcategory_id();\n Log.v(\"Catid:\",\"\"+categoryId);\n\n mainActivityViewModel.getBookofASelectedCategory(categoryId).observe(this, new Observer<List<Book>>() {\n @Override\n public void onChanged(List<Book> books) {\n if(books.isEmpty()){\n binding.emptyView.setVisibility(View.VISIBLE);\n }\n else {\n binding.emptyView.setVisibility(View.GONE);\n }\n\n booksAdapter.setmBookList(books);\n }\n });\n }",
"private void getCategoryList() {\n jsonArray = dataBaseHelper.getCategoriesFromDB();\n if (jsonArray != null && jsonArray.length() > 0) {\n rvCategories.setVisibility(View.VISIBLE);\n setupCategoryListAdapter(jsonArray);\n }else {\n rvCategories.setVisibility(View.GONE);\n Toast.makeText(getActivity(), Constants.ERR_NO_CATEGORY_FOUND, Toast.LENGTH_SHORT).show();\n }\n }",
"List<Category> selectCategoryList();",
"public boolean inKat(Kategorie k){\n\t\treturn katId.equals(k.getId());\n\t}",
"private void checkCategoriaInDB(DB db ){\n\t\tString[] catDef = {\"Ambiente\", \"Animali\", \"Arte e Cultura\",\"Elettronica e Tecnologia\", \"Sport\", \"Svago\"};\n\t\tMap<Long, Categoria> categorie = db.getTreeMap(\"categorie\");\n\t\tfor(String nomeCat : catDef) {\n\t\t\tlong hashcode = (long)nomeCat.hashCode();\n\t\t\tif(!categorie.containsKey(hashcode))\n\t\t\t\tcategorie.put(hashcode, new Categoria(null ,nomeCat));\n\t\t}\n\t}",
"@Test\r\n\tpublic void catTest() {\r\n\t\tItem item = new Item();\r\n\t\ttry {\r\n\t\t\tString tempSet[] = item.getCats();\r\n\t\t\tassertNotSame(tempSet.length, 0);\r\n\t\t\tfor (int i = 0; i < tempSet.length; i++) { // check if categories are empty\r\n\t\t\t\tassertNotNull(tempSet[i]);\r\n\t\t\t\tassertNotSame(tempSet[i], \"\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tfail(\"Failed to execute the retrieval of the list of categories: SQLException\");\r\n\t\t}\r\n\t\t\r\n\t}",
"Category selectCategory(String name);",
"boolean getPageCategoryIdNull();",
"public boolean hasKGPopCategory() {\n return fieldSetFlags()[1];\n }",
"boolean hasForumCategoryId();",
"@Override\n public void onClick(View view) {\n\n switch (view.getId()) {\n case R.id.ivHookCat:\n unselectAllCategories();\n findViewById(R.id.btnEduCat).setSelected(true);\n toggleSubCategoryView();\n break;\n\n case R.id.btnEduCat:\n unselectAllCategories();\n findViewById(R.id.btnEduCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_EDU);\n break;\n\n case R.id.btnFunCat:\n unselectAllCategories();\n findViewById(R.id.btnFunCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_FUN);\n break;\n\n case R.id.btnGovtCat:\n unselectAllCategories();\n findViewById(R.id.btnGovtCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_GOVT);\n break;\n\n case R.id.btnHealthCat:\n unselectAllCategories();\n findViewById(R.id.btnHealthCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_HEALTH);\n break;\n\n case R.id.btnJobCat:\n unselectAllCategories();\n findViewById(R.id.btnJobCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_JOB);\n break;\n\n case R.id.btnLawCat:\n unselectAllCategories();\n findViewById(R.id.btnLawCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_LAW);\n break;\n\n case R.id.btnMoneyCat:\n unselectAllCategories();\n findViewById(R.id.btnMoneyCat).setSelected(true);\n toggleSubCategoryView(0, AppConstants.CAT_MONEY);\n break;\n\n case R.id.ivOpenerCat:\n if (llFlowingDetails.getWidth() < 1)\n showFlowingDetails();\n else\n hideFlowingDetails();\n break;\n\n default:\n break;\n\n }\n }",
"private boolean containsCategory(String categoryName) {\n for(Category category : categories)\n if(category.getName().equals(categoryName))\n return true;\n return false;\n }",
"public boolean containsCategory(String categoryName);",
"public void seleccionarCategoria(String name);",
"public boolean existeListaCategoriaLoja_Possui() {\n\t\t\treturn listacategoriaLojaPossui!= null;\n\t\t}",
"public boolean isNewCategory() {\n if (this.getParent() == null && !this.hasSubcategories()) {\n return true;\n }\n return false;\n }",
"public boolean hasGroupByCategory() {\n return groupByCategoryBuilder_ != null || groupByCategory_ != null;\n }",
"private List<JCheckBox> queryMainCategory() {\n\t\tList<JCheckBox> boxes = new ArrayList<>();\r\n\t\t//boxes.add(b);\r\n\t\t\r\n\t\tDBconn db = new DBconn();\r\n\t\t\r\n\t\tResultSet res = db.executeQuery(\"SELECT * FROM MAIN_CATE\");\r\n\t\t\r\n\t\ttry {\r\n\t\t\twhile(res.next()) {\r\n\t\t\t\tJCheckBox b = new JCheckBox(res.getString(2));\t\t\t\t\r\n\t\t\t\tb.setActionCommand(Integer.toString(res.getInt(1)));\r\n\t\t\t\tboxes.add(b);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tdb.closeDB();\r\n\t\t\r\n\t\treturn boxes;\r\n\t}",
"public ArrayList<String> getCheckedCategories()\n {\n return rentalModel.getSelectedRental().getSelectedCategories();\n }",
"private void initialiseCategories() {\n\t\t_nzCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/nz\");\n\t\t_intCategories = BashCmdUtil.bashCmdHasOutput(\"ls categories/international\");\n\t}",
"public static boolean selectCategory(String category, String flowerKind) {\r\n\r\n\t\tboolean valid = false;\r\n\t\t//checks in the natural flower category if user mentioned for it\r\n\t\tif (category == \"Natural\") {\r\n\t\t\tArrayList<String> flowerTypes = new ArrayList<String>();\r\n\t\t\tflowerTypes.add(\"Flowers\");\r\n\t\t\tflowerTypes.add(\"Floral Boquets\");\r\n\t\t\tflowerTypes.add(\"Floral Decoration\");\r\n \r\n\t\t\t//returns true if the mention flower is available in the mentioned category else returns false\r\n\t\t\tfor (String flowerType : flowerTypes) {\r\n\t\t\t\tif (flowerKind.equals(flowerType)) {\r\n\t\t\t\t\tvalid = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tSystem.out.println(category + \" \" + flowerKind + \" Available\");\r\n\t\t\treturn valid;\r\n\t\t}\r\n\r\n\t\t//checks in the artificial flower category if user mentioned for it\r\n\t\telse if (category == \"Artificial\") {\r\n\t\t\tArrayList<String> flowerTypes = new ArrayList<String>();\r\n\t\t\tflowerTypes.add(\"Flowers\");\r\n\t\t\tflowerTypes.add(\"Floral Boquets\");\r\n\t\t\tflowerTypes.add(\"Floral Decoration\");\r\n\r\n\t\t\t//returns true if the mention flower is available in the mentioned category else returns false\r\n\t\t\tfor (String flowerType : flowerTypes) {\r\n\r\n\t\t\t\tif (flowerKind.equals(flowerType)) {\r\n\t\t\t\t\tvalid = true;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\r\n\t\t\t\telse {\r\n\t\t\t\t\tvalid = false;\r\n\t\t\t\t}\r\n\r\n\t\t\t}\r\n\t\t\tSystem.out.println(category + \" \" + flowerKind + \" Available\");\r\n\t\t\treturn valid;\r\n\t\t}\r\n\r\n\t\t//returns false if the mentioned category is not available\r\n\t\telse {\r\n\t\t\tSystem.out.println(category + \" \" + flowerKind + \" Not Available\");\r\n\t\t\treturn false;\r\n\r\n\t\t}\r\n\t}",
"boolean isCitySelected();",
"@FXML\n private String handleComboCategory(ActionEvent event)\n {\n String category;\n\n int selectedIndex = comboCategoryBox.getSelectionModel().getSelectedIndex();\n\n switch (selectedIndex)\n {\n case 0:\n category = \"blues\";\n break;\n case 1:\n category = \"hipHop\";\n break;\n case 2:\n category = \"pop\";\n break;\n case 3:\n category = \"rap\";\n break;\n case 4:\n category = \"rock\";\n break;\n case 5:\n category = \"techno\";\n break;\n case 6:\n txtOtherCategory.setVisible(true);\n category = txtOtherCategory.getText();\n break;\n default:\n throw new UnsupportedOperationException(\"Category not chosen\");\n }\n return category;\n }",
"HashSet<CategoryBudget> getCategoryBudgets() throws NoUserSelectedException;",
"boolean hasBracksSelected();",
"boolean isSetCit();",
"public void searchByCategory(View v){\n category = searchSpinner.getSelectedItem().toString();\n if(category!=null && connection.isOnline(this)){\n new SearchByCategoryAsync().execute();\n }\n }",
"@Then(\"book categories must match book_categories table from db\")\n public void book_categories_must_match_book_categories_table_from_db() {\n String sql = \"SELECT name FROM book_categories;\";\n List<Object> namesObj = DBUtils.getColumnData(sql, \"name\");\n List<String> exNames = new ArrayList<>();\n for (Object o : namesObj) {\n exNames.add(o.toString());\n }\n // get the actual categories from UI as webelements\n // convert the web elements to list\n List<WebElement> optionsEl = booksPage.mainCategoryList().getOptions();\n List<String> acNames = BrowserUtils.getElementsText(optionsEl);\n // remove the first option ALL from acList.\n acNames.remove(0);\n // compare 2 lists\n assertEquals(\"Categories did not match\", exNames, acNames);\n }",
"boolean isProductCategoryConfigurable(int productCategoryId);",
"private void butEditCategories_Click(Object sender, EventArgs e) throws Exception {\n ArrayList selected = new ArrayList();\n for (int i = 0;i < listCategories.SelectedIndices.Count;i++)\n {\n selected.Add(CatList[listCategories.SelectedIndices[i]].DefNum);\n }\n FormDefinitions FormD = new FormDefinitions(DefCat.ProcCodeCats);\n FormD.ShowDialog();\n DataValid.setInvalid(InvalidType.Defs);\n changed = true;\n fillCats();\n for (int i = 0;i < CatList.Length;i++)\n {\n if (selected.Contains(CatList[i].DefNum))\n {\n listCategories.SetSelected(i, true);\n }\n \n }\n //we need to move security log to within the definition window for more complete tracking\n SecurityLogs.MakeLogEntry(Permissions.Setup, 0, \"Definitions\");\n fillGrid();\n }",
"public void validateCategory (String category){\n boolean isValid = category != null && !category.isEmpty();\n setDescriptionValid(isValid);\n }",
"public void deleteSelectedCategories() {\n\t\tfor (IFlashcardSeriesComponent x : selectionListener.selectedComponents) {\n\t\t\tFlashCategory cat = (FlashCategory) x;\n\t\t\t/*\n\t\t\tif (cat.getParent() == null) {\n\t\t\t\troot = new FlashCategory(root.getName());\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t*/\n\t\t\tList<Flashcard> copy = new ArrayList<Flashcard>(flashcards);\n\t\t\tfor (Flashcard f : copy) {\n\t\t\t\tif (cat.containsFlashcard(f)) {\n\t\t\t\t\tflashcards.remove(f);\n\t\t\t\t}\n\t\t\t}\n\t\t\tcat.getParent().removeI(cat);\n\t\t\t\n\t\t\tif (selectRootAction != null) selectRootAction.selectRoot();\n\t\t\t\n\t\t}\n\t\tfireIntervalChanged(this,-1,-1);\n\t}",
"DvdCategory validateChoice(Integer choice) throws DvdStoreException;",
"public boolean validateCategory(String item_category) {\r\n\t\tCategory[] category = Category.values();\r\n\t\tfor (Category c : category) {\r\n\t\t\tString s = c.toString();\r\n\t\t\tif (s.equalsIgnoreCase(item_category)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"boolean hasArtilleryFactorySelected();",
"boolean hasStablesSelected();",
"boolean hasDomainCategory();",
"@Override\n public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {\n Context ctxt = getApplicationContext();\n //discover whether child or parent in listview was chosen\n if(buttonView.getTag() instanceof CalorieCategory){\n CalorieCategory key = (CalorieCategory) buttonView.getTag();\n key.setSelected(!key.isSelected()); //toggle\n HashMap<MenuItem, List<String>> dataToSelect = allData.get(key);\n Object[] keys = dataToSelect.keySet().toArray();\n ArrayList<MenuItem> items = new ArrayList<MenuItem>();\n //get a list of items to select correctly\n for(Object k : keys){\n items.add((MenuItem)k);\n }\n //add them to a list of chosenitems\n if(key.isSelected()) {\n for (MenuItem i : items) {\n i.setSelected(true);\n if(!chosenItems.contains(i)) {\n chosenItems.add(i);\n }\n }\n }else{\n for(MenuItem i : items){\n i.setSelected(false);\n chosenItems.remove(i);\n }\n }\n\n }else if(buttonView.getTag() instanceof information.MenuItem){\n MenuItem key = (information.MenuItem) buttonView.getTag();\n HashMap<MenuItem, List<String>> categItems = allData.get(key);\n key.setSelected(!key.isSelected()); //toggle\n if(key.isSelected()){\n if(!chosenItems.contains(key)){\n chosenItems.add(key);\n }\n }else{\n if(chosenItems.contains(key)){\n chosenItems.remove(key);\n }\n }\n }\n\n }",
"private void defaultCategoryShouldBeFound(String filter) throws Exception {\n restCategoryMockMvc.perform(get(\"/api/categories?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$.[*].id\").value(hasItem(category.getId().intValue())))\n .andExpect(jsonPath(\"$.[*].label\").value(hasItem(DEFAULT_LABEL)))\n .andExpect(jsonPath(\"$.[*].primaryColor\").value(hasItem(DEFAULT_PRIMARY_COLOR)))\n .andExpect(jsonPath(\"$.[*].secondaryColor\").value(hasItem(DEFAULT_SECONDARY_COLOR)));\n\n // Check, that the count call also returns 1\n restCategoryMockMvc.perform(get(\"/api/categories/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"1\"));\n }",
"@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tString colorString = flowerColorHorizontalSelector.getSelected();\n\t\t\t\tString leafShapeString = leafShapeHorizontalSelector.getSelected();\n\t\t\t\tString leafMarginString = leafMarginHorizontalSelector.getSelected();\n\t\t\t\tString leafArrangementString = leafArrangementHorizontalSelector.getSelected();\n\t\t\t\t//Uncomfortable putting this here ////messy\n\t\t\t\tif (colorString!=null | leafShapeString!=null | leafMarginString!=null | leafArrangementString!=null){\n\t\t\t\t\tCursor cursor = ((MainActivity) getActivity()).getLeaves(colorString, leafShapeString,leafMarginString,leafArrangementString);\n\t\t\t mListener.fragmentToActivity(2, cursor);\n\t\t\t\t}else{\n\t\t\t\t\tshowText(\"Please select at least one option from one category.\");\n\t\t\t\t}\n\t\t\t}",
"boolean hasMobileAppCategoryConstant();",
"String getCategory();",
"String getCategory();",
"private void setSuggestedCategory() {\n if (selectedCategoryKey != null) {\n return;\n }\n if (suggestedCategories != null && suggestedCategories.length != 0) {\n selectedCategoryKey = suggestedCategories[0].getKey();\n selectCategory.setText(suggestedCategories[0].getName());\n }\n }",
"private static void seachCats(String maybeCat) {\n\t\tSystem.out.println(\"List of \" + maybeCat + \" movies\");\n\t\tSystem.out.println(\"===============================\");\n\t\tint i;\n\t\tint x = 0;\n\t\tfor (i = 0; i < movList.size(); i++) {\n\t\t\tif (movList.get(i).isCat(maybeCat)) {\n\t\t\t\tSystem.out.println(movList.get(i));\n\t\t\t\tx++;\n\t\t\t}\n\t\t}\n\t\tif (x == 0) {\n\t\t\tSystem.out.println(\"Sorry, there are no movies in that category.\");\n\t\t}\n\t}",
"public static void checkCategoryExist(String referenceCategory,Categorie categorie) throws GestionResourceException {\n\t\tif(categorie==null){\n\t\t\tthrow new GestionResourceException(\"\", \"La categorie de reference \"+referenceCategory+\" n'existe pas\");\n\t\t}\n\t}",
"public static WebElement lnk_selectSingleCategory() throws Exception{\r\n \ttry{\r\n \t\t// Date 1-Sep-2016 UI Changed\r\n \t\t//*[contains(@class, 'sidebar_con relateCat kwRelateLink')]\r\n \t\tWebDriverWait waits = new WebDriverWait(driver, 15);\r\n \t\twaits.until(ExpectedConditions.visibilityOfElementLocated(\r\n \t\t\t\tBy.xpath(\"//*[contains(@class, 'sidebar_con relateCat')]\")));\r\n \t\t\r\n \t//\telement = driver.findElement(\r\n \t//\t\t\tBy.xpath(\"(//*[contains(@class, 'sidebar_con relateCat')]/li/a)[position()=1]\"));\r\n \t\t\r\n \t\t// 03-Jan-2017: Select 2nd category\r\n \t\t// 08-Feb-2017: Select 1st category\r\n \t\telement = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[contains(@class, 'sidebar_con relateCat')]/li/a)[position()=1]\"));\r\n \t\t\r\n \t/*\tWebDriverWait waits = new WebDriverWait(driver, 15);\r\n \t\twaits.until(ExpectedConditions.visibilityOfElementLocated(By.id(\"catList\")));\r\n \t\t\r\n \t\telement = driver.findElement(\r\n \t\t\t\tBy.xpath(\"(//*[@id='catList']/li[1]/a)[position()=1]\"));\r\n \t*/\t\r\n \t\t// Print selected category into console\r\n \t\tString txt_getSelectedCategoryName = element.getText();\r\n \t\tAdd_Log.info(\"Selected single category are ::\" + txt_getSelectedCategoryName);\r\n \t\t\r\n \t}catch(Exception e){\r\n \t\tAdd_Log.error(\"Related Categories side bar is NOT found on the page.\");\r\n \t\t// Get the list of window handles\r\n \t\tArrayList<String> tabs = new ArrayList<String> (driver.getWindowHandles());\r\n \t\tAdd_Log.info(\"Print number of window opened ::\" + tabs.size());\r\n \t\tthrow(e);\r\n \t}\r\n \treturn element;\r\n }",
"public boolean selectItem(Connection conn, String category) {\r\n\t\ttry {\r\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\"select * from item_XXXX where category=?\");\r\n\t\t\tpstmt.setString(1, category);\r\n\t\t\tResultSet rset = pstmt.executeQuery();\r\n\t\t\tif (!rset.isBeforeFirst())\r\n\t\t\t\treturn true;\r\n\t\t\telse {\r\n\t\t\t\tSystem.out.println(\"Item No\\t\\ttDescription\\t\\tCategory\\t\\tPrice\\t\\tQuantity\");\r\n\t\t\t\tSystem.out.println(\r\n\t\t\t\t\t\t\"_______________________________________________________________________________________________________\");\r\n\t\t\t\twhile (rset.next()) {\r\n\t\t\t\t\tSystem.out.println(rset.getInt(1) + \"\\t\\t\" + rset.getString(2) + \"\\t\\t\" + rset.getString(3) + \"\\t\\t\"\r\n\t\t\t\t\t\t\t+ rset.getInt(4) + \"\\t\\t\" + rset.getInt(5));\r\n\t\t\t\t}\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn false;\r\n\t}",
"public boolean isSetClassification() {\n return this.classification != null;\n }",
"public String searchCategoriesByCriteria()\n {\n logger.info(\"**** In searchCategoriesByCriteria in Controller ****\");\n if (category != null && (StringUtils.isNotEmpty(category.getCategoryName()) || StringUtils.isNotEmpty(category.getCategoryDescription())))\n {\n categoryList = categoryService.searchCategoriesByCriteria(category);\n }\n else\n {\n FacesMessage facesMsg = new FacesMessage(FacesMessage.SEVERITY_INFO, Constants.NO_SEARCH_CRITERIA, Constants.NO_SEARCH_CRITERIA);\n FacesContext.getCurrentInstance().getExternalContext().getFlash().setKeepMessages(true);\n FacesContext.getCurrentInstance().addMessage(null, facesMsg);\n }\n return Constants.SEARCH_CATEGORY_VIEW;\n }",
"public void actionPerformed(ActionEvent e) {\r\n\t\tJComboBox<?> CategoriesCombo = (JComboBox<?>) e.getSource();\r\n\t\tSelectedCategory = CategoriesCombo.getSelectedItem();\r\n\r\n\t}",
"private void checkAtLeastOneRuleIsSelected() {\n\t\tsufficientRulesSelected = false;\n\t\tint checked = 0;\n\t\tControl[] controlArray = rulesGroup.getChildren();\n\n\t\tfor (Control elem : controlArray) {\n\t\t\tif (elem instanceof Button) {\n\t\t\t\tif (((Button) elem).getSelection()) {\n\t\t\t\t\tchecked++;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tif (checked >= 1)\n\t\t\tsufficientRulesSelected = true;\n\t\tupdateFinishButton();\n\t}",
"@FXML\n private void deleteCategory()\n {\n CategoryFxModel selectedCategory = categoryTable.getSelectionModel().getSelectedItem();\n if(selectedCategory == null)\n {\n DialogsUtils.categoryNotSelectedDialog();\n }\n else\n {\n Optional<ButtonType> result = DialogsUtils.deleteCategoryConfirmationDialog();\n deleteCategoryWhenOkPressed(selectedCategory, result);\n }\n }",
"public void onSelectCategory(View view) {\n\n Intent intent = new Intent(this, SelectCategoryActivity.class);\n intent.putExtra(\"whichActivity\", 1);\n startActivity(intent);\n\n }",
"public void checkIfItemCategoryExist(ArrayList<Item> itemList) throws NewException {\n for (Item item : itemList) {\n if (!checkCategories.contains(item.getCategoryId())) {\n throw new NewException(\"ID\", item.getLine(), \"Item doesn't exist\");\n }\n }\n }",
"public static void loopCategories() throws IOException {\n //If all of the categories haven't been checked yet check the response at the current index (count).\n if (count < CATEGORY_ARRAY_SIZE) {\n //If that response if equal to TRUE (1).\n if (currentUser.getSingleCategory(count) == TRUE) {\n //Adjust the start index.\n startIndex = count * LOCATIONS_PER_CATEGORY;\n //Call the locaitons view.\n Main.FxmlLoader(LOCATIONS_PATH);\n }\n //Otherwise increment count and check the next index recursively.\n else {\n count++;\n loopCategories();\n }\n }\n }",
"public boolean isCat() {\r\n\t\tboolean isCat = false;\r\n\r\n\t\tif (numOfLeg == 4 && mammal == true && sound.equals(\"meow\")) {\r\n\r\n\t\t\tisCat = true;\r\n\t\t\t\r\n\t\t} else {\r\n\t\t\t\r\n\t\t\tisCat = false;\r\n\t\t}\r\n\r\n\t\treturn isCat;\r\n\t}",
"public boolean exist(Long cid) {\n\t\treturn categoryDao.exist(cid);\n\t}",
"public String getCategory();",
"public final boolean hasActorsSelected() {\n return (selectedActors.size() > 0);\n }",
"boolean applicable(Selection selection);",
"public boolean hasPageCategoryId() {\n return pageCategoryId_ != null;\n }",
"public String searchCategory()\n {\n logger.info(\"**** In searchCategory in Controller ****\");\n categoryList = categoryService.getCategories();\n return Constants.SEARCH_CATEGORY_VIEW;\n }",
"private Category getCategory()\n\t{\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tSystem.out.println(\"Choose category:\");\n\t\tint i = 1;\n\t\tfor(Category category : Category.values())\n\t\t{\n\t\t\tSystem.out.println(i + \": \"+category.getCategoryDescription());\n\t\t\ti++;\n\t\t}\n\t\tSystem.out.println(\"------------------------------------------------------------\");\n\t\tString userChoiceStr = scanner.nextLine();\n\t\tint userChoice;\n\t\ttry\n\t\t{\n\t\t\tuserChoice = Integer.parseInt(userChoiceStr);\n\t\t}\n\t\tcatch(NumberFormatException e)\n\t\t{\n\t\t\tSystem.out.println(\"Invalid input\");\n\t\t\treturn null;\n\t\t}\n\t\t\n\t\tif(userChoice<1 || userChoice>25)\n\t\t{\n//\t\t\tSystem.out.println(\"Invalid category code\");\n\t\t\treturn null;\n\t\t}\n\t\tCategory category;\n\t\tswitch (userChoice) \n\t\t{\n\t\t\tcase 1: category = Category.ARTS; break;\n\t\t\tcase 2: category = Category.AUTOMOTIVE; break;\n\t\t\tcase 3: category = Category.BABY; break;\n\t\t\tcase 4: category = Category.BEAUTY; break;\n\t\t\tcase 5: category = Category.BOOKS; break;\n\t\t\tcase 6: category = Category.COMPUTERS; break;\n\t\t\tcase 7: category = Category.CLOTHING;break;\n\t\t\tcase 8: category = Category.ELECTRONICS; break;\n\t\t\tcase 9: category = Category.FASHION; break;\n\t\t\tcase 10: category = Category.FINANCE; break;\n\t\t\tcase 11: category = Category.FOOD; break;\n\t\t\tcase 12: category = Category.HEALTH; break;\n\t\t\tcase 13: category = Category.HOME; break;\n\t\t\tcase 14: category = Category.LIFESTYLE; break;\n\t\t\tcase 15: category = Category.MOVIES; break;\n\t\t\tcase 16: category = Category.MUSIC; break;\n\t\t\tcase 17: category = Category.OUTDOORS; break;\n\t\t\tcase 18: category = Category.PETS; break;\n\t\t\tcase 19: category = Category.RESTAURANTS; break;\n\t\t\tcase 20: category = Category.SHOES; break;\n\t\t\tcase 21: category = Category.SOFTWARE; break;\n\t\t\tcase 22: category = Category.SPORTS; break;\n\t\t\tcase 23: category = Category.TOOLS; break;\n\t\t\tcase 24: category = Category.TRAVEL; break;\n\t\t\tcase 25: category = Category.VIDEOGAMES; break;\n\t\t\tdefault: category = null;System.out.println(\"No such category\"); break;\n\t\t}\n\t\treturn category;\n\t}",
"public int checkCategoryExists(int id) throws SQLException {\n \t\tString query = \"SELECT * FROM category WHERE category_id = ?\";\n \t\t\n \t\tResultSet rs = null;\n\t\tPreparedStatement pStatement = null;\n\t\ttry {\n\t\t\tpStatement = connection.prepareStatement(query);\n\t\t\tpStatement.setInt(1, id);\n\t\t\trs = pStatement.executeQuery();\n\t\t\tif (!rs.isBeforeFirst()) {\n\t\t\t\treturn -1;\n\t\t\t} else {\n\t\t\t\treturn 1;\n\t\t\t}\n\t\t} catch (SQLException e) {\n\t\t\tthrow new SQLException(\"Failed to check if category exists.\");\n\t\t}\n \t}",
"public void setCategory(String category){\n this.category = category;\n }",
"public Set<String> getCategory(){return category;}",
"public boolean hasPageCategoryDescription() {\n return pageCategoryDescriptionBuilder_ != null || pageCategoryDescription_ != null;\n }",
"private void defaultCategoryShouldNotBeFound(String filter) throws Exception {\n restCategoryMockMvc.perform(get(\"/api/categories?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(jsonPath(\"$\").isArray())\n .andExpect(jsonPath(\"$\").isEmpty());\n\n // Check, that the count call also returns 0\n restCategoryMockMvc.perform(get(\"/api/categories/count?sort=id,desc&\" + filter))\n .andExpect(status().isOk())\n .andExpect(content().contentType(MediaType.APPLICATION_JSON_VALUE))\n .andExpect(content().string(\"0\"));\n }",
"public static boolean checkOption(IStrategoTerm term) {\n switch(consName(term)) {\n case SOME_CONS:\n return term.getSubtermCount() == 1;\n case NONE_CONS:\n return term.getSubtermCount() == 0;\n default:\n return false;\n }\n }",
"@Test\n public void typeCategoriesTest() {\n final Category cardio = Category.CARDIO;\n final Category core = Category.CORE;\n final Category fullBody = Category.FULL_BODY;\n final Type endurance = Type.ENDURANCE;\n\n final List<Category> myCategories = new ArrayList<>();\n\n myCategories.add(cardio);\n myCategories.add(core);\n assertEquals(\"Categories of Endurance Type\", myCategories, endurance.getCategories());\n\n myCategories.add(fullBody);\n assertNotEquals(\"Not all the Categories are of Endurance Type\", myCategories, endurance.getCategories());\n\n }",
"public void category1() {\r\n\t\tmySelect1.click();\r\n\t}"
] | [
"0.74906844",
"0.6679956",
"0.6645606",
"0.6508485",
"0.6334521",
"0.6330047",
"0.6277703",
"0.6216938",
"0.6150446",
"0.60796446",
"0.603932",
"0.6033421",
"0.5965904",
"0.5934018",
"0.59277356",
"0.59057975",
"0.58935356",
"0.5861097",
"0.5846127",
"0.5846112",
"0.58074975",
"0.58065283",
"0.5803755",
"0.57672983",
"0.5766879",
"0.5726105",
"0.5724508",
"0.5714778",
"0.5696537",
"0.56816053",
"0.5679262",
"0.56777173",
"0.5658867",
"0.5655289",
"0.5646258",
"0.56379735",
"0.5636503",
"0.5635463",
"0.56331426",
"0.56196874",
"0.5615795",
"0.56155163",
"0.5610057",
"0.5594976",
"0.5588556",
"0.5585011",
"0.5582741",
"0.5582698",
"0.5569758",
"0.55671847",
"0.5533317",
"0.5532771",
"0.55161524",
"0.5482469",
"0.548166",
"0.5461568",
"0.5457801",
"0.54542845",
"0.5451483",
"0.54374176",
"0.5429645",
"0.5412338",
"0.5412052",
"0.54120004",
"0.54082036",
"0.54058135",
"0.54057056",
"0.537465",
"0.53743446",
"0.5362359",
"0.5346685",
"0.5346685",
"0.53453535",
"0.534488",
"0.53439987",
"0.5338245",
"0.53282785",
"0.53224033",
"0.53185153",
"0.5314798",
"0.5314322",
"0.531045",
"0.5302479",
"0.5296007",
"0.52955097",
"0.5294491",
"0.52911484",
"0.5280582",
"0.52765363",
"0.5275527",
"0.5271028",
"0.52709764",
"0.5261585",
"0.52561337",
"0.5247952",
"0.52427554",
"0.523861",
"0.52373546",
"0.5237197",
"0.52365226",
"0.52260447"
] | 0.0 | -1 |
Store in db in firebase | @Override
public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
myRef.updateChildren(allCategories, new DatabaseReference.CompletionListener() {
@Override
public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {
Gson gson = new Gson();
String subCategoriesJSON = gson.toJson(allCategories);
Log.d("pruebaJsonCat", subCategoriesJSON);
Log.d("pruebaJsonCat", category);
appPreferences.saveDataString(Utils.KEY_CATEGORY, category);
appPreferences.saveDataString(Utils.KEY_SUBCATEGORY, subCategoriesJSON);
startActivity(new Intent(ProfileActivity.this, TabsPublication.class)
.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_CLEAR_TASK | Intent.FLAG_ACTIVITY_NEW_TASK));
}
});
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void uploadUserDetailsToDatabase(String email, String password){\n User user = new User(email, password);\n FirebaseDatabase.getInstance().getReference(\"Users\").push()\n .setValue(user).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Log.i(\"details\", \"uploaded\");\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.i(\"details\", \"upload failed\");\n }\n });\n }",
"private void saveData(){\n databaseReference.setValue(new Teacher(0, \"\", 0.0));\n }",
"private void SaveUserToFirebase(FirebaseUser user)\n {\n\n }",
"void save_Online(String firebase_id){\n\n DatabaseReference records_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.records_ref));\n DatabaseReference all_users_ref =\n FirebaseDatabase.getInstance().getReference(getResources().getString(R.string.all_users));\n\n User_Class klinuser = common.userBundle(registration_bundle);\n\n if (klinuser != null){\n String cell_number = \"0\"+String.valueOf(klinuser.getNumber());\n records_ref.child(cell_number).child(\"uid\").setValue(klinuser.getFirebaseID());\n\n //save user details to All_Users/Biography/Uid\n all_users_ref.child(firebase_id).setValue(klinuser);\n loadBioData_online(firebase_id);\n }\n\n\n }",
"public static boolean FireBaseAddWord(String source,String target,String userId){\n\r\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\r\n DatabaseReference root = firebaseDatabase.getReference(\"words\").child(userId); // Firebase database table path.\r\n\r\n Map wordMap = new HashMap(); // Set word information in map\r\n\r\n wordMap.put(\"source\",source);\r\n wordMap.put(\"target\",target);\r\n wordMap.put(\"time\",ServerValue.TIMESTAMP);\r\n\r\n root.push().updateChildren(wordMap).addOnCompleteListener(new OnCompleteListener() {\r\n @Override\r\n public void onComplete(@NonNull Task task) { // Update Database\r\n if(task.isSuccessful()){\r\n setAddWordIsSuccessful(true);\r\n }else {\r\n setAddWordIsSuccessful(false);\r\n }\r\n }\r\n });\r\n\r\n\r\n return addWordIsSuccessful;\r\n\r\n\r\n }",
"private void uploadreferance(String myurl,String filename) {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"Upload\");\n\n\n hashMap.put(\"url\",myurl);\n hashMap.put(\"filename\",filename);\n\n\n\n myRef.push().setValue(hashMap);\n\n\n }",
"public void onSave(View w){\n\n //Timestamp in with customized format\n String timeStamp = new SimpleDateFormat(\"yyyy.MM.dd.HH.mm\").format(new Date());\n\n //Gets the dataBaseConnection\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n\n //Reference to the collection Entrys\n DocumentReference newNodeRef = db.collection(\"Entrys\").document();\n\n // Reads the data and put them in the ArrayList\n // Speed is rounded to prevent long numbers in the ResultActivity\n ResultEntry resultEntry = new ResultEntry(Math.round(averageSpeed * 1000) / 1000.0,\n averageAlt,\n distanceValue,\n timeStamp,\n newNodeRef.getId());\n\n Log.d(\"Result\",resultEntry.toString());\n\n // Writes the data in the Database\n newNodeRef.set(resultEntry).addOnCompleteListener(new OnCompleteListener<Void>() {\n /**\n * Writes data in the database Listener checks of success\n * Sends Toast to the User\n * If thre is a problem the user can try it again\n * Otherwise he is rooted to the Result Activity\n * with the new Entry at the Bottom of the ListView\n * @param task\n */\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"Added Entry\",Toast.LENGTH_LONG).show();\n Intent intent = new Intent(getApplicationContext(),ResultActivity.class);\n startActivity(intent);\n }else{\n Toast.makeText(getApplicationContext(),\"Insert failed\",Toast.LENGTH_LONG).show();\n }\n }\n });\n\n }",
"private void addOrderDB(){\n OrganiseOrder organiser = new OrganiseOrder();\n Order finalisedOrder = organiser.Organise(order);\n // Generate the order id\n String id = UUID.randomUUID().toString();\n // Set the name of the order to the generated id\n finalisedOrder.setName(id);\n\n // Get the firebase reference\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference().child(\"Orders\").child(id);\n\n // Update the order\n ref.setValue(finalisedOrder);\n }",
"private void iniciarFirebase(){\n FirebaseApp.initializeApp(getApplicationContext());\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n }",
"private void addMember(String firstName, String lastName, String emailId) {\n Log.e(\"AddMember\", \"Fn \" + firstName + \", Ln \" + lastName + \"eid \" + emailId);\n\n\n// myRef.setValue(\"Hello, World!\");\n String key = myRef.push().getKey();\n Log.e(\"AddMember\", \"key \" + key);\n\n CoreMember member = new CoreMember(firstName, lastName, emailId);\n myRef.child(key).setValue(member, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n if (databaseError != null) {\n System.out.println(\"Data could not be saved \" + databaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\" + databaseReference.toString());\n memberKey = databaseReference.getKey();\n hideInputForm(true);\n\n }\n }\n });\n }",
"public void addFine() {\n dbRef = FirebaseDatabase.getInstance().getReference().child(\"Fines\");\n// fineObj = new FinesDetails();\n\n fineObj.setDl(this.dlNo);\n fineObj.setName(this.oName);\n fineObj.setEmail((this.oEmail).trim());\n fineObj.setContact((this.oContact).trim());\n fineObj.setAddress((this.oAddress).trim());\n fineObj.setLocation((this.oLocation).trim());\n fineObj.setOfficerId((this.userName).trim());\n fineObj.setTotal(this.fineTotal);\n fineObj.setStatus((this.status).trim());\n fineObj.setRule((this.ruleArray_list));\n fineObj.setDateTime(this.dateTime);\n\n fineId = this.currentTimeMil + this.dlNo;\n\n dbRef.child(fineId).setValue(fineObj);\n\n Toast.makeText(getApplicationContext(), \" saved\", Toast.LENGTH_SHORT).show();\n\n }",
"public void saveStudentRegistrationDetails()\n {\n\n MyStudentRegistrationHandler refrence = new MyStudentRegistrationHandler(student_id,student_name,student_email,student_password);\n\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n DatabaseReference dr1 = firebaseDatabase.getReference(\"Student_Details\");\n dr1.child(student_id).child(\"Personal_Details\").setValue(refrence);\n Toast.makeText(this, \"Registration Successfull\", Toast.LENGTH_SHORT).show();\n student_name_et.setText(\"\");\n student_id_et.setText(\"\");\n student_password_et.setText(\"\");\n student_email_et.setText(\"\");\n\n }",
"private void sendGuideRegDataToFireBase(){\n }",
"private void addDatatoFirebase(String name, String phone, String address) {\n employeeInfo.setstartUpName(name);\n employeeInfo.setpotential(phone);\n employeeInfo.setbuildTime(address);\n String id = databaseReference.push().getKey();\n\n\n assert id != null;\n\n databaseReference.child(id).setValue(employeeInfo);\n\n\n\n\n\n // we are use add value event listener method\n // which is called with database reference.\n// databaseReference.addValueEventListener(new ValueEventListener() {\n// @Override\n// public void onDataChange(@NonNull DataSnapshot snapshot) {\n// // inside the method of on Data change we are setting\n// // our object class to our database reference.\n// // data base reference will sends data to firebase.\n// databaseReference.setValue(employeeInfo);\n//\n// // after adding this data we are showing toast message.\n// Toast.makeText(MainActivity.this, \"data added\", Toast.LENGTH_SHORT).show();\n// }\n//\n//\n// @Override\n// public void onCancelled(@NonNull DatabaseError error) {\n// // if the data is not added or it is cancelled then\n// // we are displaying a failure toast message.\n// Toast.makeText(MainActivity.this, \"Fail to add data \" + error, Toast.LENGTH_SHORT).show();\n// }\n// });\n }",
"public void doDataAddToDb() {\n String endScore = Integer.toString(pointsScore);\r\n String mLongestWordScore = Integer.toString(longestWordScore);\r\n String date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.US).format(new Date());\r\n Log.e(TAG, \"date\" + date);\r\n\r\n // creating a new user for the database\r\n User newUser = new User(userNameString, endScore, date, longestWord, mLongestWordScore); // creating a new user object to hold that data\r\n\r\n // add new node in database\r\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\r\n mDatabase.child(\"users\").child(userNameString).setValue(newUser);\r\n\r\n Log.e(TAG, \"pointsScore\" + pointsScore);\r\n Log.e(TAG, \"highestScore\" + highestScore);\r\n\r\n\r\n // if high score is achieved, send notification\r\n if (highestScore > pointsScore) {\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n sendMessageToNews();\r\n }\r\n }).start();\r\n }\r\n }",
"public void save(){\n DatabaseReference dbRef = DatabaseHelper.getDb().getReference().child(DatabaseVars.VouchersTable.VOUCHER_TABLE).child(getVoucherID());\n\n dbRef.setValue(this);\n }",
"public void firebaseAdd(HashMap hashMap){\n DatabaseReference myref = FirebaseDatabase.getInstance().getReference(hashMap.get(\"CafeId\").toString()).child(\"Menu\").child(hashMap.get(\"MenuKatagori\").toString()).child(hashMap.get(\"KatagoriId\").toString());\n myref.child(\"Fiyat\").setValue(hashMap.get(\"YeniDeger\").toString());\n\n\n }",
"private void saveStoreListChangesInDb() {\n if (currentUser != null) {\n final String userId = currentUser.getUid();\n firebaseDb.collection(userId)\n .document(shoppingListName)\n .update(\"stores\", storeList)\n .addOnFailureListener(e -> Toast.makeText(getApplicationContext(),\n R.string.Update_list_error_msg, Toast.LENGTH_SHORT)\n .show());\n }\n }",
"private void registrarVehiculo(String placa, String tipo, String color, String numdoc) {\n miVehiculo = new Vehiculo(placa,tipo,color, numdoc);\n\n showProgressDialog();\n\n //empresavehiculo\n //1. actualizar el reference, empresavehiculo\n //2. mDatabase.child(\"ruc\").child(\"placa\").setValue\n\n mDatabase.child(placa).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n //\n setmDatabase(getDatabase().getReference(\"empresasvehiculos\"));\n //\n mDatabase.child(GestorDatabase.getInstance(getApplicationContext()).obtenerValorUsuario(\"ruc\")).setValue(miVehiculo).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n hideProgressDialog();\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\"Se registro Correctamente...!\",Toast.LENGTH_LONG).show();\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n\n } else {\n Toast.makeText(getApplicationContext(), \"Error intente en otro momento...!\", Toast.LENGTH_LONG).show();\n }\n }\n });\n }",
"private void sendUserData() {\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n DatabaseReference myref = firebaseDatabase.getReference(Objects.requireNonNull(firebaseAuth.getUid()));\n UserProfile userProfile = new UserProfile(name, email, post, 0);\n myref.setValue(userProfile);\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }",
"private void addToRealDB(String GoogleId){\n this.newUser.setGOOGLE_ID(GoogleId);\n dbRootRef.child(USERS).child(this.newUser.getGOOGLE_ID()).setValue(this.newUser);\n dbRootRef.child(USERS_NOTES).child(this.newUser.getGOOGLE_ID()).child(\"numOfNotesInAllTime\").setValue(\"0\");\n }",
"public void registerClicked(View view) {\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n\n //Creates local variable for user input on each field\n String name = ((EditText) findViewById(R.id.first_name)).getText().toString().trim();\n String lName = ((EditText) findViewById(R.id.last_name)).getText().toString().trim();\n String mail = ((EditText) findViewById(R.id.email_address)).getText().toString().trim();\n String pass = ((EditText) findViewById(R.id.confirm_password)).getText().toString().trim();\n\n HashMap<String, String> dataMap = new HashMap<String, String>();\n dataMap.put(\"Name\", name);\n dataMap.put(\"Last Name\", lName);\n dataMap.put(\"Email\", mail);\n dataMap.put(\"Password\", pass);\n\n //Push Hash Object to root of Database\n //The on-complete listener makes sure the information was pushed\n //successfully to the database.\n mDatabase.push().setValue(dataMap).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(LogIn.this, \"Registered!\", Toast.LENGTH_LONG).show();\n }else {\n Toast.makeText(LogIn.this, \"Try Again\", Toast.LENGTH_LONG).show();\n }\n }\n });\n setContentView(R.layout.activity_log_in);\n setTypeFace();\n }",
"private void iniciarBaseDeDatos(){\n db_reference = FirebaseDatabase.getInstance().getReference();\n\n }",
"public interface DatabaseUtils {\n\n static boolean save(String path, Object object){\n FirebaseDatabase.getInstance()\n .getReference(path == null ? \"\" : path)\n .push()\n .setValue(object);\n return false;\n }\n\n boolean get();\n}",
"private void databaseUpload() {\n StorageReference reference;\n\n// Toast.makeText(NewBeneficiary2.this, \"\"+by.length, Toast.LENGTH_SHORT).show();\n\n reference = FirebaseStorage.getInstance().getReference().child(\"Applications/\").child(FirebaseAuth.getInstance().getUid() + \"_doc\");\n reference.putBytes(by).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n reference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n String generatedFilePath = uri.toString();\n NewBeneficiary1.applicationModel.setDocPic(generatedFilePath);\n\n FirebaseFirestore.getInstance().document(\"Applications/\"+FirebaseAuth.getInstance().getUid()+\"/\")\n .set(NewBeneficiary1.applicationModel)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n StatusModel statusModel = new StatusModel();\n statusModel.setStageName(\"Application Submitted\");\n statusModel.setTimestamp(Timestamp.now());\n FirebaseFirestore.getInstance().collection(\"Applications/\"+FirebaseAuth.getInstance().getUid()+\"/Statuses\")\n .document()\n .set(statusModel)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n Toast.makeText(NewBeneficiary2.this, \"Completed\", Toast.LENGTH_LONG).show();\n dialog.dismiss();\n startActivity(new Intent(NewBeneficiary2.this, MainActivity.class));\n }\n });\n }\n });\n\n }\n });\n }\n });\n\n }",
"private void Register(String mailSTR, String passwordSTR, String fNameSTR, String lNameSTR, String citySTR, String phoneNumberSTR) throws Exception {\n mAuth.createUserWithEmailAndPassword(mailSTR, passwordSTR)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n final Map<String, Object>[] dataToSave = new Map[]{new HashMap<String, Object>()};\n dataToSave[0].put(constants.FIRST_NAME, fNameSTR);\n dataToSave[0].put(constants.SEC_NAME, lNameSTR);\n dataToSave[0].put(constants.CITY, citySTR);\n dataToSave[0].put(constants.EMAIL, mailSTR);\n dataToSave[0].put(constants.PHONE, phoneNumberSTR);\n\n\n\n FirebaseDatabase.getInstance().getReference(constants.DOC_REF_USERS)\n //here we creating users folder in real time data baes , getting uid from user and storing the data in folder named by id\n .child(Objects.requireNonNull(FirebaseAuth.getInstance().getCurrentUser()).getUid())\n .setValue(dataToSave[0]).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(register3.this,\n R.string.register_toast_success, Toast.LENGTH_LONG).show();\n {//adds all new data for newely registered clients\n dayTime dtDEF = new dayTime(0, 0, 23, 59);//default for first time\n Gson gson = new Gson();\n SharedPreferences sp = getSharedPreferences(constants.SHARED_PREFS,\n Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n String dayDEF = gson.toJson(dtDEF);\n Map<String, String> docData = new HashMap<>();\n for (String day : constants.daysNames) {\n docData.put(day, dayDEF);\n editor.putString(day, dayDEF);\n }\n docData.put(constants.rangeChoice, \"\" + 10.0);\n editor.putFloat(constants.rangeChoice, (float) 10.0);\n\n docData.put(constants.SHARED_PREFS_LOCATION, constants.CITY);\n editor.putString(constants.SHARED_PREFS_LOCATION, constants.CITY);\n editor.putBoolean(\"sync\",true);\n FirebaseAuth userIdentifier = FirebaseAuth.getInstance();\n String UID = userIdentifier.getCurrentUser().getUid();\n DocumentReference DRF = FirebaseFirestore.getInstance()\n .document(constants.DOC_REF_USERS+\"/\" + UID);\n final boolean[] success = {true};\n final Exception[] failToRet = new Exception[1];\n DRF.set(docData).addOnFailureListener(e -> {\n success[0] = false;\n failToRet[0] = e;\n });\n if (!success[0]) {\n // show/make log for case of failure\n }\n editor.apply();\n\n }\n }\n });\n\n\n }\n\n }).addOnFailureListener(e -> {\n try {\n throw new Exception(constants.FAILED_REGISTER);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n\n\n }",
"private void writeAndReadFromDatabase() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n DatabaseReference locationRef = database.getReference(\"Emerald Location\");\n\n myRef.setValue(\"Yay this is working!!!\");\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(\"Amy\", \"Failed to read value.\", error.toException());\n }\n });\n }",
"private void saveUserInformation() {\n String name = editTextName.getText().toString().trim();\n String add = editTextAddress.getText().toString().trim();\n\n //creating a userinformation object\n UserInformation userInformation = new UserInformation(name, add);\n\n //getting the current logged in user\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n //saving data to firebase database\n /*\n * first we are creating a new child in firebase with the\n * unique id of logged in user\n * and then for that user under the unique id we are saving data\n * for saving data we are using setvalue method this method takes a normal java object\n * */\n databaseReference.child(user.getUid()).setValue(userInformation);\n\n //displaying a success toast\n Toast.makeText(this, \"Information Saved...\", Toast.LENGTH_LONG).show();\n }",
"private void Register(String mailSTR, String passwordSTR, String fNameSTR, String lNameSTR, String citySTR, String phoneNumberSTR) throws Exception {\n mAuth.createUserWithEmailAndPassword(mailSTR, passwordSTR)\n .addOnCompleteListener(task -> {\n if (task.isSuccessful()) {\n final Map<String, Object>[] dataToSave = new Map[]{new HashMap<String, Object>()};\n dataToSave[0].put(constants.FIRST_NAME, fNameSTR);\n dataToSave[0].put(constants.SEC_NAME, lNameSTR);\n dataToSave[0].put(constants.CITY, citySTR);\n dataToSave[0].put(constants.EMAIL, mailSTR);\n dataToSave[0].put(constants.PHONE, phoneNumberSTR);\n dataToSave[0].put(constants.VOLUNTEER, \"false\");\n\n\n FirebaseDatabase.getInstance().getReference(constants.DOC_REF_USERS)\n //here we creating users folder in real time data baes , getting uid from user and storing the data in folder named by id\n .child(Objects.requireNonNull(FirebaseAuth.getInstance().getCurrentUser()).getUid())\n .setValue(dataToSave[0]).addOnCompleteListener(task1 -> {\n if (task1.isSuccessful()) {\n Toast.makeText(register2.this,\n R.string.register_toast_success, Toast.LENGTH_LONG).show();\n {//adds all new data for newely registered clients\n dayTime dtDEF = new dayTime(0, 0, 23, 59);//default for first time\n Gson gson = new Gson();\n SharedPreferences sp = getSharedPreferences(constants.SHARED_PREFS,\n Context.MODE_PRIVATE);\n SharedPreferences.Editor editor = sp.edit();\n String dayDEF = gson.toJson(dtDEF);\n Map<String, String> docData = new HashMap<>();\n for (String day : constants.daysNames) {\n docData.put(day, dayDEF);\n editor.putString(day, dayDEF);\n }\n docData.put(constants.rangeChoice, \"\" + 10.0);\n editor.putFloat(constants.rangeChoice, (float) 10.0);\n\n docData.put(constants.SHARED_PREFS_LOCATION, constants.SET_CITY);\n editor.putString(constants.SHARED_PREFS_LOCATION, constants.SET_CITY);\n\n FirebaseAuth userIdentifier = FirebaseAuth.getInstance();\n String UID = userIdentifier.getCurrentUser().getUid();\n DocumentReference DRF = FirebaseFirestore.getInstance()\n .document(constants.DOC_REF_USERS+\"/\" + UID);\n final boolean[] success = {true};\n final Exception[] failToRet = new Exception[1];\n DRF.set(docData).addOnFailureListener(e -> {\n success[0] = false;\n failToRet[0] = e;\n });\n if (!success[0]) {\n // show/make log for case of failure\n }\n editor.apply();\n\n }\n }\n });\n\n\n }\n\n }).addOnFailureListener(e -> {\n try {\n throw new Exception(constants.FAILED_REGISTER);\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n });\n\n\n }",
"@Override\n public void onSuccess(AuthResult authResult) {\n Demo_User demo_user = new Demo_User();\n demo_user.setEmail(editEmail.getText().toString());\n demo_user.setPassword(editPassword.getText().toString());\n demo_user.setName(editName.getText().toString());\n demo_user.setPhone(editPhone.getText().toString());\n\n //user email to key\n users.child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(demo_user)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Snackbar.make(rootLayout,\"Register success fully\",Snackbar.LENGTH_LONG).show();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Snackbar.make(rootLayout,\"Failed\" + e.getMessage(),Snackbar.LENGTH_LONG).show();\n }\n });\n }",
"private void saveing_data_firebase(String recodfile) {\r\n\r\n Uri uri = Uri.fromFile(new File(recodfile));\r\n Mprogress.setTitle(\"Please wait ...\");\r\n Mprogress.setMessage(\"wait for a moment your voice is uploading\");\r\n Mprogress.setCanceledOnTouchOutside(false);\r\n Mprogress.show();\r\n\r\n StorageReference filepath = audiofile.child(uri.getLastPathSegment());\r\n filepath.putFile(uri)\r\n .addOnCompleteListener(new OnCompleteListener<UploadTask.TaskSnapshot>() {\r\n @Override\r\n public void onComplete(@NonNull Task<UploadTask.TaskSnapshot> task) {\r\n if (task.isSuccessful()) {\r\n\r\n String audiouri = task.getResult().getDownloadUrl().toString();\r\n\r\n Calendar calendar_time = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_time = new SimpleDateFormat(DataManager.TimePattern);\r\n CurrentTime = simpleDateFormat_time.format(calendar_time.getTime());\r\n\r\n Calendar calendar_date = Calendar.getInstance();\r\n SimpleDateFormat simpleDateFormat_date = new SimpleDateFormat(DataManager.DatePattern);\r\n CurrentDate = simpleDateFormat_date.format(calendar_date.getTime());\r\n\r\n DatabaseReference NewNode = FirebaseDatabase.getInstance().getReference().child(\"GlobalChat\").push();\r\n\r\n String push_id = NewNode.getKey();\r\n\r\n\r\n Map<String, Object> globalmap = new HashMap<String, Object>();\r\n globalmap.put(\"message\", audiouri);\r\n globalmap.put(\"name\", Currentuser_name);\r\n globalmap.put(\"time\", CurrentTime);\r\n globalmap.put(\"date\", CurrentDate);\r\n globalmap.put(\"type\", \"Audio\");\r\n globalmap.put(\"MessageKey\", push_id);\r\n globalmap.put(\"MyID\", FirebaseAuth.getInstance().getCurrentUser().getUid());\r\n globalmap.put(\"Uri\", current_image_uri);\r\n globalmap.put(DataManager.UserNameSerach, Currentuser_name.toLowerCase());\r\n\r\n NewNode.updateChildren(globalmap)\r\n .addOnCompleteListener(new OnCompleteListener<Void>() {\r\n @Override\r\n public void onComplete(@NonNull Task<Void> task) {\r\n if (task.isSuccessful()) {\r\n\r\n fine_user_send_audio_notifaction();\r\n Mprogress.dismiss();\r\n } else {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), task.getException().getMessage(), Toast.LENGTH_SHORT).show();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n Mprogress.dismiss();\r\n Toast.makeText(getActivity(), e.getMessage().toString(), Toast.LENGTH_SHORT).show();\r\n }\r\n });\r\n\r\n } else {\r\n\r\n Mprogress.dismiss();\r\n }\r\n }\r\n })\r\n .addOnFailureListener(new OnFailureListener() {\r\n @Override\r\n public void onFailure(@NonNull Exception e) {\r\n\r\n Mprogress.dismiss();\r\n }\r\n });\r\n }",
"@Override\n public void onClick(View v) {\n dbRefUsers.child(cleanEmail).child(\"businesses\").push().setValue(b);\n\n // Add business to savedBusinesses\n Singleton.get(getApplicationContext()).addSavedBusiness(b);\n // Send Toast\n Toast.makeText(getApplicationContext(), getResources().getString(R.string.message_save_search),\n Toast.LENGTH_SHORT).show();\n\n }",
"private void saveDetails() {\n //get the editted data\n String name = m_ChangeName.getText().toString();\n final String age = m_ChangeAge.getText().toString();\n final String bio = m_ChangeBio.getText().toString();\n\n //get the image from the image view\n final Bitmap img = ((BitmapDrawable) m_ProfilePic.getDrawable()).getBitmap();\n\n //get a reference to firebase database\n final DatabaseReference ref = FirebaseDatabase.getInstance().getReference();\n\n //get the current logged in user\n final FirebaseUser fUser = FirebaseAuth.getInstance().getCurrentUser();\n\n // add the new name of the user\n ref.child(\"user\").child(fUser.getUid()).child(\"name\").setValue(name);\n\n // when the name is updated, update the other relevant info\n ref.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // update the age and bio\n ref.child(\"user\").child(fUser.getUid()).child(\"age\").setValue(age);\n ref.child(\"user\").child(fUser.getUid()).child(\"bio\").setValue(bio);\n //object to convert image to byte array for storage on firebase\n ByteArrayOutputStream imgConverted = new ByteArrayOutputStream();\n\n //save the image as a .jpg file\n img.compress(Bitmap.CompressFormat.JPEG, 100, imgConverted);\n\n String imageEncoded = Base64.encodeToString(imgConverted.toByteArray(), Base64.DEFAULT);\n ref.child(\"user\").child(fUser.getUid()).child(\"image\").setValue(imageEncoded);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n //display error if any occur\n Toasty.error(m_context, \"Error\" + databaseError, Toast.LENGTH_SHORT).show();\n }\n });\n\n }",
"private void initFirebase() {\n FirebaseApp.initializeApp(this);\n firebaseDatabase = FirebaseDatabase.getInstance();\n databaseReference = firebaseDatabase.getReference();\n storageReference = FirebaseStorage.getInstance().getReference();\n }",
"public void saveToDB() {\n \twipeDB();\n\t\tSQLiteDatabase db = nodeData.getReadableDatabase();\n\t\tContentValues values = new ContentValues();\n\t\tfor (int i = 0; i < wallpapers.size(); i++) {\n\t\t\tvalues.put(EventDataSQLHelper.NODE, nodeToString(wallpapers.get(i)));\n\t\t\ttry {\t\t\t\t\n\t\t\t\tdb.insertOrThrow(EventDataSQLHelper.TABLE, null, values);\n\t\t\t\tLog.d(\"AddToDB\", nodeToString(wallpapers.get(i)));\n\t\t\t} catch (SQLException e) {\n\t\t\t\tLog.d(\"AddToDB\", \"\" + e.getMessage());\n\t\t\t}\n\t\t}\n\t\tdb.close();\n }",
"private void SaveVisitors() {\n\n if(deceasedKey!=null)\n {\n @SuppressLint(\"SimpleDateFormat\") DateFormat df = new SimpleDateFormat(\"EEE, d MMM yyyy, HH:mm\");\n date = df.format(Calendar.getInstance().getTime());\n\n reference=database.getReference(\"Deceaceds\").child(deceasedKey).child(\"Visitors\");\n reference.addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n final Map<String,String> newMap= new HashMap<>();\n newMap.put(\"Date\", date + \" \"+\"Tarihinde \" + VisitorName + \" \" + VisitorSurname+\" \"+Fullname+\" profilini ziyaret etti\");\n String VisitorKey = reference.push().getKey();\n reference.child(VisitorKey).setValue(newMap);\n\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n\n }\n\n }",
"public void onAccountCreate()\n {\n //Object ne=new Object();\n Log.d(\"stupid\", \"onAccountCreate: \");\n fName=firstName.getText().toString();\n lName=lastName.getText().toString();\n con=contact.getText().toString();\n addr=address.getText().toString();\n bGrp=bloodGroup.getText().toString();\n\n mRef2 = FirebaseDatabase.getInstance().getReference().child(\"donordata\").getRef();\n\n Map<String,Object> donorMap=new HashMap<String, Object>();\n Map<String,Object> x= new HashMap<String, Object>();\n\n\n String id= mRef2.push().getKey();\n Log.d(\"keyTAG\", \"onAccountCreate: \"+mRef2.push().getKey());\n x.put(\"id\",id);\n x.put(\"firstname\", fName);\n x.put(\"lastname\", lName);\n x.put(\"address\", addr);\n x.put(\"bloodgroup\", bGrp);\n x.put(\"contact\", con);\n\n\n\n donorMap.put(fName,x);\n\n mRef2.updateChildren(donorMap);\n Toast.makeText(BloodDonorsActivity.this,\"Your account has been successfully created. Thank you!\",Toast.LENGTH_LONG).show();\n Intent backToLogin=new Intent(BloodDonorsActivity.this,LoginActivity.class);\n startActivity(backToLogin);\n\n\n //mRef2.setValue(donorMap);\n\n\n\n //Toast.makeText(BloodDonorsActivity.this, \"Your details are not valid!\", Toast.LENGTH_LONG).show();\n\n\n\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Log.d(\"upload\", \"uploadFromUri:onSuccess\");\n mDownloadUrl = taskSnapshot.getMetadata().getDownloadUrl();\n recommendation.setPhotoUrl(mDownloadUrl.toString());\n String recKey = mDatabase.child(\"users\").child(getUid()).child(\"recommendations\").push().getKey();\n mDatabase.child(\"recommendations\").child(recKey).setValue(recommendation);\n Log.d(\"locationID is\", locationId);\n Log.d(\"restaurantID is\", restaurantId);\n mDatabase.child(\"location\").child(\"Singapore\").child(locationId)\n .child(\"restaurantMap\").child(restaurantId)\n .child(\"recommendationsMap\").child(recKey).setValue(recommendation);\n mDatabase.child(\"restaurants\").child(\"Singapore\").child(restaurantId)\n .child(\"recommendationsMap\").child(recKey).setValue(recommendation);\n //recommendation.key = key;/*\n }",
"public void triggerRoomsOnce() throws Exception{\n Firebase roomsNodeRef = fire_db.child(\"ChatRoomNode\");\n Firebase newNodeRef = null;\n if(acceptKey == null){\n newNodeRef = roomsNodeRef.push();\n acceptKey = newNodeRef.getKey();\n }else{\n newNodeRef = roomsNodeRef.child(acceptKey);\n }\n // Firebase newNodeRef = roomsNodeRef.push();\n try {\n newNodeRef.setValue(\"accept\",new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n Log.d(\"triggerRoomsOnce\",\"onComplete Data could not be saved. \" + firebaseError.getMessage());\n } else {\n Log.d(\"triggerRoomsOnce\",\" onComplete Data saved successfully.\");\n }\n }\n });\n\n }catch (Exception exc){\n throw new Exception(\"Something failed.\", new Throwable(String.valueOf(Exception.class)));\n }\n\n\n /* triggerRoomsOnceRef.setValue(\"accepted\");*//*, new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n triggerRoomsOnceRef.removeEventListener();\n System.out.println(\"Data could not be saved. \" + firebaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\");\n }\n }\n });*//*\n*/\n\n }",
"@Override\n public void onClick(View v) {\n\n String Id = FCMdatabase.push().getKey();\n residentUser user = new residentUser(Id.toString(), txtusername.getText().toString(), txtpassword.getText().toString(), \"\");\n FCMdatabase.child(Id).setValue(user);\n Toast.makeText(getContext(), \"user added successfully\", Toast.LENGTH_SHORT).show();\n }",
"@SuppressLint(\"StringFormatMatches\")\n @Override\n public void onSuccess(Uri uri) {\n String id= databaseCars.push().getKey();\n Produit prod = new Produit(id,uri.toString(), nomfourni.getText().toString(), label.getText().toString(), prix.getText().toString(),qte.getText().toString());\n String prodId=root.push().getKey();\n root.child(prodId).setValue(prod);\n databaseCars.child(\"Produit\").child(id).setValue(prod);\n Toast.makeText(GestionProduit.this, \"Produit added\", Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onSuccess(AuthResult authResult) {\n User user = new User();\n user.setEmail(edtMail.getText().toString());\n user.setPassword(edtPassword.getText().toString());\n user.setName(edtName.getText().toString());\n user.setPhone(edtPhone.getText().toString());\n Log.d(\"RRR\", \"OKET\" + user);\n\n users.child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void unused) {\n Snackbar.make(rootLayout, \"Register success\", Snackbar.LENGTH_SHORT)\n .show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Snackbar.make(rootLayout, \"Failed\" + e.getMessage(), Snackbar.LENGTH_SHORT)\n .show();\n }\n });\n }",
"private void initFirebase() {\n database = FirebaseDatabase.getInstance();\n user = FirebaseAuth.getInstance().getCurrentUser();\n dRef = database.getReference(\"Trails\");\n }",
"public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n @SuppressWarnings(\"VisibleForTests\")\n Uri downloadUrI = taskSnapshot.getDownloadUrl();\n FirebasePost firebasePost = new FirebasePost();\n firebasePost.imageUrl = downloadUrI.toString();\n myImage.child(\"home\").setValue(firebasePost);\n\n\n }",
"public void addToFavorites(View view) {\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n mDatabase = db.getReference(\"favorites\").child(uid);\n\n ValueEventListener postListener = new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n favorites = dataSnapshot.getValue(Favorites.class);\n favorites.addVolume(currentVolume.getTitle(), currentVolume.getId());\n addToDatabase(favorites);\n Intent intent = new Intent(VolumeActivity.this, FavoritesActivity.class);\n startActivity(intent);\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n // Getting Post failed, log a message\n Log.w(\"FavoritesActivity\", \"loadPost:onCancelled\", databaseError.toException());\n // ...\n }\n\n };\n mDatabase.addListenerForSingleValueEvent(postListener);\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n ref.child(\"user\").child(fUser.getUid()).child(\"age\").setValue(age);\n ref.child(\"user\").child(fUser.getUid()).child(\"bio\").setValue(bio);\n //object to convert image to byte array for storage on firebase\n ByteArrayOutputStream imgConverted = new ByteArrayOutputStream();\n\n //save the image as a .jpg file\n img.compress(Bitmap.CompressFormat.JPEG, 100, imgConverted);\n\n String imageEncoded = Base64.encodeToString(imgConverted.toByteArray(), Base64.DEFAULT);\n ref.child(\"user\").child(fUser.getUid()).child(\"image\").setValue(imageEncoded);\n }",
"public void dataAddAppInstance() {\n String endScore = Integer.toString(pointsScore);\r\n String mLongestWordScore = Integer.toString(longestWordScore);\r\n String date = new SimpleDateFormat(\"yyyy-MM-dd HH:mm\", Locale.US).format(new Date());\r\n\r\n // creating a new user for the database\r\n User newUser = new User(userNameString, endScore, date, longestWord, mLongestWordScore); // creating a new user object to hold that data\r\n\r\n // add new node in database\r\n DatabaseReference mDatabase = FirebaseDatabase.getInstance().getReference();\r\n mDatabase.child(token).child(userNameString).setValue(newUser);\r\n\r\n // get this device's all time high score for comparison\r\n int highScore = getInt();\r\n\r\n // if high score is achieved, send notification\r\n if ( pointsScore > highScore) {\r\n setInt(\"high score\", pointsScore);\r\n new Thread(new Runnable() {\r\n @Override\r\n public void run() {\r\n sendMessageToNews();\r\n }\r\n }).start();\r\n }\r\n }",
"private void CreateUser(){\n String uid = currUser.getUid();\n Map<String, Object> userMap = new HashMap<>();\n\n //add the user details to the userMap\n userMap.put(\"car-make\", \"\");\n userMap.put(\"firstname\", \"firstname\");\n userMap.put(\"lastname\", \"lastname\");\n userMap.put(\"registration-no\", \"\");\n userMap.put(\"seats-no\", 0);\n userMap.put(\"user-email\", currUser.getEmail());\n userMap.put(\"user-id\", currUser.getUid());\n userMap.put(\"p-ride\", null);\n userMap.put(\"d-ride\", null);\n userMap.put(\"latitude\", null);\n userMap.put(\"longitude\", null);\n userMap.put(\"rating\", -1);\n userMap.put(\"amountOfRatings\", 0);\n userMap.put(\"ride-price\", null);\n\n //set the details into the database\n dataStore.collection(\"users\").document(uid)\n .set(userMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void v) {\n Log.d(TAG, \"User was added to the db\");\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(TAG, \"Exception: \", e);\n }\n });\n }",
"public void addAccount() {\n\n String path = addPhotoToFirebase();\n // Rescue.currentRescue.setImageStorageReference(addPhotoToFirebase());\n\n\n DocumentReference newDoc = MainActivity.firestore.collection(\"rescue\").document();\n\n Map<String, Object> newRescue = new HashMap<>();\n newRescue.put(\"city\", city);\n newRescue.put(\"email\", email);\n newRescue.put(\"organization\", name);\n newRescue.put(\"state\", state);\n newRescue.put(\"street\", street);\n newRescue.put(\"username\", username);\n newRescue.put(\"zip\", zip);\n newRescue.put(\"image\", path);\n newRescue.put(\"rescueID\", newDoc.getId());\n\n newDoc.set(newRescue);\n\n\n Map<String, Object> newAccount = new HashMap<>();\n newAccount.put(\"username\", username);\n newAccount.put(\"password\", Account.getMD5(password));\n newAccount.put(\"isAdopter\", false);\n\n\n MainActivity.firestore.collection(\"account\").document(username)\n .set(newAccount);\n\n\n Rescue.currentRescue =\n new Rescue(bitmap, name, street, city, state, zip, email, path);\n Rescue.currentRescue.setRescueID(newDoc.getId());\n Rescue.currentRescue.setUsername(username);\n Account.currentAccount = new Account(username, password, false);\n\n }",
"public RecipeDatabase() {\n\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference AllRecipeRef = database.getReference(\"allRecipes\");\n DatabaseReference newRecipeRef = AllRecipeRef.push();\n newRecipeRef.setValue(new Recipe(\"Pizza\", 1.0, \"gn_logo\", \"Italian\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Sushi Rolls\", 2.0, \"mkp_logo\", \"Japanese\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Crepe\", 3.5, \"mt_logo\", \"French\", \"5\", \"instr\", \"ingredients\"));\n AllRecipeRef.push().setValue(new Recipe(\"Baked Salmon\", 0, \"pb_logo\", \"American\", \"5\", \"1. prep ingredients\\n2.cook food\\n3.eat your food\", \"ingredients1 ingredient 2 ingredient3\"));\n }",
"private void saveRegistry(String downloadUri){\n try {\n model.setBrand(spBrandMoto.getSelectedItem().toString());\n model.setYear(spYearMoto.getSelectedItem().toString());\n model.setDateLost(tvDateLost.getText().toString());\n model.setMotoUri(downloadUri);\n\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n\n Map<String, Object> user = new HashMap<>();\n user.put(\"Brand\", model.getBrand());\n user.put(\"Year\", model.getYear());\n user.put(\"date\", model.getDateLost());\n user.put(\"latitude\", model.getLatitude());\n user.put(\"longitude\", model.getLongitude());\n user.put(\"motoUri\", model.getMotoUri());\n\n db.collection(\"users\")\n .add(user)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n Toast.makeText(NewReportActivity.this, \"Successfully\", Toast.LENGTH_SHORT).show();\n NewReportActivity.this.finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Constant.showMessage(\"Exception\", e.getMessage(), NewReportActivity.this);\n }\n });\n }catch (Exception ex){\n Constant.showMessage(\"Exception\", ex.getMessage(), this);\n }\n }",
"private void readAndSAVE(){\n boolean vaidation_status = true;\n\n achiv_title = edtxt_achiv_title.getText().toString();\n if (TextUtils.isEmpty(achiv_title)){\n edtxt_achiv_title.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_title.setError(null);\n }\n\n achiv_date = edtxt_achiv_date.getText().toString();\n if (TextUtils.isEmpty(achiv_date)){\n edtxt_achiv_date.setError(\"Please enter valid details !!\");\n vaidation_status = false;\n } else {\n edtxt_achiv_date.setError(null);\n }\n\n\n\n achiv_details = edtxt_achiv_details.getText().toString();\n if(achiv_details.isEmpty()){\n vaidation_status = false;\n edtxt_achiv_details.setText(\"Please write Details!!\");\n }\n\n // if all vaidation is true then add all details into firbase database\n if(vaidation_status){\n\n //create Details model\n AchivmentsDetails addNewAchiv = new AchivmentsDetails();\n\n addNewAchiv.setAchv_titles(achiv_title);\n addNewAchiv.setAchv_date(achiv_date);\n addNewAchiv.setAchv_details(achiv_details);\n\n showProgressDialog();\n\n if(mAuth.getCurrentUser()!=null)\n {\n //CHECK IF new achivments has been added or update process.\n String achiv_key;\n if(operationStatus.equals(\"ADD_NEW\")) {\n\n // Get new push key\n achiv_key = mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").push().getKey();\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n\n } else {\n achiv_key = operationStatus;\n addNewAchiv.setAchv_firbase_ID(achiv_key);\n }\n\n // save the user at UserNode under user UID\n mDatabase.child(\"UserNode\").child(mAuth.getCurrentUser().getUid()).child(\"Achivments_Info\").child(achiv_key).setValue(addNewAchiv, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference) {\n\n hideProgressDialog();\n\n if(databaseError==null)\n {\n Toast.makeText(AddNewAchivmentsActivity.this, \"Your Details has been saved !!\",\n Toast.LENGTH_SHORT).show();\n finish();\n }\n }\n });\n }\n\n\n\n }\n }",
"@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.activity_add_new_member);\n myDb = new DatabaseHelper(this);\n// member = new Member();\n// databaseMembers = FirebaseDatabase.getInstance().getReference();\n\n reg = (Button) findViewById(R.id.reg);\n view = (Button) findViewById(R.id.button1);\n name = (EditText) findViewById(R.id.name);\n nic = (EditText) findViewById(R.id.nic);\n mobile = (EditText) findViewById(R.id.mobile);\n// if (name != null && nic != null && mobile != null) {\n// reg.setOnClickListener(new View.OnClickListener() {\n// @Override\n// public void onClick(View v) {\n// writeNewMember(\"001\",\"Thamal\", \"971152265V\", \"0712963564\");\n// member.setMemberName(name.getText().toString().trim());\n// member.setMemberNic(nic.getText().toString().trim());\n// member.setMemberMob(mobile.getText().toString().trim());\n// databaseMembers.push().setValue(member);\n// Toast.makeText(AddNewMember.this,\"Data inserted successfully !\", Toast.LENGTH_LONG).show();\n\n// addMember();\n//\n// }\n// });\n// }\n reg.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n if(name.length() == 0){\n Toast.makeText(AddNewMember.this, \"Enter a Name !\", Toast.LENGTH_LONG).show();\n }else if (nic.length() == 0){\n Toast.makeText(AddNewMember.this, \"Enter the NIC !\", Toast.LENGTH_LONG).show();\n }else if (mobile.length() == 0){\n Toast.makeText(AddNewMember.this, \"Enter the Mobile !\", Toast.LENGTH_LONG).show();\n }else {\n boolean isInserted = myDb.insertMember(name.getText().toString(), nic.getText().toString(), mobile.getText().toString());\n name.setText(\"\");\n nic.setText(\"\");\n mobile.setText(\"\");\n if (isInserted == true) {\n Toast.makeText(AddNewMember.this, \"Data inserted successfully\", Toast.LENGTH_LONG).show();\n } else {\n Toast.makeText(AddNewMember.this, \"Data insertion failed\", Toast.LENGTH_LONG).show();\n }\n }\n }\n }\n );\n\n view.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n openViewMembers();\n }\n });\n\n }",
"public static void signUp(final String email, String password, final String fullName, final String pictureUrl, final Activity activity) {\n Statics.auth.createUserWithEmailAndPassword(email, password)\n .addOnSuccessListener(new OnSuccessListener<AuthResult>() {\n @Override\n public void onSuccess(AuthResult authResult) {\n // add user to database\n Log.d(\"Test\",\"Facebook to firebase success\");\n User userToAdd = new User();\n userToAdd.setEmailAddress(email);\n String[] splited = fullName.split(\"\\\\s+\");\n userToAdd.setFirstName(splited[0]);\n userToAdd.setLastName(splited[1]);\n userToAdd.setPictureUrl(pictureUrl);\n usersTable.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).setValue(userToAdd).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"Failure\",e.getMessage());\n }\n });\n Toast.makeText(activity, \"added to database \", Toast.LENGTH_LONG).show();\n }\n }).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(\"Test\",\"Facebook ato firebase success\");\n\n }\n });\n }",
"private void registerUser() {\n\n // Store values at the time of the login attempt.\n String username = mUsernameView.getText().toString();\n String email = mEmailView.getText().toString();\n String password = mPasswordView.getText().toString();\n String firstName = mFirstNameView.getText().toString();\n String lastName = mLastNameView.getText().toString();\n String dob = mDoBView.getText().toString();\n double height = Double.parseDouble(mHeightView.getText().toString());\n double weight = Double.parseDouble(mWeightView.getText().toString());\n String gender = mGenderView.getSelectedItem().toString();\n String role;\n\n //if role switch is in \"on\" position\n if (mRoleView.isChecked())\n {\n role = mRoleView.getTextOn().toString();\n }\n\n //if role switch is in \"off\" position\n else\n {\n role = mRoleView.getTextOff().toString();\n }\n\n\n\n //check if insertion is successful or not\n DatabaseReference.CompletionListener insertListener = new DatabaseReference.CompletionListener()\n {\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference usersRef)\n {\n\n\n if (databaseError != null)\n {\n Log.d(\"test\", \"failed insertion\");\n\n //Failed insertion\n }\n\n else\n {\n //Successful insertion, return to main activity\n finish();\n }\n\n }\n };\n\n //create user object, push into database\n\n\n\n if (role.equals(\"Coach\"))\n {\n Coach newUser = new Coach(username, email, password, firstName, lastName, dob, height, weight, gender, role);\n appState.userRef.child(\"coaches\").child(username).setValue(newUser, insertListener);\n\n }\n\n else if (role.equals(\"Athlete\"))\n {\n Athlete newUser = new Athlete(username, email, password, firstName, lastName, dob, height, weight, gender, role);\n appState.userRef.child(\"athletes\").child(username).setValue(newUser, insertListener);\n\n }\n\n\n }",
"@Override\n public void onSuccess(AuthResult authResult) {\n Log.d(\"Test\",\"Facebook to firebase success\");\n User userToAdd = new User();\n userToAdd.setEmailAddress(email);\n String[] splited = fullName.split(\"\\\\s+\");\n userToAdd.setFirstName(splited[0]);\n userToAdd.setLastName(splited[1]);\n userToAdd.setPictureUrl(pictureUrl);\n usersTable.child(FirebaseAuth.getInstance().getCurrentUser().getUid()).setValue(userToAdd).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"Failure\",e.getMessage());\n }\n });\n Toast.makeText(activity, \"added to database \", Toast.LENGTH_LONG).show();\n }",
"@Override\n public void onSuccess(AuthResult authResult) {\n Users user = new Users();\n user.setEmail(inputEmail.getText().toString());\n user.setName(inputName.getText().toString());\n user.setPhone(inputPhoneNumber.getText().toString());\n user.setPassword(inputPassword.getText().toString());\n\n users.child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .setValue(user)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Snackbar.make(relativeLayoutsignup,\"SignUp Successfully\",Snackbar.LENGTH_SHORT)\n .show();\n\n startActivity(new Intent(SignUpActivity.this,SignInActivity.class));\n finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Snackbar.make(relativeLayoutsignup,\"Failed\"+e.getMessage(),Snackbar.LENGTH_SHORT)\n .show();\n }\n });\n }",
"@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n setContentView(R.layout.save_activity);\n\n fullname = (EditText)findViewById(R.id.fullname);\n uni = (EditText)findViewById(R.id.uni);\n save = (Button)findViewById(R.id.save);\n\n mAuth = FirebaseAuth.getInstance();\n database = FirebaseDatabase.getInstance(); // get database\n // db =(TextView) findViewById(R.id.db);\n\n FirebaseUser users = mAuth.getCurrentUser(); // current signed in user\n userId = users.getUid(); // Id of signed in user\n myRef= database.getReference(); //A reference to databse\n\n mAuthListener = new FirebaseAuth.AuthStateListener() { //It is auth listner means user signed in and then quite app and again resumem then he will remain signed in.\n @Override\n public void onAuthStateChanged(@NonNull FirebaseAuth firebaseAuth) {\n FirebaseUser user = firebaseAuth.getCurrentUser();\n if (user != null) {\n // User is signed in\n // Log.d(TAG, \"onAuthStateChanged:signed_in:\" + user.getUid());\n // toastMessage(\"Successfully signed in with: \" + user.getEmail());\n } else {\n // User is signed out\n // Log.d(TAG, \"onAuthStateChanged:signed_out\");\n // toastMessage(\"Successfully signed out.\");\n }\n // ...\n }\n };\n\n save.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n String fname = fullname.getText().toString();\n String Uni = uni.getText().toString();\n User u = new User(fname,Uni);\n if(!fname.equals(\"\") && !Uni.equals(\"\"))\n {\n myRef.child(\"users\").child(userId).setValue(u);\n }\n }\n });\n\n\n }",
"private void addUserToFireBase() {\n Storage storage = new Storage(activity);\n RetrofitInterface retrofitInterface = RetrofitClient.getRetrofit().create(RetrofitInterface.class);\n Call<String> tokenCall = retrofitInterface.addUserToFreebase(RetrofitClient.FIREBASE_ENDPOINT + \"/\" + storage.getUserId() + \"/\" + storage.getFirebaseToken(), storage.getAccessToken());\n tokenCall.enqueue(new Callback<String>() {\n @Override\n public void onResponse(Call<String> call, Response<String> response) {\n if (response.isSuccessful()) {\n\n Toast.makeText(activity, \"Firebase success!\", Toast.LENGTH_SHORT).show();\n\n } else {\n Toast.makeText(activity, \"Failed to add you in Firebase!\", Toast.LENGTH_SHORT).show();\n }\n }\n\n @Override\n public void onFailure(Call<String> call, Throwable t) {\n\n /*handle network error and notify the user*/\n if (t instanceof SocketTimeoutException) {\n Toast.makeText(activity, R.string.connection_timeout, Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }",
"private void addNote(){\n DatabaseReference noteRef = mDB.getReference(\"Notes\");\n\n Long time = System.currentTimeMillis();\n\n Bundle bundleNote = new Bundle();\n bundleNote.putString(\"notesDetail\", notes.getText().toString());\n bundleNote.putString(\"notesTime\", time.toString());\n\n Note note = new Note(bundleNote);\n String currNoteKey;\n currNoteKey = noteRef.push().getKey();\n noteRef.child(LoginActivity.currUserID).child(currNoteKey).setValue(note);\n\n }",
"private void uploadFile() {\n //checking if file is available\n if (filePath != null) {\n //displaying progress dialog while image is uploading\n final ProgressDialog progressDialog = new ProgressDialog(this);\n progressDialog.setTitle(\"Uploading\");\n progressDialog.show();\n\n //getting the storage reference\n StorageReference sRef = storageReference.child(\"admins/\" + System.currentTimeMillis() + \".\" + getFileExtension(filePath));\n\n //adding the file to reference\n sRef.putFile(filePath).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n //dismissing the progress dialog\n progressDialog.dismiss();\n\n //displaying success toast\n // Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n\n // ba5odha fe string as url\n imageurl = taskSnapshot.getDownloadUrl().toString();\n\n DatabaseReference mDatabase;\n\n mDatabase = FirebaseDatabase.getInstance().getReference();\n\n String s = mDatabase.push().getKey();\n\n Admin a = new Admin(s, name.getText().toString(), email.getText().toString(), phone.getText().toString(), address.getText().toString(), imageurl);\n\n // b3ml save fel firebase lel object of admin\n mDatabase.child(\"admins\").child(s).setValue(a);\n\n Toast.makeText(RegisterAsAdmin.this, \"Registration successful\", Toast.LENGTH_LONG).show();\n FirebaseAuth.getInstance().signOut();\n Intent i = new Intent(RegisterAsAdmin.this, LoginAsAdmin.class);\n startActivity(i);\n finish();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception exception) {\n progressDialog.dismiss();\n Toast.makeText(getApplicationContext(), exception.getMessage(), Toast.LENGTH_LONG).show();\n }\n }).addOnProgressListener(new OnProgressListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onProgress(UploadTask.TaskSnapshot taskSnapshot) {\n //displaying the upload progress\n double progress = (100.0 * taskSnapshot.getBytesTransferred()) / taskSnapshot.getTotalByteCount();\n progressDialog.setMessage(\"Uploaded \" + ((int) progress) + \"%...\");\n }\n });\n } else {\n Toast.makeText(RegisterAsAdmin.this, \"File Error\", Toast.LENGTH_SHORT).show();\n }\n }",
"public void createUserAccount(String email, String password, final String userId, final SignUpInterface listner) {\n collectionReference = db.collection(\"Users\");\n firebaseAuth = FirebaseAuth.getInstance();\n firebaseAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if(task.isSuccessful()){\n currentUser = FirebaseAuth.getInstance().getCurrentUser();\n assert currentUser!= null;\n final String currentUserId = currentUser.getUid();\n\n Map<String, String> userMap = new HashMap<>();\n userMap.put(\"UserIdInDB\", currentUserId);\n userMap.put(\"UserName\", userId);\n\n collectionReference.add(userMap)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n documentReference.get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if(task.getResult().exists()) {\n\n String name = task.getResult().getString(\"UserName\");\n\n EntityClass entityObj = EntityClass.getInstance();\n entityObj.setUserName(name);\n entityObj.setUserIdInDb(currentUserId);\n listner.signUpStatus(true);\n }\n }\n });\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(TAG, \"onFailure: \" + e.getMessage());\n listner.signUpStatus(false);\n listner.onFailure(e.getMessage());\n }\n });\n }",
"private void subirDispositivo(){\n DatabaseReference subir_data = db_reference.child(\"Dispositivo\");\n Map<String, String> dataDispositivo = new HashMap<String, String>();\n dataDispositivo.put(\"Evento\", etNombreCurso.getText().toString());\n dataDispositivo.put(\"Latitud1\", disp_Lat1);\n dataDispositivo.put(\"Longitud1\", disp_Long1);\n dataDispositivo.put(\"Latitud2\", disp_Lat2);\n dataDispositivo.put(\"Longitud2\", disp_Long2);\n subir_data.push().setValue(dataDispositivo);\n }",
"public void createNewUser(){\n Users user = new Users(winnerName);\n mDatabase.child(\"users\").child(winnerName).setValue(user);\n Log.d(\"DB\", \"Writing new user \" + winnerName + \" to the database\");\n\n Toast.makeText(this, \"Scoreboard has been updated!\", Toast.LENGTH_SHORT).show();\n\n endGame();\n\n\n\n }",
"private void saveProfile()\n {\n mFirebaseUser = mFirebaseAuth.getCurrentUser();\n mDatabase = FirebaseDatabase.getInstance().getReference();\n mUserId = mFirebaseUser.getUid();\n\n StorageReference filePath = mStorage.child(\"UserPic\").child(mImageUri.getLastPathSegment());\n //UserProfile userProfile = new UserProfile();\n filePath.putFile(mImageUri).addOnSuccessListener(new OnSuccessListener<UploadTask.TaskSnapshot>() {\n @Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Uri downloadUrl = taskSnapshot.getDownloadUrl();\n mDatabase.child(\"users\").child(mUserId).child(\"userName\").setValue(fname);\n mDatabase.child(\"users\").child(mUserId).child(\"userImage\").setValue(downloadUrl.toString());\n }\n });\n\n }",
"private void addToDatabase(Favorites favorites) {\n FirebaseUser currentUser = mAuth.getCurrentUser();\n String uid = currentUser.getUid();\n mDatabase = db.getReference();\n\n mDatabase.child(\"favorites\").child(uid).setValue(favorites);\n }",
"private void addExpired(){\n final DatabaseReference expiredRef = mDB.getReference(\"ExpiredDate\");\n //productName, productExpiredDate, productPrice\n Bundle bundleNote = new Bundle();\n bundleNote.putString(\"productName\", expiredName.getText().toString());\n bundleNote.putString(\"productExpiredDate\", expiredDate.getText().toString());\n //Ini belum ada price soalnya belum bisa foto\n bundleNote.putString(\"productPrice\", \"0\");\n\n Product product = new Product(bundleNote);\n String currExpiredKey;\n currExpiredKey = expiredRef.push().getKey();\n expiredRef.child(LoginActivity.currGroupID).child(LoginActivity.currUserID).child(currExpiredKey).setValue(product);\n }",
"public void mySaveInfo(View view){\n\n String fname = fName.getText().toString();\n String lname = lName.getText().toString();\n String my_address = address.getText().toString();\n\n // Checks field for empty or not\n if(isEmptyField(fName))return;\n if(isEmptyField(lName))return;\n if(isEmptyField(address))return;\n\n Map<String,Object> myMap = new HashMap<String,Object>();\n myMap.put(KEY_FNAME,fname);\n myMap.put(KEY_LNAME,lname);\n myMap.put(KEY_ADDRESS, my_address);\n myMap.put(\"role\", \"user\");\n\n /*\n By geting rid of the document, Firestore will generate a new Id each time a\n new user is created.\n */\n db.collection(\"users\").document(RegisteredUserID)\n .set(myMap).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(UserSignUp.this, \"User Saved\", Toast.LENGTH_SHORT).show();\n // This should go to the home screen if the user is succesfully entered\n startActivity(new Intent(UserSignUp.this,MainActivity.class));\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(UserSignUp.this, \"Error!\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, e.toString());\n }\n });\n }",
"@Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n userDatabaseRef.child(\"Location\").setValue(mLocation);\n }",
"@Override\n public void onSuccess(Void aVoid) {\n String myBorrowedBooksID = reference.child(Firebase_Table.BORROWED_BOOK.name()).child(feedBook.getOwner()).push().getKey();\n borrowedBook.setId(myBorrowedBooksID);\n reference.child(Firebase_Table.BORROWED_BOOK.name()).child(feedBook.getOwner()).child(myBorrowedBooksID).setValue(borrowedBook);\n }",
"private void addUserToDatabase( DatabaseReference postRef) {\n\n // check username, password cannot be null and may not have spaces\n final String usernameChecked = checkNullString(usernameText.getText().toString());\n final String password = checkNullString(passwordText.getText().toString());\n final String confirmPassword = checkNullString(confirmPasswordText.getText().toString());\n\n if (usernameChecked == null || password == null) {\n Toast.makeText(this, \"Entries may not be null, and may not have spaces!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (!password.equals(confirmPassword)){\n Toast.makeText(this, \"Passwords do not match!\", Toast.LENGTH_LONG).show();\n return;\n }\n\n if (users.contains(usernameChecked)){\n Toast.makeText(this, \"Username is already taken\", Toast.LENGTH_LONG).show();\n return;\n }\n\n // initialize data for SentCount\n postRef\n .child(\"Users\")\n .child(usernameChecked)\n .runTransaction(new Transaction.Handler() {\n\n @NonNull\n @Override\n public Transaction.Result doTransaction(@NonNull MutableData currentData) {\n User newUser = new User(usernameChecked, password);\n currentData.setValue(newUser);\n return Transaction.success(currentData);\n }\n\n @Override\n public void onComplete(@Nullable DatabaseError error, boolean committed,\n @Nullable DataSnapshot currentData) {\n Log.d(TAG, \"postTransaction:onComplete:\" + currentData);\n Toast.makeText(getApplicationContext(), \"Sign up successful!\", Toast.LENGTH_LONG);\n finish();\n }\n });\n }",
"private void registerUser(String email, String passwd){\n\n mAuth.createUserWithEmailAndPassword(email, passwd)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n String key = \"\";\n //checking if success\n if(task.isSuccessful()){\n key = task.getResult().getUser().getUid();\n toastMessage(\"seccuss here \"+key);\n String name = \"\";\n String phone = \"\";\n String c = String.valueOf(spinner.getSelectedItem());\n Classe classe = new Classe(c);\n name = nom.getText().toString();\n phone = tel.getText().toString();\n UserInformation U = new UserInformation(name,phone,classe);\n // toastMessage(\"hello uid \"+Useruid);\n myRef.child(\"users\").child(key).setValue(U);\n /* sharedPref = getApplicationContext().getSharedPreferences(Name, MODE_PRIVATE);\n SharedPreferences.Editor editor = sharedPref.edit();\n editor.putString(Key, key);\n editor.apply();*/\n\n }else{\n toastMessage(\"Failed\"); }\n\n\n }\n });\n /*sharedPref = getApplicationContext().getSharedPreferences(Name, MODE_PRIVATE);\n uid = sharedPref.getString(Key, null);\n // toastMessage(\"hello thoast \"+uid);\n return uid ;*/\n }",
"private void saveSettings(){\n // get current user from shared preferences\n currentUser = getUserFromSharedPreferences();\n\n final User newUser = currentUser;\n Log.i(\"currentUser name\",currentUser.getUsername());\n String username = ((EditText)findViewById(R.id.usernameET)).getText().toString();\n\n if(\"\".equals(username)||username==null){\n Toast.makeText(getApplicationContext(),\"Failed to save, user name cannot be empty\",Toast.LENGTH_LONG).show();\n return;\n }\n\n newUser.setUsername(username);\n\n // update user data in firebase\n Firebase.setAndroidContext(this);\n Firebase myFirebaseRef = new Firebase(Config.FIREBASE_URL);\n\n // set value and add completion listener\n myFirebaseRef.child(\"users\").child(newUser.getFireUserNodeId()).setValue(newUser,new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n\n Toast.makeText(getApplicationContext(),\"Data could not be saved. \" + firebaseError.getMessage(),Toast.LENGTH_SHORT).show();\n } else {\n // if user info saved successfully, then save user image\n uploadPhoto();\n Toast.makeText(getApplicationContext(),\"User data saved successfully.\",Toast.LENGTH_SHORT).show();\n }\n }\n });\n\n }",
"@Override\n public void onSuccess(Uri uri) {\n Log.i(\"upload diary\", \"photo in storage\");\n uploadDiary.setPhotoUri(uri.toString());\n db.collection(\"Diary\").document(diary.getTime() + \":\" + diary.getUsername()).set(uploadDiary).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.i(\"upload diary\", \"photo succ\");\n }\n });\n }",
"private void send(){\n String n = name.getText().toString();\n String b = bg.getText().toString();\n String d = dob.getText().toString();\n String l = loc.getText().toString();\n String i = id.getText().toString();\n String m = mob.getText().toString();\n\n if(TextUtils.isEmpty(n) || TextUtils.isEmpty(b) || TextUtils.isEmpty(d) || TextUtils.isEmpty(l) || TextUtils.isEmpty(i)\n || TextUtils.isEmpty(m)){\n //if any of the field remains empty, no data will be send\n Toast.makeText(this, \"Details incomplete!!\", Toast.LENGTH_SHORT).show();\n }\n else{\n //sending data\n String id = root.push().getKey();//key given by the firebase itself\n \n //creating new person object for each data\n Person person = new Person(b,d,i,l,m,n);\n root.child(id).setValue(person);//sending data\n }\n }",
"public static void saveUserInformation(int hs) {\n FirebaseUser usr = firebaseAuth.getCurrentUser();\n\n //saving data to firebase database\n /*\n * first we are creating a new child in firebase with the\n * unique id of logged in user\n * and then for that user under the unique id we are saving data\n * for saving data we are using setvalue method this method takes a normal java object\n * */\n if (usr != null) {\n databaseReference.child(\"users\").child(usr.getUid()).child(\"highScore\").setValue(hs);\n Log.d(\"usrnotnull\",\"oui\");\n Log.d(\"userUid\",usr.getUid());\n }\n\n\n // Toast ?\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n riversRef.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(Uri uri) {\n\n Model model = new Model(uri.toString());\n String modelID = myRef.push().getKey();\n myRef.child(modelID).setValue(model);\n userID = fAuth.getCurrentUser().getUid();\n DocumentReference documentReference = fStore.collection(\"users\").document(userID);\n\n\n Map<String, Object> fuser = new HashMap<>();\n fuser.put(\"FileUrl\", model);\n documentReference.set(fuser, SetOptions.merge());\n Toast.makeText(eeg4.this, \"Uploaded successfully\", Toast.LENGTH_SHORT).show();\n }\n });\n progressDialog.dismiss();\n\n //and displaying a success toast\n Toast.makeText(getApplicationContext(), \"File Uploaded \", Toast.LENGTH_LONG).show();\n }",
"public void insertdata() {\n Map<String, Object> user = new HashMap<>();\n user.put(\"Reason\",txtreason.getText().toString() );\n user.put(\"No_of_days\",txt_no_of_days.getText().toString());\n user.put(\"Start_date\", StartdateView.getText().toString());\n user.put(\"End_date\", Enddateview.getText().toString());\n user.put(\"Email\", active_user.getEmail());\n\n\n\n // Add a new document with a generated ID\n db.collection(\"Leaves\").document(active_user.getEmail())\n .set(user)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(\"done_msg\", \"DocumentSnapshot added with ID: \");\n Toast.makeText(TakeLeaveActivity.this, \"leave Data Submitted\", Toast.LENGTH_SHORT).show();\n black_textfiled();\n }\n\n// @Override\n// public void onSuccess(DocumentReference documentReference) {\n//\n//\n// }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.w(\"fail_msg\", \"Error adding document\", e);\n }\n });\n\n }",
"private void setupFirebase(){\n FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n FirebaseUser user = firebaseAuth.getCurrentUser();\n\n FirebaseDatabase firebaseDatabase = FirebaseDatabase.getInstance();\n if (user!=null){\n databaseReference = firebaseDatabase.getReference(\"Users\").child(user.getUid()).child(\"teacher\");\n }\n }",
"public void submitInfoButton(View v) {\n //each entry needs a unique ID\n Business newBusiness = new Business();\n String newKey = appState.firebaseReference.push().getKey();\n newBusiness.setName(nameField.getText().toString());\n newBusiness.setPrimaryBusiness(primaryBusinessField.getText().toString());\n newBusiness.setBusinessNumber(numberField.getText().toString());\n newBusiness.setAddress(addressField.getText().toString());\n newBusiness.setProvince(provinceField.getSelectedItem().toString());\n\n appState.firebaseReference.child(newKey).setValue(newBusiness,\n new DatabaseReference.CompletionListener(){\n @Override\n public void onComplete(DatabaseError databaseError, DatabaseReference databaseReference){\n if(databaseError != null){\n Toast toast = Toast.makeText(appState, \"Error: Creation failed!\",\n Toast.LENGTH_LONG);\n toast.show();\n } else {\n finish();\n Toast toast = Toast.makeText(appState, \"Business entry created\",\n Toast.LENGTH_LONG);\n toast.show();\n }\n }\n });\n }",
"private void myNewCard( String name, String image, String desc, float price, int pid,String bulkdescription ) {\n\n firebaseImgAddresses = model.getProductimages();\n\n FirebaseAuth mAuth = FirebaseAuth.getInstance();\n\n SubCardsmodel movie = new SubCardsmodel(pid,name,image,desc,price,bulkdescription, mAuth.getCurrentUser().getEmail(),shopname,shopmobile,firebaseImgAddresses);\n //referring to movies node and setting the values from movie object to that location\n System.out.println(\"card and model \" + card + movie.getCardname());\n mDatabaseReference.child(\"Products\").child(card).push().setValue(movie);\n progressDialog.dismiss();\n\n// editAt(model.getCardname());\n\n\n Intent intent = new Intent(EditSubCard.this, DeleteSubCardView.class);\n intent.putExtra(\"cardname\",card);\n\n startActivity(intent);\n\n\n\n\n }",
"public String registerUser(ChatRoomUser newUser) throws Exception{\n Firebase roomsNodeRef = fire_db.child(\"Users\");\n Firebase newNodeRef = roomsNodeRef.push();\n if (newUser != null)\n try {\n newNodeRef.setValue(newUser,new Firebase.CompletionListener() {\n @Override\n public void onComplete(FirebaseError firebaseError, Firebase firebase) {\n if (firebaseError != null) {\n System.out.println(\"Data could not be saved. \" + firebaseError.getMessage());\n } else {\n System.out.println(\"Data saved successfully.\");\n }\n }\n });\n String postId = newNodeRef.getKey();\n return postId;\n }catch (Exception exc){\n throw new Exception(\"Something failed.\", new Throwable(String.valueOf(Exception.class)));\n }\n return null;\n }",
"@Override\n public void onCreate() {\n super.onCreate();\n if(!FirebaseApp.getApps(this).isEmpty()) {\n FirebaseDatabase.getInstance().setPersistenceEnabled(true);\n }\n appInstance = this;\n\n\n\n }",
"private void upToFireBase(Bill _bill)\n {\n Log.d(\"RECORD\", \"Up to firebase\"+_fbfs);\n String _number_room = _bill.getRoom().getPhase()+String.valueOf(_bill.getRoom().getFloor())+_bill.getRoom().getNumber_room();\n _fbfs.collection(\"Resident\")\n .document(\"USER\")\n .collection(_number_room)\n .document(_bill.getMonth()+_bill.getYear())\n .set(_bill)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Log.d(\"RECORD\", \"SUCCESS\");\n PHASE_CHOOSE = _room.getPhase();\n FLOOR_CHOOSE = String.valueOf(_room.getFloor());\n goToNextPage();\n Toast.makeText(getActivity(), \"Success\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Log.d(\"RECORD\", \"FAILED\");\n Toast.makeText(getActivity(), \"Not found\", Toast.LENGTH_SHORT).show();\n }\n });\n }",
"public void saveDay() {\n day.setServices(serviciosTotales);\n day.setTasks(tasksTotales);\n\n databaseReference.child(day.getDate() + \"_\" + day.getUserId()).setValue(day);\n Toast.makeText(context, \"Creando archivo para enviar por correo.\", Toast.LENGTH_LONG).show();\n //todo, so far it will keep updating the day\naskPermissions();\n createExcel();\n\n }",
"private void user_post(String uid) {\n Calendar calForDate = Calendar.getInstance();\n SimpleDateFormat currentDate = new SimpleDateFormat(\"dd-MMM-yyy\");\n String saveCurrentDate = currentDate.format(calForDate.getTime());\n\n // pic up current time\n Calendar calForTime = Calendar.getInstance();\n SimpleDateFormat currentTime = new SimpleDateFormat(\"HH:mm\");\n String saveCurrentTime = currentTime.format(calForTime.getTime());\n\n String random_key = uid + saveCurrentDate + saveCurrentTime;\n\n String post_text = et_post_text.getText().toString().trim();\n\n if (TextUtils.isEmpty(post_text)){\n Toast.makeText(getActivity(), \"Write your post first\", Toast.LENGTH_SHORT).show();\n return;\n }else {\n UploadPostModel uploadPostModel = new UploadPostModel(post_text,uid,saveCurrentTime,saveCurrentDate);\n databaseReference.child(random_key).setValue(uploadPostModel);\n et_post_text.setText(\"\");\n }\n }",
"public void createAccount(final String userName , final String email , String password){\n //checking if user input is not empty\n\n\n if(userName!=null && email!=null && password!=null){\n\n\n progressBar.setVisibility(View.VISIBLE);\n\n //setting up new user ----- see assistant\n firebaseAuth.createUserWithEmailAndPassword(email , password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n\n //onCopletion of user sign in\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n // safe check if was sussesfull\n if(task.isSuccessful()) {\n //Maping a user on database\n currentUser = firebaseAuth.getCurrentUser() ;\n assert currentUser != null;\n final String userId = currentUser.getUid();\n // creating a hashmap to map\n\n Map<String,String> userObj = new HashMap<>() ;\n\n userObj.put(\"userId\", userId) ;\n userObj.put(\"userName\" , userName) ;\n\n collectionReference.add(userObj)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n //Toast.makeText(CreateAccActivity.this,\"onSucess\",Toast.LENGTH_LONG).show();\n\n Log.d(\"hello\",\"sussess\") ;\n documentReference.get()\n .addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n\n //if(!Objects.requireNonNull(task.getResult()).exists()){\n\n //Log.d(\"hello\",\"sussess\") ;\n progressBar.setVisibility(View.INVISIBLE);\n\n //Toast.makeText(CreateAccActivity.this,userName,Toast.LENGTH_LONG).show();\n\n\n String name = Objects.requireNonNull(task.getResult()).getString(\"userName\") ;\n\n journalApi journalApi = new journalApi() ;\n util.journalApi.getInstance().setUserID(userId);\n util.journalApi.getInstance().setUserName(userName);\n\n //Toast.makeText(CreateAccActivity.this,name,Toast.LENGTH_LONG).show();\n\n Log.d(\"hello\",userName) ;\n Intent intent = new Intent(CreateAccActivity.this\n ,PostJournalActivity.class) ;\n\n intent.putExtra(\"username\",name);\n intent.putExtra(\"userid\",userId) ;\n\n startActivity(intent);\n\n\n }\n /*else{\n progressBar.setVisibility(View.INVISIBLE);\n }*/\n\n\n });\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(CreateAccActivity.this\n ,\"error\" , Toast.LENGTH_LONG).show();\n }\n });\n\n }\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n Toast.makeText(CreateAccActivity.this,\"Something Went wrong\"+e\n ,Toast.LENGTH_LONG).show();\n progressBar.setVisibility(View.INVISIBLE);\n\n }\n });\n\n }\n else{\n\n Toast.makeText(CreateAccActivity.this,\"All the Fields are Requoired\",Toast.LENGTH_LONG).show();\n }\n\n }",
"@Override\n public void onClick(View v) {\n Map<String, Object> profile = new HashMap<>();\n\n String name = et_name.getText().toString();\n String phone = et_phone.getText().toString();\n String email = et_email.getText().toString();\n String linkedin = et_linkedin.getText().toString();\n String git = et_github.getText().toString();\n String devpost = et_devpost.getText().toString();\n\n profile.put(\"name\", name);\n profile.put(\"phone\", phone);\n profile.put(\"email\", email);\n profile.put(\"linkedin\", linkedin);\n profile.put(\"github\", git);\n profile.put(\"devpost\", devpost);\n\n\n\n // Add a new document with a generated ID\n\n db.collection(\"seekers\").document(user.getUid()).set(profile);\n\n /*db.collection(\"seekers/\" + user.getUid())\n .add(profile)\n .addOnSuccessListener(new OnSuccessListener<DocumentReference>() {\n @Override\n public void onSuccess(DocumentReference documentReference) {\n\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n\n }\n });*/\n\n\n toBeam();\n }",
"public void saveJob(View v){\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference mySavedJobsRef = database.getReference(\"Users\").child(currentUser.getUid().toString()).child(\"savedjobs\");\n //Dont save your own jobs\n if(!currentUser.getUid().toString().equals(jobPost.getUserid())) {\n mySavedJobsRef.addListenerForSingleValueEvent(\n new ToggleAddIDVEListener(ViewSingleJobActivity.this,jobPost.getPostid()));\n }\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downloadImageUri = uriTask.getResult();\n\n if (uriTask.isSuccessful()){\n\n\n //setup data to save\n HashMap<String,Object> hashMap = new HashMap<>();\n hashMap.put(\"uid\",\"\"+firebaseAuth.getUid());\n hashMap.put(\"email\",\"\"+email);\n hashMap.put(\"name\",\"\"+fullName);\n hashMap.put(\"phone\",\"\"+phoneNumber);\n hashMap.put(\"address\",\"\"+address);\n hashMap.put(\"timestamp\",\"\"+timestamp);\n // hashMap.put(\"code\",\"\"+code);\n hashMap.put(\"accountType\",\"User\");\n // hashMap.put(\"online\",\"true\");\n hashMap.put(\"profileImage\",\"\"+downloadImageUri); //url of uploaded image\n\n //save to db\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"SchoolFirst\");\n ref.child(firebaseAuth.getUid()).setValue(hashMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n //db updated\n progressDialog.dismiss();\n startActivity(new Intent(RegisterUserActivity.this,MainActivity.class));\n finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //failed updating db\n progressDialog.dismiss();\n startActivity(new Intent(RegisterUserActivity.this,MainActivity.class));\n finish();\n }\n });\n\n }\n }",
"public void saveCompany(View v) {\n\n final String companyname = companyName.getText().toString().trim();\n\n final String emailAd = email.getText().toString().trim();\n final String passwordAd = password.getText().toString().trim();\n final String passwordR = passwordRepeat.getText().toString().trim();\n final Map<String, Object> company = new HashMap<>();\n\n if (TextUtils.isEmpty(companyname)) {\n companyName.setError(\"name required\");\n return;\n }\n\n if (companyname.matches(\"[0-9]+\")) {\n companyName.setError(\"Name must contain only letters\");\n return;\n }\n if (companyname.matches(\"[^<>%$]\")) {\n companyName.setError(\"No special characters allowed\");\n return;\n }\n if (TextUtils.isEmpty(emailAd)) {\n email.setError(\"users email required\");\n return;\n }\n if (TextUtils.isEmpty(passwordAd)) {\n password.setError(\"users password required\");\n return;\n }\n if (!emailAd.matches(\"^[a-zA-Z0-9_!#$%&’*+/=?`{|}~^.-]+@[a-zA-Z0-9.-]+$\")) {\n email.setError(\"users Email must be written correctly eg.User@gmail.com\");\n return;\n }\n if (passwordAd.length() <= 8) {\n password.setError(\"Users password must be least 8 characters long\");\n return;\n }\n if (!passwordAd.matches(passwordR)) {\n passwordRepeat.setError(\"Password must match\");\n }\n\n\n fAuth.createUserWithEmailAndPassword(emailAd, passwordAd).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // getting current user id\n userId = fAuth.getCurrentUser().getUid();\n DocumentReference docRef = db.collection(\"Companies\").document(userId);\n\n // saving the values into the map\n company.put(COMPANY_NAME, companyname);\n company.put(COMPANY_CATEGORY, compaCategory);\n company.put(COMPANY_EMAIL, emailAd);\n docRef.set(company)\n\n // if the user is registered this will happen otherwise it will no be successful\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(signup.this, \"Your business has been registered\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(getApplicationContext(), ManagerDashBoard.class));\n finish();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(signup.this, \"An erro has ocured, please try it again later\", Toast.LENGTH_SHORT).show();\n Log.d(TAG, e.toString());\n }\n });\n } else {\n Toast.makeText(signup.this, \"Error!\" + task.getException().getMessage() + emailAd, Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n\n\n }",
"private void initFirebase() {\n //инициализируем наше приложение для Firebase согласно параметрам в google-services.json\n // (google-services.json - файл, с настройками для firebase, кот. мы получили во время регистрации)\n FirebaseApp.initializeApp(this);\n //получаем точку входа для базы данных\n database = FirebaseDatabase.getInstance();\n myRef = database.getReference();\n\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n\n imageName.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(final Uri uri) {\n submitInfo.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n String name = productName.getText().toString();\n String price = productPrice.getText().toString();\n String desc = productDes.getText().toString();\n String offer = productOffer.getText().toString();\n\n\n databaseReference = FirebaseDatabase.getInstance().getReference(\"Product\").child(key).child(name);\n ProductUpload productUpload = new ProductUpload(name,desc,price,String.valueOf(uri),user.getUid(),offer);\n databaseReference.setValue(productUpload);\n\n startActivity(new Intent(SubmitProduct.this,ProfileForCompany.class));\n }\n });\n }\n });\n\n }",
"public void basicReadWrite() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n\n myRef.setValue(\"Hello, World!\");\n // [END write_message]\n\n // [START read_message]\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"Value is: \" + value);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n // [END read_message]\n }",
"public void basicReadWrite() {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference myRef = database.getReference(\"message\");\n\n myRef.setValue(\"Hello, World!\");\n // [END write_message]\n\n // [START read_message]\n // Read from the database\n myRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n // This method is called once with the initial value and again\n // whenever data at this location is updated.\n String value = dataSnapshot.getValue(String.class);\n Log.d(TAG, \"Value is: \" + value);\n }\n\n @Override\n public void onCancelled(DatabaseError error) {\n // Failed to read value\n Log.w(TAG, \"Failed to read value.\", error.toException());\n }\n });\n // [END read_message]\n }",
"public void update() {\n Log.d(TAG, \"Updating database\");\n databaseRef.child(TAG).setValue(events);\n Log.d(TAG, \"Database update complete\");\n }",
"@Override\n public void onClick(View view) {\n Log.d(\"CALL_TEST\", \"SAVE!\");\n DbManager db = DbManager.getInstance(getApplicationContext());\n\n ContentValues contentValues = new ContentValues();\n contentValues.put(\"NAME\", \"홍길동\");\n contentValues.put(\"PHONE\", \"1234\");\n\n db.insert(contentValues);\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n Task<Uri> uriTask = taskSnapshot.getStorage().getDownloadUrl();\n while (!uriTask.isSuccessful());\n Uri downloadImageUri = uriTask.getResult();\n if (uriTask.isSuccessful())\n {\n //save info with image\n HashMap<String, Object> hashMap = new HashMap<>();\n\n hashMap.put(\"uid\",\"\"+uid_user);\n hashMap.put(\"name\",\"\"+nameSt);\n hashMap.put(\"phone\",\"91\"+phoneSt);\n hashMap.put(\"mail\",\"\"+mailSt);\n hashMap.put(\"profileImage\", \"\"+downloadImageUri);\n hashMap.put(\"timestamp\", \"\" + timpstamp);\n mRef.child(uid_user).setValue(hashMap)\n .addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"add user sucessfully\", Toast.LENGTH_SHORT).show();\n goToHomePage();\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n progressDialog.dismiss();\n Toast.makeText(AddUserActivity.this, \"\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n }",
"@Override\n public void onSuccess(UploadTask.TaskSnapshot taskSnapshot) {\n reference.getDownloadUrl().addOnSuccessListener(new OnSuccessListener<Uri>() {\n @Override\n public void onSuccess(final Uri uri) {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n DatabaseReference dbBook = database.getReference(\"books\");\n\n Map<String, String> book = new HashMap<>();\n final String book_name = tvDialogCreateBookName.getText().toString();\n book.put(\"book_name\", book_name.substring(0, 1).toUpperCase() + book_name.substring(1));\n book.put(\"author\", tvDialogCreateAuthor.getText().toString());\n book.put(\"book_image\", uri.toString());\n final String bookId = dbBook.push().getKey();\n dbBook.child(bookId).setValue(book, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError databaseError, @NonNull DatabaseReference databaseReference) {\n if (databaseError == null){\n final Snackbar snackbar = Snackbar.make(findViewById(R.id.BookActivity), \"Thêm thành công\", Snackbar.LENGTH_LONG);\n snackbar.setAction( \"Thêm thông tin ?\", new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n snackbar.dismiss();\n Intent intent = new Intent(BookActivity.this, Input_Details_BookActivity.class);\n intent.putExtra(\"book_id\",bookId);\n intent.putExtra(\"book_image\", uri.toString());\n intent.putExtra(\"author\", tvDialogCreateAuthor.getText().toString());\n intent.putExtra(\"book_name\",book_name.substring(0, 1).toUpperCase() + book_name.substring(1));\n startActivity(intent);\n }\n });\n snackbar.setActionTextColor(Color.GREEN);\n snackbar.show();\n dialogCreateBook.cancel();\n progressDialog.dismiss();\n }else { Toast.makeText(BookActivity.this, \"Thêm thất bại\", Toast.LENGTH_SHORT).show(); }\n }\n });\n }\n });\n }",
"private void createAdmin(String book_email,String book_phone,String book_title) {\n // TODO\n // In real apps this userId should be fetched\n // by implementing firebase auth\n if (TextUtils.isEmpty(bookId)) {\n bookId = mFirebaseDatabase.push().getKey();\n }\n\n Book book = new Book(book_email,book_phone,book_title);\n\n mFirebaseDatabase.child(bookId).setValue(book);\n\n addUserChangeListener();\n }"
] | [
"0.711935",
"0.68842876",
"0.6848993",
"0.68131083",
"0.67568886",
"0.66704994",
"0.666682",
"0.6665243",
"0.6657525",
"0.66553557",
"0.6641174",
"0.66401935",
"0.6607136",
"0.65243924",
"0.65088594",
"0.65070534",
"0.6446576",
"0.6438577",
"0.643121",
"0.64179057",
"0.63862336",
"0.63708586",
"0.6362671",
"0.63615423",
"0.6356267",
"0.6323821",
"0.63179356",
"0.6301251",
"0.63010716",
"0.6286719",
"0.62757885",
"0.6259385",
"0.62546337",
"0.62481755",
"0.62375736",
"0.6221749",
"0.6187089",
"0.61866903",
"0.6167997",
"0.61643404",
"0.6155044",
"0.61493635",
"0.6127362",
"0.6115257",
"0.6092724",
"0.6079685",
"0.6073395",
"0.6048026",
"0.6040049",
"0.6038504",
"0.6035927",
"0.6033072",
"0.6032318",
"0.60246444",
"0.60129493",
"0.60118383",
"0.60079366",
"0.6006231",
"0.60056776",
"0.6002057",
"0.59962803",
"0.5974833",
"0.59653866",
"0.59611523",
"0.59505016",
"0.5948573",
"0.5939132",
"0.59364045",
"0.5921017",
"0.5920024",
"0.59156287",
"0.5912088",
"0.5908599",
"0.5899437",
"0.5897584",
"0.58952",
"0.58926225",
"0.58906955",
"0.5858515",
"0.5854194",
"0.58533937",
"0.5840909",
"0.58402526",
"0.5839879",
"0.5832396",
"0.58308065",
"0.5830098",
"0.5822928",
"0.5820749",
"0.58166504",
"0.5815894",
"0.58133477",
"0.58116585",
"0.580612",
"0.580015",
"0.580015",
"0.5796958",
"0.5782915",
"0.57711285",
"0.5771104",
"0.5770608"
] | 0.0 | -1 |
Obtient le code d'usager. | protected String getUserCode(HttpServletRequest httpRequest) {
return (String) httpRequest.getAttribute(PARAM_KEY_UID);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public static void generateCode()\n {\n \n }",
"@Override\n protected void codeGenMain(DecacCompiler compiler, Registres regs, Pile p) {\n }",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"public void setUsager(Usager usager) {\r\n\t\tthis.usager = usager;\r\n\t}",
"public void ganar() {\n // TODO implement here\n }",
"private stendhal() {\n\t}",
"public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}",
"public void generateCode() {\n new CodeGenerator(data).generateCode();\n }",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tpublic void cargarBateria() {\n\n\t}",
"public Usager getUsager() {\r\n\t\treturn usager;\r\n\t}",
"abstract void uminus();",
"public void baocun() {\n\t\t\n\t}",
"private void remplirUtiliseData() {\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"public String cargarDatos()\r\n/* 137: */ {\r\n/* 138:163 */ limpiar();\r\n/* 139:164 */ return \"\";\r\n/* 140: */ }",
"public void mo5382o() {\n }",
"public String generateCode(){\n return \"P\" + repository.getCount();\n }",
"CD withCode();",
"private static void fines() {\n\t\tnew PayFineUI(new payFineControl()).run(); // method name changes RuN() to run() , PayFineControl to payFineControl()\r\n\t}",
"public static void main (String[] arg){\n\n Personnage[] tpers = {new Guerrier(),new Sniper(),new Chirirugien(),new Medecin(), new Civil()};\n\n for (Personnage p : tpers) {\n\n System.out.println(\"\\t Instancier de\" +p.getClass().getName());\n System.out.println(\"********************************\");\n p.seDeplacer();\n p.soigne();\n p.combattre();\n\n\n }\n System.out.println(\"********************************\");\n Personnage pers = new Guerrier();\n pers.soigne();\n pers.setSoin(new Operation(\n\n ));\n pers.soigne();\n }",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"void pramitiTechTutorials() {\n\t\n}",
"protected void elaboraPagina() {\n testoPagina = VUOTA;\n\n //header\n testoPagina += this.elaboraHead();\n\n //body\n testoPagina += this.elaboraBody();\n\n //footer\n //di fila nella stessa riga, senza ritorno a capo (se inizia con <include>)\n testoPagina += this.elaboraFooter();\n\n //--registra la pagina principale\n if (dimensioniValide()) {\n testoPagina = testoPagina.trim();\n\n if (pref.isBool(FlowCost.USA_DEBUG)) {\n testoPagina = titoloPagina + A_CAPO + testoPagina;\n titoloPagina = PAGINA_PROVA;\n }// end of if cycle\n\n //--nelle sottopagine non eseguo il controllo e le registro sempre (per adesso)\n if (checkPossoRegistrare(titoloPagina, testoPagina) || pref.isBool(FlowCost.USA_DEBUG)) {\n appContext.getBean(AQueryWrite.class, titoloPagina, testoPagina, summary);\n logger.info(\"Registrata la pagina: \" + titoloPagina);\n } else {\n logger.info(\"Non modificata la pagina: \" + titoloPagina);\n }// end of if/else cycle\n\n //--registra eventuali sottopagine\n if (usaBodySottopagine) {\n uploadSottoPagine();\n }// end of if cycle\n }// end of if cycle\n\n }",
"public ProgramWilmaa()\n\t{\n\t}",
"public void generateByteCode(Optimizer opt) {}",
"private static void cajas() {\n\t\t\n\t}",
"public void gored() {\n\t\t\n\t}",
"private void sonucYazdir() {\n\t\talinanPuan = (int)(((float)alinanPuan / (float)toplamPuan) * 100);\n\t\tSystem.out.println(\"\\nSınav Bitti..!\\n\" + soruSayisi + \" sorudan \" + dogruSayaci + \" tanesine\"\n\t\t\t\t\t\t+ \" doğru cevap verdiniz.\\nPuan: \" + alinanPuan + \"/\" + toplamPuan);\n\t}",
"@Override\n\tpublic void orgasm() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"private void limpiarDatos() {\n\t\t\n\t}",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"void entrerAuGarage();",
"public void use()\n\t{\n\t}",
"public void perder() {\n // TODO implement here\n }",
"public void assemble1() {\n\t\t\r\n\t}",
"public void duerme() {\n System.out.println(\"Duerme profundamentZzZzZz...\");\n }",
"public void generateCode() {\n\t\tfor (int i = 0; i < AsmGen.codes.size(); i++) generateFunctionASMCode(AsmGen.codes.get(i));\n\t\tgenerateMMIXMainBootstrap();\n\t\tfile.printf(\"\\n\");\n\t}",
"void use();",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"Petunia() {\r\n\t\t}",
"public void buscarGestor(){\r\n\t\t\r\n\t}",
"protected Doodler() {\n\t}",
"private final void m110460au() {\n /*\n r6 = this;\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n if (r0 == 0) goto L_0x003e\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r1 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.profile.model.User r0 = r0.getAuthor()\n java.lang.String r1 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r1)\n com.ss.android.ugc.aweme.base.model.UrlModel r0 = r0.getAvatarMedium()\n if (r0 != 0) goto L_0x0024\n goto L_0x003e\n L_0x0024:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r6.f89219bm\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.profile.model.User r1 = r1.getAuthor()\n java.lang.String r2 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.base.model.UrlModel r1 = r1.getAvatarMedium()\n com.p280ss.android.ugc.aweme.base.C23323e.m76524b(r0, r1)\n goto L_0x004a\n L_0x003e:\n com.ss.android.ugc.aweme.base.ui.RemoteImageView r0 = r6.f89219bm\n r1 = 2131232103(0x7f080567, float:1.8080306E38)\n com.ss.android.ugc.aweme.base.model.AppImageUri r1 = com.p280ss.android.ugc.aweme.base.model.AppImageUri.m76615a(r1)\n com.p280ss.android.ugc.aweme.base.C23323e.m76504a(r0, r1)\n L_0x004a:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25352e.m83221d(r0)\n if (r0 != 0) goto L_0x0053\n return\n L_0x0053:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n r1 = 3\n boolean r0 = com.p280ss.android.ugc.aweme.commercialize.utils.C25300bx.m83125a(r0, r1)\n r1 = 0\n if (r0 == 0) goto L_0x00a2\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89216bj\n if (r0 == 0) goto L_0x00d0\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x007b\n com.ss.android.ugc.aweme.commercialize.model.OmVast r2 = r2.getOmVast()\n if (r2 == 0) goto L_0x007b\n com.bytedance.vast.model.Vast r2 = r2.vast\n if (r2 == 0) goto L_0x007b\n java.lang.String r2 = r2.adTitle\n goto L_0x007c\n L_0x007b:\n r2 = r1\n L_0x007c:\n if (r2 != 0) goto L_0x0081\n java.lang.String r2 = \"\"\n goto L_0x009c\n L_0x0081:\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x009b\n com.ss.android.ugc.aweme.commercialize.model.OmVast r2 = r2.getOmVast()\n if (r2 == 0) goto L_0x009b\n com.bytedance.vast.model.Vast r2 = r2.vast\n if (r2 == 0) goto L_0x009b\n java.lang.String r2 = r2.adTitle\n goto L_0x009c\n L_0x009b:\n r2 = r1\n L_0x009c:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n goto L_0x00d0\n L_0x00a2:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89216bj\n if (r0 == 0) goto L_0x00d0\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.profile.model.User r2 = r2.getAuthor()\n if (r2 != 0) goto L_0x00b8\n java.lang.String r2 = \"\"\n L_0x00b5:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n goto L_0x00cd\n L_0x00b8:\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n com.ss.android.ugc.aweme.profile.model.User r2 = r2.getAuthor()\n java.lang.String r3 = \"mAweme.author\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n java.lang.String r2 = r2.getNickname()\n goto L_0x00b5\n L_0x00cd:\n r0.setText(r2)\n L_0x00d0:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x00e2\n java.lang.String r0 = r0.getAppInstall()\n goto L_0x00e3\n L_0x00e2:\n r0 = r1\n L_0x00e3:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n r2 = 1082130432(0x40800000, float:4.0)\n r3 = 8\n if (r0 == 0) goto L_0x011b\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x00ff\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x00ff:\n java.lang.String r4 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n float r0 = r0.getAppLike()\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 >= 0) goto L_0x011b\n android.widget.LinearLayout r0 = r6.f89217bk\n if (r0 == 0) goto L_0x0113\n r0.setVisibility(r3)\n L_0x0113:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x011b\n r4 = 2\n r0.setMaxLines(r4)\n L_0x011b:\n com.ss.android.ugc.aweme.commercialize.ad.AdRatingView r0 = r6.f89207aZ\n if (r0 == 0) goto L_0x013b\n com.ss.android.ugc.aweme.feed.model.Aweme r4 = r6.f77546j\n java.lang.String r5 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r4, r5)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r4 = r4.getAwemeRawAd()\n if (r4 != 0) goto L_0x012f\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x012f:\n java.lang.String r5 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r4, r5)\n float r4 = r4.getAppLike()\n r0.setRatingProgress(r4)\n L_0x013b:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 != 0) goto L_0x014b\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x014b:\n java.lang.String r4 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r4)\n float r0 = r0.getAppLike()\n int r0 = (r0 > r2 ? 1 : (r0 == r2 ? 0 : -1))\n if (r0 >= 0) goto L_0x0166\n com.ss.android.ugc.aweme.commercialize.ad.AdRatingView r0 = r6.f89207aZ\n if (r0 == 0) goto L_0x015f\n r0.setVisibility(r3)\n L_0x015f:\n android.view.View r0 = r6.f89209ba\n if (r0 == 0) goto L_0x0166\n r0.setVisibility(r3)\n L_0x0166:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x0178\n java.lang.String r0 = r0.getAppInstall()\n goto L_0x0179\n L_0x0178:\n r0 = r1\n L_0x0179:\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 == 0) goto L_0x0190\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89210bb\n if (r0 == 0) goto L_0x0188\n r0.setVisibility(r3)\n L_0x0188:\n android.view.View r0 = r6.f89209ba\n if (r0 == 0) goto L_0x01ac\n r0.setVisibility(r3)\n goto L_0x01ac\n L_0x0190:\n com.bytedance.ies.dmt.ui.widget.DmtTextView r0 = r6.f89210bb\n if (r0 == 0) goto L_0x01ac\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r4 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r4)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r2 = r2.getAwemeRawAd()\n if (r2 == 0) goto L_0x01a6\n java.lang.String r2 = r2.getAppInstall()\n goto L_0x01a7\n L_0x01a6:\n r2 = r1\n L_0x01a7:\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x01ac:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n java.lang.String r0 = r0.getDesc()\n java.lang.CharSequence r0 = (java.lang.CharSequence) r0\n boolean r0 = android.text.TextUtils.isEmpty(r0)\n if (r0 != 0) goto L_0x0212\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x01d3\n com.ss.android.ugc.aweme.feed.model.Aweme r2 = r6.f77546j\n java.lang.String r3 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r2, r3)\n java.lang.String r2 = r2.getDesc()\n java.lang.CharSequence r2 = (java.lang.CharSequence) r2\n r0.setText(r2)\n L_0x01d3:\n com.ss.android.ugc.aweme.feed.model.Aweme r0 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r0, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r0 = r0.getAwemeRawAd()\n if (r0 == 0) goto L_0x01e4\n java.lang.String r1 = r0.getAdMoreTextual()\n L_0x01e4:\n java.lang.CharSequence r1 = (java.lang.CharSequence) r1\n boolean r0 = android.text.TextUtils.isEmpty(r1)\n if (r0 != 0) goto L_0x021a\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x0211\n com.ss.android.ugc.aweme.feed.model.Aweme r1 = r6.f77546j\n java.lang.String r2 = \"mAweme\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n com.ss.android.ugc.aweme.feed.model.AwemeRawAd r1 = r1.getAwemeRawAd()\n if (r1 != 0) goto L_0x0200\n kotlin.jvm.internal.C7573i.m23580a()\n L_0x0200:\n java.lang.String r2 = \"mAweme.awemeRawAd!!\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n java.lang.String r1 = r1.getAdMoreTextual()\n java.lang.String r2 = \"mAweme.awemeRawAd!!.adMoreTextual\"\n kotlin.jvm.internal.C7573i.m23582a(r1, r2)\n r0.setMoreString(r1)\n L_0x0211:\n return\n L_0x0212:\n com.ss.android.ugc.aweme.commercialize.ad.DescTextView r0 = r6.f89218bl\n if (r0 == 0) goto L_0x021a\n r0.setVisibility(r3)\n return\n L_0x021a:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.p280ss.android.ugc.aweme.newfollow.p1424vh.CommercialFlowFeedViewHolder.m110460au():void\");\n }",
"public void generar() throws Exception {\n\t\tAnalizador_Sintactico.salida.generar(\".DATA\", \"genero los datos estaticos para la clase \"+this.nombre);\r\n\t\tAnalizador_Sintactico.salida.generar(\"VT_\"+nombre+\":\",\" \");\r\n\t\t\r\n\t\tboolean esDinamico=false;\r\n\t\t\r\n\t\t//para cada metodo, genero la etiqueta dw al codigo\r\n\t\tfor (EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\tAnalizador_Sintactico.salida.gen_DW(\"DW \"+m.getEtiqueta(),\"offset: \"+m.getOffsetMetodo(),m.getOffsetMetodo());\r\n\t\t\t\tesDinamico=true;\r\n\t\t\t}\r\n\t\t}\r\n\t\tAnalizador_Sintactico.salida.agregar_DW();\r\n\t\t\r\n\t\t//si NO hay ningun metodo dinamico -> VT con NOP\r\n\t\tif (! esDinamico)\r\n\t\t\tAnalizador_Sintactico.salida.generar(\"NOP\",\"no hago nada\");\r\n\t\t\r\n\t\t//genero codigo para todos los metodos\r\n\t\tAnalizador_Sintactico.salida.generar(\".CODE\",\"seccion codigo de la clase \"+this.nombre);\r\n\t\t\r\n\t\tList<EntradaPar> listaParams;\r\n\t\tfor(EntradaMetodo m: entradaMetodo.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(m);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= m.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\t\r\n\t\t\t\t//si es dinamico m -> offset desde 3\r\n\t\t\t\tif (m.getModificador().equals(\"dynamic\")) {\r\n\t\t\t\t\tp.setOffset((listaParams.size() +4) - p.getUbicacion());\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t//si es estatico m -> offset desde 2\r\n\t\t\t\t\tp.setOffset((listaParams.size() +3) - p.getUbicacion());\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t//genero el codigo del cuerpo de ese metodo\r\n\t\t\tm.generar();\r\n\t\t}\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//genero codigo para todos los constructores\r\n\t\tfor(EntradaCtor c: entradaCtor.values()) {\r\n\t\t\t//metodo actual es m\r\n\t\t\tAnalizador_Sintactico.TS.setMetodoActual(c);\r\n\t\t\t\r\n\t\t\t//SETEO el offset de sus parametros\r\n\t\t\tlistaParams= c.getEntradaParametros();\r\n\t\t\t\r\n\t\t\tfor(EntradaPar p: listaParams) {\r\n\t\t\t\t//seteo offset de p\r\n\t\t\t\tp.setOffset(listaParams.size() +4 - p.getUbicacion());\t// +4 porque el ctor tiene this\r\n\t\t\t}\t\r\n\t\t\t\r\n\t\t\t//genero el codigo de ese metodo\r\n\t\t\tc.generar();\r\n\t\t}\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"public void trenneVerbindung();",
"public abstract String getFullCode();",
"@SuppressWarnings(\"static-access\")\r\n\tpublic static void main(String args[]) {\n//\t koenig1.getHP();\r\n//\t \r\n//\t koenig1.getAttribute();\r\n//\t \r\n\t Generator.Generate(Generator.Anzahl(), Generator.Tier());\r\n\t \r\n\t\t \r\n\t }",
"private UsineJoueur() {}",
"public void createCode(){\n\t\tsc = animationScript.newSourceCode(new Coordinates(10, 60), \"sourceCode\",\r\n\t\t\t\t\t\t null, AnimProps.SC_PROPS);\r\n\t\t \r\n\t\t// Add the lines to the SourceCode object.\r\n\t\t// Line, name, indentation, display dealy\r\n\t\tsc.addCodeLine(\"1. Berechne für jede (aktive) Zeile und Spalte der Kostenmatrix\", null, 0, null); // 0\r\n\t\tsc.addCodeLine(\" die Differenz aus dem kleinsten (blau) und zweit-kleinsten (lila)\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Element der entsprechenden Zeile/ Spalte.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"2. Wähle die Zeile oder Spalte (grün) aus bei der sich die größte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" Differenz (blau) ergab.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"3. Das kleinste Element der entsprechenden Spalte\", null, 0, null); \r\n\t\tsc.addCodeLine(\" (bzw. Zeile) gibt nun die Stelle an, welche im\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Transporttableau berechnet wird (blau).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"4. Nun wird der kleinere Wert von Angebots- und\", null, 0, null); // 4\r\n\t\tsc.addCodeLine(\" Nachfragevektor im Tableau eingetragen.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"5. Anschließend wird der eingetragene Wert von den Rändern\", null, 0, null); // 5\r\n\t\tsc.addCodeLine(\" abgezogen (mindestens einer muss 0 werden). \", null, 0, null);\r\n\t\tsc.addCodeLine(\"6. Ist nun der Wert im Nachfragevektor Null so markiere\", null, 0, null); // 6\r\n\t\tsc.addCodeLine(\" die entsprechende Spalte in der Kostenmatrix. Diese\", null, 0, null);\r\n\t\tsc.addCodeLine(\" wird nun nicht mehr beachtet (rot). Ist der Wert des\", null, 0, null);\r\n\t\tsc.addCodeLine(\" Angebotsvektors Null markiere die Zeile der Kostenmatrix.\", null, 0, null);\r\n\t\tsc.addCodeLine(\"7. Der Algorithmus wird beendet, falls lediglich eine Zeile oder\", null, 0, null); // 8\r\n\t\tsc.addCodeLine(\" Spalte der Kostenmatrix unmarkiert ist (eines reicht aus).\", null, 0, null);\r\n\t\tsc.addCodeLine(\"8 . Der entsprechenden Zeile bzw. Spalte im Transporttableau werden\", null, 0, null); // 9\t\t \r\n\t\tsc.addCodeLine(\" die restlichen Angebots- und Nachfragemengen zugeordnet.\", null, 0, null);\r\n\t\t\r\n\t}",
"void kiemTraThangHopLi() {\n }",
"static void feladat5() {\n\t}",
"public GeneradorSaludos()\n {\n mensaje = \"\\nSaludo en modo texto \\n\\nBienvenido/a al curso de programación \\n\" + \n \"orientada a objetos en Java utilizando BlueJ\";\n }",
"public void xuat() {\n\n\t}",
"public static void main(String[] args ){\n punto5();\n\n }",
"@Override\n public void memoria() {\n \n }",
"public Generateur() {\n }",
"@Override\n\tpublic void jugar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"protected MetadataUGWD() {/* intentionally empty block */}",
"public void mo21879u() {\n }",
"private List<String> runCode(JasminBytecode code) throws AssembleException {\n // Turn the Jasmin code into a (hopefully) working class file\n if (code == null) {\n throw new AssembleException(\"No valid Jasmin code to assemble\");\n }\n AssembledClass aClass = AssembledClass.assemble(code);\n // Run the class and return the output\n SandBox s = new SandBox();\n s.runClass(aClass);\n return s.getOutput();\n }",
"void berechneFlaeche() {\n\t}",
"@Override\r\n\tpublic String mamar() {\n\t\treturn \"Usando Leite.\";\r\n\t}",
"void mo1940i();",
"protected final void emitCode() {\n int bytecodeSize = request.graph.method() == null ? 0 : request.graph.getBytecodeSize();\n request.compilationResult.setHasUnsafeAccess(request.graph.hasUnsafeAccess());\n GraalCompiler.emitCode(request.backend, request.graph.getAssumptions(), request.graph.method(), request.graph.getMethods(), request.graph.getFields(), bytecodeSize, lirGenRes,\n request.compilationResult, request.installedCodeOwner, request.factory);\n }",
"public void foundationGrab(){\n\n }",
"public abstract String use();",
"public void muere() {\n System.out.println(\"Ugh... Llegó mi hora... Adios.\");\n }",
"public void redibujarAlgoformers() {\n\t\t\n\t}",
"public void miseAJour();",
"public void aplicarDescuento();",
"private void mo71773u() {\n List imageInfos = this.f73950g.getImageInfos();\n if (imageInfos != null && !imageInfos.isEmpty()) {\n ImageInfo imageInfo = (ImageInfo) imageInfos.get(0);\n if (imageInfo != null) {\n this.mCoverView.setVisibility(0);\n this.mLineProgressBar.mo74361a();\n C23323e.m76524b(this.mCoverView, imageInfo.getLabelLarge());\n C23323e.m76502a(imageInfo.getLabelLarge(), (C23328a) new C23328a() {\n /* renamed from: a */\n public final void mo60609a(C13346c<C13326a<C13645c>> cVar) {\n FeedImageViewHolder.this.mLineProgressBar.mo74362b();\n }\n\n /* renamed from: a */\n public final void mo60610a(Exception exc) {\n FeedImageViewHolder.this.mLineProgressBar.mo74362b();\n }\n });\n }\n }\n }",
"@Override\n\tpublic void yürü() {\n\n\t}",
"public void outsource()\n\t{\n\t\tconstructPrefix();\t \n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"public void mo21782G() {\n }",
"protected void mo6255a() {\n }",
"public static void main (String args []) {\n\t\t Automovel a = new Automovel ( \"Edurdo\",\"Palio\", \"JWO2125\", \n 2002);\n\t\t //troca de mensagens (chamada ao metodo imprimir())\n\t\t //a.getAno();\n\t\t a.imprimirInfo();\n\t\t System.out.println (\"***Transferencia de Proprietario***\");\n\t\t a.setNomeProprietario(\"Rosa\");\n\t\t a.imprimirInfo();\n\t\t Automovel b = new Automovel (\"Rodrigo\", \"Parati\", \n\t\t \"JSX6481\", 1999);\n\t\t b.imprimirInfo();\n\t\t System.out.println (\"***Mudanca de Placa***\");\n\t\t b.setPlaca(\"SDK2581\");\n\t\t b.imprimirInfo();\n\t\t }",
"public static void main(String[] args) {\n //Ersetzt jetzt mal unseren Parser, Stell Dir vor\n // das Ding liest das Beispiel da oben ^^.\n final StatementNode[] statementNodes = readStatements();\n \n //Zustände:\n // - FillSymbolTable (was für Symbole [variablen, ...] gibt es)\n // - TypInferenz (Was für Typen haben die Expressions und sind die eingaben semantisch korrekt)\n // - CodeGenerierung oder Ausführung (ersetzen wir mit \"schreibe die Werte aller Variablen nach Ende der Ausführung\")\n \n \n final SymbolTabelle symbolTabelle = new SymbolTabelle();\n //IDEE 2:\n //Ich gebe Statements und Expressions nur eine Methode mit Visitor als Callback\n final StatementVisitorSymbolTabelle statementVisitorSymbolTabelle = new StatementVisitorSymbolTabelle(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorSymbolTabelle);\n }\n \n final StatementVisitorTypInferenz statementVisitorTypInferenz = new StatementVisitorTypInferenz(symbolTabelle);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorTypInferenz);\n }\n \n PseudoLaufContext laufContext = new PseudoLaufContext();\n final StatementVisitorCodeGen statementVisitorCodeGen = new StatementVisitorCodeGen(laufContext);\n for(StatementNode statementNode : statementNodes) {\n statementNode.accept(statementVisitorCodeGen);\n }\n \n laufContext.druckeVariablen();\n \n //Zusammenfassung:\n //Reduktion des Problems darauf, den Code nur noch von einem Abhängig zu machen\n //Jetzt nur noch abhängig vom Typ des Statements\n \n \n //Problem hierbei:\n //Ich muss selbst angeben, in welchem Zustand ich bin\n //Code-Duplizierung\n }",
"@Override\n\tpublic void anular() {\n\n\t}",
"public void run() {\n\t\t\t\tVerticalPanel panelCompteRendu = new VerticalPanel();\r\n\t\t\t\thtmlCompteRendu = new HTML();\r\n\t\t\t\tpanelCompteRendu.add(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"compteRendu\").add(panelCompteRendu);\r\n\t\t\t\t\r\n\t\t\t\tVerticalPanel panelLegende = new VerticalPanel();\r\n\t\t\t\thtmlLegende = new HTML();\r\n\t\t\t\tpanelLegende.add(htmlLegende);\r\n\t\t\t\tRootPanel.get(\"legende\").add(htmlLegende);\r\n\t\t\t\t\r\n\t\t\t\t// temps d'intˇgration restant\r\n\t\t\t\tLabel tempsDIntegrationRestant = new Label();\r\n\t\t\t\tRootPanel.get(\"tempsDIntegrationRestant\").add(tempsDIntegrationRestant);\r\n\t\t\t\t\r\n\t\t\t\t// ajout de la carte\r\n\t\t\t\twMap = new MapFaWidget2(htmlCompteRendu);\r\n\t\t\t\tRootPanel.get(\"carte\").add(wMap);\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t// ajout du bouton reset\r\n\t\t\t\tButton boutonReset = new Button(\"Nettoyer la carte\");\r\n\t\t\t\tboutonReset.addClickHandler(actionBoutonReset());\r\n\t\t\t\tRootPanel.get(\"boutonReset\").add(boutonReset);\r\n\r\n\t\t\t\t// ajout du formulaire d'intˇgration\r\n\t\t\t\tnew FileUploadView(wMap,htmlLegende, htmlCompteRendu,tempsDIntegrationRestant);\r\n\r\n\t\t\t}",
"public Encargar() { \n initComponents();\n inicializar();\n \n }",
"public void stoperJeux() {\n\t\t\n\t\tliaison.stopper();\n\t}",
"public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}",
"public void program() throws Exception {\r\n int valg;\r\n skrivInn(\"dvdarkiv2.txt\");//leser inn fra dvd arkivet\r\n while(true) {\r\n meny();//kaller paa meny for a skrive ut menyen etter hvert fullforte valg\n System.out.println(\"Skriv inn valget ditt\");\n valg = sjekkOmTall();//kaller paa metoden for o sorge for aa faa valg\n if (valg == 1) {\n nyPerson();\n }\n else if (valg == 2) {\n kjop();\n }\n else if (valg == 3) {\n laan();\n }\n else if (valg == 4) {\n visPerson();\n }\n else if (valg == 5) {\n visOversikt();\n }\n else if (valg == 6){\n retur();\n }\n else if (valg == 7) {\n avslutt();\n }\n }\r\n }",
"void TaktImpulsAusfuehren ()\n {\n \n wolkebew();\n \n }",
"public static void main(String[] args) {\n\t\t\n\t\tRubro rubro1= new Rubro (\"Cafeteria\");\n\t\t\n\t\t// inicializo el arreglo de importes\n\t\t\n\t\trubro1.inicializarGastos();\n\t\t\n\t\t\n\t\t// le cargo a enero y febrero gastos // pruebo método agregarGasto\n\t\t\n\t\trubro1.agregarGasto(MESDELANIO.ABRIL, 100);\n\t\trubro1.agregarGasto(MESDELANIO.ENERO, 200);\n\n\t\t\n\t\t// VEO QUE LO HAYA CARGADO BIEN\n\t\t\n\t\tSystem.out.println(rubro1);\n\t\t\n\t\n\t\t// pruebo método getNombre()\n\n\t\trubro1.getName();\n\t\tSystem.out.println(rubro1.getName());\n\t\t\n\t\t// pruebo método getTotalGastos - pido enero y pido abril \n\t\t// debería darme 200 y 100\n\t\t\n\t\trubro1.getTotalGastos(MESDELANIO.ENERO);\n\t\trubro1.getTotalGastos(MESDELANIO.ABRIL);\n\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ENERO));\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ABRIL));\n\t\t\n\t\t\n\t\t/// ---- MÉTODOS DE GASTOSTOTAL\n\t\t\n\t\t\n\t\t// Creo un objeto gasto anual\n\t\t\n\t\tGastoAnual gasto2020 = new GastoAnual ();\n\t\t\n\t\t// AGREGO rubros\n\t\tgasto2020.agregarRubro(rubro1);\n\t\t\n\t\t// pruebo el método AgregarGasto\n\t\t\n\t\tgasto2020.agregarGastoNuevo(MESDELANIO.ENERO, \"Cafeteria\", 200);\n\t\tgasto2020.agregarGastoNuevo(MESDELANIO.ENERO, \"Cafeteria\", 200);\n\t\n\t\t\n // esto debería agregar 200 pesos a cafeteria, lo cual daría un total de 400 \n\t\t\n\t\trubro1.getTotalGastos(MESDELANIO.ENERO);\n\t\tSystem.out.println(rubro1.getTotalGastos(MESDELANIO.ENERO));\n\t\t\n\t\t\n\t\t// ahora pruebo si agrega un rubro que no existe con AgregarGastoNuevo\n\t\t\n\tgasto2020.agregarGastoNuevo(MESDELANIO.MARZO, \"Tintoreria\", 200);\n\tSystem.out.println(gasto2020);\n\t\t \n\t\t\n\t\t// pruebo consolidadoDeGastos()\n\t\t\n\t\tgasto2020.consolidadoDeGastos();\n\t\t\n\t\t// pruebo gastoAcumulado(MESDELANIO mes) \n\t\t\n\t\tgasto2020.gastoAcumulado(MESDELANIO.ENERO);\n\t\tgasto2020.gastoAcumulado(MESDELANIO.FEBRERO);\n\t\tgasto2020.gastoAcumulado(MESDELANIO.MARZO);\n\t\t\n\t\t// deberia dar 400\n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.ENERO));\n\t\t\n\t\t// deberia dar 0 \n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.FEBRERO));\n\t\t\n\t\t// deberia dar 200\n\n\t\tSystem.out.println(gasto2020.gastoAcumulado(MESDELANIO.MARZO));\n\n\t\t\n\t\t\n\t\t// pruebo gastoAcumulado(String nombreRubro) por rubro\n\t\t\n\t\tgasto2020.gastoAcumulado(\"Cafeteria\");\n\t\t\n\t\t// debería dar 400\n\t\t\n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Cafeteria\"));\n\t\t\n\t\t// debería dar 200 \n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Tintoreria\"));\n\t\t\n\t\t\n\t\t// debería dar -1\n\t\tSystem.out.println(gasto2020.gastoAcumulado(\"Supermercado\"));\n\t\t\n\t\t\n\t\t// pruebo informarConsumoPorMes y por promedio \n\t\t\n\t\tgasto2020.informarConsumosPorMes();\n\t\t\n\t\t\n\t\t// pruebo public void informarMesMayorConsumo() - debe darme enero con 400 \n\t\t\n\t\t\n\t\tgasto2020.informarMesMayorConsumo();\n\t\t\n\n\t\n\t\t\n\t\t\n\n\t}",
"@Override\r\n\tpublic void onAyuda() {\n\t\t\r\n\t}",
"protected void generar() {\n generar(1, 1);\n }",
"public void furyo ()\t{\n }",
"public static void main(String[] args) {\r\n\t\tgenera();\r\n\r\n\t}",
"public static void main(String[] args) {\r\n Burbuja B = new Burbuja ();\r\n B.ordenar();\r\n \r\n \r\n }",
"@Deprecated\n\tprivate void oldCode()\n\t{\n\t}",
"public void use() {//Sample use for book- reading, use command 'use book' to use it\n\t\tSystem.out.println(\"Here is a book for you: Quiddich through the ages; hope you enjoy!\");\n\t}",
"public static void main(String[] args) {\n \n fillArrayList();\n getNextToken();\n parseProgram();\n\n //TODO output into file ID.java\n //This seems to work\n// File f = new File(programID+\".java\");\n// try {\n// PrintWriter write = new PrintWriter(f);\n// write.print(sb.toString());\n// write.flush();\n// write.close();\n// } catch (FileNotFoundException ex) {\n// Logger.getLogger(setTranslator.class.getName()).log(Level.SEVERE, null, ex);\n// }\n System.out.println(sb.toString());\n \n }"
] | [
"0.62920094",
"0.6089999",
"0.59781784",
"0.5931538",
"0.56597775",
"0.55460316",
"0.5544298",
"0.5543962",
"0.55160767",
"0.5477822",
"0.54438496",
"0.5409089",
"0.5397287",
"0.53189963",
"0.531878",
"0.53158957",
"0.5271337",
"0.526335",
"0.52602506",
"0.525714",
"0.5252127",
"0.5234743",
"0.52150446",
"0.5211692",
"0.5209045",
"0.51986873",
"0.51874936",
"0.5185072",
"0.5180438",
"0.518042",
"0.51785445",
"0.5176043",
"0.5175245",
"0.5173864",
"0.51718444",
"0.51520336",
"0.513851",
"0.5135256",
"0.513512",
"0.51351047",
"0.5134275",
"0.51331514",
"0.5127694",
"0.51254815",
"0.51157796",
"0.50885063",
"0.5076058",
"0.50743055",
"0.505762",
"0.505762",
"0.50559825",
"0.50557685",
"0.5054806",
"0.5048906",
"0.50473905",
"0.5039437",
"0.50390065",
"0.50373393",
"0.5036191",
"0.5035076",
"0.50266504",
"0.5016597",
"0.5012982",
"0.5011947",
"0.50106543",
"0.5007622",
"0.50044507",
"0.49993166",
"0.4994093",
"0.49921274",
"0.4991853",
"0.4990843",
"0.49901098",
"0.49861783",
"0.4984373",
"0.49817175",
"0.49787676",
"0.49764454",
"0.49736604",
"0.49715146",
"0.4971376",
"0.49639535",
"0.49610525",
"0.49610457",
"0.49609068",
"0.4958033",
"0.495229",
"0.49494326",
"0.4946719",
"0.4942446",
"0.4940541",
"0.4940536",
"0.4937175",
"0.49365455",
"0.49303114",
"0.49295652",
"0.49294838",
"0.4929368",
"0.49271998",
"0.4924593",
"0.49221796"
] | 0.0 | -1 |
Obtient le User selon le code d'usager fourni. | protected User getUser(String codeUsager) {
Optional<User> optionalUser = userServiceMetier.getUserByCode(codeUsager);
if (optionalUser.isPresent()) {
return optionalUser.get();
} else {
String errorMsg = String.format("getUser - No user exist with the code (%s) '%s'.", PARAM_KEY_UID,
codeUsager);
LOGGER.error(errorMsg);
throw new ServiceException(errorMsg);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public Usuario getUser() {\n return user;\n }",
"private void getUser(){\n mainUser = DatabaseAccess.getUser();\n }",
"@Override\n public User getUser() {\n return user;\n }",
"@Override\n public User getUser() {\n return user;\n }",
"java.lang.String getUser();",
"User getUser();",
"User getUser();",
"User getPassedUser();",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public java.lang.String getUser(){\r\n return localUser;\r\n }",
"public User getUser() {\n\treturn user;\n }",
"public User getUser() { return this.user; }",
"private User getUser() {\r\n\t\tUserService userService = UserServiceFactory.getUserService();\r\n\t\treturn userService.getCurrentUser();\r\n\t}",
"public String getUser(){\n \treturn user;\n }",
"public ScrumzuUser getUser() {\n\t\treturn user;\n\t}",
"public String getUser()\n {\n return _user;\n }",
"public User getUser(){\n\t\treturn user;\n\t}",
"@Override\r\n\tpublic Utilisateur addUser() {\n\t\treturn null;\r\n\t}",
"public User getUser(){\r\n\t\treturn this.user;\r\n\t}",
"public String getUser()\n {\n return this.user;\n }",
"public String getUser()\n {\n return this.user;\n }",
"public String getUser()\n {\n return this.user;\n }",
"public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }",
"public User usuario() {\r\n Authentication auth = SecurityContextHolder.getContext().getAuthentication();\r\n User user = userService.findUserByEmail(auth.getName());\r\n return user;\r\n }",
"public User getUser();",
"public SimpleUser getUser() {\n return user;\n }",
"public final User getUser() {\t\r\n\t\treturn this.user;\r\n\t}",
"public User getUser(){\n\t\treturn this.user;\n\t}",
"public BaseUser getUser() {\r\n\t\treturn user;\r\n\t}",
"public User getUser(){return this.user;}",
"public String getUser() {\r\n return user;\r\n }",
"@Override\r\n public User getUser() throws RemoteException, SQLException {\r\n return user;\r\n }",
"public abstract User getUser();",
"public User getUser() {\r\n return user;\r\n }",
"protected void accionUsuario() {\n\t\t\r\n\t}",
"public java.lang.String getUser() {\n return user;\n }",
"public String getUser() {\n\treturn strUser;\n }",
"@Override\r\n\tpublic Utilisateur getUser(String nom) {\n\t\treturn null;\r\n\t}",
"public void addUser() {\n\t\tUser user = dataManager.findCurrentUser();\r\n\t\tif (user != null) {\r\n\t\t\tframeManager.addUser(user);\r\n\t\t\tpesquisar();\r\n\t\t} else {\r\n\t\t\tAlertUtils.alertSemPrivelegio();\r\n\t\t}\r\n\t}",
"public User() {\n this.firstName = \"Lorenzo\";\n this.lastName = \"Malferrari\";\n this.username = \"malfe.lore@gmail.com\";\n this.email = \"malfe.lore@gmail.com\";\n this.password = \"123456\";\n this.city = \"Bologna\";\n this.country = \"Italia\";\n this.gender = \"Maschio\";\n this.birthdate = new Date();\n this.age = 21;\n this.imgUser = 1;\n this.last_access = new Date();\n this.registration_date = new Date();\n }",
"public IUser getUser() {\n \t\treturn null;\n \t}",
"private void fetchUser() {\n UserFetcher userFetcher = new UserFetcher();\n userFetcher.setListener(this);\n userFetcher.getUser();\n }",
"private void loadUserInformation(){\n FirebaseUser user = mAuth.getCurrentUser();\n\n String displayEmail = user.getEmail();\n email.setText(\"Velkommenn \" + displayEmail+\"!\");\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public String getUser() {\n return user;\n }",
"public User getUser(){\n return this.getAccountController().getUser();\n }",
"public static String getBiblioUser() {\n\t\treturn \"user\";\n\t}",
"ApplicationUser getUser();",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"public User getUser() {\r\n\t\treturn user;\r\n\t}",
"private void initUser() {\n\t}",
"public User getUser() {\n\n if (user == null) {\n user = new User(new VOUserDetails());\n FacesContext fc = FacesContext.getCurrentInstance();\n Locale locale = fc.getViewRoot().getLocale();\n user.setLocale(locale.toString());\n }\n return user;\n }",
"private UserPrefernce(){\r\n\t\t\r\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"public String getUser() {\r\n\t\treturn user;\r\n\t}",
"String getUser();",
"String getUser();",
"public abstract String getUser();",
"private void editUser(){\n getDeviceLocation();\n ProxyBuilder.SimpleCallback<User> callback = returnedUser-> responseEdit(returnedUser);\n ServerManager.editUserProfile(userManager,callback);\n }",
"private void getUser(){\n user = new User();\n SharedPreferences preferences = getSharedPreferences(\"account\", MODE_PRIVATE);\n user.setId(preferences.getInt(\"id\", 0));\n user.setPhone(preferences.getString(\"phone\", \"\"));\n user.setType(preferences.getInt(\"type\",0));\n }",
"public String getUser() {\n return this.user;\n }",
"public static String getUser() {\r\n return user;\r\n }",
"public User getUser() {\n return user;\n }",
"public User getUser() {\n return user;\n }",
"public User getUser() {\n return user;\n }",
"public User getUser() {\n return user;\n }",
"public void setUser(User user) { this.user = user; }",
"public Long getUser() {\n return user;\n }",
"public void changeUser() {\n refreshState();\n SystemUserDTO user = null;\n SystemUserDTO systemUser = null;\n systemUser = ctrl.getSystemUser(this.inputTextUser);\n if (systemUser == null) {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.addSystemUser(user);\n } else {\n user = new SystemUserDTO(this.inputTextUser, this.inputTextFName, this.inputTextLName, this.inputTextEMail);\n ctrl.updateSystemUser(user);\n }\n refreshState();\n this.currentUser = user;\n }",
"public String getUser() {\n\t\treturn user;\n\t}",
"public User getUser(){\n return User.getUser(this.event.getAuthor());\n }",
"User getCurrentLoggedInUser();",
"public final void mo91725f(User user) {\n }",
"public String getUser() {\r\n \t\treturn properties.getProperty(KEY_USER);\r\n \t}",
"public Motile getUser() {\n return user;\n }",
"private void controladorUser(Controlador controlador){\n this.contUserCrearProyecto = controlador.getUserCrearProyecto();\n inicioUser.setControlCrearProyecto(contUserCrearProyecto);\n \n this.contUserCrearColectivo = controlador.getUserCrearColectivo();\n inicioUser.setControlCrearColectivo(contUserCrearColectivo);\n\n this.contInformes = controlador.getInformes();\n inicioUser.setControlSolicitarInformes(contInformes); \n \n this.contFiltrar = controlador.getFiltrar();\n inicioUser.setControlFiltrar(contFiltrar);\n\n this.contLimpiar = controlador.getLimpiarFiltro();\n inicioUser.setControlLimpiarFiltro(contLimpiar);\n }",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public User getUser() {\n\t\treturn user;\n\t}",
"public static String getUser() {\n return user;\n }",
"public User getLoggedUser();",
"private void setUpUser() {\n Bundle extras = getIntent().getExtras();\n mActiveUser = extras.getString(Helper.USER_NAME);\n mUser = mDbHelper.getUser(mActiveUser, true);\n Log.d(TAG, mUser.toString());\n\n if (mUser == null) {\n Toast.makeText(getBaseContext(), \"Error loading user data\", Toast.LENGTH_SHORT);\n return;\n }\n\n mIsNumPassword = Helper.isNumeric(mUser.getPassword());\n\n mKeyController = new KeyController(getApplicationContext(), mUser);\n }",
"public String getUser() {\n\t\t\t\treturn null;\r\n\t\t\t}",
"private User getUser() {\n String phone = editTextPhone.getText().toString();\n String username = editTextUsername.getText().toString();\n String password = editTextPassword.getText().toString();\n String password2 = editTextPassword2.getText().toString();\n if (phone.isEmpty()) {\n Toast.makeText(getActivity(), \"Số điện thoại không được để trống\", Toast.LENGTH_LONG).show();\n editTextPhone.requestFocus();\n } else if (username.isEmpty()) {\n Toast.makeText(getActivity(), \"Tên không được để trống\", Toast.LENGTH_LONG).show();\n editTextUsername.requestFocus();\n } else if (password.isEmpty()) {\n Toast.makeText(getActivity(), \"Password không được để trống\", Toast.LENGTH_LONG).show();\n editTextPassword.requestFocus();\n } else if (!password2.equals(password)) {\n Toast.makeText(getActivity(), \"Password nhập lại không không trùng khớp\", Toast.LENGTH_LONG).show();\n editTextPassword2.requestFocus();\n } else {\n User user = new User(phone, username, password);\n return user;\n }\n return null;\n }",
"@Override\n public java.lang.String getUserName() {\n return _partido.getUserName();\n }",
"public void setUser(String user) {\r\n this.user = user;\r\n }",
"void setUser(OSecurityUser user);",
"private void toUser() {\n this.dispose();\n new User(username);\n }",
"@Override\r\n\tpublic User getUseByUsernameAndPassword(User user) {\n\t\tString sql = \"select id,username,password,email from user where username=? and password=?\";\r\n\t\t\r\n\t\treturn this.queryOne(sql,user.getUsername(),user.getPassword());\r\n\t}",
"private void setUser(UserService.User user) {\n this.userName = user.getName();\n\n DateFormat dateTimeInstance =\n SimpleDateFormat.getDateTimeInstance(DateFormat.LONG,\n DateFormat.LONG);\n this.lastUpdateString = dateTimeInstance.format(user.getLastUpdate());\n\n this.notifyPropertyChanged(BR.userName);\n this.notifyPropertyChanged(BR.lastUpdateString);\n }",
"@PermitAll\n @Override\n public User getCurrentUser() {\n Map params = new HashMap<String, Object>();\n params.put(CommonSqlProvider.PARAM_WHERE_PART, User.QUERY_WHERE_USERNAME);\n params.put(User.PARAM_USERNAME, this.getUserName());\n return getRepository().getEntity(User.class, params);\n }",
"public int getIdUser() {\n return idUser;\n }",
"public int getIdUser() {\n return idUser;\n }",
"@Override\n public User getUserInfo() {\n return User.AUTHORIZED_USER;\n }",
"public String getUser() {\n\t\t\treturn user;\n\t\t}"
] | [
"0.6913676",
"0.69046175",
"0.687784",
"0.687784",
"0.68495935",
"0.6817765",
"0.6817765",
"0.68166596",
"0.68098074",
"0.68098074",
"0.68098074",
"0.6782689",
"0.6774208",
"0.6738516",
"0.67336863",
"0.67297256",
"0.6701904",
"0.66743505",
"0.66657007",
"0.6652614",
"0.6631254",
"0.6631254",
"0.6631254",
"0.6627244",
"0.6627244",
"0.6617537",
"0.6601085",
"0.6600136",
"0.6594947",
"0.6594451",
"0.65898675",
"0.6585257",
"0.65679663",
"0.65655994",
"0.6563441",
"0.6561985",
"0.65404326",
"0.6536601",
"0.6534284",
"0.65268457",
"0.6524871",
"0.65213555",
"0.6518082",
"0.65178776",
"0.6509868",
"0.6509868",
"0.6509868",
"0.6505316",
"0.6500183",
"0.64996976",
"0.64845574",
"0.64845574",
"0.64845574",
"0.64801425",
"0.6479174",
"0.6475217",
"0.6475175",
"0.6475175",
"0.6473349",
"0.6473349",
"0.64689237",
"0.6462924",
"0.6461562",
"0.64570713",
"0.64483005",
"0.644768",
"0.644768",
"0.644768",
"0.644768",
"0.6444509",
"0.6437369",
"0.6424569",
"0.64220333",
"0.6415021",
"0.6410807",
"0.6410637",
"0.6405899",
"0.6397722",
"0.63913023",
"0.63874114",
"0.63874114",
"0.63874114",
"0.63874114",
"0.63874114",
"0.63874114",
"0.6385092",
"0.6383853",
"0.6379271",
"0.6369231",
"0.63691545",
"0.63690215",
"0.63669133",
"0.63659203",
"0.6364842",
"0.6362386",
"0.6341371",
"0.6340695",
"0.6323015",
"0.6323015",
"0.63223207",
"0.6311356"
] | 0.0 | -1 |
write your code here | public static void main(String[] args) throws Exception {
Scanner scn = new Scanner(System.in);
int n = scn.nextInt();
int[][] mat = new int[n][n];
for (int i = 0; i < n; i++) {
for (int j = 0; j < n; j++) {
mat[i][j] = scn.nextInt();
}
}
int ele = scn.nextInt();
search(mat, ele);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void logic(){\r\n\r\n\t}",
"public static void generateCode()\n {\n \n }",
"@Override\n\tprotected void logic() {\n\n\t}",
"private static void cajas() {\n\t\t\n\t}",
"void pramitiTechTutorials() {\n\t\n}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"public void ganar() {\n // TODO implement here\n }",
"public static void main(String[] args) {\n // write your code here - this is called comment and it always starts with double slash\n // and comlier will ignore this because of the // sign.\n // I am gonna say hello\n // JAVA IS CASE SENSITIVE LANGUAGE\n // System and system are very different things in java\n //Hello AND hello are different for java\n // System.out.println(\"Hello Batch 15!\");\n // System.out.println(\"I am still here.\");\n // System.out.println(\"I love Java.\");\n\n // Write a program to display your information.\n // When you run it, it should have this outcome.\n // I am your name here\n // I am from batch 15\n // I am from your city here\n // I love Java\n\n System.out.println(\"I am Sevim.\");\n System.out.println(\"I am from Batch 15.\");\n System.out.println(\"I'm from New Jersey.\");\n System.out.println(\"I love Java.\");\n\n\n\n }",
"CD withCode();",
"private stendhal() {\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"public void gored() {\n\t\t\n\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\r\n\tpublic void runn() {\n\t\t\r\n\t}",
"public void genCode(CodeFile code) {\n\t\t\n\t}",
"public void hello(){\n\t\t\r\n \t\r\n\t\t\r\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}",
"public void baocun() {\n\t\t\n\t}",
"public void mo38117a() {\n }",
"public void furyo ()\t{\n }",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"private void strin() {\n\n\t}",
"public void themesa()\n {\n \n \n \n \n }",
"Programming(){\n\t}",
"@Override\n\tvoid output() {\n\t\t\n\t}",
"private void yy() {\n\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"void rajib () {\n\t\t \n\t\t System.out.println(\"Rajib is IT Eng\");\n\t }",
"private void kk12() {\n\n\t}",
"public void edit() {\n\t\tSystem.out.println(\"编写java笔记\");\r\n\t}",
"public static void main(String[] args) {\n\t// write your code here\n }",
"private static void ThridUmpireReview() {\n\t\tSystem.out.println(\" Umpier Reviews the Score Board\");\n\t\t \n\t\t\n\t}",
"@Override\r\n\t\tpublic void doDomething() {\r\n\t\t\tSystem.out.println(\"I am here\");\r\n\t\t\t\r\n\t\t}",
"protected void mo6255a() {\n }",
"public void gen(CodeSeq code, ICodeEnv env) {\n\r\n\t}",
"@Override\n\tpublic void function() {\n\t\t\n\t}",
"public void working()\n {\n \n \n }",
"@Override\n\tprotected void postRun() {\n\n\t}",
"public void perder() {\n // TODO implement here\n }",
"public void smell() {\n\t\t\n\t}",
"protected void execute() {\n\t\t\n\t}",
"public void mo55254a() {\n }",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tpublic void orgasm() {\n\t\t\n\t}",
"public void cocinar(){\n\n }",
"@Override\r\n\tvoid func04() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"public void run() {\n\t\t\t\t\n\t\t\t}",
"protected void execute() {\n\n\n \n }",
"@Override\n public void execute() {\n \n \n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\r\n\tpublic void crawl_data() {\n\t\t\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"public static void main(String args[]) throws Exception\n {\n \n \n \n }",
"@Override\r\n\tpublic void code() {\n\t\tus.code();\r\n\t\tSystem.out.println(\"我会java...\");\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"protected void display() {\n\r\n\t}",
"private void sout() {\n\t\t\n\t}",
"private static void oneUserExample()\t{\n\t}",
"public void nhapdltextlh(){\n\n }",
"public void miseAJour();",
"protected void additionalProcessing() {\n\t}",
"private void sub() {\n\n\t}",
"@Override\n\tpublic void view() {\n\t\t\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void engine() {\r\n\t\t// TODO Auto-generated method stub\t\t\r\n\t}",
"@Override\r\n\tpublic void code() {\n\t\tSystem.out.println(\"我会C语言....\");\r\n\t}",
"void mo67924c();",
"@Override\n\tpublic void dosomething() {\n\t\t\n\t}",
"@Override\r\n public void run() {\n basicEditor.createEdge(); // replaced Bibianas method with Moritz Roidl, Orthodoxos Kipouridis\r\n }",
"public void mo5382o() {\n }",
"@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void doF6() {\n\t\t\r\n\t}",
"public void mo3376r() {\n }",
"public static void main(String[] args)\r\n {\n System.out.println(\"Mehedi Hasan Nirob\");\r\n //multiple line comment\r\n /*\r\n At first printing my phone number\r\n then print my address \r\n then print my university name\r\n */\r\n System.out.println(\"01736121659\\nJamalpur\\nDhaka International University\");\r\n \r\n }",
"void kiemTraThangHopLi() {\n }",
"public void skystonePos5() {\n }",
"public final void cpp() {\n }",
"public final void mo51373a() {\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"This is the main class of this project\");\r\n\t\tSystem.out.println(\"how about this\");\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"new push\");\r\n\r\n\t\t//how to update this line\r\n\t\t\r\n\t\tSystem.out.println(\"hello there\");\r\n\r\n\t\tSystem.out.println(\"zen me shuoXXXXXXXXXXXKKKKkKKKKKKXXXXXXXX\");\r\n\r\n\t\tSystem.out.println(\"eventually we succeeded!\");\r\n\t\t//wa!!!\r\n\t\t\r\n\r\n\r\n\t\t//hen shu fu !\r\n\t\t\r\n\t\t//it is a good day\r\n\t\t\r\n\t\t//testing\r\n\r\n\t\t\r\n\t\tSystem.out.println(\"hope it works\");\r\n\t\t\r\n\r\n\t\t\r\n\r\n\t}",
"@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}"
] | [
"0.61019534",
"0.6054925",
"0.58806974",
"0.58270746",
"0.5796887",
"0.56999695",
"0.5690986",
"0.56556827",
"0.5648637",
"0.5640487",
"0.56354505",
"0.56032085",
"0.56016207",
"0.56006724",
"0.5589654",
"0.5583692",
"0.55785793",
"0.55733466",
"0.5560209",
"0.55325305",
"0.55133164",
"0.55123806",
"0.55114794",
"0.5500045",
"0.5489272",
"0.5482718",
"0.5482718",
"0.5477585",
"0.5477585",
"0.54645246",
"0.5461012",
"0.54548836",
"0.5442613",
"0.5430592",
"0.5423748",
"0.5419415",
"0.5407118",
"0.54048806",
"0.5399331",
"0.539896",
"0.5389593",
"0.5386248",
"0.5378453",
"0.53751254",
"0.5360644",
"0.5357343",
"0.5345515",
"0.53441405",
"0.5322276",
"0.5318302",
"0.53118485",
"0.53118485",
"0.53085434",
"0.530508",
"0.53038436",
"0.5301922",
"0.5296964",
"0.52920514",
"0.52903354",
"0.5289583",
"0.5287506",
"0.52869135",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.5286737",
"0.52859664",
"0.52849185",
"0.52817136",
"0.52791214",
"0.5278664",
"0.5278048",
"0.5276269",
"0.52728665",
"0.5265451",
"0.526483",
"0.526005",
"0.5259683",
"0.52577406",
"0.5257731",
"0.5257731",
"0.52560073",
"0.5255759",
"0.5255707",
"0.5250705",
"0.5246863",
"0.5243053",
"0.52429926",
"0.5242727",
"0.52396125",
"0.5239378",
"0.5232576",
"0.5224529",
"0.52240705",
"0.52210563",
"0.52203166",
"0.521787",
"0.52172214"
] | 0.0 | -1 |
System.setProperty("webdriver.gecko.driver", "/home/danilomendes/driver/geckodriver"); ProfilesIni profile = new ProfilesIni(); FirefoxProfile ffprofile = profile.getProfile("DEV_ROBO"); FirefoxOptions options = new FirefoxOptions(); options.setProfile(ffprofile); WebDriver driver = new FirefoxDriver(options); driver.navigate().to(" | @Test
public void start() {
SeleniumUtil.startDriverFirefox("DEV_ROBO");
SeleniumUtil.openURL("https://www.cadesp.fazenda.sp.gov.br/(S(aljupn5501cd5jefroucepm3))/Pages/Cadastro/Consultas/ConsultaPublica/ConsultaPublica.aspx");
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Test\n public void test(){\n\n\n FirefoxProfile profile = new FirefoxProfile();\n // profile.EnableNativeEvents = true;\n\n WebDriver driver = new FirefoxDriver(profile);\n driver.get(\"http://www.baidu.com\");\n }",
"public static WebDriver firefox()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.gecko.driver\",System.getProperty(\"user.dir\")+\"\\\\Gecko\\\\geckodriver.exe\");\r\n\t\tgk = new FirefoxDriver();\r\n\t\treturn gk;\r\n\t}",
"@BeforeClass\n\tpublic void openFirefoxBrowser(){\n\t\tdriver = new FirefoxDriver();\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t//wait = new WebDriverWait(driver,5);\n\t}",
"private void setFirefoxDriver() throws Exception {\n\t\t// Disable cache\n\t\tffProfile.setPreference(\"browser.cache.disk.enable\", false);\n\t\tffProfile.setPreference(\"browser.cache.disk_cache_ssl\", false);\n\t\tffProfile.setPreference(\"browser.cache.memory.enable\", false);\n\t\tffProfile.setPreference(\"browser.cache.offline.enable\", false);\n\t\t// Set to download automatically\n\t\tffProfile.setPreference(\"browser.download.folderList\", 2);\n\t\tffProfile.setPreference(\"browser.download.manager.showWhenStarting\", false);\n\t\tffProfile.setPreference(\"browser.helperApps.neverAsk.saveToDisk\", \"application/zip\");\n\t\tffProfile.setPreference(\"browser.download.dir\", BasePage.myTempDownloadsFolder);// \"\\\\temp_downloads\");\n\t\t// TODO: Using \"C:\" will not work for Linux or OS X support\n\t\tFile dir = new File(BasePage.myTempDownloadsFolder);// \"\\\\temp_downloads\");\n\t\tif (!dir.exists()) {\n\t\t\tdir.mkdir();\n\t\t}\n\t\t// Disable hardware acceleration\n\t\tffProfile.setPreference(\"gfx.direct2d.disabled\", false);\n\t\tffProfile.setPreference(\"layers.acceleration.disabled\", false);\n\t\tFirefoxOptions ffOptions = new FirefoxOptions();\n\n\t\t/*\n\t\t * Set FF to run headless -- Need to make conditional from browser\n\t\t * parameter -- Does NOT work properly with all necessary tests.\n\t\t */\n\t\t// ffOptions.setHeadless(true);\n\n\t\tffOptions.setProfile(ffProfile);\n\t\tcapabilities = DesiredCapabilities.firefox();\n\t\tcapabilities.setCapability(FirefoxDriver.PROFILE, ffProfile);\n\t\tWebDriver myDriver = null;\n\t\tRemoteWebDriver rcDriver;\n\n\t\tswitch (runLocation.toLowerCase()) {\n\t\tcase \"local\":\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", firefoxDriverLocation);\n\t\t\tmyDriver = new FirefoxDriver(ffOptions);\n\t\t\tbreak;\n\t\tcase \"grid\":\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), ffOptions);\n\t\t\trcDriver.setFileDetector(new LocalFileDetector());\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"testingbot\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultFirefoxVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\t// capabilities.setCapability(\"name\", testName); // TODO: set a test\n\t\t\t// name (suite name maybe) or combined with env\n\t\t\trcDriver = new RemoteWebDriver(new URL(serverURL), ffOptions);\n\t\t\tmyDriver = new Augmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tcase \"smartbear\":\n\t\t\tif (browserVersion.isEmpty()) {\n\t\t\t\tbrowserVersion = defaultFirefoxVersion;\n\t\t\t}\n\t\t\tif (platformOS.isEmpty()) {\n\t\t\t\tplatformOS = defaultPlatformOS;\n\t\t\t}\n\t\t\t//capabilities.setCapability(\"name\", testMethod.get());\n\t\t\tcapabilities.setCapability(\"build\", testProperties.getString(TEST_ENV)+\" FF-\"+platformOS);\n\t\t\tcapabilities.setCapability(\"max_duration\", smartBearDefaultTimeout);\n\t\t\tcapabilities.setCapability(\"browserName\", browser);\n\t\t\tcapabilities.setCapability(\"version\", browserVersion);\n\t\t\tcapabilities.setCapability(\"platform\", platformOS);\n\t\t\tcapabilities.setCapability(\"screenResolution\", smartBearScreenRes);\n\t\t\tcapabilities.setCapability(\"record_video\", \"true\"); Reporter.log(\n\t\t\t\t\t \"BROWSER: \" + browser, true); Reporter.log(\"BROWSER Version: \" +\n\t\t\t\t\t\t\t browserVersion, true); Reporter.log(\"PLATFORM: \" + platformOS, true);\n\t\t\tReporter.log(\"URL '\" + serverURL + \"'\", true); rcDriver = new\n\t\t\tRemoteWebDriver(new URL(serverURL), capabilities); myDriver = new\n\t\t\tAugmenter().augment(rcDriver);\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tmyDriver = new FirefoxDriver(ffOptions);\n\t\t\tbreak;\n\t\t}\n\t\tdriver.set(myDriver);\n\t}",
"@Test \n public void executeSessionTwo(){\n System.out.println(\"open the browser: FIREFOX \");\n final String GECKO_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/geckodriver.exe\";\n System.setProperty(\"webdriver.gecko.driver\", GECKO_DRIVER_DIRECTORY);\n final WebDriver driver = new FirefoxDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }",
"@Before\n public void setUp() throws Exception {\n\t //driver = WebDriverFactory.getDriver(DesiredCapabilities.firefox());\n\t driver = new FirefoxDriver();\n baseUrl = \"https://my.roboforex.com/\";\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n }",
"public static void main(String[] args) {\n\r\n\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"./sotware/geckodriver.exe\");\r\n\t\tFirefoxDriver driver=new FirefoxDriver();\r\n\t}",
"@Test\n\tpublic void TC_01_Run_On_Firefox() {\n\t\tdriver = new FirefoxDriver();\n\t\t\n\t\t//(>=48) lastest version \n\t\t//System.setProperty(\"webdriver.gecko.driver\",\"//geckodriver_path\");\n\t\t//driver = new FirefoxDriver();\n\t\t\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\tdriver.get(\"http://demo.guru99.com/v4/\");\n\t\tdriver.quit();\n\n\t}",
"public static void main(String[] args) {\n\t\tSystem.setProperty(\"webdriver.firefox.bin\", \"C:\\\\Program Files\\\\Nightly\\\\firefox.exe\");\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"G:\\\\WebUITests\\\\src\\\\test\\\\resources\\\\Drivers\\\\geckodriver.exe\");\n\t\t//System.setProperty(\"webdriver.gecko.driver\", \"G:\\\\geckodriver-v0.18.0-win64\\\\geckodriver.exe\");\n\t\t\n\t\tDesiredCapabilities capabilities=DesiredCapabilities.firefox();\n\t\tcapabilities.setCapability(\"marionette\", true);\n\t\tWebDriver driver = new FirefoxDriver(capabilities);\n\t\t//driver.navigate().to(\"http://www.google.com\");\n\t\tdriver.get(\"http://www.google.com\");\n\t\tdriver.quit();\n\t}",
"public static void main(String[] args) {\nSystem.setProperty(\"webdriver.gecko.driver\", \"C:\\\\Users\\\\v-poori\\\\Desktop\\\\selenium\\\\geckodriver-v0.11.1-win64\\\\geckodriver.exe\");\n\tdriver = new FirefoxDriver();\n\tdriver.manage().window().maximize();\n\n\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\n\tdriver.get(\"https://www.google.co.in/\");\n\t}",
"@BeforeTest\r\n\tpublic void operBrowser(){\n\t\td1=Driver.getBrowser();\r\n\t\tWebDriverCommonLib wlib=new WebDriverCommonLib();\r\n\t\td1.get(Constant.url);\r\n\t\twlib.maximizeBrowse();\r\n\t\twlib.WaitPageToLoad();\r\n\t}",
"public FirefoxDriver openBrowser(String site){\n System.setProperty(\"webdriver.gecko.driver\", \"c:\\\\Utils\\\\geckodriver.exe\");\n FirefoxDriver browser = new FirefoxDriver();\n browser.get(site);\n return browser;\n }",
"public static void startGeckoDriver() {\r\n\t\tswitch (operatingSystem.toLowerCase().split(\" \")[0]) {\r\n\t\tcase \"windows\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src//main//resources//drivers//geckodriver.exe\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"linux\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src//main//resources//drivers//geckodriverLinux\");\r\n\t\t\tbreak;\r\n\r\n\t\tcase \"mac os x\":\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", \"src/main//resources//drivers//geckodriverMac\");\r\n\t\t\tbreak;\r\n\r\n\t\tdefault:\r\n\t\t\tSystem.out.println(\"Operating system not supported.\");\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}",
"@Before\n public void start(){\n DesiredCapabilities caps = new DesiredCapabilities();\n driver = new FirefoxDriver(new FirefoxBinary(new File(\"C:\\\\Program Files (x86)\\\\Nightly\\\\firefox.exe\")), new FirefoxProfile(), caps);\n wait = new WebDriverWait(driver, 10);\n\n //IE\n// DesiredCapabilities caps = new DesiredCapabilities();\n// caps.setCapability(InternetExplorerDriver.REQUIRE_WINDOW_FOCUS, true);\n// WebDriver driver = new InternetExplorerDriver(caps);\n\n\n }",
"public static void main(String[] args) {\n\t\tWebDriverManager.firefoxdriver().setup();\r\n\t\tWebDriver driver = new FirefoxDriver();\r\n\t\t//driver.navigate().to(\"https://www.facebook.com/\");\r\n\r\n\t}",
"public static void main(String[] args) {\nString browser=\"ff\";\nif (browser.equals(\"chrome\")) {\n\tWebDriverManager.chromedriver().setup();\n\t// System.setProperty(\"webdriver.chrome.driver\", \"/Users/user/Downloads/chromedriver\");\n\tdriver=new ChromeDriver();\n}\nelse if (browser.equals(\"ff\")) {\n\tWebDriverManager.firefoxdriver().setup();\n\tdriver=new FirefoxDriver();\n}\nelse\n\tif (browser.equals(\"IE\")) {\n\t\tWebDriverManager.iedriver().setup();\n\t\tdriver=new InternetExplorerDriver();\n\t}\n\telse\n\t\tif (browser.equals(\"opera\")) {\n\t\t\tWebDriverManager.operadriver().setup();\n\t\t\tdriver=new OperaDriver();\n\t\t}\n\t\telse {\n\t\t\tSystem.out.println(\"no defined driver\");\n\t\t}\n\n\ndriver.get(\"https://google.com\");\n\n\n\n\t\n\n\n\n\n\n\n\n\n\n\n\n\t}",
"public static void main(String[] args) {\nWebDriver driver = new FirefoxDriver();\nSystem.out.println(\"hai\");\ndriver.get(\"https://www.google.com\");\nSystem.out.println(driver.getTitle());\ndriver.close();\n\t}",
"private void initFirefoxDriver(String appUrl) {\n\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"Drivers\\\\geckodriver.exe\");\n\t\tdriver = new FirefoxDriver();\n\t\tdriver.get(appUrl);\n\t\tdriver.manage().window().maximize();\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\t\t\n\t}",
"@BeforeMethod\r\n public void setUp() {\n WebDriver driver = new FirefoxDriver();\r\n driver.get(\"http://selenium.polteq.com/testshop/index.php\");\r\n }",
"@BeforeTest\n\t public void setUp() throws Exception {\n\t\t \n\t\tSystem.setProperty(\"webdriver.gecko.driver\",\n\t\t\t\t\"G:\\\\Selenium\\\\drivers\\\\geckodriver-v0.11.1-win64\\\\geckodriver.exe\");\n\t\tFile pathBinary = new File(\"C:\\\\Uday\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n\t\tFirefoxBinary firefoxBinary = new FirefoxBinary(pathBinary);\n\t\tFirefoxProfile firefoxProfile = new FirefoxProfile();\n\t\tdriver = new FirefoxDriver(firefoxBinary, firefoxProfile);\n\n\t baseUrl = \"http://localhost:8888/\";\n\t driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t }",
"public static void setup(String browser) throws Exception{\n if(browser.equalsIgnoreCase(\"firefox\")){\n \tFile pathToBinary = new File(\"C:\\\\Program Files (x86)\\\\Mozilla Firefox 41\\\\firefox.exe\");\n \tFirefoxBinary binary = new FirefoxBinary(pathToBinary);\n \tFirefoxDriver driver = new FirefoxDriver(binary, new FirefoxProfile());\n \t\n \t//System.setProperty(\"webdriver.firefox.driver\",\"C:\\\\Program Files (x86)\\\\Mozilla Firefox\\\\firefox.exe\");\n \t/*DesiredCapabilities capabilies = DesiredCapabilities.firefox();\t\t\t\n capabilies.getBrowserName();\n capabilies.getVersion();*/\n \t\t\t\n \t//create Firefox instance\t \n //driver = new FirefoxDriver(); \n System.out.println(\"Browser Used: \"+browser);\n }\t \n //Check if parameter passed is 'Chrome'\n // https://seleniumhq.github.io/selenium/docs/api/java/org/openqa/selenium/chrome/ChromeOptions.html\n // http://www.programcreek.com/java-api-examples/index.php?api=org.openqa.selenium.remote.DesiredCapabilities (Singleton)\n else if(browser.equalsIgnoreCase(\"chrome\")){\t \t \n System.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n ChromeOptions opt = new ChromeOptions();\n opt.setBinary(\"C:\\\\Selenium\\\\Assets\\\\chromedriver.exe\");\n opt.setExperimentalOption(\"Browser\", \"Chrome\");\n opt.getExperimentalOption(\"version\");\n \n// DesiredCapabilities capabilies = DesiredCapabilities.chrome();\n// capabilies.setBrowserName(\"chrome\");\n// capabilies.setPlatform(Platform.WINDOWS);\n// capabilies.setVersion(\"38\");\n// DesiredCapabilities capabilities = new DesiredCapabilities();\n \n //Create Chrome instance\n driver = new ChromeDriver(opt);\t \n }\n \n //Check if parameter passed is 'Safari'\t\n else if(browser.equalsIgnoreCase(\"safari\")){\t \t \n \tSystem.setProperty(\"webdriver.safari.driver\",\"C:/safaridriver.exe\");\n \t\n \t//System.setProperty(\"webdriver.safari.noinstall\", \"true\");\n \tdriver = new SafariDriver();\n \t\n /*\tSafariOptions options = new SafariOptions();\n \tSafariDriver driver = new SafariDriver(options);\n \tDesiredCapabilities capabilities = DesiredCapabilities.safari();\n \tcapabilities.setCapability(SafariOptions.CAPABILITY, options);*/\n }\n \n //Check if parameter passed is 'IE'\t \n else if(browser.equalsIgnoreCase(\"ie\")){\n \t//String IE32 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_32.exe\"; //IE 32 bit\n\t\t\tString IE64 = \"C:\\\\Selenium\\\\Assets\\\\IEDriverServer_64.exe\"; //IE 64 bit\n \tSystem.setProperty(\"webdriver.ie.driver\",IE64);\n \t\n /* \tDesiredCapabilities capabilies = DesiredCapabilities.internetExplorer();\n \tcapabilies.setBrowserName(\"ie\");\n capabilies.getBrowserName();\n capabilies.getPlatform();\n capabilies.getVersion();*/\n \n \t//Create IE instance\n \tdriver = new InternetExplorerDriver();\n }\t \n else{\t \n //If no browser passed throw exception\t \n throw new Exception(\"Browser is not correct\");\t \n }\t \n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\t\t\n\t}",
"public void WakeFirefox() {\n\t\tSystem.setProperty(\"webdriver.gecko.driver\",\"D://geckodriver.exe\" );\n\t\t\n\t\t// We have to import Webdriver class from library to create object named driver below\n\t\tWebDriver driver = new FirefoxDriver();\n\t\t\n\t\t//Open URL\n\t\tdriver.get(\"https://technoticle.wordpress.com/\");\n\t\t\n\t\t//To get title of Website\n\t\tSystem.out.println(driver.getTitle());\n\t\t\n\t\t//Verification to know whether we are not getting redirected anywhere else. This will print hit URL\n\t\tSystem.out.println(driver.getCurrentUrl());\n\t\t\n\t\t//Close the browser\n\t\tdriver.close();\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\t}",
"public static void main(String[] args) {\n\n\n WebDriver driver = WebDriverFactory.getDriver(\"CHROME\");\n driver.get(\"http://google.com\");\n driver.navigate().to(\"https://amazon.com\");\n driver.navigate().back();\n\n driver.close();\n\n WebDriver driver2 = WebDriverFactory.getDriver(\"FIREFOX\");\n driver2.get(\"https://www.mozilla.org\");\n\n\n driver2.close();\n }",
"@Test\r\n\tpublic void launch_browser()\r\n\t{ \r\n\t\t\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C://TESTING TOOLS - SOFTWARES/chromedriver.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"https://www.javatpoint.com/\");\r\n\t\t// remove all cookies\r\n\t\t//driver.manage().deleteAllCookies();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t\r\n\t}",
"private static WebDriver getFirefoxriver() {\n\t\treturn null;\n\t}",
"public static void main(String[] args) {\n\t\t\n\t\tWebDriver driver;\n\t\t\n\t\t// Used to launch Firefox Driver\n\t\t// WebDriver driver = new FirefoxDriver();\n\t\tFile file = new File(\"driver//geckodriver.exe\");\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", file.getAbsolutePath());\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.firefox();\n\t\tcapabilities.setCapability(\"marionette\",true);\n\t\tdriver = new FirefoxDriver(capabilities);\n\t\t \n\t\t//Launching the URL in to the firefox address bar\n\t\tdriver.get(\"http://www.seleniumhq.org/download/\");\n\t\t\n\t\t//Get the Title of the page\n\t\tString TitleValue = driver.getTitle();\n\t\tSystem.out.println(\"Title of the page is \"+ TitleValue);\n\t\t\n\t\t// Used to maximize the window\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tdriver.navigate().back();\n\t\tSystem.out.println(\"Navigated back to the page\");\n\t\t\n\t\tdriver.navigate().forward();\n\t\tSystem.out.println(\"Forwared page \");\n\t\t\n\t\tdriver.navigate().refresh();\n\t\tSystem.out.println(\"Refresh the page\");\n\t\t\n\t\t//Close the driver\n\t\tdriver.close();\n\t}",
"public WebDriver openBrowser(String object, String data) {\n\n\t\ttry {\n\n\t\t\tString osName = System.getProperty(\"os.name\");\n\n\t\t\tlogger.debug(osName + \" platform detected\");\n\n\t\t\tosName = osName.toLowerCase();\n\n\t\t\tlogger.debug(osName);\n\n\t\t\tif (osName.indexOf(\"win\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\t\t\t\t\t\t/*Added by nitin gupta on 23/03/2016\n\t\t\t\t\t\t * This code is used to start firefox under proxy for ZAP\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tif(CONFIG.getProperty(\"ZAP\").equals(Constants.RUNMODE_YES))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t Proxy proxy = new Proxy();\n\t\t\t\t proxy.setHttpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setFtpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setSslProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t capabilities.setCapability(CapabilityType.PROXY, proxy);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\t\t\t\tString sep = System.getProperty(\"file.separator\");\n\t\t\t\t\t\tFile dir=new File( System.getProperty(\"user.dir\")+ sep + \"externalFiles\" + sep + \"downloadFiles\");\n\t\t\t\t\t\t if(dir.exists()){\n\t\t\t\t\t\t\tlogger.debug(\"File Exits\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\tdir.mkdir();\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\n\t\t\t\t\t\tprofile.setPreference(\"browser.download.folderList\",2);\n\t\t\t\t\t profile.setPreference(\"browser.download.manager.showWhenStarting\",false);\n\t\t\t\t\t profile.setPreference(\"browser.download.dir\", System.getProperty(\"user.dir\")+ sep + \"externalFiles\" + sep + \"downloadFiles\");\n\t\t\t\t\t FirefoxBinary binary = new FirefoxBinary(new File(CONFIG.getProperty(\"mozilla_path\")));\n\t\t\t\t\t profile.addExtension(new File(System.getProperty(\"user.dir\")+ sep + \"externalFiles\"+sep+\"uploadFiles\"+sep+\"wave_toolbar-1.1.6-fx.xpi\"));\n\t\t\t\t\t \n\t\t\t\t\t System.setProperty( \"webdriver.gecko.driver\",System.getProperty(\"user.dir\")+ CONFIG.getProperty(\"gecko_path\")); // Added By Kashish\n\t\t\t\t\t \n\t\t\t\t\t /*Added by Nitin on 23 march 2016,capabilities for starting firefox in proxy mode*/\n\t\t\t\t\t driver = new FirefoxDriver(binary, profile, capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t} else if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.ie.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"ie_path\"));\n\n\t\t\t\t\t\tDesiredCapabilities d = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver(d);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\t\telse if (data.equals(\"Safari\")) {\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new SafariDriver(capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) \n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t/*Added by nitin gupta on 23/03/2016\n\t\t\t\t\t\t * This code is used to start chrome under proxy for ZAP\n\t\t\t\t\t\t */\n\t\t\t\t\t\t\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tif(CONFIG.getProperty(\"ZAP\").equals(Constants.RUNMODE_YES))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\tProxy proxy = new Proxy();\n\t\t\t\t proxy.setHttpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setFtpProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t proxy.setSslProxy(CONFIG.getProperty(\"server\")+\":\"+CONFIG.getProperty(\"port\"));\n\t\t\t\t capabilities.setCapability(CapabilityType.PROXY, proxy);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.setProperty(\t\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+ CONFIG.getProperty(\"chrome_path\"));\n\t\t\t\t\t\tMap<String, Object> prefs = new HashMap<String, Object>(); // Added Code to set Download Path and allowing Multiple downloads on Chrome\n\t\t\t\t\t\tprefs.put(\"profile.content_settings.pattern_pairs.*.multiple-automatic-downloads\", 1);\n\t\t\t\t\t\tprefs.put(\"download.default_directory\", System.getProperty(\"user.dir\")+ File.separator + \"externalFiles\" + File.separator + \"downloadFiles\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\t\t\t// options.setExperimentalOption(\"prefs\", prefs);\n\t\t\t\t\t\t options.addArguments(\"--disable-popup-blocking\"); // Added by Sanjay on 07 march 2016 , to disable popup blocking.\n\t\t\t\t\t\t\n\t\t\t\t\t\t /*Added by Nitin on 23 march 2016, capabilities to driver for starting chrome in proxy mode*/\n\t\t\t\t\t\t capabilities.setCapability(ChromeOptions.CAPABILITY, options);\n\t\t\t\t\t\t driver = new ChromeDriver(capabilities);\n\t\t\t\t\t\t driver.manage().window().maximize();\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts().implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\t\t\t\t\twait=new WebDriverWait(driver, explicitwaitTime);\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (osName.indexOf(\"mac\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\n\t\t\t\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\n\t\t\t\t\t\tFirefoxBinary binary = new FirefoxBinary(new File(CONFIG.getProperty(\"mozilla_path_mac\")));\n\n\t\t\t\t\t\tdriver = new FirefoxDriver(binary, profile);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t} else if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.ie.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"ie_path\"));\n\n\t\t\t\t\t\tDesiredCapabilities d = new DesiredCapabilities();\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver(d);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Safari\")) {\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = new DesiredCapabilities();\n\t\t\t\t\t\tcapabilities.setJavascriptEnabled(false);\n\t\t\t\t\t\tdriver = new SafariDriver(capabilities);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\n\n\t\t\t\t\t\t\"webdriver.chrome.driver\",\n\n\t\t\t\t\t\tSystem.getProperty(\"user.dir\")\n\n\t\t\t\t\t\t+ CONFIG.getProperty(\"chrome_path_mac\"));\n\t\t\t\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\t\t\t\toptions.setBinary(CONFIG.getProperty(\"chrome_binary\"));\n\n\t\t\t\t\t\tdriver = new ChromeDriver(options);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG\n\n\t\t\t\t\t.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts()\n\n\t\t\t\t\t.implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\telse if (osName.indexOf(\"nix\") >= 0 || osName.indexOf(\"nux\") >= 0) {\n\n\t\t\t\tif (driver == null) {\n\n\t\t\t\t\tlogger.debug(\"Opening browser\");\n\n\t\t\t\t\tif (data.equals(\"Mozilla\")) {\n\n\t\t\t\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\n\t\t\t\t\t\tFirefoxBinary binary = new FirefoxBinary(new File(\n\n\t\t\t\t\t\tCONFIG.getProperty(\"mozilla_path_linux\")));\n\n\t\t\t\t\t\tdriver = new FirefoxDriver(binary, profile);\n\n\t\t\t\t\t\tdriver.manage().window().maximize();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"IE\")) {\n\n\t\t\t\t\t\tSystem.setProperty(\"webdriver.ie.driver\",\n\n\t\t\t\t\t\t\"ie_path_linux\");\n\n\t\t\t\t\t\tdriver = new InternetExplorerDriver();\n\n\t\t\t\t\t}\n\n\t\t\t\t\telse if (data.equals(\"Chrome\")) {\n\n\t\t\t\t\t\tnew DesiredCapabilities();\n\n\t\t\t\t\t\tURL serverurl = new URL(\"http://localhost:9515\");\n\n\t\t\t\t\t\tDesiredCapabilities capabilities = DesiredCapabilities\n\n\t\t\t\t\t\t.chrome();\n\n\t\t\t\t\t\tdriver = new RemoteWebDriver(serverurl, capabilities);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tlong implicitWaitTime = Long.parseLong(CONFIG\n\n\t\t\t\t\t.getProperty(\"implicitwait\"));\n\n\t\t\t\t\tdriver.manage().timeouts()\n\n\t\t\t\t\t.implicitlyWait(implicitWaitTime, TimeUnit.SECONDS);\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t} else {\n\n\t\t\t\t\treturn driver;\n\n\t\t\t\t}\n\n\t\t\t} else {\n\n\t\t\t\treturn driver;\n\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\n\t\t\t// TODO Auto-generated catch block\n\n\t\t\te.printStackTrace();\n\n\t\t\treturn null;\n\n\t\t}\n\n\t}",
"private static void initialiseBrowser() {\n\t\tif (System.getProperty(\"proxyname\") != null) {\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setPreference(\"network.proxy.type\", 1);\n\t\t\tprofile.setPreference(\"network.proxy.http\", System.getProperty(\"proxyname\"));\n\t\t\tprofile.setPreference(\"network.proxy.http_port\", 3128);\n\n\t\t\tdriver = new FirefoxDriver(profile);\n\t\t\tsetDriver(driver);\n\t\t}\n\t\telse{\n\t\t\tdriver = new FirefoxDriver();\n\t\t\tsetDriver(driver);\n\t\t}\n\t}",
"@BeforeMethod\n\tpublic void launch()\n\t{\n\t\t\n\t\tdriver=new FirefoxDriver();\n\t\tdriver.manage().window().maximize();\n\t\t\n\t\tdriver.manage().deleteAllCookies();\n\t\tdriver.get(\"https://www.facebook.com/\");\n\t\t\n\t}",
"private static WebDriver launchFirefox()\n\t{\n\t\tif (REMOTE_URL != null && !REMOTE_URL.equals(\"\")) {\n\t\t\tDesiredCapabilities capabilities = DesiredCapabilities.firefox();\n\t\t\ttry {\n\n\t\t\t\treturn new RemoteWebDriver(new URL(System.getProperty(\"RemoteUrl\")), capabilities);\n\t\t\t}\n\n\n\t\t\tcatch (MalformedURLException e) {\n\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn null;\n\t\t\t}\n\t\t}\n\n\t\telse\n\t\t{\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setAcceptUntrustedCertificates(true);\n\n\t\t\treturn new FirefoxDriver(profile);\n\n\t\t}\n\n\n\t}",
"@Test \n public void executSessionOne(){\n\t System.out.println(\"open the browser: chrome\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }",
"@BeforeClass(alwaysRun = true)\n public void Setup() throws Exception {\n System.setProperty(\"webdriver.gecko.driver\", \"/usr/bin/geckodriver\");\n\n //Initialisation du driver\n driver = new FirefoxDriver();\n //Supression des cookies\n driver.manage().deleteAllCookies();\n }",
"public static void main(String[] args) throws IOException {\n\r\n\r\n\t WebDriver driver;\r\n\t ChromeOptions options=new ChromeOptions();\r\n\t options.addArguments(\"C:\\\\chromedriver.exe\"); \r\n\t\tDesiredCapabilities capabilities=DesiredCapabilities.chrome();\r\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY,options);\r\n\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n driver.get(\"http://www.baidu.com\");\r\n \r\n \r\n \r\n//\t\tWebDriver driver;\r\n//\t\tProfilesIni allProfiles =new ProfilesIni();\r\n// FirefoxProfile profile=allProfiles.getProfile(\"default\");\r\n// DesiredCapabilities capabilities=DesiredCapabilities.firefox();\r\n//\t\tdriver=new RemoteWebDriver(new URL(\"http://192.168.71.1:5555/wd/hub\"),capabilities);\r\n//\t\tdriver.get(\"http://www.baidu.com\");\r\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tString key=\"webdriver.gecko.driver\";\r\n\t\tString value=\".\\\\Drivers\\\\geckodriver.exe\";\r\n\t\tSystem.setProperty(key, value);\r\n\t\t\r\n\t\tWebDriver driver =new FirefoxDriver();\r\n\t\t\r\n\t\tdriver.get(\"https://www.naukri.com/\");\r\n\t\tThread.sleep(1000);\r\n\t\tSet<String> winhandls=driver.getWindowHandles();\r\n\t\t\r\n\t\tfor(String wh:winhandls)\r\n\t\t{\r\n\t\t\tSystem.out.println(wh);\r\n\t\t\tWebDriver win=driver.switchTo().window(wh);\r\n\t\t\twin.close();\r\n\t\t\t//System.out.println(win.getTitle());\r\n\t\t\t\r\n\t\t\t/*if((win.getTitle()).equals(\"Cognizant\"))\r\n\t\t\t{\r\n\t\t\t\tdriver.close();\r\n\t\t\t}\r\n\t\t\t*/\r\n\t\t}\r\n\t\t\r\n\t\t//driver.quit();\r\n\t\t\r\n\r\n\t}",
"@Before\n public synchronized static WebDriver openBrowser() {\n String browser = System.getProperty(\"BROWSER\");\n\n\n if (driver == null) {\n try {\n //Kiem tra BROWSER = null -> gan = chrome\n if (browser == null) {\n browser = System.getenv(\"BROWSER\");\n if (browser == null) {\n browser = \"chrome\";\n }\n }\n switch (browser) {\n case \"chrome\":\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n case \"firefox\":\n WebDriverManager.firefoxdriver().setup();\n driver = new FirefoxDriver();\n break;\n case \"chrome_headless\":\n WebDriverManager.chromedriver().setup();\n ChromeOptions options = new ChromeOptions();\n options.addArguments(\"headless\");\n options.addArguments(\"window-size=1366x768\");\n driver = new ChromeDriver(options);\n break;\n default:\n WebDriverManager.chromedriver().setup();\n driver = new ChromeDriver();\n break;\n }\n } catch (UnreachableBrowserException e) {\n driver = new ChromeDriver();\n } catch (WebDriverException e) {\n driver = new ChromeDriver();\n } finally {\n Runtime.getRuntime().addShutdownHook(new Thread(new BrowserCleanup()));\n }\n driver.get(\"http://demo.guru99.com/v4/\");\n driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n driver.manage().window().maximize();\n log.info(\"----------- START BRWOSER -----------\");\n\n }\n return driver;\n }",
"public void setUpDriver(final String browser) throws MalformedURLException{\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tString gridUrl=System.getProperty(\"gridurl\");\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//check if parameter passed from TestNg is 'firefox'\r\n\t\t\r\n//\t\tif (BrowserLib.FIREFOX.equalsIgnoreCase(browser)){\r\n//\t\t DesiredCapabilities capabilities =DesiredCapabilities.firefox();\r\n//\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n//\t\t if(StringUtils.isNotEmpty(gridUrl)){\r\n//\t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n//\t\t }\r\n//\t\t else{\r\n//\t\t\t driver =new FirefoxDriver(capabilities);\r\n//\t\t }\r\n\t\t \r\n\t\t\r\n\t\tif(BrowserLib.FIREFOX.equalsIgnoreCase(browser)){\r\n\t\t\t\r\n\t\t\t DesiredCapabilities capabilities =DesiredCapabilities.firefox();\r\n//\t\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n\t\t\t \r\n\t\t\t final String firebugpath1=\"src//main//resource//firepath-0.9.7.1-fx.xpi\";\r\n\t\t\t final String firebugpath =\"src//main//resource//firebug-1.12.8.xpi\";\r\n\t\t\t FirefoxProfile profile=new FirefoxProfile();\r\n//\t\t System.setProperty(\"webdriver.firefox.driver\", \"C:\\\\Program Files\\\\MozillaFirefox\\\\firefox.exe\");\r\n\r\n\t\t\t \r\n\t\t\t try{\r\n\t\t\t\t profile.addExtension(new File(firebugpath));\r\n\t\t\t\t profile.addExtension(new File(firebugpath1));\t \r\n\t\t\t }catch (IOException e){\r\n\t\t\t\t logger.error(\"Exception:\",e);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t\t profile.setPreference(\"extensions.firebug.allpagesActivation\", \"on\");\r\n//\t\t\t capabilities.setCapability(FirefoxDriver.PROFILE,profile);\r\n\t\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n\t\t\t System.setProperty(\"webdriver.firefox.driver\", \"C:\\\\Program Files\\\\MozillaFirefox\\\\firefox.exe\");\r\n\t\t\t //if (StringUtils.isNotEmpty(gridUrl)){\r\n\t\t\t if(gridUrl==null){\r\n\t\t\t\t driver =new FirefoxDriver(capabilities); \r\n \t\t\t \r\n\t\t\t }else{\r\n\t\t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n\t\t\t }\r\n\t\t}else if(BrowserLib.CHROME.equalsIgnoreCase(browser)){\r\n\t\t\t DesiredCapabilities capabilities =DesiredCapabilities.chrome();\r\n\t\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n\t\t\t if(gridUrl==null){\r\n\t\t\t\t driver =new ChromeDriver();\t \r\n\t\t\t }else{\r\n\t\t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n\t\t\t }\r\n\t\t\t\r\n\t\t\t\r\n\t\t\t \r\n\t\t}else if(BrowserLib.INTERNET_EXP.equalsIgnoreCase(browser)){\r\n//\t\t\tset path to iedriver.exe you may need to download it from 32 bits\r\n\t\t\t\r\n\t\t\t\r\n\t\t\tSystem.setProperty(\"webDriver.ie.driver\", System.getProperty(\"user.dir\")+\"/src/main/resource/\"+ \"IEDriverserver.exe\");\r\n//\t\t\t create ie instance\r\n\t\t\t DesiredCapabilities capabilities =DesiredCapabilities.internetExplorer();\r\n\t\t\t capabilities.setCapability(CapabilityType.ForSeleniumServer.ENSURING_CLEAN_SESSION, true);\r\n//\t\t\t if (StringUtils.isNotEmpty(gridUrl)){\r\n// \t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n//\t\t\t }else{\r\n//\t\t\t\t driver =new FirefoxDriver(capabilities); \r\n//\t\t\t }\r\n\t\t\t if(gridUrl.isEmpty()){\r\n\t\t\t\t driver =new InternetExplorerDriver(capabilities); \r\n \t\t\t \r\n\t\t\t }else{\r\n\t\t\t\t driver=new RemoteWebDriver(new URL(gridUrl),capabilities);\r\n\t\t\t }\r\n\t\t\t \r\n\t\t}else{\r\n//\t\t\tif no browser passed throw exception\r\n\t\t\tthrow new UnsupportBrowserException();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tthis.driver.manage().deleteAllCookies();\r\n\t\tthis.browserMaximize();\r\n\t\tthis.driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\t\r\n\t\t\r\n\t}",
"@BeforeTest\r\n\tpublic void launch()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Yogini\\\\chromedriver\\\\chromedriver.exe\"); //location of browser in local drive\r\n\t\tWebDriver driver = new ChromeDriver(); \r\n\t\tdriver.get(tobj.url);\r\n\t\tSystem.out.println(\"Before test, browser is launched\");\r\n\t}",
"public static void goTo() {\n Browser.driver.get(\"https://www.abv.bg/\");\n Browser.driver.manage().window().maximize();\n }",
"public void driverStart(String baseURL) {\n// FirefoxDriverManager.getInstance().setup();\n// driver = new FirefoxDriver();\n// driver.manage().window().maximize();\n// webDriverWait = new WebDriverWait(driver, 10);\n//\n//// ChromeDriverManager.getInstance().setup();\n//// driver = new ChromeDriver();\n//// driver.manage().window().maximize();\n//// webDriverWait = new WebDriverWait(driver, 5);\n//\n// driver.get(baseURL);\n\n FirefoxDriverManager.getInstance().setup();\n WebDriver driver = new FirefoxDriver();\n driver.get(\"http://localhost/litecart/\");\n\n\n }",
"@BeforeTest\n\tpublic void beforeTest() {\n\t\t\n\t\tSystem.setProperty(\"webdriver.gecko.driver\",\".\\\\lib\\\\geckodriver.exe\");\n\t\tdriver = new FirefoxDriver(); \n//\t\tSystem.setProperty(\"webdriver.ie.driver\",\".\\\\lib\\\\IEDriverServer.exe\");\n//\t\tdriver = new InternetExplorerDriver();\n\t\t\n//\t\tSystem.setProperty(\"webdriver.chrome.driver\",\".\\\\lib\\\\chromedriver.exe\");\n//\t\tdriver = new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n\t\tdriver.manage().window().maximize();\n\t}",
"@BeforeMethod\n\tpublic void setUp() {\n\t\tString driverByOS = \"\";\n\t\tif (System.getProperty(\"os.name\").equals(\"Windows 10\")) {\n\t\t\tdriverByOS = \"Drivers/chromedriver.exe\";\n\t\t} \n\t\telse {\n\t\t\tdriverByOS = \"Drivers/chromedriver\";\n\t\t}\n\t\t//para saber en qué sistema Operativo estamos corriendo el proyecto.\n\t\tSystem.out.println(System.getProperty(\"os.name\"));\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", driverByOS);\n\t\t//Utilizando headless browser HB\n\t\t/*-HB\n\t\tChromeOptions chromeOptions = new ChromeOptions();\n\t\tchromeOptions.addArguments(\"--headless\");\n\t\tdriver = new ChromeDriver(chromeOptions);\n\t\tHB-*/\n\t\tdriver = new ChromeDriver();\n\t\t//driver.manage().window().maximize(); //esto es para maximizar la ventana del navegador\n\t\t//driver.manage().window().fullscreen(); //esto es para poner en fullscreen la ventana del navegador\n\t\t/*driver.manage().window().setSize(new Dimension(200,200));\n\t\tfor (int i = 0; i <= 800; i++) {\n\t\t\tdriver.manage().window().setPosition(new Point(i,i));\n\t\t}*/\n\t\t//driver.manage().window().setPosition(new Point(800,200)); //posicionando la ventana del navegador\n\t\tdriver.navigate().to(\"http://newtours.demoaut.com/\");\n\t\t//Este codigo de abajo permite abrir otra ventana en el navegador\n\t\t//JavascriptExecutor javaScriptExecutor = (JavascriptExecutor)driver;\n\t\t//String googleWindow = \"window.open('http://www.google.com')\";\n\t\t//javaScriptExecutor.executeScript(googleWindow);\n\t\t//tabs = new ArrayList<String> (driver.getWindowHandles());\n\t\t/*try {\n\t\t\tThread.sleep(5000);\n\t\t} catch (InterruptedException e) {\n\t\t\t// TODO: handle exception\n\t\t\te.printStackTrace();\n\t\t}*/\n\t\t//Helpers helper = new Helpers();\n\t\t//helper.sleepSeconds(4);\n\t}",
"@Override\r\npublic void afterNavigateRefresh(WebDriver arg0) {\n\tSystem.out.println(\"as\");\r\n}",
"@ BeforeTest \n\tpublic void Amazon() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\resources\\\\chromedriver.exe\"); // to make the path portable create folder reources and put the element to it \n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.amazon.com/\");\n\t\tSystem.out.println(driver.getCurrentUrl());\t\n\t\tdriver.manage().window().maximize();\n\n}",
"public static void main(String[] args) throws InterruptedException {\nWebDriver driver=new FirefoxDriver();\ndriver.get(\"file:/// C:/Users/viprava/Desktop/sample1.html\");\n//driver.findElement(By.id(\"/n\")).click();\n//Thread.sleep(2000);\n//driver.navigate().back();\nThread.sleep(2000);\ndriver.findElement(By.name(\"uname\")).click();\nThread.sleep(2000);\ndriver.navigate().back();\nThread.sleep(2000);\ndriver.findElement(By.className(\"abc\")).click();\nThread.sleep(2000);\ndriver.navigate().back();\nThread.sleep(2000);\ndriver.close();\n\t}",
"public static WebDriver initialise(String browser) {\r\n\t\tFirefoxProfile firefoxProfile = new FirefoxProfile();\r\n\t\tChromeOptions chromeOptions = new ChromeOptions();\r\n\r\n\t\tif (browser.equalsIgnoreCase(\"chrome\")) {\r\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\",\r\n\t\t\t\t\tSystem.getProperty(\"user.dir\") + \"\\\\executables\\\\chromedriver.exe\");\r\n\r\n\t\t\tchromeOptions.addArguments(\"--disable-infobars\");\r\n\t\t\tchromeOptions.addArguments(\"--window-size=1920,1080\");\r\n\t\t\tchromeOptions.addArguments(\"--ignore-certificate-errors\");\r\n\t\t\tchromeOptions.addArguments(\"--disable-default-apps\");\r\n\t\t\tchromeOptions.addArguments(\"--disable-popup-blocking\");\r\n\t\t\tchromeOptions.addArguments(\"--incognito\");\r\n\r\n\t\t\tdriver = new ChromeDriver(chromeOptions);\r\n\r\n\t\t} else if (browser.equalsIgnoreCase(\"firefox\")) {\r\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\",\r\n\t\t\t\t\tSystem.getProperty(\"user.dir\") + \"\\\\executables\\\\geckodriver.exe\");\r\n\t\t\tfirefoxProfile.setPreference(\"permissions.default.stylesheet\", 2);\r\n\t\t\tfirefoxProfile.setPreference(\"permissions.default.image\", 2);\r\n\t\t\tfirefoxProfile.setPreference(\"dom.ipc.plugins.enabled.libflashplayer.so\", false);\r\n\t\t\tfirefoxProfile.setPreference(\"geo.enabled\", false);\r\n\r\n\t\t\tdriver = new FirefoxDriver(firefoxProfile);\r\n\t\t}\r\n\t\t/* set amount of total time for search for element */\r\n\t\tdriver.manage().timeouts().implicitlyWait(TIMEOUT, TimeUnit.SECONDS);\r\n\t\t/* set amount of time to page load to complete before trow error */\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(PAGE_TIMEOUT, TimeUnit.SECONDS);\r\n\t\t/*\r\n\t\t * set amount of time to wait for a script to finish execution before throwing\r\n\t\t * error\r\n\t\t */\r\n\t\tdriver.manage().timeouts().setScriptTimeout(SCRIPT_TIMEOUT, TimeUnit.SECONDS);\r\n\r\n\t\tdriver.manage().window().maximize();\r\n\r\n\t\treturn driver;\r\n\r\n\t}",
"@BeforeTest\r\n public void launchBrowser() {\n System.setProperty(\"webdriver.chrome.driver\", ChromePath);\r\n driver= new ChromeDriver();\r\n driver.manage().window().maximize();\r\n driver.get(titulo);\r\n }",
"@BeforeTest\n public void setup() {\n\n String browser = Environment.getProperties().browser().toString().toLowerCase();\n\n switch (browser) {\n \n case \"firefox\":\n FirefoxOptions options = new FirefoxOptions(); \n if(Environment.getProperties().headless()){\n options.addArguments(\"--headless\");\n }\n driver = new FirefoxDriver();\n break;\n \n default:\n ChromeOptions optionsChrome = new ChromeOptions();\n if(Environment.getProperties().headless()){\n optionsChrome.addArguments(\"--headless\");\n } \n driver = new ChromeDriver(optionsChrome);\n break;\n } \n\n driver.manage().window().maximize();\n }",
"@Before\n public void setUp() throws Exception {\n driver = new FirefoxDriver();\n driver.get(\"http://stackoverflow.com\");\n driver.manage().timeouts().implicitlyWait(2, TimeUnit.SECONDS);\n }",
"public static void main(String[] args) throws InterruptedException {\n\t\t\n\t\t\n\t\tSystem.setProperty(\"webdriver.firefox.bin\", \"/usr/bin/firefox\");\n\t\tSystem.setProperty(\"webdriver.gecko.driver\", System.getProperty(\"user.dir\") + \"/Driver/geckodriver\");\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.firefox();\n\t\tcapabilities.setCapability(\"marionette\", true);\n\t\tWebDriver driver = new FirefoxDriver();\n\t\tdriver.get(\"www.google.com\");\n\t}",
"public static void chromeTest() throws Exception{\n driver = BrowserFactory.getDriver(\"chrome\");\n Thread.sleep(2000);\n\n driver.get(\"http://google.com\");\n Thread.sleep(3000);\n String title = driver.getTitle();\n driver.navigate().to(\"https://etsy.com\");\n Thread.sleep(2000);\n String title2 = driver.getTitle();\n driver.navigate().back();\n title = driver.getTitle();\n Thread.sleep(2000);\n driver.navigate().to(\"https://etsy.com\");\n title2 = driver.getTitle();\n driver.quit();\n }",
"public static void main(String[] args) {\n System.setProperty(\"webdriver.gecko.driver\",\n \"/Users/lakshmigopalakrishna/Downloads/geckodriver\");\n WebDriver driver = new FirefoxDriver(); \n GithubHomePage home = new GithubHomePage(driver);\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n GithubLoginPage loginPage = home.Signin();\n loginPage.login(\"gvtester5\", \"googletesting123\");\n\n }",
"public static FirefoxProfile firefoxProfile() {\r\n\r\n\t\tFirefoxProfile firefoxProfile = new FirefoxProfile();\r\n\t\tfirefoxProfile.setPreference(\"browser.download.folderList\", 2);\r\n\t\tfirefoxProfile.setPreference(\"browser.download.dir\", testAdminReportPath);\r\n\t\tfirefoxProfile.setPreference(\"browser.helperApps.neverAsk.saveToDisk\", \"text/csv;application/vnd.ms-excel\");\r\n\t\tfirefoxProfile.setPreference(\"browser.helperApps.alwaysAsk.force\", false);\r\n\t\tfirefoxProfile.setPreference(\"geo.enabled\", false);\r\n\t\treturn firefoxProfile;\r\n\t}",
"public static WebDriver getBrowser(BrowserType browserName) {\n\t\tWebDriver driver = null;\n\t\t// System.setProperty(\"webdriver.gecko.driver\",\"G:\\\\eclipse-workspace\\\\zeeui\\\\driver\\\\geckodriver.exe\");\n\t\t// String browserType=Config.getValue(\"BROWSER_TYPE\");\n\t\tif (browserName.equals(BrowserType.FIREFOX)) {\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", Constants.firefoxDriver);\n\t\t\tFirefoxProfile profile = new FirefoxProfile();\n\t\t\tprofile.setPreference(\"browser.download.folderList\", 2);\n\t\t\tprofile.setPreference(\"browser.download.manager.showWhenStarting\", false);\n\t\t\tprofile.setPreference(\"browser.download.dir\", Config.getValue(\"EXPORT_FILE_PATH\"));\n\t\t\tprofile.setPreference(\"browser.helperApps.neverAsk.saveToDisk\",\n\t\t\t\t\t\"image/jpg, text/csv,text/xml,application/xml,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/excel,application/pdf,application/octet-stream\");\n\t\t\tdriver = new FirefoxDriver(profile);\n\t\t\tdrivers.put(\"firefox\", driver);\n\t\t} else if (browserName.equals(\"chrome\")) {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", Constants.chromeDriver);\n\t\t\tMap<String, String> prefs = new Hashtable<String, String>();\n\t\t\tprefs.put(\"download.prompt_for_download\", \"false\");\n\t\t\tprefs.put(\"download.default_directory\", Config.getValue(\"EXPORT_FILE_PATH\"));\n\t\t\tprefs.put(\"download.extensions_to_open\",\n\t\t\t\t\t\"image/jpg, text/csv,text/xml,application/xml,application/vnd.ms-excel,application/x-excel,application/x-msexcel,application/excel,application/pdf,application/octet-stream\");\n\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\toptions.setExperimentalOption(\"prefs\", prefs);\n\t\t\tdriver = new ChromeDriver(options);\n\t\t\tdrivers.put(\"chrome\", driver);\n\t\t} else if (browserName.equals(\"ie\")) {\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", Config.getValue(\"IE_DRIVER\"));\n\t\t\tdriver = new InternetExplorerDriver();\n\t\t\tdrivers.put(\"ie\", driver);\n\t\t} else if (browserName.equals(\"edge\")) {\n\t\t\tSystem.setProperty(\"webdriver.edge.driver\", Config.getValue(\"EDGE_DRIVER\"));\n\t\t\tdriver = new EdgeDriver();\n\t\t\tdrivers.put(\"edge\", driver);\n\t\t} else if (browserName.equals(\"safari\")) {\n\t\t\tdriver = new SafariDriver();\n\t\t\tdrivers.put(\"safari\", driver);\n\t\t} else if (browserName.equals(\"htmlUnit\")) {\n\t\t\tdriver = new HtmlUnitDriver();\n\t\t}\n\n\t\treturn driver;\n\n\t}",
"@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}",
"@BeforeMethod\r\n\tpublic void setUp() {\n\t\tdriver = new FirefoxDriver();\r\n\t\tbaseUrl = \"https://www.google.com/\";\r\n\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\tdriver.manage().window().maximize();\r\n\r\n\t\tdriver.get(baseUrl);\r\n\t}",
"@BeforeTest\n\tpublic void OpenBrowser() throws InterruptedException {\n\t\t\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\PSQA\\\\Desktop\\\\driver\\\\chromedriver.exe\");\n\t\tdriver = new ChromeDriver();\n\t\tdriver.get(\"https://www.booking.com/\");\n\t\n\t\t\n\t\tdriver.manage().window().maximize();\n\t\tThread.sleep(100);\n\t\t\n}",
"@BeforeTest\r\n\r\n\tpublic void setUp() throws Exception {\r\n\t\t// PropertyConfigurator.configure(\"log4j.properties\");\r\n\t\tdriver = new FirefoxDriver();\r\n\t\tbaseUrl = \"https://pghvm-vr7-www1.omnyx.com/Omnyx.Web/login\";\r\n\r\n\t\t// Maximize the browser's window\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\r\n\t\tdriver.manage().timeouts().pageLoadTimeout(15, TimeUnit.SECONDS);\r\n\r\n\t}",
"public static void openBrowser()\n\t{\n\t\tdriver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser());\n\t\tdriver.get(ReadPropertiesFile.getURL());\n\t\tlog.info(\"Opening Browser\");\n\t\tlog.info(\"Practo website is launched \");\n\t}",
"private void initDriver(){\r\n String browserToBeUsed = (String) jsonConfig.get(\"browserToBeUsed\");\r\n switch (browserToBeUsed) {\r\n case \"FF\":\r\n System.setProperty(\"webdriver.gecko.driver\", (String) jsonConfig.get(\"fireFoxDriverPath\"));\r\n FirefoxProfile ffProfile = new FirefoxProfile();\r\n // ffProfile.setPreference(\"javascript.enabled\", false);\r\n ffProfile.setPreference(\"intl.accept_languages\", \"en-GB\");\r\n\r\n FirefoxOptions ffOptions = new FirefoxOptions();\r\n ffOptions.setProfile(ffProfile);\r\n driver = new FirefoxDriver(ffOptions);\r\n break;\r\n case \"CH\":\r\n String driverPath = (String) jsonConfig.get(\"chromeDriverPath\");\r\n System.setProperty(\"webdriver.chrome.driver\", driverPath);\r\n\r\n Map<String, Object> prefs = new HashMap<String, Object>();\r\n prefs.put(\"profile.default_content_setting_values.notifications\", 2);\r\n\r\n ChromeOptions options = new ChromeOptions();\r\n options.setExperimentalOption(\"prefs\", prefs);\r\n options.addArguments(\"--lang=en-GB\");\r\n driver = new ChromeDriver(options);\r\n break;\r\n case \"IE\":\r\n System.setProperty(\"webdriver.ie.driver\", (String) jsonConfig.get(\"ieDriverPath\"));\r\n\r\n InternetExplorerOptions ieOptions = new InternetExplorerOptions();\r\n ieOptions.disableNativeEvents();\r\n ieOptions.requireWindowFocus();\r\n ieOptions.introduceFlakinessByIgnoringSecurityDomains();\r\n driver = new InternetExplorerDriver(ieOptions);\r\n }\r\n\r\n driver.manage().window().maximize();\r\n }",
"@Test \n public void executSessionThree(){\n System.out.println(\"open the browser: chrome III\");\n final String CHROME_DRIVER_DIRECTORY = System.getProperty(\"user.dir\") + \"/src/test/java/BrowserDrivers/chromedriver.exe\";\n System.setProperty(\"webdriver.chrome.driver\", CHROME_DRIVER_DIRECTORY);\n final WebDriver driver = new ChromeDriver();\n //Goto guru99 site\n driver.get(\"http://demo.guru99.com/V4/\");\n //find user name text box and fill it\n driver.quit();\n }",
"@Given(\"^daje ci otwarta strone$\")\n public void daje_ci_otwarta_strone() throws Throwable {\n driver = new ChromeDriver();\n String url = \"http://www.pollub.pl/\";\n driver.navigate().to(url);\n driver.manage().window().maximize();\n // driver.manage().timeouts().implicitlyWait(5000, TimeUnit.MILLISECONDS); // PRZYKLAD GLOBALNEGO IMPLICITY WAIT-A\n\n }",
"private void setLocalWebdriver() {\n\n DesiredCapabilities capabilities = new DesiredCapabilities();\n capabilities.setJavascriptEnabled(true);\n capabilities.setCapability(\"handlesAlerts\", true);\n switch (getBrowserId(browser)) {\n case 0:\n capabilities.setCapability(InternetExplorerDriver.INTRODUCE_FLAKINESS_BY_IGNORING_SECURITY_DOMAINS,\n Boolean.valueOf(System.getProperty(\"IGNORE_SECURITY_DOMAINS\", \"false\")));\n driver.set(new InternetExplorerDriver(capabilities));\n break;\n case 1:\n driver.set(new FirefoxDriver(capabilities));\n break;\n case 2:\n driver.set(new SafariDriver(capabilities));\n break;\n case 3:\n driver.set(new ChromeDriver(capabilities));\n break;\n default:\n throw new WebDriverException(\"Browser not found: \" + browser);\n }\n }",
"@Override\r\npublic void beforeNavigateRefresh(WebDriver arg0) {\n\tSystem.out.println(\"as\");\r\n}",
"@Test\n\tpublic void launchSite()\t{\n\t\t\n\t\tSystem.setProperty(EdgeDriverService.EDGE_DRIVER_EXE_PROPERTY, \"D:\\\\Selenium Drivers\\\\MicrosoftWebDriver.exe\");\n\t\tEdgeDriver driver = new EdgeDriver();\n\t\tdriver.get(\"http://google.com\");\n\t\t\n\t}",
"@Given(\"^Launch the page$\")\r\n\tpublic void launch_the_page() {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"./driver/chromedrivernew.exe\");\r\n\t\tWebDriver driver = new ChromeDriver();\r\n\t\tdriver.get(\"http://realestate.upskills.in\");\r\n\t \t}",
"@Test\n public void test() throws MalformedURLException {\n System.setProperty(\"webdriver.chrome.driver\",System.getProperty(\"user.dir\")+\"\\\\drivers\\\\chromedriver.exe\"); \n WebDriver driver=new ChromeDriver();\n // WebDriver driver=new RemoteWebDriver(url,cap);\n driver.manage().window().maximize(); \n driver.get(\"https://curiedoctorapp.firebaseapp.com\");\n System.out.println(\"The title is\"+ driver.getTitle());\n driver.quit();\n \n }",
"public void setDriver(String browserName){\r\n\t \r\n\t\t if(browserName==null){\r\n\t\t\t browserName=\"firefox\";\r\n\t\t\t \r\n\t\t }\r\n\t\t if(browserName.equalsIgnoreCase(\"firefox\")){\r\n\t\t\t \r\n\t\t\t System.setProperty(\"webdriver.gecko.driver\", FIREFOX_DRIVER_PATH);\r\n\t\t\t \r\n\t\t\t driver= new FirefoxDriver();\r\n\t\t\t \r\n\t\t }\r\n\t\t \r\n\t\t if(browserName.equalsIgnoreCase(\"chrome\")){\r\n\t\t\t \r\n\t\t\t System.setProperty(\"webdriver.chrome.driver\",CHROME_DRIVER_PATH);\r\n\t\t\t \r\n\t\t\t driver= new ChromeDriver();\r\n\t\t }\r\n\t\t \r\n\t\t \r\n\t\t \r\n\t\t if(browserName.equalsIgnoreCase(\"ie\")){\r\n\t\t\t \r\n\t\t\t System.setProperty(\"webdriver.ie.driver\",IE_DRIVER_PATH);\r\n\t\t\t \r\n\t\t\t driver= new InternetExplorerDriver();\r\n\t\t\t \r\n\t\t }\r\n\t\r\n\t\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"public void open(){\n driver.get(\"https://demoqa.com/slider\");\n }",
"@Given(\"I open a browser and launch the application\")\n public void open_a_browser_and_launch_the_application() throws MalformedURLException\n {\n try {\n if(System.getProperty(\"exemode\").equals(\"remote\")) {\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n DesiredCapabilities dc = DesiredCapabilities.firefox();\n dc.setBrowserName(\"firefox\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n DesiredCapabilities dc = DesiredCapabilities.chrome();\n dc.setBrowserName(\"chrome\");\n dc.setPlatform(Platform.LINUX);\n driver = new RemoteWebDriver(new URL(UtilConstants.ENDPOINT_SELENIUM_HUB), dc);\n }\n }\n else{\n if(System.getProperty(\"browser\").equals(\"firefox\")){\n System.setProperty(\"webdriver.gecko.driver\", \"./drivers/geckodriver\");\n driver = new FirefoxDriver();\n }\n else if(System.getProperty(\"browser\").equals(\"chrome\")){\n System.setProperty(\"webdriver.chrome.driver\", \"./drivers/chromedriver\");\n driver = new ChromeDriver();\n }\n }\n\n if(driver!=null){\n driver.manage().window().maximize();\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n //driver.manage().timeouts().pageLoadTimeout(5, TimeUnit.SECONDS);\n driver.get(ENDPOINT_PHPTRAVELS);\n }\n }\n catch(Exception e){\n e.printStackTrace();\n// System.exit(1);\n }\n }",
"public static WebDriver launchOpencart(WebDriver driver) throws MalformedURLException\n\t{\n\t\t\n\t\t/*DesiredCapabilities capability = DesiredCapabilities.chrome();\n capability.setBrowserName(\"chrome\");\n capability.setPlatform(Platform.WIN10);\n driver = new RemoteWebDriver(new URL(Node), capability);*/\n \t\t\n\t\tdriver.get(pro.getProperty(\"OpenCart.URL\"));\n\t\tSystem.out.println(\"Step01: Opencart Application Launched Successfully\");\n\t\t//logger.log(LogStatus.PASS, \"Step 1 : Opencart Application Launched..\");\n\t\tAssert.assertEquals(driver.getTitle(), \"Your Store\");\n\t\tdriver.manage().window().maximize();\n\t\treturn driver;\n\t}",
"@Test\r\n\tpublic void f()\r\n\t{\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C://Data_Program//Selenium_Dependencies//chromedriver.exe\");\r\n\t\tWebDriver driver=new ChromeDriver();\r\n\t\tdriver.manage().window().maximize();\r\n\t\tdriver.get(\"http://www.google.com\");\r\n\t}",
"public static WebDriver initializatio(){\n\t\t \r\n\t\t\t String browse_name= prop.getProperty(\"browser\");\r\n\t\t\t \r\n\t\t\t \r\n\t\t if(driver==null && browse_name.equals(\"chrome\")){\r\n\t\t\t System.setProperty(\"webdriver.chrome.driver\", \"C://Users//RJ//Downloads//chromedriver.exe\");\r\n\t\t\t driver=new ChromeDriver();\r\n\t\t\t //E:\\Yadav Selenium\r\n\t\t }\r\n\t\t \r\n\t\t else if(driver==null && browse_name.equals(\"FF\")){\r\n\t\t\t System.setProperty(\"webdriver.gecko.driver\", \"E://Yadav Selenium//geckodriver.exe\");\r\n\t\t\t driver=new FirefoxDriver();\r\n\t\t }\r\n\t\t event_driver=new EventFiringWebDriver(driver);\r\n\t\t //now cearte Eventlistnerhandler to resgistor with eventFireingWebdriver\r\n\t\t event_lisner=new WebEventListner();\r\n\t\t event_driver.register(event_lisner);\r\n\t\t driver=event_driver;\r\n\t\t \r\n\t\t driver.manage().window().maximize();\r\n\t\t driver.manage().deleteAllCookies();\r\n\t\t driver.manage().timeouts().pageLoadTimeout(Testutil.PAGE_LOAD_TIMEOUT, TimeUnit.SECONDS);\r\n\t\t driver.manage().timeouts().implicitlyWait(Testutil.IMPLICIT_WAIT, TimeUnit.SECONDS);\r\n\t\t // driver.get(prop.getProperty(\"url\"));\r\n\t\t driver.navigate().to(prop.getProperty(\"url\"));\r\n\t\treturn driver;\r\n\t}",
"public void setUp() throws Exception {\n // Choose the browser, version, and platform to test\n DesiredCapabilities capabilities = DesiredCapabilities.firefox();\n capabilities.setCapability(\"version\", \"5\");\n capabilities.setCapability(\"platform\", Platform.XP);\n // Create the connection to Sauce Labs to run the tests\n this.driver = new RemoteWebDriver(\n new URL(\"http://mtest1:e55c18d3-f3b5-4d1d-9165-0a5f1aa3bcbe@ondemand.saucelabs.com:80/wd/hub\"),\n capabilities);\n\n //driver = new FirefoxDriver();\n baseUrl = \"https://www.linkedin.com\";\n //driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n }",
"@Test\n public void test1(){\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver2 = new ChromeDriver();\n\n\n\n driver2.get(url);\n bekle(2000);\n driver2.quit();\n\n\n\n }",
"@Test\npublic void TestMarketWatch() throws InterruptedException {\nSystem.setProperty(\"webdriver.firefox.bin\",\"/Users/jasonsouryamath/Desktop/FirefoxDeveloperEdition.app/Contents/MacOS/firefox-bin\");\ndriver = new FirefoxDriver();\ndriver.get(\"http://www.marketwatch.com/\");\nThread.sleep(2000);\n((JavascriptExecutor)driver).executeScript(\"scroll(0,1000)\");\nnew WebDriverWait(driver,10).until(ExpectedConditions.presenceOfElementLocated(By.cssSelector(\"#f72ae3716b0373a474b6898d41a29e1a9158244d > li:nth-child(3) > div:nth-child(1) > div:nth-child(2) > h3:nth-child(1) > a:nth-child(1)\"))).click();\n((JavascriptExecutor)driver).executeScript(\"scroll(0,1200)\");\n}",
"@BeforeClass\r\n\tpublic void browser() {\r\n\tdriver = new FirefoxDriver();\r\n\t}",
"@Before\n\tpublic void OuvrirNavEtConnexion ()\n\t{\n\t\tdriver = SocleTechnique.OpenNav(adresse, ENav.firefox);\n\t\t// Incorporation d'un Implicit wait \n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\tlogin = new LoginPage(driver);\n\t\t// Remplir le champ login et mot de passe, puis cliquer sur le bouton valider\n\t\tSocleTechnique.RemplirLoginMdp(login.champUtilisateur, login.champPassword, login.boutonSeConnecter, User, MDP);\n\t}",
"@Override\n protected RemoteWebDriver createLocalDriver() {\n return new FirefoxDriver();\n }",
"protected FirefoxDriver createFirefoxDriver() {\n FirefoxProfile firefoxProfile = new FirefoxProfile();\n firefoxProfile.setPreference(\"intl.accept_languages\",\n getSystemLanguage());\n FirefoxDriver firefoxDriver = new FirefoxDriver(firefoxProfile);\n firefoxDriver.manage().window().maximize();\n return firefoxDriver;\n }",
"@Override\r\n public void afterNavigateRefresh(final WebDriver driver) {\n\r\n }",
"public void Open_Browser() \r\n\t{\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"drivers\\\\chromedriver.exe\");\r\n\t\t//Brower initiation\r\n\t\tdriver=new ChromeDriver();\r\n\t\t//maximize browser window\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\r\n\t}",
"@Override\n public WebDriver getWebDriver() {\n return new FirefoxDriver();\n }",
"public static void openBrowser() {\r\n\t\tString browser = prop.getProperty(\"browserType\").toLowerCase();\r\n\r\n\t\ttry {\r\n\t\t\tif (browser.equals(\"chrome\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"chromeName\"), prop.getProperty(\"chromePath\"));\r\n\t\t\t\tdriver = new ChromeDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ff\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"FFName\"), prop.getProperty(\"FFPath\"));\r\n\t\t\t\tdriver = new FirefoxDriver();\r\n\r\n\t\t\t} else if (browser.equals(\"ie\")) {\r\n\t\t\t\tSystem.setProperty(prop.getProperty(\"IEName\"), prop.getProperty(\"IEPath\"));\r\n\t\t\t\tdriver = new InternetExplorerDriver();\r\n\r\n\t\t\t} else {\r\n\t\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t\t}\r\n\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\tAssert.fail(\"Unable to find browser, Check EnvrionrmentData.properties file\");\r\n\t\t}\r\n\t}",
"@BeforeTest\n\n public void setup() {\n\n \t System.setProperty(\"webdriver.chrome.driver\", \"C:\\\\Users\\\\Lenovo 1\\\\eclipse-workspace\\\\firstTestProject\\\\src\\\\test\\\\resources\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n\n /* System.setProperty(\"webdriver.gecko.driver\", \"C:\\\\Users\\\\Lenovo 1\\\\eclipseprojects\\\\seleniumTestProject\\\\src\\\\test\\\\resources\\\\geckodriver.exe\");\n driver = new FirefoxDriver();*/\n\n\n// System.setProperty(\"webdriver.chrome.driver\", \"/home/ushani/Selenium_ProjectWS/TwoBulls/seleniumTestProject/src/test/resources/chromedriver\");\n// WebDriver driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\n\n driver.get(\"http://www.google.com\");\n }",
"@BeforeTest\n\tpublic void openBrowser(){\n\t\t//initializing the firefox driver\n\t\tdriver =new FirefoxDriver();\n\t\t// accessing the webpage\n\t\tdriver.get(\"https://platform-stag.systran.net\");\n\t\t//setting the windows size in 1920*1080\n\t\tdriver.manage().window().setSize(new Dimension(1920,1080));\n\n\t\t// the imperative wait \n\t\tdriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n\n\t\t//accessing the from page of the webpage and clicking in the sign in button\n\t\tLocatorsInFrontPage locatorinfront=PageFactory.initElements(driver, LocatorsInFrontPage.class);\n\t\tlocatorinfront.signIn.click();\n\t\t// accessing the pop up sign in and choosing the log in with systran\t\n\t\tLocatorsInSigninPopUp signinpopup=PageFactory.initElements(driver, LocatorsInSigninPopUp.class);\n\t\tsigninpopup.continueWithSystran.click();\n\n\t\t// locating the username and password filling form\n\t\tLocatorsInSignInaccount locatorinSignIn=PageFactory.initElements(driver, LocatorsInSignInaccount.class);\n\t\tlocatorinSignIn.userName.sendKeys(\"sujit.pandey@systrangroup.com\");\n\t\tlocatorinSignIn.password.sendKeys(\"SESpassword\");\n\t\tlocatorinSignIn.signIn.click();\n\n\n\t}",
"@Before\n public void setup() {\n DesiredCapabilities caps = new DesiredCapabilities();\n caps.setCapability(FirefoxDriver.MARIONETTE, false); // new schema disable\n webdriver = new FirefoxDriver(caps);\n wait = new WebDriverWait(webdriver, 10);\n\n }",
"@Before\n public void setUp() throws Exception {\n URL = \"https://www.facebook.com/\";\n\t//baseUrl = \"https://www.katalon.com/\";\n System.setProperty(\"webdriver.chrome.driver\", \"E:\\\\Documentos\\\\Java Drivers\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n // driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);\n }",
"public static WebDriver startFirefox() {\n\t\tDesiredCapabilities cap = DesiredCapabilities.firefox();\n\t\tcap.setCapability(\"marionette\", true);\n\t\treturn new FirefoxDriver(cap);\n\t}",
"public static void main(String[] args) {\n\n\n WebDriverManager.chromedriver().setup();\n WebDriver driver = new ChromeDriver();\n\n //difference between get and navigate is get will w8 for page to load fully yet navigate wont\n// driver.get(\"http://www.facebook.com\");\n driver.navigate().to(\"http://www.facebook.com\");\n driver.navigate().to(\"http://www.google.com\");\n driver.navigate().back();\n driver.navigate().forward();\n driver.navigate().refresh();\n\n\n slpBrowser(2000);\n qBrowser(driver);\n System.out.println(\"Test Done\");\n }",
"public void open() {\n setWebDriver();\n }",
"public void openBrowser() {\n ResourceBundle config = ResourceBundle.getBundle(\"config\");\n\n config.getString(\"browser\").equalsIgnoreCase(\"Chrome\");\n System.setProperty(\"webdriver.chrome.driver\", \"src/Drivers/chromedriver_76.0.exe\");\n driver = new ChromeDriver();\n\n driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);\n// driver.get(config.getString(\"URL\"));\n driver.manage().window().maximize();\n }",
"@Before\n\tpublic void setUp() throws Exception {\n\t\t System.setProperty(\"webdriver.firefox.marionette\", \"C:\\\\GeckoSelenium\\\\geckodriver.exe\");\n\t\t driver = new FirefoxDriver();\n//\t\tSystem.setProperty(\"webdriver.chrome.driver\", \"C:\\\\ChromeDriver\\\\chromedriver.exe\");\n//\t\tdriver = new ChromeDriver();\n\n\t\tprop = new Properties();\n\t\tprop.load(new FileInputStream(\"./Configuration/Configuration.properties\"));\n\t\tint timewait = (Integer.parseInt(prop.getProperty(\"wait_time\")));\n\t\tdriver.manage().timeouts().implicitlyWait(timewait, TimeUnit.SECONDS);\n\t\tappUrl = prop.getProperty(\"AppUrl\");\n\t\tsharedUIMapPath = prop.getProperty(\"SharedUIMapPath\");\n\t\tprop.load(new FileInputStream(sharedUIMapPath));\n\t\tdriver.get(appUrl);\n\t\tfakeUrl = prop.getProperty(\"FakeUrl\");\n\t\tdriver.manage().window().setSize(new Dimension(1440, 850));\n\t}",
"@Override\r\npublic void afterNavigateTo(String arg0, WebDriver arg1) {\n\tSystem.out.println(\"as\");\r\n}",
"public static void main(String[] args) throws InterruptedException {\n\t\t\tSystem.out.print(\"Hello WOrld\");\r\n\t\t\tWebDriver driver; \r\n\t\t\tSystem.setProperty(\"webdriver.firefox.marionette\",\"C:\\\\ccc\\\\seleniumsetup\\\\geckodriver.exe\");\r\n\t\t\tdriver = new FirefoxDriver();\r\n\t\t\t//driver.get(\"http://demo.guru99.com/selenium/deprecated.html\");\r\n\t\t\tdriver.get(\"https://freecrm.co.in/\");\r\n\t\t\tThread.sleep(5000);\r\n\t\t\tdriver.findElement(By.xpath((\"//a[@class='btn btn-sm btn-white btn-icon btn-icon-left btn-shadow btn-border btn-rect offset-sm-top-60 offset-top-30']\"))).click();\r\n\t}",
"public static void InvokeBrowser() {\n\t\tString currentDir = System.getProperty(\"user.dir\");\n\t\tSystem.out.println(\"Current Directory \"+currentDir);\n\t\tDesiredCapabilities capabilities = DesiredCapabilities.chrome();\n\t\tChromeOptions options = new ChromeOptions();\n\t\toptions.addArguments(\"--incognito\");\n\t\tcapabilities.setCapability(ChromeOptions.CAPABILITY, options);\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\n\t\t\t\tcurrentDir+\"/lib/chromedriver/36/chromedriver.exe\");\n\t\tdriver = new ChromeDriver(capabilities);\n\t\tdriver.manage().window().maximize();\n\t\t//driver.navigate().to(URL);\n\t\t//logger.info(\"URL to proceed with transaction --> \"+URL);\n\t\t/*BestBuyAddCart.addToCart();\n\t\tdriver.close();\n\t\tdriver.quit();*/\n\t}",
"public static void main(String[] args) throws InterruptedException {\n\t\tFirefoxProfile prof = new FirefoxProfile();\r\n\t\tprof.setAcceptUntrustedCertificates(false);\r\n//the above 2 lines will allow you to get past an unsecured site (The connection is untusted. Remember to pass the object in the line below..) Only in FF, IE and Chrome handles it fine \r\n\t\t\r\n\t\tWebDriver driver = new FirefoxDriver(prof);\r\n\t\tdriver.manage().timeouts().implicitlyWait(5, TimeUnit.SECONDS);\r\n\t\t//the global 5 second implicit wait above applies for all code below\r\n\t\t\r\n\t\tdriver.get(\"www.ebay.com\");\r\n\t\tdriver.findElement(By.tagName(\"a\")).click();\r\n\t\tThread.sleep(5000L);//explicit wait to wait for 5 seconds to do other tasks\r\n\t\t//But if you need to keep adding sleeps like this it can cause performance issues. So instead let's set a global implicit wait\r\n\t\tdriver.manage().deleteAllCookies();\r\n\t\tdriver.manage().window().maximize();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}",
"@Given(\"browser is open\")\n\tpublic void browser_is_open() {\n\t\tSystem.out.println(\"browseris open\");\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"/home/rahul/Desktop\");\n\t\tdriver=new ChromeDriver();\n\t\tdriver.manage().timeouts().implicitlyWait(40,TimeUnit.SECONDS);\n\t\t\n\t}",
"@Given(\"^user visit homepage$\")\n\tpublic void user_visit_homepage() throws Throwable {\n\t\tSystem.setProperty(\"webdriver.chrome.driver\",\"C:\\\\Program Files\\\\chromedriver_win32\\\\chromedriver.exe\");\n\t\t//\"key\",\"value\"\n\t\t//\"driver name\",\"path of driver\"\n\t\tdriver= new ChromeDriver();\n\t\t\n\t\t//driver.manage().timeouts().implicitlyWait(20,TimeUnit.SECONDS);\n\t\t\n\t\t\n\t\t//open URL\n\t\tdriver.get(\"https://demo.oscommerce.com/\");\n\t\t\n\t\t//driver.get(\"https://www.amazon.com/\");\n\t\t}",
"@Before\n public void setUp() throws Exception {\n DesiredCapabilities capabillities = DesiredCapabilities.firefox();\n capabillities.setCapability(\"version\", \"17\");\n capabillities.setCapability(\"platform\", Platform.XP);\n this.driver = new RemoteWebDriver(\n new URL(\"http://mzazam07:ff0ecc19-2836-4fd7-aa99-42752d74aa10@ondemand.saucelabs.com:80/wd/hub\"),\n capabillities);\n }",
"@BeforeMethod\n public void setUp() throws Exception {\n wd = new FirefoxDriver();\n \n //Configuracion de tiempos implicitos y no de espera\n wd.manage().timeouts().implicitlyWait(60, TimeUnit.SECONDS);\n \n //Ventana de Firefox Maximizar\n wd.manage().window().maximize();\n \n //Creo la variable repoObjects instanciando la claseHomepage\n repoObjectsHome = PageFactory.initElements(wd, HomePage.class);\n \n //Url\n wd.get(\"http://192.168.5.4/callcenter/\");\n }"
] | [
"0.7507449",
"0.7209752",
"0.7175559",
"0.71217084",
"0.7103314",
"0.70784765",
"0.7077136",
"0.69834495",
"0.69175684",
"0.68708587",
"0.6854135",
"0.68524885",
"0.6825936",
"0.68073785",
"0.67990994",
"0.6798858",
"0.67171365",
"0.67168814",
"0.67135245",
"0.67120343",
"0.67039186",
"0.66858923",
"0.6682017",
"0.6615241",
"0.6615097",
"0.65766865",
"0.6506628",
"0.6481793",
"0.6426056",
"0.6416471",
"0.6414023",
"0.64019674",
"0.63961023",
"0.63948536",
"0.6386454",
"0.63839316",
"0.6369031",
"0.63481003",
"0.6346124",
"0.6342565",
"0.6327346",
"0.63176894",
"0.63095117",
"0.6293624",
"0.62908053",
"0.6288802",
"0.62742084",
"0.6272647",
"0.6265344",
"0.6263021",
"0.6261167",
"0.62600476",
"0.6259521",
"0.62566453",
"0.62483335",
"0.62411964",
"0.62409544",
"0.62403846",
"0.6222822",
"0.62204796",
"0.6215814",
"0.61864555",
"0.6175666",
"0.6163754",
"0.61574185",
"0.61472076",
"0.61440516",
"0.6141",
"0.6140136",
"0.61231023",
"0.61208624",
"0.6118562",
"0.6095914",
"0.6095297",
"0.6093988",
"0.60849077",
"0.60833985",
"0.60827845",
"0.6076211",
"0.60757375",
"0.6075391",
"0.6074175",
"0.6070387",
"0.60687894",
"0.60649484",
"0.6056227",
"0.60522187",
"0.6049858",
"0.6049562",
"0.6049015",
"0.60474175",
"0.60460293",
"0.6045881",
"0.60452175",
"0.6043652",
"0.60366154",
"0.60364777",
"0.6036153",
"0.6035232",
"0.6033819"
] | 0.6465131 | 28 |
Elimina una celula en (f,c) | public void ejecuta(Mundo mundo) {
if (!mundo.eliminarCelula(f, c)) {
System.out.print("La celula no se puede eliminar de la posicion seleccionada. \n");
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void removePiece(int c, int r) {\n _forwardDiag[forward(c, r)] += -1;\n _backwardDiag[backward(c, r)] += -1;\n _col[c - 1] += -1;\n _row[r - 1] += -1;\n }",
"private static ArrayList<String> eliminarAtomo(FormaClausal fc, char atomo) {\n\t\tfc.formas.remove(atomo + \"\");\n\t\treturn fc.formas;\n\t}",
"public abstract String mensajeEliminarCelula(int f, int c);",
"private static ArrayList<String> eliminarNegacion(FormaClausal fc, char atomo) {\n\t\tfc.formas.remove(Operadores.NEGACION + atomo);\n\t\treturn fc.formas;\n\t}",
"public void eliminarCelulaPosicion(int fila, int columna) {\r\n\t\tsuperficie[fila][columna] = null;\r\n\t\t\r\n\t\t// Eliminamos las posiciones de esa celula de los arrays de las posiciones de las celulas.\r\n\t\teliminarPosicionesDeLaCelulaEnLosArraysDeCelulas(fila, columna);\r\n\t\tnumeroDeCelulasEnSuperficie--;\r\n\t}",
"void eliminar(int c);",
"public void eliminarPosicionesDeLaCelulaEnLosArraysDeCelulas(int fila, int columna) {\r\n\t\t\r\n\t\t// Primero lo tenemos que buscar.\r\n\t\tboolean encontrado = false;\r\n\t\tint contador_recorrido = 0;\r\n\t\t\r\n\t\twhile((!encontrado) && (contador_recorrido < numeroDeCelulasEnSuperficie)) {\r\n\t\t\t\r\n\t\t\tif(fila == filasDeCelulas[contador_recorrido]){\r\n\t\t\t\tif(columna == columnasDeCelulas[contador_recorrido]) {\r\n\t\t\t\t\tencontrado = true;\r\n\t\t\t\t\t\r\n\t\t\t\t\t// Las eliminamos del array, desplazamos las posiciones a la izquierda.\r\n\t\t\t\t\tfor(int i = contador_recorrido; i < numeroDeCelulasEnSuperficie - 1; i++) {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tfilasDeCelulas[i] = filasDeCelulas[i+1];\r\n\t\t\t\t\t\tcolumnasDeCelulas[i] = columnasDeCelulas[i+1];\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t// Actualizamos el contador.\r\n\t\t\tcontador_recorrido++;\r\n\t\r\n\t\t}\r\n\t}",
"public void eliminarCompraComic();",
"public static void dropRedPattern(String[][] f)\n {\n\n //We need to ask user which column he wants to drop a red into\n\n System.out.println(\"Drop a red disk at column (0–6): \");\n\n @SuppressWarnings(\"resource\")\n\tScanner scan = new Scanner (System.in);\n\n int c = 2*scan.nextInt()+1;\n\n //we have to loop over each row from the bottom to the top\n\n //till we find the first empty space, drop, and then finish\n\n for (int i =5;i>=0;i--)\n {\n\n if (f[i][c] == \" \")\n {\n\n f[i][c] = \"R\";\n\n break;\n\n }\n\n }\n\n }",
"@Override\n\tpublic void remover(String cpf) throws ClienteNaoEncontradoException,\n\t\t\tCampoObrigatorioException, SQLException {\n\t\tfor(ClienteFisico clienteFisico : set){\n\t\t\tif(clienteFisico.getCpf().equals(cpf)){\n\t\t\t\tset.remove(clienteFisico);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}",
"public void remove(int r, int c)\n\t{\n\t\tboard[r][c] = 0;\n\t}",
"@Override\n\tpublic Retorno eliminarTramo(Double coordXi, Double coordYi, Double coordXf, Double coordYf) {\n\t\treturn new Retorno();\n\t}",
"public void removeNumber(char[][] board, int r, int c, int num) {\n Set<Integer> s1 = row.getOrDefault(r, new HashSet<>());\n s1.remove(num);\n row.put(r, s1);\n\n Set<Integer> s2 = col.getOrDefault(c, new HashSet<>());\n s2.remove(num);\n col.put(c, s2);\n\n Set<Integer> s3 = block.getOrDefault(getBlock(r, c), new HashSet<>());\n s3.remove(num);\n block.put(getBlock(r, c), s3);\n board[r][c] = '.';\n }",
"void remover(String cpf)throws ProfessorCpfNExisteException;",
"public void mo23340c() {\n super.mo23340c();\n this.f13125b.f13127a.remove(this.f13201f);\n this.f13125b.f13130d.remove(this.f13203h);\n m16205g();\n this.f13199d.mo23479b(this.f13202g);\n }",
"private void optimizefc() {\n\r\n\t\tfor (int i = 0; i < fc.size(); i++) {\r\n\t\t\tString c = fc.get(i).get(0);\r\n\t\t\tif (!keys.containsAll(cliques.get(c))) {\r\n\t\t\t\tfc.remove(i);\r\n\t\t\t\toptimizefc();\r\n\t\t\t}\r\n\t\t}\r\n\t}",
"public void clean() {\n \tfor(int f=0; f<NUMCARTAS;f++) \n \tfor(int c=0; c<NUMCARTAS;c++) {\n \t\ttablero[f][c].setSelected(false);\n\t \t \t//Devuelve al color original\n\t if(tablero[f][c].getText().length()==2) tablero[f][c].setBackground(colorDiagonal);\n\t else if(tablero[f][c].getText().charAt(2)=='s') tablero[f][c].setBackground(colorSuited);\n\t else tablero[f][c].setBackground(colorOffsuited);\n \t}\n }",
"private void removeAt(Coord c) {\n\t\tElement e = getAt(c);\n\t\tif(e != null) {\n\t\t\tlistLiving.remove(e);\n\t\t}\n\t\tmapContains.put(c, null);\n\t}",
"public void movF(){\r\n\t\t\r\n\t\t\r\n\t\t/*\r\n\t\t * fallos , la f3 de la cara 4 pasa a la c0 de cara 2\r\n\t\t * la columna 0 de cara dos pasa a fila 1 cara 5\r\n\t\t * columna 3 de cara 0 para a fila 0 cara 4\r\n\t\t * fila 0 cara 5 pasa a columna 3 cara 0\r\n\t\t */\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tint aux[][] = new int[1][3];\r\n\t\tint aux2[][] = new int[3][1];\r\n\t\tint aux3[][] = new int[1][3];\r\n\t\tint aux4[][] = new int[3][1];\r\n\t\t\r\n\t\tint aux5[][]= new int [1][3];\r\n\t\tint aux6[][]= new int [1][3];\r\n\t\tint aux7[][]= new int [1][3];\r\n\t\t\r\n\t\t//copiamos en un aux la primera fila de zona 5\r\n\t\taux=cloneF(5,0);\r\n\t\taux2=cloneC(0,2);\r\n\t\taux3=cloneF(4,2); //bloque 4 fila 2\r\n\t\taux4=cloneC(2,0);//bloque 2 col 0\r\n\t\t\r\n\t\taux5=cloneF(1,0);\r\n\t\taux6=cloneF(1,1);\r\n\t\taux7=cloneF(1,2);\r\n\t\t\r\n\t\t\r\n\t\tthis.copiaEnColumnaUnaFila(aux, 0, 2);//copiamos en bl0 col2\r\n\t\tthis.copiaEnFilaUnaColumnaReverse(aux2, 4, 2);\r\n\t\t\r\n\t\tthis.copiaEnColumnaUnaFila(aux3, 2, 0);//copiamos en bl0 la col0\r\n\t\tthis.copiaEnFilaUnaColumnaReverse(aux4, 5, 0);\r\n\t\t\r\n\t\tthis.copiaEnColumnaUnaFila(aux5, 1, 2);\r\n\t\tthis.copiaEnColumnaUnaFila(aux6, 1, 1);\r\n\t\tthis.copiaEnColumnaUnaFila(aux7, 1, 0);\r\n\t\t\r\n\t\t\r\n\t}",
"private static void strip(final List<ValueNode> nodes, Collection c, ValueNode current) {\n if (current.blockName != null || current.isField()) {\n \n int cpt = 0;\n for (ValueNode node : nodes) {\n if (Objects.equals(node.path, current.path) &&\n Objects.equals(node.blockName, current.blockName)) {\n cpt++;\n }\n }\n if (c.size() > cpt) {\n final List toRemove = new ArrayList<>();\n final Iterator it = c.iterator();\n int i = 0;\n while (it.hasNext()) {\n Object o = it.next();\n if (i >= cpt) {\n toRemove.add(o);\n }\n i++;\n }\n c.removeAll(toRemove);\n }\n }\n }",
"private void remove() {\n \t\tfor(int i = 0; i < 5; i++) {\n \t\t\trMol[i].setText(\"\");\n \t\t\trGrams[i].setText(\"\");\n \t\t\tpMol[i].setText(\"\");\n \t\t\tpGrams[i].setText(\"\");\n \t\t}\n }",
"@Override\r\n\t\t\tpublic void eliminar() {\n\r\n\t\t\t}",
"@Override\n\tpublic void eliminar() {\n\t\t\n\t}",
"public void supprimerFiche(Fiche fiche) ;",
"public static void eliminarTernero(String crotal){\n ArrayList<Ternero> terneros = bdAnimalesTerneros.getDatosObjeto(crotal);\n if(terneros.size() > 0)\n bdAnimalesTerneros.borrarDatos(terneros.get(0));\n }",
"@Override\n\tpublic void eliminar() {\n\n\t}",
"public void eliminarCurs(int codiCurs) {\r\n// int codiCurs = llegirNum(\"Codi del curs a eliminar: \");\r\n Curs curs = (Curs) this.llistCurs.cercar(codiCurs);\r\n if (curs != null) {\r\n Assignatura assAux = curs.getList().getCap();\r\n while (assAux != null) {\r\n curs.eliminarAssignautra(assAux.getCodi());\r\n assAux = curs.getList().getCap();\r\n }\r\n this.llistCurs.eliminar(codiCurs);\r\n JOptionPane.showMessageDialog(new JFrame(),\r\n \"Curs eliminat correctament\");\r\n\r\n } else {\r\n// System.out.println(\"Curs no existent.\");\r\n JOptionPane.showMessageDialog(new JFrame(),\r\n \"Curs no exsistent\",\r\n \"ERROR\",\r\n JOptionPane.ERROR_MESSAGE);\r\n }\r\n }",
"void clearCell(int x, int y);",
"public void decida(){\r\n int f=this.getFila();\r\n int c=this.getColumna();\r\n int cont=alRededor(f,c);\r\n if(this.isVivo()){\r\n if(cont==2 || cont==3){\r\n estadoSiguiente=VIVA;\r\n }else/* if(cont==1 || cont>3)*/{\r\n estadoSiguiente=MUERTA;\r\n }\r\n }else{\r\n if(cont==3){\r\n estadoSiguiente=VIVA;\r\n }else if(cont==1 || cont>3){\r\n estadoSiguiente=MUERTA;\r\n }\r\n }\r\n }",
"public void eliminarCajeros(int id);",
"public Celda(int f, int c) {\n\t\tfila=f;\n\t\tcolumna=c;\n\t\tvalor=null;\n\t\tcuadrante=0;\n\t\tcumple=false;\n\t\tentidadGrafica = new EntidadGrafica();\n\t}",
"void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }",
"public void deleteSelected() {\r\n \t\tObject cells[] = graph.getSelectionCells();\r\n \t\tGraphModel graphmodel = graph.getModel();\r\n \r\n \t\t// If a cell is a blocking region avoid removing its edges and\r\n \t\t// select its element at the end of the removal process\r\n \t\tSet edges = new HashSet();\r\n \t\tSet<Object> select = new HashSet<Object>();\r\n \r\n \t\t// Set with all regions that can be deleted as its child were removed\r\n \t\tSet<Object> regions = new HashSet<Object>();\r\n \t\t// Set with all JmtCells that we are removing\r\n \t\tSet<Object> jmtCells = new HashSet<Object>();\r\n \r\n \t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t// for(int k=0; k<cells.length; k++){\r\n \t\t// if(cells[k] instanceof JmtEdge){\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)cells[k])))).SubOut();\r\n \t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)cells[k])))).SubIn();\r\n \t\t// }\r\n \t\t//\r\n \t\t// }\r\n \t\tfor (int i = 0; i < cells.length; i++) {\r\n \t\t\tif (!(cells[i] instanceof BlockingRegion)) {\r\n \t\t\t\t// Adds edge for removal\r\n \t\t\t\tedges.addAll(DefaultGraphModel.getEdges(graphmodel, new Object[] { cells[i] }));\r\n \t\t\t\t// Giuseppe De Cicco & Fabio Granara\r\n \t\t\t\t// quando vado a eliminare un nodo, a cui collegato un arco,\r\n \t\t\t\t// vado ad incrementare o diminuire il contatore per il\r\n \t\t\t\t// pulsanteAGGIUSTATUTTO\r\n \t\t\t\t// Iterator iter = edges.iterator();\r\n \t\t\t\t// while (iter.hasNext()) {\r\n \t\t\t\t// Object next = iter.next();\r\n \t\t\t\t// if (next instanceof JmtEdge){\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getSource((JmtEdge)next)))).SubOut();\r\n \t\t\t\t// ((JmtCell)(graphmodel.getParent(graphmodel.getTarget((JmtEdge)next)))).SubIn();\r\n \t\t\t\t// }\r\n \t\t\t\t//\r\n \t\t\t\t// }\r\n \t\t\t\t// Stores parents information and cell\r\n \t\t\t\tif (cells[i] instanceof JmtCell) {\r\n \t\t\t\t\tif (((JmtCell) cells[i]).getParent() instanceof BlockingRegion) {\r\n \t\t\t\t\t\tregions.add(((JmtCell) cells[i]).getParent());\r\n \t\t\t\t\t}\r\n \t\t\t\t\tjmtCells.add(cells[i]);\r\n \t\t\t\t}\r\n \t\t\t} else {\r\n \t\t\t\t// Adds node for selection\r\n \t\t\t\tObject[] nodes = graph.getDescendants(new Object[] { cells[i] });\r\n \t\t\t\tfor (Object node : nodes) {\r\n \t\t\t\t\tif (node instanceof JmtCell || node instanceof JmtEdge) {\r\n \t\t\t\t\t\tselect.add(node);\r\n \t\t\t\t\t}\r\n \t\t\t\t}\r\n \t\t\t\t// Removes blocking region from data structure\r\n \t\t\t\tmodel.deleteBlockingRegion(((BlockingRegion) cells[i]).getKey());\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tif (!edges.isEmpty()) {\r\n \t\t\tgraphmodel.remove(edges.toArray());\r\n \t\t}\r\n \t\t// removes cells from graph\r\n \t\tgraphmodel.remove(cells);\r\n \r\n \t\t// Checks if all children of a blocking region have been removed\r\n \t\tIterator<Object> it = regions.iterator();\r\n \t\twhile (it.hasNext()) {\r\n \t\t\tjmtCells.add(null);\r\n \t\t\tBlockingRegion region = (BlockingRegion) it.next();\r\n \t\t\tList child = region.getChildren();\r\n \t\t\tboolean empty = true;\r\n \t\t\tfor (int i = 0; i < child.size(); i++) {\r\n \t\t\t\tif (child.get(i) instanceof JmtCell && !jmtCells.contains(child.get(i))) {\r\n \t\t\t\t\tempty = false;\r\n \t\t\t\t\tbreak;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t\tif (empty) {\r\n \t\t\t\tmodel.deleteBlockingRegion(region.getKey());\r\n \t\t\t\tgraphmodel.remove(new Object[] { region });\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// Removes cells from data structure\r\n \t\tfor (Object cell : cells) {\r\n \t\t\tif (cell instanceof JmtCell) {\r\n \t\t\t\tmodel.deleteStation(((CellComponent) ((JmtCell) cell).getUserObject()).getKey());\r\n \t\t\t} else if (cell instanceof JmtEdge) {\r\n \t\t\t\tJmtEdge link = (JmtEdge) cell;\r\n \t\t\t\tmodel.setConnected(link.getSourceKey(), link.getTargetKey(), false);\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\t// If no stations remains gray select and link buttons\r\n \t\tif (graph.getModel().getRootCount() == 0) {\r\n \t\t\tcomponentBar.clearButtonGroupSelection(0);\r\n \t\t\tsetConnect.setEnabled(false);\r\n \t\t\tsetSelect.setEnabled(false);\r\n \t\t}\r\n \r\n \t\t// Selects components from removed blocking regions\r\n \t\tif (select.size() > 0) {\r\n \t\t\tgraph.setSelectionCells(select.toArray());\r\n \t\t\t// Resets parent information of cells that changed parent\r\n \t\t\tit = select.iterator();\r\n \t\t\twhile (it.hasNext()) {\r\n \t\t\t\tObject next = it.next();\r\n \t\t\t\tif (next instanceof JmtCell) {\r\n \t\t\t\t\t((JmtCell) next).resetParent();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}",
"void removeContactMeans(int i);",
"public int eliminardelFinal(){\n int elemento = fin.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n fin = fin.ant;\n fin.sig = null;\n }\n return elemento;\n \n \n }",
"public void removeCol( int r ) {\n\t\tint size = rows * (cols+1);\n\t\tfloat[] x = new float[size];\n\t\tfloat[] y = new float[size];\n\n\t\tcols--;\n\t\tfor (int row = 0; row < rows; row++) {\n\t\t\tint i = row*(cols+1);\n\t\t\tint j = row*cols;\n\t\t\tfor (int col = 0; col < cols; col++) {\n\t\t\t\tx[j] = xGrid[i];\n\t\t\t\ty[j] = yGrid[i];\n\t\t\t\tif ( col == r-1 )\n\t\t\t\t\ti++;\n\t\t\t\ti++;\n\t\t\t\tj++;\n\t\t\t}\n\t\t}\n\t\txGrid = x;\n\t\tyGrid = y;\n\t}",
"public int eliminardelInicio(){\n int elemento = inicio.dato;\n if(inicio == fin){\n inicio=fin=null;\n }else{\n inicio = inicio.sig;\n inicio.ant = null;\n }\n return elemento;\n \n \n }",
"public int eliminardelfinal(){\n int elemento=fin.dato;\n if(inicio==fin){\n inicio=fin=null;\n }else{\n fin=fin.anterior;\n fin.siguiente=null;}\n return elemento;\n }",
"public void copiar() {\n for (int i = 0; i < F; i++) {\n for (int j = 0; j < C; j++) {\n old[i][j]=nou[i][j];\n }\n }\n }",
"public void RemoveSol()\r\n {\r\n for (int i = 0; i <maze.Struct.length ; i++) {\r\n for (int j = 0; j <maze.Struct[0].length ; j++) {\r\n if (maze.Struct[i][j]== 2)\r\n maze.Struct[i][j]= 0;\r\n }\r\n }\r\n setChanged();\r\n notifyObservers(\"RemoveSol\");\r\n }",
"public void afectarDisparoEnemigo(FlechaE f) {\n\t\tf.eliminar();\n\t}",
"public void removeRow( int r ) {\n\t\tint size = (rows-1) * cols;\n\t\tfloat[] x = new float[size];\n\t\tfloat[] y = new float[size];\n\n\t\trows--;\n\t\tint i = 0;\n\t\tint j = 0;\n\t\tfor (int row = 0; row < rows; row++) {\n\t\t\tfor (int col = 0; col < cols; col++) {\n\t\t\t\tint k = j+col;\n\t\t\t\tint l = i+col;\n\t\t\t\tx[k] = xGrid[l];\n\t\t\t\ty[k] = yGrid[l];\n\t\t\t}\n\t\t\tif ( row == r-1 )\n\t\t\t\ti += cols;\n\t\t\ti += cols;\n\t\t\tj += cols;\n\t\t}\n\t\txGrid = x;\n\t\tyGrid = y;\n\t}",
"public void uncoverContiguous( int r , int c )\n { \n \n Stack<MineTile> stack = new Stack<MineTile>();\n stack.add(mineField[r][c]);\n \n while(!stack.empty())\n {\n MineTile curTile = stack.pop();\n r = curTile.getRow();\n c = curTile.getCol();\n for(int i = r-1; i <= r+1; i++)\n {\n for(int j = c-1; j <= c+1; j++)\n {\n if(isValid(i, j))\n {\n if(mineField[i][j].isCovered() & mineField[i][j].getCount() == 0)\n {\n stack.add(mineField[i][j]);\n }\n mineField[i][j].uncover();\n }\n \n } \n \n }\n \n }\n }",
"@Override\n\tpublic void borrarArco(Ciudad c1, Ciudad c2) {\n\t\tgetVertice(c1).removeArc(c2);\n\t\tthis.cantArcos--;\n\t}",
"public void anularPer(String cedula){\r\n String sql = \"UPDATE \\\"HIP_PERSONAS\\\" SET \\\"PER_ESTADO\\\" = 'I' WHERE \\\"PER_CEDULA\\\" = '\" + cedula + \"'\";\r\n System.out.println(\"Persona Eliminada eliminada \" + sql);\r\n db.conectar();\r\n try {\r\n\r\n Statement sta = db.getConexionBD().createStatement();\r\n sta.execute(sql);\r\n db.desconectar();\r\n\r\n } catch (SQLException error) {\r\n\r\n error.printStackTrace();\r\n\r\n }\r\n }",
"public void remove(int oldRow, int oldCol)\n {\n Maze.maze[oldRow][oldCol] = ' ';\n }",
"private static void createMinMatrixAfterRemoval(String c) {\n\t\tTreeMap<String, Double> temp = distanceMatrix.get(c);\n\t\tfor(String s:allClusters) {\n\t\t\tif(!s.equals(c)) {\n\t\t\t\tdouble dist = temp.get(s);\n\t\t\t\tupdateMinMatrix(c,s,dist);\n\t\t\t}\n\t\t}\n\t}",
"public void eliminarcola(){\n Cola_banco actual=new Cola_banco();// se crea un metodo actual para indicar los datos ingresado\r\n actual=primero;//se indica que nuestro dato ingresado va a ser actual\r\n if(primero != null){// se usa una condiccion si nuestro es ingresado es diferente de null\r\n while(actual != null){//se usa el while que recorra la cola indicando que actual es diferente de null\r\n System.out.println(\"\"+actual.nombre);// se imprime un mensaje con los datos ingresado con los datos ingresado desde el teclado\r\n actual=actual.siguiente;// se indica que el dato actual pase a ser igual con el apuntador siguente\r\n }\r\n }else{// se usa la condicion sino se cumple la condicion\r\n System.out.println(\"\\n la cola se encuentra vacia\");// se indica al usuario que la cola esta vacia\r\n }\r\n }",
"void celebrer();",
"private void borrarPieza(PosicionAjedrez pos){\n\t\tint fila= transformar(pos).getFila();\n\t\tint col= transformar(pos).getColumna();\n\n\t\tthis.getChildren().remove(tablero[col][fila]);\n\t\ttablero[col][fila]=new Canvas(CASILLERO_ANCHO,CASILLERO_ALTO);\n\t\ttablero[col][fila].setTranslateX(CASILLERO_ANCHO*col);\n\t\ttablero[col][fila].setTranslateY(CASILLERO_ALTO*fila);\n\n\t\tthis.getChildren().add(tablero[col][fila]);\n\t}",
"public void removeFromRow(int value, int row){\n\tfor (int c = 0; c < 9; c ++){\r\n\t if (board[row][c].remove(value) == true) {\r\n\t\tassign (board[row][c].getGuess(), row, c);\r\n\t }\r\n\t} \r\n }",
"private void removeMine(int i, int j) {\n current[i][j] = new Empty();\n for (int k = -1; k <= 1; k++) {\n for (int l = -1; l <= 1; l++) {\n //pas de omliggende vlaggetjes aan\n if ((k != 0 || l != 0) && inField(i + k, j + l) && current[i + k][j + l].isBound()) {\n current[i + k][j + l].increment();\n }\n }\n }\n }",
"void dropcard()\n{\nfor (int i=0;i<hc.size()-1;i++)\n\t{\n\tif(hc.get(i)==1||hc.get(i)==2)\n\t\tcontinue;\n\telse if((((hc.get(i))-3)/4)==(((hc.get(i+1))-3)/4))\n\t\t{hc.remove(i);\n\t\thc.remove(i);\n\t\ti--;}\t\n\t}\n}",
"public void setField( Field f, int val) {\n grid[f.x][f.y]=val;\n // System.out.println(\"pN before: \"+pN);\n pN.get(f).clear();\n empty.remove(f);\n Set<Field> ch = new HashSet<>();\n ch.addAll(getBox(f));\n ch.addAll(getColumn(f));\n ch.addAll(getRow(f));\n for(Field x : ch) {\n pN.get(x).remove(val);\n }\n // System.out.println(\"pN after: \"+pN);\n }",
"public void eliminarCocheTaller(String matricula) {\n\t\tif (mecanicoController.deleteCocheTaller(matricula)) {\n\t\t\tJOptionPane.showMessageDialog(contentPane, \"El coche ha salido del taller.\");\n\t\t\tlogger.info(\"El coche ha salido del taller.\");\n\t\t} else {\n\t\t\tlogger.error(\"Error al eliminar el CocheTaller\");\n\t\t}\n\t}",
"protected void removeLine(int row) {\n\t\t// clear out the true values from row/filled blocks\n\t\tfor(int j = 0; j < blockMatrix[row].length; j++) { \n\t\t\tblockMatrix[row][j] = false; \n\t\t}\n\t}",
"public static void excluir(int numCompra){\r\n lerXml();\r\n for(int i=0; i < lista.size(); i++){\r\n Estoque cadaEstoque = lista.get(i);\r\n \r\n //procura o estoque que tem o CPF igual \r\n //à variável \"cpf\", que tá chegando entre\r\n //os parênteses\r\n if (cadaEstoque.getNumCompra()==numCompra){\r\n lista.remove(i);\r\n }\r\n }\r\n salvarXml();\r\n }",
"@Override\n protected void remover(Funcionario funcionario) {\n\n }",
"public void recolheMao() {\n\t\tcartas[0].visible = false;\n\t\tfor (int i = 4; i <= 15; i++) {\n\t\t\tCartaVisual c = cartas[i];\n\t\t\tif ((c.top != topBaralho) || (c.left != leftBaralho)) {\n\t\t\t\tc.movePara(leftBaralho, topBaralho, 100);\n\t\t\t\tc.setCarta(null);\n\t\t\t\tc.descartada = false;\n\t\t\t\tcartasJogadas.remove(c);\n\t\t\t}\n\t\t}\n\t}",
"public void removeAllPieces()\n\t{\n\t\t/* iterate over the rows and columns */\n\t\tfor (int i = 0; i < m_rows; i++) {\n\t\t\tfor (int j = 0; j < m_cols; j++) {\n\t\t\t\tremovePiece(i, j);\n\t\t\t}\n\t\t}\n\t}",
"@Override\n\tpublic void deleteCpteEpargne(CompteEpargne cpt) {\n\t\t\n\t}",
"public void eliminar(ArrayList<Correo>cor,int posicion){\r\n for(Correo corre:cor){\r\n if(cor.contains(posicion-1)){\r\n cor.remove(corre);\r\n }\r\n }\r\n }",
"public void removeAll(String c) {\r\n int[] elements = new int[(c.length() / 2) + 1];\r\n if (containsAll(c)) {\r\n for (int i = 0; i < elements.length; i++) {\r\n elements[i] = Integer.parseInt(c.substring(0, c.indexOf(\",\")));\r\n c = c.substring((c.indexOf(\",\") + 1));\r\n remove(elements[i]);\r\n }\r\n } else {\r\n throw new RuntimeException(\"some or all elements dont exist in List.\");\r\n }\r\n }",
"public void elimina(DTOAcreditacionGafetes acreGafete) throws Exception;",
"public void eliminar(){\n inicio = null;\r\n // Reinicia el contador de tamaño de la lista a 0.\r\n tamanio = 0;\r\n }",
"public FormaClausal(String fc) {\n\t\tformas = new ArrayList<>();\n\t\t\n\t\tfor (int i = 0; i < fc.length(); i++) {\n\t\t\tString forma = fc.charAt(i) + \"\";\n\t\t\t\n\t\t\tif (forma.equals(Operadores.NEGACION)) {\n\t\t\t\tString neg = forma + fc.charAt(i+1);\n\t\t\t\ti++;\n\t\t\t\tif (!formas.contains(neg)) {\n\t\t\t\t\tformas.add(neg);\n\t\t\t\t}\n\t\t\t}\n\t\t\telse {\n\t\t\t\tif (!formas.contains(forma)) {\n\t\t\t\t\tformas.add(forma);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\tCollections.sort(formas);\n\t}",
"public void removeFromCol(int value, int col){\n\tfor(int r = 0; r < 9; r++){\r\n\t if (board[r][col].remove(value) == true) {\r\n\t\tassign (board[r][col].getGuess(), r, col);\r\n\t }\r\n\t}\r\n }",
"public static void eliminarVaca(String crotal){\n ArrayList<Vaca> vacas = bdAnimalesVacas.getDatosObjeto(crotal);\n\n if(vacas.size() > 0)\n bdAnimalesVacas.borrarDatos(vacas.get(0));\n }",
"public void revisaColisionMapa() {\n\t\tactualCol = (int)x / tamTile;\n\t\tactualRen = (int)y / tamTile;\n\t\t\n\t\txdest = x + dx;\n\t\tydest = y + dy;\n\t\t\n\t\txtemp = x;\n\t\tytemp = y;\n\t\t\n\t\tcalcularEsquinas(x, ydest);\n\t\tif(dy < 0) {\n\t\t\tif(arribaIzq || arribaDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tytemp = actualRen * tamTile + claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\tif(dy > 0) {\n\t\t\tif(abajoIzq || abajoDer) {\n\t\t\t\tdy = 0;\n\t\t\t\tcayendo = false;\n\t\t\t\tytemp = (actualRen + 1) * tamTile - claltura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\tytemp += dy;\n\t\t\t}\n\t\t}\n\t\t\n\t\tcalcularEsquinas(xdest, y);\n\t\tif(dx < 0) {\n\t\t\tif(arribaIzq || abajoIzq) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = actualCol * tamTile + clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\tif(dx > 0) {\n\t\t\tif(arribaDer || abajoDer) {\n\t\t\t\tdx = 0;\n\t\t\t\txtemp = (actualCol + 1) * tamTile - clanchura / 2;\n\t\t\t}\n\t\t\telse {\n\t\t\t\txtemp += dx;\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(!cayendo) {\n\t\t\tcalcularEsquinas(x, ydest + 1);\n\t\t\tif(!abajoIzq && !abajoDer) {\n\t\t\t\tcayendo = true;\n\t\t\t}\n\t\t}\n\t}",
"private void removePosition(Point p) {\n\t\tfor(Point point : occupiedPositions) {\n\t\t\tif(p.x == point.x && p.y == point.y) {\n\t\t\t\toccupiedPositions.remove(point);\n\t\t\t}\n\t\t}\n\t}",
"public String eliminar()\r\n/* 504: */ {\r\n/* 505:518 */ return null;\r\n/* 506: */ }",
"private void removePiece(int row, int col, int storedRow, int storedCol){\r\n int pieceRow = -1;\r\n int pieceCol = -1;\r\n if(col > storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col-1;\r\n }\r\n if(col > storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col-1;\r\n }\r\n if(col < storedCol && row > storedRow){\r\n pieceRow = row-1;\r\n pieceCol = col+1;\r\n }\r\n if(col < storedCol && row < storedRow){\r\n pieceRow = row+1;\r\n pieceCol = col+1;\r\n }\r\n checks[pieceRow][pieceCol] = 0;\r\n if(isGame) nextPlayer.subCheck();\r\n }",
"public static LinkedList2 removeOneCamera(char[][] Matrix){\n\t \n\t\n\t\n\t\n\t LinkedList2 AfterRemoving= new LinkedList2();\n\n\n\n\t int arraySize=countNmberOfCameras(Matrix);\n\t \n\t\n\t \n\t if(arraySize<=1) {//why\n\t\t AfterRemoving.insert(matrix, calculateOpjectiveFunction(matrix));\n\t\t return AfterRemoving ;\n\t\t \n\t }\n\n\n\t \n\t int[] Ipositions= new int [arraySize];\n\t int[] Jpositions= new int [arraySize];\n\t \n\t int[] NEWIpositions= new int [arraySize]; \n\t int[] NEWJpositions= new int [arraySize];\n\t \n\t int index=0;\n\n\t for(int k=0; k<size ; k++) {\n\t \tfor(int r=0 ; r<size ; r++) {\n\t \t\t\n\t if(Matrix[k][r] == 'c' ) {\n\t \t\t\t\n\t \t\t\t Ipositions[index]=k;\n\t \t\t\t Jpositions[index]=r;\n\t \t\t\t \n\t \t\t\tNEWIpositions[index]=k;\n\t \t\t NEWJpositions[index]=r;\n\t \t\t\t \n\t \t\t\t index++;\n\t \t\t\t \n\t \t\t}\n\t \t}\n\t }\n\t \n\t \n\t boolean[] haveBeenRemoved= new boolean [arraySize];\n\t \n\t //the original matrix because i want the o too\n\t \n\t \n\t for(int i =0 ; i< arraySize ; i++) {\n\t \t \n\t \t \tchar[][] newMatrix= new char[size][size];\n\t \t \t\n\t \t for(int k=0 ; k< size ; k++)\n\t \t \t for(int r=0 ; r<size ; r++)\n\t \t \t\t newMatrix[k][r]=matrix[k][r];\n\t \t \n\n\t \t if( ! haveBeenRemoved[i] ) {\n\t for(int k=0 ; k<arraySize ;k++) {\n\t \t \n\t \t if(i==k) //\n\t \t\t continue;\n\t \t \n\t \t if(NEWIpositions[k]!=-1 || NEWJpositions[k]!=-1) {\n\t \t newMatrix[Ipositions[k]][Jpositions[k]]='c';\n\t \n\t \n\t updateVisibility(Ipositions[k], Jpositions[k], newMatrix);\n\t \t \n\t \tNEWIpositions[k]=-1;\n\t \tNEWJpositions[k]=-1;\n\t \t\n\t }\n\t \t \n\t }\n\t \n\t for(int m=0; m<arraySize ;m++ ) {\n\t \t\tNEWIpositions[m]= Ipositions[m];\n\t \tNEWJpositions[m]=Jpositions[m];\n\t }\n\t \n\t haveBeenRemoved[i]=true;\n\t AfterRemoving.insert(newMatrix, calculateOpjectiveFunction(newMatrix));\n\t }\n\t }\n\t return AfterRemoving;\n}",
"public Point2D removePoint(int i);",
"public void eliminar(DetalleArmado detallearmado);",
"private void clearDelete() {\n if (patternCase_ == 5) {\n patternCase_ = 0;\n pattern_ = null;\n }\n }",
"private void RemoverMapa(String nomeMapa){\n try{\n BufferedReader br = new BufferedReader(new FileReader(caminho.getPath()+\"/caminho.txt\"));\n File rm = new File(caminho.getPath()+\"/\"+nomeMapa+\".txt\");\n rm.delete();\n String linha = br.readLine();\n ArrayList<String> salvar = new ArrayList();\n String array[] = new String[3];\n while (linha != null){\n array = linha.split(\",\");\n if(!array[1].equals(nomeMapa)){\n salvar.add(linha);\n }\n linha = br.readLine();\n }\n br.close();\n FileWriter fw = new FileWriter(caminho.getPath()+\"/caminho.txt\", true);\n fw.close();\n BufferedWriter bw = new BufferedWriter(new FileWriter(caminho.getPath()+\"/caminho.txt\"));\n for (int i = 0; i < salvar.size();i++){\n bw.write(salvar.get(i));\n bw.newLine();\n }\n bw.close();\n\n }catch (IOException ioe){\n }\n }",
"public void reset() {\n for (int i = 0; i < numberOfRows; i++ ) {\n for (int j =0; j < numberOfColumns; j++) {\n if (grid[i][j] == LASER) {\n this.Remove(i,j);\n }\n }\n }\n }",
"@Override\n\tpublic Retorno eliminarEsquina(Double coordX, Double coordY) {\n\t\treturn new Retorno();\n\t}",
"@Override\r\n\tpublic void eliminar() {\n\t\ttab_nivel_funcion_programa.eliminar();\r\n\t\t\r\n\t}",
"void positionCleared();",
"@Override\n\tpublic void deleteConseille(Conseille c) {\n\t\t\n\t}",
"private void pintar_cuadrantes() {\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 0; f < 3; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 3; f < 6; f++)\n//\t\t\tfor (int c = 3; c < 6; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 0; c < 3; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\n//\t\tfor (int f = 6; f < 9; f++)\n//\t\t\tfor (int c = 6; c < 9; c++)\n//\t\t\t\ttablero[f][c].setBorder(new LineBorder(Color.DARK_GRAY, 2));\n//\t\n\t\t\n\t\t}",
"public void remove(String clave){\n if(!claves.isEmpty()){\n if(claves.contains(clave)){\n valores.remove(claves.indexOf(clave));\n claves.remove(claves.indexOf(clave));\n }\n }\n }",
"void DropFood(){\r\n if (plateau[this.x][this.y]!='0' && this.charge!='0'){\r\n this.plateau[this.x][this.y]+=this.charge;\r\n this.charge=0;\r\n \r\n } \r\n }",
"public void excluirUltimaLinha() {\n valor = venda.BuscaultValor(ultimacod) - ultimoValor;\n int tempqte = venda.BuscaQte(ultimacod) + ultimaQte;\n SubMatRemove(ultimoValor, Double.parseDouble(jTxtSubTotal.getText()));\n AtulizaBanco(ultimacod, fun.getMatricula(), valor, tempqte);\n ((DefaultTableModel) jTable1.getModel()).removeRow(jTable1.getRowCount() - 1);\n }",
"public void removeContact(String tag){\n\t\tfor(int i=0;i<views.size();i++){\n\t\t\tif(tag.equals(views.get(i).getTag()+\"\")){\n\t\t\t\tmitaxiregistermanually_ll_contactos.removeView(views.get(i));\n\t\t\t\tviews.remove(i);\n\t\t\t\temergencia_esta_Ocupado[Integer.parseInt(tag)]=false;\n\t\t\t\tif(emergencia_esta_Ocupado[0]||emergencia_esta_Ocupado[1]){\n\t\t\t\t\tmitaxiregistermanually_tv_agregar.setVisibility(TextView.VISIBLE);\n\t\t\t\t}\n\t\t\t\tif((!emergencia_esta_Ocupado[0]&&!emergencia_esta_Ocupado[1])){{\n\t\t\t\t\tif(mitaxiregistermanually_cv_paranoico.isChecked()){\n\t\t\t\t\t\tmitaxiregistermanually_cv_paranoico.setChecked(false);\n\t\t\t\t\t\tDialogos.Toast(RegistroContactosEmergenciaActivity.this,getResources().getString(R.string.Registro_manual_datos_paranoico_sin_contac) , Toast.LENGTH_LONG);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\n\t\t\t\t}\n\t\t\t\tif(!validaEditText(R.string.Registro_manual_datos_paranoico_sin_contac)){\n\t\t\t\t\tmitaxiregistermanually_cv_paranoico.setChecked(false);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}",
"public void removeOtherValues(int row, int col, int num) {\n\t\tfor (Cell cell : getRow(row)) {\n\t\t\tcell.remove(num);\n\t\t}\t\t\n\t\t// removes num from possible values in the col\n\t\tfor (Cell cell : getCol(col)) {\n\t\t\tcell.remove(num);\n\t\t}\n\t\tint box = (row)/size*size+1 + (col)/size;\n\t\t// removes num from possible values in the box\n\t\tfor (Cell cell : getBox(box)) {\n\t\t\tcell.remove(num);\n\t\t}\n\t}",
"@FXML\r\n private void deduPointsCh() {\r\n int f1 = Integer.parseInt(charistma.getText());\r\n if (f1 > 0) {\r\n int f2 = f1 - 1;\r\n charistma.setText(String.valueOf(f2));\r\n diffPoint++;\r\n point.setText(\"You have \" + diffPoint + \" points\");\r\n }\r\n }",
"public void clear( )\r\n {\r\n frente = null; // ¿alguna duda?\r\n }",
"public void clear( )\r\n {\r\n frente = null; // ¿alguna duda?\r\n }",
"void columnRemoved(Sheet s, int sheetIndex, int col)\r\n/* 191: */ {\r\n/* 192:347 */ this.parser.columnRemoved(sheetIndex, col, s == getSheet());\r\n/* 193:348 */ this.formulaBytes = this.parser.getBytes();\r\n/* 194: */ }",
"private void eraseAt(PointF p) {\n lastEraseTrace.add(sheet.toSheet(p));\n }",
"public void eliminaDoppie(ArrayList<Sensore> listaSensori, ArrayList<Attuatore> listaAttuatori) {\n String lettura = readRuleFromFile();\n\n if (lettura.equals(\"\"))\n return;\n\n String[] regole = lettura.split(\"\\n\");\n\n\n ArrayList<String> regoleList = new ArrayList<>(Arrays.asList(regole));\n ArrayList<String> regoleSenzaAbil = new ArrayList<>();\n\n for (String reg : regoleList) {\n regoleSenzaAbil.add(reg.replace(\"ENABLED --> IF \",\"\").replace(\"DISABLED --> IF \",\"\"));\n }\n\n List<String> listWithoutDuplicates = regoleSenzaAbil.stream().distinct().collect(Collectors.toList());\n StringBuilder regoleModificate = new StringBuilder();\n\n for (int i = 0; i < listWithoutDuplicates.size() - 1; i++) {\n\n if (verificaAbilitazione(listWithoutDuplicates.get(i),listaSensori,listaAttuatori))\n regoleModificate.append(\"ENABLED --> IF \");\n else\n regoleModificate.append(\"DISABLED --> IF \");\n\n regoleModificate.append(listWithoutDuplicates.get(i)).append(\"\\n\");\n }\n\n if (verificaAbilitazione(listWithoutDuplicates.get(listWithoutDuplicates.size() - 1),listaSensori,listaAttuatori))\n regoleModificate.append(\"ENABLED --> IF \");\n else\n regoleModificate.append(\"DISABLED --> IF \");\n\n regoleModificate.append(listWithoutDuplicates.get(listWithoutDuplicates.size() - 1));\n writeRuleToFile(regoleModificate.toString(), false);\n }",
"@Test public void testPublic9() {\n Graph<Character> graph= TestGraphs.testGraph3();\n char[] toRemove= {'I', 'H', 'B', 'J', 'C', 'G', 'E', 'F'};\n int i;\n\n for (i= 0; i < toRemove.length; i++) {\n graph.removeVertex(toRemove[i]);\n assertFalse(graph.hasVertex(toRemove[i]));\n }\n }",
"public void eliminaCuadrante(int mes, int anio, String idDepartamento) {\r\n\t\tif (!alive) return;\r\n\t\tint i = 0;\r\n\t\twhile (i<cuadrantes.size()) {\r\n\t\t\tif (cuadrantes.get(i).getIdDepartamento().equals(idDepartamento) && cuadrantes.get(i).getMes()==mes && cuadrantes.get(i).getAnio()==anio) {\r\n\t\t\t\tcuadrantes.remove(i);\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\ti++;\r\n\t\t}\r\n\t}",
"public static void removeColumnMappingEntries(Connection c, int fcId, Set<Field> fields) throws SQLException {\r\n\t\tPreparedStatement s = c.prepareStatement(\"delete from \"+quote(CM_TABLE_NAME)+\" where \"+\r\n\t\t\t\tquote(CM_FC_ID_FIELD.name)+\" = ? and \"+quote(CM_COL_NAME_FIELD.name)+\" = ?\");\r\n\t\tfor(Field f: fields){\r\n\t\t\ts.setInt(1, fcId);\r\n\t\t\ts.setString(2, f.name);\r\n\t\t\ts.addBatch();\r\n\t\t}\r\n\t\ts.executeBatch();\r\n\t}",
"public String eliminarDetalle()\r\n/* 340: */ {\r\n/* 341:400 */ this.cuentaContableDimensionContable = ((CuentaContableDimensionContable)this.dtCuentaContable.getRowData());\r\n/* 342:401 */ this.cuentaContableDimensionContable.setEliminado(true);\r\n/* 343:402 */ return \"\";\r\n/* 344: */ }",
"@Test\n\tpublic void testEliminationByColumn(){\n\t\tsetBoardUp();\n\t\tColumn col = new Column(board, 1);\n\t\tint[] toBeRemoved = {1, 3, 4};\n\t\tint[] fromCesll = {1, 2, 3, 5, 6, 8};\n\t\talgorithm.applyEliminationInColumn(col);\n\t\tboolean condition = true;\n\t\tfor(int i = 0; i < toBeRemoved.length; i++)\n\t\t\tfor(int j = 0; j < fromCesll.length; j++)\n\t\t\t\tcondition &= !col.cell[fromCesll[j]].possibilities.contains(toBeRemoved[i]);\t\t\n\t\tassertTrue(condition);\n\t}",
"public void moverCeldaArriba(){\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J'&& laberinto.celdas[item.x][item.y-1].tipo !='P' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n }\n if (laberinto.celdas[item.x][item.y-1].tipo == 'C') {\n \n laberinto.celdas[item.x][item.y].tipo = 'V';\n laberinto.celdas[anchuraMundoVirtual/2][alturaMundoVirtual/2].tipo = 'I';\n \n player1.run();\n player2.run();\n }\n /* if (item.y > 0) {\n if (laberinto.celdas[item.x][item.y-1].tipo != 'O' && laberinto.celdas[item.x][item.y-1].tipo !='J' && laberinto.celdas[item.x][item.y-1].tipo !='A') {\n if (laberinto.celdas[item.x][item.y-1].tipo == 'I') {\n if (item.y-2 > 0) {\n laberinto.celdas[item.x][item.y-2].tipo = 'I';\n laberinto.celdas[item.x][item.y-1].tipo = 'V';\n }\n }else{\n laberinto.celdas[item.x][item.y].tipo = 'V';\n item.y=item.y-1;\n laberinto.celdas[item.x][item.y].tipo = 'I';\n // laberinto.celdas[item.x][item.y].indexSprite=Rand_Mod_Sprite()+3;\n } \n } \n }*/\n }"
] | [
"0.6398444",
"0.62902457",
"0.6277376",
"0.6270948",
"0.6254027",
"0.62038517",
"0.6050501",
"0.59886944",
"0.59603614",
"0.5867646",
"0.58266586",
"0.5825713",
"0.57471204",
"0.5743908",
"0.57373494",
"0.56623816",
"0.56599414",
"0.5610325",
"0.5606007",
"0.55674785",
"0.5549138",
"0.5500267",
"0.5494122",
"0.54906005",
"0.5479695",
"0.5469025",
"0.5466101",
"0.54275155",
"0.5393431",
"0.5385529",
"0.5365572",
"0.5326377",
"0.5296744",
"0.5293564",
"0.5276452",
"0.52634454",
"0.52437955",
"0.52327585",
"0.52296096",
"0.522036",
"0.5219688",
"0.52152085",
"0.5214375",
"0.52119285",
"0.52",
"0.5198043",
"0.5184951",
"0.5182886",
"0.51787704",
"0.5176339",
"0.517246",
"0.51503986",
"0.514856",
"0.5147071",
"0.5138158",
"0.5135249",
"0.5132827",
"0.512682",
"0.5125468",
"0.5116823",
"0.50577223",
"0.50571376",
"0.5046945",
"0.5038521",
"0.502016",
"0.50170165",
"0.5016688",
"0.50163895",
"0.501456",
"0.5013676",
"0.50124186",
"0.5004047",
"0.5002636",
"0.50004154",
"0.49981964",
"0.49941048",
"0.49913013",
"0.49904856",
"0.49880838",
"0.4987442",
"0.49837726",
"0.49780726",
"0.4977175",
"0.49771467",
"0.4965669",
"0.49539512",
"0.49526444",
"0.49393198",
"0.49386486",
"0.4931127",
"0.4931127",
"0.49277323",
"0.49263746",
"0.4921401",
"0.492063",
"0.49176633",
"0.49119362",
"0.49109814",
"0.49109215",
"0.49105376"
] | 0.49812153 | 81 |
Comprueba si el array de string se corresponde con el comando, lo ejecuta con (f 1,c 1) y lo devuelve en tal caso.Si no, devuelve null. | public Comando parsea(String[] cadenaComando) {
if (cadenaComando[0].equals("eliminarcelula") && cadenaComando.length >= 3) {
try {
this.f = Integer.parseInt(cadenaComando[1]) - 1;
this.c = Integer.parseInt(cadenaComando[2]) - 1;
} catch (IllegalArgumentException e) {
System.out.println("Exception thrown: " + e);
return null;
}
return this;
} else {
return null;
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public boolean interpreta(String com[]){\n\t\tint i, contv = 0, j;\n\t\tchar tok;\n\t\tString aux;\n\t\t\n\t\tfor(i = 0 ; i < com.length && com[i] != null; i++){\n\t\t\tcom[i]=com[i].trim();\n\t\t\tcom[i]=com[i].trim();\n\t\t\tcom[i]=com[i].replace(\"fimenquanto\",\"#\");\n\t\t\tcom[i]=com[i].replace(\"fimse\",\"*\");\n\t\t\tcom[i]=com[i].replace(\"else\",\",\");\n\t\t\tcom[i]=com[i].replace(\"se\",\".\");\n\t\t\tcom[i]=com[i].replace(\"op\",\"$\");\n\t\t\tcom[i]=com[i].replace(\":\",\"[\");//Para chamar a funcao abacaxi:\n\t\t\tcom[i]=com[i].replace(\"{\",\"+\");\n\t\t\tcom[i]=com[i].replace(\"}\",\"-\");\n\t\t\tcom[i]=com[i].replace(\"end\",\":\");//Fim do ELSE\n\t\t\tcom[i]=com[i].replace(\"enquanto\",\"@\");\n\t\t\tcom[i]=com[i].replace(\"imprime\",\"%\");\n\t\t\tcom[i]=com[i].replace(\"le\",\"?\");\n\t\t}\n\t\tboolean baleado=false;\n\t\tint salvaFuncao = 0, jaEntrou = 1;\n\t\tMate mat = new Mate();\n\n\t\tfor(i = 0; i < (com.length - 1) && com[i] != null; ++i){\n\t\t\ttok = com[i].charAt(0);\n\t\t\taux = com[i].substring(1);\n\t\t\taux = aux.trim();\n\t\t\t\n\t\t\tswitch(tok){//Caso IF\n\t\t\t\tcase '.':\n\t\t\t\t\tbaleado = Logico.funcaoSe(var, aux, 2);\n\t\t\t\t\tif(baleado == false){\n\t\t\t\t\t\ti = Logico.linha(com, i);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase ',': //Caso ELSE IF\n\t\t\t\t\tif(baleado){\n\t\t\t\t\t\ti = Logico.linha(com, i);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase '*': \t//fim if\n\t\t\t\t\tbreak;\n\t\t\t\tcase ':': //fim ELSE\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '$': \t//criar variavel\n\t\t\t\t\tString[] nova = aux.split(\"=\");\n\t\t\t\t\tString nok = new String();\n\t\t\t\t\tnova[1] = nova[1].trim();\n\t\t\t\t\tnok = nova[1].substring(0);\n\t\t\t\t\t//double valor = Mate.soma(nova[1], var);\n\t\t\t\t\tint jaka,contador;\n\t\t\t\t\tdouble value;\n\t\t\t\t\tchar jui = ' ';\n\t\t\t\t\tfor(jaka=0,contador=0; jaka < nok.length(); ++jaka){\n\t\t\t\t\t\tjui = nova[1].charAt(jaka);\n\t\t\t\t\t\tif(jui == '+' || jui == '-' || jui == '*' || jui == '/')\n\t\t\t\t\t\t\tcontador++;\n\t\t\t\t\t}\n\t\t\t\t\tif(contador > 0){\n\t\t\t\t\t\tvalue = mat.calcula(nok, 0, var);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tvalue = Mate.soma(nova[1], var);\n\t\t\t\t\t}\n\t\t\t\t\tnova[0] = nova[0].trim();\n\t\t\t\t\tvar.atlVar( nova[0] , value);\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '@':\t//while\n\t\t\t\t\tif(Logico.funcaoSe(var, aux, 1) == true){\n\t\t\t\t\t\tlaco.push(i);\n\t\t\t\t\t}else{\n\t\t\t\t\t\ti = Logico.linha(com, i);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tcase '#':\t//fim while\n\t\t\t\t\tif(laco.vazio() == true){\n\t\t\t\t\t\t//if(com[laco.pop()].charAt(0) == '@'){\n\t\t\t\t\t\t\ti = (laco.pop() - 1);\n\t\t\t\t\t\t//}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t\tcase '[': //Onde está a FUNCAO. Necessário guardar essa posicao\n\t\t\t\t\tsalvaFuncao = i;\n\t\t\t\t\tString[] nome = aux.split(\";\");\n\t\t\t\t\tnome[0] = nome[0].trim();\n\t\t\t\t\t//System.out.println(\"NOME = \"+nome[0]);\n\t\t\t\t\ti = Logico.achaFuncao(com, i, nome[0]);\n\t\t\t\t\tjaEntrou++;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '-':\n\t\t\t\t\tjaEntrou--;\n\t\t\t\t\tif(jaEntrou == 0)\n\t\t\t\t\t\treturn true;\n\t\t\t\t\ti = salvaFuncao;\n\t\t\t\t\tbreak;\n\t\t\t\tcase '+':\n\t\t\t\t\treturn true;\n\t\t\t\tcase '%':\t//imprime\n\t\t\t\t\taux = aux.trim();\n\t\t\t\t\tImp.imprime(aux, var);\n\t\t\t\t\tbreak;\n\n\t\t\t\t\t\n\t\t\t\tcase '?':\t//scaner leitur\n\t\t\t\t\tdouble get = scan.nextDouble();\n\t\t\t\t\tvar.atlVar(aux, get);\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\treturn true;\n\t}",
"String[] checkIfLegalCommand(String strToChck);",
"public static String[][] acomodamiento(char direccion, String[][] cuadricula) {\n int numeroA;\n int espacios;\n for (int fila = 0; fila < 4; fila++) {\n\n for (int columna = 0; columna < 4; columna++) {\n\n switch (direccion) {\n case 'w':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia, cuando la encuentra mueve desde esa posicion hacia arriba\n del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[columna][fila].equals(\" \") == false) {\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n //Verigica si hay un numero igual arriba suyo para sumarse\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento - 1][fila])) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de arriba\n */\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento - 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento - 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento - 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion arriba la sustituye la de abajo\n else if (cuadricula[vecesMovimiento - 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento - 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 's':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de abajo para arriba, cuando la encuentra mueve\n desde esa posicion hacia abajo del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[3 - columna][fila].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de abajo de la matriz\n // llegaremos hasta 2 ya que sigue comparando con una posicion abajo extra gracias al +1\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de abajo\n */\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento + 1][fila])) {\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento + 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento + 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento + 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion abajo la sustituye la de arriba\n else if (cuadricula[vecesMovimiento + 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento + 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 'a':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de izquierda a derecha, cuando la encuentra mueve\n desde esa posicion hacia la izquierda del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[fila][columna].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de la izquierda de la matriz, es decir inicializada en 0\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de izquierda\n */\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento - 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento - 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento - 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento - 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion izquierda la sustituye la de derecha\n else if (cuadricula[fila][vecesMovimiento - 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento - 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n //Lo mismo establecido pero orientado a la derecha, y en lugar del -1 de los vectores lo pasamos como +1 siguiendo la estructura\n //de la opcion 's'\n case 'd':\n if (cuadricula[fila][3 - columna].equals(\" \") == false) {\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento + 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento + 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento + 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento + 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } else if (cuadricula[fila][vecesMovimiento + 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento + 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n }\n\n }\n }\n return cuadricula;\n }",
"private String[] condicionGeneral(String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n if (condicion.length() > 3) {\n condicion = condicion.substring(1, condicion.length());\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n byte aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letras \n byte aux = 0;\n for (int i = 0; i < codigo.size(); i++) {\n if (var[0].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[0].matches(\"[a-zA-Z]*\")) { //comprueba que solo contenga letas \n aux = 0;\n\n for (int i = 0; i < codigo.size(); i++) {\n if (var[1].equals(codigo.get(i).toString())) {\n aux++;\n }\n }\n if (aux > 0) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n\n\n\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }",
"public static boolean compruebaArgumentos(String[] args) {\n\t\t\n\t\tArrayList<String> ids = new ArrayList<String>();\n\t\tInteger i = 0, j = 0;\n\t\t\n\t\tif (args.length % 2 != 0 || args.length == 0) {\n\t\t\tmensajeDepuracion(\"El numero de argumentos es invalido\");\n\t\t\treturn false;\n\t\t}\n\t\telse {\n\t\t\tfor(i = 0; i<args.length; i++) {\n\t\t\t\tif (i%2 == 0) { //este tiene que ser un ID\n\t\t\t\t if(ids.contains(args[i]) == true || Integer.parseInt(args[i]) < 0) {// Esta linea comprueba ademas que los ids sean positivos\n\t\t\t\t\t\tmensajeDepuracion(String.join(\"El id: \", args[i], \" es invalido o esta repetido\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tids.add(args[i]);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tif ( args[i].equals(\"127.0.0.1\") || args[i].split(\"\\\\.\").length != 4) {\n\t\t\t\t\t\tmensajeDepuracion(String.join(\"El argumento \", args[i], \" esta repetido o mal formado\"));\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\tfor(j = 0; j < 4; j++) {\n\t\t\t\t\t\t\tif(Integer.parseInt(args[i].split(\"\\\\.\")[j]) < 0 || Integer.parseInt(args[i].split(\"\\\\.\")[j]) > 255) {\n\t\t\t\t\t\t\t\tmensajeDepuracion(String.join(\"El elemento \", args[i].split(\"\\\\.\")[j], \" de la direccion \", args[i], \" es invalido\") );\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn true;\n\t\t}\n\t}",
"private String[] Condicion(String variable, String condicion) {\n String retorno[] = new String[2];\n try {\n String[] simbolos = {\"<=\", \">=\", \"==\", \"!=\", \"<\", \">\"};\n String simbolo = \"0\";\n\n for (int i = 0; i < simbolos.length; i++) {//selecciona el simbolo de la condicion\n if (condicion.contains(simbolos[i])) {\n simbolo = simbolos[i];\n break;\n }\n }\n if (simbolo.equals(\"0\")) {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n } else {\n String var[] = condicion.split(simbolo);\n if (var.length == 2) {\n if (esNumero(var[0])) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n if (var[1].equals(variable)) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n }\n } else {\n if (var[0].equals(variable)) {\n if (esNumero(var[1])) {\n retorno[0] = \"1\";\n retorno[1] = \"\";\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[1] + \".\";\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"no se reconoce la variable \" + var[0] + \".\";\n }\n }\n } else {\n retorno[0] = \"0\";\n retorno[1] = \"mala construcción de la sentencia.\";\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error en condicion \" + e.getClass());\n } finally {\n return retorno;\n }\n }",
"private static boolean validateInput1(String[] input) {\n\t\tif (input.length != 1) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public char controlloOrizzontale(char[][] scacchiera)\n {\n for (int h=0;h<3;h++)\n {\n if (scacchiera[h][0]==scacchiera[h][1]&&scacchiera[h][1]==scacchiera[h][2]) return scacchiera[h][0];\n }\n return ' ';\n }",
"public String executable(String[] a) {\r\n\t\t\r\n\t\tdouble number;\r\n\t\ttry{\r\n\t\t\t// parsen naar double.\r\n\t\tnumber = Double.parseDouble(a[0]); \r\n\t\t}catch(NumberFormatException e){\r\n\t\t\treturn \"Error: parseDouble bij SQRT!\";\r\n\t\t}\r\n\t\t\r\n\t\t// Het waarde waarvan de wortel wordt genomen mag niet 0 zijn!\r\n\t\tif(number>=0){\t\t\r\n\t\treturn \"\" + Math.sqrt(number) + \"\";\r\n\t\t}else{\r\n\t\t\treturn\"Error: Het getal waarvan de wortel moet berekend worden is negatief!\";\r\n\t\t}\r\n\t}",
"@Override public String[][] getCommandText1( long[] array )\n {\n // Scan binary dump, find entry for this function\n int x = CPUID.findFunction( array, 0x80000007 );\n // Return \"n/a\" if this function entry not found\n if (x<0) { return NO_RESULT; }\n // Build and pre-blank result text array\n String[][] result = new String[NY][NX]; // Text formatted by control data\n for (int i=0; i<NY; i++) // Cycle for rows \n { \n for(int j=0; j<NX; j++) // Cycle for columns\n { \n result[i][j]=\"\"; \n } \n }\n // Parameters from CPUID dump, EDX register\n int p = 0; // pointer for sequentally store strings in the table\n int y = (int) ( array[x+3] >>> 32 ); // y = EDX\n CPUID.decodeBitmap( \"EDX\", DECODER_EDX, y , result , p );\n // Parameters from CPUID dump, EAX register\n p=NY1;\n y = (int) ( array[x+2] & (((long)((long)(-1)>>>32))) ); // y = EAX\n CPUID.decodeBitfields ( \"EAX\" , DECODER_EAX , y , result , p );\n // Parameters from CPUID dump, EBX register\n p=NY1+NY2;\n y = (int) ( array[x+2] >>> 32 ); // y = EBX\n CPUID.decodeBitmap ( \"EBX\" , DECODER_EBX , y , result , p );\n // Parameters from CPUID dump, ECX register\n p=NY1+NY2+NY3;\n y = (int) ( array[x+3] & (((long)((long)(-1)>>>32))) ); // y = ECX\n CPUID.decodeBitfields ( \"ECX\" , DECODER_ECX , y , result , p );\n // Result is ready, all strings filled\n return result;\n }",
"private void validSyntaxis(char[] fun){\n\t\tString valores = \"(a+/*-^\";\n\t\tString valores1 =\"(+/*-^\";\n\t\tString operadores =\"+/*-^\";\n\t\tString valores2 =\"(+-yzxuvwlmnjkpstc123456789e0ai\";\n\t\t//String valores2 =\"(+-xyzstc123456789e0ai\";\n\t\t//String valores3 =\"x1234567890\";\n\t\tString valores3 =\"x1234567890\";\n\t\tString valores4 =\"1234567890\";\n\t\tint pos = fun.length-1;\n\n\t\tif(pos == 0){\n\t\t\tif(valores2.indexOf(fun[pos]) == -1)\n\t\t\t\tcont++;\n\t\t\telse\n\t\t\t\tif(valores2.indexOf(fun[pos]) == 0)\n\t\t\t\t\tcont2++;\n\n\t\t}\n\n\t\telse if(pos >= 1){\n\t\t\tchar aux = fun[pos];\n\t\t\tchar aux2 = fun[pos-1];\n\n\t\t\t//Caracter 'a','A'\n\t\t\tif(aux == 'a'){\n\t\t\t\tif(valores1.indexOf(aux2) == -1 && aux2 != 't')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'i' || aux == 'e'){\n\t\t\t\tif(aux2 != 's' && valores1.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 's'){\n\t\t\t\tif(aux2 != 'c' && valores.indexOf(aux2) == -1 && aux2 != 'b' && aux2 != 'o')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'c'){\n\t\t\t\tif(aux2 != 's' && valores.indexOf(aux2) == -1 && aux2 != 'e')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 't'){\n\t\t\t\tif(aux2 != 'r' && valores.indexOf(aux2) == -1 && aux2 != 'o')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'o'){\n\t\t\t\tif(aux2 != 'c')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'b'){\n\t\t\t\tif(aux2 != 'a')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'n'){\n\t\t\t\tif(aux2 != 'i' && aux2 != 'a')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'x'){\n\t\t\t\tif(valores4.indexOf(aux2) != -1)\n\t\t\t\t\tcont++;\n\n\t\t\t}\n\n\n\t\t\telse if(aux == 'h'){\n\t\t\t\tif(aux2 != 'n' && aux2 != 's' && aux2 != 'c' && aux2 != 't')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == 'r'){\n\t\t\t\tif(aux2 != 'q')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '.'){\n\t\t\t\t\n\t\t\t\tif(valores4.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\n\t\t\t\tboolean existe = false;\n\t\t\t\tint i = pos;\n\t\t\t\twhile(operadores.indexOf(fun[i]) == -1 && i > 0){\n\t\t\t\t\tif(existe && fun[i] == '.'){\n\t\t\t\t\t\tcont++;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tif(fun[i] == '.')\n\t\t\t\t\t\texiste = true;\n\t\t\t\t\ti--;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse if(aux == 'q'){\n\t\t\t\tif(aux2 != 's')\n\t\t\t\t\tcont++;\n\t\t\t\tif(pos > 1)\n\t\t\t\t\tif(fun[pos-2] == 'o' || fun[pos-2] == 'b' || fun[pos-2] == 'c' || fun[pos-2] == 'a')\n\t\t\t\t\t\tcont++;\n\t\t\t}\n\t\t\n\t\t\telse if(valores3.indexOf(aux) != -1){\n\t\t\t\tif(valores1.indexOf(aux2) == -1 && aux2 != '(' && valores4.indexOf(aux2) == -1 && aux2 != '.')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '('){\n\t\t\t\tcont2++;\n\t\t\t\tif(aux2 != 'n' && aux2 != 's' && aux2 != 'c' && aux2 != 't' && aux2 != 'h' && valores1.indexOf(aux2) == -1)\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == ')'){\n\t\t\t\tcont2--;\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '+' || aux == '-'){\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')' && aux2 != '(' && aux2 != '^')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\telse if(aux == '/' || aux == '*' || aux == '^'){\n\t\t\t\tif(valores3.indexOf(aux2) == -1 && aux2 != ')')\n\t\t\t\t\tcont++;\n\t\t\t}\n\n\t\t\tif((aux2 == '/' || aux2 == '*' || aux2 == '^') && pos == 1)\n\t\t\t\tcont++;\n\t\t}\n\n\t\tif(cont > 0 || cont2 != 0)\n\t\t\tthis.setBackground(Color.RED);\n\t\telse\n\t\t\tthis.setBackground(Color.GREEN);\n\t}",
"public String solution1(String[] participant, String[] completion) {\n for(int i = 0; i < participant.length; i++) {\n for(int j = 0; j < completion.length; j++) {\n if(participant[i].equals(completion[j])) {\n participant[i] = \"\";\n completion[j] = \"\";\n }\n }\n }\n\n for(int i = 0; i < participant.length; i++) {\n if(!participant[i].equals(\"\")) {\n System.out.println(\"완주하지 못한 선수 : \" + participant[i]);\n }\n }\n\n return \"\"; //error\n }",
"private boolean comandosNoPermitidos(String comandos){\n \tboolean encontrado = false;\n \tString iniciar = \"INICIAR\".toUpperCase();\n \tString paso = \"paso\".toUpperCase();\n \tString vaciar = \"vaciar\".toUpperCase();\n \tString crearCelula = \"crearCelula\".toUpperCase();\n \tString eliminarCelula = \"eliminarCelula\".toUpperCase();\n\n \t\n \tcomandos = comandos.toUpperCase();\n \tString[] words = comandos.split(\" \");\n \tif(words[0].equals(iniciar)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(paso)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(vaciar)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(crearCelula)){\n \t\tencontrado = true;\n \t}\n \telse if(words[0].equals(eliminarCelula)){\n \t\tencontrado = true;\n \t}\n \t\n \treturn encontrado;\n }",
"public CHAR exec(Data[] input) throws IOException {\n\t\tData str = input[0];\n\t\tif (str == null) {\n\t\t\treturn null;\n\t\t}\n\t\tString s = str.toString();\n\n\t\tif (input.length == 2) {\n\t\t\tData param1 = input[1];\n\t\t\tint b;\n\t\t\tif (param1 == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tb = Integer.parseInt(input[1].toString());\n\t\t\t}\n\t\t\tb = b - 1;\n\t\t\tif (b < 0) {\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t\ts = s.substring(b);\n\t\t} else if (input.length == 3) {\n\t\t\tObject param1 = input[1];\n\t\t\tint b, e;\n\t\t\tif (param1 == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\tb = Integer.parseInt(input[1].toString()) - 1;\n\t\t\t}\n\t\t\tif (b < 0) {\n\t\t\t\tb = 0;\n\t\t\t}\n\t\t\tObject param2 = input[2];\n\t\t\tif (param2 == null) {\n\t\t\t\treturn null;\n\t\t\t} else {\n\t\t\t\te = Integer.parseInt(input[2].toString());\n\t\t\t}\n\t\t\te = b + e;\n\t\t\tif (e > s.length() - 1) {\n\t\t\t\te = s.length() - 1;\n\t\t\t}\n\n\t\t\ts = s.substring(b, e);\n\t\t}\n\t\treturn new CHAR(s);\n\t}",
"private String criptografaECompactaOrdem(File ordem, String arqAProcessar[]) throws Exception\n\t{\n\t\tlong numOrdem = getNumeroOrdem(ordem);\n\n\t\tString requisitante = getIdRequisitante(numOrdem);\n\t\t/* Se o requisitante ou a ordem nao for encontrada\n\t\t * o GPP retorna o valor NAO_DISPONIVEL para o id do\n\t\t * requisitante. Neste caso o metodo termina, pois\n\t\t * nada pode ser feito com os arquivos da ordem. Caso\n\t\t * os arquivos a serem processados tambem seja uma\n\t\t * referencia nula, o procedimento e o mesmo\n\t\t */\n\t\tif (requisitante.equals(GPPTransferenciaVoucher.REQUISITANTE_NAO_DIPONIVEL) || arqAProcessar == null)\n\t\t\treturn null;\n\t\t\t\n\t\tString nomeSoftware = getPropriedade(\"ordemVoucher.pgp\");\n\t\tString userId = getPropriedade(\"ordemVoucher.pgp.userID\");\n\t\tString verbPhrase = getPropriedade(\"ordemVoucher.pgp.verbPhrase\");\n\t\tfor (int i=0; i < arqAProcessar.length; i++)\n\t\t{\n\t\t\t/* Define a execucao do comando de criptografia */\n\t\t\tString nomeArquivo = arqAProcessar[i];\t\t\t\n//\t\t\tString cmd[] = {nomeSoftware,\"+force\",\"-es\",nomeArquivo,requisitante,\"-u\",userId,\"-z\",verbPhrase};\n\t\t\tString cmd[] = {nomeSoftware,verbPhrase,userId,requisitante,nomeArquivo};\n\n\t\t\tSystem.out.println(\"Criptografando arquivo:\"+nomeArquivo+\" ....\");\n\t\t\tRuntime rt = Runtime.getRuntime();\n\t\t\tProcess p = rt.exec(cmd);\n\t\t\tp.waitFor();\n\t\t\tif (p.exitValue() != 0)\n\t\t\t\tthrow new Exception(\"Processo de criptografia nao foi executado corretamente para o arquivo:\"+arqAProcessar[i]+\" requisitante:\"+requisitante+\" valor de saida:\"+p.exitValue());\n\t\t\t\n\t\t\t/* Fecha os \"Stream\" da classe Process\n\t\t\t * Isso evita o erro \"Too Many Open Files\" no sistema operacional\n\t\t\t */\n\t\t\tp.getOutputStream().close();\n\t\t\tp.getErrorStream().close();\n\t\t\tp.getInputStream().close();\n\t\t}\n\t\t\n\t\t/* Como este metodo ja possui o nome das caixas (arquivos de voucher)\n\t\t * que foram criptografados, entao chama o metodo responsavel \n\t\t * em compactar estes arquivos em um so com o mesmo nome do arquivo\n\t\t * de cabecalho da Ordem porem com extensao diferente\n\t\t */\n\t\tString nomeArqCompactado = compactaOrdem(ordem,arqAProcessar);\n\t\treturn nomeArqCompactado;\n\t}",
"public static void main(String[] args) throws IOException {\n BufferedReader br=new BufferedReader(new InputStreamReader(System.in));\n\n\n\n // De aqui \n int t=1;\n while(true){\n\n String datos[] = br.readLine().split(\"[ ]+\");\n\n int n = Integer.parseInt(datos[0]);\n int m = Integer.parseInt(datos[1]);\n\n if (n==0 & m==0){break;}\n\n char[][] field = new char[n][m];\n\n // Esta funcion esta Bien! \n\n for (int i = 0; i < n; ++i) {\n field[i] = br.readLine().toCharArray();\n }\n \n \n if (t>1){\n System.out.println();\n }\n System.out.println(\"Field\"+\" \"+\"#\"+t+\":\");\n \n convertidor(field, n, m);\n t++;\n \n }\n \n //Hasta aqui es Nuevo\n \n \n\n }",
"public void realizaroperacionesdosvariables (ArrayList <String> funcion) {\n\n\t\tif(calculounavariable !=null) {\n\t\t\tcalculounavariable.clear();\n\t\t}\n\n\t\t//recorremos arraylist\n\t\tfor(int i=0; i<funcion.size();i++) {\n\n\t\t\t//recorremos cadena de arraylist\n\t\t//\tfor (int x =0; x<funcion.get(i).length();x++) {\n\n\t\t\t\t//recorremos cadena de arraylist otra vez, solo para evitar error al final\n\t\t\t\tfor (int x=0, z =1; z<funcion.get(i).length();z++, x++) {\n\t\t\t\t\t//validar posicion final para que no de error\n\t\t\t\t\tif (z == funcion.get(i).length()) {\n\t\t\t\t\t\tz-=1;\n\t\t\t\t\t}\n\t\t\t\t\tif (x == funcion.get(i).length()) {\n\t\t\t\t\t\tx-=1;\n\t\t\t\t\t}\n\n\t\t\t\t\t//chequear si tiene mas de dos operaciones\n\t\t\t\t\tif (String.valueOf(funcion.get(i).charAt(x)).equals(\" \")) {\n\t\t\t\t\t\tif(String.valueOf(funcion.get(i).charAt(z)).equals(\"0\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"1\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"2\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"3\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"4\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"5\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"6\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"7\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"8\") || String.valueOf(funcion.get(i).charAt(z)).equals(\"9\") ) {\n\t\t\t\t\t\t\tcontadorespacios++;\n\t\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//agregar a array de mas de dosvariables\n\t\t\t\tif (contadorespacios> 1) {\n\n\t\t\t\t\tStringTokenizer tokens = new StringTokenizer(funcion.get(i));\n\t\t\t\t\tString tokensignosoperacion = tokens.nextToken();\n\t\t\t\t\tint operando1;\n\t\t\t\t\tint operando2;\n\n\t\t\t\t\twhile (tokens.hasMoreTokens()) {\n\n\t\t\t\t\t\tString siguientetoken = tokens.nextToken();\n\n\t\t\t\t\t\t//Chequear si el siguiente token para saber si es otra operacion, si lo es empezar a realizar calculos\n\t\t\t\t\t\tif (siguientetoken.equals(\"+\")|| siguientetoken.equals(\"-\")|| siguientetoken.equals(\"*\")|| siguientetoken.equals(\"/\")) {\n\t\t\t\t\t\t\ttokensignosoperacion = siguientetoken;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t//realizar operacion si es suma\n\t\t\t\t\t\tif (tokensignosoperacion.equals(\"+\")) {\n\n\t\t\t\t\t\t\twhile(!siguientetoken.equals(\"+\")&& !siguientetoken.equals(\"-\")&& !siguientetoken.equals(\"*\")&& !siguientetoken.equals(\"/\") ) {\n\n\t\t\t\t\t\t\tresultadocalculosperaciones += Double.parseDouble(siguientetoken);\n\n\t\t\t\t\t\t\t//atrapar error de que no hay ningun siguiente token\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tsiguientetoken= tokens.nextToken();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcatch(NoSuchElementException errorelemento) {\n\t\t\t\t\t\t\t\tsiguientetoken = \"+\";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//realizar operacion si es resta\n\t\t\t\t\t\tif (tokensignosoperacion.equals(\"-\")) {\n\t\t\t\t\t\t\tint contador =0;\n\t\t\t\t\t\t\twhile(!siguientetoken.equals(\"+\")&& !siguientetoken.equals(\"-\")&& !siguientetoken.equals(\"*\")&& !siguientetoken.equals(\"/\") ) {\n\n\t\t\t\t\t\t\t\t//condicion para realizar resta y darle el primer valor que encuentre para que no reste por cero la primera vez\n\t\t\t\t\t\t\t\tif (contador<1) {\n\t\t\t\t\t\t\t\t\tresultadocalculosperaciones=Double.parseDouble(siguientetoken);\n\t\t\t\t\t\t\t\t\tcontador++;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tresultadocalculosperaciones -= Double.parseDouble(siguientetoken);\n\n\t\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\t\t//atrapar error de que no hay ningun siguiente token\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tsiguientetoken= tokens.nextToken();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcatch(NoSuchElementException errorelemento) {\n\t\t\t\t\t\t\t\tsiguientetoken = \"+\";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//realizar operacion si es multiplicacion\n\t\t\t\t\t\tif (tokensignosoperacion.equals(\"*\")) {\n\t\t\t\t\t\t\t//darle el valor de 1 para que la primera multiplicacion no sea 0\n\t\t\t\t\t\t\tresultadocalculosperaciones =1;\n\t\t\t\t\t\t\twhile(!siguientetoken.equals(\"+\")&& !siguientetoken.equals(\"-\")&& !siguientetoken.equals(\"*\")&& !siguientetoken.equals(\"/\") ) {\n\t\t\t\t\t\t\tresultadocalculosperaciones *= Double.parseDouble(siguientetoken);\n\n\t\t\t\t\t\t\t//atrapar error de que no hay ningun siguiente token\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tsiguientetoken= tokens.nextToken();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcatch(NoSuchElementException errorelemento) {\n\t\t\t\t\t\t\t\tsiguientetoken = \"+\";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t//realizar operacion si es division\n\t\t\t\t\t\tif (tokensignosoperacion.equals(\"/\")) {\n\t\t\t\t\t\t\tint contador=0;\n\t\t\t\t\t\t\twhile(!siguientetoken.equals(\"+\")&& !siguientetoken.equals(\"-\")&& !siguientetoken.equals(\"*\")&& !siguientetoken.equals(\"/\") ) {\n\n\t\t\t\t\t\t\t\t//condicion para realizar division y darle el primer valor que encuentre\n\t\t\t\t\t\t\t\tif (contador<1) {\n\t\t\t\t\t\t\t\t\tresultadocalculosperaciones=Double.parseDouble(siguientetoken);\n\t\t\t\t\t\t\t\t\tcontador++;\n\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tresultadocalculosperaciones /= Double.parseDouble(siguientetoken);\n\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t//atrapar error de que no hay ningun siguiente token\n\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\tsiguientetoken= tokens.nextToken();\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tcatch(NoSuchElementException errorelemento) {\n\t\t\t\t\t\t\t\tsiguientetoken = \"+\";\n\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\n\t\t\t\t\t//lista donde se van a almacenar los datos operados\n\t\t\t\t\tcalculounavariable.add(tokensignosoperacion + \" \"+String.valueOf(resultadocalculosperaciones));\n\t\t\t\t\tcontadorespacios=0;\n\t\t\t\t\tresultadocalculosperaciones=0;\n\n\t\t\t\t}\n\n\t\t\t\t//lista donde se van a almacenar si solo encuentra un dato para operar\n\t\t\t\telse {\n\t\t\t\t\tcalculounavariable.add(funcion.get(i));\n\t\t\t\t\tcontadorespacios=0;\n\t\t\t\t\tresultadocalculosperaciones=0;\n\n\t\t\t\t}\n\n\t\t}\n\t}",
"public static void main(String[] args) {\n \n String palabaras[], palabraSelected=\"\";\n char juego[];\n char letra; \n char seguir; \n \n \n //puede volver a jugar.\n //con las palabras que no ha salido. Gastando palabras\n //en caso de no existir palabra terminar el juego e indicar el mensaje respectivo.\n\n\n do {\n aciertos=0; errores=0;\n bandera=false;\n\n palabaras= leerArchivo();\n \n if(palabaras.length==0){\n System.out.println(\"No se puede jugar porque no hay palabras\");\n break; \n }\n\n \n \n String nombre= palabaras[0].substring(0,18).trim().toUpperCase();\n\n String pa= String.format(\"%1$-20s\", \"walter\");\n System.out.println(pa.length());\n\n // escribirLineaArchivo(palabaras);\n \n //obtenerPalabra\n //random para obtener la palabara\n \n palabraSelected= obtenerPalabra(palabaras);\n //palabraSelected= palabraSelected.toUpperCase();\n \n //obtnerVectorJuego\n //instacia del venctor juego con el tamaño de la palabra seleccionada\n juego= obtenerVectorJuego(palabraSelected);\n \n /*//1 manera apata de llenar el vector juego con la palabra seleccinada\n for(int i=0; i<palabraSelected.length(); i++){\n \n juego[i]=palabraSelected.charAt(i);\n \n }\n */\n \n //segunda manera\n\n /* if(!palabraSelected.equals(\"fdd\")){\n\n\n }*/\n \n System.out.println(\"BIENVENIDO AL JUEGO DEL AHORCADO..\"); \n \n do {\n \n bandera=false;\n //imprimirJuego\n imprimirJuego(palabraSelected, juego);\n \n letra = solicitarLetra();\n \n //validarLetra\n validarLetra(letra, juego);\n \n //imprimirResultado\n imprimirResultado();\n \n \n } while (aciertos!=juego.length && errores!=7);\n \n \n //imprimirResultadoFinal\n imprimirResultadoFinal(juego, palabraSelected);\n\n\n\n System.out.println(\"Desea volver a jugar(S/N)? \"); \n seguir= scan.next().toUpperCase().charAt(0);\n \n eliminarPalabraArchivo(palabraSelected, palabaras);\n \n\n\n\n\n } while (seguir=='S');\n }",
"private ConsoleCommand mapConsoleCommand( String[] parsedString ){\r\n\t\t\r\n\t\tFileSystemService fileSysSrv = new FileSystemService();\r\n\t\tStringBuilder errorSB = new StringBuilder();\r\n\t\tConsoleCommand consoleCommand = new ConsoleCommand();\r\n\t\t\r\n\t\tconsoleCommand.setCommand( parsedString[ AppConstanst.COMMAND_IDX ] );\r\n\t\t\t\t\r\n\t\tif ( parsedString.length < AppConstanst.MIN_SCAN_PARAM ){\r\n\t\t\terrorSB.append( AppConstanst.NOT_ALL_REQ_COMMAND_SET ) ;\r\n\t\t} else {\r\n\t\t\t// VALIDATE INPUTDIR COMMAND\r\n\t\t\tconsoleCommand.setInputDir( parsedString[ AppConstanst.INPUT_DIR_IDX ] );\r\n\t\t\tif ( !AppConstanst.SCAN_INPUT_DIR.equals( consoleCommand.getInputDir() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.WRONG_REQ_COMMAND+\" \"+consoleCommand.getInputDir()+AppConstanst.MUST_BE+AppConstanst.SCAN_INPUT_DIR+\"\\n\" );\r\n\t\t\t}\r\n\t\t\tconsoleCommand.setInputDirValue( parsedString[ AppConstanst.INPUT_DIR_VALUE_IDX ] );\r\n\t\t\tif ( ! consoleCommand.getInputDirValue().matches( AppConstanst.ABS_PATH) ){\r\n\t\t\t\terrorSB.append( AppConstanst.ILLEGAL_INPUT_PATH + consoleCommand.getInputDirValue()+\"\\n\");\r\n\t\t\t}\r\n\t\t\t//CHECK IS INPUT DIR EXIST, IF NOT TRY CREATE IT\r\n\t\t if ( !fileSysSrv.isDirectoryExist( consoleCommand.getInputDirValue() ) ){\r\n\t\t \tif ( !fileSysSrv.makeDirectory( consoleCommand.getInputDirValue() ) ){\r\n\t\t \t\terrorSB.append( AppConstanst.INPUT_DIR_NOT_EXISTS + consoleCommand.getInputDirValue()+\"\\n\");\r\n\t\t \t};\r\n\t\t }\r\n\t\t\t// VALIDATE OUTPUTDIR COMMAND\r\n\t\t\tconsoleCommand.setOutPutDir( parsedString[ AppConstanst.OUTPUT_DIR_IDX ] );\r\n\t\t\tif ( !AppConstanst.SCAN_OUTPUT_DIR.equals( consoleCommand.getOutPutDir() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.WRONG_REQ_COMMAND+\" \"+consoleCommand.getOutPutDir()+AppConstanst.MUST_BE+AppConstanst.SCAN_OUTPUT_DIR+\"\\n\" );\r\n\t\t\t}\r\n\t\t\tconsoleCommand.setOutPutDirValue( parsedString[ AppConstanst.OUTPUT_DIR_VALUE_IDX ] );\r\n\t\t\tif ( ! consoleCommand.getOutPutDirValue().matches( AppConstanst.ABS_PATH) ){\r\n\t\t\t\terrorSB.append( AppConstanst.ILLEGAL_OUTPUT_PATH + consoleCommand.getOutPutDirValue()+\"\\n\" );\r\n\t\t\t}\r\n\t\t\t//CHECK IS OUTPUT DIR EXIST, IF NOT TRY CREATE IT\r\n\t\t if ( !fileSysSrv.isDirectoryExist( consoleCommand.getOutPutDirValue() ) ){\r\n\t\t \tif ( !fileSysSrv.makeDirectory( consoleCommand.getOutPutDirValue() ) ){\r\n\t\t \t\terrorSB.append( AppConstanst.OUTPUT_DIR_NOT_EXISTS + consoleCommand.getOutPutDirValue()+\"\\n\");\r\n\t\t \t};\r\n\t\t }\r\n\t\t\t// VALIDATE MASK COMMAND\r\n\t\t\tconsoleCommand.setMask( parsedString[ AppConstanst.MASK_IDX ] );\r\n\t\t\tif ( !AppConstanst.SCAN_MASK.equals( consoleCommand.getMask() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.WRONG_REQ_COMMAND+\" \"+consoleCommand.getMask()+AppConstanst.MUST_BE+AppConstanst.SCAN_MASK+\"\\n\" );\r\n\t\t\t}\r\n\t\t\tconsoleCommand.setMaskValue( parsedString[ AppConstanst.MASK_VALUE_IDX ]);\r\n\t\t\tif ( ! AppUtils.isMaskCorrect( consoleCommand.getMaskValue() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.ILLEGAL_MASK + consoleCommand.getMaskValue()+\"\\n\" );\r\n\t\t\t}\r\n\t\t\t// VALIDATE WAIT INTERVAL COMMAND\r\n\t\t\tconsoleCommand.setWaitInterval( parsedString[ AppConstanst.WAIT_INTERVAL_IDX ] );\r\n\t\t\tif ( !AppConstanst.SCAN_WAIT_INTERVAL.equals( consoleCommand.getWaitInterval() ) ){\r\n\t\t\t\terrorSB.append( AppConstanst.WRONG_REQ_COMMAND+\" \"+consoleCommand.getWaitInterval()+AppConstanst.MUST_BE+AppConstanst.SCAN_WAIT_INTERVAL+\"\\n\" );\r\n\t\t\t}\r\n\t\t\tLong interval= null;\r\n\t\t\ttry{\r\n\t\t\t\tinterval = Long.parseLong( parsedString[ AppConstanst.WAIT_INTERVAL_VALUE_IDX ] );\r\n\t\t\t} catch (NumberFormatException e) {} \r\n\t\t\tconsoleCommand.setWaitIntervalValue( interval );\r\n\t\t\tif ( interval == null || interval < 0){\r\n\t\t\t\terrorSB.append( AppConstanst.INCORECT_WAIT_INTERVAL + parsedString[ AppConstanst.WAIT_INTERVAL_VALUE_IDX ]+AppConstanst.POSITIVE_INT+\"\\n\" );\r\n\t\t\t}\r\n\t\t\t// VALIDATE NOT REQUIRED COMMAND\r\n\t\t\t\r\n\t\t\t\tfor (int idx = AppConstanst.MIN_SCAN_PARAM+1; idx < parsedString.length; idx += 2){\r\n\t\t\t\t\tif ( AppConstanst.SCAN_INCLUDE_SUB.equals( parsedString[ idx ] ) ){\r\n\t\t\t\t\t\tconsoleCommand.setIncludeSubs( parsedString[ idx ] );\r\n\t\t\t\t\t\tconsoleCommand.setIncludeSubsValue( parsedString[ idx+1 ] );\r\n\t\t\t\t\t\tif ( !AppConstanst.TRUE.equals( parsedString[ idx+1 ]) && !AppConstanst.FALSE.equals( parsedString[ idx+1 ] ) ){\r\n\t\t\t\t\t\t\terrorSB.append( AppConstanst.INCORECT_INCLUDE_SUBFOLDERS+\" \"+parsedString[ idx+1 ]+AppConstanst.TRUE_OR_FALSE+\"\\n\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif ( AppConstanst.SCAN_AUTO_DELETE.equals( parsedString[ idx ] ) ){\r\n\t\t\t\t\t\tconsoleCommand.setAutoDelete( parsedString[ idx ] );\r\n\t\t\t\t\t\tconsoleCommand.setAutoDeleteValue( parsedString[ idx+1 ] );\r\n\t\t\t\t\t\tif ( !AppConstanst.TRUE.equals( parsedString[ idx+1 ]) && !AppConstanst.FALSE.equals( parsedString[ idx+1 ] ) ){\r\n\t\t\t\t\t\t\terrorSB.append( AppConstanst.INCORECT_AUTODELETE+\" \"+parsedString[ idx+1 ]+AppConstanst.TRUE_OR_FALSE+\"\\n\" );\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t}\r\n\t\tif ( errorSB.length() > 0 ){\r\n\t\t\tSystem.out.println(AppConstanst.ERROR_IN_SCAN_COMMAND+ errorSB.toString());\r\n\t\t\tconsoleCommand.setCommand( AppConstanst.UNKNOWN);\r\n\t\t} \r\n\t\treturn consoleCommand;\r\n\t}",
"public ArrayList<String> ExcutarCalculo(ArrayList<String> linha, String tipo){\n ArrayList<String> cod = new ArrayList();\n String reg, rv1, rv2;\n \n /*Verifica se a variavel tem registrador*/\n reg = r.getRegistrador(linha.get(0));\n if(linha.size() == 3){//x = n\n rv1 = r.getRegistrador(linha.get(2));//Verifica se é variavel\n \n if(reg == null){\n reg = \"r\"+(r.getMax()+1);\n r.Add(linha.get(0), reg);\n } \n \n if(rv1 == null)\n cod.add(\"load \"+reg+\", \"+linha.get(2));\n else\n cod.add(\"load \"+reg+\", \"+rv1);\n }else{\n ArrayList<String> aux = new ArrayList();\n String[] ordem = new String[100];\n String [][]operador = {{\"(\",\"\"},{\"*\",\"mult\"},{\"/\",\"div\"},{\"+\",\"add\"},{\"-\",\"sub\"}};\n String []temp = {\"ra\",\"rb\",\"rc\",\"rd\",\"re\",\"rf\"};\n Boolean ctr = false;\n int i, j, k, tl, ctrTemp, r1, r2, pos;\n \n for(i = 0; i < 100; i++){\n ordem[i] = \"\";\n } \n \n tl = ctrTemp = 0;\n for(i = 0; i < 5; i++){\n for(j = 0; j < linha.size(); j++){\n if(linha.get(j).contains(operador[i][0])){\n if(i == 0){\n /* min = verificaRegistradores(linha.get(j+1),linha.get(j+3),temp);\n \n if(min == -1){\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+1);//Carrega val no registrador t1\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+3);//Carrega val no registrador t2\n }\n \n \n for(k = 0; k < 5; k++){\n if(linha.get(j+2).contains(operador[k][0])){ \n if(operador[k][1].equals(\"add\")){\n if(tipo.equals(\"int\"))\n ordem[tl] += \"addi\";\n else\n ordem[tl] += \"addf\";\n }\n \n k = 5;\n }\n }\n \n ordem[tl] += \" \"+temp[ctrTemp-2];//temp3 por conta de reuso\n ordem[tl] += \", \"+temp[ctrTemp-1];//temp2\n ordem[tl] += \", \"+temp[ctrTemp-2];//temp1\n tl++;\n \n for(k = 0; k < 5; k++)//( ate )\n linha.remove(j);\n linha.add(j,temp[ctrTemp-2]);\n \n if(min == -1)\n ctrTemp -= 1;\n else\n ctrTemp = 0;*/\n }else{\n rv1 = r.getRegistrador(linha.get(j-1));\n rv2 = r.getRegistrador(linha.get(j+1));\n \n r1 = verificaRegistradores(linha.get(j-1),temp);\n if(r1 == -1){//Nenhum registrador\n if(rv1 == null)\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j-1);//Carrega val no registrador t1\n else\n ordem[tl++] = \"move \"+temp[ctrTemp++]+\", \"+rv1;\n }\n r2 = verificaRegistradores(linha.get(j+1),temp);\n if(r2 == -1){//Nenhum registrador\n if(rv2 == null)\n ordem[tl++] = \"load \"+temp[ctrTemp++]+\", \"+linha.get(j+1);//Carrega val no registrador t2\n else\n ordem[tl++] = \"move \"+temp[ctrTemp++]+\", \"+rv2;//Carrega val no registrador t2\n } \n \n pos = ctrTemp;//como posso entrar no mult ou no add\n if(operador[i][1].equals(\"mult\") || operador[i][1].equals(\"div\")){\n ctrTemp -= 2;\n \n if(operador[i][1].equals(\"mult\")){\n aux = mult(linha.get(j-1), linha.get(j+1), tipo, temp[ctrTemp++]);\n }else\n if(operador[i][1].equals(\"div\")){\n aux = div(linha.get(j-1), linha.get(j+1), tipo, temp[ctrTemp++]);\n }\n \n tl -= 2;\n for(k = 0; k < aux.size(); k++){\n ordem[tl++] = aux.get(k);\n }\n pos = ctrTemp-1;\n \n if(r1!= -1 && r2 != -1)\n ctrTemp -= 2;\n /*else\n ctrTemp -= 1;*/\n }else\n if(operador[i][1].equals(\"add\") || operador[i][1].equals(\"sub\")){\n if(operador[i][1].equals(\"sub\")){\n ordem[tl-1] = \"load \"+temp[ctrTemp-1]+\", -\"+linha.get(j+1);\n }\n \n if(tipo.equals(\"int\"))\n ordem[tl] += \"addi\";\n else\n ordem[tl] += \"addf\";\n \n ordem[tl] += \" \"+temp[ctrTemp-2];//temp3\n ordem[tl] += \", \"+temp[ctrTemp-1];//temp2\n ordem[tl] += \", \"+temp[ctrTemp-2];//temp1\n tl++;\n pos = ctrTemp-2;\n \n if(r1!= -1 && r2 != -1)\n ctrTemp -= 2;\n else\n ctrTemp -= 1;\n }\n \n for(k = 0; k < 3; k++)\n linha.remove(j-1);\n linha.add(j-1,temp[pos]);\n }\n ctr = true;//Faz repetir denovo caso adicione;\n }\n }\n if(ctr){\n i--;//Controla pra só sair quando tiver excluido todas operacoes desse tipo\n ctr = false;\n }\n }\n for(k = 0; k < tl; k++){\n cod.add(ordem[k]);\n }\n\n if(reg == null){\n reg = \"r\"+(r.getMax()+1);\n r.Add(linha.get(0), reg);\n }\n cod.add(\"move \"+reg+\", \"+temp[ctrTemp-1]);\n ctrTemp = 0;\n }\n \n return cod;\n }",
"private char comprobarConsumoEnergetico(char letra) {\r\n char letras[] = { 'A', 'B', 'C', 'D', 'E', 'F' };\r\n boolean encontrado = false;\r\n this.consumoEnergetico = 'F';\r\n for (int i = 0; i < letras.length && !encontrado; i++) {\r\n if (letras[i]==letra) {\r\n encontrado = true;\r\n this.consumoEnergetico = letra;\r\n }\r\n }\r\n return this.consumoEnergetico;\r\n }",
"private static boolean validateInput2(String[] input) {\n\t\tif (input.length != 2) {\n\t\t\tSystem.out.println(ErrorType.UNKNOWN_COMMAND);\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"public boolean TiraLenguaje (String[]a , String[] b){\n \n boolean val1=true;\n String mod1=\"\";\n String comp=\"\";\n int ban=0;\n for (int i = 0; i < b.length; i++) {\n mod1=b[i];\n \n for (int j = 0; j < a.length; j++) { \n comp=a[j];\n if(comp.equals( mod1)){\n ban=1; \n break;\n }\n }\n \n if(ban==0){\n val1=false;\n return val1; \n } \n } \n return val1;\n \n }",
"private void verificar_comando(String comando, InterfazRemota interfaz, int puerto) {\n\tString cmd[] = comando.split(\"[\\\\s]+\");\n\tString aux[];\n\tString servidor;\n\tString archivo;\n\n\tif (cmd[0].equalsIgnoreCase(\"C\") && cmd.length == 3){\n\t if (cmd[1].equalsIgnoreCase(\"-t\") || cmd[1].equalsIgnoreCase(\"-k\")){\n\t\ttry {\n\t\t SalidaDFS salida = interfaz.dfs_distribuido(cmd[1] + \" \" + cmd[2], new Vector<String>());\n\t\t if ((salida.resultado).equals(\"\")){\n\t\t\tSystem.out.println(\"No hubo resultados \\n\");\n\t\t }\n\t\t else {\n\t\t\tSystem.out.println(salida.resultado);\n\t\t }\n\t\t \n\t\t}\n\t\tcatch (java.rmi.RemoteException r) {\n\t\t System.err.println(\"No se pudo establecer conexion con el servidor\");\n\t\t}\n\t\tfinally {\n\t\t return;\n\t\t}\n\t }\n\t /* Comando invalido */\n\t else System.out.println(\"Codigo Invalido\");\n\t}\n\t/* Solicitar una foto */\n\telse if (cmd[0].equalsIgnoreCase(\"D\") && cmd.length == 2 && cmd[1].matches(\"[\\\\S]+[:][\\\\S]+jpg\")){\n\t aux = cmd[1].split(\":\");\n\t servidor = aux[0];\n\t archivo = aux[1];\n\t try {\n\t\tInterfazRemota transferencia = null;\n\t\t\n\t\ttry {\n\t\t transferencia = (InterfazRemota)java.rmi.Naming.lookup(\"//\" + servidor + \":\" + puerto + \"/fotop2p\");\n\t\t}\n\t\tcatch (NotBoundException e) {\n\t\t System.err.println(\"No existe el servicio solicitado en \" + servidor + \":\" + puerto);\n\t\t System.exit(-1);\n\t\t}\n\t\tcatch (MalformedURLException m) {\n\t\t System.err.println(\"No se pudo establecer conexion con el servidor: URL incorrecta\");\n\t\t System.exit(-1);\n\t\t}\n\t\tcatch (java.rmi.RemoteException r) {\n\t\t System.err.println(\"No se pudo establecer conexion con el servidor\");\n\t\t System.exit(-1);\n\t\t}\n\n\t\tbyte [] foto = transferencia.archivo_a_bytes(archivo);\n\t\t\n\t\tif (foto == null) {\n\t\t System.out.println(\"Foto no encontrada o error al abrirla en el servidor\");\n\t\t}\n\t\telse {\n\t\t FileOutputStream fos = new FileOutputStream(\"./\" + archivo);\n\t\t BufferedOutputStream bos = new BufferedOutputStream(fos);\n\t\t bos.write(foto,0,foto.length);\n\t\t System.out.println(\"Foto recibida exitosamente \\n\");\n\n\t\t}\n\t }\n\t catch (java.rmi.RemoteException r) {\n\t\tSystem.err.println(\"No se pudo establecer conexion con el servidor\");\n\t }\n\t catch(IOException i) {\n\t\tSystem.err.println(\"Error al escribir el archivo\");\n\t }\n\t finally {\n\t\treturn;\n\t }\n\t}\n\t/* obterner numero de alcanzables */\n\telse if (cmd[0].equalsIgnoreCase(\"A\") && cmd.length == 1){\n\t try {\n\t\tVector<String> alc = interfaz.alcanzables(new Vector<String>());\n\t\tSystem.out.println(\"Alcanzables: \" + alc.size());\n\t }\n\t catch (java.rmi.RemoteException r) {\n\t\tSystem.out.println(\"No se pudo establecer conexion con el servidor\");\n\t\t\n\t\tSystem.out.println(r.getMessage());\n\t\tr.printStackTrace();\n\t }\n\t finally {\n\t\treturn;\n\t }\n\t}\n\t/* Salir */\n\telse if (cmd[0].equalsIgnoreCase(\"Q\") && cmd.length == 1 ){\n\t System.out.println(\"Chao\");\n\t System.exit(0);\n\t}\n \telse {\n\t System.out.println(\"Comando Invalido\");\n\t return;\n\t}\n }",
"public boolean comprobar(){\r\n boolean ind=false;\r\n switch(this.opc){\r\n case 1:\r\n for(int i=0;i<2;i++){\r\n for(int j=0;j<5;j++){\r\n if(mfacil[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case 2:\r\n for(int i=0;i<3;i++){\r\n for(int j=0;j<6;j++){\r\n if(mmedio[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n case 3:\r\n for(int i=0;i<4;i++){\r\n for(int j=0;j<7;j++){\r\n if(mdificil[i][j].equals(\"*\")==false){\r\n ind=true;\r\n }\r\n else{\r\n ind=false;\r\n break;\r\n }\r\n }\r\n }\r\n break;\r\n }\r\n return ind;\r\n }",
"public Boolean whichCmd(String s){\n if (s.charAt(0) == '!' || s.charAt(0) == '?'){\n return cmd.get(s.substring(0,1)).apply(s.substring(1));\n }\n else return histOrPile(s);\n }",
"private String armarWhereStr(String ubigeo) {\n \n UtilidadesLog.info(\"DAOZON.armarWhereStr(String ubigeo): Entrada\");\n \n String[] ubigeoArray = new String[9];\n int resto = (ubigeo.length() % 6);\n\n if ((ubigeo.length() >= 6) && (ubigeo.length() <= 54) && (resto == 0) &&\n (ubigeo != null)) {\n int a = 0;\n\n for (int i = 0; i < ubigeo.length(); i++) {\n ubigeoArray[a] = ubigeo.substring(i, i + 6);\n i = i + 5;\n a = a + 1;\n }\n\n if (a < 9) {\n for (int i = a; i < 9; i++)\n ubigeoArray[i] = null;\n }\n\n StringBuffer query = new StringBuffer();\n String[] camposWhere = new String[] {\n \"orde_1\", \"orde_2\", \"orde_3\", \"orde_4\", \"orde_5\", \"orde_6\",\n \"orde_7\", \"orde_8\", \"orde_9\"\n };\n\n Object[] valoresWhere = new Object[] {\n ubigeoArray[0], ubigeoArray[1], ubigeoArray[2],\n ubigeoArray[3], ubigeoArray[4], ubigeoArray[5],\n ubigeoArray[6], ubigeoArray[7], ubigeoArray[8]\n };\n boolean[] operadores = new boolean[] {\n false, false, false, false, false, false, false, false,\n false\n };\n\n if (ubigeo.length() > 0) {\n /*\n * Armamos where de los campos not null\n */\n query.append(UtilidadesBD.armarSQLWhere(camposWhere,\n valoresWhere, operadores));\n\n /*\n * buscamos el primer orden !=nulo\n */\n for (int i = 0; i < valoresWhere.length; i++) {\n if (valoresWhere[i] == null) {\n query.append(\" and \" + camposWhere[i] + \" is null \");\n UtilidadesLog.debug(\"camposWhere[i] \" + i + \" \" +\n camposWhere[i] + \" valoresWhere \" +\n valoresWhere.toString());\n }\n }\n }\n UtilidadesLog.info(\"Salida : query.toString()\" + query.toString());\n UtilidadesLog.info(\"DAOZON.armarWhereStr(String ubigeo): Salida\");\n return query.toString();\n } //fin del if donde valida tamaño del ubigeo\n else {\n /*throw new MareException(new Exception(),\n UtilidadesError.armarCodigoError(ErroresDeNegocio.UBIGEO_NO_EXISTE_PARA_TERRITORIO));\n */\n UtilidadesLog.info(\"DAOZON.armarWhereStr(String ubigeo): Salida\");\n return null;\n }\n }",
"private String armarWhere2(String[] ubigeoArray) {\n \n UtilidadesLog.info(\"DAOZON.armarWhere2(String[] ubigeoArray): Entrada\");\n \n StringBuffer query = new StringBuffer();\n String[] camposWhere = new String[] {\n \"orde_1\", \"orde_2\", \"orde_3\", \"orde_4\", \"orde_5\", \"orde_6\",\n \"orde_7\", \"orde_8\", \"orde_9\"\n };\n Object[] valoresWhere = new Object[ubigeoArray.length];\n\n for (int i = 0; i < ubigeoArray.length; i++) {\n valoresWhere[i] = ubigeoArray[i];\n }\n\n boolean[] operadores = new boolean[] {\n false, false, false, false, false, false, false, false, false\n };\n\n /*\n * Armamos where de los campos not null\n */\n query.append(UtilidadesBD.armarSQLWhere(camposWhere, valoresWhere,\n operadores));\n \n UtilidadesLog.info(\"DAOZON.armarWhere2(String[] ubigeoArray): Salida\");\n return query.toString();\n }",
"public static int vencedor(char J[][])\n\t{\n\t\tint i, j=0;\n\t\tfor(i=0;i<3;i++)\n\t\t{\n\t\t\t\tif(J[i][j]=='X'&&J[i][j+1]=='X'&&J[i][j+2]=='X')\n\t\t\t\t\treturn 1;\n\t\t\t\telse if(J[i][j]=='O'&&J[i][j+1]=='O'&&J[i][j+2]=='O')\n\t\t\t\t\treturn 1;\n\t\t}\n\t\ti=0;\n\t\tfor(j=0;j<3;j++)\n\t\t{\n\t\t\t\tif(J[i][j]=='X'&&J[i+1][j]=='X'&&J[i+2][j]=='X')\n\t\t\t\t\treturn 1;\n\t\t\t\telse if(J[i][j]=='O'&&J[i+1][j]=='O'&&J[i+2][j]=='O')\n\t\t\t\t\treturn 1;\n\t\t}\n\t\tif(J[0][0]=='X'&&J[1][1]=='X'&&J[2][2]=='X') \n\t\t\treturn 1;\n\t\telse if(J[0][0]=='O'&&J[1][1]=='O'&&J[2][2]=='O') \n\t\t\treturn 1;\n\t\telse if(J[0][2]=='X'&&J[1][1]=='X'&&J[2][0]=='X') \n\t\t\treturn 1;\n\t\telse if(J[0][2]=='O'&&J[1][1]=='O'&&J[2][0]=='O') \n\t\t\treturn 1;\n\t\treturn 0;\n\t}",
"int commandFor(String s) throws AmbiguousException\t\t\t{ return determineCommand(g_commandArray, s, CMD_UNKNOWN);\t}",
"private String editCom(String[] messageArray, String channel) {\r\n // UPDATE commands SET response= 'newtext' where command = command AND channel= channel;\r\n String command = messageArray[1];\r\n String output = \"\";\r\n String[] info;\r\n\r\n //if there's no change to permissions then replace old output\r\n if (!messageArray[2].equals(\"-e\") && !messageArray[2].equals(\"-m\")) {\r\n //build output string\r\n output += messageArray[2];\r\n for (int i = 3; i < messageArray.length; i++) {\r\n output += \" \" + messageArray[i];\r\n }\r\n\r\n String statement = \"UPDATE customcommands SET response= '\" + output + \"' WHERE command ='\" + command + \"' AND channel='\" + channel + \"';\";\r\n manager.connectToDatabase(statement);\r\n return (\"Command \" + command + \" successfully updated.\");\r\n } \r\n else {\r\n //if the command is just to change permissions\r\n if (messageArray.length < 4) {\r\n info = manager.getCommandFromDatabase(command, channel);\r\n //if they want to make it mod only\r\n if (messageArray[2].equals(\"-m\")) {\r\n //if the command is already mod only\r\n if (info[1].matches(\"-m\")) {\r\n return (\"Command \" + command + \" is already mod only.\");\r\n } \r\n else {\r\n String statement = \"UPDATE customcommands SET permission= '\" + messageArray[2] + \"' WHERE command ='\" + command + \"' AND channel='\" + channel + \"';\";\r\n manager.connectToDatabase(statement);\r\n //changes the permissions of the command\r\n return (\"Command \" + command + \" is now mod only.\");\r\n }\r\n }\r\n //if they want to make it usable for everyone\r\n else {\r\n //if the command is already available to everyone\r\n if (info[1].matches(\"-e\")) {\r\n return (\"Command \" + command + \" is already available to everyone.\");\r\n } \r\n else {\r\n //changes the permissions of the command\r\n String statement = \"UPDATE customcommands SET permission= '\" + messageArray[2] + \"' WHERE command ='\" + command + \"' AND channel='\" + channel + \"';\";\r\n manager.connectToDatabase(statement);\r\n\r\n return (\"Command \" + command + \" is available to everyone.\");\r\n }\r\n }\r\n } \r\n else {\r\n //build output string\r\n output += messageArray[3];\r\n for (int i = 4; i < messageArray.length; i++) {\r\n output += \" \" + messageArray[i];\r\n }\r\n String statement = \"UPDATE customcommands SET response = ' \" + output+ \"' permission= '\" + messageArray[2] + \"' WHERE command ='\" + command + \"' AND channel='\" + channel + \"';\";\r\n manager.connectToDatabase(statement);\r\n\r\n return (\"Command \" + command + \" successfully updated.\");\r\n }\r\n }\r\n }",
"private static String solve(char[][] field) {\n for (int i = 0; i < 4; i++) {\n if (xWin('O', field[i][0], field[i][1], field[i][2], field[i][3]) ||\n xWin('O', field[0][i], field[1][i], field[2][i], field[3][i])) {\n return O_WON;\n }\n if (xWin('X', field[i][0], field[i][1], field[i][2], field[i][3]) ||\n xWin('X', field[0][i], field[1][i], field[2][i], field[3][i])) {\n return X_WON;\n }\n }\n\n if (xWin('O', field[0][0], field[1][1], field[2][2], field[3][3]) ||\n xWin('O', field[0][3], field[1][2], field[2][1], field[3][0])) {\n return \"O won\";\n }\n\n if (xWin('X', field[0][0], field[1][1], field[2][2], field[3][3]) ||\n xWin('X', field[0][3], field[1][2], field[2][1], field[3][0])) {\n return \"X won\";\n }\n\n // not completed?\n int c = 0;\n for (int i = 0; i < 4; i++) {\n for (int j = 0; j < 4; j++) {\n if (field[i][j] == '.') {\n return NOT_COMPLETED;\n }\n }\n }\n\n // draw...\n return DRAW;\n }",
"int lcs(int x, int y, string s1, string s2,int[][] str){\n \n if(text1.length()==0||text2.length()==0) {\n return 0;\n }\n \n if(str[x][y]!=0) {\n return str[x][y];\n }\n \n int ans =0;\n \n if(text1.charAt(0)== text2.charAt(0)) {\n \n \n \n ans = 1 + longestCommonSubsequence(x+1,y+1,ros1, ros2,str);\n \n \n }\n else {\n \n int first = longestCommonSubsequence(x,y+1,ros1, text2,str);\n int second = longestCommonSubsequence(x+1,y,text1, ros2,str);\n \n ans = Math.max(first,second);\n \n \n \n }\n \n str[x][y] = ans;\n return ans;\n \n \n \n \n \n}",
"private static String determineOperation(String[] args)\n {\n for (String arg : args) {\n if (!arg.startsWith(\"-\")) { //$NON-NLS-1$\n return arg;\n }\n }\n return null;\n }",
"public String[] inStringtoCheck(String[] stringArray) {\n\t\t\n\t\tstringCheck = stringArray;\n\t\toutArr = new String[stringCheck.length];\n\t\t\n\t\t//System.out.print(\"\\n\");\n\t\t\n\t\t/* Check the Local String Array */\n\t\tfor (int i = 0; i < stringCheck.length; i++) {\n\t\t\tint j = i - 1;\n\t\t\tint k = i - 2;\n\t\t\tint l = i - 3;\n\t\t\t\n\t\t\texitCheck = false; \n\t\t\tpariralaCheck = true;\n\t\t\tpackageCheck = true;\n\t\t\tkomentoCheck = true;\n\t\t\t\n\t\t\tif (searchValue(stringCheck[i])) {\n\t\t\t\t\n\t\t\t\t// String append\n\t\t\t\tif(stringCheck[i].equals(op_parirala_dagdag[0]) && !exitCheck && \n\t\t\t\t\t\t(outArr[j].equals(\"String Declarator (End)\") || outArr[k].equals(\"Append\") || outArr[l].equals(\"Keyword\")/*|| *//* outArr[j].equals(\"Identifier\")\n\t\t\t\t\t\t\t\t||*/ /*outArr[k].equals(\"Delimiter Parenthesis (Start)\")*/)) {\n\t\t\t\t\toutArr[i] = \"Append\";\n\t\t\t\t\texitCheck = true;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t \t\n\n\n \n\t\t\t \t\n\t\t\t\t\n\t\t\t\t// Keywords\n \t\tfor (int a = 0; a < abakada_mahalaga.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_mahalaga[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"isulat\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"basahin\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Pre-defined Function)\";\n \t\t\t\t}\n \t\t\t\telse if (stringCheck[i].equals(\"kawalan\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Modifier)\";\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\toutArr[i] = \"Keyword\";\n \t\t\t\t}\n \t\t\t\texitCheck = true;\n \tbreak;\n \t\t\t}\n \t\t}\n \t\t\n \t\t// Reserved Words\n \t\tfor (int a = 0; a < abakada_nakalaan.length; a++) {\n \t\t\tif (stringCheck[i].equals(abakada_nakalaan[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Reserved Word\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t\n \t\t// Noise Words\n \t\tif (stringCheck[i].equals(abakada_ingay[0]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Noise Word\";\n \t\t\t\texitCheck = true;\n \t//break;\n }\n \t\t \n \t\t// Data Type\n \t\tfor (int a = 0; a < pang_uri.length; a++) {\n \t\t\tif (stringCheck[i].equals(pang_uri[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"pambuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Integer)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"hatimbuo\")) {\n \t\t\t\t\toutArr[i] = \"Keyword (Float)\";\n \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"bulyan\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Booleanr)\";\t\t\t\t\n\t\t\t\t\t\t \t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"titik\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (Character)\";\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse if(stringCheck[i].equals(\"parirala\")) {\n\t\t\t\t\t\t\toutArr[i] = \"Keyword (String)\";\n\t\t\t\t\t\t\t}\n\t \t\t\t\t\n \t\t\t\t//outArr[i] = \"Keyword (Data Type)\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t// Boolean\n \t\tfor (int a = 0; a < bulyan.length; a++) {\n \t\t\tif (stringCheck[i].equals(bulyan[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\tif(stringCheck[i].equals(\"tama\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (True)\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"mali\")) {\n \t\t\t\t\toutArr[i] = \"Boolean (False)\";\n \t\t\t\t}\n \t\t\t\t\n \t\t\t\toutArr[i] = \"Boolean\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t // Operators\n \t\t for (int a = 0; a < op_takda.length; a++) {\t\t\t// Assignment Operator\n \t\t\t if (stringCheck[i].equals(op_takda[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Assignment Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < op_palatuusan.length; a++) {\t\t// Arithmetic Operator\n \t\t\tif (stringCheck[i].equals(op_palatuusan[a]) && !exitCheck) {\n \t\t\t\tif(stringCheck[i].equals(\"+\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Plus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"-\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Minus\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"*\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Multiplication\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"/\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Division\";\n \t\t\t\t}\n \t\t\t\telse if(stringCheck[i].equals(\"%\")) {\n \t\t\t\t\toutArr[i] = \"Arithmetic Operator Modulo\";\n \t\t\t\t}\n \t\t\t\t//outArr[i] = \"Arithmetic Operator\";\n \t\t\t\texitCheck = true;\n \tbreak;\n }\n \t\t}\n \t\t \n \t\t for (int a = 0; a < op_yunari.length; a++) {\t\t\t// Unary Operator\n \t\t\t if (stringCheck[i].equals(op_yunari[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Unary Operator\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\t \n \t\t for (int a = 0; a < op_relasyunal.length; a++) {\t\t// Relational Operator\n \t\t\t if (stringCheck[i].equals(op_relasyunal[a]) && !exitCheck) {\n \t\t\t\t\n \t\t\t\t if(stringCheck[i].equals(\"@\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"$\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(NOT EQUALS)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\">\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(GREATER THAN)\";\n \t\t\t\t } \n \t\t\t\t else if(stringCheck[i].equals(\"<\")) {\n \t\t\t\t\t outArr[i] = \"Relational Operator(LESS THAN)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Relational Operator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_lohikal.length; a++) {\t\t\t// Logical Operator\n \t\t\t if (stringCheck[i].equals(op_lohikal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"at\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(AND)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"odikaya\")){\n \t\t\t\t\t outArr[i] = \"Logical Operator(OR)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"hindi\")) {\n \t\t\t\t\t outArr[i] = \"Logical Operator(INVERSE)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Logical Operator\";\n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_kondisyunal.length; a++) {\t\t// Conditional Operator\n \t\t\t if (stringCheck[i].equals(op_kondisyunal[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"?\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(?)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\":\")) {\n \t\t\t\t\t outArr[i] = \"Conditional Operator(:)\";\n \t\t\t\t }\n \t\t\t\t// outArr[i] = \"Conditional Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < op_pirasong_pantas.length; a++) {\t// Bitwise Operator\n \t\t\t if (stringCheck[i].equals(op_pirasong_pantas[a]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t if(stringCheck[i].equals(\"&\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(&)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"^\")){\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(^)\";\n \t\t\t\t }\n \t\t\t\t else if(stringCheck[i].equals(\"|\")) {\n \t\t\t\t\t outArr[i] = \"Bitwise Operator(|)\";\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t \n \t\t\t\t //outArr[i] = \"Bitwise Operator\";\n \t\t\t\t exitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t// Comments\n \t\tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\t\t if (stringCheck[i].equals(kom_marami_check[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t\t outArr[i] = \"Multiple-line Comment (Start)\";\n \t\t\t\t \n \t\t\t\t while(komentoCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(kom_marami_check[0])) {\n \t\t\t\t\t\t outArr[i] = \"Multiple-line Comment (End)\";\n \t\t\t\t\t\t komentoCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Comment\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t\n \t\t\n \t//[package\n \tfor (int a = 0; a < kom_marami_check.length; a++) {\n \t\tif (stringCheck[i].equals(abakada_angkat[0]) && !exitCheck) {\n \t\t\t\t \n \t\t\t outArr[i] = \"Keyword (PACKAGE)\";\n \t\t\t\t \n \t\t\t\twhile(packageCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\n \t\t\t\t\t if(stringCheck[i].equals(\";\")) {\n \t\t\t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\t\t\t packageCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Period\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if(stringCheck[i-1].equals(\".\") && !stringCheck[i].equals(\".\")) {\n \t\t\t\t\t\t outArr[i] = \"Package Extension\";\n \t\t\t\t\t }\n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"Package\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t}\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t\n \t\t \n \t\t // Delimiters and Brackets\n \t\t for (int a = 0; a < tuldok_kuwit.length; a++) {\t\t// Semicolon\n \t\t\t if (stringCheck[i].equals(tuldok_kuwit[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Semicolon\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_separator.length; a++) {\t\t// Separator\n \t\t\t if (stringCheck[i].equals(del_separator[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Separator\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n\n \t\t // Character Declarator\n \t\t for (int a = 0; a < del_titik.length; a++) {\t\n \t\t\t oneTitik = false;\n \t\t\t if (stringCheck[i].equals(del_titik[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"Character Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t \n \t\t\t\t\t if(stringCheck[i].equals(del_titik[a])) {\n \t\t\t\t\t\t outArr[i] = \"Character Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else if (!oneTitik ){\n \t\t\t\t\t\t if(stringCheck[i].length() == 1) {\n \t\t\t\t\t\t\t oneTitik = true;\n \t\t\t\t\t\t outArr[i] = \"titik\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\t \n \t\t\t\t\t\t else {\n \t\t\t\t\t\t\toutArr[i] = \"Invalid Token\";\n \t\t\t\t\t\t }\n \t\t\t\t\t\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t // String Declarator\n \t\t for (int a = 0; a < del_parirala.length; a++) {\n \t\t\t if (stringCheck[i].equals(del_parirala[a]) && !exitCheck) {\n \t\t\n \t\t\t\t outArr[i] = \"String Declarator (Start)\";\n \t\t\t\t \n \t\t\t\t while(pariralaCheck) {\n \t\t\t\t\t\n \t\t\t\t\t i++;\n \t\t\t\t\t System.out.println(stringCheck[i]+\" value of i: \"+i);\n \t\t\t\t\t if(stringCheck[i].equals(del_parirala[a])) {\n \t\t\t\t\t\toutArr[i] = \"String Declarator (End)\";\n \t\t\t\t\t\t pariralaCheck = false;\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t else {\n \t\t\t\t\t\t outArr[i] = \"String\";\n \t\t\t\t\t }\n \t\t\t\t\t \n \t\t\t\t\t if(i >= stringCheck.length) {\n \t\t\t\t\t\t System.out.println(\"No closing\");\n \t\t\t\t\t\t break;\n \t\t\t\t\t }\n \t\t\t\t }\n \t\t\t\t \n \t\t\t\t exitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_saklong_una.length; a++) {\t\t// Parenthesis\n \t\t\t if (stringCheck[i].equals(del_saklong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_saklong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_saklong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Parenthesis (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_kulong_una.length; a++) {\t\t// Curly Bracket\n \t\t\t if (stringCheck[i].equals(del_kulong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_kulong_huli.length; a++) {\t\t \n \t\t\t if (stringCheck[i].equals(del_kulong_huli[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Delimiter Curly Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t\t\t\t break;\n }\n \t\t }\n \t\t \n \t\t for (int a = 0; a < del_palong_una.length; a++) {\t\t// Bracket\n \t\t\t if (stringCheck[i].equals(del_palong_una[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Bracket (Start)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t \n \t\tfor (int a = 0; a < del_palong_huli.length; a++) {\t\t\t \n \t\t\t if (stringCheck[i].equals(del_palong_huli[a]) && !exitCheck) {\n \t\t\t\toutArr[i] = \"Bracket (End)\";\n \t\t\t\texitCheck = true;\n \t break;\n }\n \t\t }\n \t\t\n \t\t// Pre-defined Functions\n \t\tfor (int a = 0; a < abakada_pdf_basa.length; a++) {\t\t// Read Function \n \t\t\t if (stringCheck[i].equals(abakada_pdf_basa[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Read function\";\n \t\t\t\t exitCheck = true;\n \t break;\n \t\t\t }\n \t\t }\n \t\t\n \t\tfor (int a = 0; a < abakada_pdf_sulat.length; a++) {\t// Write Function\t \n \t\t\tif (stringCheck[i].equals(abakada_pdf_sulat[a]) && !exitCheck) {\n \t\t\t\t outArr[i] = \"Write function\";\n \t\t\t\texitCheck = true;\n \t break;\n \t\t\t}\n \t\t}\n \t\t\n \t\tif(!exitCheck) {\n \t\t\toutArr[i] = \"Constant Number\"; // next line if ever\n \t\t\t\n \t\t}\n \t\t\t\n \t \t}\n \t\n\t\t\telse if (checkConNum(stringCheck[i])) {\n outArr[i] = \"Constant Number\";\n\t\t\t}\n\t\t\t\n\t\t\telse if (checkVar(stringCheck[i])) {\n outArr[i] = \"Identifier\";\n\t\t\t}\n \n\t\t\telse {\n outArr[i] = \"Invalid Identifier\";\n\t\t\t}\n \n\t\t} // for loop\n\t\t\n\t\treturn outArr;\n\t}",
"public static void main(String[] args) {\n char [] letra = new char [27];\n letra [0] = 'A';\n letra [1] = 'B';\n letra [2] = 'C';\n letra [3] = 'D';\n letra [4] = 'E';\n letra [5] = 'F';\n letra [6] = 'G';\n letra [7] = 'H';\n letra [8] = 'I';\n letra [9] = 'J';\n letra [10] = 'K';\n letra [11] = 'L';\n letra [12] = 'M';\n letra [13] = 'N';\n letra [14] = 'Ñ';\n letra [15] = 'O';\n letra [16] = 'P';\n letra [17] = 'Q';\n letra [18] = 'R';\n letra [19] = 'S';\n letra [20] = 'T';\n letra [21] = 'U';\n letra [22] = 'V';\n letra [23] = 'W';\n letra [24] = 'X';\n letra [25] = 'Y';\n letra [26] = 'Z';\n int [] contadores = new int [27];\n pedirCadena();\n comprobarvocales(letra,contadores);\n }",
"public static void main(String[] args) {\n\t\tString[] arrayCiutats = {\"Barcelona\", \"Madrid\", \"Valencia\", \"Malaga\", \"Cadis\", \"Santander\"};\n\t\t\n\t\t// Crear Array bidimensional amb tants Arrays com ciutats hi ha\n\t\tchar[][] ciutats = new char[arrayCiutats.length][];\n\t\t\n\t\t\n\t\t// For loop iterant per la primera dimensió de l'Array ciutats\n\t\tfor(int i=0; i<ciutats.length; i++) {\n\t\t\t\n\t\t\tciutats[i] = new char[arrayCiutats[i].length()];\t// La mida de cada Array és la llargada de cada String\n\t\t\t\n\t\t\tint z=arrayCiutats[i].length() - 1;\t\t\t\t\t// Iterador per retrocedir en els char de cada String de arrayCiutats\n\t\t\t\n\t\t\t\n\t\t\t// For loop iterant per la segona dimensió de l'Array ciutats\n\t\t\tfor(int j=0; j<ciutats[i].length; j++) {\n\t\t\t\t\n\t\t\t\tchar[] city = arrayCiutats[i].toCharArray();\t// Crear Array amb els char de cada String de arrayCiutats\n\t\t\t\t\n\t\t\t\tciutats[i][j] = city[z];\t\t\t\t\t\t// Guardar el valor en decrement de city en la posició en increment de ciutats\n\t\t\t\t\n\t\t\t\tz--;\t\t\t\t\t\t\t\t\t\t\t// Retrocedir una posició en els char de city\n\t\t\t}\n\t\t\t\n\t\t\t// Imprimir en consola els nous Arrays amb els noms invertis\n\t\t\tSystem.out.println(\"El nom invertit de \" + arrayCiutats[i] + \" és: \" + new String(ciutats[i]));\n\t\t}\n\t\t\n\t}",
"public static List<String> doesCircleExist(List<String> commands) {\n\t\t List <String> result = new ArrayList<String>();\n\t\t for(int robert = 0; robert < commands.size(); robert++) {\n\t\t \t \tint x = 0, y = 0, i = 0, d[][] = { { 0, 1 }, { 1, 0 }, { 0, -1 }, { -1, 0 } };\n\t\t \t \tString inputString = commands.get(robert);\n\t\t \t\tfor (int j = 0; j < inputString.length(); ++j) {\n\t\t \t\t\tif (inputString.charAt(j) == 'R')\n\t\t \t\t\t\ti = (i + 1) % 4;\n\t\t \t\t\telse if (inputString.charAt(j) == 'L')\n\t\t \t\t\t\ti = (i + 3) % 4;\n\t\t \t\t\telse {\n\t\t \t\t\t\tx += d[i][0];\n\t\t \t\t\t\ty += d[i][1];\n\t\t \t\t\t}\n\t\t \t\t}\n\t\t result.add ( (x == 0 && y == 0 || i > 0) ? \"YES\" : \"NO\");\n\t\t }\n\t\t return result;\n\n\t\t }",
"public static String getCommand(String line) throws Exception {\n\t\tif(line.equalsIgnoreCase(\"\")) return null;\n\t\tString[] st = FileChecker.splitNonRegex(line, \" \");\n\t\tString cmdFound = null;\n\t\tfor(String s:st) {\n\t\t\tif(s.equalsIgnoreCase(\"\")) continue;\n\t\t\ttry {\n\t\t\t\tOpCodes.getOpCode(s);\n\t\t\t\tif(cmdFound != null)\n\t\t\t\t\tthrow new Exception(\"Expected arguments not another command: \"+s+\" (previous command=\"+cmdFound+\")\");\n\t\t\t\tcmdFound = s;\n\t\t\t}catch(Exception e) { }\n\t\t}\n\t\treturn cmdFound;\n\t}",
"public String[] camposDivididos(){\r\nString[] args=column().split(\"[,]\");\r\nreturn args;\r\n //return Arrays.toString(args);\r\n}",
"private void casoFor(ArrayList codigoFuente) {\n try {\n\n String texto = \"\", linea = \"\";\n String var[] = null;\n\n byte parenDerecho = 0;\n for (int i = 0; i < codigoFuente.size(); i++) {\n linea = codigoFuente.get(i).toString();\n for (int j = 0; j < linea.length(); j++) {\n if (linea.charAt(j) == ')') {\n parenDerecho++;\n\n if (j < linea.length() - 1) {\n if (linea.charAt(j + 1) == '{') {\n var = contenidoFor(texto);\n\n if (var[0].equals(\"0\")) {\n ta_output.setText(\"Línea \" + (i + 1) + \":\" + var[1]);\n break;\n } else {\n if (codigoFuente.get(codigoFuente.size() - 1).toString().charAt(codigoFuente.get(codigoFuente.size() - 1).toString().length() - 1) == '}') {\n ta_output.setText(\"Compilado Correctamente\");\n break;\n } else {\n ta_output.setText(\"Línea \" + (codigoFuente.size() - 1) + \": Sintáctico: falta llave derecha\");\n break;\n }\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n } else {//Evalua si la llave izquierda esta en la siguiente linea\n if (i < codigoFuente.size() - 1) {\n linea = codigoFuente.get(i + 1).toString();\n if (linea.charAt(0) == '{') {\n var = contenidoFor(texto);\n\n if (var[0].equals(\"0\")) {\n ta_output.setText(\"Línea \" + (i + 1) + \":\" + var[1]);\n break;\n } else {\n if (codigoFuente.get(codigoFuente.size() - 1).toString().charAt(codigoFuente.get(codigoFuente.size() - 1).toString().length() - 1) == '}') {\n ta_output.setText(\"Compilado Correctamente\");\n break;\n } else {\n ta_output.setText(\"Línea \" + (codigoFuente.size()) + \": Sintáctico: falta llave derecha\");\n break;\n }\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n } else {\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: falta llave izquierda\");\n break;\n }\n }\n }\n texto += linea.charAt(j);\n if (texto.equals(\"for\")) {\n if (linea.length() > 5) {\n if (linea.charAt(j + 1) == '(') {\n texto = \"\";\n } else {\n if (linea.charAt(j + 2) == '(') {\n ta_output.setText(\"Línea \" + (i + 1) + \": Lexico: Caracter sobrante en sentencia for.\");\n parenDerecho++;\n break;\n } else {\n parenDerecho++;\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: mala construcción de la sentencia.\");\n break;\n }\n }\n } else {\n parenDerecho++;\n ta_output.setText(\"Línea \" + (i + 1) + \": Sintáctico: mala construcción de la sentencia.\");\n break;\n }\n }\n }\n }\n if (parenDerecho == 0) {\n ta_output.setText(\"Sintáctico: falta paréntesis Derecho\");\n }\n\n } catch (Exception e) {\n System.out.println(\"Error en caso for \" + e.getClass());\n }\n }",
"public void realizaSimulacion() {\n do {\n \tif (mundo != null) {\n \t\tSystem.out.println(mundo.toString());\n \t}\n \t\n \tSystem.out.println(\"Elija un comando: \"); // solicitud del comando\n System.out.println(\"Comando > \");\n String opcion = in.nextLine();\n opcion = opcion.toUpperCase();\n\n String[] words = opcion.split(\" \");\n \n try {\n \tif((mundo != null) || (mundo == null && !comandosNoPermitidos(opcion))){\n\t \tComando comando = ParserComandos.parseaComandos(words); //busca el comando comparandolo\n\t \t\n\t\t if (comando != null) {\t\n\t\t\t\t\t\tcomando.ejecuta(this); // Si lo encuentra, lo ejecuta\n\t\t }\n\t\t else {\n\t\t \tSystem.out.println(\"Comando incorrecto\");\n\t\t }\n \t}\n \n } catch (IOException | PalabraIncorrecta | ErrorLecturaTipoCelula | FormatoNumericoIncorrecto | IndicesFueraDeRango | InputMismatchException | PosicionVacia | PosicionOcupada | CelulaIncorrecta e) {\n \t\te.printStackTrace();\n \t}\n \n \n GuiaEjecucion.textoAyuda();\t\t//muestra codigos de mensaje que no afecten a evoluciona\n GuiaEjecucion.pasosDados(); //muestra codigos de mensajes que tengan que ver con los movimientos de las celulas\n } while (!this.simulacionTerminada);\t//en casod e que el usuario esciba el comando SALIR, se termina la ejecuci�n\n }",
"private int separarCoordenadasFil(String[] pCasilla){\n\t\treturn Integer.parseInt(pCasilla[0]);\n\t}",
"String[] chiediSecondaScommessa();",
"public static boolean check(String[] i) {\r\n\t\tboolean result = false;\r\n\t\tif (i != null && i.length != 0) {\r\n\t\t\tresult = true;\r\n\t\t}\r\n\t\treturn result;\r\n\t}",
"private String[] Transposicion(String texto) {\n String retorno[] = new String[2];\n retorno[0] = \"1\";\n retorno[1] = \"\";\n texto = texto.toLowerCase();\n try {//evalua si hay transposicion en el while\n if (texto.contains(\"w\") && texto.contains(\"h\") && texto.contains(\"i\") && texto.contains(\"l\") && texto.contains(\"e\")) {\n if (!texto.equals(\"while\") && texto.length() == 5) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia while.\";\n }\n } else {//evalua si hay transposicion en el if\n if (texto.contains(\"i\") && texto.contains(\"f\")) {\n if (!texto.equals(\"if\") && texto.length() == 2) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia if.\";\n }\n } else {//evalua si hay transposicion en el int\n if (texto.contains(\"i\") && texto.contains(\"n\") && texto.contains(\"t\")) {\n if (!texto.equals(\"int\") && texto.length() == 3) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia int.\";\n }\n } else {//evalua si hay transposicion en el for\n if (texto.contains(\"f\") && texto.contains(\"o\") && texto.contains(\"r\")) {\n if (!texto.equals(\"for\") && texto.length() == 3) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia for.\";\n }\n } else {//evalua si hay transposicion en el do while\n if (texto.contains(\"d\") && texto.contains(\"o\")) {\n if (!texto.equals(\"do\") && texto.length() == 2) {\n retorno[0] = \"0\";\n retorno[1] = \"Lexico: Transposicion de caracteres en sentencia do.\";\n }\n }\n }\n }\n }\n }\n } catch (Exception e) {\n System.out.println(\"Error en metodo de Transposicion\");\n } finally {\n return retorno;\n }\n }",
"public static void finishArray(String[] strings, char[] chars, boolean mode){\n\t int comp2 = 0;\n\t for(int i = 0; i < strings.length; i++){\n\t while(contains(strings[i], chars[comp2])){\n \t comp2++;\n \t if(comp2 == chars.length){\n \t comp2 = 0;\n \t }\n \t }\n \t //System.out.println(\"strings[i]: \" + strings[i] + \", chars[\"+comp2+\"]: \" + chars[comp2]);\n \t strings[i] += chars[comp2];\n \t if(mode){\n \t comp2++;\n \t if(comp2 == chars.length){\n \t comp2 = 0;\n \t }\n \t while(contains(strings[i], chars[comp2])){\n \t comp2++;\n \t if(comp2 == chars.length){\n \t comp2 = 0;\n \t }\n \t }\n \t strings[i+1] += chars[comp2];\n \t i++;\n \t }\n\t }\n\t}",
"protected abstract String[] getExecString();",
"public static void iniciarAciertos(String vacierto[],String palabra){\n for (int i=0;i<palabra.length();i++){\r\n if (vacierto[i]==null){\r\n vacierto[i]=\" - \";\r\n }\r\n //comprobar que se rellena la matriz con -\r\n //System.out.println(vacierto[i]);\r\n }\r\n \r\n }",
"public boolean correcto(String pars)\n {\n //><\n Stack pos= new Stack();\n ArrayList pos1= new ArrayList(2);\n ArrayList pos2= new ArrayList(2);\n for(int i=0; i<pars.length(); i++)\n {\n if(pars.charAt(i) == '(')\n {\n pos.push(i);\n }\n else if(pars.charAt(i) == ')')\n {\n if(pos.empty() == false)\n {\n pos1.add(pos.pop());\n pos1.add(i);\n }\n else\n {\n pos2.add(i);\n }\n }\n }\n \n int i=0;\n System.out.println(\"Con pareja\");\n while(i < pos1.size())\n {\n System.out.println(\"[\"+pos1.get(i)+\",\"+pos1.get(i+1)+\"]\");\n i+=2;\n }\n \n if(pos.empty()==true && pos2.isEmpty()==true)\n {\n return true;\n }\n else\n {\n System.out.println(\"\\nSin pareja\");\n if(pos.isEmpty()==false)\n {\n System.out.println(pos);\n }\n else\n {\n System.out.println(pos2);\n }\n return false;\n }\n }",
"public String[] pedirDatosNuevoCarro(){\n String[] nuevoCarro = new String[3];\n boolean paso = false;//Pedimos los datos de un carro, con su verificacion y luego se la enviamos en una String\n while (paso == false){\n try {\n System.out.println(\"Ingrese el numero de placa\");\n nuevoCarro[0] = scan.nextLine();\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n paso = false;\n while (paso == false){\n try {\n System.out.println(\"Ingrese la marca de su vehiculo\");\n nuevoCarro[1] = scan.nextLine();\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un valor correcto, por favor\");\n }\n }\n paso = false;\n while (paso == false){\n try {\n System.out.println(\"Ingrese el modelo de su auto, elija el numero antes del modelo ([1 'European|U.S. Compact'], [2 'U.S. Standard'], [3 'U.S. Standard Large'])\");\n String valorString = scan.nextLine();\n int valor = Integer.parseInt(valorString);\n if (valor == 1){\n nuevoCarro[2] = \"European|U.S. Compact\";\n }\n else if (valor == 2){\n nuevoCarro[2] = \"U.S. Standard\";\n }\n else if (valor == 3){\n nuevoCarro[2] = \"U.S. Standard Large\";\n }\n paso = true;\n } catch (Exception e) {\n System.out.println(\"Ingrese un numero de 1 a 3, por favor\");\n }\n }\n\n return nuevoCarro;\n }",
"public int ejecutar (char c, Controller ct) {\r\n\t\t\r\n\t\tString aux = String.valueOf(c);\r\n\t\tif ((aux.equals(\"=\"))) {\r\n\t\t\tct.setBuffer(ct.getBuffer()+c);\r\n\t\t\tct.addTokenListCompuesto(ct.getBuffer(), ct.getNroLinea());\r\n\t\t\tct.setEstadoFinal();\r\n\t\t}\t\r\n\t\treturn 0;\r\n\t}",
"public void q0() {\n\r\n if(cont < car.length) { //cuantos espacios tiene mi arreglo \r\n\r\n if(car[cont]!='0'&&car[cont]!='1'&&car[cont]!=' ') { //el arreglo car en el contador 0 lo vamos a comparar si es = a \r\n\r\n System.out.println(\"Error\");\r\n //cont++; //incrememnto mi contador \r\n //q0(); //si no lo dejo en 0 \r\n }\r\n\r\n else if (car[cont]=='0') { //si es una b me muevo al q1 \r\n \r\n System.out.println(\"q0-----> \"+car[cont]+\" ----->q1\");\r\n cont++;\r\n cont0++;\r\n q1(); //nos va a mover al estado uno \r\n }\r\n\r\n else if (car[cont]=='1') { //si es una b me muevo al q1 \r\n \r\n System.out.println(\"q0-----> \"+car[cont]+\" ----->q3\");\r\n cont++;\r\n cont1++;\r\n q3(); //nos va a mover al estado uno \r\n } \r\n\r\n else if (car[cont]==' ') { //si es una b me muevo al q1 \r\n \r\n System.out.println(\"q0-----> \"+car[cont]+\" ----->q0\");\r\n cont++;\r\n Space();\r\n q0(); //nos va a mover al estado uno \r\n } \r\n } \r\n\r\n else if (cont == car.length) {\r\n\r\n Paridad();\r\n }\r\n }",
"private boolean cursoAsignado(Curso curso, Curso[] cursoAsignado) {\n\n for (int i = 0; i < cursoAsignado.length; i++) {\n\n if (cursoAsignado[i] != null) {\n if (curso.getNombre().equals(cursoAsignado[i].getNombre())) {\n return true;\n }\n }\n }\n return false;\n }",
"private void processCommands(String[] args) {\n int current = 0; //a running total of the parts added to a\n // command\n for (String part : args) {\n command += part;\n if ((part.equals(\";\")) || (part.equals(\"&\"))) { //if it is a delimiter\n if (part.equals(\";\")) { //sequential\n executeSequentially();\n } else { //concurrent\n executeConcurrently();\n }\n } else { //not a delimiter\n if ((current == args.length - 1)) { //contains no delimter in the\n // command (for single commands and the last of a series of\n // commands)\n executeSequentially();//runs as a sequential command\n } else { //not a delmiter and not the end of the commands\n command += \" \"; //add the part to command\n }\n }\n current++;\n }\n }",
"public List<Funcion> definirConjuntoFunciones(int[] argumentos, String... funciones)\n\t\t\tthrows ArgsDistintosFuncionesException {\n\t\tif (funciones.length != argumentos.length) {\n\t\t\tArgsDistintosFuncionesException e = new ArgsDistintosFuncionesException();\n\t\t\tthrow e;\n\t\t}\n\t\tint i = 0;\n\t\tfor (String s : funciones) {\n\t\t\tif (s == \"*\") {\n\t\t\t\tFuncion x = new FuncionMultiplicacion(s, argumentos[i]);\n\t\t\t\tconjuntoFunciones.add(x);\n\t\t\t} else if (s == \"+\") {\n\t\t\t\tFuncion x = new FuncionSuma(s, argumentos[i]);\n\t\t\t\tconjuntoFunciones.add(x);\n\t\t\t} else if (s == \"-\") {\n\t\t\t\tFuncion x = new FuncionResta(s, argumentos[i]);\n\t\t\t\tconjuntoFunciones.add(x);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Hay un simbolo que no es un operando\");\n\t\t\t\treturn conjuntoFunciones;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn conjuntoFunciones;\n\t}",
"public void a(ICommandSender paramae, String[] paramArrayOfString)\r\n/* 17: */ {\r\n/* 18:22 */ String str = MinecraftServer.M().a(EnumGameMode.SURVIVAL, false);\r\n/* 19:23 */ if (str != null) {\r\n/* 20:24 */ a(paramae, this, \"commands.publish.started\", new Object[] { str });\r\n/* 21: */ } else {\r\n/* 22:26 */ a(paramae, this, \"commands.publish.failed\", new Object[0]);\r\n/* 23: */ }\r\n/* 24: */ }",
"static char[][] solveTask2(char[][] board) {\n for(int i=0; i<board.length; i++){\n for(int j=0; j<board[0].length; j++){\n if(board[i][j]== '.'){\n board = updateBoard(board, i, j);\n }\n }\n }\n\n return board;\n }",
"public Command findTrueCommand (String s)\n\t{\n\t\tCommand c = getCommandOrFunction(s);\n\t\thandleSpecialCases(c);\n\t\tfor(int a = 0; a < c.howManyArguments(); a++) {\n\t\t\ttry {\n\t\t\t\tc.addChild(parseCommand(codeReader.next()));\n\t\t\t}\n\t\t\tcatch(NoSuchElementException e) {\n\t\t\t\tthrow new SLogoException(\"Insufficient arguments for function/command \" + s);\n\t\t\t}\n\t\t}\n\t\treturn c;\n\t}",
"private boolean comparacionOblicuaID(String[] dna) {\n boolean repetir;\n int aux = 0;\n final int CASO = 3;\n int largo = dna.length - CASO - 1;\n int repaso = 1, fila,columna;\n do {\n do {\n repetir = true;\n if (repaso == 1) {\n fila = 0;\n columna = largo - aux;\n } else {\n fila = largo - aux;\n columna = 0;\n }\n for (int i = 0; i <= (CASO + aux); i += 2) {\n int colum = columna + i;\n int fil = fila + i;\n if ((colum) == (fil) && repaso == 1) {\n repetir = false; break;\n }\n if (((dna.length-CASO)>=colum && repaso==1) || ((dna.length-CASO)>=fil && repaso==0)) {\n if (dna[fil].charAt(colum) == dna[fil + 2].charAt(colum + 2)) {\n if (dna[fil].charAt(colum) == dna[fil + 1].charAt(colum + 1)) {\n if (((fil - 1) >= 0 && (colum - 1) >= 0) && (dna[fil].charAt(colum) == dna[fil - 1].charAt(colum - 1))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n } else {\n if (((dna.length - CASO+1) >= (colum + 3) && repaso == 1) || ((dna.length-1) >= (fil + 3) && repaso == 0)) {\n if ((dna[fil].charAt(colum) == dna[fil + 3].charAt(colum + 3))) {\n cantidadSec++;\n if(cantidadSec>1)return true;\n if (colum == fil) repetir = false;\n break;\n }\n }\n }\n }\n }\n } else {\n if (colum == fil) repetir = false;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux = 0;\n } while (repaso >= 0);\n return false;\n }",
"public static void main(String[] args) {\n String asNombres[]=new String[TAMA];\r\n //CAPTURAR 5 NNOMBRES \r\n Scanner sCaptu = new Scanner (System.in);\r\n for (int i = 0; i < TAMA; i++) {\r\n System.out.println(\"Tu nombre :\");\r\n asNombres[i]=sCaptu.nextLine();\r\n }\r\n for (String asNombre : asNombres) {\r\n System.out.println(\"Nombre: \" + asNombre);\r\n \r\n }\r\n //CREAR UNA COPIA DEL ARREGLO\r\n /*String asCopia[]=asNombre;//Esto no funciona\r\n asNombre[0]=\"HOLA MUNDO\";\r\n System.out.println(asCopia[0]);*/\r\n \r\n String asCopia[]=new String[TAMA];\r\n for (int i = 0; i < TAMA; i++) {\r\n asCopia[i]=asNombres[i];\r\n \r\n }\r\n asNombres[0]=\"HOLA MUNDO\";\r\n System.out.println(\"Nombre = \" + asNombres[0]);\r\n System.out.println(\"Copia = \" + asCopia[0]);\r\n }",
"public static void main (String[] args)\n\t{\n\t\tString bat;\n\t\tString bi;\n\n\t\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"\\n Intruoduce el el primer string: \");\n\t\tbat = sc.nextLine();\n\n\t\n\t\tSystem.out.print(\"\\n Introduce el segundo string: \");\n\t\tbi = sc.nextLine();\n\n\n\n\t\t// con el siguiente objeto concatena el string bat con el string 2\n \t\tString concatenado = bat.concat(bi);\n \t\tSystem.out.println(\"\\n El texto concatenado es: \" + concatenado);\n\n\t\t\n\t\t// para imprimir los dos strings ya concatenados\n\t\tSystem.out.println(\"\\n Primer valor de la cadena concatenada: \" + concatenado);\n\t\t\n\n\t\t//para convertir en mayusculas o minusculas los caracteres del string\n\t\tString minus = concatenado.toLowerCase();\n\t\tString mayus = concatenado.toUpperCase();\n\n\t\tSystem.out.print(\"lo concatenado en minuscula: \" + minus);\n\t\tSystem.out.print(\"\\nlo concatenado en mayuscula: \" + mayus);\n\n\n\n\n\n\t\t//para comparar los dos Strings si son iguales da igual mayuscula o minuscula\n\t\tif (bat.equalsIgnoreCase(bi) ) // igual con mayuscula y minusculas bat.equals(bi)\n\t\t\tSystem.out.println(\"\\nLos dos strings son iguales\");\n\t\telse\n\t\t\tSystem.out.println(\"\\nlos dos strings son diferentes\");\n\n\t\t//si el string esta vacio para ello lo escrito por teclado tiene que ser de tipo nextLine\n\t\tif (bat.isEmpty())\n\t\t\tSystem.out.println(\"el string bat esta vacio\");\n\n\t\tif (bi.isEmpty())\n\t\t\tSystem.out.println(\"el string bi esta vacio\");\n\n\t\t//para convertir datos de cualquier tipo a string\n\t\tSystem.out.print(\"\\n Intruoduce un numero para convertirlo a string \");\n\t\tint zenbaki = sc.nextInt();\n\n\t\tString berria = String.valueOf(zenbaki);\n\t\tSystem.out.print(zenbaki);\n\t\t\n\n\t\t\n\t\t\t\n\t}",
"private int execute(String s, int i, String[] inputArray) {\n try {\n i = addCommand(getCommand(s), s, i, inputArray);\n } catch (Exception first) {\n try {\n i = addCommand(addUserCommand(s), s, i, inputArray);\n } catch (Exception second) {\n commands.add(new Error(String.format(getError(\"CommandNotFound\"), s)));\n System.err.println(first + \" \" + second);\n }\n }\n return i;\n }",
"public static void dificil(char[][] vectM, String jogador, String maquina, boolean isJogadorComeca) {\n Scanner in = new Scanner(System.in);\n SecureRandom rand = new SecureRandom();\n int acabou = 0;\n int som = 0;\n int l, c;\n int lMaquina;\n int cMaquina;\n imprimeMatriz(vectM);\n do {\n if (!isJogadorComeca) { //maquina = 'X' && som % 2 = 0\n System.out.println(maquina + \" é sua vez de jogar!\");\n if (!checarVitoriaMaquinaOuJogador(vectM, som)) {\n do {\n lMaquina = rand.nextInt(3);\n cMaquina = rand.nextInt(3);\n System.out.println(\"sem condição bixo\");\n } while (isPosicaoPreenchida(lMaquina, cMaquina, vectM));\n vectM[lMaquina][cMaquina] = preencheSimbolo(som);\n }\n isJogadorComeca = true;\n } else {\n System.out.println(jogador + \" é sua vez de jogar!\");\n l = preencheLinha(in, vectM);\n c = preencheColuna(in, vectM);\n while (isPosicaoPreenchida(l, c, vectM)) {\n System.out.println(\"Posição já preenchida\");\n imprimeMatriz(vectM);\n l = preencheLinha(in, vectM);\n c = preencheColuna(in, vectM);\n }\n vectM[l][c] = preencheSimbolo(som);\n isJogadorComeca = false;\n }\n imprimeMatriz(vectM);\n acabou = isAcabou(vectM, som);\n if (acabou == 1) {\n quemGanhou(jogador, maquina, som);\n break;\n } else if (acabou == -1) {\n System.out.println(\"O jogo empatou!\");\n break;\n }\n som++;\n } while (acabou == 0);\n\n }",
"boolean processCommand() throws IOException\n\t{\n\t\tString[] commands = in.readLine().split(\" \");\n\t\tif (commands[0].equalsIgnoreCase(\"F\") && isNum(commands[1]) && isNum(commands[2])) {\n\t\t\tprocessFireCmd(new String[] {commands[1], commands[2]});\n\t\t} else if (commands[0].equalsIgnoreCase(\"C\")) {\n\t\t\tprocessChatCmd (Arrays.copyOfRange(commands, 1, commands.length).toString());\n\t\t} else if (commands[0].equalsIgnoreCase(\"D\")) {\n\t\t\tout.println(\"My board: \\n\");\n\t\t\tboard.draw();\n\t\t\tout.println(\"Target's board: \\n\");\n\t\t\ttargets.draw();\n\t\t\tout.flush();\n\t\t} else {\n\t\t\tout.println(\"Unknown command.\");\n\t\t\tout.flush();\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n\tprotected char scegliMossaDaFare(int iAvversario, int jAvversario, char[][] scacchiera) {\n\t\t\n\t\tif(this.storicoMosseAvversario.isEmpty()) {\n\t\t\tswitch(new Random(2).nextInt()) {\n\t\t\t\tcase 0: return 'U';\n\t\t\t\tcase 1: return 'D';\n\t\t\t\tcase 2: if(this.posX == 4 && this.posY == DIM - 1)\n\t\t\t\t\t\t\treturn 'R';\n\t\t\t\t\t\treturn 'L';\n\t\t\t}\n\t\t}\n\n\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'U' && rimaneNellaScacchiera(this.posY + 1))\n\t\t\t//if(casellaLibera)\n\t\t\treturn 'D';\n\t\telse\n\t\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'D' && rimaneNellaScacchiera(this.posY - 1))\n\t\t\t\treturn 'U';\n\t\t\telse \n\t\t\t\tif(this.storicoMosseAvversario.get(this.storicoMosseAvversario.size() - 1) == 'L' && rimaneNellaScacchiera(this.posX + 1))\n\t\t\t\t\treturn 'R';\n\t\t\t\telse\n\t\t\t\t\treturn 'L';\n\t}",
"public boolean canCompete(String t){\n\t\tif(talents != null)\n\t\t{\n\t\t\tint i;\n\t\t\tfor(i = 0; i < talents.length; i++)\n\t\t\t\tif (talents[i] == t)\n\t\t\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n }",
"public String[] readCommand();",
"public boolean comprobarCampos(String dni, String nombre, String apellido, String clave) {\n\t\t\n\n\t\tif (dni.equals(\"\") || nombre.equals(\"\") || apellido.equals(\"\") || clave.equals(\"\")) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\n\t}",
"public static void main(String[] args) {\n \tString s = \"[94,93,95,92,94,96,94,93,93,93,95,97,97,95,95,92,94,94,94,92,94,94,96,98,98,96,98,96,94,94,96,91,91,93,95,93,95,95,95,91,93,93,95,95,93,97,97,97,97,97,99,95,97,97,99,95,97,93,95,null,95,95,95,90,92,90,92,92,94,94,96,94,null,96,94,94,94,96,null,90,92,null,null,94,null,94,96,null,null,null,null,96,null,null,null,96,98,96,96,96,96,100,100,94,94,98,96,96,96,98,100,94,96,98,98,94,94,94,96,null,null,94,96,94,94,89,91,null,93,91,91,91,91,null,91,null,null,null,null,null,null,93,95,95,95,93,95,null,null,95,93,null,null,null,null,null,93,null,95,93,95,null,97,95,97,95,95,97,99,97,97,null,97,95,null,95,97,101,101,99,99,95,null,93,null,97,99,95,97,97,97,95,95,99,97,101,99,93,93,95,97,97,99,99,null,null,null,null,95,95,95,97,95,null,null,95,null,null,95,null,null,88,88,92,null,null,94,90,92,92,92,90,90,90,92,90,92,null,null,null,94,94,96,null,null,null,94,null,null,null,null,94,null,null,null,94,null,null,null,96,null,96,96,94,94,null,null,null,96,96,94,96,96,100,100,96,98,96,96,null,96,94,null,94,96,null,null,100,102,100,null,null,100,98,98,94,96,92,94,96,98,98,98,94,94,96,98,96,98,96,98,null,96,96,94,98,98,96,98,100,102,98,null,92,94,92,94,96,null,null,null,96,98,98,100,100,100,94,96,94,null,null,96,96,98,null,null,null,null,96,94,null,null,87,89,91,null,null,null,89,89,null,91,93,93,null,93,89,91,89,91,91,89,93,null,91,null,null,null,null,93,null,null,null,null,null,null,null,null,null,null,null,null,null,95,97,null,95,null,null,95,95,97,95,97,95,null,95,95,97,97,101,101,101,101,95,95,97,99,95,null,95,97,97,null,95,null,93,95,null,null,null,null,101,103,99,null,null,101,null,null,null,null,null,93,97,97,null,91,null,95,97,97,97,null,97,null,97,99,95,95,93,null,null,97,97,null,95,null,null,99,95,97,97,99,95,97,95,97,93,95,99,97,97,99,95,97,97,99,99,99,101,101,null,99,91,null,null,null,null,null,null,93,null,97,95,95,97,null,97,97,101,99,null,99,99,null,null,null,97,97,null,null,null,null,97,97,null,null,null,95,null,null,null,null,null,null,null,null,null,null,null,null,92,null,null,null,null,null,null,94,88,null,null,null,90,90,null,null,null,null,88,88,null,null,null,90,null,null,null,null,null,null,null,null,96,96,96,96,96,96,96,94,null,null,96,96,94,null,94,96,96,null,98,96,100,102,null,null,102,102,null,100,94,96,94,null,96,98,98,null,94,96,96,null,98,null,null,null,96,94,null,null,null,94,null,null,null,104,null,100,null,102,null,null,96,96,96,96,null,92,null,96,null,96,null,null,96,null,null,null,null,null,98,null,null,null,94,94,null,null,null,98,null,96,null,null,100,null,96,96,96,98,96,98,98,100,94,null,null,null,null,null,null,98,94,92,96,96,null,100,96,null,98,null,98,100,94,94,96,98,null,96,98,100,98,98,100,100,102,100,100,null,null,null,null,92,92,null,null,null,96,94,null,96,98,98,96,98,96,null,102,null,98,null,null,null,100,100,null,null,null,null,96,98,96,98,null,94,null,null,95,null,87,null,null,91,91,91,87,null,null,89,91,null,null,null,null,null,null,null,null,null,97,95,95,97,null,null,null,null,97,95,null,null,93,null,95,93,null,null,95,null,97,99,95,95,99,null,null,103,101,null,null,103,null,99,95,95,null,95,95,93,null,97,null,null,null,null,93,95,95,97,null,null,null,null,97,null,null,null,null,null,null,null,101,null,101,103,97,97,95,null,null,null,null,97,null,null,95,null,null,null,null,97,null,null,93,93,null,null,97,null,null,null,99,null,95,95,null,null,97,95,null,null,95,null,97,null,97,99,99,null,null,null,null,99,93,95,91,93,97,97,95,95,101,99,null,null,null,null,99,null,null,null,93,null,93,95,97,95,97,99,95,95,97,99,99,101,97,null,null,99,99,99,null,null,103,103,101,101,null,101,null,93,null,91,null,95,null,95,null,97,99,99,97,99,97,97,97,null,95,95,null,null,null,97,101,99,99,101,null,null,null,null,95,null,null,null,93,null,null,null,null,88,null,null,null,null,null,null,null,null,88,null,90,92,null,null,94,96,null,null,96,96,98,null,96,96,null,null,94,96,92,null,94,null,96,98,100,100,null,96,94,null,null,null,102,null,null,null,null,102,null,null,94,94,94,96,null,96,null,null,92,94,96,null,94,null,94,94,null,96,null,98,null,null,null,100,100,102,null,null,98,null,96,98,null,null,null,null,null,null,null,null,94,94,null,94,null,null,null,null,94,96,96,96,96,96,null,96,null,null,96,96,98,98,null,100,98,100,null,null,null,94,94,96,92,92,92,94,null,98,null,98,94,96,94,96,null,null,null,100,null,null,92,null,92,94,null,96,98,96,96,null,98,98,98,null,96,null,96,96,null,null,null,100,98,null,null,100,96,98,null,null,98,98,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,96,96,98,null,null,100,100,96,98,100,98,null,null,96,98,98,98,96,null,94,null,null,null,null,100,98,null,100,null,null,102,null,null,null,null,null,null,87,null,null,null,null,null,95,95,null,97,null,null,null,97,97,null,95,97,95,97,95,null,null,null,null,null,null,null,95,null,null,null,null,null,null,101,97,null,93,null,null,null,null,103,null,null,95,null,95,93,95,95,95,null,null,93,null,93,null,null,null,null,95,95,null,null,95,97,97,99,null,null,null,null,103,null,null,null,95,95,99,null,93,null,null,null,null,null,93,95,97,95,95,97,null,97,97,null,95,null,null,null,null,null,95,97,99,97,97,99,null,null,99,97,101,null,95,null,null,93,97,97,91,93,91,93,93,91,93,93,null,null,99,97,93,93,95,97,93,null,null,95,null,null,null,93,91,93,95,95,95,97,null,null,null,null,null,null,99,null,null,null,null,null,97,null,95,null,null,null,null,null,99,null,null,null,95,95,null,97,97,null,99,99,95,null,null,null,null,null,null,101,99,null,95,95,null,null,null,null,97,99,null,95,99,null,97,null,null,null,97,null,null,null,101,null,99,null,null,null,103,null,null,null,null,null,94,94,null,null,null,null,null,98,94,94,null,null,null,null,96,null,96,null,null,96,null,102,null,98,null,null,null,null,null,null,null,null,94,94,null,94,96,94,null,null,null,null,null,null,null,94,94,null,null,null,null,null,null,null,null,100,null,null,96,94,null,96,null,null,null,null,94,null,null,null,null,96,null,null,94,null,null,96,null,null,96,null,null,null,null,null,96,null,null,null,96,96,null,98,null,null,98,null,null,null,null,102,null,null,92,94,96,null,96,96,null,90,null,null,92,92,null,92,92,null,null,92,null,92,94,92,null,100,96,null,94,null,null,94,96,null,98,null,92,94,94,96,null,null,92,90,null,null,94,null,94,96,94,96,98,96,null,null,null,null,94,96,null,null,94,null,94,94,null,null,null,98,98,null,null,100,null,null,null,102,null,null,96,null,null,96,null,null,null,null,96,null,100,null,null,null,null,null,null,102,null,null,104,104,null,null,null,null,null,97,null,95,95,null,95,97,null,null,95,null,null,103,null,97,95,95,null,null,93,93,null,null,null,95,null,null,null,93,null,null,97,null,93,null,null,null,null,null,95,null,null,null,null,null,null,null,95,97,95,null,95,null,97,99,null,null,null,null,91,93,null,95,null,null,null,97,95,null,89,null,null,91,null,null,null,null,null,null,null,null,91,null,93,95,93,91,null,null,95,null,93,null,95,null,null,null,null,null,null,93,null,null,null,95,null,null,null,null,89,null,null,95,null,null,95,null,95,93,null,null,null,97,95,null,null,null,95,null,null,null,null,95,null,95,99,null,97,null,null,null,null,103,95,null,95,null,null,97,null,null,null,null,null,null,null,null,null,null,null,96,94,null,null,null,98,null,null,null,104,null,null,null,null,null,null,null,null,null,94,94,null,null,null,94,null,98,94,null,null,96,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,94,null,null,null,null,null,null,null,null,null,92,null,null,null,null,94,null,94,null,92,null,94,92,94,94,96,94,92,null,null,null,null,94,94,null,null,96,null,92,null,96,null,null,null,null,null,null,null,94,null,null,null,96,null,null,102,null,null,null,null,null,null,null,null,null,null,null,null,null,null,93,null,93,null,null,null,99,null,null,null,null,null,null,null,null,null,null,null,null,null,null,91,null,null,null,91,null,null,null,null,null,97,null,null,null,91,null,95,null,null,null,null,null,null,null,97,null,null,null,null,101,null,94,null,null,null,null,null,null,92,null,null,null,96,null,null,94,null,null,96,null,null,93,null,null,null,null,null,null,null,97]\";\r\n\t\tTreeNode one = TreeNode.str2tree(s);\r\n \tFindDuplicateSubtrees3 findDuplicateSubtrees = new FindDuplicateSubtrees3();\r\n\t\tList<TreeNode> result = findDuplicateSubtrees.findDuplicateSubtrees(one);\r\n\t\tfor (TreeNode treeNode : result) {\r\n\t\t\tSystem.out.println(treeNode);\r\n\t\t}\r\n\t}",
"public abstract Command decision(GameElement[][][] mapArray, List<Card> cards, int elixir);",
"public static void partida(String vpalabra[],String verror[],String vacierto[],String palabra){\r\n //comienzo ahorcado\r\n System.out.println(\"******************* AHORCADO *******************\");\r\n String letra;\r\n \r\n int contador=7;\r\n //bucle\r\n while ((contador>0)&&(ganarPartida(vacierto,vpalabra)==false)){\r\n //for (int i=0;i<verror.length;i++){\r\n //muestra el dibujo para que sepa por donde va \r\n mostrarDibujo(contador);\r\n System.out.println(\"VIDAS: \"+ contador);\r\n //mostrar vector acierto\r\n mostrarAcierto(palabra, vacierto);\r\n \r\n \r\n //pregunta letra al jugador \r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n System.out.println(\"Escribe una única letra: \");\r\n letra=leer.next();\r\n \r\n //muestra vector verror las letras erroneas que vas introduciendo\r\n muestraError(verror);\r\n System.out.println(\"\");\r\n System.out.println(\"\"); \r\n //comprueba si letra esta en la matriz palabra para acertar o fallar\r\n if (buscarLetra(vpalabra, vacierto, verror, letra)==false){\r\n //recorro verror guardando letra erronea\r\n \r\n // verror[i]=letra;\r\n contador--;\r\n } \r\n \r\n //}\r\n }\r\n \r\n if (ganarPartida(vacierto,vpalabra)==true){\r\n System.out.println(\"La palabra es: \");\r\n mostrarPalabra(palabra, vpalabra);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"¡HAS GANADO!\");\r\n } else{\r\n System.out.println(\" _ _ _ \");\r\n System.out.println(\" |/ | \");\r\n System.out.println(\" | 0 \");\r\n System.out.println(\" | /ºº/ \");\r\n System.out.println(\" | | \");\r\n System.out.println(\" | / / \");\r\n System.out.println(\" | \");\r\n System.out.println(\"---------------\");\r\n System.out.println(\"---------------\");\r\n System.out.println(\" HAS PERDIDO \");\r\n }\r\n }",
"String[] chiediScommessa();",
"public static void main(String[] args) {\n\t\tint[][] t1 = new int[4][];\r\n\t\tt1[0]= new int[4];\r\n\t\tSystem.out.println(t1[0]);\r\n\t\tSystem.out.println(t1[0][0]);\r\n\t\tint[][] t2 = {{1,2,3,4,5},{44,66,77,99,12,21},{11,22}};\r\n\t\tfor(int i=0 ; i<t2.length;i++) {\r\n\t\t\tfor(int j=0 ; j < t2[i].length ;j++) {\r\n\t\t\t\tSystem.out.print(t2[i][j]+\" \");\r\n\t\t}\r\n\t\tSystem.out.println();\r\n\t\r\n\t\t\t}\r\n\t\tchar[][]s = {\r\n\t\t\t\t{'x','x','x'},\r\n\t\t\t\t{'x','o','x'},\r\n\t\t\t\t{'x','x','o'},\r\n\t\t\t\t{'x','x','x'}\r\n\t\t};\r\n\t\t\r\n\t\tfor(int i=0 ; i<s.length ; i++) {\r\n\t\t\tfor(int j=0 ; j<s[i].length;j++) {\r\n\t\t\t\tif(s[i][j]=='o') {\r\n\t\t\t\t\tSystem.out.printf(\"[%2d행%2d열}%n\",i,j);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t}\r\n\t\t}",
"private static boolean contieneAtomo(FormaClausal fc, char atomo) {\n\t\treturn fc.formas.contains(String.valueOf(atomo));\n\t}",
"public static String checkFormatCommandLine(String[] cmdStrings) {\n String result = \"\";\n String checkFormat = cmdStrings.length != 0 ? cmdStrings[0] : \"\";\n if (cmdStrings.length == 0 || checkFormat.equalsIgnoreCase(\"-h\")) {\n result = HELP;\n } else {\n if (find(cmdStrings, \"-r\") == -1) {\n result = \"Error: Not input file.\";\n } else if (find(cmdStrings, \"-1\") + 1 >= cmdStrings.length) {\n result = \"Error: Not found file.\";\n }\n }\n return result;\n }",
"public boolean ocupadoBajar(Pieza [] pieza) {\n boolean comprobar = false;\r\n for (int i = 0; i < 4; i++) { //borra la pieza para que al comprobar no se encuentre con una celda de la propia pieza\r\n tablero.setTipoPieza(pieza[i].x, pieza[i].y, 0);\r\n }\r\n for (int i = 0; i < 4; i++) {\r\n if (tablero.getTipoPieza()[(pieza[i].x) + 1][pieza[i].y] == 0 && ! (pieza[i].x==19)) { //comprueba si la celda de abajo no está ocupada o es la última\r\n comprobar = false;\r\n } else {\r\n comprobar = true;\r\n dibujarPieza(canvas, pieza);\r\n return comprobar;\r\n }\r\n }\r\n for (int i = 0; i < 4; i++) {\r\n tablero.setTipoPieza(pieza[i].x, pieza[i].y,pieza[i].tipopieza); //si no está ocupado también vuelve a pintar la pieza\r\n }\r\n dibujarPieza(canvas, pieza);//si no está ocupado también vuelve a pintar la pieza\r\n return comprobar;\r\n }",
"public int contenuto(int r, int c) { return contenutoCaselle[r][c]; }",
"public static void main(String[] args) {\n\t\tint opc,change, opc_config, inicio;\n\t\tint puntaje_correct=0;\n\t\tString resp,cod;\n\t\tchar a='s';\n\t\tchar opc_config_a = 's';\n\t\tString pregunta_config;\n\t\tString respuest_correc;\n\t\tString preguntas_posibles[] = new String [4];\n\t\tboolean correcto;\n\t\tint puntaje_partida;\n\t\tString nombre;\n\t\t\n\t\t\n\t\t//Crear objetos de clases\n\t\t\n\t\tScanner sc = new Scanner (System.in);\n\t\tArrayList<String> coleccion_preg = new ArrayList<String>();\t\n\t\tArrayList<String> coleccion_resp = new ArrayList<String>();\t\n\t\tArrayList<Integer> coleccion_punt = new ArrayList<Integer>();\t\n\t\tArrayList<ArrayList<String> > coleccion_posibles = \n new ArrayList<ArrayList<String> >(); \n ArrayList<String> ayuda = new ArrayList<String>(); \n String [] letras = {\"a\",\"b\",\"c\",\"d\"}; \n\n\n\t\t\n\t\t//Pedirle el nombre al usuario\n System.out.println(\"Ingrese su nombre:\");\n nombre=sc.next();\n System.out.println(\"\\nBIENVENIDO\");\n System.out.println(\"\\nUsuario: \" + nombre);\n System.out.println(\"¿Qué desea hacer?\");\n System.out.println(\"[1] Jugar\");\n System.out.println(\"[2] Salir\");\n\t\tinicio=sc.nextInt();\n\t\tif(inicio==1)\n\t\t{\n\t\t//Segundo menu\n \n\t\twhile(a=='s') {\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.printf (\"\\n \tJuego de Trivia \");\n\t\tSystem.out.printf (\"\\n[1]. Configuracion\");\n\t\tSystem.out.printf (\"\\n[2]. Juego\");\n\t\tSystem.out.printf (\"\\n[3]. Consulta de puntaje obtenido\");\n\t\tSystem.out.printf (\"\\n[4]. Salir\\n\");\n\t\t\n\t\topc = sc.nextInt();\n\t\tsc.nextLine();\n\t\tswitch (opc) {\n\t\t\t//Configuracion\n\t\t\tcase 1:\n\t\t\t\tSystem.out.print (\"\\n \tConfiguración \");\n\t\t\t\tSystem.out.print (\"\\n1.Añadir pregunta \");\n\t\t\t\tSystem.out.print (\"\\n2.Eliminar pregunta \");\n\t\t\t\tSystem.out.print (\"\\nPresione cualquier número para salir \\n\");\n\n\t\t\t\topc_config = sc.nextInt();\n\t\t\t\tsc.nextLine();\n\t\t\t\tswitch (opc_config) {\n\t\t\t\t\n\t\t\t\tcase 1:\n\t\t\t\t\t\n\t\t\t\t\twhile (opc_config_a == 's') {\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.print (\"\\nIngrese la pregunta: \");\n\t\t\t\t\t\tpregunta_config = sc.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.print (\"\\nIngrese las posibles respuestas: \\n\"); \n\t\t\t\t\t\tayuda = new ArrayList<String>();\n\t\t\t\t\t\tfor(int i=0;i<preguntas_posibles.length;i++) {\n\t\t\t\t\t\t\tpreguntas_posibles[i] = sc.nextLine();\n\t\t\t\t\t\t\tString b = preguntas_posibles[i];\n\t\t\t\t\t\t\tayuda.add(b);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println (\"Ingrese la respuesta correcta: \");\n\t\t\t\t\t\trespuest_correc = sc.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println (\"Ingrese el puntaje de la respuesta correcta: \");\n\t\t\t\t\t\tpuntaje_correct = sc.nextInt();\n\t\t\t\t\t\tsc.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tcoleccion_preg.add(pregunta_config);\n\t\t\t\t\t\tcoleccion_posibles.add(ayuda);\n\t\t\t\t\t\tcoleccion_resp.add(respuest_correc);\n\t\t\t\t\t\tcoleccion_punt.add(puntaje_correct);\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(\"¿Desea añadir otra pregunta? s/n\");\n\t\t\t\t\t\topc_config_a = sc.next().charAt(0);\n\t\t\t\t\t\tsc.nextLine();\n\t\t\t\t\t}\n\t\t\t\t\tSystem.out.println(\"Pruebas\");\n\n\t\t\t\t\t//Verifica si alguna pregunta es parecida\n\t\t\t\t\tfor (int i = 0; i < coleccion_preg.size(); i++) {\n\t\t\t\t\t\t for (int j = 1; j < coleccion_preg.size()-1; j++) {\n\t\t\t\t\t\t\t if (coleccion_preg.get(i)== coleccion_preg.get(j)) {\n\t\t\t\t\t\t\t\t System.out.println(\"Alguna pregunta es igual a una ya existente.\");\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else {\n\t\t\t\t\t\t\t\t continue;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t }\n\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(coleccion_preg);\n\t\t\t\t\tSystem.out.println(coleccion_posibles);\n\t\t\t\t\tSystem.out.println(coleccion_resp);\n\t\t\t\t\tSystem.out.println(coleccion_punt);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tchar e = 's';\n\t\t\t\t\twhile (e =='s') {\n\t\t\t\t\t\tSystem.out.println(\"Aquí se encuentran sus preguntas\");\n\t\t\t\t\t\t\tif (coleccion_preg.size()>0) {\n\t\t\t\t\t\t\t\tfor (int i=0; i<coleccion_preg.size();i++) {\n\t\t\t\t\t\t\t\t\tSystem.out.println((i+1)+\". \"+coleccion_preg.get(i));\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tSystem.out.println(\"¿Desea eliminar alguna? s/n\");\n\t\t\t\t\t\t\t\tchar elim = sc.next().charAt(0);\n\t\t\t\t\t\t\t\tif (elim == 's') {\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"¿Cuál desea eliminar?\");\n\t\t\t\t\t\t\t\t\tint delete = sc.nextInt();\n\t\t\t\t\t\t\t\t\tdelete = delete - 1;\n\t\t\t\t\t\t\t\t\tsc.nextLine();\n\t\t\t\t\t\t\t\t\tcoleccion_preg.remove(delete);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tSystem.out.println(\"No hay ninguna pregunta.\");\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\t\t\t\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t//Juego\n\t\t\t//No se debe permitir al usario elegir las mismas preguntas\n\t\t\t//Área de mensajes:\n\t\t\t\t//Pregunta correcta o incorrecta\n\t\t\t\t//Desea seguir jugando\n\t\t\tcase 2:\n\t\t\t\t\n\t\t\t\tSystem.out.printf (\"\\n1. ¿Año en que se descubre America? \"); \n\t\t\t\tSystem.out.printf (\"\\n2. ¿Cual es la cabecera de la provincia de Coclé? \"); \n\t\t\t\tSystem.out.printf (\"\\n3. ¿Cual es raiz cuadrada de 3600? \"); \n\t\t\t\tSystem.out.printf (\"\\n4. Panamá limita al norte con \"); \n\t\t\t\tSystem.out.printf (\"\\n5. ¿Cantidad de Comarcas indigenas que tiene Panamá? \"); \n\t\t\t\tSystem.out.printf (\"\\n6. ¿Cuantos distritos tiene la provincia? \"); \n\t\t\t\tSystem.out.printf (\"\\n7. Panamá limita con Colombia al\"); \n\t\t\t\tSystem.out.printf (\"\\n8. El itsmo de Panamá fue visitado por primera vez por \"); \n\t\t\t\tSystem.out.printf (\"\\n9. ¿Año en que fue fundado la ciudad de Panamá?\");\n\t\t\t\tSystem.out.printf (\"\\n10. ¿Fue el primer europeo en division el oceano Pacifico?\\n\");\n\t\t\t\tif (!coleccion_preg.isEmpty()) {\n\t\t\t\t\tfor (int i=0; i<coleccion_preg.size();i++) \n\t\t\t\t\tSystem.out.println(\"1\"+(i+1)+\". \"+coleccion_preg.get(i));\n\t\t\t\t}\t\n\n\t\t\t\t\n\t\t\t\t\tchange = sc.nextInt();\n\t\t\t\n\t\t\t\t\n\t\t\t\tif (change ==1) { \n\t\t\t\t\tSystem.out.print (\"\\n1. ¿Año en que se descubre America? \"); \n\t\t\t\t\tSystem.out.print (\"\\n a) 1492 \"); \n\t\t\t\t\tSystem.out.print (\"\\n b) 1512 \"); \n\t\t\t\t\tSystem.out.print (\"\\n c)1903 \"); \n\t\t\t\t\tSystem.out.print (\"\\n d)2016 \"); \n\t\t\t\t\tSystem.out.print (\"\\n Seleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\tif (resp==coleccion_resp.get(change))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tSystem.out.print (\"\\n ¡Respuesta correcta! \\n\"); \n\t\t\t\t\t\t\t\tSystem.out.print (\"\\n Has ganado \"+ coleccion_punt.get(change) + \" puntos \\n\"); \n\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\telse if (change ==2) { \n\t\t\t\t\t\n\t\t\t\t\tSystem.out.print (\"\\n2. Cúal es la cabecera de la provincia de Coclé?\"); \n\t\t\t\t\tSystem.out.print (\"\\n Aguadulce \"); \n\t\t\t\t\tSystem.out.print (\"\\n Penonomé \"); \n\t\t\t\t\tSystem.out.print (\"\\n Anton \"); \n\t\t\t\t\tSystem.out.print (\"\\n Nata \"); \n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t resp=sc.next();\n\t\t\t\t\t}\n\t\t\t\telse if (change ==3) { \n\t\t\t\t\tSystem.out.print (\"\\n3. ¿Cual es raiz cuadrada de 3600? \"); \n\t\t\t\t\tSystem.out.print (\"\\n 600\"); \n\t\t\t\t\tSystem.out.print (\"\\n 6 \"); \n\t\t\t\t\tSystem.out.print (\"\\n 60 \"); \n\t\t\t\t\tSystem.out.print (\"\\n 6000 \"); \n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\t}\t\n\t\t\t\telse if (change ==4) { \n\t\t\t\t\tSystem.out.print (\"\\n4. Panamá limita al norte con \"); \n\t\t\t\t\tSystem.out.print (\"\\n Panamá limita al norte con \"); \n\t\t\t\t\tSystem.out.print (\"\\n Panamá limita al norte con \"); \n\t\t\t\t\tSystem.out.print (\"\\n Panamá limita al norte con \"); \n\t\t\t\t\tSystem.out.print (\"\\n Panamá limita al norte con \"); \n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\t}\n\t\t\t\telse if (change ==5) { \n\t\t\t\t\tSystem.out.print (\"\\n5. ¿Cantidad de Comarcas indigenas que tiene Panamá? \"); \n\t\t\t\t\tSystem.out.print (\"\\n 1 \"); \n\t\t\t\t\tSystem.out.print (\"\\n 5 \"); \n\t\t\t\t\tSystem.out.print (\"\\n 3 \"); \n\t\t\t\t\tSystem.out.print (\"\\n 6 \"); \n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\t}\t\n\t\t\t\telse if (change ==6) { \n\t\t\t\t\tSystem.out.print (\"\\n ¿Cuantos distritos tiene la provincia? \"); \n\t\t\t\t\tSystem.out.print (\"\\n 78 \"); \n\t\t\t\t\tSystem.out.print (\"\\n 58 \"); \n\t\t\t\t\tSystem.out.print (\"\\n 68\"); \n\t\t\t\t\tSystem.out.print (\"\\n 48 \"); \n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\t}\n\t\t\t\telse if (change ==7) { \n\t\t\t\t\tSystem.out.print (\"\\n7. Panamá limita con Colombia al\"); \n\t\t\t\t\tSystem.out.print (\"\\n Norte\"); \n\t\t\t\t\tSystem.out.print (\"\\n Sur\"); \n\t\t\t\t\tSystem.out.print (\"\\n Este\"); \n\t\t\t\t\tSystem.out.print (\"\\n Oeste\"); \n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\t}\n\t\t\t\telse if (change ==8) { \n\t\t\t\t\tSystem.out.print (\"\\n8. El itsmo de Panamá fue visitado por primera vez por \"); \n\t\t\t\t\tSystem.out.print (\"\\n Vasco Núñez de Balboa\"); \n\t\t\t\t\tSystem.out.print (\"\\n Rodrigo de Bastidas \"); \n\t\t\t\t\tSystem.out.print (\"\\n Diego de nicueza \"); \n\t\t\t\t\tSystem.out.print (\"\\n Cristobal Colón \"); \n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\telse if (change ==9) { \n\t\t\t\t\tSystem.out.print(\"\\n9. ¿Año en que fue fundado la ciudad de Panamá?\");\n\t\t\t\t\tSystem.out.print(\"\\n 1519\");\n\t\t\t\t\tSystem.out.print(\"\\n 1529\");\n\t\t\t\t\tSystem.out.print(\"\\n 1512\");\n\t\t\t\t\tSystem.out.print(\"\\n 1509\");\n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (change ==10) { \n\t\t\t\t\tSystem.out.print(\"\\n10. ¿Fue el primer europeo en division el oceano Pacifico?\");\n\t\t\t\t\tSystem.out.print(\"\\n Cristobal Colón\");\n\t\t\t\t\tSystem.out.print(\"\\n Vasco Núñez de Balboa \");\n\t\t\t\t\tSystem.out.print(\"\\n Rodrigo de Bastidas\");\n\t\t\t\t\tSystem.out.print(\"\\n Diego de Nicueza\");\n\t\t\t\t\tSystem.out.print (\"\\nSeleccione la respuesta correcta: \\n\"); \n\t\t\t\t\tresp=sc.next();\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\telse if (change == 11 & coleccion_preg.size()>=1) {\n\t\t\t\t\tSystem.out.println(coleccion_preg.get(0));\n\t\t\t\t\tfor (int i=0; i<4; i++) {\n\t\t\t\t\t\tSystem.out.println(letras[i]+\") \"+coleccion_posibles.get(0).get(i));\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (change == 12 & coleccion_preg.size()>=2) {\n\t\t\t\t\tSystem.out.println(coleccion_preg.get(1));\n\t\t\t\t\tfor (int i=0; i<4; i++) {\n\t\t\t\t\t\tSystem.out.println(letras[i]+\") \"+coleccion_posibles.get(1).get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (change == 13 & coleccion_preg.size()>=3) {\n\t\t\t\t\tSystem.out.println(coleccion_preg.get(2));\n\t\t\t\t\tfor (int i=0; i<4; i++) {\n\t\t\t\t\t\tSystem.out.println(letras[i]+\") \"+coleccion_posibles.get(2).get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (change == 14 & coleccion_preg.size()>=4) {\n\t\t\t\t\tSystem.out.println(coleccion_preg.get(3));\n\t\t\t\t\tfor (int i=0; i<4; i++) {\n\t\t\t\t\t\tSystem.out.println(letras[i]+\") \"+coleccion_posibles.get(3).get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\telse if (change == 15 & coleccion_preg.size()>=5) {\n\t\t\t\t\tSystem.out.println(coleccion_preg.get(4));\n\t\t\t\t\tfor (int i=0; i<4; i++) {\n\t\t\t\t\t\tSystem.out.println(letras[i]+\") \"+coleccion_posibles.get(4).get(i));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.println(\"Numero incorrecto.\");\n\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\tcase 3:\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tSystem.out.println(\"Top Puntajes Obtenidos\");\t\n\t\t}\n\t\t}\t\n\t\n\t\t}\n\t}",
"public static void main(String[] args) {\n\t\tUtil.isGeom(\"(1 1,2 2,2 1,1 1)\", \"5\");\r\n//\t\tString aString = \"(a)_(b)\";\r\n//\t\taString.split(\")\");\r\n\t}",
"protected boolean checkInput(String input) {\n\t\tfor(int i = 0; i < 10; i++) {\n\t\t\tfor(int j = 0; j < 10; j++) {\n\t\t\t\tif(refRadar[i][j].equals(input)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}",
"public void comppar(String user){\r\n if(pos1==pos2){\r\n if(user.equals(\"Jugador\")==true)\r\n pj++;\r\n }\r\n else{\r\n switch(this.opc){\r\n case 1:\r\n mfacil[pos[0]][pos[1]]=\"*\";\r\n mfacil[pos[2]][pos[3]]=\"*\";\r\n break;\r\n case 2:\r\n mmedio[pos[0]][pos[1]]=\"*\";\r\n mmedio[pos[2]][pos[3]]=\"*\";\r\n break;\r\n case 3:\r\n mdificil[pos[0]][pos[1]]=\"*\";\r\n mdificil[pos[2]][pos[3]]=\"*\";\r\n break;\r\n }\r\n }\r\n }",
"public static void main(String[] args) {\n int numeros[] = {2, 3, 4, 2, 4, 5, 6, 2, 1, 2};\n //Creamos segundo arreglo con iguall tamaño que el arreglo nùmeros\n int cuadrados[] = new int[numeros.length];\n //Arreglo para almacenar el proceso de la operación\n String procesos[] = new String[numeros.length];\n //Creamos ciclo de repeticiòn para recorrer arreglo \n for (int indice = 0; indice < numeros.length; indice++) {\n int cuadrado = numeros[indice] * numeros[indice];\n //Almacenamos el proceso de la opreaciòn en el arreglo cuadrados\n cuadrados[indice] = cuadrado;\n \n //Almacenar resultado en el arreglo procesos\n procesos[indice] = numeros[indice] + \"x\" + numeros[indice];\n }\n //Ciclo de repetición para mostrar arreglos\n String print_numeros = \"numeros - \";\n String print_cuadrados = \"cuadrados - \";\n String print_procesos = \"procesoss - \";\n for (int indice = 0; indice < numeros.length; indice++) {\n print_numeros = print_numeros + numeros[indice] + \", \";\n print_cuadrados = print_cuadrados + cuadrados[indice] + \", \";\n print_procesos = print_procesos + procesos[indice] + \", \";\n\n }\n System.out.println(print_numeros);\n System.out.println(print_cuadrados);\n System.out.println(print_procesos);\n \n //suma solo numeros pares\n int acumulador_pares=0;\n for (int indice = 0; indice < 10; indice++) {\n boolean par= detectar_par(numeros[indice]);\n if (par == true) {\n acumulador_pares = acumulador_pares + numeros[indice];\n \n }\n }\n System.out.println(\"La suma de los nùmeros pares es: \"+acumulador_pares);\n \n }",
"public static void main(String[] args) {\n \n char cadena[];\n Scanner sc=new Scanner(System.in);\n String palabra;\n \n System.out.println(\"Introduce palabra\");\n palabra=sc.nextLine();\n \n cadena=palabra.toCharArray();\n \n \n if(palindromo(cadena)){\n System.out.println(\"Es palindromo\");\n \n }\n \n else{\n System.out.println(\"no es palindromo\");\n }\n \n }",
"public static void main(String[] args) {\n\t\t//int num = 1;\n\t\t//String nombre = \"Daniel\";\n\t\t//String resultado = (num > 0)?nombre:\"\";\n\t\tString uno = \"ABRAZADERA OMEGA\";\n\t\tString dos = \"DE 2\\\"\";\n\t\tString datos = (uno.equals(dos))?uno:uno+\" \"+dos;\n\t\tSystem.out.println(datos);\n\t}",
"private boolean comparacionOblicuaDI (String [] dna){\n int largo=3, repaso=1, aux=0, contador=0, fila, columna;\n boolean repetir;\n char caracter;\n do {\n do {\n repetir=true;\n if(repaso==1){\n fila=0;\n columna=largo + aux;\n }else{\n fila=dna.length-1-largo-aux;\n columna=dna.length-1;\n }\n\n caracter = dna[fila].charAt(columna);\n\n for (int i = 1; i <= (largo+aux); i++) {\n int colum=columna-i;\n int fil=fila+i;\n if((colum==dna.length-2 && fil==1) && repaso==1){\n repetir=false;\n break;\n }\n if (caracter != dna[fil].charAt(colum)) {\n contador = 0;\n\n if(((dna.length-largo)>(colum) && repaso==1) || ((dna.length-largo)<=(fil) && repaso!=1)){\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n caracter = dna[fil].charAt(colum);\n\n } else {\n contador++;\n }\n if (contador == largo) {\n cantidadSec++;\n if(cantidadSec>1){\n return true;\n }\n if((fil+colum)==dna.length-1){\n repetir=false;\n }\n break;\n }\n }\n aux++;\n } while (repetir);\n repaso--;\n aux=0;\n\n }while(repaso>=0);\n return false;\n }",
"public void getPalavraMatriz(char [][] lista, String texto, int indexL, int indexC, int indexP, ArrayList<String> aux){\n if (lista[indexL][indexC] == texto.charAt(indexP)){\n //se eu encontrar a ultima letra\n if(texto.length()-1 == indexP){\n aux.add(indexL + \".\" + indexC);\n //return ; //se der return acha apenas a primeira ocorrencia\n }\n else{\n getPalavraMatriz(lista, texto, indexL, indexC+1, indexP+1, aux);\n \n }\n //procura horizontal\n \n //procura vertical\n }\n else{\n if (listaInteiros[index] > listaInteiros[aux]){\n aux = index;\n return getMaiorNumero(listaInteiros, index+1);\n }\n else{\n return getMaiorNumero(listaInteiros, index +1);\n }\n }\n }",
"public static void main(String[] args) {\n\t\t\n\t\t\n\t\tchar arr1[] = new char[4];\n\t\t\n\t\tarr1[0]= 'A';\n\t\tarr1[1]= 'D';\n\t\tarr1[2]='E';\n\t\tarr1[3]= 'M';\n\t\t\n\t\tfor(int i=0; i<4; i++) {\n\t\t\tSystem.out.println(arr1[i]);\n\t\t}\n\t\t\n\t\tSystem.out.println(arr1[3]);\n\t\t\n\t\t// Arrayin lenghti bulmak icin arrayin ismi arr1.lenght yazmak yeterlidir\n\t\t// stringlerde de lenhgt metodu kullanilir ama stringlerde kulanilan lenght methodu parantezlidir . yani stringlerde \n\t\t//==> lenght() Arraylarde ==> lenght var \n\t\tSystem.out.println(arr1.length);//4\n\t\t\n\t\t\n\t\t\n\t\t// Arraydeki son elemani bulmak icin lenght kullaniniz\n\t\tSystem.out.println(arr1[arr1.length-1]);//M\n\t\t\n\t\t\n\t\t\n\t\t\n\t\t\n\n\t}",
"private static boolean inArray(char c, char[] array) {\n\t\tfor (int i = 0; i < array.length; i++) {\n\t\t\tif (c == array[i]) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn false;\n\t}",
"public void CasoChar(String caracter) throws IOException, Exception\r\n {\r\n String palabra = caracter + leerCaracter() + leerCaracter() + leerCaracter();\r\n switch (palabra.toUpperCase())\r\n {\r\n case \"CHR(\":\r\n String[] numero = leerPalabra(leerCaracter(), \")\");\r\n Matcher matcher = patronNUM.matcher(numero[0]);\r\n if (matcher.matches())\r\n {\r\n switch (numero[1])\r\n {\r\n case \")\":\r\n if (leerRango)\r\n {\r\n if (AnalizarRango(contenidoConjunto.get(contenidoConjunto.size() - 1), Integer.parseInt(numero[0])))\r\n {\r\n int inicio = contenidoConjunto.size() - 1; int fin = Integer.parseInt(numero[0]);\r\n for (int i = contenidoConjunto.get(inicio); i <= fin; i++)\r\n {\r\n contenidoConjunto.add(i);\r\n }\r\n leerRango = false;\r\n AnalizarSimbolo(leerCaracter());\r\n }\r\n }\r\n else\r\n {\r\n contenidoConjunto.add(Integer.parseInt(numero[0]));\r\n AnalizarSimbolo(leerCaracter());\r\n }\r\n break;\r\n default:\r\n Caracteres -= numero[1].length(); debeContinuar = false;\r\n E1(\"Se esperaba final de la definición del caracter en ASCII, no se cerro el parentesis.\");\r\n break;\r\n }\r\n }\r\n else\r\n {\r\n Caracteres -= numero[0].length(); debeContinuar = false;\r\n E1(\"No se definió de forma correcta el char por el método ASCII, se esperaba un número dentro de los parentesis.\");\r\n }\r\n break;\r\n default:\r\n Caracteres -= palabra.length(); debeContinuar = false;\r\n E1(\"Se esperaba la definición por código ASCII del elemento del conjunto \" + nombreConjunto);\r\n break;\r\n }\r\n }",
"public static int drwal(String[] args){\n if (args.length == 5) {\n //Sprawdzanie czy argument 1,2,4,5 to inty\n try {\n Integer.parseInt(args[0]);\n Integer.parseInt(args[1]);\n Integer.parseInt(args[3]);\n Integer.parseInt(args[4]);\n }catch (NumberFormatException e){\n System.out.println(\"klops\");\n return 0;\n }\n int xStart = Integer.parseInt(args[1]);\n int yStart = Integer.parseInt(args[0]);\n Character kolor = args[2].charAt(0);\n int szerokosc = Integer.parseInt(args[3]);\n int wysokosc = Integer.parseInt(args[4]);\n Scanner input = new Scanner(System.in);\n char[][] output1 = new char[wysokosc][szerokosc];\n int wyscount = 0;\n int counter = 0;\n //Jezeli szerokosc albo wysokosc > 5000\n //Jezeli xstart > szerokosc, ystart > wysokosc\n if (!((szerokosc > 5000 || wysokosc > 5000)||(xStart > szerokosc || yStart > wysokosc))){\n while(input.hasNextLine()){\n String tmp;\n byte[] isUTF = null;\n try {\n tmp = input.nextLine();\n isUTF = tmp.getBytes(\"UTF-8\");\n }\n catch(UnsupportedEncodingException e){\n System.out.println(\"klops\");\n return 0;\n }\n if (wyscount > wysokosc || tmp.length() > szerokosc){\n System.out.println(\"klops\");\n return 0;\n }\n for (int i = 0;i<tmp.length();i++){\n output1[counter][i] = tmp.charAt(i);\n }\n counter++;\n wyscount++;\n }\n int startx = xStart -1;\n int starty = yStart -1;\n //Jezeli punkt startowy to spacja to zaczynamy kolorowanie\n if (output1[startx][starty]==' '){\n output1 = color(output1,kolor,startx,starty);\n }\n //wypisywanie na wyjsciu pokolorwanego obrazka\n for (int i=0;i<wyscount;i++){\n for (int j=0;j<szerokosc;j++){\n System.out.print(output1[i][j]);\n }\n System.out.println();\n }\n }\n else {\n System.out.println(\"klops\");\n return 0;\n }\n }\n else{\n System.out.println(\"klops\");\n return 0;\n }\n return 0;\n }",
"public boolean buscarLetra(char letra) {\n if ( palabra.indexOf(letra,0) == -1 ) { \r\n almacenarErrados(letra); \r\n return false; \r\n }else{ \r\n //Recorremos toda la palabra para reemeplaza el _ por la letra ingresada \r\n int pos = 0; \r\n do { \r\n pos = palabra.indexOf(letra, pos); \r\n if (pos != -1) { \r\n letras[pos] = letra; \r\n pos++; \r\n } \r\n } \r\n while (pos != -1); \r\n } \r\n return true; \r\n }",
"public static void main(String[] args) throws IOException{\n\t\tBufferedReader bf=new BufferedReader(new InputStreamReader(System.in));\n\t\tStringTokenizer st=new StringTokenizer(bf.readLine());\n\t\tint r=Integer.parseInt(st.nextToken());\n\t\tint c=Integer.parseInt(st.nextToken());\n\t\t\n\t\tmap=new char[r+2][c+2];\n\t\tfor(int i=0;i<r+2;i++) {\n\t\t\tfor(int j=0;j<c+2;j++) {\n\t\t\t\tmap[i][j]='.';\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=1;i<1+r;i++) {\n\t\t\tString str=bf.readLine();\n\t\t\tfor(int j=1;j<1+c;j++) {\n\t\t\t\tmap[i][j]=str.charAt(j-1);\n\t\t\t}\n\t\t}\n\t\t\n\t\tfor(int i=1;i<r+1;i++) {\n\t\t\tfor(int j=1;j<c+1;j++) {\n\t\t\t\tif(map[i][j]=='X')\n\t\t\t\t\tafter(i,j);\n\t\t\t}\n\t\t}\n\t\t\n\t\tdelete();\n\t\t\n\t\tfor(int i=minR;i<=maxR;i++) {\n\t\t\tfor(int j=minC;j<=maxC;j++) {\n\t\t\t\tSystem.out.print(map[i][j]);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t}",
"public static void main(String[] args) {\n int[] notas = new int[4];\n //FORMA 1 DE LLENAR EL ARREGLO\n notas[0] = 61;\n notas[1] = 84;\n notas[2] = 60;\n notas[3] = 95;\n // OTRA FORMA DE RELLENAR EL ARREGLO -- NO RECOMENDABLE --\n int[] n = {1, 8, 2, 3, 6, 4, 9, 7, 8, 5, 1, 2, 30};\n //Como acceder a los datos uno por uno\n System.out.println(\"Recorrido uno por uno: \");\n System.out.print(\"Recorrido notas: \");\n System.out.println(notas[2]);\n System.out.print(\"Recorrido de n: \");\n System.out.println(n[11]);\n //TODO JUNTO\n System.out.println(\"Recorrido de notas:\");\n for(int i = 0; i < 4; i++){\n System.out.print(notas[i] + \" \");\n }\n System.out.println(\"\");\n System.out.println(\"Recorrido de n:\");\n for(int i = 0; i < 13; i++){\n System.out.print(n[i] + \" \");\n }\n //---------- CON CHAR ----------\n char[] secciones = new char[3];\n \n secciones[0] = 'A';\n secciones[1] = 'B';\n secciones[2] = 'C';\n char[] s = {'D', 'E', 'F', 'G'};\n \n System.out.println(\"Recorrido uno por uno: \");\n System.out.print(\"Recorrido de secciones: \");\n System.out.println(secciones[1]);\n System.out.print(\"Recorrido de s: \");\n System.out.println(s[2]);\n System.out.println(\"Recorrido de todos\");\n }",
"public static void main(String[] args) {\n\n char[] chars;\n chars = new char[]{};\n\n char[] cc = {};\n\n // Second Approach\n String[] str = {};\n\n String[][] name = {\n {\"id\", \"first_name\", \"last_name\"},\n {\"2303\", \"joel\", \"brown\"}\n };\n // System.out.println(name[1][2]);\n\n for (String[] row : name) {\n for (String col : row) {\n if (col.equalsIgnoreCase(\"joel\"))\n System.out.println(col);\n }\n }\n }",
"public static boolean comienza(String baseDeDatos, String entrada) {\n\t\t/* ENTRADA DE DATOS */\n\t\tString[] cadena;\n\t\tStringTokenizer tokenizerBD = new StringTokenizer(baseDeDatos, \" \");\n\t\tint cantTokensBD = tokenizerBD.countTokens();\n\t\tStringTokenizer tokenizerEntrada = new StringTokenizer(entrada, \" \");\n\t\tint cantTokensEntrada = tokenizerEntrada.countTokens();\n\t\tif (cantTokensEntrada == 0) {\n\t\t\treturn true;\n\t\t} else if (cantTokensEntrada == 1) {\n\t\t\tboolean encontrado = false;\n\t\t\tfor (int j=0; j<cantTokensBD && !encontrado; j++) {\n\t\t\t\tif (tokenizerBD.nextToken().toUpperCase().startsWith(entrada.trim().toUpperCase()) ) {\n\t\t\t\t\tencontrado = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn encontrado;\n\t\t} else {\n\t\t\tboolean encontrado = false;\n\t\t\tcadena = new String[cantTokensBD];\n\t\t\tfor (int i=0; i<cantTokensBD; i++) {\n\t\t\t\tcadena[i] = new String(tokenizerBD.nextToken());\n\t\t\t}\n\t\t\tfor (int j=0; j<(cadena.length-1) && !encontrado; j++) {\n\t\t\t\tString aux = \"\";\n\t\t\t\tfor (int k=j; k<cadena.length; k++) {\n\t\t\t\t\taux += cadena[k]+\" \";\n\t\t\t\t} \n\t\t\t\tencontrado = aux.toUpperCase().startsWith(entrada.trim().toUpperCase());\n\t\t\t}\n\t\t\treturn encontrado;\n\t\t}\n\t}",
"public void confirmar(){\r\n if((gato[0][0]==gato[0][1])&&(gato[0][0]==gato[0][2])&&(gato[0][0]!=' ')){\r\n //si encuentra alguna victoria la variable ganador agarra el simbolo del ganador 'o' o 'x'\r\n //para confirmar quien gano\r\n ganador=gato[0][0];\r\n //es lo que tomara tirar para salir del while si hay una victoria\r\n victoria=1; \r\n \r\n }\r\n\r\n if((gato[1][0]==gato[1][1])&&(gato[1][0]==gato[1][2])&&(gato[1][0]!=' ')){\r\n ganador=gato[1][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[2][0]==gato[2][1])&&(gato[2][0]==gato[2][2])&&(gato[2][0]!=' ')){\r\n ganador=gato[2][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][0]==gato[1][0])&&(gato[0][0]==gato[2][0])&&(gato[0][0]!=' ')){\r\n ganador=gato[0][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][1]==gato[1][1])&&(gato[0][1]==gato[2][1])&&(gato[0][1]!=' ')){\r\n ganador=gato[0][1];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][2]==gato[1][2])&&(gato[0][2]==gato[2][2])&&(gato[0][2]!=' ')){\r\n ganador=gato[0][2];\r\n victoria=1;\r\n }\r\n\r\n if((gato[0][0]==gato[1][1])&&(gato[0][0]==gato[2][2])&&(gato[0][0]!=' ')){\r\n ganador=gato[0][0];\r\n victoria=1;\r\n }\r\n\r\n if((gato[2][0]==gato[1][1])&&(gato[2][0]==gato[0][2])&&(gato[2][0]!=' ')){\r\n ganador=gato[2][0];\r\n victoria=1;\r\n }\r\n }",
"public static void main(String[] args) {\n char[][] board = {\n {\n 'A', 'B', 'C', 'E'\n },\n {\n 'S', 'F', 'C', 'S'\n },\n {\n 'A', 'D', 'E', 'E'\n }\n };\n\n System.out.println(board.length);\n System.out.println(board[0].length);\n\n System.out.println(exist(board, \"ABCCED\"));\n System.out.println(exist(board, \"SEE\"));\n System.out.println(exist(board, \"ABCB\"));\n\n }",
"boolean processFireCmd( String [] s )\n\t{\n\t\tShip ship = this.man.getOpponent(this).getGameBoard().fireMissle(new Position(Integer.parseInt(s[0]), Integer.parseInt(s[1])));\n\t\t\n\t\tif (ship == null) {\n\t\t\tout.println(\"You missed!\");\n\t\t\tout.flush();\n\t\t\treturn false;\n\t\t} else {\n\t\t\tout.println(ship.getName() + \" was hit!\");\n\t\t\tout.flush();\n\t\t\treturn true;\n\t\t}\n\t}",
"public char controlloVerticale(char[][] scacchiera)\n {\n for (int w=0;w<3;w++)\n {\n if (scacchiera[0][w]==scacchiera[1][w]&&scacchiera[1][w]==scacchiera[2][w]) return scacchiera[0][w];\n }\n return ' ';\n }"
] | [
"0.6536941",
"0.5727513",
"0.56863886",
"0.5630256",
"0.5540082",
"0.53973764",
"0.5338983",
"0.52514464",
"0.5211792",
"0.5211568",
"0.51925373",
"0.51902115",
"0.51707137",
"0.51397413",
"0.5123517",
"0.5087006",
"0.5077024",
"0.50757843",
"0.5044421",
"0.5038315",
"0.50263524",
"0.50254375",
"0.50234133",
"0.50157446",
"0.50063396",
"0.49948332",
"0.4991439",
"0.49791363",
"0.49760038",
"0.49638227",
"0.4959368",
"0.4958812",
"0.4951869",
"0.49502635",
"0.49497995",
"0.4933127",
"0.49255356",
"0.49192366",
"0.49154153",
"0.49011692",
"0.48979867",
"0.48971096",
"0.48744753",
"0.48646727",
"0.48619676",
"0.48600817",
"0.48298213",
"0.4815406",
"0.480323",
"0.48015264",
"0.47967964",
"0.47962332",
"0.47946164",
"0.47896922",
"0.47826427",
"0.47820473",
"0.47818413",
"0.47731465",
"0.47545993",
"0.47503078",
"0.47467816",
"0.47425085",
"0.47335413",
"0.47298324",
"0.47266552",
"0.47212225",
"0.47197306",
"0.4709642",
"0.47075057",
"0.47071645",
"0.47062117",
"0.4703893",
"0.47020927",
"0.4696108",
"0.46931016",
"0.46892747",
"0.46888041",
"0.4685282",
"0.46845472",
"0.46815524",
"0.46745783",
"0.46720123",
"0.46666276",
"0.46641368",
"0.46610108",
"0.46555015",
"0.4655375",
"0.46476683",
"0.46435422",
"0.46405873",
"0.46364248",
"0.46335152",
"0.46273616",
"0.4626127",
"0.46240458",
"0.4622868",
"0.46205622",
"0.4617859",
"0.461401",
"0.46136174"
] | 0.47196507 | 67 |
TODO Autogenerated method stub | @Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
Logger.d(TAG, "onCreate.....");
setContentView(R.layout.mv_video_details);
context = this;
dao = new VodDao(this);
initData();
initView();
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onStart() {
super.onStart();
Logger.d(TAG, "onStart.....");
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onStop() {
super.onStop();
closeProgressDialog();
if(null!=mQueue){
mQueue.stop();
}
overridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out);
Logger.d(TAG, "onStop.....");
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onPause() {
super.onPause();
Logger.d(TAG, "onStop.....");
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onDestroy() {
super.onDestroy();
if(null!=mQueue){
mQueue.cancelAll(this);
}
Logger.d(TAG, "onDestroy.....");
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
protected void onResume() {
Logger.v(TAG, " onResume()获取的videoId="+videoId);
if(null!=videoId){
albums = dao.queryAlbumById(videoId,2);
if(null!=albums && albums.size()>0){
album = albums.get(0);
}
if(null!=album){
b_details_replay.setVisibility(View.VISIBLE);
b_details_replay.requestFocus();
Logger.v(TAG, "onResume()续播playIndex=="+album.getPlayIndex()+"...collectionTime=="+album.getCollectionTime());
}
}
super.onResume();
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onItemClick(AdapterView<?> parent, View view,
int position, long id) {
ArrayList<VideoInfo> videoinfo = new ArrayList<VideoInfo>();
for(int i = 0;i<now_source.size();i++){
VideoInfo vinfo = new VideoInfo();
vinfo.title = now_source.get(i).getTitle();
vinfo.url = now_source.get(i).getUrl();
videoinfo.add(vinfo);
}
if(null!=videoinfo&&videoinfo.size()>0){
Intent intent = null;
intent = new Intent(VodDetailsActivity.this,WebVideoPlayerActivity.class);
// if(null!=domain && domain.contains("pps")||domain.contains("qiyi")){
// intent = new Intent(VodDetailsActivity.this,MeidaActivity.class);
// }else{
// intent = new Intent(VodDetailsActivity.this,VideoPlayerActivity.class);
// }
intent.putParcelableArrayListExtra("videoinfo",videoinfo);//数据集合
intent.putExtra("albumPic",albumPic);//图片路径
intent.putExtra("vodtype", vodtype);//影片类型
intent.putExtra("vodstate", vodstate);//影片情势
intent.putExtra("nextlink", nextlink);
intent.putExtra("videoId", videoId);//影片ID
intent.putExtra("vodname", vodname);//电影的名字
intent.putExtra("sourceId", sourceId);//源id
intent.putExtra("domain", domain);//domain
intent.putExtra("playIndex",gv_postion*10+position);//剧集标
startActivity(intent);
overridePendingTransition(android.R.anim.fade_in,android.R.anim.fade_out);
}else{
Utils.showToast(context,
"对不起!没有找到数据源,请切换其它源。",
R.drawable.toast_err);
}
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub super.onBackPressed(); | @Override
public void onBackPressed() {
if(details_key_arts.getVisibility()==View.VISIBLE||details_video_introduce.getVisibility()==View.VISIBLE){
details_video_introduce.setVisibility(View.GONE);
details_key_arts.setVisibility(View.GONE);
details_recommend.setVisibility(View.VISIBLE);
}else{
finish();
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\n\t\t\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\t\n\t}",
"@Override\n public void onBackPressed()\n {\n super.onBackPressed();\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\treturn;\n\t}",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n\n }",
"@Override\n\tpublic void onBackPressed() {\n\n\t}",
"@Override\n\tpublic void onBackPressed()\n\t\t{\n\t\tbackPressed();\n\t\t}",
"@Override\r\n public void onBackPressed() {\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\r\n\t\tdoBack();\r\n\t}",
"@Override\n\tpublic void onBackPressed()\n\t{\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tBack();\n\t}",
"@Override\n public void onBackPressed() {\n //super.onBackPressed();\n goBack();\n }",
"@Override\n public void onBackPressed() {\n\n\n super.onBackPressed();\n\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tfinish();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tfinish();\n\t}",
"@Override\n \tpublic void onBackPressed() {\n \t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tthis.finish();\n\t\tsuper.onBackPressed();\n\t}",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\n public void onBackPressed() {\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\r\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\treturn;\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\tthis.finish();\n\t}",
"@Override\n\tpublic void onBackPressed() {\n\t\tsuper.onBackPressed();\n\t\t finish();\n\t}",
"@Override\n public void onBackPressed() {}",
"@Override\n public void onBackPressed()\n {\n\n }",
"@Override\n public void onBackPressed() {\n backToHome();\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n finish();\n }",
"@Override\n public void onBackPressed()\n {\n mIsBackButtonPressed = true;\n super.onBackPressed();\n \n }",
"@Override\n public void onBackPressed() { }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n this.finish();\n }",
"@Override\n public void onBackPressed() {\n super.onBackPressed();\n this.finish();\n }",
"public void onBackPressed() {\r\n }",
"public void onActivityBackPressed() {\n super.onBackPressed();\n }",
"@Override\n\tpublic void onBackPressed() {\n\t\treturn;\n\t}",
"@Override\n public void onBackPressed() {\n return;\n // super.onBackPressed();\n }",
"@Override\n public void onBackPressed() {\n return;\n //super.onBackPressed();\n }",
"public void onBackPressed() {\n backbutton();\n }",
"@Override\n public void onBackPressed() {\n //super.onBackPressed();\n finish();\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tfinish();\r\n\t}",
"@Override\n public void onBackPressed() {\n return;\n }",
"@Override\n public void onBackPressed() {\n return;\n }",
"@Override\n public void onBackPressed() {\n return;\n }",
"@Override\n public void onBackPressed() {\n return;\n }",
"@Override\n public void onBackPressed(){\n }",
"@Override\n public void onBackPressed() {\n Intent intent = getIntent();\n setResult(0,intent);\n\n super.onBackPressed();\n }",
"public void onBackPressed()\n {\n }",
"@Override\r\n public void onBackPressed() {\n setResult(Activity.RESULT_OK);\r\n this.finish();\r\n super.onBackPressed();\r\n }",
"@Override\n public void onBackPressed() {\n LogHelper.logD(TAG, \"onBackPressed called\");\n }",
"@Override\n public void onBackPressed() {\n\n finish();\n }",
"@Override\n public void onBackPressed() {\n return;\n }",
"@Override\r\n\tpublic void onBackPressed() {\n\t\tbackButtonHandler();\r\n\t\treturn;\r\n\t}",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n public void onBackPressed() {\n finish();\n }",
"@Override\n // Detect when the back button is pressed\n public void onBackPressed() {\n\n // Let the system handle the back button\n\n super.onBackPressed();\n\n }",
"@Override\n public void onBackPressed(){\n System.out.println(\"---------------- No debe hacer nada -------------------------------\");\n }",
"@Override\n public void onBackPressed() {\n this.finish();\n }"
] | [
"0.94022256",
"0.9347428",
"0.9347428",
"0.9328113",
"0.9328113",
"0.9328113",
"0.9328113",
"0.9328113",
"0.9328113",
"0.9328113",
"0.9328113",
"0.9242811",
"0.9242811",
"0.9242811",
"0.9242811",
"0.9242811",
"0.9242811",
"0.9242811",
"0.9241805",
"0.92210436",
"0.9175143",
"0.9169442",
"0.91639423",
"0.91604483",
"0.9155039",
"0.9153677",
"0.9147902",
"0.91313046",
"0.91313046",
"0.91313046",
"0.91313046",
"0.9130738",
"0.9118005",
"0.9106393",
"0.90993714",
"0.90993714",
"0.9067692",
"0.9067692",
"0.9067692",
"0.90643054",
"0.90573215",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90547806",
"0.90478235",
"0.90478235",
"0.90476424",
"0.9046881",
"0.9040943",
"0.90397805",
"0.90250295",
"0.9023374",
"0.9016731",
"0.90111065",
"0.90035594",
"0.8987927",
"0.8987927",
"0.8983487",
"0.8967352",
"0.89405894",
"0.89333713",
"0.89312375",
"0.89243203",
"0.89205235",
"0.89168274",
"0.89168274",
"0.8909833",
"0.8909833",
"0.8909833",
"0.8909833",
"0.89033115",
"0.8886571",
"0.8885051",
"0.88616705",
"0.88600343",
"0.88239914",
"0.8822415",
"0.880601",
"0.88034374",
"0.88034374",
"0.88034374",
"0.88034374",
"0.88034374",
"0.88034374",
"0.88034374",
"0.88022757",
"0.87955177",
"0.8791134"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
if(null!=videoId){
Boolean b = dao.queryZJById(videoId, 1);
if(b){
dao.deleteByWhere(videoId, vodtype, 1);
b_details_favicon.setBackgroundResource(R.drawable.video_details_favicon_selector);
Utils.showToast(VodDetailsActivity.this, "取消收藏成功!", R.drawable.toast_smile);
}else{
Album al = new Album();
al.setAlbumId(videoId);
al.setAlbumType(vodtype);
al.setTypeId(1);
al.setAlbumState(vodstate);
al.setNextLink(nextlink);
al.setAlbumPic(albumPic);
al.setAlbumTitle(vodname);
dao.addAlbums(al);
b_details_favicon.setBackgroundResource(R.drawable.video_details_yifavicon_selector);
Utils.showToast(VodDetailsActivity.this, "收藏成功!", R.drawable.toast_smile);
}
}
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
if(null!=videoId){
Boolean b = dao.queryZJById(videoId, 0);
if(b){
dao.deleteByWhere(videoId, vodtype, 0);
b_details_colection.setBackgroundResource(R.drawable.video_details_zhuiju_selector);
Utils.showToast(VodDetailsActivity.this, "取消追剧成功!", R.drawable.toast_smile);
}else{
Album al = new Album();
al.setAlbumId(videoId);
al.setAlbumType(vodtype);
al.setAlbumState(vodstate);
al.setNextLink(nextlink);
al.setTypeId(0);
al.setAlbumPic(albumPic);
al.setAlbumTitle(vodname);
dao.addAlbums(al);
b_details_colection.setBackgroundResource(R.drawable.video_details_yizhuiju_selector);
Utils.showToast(VodDetailsActivity.this, "追剧成功!", R.drawable.toast_smile);
}
}
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onClick(View v) {
if(details_video_introduce.getVisibility()==View.VISIBLE){
details_video_introduce.setVisibility(View.GONE);
details_recommend.setVisibility(View.VISIBLE);
details_key_arts.setVisibility(View.GONE);
}else{
details_key_arts.setVisibility(View.GONE);
details_video_introduce.setVisibility(View.VISIBLE);
details_recommend.setVisibility(View.GONE);
}
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}",
"@Override\n\tpublic void comer() {\n\t\t\n\t}",
"@Override\n public void perish() {\n \n }",
"@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}",
"@Override\n\tpublic void anular() {\n\n\t}",
"@Override\n\tprotected void getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onLoadingStarted(String arg0, View arg1) {
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onLoadingFailed(String arg0, View arg1, FailReason arg2) {
Drawable drawable = iv_details_poster.getDrawable();
Bitmap bitmap = ImageUtil.drawableToBitmap(drawable);
Bitmap bit = Reflect3DImage.skewImage(bitmap, 60);
iv_details_poster.setImageBitmap(bit);
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onLoadingComplete(String arg0, View arg1, Bitmap arg2) {
Drawable drawable = iv_details_poster.getDrawable();
Bitmap bitmap = ImageUtil.drawableToBitmap(drawable);
Bitmap bit = Reflect3DImage.skewImage(bitmap, 60);
iv_details_poster.setImageBitmap(bit);
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
TODO Autogenerated method stub | @Override
public void onLoadingCancelled(String arg0, View arg1) {
Drawable drawable = iv_details_poster.getDrawable();
Bitmap bitmap = ImageUtil.drawableToBitmap(drawable);
Bitmap bit = Reflect3DImage.skewImage(bitmap, 60);
iv_details_poster.setImageBitmap(bit);
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
Find Resources containing nameFragment in their name. | public List<Resource> findByNameContaining(String nameFragment) {
Map<String, Object> nameFilter = new HashMap<>();
nameFilter.put("name", new ValueParameter("%" + nameFragment + "%"));
return this.filter(nameFilter);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"PersonFinder whereNameContains(String fragment);",
"public String getName(String name) {\n return myResources.getString(name);\n }",
"public ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> namedParts = FXCollections.observableArrayList();\n for ( Part part : allParts ) {\n if(part.getName().toLowerCase().contains(partName.toLowerCase())) {\n namedParts.add(part);\n }\n }\n return namedParts;\n }",
"private boolean examineName(String name) {\r\n resourceName = null;\r\n resourceIsClass = false;\r\n\r\n if (name.endsWith(\".java\")) {\r\n return false;\r\n }\r\n\r\n if (name.endsWith(\".class\")) {\r\n name = name.substring(0, name.length() - 6);\r\n if (classMap.containsKey(name)) {\r\n return false;\r\n }\r\n resourceIsClass = true;\r\n } else {\r\n if (resourceMap.containsKey(name)) {\r\n return false;\r\n }\r\n }\r\n\r\n resourceName = name;\r\n return true;\r\n }",
"public static Fragment getFragmentWithName(Fragment rootFragment,\n String name) {\n if (rootFragment.getName() != null\n && rootFragment.getName().equals(name)) {\n return rootFragment;\n }\n for (Fragment child : rootFragment.getChilds()) {\n Fragment correctFragment = RosebudHelper.getFragmentWithName(child,\n name);\n if (correctFragment != null) {\n return correctFragment;\n }\n }\n throw new RuntimeException(\"Fragment with name \" + name + \" not found\");\n }",
"public String searchByName(String name){\n for(Thing things: everything){\n if(things.getName().equalsIgnoreCase(name)){\n return things.toString();\n }\n }\n return \"Cannot Find given Name\";\n }",
"protected Set locateBlock(final String blockName) {\n Set matches = new java.util.HashSet();\n for (Iterator it = blocks.keySet().iterator(); it.hasNext(); ) {\n Object b = it.next();\n if (b.toString().endsWith('.' + blockName)) {\n matches.add(b);\n }\n }\n return matches;\n }",
"@SuppressWarnings(\"unchecked\")\t\r\n\tpublic S[] getResourceByName(String name) {\r\n\t\tList<S> returnResourcesList = new LinkedList<S>();\r\n\t\tfor (S resource : this.resourcesList) {\r\n\t\t\tif (resource.getName().equals(name)) {\r\n\t\t\t\treturnResourcesList.add(resource);\r\n\t\t\t}\r\n\t\t}\t\r\n\t\treturn (S[])returnResourcesList.toArray(new Resource[0]);\t\t\t\t\r\n\t}",
"public static ObservableList<Part> lookupPart(String partName) {\n ObservableList<Part> partsContainingSubstring = FXCollections.observableArrayList();\n\n // The for loop variable to the left of the colon is a temporary variable containing a single element from the collection on the right\n // With each iteration through the loop, Java pulls the next element from the collection and assigns it to the temp variable.\n for (Part currentPart : Inventory.getAllParts()) {\n if (currentPart.getName().toLowerCase().contains(partName.toLowerCase())) {\n partsContainingSubstring.add(currentPart);\n }\n }\n return partsContainingSubstring;\n }",
"public int search (String name) {\n int result = -1;\n int offset = 0;\n\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].indexOf (name);\n if (result == -1)\n offset += q[i].size ();\n qLock[i].unlock ();\n if (result != -1)\n break;\n }\n\n if (result == -1)\n return result;\n\n return result + offset;\n }",
"private Composite seekLocalName(Composite composite, String name) {\n Optional<Composite> find = composite.find(childComposite -> {\n if (childComposite == null) {\n return false;\n }\n\n return childComposite.getName() != null && childComposite.getName().equals(name);\n }, FindMode.childrenOnly).stream().findFirst();\n\n if (find.isPresent()) {\n return find.get();\n } else {\n return null;\n }\n }",
"public Enumeration getResourceLocations( String name );",
"public List<Eetakemon> findEetakemonContain(String name){\n List<Eetakemon>resultlist = new ArrayList<Eetakemon>();\n for (String key: eetakemonmap.keySet()){\n Eetakemon e = eetakemonmap.get(key);\n if(e.getName().contains(name)){\n resultlist.add(e);\n }\n }\n return resultlist;\n }",
"protected URL convertedFindResource(String name) {\n ServiceReference reference = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());\n PackageAdmin packageAdmin = (PackageAdmin) bundle.getBundleContext().getService(reference);\n try {\n List<URL> resources = findResources(packageAdmin, bundle, name, false);\n if (resources.isEmpty() && isMetaInfResource(name)) {\n LinkedHashSet<Bundle> wiredBundles = getWiredBundles();\n Iterator<Bundle> iterator = wiredBundles.iterator();\n while (iterator.hasNext() && resources.isEmpty()) { \n Bundle wiredBundle = iterator.next();\n resources = findResources(packageAdmin, wiredBundle, name, false);\n }\n }\n return (resources.isEmpty()) ? null : resources.get(0);\n } catch (Exception e) {\n return null;\n } finally {\n bundle.getBundleContext().ungetService(reference);\n }\n }",
"public boolean match(String name) {\n\t\tboolean result = false;\n\n\t\tif (this.entries != null) {\n\t\t\tname = name.replace('/', '.');\n\t\t\tname = name.replaceFirst(\"^[.]+\", \"\");\n\t\t\tname = name.replaceAll(\"\\\\$.*$\", \"\");\n\n\t\t\tfor (Entry entry : this.entries) {\n\t\t\t\tif (entry != null) {\n\t\t\t\t\tif (entry.partial) {\n\t\t\t\t\t\tif (name.startsWith(entry.classpath)) {\n\t\t\t\t\t\t\tresult = entry.result;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif (name.equals(entry.classpath)) {\n\t\t\t\t\t\t\tresult = entry.result;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn result;\n\t}",
"public ProgramFragment getFragment(String treeName, String name);",
"public static int getResId(@NonNull String name) {\n Integer resId = map.get(name);\n if(resId != null) return resId;\n else return R.drawable.ic_help_circle;\n }",
"private static PsiFile resolveLayoutResourceFile(PsiElement element, Project project, String name) {\n Module module = ModuleUtil.findModuleForPsiElement(element);\n PsiFile[] files = null;\n if (module != null) {\n GlobalSearchScope moduleScope = module.getModuleWithDependenciesAndLibrariesScope(false);\n files = FilenameIndex.getFilesByName(project, name, moduleScope);\n }\n if (files == null || files.length <= 0) {\n // fallback to search through the whole project\n // useful when the project is not properly configured - when the resource directory is not configured\n files = FilenameIndex.getFilesByName(project, name, new EverythingGlobalScope(project));\n if (files.length <= 0) {\n return null; //no matching files\n }\n }\n\n // TODO - we have a problem here - we still can have multiple layouts (some coming from a dependency)\n // we need to resolve R class properly and find the proper layout for the R class\n return files[0];\n }",
"public FileObject findResource(String name) {\n Enumeration en = getFileSystems ();\n while (en.hasMoreElements ()) {\n FileSystem fs = (FileSystem)en.nextElement ();\n FileObject fo = fs.findResource(name);\n if (fo != null) {\n // object found\n return fo;\n }\n }\n return null;\n }",
"@Nullable\n PsiElement findExportedName(String name);",
"public Part lookupPart(String partName) {\n for(Part part : allParts) {\n if(part.getName().equals(partName)) {\n return part;\n }\n }\n \n return null;\n }",
"protected Enumeration<URL> convertedFindResources(String name) throws IOException {\n ServiceReference reference = bundle.getBundleContext().getServiceReference(PackageAdmin.class.getName());\n PackageAdmin packageAdmin = (PackageAdmin) bundle.getBundleContext().getService(reference);\n try {\n List<URL> resources = findResources(packageAdmin, bundle, name, true);\n if (isMetaInfResource(name)) {\n LinkedHashSet<Bundle> wiredBundles = getWiredBundles();\n for (Bundle wiredBundle : wiredBundles) {\n resources.addAll(findResources(packageAdmin, wiredBundle, name, true));\n }\n }\n return Collections.enumeration(resources);\n } catch (Exception e) {\n throw (IOException) new IOException(\"Error discovering resources: \" + e).initCause(e);\n } finally {\n bundle.getBundleContext().ungetService(reference);\n }\n }",
"public int FindByName(String _name)\n\t{\n\t\tint res = -1;\n\n\t\tfor (int i = 0; i < this.materials.size(); i++)\n\t\t{\n\t\t\tif (this.materials.get(i).name.equalsIgnoreCase(_name))\n\t\t\t{\n\t\t\t\tres = i;\n\t\t\t}\n\t\t}\n\n\t\treturn res;\n\t}",
"public static int getResourceByString( Context context, String resourceType, String name ) {\n int resource = 0;\n\n try {\n resource = context.getResources()\n .getIdentifier( name, resourceType, context.getPackageName() );\n } catch ( Exception e ) {\n e.printStackTrace();\n }\n\n return resource;\n }",
"public String getS(String name){\t\n\t\t\n\t\tString packageName = activity.getPackageName();\n\t\tint resId = activity.getResources().getIdentifier(name, \"string\", packageName);\n\t\treturn activity.getString(resId);\n\t\t \n\t}",
"public ArrayList<NameRecord> getMatches(String partialName){\n\t\tpartialName=partialName.toLowerCase();\n\t\tArrayList<NameRecord> result = new ArrayList<NameRecord>();\n\t\tfor (int i = 0;i<names.size();i++){\n\t\t\tString s = names.get(i).toLowerCase();\n\t\t\tif (s.contains(partialName)){\n\t\t\t\tresult.add(list.get(i));\n\t\t\t}\n\t\t}\t\n\t\treturn result;\n\t}",
"public static List<Vacina> searchByName(SQLiteDatabase db, String name)\n {\n // TODO: esse método vai pesquisar todos os itens cujo nome possui o texto indicado\n return null;\n }",
"protected URL findResource(String name)\n\t{\n\t\tObject entryImg = m_entries.get(name);\n\t\t\n\t\t/* Return null when not found */\n\t\tif (entryImg == null)\n\t\t\treturn null;\n\n\t\ttry \n\t\t{\n\t\t\tURL url = new URL(\"jar\",\n\t\t\t\t\t\t\t m_url.getHost(),\n\t\t\t\t\t\t\t \"file:\" + m_url.getPath() + \"!/\" + name);\n\t\t\treturn url;\n\t\t}\n\t\tcatch (MalformedURLException e)\n\t\t{\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}",
"List<MaterialAsset> findUnboundAssetPlaceholders();",
"abstract boolean matchesResourceName( String resourceName );",
"public static ArrayList<Vacinacao> searchByName(SQLiteDatabase db, String name)\n {\n // TODO: esse método vai pesquisar todos os itens cujo nome possui o texto indicado\n return null;\n }",
"public String resolve(final String name) {\n return name.length() > pathLength ? pathLength > 0 ? name.substring(pathLength) : name : null;\n }",
"IIndexFragmentBinding[] findBindings(char[] name, boolean filescope, IndexFilter filter, IProgressMonitor monitor) throws CoreException;",
"public void searchByName(String name) {\n\t\ttry {\n\t\t\tBufferedReader reader = new BufferedReader(new FileReader(\"./src/data/contactInfo.text\"));\n\t\t\tString line;\n\t\t\twhile((line = reader.readLine()) != null){\n\t\t\t\tif(line.toLowerCase().contains(name.toLowerCase())) {\n\t\t\t\t\tSystem.out.println(line);\n\t\t\t\t}\n\t\t\t}\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}",
"public abstract String filterLibraryName(final String name);",
"public static LinkedList<Actor> nameSearch(String name) {\n //sets name to lower case\n String hname = name.toLowerCase();\n //hashes the lower cased name\n int hash = Math.abs(hname.hashCode()) % ActorList.nameHashlist.length;\n //finds the location of the linked list\n LinkedList<Actor> location = ActorList.nameHashlist[hash];\n //sets the head to the head of the linked list\n LinkedList.DataLink head = location.header;\n\n\n while (head.nextDataLink != null) {\n //runs until next data link is null and gets each Actor\n Actor actor = (Actor) head.nextDataLink.data;\n //checks the name of the actor to inputted name\n if (actor.getName().toLowerCase().equals(hname)) {\n //if it's the same it returns the actor\n return location;\n //or moves to next link\n } else {\n head = head.nextDataLink;\n }\n }\n //returns null if the list does not match input\n return null;\n\n\n }",
"@SuppressWarnings(\"unchecked\")\n\tpublic Enumeration<URL> findResources(String name) throws IOException\n\t{\n\t\tList<URL> urlList = null;\n\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not found locally, attempting remote lookup\");\n\t\ttry\n\t\t{\n\t\t\tLOCK.lock();\n\t\t\tList<String> locationsList = cache.getResourcesLocations(name);\n\t\t\tif (locationsList == null)\n\t\t\t{\n\t\t\t\tMap<String, Object> map = new HashMap<String, Object>();\n\t\t\t\tmap.put(\"name\", name);\n\t\t\t\tmap.put(\"multiple\", \"true\");\n\t\t\t\tJPPFResourceWrapper resource = loadResourceData(map, true);\n\t\t\t\tList<byte[]> dataList = (List<byte[]>)resource.getData(\"resource_list\");\n\t\t\t\tboolean found = (dataList != null) && !dataList.isEmpty();\n\t\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] \" + (found ? \"\" : \"not \") + \"found remotely\");\n\t\t\t\tif (found)\n\t\t\t\t{\n\t\t\t\t\tcache.registerResources(name, dataList);\n\t\t\t\t\turlList = new ArrayList<URL>();\n\t\t\t\t\tlocationsList = cache.getResourcesLocations(name);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (locationsList != null)\n\t\t\t{\n\t\t\t\tfor (String path: locationsList)\n\t\t\t\t{\n\t\t\t\t\tFile file = new File(path);\n\t\t\t\t\tif (urlList == null) urlList = new ArrayList<URL>();\n\t\t\t\t\turlList.add(file.toURI().toURL());\n\t\t\t\t}\n\t\t\t\tif (debugEnabled) log.debug(\"found the following URLs for resource [\" + name + \"] : \" + urlList);\n\t\t\t}\n\t\t}\n\t\tcatch(IOException e)\n\t\t{\n\t\t\tthrow e;\n\t\t}\n\t\tcatch(Exception e)\n\t\t{\n\t\t\tif (debugEnabled) log.debug(\"resource [\" + name + \"] not found remotely\");\n\t\t}\n\t\tfinally\n\t\t{\n\t\t\tLOCK.unlock();\n\t\t}\n\t\treturn urlList == null ? null : new IteratorEnumeration<URL>(urlList.iterator());\n\t}",
"final String getResourceName(int resid) {\n if (am == null)\n return null;\n ResTable.resource_name name = new ResTable.resource_name(null, null, null);\n if (!am.getResources(false).getResourceName(resid, name)) {\n return null;\n }\n String str = null;\n if (name.mPackage != null) {\n str = name.mPackage;\n }\n\n if (name.mType != null) {\n if (str.length() > 0) {\n str += \":\";\n }\n str += name.mType;\n }\n\n if (name.mName != null) {\n if (str.length() > 0) {\n str += \"/\";\n }\n str += name.mName;\n }\n\n return str;\n }",
"public boolean contains(@NonNull String name) {\n SharedPreferences prefs = context.getSharedPreferences(filename, Context.MODE_PRIVATE);\n return prefs != null && prefs.contains(name);\n }",
"public String searchPerson(String name){\n String string = \"\";\n ArrayList<Person> list = new ArrayList<Person>();\n \n for(Person person: getPersons().values()){\n String _name = person.getName();\n if(_name.contains(name)){\n list.add(person);\n }\n }\n list.sort(Comparator.comparing(Person::getName));\n for (int i = 0; i < list.size(); i++){\n string += list.get(i).toString();\n }\n\n return string;\n }",
"public static Texture get(String name){\n for(TextureHandler t : textures){\n if(t.getName().toLowerCase().equals(name.toLowerCase())){\n return t.getTexture();\n }\n }\n return error;\n }",
"public static int getResourceByName(Context context, String resource_name) {\n\n String final_name = resource_name.toLowerCase().equals(\"bangalore\") ? \"bengaluru\" : resource_name.replace(\" \", \"_\").toLowerCase();\n\n return context.getResources().getIdentifier(final_name, \"drawable\", context.getPackageName());\n }",
"public static List<Stop> findStop(String name) {\n List<Stop> matchingStops = new ArrayList<>();\n String pattern = \"(?i)(.*)\" + name + \"(.*)\";\n for (Stop s : getAllStops()) {\n if (s.getName().matches(pattern)) {\n matchingStops.add(s);\n }\n }\n return matchingStops;\n }",
"public Element findByName(String name) {\n for (Element element : this){\n if (element.getName().equals(name)) return element;\n }\n return null;\n }",
"Tag findByName(String name);",
"public static void findNameAndindex(List<String> list1, String name){\n\t\tboolean found = false;\n\t\tfor(String s: list1){\n\t\t\tif(s.contains(name)){\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Found \" + s + \" at index \" + list1.indexOf(name));\n\t\t\t\tfound = true;\n\t\t\t}\t\t\n\t\t}\n\t\tif(!found)\n\t\t\tJOptionPane.showMessageDialog(null, \"Name not found\");\n\t\t\n\t}",
"public Closure find_var(String name){\n Closure currentClosure = this;\n while (currentClosure != null){\n if (currentClosure.contains(name)){\n return currentClosure;\n }\n currentClosure = currentClosure.getParent();\n }\n throw new UndefinedVariable();\n }",
"@Override\n public Component find(String name) throws ItemNotFoundException {\n if(this.getName().equals(name))\n return this;\n\n for(Component c : children)\n try {\n return c.find(name);\n } catch (ItemNotFoundException e) {\n continue;\n }\n\n throw new ItemNotFoundException(\"\\\"\" + name + \" not found in \" + this.getName());\n }",
"@Override\n\tpublic String findId(String name) throws Exception {\n\t\treturn null;\n\t}",
"public List<Stop> findStopsByName(String name) {\n return stops.values()\n .stream()\n .filter(stop -> stop.getName().toLowerCase(Locale.ROOT).contains(name.toLowerCase(Locale.ROOT)))\n .collect(Collectors.toCollection(() -> new TiraArrayList<>()));\n }",
"public List<Student> searchStudent(String name) {\n List<Student> studentList = new ArrayList<>();\n Cursor cursor = sqLiteDatabase.rawQuery(\"SELECT * FROM Students WHERE name = ? \", new String[]{name});\n while (cursor.moveToNext()) {\n Student student = new Student(cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_NAME)),\n cursor.getString(cursor.getColumnIndex(DatabaseHelper.STUDENT_ADDRESS)),\n cursor.getInt(cursor.getColumnIndex(DatabaseHelper.ID)));\n studentList.add(student);\n }\n return studentList;\n }",
"public Symbol findEntryLocal(String name){\n\t\tList<SymbolEntry> l = symbolMap.get(name);\n\t\tif(l == null || (l.get(0).level < scopeLevel))\n\t\t\treturn null;\n\t\treturn l.get(0).symbol;\n\t}",
"String getResourceName();",
"public Movie findMovie(String name){\n\n Movie find = null ;\n\n for (Movie movie :movies) {\n\n if(movie.getTitle().equals(name)){\n\n find = movie;\n\n }\n\n }\n\n return find;\n\n }",
"public ArrayList<TakeStock> findMemberByName(String name) {\n\n matches.clear();\n\n for(TakeStock member : mTakeStockList) {\n\n if(member.getProducts_name().toLowerCase().contains(name)){\n matches.add(member);\n }\n\n }\n return matches; // return the matches, which is empty when no member with the given name was found\n }",
"private boolean contains(String name, AssassinNode current) {\n while (current != null) {\n if (current.name.equalsIgnoreCase(name)) {\n return true;\n } else {\n current = current.next;\n }\n }\n return false;\n }",
"public Text getByName(String name){\r\n\t\tfor (int i=0;i<thisDialog.size();i++){\r\n\t\t\tif (thisDialog.get(i).getName().equals(name)){\r\n\t\t\t\treturn thisDialog.get(i);\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn null;\r\n\t}",
"private int[] searchNamedEntity(String namedEntity, String name) {\n int[] result = null;\n if (namedEntity.toLowerCase().contains(name.toLowerCase()) && name.length() != 0) {\n result = new int[2];\n int begin = namedEntity.indexOf(name);\n int end = begin + name.length();\n \n result[0] = begin;\n result[1] = end;\n \n // Check to make sure results are valid\n if (begin < 0 || end < 0 || end < begin) {\n return null;\n }\n }\n \n return result;\n }",
"public int indexOf(String name, int start) {\n\t\tint sz = size();\n\t\tfor (int i = start; i < sz; i++) {\n\t\t\tString n = getName(i);\n\t\t\tif (name == null) {\n\t\t\t\tif (n == null)\n\t\t\t\t\treturn i; // matched null\n\t\t\t} else if (name.equals(n)) {\n\t\t\t\treturn i;\n\t\t\t}\n\t\t}\n\t\treturn -1;\n\t}",
"private Pattern fileNameMatch(final String name) {\n final StringBuilder sb = new StringBuilder(name.length());\n for (int i = 0; i < name.length(); i++) {\n final char c = name.charAt(i);\n if (c == '.') {\n sb.append('\\\\').append('.');\n } else if (c == '?') {\n sb.append('.');\n } else if (c == '*') {\n sb.append('.').append('*').append('?');\n } else {\n sb.append(c);\n }\n }\n return Pattern.compile(sb.toString(), Pattern.CASE_INSENSITIVE);\n }",
"boolean contains(String name);",
"private Resource lookForMovieResource(String movieName) {\n\t\t// initialize foundPlace by null.\n\t\tResource foundPlace = null;\n\t\tfoundPlace = searchMovieOnLinkedMDB(movieName);\n\t\tif (foundPlace == null) {\n\t\t\tfoundPlace = searchSimilarityByLabel(movieName,\n\t\t\t\t\tgetAllMovieQuerySolutions(), \"movie\");\n\t\t}\n\t\treturn foundPlace;\n\t}",
"public Handle search(String name) {\n int homePos = hash(table, name);\n int pos;\n\n // QUADRATIC PROBE\n for (int i = 0; i < table.length; i++) {\n // possibly iterate over entire table, but will\n // likely stop before then\n pos = (homePos + i * i) % table.length;\n if (table[pos] == null) {\n break;\n }\n else if (table[pos] != GRAVESTONE\n && table[pos].getStringAt().equals(name)) {\n return table[pos];\n }\n } // end for\n\n return null;\n }",
"public abstract String getFragmentName();",
"public Person find(String name) {\n\t\tfor (Person person : listOfPeople) {\n\t\t\tif(person.getName().contains(name)) {\n\t\t\t\treturn person;\n\t\t\t}\n\t\t}\n\t\treturn null; // only reached if person with name not found by search.\n\t}",
"private String getName(String name) {\n\t\tint n;\n\t\tif (name.startsWith(\"place_\")) {\n\t\t\tn = Integer.parseInt(name.substring(6));\n\t\t} else if (name.startsWith(\"t_\")) {\n\t\t\tn = Integer.parseInt(name.substring(2));\n\t\t} else {\n\t\t\treturn name;\n\t\t}\n\t\tif (n < net.getPlaces().size()) {\n\t\t\tPlace p = (Place) net.getPlaces().get(n);\n\t\t\treturn \"Place \" + p.getIdentifier();\n\t\t}\n\t\tn -= net.getPlaces().size();\n\t\tn--;\n\t\tif (n < net.getTransitions().size()) {\n\t\t\tTransition t = (Transition) net.getTransitions().get(n);\n\t\t\treturn \"Transition \" + t.getIdentifier();\n\t\t}\n\t\treturn name;\n\t}",
"String getName( String name );",
"@NotNull\n public static List<PsiNamedElement> findDefinitionNode(@NotNull Project project, @Nullable String name, @Nullable PsiNamedElement e) {\n // Guess where the name could be defined by lookup up potential modules.\n final Set<String> potentialModules =\n e == null ? Collections.EMPTY_SET\n : getPotentialDefinitionModuleNames(e, HaskellPsiUtil.parseImports(e.getContainingFile()));\n List<PsiNamedElement> result = ContainerUtil.newArrayList();\n final String qPrefix = e == null ? null : getQualifiedPrefix(e);\n final PsiFile psiFile = e == null ? null : e.getContainingFile().getOriginalFile();\n if (psiFile instanceof HaskellFile) {\n findDefinitionNode((HaskellFile)psiFile, name, e, result);\n }\n for (String potentialModule : potentialModules) {\n List<HaskellFile> files = HaskellModuleIndex.getFilesByModuleName(project, potentialModule, GlobalSearchScope.allScope(project));\n for (HaskellFile f : files) {\n final boolean returnAllReferences = name == null;\n final boolean inLocalModule = f != null && qPrefix == null && f.equals(psiFile);\n final boolean inImportedModule = f != null && potentialModules.contains(f.getModuleName());\n if (returnAllReferences || inLocalModule || inImportedModule) {\n findDefinitionNode(f, name, e, result);\n }\n }\n }\n return result;\n }",
"public int getMipmapResIdByName(String resName) {\n String pkgName = context.getPackageName();\n\n // Return 0 if not found.\n int resID = context.getResources().getIdentifier(resName , \"drawable\", pkgName);\n Log.i(\"CustomGridView\", \"Res Name: \"+ resName+\"==> Res ID = \"+ resID);\n return resID;\n }",
"public Pattern getPatternByName(String name) throws PatternNotFound {\n if(mapName.containsKey(name)) {\r\n return mapName.get(name);\r\n }\r\n else {\r\n throw new PatternNotFound(\"No pattern called \" + name);\r\n }\r\n }",
"private Node getNode(String name) {\n for(Iterator<Node> i = nodes.iterator(); i.hasNext();) {\n Node n = i.next();\n if(n.getName().equalsIgnoreCase(name)){\n return n;\n };\n }\n return null;\n }",
"private String getName(final String name) {\n\t\treturn bundleI18N.getString(name);\n\t}",
"public AssetClass findAssetClassByName(String name_);",
"public static Template getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tTemplate result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"@SuppressWarnings(\"unused\")\n public static int getResIdReflection(@NonNull String name) {\n try {\n Field idField = clazz.getDeclaredField(name);\n return idField.getInt(idField);\n } catch (Exception e) {\n e.printStackTrace();\n return R.drawable.ic_help_circle;\n }\n }",
"public int searchFriends(String name) {\n\n int index = -1;\n\n if (name != null) {\n\n Schedule sched;\n for (int i = 0; i < buddies.size(); i++) {\n\n sched = buddies.get(i);\n\n if (name.equals(sched.getWhosSchedule())) {\n \n index = i;\n break;\n }\n }\n }\n\n return index;\n }",
"public int findInContext(String qualifier, String name, int kind) {\n\t\t\t\t\treturn RES_NAME_CONFLICT;\n\t\t\t\t}",
"public boolean checkIfNameExists(String name) {\n String[] projection = {\n MediaStore.Audio.Playlists._ID,\n MediaStore.Audio.Playlists.NAME\n };\n\n String selection = MediaStore.Audio.Playlists.NAME + \" = ? \";\n String[] selectionArgs = {\n name\n };\n\n Cursor cursor = getContentResolver().query(\n MediaStore.Audio.Playlists.EXTERNAL_CONTENT_URI,\n projection,\n selection,\n selectionArgs,\n null);\n\n // id is the ID of the playlist that is found to have the same name as the new name, if no\n // playlist if found for this name, id = -1\n int id = -1;\n\n if (cursor != null) {\n cursor.moveToFirst();\n if (!cursor.isAfterLast()) {\n id = cursor.getInt(0);\n }\n }\n cursor.close();\n\n if (id == -1) {\n return false;\n } else {\n return true;\n }\n\n }",
"public NameSurferEntry findEntry(String name) {\n\t\tchar ch = name.charAt(0);\n\t\tif(Character.isLowerCase(ch) == true) {\n\t\t\tch = Character.toUpperCase(ch);\n\t\t}\n\t\tString otherLetters = name.substring(1);\n\t\totherLetters = otherLetters.toLowerCase();\n\t\tname = ch + otherLetters;\n\t\tif (nameFromDatabase.containsKey(name)) {\n\t\t\treturn nameFromDatabase.get(name);\n\t\t}\t\t\t\n\t\telse{\n\t\t\treturn null;\n\t\t}\n\t}",
"private boolean findClassInComponents(String name) {\n // we need to search the components of the path to see if we can find the\n // class we want.\n final String classname = name.replace('.', '/') + \".class\";\n final String[] list = classpath.list();\n boolean found = false;\n int i = 0;\n while (i < list.length && found == false) {\n final File pathComponent = (File)project.resolveFile(list[i]);\n found = this.contains(pathComponent, classname);\n i++;\n }\n return found;\n }",
"private int findIngredientByName(String name){\r\n for(int i = 0; i < ingredients.size(); i++){\r\n if(ingredients.get(i).getName().equals(name)){\r\n return i;\r\n }\r\n }\r\n\r\n return -1;\r\n }",
"@Override\n protected URL\n findResource\n (\n String rname\n )\n {\n LogMgr.getInstance().log\n (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n \"Resource name (\" + rname + \")\");\n\n if(pResources != null) {\n if(pResources.containsKey(rname)) {\n\tPath resourcePath = new Path(pResourceRootPath, rname);\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource path (\" + resourcePath + \")\");\n\n\tFile resourceFile = resourcePath.toFile();\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource file (\" + resourceFile + \") exists (\" + resourceFile.exists() + \")\");\n\n\tif(!resourceFile.exists())\n\t return null;\n\n\tURI resourceURI = resourceFile.toURI();\n\n\tLogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource URI (\" + resourceURI + \")\");\n\n\ttry {\n\t URL resourceURL = resourceURI.toURL();\n\n\t LogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Finest, \n\t \"Resource URL (\" + resourceURL + \")\");\n\n\t return resourceURL;\n\t}\n\tcatch(MalformedURLException ex) {\n\t LogMgr.getInstance().log\n\t (LogMgr.Kind.Ops, LogMgr.Level.Warning, \n\t \"Error constructing URL from (\" + rname + \")!\");\n\t}\n }\n }\n\n return null;\n }",
"private Track searchTrack(String name) {\n for(Track e: listTracks) {\n if(e.sDataPath.equals(name)) return e;\n }\n return null;\n }",
"public static Element contains(final Element root, final String name){\n return contains(root, name, -1);\n }",
"public int getRawResIdByName(String resName) {\n String pkgName = this.getPackageName();\n // Return 0 if not found.\n int resID = this.getResources().getIdentifier(resName, \"raw\", pkgName);\n Log.i(\"AndroidVideoView\", \"Res Name: \" + resName + \"==> Res ID = \" + resID);\n return resID;\n }",
"private String entryName(String name) {\n name = name.replace(File.separatorChar, '/');\n String matchPath = \"\";\n /* Need to add code to consolidate paths\n for (String path : paths) {\n if (name.startsWith(path)\n && (path.length() > matchPath.length())) {\n matchPath = path;\n }\n }\n */\n name = name.substring(matchPath.length());\n \n if (name.startsWith(\"/\")) {\n name = name.substring(1);\n } else if (name.startsWith(\"./\")) {\n name = name.substring(2);\n }\n return name;\n }",
"ResultSet searchName(String name) {\n \ttry {\n \t\tStatement search = this.conn.createStatement();\n \tString query = \"SELECT * FROM Pokemon WHERE Name = \" + \"'\" + name + \"'\";\n \t\n \treturn search.executeQuery(query);\n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t\treturn null;\n\t\t}\n }",
"public ListWord findAList(String name) {\n for (ListWord list: list) {\n if (list.getName().equals(name)) {\n return list;\n }\n }\n return null;\n }",
"@Override\n public Object visit(ASTResource node, Object data) {\n if (node.getNumChildren() == 1) {\n ASTName nameNode = (ASTName) node.getChild(0);\n for (StringTokenizer st = new StringTokenizer(nameNode.getImage(), \".\"); st.hasMoreTokens();) {\n JavaNameOccurrence occ = new JavaNameOccurrence(nameNode, st.nextToken());\n new Search(occ).execute();\n }\n }\n\n return super.visit(node, data);\n }",
"final SyntaxTreeNode lookupName(QName name) {\n // Is it a local var or param ?\n final SyntaxTreeNode result = _parser.lookupVariable(name);\n\tif (result != null)\n return(result);\n else\n\t return(_symbolTable.lookupName(name));\n }",
"public int search(String name){\n\t\tfor(Map.Entry<String, Integer> e : map.entrySet()){\n\t\t\tif(e.getKey().equals(name)){\n\t\t\t\treturn e.getValue();\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t/*\n\t\twhile(pointer < locations.length){\n\t\t\tif(locations[pointer].getName() == name){\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t\treturn locations[pointer - 1].getID();\n\t\t\t} else {\n\t\t\t\tmap.put(locations[pointer].getName(), locations[pointer].getID());\n\t\t\t\tpointer++;\n\t\t\t}\n\t\t}\n\t\tthrow new NullPointerException();\n\t\t*/\n\t}",
"public int[] findPlaylist(String name){\r\n\t\tint[] ctrl= new int[2];\r\n\t\tctrl[0] = 0;\r\n\t\tctrl[1] = 0;\r\n\t\tfor(int i=0; i<playlist.length && ctrl[0]!=1; i++){\r\n\t\t\tif(playlist[i]!=null && name.equals(playlist[i].getName())){\r\n\t\t\t\tctrl[0]=1;\r\n\t\t\t\tctrl[1]=i;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ctrl;\r\n\t}",
"public Container findContainerFor(String name, Container initialScope)\r\n {\r\n if (initialScope == null)\r\n throw new IllegalArgumentException(\"Initial container scope cannot be null\");\r\n\r\n if(initialScope.isRoot())\r\n return initialScope;\r\n\r\n Container c = initialScope;\r\n while (c != null)\r\n {\r\n Map<String, String> p = getPreferences(c, false);\r\n if (p != null)\r\n {\r\n if (p.containsKey(name))\r\n return c;\r\n }\r\n if (c.isRoot())\r\n break;\r\n c = c.getParent();\r\n }\r\n return null;\r\n }",
"public T get(String name) {\n for (int i = maps.size() - 1; i >= 0; i--) {\n HashMap<String, T> scope = maps.get(i);\n T t = scope.get(name);\n if (t != null) return t; // Found it!\n }\n return null; // Not found\n }",
"public static Resource_kind getByName(String name) {\n\t\tfor (int i = 0; i < VALUES_ARRAY.length; ++i) {\n\t\t\tResource_kind result = VALUES_ARRAY[i];\n\t\t\tif (result.getName().equals(name)) {\n\t\t\t\treturn result;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}",
"private void filterPerName(EntityManager em) {\n System.out.println(\"Please enter the name: \");\n Scanner sc = new Scanner(System.in);\n //Debug : String name = \"Sel\";\n\n String name = sc.nextLine();\n\n TypedQuery<Permesso> query = em.createQuery(\"select p from com.hamid.entity.Permesso p where p.nome like '%\"+ name\n + \"%'\" , Permesso.class);\n\n List<Permesso> perList = query.getResultList();\n\n for (Permesso p : perList) {\n System.out.println(p.getNome());\n }\n }",
"public String getLocalizedString( String name ) {\n\t\tString outString = \"\";\r\n\t\tint id = getResources().getIdentifier( name, \"string\", getPackageName() );\r\n\t\tif ( id == 0 )\r\n\t\t{\r\n\t\t\t// 0 is not a valid resource id\r\n\t\t\tLog.v(\"VrLocale\", name + \" is not a valid resource id!!\" );\r\n\t\t\treturn outString;\r\n\t\t} \r\n\t\tif ( id != 0 ) \r\n\t\t{\r\n\t\t\toutString = getResources().getText( id ).toString();\r\n\t\t\t//Log.v(\"VrLocale\", \"getLocalizedString resolved \" + name + \" to \" + outString);\r\n\t\t}\r\n\t\treturn outString;\r\n\t}",
"public static Icon lookup(String name) \r\n\t{\r\n\t\tEntry\t\ttab[] = m_table;\r\n\t\tEntry\t\te;\r\n\t\tint\t\t\tindex;\r\n\t\r\n\t\tif (tab != null) {\r\n\t\t\tindex = (name.hashCode() & 0x7FFFFFFF) % tab.length;\r\n\t\r\n\t\t\tfor (e = tab[index] ; e != null ; e = e.m_next) {\r\n\t\t\t\tif (name.compareTo(e.m_name) == 0) {\r\n\t\t\t\t\treturn(e.m_value);\r\n\t\t}\t}\t}\r\n\t\treturn null;\r\n\t}",
"@Override\n\tpublic Symbol resolve(String name) {\n\t\tSymbol s = symbols.get(name);\n\t\tif (s != null)\n\t\t\treturn s;\n\t\t\n\t\t// otherwise look in the enclosing scope, if there is one\n\t\tScope sc = enclosingScope;\n\t\twhile (sc != null) {\n\t\t\tSymbol sym = enclosingScope.resolve(name);\n\t\t\tif (sym != null) {\n\t\t\t\treturn sym;\n\t\t\t}\n\t\t\tsc = sc.getEnclosingScope();\n\t\t}\n\t\t// otherwise it doesn't exist\n\t\treturn null;\n\t}",
"public static String getString(Context context, String name)\n\t{\n\t\treturn context.getResources().getString(RR.getStringId(name));\n\t}"
] | [
"0.5603315",
"0.5593315",
"0.5570026",
"0.55325574",
"0.5372367",
"0.533518",
"0.53254217",
"0.52645737",
"0.5252667",
"0.5213996",
"0.52121025",
"0.51826066",
"0.51718765",
"0.5170336",
"0.515977",
"0.5153595",
"0.51451564",
"0.5144847",
"0.51316947",
"0.51227117",
"0.51161116",
"0.5104632",
"0.50853926",
"0.5062793",
"0.50587463",
"0.5052622",
"0.50375116",
"0.50324",
"0.5030952",
"0.5004117",
"0.4998281",
"0.49790096",
"0.4968621",
"0.49572897",
"0.4957075",
"0.49559698",
"0.4954797",
"0.4949613",
"0.49472207",
"0.49390656",
"0.49177298",
"0.49126306",
"0.489873",
"0.48985526",
"0.48810714",
"0.48731872",
"0.48611498",
"0.4836567",
"0.4825714",
"0.48169976",
"0.4809064",
"0.48030013",
"0.480211",
"0.47979012",
"0.47894424",
"0.47802073",
"0.47769043",
"0.47753313",
"0.4769092",
"0.4752437",
"0.47444618",
"0.47422758",
"0.47374085",
"0.47233802",
"0.4721245",
"0.47091392",
"0.47030517",
"0.46979195",
"0.46952963",
"0.46931288",
"0.4693061",
"0.46927434",
"0.46875542",
"0.46766838",
"0.46756995",
"0.46727765",
"0.4671293",
"0.46709558",
"0.46704876",
"0.46693328",
"0.46652767",
"0.4654892",
"0.4648921",
"0.46451616",
"0.464427",
"0.46430886",
"0.46423283",
"0.46419784",
"0.46355423",
"0.46354008",
"0.46337992",
"0.46224973",
"0.46153963",
"0.46133196",
"0.4608991",
"0.46071926",
"0.46065477",
"0.46063524",
"0.46055323",
"0.46027032"
] | 0.7665735 | 0 |
List the resources of a type. | public List<Resource> findByType(ResourceType type) {
Map<String, Object> typeFilter = new HashMap<>(1);
typeFilter.put("type", new ValueParameter(type));
return this.filter(typeFilter);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public List<ResourceBase> listTypes() throws ResourceException;",
"List<ResourceType> resourceTypes();",
"public List getResourceTypes(ResourceType resourceType);",
"@Override\r\n\tpublic List<Resource> getAllResources(String category, String type) {\r\n\t\tList<Resource> getAll = resourceDao.findByCategoryAndType(category, type);\r\n\t\tlogger.info(\"Resources fetched by category: \" + category + \" and type: \" + type);\r\n\t\treturn getAll;\r\n\t}",
"public int getResources(Type type) {\n \t\treturn resources[type.ordinal()];\n \t}",
"public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypes()\r\n {\r\n java.util.Iterator it=sclass.listInstances();\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType>(it, true);\r\n }",
"public List<Resource> listResources() throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn list(Resource.class);\n\t}",
"public List<String> getResourceTypes(){\n\t\treturn jtemp.queryForList(\"SELECT resource_type_id||' '||resource_type_name FROM resource_type\", String.class);\n\t}",
"public List<PrimaryType> getResources() {\n return resources;\n }",
"List<Resource> resources();",
"public List<Type> getAll();",
"@SuppressWarnings(\"unchecked\")\n public <T extends Resource> List<T> getChildren(Class<T> type)\n {\n Resource[] allChildren = getChildren();\n List<T> filteredChildren = new ArrayList<T>();\n for(Resource child : allChildren)\n {\n if(type.isAssignableFrom(child.getClass()))\n {\n filteredChildren.add((T)child);\n }\n }\n return filteredChildren;\n }",
"@Nonnull\n @Override\n public Set<ResourceType> list() {\n return getTables().stream()\n .map(Table::name)\n .map(String::toLowerCase)\n .map(LOWER_CASE_RESOURCE_NAMES::get)\n .filter(Objects::nonNull)\n .collect(Collectors.toSet());\n }",
"Collection<? extends Resource> getResources();",
"List<Type> getAllTypeList();",
"public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypes(org.semanticwb.model.SWBModel model)\r\n {\r\n java.util.Iterator it=model.getSemanticObject().getModel().listInstancesOfClass(sclass);\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType>(it, true);\r\n }",
"public List<IResource> getResources();",
"public org.semanticwb.model.GenericIterator<org.semanticwb.model.Resource> listResources()\r\n {\r\n return new org.semanticwb.model.GenericIterator<org.semanticwb.model.Resource>(getSemanticObject().listObjectProperties(swb_hasPTResource));\r\n }",
"public List<Class<? extends Resource>> getAvailableTypes(OgemaLocale locale);",
"public int getContents( Resource.Type type );",
"@objid (\"be13c135-d5bf-4f14-9794-2c2fbdc9e900\")\n <T extends ResourceType> List<T> getDefinedResourceType(java.lang.Class<T> filterClass);",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllPlatformTypes\")\n List<JsonType> types();",
"@GET\n @Produces(MediaType.APPLICATION_JSON)\n @Path(\"getAllDeviceCategories\")\n List<JsonType> types();",
"public List<SecTyp> getAllTypes();",
"public int getNumberOf(ResType type) { return resources.get(type); }",
"public List<Resources> getAllResources()\r\n\t{\r\n\t\tList<Resources> l = resourceRepository.findByResource();\r\n\t\treturn l;\r\n\t}",
"@GET\n @Path(\"allTypes\")\n @Produces(MediaType.APPLICATION_JSON)\n public String getAllTypes() {\n return typesJSONResponse(_types.getAllTypes());\n }",
"@Override\n\tpublic List<Resources> selectByResByAreaId(String id,String type) {\n\t\tMap<String, Object> param = new HashMap<String, Object>();\n\t\tparam.put(\"id\", id);\n\t\tparam.put(\"type\", type);\n\t\treturn ResourcesMapper.selectByResByAreaId(param);\n\t}",
"@GetMapping(\"/types\")\n\t@Timed\n\tpublic List<TypesDTO> getAllTypes() {\n\t\tthis.log.debug(\"REST request to get all Types\");\n\t\treturn this.typesService.findAll();\n\t}",
"ResponseEntity<List<Type>> findTaskTypes();",
"public ResourceType type() {\n return type;\n }",
"List<Type> getTypeList(String type);",
"public static Map<String, List<?>> getResourcesPerType(SearchResponse resp) {\n\n\t\tMap<String, List<ObjectId>> idsOfEachType = new HashMap<String, List<ObjectId>>();\n\t\tresp.getHits().forEach( (h) -> {\n\t\t\tif(!idsOfEachType.containsKey(h.getType())) {\n\t\t\t\tidsOfEachType.put(h.getType(), new ArrayList<ObjectId>() {{ add(new ObjectId(h.getId())); }});\n\t\t\t} else {\n\t\t\t\tidsOfEachType.get(h.getType()).add(new ObjectId(h.getId()));\n\t\t\t}\n\t\t});\n\n\t\tMap<String, List<?>> resourcesPerType = new HashMap<String, List<?>>();\n\n\t\tfor(Entry<String, List<ObjectId>> e: idsOfEachType.entrySet()) {\n\t\t\tresourcesPerType.put(e.getKey() , DB.getRecordResourceDAO().getByIds(e.getValue()));\n\n\t\t}\n\n\t\treturn resourcesPerType;\n\t}",
"public com.google.protobuf.ProtocolStringList\n getResourcesList() {\n return resources_;\n }",
"public List getResourceTypesByIdList(final Map idList);",
"public IResourceType getType();",
"public List<Resource> getAvailableResources();",
"public ResourceType getResouceType() {\n return type;\n }",
"public Set<ResourceType> getAllResourceTypes() {\n parseExternalResources();\n Set<ResourceType> resourceTypes = new HashSet<ResourceType>();\n for (DatacollectionGroup group : externalGroupsMap.values()) {\n for (ResourceType rt : group.getResourceTypeCollection()) {\n if (!contains(resourceTypes, rt))\n resourceTypes.add(rt);\n }\n }\n return resourceTypes;\n }",
"public List<ExperimentCatResource> get(ResourceType type, int limit, int offset, Object orderByIdentifier,\n ResultOrderType resultOrderType) throws RegistryException {\n List<ExperimentCatResource> result = new ArrayList<ExperimentCatResource>();\n EntityManager em = null;\n try {\n em = ExpCatResourceUtils.getEntityManager();\n em.getTransaction().begin();\n QueryGenerator generator;\n Query q;\n switch (type) {\n case PROJECT:\n generator = new QueryGenerator(PROJECT);\n UserPK userPK = new UserPK();\n userPK.setGatewayId(getGatewayId());\n userPK.setUserName(user);\n Users users = em.find(Users.class, userPK);\n Gateway gatewayModel = em.find(Gateway.class, gatewayId);\n generator.setParameter(\"users\", users);\n if (gatewayModel != null) {\n generator.setParameter(\"gateway\", gatewayModel);\n }\n\n //ordering - only supported only by CREATION_TIME\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n q = generator.selectQuery(em, ProjectConstants.CREATION_TIME, resultOrderType);\n } else {\n q = generator.selectQuery(em);\n }\n\n //pagination\n if (limit > 0 && offset >= 0) {\n q.setFirstResult(offset);\n q.setMaxResults(limit);\n }\n\n for (Object o : q.getResultList()) {\n Project project = (Project) o;\n org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource projectResource = (org.apache.airavata.registry.core.experiment.catalog.resources.ProjectResource) Utils.getResource(ResourceType.PROJECT, project);\n result.add(projectResource);\n }\n break;\n case EXPERIMENT:\n generator = new QueryGenerator(EXPERIMENT);\n generator.setParameter(ExperimentConstants.USER_NAME, getUser());\n\n //ordering - only supported only by CREATION_TIME\n if (orderByIdentifier != null && resultOrderType != null\n && orderByIdentifier.equals(Constants.FieldConstants.ProjectConstants.CREATION_TIME)) {\n q = generator.selectQuery(em, ExperimentConstants.CREATION_TIME, resultOrderType);\n } else {\n q = generator.selectQuery(em);\n }\n\n //pagination\n if (limit > 0 && offset >= 0) {\n q.setFirstResult(offset);\n q.setMaxResults(limit);\n }\n for (Object o : q.getResultList()) {\n Experiment experiment = (Experiment) o;\n ExperimentResource experimentResource = (ExperimentResource) Utils.getResource(ResourceType.EXPERIMENT, experiment);\n result.add(experimentResource);\n }\n\n break;\n default:\n logger.error(\"Unsupported resource type for worker resource.\", new IllegalArgumentException());\n break;\n }\n em.getTransaction().commit();\n em.close();\n } catch (Exception e) {\n logger.error(e.getMessage(), e);\n throw new RegistryException(e);\n } finally {\n if (em != null && em.isOpen()) {\n if (em.getTransaction().isActive()) {\n em.getTransaction().rollback();\n }\n em.close();\n }\n }\n return result;\n }",
"public com.google.protobuf.ProtocolStringList\n getResourcesList() {\n return resources_.getUnmodifiableView();\n }",
"public List<URI> getType();",
"public List<Resources> getResourcesByLocationAndResourceType(int locationId, int resourceTypeId){\n\t\treturn jtemp.query(\"SELECT * FROM Resources \"\n\t\t\t\t\t\t\t\t\t\t+ \"WHERE location_id = ? \"\n\t\t\t\t\t\t\t\t\t\t+ \"AND resource_type_id = ? \" \n\t\t\t\t\t + \"AND is_available >= 0\",\n\t\t\t\t\t\t\t\t\t\tnew ResourcesMapper(),\n\t\t\t\t\t\t\t\t\t\tlocationId,\n\t\t\t\t\t\t\t\t\t\tresourceTypeId);\n\t}",
"public void addResources(Type type, int count) {\n \t\tresources[type.ordinal()] += count;\n \t}",
"public Iterator<ODocument> getAllAsList(@Generic(\"T\") final Class<?> type) {\n return getAll(type);\n }",
"ImmutableList<SchemaOrgType> getLearningResourceTypeList();",
"public Collection<Resource> getResources() {\n return resourceRegistry.getEntries().values();\n }",
"@GET\n\t@Path(\"types\")\n public Response getDeviceTypes() {\n List<DeviceType> deviceTypes;\n try {\n deviceTypes = DeviceMgtAPIUtils.getDeviceManagementService().getAvailableDeviceTypes();\n return Response.status(Response.Status.OK).entity(deviceTypes).build();\n } catch (DeviceManagementException e) {\n String msg = \"Error occurred while fetching the list of device types.\";\n log.error(msg, e);\n return Response.status(Response.Status.INTERNAL_SERVER_ERROR).entity(msg).build();\n }\n }",
"public <T extends Base> List<T> list(Class<T> T) throws IOException,\n\t\t\tClassNotFoundException {\n\t\treturn Core.list(T, getHttpMethodExecutor());\n\t}",
"public void setType(Class<? extends Resource> type) {\n this.type = type;\n }",
"@Override\n public GetLogLevelsByResourceTypesResult getLogLevelsByResourceTypes(GetLogLevelsByResourceTypesRequest request) {\n request = beforeClientExecution(request);\n return executeGetLogLevelsByResourceTypes(request);\n }",
"public final ArrayList<Class<? extends IResource>> getSelectableResourceTypes() {\n\treturn mSelectableResourceTypes;\n}",
"ArrayList<Restaurant> getRestaurantListByType(String type);",
"@RequestMapping(value = \"/contracts/types\", method = RequestMethod.GET)\n public JsonListWrapper<String> listAllTypes() {\n Collection<String> items = ((ContractService) service).findAllInsuranceTypes();\n return JsonListWrapper.withTotal(items);\n }",
"String getResourceType();",
"public ArrayList<Resource> getStaticInfo() {\n\t\tArrayList<Resource> resources = new ArrayList<Resource>();\n\n\t\t// ~~~ CPU\n\t\tResource cpuResource = new Resource();\n\t\tcpuResource.setResourceType(ResourceType.CPU);\n\t\tcpuResource.setName(clientStaticInfo.getCPUVendor() + \" CPU\");\n\n\t\tAttribute cpuSpeedAttribute = new Attribute();\n\t\tcpuSpeedAttribute.setAttributeType(AttributeType.CPUSpeed);\n\t\tcpuSpeedAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getCPUSpeed()));\n\t\tcpuSpeedAttribute.setDate(new Date());\n\t\tcpuResource.addAttribute(cpuSpeedAttribute);\n\n\t\tresources.add(cpuResource);\n\t\t// ~~~ RAM\n\t\tResource ramResource = new Resource();\n\t\tramResource.setResourceType(ResourceType.RAM);\n\t\tramResource.setName(\"RAM\");\n\n\t\tAttribute ramTotalAttribute = new Attribute();\n\t\tramTotalAttribute.setAttributeType(AttributeType.TotalMemory);\n\t\tramTotalAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getRAMInfo()));\n\t\tramTotalAttribute.setDate(new Date());\n\t\tramResource.addAttribute(ramTotalAttribute);\n\n\t\tresources.add(ramResource);\n\t\t// ~~~ OS\n\t\tResource osResource = new Resource();\n\t\tosResource.setResourceType(ResourceType.OS);\n\t\tosResource.setName(clientStaticInfo.getOSInfo());\n\n\t\tresources.add(osResource);\n\t\t// ~~~ SStorage\n\t\tResource sstorageResource = new Resource();\n\t\tsstorageResource.setResourceType(ResourceType.SStorage);\n\t\tsstorageResource.setName(\"SSTORAGE\");\n\n\t\tAttribute sstorageTotalAttribute = new Attribute();\n\t\tsstorageTotalAttribute.setAttributeType(AttributeType.TotalStorage);\n\t\tsstorageTotalAttribute.setValue(Double.parseDouble(clientStaticInfo\n\t\t\t\t.getSStorageInfo()));\n\t\tsstorageTotalAttribute.setDate(new Date());\n\t\tsstorageResource.addAttribute(sstorageTotalAttribute);\n\n\t\tresources.add(sstorageResource);\n\n\t\treturn resources;\n\t}",
"@GetMapping(\"/type/{type}\")\n public List<ProductDto> getProductsByType(\n @PathVariable(\"type\") String type\n ){\n return productService.getProductsByType(type);\n }",
"@Override\n\tpublic List<Type> listType() {\n\t\treturn goodsDao.listType();\n\t}",
"@Override\r\n\tpublic List<Resources> resourcesPage(Map<String, Object> map) {\n\t\treturn resourcesDao.resourcesPage(map);\r\n\t}",
"@Override\n @RequiresPermissions(\"em.emtype.query\")\n public void index() {\n List<EmType> list = EmType.dao.list();\n \n setAttr(\"list\", JsonKit.toJson(list));\n render(\"equipment_type_list.jsp\");\n }",
"List<CatalogItem> getAllCatalogItemsByType(Long type_id);",
"@Override\n public Set<Class<?>> getClasses() {\n\n Set<Class<?>> resources = new java.util.HashSet<>();\n resources.add(CountryResource.class);\n resources.add(DepartmentResource.class);\n resources.add(JobResource.class);\n return resources;\n }",
"public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypeByResource(org.semanticwb.model.Resource value)\r\n {\r\n org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType> it=new org.semanticwb.model.GenericIterator(value.getSemanticObject().getModel().listSubjectsByClass(swb_hasPTResource,value.getSemanticObject(),sclass));\r\n return it;\r\n }",
"public ArrayList<Resource> getResources(){\n\t\treturn _resources;\n\t}",
"@Override\n\tpublic Vector<String[]> getResourceList() throws RemoteException {\n\t\tVector<String[]> resourceList = new Vector<String[]>();\n\t\tfor (Resource singleResource : resourceModel.getResources()) {\n\t\t\tresourceList.add(singleResource.toArrayStrings());\n\t\t}\n\t\treturn resourceList;\n\t}",
"Class<? extends Resource> getResourceType();",
"public List<String> getResources() {\n return resources;\n }",
"@SuppressWarnings(\"unchecked\")\r\n\tpublic static List<Tag> getTagsByType(Integer type) {\r\n\t\tQuery q = PMF.get().getPersistenceManager().newQuery(Tag.class);\r\n\t\tq.setFilter(\"type == :typeParam\");\r\n\t\treturn (List<Tag>) q.execute(type);\r\n\t}",
"List<ObjectType> getObjectTypes() throws AccessDeniedException;",
"public List<Type> getTypeList() {\n\t\treturn sm.selectList(\"com.lanzhou.entity.Longpay.getTypeList\");\n\t}",
"public String getResourceType () {\n return resourceType;\n }",
"public String getResourceType () {\n return resourceType;\n }",
"public String getResourceType() {\n return this.resourceType;\n }",
"@ApiModelProperty(required = true, value = \"`resources` is a list of matching resources (i.e., lowercase and plural) with, if desired, subresource. For example, [ \\\"services\\\", \\\"nodes/status\\\" ]. This list may not be empty. \\\"*\\\" matches all resources and, if present, must be the only entry. Required.\")\n\n public List<String> getResources() {\n return resources;\n }",
"public List<ScheduleResource> neededSpecificResources();",
"public List<ItemTypeDTO> getAll();",
"public List<Resources> getResourcesByLocationAndResourceTypeNonSuper(int locationId, int resourceTypeId){\n\t\treturn jtemp.query(\"SELECT * FROM Resources \"\n\t\t\t\t\t\t\t\t\t\t+ \"WHERE location_id = ? \"\n\t\t\t\t\t\t\t\t\t\t+ \"AND resource_type_id = ? \"\n\t\t\t\t\t\t\t\t\t\t+ \"AND is_super_room = ?\"\n\t\t\t\t\t\t\t\t\t\t+ \" order by is_available DESC\", \n\t\t\t\t\t\t\t\t\t\tnew ResourcesMapper(),\n\t\t\t\t\t\t\t\t\t\tlocationId,\n\t\t\t\t\t\t\t\t\t\tresourceTypeId,\n\t\t\t\t\t\t\t\t\t\t0);\n\t}",
"@Override\n\t@Transactional\n\tpublic List<Role> getByType(String type) {\n\t\treturn roleDao.getByType(type);\n\t}",
"public void setResources(List<PrimaryType> resources) {\n this.resources = resources;\n }",
"public String getResourceType() {\n return resourceType;\n }",
"@RequestMapping(value = \"/shopressources\", method = RequestMethod.GET)\n List<ShopRessource> getAllShopRessources();",
"public List<SecRight> getAllRights(int type);",
"public List<DataGridResource> getResources() {\n\t\tif(resources != null) Collections.sort(resources);\n\t\treturn resources;\n\t}",
"public ResourceType getResourceType() {\n\treturn this.resourceType;\n }",
"public List<AssetType> getAssetTypes() throws IOException {\n try {\n String strBody = null;\n Map<String, String> params = null;\n String correctPath = \"/AssetTypes\";\n UriBuilder uriBuilder = UriBuilder.fromUri(apiClient.getBasePath() + correctPath);\n String url = uriBuilder.build().toString();\n\n \n String response = this.DATA(url, strBody, params, \"GET\");\n TypeReference<List<AssetType>> typeRef = new TypeReference<List<AssetType>>() {};\n return apiClient.getObjectMapper().readValue(response, typeRef);\n\n } catch (IOException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage());\n } catch (XeroApiException e) {\n throw xeroExceptionHandler.handleBadRequest(e.getMessage(), e.getResponseCode(),JSONUtils.isJSONValid(e.getMessage()));\n }\n }",
"public <T extends IDBEntities> List<T> retrieveAll(Class<? extends IDBEntities> type) {\n\t\tif (type == null)\n\t\t\treturn new ArrayList<>();\n\t\tList<T> result;\n\t\tEntityManager em = getEM();\n\t\ttry {\n\t\t\tQuery q = em.createNamedQuery(type.getSimpleName() + \".findAll\", type);\n\t\t\tresult = q.getResultList();\n\t\t} catch (Exception ex) {\n\t\t\t// No records exist\n\t\t\treturn null;\n\t\t} finally {\n\t\t\tem.close();\n\t\t}\n\t\t// Dealing with EclipseLink Vector overriding issues (iterators don't work properly)\n\t\tList<T> output = new ArrayList<>();\n\t\toutput.addAll(result);\n\t\treturn output;\n\t}",
"public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypeByResource(org.semanticwb.model.Resource value,org.semanticwb.model.SWBModel model)\r\n {\r\n org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType> it=new org.semanticwb.model.GenericIterator(model.getSemanticObject().getModel().listSubjectsByClass(swb_hasPTResource, value.getSemanticObject(),sclass));\r\n return it;\r\n }",
"public SimpleResList getResourceList() {\r\n\t\treturn new SimpleResList(resList);\r\n\t}",
"public List<E> findAll(Class<E> type){\n transaction.begin();\n List<E> types = entityManager.createQuery(\" from \" + type.getName()).getResultList();\n transaction.commit();\n return types;\n }",
"public String getResourceType() {\n return this.ResourceType;\n }",
"public static java.util.Iterator<org.semanticwb.model.ResourceType> listResourceTypeBySubType(org.semanticwb.model.ResourceSubType value)\r\n {\r\n org.semanticwb.model.GenericIterator<org.semanticwb.model.ResourceType> it=new org.semanticwb.model.GenericIterator(value.getSemanticObject().getModel().listSubjectsByClass(swb_hasPTSubType,value.getSemanticObject(),sclass));\r\n return it;\r\n }",
"public ResourceSet getAllResources() {\n return getAllResourcesExcept(null);\n }",
"public List<ITranslationResource> getResources(){\n\t\treturn resources;\n\t}",
"@Override\n public List<Asset> getAssetsByType(String type) {\n\t \n\t List<Asset> assets = new ArrayList<>();\n\t \n\t ResultSet resultset = null;\n\t \n\t String[] list = {\"id\",\"type\"};\n\t \n\t List<ResultSetFuture> futures = Lists.newArrayListWithExpectedSize(list.length);\n\t \n\t futures.add(session.executeAsync(\"SELECT * FROM \"+cassandra_keyspace+ \".\"+cassandra_table+\" WHERE type = '\"+type+\"'\"));\n\t \n\t for (ListenableFuture<ResultSet> future : futures){\n\t\t try {\n\t\t\t resultset = future.get();\n\t\t }\n\t\t catch (InterruptedException | ExecutionException e) {\n\t\t\t // TODO Auto-generated catch block\n\t\t\t e.printStackTrace();\n\t\t }\n\t\t \n\t }\n\t \n\t for (Row row : resultset) {\n\t\t Asset asset = new Asset();\n\t\t asset.setId(row.getString(\"id\"));\n\t\t asset.setAntivirus(row.getString(\"antivirus\"));\n\t\t asset.setCurrent(row.getLong(\"current\"));\n\t\t asset.setIpAddress(row.getString(\"ipaddress\"));\n\t\t asset.setLatitude(row.getString(\"latitude\"));\n\t\t asset.setLongitude(row.getString(\"longitude\"));\n\t\t asset.setOs(row.getString(\"os\"));\n\t\t asset.setPressure(row.getLong(\"pressure\"));\n \t asset.setFlowRate(row.getLong(\"flowRate\"));\n\t\t asset.setPressure(row.getLong(\"pressure\"));\n\t\t asset.setRotation(row.getLong(\"rotation\"));\n\t\t asset.setTemperature(row.getInt(\"temperature\"));\n\t\t asset.setType(row.getString(\"type\"));\n\t\t asset.setVersion(row.getString(\"version\"));\n\t\t asset.setCreationDate(row.getTimestamp(\"creationDate\"));\n\t\t assets.add(asset);\n\t\t \n\t }\n\t \n\t return assets;\n\t \n }",
"@Override\n\tpublic List<Kind> findAll() {\n\t\treturn kindDao.findAll();\n\n\t}",
"public Iterator getResources() {\n return this.resources.iterator();\n }",
"public List<MessageResource> listMessageResource();",
"@Override\n\tpublic List<TypeDocument> findAll() {\n\t\treturn typeDocumentRepository.findAll();\n\t}",
"List<ReportType> findTypes();",
"public List<SensoryType> findAllSensoryTypes() {\r\n\t\t// sparql\r\n\t\tString sparql = \"SELECT ?dataSourceType WHERE {?dataSourceType rdfs:subClassOf onto:DataSourceType.}\";\r\n\t\t// test\r\n\t\tString jsonString = findJsonResult(sparql);\r\n\t\tSystem.out.println(\"findAllDataSourceTypes:\" + jsonString);\r\n\t\t// result\r\n\t\tJSONObject json;\r\n\t\ttry {\r\n\t\t\tjson = new JSONObject(jsonString);\r\n\t\t\tJSONArray jsonArray = json.getJSONObject(\"results\").getJSONArray(\"bindings\");\r\n\t\t\tList<SensoryType> list = new ArrayList<SensoryType>();\r\n\t\t\tfor (int i = 0; i < jsonArray.length(); i++) {\r\n\t\t\t\tJSONObject jsonObject = (JSONObject) jsonArray.get(i);\r\n\t\t\t\tSensoryType sensoryType = new SensoryType();\r\n\t\t\t\tif (jsonObject.has(\"dataSourceType\")) {\r\n\t\t\t\t\tsensoryType.setSensoryTypeName(jsonObject.getJSONObject(\"dataSourceType\").getString(\"value\").split(\"#\")[1]);\r\n\t\t\t\t}\r\n\t\t\t\tlist.add(sensoryType);\r\n\t\t\t}\r\n\t\t\treturn list;\r\n\t\t} catch (JSONException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn null;\r\n\t}"
] | [
"0.78856254",
"0.76925975",
"0.7676969",
"0.735771",
"0.72728896",
"0.71445876",
"0.7132228",
"0.6889674",
"0.68339366",
"0.6832301",
"0.68297714",
"0.6821778",
"0.6599267",
"0.6592023",
"0.65471256",
"0.65212035",
"0.6468237",
"0.64549845",
"0.6430503",
"0.64194673",
"0.6402057",
"0.6392486",
"0.6374197",
"0.63671976",
"0.63447845",
"0.6324365",
"0.62891126",
"0.6280899",
"0.62322986",
"0.6227515",
"0.62157804",
"0.6206402",
"0.6190095",
"0.616415",
"0.61529225",
"0.61382186",
"0.6135357",
"0.60923934",
"0.60168767",
"0.6016766",
"0.6014764",
"0.6013002",
"0.6001824",
"0.5920685",
"0.5896025",
"0.5873127",
"0.5865863",
"0.5846931",
"0.58412695",
"0.5839273",
"0.58262736",
"0.5820639",
"0.5820158",
"0.58179086",
"0.58042365",
"0.5768164",
"0.5767441",
"0.57565457",
"0.57540643",
"0.57517624",
"0.57295406",
"0.57279366",
"0.57239467",
"0.5718178",
"0.57116777",
"0.57092136",
"0.5700918",
"0.56875086",
"0.5685476",
"0.56800073",
"0.56547326",
"0.56343096",
"0.56319344",
"0.5628228",
"0.5627053",
"0.56247765",
"0.5614165",
"0.56115043",
"0.5604653",
"0.5604024",
"0.5591669",
"0.55801344",
"0.5566122",
"0.5563899",
"0.5560136",
"0.55347747",
"0.5530948",
"0.5523788",
"0.5522653",
"0.5516116",
"0.55158955",
"0.5511529",
"0.55109555",
"0.5500486",
"0.5489522",
"0.54850936",
"0.5481913",
"0.5475399",
"0.5471099",
"0.54685336"
] | 0.76278347 | 3 |
This method indicates if the specified user is responsible of resources. | public boolean isResponsible(User user) {
HashMap<String, Object> filters = new HashMap<>();
filters.put("responsible", new ValueParameter(user));
return !this.filter(filters).isEmpty();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void isAllowed(String user) {\n \r\n }",
"@Override\n public boolean hasAccess(User user) {\n return user.hasRole(RoleValue.APP_ADMIN) || this.equals(user.company);\n }",
"@Override\n\tpublic boolean isUser(User user) {\n\t\treturn false;\n\t}",
"public boolean isEditableByUser() {\r\n if ((this.currentStatusChange == null) ||\r\n (this.currentStatusChange.equals(PoStatusCode.PROPOSED)))\r\n return true;\r\n return false;\r\n }",
"private boolean isInstructor(User user)\r\n {\r\n if (LOG.isDebugEnabled())\r\n {\r\n LOG.debug(\"isInstructor(User \" + user + \")\");\r\n }\r\n if (user != null)\r\n return SecurityService.unlock(user, \"site.upd\", getContextSiteId());\r\n else\r\n return false;\r\n }",
"boolean isEligible(@Nonnull Urn userUrn, @Nonnull RecommendationRequestContext requestContext);",
"@Override\n public boolean requiresUser() {\n return false;\n }",
"boolean isSetRequiredResources();",
"public boolean basicEligibilityCheck(User user) {\n\t\tif(checkUser( user)) \r\n\t\t\treturn true;\r\n\t\telse \r\n\t\t\treturn false;\r\n\t\t\r\n\t\t\r\n\t}",
"@Override\n public boolean isUser() {\n return false;\n }",
"public boolean hasUser(){\n return numUser < MAX_USER;\n }",
"private boolean isUserSatisfyParameters(User user) {\n switch (this.CommunityType) {\n case SwissArmyKnife.SUBSCRIPTIONS:\n return SwissArmyKnife.MAX_SUBSCRIPTIONS_PER_USER > user.getFriendsCount();\n\n case SwissArmyKnife.LIKES:\n return SwissArmyKnife.MAX_LIKES_PER_USER > user.getFavouritesCount();\n\n case SwissArmyKnife.HASHTAGS:\n return false;\n\n case SwissArmyKnife.COMMENTS:\n return false;\n\n case SwissArmyKnife.Geolocalisation:\n return user.isGeoEnabled();\n }\n\n return false;\n }",
"public abstract boolean isUsable();",
"private boolean isNotCurrentUser(User user) {\n if (user.getEmail().equals(mEncodedEmail)) {\n /* Toast appropriate error message if the user is trying to add themselves */\n Toast.makeText(mActivity,\n mActivity.getResources().getString(R.string.toast_you_cant_add_yourself),\n Toast.LENGTH_LONG).show();\n return false;\n }\n return true;\n }",
"private void checkRights() {\n image.setEnabled(true);\n String user = fc.window.getUserName();\n \n for(IDataObject object : objects){\n ArrayList<IRights> rights = object.getRights();\n \n if(rights != null){\n boolean everybodyperm = false;\n \n for(IRights right : rights){\n String name = right.getName();\n \n //user found, therefore no other check necessary.\n if(name.equals(user)){\n if(!right.getOwner()){\n image.setEnabled(false);\n }else{\n image.setEnabled(true);\n }\n return;\n //if no user found, use everybody\n }else if(name.equals(BUNDLE.getString(\"Everybody\"))){\n everybodyperm = right.getOwner();\n }\n }\n image.setEnabled(everybodyperm);\n if(!everybodyperm){\n return;\n }\n }\n }\n }",
"public void testUserAlwaysImpliesItself() {\n User user = RoleFactory.createUser(\"foo\");\n \n assertTrue(m_roleChecker.isImpliedBy(user, user));\n }",
"public TUseStatus getUseStatus(TIdentifiable user, TIdentifiable resource) {\r\n int row = m_users.getIndex(user);\r\n int column = m_resources.getIndex(resource);\r\n if (row >= 0 && column >= 0) \r\n return m_associations[column][row];\r\n else \r\n return null;\r\n }",
"public boolean isUser()\n\t{\n\t\treturn (id != -1);\n\t}",
"boolean hasUserManaged();",
"public boolean canBorrowBook(User user) {\r\n \t\tif (book == null) {\r\n \t\t\treturn false;\r\n \t\t}\r\n \r\n \t\t// Zkontroluje, jestli náhodou nemám půjčený exemplář\r\n \t\tList<Exemplar> exemplars = exemplarMgr.findByBook(book);\r\n \t\tif (!exemplars.isEmpty()) {\r\n \t\t\tfor (Exemplar e : exemplars) {\r\n \t\t\t\tSystem.out.println(e);\r\n \t\t\t\t// book is already borrowed or borrowed by user\r\n \t\t\t\tif (e.getIsBorrowed() || e.isBorrowedByUser(user)) {\r\n \t\t\t\t\treturn false;\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \r\n \t\tList<Booking> booking = bookingMgr.find(book);\r\n \t\t// no booking record\r\n \t\tif (booking.isEmpty()) {\r\n \t\t\treturn true;\r\n \t\t}\r\n \r\n \t\t// can borrow only if is first in list\r\n \t\tif (booking.get(0).getUser().getIduser() == user.getIduser()) {\r\n \t\t\treturn true;\r\n \t\t}\r\n \r\n \t\treturn false;\r\n \t}",
"boolean isHasResources();",
"public abstract boolean checkPolicy(User user);",
"private boolean isCurrentDataWasChanedByAnotherUser(final Monthly_report_revision monthlyReport) {\n Monthly_report_revision currentMonthlyReport = this.monthly_reportRepository.findAndRefresh(monthlyReport);\n return !StringUtils.equalsIgnoreCase(monthlyReport.getShounin_joutai(),\n currentMonthlyReport.getShounin_joutai());\n }",
"private boolean canCreateProposal( Person user ) {\n\t\tApplicationTask task = new ApplicationTask( TaskName.CREATE_PROPOSAL );\n\t\tTaskAuthorizationService taskAuthenticationService = KraServiceLocator.getService( TaskAuthorizationService.class );\n\t\treturn taskAuthenticationService.isAuthorized( user.getPrincipalId(), task );\n\t}",
"private void checkCarIsListed(Car user) {\r\n\r\n if (cars.containsCar(user)) {\r\n System.out.println(\"The car has been successfully listed\");\r\n } else {\r\n System.out.println(\"The car is no longer listed\");\r\n }\r\n\r\n }",
"private boolean hasUserImportantView() {\n int userID = this.sharedPreferences.getInt(Constants.SP_USER_ID_KEY, 0);\n return this.sharedPreferences.getBoolean(serverName + \"_\" + userID, false);\n }",
"public boolean isBeingUsed()\n\t{\n\t\treturn usedBy != null;\n\t}",
"private boolean userUnderJurisdiction(String userID) {\r\n\t\tif ((userID.equals(\"Angela\") || userID.equals(\"Rosendo\")))\r\n\t\t\treturn true;\r\n\t\treturn false;\r\n\t}",
"@XmlTransient\n\tpublic boolean isCanActivateUser() {\n\t\treturn (isSecurityAdministrator() && isSelfRegistrationEnabled());\n\t}",
"private boolean canUserBindToDeviceOwnerLocked(int userId) {\n if (!mOwners.hasDeviceOwner() || userId == mOwners.getDeviceOwnerUserId()) {\n return false;\n }\n\n // The user must have a profile owner that belongs to the same package as the device owner.\n if (!mOwners.hasProfileOwner(userId) || !TextUtils.equals(\n mOwners.getDeviceOwnerPackageName(), mOwners.getProfileOwnerPackage(userId))) {\n return false;\n }\n\n // The user must be affiliated.\n return isUserAffiliatedWithDeviceLocked(userId);\n }",
"@Override\n public boolean hasAccessPermission(String user, NamespaceKey key, DatasetConfig datasetConfig) {\n return userPredicate.test(user);\n }",
"public void flagUser() {\n\t\tsuper.flagUser();\n\t}",
"@Override\n\tpublic boolean hasAvailability(String userId) throws ASException {\n\t\tUser user = userDao.get(userId, true);\n\t\t\n\t\t// No messaging enabled means no coupons received\n\t\tif( !user.getGeoFenceEnabled() || !user.getReceivePushMessages() ) \n\t\t\treturn false;\n\t\t\n\t\t// if has an active lock, means false\n\t\tif( dmlDao.hasActiveLocks(userId, new Date()))\n\t\t\treturn false;\n\t\t\n\t\t// No surprises till now... means it's OK\n\t\treturn true;\n\t}",
"public boolean canDoStealPlayerResource(Player victim) {\n\t\t if(victim == null || victim.getResourceCardHandSize() <= 0) {\n\t\t\t return false;\n\t\t }\n\t\t return true;\n\t }",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean hasUser() {\n return user_ != null;\n }",
"private boolean hasEscalatingPrivilegesOnWrite(List<String> verbs, List<String> resources) {\n if (Collections.disjoint(verbs, EscalatingResources.ESCALATING_VERBS)) {\n return false;\n }\n\n return !Collections.disjoint(resources,\n EscalatingResources.ESCALATING_RESOURCES_ON_WRITE);\n }",
"@Override\r\n\tpublic boolean addExamManager(IUser user) {\n\t\treturn false;\r\n\t}",
"@Override\n\tpublic boolean isVeifyUser(Lt_User user) throws Lt_Blog_Exception {\n\t\treturn false;\n\t}",
"public boolean hasObjUser() {\n return objUser_ != null;\n }",
"boolean isPermissionsReviewRequired(@NonNull String packageName,\n @UserIdInt int userId);",
"private boolean pluginIsAwareOf(ApplicationUser user, SshKey inspectedKey) {\n SshKeyEntity knownKey = enterpriseKeyRepository.findSingleUserKey(user);\n return null != knownKey && knownKey.getText().equals(inspectedKey.getText());\n }",
"boolean hasObjUser();",
"boolean hasUserInterest();",
"boolean hasUserInterest();",
"boolean isNilRequiredResources();",
"public void setRequested(User requested) {\n this.requested = requested;\n }",
"public void setRequestedBy(String requestedBy) {\n this.requestedBy = requestedBy;\n }",
"public boolean isSetRequesting_user() {\n return this.requesting_user != null;\n }",
"boolean canRedoExpenseTracker() throws NoUserSelectedException;",
"public boolean hasUser() {\n return user_ != null;\n }",
"public boolean hasAccount(String user);",
"public Vector getResources(TIdentifiable user) {\r\n int row = m_users.getIndex(user);\r\n Vector result = new Vector();\r\n TUseStatus useStatus;\r\n\t if (row >= 0) {\r\n for (int a=0; a < m_current_resources_count; a++)\r\n if (m_associations[a][row]!=null) {\r\n useStatus = m_associations[a][row];\r\n if (useStatus.getStatus()!=useStatus.NO_ASSOCIATION) result.addElement(useStatus);\r\n }\r\n return result;\r\n } else return null;\r\n }",
"public boolean isDisplayResourceOnly() {\n return false;\n }",
"private boolean isUserActivated(DUsers user) {\n return isUserWithMoreHits(user, 30);\n }",
"private Boolean canUserValidate() throws ServeurException, ClientException {\n // Direct on/off line\n return checkValidatePermission();\n }",
"@Override\n public void setUserVisibleHint(boolean isVisibleToUser) {\n super.setUserVisibleHint(isVisibleToUser);\n if (isVisibleToUser && !alreadyMadeApplicationsApiCall) {\n alreadyMadeApplicationsApiCall = true;\n fetchItemsWithUrl(getActivity(), ApiManager.getApprovedApplicationsUrl());\n }\n }",
"public void setUseStatus(TIdentifiable user, TIdentifiable resource, TUseStatus status) {\r\n int row = m_users.getIndex(user);\r\n int column = m_resources.getIndex(resource);\r\n if (row >= 0 && column >= 0) m_associations[column][row] = status;\r\n }",
"public boolean isEnabledByUser() {\n return mEnabledByUser;\n }",
"public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }",
"public boolean hasUser() {\n return userBuilder_ != null || user_ != null;\n }",
"public boolean canTradeResourcesToBank(ResourceType resourceType) {\n\t\tint neededAmount = getTradeRate(resourceType);\n\t\tint amountOwned = getNumberResourcesOfType(resourceType);\n\t\t// check if we have enough to trade \n\t\tif(neededAmount < amountOwned) {\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}",
"@Override\n public boolean test(User user) {\n return user.getPoints() > 160;\n }",
"public boolean isUseable()\n {\n if (state == 0)\n {\n return true;\n }\n return false;\n }",
"public void setResponsible(String responsible) {\n\t\tthis.responsible = responsible;\n\t}",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean isSetUser() {\n return this.user != null;\n }",
"public boolean shouldConfirmCredentials(int userId) {\n synchronized (this.mLock) {\n boolean z = false;\n if (this.mStartedUsers.get(userId) == null) {\n return false;\n }\n }\n }",
"boolean isAchievable();",
"public boolean hasObjUser() {\n return instance.hasObjUser();\n }",
"boolean checkAvailable(String userName);",
"public boolean hasUser() {\n return instance.hasUser();\n }",
"public Boolean isAuthorized(String userId);",
"@Override\r\n\tpublic boolean checkUser(User user) {\n\t\tint age = user.getAge();\r\n\t\tint height = user.getHeight();\r\n\t\tint weight = user.getWeight();\r\n\t\tString country =user.getCountry();\r\n\t\t if((age>=18 && age<=35) && (height>=155 && height<=170) && (weight>=55 && weight<=90) && country.equals(\"ProGrad\")) \r\n\t\t\t return true;\r\n\t\t else \r\n\t\t\t return false;\r\n\t }",
"private Boolean isReserved(final String username) {\n return usernameReservations.containsKey(username.toLowerCase());\n }",
"public boolean isUsernameAvailable(String i_userName) throws Exception\n\t{\n\t\treturn !(doesCustVendExist((short) -1, i_userName, k_doesCustomerExistByName)) || !(doesCustVendExist((short) -1, i_userName, k_doesVendorExistByName));\n\t}",
"public boolean isUserManual() {\n\n if (ACTION_UserForm.equals(getAction()) || ACTION_UserWindow.equals(getAction()) || ACTION_UserWorkbench.equals(getAction())) {\n return true;\n }\n\n return false;\n\n }",
"@Override\n public Boolean isCollegeManger(UserDTO user) {\n return user.getRoles().contains(RoleTypeEnum.COLLEGE);\n }",
"public static boolean isUsers() {\n try {\n Engine.getUsers();\n return true;\n } catch (IOException e) {\n MessagePrint.println(MessagePrint.Stream.ERR, e.getMessage());\n return false;\n }\n }",
"public static void adminOrOwnerCheck(User current,\n User resourceOwner)\n throws ServiceException {\n\n if (!current.equals(resourceOwner) &&\n !current.isRole(\"ROLE_ADMIN\")) {\n throw new ServiceException(ServiceStatus.ACCESS_DENIED);\n }\n }",
"@Override\r\n protected void mayProceed() throws InsufficientPermissionException {\n if (ub.isSysAdmin() || ub.isTechAdmin()) {\r\n return;\r\n }\r\n// if (currentRole.getRole().equals(Role.STUDYDIRECTOR) || currentRole.getRole().equals(Role.COORDINATOR)) {// ?\r\n// ?\r\n// return;\r\n// }\r\n\r\n addPageMessage(respage.getString(\"no_have_correct_privilege_current_study\") + respage.getString(\"change_study_contact_sysadmin\"));\r\n throw new InsufficientPermissionException(Page.MENU_SERVLET, resexception.getString(\"not_allowed_access_extract_data_servlet\"), \"1\");// TODO\r\n // above copied from create dataset servlet, needs to be changed to\r\n // allow only admin-level users\r\n\r\n }",
"public boolean hasPermission(String username, ActionContext ctx) {\r\n return username != null;\r\n }",
"public boolean isUseableByPlayer(EntityPlayer p_70300_1_)\n {\n return true;\n }",
"public void user_details()\n {\n\t boolean userdetpresent =userdetails.size()>0;\n\t if(userdetpresent)\n\t {\n\t\t //System.out.println(\"User details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"User details report is not present\");\n\t }\n }",
"boolean hasCustomerUserAccess();",
"public boolean getUserMaintOK() {\n return userMaintOK;\n }",
"protected boolean visibleToUser(String userId,\n Relationship relationship,\n String methodName)\n {\n if (userId.equals(relationship.getCreatedBy()))\n {\n return true;\n }\n\n return repositoryHelper.getBooleanProperty(serviceName,\n CommentMapper.IS_PUBLIC_PROPERTY_NAME,\n relationship.getProperties(),\n methodName);\n }",
"public boolean searchUserInCourse(User targetUser) {\n\n for (int i = 0; i < getUserListInCourse().size(); ++i) {\n if (getUserInUserCourseList(i).getUserName() == targetUser.getUserName()) {\n return true;\n }\n }\n\n return false;\n }",
"private boolean hasUserSetupCompleted(int userHandle) {\n if (!mHasFeature) {\n return true;\n }\n return mInjector.hasUserSetupCompleted(getUserData(userHandle));\n }",
"public final void mo91706b(User user) {\n if (user == null || !user.isSecret()) {\n this.f94788aH.setVisibility(8);\n } else {\n this.f94788aH.setVisibility(0);\n }\n }",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasUser();",
"boolean hasRewardResource();",
"public void notifyResponsibleAssigned(Collection<TestName> arg0, ResponsibilityEntry arg1, SProject arg2, Set<SUser> sUsers) {\n\t\t\r\n\t}",
"Boolean acceptRequest(User user);"
] | [
"0.60732234",
"0.5876864",
"0.5767622",
"0.5766495",
"0.5750802",
"0.5676018",
"0.56363636",
"0.56170774",
"0.56130165",
"0.5597738",
"0.5533889",
"0.55030847",
"0.5485603",
"0.5481293",
"0.5477512",
"0.5465472",
"0.5450837",
"0.5441292",
"0.54329675",
"0.53970677",
"0.5382485",
"0.53817767",
"0.53687286",
"0.53686357",
"0.5366556",
"0.5363297",
"0.53568244",
"0.53363776",
"0.53295183",
"0.53137964",
"0.5308363",
"0.53032094",
"0.53008854",
"0.52844083",
"0.52843696",
"0.52843696",
"0.5280849",
"0.52777785",
"0.5270819",
"0.52661747",
"0.52585554",
"0.52543485",
"0.5243945",
"0.52420914",
"0.52420914",
"0.5212295",
"0.5210456",
"0.5202263",
"0.5196988",
"0.51859546",
"0.51851445",
"0.51790243",
"0.5171015",
"0.5156875",
"0.5142071",
"0.5140083",
"0.51371396",
"0.51293105",
"0.51262206",
"0.51261276",
"0.51261276",
"0.51247704",
"0.51247007",
"0.5108759",
"0.51010597",
"0.5094386",
"0.5094386",
"0.50887597",
"0.5086393",
"0.5084794",
"0.5084264",
"0.5084098",
"0.5078532",
"0.5067276",
"0.50602084",
"0.50505173",
"0.50500876",
"0.5049719",
"0.5046903",
"0.5044776",
"0.5037655",
"0.5035483",
"0.5026875",
"0.501941",
"0.5011188",
"0.5009131",
"0.50063425",
"0.4999565",
"0.49972108",
"0.49881983",
"0.49874708",
"0.49874708",
"0.49874708",
"0.49874708",
"0.49874708",
"0.49874708",
"0.49874708",
"0.49868706",
"0.49860215",
"0.49851376"
] | 0.68849957 | 0 |
Creates a new MainContentPane. | public MainContentPane() {
super();
// Add design-time configured components.
initComponents();
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public MainApp() {\r\n\t\tsuper();\r\n\t\tthis.setSize(642, 455);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"void createMainContent() {\n appContent = new DashboardMain(this);\n }",
"private JComponent buildContentPane() {\r\n contentPane = new ContentPanel(new BorderLayout());\r\n contentPane.add(buildToolBar(), BorderLayout.NORTH);\r\n contentPane.add(buildMainPanel(), BorderLayout.CENTER);\r\n return contentPane;\r\n }",
"public void createContentPane() {\n\t\tLOG.log(\"Creating the content panel.\");\n\t\tCONTENT_PANE = new JPanel();\n\t\tCONTENT_PANE.setBorder(null);\n\t\tCONTENT_PANE.setLayout(new BorderLayout());\n\t}",
"protected void createMainPanel() {\n\t\tthis.mainPanel = new VerticalPanel(); \n\t\tthis.mainPanel.setSpacing(5);\n\t\tthis.mainPanel.setScrollMode(getScrollMode());\n\t}",
"public Container createContentPane()\r\n\t{\r\n\t\t//add items to lvl choice\r\n\t\tfor(int g=1; g<21; g++)\r\n\t\t{\r\n\t\t\tcharLvlChoice.addItem(String.valueOf(g));\r\n\t\t}\r\n\r\n\t\t//add stuff to panels\r\n\t\tinputsPanel.setLayout(new GridLayout(2,2,3,3));\r\n\t\tdisplayPanel.setLayout(new GridLayout(1,1,8,8));\r\n\t\tinputsPanel.add(runButton);\r\n\t\tinputsPanel.add(clearButton);\r\n\t\t\ttimesPanel.add(timesLabel);\r\n\t\t\ttimesPanel.add(runTimesField);\r\n\t\tinputsPanel.add(timesPanel);\r\n\t\t\tlevelPanel.add(levelLabel);\r\n\t\t\tlevelPanel.add(charLvlChoice);\r\n\t\tinputsPanel.add(levelPanel);\r\n\t\t\trunTimesField.setText(\"1\");\r\n\t\tdisplay.setEditable(false);\r\n\r\n\t\trunButton.addActionListener(this);\r\n\t\tclearButton.addActionListener(this);\r\n\r\n\t\tdisplay.setBackground(Color.black);\r\n\t\tdisplay.setForeground(Color.white);\r\n\r\n\t\tsetTabsAndStyles(display);\r\n\t\tdisplay = addTextToTextPane();\r\n\t\t\tJScrollPane scrollPane = new JScrollPane(display);\r\n\t\t\t\tscrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);\r\n\t\t\t\tscrollPane.setPreferredSize(new Dimension(500, 200));\r\n\t\tdisplayPanel.add(scrollPane);\r\n\r\n\t\t//create Container and set attributes\r\n\t\tContainer c = getContentPane();\r\n\t\t\tc.setLayout(new BorderLayout());\r\n\t\t\tc.add(inputsPanel, BorderLayout.NORTH);\r\n\t\t\tc.add(displayPanel, BorderLayout.CENTER);\r\n\r\n\t\treturn c;\r\n\t}",
"private void createContent(final Container container) {\n this.mainPanel = new MainPanel();\n this.mainPanel.setName(\"mainPanel\"); // Fest\n\n if (container != null) {\n // adds the main panel\n container.add(this.mainPanel, BorderLayout.CENTER);\n\n // Handle status bar\n container.add(StatusBar.getInstance(), BorderLayout.SOUTH);\n }\n }",
"public void createMainStage(){\n mainStage = new Stage();\n BorderPane mainPageBp = new BorderPane();\n \n String headerTextMain = \"Main menu\";\n setBorderPaneTop(mainPageBp, headerTextMain, mainStage);\n setBorderPaneCenterMain(mainPageBp);\n setBorderPaneBottomMain(mainPageBp);\n \n Scene sceneMain = new Scene(mainPageBp,Constants.SCENEWIDTH, Constants.SCENEHEIGHT);\n sceneMain.getStylesheets().add(\"/styles/aitBank.css\");// add connection to stylesheet per scene\n mainStage.setTitle(bankName);\n mainStage.setScene(sceneMain);\n }",
"public static void newPane(String resourceURL) throws IOException { \n\t\tMain.root = (Pane) FXMLLoader.load(Main.class.getResource(resourceURL));\n\t\t\n\t}",
"private Component buildMainPanel() {\r\n \tDPanel mainPanel = new DPanel();\r\n \tJLabel backGroundLabel = new JLabel(ImageUtil.getImageIcon(\"happycow.jpg\"));\r\n \tmainPanel.add(backGroundLabel);\r\n \tsetCurrentContentPane(mainPanel);\r\n \thome = mainPanel;\r\n return home;\r\n }",
"public MainPane(BananaBroadcast app, Stage primaryStage) throws IOException {\n\t\tthis.cartouches = app.cartouches;\n\t\tthis.scheduler = app.scheduler;\n\t\tthis.primaryStage = primaryStage;\n\t\tthis.database = app.database;\n\t\tthis.app = app;\n\t\tGuiApp.loadLayout(this, \"MainPane.fxml\");\n\t}",
"public AppMain(String title) {\n setTitle(title);\n leftPanel = new LeftPanel();\n jTabbedPane = new JTabbedPane();\n menuBar = new JMenuBar();\n addMenuItems();\n horizontalPane = new JSplitPane(JSplitPane.HORIZONTAL_SPLIT, leftPanel, jTabbedPane);\n verticalPane = new JSplitPane(JSplitPane.VERTICAL_SPLIT, menuBar, horizontalPane);\n horizontalPane.setResizeWeight(0.2);\n verticalPane.setResizeWeight(0.03);\n add(verticalPane);\n setSize(1280, 720);\n setVisible(true);\n setResizable(false);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n verticalPane.resetToPreferredSizes();\n horizontalPane.resetToPreferredSizes();\n horizontalPane.setEnabled(false);\n verticalPane.setEnabled(false);\n addPanelActionListeners();\n createWorkSpace();\n }",
"private FlowPane setMainMenu() {\n FlowPane mainMenu = new FlowPane();\n mainMenu.setAlignment(Pos.CENTER);\n mainMenuButtons = new Button[3];\n String[] buttonText = {\"Flashcards\", \"Quizes\", \"Scores\"};\n for (int i = 0; i < mainMenuButtons.length; i++) {\n mainMenuButtons[i] = createButton(buttonText[i], TEXT_SIZE, 10);\n FlowPane.setMargin(mainMenuButtons[i], new Insets(10, 10, 30, 10));\n mainMenu.getChildren().add(mainMenuButtons[i]);\n }\n return mainMenu;\n }",
"public static AnchorPane getContentBox(){\n return MainUIController.contentBox;\n }",
"public Scene createScene() {\n\t\tmyRoot = new AnchorPane();\n\t\tmyTabs = new TabPane();\n\t\tButton newTab = new Button(CREATE_NEW_TAB);\n\t\tnewTab.setOnAction(event -> createNewTab());\n\t\t\n\t\tTabMainScreen mainScreen = new TabMainScreen(myResources.getString(WORKSPACE) + (myTabs.getTabs().size()));\n\t\tTabHelp help1 = new TabHelp(myResources.getString(BASIC_COMMANDS), HELP_TAB_TEXT1);\n\t\tTabHelp help2 = new TabHelp(myResources.getString(EXTENDED_COMMANDS), HELP_TAB_TEXT2);\n\t\t\n\t\tmyTabs.getTabs().addAll(mainScreen.getTab(myStage), help1.getTab(), help2.getTab());\n\t\t\n\t\tAnchorPane.setTopAnchor(myTabs, TABS_OFFSET);\n\t\tAnchorPane.setTopAnchor(newTab, NEWTAB_OFFSET);\n\t\t\n\t\tmyRoot.getChildren().addAll(myTabs, newTab);\n\t\n\t\tmyScene = new Scene(myRoot, windowHeight, windowWidth, Color.WHITE);\n\t\treturn myScene;\n\t}",
"@Override\n\tpublic void setPane() {\n\t\tNewTaskPane textListPane = new NewTaskPane();\n\t\trootPane = new HomePane(new MainLeftPane(),textListPane);\t\t\n\t}",
"protected void createContents() {\r\n\t\tshell = new Shell();\r\n\t\tshell.setSize(450, 300);\r\n\t\tshell.setText(\"SWT Application\");\r\n\r\n\t}",
"public MainFrame(){\n super(\"Across Madrid\");\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setBounds(100,100,700,500);\n\n contentPane = new JPanel(new CardLayout());\n setContentPane(contentPane);\n \n fillContentPane();\n }",
"void createScene(){\n\t\tmainScene = new Scene(mainPane);\r\n\t\t\r\n\t\t//If keyEvent is not focussed on a node on the scene, you can attach\r\n\t\t//a keyEvent to a scene to be consumed by the screen itself.\r\n\t\tCloser closer = new Closer();\r\n\t\tmainScene.setOnKeyPressed(closer);\r\n\t}",
"@Override\n\tpublic JPanel createContentPane() {\n\t\t// Fabriken holen\n\t\tGridBagConstraintsFactory gbcf = GridBagConstraintsFactory.getInstance();\n\t\tWidgetFactory wf = WidgetFactory.getInstance();\n\t\t// Widgets erzeugen\n\t\tJPanel panel = wf.getContentPane(\"MainFrame\", true);\n\t\tpanel.add(createPanelStoredServices(), gbcf.getTableConstraints(0, 1, 1, 1));\n\t\tpanel.add(createPanelEditService(), gbcf.getTableConstraints(0, 2, 1, 1));\n\t\treturn panel;\n\t}",
"private void initMainComponents() {\n\t\tsetBackground(Color.RED);\n\t\tsetTitle(\"TABL\");\n\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tsetBounds(100, 100, 974, 842);\n\t\tcontentPane = new JPanel();\n\t\tcontentPane.setBackground(new Color(100, 149, 237));\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tsetContentPane(contentPane);\n\t\t\n\t\tcontentPane.setVisible(true);\n\t\tcontentPane.setLayout(null);\n\t\t\n\t\t\n\t\tlayeredPane = new JLayeredPane();\n\t\tlayeredPane.setBounds(10, 40, 941, 757);\n\t\tcontentPane.add(layeredPane);\n\t\t\n\t\tsetForeground(Color.BLACK);\n\t\tsetIconImage(Toolkit.getDefaultToolkit().getImage(AdminManageUsers.class.getResource(\"/resources/Logo.PNG\")));\n\n\t}",
"public void initMainLayout() {\n\t\ttry {\n\t\t\t// Load root layout from fxml file.\n\t\t\tFXMLLoader loader = new FXMLLoader();\n\t\t\tloader.setLocation(MainApp.class.getResource(\"view/MainLayout.fxml\"));\n\t\t\trootLayout = (BorderPane) loader.load();\n\n\t\t\t// Show the scene containing the root layout.\n\t\t\tScene scene = new Scene(rootLayout);\n\t\t\tprimaryStage.setScene(scene);\n\t\t\tprimaryStage.show();\n\n\t\t\tMainLayoutController mainLayoutController = loader.getController();\n\t\t\tmainLayoutController.setMainApp(this);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(0);\n\t\t\n\t\t}\n\t}",
"public void mainWindowSimple(Graphic content)\n {\n mainWindow(tool.group(content));\n }",
"public static WaitTitledPane create() {\n WaitTitledPane newContent = new WaitTitledPane();\n try {\n ViewControllerLoader.initializeCustomControl(newContent);\n } catch (IOException ex) {\n throw new InternalError(\"Error loading view\", ex);\n }\n return newContent;\n }",
"private void createLayeredPane(){\n\t\tcontentPane = new JLayeredPane();\n\t\tcontentPane.setPreferredSize(windowSize);\n\t\tcontentPane.setOpaque(true);\n\t\tcontentPane.setVisible(true);\n\t}",
"public void mainWindow() {\n new MainWindow(this);\n }",
"private JPanel getAboutContentPane() {\n\t\tif (aboutContentPane == null) {\n\t\t\taboutContentPane = new JPanel();\n\t\t\taboutContentPane.setLayout(new BorderLayout());\n\t\t\taboutContentPane.add(getAboutVersionLabel(), BorderLayout.CENTER);\n\t\t}\n\t\treturn aboutContentPane;\n\t}",
"private void constructMainPanel() {\n // initialize the main panel\n mainPanel = new JPanel();\n mainPanel.setLayout(new BoxLayout(mainPanel, BoxLayout.Y_AXIS));\n mainPanel.setPreferredSize(new Dimension(model.getWidth() + 50,\n model.getHeight() + 240));\n JScrollPane mainPane = new JScrollPane(mainPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS,\n ScrollPaneConstants.HORIZONTAL_SCROLLBAR_ALWAYS);\n this.add(mainPane);\n\n }",
"public MainPage() {\n initComponents();\n \n initPage();\n }",
"protected void createContents() {\r\n\t\tsetText(\"SWT Application\");\r\n\t\tsetSize(450, 300);\r\n\r\n\t}",
"public void createUI() {\r\n\t\ttry {\r\n\t\t\tJPanel centerPanel = this.createCenterPane();\r\n\t\t\tJPanel westPanel = this.createWestPanel();\r\n\t\t\tm_XONContentPane.add(westPanel, BorderLayout.WEST);\r\n\t\t\tm_XONContentPane.add(centerPanel, BorderLayout.CENTER);\r\n\t\t\tm_XONContentPane.revalidate();\r\n\t\t} catch (Exception ex) {\r\n\t\t\tRGPTLogger.logToFile(\"Exception at createUI \", ex);\r\n\t\t}\r\n\t}",
"public Main(){\n \tsetSize(new Dimension(1024, 768));\n \t\n \t//setUndecorated(true); // borderless (fullscreen) window\n \tsetExtendedState(getExtendedState() | JFrame.MAXIMIZED_BOTH); // maximize window\n \t\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n setTitle(\"Game\");\n setLocationRelativeTo(null); // center on screen\n\n \tContentLoader.LoadContent();\n init();\n start();\n }",
"public MainView() {\n initComponents();\n \n }",
"public MainView() {\r\n\t\tinitialize();\r\n\t}",
"private JPanel getAboutContentPane() {\n if (aboutContentPane == null) {\n aboutContentPane = new JPanel();\n aboutContentPane.setLayout(new BorderLayout());\n aboutContentPane.add(getAboutVersionLabel(), BorderLayout.CENTER);\n }\n return aboutContentPane;\n }",
"public MainView() {\n initComponents();\n setExtendedState(javax.swing.JFrame.MAXIMIZED_BOTH);\n }",
"private Parent mainMenu() {\n BorderPane menu = new BorderPane();\n menu.setPrefSize(1200, 900);\n\n Image image = new Image(\"/menu.png\");\n ImageView img = new ImageView(image);\n img.setFitHeight(400);\n img.setFitWidth(400);\n\n\n //if cheat is on, user can see pieces on computer board --> for testing purposes\n cheatON.setToggleGroup(groupCheat);\n cheatOFF.setToggleGroup(groupCheat);\n HBox cheat = new HBox(cheatON, cheatOFF);\n cheatOFF.setSelected(true);\n //select difficulty\n easy.setToggleGroup(groupDiff);\n hard.setToggleGroup(groupDiff);\n HBox Diff = new HBox(easy, hard);\n hard.setSelected(true);\n\n Label welcome = new Label(\"Welcome!\");\n Label Cheat = new Label(\"Cheats\");\n Label diff = new Label(\"Difficulty\");\n\n Cheat.setAlignment(Pos.CENTER);\n cheat.setAlignment(Pos.CENTER);\n\n diff.setAlignment(Pos.CENTER);\n Diff.setAlignment(Pos.CENTER);\n\n\n HBox buttons = new HBox(40, startGame, exit);\n\n buttons.setAlignment(Pos.CENTER);\n\n menu.setStyle(\"-fx-background-color: #B5D3E7\");\n\n VBox difficulty = new VBox(5, diff, Diff);\n VBox cheater = new VBox(5, Cheat, cheat);\n difficulty.setAlignment(Pos.CENTER);\n cheater.setAlignment(Pos.CENTER);\n\n VBox vbox = new VBox(30, welcome, img, buttons, difficulty, cheater);\n vbox.setAlignment(Pos.CENTER);\n //use some CSS inline styling\n vbox.setStyle(\"-fx-background-image: url('/menu.png');\" +\n \"-fx-background-repeat: stretch;\" +\n \"-fx-background-size: 400 300;\" +\n \"-fx-background-position: center center;\"\n );\n menu.setCenter(vbox);\n\n\n return menu; //return root\n }",
"private void initPane() {\n\t\tContainer localContainer = getContentPane();\n\t\tlocalContainer.setLayout(new BorderLayout());\n\t\t\n\t\tsplitpane_left_top.setBorder(BorderFactory.createTitledBorder(\"Training Data\"));\n\t\tsplitpane_left_bottom.setBorder(BorderFactory.createTitledBorder(\"Tree View\"));\n\t\tsplitpane_left.setDividerLocation(400);\n\t\tsplitpane_left.setLastDividerLocation(0);\n\t\tsplitpane_left.setOneTouchExpandable(true);\n\t\tsplitpane_right.setBorder(BorderFactory.createTitledBorder(\"Classifer Output\"));\n\t\tsplitpane_main.setDividerLocation(500);\n\t\tsplitpane_main.setLastDividerLocation(0);\n\t\tsplitpane_main.setOneTouchExpandable(true);\n\t\tlocalContainer.add(splitpane_main, \"Center\");\n\t\tlocalContainer.add(statusPanel,BorderLayout.SOUTH);\n\t}",
"public abstract void createContents(Panel mainPanel);",
"final JPanel createMainPanel() {\r\n\r\n logger.entering(this.getClass().getName(), \"createMainPanel\");\r\n\r\n this.pnlMain = new JPanel();\r\n\r\n this.pnlMain.setLayout(new BorderLayout());\r\n\r\n this.pnlMain.add(new JLabel(\r\n \"Select the MicroSensorDataTypes that shall be filtered out\"),\r\n BorderLayout.NORTH);\r\n\r\n this.pnlMain.add(createCheckBoxPanel(), BorderLayout.CENTER);\r\n\r\n this.pnlMain.add(getButtonPanel(), BorderLayout.SOUTH);\r\n\r\n logger.exiting(this.getClass().getName(), \"createMainPanel\",\r\n this.pnlMain);\r\n\r\n return this.pnlMain;\r\n }",
"public void displayTestPane() {\n mainWindow.setContent(new TestPane());\n console = null;\n }",
"public void addContent() {\n ScrollPane mySP = new ScrollPane();\n myContent = new SaveForm(myManager);\n mySP.setContent(myContent);\n mySP.setPrefSize(size, size);\n myRoot.getChildren().add(mySP);\n }",
"public PaneOrganizer() {\n\t\t_root = new BorderPane(); // new border pane\n\t\t\n\t\tLabel score = new Label(\"Score: 0\"); // score label\n\t\tscore.setTextFill(Color.WHITE); // text color\n\t\t\n\t\tLabel lives = new Label(\"Lives: 3\"); // lives label\n\t\tlives.setTextFill(Color.WHITE); // text color\n\t\t\n\t\tGame game = new Game(score, lives); // game pane\n\t\tHBox hbox = new HBox(); // hbox to organize the quit button\n\n\t\tButton quit = new Button(\"Quit\"); // Creating quit button\n\t\tquit.setOnAction(new QuitHandler()); // add the quit handler\n\t\tquit.minHeight(Constants.QUIT_HEIGHT); // sizing\n\n\t\thbox.getChildren().addAll(quit, score, lives); // add components to hbox\n\t\thbox.setSpacing(20);\n\t\t\n\t\t_root.setCenter(game); // set the game pane\n\t\t_root.setBottom(hbox); // set the hbox\n\t\t_root.setStyle(\"-fx-background-color: black\");\n\t}",
"private void createScene() \n {\n PlatformImpl.startup(\n new Runnable() {\n public void run() { \n Group root = new Group(); \n Scene scene = new Scene(root, 80, 20); \n SizeView sizeview = createSizeView(scene);\n root.getChildren().add(sizeview);\n jfxPanel.setScene(scene); \n } \n }); \n }",
"protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(838, 649);\n\n\t}",
"protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(656, 296);\n\n\t}",
"private void buildContentPane() {\n\t\t// The JPanel that will become the content pane\n\t\tJPanel cp = new JPanel();\n\t\tcp.setLayout(new BoxLayout(cp, BoxLayout.PAGE_AXIS));\n\n\t\tlanguagePanel = initLanguagePanel();\n\t\tcp.add(languagePanel);\n\n\t\tinputPanel = initInputPanel();\n\t\tcp.add(inputPanel);\n\n\t\tJPanel btnPanel = initBtnPanel();\n\t\tcp.add(btnPanel);\n\n\t\toutputPanel = initOutputPanel();\n\t\tcp.add(outputPanel);\n\n\t\tJPanel picturePanel = initPicturePanel();\n\t\tif(picturePanel == null) {\n\t\t\tframe.setSize(FRAME_WIDTH, FRAME_SMALL_HEIGHT);\n\t\t}\n\t\telse {\n\t\t\tcp.add(picturePanel);\n\t\t}\n\n\t\tLanguage selectedLang = languagePanel.getSelectedLanguage();\n\t\tsetLanguage(selectedLang);\n\n\t\tframe.setContentPane(cp);\n\t}",
"@FXML\n private void showMenu(){\n Main.setPane(0);\n }",
"public MasterGUI() {\n\n\t\tmainFrame.setPreferredSize(FRAME_SIZE);\n\t\tmainFrame.pack();\n\n\t\tmainPane.addTab(\"Element\", new ElementGUI().elementMainPanel);\n\t\tmainPane.addTab(\"Metal\", new MetalGUI().metalMainPanel);\n\t\tmainPane.addTab(\"Compound\", new CompoundGUI().compoundMainPanel);\n\t\tmainPane.addTab(\"Acid\", new AcidGUI().acidMainPanel);\n\t\tmainPane.addTab(\"Base\", new BaseGUI().baseMainPanel);\n\t\tmainPane.addTab(\"Chemical\", new ChemicalGUI().chemicalMainPanel);\n\n\t\tmainFrame.add(mainPane);\n\t\tmainFrame.setVisible(true);\n\t}",
"private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(null);\r\n\r\n\t\t\tJTabbedPane mainTabbedPane = new JTabbedPane(JTabbedPane.TOP);\r\n\t\t\tmainTabbedPane.setBounds(10, 29, 606, 331);\r\n\t\t\tjContentPane.add(mainTabbedPane);\r\n\t\t\tmainTabbedPane.addTab(\"Verify\", null, getVerifyPanel(), null);\r\n\t\t\tmainTabbedPane.addTab(\"Add/Capture\", null, getCapturePanel(), null);\r\n\t\t\tmainTabbedPane.addTab(\"Train\", null, getTrainPanel(), null);\r\n\t\t\t// mainTabbedPane.addTab(\"Train Data Editor\", null,\r\n\t\t\t// getTrainTestDataEditorPanel(), null);\r\n\t\t\tjContentPane.add(getStatusLabel());\r\n\t\t\tjContentPane.add(getAboutLabel());\r\n\r\n\t\t\tJLabel lblMouseGestureRecognition = new JLabel(\"Mouse Gesture Recognition\");\r\n\t\t\tlblMouseGestureRecognition.setFont(new Font(\"Arial\", Font.BOLD, 15));\r\n\t\t\tlblMouseGestureRecognition.setBounds(410, 11, 206, 27);\r\n\t\t\tjContentPane.add(lblMouseGestureRecognition);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}",
"private void createUI() {\n\t\tthis.rootPane = new TetrisRootPane(true);\n\t\tthis.controller = new TetrisController(this, rootPane, getWorkingDirectory());\n\t\tthis.listener = new TetrisActionListener(controller, this, rootPane);\n\t\t\n\t\trootPane.setActionListener(listener);\n\t\trootPane.setGameComponents(controller.getGameComponent(), controller.getPreviewComponent());\n\t\trootPane.initialize();\n\t\t\n\t\tPanelBorder border = controller.getPlayer().getPanel().getPanelBorder(\"Tetris v\" + controller.getVersion());\n\t\tborder.setRoundedCorners(true);\n\t\tJPanel panel = new JPanel(new FlowLayout(FlowLayout.CENTER, 0, 0));\n\t\tpanel.setBackground(getBackgroundColor(border.getLineColor()));\n\t\tpanel.setBorder(border);\n\t\tpanel.setPreferredSize(new Dimension(564, 551));\n\t\tpanel.add(rootPane);\n\t\trootPane.addPanelBorder(border, panel);\n\t\t\n\t\tthis.setContentPane(panel);\n\t\tthis.setSize(564, 550);\n\t\t\n\t\tcontroller.initializeUI();\n\t}",
"private JPanel getJContentPane() {\r\n if (jContentPane == null) {\r\n jContentPane = new JPanel();\r\n jContentPane.setLayout(new BorderLayout());\r\n }\r\n return jContentPane;\r\n }",
"private JPanel getJContentPane() {\n\t\tif (jContentPane == null) {\n\t\t\tjContentPane = new JPanel();\n\t\t\tjContentPane.setLayout(new BorderLayout());\n\t\t\tjContentPane.setBorder(javax.swing.BorderFactory.createEmptyBorder(\n\t\t\t\t\t5, 5, 5, 5));\n\t\t\tjContentPane.add(getButtonPanel(), java.awt.BorderLayout.SOUTH);\n\t\t\tjContentPane.add(getScrollPane(), java.awt.BorderLayout.CENTER);\n\t\t}\n\t\treturn jContentPane;\n\t}",
"@Override\n\tpublic void setPane() {\n\t\tNewSchedulePane SchListPane = new NewSchedulePane();\n\t\trootPane = new HomePane(new MainLeftPane(),SchListPane);\n\t}",
"public AnchorPane getContent(){\r\n\t\treturn root;\r\n\t}",
"private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new BorderLayout());\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}",
"public static void createMainframe()\n\t{\n\t\t//Creates the frame\n\t\tJFrame foodFrame = new JFrame(\"USDA Food Database\");\n\t\t//Sets up the frame\n\t\tfoodFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfoodFrame.setSize(1000,750);\n\t\tfoodFrame.setResizable(false);\n\t\tfoodFrame.setIconImage(icon.getImage());\n\t\t\n\t\tGui gui = new Gui();\n\t\t\n\t\tgui.setOpaque(true);\n\t\tfoodFrame.setContentPane(gui);\n\t\t\n\t\tfoodFrame.setVisible(true);\n\t}",
"private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new BorderLayout());\r\n\t\t\tjContentPane.add(getPanelCrearCuenta(), BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}",
"private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new BorderLayout());\r\n\t\t\tjContentPane.add(getTlbNavigate(), BorderLayout.NORTH);\r\n\t\t\tjContentPane.add(getPnlCenter(), BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}",
"public MainView() {\n initComponents();\n }",
"public MainView() {\n initComponents();\n }",
"public ModuleFrame() {\n javafxPanel = new JFXPanel();\n initComponents();\n this.webViewParent.setLayout(new BorderLayout());\n this.webViewParent.add(javafxPanel, BorderLayout.CENTER);\n this.webViewParent.add(javafxPanel);\n \n this.setDefaultCloseOperation(HIDE_ON_CLOSE);\n }",
"@Override\n\tpublic void setPane() {\n\t\tNewRecordPane RecListPane = new NewRecordPane();\n\t\trootPane = new HomePane(new MainLeftPane(),RecListPane);\n\t}",
"protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tGroup group_1 = new Group(shell, SWT.NONE);\n\t\tgroup_1.setText(\"\\u65B0\\u4FE1\\u606F\\u586B\\u5199\");\n\t\tgroup_1.setBounds(0, 120, 434, 102);\n\t\t\n\t\tLabel label_4 = new Label(group_1, SWT.NONE);\n\t\tlabel_4.setBounds(10, 21, 61, 17);\n\t\tlabel_4.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel label_5 = new Label(group_1, SWT.NONE);\n\t\tlabel_5.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\tlabel_5.setBounds(10, 46, 61, 17);\n\t\t\n\t\tLabel label_6 = new Label(group_1, SWT.NONE);\n\t\tlabel_6.setText(\"\\u5BC6\\u7801\");\n\t\tlabel_6.setBounds(10, 75, 61, 17);\n\t\t\n\t\ttext = new Text(group_1, SWT.BORDER);\n\t\ttext.setBounds(121, 21, 140, 17);\n\t\t\n\t\ttext_1 = new Text(group_1, SWT.BORDER);\n\t\ttext_1.setBounds(121, 46, 140, 17);\n\t\t\n\t\ttext_2 = new Text(group_1, SWT.BORDER);\n\t\ttext_2.setBounds(121, 75, 140, 17);\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.setBounds(31, 228, 80, 27);\n\t\tbtnNewButton.setText(\"\\u63D0\\u4EA4\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(288, 228, 80, 27);\n\t\tbtnNewButton_1.setText(\"\\u91CD\\u586B\");\n\t\t\n\t\tGroup group = new Group(shell, SWT.NONE);\n\t\tgroup.setText(\"\\u539F\\u5148\\u4FE1\\u606F\");\n\t\tgroup.setBounds(0, 10, 320, 102);\n\t\t\n\t\tLabel label = new Label(group, SWT.NONE);\n\t\tlabel.setBounds(10, 20, 61, 17);\n\t\tlabel.setText(\"\\u59D3\\u540D\");\n\t\t\n\t\tLabel lblNewLabel = new Label(group, SWT.NONE);\n\t\tlblNewLabel.setBounds(113, 20, 61, 17);\n\t\t\n\t\tLabel label_1 = new Label(group, SWT.NONE);\n\t\tlabel_1.setBounds(10, 43, 61, 17);\n\t\tlabel_1.setText(\"\\u6027\\u522B\");\n\t\t\n\t\tButton btnRadioButton = new Button(group, SWT.RADIO);\n\t\t\n\t\tbtnRadioButton.setBounds(90, 43, 97, 17);\n\t\tbtnRadioButton.setText(\"\\u7537\");\n\t\tButton btnRadioButton_1 = new Button(group, SWT.RADIO);\n\t\tbtnRadioButton_1.setBounds(208, 43, 97, 17);\n\t\tbtnRadioButton_1.setText(\"\\u5973\");\n\t\t\n\t\tLabel label_2 = new Label(group, SWT.NONE);\n\t\tlabel_2.setBounds(10, 66, 61, 17);\n\t\tlabel_2.setText(\"\\u7528\\u6237\\u7535\\u8BDD\");\n\t\t\n\t\tLabel lblNewLabel_1 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_1.setBounds(113, 66, 61, 17);\n\t\t\n\t\tLabel label_3 = new Label(group, SWT.NONE);\n\t\tlabel_3.setBounds(10, 89, 61, 17);\n\t\tlabel_3.setText(\"\\u5BC6\\u7801\");\n\t\tLabel lblNewLabel_2 = new Label(group, SWT.NONE);\n\t\tlblNewLabel_2.setBounds(113, 89, 61, 17);\n\t\t\n\t\ttry {\n\t\t\tUserDao userDao=new UserDao();\n\t\t\tlblNewLabel_2.setText(User.getPassword());\n\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\n\t\t\t\n\n\t\t\n\t\t\ttry {\n\t\t\t\tList<User> userList=userDao.query();\n\t\t\t\tString results[][]=new String[userList.size()][5];\n\t\t\t\tlblNewLabel.setText(User.getUserName());\n\t\t\t\tlblNewLabel_1.setText(User.getSex());\n\t\t\t\tlblNewLabel_2.setText(User.getUserPhone());\n\t\t\t\tButton button = new Button(shell, SWT.NONE);\n\t\t\t\tbutton.setBounds(354, 0, 80, 27);\n\t\t\t\tbutton.setText(\"\\u8FD4\\u56DE\");\n\t\t\t\tbutton.addSelectionListener(new SelectionAdapter() {\n\t\t\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\t\tshell.dispose();\n\t\t\t\t\t\tbook book=new book();\n\t\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tfor(int i = 0; i < userList.size(); i++) {\n\t\t\t\t\t\tUser user1 = (User)userList.get(i);\t\n\t\t\t\t\tresults[i][0] = user1.getUserName();\n\t\t\t\t\tresults[i][1] = user1.getSex();\t\n\t\t\t\t\tresults[i][2] = user1.getPassword();\t\n\t\n\t\t\t\t\tif(user1.getSex().equals(\"男\"))\n\t\t\t\t\t\tbtnRadioButton.setSelection(true);\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\tbtnRadioButton_1.setSelection(true);\n\t\t\t\t\tlblNewLabel_1.setText(user1.getUserPhone());\n\t\t\t\t}\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\tif(!text_1.getText().equals(\"\")&&!text.getText().equals(\"\")&&!text_2.getText().equals(\"\"))\n\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tuserDao.updateUser(text_1.getText(), text.getText(), text_2.getText());\n\t\t\t\t\tif(!text_1.getText().equals(\"\")&&!text_2.getText().equals(\"\")&&!text.getText().equals(\"\"))\n\t\t\t\t\t{shell.dispose();\n\t\t\t\t\tbook book=new book();\n\t\t\t\t\tbook.open();\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{JOptionPane.showMessageDialog(null,\"用户名或密码不能为空\",\"错误\",JOptionPane.PLAIN_MESSAGE);}\n\t\t\t\t} catch (SQLException e1) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t}\n\t\t\t});\n\t\tbtnNewButton_1.addSelectionListener(new SelectionAdapter() {\n\t\t\tpublic void widgetSelected(final SelectionEvent e){\n\t\t\t\t\ttext.setText(\"\");\n\t\t\t\t\ttext_1.setText(\"\");\n\t\t\t\t\ttext_2.setText(\"\");\n\t\t\t\n\t\t\t}\n\t\t});\n\t}",
"private HorizontalLayout getMainContainer() {\n HorizontalLayout main = new HorizontalLayout();\n main.setWidth(\"100%\");\n main.setHeight(\"100%\");\n\n return main;\n }",
"public Parent creatPanel() {\r\n\t\t\r\n\t\thlavniPanel = new BorderPane();\r\n\t\thlavniPanel.setCenter(creatGameDesk());\r\n\t\thlavniPanel.setTop(createMenuBar());\r\n\t\t\r\n\t\thlavniPanel.setBackground(new Background(new BackgroundFill(Color.BURLYWOOD, CornerRadii.EMPTY, Insets.EMPTY)));\r\n\t\thlavniPanel.setPadding(new Insets(8));\r\n\t\treturn hlavniPanel;\r\n\t}",
"public mainLayoutController() {\n\t }",
"protected void createContents() {\n\t\tsetText(\"SWT Application\");\n\t\tsetSize(437, 529);\n\n\t}",
"private JPanel buildContentPane(){\t\n\t\tinitialiseElements();\n\t\tpanel = new JPanel();\n\t\tpanel.setLayout(new FlowLayout());\n\t\tpanel.setBackground(Color.lightGray);\n\t\tpanel.add(scroll);\n\t\tpanel.add(bouton);\n\t\tpanel.add(bouton2);\n\t\treturn panel;\n\t}",
"public Main() {\n initComponents();\n this.setResizable(false);\n this.setLocationRelativeTo(null);\n }",
"private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new BorderLayout());\r\n\t\t\tjContentPane.add(getJPanel(), BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}",
"private void initGUI() {\n\t\tJPanel mainPanel = new JPanel(new BorderLayout());\n\t\t// This is the story we took from Wikipedia.\n\t\tString story = \"The Internet Foundation Classes (IFC) were a graphics \"\n\t\t\t\t+ \"library for Java originally developed by Netscape Communications \"\n\t\t\t\t+ \"Corporation and first released on December 16, 1996.\\n\\n\"\n\t\t\t\t+ \"On April 2, 1997, Sun Microsystems and Netscape Communications\"\n\t\t\t\t+ \" Corporation announced their intention to combine IFC with other\"\n\t\t\t\t+ \" technologies to form the Java Foundation Classes. In addition \"\n\t\t\t\t+ \"to the components originally provided by IFC, Swing introduced \"\n\t\t\t\t+ \"a mechanism that allowed the look and feel of every component \"\n\t\t\t\t+ \"in an application to be altered without making substantial \"\n\t\t\t\t+ \"changes to the application code. The introduction of support \"\n\t\t\t\t+ \"for a pluggable look and feel allowed Swing components to \"\n\t\t\t\t+ \"emulate the appearance of native components while still \"\n\t\t\t\t+ \"retaining the benefits of platform independence. This feature \"\n\t\t\t\t+ \"also makes it easy to have an individual application's appearance \"\n\t\t\t\t+ \"look very different from other native programs.\\n\\n\"\n\t\t\t\t+ \"Originally distributed as a separately downloadable library, \"\n\t\t\t\t+ \"Swing has been included as part of the Java Standard Edition \"\n\t\t\t\t+ \"since release 1.2. The Swing classes are contained in the \"\n\t\t\t\t+ \"javax.swing package hierarchy.\\n\\n\";\n\t\t// We create the TextArea and pass the story in as an argument.\n\t\tJTextArea storyArea = new JTextArea(story);\n\t\tstoryArea.setEditable(true);\n\t\tstoryArea.setWrapStyleWord(true);\n\t\t// We create the ScrollPane and instantiate it with the TextArea as an argument\n\t\tJScrollPane area = new JScrollPane(storyArea);\t\t\t\n\t\tmainPanel.add(area);\t\n\t\tthis.setContentPane(mainPanel);\n\t\tthis.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tthis.setSize(350, 300);\n\t\tthis.setVisible(true);\n\t}",
"private void fillContentPane() {\n\t\tadd(Box.createRigidArea(new Dimension(0,10))); //empty spacing\n\n\t\tsetWelcomeText(\"testFirst\", \"testLast\");//TODO remove? the cardChanger sets this when go to this page\n\t\twelcomeText.setAlignmentX(Component.CENTER_ALIGNMENT);\n\t\tadd(welcomeText);\n\n\t\tadd(Box.createRigidArea(new Dimension(0,10))); //empty spacing\n\n\t\tadd(GuiUtilities.centeredJLabel(\"Courses:\"));\n\t\tsetupCourseList();\n\n\t}",
"public GUI () {\n\n System.out.println(\"GUI START\");\n \n main = new JFrame (\"That's Life\");\n \n main.revalidate();\n main.repaint();\n \n main.getContentPane().setBackground(new Color (42, 54, 59));\n main.getContentPane().setForeground(new Color(119, 136, 153));\n main.setLocation(20, 50);\n\n init();\n\n main.setDefaultCloseOperation (JFrame.EXIT_ON_CLOSE);\n main.setSize (1280, 720);\n main.setResizable(false);\n main.setVisible (true);\n \n main.revalidate();\n main.repaint();\n }",
"private JPanel getJContentPane() {\n\t\tif (jContentPane == null) {\n\t\t\tjContentPane = new JPanel();\n\t\t\t// jContentPane.setLayout(new BorderLayout());\n\t\t\tjContentPane.setLayout(new CardLayout());\n\t\t\tjContentPane.setPreferredSize(new Dimension(25, 25));\n\t\t}\n\t\treturn jContentPane;\n\t}",
"@Override\n\tpublic void start(Stage primaryStage) throws Exception {\n\t\tFXMLLoader loader = new FXMLLoader(getClass().getResource(\"app_layout.fxml\"));\n\t\tVBox rootNode = loader.load();\n\n\t\tScene scene = new Scene(rootNode);\n \n Pane menuPane= (Pane) rootNode.getChildren().get(0);\n\t\tmenuPane.getChildren().add(createMenubar());\n\n\t\tprimaryStage.setScene(scene);\n\t\tprimaryStage.setTitle(\"Temperature Convertor\");\n\t\t//primaryStage.setResizable(false); to make sure application is not resizable\n\t\tprimaryStage.show();\n\t}",
"protected NodeFigure createMainFigure() {\n\t\tNodeFigure figure = createNodePlate();\n\t\tfigure.setLayoutManager(new StackLayout());\n\t\tIFigure shape = createNodeShape();\n\t\tfigure.add(shape);\n\t\tcontentPane = setupContentPane(shape);\n\t\treturn figure;\n\t}",
"private SizedJPanel getMainPanel() {\n if (mainPanel == null) {\n mainPanel = new GuiMainPanel(this, config.paths.getValue(),\n config.outFile.getValue(), config.isOboToOwl.getValue());\n }\n return mainPanel;\n }",
"protected JRootPane createRootPane()\r\n {\r\n //----------------------------------------------------------\r\n // Create a new JRootPane. We're going to modify it a bit\r\n // and then return it.\r\n //---------------------------------------------------------- \r\n JRootPane rootPane = new JRootPane();\r\n\r\n //----------------------------------------------------------\r\n // Retrieve the KeyStroke for the escape key.\r\n //---------------------------------------------------------- \r\n KeyStroke keyStroke = KeyStroke.getKeyStroke(\"ESCAPE\");\r\n\r\n //----------------------------------------------------------\r\n // Create an action that disposes of this dialog when \r\n // invoked.\r\n //---------------------------------------------------------- \r\n Action al = new AbstractAction()\r\n {\r\n public void actionPerformed(ActionEvent ae)\r\n {\r\n AboutDialog.this.dispose();\r\n }\r\n };\r\n\r\n //----------------------------------------------------------\r\n // Retrieve the InputMap for the JRootPane.\r\n //---------------------------------------------------------- \r\n InputMap im = rootPane.getInputMap(JComponent.WHEN_IN_FOCUSED_WINDOW);\r\n\r\n //----------------------------------------------------------\r\n // Tie the escape KeyStroke to the action string 'ESCAPE'.\r\n //---------------------------------------------------------- \r\n im.put(keyStroke, \"ESCAPE\");\r\n\r\n //----------------------------------------------------------\r\n // In the action map for the root pane, tie the 'ESCAPE' \r\n // action string to the Action we defined above.\r\n //---------------------------------------------------------- \r\n rootPane.getActionMap().put(\"ESCAPE\", al);\r\n\r\n //----------------------------------------------------------\r\n // Return the JRootPane.\r\n //---------------------------------------------------------- \r\n return rootPane;\r\n }",
"@Override\n public void start(Stage primaryStage) throws Exception{\n Parent root = FXMLLoader.load(getClass().getResource(\"mainMenu/mainMenu.fxml\"));\n primaryStage.setTitle(\"Hello World\");\n Scene s =new Scene(root, defaultWindowWidth, defaultWindowHight);\n s.getStylesheets().add(getClass().getResource(\"css/main.css\").toExternalForm());\n primaryStage.setScene(s);\n primaryStage.setMinHeight(480);\n primaryStage.setMinWidth(480);\n primaryStage.show();\n }",
"private JPanel getJContentPane() {\n\t\tif (jContentPane == null) {\n\t\t\tjLabelTexto = new JLabel();\n\t\t\tjLabelTexto.setText(\"À desenvolver...\");\n\t\t\tjLabelTexto.setSize(new Dimension(100, 20));\n\t\t\tjLabelTexto.setLocation(new Point(98, 61));\n\t\t\tjContentPane = new JPanel();\n\t\t\tjContentPane.setLayout(null);\n\t\t\tjContentPane.add(jLabelTexto, null);\n\t\t\tjContentPane.add(getJButtonOK(), null);\n\t\t}\n\t\treturn jContentPane;\n\t}",
"protected NodeFigure createMainFigure() {\r\n\t\tNodeFigure figure = createNodePlate();\r\n\t\tfigure.setLayoutManager(new StackLayout());\r\n\t\tIFigure shape = createNodeShape();\r\n\t\tfigure.add(shape);\r\n\t\tcontentPane = setupContentPane(shape);\r\n\t\treturn figure;\r\n\t}",
"protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(764, 551);\n\t\tshell.setText(\"SWT Application\");\n\t\tshell.setLayout(new BorderLayout(0, 0));\n\t\t\n\t\tMenu menu = new Menu(shell, SWT.BAR);\n\t\tshell.setMenuBar(menu);\n\t\t\n\t\tMenuItem mntmFile = new MenuItem(menu, SWT.NONE);\n\t\tmntmFile.setText(\"File...\");\n\t\t\n\t\tMenuItem mntmEdit = new MenuItem(menu, SWT.NONE);\n\t\tmntmEdit.setText(\"Edit\");\n\t\t\n\t\tComposite composite = new Composite(shell, SWT.NONE);\n\t\tcomposite.setLayoutData(BorderLayout.CENTER);\n\t\tcomposite.setLayout(null);\n\t\t\n\t\tGroup grpDirectorio = new Group(composite, SWT.NONE);\n\t\tgrpDirectorio.setText(\"Directorio\");\n\t\tgrpDirectorio.setBounds(10, 86, 261, 387);\n\t\t\n\t\tGroup grpListadoDeAccesos = new Group(composite, SWT.NONE);\n\t\tgrpListadoDeAccesos.setText(\"Listado de Accesos\");\n\t\tgrpListadoDeAccesos.setBounds(277, 86, 477, 387);\n\t\t\n\t\tLabel label = new Label(composite, SWT.SEPARATOR | SWT.HORIZONTAL);\n\t\tlabel.setBounds(10, 479, 744, 2);\n\t\t\n\t\tButton btnNewButton = new Button(composite, SWT.NONE);\n\t\tbtnNewButton.setBounds(638, 491, 94, 28);\n\t\tbtnNewButton.setText(\"New Button\");\n\t\t\n\t\tButton btnNewButton_1 = new Button(composite, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(538, 491, 94, 28);\n\t\tbtnNewButton_1.setText(\"New Button\");\n\t\t\n\t\tToolBar toolBar = new ToolBar(composite, SWT.FLAT | SWT.RIGHT);\n\t\ttoolBar.setBounds(10, 10, 744, 20);\n\t\t\n\t\tToolItem tltmAccion = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion.setText(\"Accion 1\");\n\t\t\n\t\tToolItem tltmAccion_1 = new ToolItem(toolBar, SWT.NONE);\n\t\ttltmAccion_1.setText(\"Accion 2\");\n\t\t\n\t\tToolItem tltmRadio = new ToolItem(toolBar, SWT.RADIO);\n\t\ttltmRadio.setText(\"Radio\");\n\t\t\n\t\tToolItem tltmItemDrop = new ToolItem(toolBar, SWT.DROP_DOWN);\n\t\ttltmItemDrop.setText(\"Item drop\");\n\t\t\n\t\tToolItem tltmCheckItem = new ToolItem(toolBar, SWT.CHECK);\n\t\ttltmCheckItem.setText(\"Check item\");\n\t\t\n\t\tCoolBar coolBar = new CoolBar(composite, SWT.FLAT);\n\t\tcoolBar.setBounds(10, 39, 744, 30);\n\t\t\n\t\tCoolItem coolItem_1 = new CoolItem(coolBar, SWT.NONE);\n\t\tcoolItem_1.setText(\"Accion 1\");\n\t\t\n\t\tCoolItem coolItem = new CoolItem(coolBar, SWT.NONE);\n\n\t}",
"public ViewMain()\n\t{\n\t\tview = new View();\n\t\t\n\t\tcolors = new Color[20][10];\n\t\tfor(int i=0; i < 20; ++i)\n\t\t\tfor(int j=0; j < 10; ++j)\n\t\t\t\tcolors[i][j] = Color.DARK_GRAY;\n\t\t\n\t\tpanel = new BoardGamePanel(colors);\n\t\tpanel.setVisible(true);\n\t\t\n\t\tgameInfo = new GameInfo();\n\t\t\n\t\tactionListenner();\n\t\t\n\t}",
"private JPanel getJContentPane() {\r\n\r\n\t\tif (jContentPane == null) {\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(null);\r\n\t\t\tjContentPane.setSize(new Dimension(600, 320));\r\n\t\t\tjContentPane.add(getEkitCoreEditorHTMLPanel(), null);\r\n\t\t\tjContentPane.add(getJToolBarEditorHTML(), null);\r\n\t\t\tjContentPane.add(getJButtonAcceptHTML(), null);\r\n\t\t\tjContentPane.add(getJButtonCancelHTML(), null);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}",
"private JPanel getJContentPane() {\r\n\t\tif (jContentPane == null) {\r\n\t\t\tmsgLabel = new JLabel();\r\n\t\t\tmsgLabel.setHorizontalAlignment(SwingConstants.CENTER);\r\n\t\t\tmsgLabel.setFont(new Font(\"Tahoma\", Font.BOLD, 11));\r\n\t\t\tmsgLabel.setHorizontalTextPosition(SwingConstants.CENTER);\r\n\t\t\tjContentPane = new JPanel();\r\n\t\t\tjContentPane.setLayout(new BorderLayout());\r\n\t\t\tjContentPane.add(getSouthPanel(), BorderLayout.SOUTH);\r\n\t\t\tjContentPane.add(getLabelPanel(), BorderLayout.NORTH);\r\n\t\t\tjContentPane.add(getTestAreaScrollPane(), BorderLayout.CENTER);\r\n\t\t}\r\n\t\treturn jContentPane;\r\n\t}",
"public Control(Main main) {\n\n this.main = main;\n\n this.setTitle(\"Piskvorky\");\n this.setLocationRelativeTo(null);\n this.setSize(300, 430);\n this.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);\n this.setResizable(false);\n this.add(getHlavniPanel());\n\n spustPosluchace();\n\n this.setVisible(false);\n this.repaint();\n }",
"private void createGUI() {\n ResizeGifPanel newContentPane = new ResizeGifPanel();\n newContentPane.setOpaque(true); \n setContentPane(newContentPane); \n }",
"public static MainFrame createNewFrame(Display display, Document doc)\n {\n Shell shell = new Shell(display);\n\n MainFrame frame = new MainFrame(shell, doc);\n frame.initComponents(null);\n\n shell.open();\n\n return frame;\n }",
"protected void createContents() {\n\t\tshell = new Shell();\n\t\tshell.setSize(450, 300);\n\t\tshell.setText(\"SWT Application\");\n\t\t\n\t\tButton btnNewButton = new Button(shell, SWT.NONE);\n\t\tbtnNewButton.addSelectionListener(new SelectionAdapter() {\n\t\t\t@Override\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 226, 75, 25);\n\t\tbtnNewButton.setText(\"Limpiar\");\n\t\t\n\t\tButton btnGuardar = new Button(shell, SWT.NONE);\n\t\tbtnGuardar.setBounds(257, 226, 75, 25);\n\t\tbtnGuardar.setText(\"Guardar\");\n\t\t\n\t\ttext = new Text(shell, SWT.BORDER);\n\t\ttext.setBounds(25, 181, 130, 21);\n\t\t\n\t\ttext_1 = new Text(shell, SWT.BORDER);\n\t\ttext_1.setBounds(230, 181, 130, 21);\n\t\t\n\t\ttext_2 = new Text(shell, SWT.BORDER);\n\t\ttext_2.setBounds(25, 134, 130, 21);\n\t\t\n\t\ttext_3 = new Text(shell, SWT.BORDER);\n\t\ttext_3.setBounds(25, 86, 130, 21);\n\t\t\n\t\ttext_4 = new Text(shell, SWT.BORDER);\n\t\ttext_4.setBounds(25, 42, 130, 21);\n\t\t\n\t\tButton btnNewButton_1 = new Button(shell, SWT.NONE);\n\t\tbtnNewButton_1.setBounds(227, 130, 75, 25);\n\t\tbtnNewButton_1.setText(\"Buscar\");\n\t\t\n\t\tLabel label = new Label(shell, SWT.NONE);\n\t\tlabel.setBounds(25, 21, 55, 15);\n\t\tlabel.setText(\"#\");\n\t\t\n\t\tLabel lblFechaYHora = new Label(shell, SWT.NONE);\n\t\tlblFechaYHora.setBounds(25, 69, 75, 15);\n\t\tlblFechaYHora.setText(\"Fecha y Hora\");\n\t\t\n\t\tLabel lblPlaca = new Label(shell, SWT.NONE);\n\t\tlblPlaca.setBounds(25, 113, 55, 15);\n\t\tlblPlaca.setText(\"Placa\");\n\t\t\n\t\tLabel lblMarca = new Label(shell, SWT.NONE);\n\t\tlblMarca.setBounds(25, 161, 55, 15);\n\t\tlblMarca.setText(\"Marca\");\n\t\t\n\t\tLabel lblColor = new Label(shell, SWT.NONE);\n\t\tlblColor.setBounds(230, 161, 55, 15);\n\t\tlblColor.setText(\"Color\");\n\n\t}",
"private void createContents() {\r\n\t\tshell = new Shell(getParent(), SWT.TITLE);\r\n\r\n\t\tgetParent().setEnabled(false);\r\n\r\n\t\tshell.addShellListener(new ShellAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void shellClosed(ShellEvent e) {\r\n\t\t\t\tgetParent().setEnabled(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tshell.setImage(SWTResourceManager.getImage(LoginInfo.class, \"/javax/swing/plaf/metal/icons/ocean/warning.png\"));\r\n\r\n\t\tsetMidden(397, 197);\r\n\r\n\t\tshell.setText(this.windows_name);\r\n\t\tshell.setLayout(null);\r\n\r\n\t\tLabel label = new Label(shell, SWT.NONE);\r\n\t\tlabel.setFont(SWTResourceManager.getFont(\"Microsoft YaHei UI\", 11, SWT.NORMAL));\r\n\t\tlabel.setBounds(79, 45, 226, 30);\r\n\t\tlabel.setAlignment(SWT.CENTER);\r\n\t\tlabel.setText(this.label_show);\r\n\r\n\t\tButton button = new Button(shell, SWT.NONE);\r\n\t\tbutton.setBounds(150, 107, 86, 30);\r\n\t\tbutton.addSelectionListener(new SelectionAdapter() {\r\n\t\t\t@Override\r\n\t\t\tpublic void widgetSelected(SelectionEvent e) {\r\n\t\t\t\tshell.close();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbutton.setText(\"确定\");\r\n\r\n\t}",
"protected void createContents() {\n\t\tsetText(\"Muokkaa asiakastietoja\");\n\t\tsetSize(800, 550);\n\n\t}",
"private HelloPanel() {\n\n\t\tHTML w = new HTML(BalasResources.INSTANCE.helloPane().getText());\n\t\tinitWidget(w);\n\t}",
"private AbsoluteLayout buildMainLayout() {\n\t\tmainLayout = new AbsoluteLayout();\n\t\t// Setzt die Hintergrundfarbe auf Grün\n\t\tmainLayout.addStyleName(\"backgroundErfassung\");\n\t\tmainLayout.setWidth(\"100%\");\n\t\tmainLayout.setHeight(\"100%\");\n\n\t\treturn mainLayout;\n\t}",
"private void createAndShowGUI() {\n setSize(300, 200);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n addContent(getContentPane());\n\n //pack();\n setVisible(true);\n }",
"private JPanel getJContentPane() {\r\n if (jContentPane == null) {\r\n jContentPane = new JPanel();\r\n jContentPane.setLayout(new BorderLayout());\r\n jContentPane.add(getJPanelLeft(), BorderLayout.WEST);\r\n jContentPane.add(getJPanelRight(), BorderLayout.CENTER);\r\n }\r\n return jContentPane;\r\n }",
"public MainWindow() {\n this.controlador = new MainControler(this);\n initComponents();\n }",
"public HomePage() {\n Container c = getContentPane();\n c.setBackground(new Color(0,153,204));\n initComponents();\n }",
"@Override\n public void start(Stage primaryStage) {\n root = new VBox(10);\n root.setPadding(new Insets(30));\n initLabel();\n //set up scene\n Scene scene = new Scene(root);\n primaryStage.setScene(scene);\n primaryStage.sizeToScene();\n primaryStage.setTitle(\"Mastermind\");\n primaryStage.show();\n }",
"private static void createAndShowGUI() {\n\n //Create and set up the window.\n JFrame frame = new JFrame(\"ButtonDemo\");\n frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n //Create and set up the content pane.\n ButtonDemo newContentPane = new ButtonDemo();\n newContentPane.setOpaque(true); //content panes must be opaque\n frame.setContentPane(newContentPane);\n\n //Display the window.\n frame.pack();\n frame.setVisible(true);\n }"
] | [
"0.72977144",
"0.7249161",
"0.7213156",
"0.69978476",
"0.69296646",
"0.68533564",
"0.6794036",
"0.67353",
"0.66644216",
"0.66002196",
"0.65971047",
"0.65795594",
"0.6446433",
"0.6443643",
"0.64404535",
"0.6387501",
"0.63769144",
"0.63296235",
"0.6295587",
"0.6274186",
"0.6245579",
"0.62359035",
"0.62201893",
"0.6210064",
"0.6200601",
"0.6194927",
"0.6192005",
"0.61797345",
"0.6179229",
"0.6176434",
"0.6165132",
"0.6153977",
"0.61451375",
"0.6125331",
"0.6114152",
"0.6110797",
"0.6107387",
"0.61059797",
"0.61054957",
"0.6104572",
"0.6095562",
"0.6080621",
"0.6054614",
"0.6052807",
"0.6047513",
"0.60439765",
"0.6037549",
"0.6034568",
"0.60242707",
"0.6015469",
"0.60133827",
"0.59989804",
"0.5997491",
"0.5989385",
"0.5985178",
"0.59724367",
"0.5970948",
"0.59696895",
"0.59646267",
"0.5964275",
"0.5964275",
"0.5962888",
"0.5957715",
"0.595334",
"0.59496593",
"0.59447294",
"0.59356004",
"0.59292716",
"0.59290344",
"0.5926385",
"0.59058857",
"0.58865166",
"0.58862716",
"0.5886056",
"0.58827126",
"0.5881634",
"0.58809966",
"0.58774096",
"0.5874055",
"0.58659136",
"0.58604443",
"0.585826",
"0.58569527",
"0.58529544",
"0.584341",
"0.58301777",
"0.58292764",
"0.5825836",
"0.5806498",
"0.580026",
"0.5795716",
"0.57953465",
"0.579342",
"0.5787964",
"0.57757854",
"0.5767",
"0.57607573",
"0.57585925",
"0.575669",
"0.575325"
] | 0.78549147 | 0 |
Configures initial state of component. WARNING: AUTOGENERATED METHOD. Contents will be overwritten. | private void initComponents() {
ResourceImageReference imageReference1 = new ResourceImageReference(
"/pds/web/resource/image/mainback-gray.jpg");
this.setBackgroundImage(new FillImage(imageReference1));
SplitPane splitPane1 = new SplitPane();
splitPane1.setStyleName("Default");
splitPane1.setSeparatorVisible(false);
add(splitPane1);
Column column1 = new Column();
splitPane1.add(column1);
pdsColumn = new Column();
pdsColumn.setVisible(false);
pdsColumn.setInsets(new Insets(new Extent(30, Extent.PX)));
pdsColumn.setCellSpacing(new Extent(20, Extent.PX));
RowLayoutData pdsColumnLayoutData = new RowLayoutData();
pdsColumnLayoutData.setAlignment(new Alignment(Alignment.LEFT,
Alignment.DEFAULT));
pdsColumn.setLayoutData(pdsColumnLayoutData);
column1.add(pdsColumn);
Row row4 = new Row();
row4.setCellSpacing(new Extent(10, Extent.PX));
pdsColumn.add(row4);
Button button1 = new Button();
button1.setStyleName("PlainWhite");
ResourceImageReference imageReference2 = new ResourceImageReference(
"/pds/web/resource/image/accountroot.png");
button1.setIcon(imageReference2);
button1.setText("Account Root");
button1.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
onAccountRootActionPerformed(e);
}
});
row4.add(button1);
Button button10 = new Button();
button10.setStyleName("PlainWhite");
ResourceImageReference imageReference3 = new ResourceImageReference(
"/pds/web/resource/image/linkcontracts.png");
button10.setIcon(imageReference3);
button10.setText("Link Contracts");
button10.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
onLinkContractsActionPerformed(e);
}
});
row4.add(button10);
facebookConnectorPanel = new FacebookConnectorPanel();
facebookConnectorPanel.setId("facebookConnectorPanel");
row4.add(facebookConnectorPanel);
personalConnectorPanel = new PersonalConnectorPanel();
personalConnectorPanel.setId("personalConnectorPanel");
row4.add(personalConnectorPanel);
allfiledConnectorPanel = new AllfiledConnectorPanel();
allfiledConnectorPanel.setId("allfiledConnectorPanel");
row4.add(allfiledConnectorPanel);
Label label1 = new Label();
label1.setStyleName("Header");
label1.setText("Account Personas");
pdsColumn.add(label1);
Row row7 = new Row();
pdsColumn.add(row7);
accountRootGrid = new AccountRootGrid();
row7.add(accountRootGrid);
Label label2 = new Label();
label2.setStyleName("Header");
label2.setText("Applications");
pdsColumn.add(label2);
pdsWebAppGrid = new Grid();
pdsWebAppGrid.setOrientation(Grid.ORIENTATION_HORIZONTAL);
pdsWebAppGrid.setSize(5);
pdsColumn.add(pdsWebAppGrid);
Label label3 = new Label();
label3.setStyleName("Header");
label3.setText("Data Housekeeping");
pdsColumn.add(label3);
Row row5 = new Row();
row5.setCellSpacing(new Extent(20, Extent.PX));
pdsColumn.add(row5);
ToolTipContainer toolTipContainer1 = new ToolTipContainer();
row5.add(toolTipContainer1);
Button button2 = new Button();
button2.setStyleName("PlainWhite");
ResourceImageReference imageReference4 = new ResourceImageReference(
"/pds/web/resource/image/data-clean.png");
button2.setIcon(imageReference4);
button2.setText("Reset data");
button2.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
onResetDataActionPerformed(e);
}
});
toolTipContainer1.add(button2);
Panel panel1 = new Panel();
panel1.setStyleName("Tooltip");
toolTipContainer1.add(panel1);
Label label4 = new Label();
label4.setStyleName("Default");
label4.setText("This will clear all data from your Personal Cloud. Make sure you have a backup!");
panel1.add(label4);
ToolTipContainer toolTipContainer2 = new ToolTipContainer();
row5.add(toolTipContainer2);
Button button3 = new Button();
button3.setStyleName("PlainWhite");
ResourceImageReference imageReference5 = new ResourceImageReference(
"/pds/web/resource/image/data-export.png");
button3.setIcon(imageReference5);
button3.setText("Data Export");
button3.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
onDataExportActionPerformed(e);
}
});
toolTipContainer2.add(button3);
Panel panel2 = new Panel();
panel2.setStyleName("Tooltip");
toolTipContainer2.add(panel2);
Label label5 = new Label();
label5.setStyleName("Default");
label5.setText("This allows you to download all the contents of your Personal Cloud as an XDI file.");
panel2.add(label5);
ToolTipContainer toolTipContainer3 = new ToolTipContainer();
row5.add(toolTipContainer3);
Button button11 = new Button();
button11.setStyleName("PlainWhite");
ResourceImageReference imageReference6 = new ResourceImageReference(
"/pds/web/resource/image/data-import.png");
button11.setIcon(imageReference6);
button11.setText("Data Import");
button11.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
onDataImportActionPerformed(e);
}
});
toolTipContainer3.add(button11);
Panel panel3 = new Panel();
panel3.setStyleName("Tooltip");
toolTipContainer3.add(panel3);
Label label6 = new Label();
label6.setStyleName("Default");
label6.setText("This allows you to import data from an XDI file input your Personal Cloud.");
panel3.add(label6);
Column column2 = new Column();
column2.setInsets(new Insets(new Extent(10, Extent.PX)));
SplitPaneLayoutData column2LayoutData = new SplitPaneLayoutData();
column2LayoutData.setAlignment(new Alignment(Alignment.RIGHT,
Alignment.DEFAULT));
column2LayoutData.setMinimumSize(new Extent(400, Extent.PX));
column2LayoutData.setMaximumSize(new Extent(400, Extent.PX));
column2.setLayoutData(column2LayoutData);
splitPane1.add(column2);
ImageIcon imageIcon1 = new ImageIcon();
ResourceImageReference imageReference7 = new ResourceImageReference(
"/pds/web/resource/image/pds-logo.png");
imageIcon1.setIcon(imageReference7);
imageIcon1.setHeight(new Extent(45, Extent.PX));
imageIcon1.setWidth(new Extent(337, Extent.PX));
imageIcon1.setInsets(new Insets(new Extent(0, Extent.PX), new Extent(
10, Extent.PX), new Extent(0, Extent.PX), new Extent(0,
Extent.PX)));
column2.add(imageIcon1);
Row row2 = new Row();
row2.setAlignment(new Alignment(Alignment.RIGHT, Alignment.DEFAULT));
row2.setInsets(new Insets(new Extent(0, Extent.PX), new Extent(0,
Extent.PX), new Extent(0, Extent.PX), new Extent(10, Extent.PX)));
row2.setCellSpacing(new Extent(10, Extent.PX));
column2.add(row2);
ImageIcon imageIcon2 = new ImageIcon();
ResourceImageReference imageReference8 = new ResourceImageReference(
"/pds/web/resource/image/projectdanube.png");
imageIcon2.setIcon(imageReference8);
imageIcon2.setHeight(new Extent(68, Extent.PX));
imageIcon2.setWidth(new Extent(68, Extent.PX));
row2.add(imageIcon2);
Column column3 = new Column();
column3.setCellSpacing(new Extent(10, Extent.PX));
row2.add(column3);
logWindowCheckBox = new CheckBox();
logWindowCheckBox.setSelected(false);
logWindowCheckBox.setText("Show Log Window");
logWindowCheckBox.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
onLogWindowActionPerformed(e);
}
});
column3.add(logWindowCheckBox);
developerModeCheckBox = new CheckBox();
developerModeCheckBox.setSelected(false);
developerModeCheckBox.setText("Enable Developer Mode");
developerModeCheckBox.addActionListener(new ActionListener() {
private static final long serialVersionUID = 1L;
public void actionPerformed(ActionEvent e) {
onDeveloperModeActionPerformed(e);
}
});
column3.add(developerModeCheckBox);
LogWindowPane logWindowPane1 = new LogWindowPane();
logWindowPane1.setVisible(false);
add(logWindowPane1);
EndpointWindowPane accountWindowPane1 = new EndpointWindowPane();
add(accountWindowPane1);
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private void initcomponent() {\n\r\n\t}",
"@Override\n public void initState() {\n \n\t//TODO: Complete Method\n\n }",
"@Override\n public void initComponent() {\n }",
"@Override\n public void initComponent() {\n }",
"@Override\r\n public void initComponent() {\n }",
"public void initialize() {\r\n\t\tsetValue(initialValue);\r\n\t}",
"@Override\r\n\tpublic void config() {\n\t\tinter.setState(inter.getConfig());\r\n\t}",
"private void initComponents() {\n\t\t\n\t}",
"private void initComponents() {\n\t\t\n\t}",
"public InitialState() {\r\n\t\t}",
"protected void setInitialStates() {\n\n\t\tchar[][] states = gridConfig.getCellConfiguration();\n\n\t\tfor (int i = 0; i < numRows; i++) {\n\t\t\tfor (int j = 0; j < numCols; j++) {\n\t\t\t\tCell c = simMap.get(states[i][j]).copy();\n\t\t\t\tinitializeCell(i, j, c);\n\t\t\t}\n\t\t}\n\t\troot.getChildren().add(pane);\n\t}",
"private void initComponent() {\n\t\taddGrid();\n\t\taddToolBars();\n\t}",
"public Completable init() {\n\t\tLocalConfigModel localConfigModel = new LocalConfigModel()\n\t\t\t.setReadOnly(meshOptions.isStartInReadOnly());\n\t\treturn setActiveConfig(localConfigModel).ignoreElement();\n\t}",
"protected void initialize()\n {\n uiFactory.configureUIComponent(this, UI_PREFIX);\n\n initializeFields();\n initializeLabels();\n initLayout();\n }",
"private void initialize() {\r\n\t\t// set specific properties and add inner components.\r\n\t\tthis.setBorder(BorderFactory.createEtchedBorder());\r\n\t\tthis.setSize(300, 400);\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\taddComponents();\r\n\t}",
"void initializeImpl() {\n // note that these methods can be overridden by the user and\n // can return some strange values like null.\n setBackground(target.getBackground());\n setForeground(target.getForeground());\n setFont(target.getFont());\n setBounds(target.getBounds());\n setEnabled(target.isEnabled());\n }",
"@FXML protected void initialize() {\n\t\tinitConfigVar();\n\t\tapplyStyle();\n\t}",
"private void init() {\n StateManager.setState(new MenuState());\n }",
"private void initiateInternal() {\n\n //define adaptation listener\n this.addComponentListener(new ComponentAdapter() {\n @Override\n public void componentResized(ComponentEvent e) {\n adapt(e);\n }\n });\n\n //solve problem with unloading of internal components\n setExtendedState(ICONIFIED | MAXIMIZED_BOTH);\n //the set visible must be the last thing called \n pack();\n setExtendedState(MAXIMIZED_BOTH);\n setVisible(true);\n }",
"private void initialize() {\r\n\r\n // add default buttons\r\n addButton(getToggleButton(),\"toggle\");\r\n addButton(getFinishButton(),\"finish\");\r\n addButton(getCancelButton(),\"cancel\");\r\n addActionListener(new ActionListener() {\r\n\r\n public void actionPerformed(ActionEvent e) {\r\n String cmd = e.getActionCommand();\r\n if(\"toggle\".equalsIgnoreCase(cmd)) change();\r\n else if(\"finish\".equalsIgnoreCase(cmd)) finish();\r\n else if(\"cancel\".equalsIgnoreCase(cmd)) cancel();\r\n }\r\n\r\n });\r\n\r\n }",
"private void initialize() {\n\t\troot = new Group();\n\t\tgetProperties();\n\t\tsetScene();\n\t\tsetStage();\n\t\tsetGUIComponents();\n\t}",
"@Override\n public final void init() {\n super.init();\n UIUtils.clearAllFields(upperPane);\n changeStatus(Status.NONE);\n intCombo();\n }",
"public void initialConfig() {\n }",
"public void initialize() {\r\n\t\t\tsetTextValue(!updateNoteEnabled);\r\n\t\t}",
"public void initialize() {\n \n super.initialize();\n \n PreferredSizeX = this.getPreferredSizeX();\n PreferredSizeY = this.getPreferredSizeY();\n this.setPreferredSize(new Dimension(PreferredSizeX, PreferredSizeY));\n \n this.createParameterPanel();\n \n }",
"private void init() {\n\t\n\t\tthis.setSize(DEFAULT_W, DEFAULT_H);\n\t\tthis.setLocation(DEFAULT_X, DEFAULT_X);\n\t\tthis.setTitle(DEFAULT_TITLE);\n\n\t}",
"private void initialize()\n {\n this.setTitle( \"SerialComm\" ); // Generated\n this.setSize( 500, 300 );\n this.setContentPane( getJContentPane() );\n }",
"public void initialState() {\n\t\t//empty\n\t}",
"private void initialize() {\n\t\tthis.setSize(430, 280);\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setUndecorated(true);\n\t\tthis.setModal(true);\n\t\tthis.setBackground(new java.awt.Color(226,226,222));\n\t\tthis.setTitle(\"Datos del Invitado\");\n\t\tthis.addComponentListener(this);\n\t}",
"public void initialState() {\r\n\t\tfor (int i = 0; i < checkBoxes.length; i++) {\r\n\t\t\tamountBoxes[i].setSelectedIndex(0);\r\n\t\t\tcheckBoxes[i].setSelected(false);\r\n\t\t}\r\n\t}",
"private void init() {\n\t\t\n\t\tsetEnabled(true);\n\t}",
"public config() {\n initComponents();\n }",
"public void init() {\n if (getConfig().isEnabled()) {\n super.init();\n }\n }",
"public abstract void setupComponent();",
"private void initialize() {\r\n\t\tthis.setLayout(new BorderLayout());\r\n\t\tthis.setBounds(new Rectangle(0, 0, 393, 177));\r\n\t\tthis.add(getBasePanel(), BorderLayout.CENTER);\r\n\r\n\t}",
"protected void restoreDefaultsToComponents() {\r\n periodTimeComponent.setValue( new Long( DEFAULT_PERIOD_TIME ) );\r\n maxNumberOfPlayersComponent.setValue( new Integer( DEFAULT_MAX_NUMBER_OF_PLAYERS ) );\r\n mapWidthComponent.setSelectedItem( Integer.toString( DEFAULT_MAP_WIDTH ) );\r\n mapHeightComponent.setValue( new Integer( DEFAULT_MAP_HEIGHT ) );\r\n welcomeMessageComponent.setText( DEFAULT_WELCOME_MESSAGE );\r\n gameTypeComponent.setSelectedIndex( DEFAULT_GAME_TYPE );\r\n isKillLimitComponent.setSelected( DEFAULT_IS_KILL_LIMIT );\r\n killLimitComponent.setValue( new Integer( DEFAULT_KILL_LIMIT ) );\r\n isTimeLimitComponent.setSelected( DEFAULT_IS_TIME_LIMIT );\r\n timeLimitComponent.setValue( new Integer( DEFAULT_TIME_LIMIT ) );\r\n passwordComponent.setText( DEFAULT_PASSWORD );\r\n amountOfWallRubblesComponent.setValue( new Integer( DEFAULT_AMOUNT_OF_WALL_RUBBLES ) );\r\n amountOfBloodComponent.setValue( new Integer( DEFAULT_AMOUNT_OF_BLOOD ) );\r\n amountOfWallComponent.setValue( new Integer( DEFAULT_AMOUNT_OF_WALL ) );\r\n amountOfStoneComponent.setValue( new Integer( DEFAULT_AMOUNT_OF_STONE ) );\r\n amountOfWaterComponent.setValue( new Integer( DEFAULT_AMOUNT_OF_WATER ) );\r\n }",
"public abstract void initialSettings();",
"public abstract void init() throws ComponentInitializationException;",
"@Override\n\tpublic void initial() {\n\t\t\n\t}",
"protected void init() {\n currentState.bgColor = appliedState.bgColor = gc.getBackground();\n currentState.fgColor = appliedState.fgColor = gc.getForeground();\n currentState.font = appliedState.font = gc.getFont();\n currentState.lineAttributes = gc.getLineAttributes();\n appliedState.lineAttributes = clone(currentState.lineAttributes);\n currentState.graphicHints |= gc.getLineStyle();\n currentState.graphicHints |= gc.getAdvanced() ? ADVANCED_GRAPHICS_MASK\n : 0;\n currentState.graphicHints |= gc.getXORMode() ? XOR_MASK : 0;\n\n appliedState.graphicHints = currentState.graphicHints;\n\n currentState.relativeClip = new RectangleClipping(gc.getClipping());\n currentState.alpha = gc.getAlpha();\n }",
"public void initialize() {\n\t\ttoolBar.setDrawingPanel(this.drawingPanel);\r\n\t\t//component initialize\r\n\t\tmenuBar.initialize();\r\n\t\ttoolBar.initialize();\r\n\t\tdrawingPanel.initialize();\r\n\t\t\r\n\t}",
"public ConfEGTaskPanel() {\n initComponents();\n initListenerButton(); \n initState();\n initApplyCellCheckBox();\n }",
"private void initComponents() {\r\n\t\temulator = new Chip8();\r\n\t\tpanel = new DisplayPanel(emulator);\r\n\t\tregisterPanel = new EmulatorInfoPanel(emulator);\r\n\t\t\r\n\t\tcontroller = new Controller(this, emulator, panel, registerPanel);\r\n\t}",
"private void setComponentStatus() {}",
"private void initComponents() {\r\n\r\n setLayout(new java.awt.BorderLayout());\r\n }",
"private void initialize() {\r\n\t\tthis.setSize(311, 153);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.setTitle(\"JFrame\");\r\n\t\tsetCancelButton( btnCancel );\r\n\t}",
"private void initValues()\n {\n this.viewToolBar.setSelected(\n ConfigurationUtils.isChatToolbarVisible());\n\n this.viewSmileys.setSelected(\n ConfigurationUtils.isShowSmileys());\n\n this.chatSimpleTheme.setSelected(\n ConfigurationUtils.isChatSimpleThemeEnabled());\n }",
"private void initialize() {\r\n this.setSize(new Dimension(374, 288));\r\n this.setContentPane(getJPanel());\r\n this.setResizable(false);\r\n this.setModal(true);\r\n this.setTitle(\"颜色选择面板\");\r\n addJPanel();\r\n\t}",
"public void initComponent(){\n\t\t\n\t\tpanelMiddle.setCaption(\"PROSES:\");\n\t\t\n\t\t//INIT COMPONENT BAWAH\t\n\t\tlabelNotes.setContentMode(ContentMode.HTML);\n\t\tlabelNotes.setValue(\"Notes: <br> Perubahan pada Calender Kerja akan mempengaruhi seluruh sistem <br>.\" );\n\t}",
"public void initialise() {\r\n this.lockGui.setDisplay(\"Open\");\r\n this.isLocked = false;\r\n this.lockGui.setLocked(isLocked);\r\n this.code = \"\";\r\n this.entered = \"\";\r\n //Ticking lets the timer know if it should be counting ticks.\r\n //Used when entering a code to lock/unlock.\r\n this.ticking = false;\r\n this.ticks = 0;\r\n }",
"@Override\n public void autonomousInit() {\n }",
"@Override\n public void autonomousInit() {\n }",
"@Override\n public void autonomousInit() {\n \n }",
"private void initialize() {\n\t\tthis.setSize(329, 270);\n\t\tthis.setContentPane(getJContentPane());\n\t}",
"public void setInitialParameters() {\n /** DO NOTHING */\n }",
"@Override\r\n public void initialize(){\r\n initialize(\"\");\r\n }",
"public void setInitialState(State initial) {\n model.setInitialState(initial);\n model.setDeterministic(false);\n model.restoreInvariant();\n }",
"private void initComponents() {\n\n setLayout(new java.awt.BorderLayout());\n }",
"public void initComponents();",
"public void initialize() {\n\t\tcompartmentName = new SimpleStringProperty(compartment.getName());\t\t\n\t\tcompartmentId = new SimpleStringProperty(compartment.getId());\n\t\tcompartmentSBOTerm = new SimpleStringProperty(compartment.getSBOTermID());\n\t}",
"public void initialize() {\r\n }",
"private void initialize() {\n\t\tthis.setLayout(null);\n\t\tthis.setBackground(Color.white);\n\t\tthis.setBounds(new Rectangle(0, 0, 943, 615));\n this.setPreferredSize(new Dimension(890,570));\n this.setMinimumSize(new Dimension(890,570));\n\n\t\tm_GraphControlGradient = new GraphControl();\n\t\tm_GraphControlGradient.setBounds(new Rectangle(4, 16, 461, 285));\n\t\tm_GraphControlGradient.setControlsEnabled(false);\n\n\t\tm_GraphControlFlowRate = new GraphControl();\n\t\tm_GraphControlFlowRate.setBounds(new Rectangle(3, 16, 462, 241));\n\t\tm_GraphControlFlowRate.setControlsEnabled(false);\n\n\t\tthis.add(getJbtnPreviousStep(), null);\n\t\tthis.add(getJpanelGradientProfile(), null);\n\t\tthis.add(getJpanelFlowProfile(), null);\n\t\tthis.setVisible(true);\n\t\tthis.add(getJbtnHelp(), null);\n\t\tthis.add(getJpanelStep5(), null);\n\t\t\n\t\tthis.tmOutputModel.addTableModelListener(this);\n\t\tthis.addComponentListener(this);\n\t}",
"private void initialize() {\n this.setLayout(new BorderLayout());\n this.setSize(new java.awt.Dimension(564, 229));\n this.add(getMessagePanel(), java.awt.BorderLayout.NORTH);\n this.add(getBalloonSettingsListBox(), java.awt.BorderLayout.CENTER);\n this.add(getBalloonSettingsButtonPane(), java.awt.BorderLayout.SOUTH);\n\n editBalloonSettingsFrame = new EditBalloonSettingsFrame();\n\n }",
"@Override\n public void initialize() {\n initialColor = m_colorWheel.getColor();\n initialColorString = m_colorWheel.getColorString(initialColor);\n rotationCount = 0;\n seesNewColor = false;\n m_colorWheel.wheelSpin(1.0);\n isDone = false;\n System.out.println(\"auto color spin starting\");\n }",
"@Override\r\n\tpublic final void init() {\r\n\r\n\t}",
"@Override public void init()\n\t\t{\n\t\t}",
"public void initialize() {\n // TODO\n }",
"private void initialize() {\n\t\tthis.setBounds(100, 100, 950, 740);\n\t\tthis.setLayout(null);\n\n\t\n\t}",
"public void initialize()\n {\n }",
"private static void setNormalState() {\n InitialClass.arduino.serialWrite('0');\n InitialClass.arduino.serialWrite('6');\n InitialClass.arduino.serialWrite('2');\n InitialClass.arduino.serialWrite('8');\n InitialClass.arduino.serialWrite('C');\n InitialClass.arduino.serialWrite('A');\n InitialClass.arduino.serialWrite('4');\n /// hide animated images of scada\n pumpForSolutionOn.setVisible(false);\n pumpForTitrationOn.setVisible(false);\n mixerOn.setVisible(false);\n valveTitrationOpened.setVisible(false);\n valveSolutionOpened.setVisible(false);\n valveWaterOpened.setVisible(false);\n valveOutOpened.setVisible(false);\n\n log.append(\"Клапана закрыты\\nдвигатели выключены\\n\");\n\n }",
"protected void initialize() {\r\n }",
"protected void initialize() {\r\n }",
"public void init() {\n /**\n * If clicked call changeValue to rotate the state of the checkbox based\n * on its mode.\n */\n addHandler(new ClickHandler() {\n public void onClick(ClickEvent event) {\n changeValue();\n event.stopPropagation();\n }\n }, ClickEvent.getType());\n\n /**\n * If Enter key hit while focused call changeValue to rotate the state\n * of the checkbox based on its mode.\n */\n addHandler(new KeyDownHandler() {\n public void onKeyDown(KeyDownEvent event) {\n if (event.getNativeKeyCode() == KeyCodes.KEY_ENTER) \n changeValue();\n }\n }, KeyDownEvent.getType());\n \n addFocusHandler(new FocusHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFocus(FocusEvent event) {\n\t\t\t\tif(isEnabled())\n\t\t\t\t\taddStyleName(css.Focus());\n\t\t\t}\n\t\t});\n \n addBlurHandler(new BlurHandler() {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onBlur(BlurEvent event) {\n\t\t\t\tremoveStyleName(css.Focus());\n\t\t\t}\n\t\t});\n \n setCSS(UIResources.INSTANCE.checkbox());\n \n }",
"private void initialize() {\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\r\n\t\tthis.setTitle(\"Extremum Values\");\r\n\t\tthis.setSize(300,180);\r\n\t\tthis.setLocation(300, 100);\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t\tthis.getRootPane().setDefaultButton(getOkButton());\r\n\t\tthis.setVisible(true);\r\n\t}",
"public void init() {\n initComponents();\n initData();\n }",
"private void initialize()\n\t{\n\t\tthis.setModal(true);\t\t\n\t\tthis.setContentPane(getJContentPane());\n\t\tthis.setSize(450,400);\n\t\tScreenResolution.centerComponent(this);\n\t}",
"public void performInitialisation() {\n \t\t// subclasses can override the behaviour for this method\n \t}",
"private void initialize()\n {\n this.setPreferredSize(new com.ulcjava.base.application.util.Dimension(549,426));\n this.add(getComboBox(), com.ulcjava.base.application.ULCBorderLayoutPane.NORTH);\n }",
"private void initialize() {\r\n\t\tthis.setBounds(new Rectangle(0, 0, 670, 576));\r\n\t\tthis.setResizable(false);\r\n\t\tthis.setTitle(\"数据入库 \");\r\n\t\tthis.setLocationRelativeTo(getOwner());\r\n\t\tthis.setContentPane(getJContentPane());\r\n\t}",
"public void init() {\n setLayout(new BorderLayout());\n }",
"private void initialize() {\r\n this.setSize(new Dimension(666, 723));\r\n this.setContentPane(getJPanel());\r\n\t\t\t\r\n\t}",
"@Override\n public void initialize() {\n \n }",
"public void initialize() throws ComponentException\n\t{\n\t\t; // do nothing\n\t}",
"void setupAppState() {\n // Attempt to load existing config\n app_state = new AppState();\n app_state.loadConfiguration();\n\n // Force user to select a folder where journal will be stored (if not selected already)\n if (!app_state.configurationExists()) {\n DirectoryChooser directory_chooser = new DirectoryChooser();\n directory_chooser.setTitle(\"Journal location\");\n\n // We have to use new window\n StackPane root = new StackPane();\n Stage stage = new Stage();\n stage.setTitle(\"New Stage Title\");\n stage.setScene(new Scene(root, 150, 150));\n\n File selected_directory = directory_chooser.showDialog(stage.getScene().getWindow());\n if (selected_directory != null) {\n Path dir = selected_directory.toPath();\n app_state.changeConfiguration(dir.toString(), \"Journal\");\n } else {\n Helpers.alertErrorExit(\"No journal directory was selected!\");\n }\n\n stage.close();\n }\n\n app_state.loadTree();\n TreeItem<FileTree> root = new TreeItem<>(app_state.file_tree);\n note_tree.setRoot(root);\n\n try {\n fillTreeView(root);\n } catch (IOException e) {\n Helpers.alertErrorExit(\"Couldn't load a note image!\");\n }\n }",
"public void init() {\n \n }",
"public void initialize()\r\n {\r\n isImageLoaded=false; \r\n isInverted=false;\r\n isBlured=false;\r\n isChanged=false;\r\n isCircularCrop= false;\r\n isRectangularCrop = false;\r\n isReadyToSave = false;\r\n didUndo = false;\r\n brightnessLevel=0.0f;\r\n }",
"private void initialize() {\n\t\tjLabel3 = new JLabel();\n\t\tjLabel = new JLabel();\n\t\tthis.setLayout(null);\n\t\tthis.setBounds(new java.awt.Rectangle(0, 0, 486, 377));\n\t\tjLabel.setText(PluginServices.getText(this,\n\t\t\t\t\"Areas_de_influencia._Introduccion_de_datos\") + \":\");\n\t\tjLabel.setBounds(5, 20, 343, 21);\n\t\tjLabel3.setText(PluginServices.getText(this, \"Cobertura_de_entrada\")\n\t\t\t\t+ \":\");\n\t\tjLabel3.setBounds(6, 63, 190, 21);\n\t\tthis.add(jLabel, null);\n\t\tthis.add(jLabel3, null);\n\t\tthis.add(getLayersComboBox(), null);\n\t\tthis.add(getSelectedOnlyCheckBox(), null);\n\t\tthis.add(getMethodSelectionPanel(), null);\n\t\tthis.add(getResultSelectionPanel(), null);\n\t\tthis.add(getExtendedOptionsPanel(), null);\n\t\tconfButtonGroup();\n\t\tlayersComboBox.setSelectedIndex(0);\n\t\tinitSelectedItemsJCheckBox();\n\t\tdistanceBufferRadioButton.setSelected(true);\n\t\tlayerFieldsComboBox.setEnabled(false);\n\t\tverifyTypeBufferComboEnabled();\n\t}",
"protected void initialize() {\n\t\tsetBodyColor(Color.BLACK);\r\n\t\tsetGunColor(Color.BLACK);\r\n\t\tsetRadarColor(Color.BLACK);\r\n\t\tsetScanColor(Color.BLUE);\r\n\t\tsetBulletColor(Color.RED);\r\n\t}",
"private void initializeProblemState()\r\n {\r\n\r\n problemState = new JTextArea(problem.getCurrentState().toString());\r\n problemState.setFont(new Font(Font.MONOSPACED, Font.BOLD, 24));\r\n finalProblemState = new JTextArea(problem.getFinalState().toString());\r\n finalProblemState.setFont(problemState.getFont());\r\n finalStateLabel.setBorder(new TitledBorder(\"Final State\"));\r\n finalStateLabel.setLayout(new FlowLayout());\r\n stateLabel.setBorder(new TitledBorder(\"Current State\"));\r\n stateLabel.setLayout(new FlowLayout());\r\n\r\n if (canvas != null)\r\n {\r\n stateLabel.add(canvas);\r\n canvas.render();\r\n stateLabel.setPreferredSize(new Dimension(canvas.getPreferredSize().width\r\n + DEFAULT_BUTTON_SPACING * 5,\r\n canvas.getPreferredSize().height + DEFAULT_BUTTON_SPACING * 5\r\n ));\r\n } else\r\n {\r\n stateLabel.add(problemState);\r\n stateLabel.setPreferredSize(new Dimension(problemState.getPreferredSize().width\r\n + (problemState.getFont().getSize() / 2),\r\n problemState.getPreferredSize().height + problemState.getFont().getSize() * 5 / 4));\r\n }\r\n if (finalStateCanvas != null)\r\n {\r\n finalStateLabel.add(finalStateCanvas);\r\n finalStateCanvas.render();\r\n finalStateLabel.setPreferredSize(stateLabel.getPreferredSize());\r\n } else\r\n {\r\n finalStateLabel.add(finalProblemState);\r\n finalStateLabel.setPreferredSize(stateLabel.getPreferredSize());\r\n }\r\n }",
"public BindingConfigurationPanel() {\n initComponents();\n initGUI();\n }",
"@Override\r\n\tprotected void processInit() {\n\t\t\r\n\t}",
"public void autonomousInit() {\n \n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"@Override\n public void initialize() {\n }",
"private void initComponents()\n {\n //LAYOUT\n initLayoutComponents();\n \n //TRANSITION COMPONENTS\n initTransitionComponents();\n \n //SEARCH PANE COMPONENTS\n initSearchComponents();\n \n //RESULTS PANE COMPONENTS\n initResultComponents();\n \n // CRAWLER CONTROLS\n initCrawlerControlsComponents();\n \n // KEYWORD BAR\n initKeywordBarComponents();\n \n //WORKER CONTROLS\n initWorkerComponents();\n \n //URL COMPONENTS\n initURLMenuComponents();\n\n //BASE LAYOUT COMPONENTS\n initBaseLayout();\n }",
"@Override\n\tpublic void autonomousInit() {\n\t}",
"protected void initialize()\r\n {\n }",
"protected void initControl() {\n\t\t\r\n\t}",
"@Override\n public void disabledInit()\n {\n }",
"public void initialize() {\n }"
] | [
"0.68597656",
"0.6850982",
"0.68231446",
"0.68231446",
"0.6807123",
"0.6758985",
"0.65993106",
"0.6553961",
"0.6553961",
"0.64898616",
"0.6473493",
"0.6452055",
"0.6432683",
"0.6343021",
"0.6331948",
"0.6327204",
"0.63205326",
"0.6289855",
"0.6250076",
"0.6238714",
"0.6224734",
"0.6212057",
"0.6197318",
"0.6188159",
"0.61402667",
"0.6139519",
"0.613832",
"0.6138014",
"0.6122367",
"0.6121102",
"0.6103219",
"0.6097252",
"0.60887027",
"0.60717624",
"0.6063365",
"0.6063127",
"0.6055013",
"0.60445917",
"0.6038056",
"0.6037928",
"0.603675",
"0.60029095",
"0.6000263",
"0.59949327",
"0.5989917",
"0.59742725",
"0.5972745",
"0.5964711",
"0.5952759",
"0.593811",
"0.5937402",
"0.5937402",
"0.59364015",
"0.593299",
"0.5932427",
"0.59321296",
"0.59307003",
"0.5929132",
"0.59284556",
"0.59263074",
"0.59150296",
"0.5911217",
"0.59058124",
"0.5895015",
"0.58948344",
"0.58928543",
"0.58912414",
"0.58900416",
"0.58791375",
"0.58752304",
"0.5874428",
"0.5874428",
"0.58729404",
"0.5869734",
"0.5867904",
"0.5851983",
"0.58488107",
"0.5846581",
"0.58464885",
"0.5839711",
"0.5831851",
"0.5830668",
"0.5828306",
"0.5820311",
"0.5816442",
"0.5814221",
"0.5814093",
"0.5812862",
"0.58112985",
"0.5809852",
"0.580307",
"0.5802632",
"0.58020926",
"0.58020926",
"0.58020926",
"0.5800694",
"0.58004963",
"0.57956314",
"0.5792599",
"0.57907313",
"0.578494"
] | 0.0 | -1 |
/ YOU CAN ADD OTHER COMPONENTS HERE Accessor for the hardware facade for this vending machine. | public HardwareFacade getHardware() {
return hf;
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public PeripheralHardwareDriverInterface getHardwareDriver();",
"public Peripheral getHardwareDriverFromSoftwareDriver();",
"public HardwareProfile hardwareProfile() {\n return this.hardwareProfile;\n }",
"public final PeripheralSoftwareDriverInterface getSoftwareDriver(){\n return peripheralSoftware;\n }",
"protected double getEnginePower(){\n return enginePower;\n }",
"PhysicalMachine getPhysicalMachine() {\n return pm;\n }",
"public HardwareSwitch() {\r\n\t\tif (modelPackage == null) {\r\n\t\t\tmodelPackage = HardwarePackage.eINSTANCE;\r\n\t\t}\r\n\t}",
"public double getEnginePower(){\n return enginePower;\n }",
"public final PeripheralHardwareDriverInterface getPeripheralHardwareDriver() throws PeripheralHardwareException {\n if(peripheralDriver!=null){\n return peripheralDriver;\n } else {\n throw new PeripheralHardwareException(\"There is no hardware driver present\");\n }\n }",
"void openHardware(){\n if(hardware!=null && hardware.isOpen()){\n playMode=PlayMode.LIVE; // in case (like StereoHardwareInterface) where device can be open but not by MotionViewer\n return;\n }\n try{\n hardware=(SiLabsC8051F320_OpticalFlowHardwareInterface)OpticalFlowHardwareInterfaceFactory.instance().getFirstAvailableInterface();\n hardware.setChip(chip);\n chip.setHardwareInterface(hardware);\n hardware.open();\n\n\n \n if(hardware==null) {\n fixLoggingControls();\n fixBiasgenControls();\n return;\n }\n\n fixLoggingControls();\n fixBiasgenControls();\n // note it is important that this openHardware succeeed BEFORE hardware is assigned to biasgen, which immeiately tries to openHardware and download biases, creating a storm of complaints if not sucessful!\n \n// if(hardware instanceof BiasgenHardwareInterface){\n// chip.getBiasgen().sendConfiguration(chip.getBiasgen());\n// chip.setHardwareInterface(hardware); // if we do this, events do not start coming again after reconnect of device\n// biasgen=chip.getBiasgen();\n// if(biasgenFrame==null) {\n// biasgenFrame=new BiasgenFrame(biasgen); // should check if exists...\n// }\n// }\n \n setPlaybackControlsEnabledState(true);\n setPlayMode(PlayMode.LIVE);\n setTitleAccordingToState();\n }catch(Exception e){\n log.warning(e.getMessage());\n if(hardware!= null) hardware.close();\n setPlaybackControlsEnabledState(false);\n fixLoggingControls();\n fixBiasgenControls();\n setPlayMode(PlayMode.WAITING);\n }\n }",
"public XmuCoreSwitchElements getXmuCoreSwitchAccess() {\r\n\t\treturn pXmuCoreSwitch;\r\n\t}",
"private void initHardware(){\n }",
"double a_right_front_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_front_drv_Motor != null)\n {\n l_return = right_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }",
"public Machine machine() {\n return machine;\n }",
"private HardwareDeviceRental(){\r\n\r\n this.initializeComponent();\r\n hardwares= new ArrayList<HardwareDevice>();\r\n\r\n }",
"public Hardware() {\n hwMap = null;\n }",
"double a_right_back_drive_power ()\n {\n double l_return = 0.0;\n\n if (right_back_drv_Motor != null)\n {\n l_return = right_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }",
"double a_left_front_drive_power()\n {\n double l_return = 0.0;\n if (left_front_drv_Motor != null)\n {\n l_return = left_front_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }",
"public PeripheralHardwareDriver.PeripheralVersion getPeripheralSoftwareId() throws PeripheralHardwareException,UnsupportedOperationException {\n if(softwareDriverId!=null){\n return softwareDriverId;\n } else {\n if(peripheralDriver!=null){\n softwareDriverId = peripheralDriver.getSoftwareId();\n return softwareDriverId;\n } else {\n throw new PeripheralHardwareException(\"There is no peripheral software driver present\");\n }\n }\n }",
"public final Device blockingGetHardware() {\n Device hardware = find(false);\n if (hardware != null) {\n return hardware;\n }\n while (!Thread.currentThread().isInterrupted()) {\n try {\n Thread.sleep(2000);\n Device hardware2 = find(false);\n if (hardware2 != null) {\n return hardware2;\n }\n } catch (InterruptedException e) {\n return null;\n }\n }\n return null;\n }",
"@Override //Done\n public USBMonitor getUSBMonitor() {\n return mUSBMonitor;\n }",
"public String getDeviceName() {\n return this.deviceName;\n }",
"public Vehicle getVehicle() {\n\t\treturn new Vehicle(\"越野车\",\"LSW12333\",\"通用凯迪拉克\");\r\n\t}",
"@Override\n\tpublic boolean isHardware(){\n\t\treturn false;\n\t}",
"double a_left_back_drive_power()\n {\n double l_return = 0.0;\n if (left_back_drv_Motor != null)\n {\n l_return = left_back_drv_Motor.getPower ();\n }\n\n return l_return;\n\n }",
"Reference getDevice();",
"protected HardwareDevice getHardwareOn(String name, Object hardwareDeviceMapping) {\n\n HardwareDevice hardwareDevice = null;\n try {\n HardwareMap.DeviceMapping<HardwareDevice> deviceMapping = (HardwareMap.DeviceMapping<HardwareDevice>) hardwareDeviceMapping;\n hardwareDevice = (HardwareDevice)deviceMapping.get(name);\n }\n catch (Throwable e)\n {\n try {\n ActiveOpMode.handleCatchAllException(e, getTelemetryUtil());\n } catch (InterruptedException e1) {\n //DbgLog.msg(e.getLocalizedMessage());\n }\n\n }\n\n return hardwareDevice;\n }",
"public interface PeripheralSoftwareDriverInterface extends DriverBaseDataEventListener {\r\n\r\n /**\r\n * Is set in the BaseDriver, you can overwrite it, but for debugging\r\n * purposes not handy\r\n */\r\n public final static String DriverBaseName = \"driver:port\";\r\n\r\n /**\r\n * Returns the driver DB id.\r\n * @return \r\n */\r\n public int getId();\r\n \r\n /**\r\n * Starts the driver and runs the thread\r\n */\r\n public void startDriver();\r\n\r\n /**\r\n * Stops the driver and the thread the driver is running in\r\n */\r\n public void stopDriver();\r\n\r\n /**\r\n * Returns the Hardware driver which belongs to the given running software\r\n * driver.\r\n *\r\n * @return\r\n */\r\n public Peripheral getHardwareDriverFromSoftwareDriver();\r\n\r\n \r\n /**\r\n * Returns the hardware driver.\r\n * @return \r\n */\r\n public PeripheralHardwareDriverInterface getHardwareDriver();\r\n \r\n /**\r\n * Returns the amount of active devices attached to this driver.\r\n *\r\n * @return\r\n */\r\n public int getRunningDevicesCount();\r\n\r\n /**\r\n * Returns a list of running devices whom belong to this driver.\r\n *\r\n * @return\r\n */\r\n public List<Device> getRunningDevices();\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay. this function\r\n * should create a batch with a default name (anonymous)\r\n *\r\n * @param batchData Strings with commands\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData);\r\n\r\n /**\r\n * Send a batch of commands through the proxy. This method is preferred when\r\n * sending multiple commands at once with a build in delay.\r\n *\r\n * @param batchData Strings with commands\r\n * @param batchName String with the name of the batch to use later on with\r\n * runBatch()\r\n * @see #runBatch()\r\n * @see #runBatch(java.lang.String)\r\n */\r\n public void addBatch(List<Map<String, String>> batchData, String batchName);\r\n\r\n /**\r\n * Runs the batch previously set with the anonymous addBatch\r\n */\r\n public void runBatch();\r\n\r\n /**\r\n * Runs the batch previously set with addBatch with a batchName\r\n *\r\n * @param batchName Name of the batch to run\r\n */\r\n public void runBatch(String batchName);\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @param prefix When having multiple devices supported by the hardware a\r\n * prefix can distinct the device in your hardware\r\n * @return result of the send command\r\n * @throws java.io.IOException\r\n * @Obsolete Use writeBytes.\r\n */\r\n public boolean sendData(String data, String prefix) throws IOException;\r\n\r\n /**\r\n * Sends the data to the hardware itself\r\n *\r\n * @param data The data to send\r\n * @return the result of the command\r\n * @throws java.io.IOException\r\n * @Obsolete Use WriteBytes.\r\n */\r\n public boolean sendData(String data) throws IOException;\r\n\r\n /**\r\n * Retrieves the name of the class.\r\n *\r\n * @return the name of the class\r\n */\r\n public String getName();\r\n\r\n /**\r\n * For adding an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void setPeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * for removing an hardware driver.\r\n *\r\n * @param l\r\n */\r\n public void removePeripheralEventListener(PeripheralHardwareDriverInterface l);\r\n\r\n /**\r\n * Handles data received from the hardware driver to be used by overwriting\r\n * classes.\r\n *\r\n * @param oEvent\r\n */\r\n @Override\r\n public void driverBaseDataReceived(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Driver proxy for hardware data.\r\n *\r\n * @param oEvent\r\n */\r\n public void driverBaseDataReceivedProxy(PeripheralHardwareDataEvent oEvent);\r\n\r\n /**\r\n * Returns the package name of the driver as used in the database.\r\n *\r\n * @return The package name of this class\r\n */\r\n public String getPackageName();\r\n\r\n /**\r\n * Adds a device to the listers for whom data can exist.\r\n *\r\n * @param device\r\n */\r\n public void addDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Removes a device from the listeners list.\r\n *\r\n * @param device\r\n */\r\n public void removeDeviceListener(DeviceDriverListener device);\r\n\r\n /**\r\n * Handle the data coming from a device driver to dispatch to the hardware\r\n * driver. With this function you can do stuff with the data. For example if\r\n * needed change from string to byte array?\r\n *\r\n * @param device\r\n * @param group\r\n * @param set\r\n * @param deviceData\r\n * @return A string which represents a result, human readable please.\r\n * @throws java.io.IOException\r\n */\r\n public boolean handleDeviceData(Device device, String group, String set, String deviceData) throws IOException;\r\n\r\n /**\r\n * Handles data coming from a device as is in the request!\r\n * @param device\r\n * @param request\r\n * @return\r\n * @throws IOException \r\n */\r\n public boolean handleDeviceData(Device device, DeviceCommandRequest request) throws IOException;\r\n \r\n /**\r\n * Sets the driver DB id.\r\n * @param driverDBId \r\n */\r\n public void setId(int driverDBId);\r\n \r\n /**\r\n * Sets the named id\r\n * @param dbNameId\r\n */\r\n public void setNamedId(String dbNameId);\r\n \r\n /**\r\n * Gets the named id\r\n * @return \r\n */\r\n public String getNamedId();\r\n \r\n /**\r\n * Returns if the driver supports custom devices.\r\n * @return \r\n */\r\n public boolean hasCustom();\r\n \r\n /**\r\n * Set if a driver has custom devices.\r\n * @param hasCustom\r\n * @return \r\n */\r\n public void setHasCustom(boolean hasCustom);\r\n \r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @param softwareId\r\n */\r\n public void setSoftwareDriverId(String softwareId);\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @param softwareIdVersion\r\n */\r\n public void setSoftwareDriverVersion(String softwareIdVersion);\r\n\r\n /**\r\n * Returns the software driver id.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverId();\r\n\r\n /**\r\n * Returns the version set in the driver.\r\n *\r\n * @return\r\n */\r\n public String getSoftwareDriverVersion();\r\n\r\n /**\r\n * Returns true if there is a web presentation present.\r\n *\r\n * @return\r\n */\r\n public boolean hasPresentation();\r\n\r\n /**\r\n * Sets a web presentation;\r\n *\r\n * @param pres\r\n */\r\n public void addWebPresentationGroup(WebPresentationGroup pres);\r\n\r\n /**\r\n * Returns the web presentation.\r\n *\r\n * @return\r\n */\r\n public List<WebPresentationGroup> getWebPresentationGroups();\r\n\r\n /**\r\n * Sets the friendlyname.\r\n * @param name \r\n */\r\n public void setFriendlyName(String name);\r\n \r\n /**\r\n * Returns the friendlyname.\r\n * @return \r\n */\r\n public String getFriendlyName();\r\n \r\n /**\r\n * Sets a link with the device service.\r\n * @param deviceServiceLink \r\n */\r\n public void setDeviceServiceLink(PeripheralDriverDeviceMutationInterface deviceServiceLink);\r\n \r\n /**\r\n * Removes a device service link.\r\n */\r\n public void removeDeviceServiceLink();\r\n \r\n /**\r\n * Indicator to let know a device is loaded.\r\n * @param device \r\n */\r\n public void deviceLoaded(Device device);\r\n \r\n}",
"public static Computer getBasicComputer() {\n // Build and return a basic computer\n return new Computer.Builder(\"2GB\", \"2TB\", \"Intel i7\").setBluetoothEnabled(true).build();\n }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initializing\"); //display on the drivers phone that its working\n\n FLM = hardwareMap.get(DcMotor.class, \"FLM\"); //Go into the config and get the device named \"FLM\" and assign it to FLM\n FRM = hardwareMap.get(DcMotor.class, \"FRM\"); //device name doesn't have to be the same as the variable name\n BLM = hardwareMap.get(DcMotor.class, \"BLM\"); //DcMotor.class because that is what the object is\n BRM = hardwareMap.get(DcMotor.class, \"BRM\");\n\n BigSuck = hardwareMap.get(DcMotor.class, \"BigSUCK\");\n SmallSuck = hardwareMap.get(DcMotor.class, \"SmallSUCK\");\n SmallSuck.setDirection(DcMotor.Direction.REVERSE);\n \n UpLift = hardwareMap.get(DcMotor.class, \"LIFT\");\n UpLift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n UpLift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n //Make it so we don't have to add flip the sign of the power we are setting to half the motors\n //FRM.setDirection(DcMotor.Direction.REVERSE); //Run the right side of the robot backwards\n FLM.setDirection(DcMotor.Direction.REVERSE);\n BRM.setDirection(DcMotor.Direction.REVERSE); //the right motors are facing differently than the left handed ones\n\n FLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n FRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BLM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n BRM.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n DragArm = hardwareMap.servo.get(\"drag_arm\");\n DragArm.setDirection(Servo.Direction.REVERSE);\n DragArm.setPosition(DragArmRestPosition);\n\n LiftGrab = hardwareMap.servo.get(\"GRAB\");\n LiftGrab.setPosition(LiftGrabRestPosition);\n\n LiftSwivel = hardwareMap.servo.get(\"SWIVEL\");\n LiftSwivel.setPosition(LiftSwivelRestPosition);\n\n Push = hardwareMap.get(Servo.class, \"PUSH\");\n Push.setDirection(Servo.Direction.FORWARD);\n Push.setPosition(PushRestPosition);\n\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.update();\n }",
"final int getDriverNum() {\n return device.getDriverNum(this);\n }",
"public static ElectronicDevice getDevice(){\n\t\treturn new Television();\n\t\t\n\t}",
"@Override\n protected double speedFactor() {\n return getEnginePower() * 0.003;\n }",
"public ChassisSubsystem() {\n \tleftMotor.setInverted(RobotMap.leftMotorInverted);\n \trightMotor.setInverted(RobotMap.rightMotorInverted);\n \tleftMiniCIM.setInverted(RobotMap.leftMiniCIMInverted);\n \trightMiniCIM.setInverted(RobotMap.rightMiniCIMInverted);\n }",
"@Override\n public USBMonitor getUSBMonitor() {\n return mUSBMonitor;\n }",
"public Software getSoftware() {\n return software;\n }",
"protected TargetFeatureComputer getTargetFeatureComputer(Voice v)\r\n {\r\n return v.getHalfphoneTargetFeatureComputer();\r\n }",
"public void hardwareResources() {\n\t\tSystem.out.println(\"I am the Hardware implemented through Multiple inheritence in Desktop class\");\r\n\r\n\t}",
"public final void startHardwareDriver() throws PeripheralHardwareException {\n try {\n softwareDriverId = getPeripheralSoftwareId();\n } catch (PeripheralHardwareException ex) {\n LOG.error(\"Problem getting peripheral software id: {}\", ex.getMessage());\n } catch (UnsupportedOperationException ex){\n LOG.error(\"Retrieving the software id on the peripheral is unsupported: {}\", ex.getMessage());\n }\n if(peripheralDriver!=null){\n peripheralDriver.startHardwareDriver();\n }\n }",
"public SmartDevice getDispozitiv(){\n\t\treturn this.dispozitiv;\n\t}",
"public float getVehicleSpeed() {\n return vehicleSpeed;\n }",
"public SensorActuatorMachine() {\n this.agent = ExecutionComponentFeature.LOCAL.get();\n if (agent == null) {\n throw new IllegalStateException(\"Must be called on agent thread.\");\n }\n self = Environment.getInstance().createMachine(agent);\n template = new ServiceManager(self.getServiceManager());\n }",
"public DitheredTankDriveController(RobotHardware hardware) {\n leftEncoder = hardware.drivetrainHardware.leftEncoder;\n rightEncoder = hardware.drivetrainHardware.rightEncoder;\n }",
"public interface HardwareServices\n{\n Hardware create(Hardware hardware);\n\n Hardware read(long id);\n\n Hardware update(Hardware hardware);\n\n void delete(long id);\n}",
"private static String m4387a() {\n String str;\n String str2 = \"\";\n try {\n Class cls = Class.forName(\"android.os.SystemProperties\");\n Method method = cls.getMethod(\"get\", new Class[]{String.class});\n if (method != null) {\n if (((String) method.invoke(cls.newInstance(), new Object[]{\"telephony.lteOnCdmaDevice\"})).equals(\"1\")) {\n Method method2 = Class.forName(\"com.huawei.android.hwnv.HWNVFuncation\").getMethod(\"getNVIMEI\", new Class[0]);\n if (method2 == null) {\n return str2;\n }\n method2.setAccessible(true);\n str = (String) method2.invoke(null, new Object[0]);\n return str;\n }\n }\n } catch (Throwable th) {\n }\n str = str2;\n return str;\n }",
"public byte getSensor() {\r\n\t\tbyte sensor;\r\n\t\tsensor=this.sensor;\r\n\t\treturn sensor;\r\n\t}",
"public WVM getWVM() {\n return wvm;\n }",
"public final void modifyMotorcycle(){\r\n \tgetOffer();\r\n \tgetExhaustSystem();\r\n \tgetTires();\r\n getWindshield();\r\n getLED();\r\n getEngineGuards();\r\n /* Note that any of this methods \r\n \t * could provide a default implementation \r\n \t * by being concretely defined\r\n \t */\r\n }",
"@Override\n\tpublic Computer getComputer() {\n\t\treturn com;\n\t}",
"String getDeviceName();",
"public static CPU instance(){\n return cpu;\n }",
"public String getClientMachine();",
"public Cpu getCpu(){\n return maquina;\n }",
"@Override\n\tprotected void checkHardware() {\n\t\tsuper.checkHardware();\n\t}",
"public IGarmentDriver getSensorDriver() {\n return sensorDriver;\n }",
"public String getSoftwareDriverId();",
"@Override\n public double getPower()\n {\n final String funcName = \"getPower\";\n double power = motor.get();\n\n if (debugEnabled)\n {\n dbgTrace.traceEnter(funcName, TrcDbgTrace.TraceLevel.API);\n dbgTrace.traceExit(funcName, TrcDbgTrace.TraceLevel.API, \"=%f\", power);\n }\n\n return power;\n }",
"public SwerveDrive() {\n //TODO:properly construct the swerve modules, and put then in an array, int already in Constants\n // frontLeft = new SwerveModule();\n // rearLeft = new SwerveModule();\n // rearRight = new SwerveModule();\n // frontRight = new SwerveModule();\n ////This may seem repetitive, but it makes clear which module is which.\n // swerveModules = new SwerveModule[]{\n // frontLeft,\n // rearLeft,\n // rearRight,\n // frontRight\n // };\n \n //TODO:Construct the IMU object, alreeady named imu\n\n }",
"public Selling_Machine() {\n initComponents();\n \n }",
"final int getDeviceNum() {\n return device.getDeviceNum();\n }",
"public Joystick getTabletJoystick(){\n return tab;\n}",
"public double getCurrentFuel();",
"public float obtenMotor(){\r\n return this.motor;\r\n }",
"public interface ElectronicsDevice {\n}",
"public DriveSubsystem() {\n leftFrontMotor = new TalonSRX(RobotMap.leftFrontMotor);\n rightFrontMotor = new TalonSRX(RobotMap.rightFrontMotor);\n leftBackMotor = new TalonSRX(RobotMap.leftBackMotor);\n rightBackMotor = new TalonSRX(RobotMap.rightBackMotor);\n // rightMotor.setInverted(true); \n direction = 0.75;\n SmartDashboard.putString(\"Direction\", \"Shooter side\");\n }",
"public java.lang.Boolean getCpuHotPlug() {\r\n return cpuHotPlug;\r\n }",
"public HWDiskStore() {\n this.diskStore = new oshi.hardware.HWDiskStore();\n }",
"public String getManufacturer() {\n\t\treturn \"Raspberry\";\n\t}",
"@Override\n public void onMachineActivated()\n {\n \n }",
"public final void releaseHardwareDriver(){\n if(peripheralDriver!=null){\n peripheralDriver.releaseDriver();\n }\n }",
"public final String getDevicePort(){\n return peripheralPort;\n }",
"public CPU getCPU() {\r\n\t\treturn cpu;\r\n\t}",
"public Volvo740() {\n\t\tcolor = Color.RED;\n\t\tenginePower = 100;\n\t\tmodelName = \"Volvo740\";\n\t\tstopEngine();\n\t}",
"public final void stopHardwareDriver(){\n if(peripheralDriver!=null){\n peripheralDriver.stopHardwareDriver();\n }\n }",
"public String getDeviceName(){\n\t return deviceName;\n }",
"Object getPlatform();",
"public DriveSubsystem() {\n m_leftSpark1 = new CANSparkMax(DriveConstants.kLeftMotor1Port, MotorType.kBrushless);\n m_leftSpark2 = new CANSparkMax(DriveConstants.kLeftMotor2Port, MotorType.kBrushless);\n m_rightSpark1 = new CANSparkMax(DriveConstants.kRightMotor1Port, MotorType.kBrushless);\n m_rightSpark2 = new CANSparkMax(DriveConstants.kRightMotor2Port, MotorType.kBrushless);\n\n initSparkMax(m_leftSpark1);\n initSparkMax(m_leftSpark2);\n initSparkMax(m_rightSpark1);\n initSparkMax(m_rightSpark2);\n\n m_leftSpark2.follow(m_leftSpark1);\n m_rightSpark2.follow(m_rightSpark2);\n\n m_leftEncoder = m_leftSpark1.getEncoder();\n m_rightEncoder = m_rightSpark1.getEncoder();\n\n m_drive = new DifferentialDrive(m_leftSpark1, m_rightSpark1);\n }",
"public EnigmaMachine getEnigmaMachine() {\r\n\t\treturn enigma;\r\n\t}",
"public final String getDeviceKey(){\n return peripheralKey;\n }",
"@Override\n DoorMat getPowered(boolean powered) throws RuntimeException;",
"public static final native int getChargingCurrent();",
"public static final native int getChargingVoltage();",
"public ABLPower Power() {\r\n\t\treturn new ABLPower(BrickFinder.getDefault().getPower());\r\n\t}",
"public void returnHardwareDevice()\n {\n try\n {\n Integer equipmentNum=Integer.parseInt(rentEquipmentNumtxt.getText());\n if(equipmentNum<equipment.size())\n {\n HardwareDeviceToRent returnHardware=(HardwareDeviceToRent) equipment.get(equipmentNum);\n returnHardware.makeHardwareDeviceAvailable();\n JOptionPane.showMessageDialog(frame, \"Successfully returned the Hardware Device\",\"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n else\n {\n JOptionPane.showMessageDialog(frame, \"Invalid number\", \"title\", JOptionPane.ERROR_MESSAGE);\n }\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame,\"Error\", \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public static Turing_Machine initialiseMachine() {\n\t\tnew FenetreCreation();\n\t\ttry {\n\t\t\tbarrier.await();\n\t\t} catch (Exception e) {\n\t\t\tJOptionPane.showMessageDialog(null,\n\t\t\t\t\te.getMessage(), \"Erreur\", JOptionPane.ERROR_MESSAGE);\n\t\t\treturn null;\n\t\t}\n\t\tTuring_Machine tmp = machine;\n\t\tmachine = null;\n\t\treturn tmp;\n\t}",
"public String getSoftwareDriverVersion();",
"public double getCurrentSpeed(){\n return currentSpeed;\n }",
"public double getCurrentSpeed(){\n return currentSpeed;\n }",
"public double getMeterPower() {\n final double current = this.getMeterCurrent().isPresent() ? this.getMeterCurrent().get() : 0;\n final double voltage = this.getMeterVoltage().isPresent() ? this.getMeterVoltage().get() : 0;\n return current * voltage;\n }",
"public IElectricMeterBCF getElectricMeterBCF()\r\n\t{\r\n\t\treturn electricMeterBCF;\r\n\t}",
"Vehicle getVehicle() {\n\t\t\treturn currentVehicle;\n\t\t}",
"public int getHeroPower() {\n\n return heroPower;\n }",
"private boolean poleSwitchEngaged(){\n return true; //poleSwitch.get();\n }",
"public double ElectricCurrent() {\n return OCCwrapJavaJNI.Units_Dimensions_ElectricCurrent(swigCPtr, this);\n }",
"public Pair<Byte,Short> getCurrentWeapon(){\n return this.currentWeapon;\n }",
"public C1680ab mo7065b() {\n return this.f4965g;\n }",
"public Device getDevice() {\n\t\tDevice device = new Device();\n\n\t\tdevice.setName(\"DeviceNorgren\");\n\t\tdevice.setManufacturer(\"Norgren\");\n\t\tdevice.setVersion(\"5.7.3\");\n\t\tdevice.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\n\t\tSensor sensorTemperature = new Sensor();\n\t\tsensorTemperature.setName(\"SensorSiemens\");\n\t\tsensorTemperature.setManufacturer(\"Siemens\");\n\t\tsensorTemperature.setVersion(\"1.2.2\");\n\t\tsensorTemperature.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorTemperature.setMonitor(\"Temperature\");\n\n\t\tSensor sensorPressure = new Sensor();\n\t\tsensorPressure.setName(\"SensorOmron\");\n\t\tsensorPressure.setManufacturer(\"Omron\");\n\t\tsensorPressure.setVersion(\"0.5.2\");\n\t\tsensorPressure.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tsensorPressure.setMonitor(\"Pressure\");\n\n\t\tdevice.getListSensor().add(sensorTemperature);\n\t\tdevice.getListSensor().add(sensorPressure);\n\n\t\tActuator actuadorKey = new Actuator();\n\n\t\tactuadorKey.setName(\"SensorAutonics\");\n\t\tactuadorKey.setManufacturer(\"Autonics\");\n\t\tactuadorKey.setVersion(\"3.1\");\n\t\tactuadorKey.setDescriptionSemantic(\"http://www.loa-cnr.it/ontologies/DUL.owl#isDescribedBy\");\n\t\tactuadorKey.setAction(\"On-Off\");\n\n\t\tdevice.getListActuator().add(actuadorKey);\n\n\t\treturn device;\n\n\t}",
"public String getMacBluetooth()\n/* */ {\n/* 69 */ return this.macBluetooth;\n/* */ }",
"@Override\n public void init() {\n telemetry.addData(\"Status\", \"Initialized\");\n\n // Initialize the hardware variables. Note that the strings used here as parameters\n // to 'get' must correspond to the names assigned during the robot configuration\n // step (using the FTC Robot Controller app on the phone).\n left = hardwareMap.get(DcMotor.class, \"left\");\n right = hardwareMap.get(DcMotor.class, \"right\");\n wrist = hardwareMap.crservo.get(\"wrist\");\n extension = hardwareMap.get(DcMotor.class, \"extension\");\n lift = hardwareMap.get(DcMotor.class, \"lift\");\n\n\n //lift = hardwareMap.get(DcMotor.class, \"lift\");\n bucket = hardwareMap.servo.get(\"bucket\");\n //fBucket = hardwareMap.get(DcMotor.class, \"fBucket\");\n //fBucket.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n left.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n right.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n\n extension.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n collection = hardwareMap.crservo.get(\"collection\");\n //lift.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);\n // Most robots need the motor on one side to be reversed to drive forward\n // Reverse the motor that runs backwards when connected directly to the battery\n left.setDirection(DcMotor.Direction.FORWARD);\n right.setDirection(DcMotor.Direction.REVERSE);\n //lift.setDirection(DcMotor.Direction.FORWARD);\n // fBucket.setDirection(DcMotor.Direction.FORWARD);\n lift.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER);\n lift.setMode(DcMotor.RunMode.RUN_USING_ENCODER);\n // Tell the driver that initialization is complete.\n telemetry.addData(\"Status\", \"Initialized\");\n telemetry.addData(\"left\", left.getPower());\n telemetry.addData(\"right\", right.getPower());\n //telemetry.addData(\"lift\", lift.getPower());\n telemetry.addData(\"collection\", collection.getPower());\n //wrist.setPosition(-1);\n //telemetry.addData(\"fBucket\", fBucket.getPower());\n //Robot robot = new Robot(lift, extension, wrist, bucket, collection, drive);\n }",
"public final int getFuelUpgrade(){ return fuelUpgrade;}"
] | [
"0.71728975",
"0.706205",
"0.62925476",
"0.6231438",
"0.62217194",
"0.61804277",
"0.6156562",
"0.6144565",
"0.60279655",
"0.60204756",
"0.5962449",
"0.5953359",
"0.59325725",
"0.59192616",
"0.5868336",
"0.58198327",
"0.5815036",
"0.574087",
"0.57261723",
"0.5718414",
"0.5694968",
"0.5693738",
"0.56818235",
"0.56456417",
"0.5619435",
"0.56080824",
"0.56052035",
"0.55775076",
"0.55347455",
"0.5525058",
"0.55191725",
"0.5510396",
"0.55077934",
"0.5499834",
"0.54998183",
"0.546553",
"0.5460557",
"0.5460334",
"0.54466337",
"0.5419813",
"0.54195684",
"0.5416834",
"0.5408174",
"0.54029936",
"0.5397857",
"0.53960264",
"0.5380996",
"0.53789866",
"0.53766066",
"0.53597176",
"0.5359575",
"0.53436637",
"0.53417873",
"0.53348273",
"0.53236866",
"0.53205264",
"0.5318531",
"0.5313532",
"0.53033215",
"0.53026056",
"0.5296878",
"0.5291858",
"0.52718073",
"0.5269936",
"0.52689505",
"0.52628726",
"0.5256752",
"0.5254093",
"0.52503294",
"0.5245988",
"0.52454096",
"0.524391",
"0.5241211",
"0.52359504",
"0.52342004",
"0.5228072",
"0.5225108",
"0.5223234",
"0.5221185",
"0.5219698",
"0.5219393",
"0.5209578",
"0.5209369",
"0.52058566",
"0.5200109",
"0.5198188",
"0.51926106",
"0.51926106",
"0.51838386",
"0.5180104",
"0.5176332",
"0.51735646",
"0.51669776",
"0.51668984",
"0.51588804",
"0.51572883",
"0.5156987",
"0.5148539",
"0.51483136",
"0.5141347"
] | 0.7563062 | 0 |
Creates a standard arrangement for the vending machine. All the components are created and interconnected. The hardware is initially empty. The product kind names and costs are initialized to " " and 1 respectively. | public VendingMachine(Cents[] coinKinds, int selectionButtonCount, int coinRackCapacity, int productRackCapacity, int receptacleCapacity) {
hf = new HardwareFacade(coinKinds, selectionButtonCount, coinRackCapacity, productRackCapacity, receptacleCapacity);
prepareCoinHandler();
prepareSBHandler();
prepareCoinRacks();
/*
for(int i = 0; i < vm.getNumberOfSelectionButtons(); i++) {
SelectionButton sb = vm.getSelectionButton(i);
sb.register(this);
buttonToIndex.put(sb, i);
}
for(int i = 0; i < vm.getNumberOfCoinRacks(); i++) {
int value = vm.getCoinKindForCoinRack(i);
valueToIndexMap.put(value, i);
}*/
/* YOU CAN BUILD AND INSTALL THE HARDWARE HERE */
} | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public VendingMachine(){\n this.customerMoney = new ArrayList<>();\n this.bank = new ArrayList<>();\n this.stock = new ArrayList<>();\n stock.add(new Product(\"Cookie\", .50, 10));\n stock.add(new Product(\"Crackers\", .25, 10));\n stock.add(new Product(\"Candy\", .45, 10));\n stock.add(new Product(\"Water\", 1.0, 10));\n stock.add(new Product(\"Juice\", 1.5, 10));\n }",
"public static Items initialVendingMachine() {\n Items items = new Items();\n Item cola = new Item(R.drawable.cola, \"Cola\", 30, 100, 3000, 0);\n Item chips = new Item(R.drawable.chips, \"Chips\", 30, 50, 3000, 0);\n Item candy = new Item(R.drawable.candy, \"Candy\", 30, 65, 3000, 0);\n items.addItem(cola);\n items.addItem(chips);\n items.addItem(candy);\n items.addMachineCredit(5000);\n return items;\n }",
"private void setupPowerSystem() {\n\t\tps = new PowerSystem(PowerSystemSolutionMethod.ANL_OPF);\r\n\t\t\r\n\t\t// Create nodes & register with power system\r\n\t\tNodeData nodeWindGenerator = new NodeData(1,1.0,0,false,true);\r\n\t\tps.addNode(nodeWindGenerator);\r\n\t\tNodeData nodeSubstation2 = new NodeData(2,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation2);\r\n\t\tNodeData nodeCityResidential = new NodeData(3,1.0,0,false);\r\n\t\tps.addNode(nodeCityResidential);\r\n\t\tNodeData nodeCityIndustrial = new NodeData(4,1.0,0,false);\r\n\t\tps.addNode(nodeCityIndustrial);\r\n\t\tNodeData nodeCityCommercial = new NodeData(5,1.0,0,false);\r\n\t\tps.addNode(nodeCityCommercial);\r\n\t\tNodeData nodeCoalGenerator = new NodeData(7,1.0,0,false,true);\r\n\t\tps.addNode(nodeCoalGenerator);\r\n\t\tNodeData nodeSubstation3 = new NodeData(8,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation3);\r\n\t\tNodeData nodeGasGenerator = new NodeData(11,1.0,0,false,true);\r\n\t\tps.addNode(nodeGasGenerator);\r\n\t\tNodeData nodeWindStorage = new NodeData(9,1.0,0,false);\r\n\t\tps.addNode(nodeWindStorage);\r\n\t\tNodeData nodeSubstation1 = new NodeData(0,1.0,0,false);\r\n\t\tps.addNode(nodeSubstation1);\r\n\t\t\r\n\t\t// Create lines & register with power system\r\n\t\tMWTimeSeries branchTimeSeries = null;\r\n\t\t\r\n\t\tBranchData branchWindGeneratorToLocalSubstation = new BranchData(nodeWindGenerator,nodeSubstation1,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindGeneratorToLocalSubstation,\"Wind Generator to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindGeneratorToLocalSubstation);\r\n\r\n\t\tBranchData branchWindStorageToLocalSubstation = new BranchData(nodeWindStorage,nodeSubstation1,0.01,0,1500.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindStorageToLocalSubstation,\"Storage to Substation 1\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindStorageToLocalSubstation);\r\n\t\t\r\n\t\tbranchWindLocalSubstationToCitySubstation = new BranchData(nodeSubstation1,nodeSubstation2,0.01,0,125.0,false);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindLocalSubstationToCitySubstation,\"Substation 1 to Substation 2\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindLocalSubstationToCitySubstation);\r\n\t\t\r\n\t\tBranchData branchWindToResidential = new BranchData(nodeSubstation2,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToResidential,\"Substation 2 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToResidential);\r\n\t\t\r\n\t\tBranchData branchWindToCommercial = new BranchData(nodeSubstation2,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToCommercial,\"Substation 2 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchWindToCommercial);\r\n\r\n\t\tBranchData branchWindToIndustrial = new BranchData(nodeSubstation2,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchWindToIndustrial,\"Substation 2 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchWindToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalGeneratorToSubstation = new BranchData(nodeCoalGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalGeneratorToSubstation,\"Coal Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\r\n\t\tps.addBranch(branchCoalGeneratorToSubstation);\r\n\t\t\r\n\t\t\r\n\t\tBranchData branchGasToSubstation = new BranchData(nodeGasGenerator,nodeSubstation3,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchGasToSubstation,\"Natural Gas Generator to Substation 3\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchGasToSubstation);\r\n\t\t\r\n\t\tBranchData branchCoalToResidential = new BranchData(nodeSubstation3,nodeCityResidential,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToResidential,\"Substation 3 to Residential\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToResidential);\r\n\t\t\r\n\t\tBranchData branchCoalToIndustrial = new BranchData(nodeSubstation3,nodeCityIndustrial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToIndustrial,\"Substation 3 to Industrial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToIndustrial);\r\n\t\t\r\n\t\tBranchData branchCoalToCommercial = new BranchData(nodeSubstation3,nodeCityCommercial,0.01,0,1500.0,true);\r\n\t\tbranchTimeSeries = new MWTimeSeries(simClock,branchCoalToCommercial,\"Substation 3 to Commercial\");\r\n\t\tbranchFlowInformation.add(branchTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(branchTimeSeries);\t\t\r\n\t\tps.addBranch(branchCoalToCommercial);\r\n\r\n\t\t\r\n\t\t// Create loads\r\n\t\tMWTimeSeries loadTimeSeries = null;\r\n\t\t\r\n\t\tloadResidential = new LoadData(nodeCityResidential,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadResidential,\"Residential load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadResidential);\r\n\t\t\r\n\t\tloadCommercial = new LoadData(nodeCityCommercial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadCommercial,\"Commercial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadCommercial);\r\n\t\t\r\n\t\tloadIndustrial = new LoadData(nodeCityIndustrial,100.0,0,true);\r\n\t\tloadTimeSeries = new MWTimeSeries(simClock,loadIndustrial,\"Industrial load\");\r\n\t\tcircuitpanel.getAnimatables().add(loadTimeSeries);\r\n\t\tloadInformation.add(loadTimeSeries);\r\n\t\tps.addLoad(loadIndustrial);\r\n\t\t\r\n\t\t// Create gens\r\n\t\tMWTimeSeries genTimeSeries = null;\r\n\t\t\r\n\t\tgensWithCostsAndEmissions = new ArrayList<CostAndEmissionsProvider>();\r\n\t\tGeneratorDataWithLinearCostAndEmissions genCoal = new GeneratorDataWithLinearCostAndEmissions(nodeCoalGenerator,600,0,2000,0,0,9999,true,2000,20.0,0,1.0,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genCoal);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genCoal);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genCoal,\"Coal generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genCoal);\r\n\t\t\r\n\t\tGeneratorDataWithLinearCostAndEmissions genGas = new GeneratorDataWithLinearCostAndEmissions(nodeGasGenerator,200,0,2000,0,0,9999,true,700.0,70.0,0,0.5,includeFixedCostsAndEmissions);\r\n\t\tgensWithCostsAndEmissions.add(genGas);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genGas);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genGas,\"Natural gas generation\");\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tps.addGenerator(genGas);\r\n\t\t\r\n\t\tgenWind = new WindGeneratorDataWithLinearCostAndEmissions(nodeWindGenerator,initialWindGen,0,210,initialWindVariation,true,200.0,0,0,0,includeFixedCostsAndEmissions);\r\n\t\tgenWind.setAnimating(false);\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genWind);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genWind,\"Wind generation\");\r\n\t\twindGenTimeSeries = genTimeSeries;\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genWind);\r\n\t\tps.addGenerator(genWind);\r\n\t\t\r\n\t\tgenStorage = new StorageDevice(nodeWindStorage,0,0,0,0,0,0,true,genWind,branchWindLocalSubstationToCitySubstation,simClock,1000,100);\r\n\t\tgenTimeSeries = new MWTimeSeries(simClock,genStorage,\"Storage generation\");\r\n\t\tcostAndEmissionsTimeSeries.addCostAndEmissionsProvider(genStorage);\r\n\t\tcircuitpanel.getAnimatables().add(genTimeSeries);\r\n\t\tcircuitpanel.getAnimatables().add(genStorage);\r\n\t\tgeneratorInformation.add(genTimeSeries);\r\n\t\tgensWithCostsAndEmissions.add(genStorage);\r\n\t\tps.addGenerator(genStorage);\r\n\t\t\r\n\t\tps.solve();\r\n\t\t\r\n\t\tArrayList<LineAndDistanceInfoProvider> lines; \r\n\t\tFlowArrowsForBranchData fA;\r\n\t\tSimpleLineDisplay line;\r\n\t\t\r\n\t\tBranchColorProvider branchColorProvider = new BranchColorDynamic(Color.BLACK,0.85,Color.ORANGE,1.0,Color.RED);\r\n\t\tBranchThicknessProvider branchThicknessProvider = new BranchThicknessDynamic(1.0,0.85,2.0,1.0,3.0);\r\n\t\tFlowArrowColorProvider flowArrowColorProvider = new FlowArrowColorDynamic(new Color(0,255,0,255/2),0.85,new Color(255,128,64,255/2),1.0,new Color(255,0,0,255/2));\r\n\t\t\r\n\t\t\r\n\t\tdouble switchthickness = 5.0;\r\n\r\n\t\t// Line Coal Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsCoalGenToCoalSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,350),new Point2D.Double(710 - 70,212),1);\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getFromPoint());\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsCoalGenToCoalSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsCoalGenToCoalSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalGeneratorToSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalGeneratorToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(640,260),12,new Color(0f,0f,0f,1f),0,branchCoalGeneratorToSubstation));\r\n\t\t\r\n\t\t// Line Gas Generator to Fossil Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsGasGenToFossilSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,112.5),new Point2D.Double(765 - 70,160),1);\r\n\t\tpointsGasGenToFossilSubstation.add(line.getFromPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsGasGenToFossilSubstation.add(line.getToPoint());\r\n\t\tpointsGasGenToFossilSubstation.add(new Point2D.Double(710 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsGasGenToFossilSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchGasToSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchGasToSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\t//circuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(660,170),12,new Color(0f,0f,0f,1f),0,branchGasToSubstation));\r\n\t\t\r\n\t\t// Line Wind Generator to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindGenToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(89,281),new Point2D.Double(89,150),1);\r\n\t\tpointsWindGenToWindSubstation.add(line.getFromPoint());\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindGenToWindSubstation.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindGenToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindGeneratorToLocalSubstation, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindGeneratorToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,200),12,new Color(0f,0f,0f,1f),0,branchWindGeneratorToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line storage to Wind Substation & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindStorageToWindSubstation = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(210,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,25));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,55));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,95));\r\n\t\tpointsWindStorageToWindSubstation.add(new Point2D.Double(85,140));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStorageToWindSubstation, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindStorageToLocalSubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindStorageToLocalSubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(100,75),12,new Color(0f,0f,0f,1f),0,branchWindStorageToLocalSubstation));\t\t\r\n\t\t\r\n\t\t// Line substation 2 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsWindStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(351 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(419 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(457 - 70,212.5));\r\n\t\tpointsWindStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToResidential, branchColorProvider, circuitpanel, true, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(413 - 70,180),12,new Color(0f,0f,0f,1f),0,branchWindToResidential));\t\t\r\n\t\t\r\n\t\t// Line substation 3 to Residential load\r\n\t\tArrayList<Point2D.Double> pointsFossilStationToResidential = new ArrayList<Point2D.Double>();\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(710 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(631 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(592 - 70,212.5));\r\n\t\tpointsFossilStationToResidential.add(new Point2D.Double(525 - 70,212.5));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilStationToResidential, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToResidential, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToResidential,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,180),12,new Color(0f,0f,0f,1f),0,branchCoalToResidential));\t\t\r\n\t\t\r\n\t\t// Line Substation 3 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsFossilSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsFossilSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsFossilSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(585 - 70,280),12,new Color(0f,0f,0f,1f),-Math.PI/5,branchCoalToIndustrial));\r\n\t\t\r\n\t\t// Line Substation 3 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsSub3ToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(710 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsSub3ToCommercial.add(line.getFromPoint());\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsSub3ToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub3ToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchCoalToCommercial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchCoalToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(615 - 70,105),12,new Color(0f,0f,0f,1f),Math.PI/5,branchCoalToCommercial));\r\n\r\n\t\t\r\n\t\t// Line Substation 2 to Industrial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToIndustrial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,365),1);\r\n\t\tpointsWindSubstationToIndustrial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToIndustrial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToIndustrial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToIndustrial, branchColorProvider, circuitpanel, \r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToIndustrial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(399 - 70,273),12,new Color(0f,0f,0f,1f),Math.PI/4,branchWindToIndustrial));\r\n\r\n\t\t// Line Substation 2 to Commercial load & flow label\r\n\t\tArrayList<Point2D.Double> pointsWindSubstationToCommercial = new ArrayList<Point2D.Double>();\r\n\t\tline = new SimpleLineDisplay(new Point2D.Double(351 - 70,212.5),new Point2D.Double(525 - 70,55),1);\r\n\t\tpointsWindSubstationToCommercial.add(line.getFromPoint());\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(DrawUtilities.getPointAtDistanceOnLine(line,2*line.getLength()/3));\r\n\t\tpointsWindSubstationToCommercial.add(line.getToPoint());\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsWindSubstationToCommercial, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 1, Math.PI/20, \r\n\t\t\t\tbranchWindToCommercial, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindToCommercial,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(396 - 70,140),12,new Color(0f,0f,0f,1f),-Math.PI/4,branchWindToCommercial));\r\n\t\t\r\n\t\t// Line Substation 1 to Substation 2\r\n\t\tArrayList<Point2D.Double> pointsSub0ToSub1 = new ArrayList<Point2D.Double>();\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(85,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,140));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,156));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,196));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(175,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(190,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(230,212));\r\n\t\tpointsSub0ToSub1.add(new Point2D.Double(351 - 70,212));\r\n\t\tlines = DrawUtilities.addLineWithSwitchToAnimatedPanel(pointsSub0ToSub1, \r\n\t\t\t\t0, branchThicknessProvider, switchthickness, 2, Math.PI/20, \r\n\t\t\t\tbranchWindLocalSubstationToCitySubstation, branchColorProvider, circuitpanel, true,\r\n\t\t\t\toverloadMonitorParams);\r\n\t\tfA = new FlowArrowsForBranchData(branchWindLocalSubstationToCitySubstation,lines,0.05,20.0,10.0,flowArrowColorProvider);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(fA);\r\n\t\tcircuitpanel.getAnimatables().add(fA);\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new BranchMWFlowLabel(new Point2D.Double(195,141),12,new Color(0f,0f,0f,1f),0,branchWindLocalSubstationToCitySubstation));\r\n\t\t\r\n\t\t\r\n\t\t// Coal plant display\r\n\t\ttry {\r\n\t\t\tCoalPlantDisplay coaldisplay = new CoalPlantDisplay(new Point2D.Double(650 - 70,300),0,0.0,genCoal);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(coaldisplay);\r\n\t\t\tcircuitpanel.addMouseListener(coaldisplay);\r\n\t\t\tCostAndEmissionsOverlay coaloverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,450),genCoal);\r\n\t\t\tcostOverlays.add(coaloverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(coaloverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Gas plant display\r\n\t\ttry {\r\n\t\tGasPlantDisplay gasdisplay = new GasPlantDisplay(new Point2D.Double(650 - 70,40),0.0,genGas);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(gasdisplay);\r\n\t\tcircuitpanel.addMouseListener(gasdisplay);\r\n\t\tCostAndEmissionsOverlay gasoverlay = new CostAndEmissionsOverlay(new Point2D.Double(700 - 70,20),genGas);\r\n\t\tcostOverlays.add(gasoverlay);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(gasoverlay);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Wind plant display\r\n\t\ttry {\r\n\t\t\twinddisplay = new WindPlantDisplay(new Point2D.Double(50,240),0.0,genWind);\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(100,450),genWind);\r\n\t\t\tcostOverlays.add(windoverlay);\r\n\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Storage display\r\n//\t\ttry {\r\n\t\t\t//SubstationDisplay storagedisplay = new SubstationDisplay(new Point2D.Double(160,0),\"Storage\");\r\n\t\t\t//circuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n\t\t\tStorageDisplay storagedisplay = new StorageDisplay(genStorage,StorageDisplay.Alignment.LEFT,StorageDisplay.Alignment.TOP,new Point2D.Double(170,0));\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(storagedisplay);\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t\t// Commercial load\r\n\t\ttry {\r\n\t\t\tCityDisplay commercetonLoad = new CityDisplay(new Point2D.Double(475 - 70,25),CityDisplay.CityType.COMMERCIAL,\"Commercial\",loadCommercial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(commercetonLoad);\r\n\t\t\tcircuitpanel.addMouseListener(commercetonLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t// Residential load\r\n\t\ttry {\r\n\t\t\tCityDisplay residentialLoad = new CityDisplay(new Point2D.Double(475 - 70,175),CityDisplay.CityType.RESIDENTIAL,\"Residential\",loadResidential,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(residentialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(residentialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\r\n\t\t\r\n\t\t// Industrial load\r\n\t\ttry {\r\n\t\t\tCityDisplay industrialLoad = new CityDisplay(new Point2D.Double(475 - 70,329),CityDisplay.CityType.INDUSTRIAL,\"Industrial\",loadIndustrial,0);\r\n\t\t\tcircuitpanel.getBottomLayerRenderables().add(industrialLoad);\r\n\t\t\tcircuitpanel.addMouseListener(industrialLoad);\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.err.println(ie.toString());\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\t// Substation 3\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(660 - 70,212 - 25.0),3));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\r\n\t\t\r\n\t\t// Substation 2\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(305 - 70,212 - 25.0),2));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\r\n\t\t\r\n\t\t// Substation 1\r\n\t\ttry {\r\n\t\t\tcircuitpanel.getMiddleLayerRenderables().add(new SubstationDisplay(new Point2D.Double(39,120.0),1));\r\n\t\t} catch (IOException ie) {\r\n\t\t\tSystem.out.println(ie);\r\n\t\t}\t\t\t\r\n\t\t\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(new StoredEnergyLabel(new Point2D.Double(230,56),12,Color.BLACK,0,genStorage));\r\n\t\t\r\n\t\t/*\r\n\t\ttotalloadplot = new TotalLoadPlot(\r\n\t\t\t\tnew Point2D.Double(10,10),\r\n\t\t\t\t700,200,\r\n\t\t\t\tps,\r\n\t\t\t\tminutesPerAnimationStep,\r\n\t\t\t\t0,24,\r\n\t\t\t\t0,3000);\r\n\t\t*/\r\n\t\t/*\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,20),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getTopLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\tMouseCoordinateLabel mclabel = new MouseCoordinateLabel(new Point2D.Double(0,0),12,Color.BLACK,0);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(mclabel);\r\n\t\tcircuitpanel.addMouseMotionListener(mclabel);\r\n\t\t*/\r\n\t\t\r\n\t\tWindMaxDisplay windMaxLabel = new WindMaxDisplay(new Point2D.Double(144,384),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windMaxLabel);\r\n\t\tWindCurtailedDisplay windCurtailedLabel = new WindCurtailedDisplay(new Point2D.Double(144,404),12,Color.BLACK,0,genWind);\r\n\t\tcircuitpanel.getMiddleLayerRenderables().add(windCurtailedLabel);\r\n\r\n\t\tcircuitpanel.getTopLayerRenderables().add(new BlackoutDisplay(ps));\t\t\r\n\t\t\r\n\t\tcircuitpanel.getAnimatables().add(ps);\r\n\t\t\r\n\t\tcircuitpanel.getTopLayerRenderables().add(\r\n\t\t\t\tnew SimClockDisplay(new Point2D.Double(350,5),12,Color.BLACK,0,simClock)); \r\n\t\t\r\n\t\t// Wind plant at node sixteen\r\n//\t\ttry {\r\n//\t\t\tWindPlantDisplay winddisplay = new WindPlantDisplay(new Point2D.Double(650,340),0.0,genWind);\r\n//\t\t\tcircuitpanel.getMiddleLayerRenderables().add(winddisplay);\r\n//\t\t\tcircuitpanel.getAnimatables().add(winddisplay);\r\n//\t\t\tcircuitpanel.addMouseListener(winddisplay);\r\n//\t\t\tCostAndEmissionsOverlay windoverlay = new CostAndEmissionsOverlay(new Point2D.Double(689,462),genWind);\r\n//\t\t\tcostOverlays.add(windoverlay);\r\n//\t\t\tcircuitpanel.getTopLayerRenderables().add(windoverlay);\t\t\t\t\t\t\r\n//\t\t} catch (IOException ie) {\r\n//\t\t\tSystem.out.println(ie);\r\n//\t\t}\r\n\t\t\r\n\t}",
"public VendingMachine(){\n\n inventory = new ArrayList<>();\n balance = new Coin();\n vending_balance = 0;\n validPurchase = false;\n }",
"private JPanel productVendArea() {\n JPanel productsToVend = new JPanel();\n productsToVend.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));\n int size = inventoryManager.getProductNumber();\n size = size % 2 == 0 ? size / 2 : size / 2 + 1;\n productButtons = new ArrayList<>();\n productsToVend.setLayout(new GridLayout(size,size, 10, 10)); // creating a 10x10 area\n ArrayList<String> products = inventoryManager.getProductInventory();\n for (String prod : products) {\n JButton temp = new JButton(prod);\n temp.addActionListener(new productListener());\n productButtons.add(temp);\n productsToVend.add(temp);\n }\n return productsToVend;\n }",
"public void createDefaultPorts() {\n\t\t\n\t\t// Parameters: ResourceName, Hex X-coord, Hex Y-coord, Edge-Direction, Ratio, vv0-Direction, vv1-Direction\n\t\t\n\t\tports[0] = new Port(\"wood\", -3, 2, \"NE\", 2, \"NE\", \"E\");\n\t\tports[1] = new Port(null, 3, -3, \"SW\", 3, \"SW\", \"W\");\n\t\tports[2] = new Port(null, 2, 1, \"NW\", 3, \"W\", \"NW\");\n\t\tports[3] = new Port(null, 0, 3, \"N\", 3, \"NW\", \"NE\");\n\t\tports[4] = new Port(\"ore\", 1, -3, \"S\", 2, \"SE\", \"SW\");\n\t\tports[5] = new Port(\"wheat\", -1, -2, \"S\", 2, \"SE\", \"SW\");\n\t\tports[6] = new Port(\"sheep\", 3, -1, \"NW\", 2, \"W\", \"NW\");\n\t\tports[7] = new Port(\"brick\", -2, 3, \"NE\", 2, \"NE\", \"E\");\n\t\tports[8] = new Port(null, -3, 0, \"SE\", 3, \"E\", \"SE\");\n\t}",
"@BeforeEach\n void createProduct(){\n standartProduktTest = new StandartProdukt();\n standartProduktTest.setName(\"Testprodukt\");\n standartProduktTest.setEan(\"0000000000000\");\n standartProduktTest.setMinimalMenge(20);\n standartProduktTest.setLagerbestand(100);\n standartProduktTest.setPackageSize(1.0, \"Stk.\");\n standartProduktTest.setPreis(20, Waerungen.EURO.toString());\n\n PrintHelper.printlnCenteredTextString(\"Erzeugtes Objekt\", \"-\", 91);\n System.out.println(standartProduktTest.toStringHead());\n System.out.println(standartProduktTest.toString());\n PrintHelper.printlnString(\"-\", 91);\n }",
"private void createElements() {\n\n\t\tBorderLayout manager = new BorderLayout();\n\t\tthis.setLayout(manager);\n\t\tthis.manager = manager;\n\t\tJLabel title = new JLabel(\"Welcome!\"); //change to display customer name\n\t\ttitle.setFont(new Font(title.getName(), Font.BOLD, 24));\n\t\ttitle.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tthis.add(title, BorderLayout.PAGE_START);\n\n\t\t//left Option panel\n\t\tJPanel optPanel = new JPanel();\n\t\toptPanel.setBorder(BorderFactory.createLineBorder(Color.black));\n\t\toptPanel.setPreferredSize(new Dimension (200,500));\n\t\toptPanel.setLayout(new GridBagLayout());\n\t\tGridBagConstraints c = new GridBagConstraints();\n\t\tJButton newApt = new JButton(\"Check Rented Media\");\n\t\tnewApt.addActionListener(controller);\n\t\tnewApt.setActionCommand(\"rented\");\n\t\tJButton viewApt = new JButton(\"Rent Media\");\n\t\tviewApt.addActionListener(controller);\n\t\tviewApt.setActionCommand(\"newRent\");\n\t\tJButton close = new JButton(\"Exit Program\");\n\t\tclose.addActionListener(controller);\n\t\tclose.setActionCommand(\"close\");\n\t\tc.weighty = 1;\n\t\tc.fill = GridBagConstraints.HORIZONTAL;\n\t\tc.ipady = 10;\n\t\tc.insets = new Insets(20,0,0,0);\n\t\tc.gridy = 0;\n\t\toptPanel.add(newApt, c);\n\t\tc.gridy = 1;\n\t\toptPanel.add(viewApt, c);\n\t\tc.gridy = 2;\n\t\toptPanel.add(close, c);\n\t\tthis.add(optPanel, BorderLayout.LINE_START);\n\n\t\tJPanel placeHolder = new JPanel();\n\t\tthis.add(placeHolder, BorderLayout.CENTER);\n\n\t\tJLabel pointsLbl = new JLabel (\"The customer has \" + controller.getCustomerPoints() +\n\t\t\t\t\" loyalty points.\");\n\t\tthis.pointsLbl = pointsLbl;\n\t\tpointsLbl.setHorizontalAlignment(SwingConstants.CENTER);\n\t\tthis.add(pointsLbl, BorderLayout.PAGE_END);\n\t\tthis.validate();\n\t\tthis.repaint();\n\n\t}",
"private static void createProducts() {\n productRepository.addProduct(Product.builder()\n .name(\"Milk\")\n .barcode(new Barcode(\"5900017304007\"))\n .price(new BigDecimal(2.90))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Butter\")\n .barcode(new Barcode(\"5906217041483\"))\n .price(new BigDecimal(4.29))\n .build()\n );\n productRepository.addProduct(Product.builder()\n .name(\"Beer\")\n .barcode(new Barcode(\"5905927001114\"))\n .price(new BigDecimal(2.99))\n .build()\n );\n }",
"public static void main(String[] args) {\n\t\tSystem.out.println(\"下面制造汽车和汽车的各个部件...\");\n\t\t\n\t\tMap<String,Object> carProperties = new HashMap<>();\n\t\tcarProperties.put(HasModel.PROPERTY,\"300SL\"); //这里就是动态(on the fly)为汽没有车添加属性了。\n\t\tcarProperties.put(HasPrice.PROPERTY,100000L);\n\t\t\n\t\t//注意,要创建的wheel这个更是动态的,没有预先给汽车设计wheel这个属性\n\t\t//实际,汽车类里一个属性都没有,如果不使用这个方式,那么还要设计一个wheel类,wheel类下又有至少下面的两个属性(Model和Price)\n\t\t//这里一定要突出事先并不知道汽车到需要什么属性,也只有到了程序运行时(on the fly)才知道\n\t\tMap<String,Object> wheelProperties = new HashMap<>();\n\t\twheelProperties.put(HasType.PROPERTY, \"wheel\");\n\t\twheelProperties.put(HasModel.PROPERTY, \"15C\");\n\t\twheelProperties.put(HasPrice.PROPERTY, 100L);\n\t\t\n\t\tMap<String, Object> doorProperties = new HashMap<>();\n\t\tdoorProperties.put(HasType.PROPERTY, \"door\");\n\t\tdoorProperties.put(HasModel.PROPERTY, \"Lambo\");\n\t\tdoorProperties.put(HasPrice.PROPERTY, 300L);\n\n\t\tcarProperties.put(HasParts.PROPERTY, Arrays.asList(wheelProperties,doorProperties));\n\t\t\n\t\tCar car = new Car(carProperties);\n\t\t\n\t\tSystem.out.println(\"下面我们已经创建好的汽车:\");\n\t\tSystem.out.println(\" -> model:\"+car.getModel().get());\n\t\tSystem.out.println(\" -> price:\"+car.getPrice().get());\n\t\tSystem.out.println(\"汽车的其它部件:\");\n\t\tcar.getParts().forEach(p -> System.out.println(\"->\"+p.getType().get()+\",\"+p.getModel().get()+\",\"+p.getPrice().get()));\n\t}",
"public Vending_Machine(ArrayList<Products> p) {\n\t\tproducts = p;\n\t\tcurrentCoin = new CoinSet();\n\t\tcoin = new CoinSet();\n\t}",
"public static void main(String[] args) {\n Apple appleRp = new Apple(new BigDecimal(150.5), \"red\", Ripeness.RIPE, false);\n Banana bananaRp = new Banana(new BigDecimal(175.4), \"yellow\", Ripeness.RIPE, false);\n Orange orangeVerd = new Orange(new BigDecimal(200.0), \"yellow\", Ripeness.VERDANT, false);\n Orange orangeRp = new Orange(new BigDecimal(210.2), \"orange\", Ripeness.RIPE, false);\n Pear pearVerd = new Pear(new BigDecimal(180.9), \"green\", Ripeness.VERDANT, false);\n\n Carrot carrotRp = new Carrot(new BigDecimal(100.9), \"orange\", Ripeness.RIPE, false);\n Celery celeryVerd = new Celery(new BigDecimal(200.0), \"green\", Ripeness.VERDANT, false);\n Onion onionRp = new Onion(new BigDecimal(90.9), \"white\", Ripeness.RIPE, true);\n Potato potatoRp = new Potato(new BigDecimal(105.8), \"brown\", Ripeness.RIPE, false);\n\n // Main array of plants creation\n Plant[] basketContent = {carrotRp, orangeVerd, bananaRp, celeryVerd};\n\n // Extra array of plants creation\n Plant[] additionalBasketContent = {onionRp, appleRp, orangeRp, pearVerd, potatoRp};\n\n // Food processor creation\n FoodProcessor foodProcessor = new FoodProcessor();\n\n System.out.println(\" FRUITS&VEGETABLES\\n\\n\");\n\n // Total basket creation\n Basket basket = new Basket();\n\n // Filling the total basket by the main array of plants\n basket.put(basketContent);\n\n System.out.println(\"Basket contains:\");\n basket.printContent();\n System.out.println(\"\\nBasket weight: \" + basket.getBasketWeight() + \" g.\");\n\n // Extra basket creation\n Basket additionalBasket = new Basket();\n\n // Filling the extra basket by the extra array of plants\n additionalBasket.put(additionalBasketContent);\n\n // Combining total and extra baskets\n basket.put(additionalBasket);\n\n System.out.println(\"\\nBasket contains:\");\n basket.printContent();\n System.out.println(\"\\nBasket weight: \" + basket.getBasketWeight() + \" g.\");\n\n System.out.println(\"\\n\\n PEELING FRUITS:\\n\");\n\n // Weight of total basket\n BigDecimal oldBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight before fruits peeling: \" + oldBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight of all fruits in total basket\n BigDecimal oldFruitsWeight = basket.getFruitsWeight();\n System.out.println(\"Fruits weight before peeling: \" + oldFruitsWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Extracting of all fruits from total basket\n Fruit[] fruitsToProcess = basket.extractAllFruits();\n\n // Weight of fruits after peeling\n BigDecimal newFruitsWeight = foodProcessor.peelItems(fruitsToProcess);\n System.out.println(\"Fruits weight after peeling: \" + newFruitsWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of peeled fruits back to total basket\n basket.put(fruitsToProcess);\n BigDecimal newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after fruits peeling: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n System.out.println(\"\\n\\n PEELING VEGETABLES:\\n\");\n\n // Current weight of total basket\n oldBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight before vegetables peeling: \" + oldBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight of all vegetables in total basket\n BigDecimal oldVegetablesWeight = basket.getVegetablesWeight();\n System.out.println(\"Vegetables weight before peeling: \" + oldVegetablesWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Extracting of all vegetables from total basket\n Vegetable[] vegetablesToProcess = basket.extractAllVegetables();\n\n // Weight of vegetables after peeling\n BigDecimal newVegetablesWeight = new BigDecimal(0.0);\n\n try {\n newVegetablesWeight = foodProcessor.peelItems(vegetablesToProcess);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n\n System.out.println(\"Vegetables weight after peeling: \" + newVegetablesWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of peeled vegetables back to total basket\n basket.put(vegetablesToProcess);\n newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after vegetables peeling: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n System.out.println(\"\\n\\n CUTTING VEGETABLES:\\n\");\n\n // Current weight of total basket\n oldBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight before vegetables cutting: \" + oldBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Current weight of vegetables in total basket\n oldVegetablesWeight = basket.getVegetablesWeight();\n System.out.println(\"Vegetables weight before cutting: \" + oldVegetablesWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Extracting of all vegetables from total basket\n vegetablesToProcess = basket.extractAllVegetables();\n\n try {\n // Weight of vegetables after cutting\n newVegetablesWeight = foodProcessor.cutAll(vegetablesToProcess);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n\n System.out.println(\"Vegetables weight after cutting: \" + newVegetablesWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of cuted vegetables back to total basket\n basket.put(vegetablesToProcess);\n newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after vegetables cutting: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n System.out.println(\"\\n\\n SLICING FRUITS:\\n\");\n\n // Current weight of total basket\n oldBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight before fruits slicing: \" + oldBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Current weight of fruits in total basket\n oldFruitsWeight = basket.getFruitsWeight();\n System.out.println(\"Fruits weight before slicing: \" + oldFruitsWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Extracting of all fruits from total basket\n fruitsToProcess = basket.extractAllFruits();\n\n try {\n // Weight of fruits after slicing\n newFruitsWeight = foodProcessor.sliceAll(fruitsToProcess);\n } catch (IllegalArgumentException e) {\n System.out.println(e.getMessage());\n }\n\n System.out.println(\"Fruits weight after slicing: \" + newFruitsWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of sliced fruits back to total basket\n basket.put(fruitsToProcess);\n newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after fruits slicing: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n System.out.println(\"\\n\\n NEW PLANT SLICING\\n\");\n\n // New plant creation\n Potato potatoRpPink = new Potato(new BigDecimal(120.9), \"pink\", Ripeness.RIPE, false);\n\n // Insertion to the end of total basket\n basket.put(potatoRpPink);\n System.out.println(\"Basket contains:\");\n basket.printContent();\n System.out.println(\"\\nBasket weight: \" + basket.getBasketWeight() + \" g.\\n\");\n\n // Current weight of total basket\n oldBasketWeight = basket.getBasketWeight();\n\n // Extraction element from the end of total basket\n Plant lastInBasket = basket.extract(basket.getBasketContent().length - 1);\n\n // Weight of plant before slicing\n BigDecimal oldlastInBasketWeight = lastInBasket.getWeight();\n BigDecimal newLastInBasketWeight = new BigDecimal(0.0);\n\n System.out.println(lastInBasket);\n\n try {\n // Weight of plant after slicing\n newLastInBasketWeight = foodProcessor.slice(lastInBasket);\n } catch (IllegalArgumentException e) {\n newLastInBasketWeight = lastInBasket.getWeight();\n System.out.println(e.getMessage());\n }\n\n System.out.println(\"Plant weight after slicing: \" + newLastInBasketWeight + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldlastInBasketWeight.subtract(newLastInBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n // Insertion of sliced plant back to total basket\n basket.put(lastInBasket);\n newBasketWeight = basket.getBasketWeight();\n System.out.println(\"Basket weight after last element slicing: \" + newBasketWeight.round(MathContext.DECIMAL32) + \" g.\");\n\n // Weight difference\n System.out.println(\"Weight difference: \" + (oldBasketWeight.subtract(newBasketWeight)).round(MathContext.DECIMAL32) + \" g.\");\n\n\n }",
"@Test\n public void createSimpleProductOffering() {\n String id = \"0001OF\";\n String name = \"11 英寸 MacBook Air\";\n TimePeriod validFor = new TimePeriod(\"2015-06-04 10:20:00\", \"2015-06-26 10:20:00\");\n String description = \"1.6GHz 双核 Intel Core i5 处理器,Turbo Boost 高达 2.7GHz\";\n ProductSpecification prodSpec = null;\n try {\n SimpleProductOffering offering = new SimpleProductOffering(id, name, description, validFor, prodSpec);\n fail(\"fail when the prodSpec is null。\");\n } catch (AssertionError ex) {\n }\n\n //create a simple by right spec\n prodSpec = new AtomicProductSpecification(\"001SP\", \"11 英寸 MacBook Air SPEC\", \"Mac Air\");\n SimpleProductOffering offering = new SimpleProductOffering(id, name, description, validFor, prodSpec);\n assertEquals(\"0001OF\", offering.getId());\n assertEquals(\"11 英寸 MacBook Air\", offering.getName());\n assertEquals(\"1.6GHz 双核 Intel Core i5 处理器,Turbo Boost 高达 2.7GHz\", offering.getDescription());\n assertEquals(ProductOfferingStatus.PLANNED.getValue(), offering.getStatus());\n assertEquals(new TimePeriod(\"2015-06-04 10:20:00\", \"2015-06-26 10:20:00\"), offering.getValidFor());\n assertEquals(new AtomicProductSpecification(\"001SP\", \"11 英寸 MacBook Air SPEC\", \"Mac Air\"), offering.getProductSpecification());\n }",
"private void createPlanets()\n\t{\n\t\tdouble semimajorAxis;\n\t\tdouble eccentricityOfOrbit;\n\t\tdouble inclinationOnPlane;\n\t\tdouble perihelion;\n\t\tdouble longitudeOfAscendingNode;\n\t\tdouble meanLongitude;\n String unicode_icon;\n\t\t\n\t\tplanetList.clear();\n\t\t\n\t\t//*****************\n\t\t//create Mercury\n\t\t//*****************\n\t\tPlanet mercury = new Planet(\"Mercury\");\n\t\tunicode_icon = \"\\u263f\";\n\t\tmeanLongitude = 60.750646;\n\t\tsemimajorAxis = 0.387099;\n\t\teccentricityOfOrbit = 0.205633;\n\t\tinclinationOnPlane = 7.004540;\n\t\tperihelion = 77.299833;\n\t\tlongitudeOfAscendingNode = 48.212740;\n\t\t\n\t\tmercury.setUnicodeIcon(unicode_icon);\n\t\tmercury.setSemimajorAxis(semimajorAxis);\n\t\tmercury.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tmercury.setInclinationOnPlane(inclinationOnPlane);\n\t\tmercury.setPerihelion(perihelion);\n\t\tmercury.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tmercury.setMeanLongitude(meanLongitude);\n\t\tmercury.setOrbitalPeriod(0.24852);\n\t\tplanetList.add(mercury);\n\t\t\n\t\t//*****************\n\t\t//create Venus\n\t\t//*****************\n\t\tPlanet venus = new Planet(\"Venus\");\n\t\tunicode_icon = \"\\u2640\";\n\t\tmeanLongitude = 88.455855;\n\t\tsemimajorAxis = 0.723332;\n\t\teccentricityOfOrbit = 0.006778;\n\t\tinclinationOnPlane = 3.394535;\n\t\tperihelion = 131.430236;\n\t\tlongitudeOfAscendingNode = 76.589820;\n\t\t\n\t\tvenus.setUnicodeIcon(unicode_icon);\n\t\tvenus.setSemimajorAxis(semimajorAxis);\n\t\tvenus.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tvenus.setInclinationOnPlane(inclinationOnPlane);\n\t\tvenus.setPerihelion(perihelion);\n\t\tvenus.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tvenus.setMeanLongitude(meanLongitude);\n\t\tvenus.setOrbitalPeriod(0.615211);\n\t\tplanetList.add(venus);\n\t\t\n\t\t//*****************\n\t\t//create Earth\n\t\t//*****************\n\t\tearth = new Planet(\"Earth\");\n\t\tunicode_icon = \"\\u2695\";\t\n\t\tmeanLongitude = 99.403308;\n\t\tsemimajorAxis = 1.000;\n\t\teccentricityOfOrbit = 0.016713;\n\t\tinclinationOnPlane = 1.00;\n\t\tperihelion = 102.768413;\n\t\tlongitudeOfAscendingNode = 1.00;\n\t\t\n\t\tearth.setUnicodeIcon(unicode_icon);\n\t\tearth.setSemimajorAxis(semimajorAxis);\n\t\tearth.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tearth.setInclinationOnPlane(inclinationOnPlane);\n\t\tearth.setPerihelion(perihelion);\n\t\tearth.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tearth.setMeanLongitude(meanLongitude);\n\t\tearth.setOrbitalPeriod(1.00004);\n\t\t//earth not added to list, kept as separate object\n\t\t\n\t\t//*****************\n\t\t//create Mars\n\t\t//*****************\n\t\tPlanet mars = new Planet(\"Mars\");\n\t\tunicode_icon = \"\\u2642\";\n\t\tmeanLongitude = 240.739474;\n\t\tsemimajorAxis = 1.523688;\n\t\teccentricityOfOrbit = 0.093396;\n\t\tinclinationOnPlane = 1.849736;\n\t\tperihelion = 335.874939;\n\t\tlongitudeOfAscendingNode = 49.480308;\n\t\t\n\t\tmars.setUnicodeIcon(unicode_icon);\n\t\tmars.setSemimajorAxis(semimajorAxis);\n\t\tmars.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tmars.setInclinationOnPlane(inclinationOnPlane);\n\t\tmars.setPerihelion(perihelion);\n\t\tmars.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tmars.setMeanLongitude(meanLongitude);\n\t\tmars.setOrbitalPeriod(1.880932);\n\t\tplanetList.add(mars);\n\t\t\n\t\t//*****************\n\t\t//create Jupiter\n\t\t//*****************\n\t\tPlanet jupiter = new Planet(\"Jupiter\");\n\t\tunicode_icon = \"\\u2643\";\n\t\tmeanLongitude = 90.638185;\n\t\tsemimajorAxis = 5.202561;\n\t\teccentricityOfOrbit = 0.048482;\n\t\tinclinationOnPlane = 1.303613;\n\t\tperihelion = 14.170747;\n\t\tlongitudeOfAscendingNode = 100.353142;\n\t\t\n\t\tjupiter.setUnicodeIcon(unicode_icon);\n\t\tjupiter.setSemimajorAxis(semimajorAxis);\n\t\tjupiter.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tjupiter.setInclinationOnPlane(inclinationOnPlane);\n\t\tjupiter.setPerihelion(perihelion);\n\t\tjupiter.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tjupiter.setMeanLongitude(meanLongitude);\n\t\tjupiter.setOrbitalPeriod(11.863075);\n\t\tplanetList.add(jupiter);\n\t\t\n\t\t//*****************\n\t\t//create Saturn\n\t\t//*****************\n\t\tPlanet saturn = new Planet(\"Saturn\");\n\t\tunicode_icon = \"\\u2644\";\n\t\tmeanLongitude = 287.690033;\n\t\tsemimajorAxis = 9.554747;\n\t\teccentricityOfOrbit = 0.055581;\n\t\tinclinationOnPlane = 2.488980;\n\t\tperihelion = 92.861407;\n\t\tlongitudeOfAscendingNode = 113.576139;\n\t\t\t\t\n\t\tsaturn.setUnicodeIcon(unicode_icon);\n\t\tsaturn.setSemimajorAxis(semimajorAxis);\n\t\tsaturn.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tsaturn.setInclinationOnPlane(inclinationOnPlane);\n\t\tsaturn.setPerihelion(perihelion);\n\t\tsaturn.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tsaturn.setMeanLongitude(meanLongitude);\n\t\tsaturn.setOrbitalPeriod(29.471362);\n\t\tplanetList.add(saturn);\n\t\t\n\t\t//*****************\n\t\t//create Uranus\n\t\t//*****************\n\t\tPlanet uranus = new Planet(\"Uranus\");\n\t\tunicode_icon = \"\\u2645\";\n\t\tmeanLongitude = 271.063148;\n\t\tsemimajorAxis = 19.21814;\n\t\teccentricityOfOrbit = 0.046321;\n\t\tinclinationOnPlane = 0.773059;\n\t\tperihelion = 172.884833;\n\t\tlongitudeOfAscendingNode = 73.926961;\n\t\t\n\t\turanus.setUnicodeIcon(unicode_icon);\n\t\turanus.setSemimajorAxis(semimajorAxis);\n\t\turanus.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\turanus.setInclinationOnPlane(inclinationOnPlane);\n\t\turanus.setPerihelion(perihelion);\n\t\turanus.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\turanus.setMeanLongitude(meanLongitude);\n\t\turanus.setOrbitalPeriod(84.039492);\n\t\tplanetList.add(uranus);\n\t\t\n\t\t//*****************\n\t\t//create Neptune\n\t\t//*****************\n\t\tPlanet neptune = new Planet(\"Neptune\");\n\t\tunicode_icon = \"\\u2646\";\n\t\tmeanLongitude = 282.349556;\n\t\tsemimajorAxis = 30.109570;\n\t\teccentricityOfOrbit = 0.009003;\n\t\tinclinationOnPlane = 1.770646;\n\t\tperihelion = 48.009758;\n\t\tlongitudeOfAscendingNode = 131.670599;\n\t\t\n\t\tneptune.setUnicodeIcon(unicode_icon);\n\t\tneptune.setSemimajorAxis(semimajorAxis);\n\t\tneptune.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tneptune.setInclinationOnPlane(inclinationOnPlane);\n\t\tneptune.setPerihelion(perihelion);\n\t\tneptune.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tneptune.setMeanLongitude(meanLongitude);\n\t\tneptune.setOrbitalPeriod(164.79246);\n\t\tplanetList.add(neptune);\n\t\t\n\t\t//*****************\n\t\t//create Pluto\n\t\t//*****************\n\t\tPlanet pluto = new Planet(\"Pluto\");\n\t\tunicode_icon = \"\\u263f\";\n\t\tmeanLongitude = 246.77027;\n\t\tsemimajorAxis = 39.3414;\n\t\teccentricityOfOrbit = 0.24624;\n\t\tinclinationOnPlane = 17.1420;\n\t\tperihelion = 224.133;\n\t\tlongitudeOfAscendingNode = 110.144;\n\t\t\n\t\tpluto.setUnicodeIcon(unicode_icon);\n\t\tpluto.setSemimajorAxis(semimajorAxis);\n\t\tpluto.setEccentricityOfOrbit(eccentricityOfOrbit);\n\t\tpluto.setInclinationOnPlane(inclinationOnPlane);\n\t\tpluto.setPerihelion(perihelion);\n\t\tpluto.setLongitudeOfAscendingNode(longitudeOfAscendingNode);\n\t\tpluto.setMeanLongitude(meanLongitude);\n\t\tpluto.setOrbitalPeriod(246.77027);\n\t\tplanetList.add(pluto);\n\t}",
"public static void main(String[] args) {\n \tComputer myPC = new Computer();\r\n\r\n \t// Add a hard disk \r\n \tComponent hdd1 = new HardDisk(1000, 3, \"Seagate\", 790.50);\r\n \tmyPC.addComponent(\"hard disk 1\", hdd1);\r\n\r\n \t// Add a second hard disk\r\n \tComponent hdd2 = new HardDisk(1500, 2, \"Seagate\", 640.69);\r\n \tmyPC.addComponent(\"hard disk 2\", hdd2);\r\n }",
"public Vending_MachineTest()\n {\n // initialise instance variables\n \n \n }",
"public VehiclesPanel() throws IOException {\n\t\tsuper(new GridLayout(4,3));\n \n\t\t// Frame and title the panel\n\t\tthis.setBorder(BorderFactory.createTitledBorder(\"Vehicles fleet\"));\n\t\t\n\t\t// Fill the nbVehicles combo box with possible fleet sizes\n\t\tthis.nbVBox.addItem(1);\n\t\tthis.nbVBox.addItem(2);\n\t\tthis.nbVBox.addItem(5);\n\t\tthis.nbVBox.addItem(10);\n\t\tthis.nbVBox.addItem(30);\n\t\t\n\t\t// Add the check box that chooses between a limited or infinite number of vehicles\n\t\tthis.add(new JLabel(\"Number of vehicles\"));\n\t\tthis.nbVCheck = new JCheckBox(\"Unlimited\", true);\n\t\tthis.nbVCheck.addItemListener(this);\n\t\tthis.add(this.nbVCheck);\n\t\tthis.nbVCheck.setMnemonic(KeyEvent.VK_C);\n\t\tthis.add(new JPanel());\n\t\tthis.add(new JPanel());\n\t\tthis.add(this.nbVBox);\n\t\tthis.nbVBox.setVisible(false);\n\t\tthis.add(new JPanel());\n\t\t\n\t\t// Fill the capacities combo box with possible capacities\n\t\tthis.capaBox.addItem(1);\n\t\tthis.capaBox.addItem(3);\n\t\tthis.capaBox.addItem(10);\n\t\tthis.capaBox.addItem(30);\n\t\t// Add the check box that chooses between a finite or infinite capacity for each vehicle\n\t\tthis.add(new JLabel(\"Capacity of vehicles\"));\n\t\tthis.capaCheck = new JCheckBox(\"Unlimited\", true);\n\t\tthis.capaCheck.addItemListener(this);\n\t\tthis.add(this.capaCheck);\n\t\tthis.capaCheck.setMnemonic(KeyEvent.VK_G);\n\t\tthis.add(new JPanel());\n\t\tthis.add(new JPanel());\n\t\tthis.add(this.capaBox);\n\t\tthis.capaBox.setVisible(false);\n\t\tthis.add(this.capaExplain);\n\t\tthis.capaExplain.setVisible(false);\n\t}",
"public void createBike() {\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }",
"private void prePopulate()\r\n\t{\r\n\t\tRandom gen=new Random();\r\n\t\t/**How many cars to add*/\r\n\t\tint add=(gen.nextInt(6)+5);\r\n\t\twhile (add>0)\r\n\t\t{\r\n\t\t\tboolean straight;\r\n\t\t\tint straightNum=gen.nextInt(2);\r\n\t\t\t/**Right lane or straight lane*/\r\n\t\t\tif (straightNum==0)\r\n\t\t\t\tstraight=true;\r\n\t\t\telse\r\n\t\t\t\tstraight=false;\r\n\t\t\t\t/**Determines whether going east west north or south*/\r\n\t\t\tint directionNumber=gen.nextInt(4);\r\n\t\t\tDirection direction=null;\r\n\t\t\tStreet street=null;\r\n\t\t\tswitch (directionNumber)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tdirection=Direction.N;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdirection=Direction.S;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tdirection=Direction.E;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tdirection=Direction.W;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"There was an error with your direction. Please look into this problem.\");\r\n\t\t\t}\r\n\t\t\t/**Creates a new car dependent on the information given. Finds the lane and direction and applies it to the appropriate queue*/\r\n\t\t\tVehicle car=new Vehicle(carNum, time, direction, street, straight);\r\n\t\t\tcarNum++;\r\n\t\t\tif (car.getStraight())\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthStraight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred curchnorthstriahgt\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthStraight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred curchsouthstraight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestStraight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred Mainweststraight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastStraight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred maineaststraight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthRight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred curchnorthright\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthRight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred curchsouthright\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestRight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred MainwestRight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastRight.enqueue(car);\r\n\t\t\t\t\t\t//System.out.println(car+\" enetred MainEastRight\");\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tadd--;\t\r\n\t\t}\r\n\t\tprint.println(\"--Simulation starting. Processing of North and South traffic will begin--\");\r\n\t\t\r\n\t}",
"public Selling_Machine() {\n initComponents();\n \n }",
"private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}",
"@Override\r\n\tpublic ElectricityElement createElement() {\r\n\t\treturn new DefaultElectricityElement(\r\n\t\t\t\tgetTemplateName(), \r\n\t\t\t\tgetName(), \r\n\t\t\t\tgetOrigin(),\r\n\t\t\t\tgetDestination(),\r\n\t\t\t\tgetLifecycleModel().createLifecycleModel(), \r\n\t\t\t\tgetMaxElectricityProduction(), \r\n\t\t\t\tgetInitialElectricityProduction(), \r\n\t\t\t\tgetPetroleumIntensityOfElectricityProduction(),\r\n\t\t\t\tgetWaterIntensityOfElectricityProduction(), \r\n\t\t\t\tgetVariableOperationsCostOfElectricityProduction(),\r\n\t\t\t\tgetDistributionEfficiency(), \r\n\t\t\t\tgetMaxElectricityInput(), \r\n\t\t\t\tgetInitialElectricityInput(),\r\n\t\t\t\tgetVariableOperationsCostOfElectricityDistribution()\r\n\t\t\t);\r\n\t}",
"public void createBike(){\n createFrame();\n addWheels();\n addPedals();\n getPrice();\n }",
"private void createCompositeGoodsShow() {\r\n\t\tGridData gridData4 = new GridData();\r\n\t\tgridData4.grabExcessHorizontalSpace = true;\r\n\t\tgridData4.horizontalSpan = 3;\r\n\t\tgridData4.heightHint = 380;\r\n\t\tgridData4.widthHint = 560;\r\n\t\tgridData4.grabExcessVerticalSpace = true;\r\n\t\tGridLayout gridLayout3 = new GridLayout();\r\n\t\tgridLayout3.numColumns = 3;\r\n\t\tcompositeGoodsShow = new Composite(compositeGoodsMange, SWT.NONE);\r\n\t\tcompositeGoodsShow.setLayout(gridLayout3);\r\n\t\tcompositeGoodsShow.setLayoutData(gridData4);\r\n\t\tdisplayRoom(compositeGoodsShow);\r\n\t}",
"private void prepare()\n {\n Block block = new Block(10);\n addObject(block,372,150);\n Wall wall = new Wall();\n addObject(wall,52,167);\n Wall wall2 = new Wall();\n addObject(wall2,160,167);\n Wall wall3 = new Wall();\n addObject(wall3,550,167);\n Wall wall4 = new Wall();\n addObject(wall4,650,167);\n Wall wall5 = new Wall();\n addObject(wall5,750,167);\n block.setLocation(306,171);\n Robot robot = new Robot();\n addObject(robot,48,51);\n Pizza pizza = new Pizza();\n addObject(pizza,550,60);\n Pizza pizza2 = new Pizza();\n addObject(pizza2,727,53);\n Pizza pizza3 = new Pizza();\n addObject(pizza3,364,303);\n Pizza pizza4 = new Pizza();\n addObject(pizza4,224,400);\n Pizza pizza5 = new Pizza();\n addObject(pizza5,622,395);\n ScorePanel scorePanel = new ScorePanel();\n addObject(scorePanel,106,525);\n Home home = new Home();\n addObject(home,717,521);\n\n block.setLocation(344,173);\n pizza3.setLocation(394,297);\n Pizza pizza6 = new Pizza();\n addObject(pizza6,711,265);\n Pizza pizza7 = new Pizza();\n addObject(pizza7,68,276);\n\n }",
"private void createSignalSystems() {\r\n\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(2)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(3)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(4)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(5)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(7)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(8)));\r\n\r\n if (TtCreateParallelNetworkAndLanes.checkNetworkForSecondODPair(this.scenario.getNetwork())) {\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(10)));\r\n createSignalSystemAtNode(this.scenario.getNetwork().getNodes().get(Id.createNodeId(11)));\r\n }\r\n }",
"public void addComponents()\r\n\t{\n\t\tSteveTechFarming.fruit = new BlockFruit(SteveTechFarming.config.getBlockID(1202, \"Fruit\", null)).setBlockName(\"WiduX-SteveTech-Farm-Fruit\");\r\n\t\tSteveTechFarming.crops = new BlockCrops(SteveTechFarming.config.getBlockID(1203, \"Crops\", null)).setBlockName(\"WiduX-SteveTech-Farm-Crops\");\r\n\t\t\r\n\t\tSteveTechFarming.seeds = new ItemSeeds(SteveTechFarming.config.getItemID(11000, \"Seeds\", null)).setItemName(\"WiduX-SteveTech-Farm-Seeds\");\r\n\t\tSteveTechFarming.harvestedItems = new ItemHarvest(SteveTechFarming.config.getItemID(11002, \"Harvest\", null)).setItemName(\"WiduX-SteveTech-Farm-Harvest\");\r\n\t\tSteveTechFarming.creativeTools = new ItemCreativeTools(SteveTechFarming.config.getItemID(11001, \"Creative Tools\", null)).setItemName(\"WiduX-SteveTech-Farm-CTools\");\r\n\t\tSteveTechFarming.foods = new Item[EnumFood.getNumberFoods()];\r\n\t\tint firstFoodItemID = SteveTechFarming.config.getItemID(11003, \"Foods Array\", \"This is the first item ID in the list of foods. Item IDs used will start here, and use the next \" + EnumFood.getNumberFoods() + \" IDs. Make sure they are all available.\");\r\n\t\tfor(int idOffset = 0; idOffset < SteveTechFarming.foods.length; idOffset++)\r\n\t\t{\r\n\t\t\tEnumFood food = EnumFood.getFood(idOffset);\r\n\t\t\tSteveTechFarming.foods[idOffset] = new ItemSTFood(firstFoodItemID + idOffset, food).setItemName(\"WiduX-SteveTech-Farm-Foods-Food\" + idOffset);\r\n\t\t}\r\n\t}",
"public void genaratePCB() {\n while (HDD > 0) {\n nJobs++;\n PCB k = new PCB(nJobs);\n k.setBasedOnSize(true);\n HDDQ.add(k);\n HDD -= k.getSize();\n sizeJ += k.getSize();\n }\n }",
"public void addHardwareDeviceToSell()\n {\n try\n {\n String Description=sellDescriptiontxt.getText();\n String Manufacturer=sellManufacturertxt.getText();\n \n int price=Integer.parseInt(pricetxt.getText());\n int tax=Integer.parseInt(taxtxt.getText());\n HardwareDeviceToSell HardwareToSell=new HardwareDeviceToSell(Description, Manufacturer, price,tax);\n equipment.add(HardwareToSell);\n \n JOptionPane.showMessageDialog(frame, \"Sucessfully added GeneratorToSell\", \"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"private Grid makeGrid()\n\t{\n\t\tGrid grid = Grid.grid().\n\t\t\t\tBus(\"1\").\n\t\t\t\tSlackSource(\"Slack\", BASE_VOLTAGE, 0, 0, 0).\n\t\t\t\tLine(\"1-2\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\tBus(\"2\").\n\t\t\t\t\t\tControllableDemand(\"S\").\n\t\t\t\t\t\tLine(\"2-3\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\t\tBus(\"3\").\n\t\t\t\t\t\t\t\tLoad(\"L\").\n\t\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tLine(\"2-4\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\tBus(\"4\").\n\t\t\t\t\t\t\tDistributedSource(\"DG\").\n\t\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\tterminate().\n\t\t\tterminate().\n\t\tgrid();\n\t\t\n\t\t// x_0:\n\t\tLoad load = grid.getLoad(\"L\");\n\t\tControllableDemand storage = grid.getControllableDemand(\"S\");\n\t\tDistributedSource dg = grid.getDistributedSource(\"DG\");\n\t\tsetupUnits(load, storage, dg);\n\t\t\n\t\treturn grid;\n\t}",
"private void createComponents()\n\t{\n\t\t// Create search results' table header\n\t\tm_ResultHeader = new PrinterLabel(1,MenuWindow.FRAME_WIDTH , MenuWindow.FRAME_HEIGHT,\n\t\t\t\t\"PRINTER\",\"VENDOR\",\"TENSION (ksi)\",\"COMPRESSION (ksi)\",\"IMPACT (lb-ft)\",\"MATERIALS\",\"TOLERANCE (in)\",\"FINISH (\\u00B5in)\", false);\n\t\tm_ResultHeader.setBackground(Color.lightGray);\n\t\t// Add tool tips for long header categories before adding to GUI\n\t\tm_ResultHeader.getMaterials().setToolTipText(\"Range of Materials\");\n\t\tm_PrinterList = ToolBox.generatePrinterList();\n\t}",
"TransportTruck() {\n x = 0;\n y = 0;\n nrDoors = 2;\n enginePower = 1000;\n currentSpeed = 0;\n color = Color.red;\n modelName = \"Transport Truck\";\n\n storage = new StorageUnit(this, 5);\n\n stopEngine();\n }",
"@Override\r\n\tpublic VendingMachine createVendingMachine(\r\n\t\t\tVendingMachineModel vendingMachineModel) {\r\n\t\tVendingMachine hospitalVendingMachine = new HospitalVendingMachine();\r\n\t\treturn null;\r\n\t}",
"public Computer(int itemNum, String name, double price, String brand, String cpu, int ram, int hard_drive, double screen)\r\n\t{\r\n\t\tsuper(itemNum, price, name);\r\n\t\tthis.brand = brand;\r\n\t\tthis.cpu = cpu;\r\n\t\tmemory = ram;\r\n\t\tdiskSpace = hard_drive; \r\n\t\tscreenSize = screen;\r\n\t}",
"private void initialize() {\nproductCatalog.add(new ProductStockPair(new Product(100.0, \"SYSC2004\", 0), 76));\nproductCatalog.add(new ProductStockPair(new Product(55.0, \"SYSC4906\", 1), 0));\nproductCatalog.add(new ProductStockPair(new Product(45.0, \"SYSC2006\", 2), 32));\nproductCatalog.add(new ProductStockPair(new Product(35.0, \"MUSI1001\", 3), 3));\nproductCatalog.add(new ProductStockPair(new Product(0.01, \"CRCJ1000\", 4), 12));\nproductCatalog.add(new ProductStockPair(new Product(25.0, \"ELEC4705\", 5), 132));\nproductCatalog.add(new ProductStockPair(new Product(145.0, \"SYSC4907\", 6), 322));\n}",
"public HardwareAssignmentGenerator() {\n // TODO Auto-generated constructor stub\n }",
"public void create(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\t\tthis.position[1][1] = 1;//putting player in this position\n\n\t\t//creating door in the rooms\n\t\tfor(int i = 0; i <this.Door.length; i++){\n\t\t\tfor(int p = 0; p < this.Door.length; p++){\n\t\t\t\tthis.Door[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Door[9][13] = 1;//puts the door here \n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 4; p < 7; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 4; p < 7; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 7; i< 8 ; i++){\n\t\t\tfor(int p = 2; p < 7; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 17; i< 18 ; i++){\n\t\t\tfor(int p = 13; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\t\n\t\t}\n\t\tfor(int i = 14; i< 15 ; i++){\n\t\t\tfor(int p = 13; p < 17; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\t\n\t\t}\t\n\t\tfor(int i = 11; i< 12 ; i++){\n\t\t\tfor(int p = 10; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 3; p < 6; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 16; i< 17 ; i++){\n\t\t\tfor(int p = 6; p < 13; p++){\n\t\t\t\tthis.area[p][i] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 12; i< 13 ; i++){\n\t\t\tfor(int p = 5; p < 10; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\t\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes \n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{ \n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}",
"public void createRandomPorts() {\n\t\t\n\t\tList<String> types = Arrays.asList(new String[] {\"wood\", \"ore\", \"wheat\", \"sheep\", \"brick\", null, null, null, null});\n\t\tCollections.shuffle(types);\n\t\t\n\t\tports[0] = new Port(types.get(0), -3, 2, \"NE\", 2, \"NE\", \"E\");\n\t\tports[1] = new Port(types.get(1), 3, -3, \"SW\", 3, \"SW\", \"W\");\n\t\tports[2] = new Port(types.get(2), 2, 1, \"NW\", 3, \"W\", \"NW\");\n\t\tports[3] = new Port(types.get(3), 0, 3, \"N\", 3, \"NW\", \"NE\");\n\t\tports[4] = new Port(types.get(4), 1, -3, \"S\", 2, \"SE\", \"SW\");\n\t\tports[5] = new Port(types.get(5), -1, -2, \"S\", 2, \"SE\", \"SW\");\n\t\tports[6] = new Port(types.get(6), 3, -1, \"NW\", 2, \"W\", \"NW\");\n\t\tports[7] = new Port(types.get(7), -2, 3, \"NE\", 2, \"NE\", \"E\");\n\t\tports[8] = new Port(types.get(8), -3, 0, \"SE\", 3, \"E\", \"SE\");\n\t}",
"private void createSwitchSpace() {\n\t\t// create constraints for switchPanel layout (required)\n\t\tGridBagConstraints constraints = new GridBagConstraints();\n\t\t\n\t\t// display the image icon for the box as empty or not depending on whether the player has already found the paper\n\t\tif (boxOpen && eventsMain.getEventsLogic().getPaperFound()) {\n\t\t\tboxImage.setIcon(switchIconEmpty);\n\t\t} else if (boxOpen && !eventsMain.getEventsLogic().getPaperFound()) {\n\t\t\tboxImage.setIcon(switchIconOpen);\n\t\t} else if (!boxOpen) {\n\t\t\tboxImage.setIcon(switchIconClosed);\n\t\t}\n\t\t\n\t\t// display the image icon as on or off depending on its current state before being clicked again\n\t\tif (eventsMain.getEventsLogic().getSwitchSetting()) {\n\t\t\tswitchImage.setIcon(switchIconOn);\n\t\t} else {\n\t\t\tswitchImage.setIcon(switchIconOff);\n\t\t}\n\t\t\n\t\t// add listeners to the container\n\t\tswitchImage.addMouseListener(eventsMain);\n\t\tboxImage.addMouseListener(eventsMain);\n\t\tboxImage.addMouseMotionListener(eventsMain);\n\t\t\n\t\t// add each image to the container\n\t\tconstraints.gridy = 0;\n\t\tswitchPanel.add(boxImage, constraints);\n\t\t\n\t\tconstraints.gridy = 1;\n\t\tswitchPanel.add(switchImage, constraints);\n\t\t\n\t\tswitchPanel.setOpaque(false);\n\t}",
"private void addProduct() {\n String type = console.readString(\"type (\\\"Shirt\\\", \\\"Pant\\\" or \\\"Shoes\\\"): \");\n String size = console.readString(\"\\nsize: \");\n int qty = console.readInt(\"\\nQty: \");\n int sku = console.readInt(\"\\nSKU: \");\n Double price = console.readDouble(\"\\nPrice: \");\n int reorderLevel = console.readInt(\"\\nReorder Level: \");\n daoLayer.addProduct(type, size, qty, sku, price, reorderLevel);\n\n }",
"public Vehicle()\n {\n name = \"none\";\n cost = 0;\n }",
"public Product(String name) {\n setName(name);\n setProductionNumber(currentProductionNumber);\n\n // Increment current production number in loop\n currentProductionNumber++;\n manufacturer = MANUFACTURER;\n manufacturedOn = new Date();\n }",
"private static void createTestBestellungHorizontal(){\n\t\ta = new Artikel(\"ASPIRIN Tabl 500 mg Ad 20 Stk\", \"Medikament\", \"0\");\n\t\ta.setEAN(\"7680085370118\");\n\t\tsetPharmacode(a, \"0058910\");\n\t\tAnwender anwender = new Anwender(\"007\", \"topsecret\");\n\t\torder = new Bestellung(\"Test-Bestellung\", anwender);\n\t\torder.addItem(a, 1);\n\t\t\n\t}",
"private HardwareDeviceRental(){\r\n\r\n this.initializeComponent();\r\n hardwares= new ArrayList<HardwareDevice>();\r\n\r\n }",
"@Before\r\n\tpublic void setup() {\r\n \tint[] coinKind = {5, 10, 25, 100, 200};\r\n \tint selectionButtonCount = 6;\r\n \tint coinRackCapacity = 200;\t\t// probably a temporary value\r\n \tint popCanRackCapacity = 10;\r\n \tint receptacleCapacity = 200; \r\n \tvend = new VendingMachine(coinKind, selectionButtonCount, coinRackCapacity, popCanRackCapacity, receptacleCapacity);\r\n \t\r\n \t//for (int i = 0; i < vend.getNumberOfCoinRacks(); i++) {\r\n \t//\tTheCoinRackListener crListen = new TheCoinRackListener(vend);\r\n \t//\t(vend.getCoinRack(i)).register(crListen);\r\n \t//}\r\n \t\r\n \t//TheDisplayListener dListen = new TheDisplayListener();\r\n\t\t//(vend.getDisplay()).register(dListen);\r\n\t\t\r\n\t\tcsListen = new TheCoinSlotListener();\r\n\t\t(vend.getCoinSlot()).register(csListen);\r\n\t\t\r\n\t\t//TheCoinReceptacleListener crListen = new TheCoinReceptacleListener(vend);\r\n\t\t//(vend.getCoinReceptacle()).register(crListen);\r\n\t\t\r\n\t\t//crListen = new TheCoinReceptacleListener(vend);\r\n\t\t//(vend.getStorageBin()).register(crListen);\r\n\t\t\r\n\t\tdcListen = new DeliveryChuteListen(vend);\r\n\t\t(vend.getDeliveryChute()).register(dcListen);\r\n\t\t\r\n\t\t// exact change light\r\n\t\t//TheIndicatorLightListener eclListen = new TheIndicatorLightListener(vend);\r\n\t\t//(vend.getExactChangeLight()).register(dcListen);\r\n\t\t\r\n\t\t// out of order light\r\n\t\t//TheIndicatorLightListener oooListen = new TheIndicatorLightListener(vend);\r\n\t\t//(vend.getOutOfOrderLight()).register(dcListen);\r\n\t\t\r\n\t\tfor (int i = 0; i < vend.getNumberOfSelectionButtons(); i++) {\r\n \t\tTheSelectionButtonListener sbListen = new TheSelectionButtonListener(vend.getPopCanRack(i), csListen, vend, i);\r\n \t\t(vend.getSelectionButton(i)).register(sbListen);\r\n // \t\tPopCanRackListen pcrListen = new PopCanRackListen(vend);\r\n // \t\t(vend.getPopCanRack(i)).register(pcrListen);\r\n \t}\r\n\t\t\r\n\t\t//for (int i = 0; i < vend.getNumberOfPopCanRacks(); i++) {\r\n \t//\t\r\n \t//\t\r\n \t//}\r\n\t\tList<String> popCanNames = new ArrayList<String>();\r\n\t\tpopCanNames.add(\"Coke\"); \r\n\t\tpopCanNames.add(\"Pepsi\"); \r\n\t\tpopCanNames.add(\"Sprite\"); \r\n\t\tpopCanNames.add(\"Mountain dew\"); \r\n\t\tpopCanNames.add(\"Water\"); \r\n\t\tpopCanNames.add(\"Iced Tea\");\r\n\t\t\r\n\t\tPopCan popcan = new PopCan(\"Coke\");\r\n\t\ttry {\r\n\t\t\tvend.getPopCanRack(0).acceptPopCan(popcan);\r\n\t\t} catch (CapacityExceededException | DisabledException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t};\r\n\t\t\r\n\t\tList<Integer> popCanCosts = new ArrayList<Integer>();\r\n\t\tfor (int i = 0; i < 6; i++) {\r\n\t\t\tpopCanCosts.add(200);\r\n\t\t}\r\n\t\tvend.configure(popCanNames, popCanCosts);\r\n \t\r\n }",
"public SwerveDrive() {\n //TODO:properly construct the swerve modules, and put then in an array, int already in Constants\n // frontLeft = new SwerveModule();\n // rearLeft = new SwerveModule();\n // rearRight = new SwerveModule();\n // frontRight = new SwerveModule();\n ////This may seem repetitive, but it makes clear which module is which.\n // swerveModules = new SwerveModule[]{\n // frontLeft,\n // rearLeft,\n // rearRight,\n // frontRight\n // };\n \n //TODO:Construct the IMU object, alreeady named imu\n\n }",
"public void create3(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating stairs to connect rooms\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Stairs[1][1] = 1;\n\n\t\t//creating board to keep track of garret\n\t\tfor(int i = 0; i <this.Garret.length; i++){\n\t\t\tfor(int p = 0; p < this.Garret.length; p++){\n\t\t\t\tthis.Garret[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of garret board\n\t\tthis.Garret[18][10] = 1;//putts garret there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 1; i< 6 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 7; p > 4; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 11 ; i++){\n\t\t\tfor(int p = 4; p < 5; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 10; i< 11 ; i++){\n\t\t\tfor(int p = 5; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 11; i< 15 ; i++){\n\t\t\tfor(int p = 7; p < 8; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 7; p > 3; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 1; p < 4; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 4; i< 5 ; i++){\n\t\t\tfor(int p = 12; p < 17; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 5; i< 9 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 14 ; i++){\n\t\t\tfor(int p = 7; p < 12; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 13; i< 16 ; i++){\n\t\t\tfor(int p = 12; p < 13; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 12; p < 19; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}",
"public void createCostGraph()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tint woGraphPoints;\n\t\tString costTyptemp;\n\t\tString costGraph_Ext;\n\t\tdouble woCostTemp; \n\t\tdouble strCostTemp;\n\t\tString sGraphTitle;\n\t\tString sLeftTitle;\n\n\t\tint noOfRows = itemset0.countRows(); \n\t\tGraphInNewWind = false;\n\t\tint wono = sWorkOrderNoTree;\n\n\t\tString[] woCostType = new String[noOfRows]; \n\t\tdouble[] woCost = new double[noOfRows];\n\t\tdouble[] structureCost = new double[noOfRows];\n\n\t\titemset0.first();\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\twoCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOSTSINGLE\");\n\t\t\twoCostType[i] = itemset0.getRow().getValue(\"SWOCOSTTYPE\");\n\t\t\tstructureCost[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDCOST\");\n\n\t\t\titemset0.forward(1);\n\t\t}\n\n\t\twoGraphPoints = 6;\n\n\t\tfor (int i = 0 ; i < noOfRows ; i++)\n\t\t{\n\t\t\tif (woCost[i]>0 || structureCost[i]>0)\n\t\t\t\tgraphflagWo = 1;\n\t\t}\n\n\t\tsGraphTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMWOCOSTTITLE: Work Order Cost\");\n\t\tsLeftTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMAMOUNTTR: Amount\");\n\n\t\tGraphInNewWind = true;\n\n\t\tdrawGraphPic(wono,sGraphTitle,sLeftTitle,noOfRows,woCostType,woCost,structureCost);\n\t}",
"public VixHedgePanel() {\n initComponents();\n \n JPanel p1 = new VerticalPanel();\n p1.add(\"Strike Pirce\", m_strikePrice);\n \n this.add(p1, BorderLayout.NORTH);\n \n }",
"public void setup(){\r\n\t\t\r\n\r\n\t\tsuper.setup();\r\n\t\t\r\n\t\tparams = new String[] {\"numLocations\",\"numFirms\",\"timeHorizon\",\"enteringCosts\",\r\n\t\t\t\t \"reservationPrice\", \"productDifferentiation\",\r\n\t\t\t\t \"adjustEnteringCosts\",\r\n\t\t\t\t \"sdNoiseImitationKnowledge\",\r\n\t\t\t\t \"sdNoiseImitationConcept\",\r\n\t\t\t\t \"sigma\",\"discontFactor\",\"initialInnoEff\",\"fractionEffectivityImitators\",\r\n\t\t\t\t \"initialImiEff\",\"exitingCosts\",\"fractionEffectivityInnovators\",\r\n\t\t\t\t \"locationCosts\",\"isolatedLocation\", \"maxQualityConceptProgress\",\"heterogeneityMode\",\"randomAllocation\", \"numMontecarloRuns\",\r\n\t\t\t\t \"maxQualityConceptProgress\",\"rateLocationDecision\", \"marketEntryCosts\",\r\n\t\t\t\t \"marketEntryHazardRate\", \"parTimeToMarket\",\"ModelModeTimeToMarket\",\"scrapValueParameterInno\",\"scrapValueParameterImi\",\"strategyParameter\",\"targetNumFirms\"};\r\n\r\n\t\r\n\r\n\t\t\r\n\t\tif(graphOutput!=null)\r\n\t\t\tgraphOutput.dispose();\r\n\t\t\r\n\t\tif(graphPrice!=null)\r\n\t\t\tgraphPrice.dispose();\r\n\t\t\r\n\t\tif(graphQuality!=null)\r\n\t\t\tgraphQuality.dispose();\r\n\t\tif(graphNumFirms!=null)\r\n\t\t\tgraphNumFirms.dispose();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tif(graphFirmLocations!=null)\r\n\t\t\tgraphFirmLocations.dispose();\r\n\t\t\r\n\t\tif(graphEnteringCosts!=null)\r\n\t\t\tgraphEnteringCosts.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphAverageProbability!=null)\r\n\t\t\tgraphAverageProbability.dispose();\r\n\t\t\r\n\t\tif(graphTotalProfit!=null)\r\n\t\t\tgraphTotalProfit.dispose();\r\n\t\t\r\n\t\tif(graphClusteringCoefficient!=null)\r\n\t\t\tgraphClusteringCoefficient.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphSingleOutput!=null)\r\n\t\tgraphSingleOutput.dispose();\r\n\t\t\r\n\t\tif(graphSinglePrice!=null)\r\n\t\tgraphSinglePrice.dispose(); \r\n\t\t\r\n\t\tif(graphSingleQuality!=null)\r\n\t\tgraphSingleQuality.dispose(); \r\n\t\t\r\n\t\tif(graphSingleFirmLocations!=null)\r\n\t\tgraphSingleFirmLocations.dispose();\r\n\t\t\r\n\t\tif(graphSingleProbability!=null)\r\n\t\t graphSingleProbability.dispose(); \r\n\t\t\r\n\t\tif(graphSinglelProfit!=null)\r\n\t\tgraphSinglelProfit.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphSingleQualityConcept!=null)\r\n\t\t\tgraphSingleQualityConcept.dispose();\r\n\t\t\r\n\t\t\r\n\t\tif(graphCumProfit!=null)\r\n\t\t\tgraphCumProfit.dispose();\r\n\t\t\r\n\t\t\r\n\t \r\n\t if(dsurfList!=null){\r\n\t\t for(int i=0; i<dsurfList.size();i++){\r\n\t\t \t\t\r\n\t\t \t\tdsurfList.get(i).dispose();\r\n\t\t \r\n\t\t }\r\n\t}\r\n\t \r\n\t gridList = null;\r\n\t dsurfList = null;\r\n\t \r\n\t gridList = new ArrayList<Object2DGrid>() ;\r\n\t dsurfList\t= new\tArrayList<DisplaySurface>() ;\r\n\t \r\n\t \r\n\t dimX = ((int) Math.sqrt(numFirms))+5;\r\n\t dimY=dimX;\r\n\t \r\n\t \r\n\t \r\n\t if (surface != null)\r\n\t surface.dispose ();\r\n\t surface = null;\r\n\t \r\n\t surface = new DisplaySurface (this, \"Firm network\");\r\n\t registerDisplaySurface (\"Firm network\", surface);\r\n\t\t\r\n\t\t\r\n\t}",
"public static void create_AssemblyNormalProduct(String productid, String purchaseAccount, String salesAccount, WebDriver driver)\n\t\t\tthrows InterruptedException, AWTException, IOException {\n\t\tproductid = \"BA\" + productid;\n\t\tString productName = productid + \" Name\";\n\t\tString productDes = productid + \" Inventory Assembly Product\";\n\t\t\n\t\ttry {\n\t\t\tProperties pro = Utilities.fetchProValue(\"OR_ProductMaster.properties\");\n\t\n\t\t\tUtilities.waitandClick(pro.getProperty(\"createProductIcon\"), driver);\n\t\t\tUtilities.enterTextNormalBox(productName, pro.getProperty(\"productName\"), driver);\n\t\t\tUtilities.enterTextNormalBox(productDes, pro.getProperty(\"productDes\"), driver);\n\t\t\tUtilities.enterTextInDropDown(\"NA\", pro.getProperty(\"sequenceformat\"), driver);\n\t\t\tUtilities.enterTextNormalBox(productid, pro.getProperty(\"productId\"), driver);\n\t\t\tUtilities.clickCheckBox(pro.getProperty(\"qaenable\"), \"check\", driver);\n\t\t\tcustom(driver); //FAISAL\n\t\t\tUtilities.enterTextNormalBox(\"500\", pro.getProperty(\"initialquantity\"), driver);\n\t\t\tUtilities.click_element(pro.getProperty(\"productId\"), driver);\n\t\t\t\t\n\t\t\tif(driver.findElement(By.xpath(\"//button[text()='Yes']\")).isDisplayed()) {\n\t\t\t\ttry {\n\t\t\t\t\tUtilities.clickButton(\"Yes\", 1000, driver);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t// TODO: handle exception\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tThread.sleep(5000);\n\n\t\t\t// enter WareHouse\n\t\t\tint header = Utilities.totalSize(\n\t\t\t\t\t\"//*[contains(@style,'visible')]//*[text()='Warehouse']/ancestor::div[1]/table/thead/tr/td/div\",\n\t\t\t\t\tdriver);\n\t\t\tfor (int i = 1; i <= header; i++) {\n\t\t\t\tString headerName = driver.findElement(By\n\t\t\t\t\t\t.xpath(\"//*[contains(@style,'visible')]//*[text()='Warehouse']/ancestor::div[1]/table/thead/tr/td[\"\n\t\t\t\t\t\t\t\t+ i + \"]/div\"))\n\t\t\t\t\t\t.getText();\n\t\t\t\tif (headerName.equalsIgnoreCase(\"Warehouse\")) {\n\t\t\t\t\tUtilities.click_element(\n\t\t\t\t\t\t\t\"//*[contains(@style,'visible')]//*[text()='Warehouse']/ancestor::div[3]/following::div[1]/div[1]/div[1]/table/tbody/tr/td[\"\n\t\t\t\t\t\t\t\t\t+ i + \"]/div\",\n\t\t\t\t\t\t\tdriver);\n\t\t\t\t\tUtilities.enterTextandSelect(\"DS - Default Store\",\n\t\t\t\t\t\t\t\"//*[contains(@style,'visible')]//*[@class='x-grid3-viewport']//*[@id='warehouse']/following::input[1]\",\n\t\t\t\t\t\t\tdriver);\n\t\t\t\t}\n\n\t\t\t\tif (headerName.equalsIgnoreCase(\"Locations\")) {\n\t\t\t\t\tUtilities.click_element(\n\t\t\t\t\t\t\t\"//*[contains(@style,'visible')]//*[text()='Warehouse']/ancestor::div[3]/following::div[1]/div[1]/div[1]/table/tbody/tr/td[\"\n\t\t\t\t\t\t\t\t\t+ i + \"]/div\",\n\t\t\t\t\t\t\tdriver);\n\t\t\t\t\tUtilities.enterTextandSelect(\"Default Location\",\n\t\t\t\t\t\t\t\"//*[contains(@style,'visible')]//*[@class='x-grid3-viewport']//*[@id='location']/following::input[1]\",\n\t\t\t\t\t\t\tdriver);\n\t\t\t\t}\n\t\t\t}\n\t\t\tUtilities.click_element(\"//*[contains(@style,'visible')]//button[text()='Submit']\", driver);\n\t\t\t\n\t\t\t// ------------- Purchase Tab\n\t\t\t// ----------------------------------------------\n\t\t\tUtilities.HoverandClick(pro.getProperty(\"purchaseTab\"), driver);\n\t\t\tUtilities.enterTextandSelect(purchaseAccount, pro.getProperty(\"purchaseAccount\"), driver);\n\t\t\tUtilities.enterTextNormalBox(\"10\", pro.getProperty(\"initialPurchasePrice\"), driver);\n\n\t\t\t// ------------- Sales Tab\n\t\t\t// ----------------------------------------------\n\t\t\tUtilities.HoverandClick(pro.getProperty(\"salesTab\"), driver);\n\t\t\tUtilities.enterTextandSelect(salesAccount, pro.getProperty(\"salesAccount\"), driver);\n\t\t\tUtilities.enterTextNormalBox(\"20\", pro.getProperty(\"initialSalesPrice\"), driver);\n\t\t\t\n\n\t\t\tUtilities.HoverandClick(pro.getProperty(\"inventoryDataTab\"), driver);\n\t\t\tUtilities.enterTextandSelect(\"Unit\", pro.getProperty(\"umo\"), driver);\n\t\t\tUtilities.enterTextandSelect(\"DS - Default Store\", pro.getProperty(\"warehouse\"), driver);\n\t\t\tUtilities.enterTextandSelect(\"Default Location\", pro.getProperty(\"location\"), driver);\n\n\t\t\tWebElement countable = driver.findElement(By.xpath(pro.getProperty(\"countable\")));\n\t\t\tif (countable.isEnabled()) {\n\t\t\t\tif (!countable.isSelected()) {\n\t\t\t\t\tcountable.click();\n\t\t\t\t}\n\t\t\t\tWebElement cyclecountfrequency = driver.findElement(By.xpath(pro.getProperty(\"cyclecountfrequency\")));\n\t\t\t\tcyclecountfrequency.click();\n\t\t\t\tRobot r3 = new Robot();\n\t\t\t\tr3.keyPress(KeyEvent.VK_DOWN);\n\t\t\t\tr3.keyRelease(KeyEvent.VK_DOWN);\n\t\t\t\tThread.sleep(2000);\n\t\t\t\tList<WebElement> comboItems = driver.findElements(\n\t\t\t\t\t\tBy.cssSelector(\".x-combo-list[style*='visibility: visible;'] .x-combo-list-item\"));\n\t\t\t\tfor (int i = 0; i < comboItems.size(); i++) {\n\t\t\t\t\tWebElement item = comboItems.get(i);\n\t\t\t\t\tif (item.getText().equals(\"Daily\") || item.getText().equals(\"Weekly\")\n\t\t\t\t\t\t\t|| item.getText().equals(\"Fortnightly\") || item.getText().equals(\"Monthly\")) {\n\t\t\t\t\t\titem.click();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tUtilities.HoverandClick(pro.getProperty(\"saveButton\"), driver);\n\n\t\t\ttry {\n\t\t\t\tWebElement duplicateProductID = new WebDriverWait(driver, 3).until(\n\t\t\t\t\t\tExpectedConditions.elementToBeClickable(By.xpath(\"//*[contains(text(),'already exists')]\")));\n\t\t\t\tif (duplicateProductID.isDisplayed()) {\n\t\t\t\t\tUtilities.refresh();\n\t\t\t\t\tSystem.out.println(\"********* This product [\" + productid\n\t\t\t\t\t\t\t+ \"] is already present so Not creating this One !!!!!! *******\");\n\t\t\t\t}\n\t\t\t} catch (Exception ex) {\n\t\t\t\t// Continue as New Product\n\t\t\t\ttry {\n\t\t\t\t\tproductAfterSaveOKBtn(driver);\n\t\t\t\t} catch (Exception noOk) {\n\t\t\t\t\t// No Ok button\n\t\t\t\t}\n\t\t\t\tUtilities.click_element(pro.getProperty(\"CloseReport\"), driver);\n\t\t\t\tUtilities.click_element(pro.getProperty(\"closeCreateproductTab\"), driver);\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"********** Normal Product [\" + productName + \"] Successfully created *************\");\n\t\t\t}\n\t\t} catch (Exception EX) {\n\t\t\tSystem.out.println(\"********** Failed to Create Normal Product [\" + productName\n\t\t\t\t\t+ \"] Successfully created *************\");\n\t\t\tUtilities.handleError(EX, driver);\n\t\t}\n\n\t}",
"public Computer(ComputerSpec computerSpec, double price) {\n this.computerSpec = computerSpec;\n this.price = price;\n this.serialNumber = ++count;\n inventory.add(this);\n }",
"public void create2(){\n\t\t//creating board to keep track of player postion with 1 or 0. 0 if not there 1 if they are there\n\t\tfor(int i = 0; i <this.position.length; i++){\n\t\t\tfor(int p = 0; p < this.position.length; p++){\n\t\t\t\tthis.position[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of position making board\n\n\n\t\t//creating door in the rooms\n\t\tfor(int i = 0; i <this.Door.length; i++){\n\t\t\tfor(int p = 0; p < this.Door.length; p++){\n\t\t\t\tthis.Door[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Door[1][1] = 1;\n\n\t\t//creating stairs to transport to room3\n\t\tfor(int i = 0; i <this.Stairs.length; i++){\n\t\t\tfor(int p = 0; p < this.Stairs.length; p++){\n\t\t\t\tthis.Stairs[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}//end of Door making board\n\t\tthis.Stairs[18][18] = 1;\n\n\t\t//creating board to keep track of ari\n\t\tfor(int i = 0; i <this.Ari.length; i++){\n\t\t\tfor(int p = 0; p < this.Ari.length; p++){\n\t\t\t\tthis.Ari[i][p] = 0;//filling with zero\n\t\t\t}\n\t\t}\n\t\tthis.Ari[7][11] = 1;//putts ari there\n\n\t\t//makes board that tells if item is there\n\t\tfor(int i = 0; i <this.Items.length; i++){\n\t\t\tfor(int p = 0; p < this.Items.length; p++){\n\t\t\t\tthis.Items[i][p] = null;//filling with null\n\t\t\t}\n\t\t}//end of filling board that has items\n\n\t\t//makes border of room\n\t\tfor(int i = 0; i < this.area.length; i++){\n\t\t\tfor(int p = 0; p<this.area.length; p++){\n\t\t\t\tif(i==0){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if (p==0 || p==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse if(i==19){\n\t\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\tthis.area[i][p] = \" \";\n\t\t\t\t}\n\t\t\t}//end of innner for\n\t\t}//end of outter for\n\t\tfor(int i = 3; i< 4 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 6; i< 7 ; i++){\n\t\t\tfor(int p = 19; p > 1; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 9; i< 10 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 12; i< 13 ; i++){\n\t\t\tfor(int p = 19; p > 1; p--){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\t\t}\n\t\tfor(int i = 15; i< 16 ; i++){\n\t\t\tfor(int p = 1; p < 18; p++){\n\t\t\t\tthis.area[i][p] = \"[ ]\";\n\t\t\t}\n\n\t\t\tSystem.out.println(\" \");\n\t\t}//end of for that creates walls\n\n\t\t//for loop that distributes items\n\t\tint y = 0;\n\t\tint x = 0;\n\t\tfor(int i = 0;i<10;i++){\n\t\t\tItem thing = ItemGenerator.generate();//making an item\n\t\t\tboolean good = false;\n\t\t\twhile(!good){//makes coordates until there is nothing in the way\n\t\t\t\ty = fate.nextInt(20);//getting coordiantaes\n\t\t\t\tx = fate.nextInt(20);\n\t\t\t\tif(this.Items[y][x]==null && this.area[y][x] != \"[ ]\"){\n\t\t\t\t\tgood = true;\n\t\t\t\t}//end of if\n\t\t\t\telse{\n\t\t\t\t\tgood = false;\n\t\t\t\t}\n\t\t\t}//end of while\n\t\t\tItems[y][x] = thing;\n\t\t}//end of for that distributes items on board\n\n\t}",
"private void initialize()\n\t{\n\t\tfrmHardware = new JFrame();\n\t\tfrmHardware.setTitle(\"Guitar Builder - Hardware\");\n\t\tfrmHardware.setResizable(false);\n\t\tfrmHardware.setBounds(100, 100, 514, 326);\n\t\tfrmHardware.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\tfrmHardware.getContentPane().setLayout(null);\n\t\tDimension dim = Toolkit.getDefaultToolkit().getScreenSize();\n\t\tfrmHardware.setLocation(dim.width/2-frmHardware.getSize().width/2, dim.height/2-frmHardware.getSize().height/2);\n\t\t\n\t\tJTabbedPane tabbedPane = new JTabbedPane(JTabbedPane.TOP);\n\t\ttabbedPane.setBounds(0, 0, 508, 297);\n\t\tfrmHardware.getContentPane().add(tabbedPane);\n\t\t\n\t\tJPanel pnlSelectHardware = new JPanel();\n\t\ttabbedPane.addTab(\"Select Hardware\", null, pnlSelectHardware, null);\n\t\tpnlSelectHardware.setLayout(null);\n\t\t\n\t\tJLabel lblHardwareId = new JLabel(\"Hardware ID:\");\n\t\tlblHardwareId.setBounds(41, 17, 180, 14);\n\t\tpnlSelectHardware.add(lblHardwareId);\n\t\t\n\t\tJLabel lblNeckPickup = new JLabel(\"Neck Pickup:\");\n\t\tlblNeckPickup.setBounds(41, 42, 180, 14);\n\t\tpnlSelectHardware.add(lblNeckPickup);\n\t\t\n\t\tJLabel lblMiddlePickup = new JLabel(\"Middle Pickup:\");\n\t\tlblMiddlePickup.setBounds(41, 67, 180, 14);\n\t\tpnlSelectHardware.add(lblMiddlePickup);\n\t\t\n\t\tJLabel lblBridgePickup = new JLabel(\"Bridge Pickup:\");\n\t\tlblBridgePickup.setBounds(41, 92, 180, 14);\n\t\tpnlSelectHardware.add(lblBridgePickup);\n\t\t\n\t\tJLabel lblTonevolKnobs = new JLabel(\"Tone/Vol Knobs:\");\n\t\tlblTonevolKnobs.setBounds(41, 117, 180, 14);\n\t\tpnlSelectHardware.add(lblTonevolKnobs);\n\t\t\n\t\tJLabel lblBridge = new JLabel(\"Bridge:\");\n\t\tlblBridge.setBounds(41, 142, 180, 14);\n\t\tpnlSelectHardware.add(lblBridge);\n\t\t\n\t\tJLabel lblTuners = new JLabel(\"Tuners:\");\n\t\tlblTuners.setBounds(41, 167, 180, 14);\n\t\tpnlSelectHardware.add(lblTuners);\n\t\t\n\t\ttxtHardwareID = new JTextField();\n\t\ttxtHardwareID.setBounds(286, 14, 179, 20);\n\t\tpnlSelectHardware.add(txtHardwareID);\n\t\ttxtHardwareID.setColumns(10);\n\t\t\n\t\tJComboBox cmbBoxNeckPickup = new JComboBox();\n\t\tcmbBoxNeckPickup.setModel(new DefaultComboBoxModel(new String[] {\"No Neck Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxNeckPickup.setBounds(286, 39, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxNeckPickup);\n\t\t\n\t\tJComboBox cmbBoxMiddlePickup = new JComboBox();\n\t\tcmbBoxMiddlePickup.setModel(new DefaultComboBoxModel(new String[] {\"No Middle Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxMiddlePickup.setBounds(286, 64, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxMiddlePickup);\n\t\t\n\t\tJComboBox cmbBoxBridgePickup = new JComboBox();\n\t\tcmbBoxBridgePickup.setModel(new DefaultComboBoxModel(new String[] {\"No Bridge Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxBridgePickup.setBounds(286, 89, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxBridgePickup);\n\t\t\n\t\tJComboBox cmbBoxKnobs = new JComboBox();\n\t\tcmbBoxKnobs.setModel(new DefaultComboBoxModel(new String[] {\"Top Hat\", \"Speed\", \"Dome\", \"Jazz\", \"Chicken Head\"}));\n\t\tcmbBoxKnobs.setBounds(286, 114, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxKnobs);\n\t\t\n\t\tJComboBox cmbBoxBridge = new JComboBox();\n\t\tcmbBoxBridge.setModel(new DefaultComboBoxModel(new String[] {\"Stop Tail\", \"Floyd Rose\", \"Hipshot\", \"Vibrato\"}));\n\t\tcmbBoxBridge.setBounds(286, 139, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxBridge);\n\t\t\n\t\tJComboBox cmbBoxTuners = new JComboBox();\n\t\tcmbBoxTuners.setModel(new DefaultComboBoxModel(new String[] {\"Locking\", \"Vintage\", \"Open Gear\", \"Hipshot Locking\", \"Trim-Lok\"}));\n\t\tcmbBoxTuners.setBounds(286, 164, 179, 20);\n\t\tpnlSelectHardware.add(cmbBoxTuners);\n\t\t\n\t\tJButton btnNewButton = new JButton(\"Create Hardware\");\n\t\tbtnNewButton.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnNewButton.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString neckPickup = (String)cmbBoxNeckPickup.getSelectedItem();\n\t\t\t\tString middlePickup = (String)cmbBoxMiddlePickup.getSelectedItem();\n\t\t\t\tString bridgePickup = (String)cmbBoxBridgePickup.getSelectedItem();\n\t\t\t\tString knobs = (String)cmbBoxKnobs.getSelectedItem();\n\t\t\t\tString bridge = (String)cmbBoxBridge.getSelectedItem();\n\t\t\t\tString tuners = (String)cmbBoxTuners.getSelectedItem();\n\t\t\t\t\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Is The Following Information Correct?\"\n\t\t\t\t\t\t+ \"\\nID: \" + ID + \"\\nNeck Pickup: \" + neckPickup + \"\\nMiddle Pickup: \" + middlePickup\n\t\t\t\t\t\t+ \"\\nBridge Pickup: \" + bridgePickup + \"\\nKnobs: \" + knobs + \"\\nBridge: \"\n\t\t\t\t\t\t+ bridge + \"\\nTuners: \" + tuners, \"Confirmation\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\t\t\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tHardware create = new Hardware(ID, neckPickup , middlePickup, bridgePickup, knobs, bridge, tuners); //creates Hardware object\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.writeHardware(create); //passes to method that writes hardware to database\n\t\t\t\t\t} \n\t\t\t\t\tcatch (SQLException e1)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (e1.getErrorCode() == 00001) //sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware ID already in use\",\n\t\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if (e1.getErrorCode() == 1438) //sql error for hardware ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware ID to long, must be 5 digits or less\",\n\t\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse //unaccounted for error (should not happen)\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware Created\",\n\t \"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Unresolved Error, Could not create Hardware\",\n\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnNewButton.setBounds(41, 192, 180, 56);\n\t\tpnlSelectHardware.add(btnNewButton);\n\t\t\n\t\tJButton btnProductMenu_1 = new JButton(\"Product Menu\");\n\t\tbtnProductMenu_1.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tBuilder.createBuilderGui();\n\t\t\t\tfrmHardware.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnProductMenu_1.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnProductMenu_1.setBounds(285, 192, 180, 56);\n\t\tpnlSelectHardware.add(btnProductMenu_1);\n\t\t\n\t\tJPanel pnlUpdateHardware = new JPanel();\n\t\ttabbedPane.addTab(\"Update Hardware\", null, pnlUpdateHardware, null);\n\t\tpnlUpdateHardware.setLayout(null);\n\t\t\n\t\tJLabel lblHardwareIdFor = new JLabel(\"Hardware ID For Update:\");\n\t\tlblHardwareIdFor.setBounds(42, 17, 180, 14);\n\t\tpnlUpdateHardware.add(lblHardwareIdFor);\n\t\t\n\t\tJLabel lblUpdateNeckPickup = new JLabel(\"Update Neck Pickup:\");\n\t\tlblUpdateNeckPickup.setBounds(42, 42, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateNeckPickup);\n\t\t\n\t\tJLabel lblUpdateMiddlePickup = new JLabel(\"Update Middle Pickup:\");\n\t\tlblUpdateMiddlePickup.setBounds(42, 67, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateMiddlePickup);\n\t\t\n\t\tJLabel lblUpdateBridgePickup = new JLabel(\"Update Bridge Pickup:\");\n\t\tlblUpdateBridgePickup.setBounds(42, 92, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateBridgePickup);\n\t\t\n\t\tJLabel lblUpdateTonevolKnobs = new JLabel(\"Update Tone/Vol Knobs:\");\n\t\tlblUpdateTonevolKnobs.setBounds(42, 117, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateTonevolKnobs);\n\t\t\n\t\tJLabel lblUpdateBridge = new JLabel(\"Update Bridge:\");\n\t\tlblUpdateBridge.setBounds(41, 142, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateBridge);\n\t\t\n\t\tJLabel lblUpdateTuners = new JLabel(\"Update Tuners:\");\n\t\tlblUpdateTuners.setBounds(41, 167, 180, 14);\n\t\tpnlUpdateHardware.add(lblUpdateTuners);\n\t\t\n\t\t\n\t\t\n\t\tJButton btnProductMenu = new JButton(\"Product Menu\");\n\t\tbtnProductMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tBuilder.createBuilderGui();\n\t\t\t\tfrmHardware.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnProductMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnProductMenu.setBounds(285, 192, 180, 56);\n\t\tpnlUpdateHardware.add(btnProductMenu);\n\t\t\n\t\tJComboBox cmbBoxUpdateTuners = new JComboBox();\n\t\tcmbBoxUpdateTuners.setModel(new DefaultComboBoxModel(new String[] {\"Locking\", \"Vintage\", \"Open Gear\", \"Hipshot Locking\", \"Trim-Lok\"}));\n\t\tcmbBoxUpdateTuners.setBounds(286, 164, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateTuners);\n\t\t\n\t\tJComboBox cmbBoxUpdateBridge = new JComboBox();\n\t\tcmbBoxUpdateBridge.setModel(new DefaultComboBoxModel(new String[] {\"Stop Tail\", \"Floyd Rose\", \"Hipshot\", \"Vibrato\"}));\n\t\tcmbBoxUpdateBridge.setBounds(285, 139, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateBridge);\n\t\t\n\t\tJComboBox cmbBoxUpdateKnobs = new JComboBox();\n\t\tcmbBoxUpdateKnobs.setModel(new DefaultComboBoxModel(new String[] {\"Top Hat\", \"Speed\", \"Dome\", \"Jazz\", \"Chicken Head\"}));\n\t\tcmbBoxUpdateKnobs.setBounds(286, 114, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateKnobs);\n\t\t\n\t\tJComboBox cmbBoxUpdateBridgePickup = new JComboBox();\n\t\tcmbBoxUpdateBridgePickup.setModel(new DefaultComboBoxModel(new String[] {\"No Bridge Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxUpdateBridgePickup.setBounds(286, 89, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateBridgePickup);\n\t\t\n\t\tJComboBox cmbBoxUpdateMiddlePickup = new JComboBox();\n\t\tcmbBoxUpdateMiddlePickup.setModel(new DefaultComboBoxModel(new String[] {\"No Middle Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxUpdateMiddlePickup.setBounds(285, 64, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateMiddlePickup);\n\t\t\n\t\tJComboBox cmbBoxUpdateNeckPickup = new JComboBox();\n\t\tcmbBoxUpdateNeckPickup.setModel(new DefaultComboBoxModel(new String[] {\"No Neck Pickup\", \"EMG-60\", \"EMG-80\", \"EMG-81\\t\\t\\t\\t\\t\\t\", \"EMG H4\", \"Seymore Duncan Livewire\", \"Seymore Duncan AHB\", \"Seymore Duncan Blackouts\", \"Seymore Duncan Invader\", \"Gibson 57 classic\", \"DiMarzio Gravity Storm\", \"Lace Sensor Emerald\", \"Seymore Duncan Zephyr\", \"DiMarzio True Velvet\", \"DiMarzio Red Velvet\", \"DiMarzio Injector\", \"EMG SA\", \"DiMarzio Twang King\", \"Fender Fat 50s\", \"Fender N3 Noiseless\"}));\n\t\tcmbBoxUpdateNeckPickup.setBounds(286, 39, 179, 20);\n\t\tpnlUpdateHardware.add(cmbBoxUpdateNeckPickup);\n\t\t\n\t\ttxtUpdateHardwareID = new JTextField();\n\t\ttxtUpdateHardwareID.setColumns(10);\n\t\ttxtUpdateHardwareID.setBounds(285, 14, 96, 20);\n\t\tpnlUpdateHardware.add(txtUpdateHardwareID);\n\t\t\n\t\tJButton btnUpdateHardware = new JButton(\"Update Hardware\");\n\t\tbtnUpdateHardware.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtUpdateHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tString neckPickup = (String)cmbBoxUpdateNeckPickup.getSelectedItem();\n\t\t\t\tString middlePickup = (String)cmbBoxUpdateMiddlePickup.getSelectedItem();\n\t\t\t\tString bridgePickup = (String)cmbBoxUpdateBridgePickup.getSelectedItem();\n\t\t\t\tString knobs = (String)cmbBoxUpdateKnobs.getSelectedItem();\n\t\t\t\tString bridge = (String)cmbBoxUpdateBridge.getSelectedItem();\n\t\t\t\tString tuners = (String)cmbBoxUpdateTuners.getSelectedItem();\n\t\t\t\t\n\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Is The Following Information Correct?\"\n\t\t\t\t\t\t+ \"\\nID: \" + ID + \"\\nNeck Pickup: \" + neckPickup + \"\\nMiddle Pickup: \" + middlePickup\n\t\t\t\t\t\t+ \"\\nBridge Pickup: \" + bridgePickup + \"\\nKnobs: \" + knobs + \"\\nBridge: \"\n\t\t\t\t\t\t+ bridge + \"\\nTuners: \" + tuners, \"Confirmation\",\n\t\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\t\t\n\t\t\t\tif(choice == 0)\n\t\t\t\t{\n\t\t\t\t\t\n\t\t\t\t\tHardware update = new Hardware(ID, neckPickup , middlePickup, bridgePickup, knobs, bridge, tuners); //creates hardware object\n\t\t\t\t\t\n\t\t\t\t\ttry\n\t\t\t\t\t{\n\t\t\t\t\t\tOracleJDBC.updateHardware(update); //passes to method that writes hardware to database\n\t\t\t\t\t} \n\t\t\t\t\tcatch (SQLException e1)\n\t\t\t\t\t{\n\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\tif (e1.getErrorCode() == 00001) //sql error for PK constraint violation\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware ID already in use\",\n\t\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse if (e1.getErrorCode() == 1438) //sql error for hardware ID too long\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware ID to long, must be 5 digits or less\",\n\t\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\telse //unaccounted for error (should not happen)\n\t\t\t\t\t\t\te1.printStackTrace();\n\t\t\t\t\t\t\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware Updated\",\n\t \"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Unresolved Error, Could not update Hardware\",\n\t \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnUpdateHardware.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnUpdateHardware.setBounds(41, 192, 180, 56);\n\t\tpnlUpdateHardware.add(btnUpdateHardware);\n\t\tbtnUpdateHardware.setEnabled(false);\n\t\t\n\t\tJButton btnEnter = new JButton(\"Enter\");\n\t\tbtnEnter.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtUpdateHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1) //ensures ID is integer\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\tint returnID = 0;\n\t\t\t\tString neckPickup = null;\n\t\t\t\tString middlePickup = null;\n\t\t\t\tString bridgePickup = null;\n\t\t\t\tString knobs = null;\n\t\t\t\tString bridge = null;\n\t\t\t\tString tuners = null;\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readHardwareID(ID);\n\t\t\t\t\tneckPickup = OracleJDBC.readNeckPickup(ID);\n\t\t\t\t\tmiddlePickup = OracleJDBC.readMiddlePickup(ID);\n\t\t\t\t\tbridgePickup = OracleJDBC.readBridgePickup(ID);\n\t\t\t\t\tknobs = OracleJDBC.readKnobs(ID);\n\t\t\t\t\tbridge = OracleJDBC.readBridge(ID);\n\t\t\t\t\ttuners = OracleJDBC.readTuners(ID);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\tcatch (SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(returnID != 0) //checks if hardware exists\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\tcmbBoxUpdateNeckPickup.setSelectedItem(neckPickup);\n\t\t\t\t\tcmbBoxUpdateMiddlePickup.setSelectedItem(middlePickup);\n\t\t\t\t\tcmbBoxUpdateBridgePickup.setSelectedItem(bridgePickup);\n\t\t\t\t\tcmbBoxUpdateKnobs.setSelectedItem(knobs);\n\t\t\t\t\tcmbBoxUpdateBridge.setSelectedItem(bridge);\n\t\t\t\t\tcmbBoxUpdateTuners.setSelectedItem(tuners);\n\t\t\t\t\t\n\t\t\t\t\tbtnUpdateHardware.setEnabled(true);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info, Hardware ID \" + ID +\" does not exist\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnEnter.setBounds(391, 13, 74, 23);\n\t\tpnlUpdateHardware.add(btnEnter);\n\t\t\n\t\tJPanel pnlReviewHardware = new JPanel();\n\t\ttabbedPane.addTab(\"Review Hardware\", null, pnlReviewHardware, null);\n\t\tpnlReviewHardware.setLayout(null);\n\t\t\n\t\tJButton btnReviewProductMenu = new JButton(\"Product Menu\");\n\t\tbtnReviewProductMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnReviewProductMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tBuilder.createBuilderGui();\n\t\t\t\tfrmHardware.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnReviewProductMenu.setBounds(264, 36, 198, 56);\n\t\tpnlReviewHardware.add(btnReviewProductMenu);\n\t\t\n\t\tJLabel lblReviewTuners = new JLabel(\"Tuners:\");\n\t\tlblReviewTuners.setBounds(45, 228, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewTuners);\n\t\t\n\t\tJLabel lblReviewBridge = new JLabel(\"Bridge:\");\n\t\tlblReviewBridge.setBounds(45, 203, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewBridge);\n\t\t\n\t\tJLabel lblReviewTonevolKnobs = new JLabel(\"Tone/Vol Knobs:\");\n\t\tlblReviewTonevolKnobs.setBounds(45, 178, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewTonevolKnobs);\n\t\t\n\t\tJLabel lblReviewBridgePickup = new JLabel(\"Bridge Pickup:\");\n\t\tlblReviewBridgePickup.setBounds(45, 153, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewBridgePickup);\n\t\t\n\t\tJLabel lblReviewMiddlePickup = new JLabel(\"Middle Pickup:\");\n\t\tlblReviewMiddlePickup.setBounds(45, 128, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewMiddlePickup);\n\t\t\n\t\tJLabel lblReviewNeckPickup = new JLabel(\"Neck Pickup:\");\n\t\tlblReviewNeckPickup.setBounds(45, 103, 180, 14);\n\t\tpnlReviewHardware.add(lblReviewNeckPickup);\n\t\t\n\t\tJLabel lblUpdateHardwareId = new JLabel(\"Hardware ID For Update:\");\n\t\tlblUpdateHardwareId.setBounds(45, 14, 198, 14);\n\t\tpnlReviewHardware.add(lblUpdateHardwareId);\n\t\t\n\t\ttxtReviewHardwareID = new JTextField();\n\t\ttxtReviewHardwareID.setColumns(10);\n\t\ttxtReviewHardwareID.setBounds(265, 11, 197, 20);\n\t\tpnlReviewHardware.add(txtReviewHardwareID);\n\t\t\n\t\tJLabel lblShowNeckPickup = new JLabel(\"\");\n\t\tlblShowNeckPickup.setBounds(264, 103, 198, 14);\n\t\tpnlReviewHardware.add(lblShowNeckPickup);\n\t\t\n\t\tJLabel lblShowMiddlePickup = new JLabel(\"\");\n\t\tlblShowMiddlePickup.setBounds(264, 128, 198, 14);\n\t\tpnlReviewHardware.add(lblShowMiddlePickup);\n\t\t\n\t\tJLabel lblShowBridgePickup = new JLabel(\"\");\n\t\tlblShowBridgePickup.setBounds(264, 153, 198, 14);\n\t\tpnlReviewHardware.add(lblShowBridgePickup);\n\t\t\n\t\tJLabel lblShowKnobs = new JLabel(\"\");\n\t\tlblShowKnobs.setBounds(264, 178, 198, 14);\n\t\tpnlReviewHardware.add(lblShowKnobs);\n\t\t\n\t\tJLabel lblShowBridge = new JLabel(\"\");\n\t\tlblShowBridge.setBounds(264, 203, 198, 14);\n\t\tpnlReviewHardware.add(lblShowBridge);\n\t\t\n\t\tJLabel lblShowTuners = new JLabel(\"\");\n\t\tlblShowTuners.setBounds(264, 228, 198, 14);\n\t\tpnlReviewHardware.add(lblShowTuners);\n\t\t\n\t\tJButton btnShowInformation = new JButton(\"Show Info\");\n\t\tbtnShowInformation.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtReviewHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint returnID = 0;\n\t\t\t\tString neckPickup = null;\n\t\t\t\tString middlePickup = null;\n\t\t\t\tString bridgePickup = null;\n\t\t\t\tString knobs = null;\n\t\t\t\tString bridge = null;\n\t\t\t\tString tuners = null;\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readHardwareID(ID);\n\t\t\t\t\tneckPickup = OracleJDBC.readNeckPickup(ID);\n\t\t\t\t\tmiddlePickup = OracleJDBC.readMiddlePickup(ID);\n\t\t\t\t\tbridgePickup = OracleJDBC.readBridgePickup(ID);\n\t\t\t\t\tknobs = OracleJDBC.readKnobs(ID);\n\t\t\t\t\tbridge = OracleJDBC.readBridge(ID);\n\t\t\t\t\ttuners = OracleJDBC.readTuners(ID);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\tcatch (SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(returnID != 0) //checks if Hardware exists\n\t\t\t\t{\n\t\t\t\t\n\t\t\t\t\tlblShowNeckPickup.setText(neckPickup);\n\t\t\t\t\tlblShowMiddlePickup.setText(middlePickup);\n\t\t\t\t\tlblShowBridgePickup.setText(bridgePickup);\n\t\t\t\t\tlblShowKnobs.setText(knobs);\n\t\t\t\t\tlblShowBridge.setText(bridge);\n\t\t\t\t\tlblShowTuners.setText(tuners);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info, Hardware ID \" + ID +\" does not exist\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t});\n\t\tbtnShowInformation.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnShowInformation.setBounds(45, 36, 198, 56);\n\t\tpnlReviewHardware.add(btnShowInformation);\n\t\t\n\t\t\n\t\t\n\t\tJPanel pnlDeleteHardware = new JPanel();\n\t\ttabbedPane.addTab(\"Delete Hardware\", null, pnlDeleteHardware, null);\n\t\tpnlDeleteHardware.setLayout(null);\n\t\t\n\t\tJButton btnDeleteHardware = new JButton(\"Delete Hardware\");\n\t\tbtnDeleteHardware.addActionListener(new ActionListener() \n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e) \n\t\t\t{\n\t\t\t\tint ID = 0;\n\t\t\t\ttry \n\t\t\t\t{\n\t\t\t\t\tID = Integer.parseInt(txtDeleteHardwareID.getText());\n\t\t\t\t}\n\t\t\t\tcatch(NumberFormatException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"ID must consist of only numbers\",\n\t\t\t\t\t\t\t\"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tint returnID = 0;\n\t\t\t\tString neckPickup = null;\n\t\t\t\tString middlePickup = null;\n\t\t\t\tString bridgePickup = null;\n\t\t\t\tString knobs = null;\n\t\t\t\tString bridge = null;\n\t\t\t\tString tuners = null;\n\t\t\t\t\n\t\t\t\ttry\n\t\t\t\t{\n\t\t\t\t\treturnID = OracleJDBC.readHardwareID(ID);\n\t\t\t\t\tneckPickup = OracleJDBC.readNeckPickup(ID);\n\t\t\t\t\tmiddlePickup = OracleJDBC.readMiddlePickup(ID);\n\t\t\t\t\tbridgePickup = OracleJDBC.readBridgePickup(ID);\n\t\t\t\t\tknobs = OracleJDBC.readKnobs(ID);\n\t\t\t\t\tbridge = OracleJDBC.readBridge(ID);\n\t\t\t\t\ttuners = OracleJDBC.readTuners(ID);\n\t\t\t\t\t\n\t\t\t\t} \n\t\t\t\tcatch (SQLException e1)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Could Not Retrieve Hardware Info\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\te1.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif (returnID == 0)\n\t\t\t\t{\n\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware with ID \" + ID + \" does not exist!\",\n \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tint choice = JOptionPane.showConfirmDialog(null, \"Are you sure you want to delete the following hardware?\"\n\t\t\t\t\t\t\t+ \"\\nID: \" + returnID + \"\\nNeck Pickup: \" + neckPickup + \"\\nBridge Pickup: \" + middlePickup\n\t\t\t\t\t\t\t+ \"\\nBridge pickup: \" + bridgePickup + \"\\nKnobs: \" + knobs + \"\\nBridge: \"\n\t\t\t\t\t\t\t+ bridge+ \"\\nTuners: \" + tuners, \"Confirmation\",\n\t\t\t\t\t\t\tJOptionPane.YES_NO_OPTION);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\tif (choice == 0)\n\t\t\t\t\t{\n\t\t\t\t\t\ttry\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tOracleJDBC.deleteHardware(ID);\n\t\t\t\t\t\t} \n\t\t\t\t\t\tcatch (SQLException e1)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Couldn't Delete Hardware\", \"Error\", JOptionPane.ERROR_MESSAGE, null);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tJOptionPane.showMessageDialog(null, \"Hardware Deleted\", \"Success\", JOptionPane.INFORMATION_MESSAGE, null);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t});\n\t\tbtnDeleteHardware.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnDeleteHardware.setBounds(45, 36, 198, 56);\n\t\tpnlDeleteHardware.add(btnDeleteHardware);\n\t\t\n\t\tJButton btnDeleteProductMenu = new JButton(\"Product Menu\");\n\t\tbtnDeleteProductMenu.addActionListener(new ActionListener()\n\t\t{\n\t\t\tpublic void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tBuilder.createBuilderGui();\n\t\t\t\tfrmHardware.dispose();\n\t\t\t}\n\t\t});\n\t\tbtnDeleteProductMenu.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\n\t\tbtnDeleteProductMenu.setBounds(264, 36, 198, 56);\n\t\tpnlDeleteHardware.add(btnDeleteProductMenu);\n\t\t\n\t\ttxtDeleteHardwareID = new JTextField();\n\t\ttxtDeleteHardwareID.setColumns(10);\n\t\ttxtDeleteHardwareID.setBounds(265, 11, 197, 20);\n\t\tpnlDeleteHardware.add(txtDeleteHardwareID);\n\t\t\n\t\tJLabel lblDeleteHardwareID = new JLabel(\"Hardware ID To Delete:\");\n\t\tlblDeleteHardwareID.setBounds(45, 14, 180, 14);\n\t\tpnlDeleteHardware.add(lblDeleteHardwareID);\n\t}",
"public void addHardwareDeviceToRent()\n {\n try\n {\n String Description=rentDescriptiontxt.getText();\n String Manufacturer=rentManufacturertxt.getText();\n \n int downPayment=Integer.parseInt(downPaymenttxt.getText());\n int dailyRate=Integer.parseInt(dailyRatetxt.getText());\n \n HardwareDeviceToRent HardwareToRent=new HardwareDeviceToRent( Description, Manufacturer, downPayment, dailyRate);\n equipment.add(HardwareToRent);\n \n JOptionPane.showMessageDialog(frame, \"Successfully added GeneratorToRent\",\"Information\", JOptionPane.INFORMATION_MESSAGE);\n }\n catch(NumberFormatException aE)\n {\n JOptionPane.showMessageDialog(frame, aE.getMessage(), \"Error\", JOptionPane.ERROR_MESSAGE);\n }\n }",
"public OperatingSystem(Machine machine) throws MemoryFault, Exception {\n //List<Program> program = new LinkedList<>();\n this.machine = machine;\n\n for (int i = 0; i < waitQ.length; i++) {\n waitQ[i] = new LinkedList<>();\n }\n\n //Process_Table = new PCB[10]; \n ProgramBuilder wait = new ProgramBuilder();\n wait.size(2);\n wait.jmp(0);\n Program waiter = wait.build();\n program.add(waiter);\n\n freespace.add(new freeSpace(0, this.machine.MEMORY_SIZE));\n System.out.println(\"[Debug] Initial freeSpace size: \" + freespace.get(0).size);\n schedule(program);\n }",
"private void setupCreateOffering() {\n\t\tmakeButton(\"Create Course Offering\", (ActionEvent e) -> {\n\t\t\ttry {\n\t\t\t\tint row = table.getSelectedRow();\n\n\t\t\t\tif (row < 0) {\n\t\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Please select a course\", \"Error\",\n\t\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\tString[] inputs = getInputs(new String[] { \"Section Number:\", \"Section Capacity:\" });\n\n\t\t\t\tif (inputs == null)\n\t\t\t\t\treturn;\n\n\t\t\t\tint courseId = adCon.getCourseIdFromRow(row);\n\t\t\t\tint num = Integer.parseInt(inputs[0]);\n\t\t\t\tint cap = Integer.parseInt(inputs[1]);\n\t\t\t\tadCon.addOffering(courseId, num, cap);\n\t\t\t\tupdateTextArea(adCon.searchCourseById(courseId));\n\n\t\t\t} catch (NumberFormatException ex) {\n\t\t\t\tJOptionPane.showMessageDialog(getRootPane(), \"Course number must be a number\", \"Error\",\n\t\t\t\t\t\tJOptionPane.OK_OPTION);\n\t\t\t}\n\t\t});\n\t}",
"public static VendingMachine create(VendingMachineType type)\n {\n VendingMachine machine = null;\n\n if (type == VendingMachineType.STANDARD) {\n machine = new StandardVendingMachine();\n }\n\n return machine;\n }",
"private void createTopology() {\n deviceService = createMock(DeviceService.class);\n linkService = createMock(LinkService.class);\n\n deviceService.addListener(anyObject(DeviceListener.class));\n linkService.addListener(anyObject(LinkListener.class));\n\n createDevices(NUM_DEVICES, NUM_PORTS_PER_DEVICE);\n createLinks(NUM_DEVICES);\n addIntfConfig();\n popluateEdgePortService();\n }",
"public void createItem()\n {\n \n necklace_red = new Item (\"Red Necklace\",\"This is a strange red necklace\");\n poolroom.addItem(necklace_red);\n \n // items in dancing room // \n gramophone = new Item (\"Gramophone\",\"This is a nice gramophone but without disk\");\n candelar = new Item(\"Candelar\",\"This candelar gives light and is really beautiful\");\n dancingroom.addItem(gramophone);\n dancingroom.addItem(candelar);\n \n //items in hall //\n potion2HP = new Potion(\"Potion 2 HP\",\"This potion gives 2 HP to the player\",2);\n hall.addItem(potion2HP);\n \n //items in corridor //\n halberd = new Weapon(\"Halberd\",\"This the statut halberd. It was not a really good idea to take it\",4,60);\n corridor.addItem(halberd);\n \n // items in bathroom //\n potion6HP = new Potion(\"Potion6HP\",\"This potions gives 6 HP to the player\",6);\n bathroom.addItem(potion6HP);\n \n // items in guestbedroom //\n Exit exit_from_corridor_to_bedroom = new Exit(\"south\",corridor,false, null);\n bedroomkey = new Keys(\"Bedroom key\",\"This key opens the master bedroom door\",exit_from_corridor_to_bedroom);\n guestbedroom.addItem(bedroomkey);\n \n // items in kitchen // \n set_of_forks_and_knives = new Weapon(\"Set of forks and knives\",\"This weapon is a set of silver forks and silver knives\",2,40);\n kitchen.addItem(set_of_forks_and_knives);\n \n // items in bedroom //\n Item disk = new Item(\"Disk\",\"This disk can be used with the gramophone\");\n bedroom.addItem(disk);\n \n Potion potion3HP = new Potion (\"Potion3HP\",\"This potions gives 3 HP to the player\",3);\n bedroom.addItem(potion3HP);\n \n Item money = new Item(\"Money\",\"You find 60 pounds\");\n bedroom.addItem(money);\n \n // items in the library //\n Item book = new Item(\"Book\",\"The title book is 'The best human friend : the cat'\");\n library.addItem(book);\n \n // items in laboratory //\n Exit exit_from_corridor_to_attic = new Exit(\"up\",corridor,false, null);\n Keys attickey = new Keys(\"Attic key\",\"This key is a shaped bone from a squeletor\", exit_from_corridor_to_attic); \n laboratory.addItem(attickey);\n \n Item construction_drawing = new Item(\"Construction drawing\",\"You find construction drawings. Mr Taylor planed to dig really deeply to the east of the gardener hut\");\n laboratory.addItem(construction_drawing);\n \n //items in garden //\n Weapon fork = new Weapon(\"Fork\",\"This fork is green and brown\",3,50);\n garden.addItem(fork);\n \n Potion apple = new Potion(\"Apple\",\"This apples gives you 2 HP\",2);\n garden.addItem(apple);\n \n // items in gardenerhut //\n \n Item pliers = new Item(\"Pliers\",\"You can cut a chain with this object\");\n gardenerhut.addItem(pliers);\n \n Item ritual_cape = new Item(\"Ritual cape\",\"You find a black ritual cape. It is very strange !\");\n gardenerhut.addItem(ritual_cape);\n \n Item necklace_black_1 = new Item(\"Necklace\",\"You find a very strange necklace ! It is a black rond necklace with the same symbol than in the ritual cape\");\n gardenerhut.addItem(necklace_black_1);\n \n //items in anteroom //\n \n Potion potion4HP = new Potion(\"Potion4HP\",\"This potion gives 4 HP to the player\",4);\n anteroom.addItem(potion4HP);\n \n Weapon sword = new Weapon(\"Sword\",\"A really sharp sword\",6,70);\n anteroom.addItem(sword);\n // items in ritual room //\n \n Item red_ritual_cape = new Item(\"Red ritual cape\", \"This is a ritual cape such as in the gardener hut but this one is red. There are some blond curly hairs\");\n ritualroom.addItem(red_ritual_cape);\n \n Item black_ritual_cape_1 = new Item(\"Black ritual cape\",\"This is a black ritual cape\");\n ritualroom.addItem(black_ritual_cape_1);\n \n Item black_ritual_cape_2 = new Item (\"Black ritual cape\",\"Another black ritual cape\");\n ritualroom.addItem(black_ritual_cape_2);\n \n }",
"private static Datacenter createDatacenter(String name) {\n List<Host> hostList = new ArrayList<Host>();\r\n\r\n // 2. A Machine contains one or more PEs or CPUs/Cores.\r\n // In this example, it will have only one core.\r\n List<Pe> peList = new ArrayList<Pe>();\r\n\r\n\r\n // 3. Create PEs and add these into a list.\r\n peList.add(new Pe(0, new PeProvisionerSimple(mips+100))); // need to store Pe id and MIPS Rating\r\n\r\n // 4. Create Host with its id and list of PEs and add them to the list\r\n // of machines\r\n long storage = 1000000; // host storage\r\n\r\n\r\n for (int hostId = 0; hostId < vmNum; hostId++) {\r\n hostList.add(\r\n new Host(\r\n hostId,\r\n new RamProvisionerSimple((int)((ram*1.1)/Constants.MB)),\r\n new BwProvisionerSimple(bw+10),\r\n storage,\r\n peList,\r\n new VmSchedulerTimeShared(peList)\r\n )\r\n ); // This is our machine\r\n }\r\n\r\n\r\n // 5. Create a DatacenterCharacteristics object that stores the\r\n // properties of a data center: architecture, OS, list of\r\n // Machines, allocation policy: time- or space-shared, time zone\r\n // and its price (G$/Pe time unit).\r\n String arch = \"x86\"; // system architecture\r\n String os = \"Linux\"; // operating system\r\n String vmm = \"Xen\";\r\n double time_zone = 10.0; // time zone this resource located\r\n double cost = 3.0; // the cost of using processing in this resource\r\n double costPerMem = 0.05; // the cost of using memory in this resource\r\n double costPerStorage = 0.001; // the cost of using storage in this\r\n // resource\r\n double costPerBw = 0.0; // the cost of using bw in this resource\r\n LinkedList<Storage> storageList = new LinkedList<Storage>(); // we are not adding SAN\r\n // devices by now\r\n\r\n DatacenterCharacteristics characteristics = new DatacenterCharacteristics(\r\n arch, os, vmm, hostList, time_zone, cost, costPerMem,\r\n costPerStorage, costPerBw);\r\n\r\n // 6. Finally, we need to create a PowerDatacenter object.\r\n Datacenter datacenter = null;\r\n try {\r\n datacenter = new Datacenter(name, characteristics, new VmAllocationPolicySimple(hostList), storageList, 0);\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n\r\n return datacenter;\r\n }",
"public de.uni_koblenz.jgralabtest.schemas.gretl.pddsl.Chassis createChassis();",
"public void createRevenueGraph()\n\t{\n\t\tASPManager mgr = getASPManager();\n\n\t\tint woGraphPoints;\n\t\tString costTyptemp;\n\t\tString costGraph_Ext;\n\t\tdouble woRevenueTemp; \n\t\tdouble strRevenueTemp;\n\t\tString sGraphTitle;\n\t\tString sLeftTitle; \n\n\t\tint noOfRows = itemset0.countRows(); \n\t\trevGraphInNewWind = false;\n\t\tint wono = sWorkOrderNoTree;\n\n\t\tString[] woCostType = new String[noOfRows]; \n\t\tdouble[] woRevenue = new double[noOfRows];\n\t\tdouble[] structureRevenue = new double[noOfRows];\n\n\t\titemset0.first();\n\n\t\tfor (int i = 0; i < noOfRows; i++)\n\t\t{\n\t\t\twoRevenue[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDREVENUESINGLE\");\n\t\t\twoCostType[i] = itemset0.getRow().getValue(\"SWOCOSTTYPE\");\n\t\t\tstructureRevenue[i] = itemset0.getRow().getNumberValue(\"NACCUMULATEDREVENUE\");\n\n\t\t\titemset0.forward(1);\n\t\t}\n\n\t\twoGraphPoints = 6;\n\n\t\tfor (int i = 0; i < noOfRows; i++)\n\t\t{\n\t\t\tif (woRevenue[i]>0 || structureRevenue[i]>0)\n\t\t\t\tgraphflagWo = 1;\n\t\t}\n\n\t\tsGraphTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMWOREVTITLE: Work Order Revenue\");\n\t\tsLeftTitle = mgr.translate(\"PCMWWORKORDERCOSTTABLESMAMOUNTTR: Amount\");\n\n\t\trevGraphInNewWind = true;\n\n\t\tdrawGraphPic(wono,sGraphTitle,sLeftTitle,noOfRows,woCostType,woRevenue,structureRevenue); \n\t}",
"public Arrangement() {\n\t}",
"private void setUpGame(){\n DotCom one = new DotCom();\n one.setName(\"Ship 1\");\n DotCom two = new DotCom();\n two.setName(\"Ship 2\");\n DotCom three = new DotCom();\n three.setName(\"Ship 3\");\n dotComsList.add(one);\n dotComsList.add(two);\n dotComsList.add(three);\n\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"Your goal is to sink three battleships.\");\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"Ships are Ship 1,Ship 2 and Ship 3\");;\n String structure=\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| A0 | A1 | A2 | A3 | A4 | A5 | A6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| B0 | B1 | B2 | B3 | B4 | B5 | B6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| C0 | C1 | C2 | C3 | C4 | C5 | C6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| D0 | D1 | D2 | D3 | D4 | D5 | D6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| E0 | E1 | E2 | E3 | E4 | E5 | E6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| F0 | F1 | F2 | F3 | F4 | F5 | F6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\"+\n \"| G0 | G1 | G2 | G3 | G4 | G5 | G6 |\\n\"+\n \"+====+====+====+====+====+====+====+\\n\";\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"The cell structure is\\n\"+structure);\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"The ships are of dimensions 3x1 arranged horizontally or vertically\");\n GameHelper.prettyPrint(ConsoleColors.CYAN, \"Start sinking them! To battle! To victory! UUURRRRRAAAAAA!\");\n\n for ( DotCom dotcomToSet: dotComsList){\n ArrayList<String> newLocation = helper.placeDotCom(3);\n dotcomToSet.setLocationCells(newLocation);\n }\n }",
"public Inventory(String kodeWh,String kodeProd,double hargaProd,int jumlahProd){\n this.kodeWh=kodeWh;\n this.kodeProd=kodeProd;\n this.hargaProd=hargaProd;\n this.jumlahProd=jumlahProd;\n }",
"public static void main(String[] args) {\n Addition onion = new Addition(\"Onion\", 1.5);\n Addition potato = new Addition(\"Potato\", 1.5);\n Addition lettuce = new Addition(\"Lettuce\", 0.5);\n Addition ketchup = new Addition(\"Ketchup\", 0.5);\n Addition chips = new Addition(\"Ketchup\", 1.5);\n Addition drink = new Addition(\"Ketchup\", 1.5);\n\n System.out.println(\"---------------Basic------------------\");\n Basic basic = new Basic(\"Basic\", \"Sesame\", \"Beaf\", 12.00,\n onion, potato, lettuce);\n System.out.println(basic.getName() + \" with \" + basic.getBreadRoll() + \" - Total \" + basic.getTotalPrice() + \"\\n\" +\n \" Base Price \" + basic.getBasePrice() + \"$\\n\" + basic.getAdditions() + \"Additions Total \" +\n basic.getAdditionsPrice());\n\n System.out.println(\"---------------Deluxe------------------\");\n Deluxe deluxe = new Deluxe(\"Deluxe\", \"Sumac\", \"Fish\", 8.5);\n System.out.println(deluxe.getName() + \" with \" + deluxe.getBreadRoll() + \"- Total \" + deluxe.getTotalPrice() + \"\\n\" +\n \" Base Price \" + deluxe.getBasePrice() + \"$\\n\" + deluxe.getAdditions()+ \"Additions Total \" +\n deluxe.getAdditionsPrice());\n\n System.out.println(\"---------------Healthy------------------\");\n Healthy healthy = new Healthy(\"Healthy\", \"Chicken\", 10.0, lettuce, onion);\n System.out.println(healthy.getName() + \" with \" + healthy.getBreadRoll() + \"- Total \" + healthy.getTotalPrice() + \"\\n\" +\n \" Base Price \" + healthy.getBasePrice() + \"$\\n\" + healthy.getAdditions()+ \"Additions Total \" +\n healthy.getAdditionsPrice());\n }",
"private static ManagementGraph constructTestManagementGraph() {\n\n\t\t/**\n\t\t * This is the structure of the constructed test graph. The graph\n\t\t * contains two stages and all three channel types.\n\t\t * 4\n\t\t * | In-memory\n\t\t * 3\n\t\t * --/ \\-- Network (was FILE)\n\t\t * 2 2\n\t\t * \\ / Network\n\t\t * 1\n\t\t */\n\n\t\t// Graph\n\t\tfinal ManagementGraph graph = new ManagementGraph(new JobID());\n\n\t\t// Stages\n\t\tfinal ManagementStage lowerStage = new ManagementStage(graph, 0);\n\t\tfinal ManagementStage upperStage = new ManagementStage(graph, 1);\n\n\t\t// Group vertices\n\t\tfinal ManagementGroupVertex groupVertex1 = new ManagementGroupVertex(lowerStage, \"Group Vertex 1\");\n\t\tfinal ManagementGroupVertex groupVertex2 = new ManagementGroupVertex(lowerStage, \"Group Vertex 2\");\n\t\tfinal ManagementGroupVertex groupVertex3 = new ManagementGroupVertex(upperStage, \"Group Vertex 3\");\n\t\tfinal ManagementGroupVertex groupVertex4 = new ManagementGroupVertex(upperStage, \"Group Vertex 4\");\n\n\t\t// Vertices\n\t\tfinal ManagementVertex vertex1_1 = new ManagementVertex(groupVertex1, new ManagementVertexID(), \"Host 1\",\n\t\t\t\"small\", 0);\n\t\tfinal ManagementVertex vertex2_1 = new ManagementVertex(groupVertex2, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\t\tfinal ManagementVertex vertex2_2 = new ManagementVertex(groupVertex2, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 1);\n\t\tfinal ManagementVertex vertex3_1 = new ManagementVertex(groupVertex3, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\t\tfinal ManagementVertex vertex4_1 = new ManagementVertex(groupVertex4, new ManagementVertexID(), \"Host 2\",\n\t\t\t\"medium\", 0);\n\n\t\t// Input/output gates\n\t\tfinal ManagementGate outputGate1_1 = new ManagementGate(vertex1_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate2_1 = new ManagementGate(vertex2_1, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate2_1 = new ManagementGate(vertex2_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate2_2 = new ManagementGate(vertex2_2, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate2_2 = new ManagementGate(vertex2_2, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate3_1 = new ManagementGate(vertex3_1, new ManagementGateID(), 0, true);\n\t\tfinal ManagementGate outputGate3_1 = new ManagementGate(vertex3_1, new ManagementGateID(), 0, false);\n\n\t\tfinal ManagementGate inputGate4_1 = new ManagementGate(vertex4_1, new ManagementGateID(), 0, true);\n\n\t\t// Group Edges\n\t\tnew ManagementGroupEdge(groupVertex1, 0, groupVertex2, 0, ChannelType.NETWORK);\n\t\tnew ManagementGroupEdge(groupVertex2, 0, groupVertex3, 0, ChannelType.NETWORK);\n\t\tnew ManagementGroupEdge(groupVertex3, 0, groupVertex4, 0, ChannelType.IN_MEMORY);\n\n\t\t// Edges\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate1_1, 0, inputGate2_1, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate1_1, 1, inputGate2_2, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate2_1, 0, inputGate3_1, 0,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate2_2, 0, inputGate3_1, 1,\n\t\t\tChannelType.NETWORK);\n\t\tnew ManagementEdge(new ManagementEdgeID(), new ManagementEdgeID(), outputGate3_1, 0, inputGate4_1, 0,\n\t\t\tChannelType.IN_MEMORY);\n\n\t\treturn graph;\n\t}",
"public static Product generateProduct()\n {\n Random r = new Random();\n Product p = new Product();\n String [] itemName = {\"Cool Hat\" , \"Cool Watch\" , \"Cool Necklace\", \"Black Lipstick\" , \"Red LipStick\" ,\n \"Black Eyeliner\" , \"Blue Shirt\" , \"Blue Jeans\" , \"Black Dress\" , \"Red Bag\" ,\n \"White Bag\" , \"Yellow Bag\" , \"Cool Flip Flops\", \"Cool Shoes\" , \"Cool Heels\" ,\n \"Cool Blender\" , \"Cool Mixer\" , \"Cool Juicer\" };\n p.productID = 1 + r.nextInt(6);\n\n if( p.productID == 1){\n p.productName = itemName[r.nextInt(3)];\n p.productType = (\"Accessory\");\n p.productSize = 1;\n }\n if( p.productID == 2) {\n p.productName = itemName[3 + r.nextInt(3)];\n p.productType = (\"Beauty\");\n p.productSize = 2;\n }\n if( p.productID == 3) {\n p.productName = itemName[6 + r.nextInt(3)];\n p.productType = (\"Clothes\");\n p.productSize = 2;\n }\n if( p.productID == 4){\n p.productName = itemName[9 + r.nextInt(3)];\n p.productType = (\"Bags\");\n p.productSize = 3;\n }\n if( p.productID == 5){\n p.productName = itemName[12 + r.nextInt(3)];\n p.productType = (\"Shoes\");\n p.productSize = 3;\n }\n if( p.productID == 6) {\n p.productName = itemName[15 + r.nextInt(3)];\n p.productType = (\"Housewares\");\n p.productSize = 5;\n }\n\n p.productSku = 1000000 + r.nextInt(9999999);\n\n\n\n\n return p;\n }",
"private void makeDisplay() {\n\n\t\t// setLayout to be a BoxLayout\n\t\tsetLayout(new BoxLayout(this, BoxLayout.Y_AXIS));\n\t\t// call these methods ???? to be defined later\n\n\t\taddOscServerAddressPanel();\n\t\taddGlobalControlPanel();\n\t\taddFirstSynthPanel();\n\t\taddSecondSynthPanel();\n\t\taddThirdSynthPanel();\n\t}",
"Product()\r\n\t{\r\n\t\tSystem.out.println(\"\");\r\n\t}",
"public VendingMachine(List<Item> items) {\r\n updateInventory(items);\r\n moneyLog = new Money();\r\n }",
"public BasicComputer(double clockRate, double memory, int storage, int power) {\r\n this.make = \"N/A\";\r\n this.model = \"N/A\";\r\n this.setClockRate(clockRate);\r\n this.setMemory(memory);\r\n this.setMemory(storage);\r\n this.setPower(power);\r\n }",
"public static void main(String[] args)\n {\n double width = 63, height = 30;\n int floorNumber = 8;\n double unitPrice = 6867.38;\n BuildingDesign design = new HouseDesign(width, height, floorNumber);\n System.out\n .println(\"宽\" + width + \"米,高\" + height + \"米,层数为\" + floorNumber);\n\n ArchitectureCost cost = new BuildingCost(design, unitPrice);\n double price = cost.giveCost();\n System.out.printf(\"每平米造价:\" + unitPrice + \"元的商业楼的建设成本:%.2f元\\n\", price);\n \n \n width = 52;\n height = 28;\n floorNumber = 6;\n unitPrice = 2687.88;\n design = new HouseDesign(width, height, floorNumber);\n System.out\n .println(\"宽\" + width + \"米,高\" + height + \"米,层数为\" + floorNumber);\n cost = new BuildingCost(design, unitPrice);\n price = cost.giveCost();\n System.out.printf(\"每平米造价:\" + unitPrice + \"元的住宅楼的建设成本:%.2f元\\n\", price);\n\n\n }",
"public Stage() {\n\n for (int i = 0; i < 20; i++) { // Generate the basic grid array\n ArrayList<Cell> cellList = new ArrayList<Cell>();\n cells.add(cellList);\n for (int j = 0; j < 20; j++) {\n cells.get(i).add(new Cell(10 + 35 * i, 10 + 35 * j));\n }\n }\n\n for (int i = 0; i < cells.size(); i++) { // Generate the list of environment blocks\n ArrayList<Environment> envList = new ArrayList<Environment>();\n environment.add(envList);\n for (int j = 0; j < cells.size(); j++) {\n int cellGenerator = (int) (Math.random() * 100) + 1;\n environment.get(i).add(generateCell(cellGenerator, cells.get(i).get(j)));\n }\n }\n\n grid = new Grid(cells, environment); // Initialise the grid with the generated cells array\n }",
"public Warehouse(int x, int y, int ID, int edges, int numTrucks, int capacity, int radius){\r\n super(x,y,ID, edges); //call vertex constructor\r\n this.radius = radius;\r\n allShops = new ArrayList<CoffeeShop>();\r\n trucks = new ArrayList<Truck>();\r\n addTrucks(numTrucks, capacity, radius); //add in all the trucks with the designated capacity into an array\r\n }",
"public static GraphNode createGraphNodeForSubsystem() {\n GraphNode nameNode = new GraphNode();\n\n for (int i = 0; i < 3; i++) {\n GraphNode childNode = new GraphNode();\n\n childNode.setPosition(AccuracyTestHelper.createPoint(0, 12 * i));\n childNode.setSize(AccuracyTestHelper.createDimension(100, 22));\n\n nameNode.addContained(childNode);\n }\n\n nameNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n nameNode.setSize(AccuracyTestHelper.createDimension(100, 100));\n\n GraphNode graphNode = new GraphNode();\n graphNode.addContained(nameNode);\n graphNode.addContained(new GraphNode());\n\n graphNode.setPosition(AccuracyTestHelper.createPoint(20, 20));\n graphNode.setSize(AccuracyTestHelper.createDimension(1000, 1000));\n\n // create a subsystem\n Subsystem subsystem = new SubsystemImpl();\n\n // set namespace\n Namespace namespace = new MockNamespaceImplAcucracy();\n subsystem.setNamespace(namespace);\n\n // create a semantic model\n Uml1SemanticModelBridge semanticModel = new Uml1SemanticModelBridge();\n semanticModel.setElement(subsystem);\n\n graphNode.setSemanticModel(semanticModel);\n\n return graphNode;\n }",
"public void create(List<Product> products) {\n this.products = products;\n deliveryDate = LocalDate.now().plusDays(2);\n warehouse = factory.getWarehouse(\"DHL\");\n\n stock.decrease(products);\n }",
"public void initBaseProductionSpace(){\n this.baseProductionPanel = new BaseProductionPanel(gui);\n\n this.add(baseProductionPanel);\n }",
"public void createComponents()\n {\n VBox col = new VBox(SPACING);\n\n Label lblStatus = new Label(\"Machine Status\");\n lblStatus.getStyleClass().add(\"bordered-titled-title\");\n\n lblCurrFile = new Label(\"No File Currently Loaded\");\n lblConnection = new Label(\"Not Connected\");\n\n btnConnect = new Button(\"Connect to Machine\");\n btnConnect.setOnAction(new ConnectEventHandler());\n //btnConnect.getStyleClass().add(\"glass-grey\");\n\n ivConnection = new ImageView(\n new Image(getClass().getResourceAsStream(\"/Resources/Not Connected.png\")));\n\n lblMachineStatus = new Label(\"Status: Good\");\n HBox r1 = new HBox(SPACING);\n r1.getChildren().addAll(lblConnection, ivConnection);\n\n col.getChildren().addAll(btnConnect, r1, lblCurrFile, lblMachineStatus);\n getChildren().addAll(lblStatus, col);\n\n }",
"private void initialize() {\n\t\tScanner sc = new Scanner(System.in);\n\t\tSystem.out.print(\"Enter number of items : \");\n\t\tn = sc.nextInt(); // number of items\n\t\tSystem.out.print(\"Enter W of knapsack : \");\n\t\tW = sc.nextInt(); // capacity of knapsack\n\t\tw = new int[n];\n\t\tv = new int[n];\n\t\tSystem.out.println(\"Enter ws and vs of items : \");\n\t\tfor (int i = 0; i < n; i++) {\n\t\t\tw[i] = sc.nextInt(); // weight of item\n\t\t\tv[i] = sc.nextInt(); // profit of item\n\t\t}\n\t\tV = new int[n + 1][W + 1]; // initializing the table to hold results\n\t\tfor (int i = 0; i <= W; i++)\n\t\t\tV[0][i] = 0;\n\t}",
"public static ConcurrentLinkedQueue<Product> start() throws InterruptedException {\n warehouse = new Warehouse();\n\n FactoryPlan data = null;\n String JSON_PATH = filePath;\n Gson gson = new Gson();\n Type ReviewType = new TypeToken<FactoryPlan>() {\n }.getType();\n try (JsonReader reader = new JsonReader(new FileReader(JSON_PATH))) {\n data = gson.fromJson(reader, ReviewType);\n } catch (FileNotFoundException e) {\n System.out.println(\"File not found\");\n System.exit(1);\n } catch (Exception e) {\n System.out.println(\"Can't format json object\");\n System.exit(2);\n }\n\n int numOfThreads = data.getThreads();\n getDataFromFactoryPlan(data);\n\n if (WSP == null)\n attachWorkStealingThreadPool(new WorkStealingThreadPool(numOfThreads));\n\n ConcurrentLinkedQueue<Manufacture> completedTasks = new ConcurrentLinkedQueue<>();\n List<List<Series>> waves = data.getWaves();\n\n WSP.start();\n\n for (List<Series> wave : waves) {\n int numOfProducts = 0;\n for (Series series : wave) {\n numOfProducts += series.getQty();\n }\n CountDownLatch l = new CountDownLatch(numOfProducts);\n\n for (Series series : wave) {\n long startId = series.getStartId();\n String seriesName = series.getProduct();\n for (int i = 0; i <= series.getQty() - 1; i++) {\n Manufacture task = new Manufacture(new Product(startId + i, seriesName), warehouse);\n completedTasks.add(task);\n WSP.submit(task);\n task.getResult().whenResolved(() -> {\n l.countDown();\n });\n }\n }\n l.await();\n }\n\n WSP.shutdown();\n\n ConcurrentLinkedQueue<Product> simulationResult = new ConcurrentLinkedQueue<>();\n for (Manufacture task : completedTasks) {\n simulationResult.add(task.getResult().get());\n }\n\n return simulationResult;\n }",
"private void addInventoryInformation() {\r\n \tString[] toolTypeFieldItems = {\"Electrical\", \"Non-Electrical\"};\r\n \t\r\n \taddButton = new JButton (\"Add\");\r\n deleteButton = new JButton (\"Delete\");\r\n clearButton = new JButton (\"Clear\");\r\n decreaseButton = new JButton (\"Buy\");\r\n toolIdText = new JTextField (5);\r\n toolNameText = new JTextField (5);\r\n stockText = new JTextField (5);\r\n priceText = new JTextField (5);\r\n supplierText = new JTextField (5);\r\n toolTypeField = new JComboBox<String> (toolTypeFieldItems); \r\n powerText = new JTextField (5);\r\n\r\n add (addButton);\r\n add (deleteButton);\r\n add (clearButton);\r\n add (decreaseButton);\r\n add (toolIdText);\r\n add (toolNameText);\r\n add (stockText);\r\n add (priceText);\r\n add (supplierText);\r\n add (toolTypeField);\r\n add (powerText);\r\n \r\n addButton.setBounds (585, 590, 100, 25);\r\n deleteButton.setBounds (715, 590, 100, 25);\r\n clearButton.setBounds (650, 630, 100, 25);\r\n decreaseButton.setBounds (650, 670, 100, 25);\r\n toolIdText.setBounds (690, 290, 100, 25);\r\n toolNameText.setBounds (690, 330, 100, 25);\r\n stockText.setBounds (690, 410, 100, 25);\r\n priceText.setBounds (690, 450, 100, 25);\r\n supplierText.setBounds (690, 490, 100, 25);\r\n toolTypeField.setBounds (690, 370, 100, 25);\r\n powerText.setBounds (690, 530, 100, 25);\r\n }",
"public static void setUpGameComp() {\r\n for (int i = 0; i < fleet.length; i++) {\r\n int random = (int)(Math.random() * 10);\r\n \r\n if (random < 5) {\r\n placeShipHorzRand(gameBoardComp, fleet[i], symbols[i]);\r\n }\r\n else {\r\n placeShipVertRand(gameBoardComp, fleet[i], symbols[i]);\r\n }\r\n }\r\n \r\n System.out.print(\" Computer is finished!\");\r\n //displayBoard(gameBoardComp);\r\n \r\n }",
"public void createMainInventor() {\n String name = _plugin.getConfigManager().getGeneralSettingsMap().get(\"Name\");\r\n String colorizedName = _plugin.getUtilsManager().colorizeString(name);\r\n //Size of the Inventory;\r\n int inventorySize = Integer.valueOf(_plugin.getConfigManager().getGeneralSettingsMap().get(\"InventorySize\"));\r\n //Initialize Inventory;\r\n mainInventory = _plugin.getServer().createInventory(null, inventorySize, colorizedName);\r\n //Retrieve the HashMaps for the plugin;\r\n HashMap<Integer, CategoryItem> categoryInformationMap = _plugin.getConfigManager().getCategoryInformationMap();\r\n HashMap<String, String> languageInformation = _plugin.getConfigManager().getLanguageInformationMap();\r\n //Add items to Inventory;\r\n for (Integer i : categoryInformationMap.keySet()) {\r\n CategoryItem categoryItem = categoryInformationMap.get(i);\r\n ItemStack item = categoryItem.getItem();\r\n ItemMeta itemMeta = item.getItemMeta();\r\n itemMeta.setDisplayName(_plugin.getUtilsManager().colorizeString(languageInformation.get(\"CategoryName\").replace(\"%cat%\", categoryItem.getName())));\r\n List<String> lore = new ArrayList<>();\r\n lore.add(_plugin.getUtilsManager().colorizeString(categoryItem.getDescription()));\r\n item.setItemMeta(itemMeta);\r\n mainInventory.addItem(item);\r\n }\r\n }",
"public void createPackageContents()\r\n {\r\n if (isCreated) return;\r\n isCreated = true;\r\n\r\n // Create classes and their features\r\n productEClass = createEClass(PRODUCT);\r\n createEAttribute(productEClass, PRODUCT__PRICE);\r\n createEAttribute(productEClass, PRODUCT__NAME);\r\n createEAttribute(productEClass, PRODUCT__ID);\r\n createEReference(productEClass, PRODUCT__PRODUCER);\r\n createEReference(productEClass, PRODUCT__WISHLISTS);\r\n createEReference(productEClass, PRODUCT__OFFERED_BY);\r\n\r\n customerEClass = createEClass(CUSTOMER);\r\n createEReference(customerEClass, CUSTOMER__ALL_BOUGHT_PRODUCTS);\r\n createEAttribute(customerEClass, CUSTOMER__NAME);\r\n createEAttribute(customerEClass, CUSTOMER__AGE);\r\n createEAttribute(customerEClass, CUSTOMER__ID);\r\n createEReference(customerEClass, CUSTOMER__WISHLISTS);\r\n createEAttribute(customerEClass, CUSTOMER__USERNAME);\r\n\r\n producerEClass = createEClass(PRODUCER);\r\n createEAttribute(producerEClass, PRODUCER__ID);\r\n createEAttribute(producerEClass, PRODUCER__NAME);\r\n createEReference(producerEClass, PRODUCER__PRODUCTS);\r\n\r\n storeEClass = createEClass(STORE);\r\n createEReference(storeEClass, STORE__CUSTOMERS);\r\n createEReference(storeEClass, STORE__PRODUCTS);\r\n createEReference(storeEClass, STORE__PRODUCERS);\r\n createEReference(storeEClass, STORE__SELLERS);\r\n\r\n bookEClass = createEClass(BOOK);\r\n createEAttribute(bookEClass, BOOK__AUTHOR);\r\n\r\n dvdEClass = createEClass(DVD);\r\n createEAttribute(dvdEClass, DVD__INTERPRET);\r\n\r\n wishlistEClass = createEClass(WISHLIST);\r\n createEReference(wishlistEClass, WISHLIST__PRODUCTS);\r\n\r\n sellerEClass = createEClass(SELLER);\r\n createEAttribute(sellerEClass, SELLER__NAME);\r\n createEAttribute(sellerEClass, SELLER__ID);\r\n createEAttribute(sellerEClass, SELLER__USERNAME);\r\n createEReference(sellerEClass, SELLER__ALL_PRODUCTS_TO_SELL);\r\n createEReference(sellerEClass, SELLER__EREFERENCE0);\r\n createEReference(sellerEClass, SELLER__SOLD_PRODUCTS);\r\n }",
"laptop(){\r\n length= 0 ;\r\n weight = 0;\r\n height = 0;\r\n width = 0;\r\n }",
"public static void createPlanets() {\n\t\tplanets = new PlanetV4[planetNames.length];\n\t\tfor (int i = 0; i < planetNames.length; i ++) {\n\t\t\tplanets[i] = new PlanetV4(planetNames[i], planetMasses[i], planetDiameters[i], planetPositions[i], planetVelocities[i], planetCircles[i]);\n\t\t\t//mainFrame.add(planets[i]);\n\t\t}\n\t}",
"public static void main (String [] args)\n {\n DecimalFormat mine = new DecimalFormat(\"$#,##0.00\");\n String name = \"\" ;\n String product = \" \";\n char choice = ' ';\n char prod;\n int qty = 0;\n int count = 0;\n double cost_of_product=0.0;\n double cost_of_shipment = 0.0;\n char deliveryType;\n double total_cost_of_product = 0.0;\n int total_Gizmo = 0;\n int total_Widget = 0;\n double total_Cost = 0;\n double total_Gizmo_Cost = 0;\n double total_Widget_Cost = 0; // list of variables\n\n System.out.print(\"Please enter your name: \");\n name = GetInput.readLine(); //customer enters name\n\n do {\n System.out.print(\"What product would you like to order (W/G): \");\n product =GetInput.readLine();\n prod = Character.toUpperCase(product.charAt(0));\n prod = validateProduct(prod); //validate W or G\n if(prod == 'W')\n {\n System.out.print(\"What quantity of Widgets do you want to order?: \");\n qty = GetInput.readLineInt();\n qty = widgetQty(qty);\n\n }\n else\n {\n System.out.print(\"What quantity of Gizmos do you want to order?: \");\n qty = GetInput.readLineInt();\n qty = gizmoQty(qty);\n } //qty of widgets/gizmos\n\n cost_of_product = Orders.productCost(qty, prod); //connecting TestOrders and Orders\n\n System.out.print(\"What shipping method would you like (F/U)?: \");\n deliveryType = Character.toUpperCase(GetInput.readLineNonwhiteChar());\n deliveryType = validateShipping(deliveryType); //selecting F or U shipping\n\n cost_of_shipment = Orders.shippingCost(qty, prod, deliveryType);\n //connecting TestOrders and Orders\n\n System.out.println(\"\\nCustomer: \" + name );//Detail report\n System.out.println(\"Ordered \" + qty +\" \"\n +(prod == 'W' ? \"Widgets \":\"Gizmos \") + \"costing \" + mine.format(cost_of_product) + \".\");\n System.out.println(\"Shipped via \"+ (deliveryType =='F' ? \"Fred \":\"USPS \")\n + \"costing \" + mine.format(cost_of_shipment) + \".\");\n\n total_cost_of_product = Orders.totalCost(cost_of_product, cost_of_shipment);\n //connecting TestOrders and Orders\n\n System.out.println(\"Total order cost is \" + mine.format(total_cost_of_product));\n\n count = count + 1; // order counter\n\n if(prod =='G')\n {\n total_Gizmo = total_Gizmo + qty;\n total_Gizmo_Cost = total_Gizmo_Cost + total_cost_of_product;\n }\n else\n {\n total_Widget = total_Widget + qty;\n total_Widget_Cost = total_Widget_Cost + total_cost_of_product;\n }\n\n total_Cost = total_Cost + total_cost_of_product;\n\n System.out.println(\"\\nDo you wish to make another order?: \");\n choice = GetInput.readLineNonwhiteChar(); //user enters Y/N to continue\n }while ((choice == 'Y') || (choice == 'y')); // end of do/while loop\n\n System.out.println(\"\\nSummary Report\"); //summary report\n System.out.println(count + \" Total Orders\");\n System.out.print(\"Total quantity of Gizmos ordered: \" + total_Gizmo\n + \" at a cost of \" + mine.format(total_Gizmo_Cost) );\n System.out.print(\"\\nTotal quantity of Widgets ordered: \" + total_Widget\n + \" at a cost of \" + mine.format(total_Widget_Cost));\n System.out.println(\"\\nTotal sales amount: \" + mine.format(total_Cost));\n }",
"public Game() {\n Random rand = new Random();\n for (int i = 0; i < NB_ELEMENTS_PLATEAU; i++) {\n Case current_case;\n int entity = rand.nextInt(10);\n switch (entity) {\n case 0:\n current_case = new Dragon();\n break;\n case 1:\n current_case = new Gobelin();\n break;\n case 2:\n current_case = new Sorcier();\n break;\n case 3:\n current_case = new Eclair();\n break;\n case 4:\n current_case = new Epee();\n break;\n case 5:\n current_case = new GrandePotion();\n break;\n case 6:\n current_case = new Massue();\n break;\n case 7:\n current_case = new StandardPotion();\n break;\n case 8:\n current_case = new BouleDeFeu();\n break;\n default:\n current_case = null;\n }\n\n plateau.add(current_case);\n }\n\n System.out.println(\"\\u001B[35mPlateau géréné aléatoirement:\");\n for (int i = 0; i < NB_ELEMENTS_PLATEAU; i++) {\n System.out.println(\"| \" + (i + 1) + \" | \" + plateau.get(i) + \" |\");\n }\n }",
"public Product() { \n initComponents();\n table();\n \n }",
"public void fillGarage() {\n\t\n\t\tfor (int i = 0; i < 10; i++) { // 10 cars\n\t\t\taddVehicle(new Car(\"Silver\", \"Audi\", \"petrol\", 250, 4, 40000));\n\t\t}\n\t\tfor (int i = 0; i < 20; i++) { // 20 motorcycles\n\t\t\taddVehicle(new Motorcycle(\"Red\", \"Suzuki\", \"petrol\", 300, 2, 80000));\n\t\t}\n\t\tfor (int i = 0; i < 3; i++) { // 3 buses \n\t\t\taddVehicle(new Bus(\"White\", \"Volvo\", \"diesel\", 140, 4, 100000));\n\t\t}\n\t\t\n\t}",
"public GoodsSpecProduct() {\n this(DSL.name(\"b2c_goods_spec_product\"), null);\n }",
"public void createPackageContents() {\n\t\tif (isCreated) return;\n\t\tisCreated = true;\n\n\t\t// Create classes and their features\n\t\tblockArchitecturePkgEClass = createEClass(BLOCK_ARCHITECTURE_PKG);\n\n\t\tblockArchitectureEClass = createEClass(BLOCK_ARCHITECTURE);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_REQUIREMENT_PKGS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_ABSTRACT_CAPABILITY_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_INTERFACE_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__OWNED_DATA_PKG);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__PROVISIONED_ARCHITECTURE_ALLOCATIONS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__PROVISIONING_ARCHITECTURE_ALLOCATIONS);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__ALLOCATED_ARCHITECTURES);\n\t\tcreateEReference(blockArchitectureEClass, BLOCK_ARCHITECTURE__ALLOCATING_ARCHITECTURES);\n\n\t\tblockEClass = createEClass(BLOCK);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_ABSTRACT_CAPABILITY_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_INTERFACE_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_DATA_PKG);\n\t\tcreateEReference(blockEClass, BLOCK__OWNED_STATE_MACHINES);\n\n\t\tcomponentArchitectureEClass = createEClass(COMPONENT_ARCHITECTURE);\n\n\t\tcomponentEClass = createEClass(COMPONENT);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_INTERFACE_USES);\n\t\tcreateEReference(componentEClass, COMPONENT__USED_INTERFACE_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__USED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_INTERFACE_IMPLEMENTATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__IMPLEMENTED_INTERFACE_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__IMPLEMENTED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVISIONED_COMPONENT_ALLOCATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVISIONING_COMPONENT_ALLOCATIONS);\n\t\tcreateEReference(componentEClass, COMPONENT__ALLOCATED_COMPONENTS);\n\t\tcreateEReference(componentEClass, COMPONENT__ALLOCATING_COMPONENTS);\n\t\tcreateEReference(componentEClass, COMPONENT__PROVIDED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__REQUIRED_INTERFACES);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_COMPONENT_PORTS);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_PARTS);\n\t\tcreateEReference(componentEClass, COMPONENT__CONTAINED_PHYSICAL_PORTS);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_PATH);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_LINKS);\n\t\tcreateEReference(componentEClass, COMPONENT__OWNED_PHYSICAL_LINK_CATEGORIES);\n\n\t\tabstractActorEClass = createEClass(ABSTRACT_ACTOR);\n\n\t\tpartEClass = createEClass(PART);\n\t\tcreateEReference(partEClass, PART__PROVIDED_INTERFACES);\n\t\tcreateEReference(partEClass, PART__REQUIRED_INTERFACES);\n\t\tcreateEReference(partEClass, PART__OWNED_DEPLOYMENT_LINKS);\n\t\tcreateEReference(partEClass, PART__DEPLOYED_PARTS);\n\t\tcreateEReference(partEClass, PART__DEPLOYING_PARTS);\n\t\tcreateEReference(partEClass, PART__OWNED_ABSTRACT_TYPE);\n\t\tcreateEAttribute(partEClass, PART__VALUE);\n\t\tcreateEAttribute(partEClass, PART__MAX_VALUE);\n\t\tcreateEAttribute(partEClass, PART__MIN_VALUE);\n\t\tcreateEAttribute(partEClass, PART__CURRENT_MASS);\n\n\t\tarchitectureAllocationEClass = createEClass(ARCHITECTURE_ALLOCATION);\n\t\tcreateEReference(architectureAllocationEClass, ARCHITECTURE_ALLOCATION__ALLOCATED_ARCHITECTURE);\n\t\tcreateEReference(architectureAllocationEClass, ARCHITECTURE_ALLOCATION__ALLOCATING_ARCHITECTURE);\n\n\t\tcomponentAllocationEClass = createEClass(COMPONENT_ALLOCATION);\n\t\tcreateEReference(componentAllocationEClass, COMPONENT_ALLOCATION__ALLOCATED_COMPONENT);\n\t\tcreateEReference(componentAllocationEClass, COMPONENT_ALLOCATION__ALLOCATING_COMPONENT);\n\n\t\tsystemComponentEClass = createEClass(SYSTEM_COMPONENT);\n\t\tcreateEAttribute(systemComponentEClass, SYSTEM_COMPONENT__DATA_COMPONENT);\n\t\tcreateEReference(systemComponentEClass, SYSTEM_COMPONENT__DATA_TYPE);\n\t\tcreateEReference(systemComponentEClass, SYSTEM_COMPONENT__PARTICIPATIONS_IN_CAPABILITY_REALIZATIONS);\n\n\t\tinterfacePkgEClass = createEClass(INTERFACE_PKG);\n\t\tcreateEReference(interfacePkgEClass, INTERFACE_PKG__OWNED_INTERFACES);\n\t\tcreateEReference(interfacePkgEClass, INTERFACE_PKG__OWNED_INTERFACE_PKGS);\n\n\t\tinterfaceEClass = createEClass(INTERFACE);\n\t\tcreateEAttribute(interfaceEClass, INTERFACE__MECHANISM);\n\t\tcreateEAttribute(interfaceEClass, INTERFACE__STRUCTURAL);\n\t\tcreateEReference(interfaceEClass, INTERFACE__IMPLEMENTOR_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__USER_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__INTERFACE_IMPLEMENTATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__INTERFACE_USES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVISIONING_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__ALLOCATING_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__ALLOCATING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__EXCHANGE_ITEMS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__OWNED_EXCHANGE_ITEM_ALLOCATIONS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REQUIRING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REQUIRING_COMPONENT_PORTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVIDING_COMPONENTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__PROVIDING_COMPONENT_PORTS);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZING_LOGICAL_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZED_CONTEXT_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZING_PHYSICAL_INTERFACES);\n\t\tcreateEReference(interfaceEClass, INTERFACE__REALIZED_LOGICAL_INTERFACES);\n\n\t\tinterfaceImplementationEClass = createEClass(INTERFACE_IMPLEMENTATION);\n\t\tcreateEReference(interfaceImplementationEClass, INTERFACE_IMPLEMENTATION__INTERFACE_IMPLEMENTOR);\n\t\tcreateEReference(interfaceImplementationEClass, INTERFACE_IMPLEMENTATION__IMPLEMENTED_INTERFACE);\n\n\t\tinterfaceUseEClass = createEClass(INTERFACE_USE);\n\t\tcreateEReference(interfaceUseEClass, INTERFACE_USE__INTERFACE_USER);\n\t\tcreateEReference(interfaceUseEClass, INTERFACE_USE__USED_INTERFACE);\n\n\t\tprovidedInterfaceLinkEClass = createEClass(PROVIDED_INTERFACE_LINK);\n\t\tcreateEReference(providedInterfaceLinkEClass, PROVIDED_INTERFACE_LINK__INTERFACE);\n\n\t\trequiredInterfaceLinkEClass = createEClass(REQUIRED_INTERFACE_LINK);\n\t\tcreateEReference(requiredInterfaceLinkEClass, REQUIRED_INTERFACE_LINK__INTERFACE);\n\n\t\tinterfaceAllocationEClass = createEClass(INTERFACE_ALLOCATION);\n\t\tcreateEReference(interfaceAllocationEClass, INTERFACE_ALLOCATION__ALLOCATED_INTERFACE);\n\t\tcreateEReference(interfaceAllocationEClass, INTERFACE_ALLOCATION__ALLOCATING_INTERFACE_ALLOCATOR);\n\n\t\tinterfaceAllocatorEClass = createEClass(INTERFACE_ALLOCATOR);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__OWNED_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__PROVISIONED_INTERFACE_ALLOCATIONS);\n\t\tcreateEReference(interfaceAllocatorEClass, INTERFACE_ALLOCATOR__ALLOCATED_INTERFACES);\n\n\t\tactorCapabilityRealizationInvolvementEClass = createEClass(ACTOR_CAPABILITY_REALIZATION_INVOLVEMENT);\n\n\t\tsystemComponentCapabilityRealizationInvolvementEClass = createEClass(SYSTEM_COMPONENT_CAPABILITY_REALIZATION_INVOLVEMENT);\n\n\t\tcomponentContextEClass = createEClass(COMPONENT_CONTEXT);\n\n\t\texchangeItemAllocationEClass = createEClass(EXCHANGE_ITEM_ALLOCATION);\n\t\tcreateEAttribute(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__SEND_PROTOCOL);\n\t\tcreateEAttribute(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__RECEIVE_PROTOCOL);\n\t\tcreateEReference(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__ALLOCATED_ITEM);\n\t\tcreateEReference(exchangeItemAllocationEClass, EXCHANGE_ITEM_ALLOCATION__ALLOCATING_INTERFACE);\n\n\t\tdeployableElementEClass = createEClass(DEPLOYABLE_ELEMENT);\n\t\tcreateEReference(deployableElementEClass, DEPLOYABLE_ELEMENT__DEPLOYING_LINKS);\n\n\t\tdeploymentTargetEClass = createEClass(DEPLOYMENT_TARGET);\n\t\tcreateEReference(deploymentTargetEClass, DEPLOYMENT_TARGET__DEPLOYMENT_LINKS);\n\n\t\tabstractDeploymentLinkEClass = createEClass(ABSTRACT_DEPLOYMENT_LINK);\n\t\tcreateEReference(abstractDeploymentLinkEClass, ABSTRACT_DEPLOYMENT_LINK__DEPLOYED_ELEMENT);\n\t\tcreateEReference(abstractDeploymentLinkEClass, ABSTRACT_DEPLOYMENT_LINK__LOCATION);\n\n\t\tabstractPathInvolvedElementEClass = createEClass(ABSTRACT_PATH_INVOLVED_ELEMENT);\n\n\t\tabstractPhysicalArtifactEClass = createEClass(ABSTRACT_PHYSICAL_ARTIFACT);\n\t\tcreateEReference(abstractPhysicalArtifactEClass, ABSTRACT_PHYSICAL_ARTIFACT__ALLOCATOR_CONFIGURATION_ITEMS);\n\n\t\tabstractPhysicalLinkEndEClass = createEClass(ABSTRACT_PHYSICAL_LINK_END);\n\t\tcreateEReference(abstractPhysicalLinkEndEClass, ABSTRACT_PHYSICAL_LINK_END__INVOLVED_LINKS);\n\n\t\tabstractPhysicalPathLinkEClass = createEClass(ABSTRACT_PHYSICAL_PATH_LINK);\n\n\t\tphysicalLinkEClass = createEClass(PHYSICAL_LINK);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__LINK_ENDS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_COMPONENT_EXCHANGE_FUNCTIONAL_EXCHANGE_ALLOCATIONS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_PHYSICAL_LINK_ENDS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__OWNED_PHYSICAL_LINK_REALIZATIONS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__CATEGORIES);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__SOURCE_PHYSICAL_PORT);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__TARGET_PHYSICAL_PORT);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__REALIZED_PHYSICAL_LINKS);\n\t\tcreateEReference(physicalLinkEClass, PHYSICAL_LINK__REALIZING_PHYSICAL_LINKS);\n\n\t\tphysicalLinkCategoryEClass = createEClass(PHYSICAL_LINK_CATEGORY);\n\t\tcreateEReference(physicalLinkCategoryEClass, PHYSICAL_LINK_CATEGORY__LINKS);\n\n\t\tphysicalLinkEndEClass = createEClass(PHYSICAL_LINK_END);\n\t\tcreateEReference(physicalLinkEndEClass, PHYSICAL_LINK_END__PORT);\n\t\tcreateEReference(physicalLinkEndEClass, PHYSICAL_LINK_END__PART);\n\n\t\tphysicalLinkRealizationEClass = createEClass(PHYSICAL_LINK_REALIZATION);\n\n\t\tphysicalPathEClass = createEClass(PHYSICAL_PATH);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__INVOLVED_LINKS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__OWNED_PHYSICAL_PATH_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__FIRST_PHYSICAL_PATH_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__OWNED_PHYSICAL_PATH_REALIZATIONS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__REALIZED_PHYSICAL_PATHS);\n\t\tcreateEReference(physicalPathEClass, PHYSICAL_PATH__REALIZING_PHYSICAL_PATHS);\n\n\t\tphysicalPathInvolvementEClass = createEClass(PHYSICAL_PATH_INVOLVEMENT);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__NEXT_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__PREVIOUS_INVOLVEMENTS);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__INVOLVED_ELEMENT);\n\t\tcreateEReference(physicalPathInvolvementEClass, PHYSICAL_PATH_INVOLVEMENT__INVOLVED_COMPONENT);\n\n\t\tphysicalPathReferenceEClass = createEClass(PHYSICAL_PATH_REFERENCE);\n\t\tcreateEReference(physicalPathReferenceEClass, PHYSICAL_PATH_REFERENCE__REFERENCED_PHYSICAL_PATH);\n\n\t\tphysicalPathRealizationEClass = createEClass(PHYSICAL_PATH_REALIZATION);\n\n\t\tphysicalPortEClass = createEClass(PHYSICAL_PORT);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__OWNED_COMPONENT_PORT_ALLOCATIONS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__OWNED_PHYSICAL_PORT_REALIZATIONS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__ALLOCATED_COMPONENT_PORTS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__REALIZED_PHYSICAL_PORTS);\n\t\tcreateEReference(physicalPortEClass, PHYSICAL_PORT__REALIZING_PHYSICAL_PORTS);\n\n\t\tphysicalPortRealizationEClass = createEClass(PHYSICAL_PORT_REALIZATION);\n\t}",
"public static Network createLessSymmetricTestNetwork() {\n\t\t/*\n\t\t * (2)\t\t(5)------(8)\n\t\t * \t|\t\t |\n\t\t * \t|\t\t |\n\t\t * (1)------(4)------(7)\n\t\t * \t|\t\t |\n\t\t * \t|\t\t |\n\t\t * (3)\t\t(6)------(9)\n\t\t */\n\t\tdouble freespeed = 2.7;\n\t\tdouble capacity = 500.;\n\t\tdouble numLanes = 1.;\n\n\t\tMutableScenario scenario = (MutableScenario) ScenarioUtils.createScenario(ConfigUtils.createConfig());\n\n\t\tNetwork network = (Network) scenario.getNetwork();\n\n\t\t// Nodes\n\t\tNode node1 = NetworkUtils.createAndAddNode(network, Id.create(1, Node.class), new Coord((double) 10, (double) 100));\n\t\tNode node2 = NetworkUtils.createAndAddNode(network, Id.create(2, Node.class), new Coord((double) 10, (double) 190));\n\t\tNode node3 = NetworkUtils.createAndAddNode(network, Id.create(3, Node.class), new Coord((double) 10, (double) 10));\n\t\tNode node4 = NetworkUtils.createAndAddNode(network, Id.create(4, Node.class), new Coord((double) 120, (double) 100));\n\t\tNode node5 = NetworkUtils.createAndAddNode(network, Id.create(5, Node.class), new Coord((double) 120, (double) 190));\n\t\tNode node6 = NetworkUtils.createAndAddNode(network, Id.create(6, Node.class), new Coord((double) 120, (double) 10));\n\t\tNode node7 = NetworkUtils.createAndAddNode(network, Id.create(7, Node.class), new Coord((double) 190, (double) 100));\n\t\tNode node8 = NetworkUtils.createAndAddNode(network, Id.create(8, Node.class), new Coord((double) 190, (double) 190));\n\t\tNode node9 = NetworkUtils.createAndAddNode(network, Id.create(9, Node.class), new Coord((double) 190, (double) 10));\n\n\t\tSet<String> modes = new HashSet<>();\n\t\tmodes.add(\"car\");\n\n\t\t// Links (bi-directional)\n\t\tNetworkUtils.createAndAddLink(network,Id.create(1, Link.class), node1, node2, (double) 90, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(1, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(2, Link.class), node2, node1, (double) 90, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(2, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(3, Link.class), node1, node3, (double) 90, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(3, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(4, Link.class), node3, node1, (double) 90, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(4, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(5, Link.class), node1, node4, (double) 110, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(5, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(6, Link.class), node4, node1, (double) 110, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(6, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(7, Link.class), node4, node5, (double) 90, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(7, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(8, Link.class), node5, node4, (double) 90, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(8, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(9, Link.class), node4, node6, (double) 90, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(9, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(10, Link.class), node6, node4, (double) 90, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(10, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(11, Link.class), node4, node7, (double) 70, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(11, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(12, Link.class), node7, node4, (double) 70, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(12, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(13, Link.class), node5, node8, (double) 70, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(13, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(14, Link.class), node8, node5, (double) 70, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(14, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(15, Link.class), node6, node9, (double) 70, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(15, Link.class)).setAllowedModes(modes);\n\n\t\tNetworkUtils.createAndAddLink(network,Id.create(16, Link.class), node9, node6, (double) 70, freespeed, capacity, numLanes);\n\t\tnetwork.getLinks().get(Id.create(16, Link.class)).setAllowedModes(modes);\n\n\t\treturn network;\n\t}",
"public Allocated_computers() {\n initComponents();\n }",
"public void create_crystal() {\n\t\tcrystalQuantity[1] += (1+create_modifier);\n\t\tautomerge();\n\t\tcollection();\n\t}",
"public void createSpaceClasses(){\n\t//add the number of classe demand in a list of superchannel\n\t\tspaceSC_List = new ArrayList<OpticalSuperChannel>();\n\t\tfor ( int i = 1 ; i < this.spatialDimension+1 ; i++ ) {\n\t\t\tspaceSC_List.add(new OpticalSuperChannel( i , this.signalBw, this.channelSpacing, this.bandGuard,\n\t\t\t\t\tthis.slotBw, this.modulationFormat));\n\t\t}\n\n\n\t}",
"public void populate1()\r\n\t{\r\n\t\tRandom gen=new Random();\r\n\t\tint add=(gen.nextInt(8)+5);\r\n\t\twhile (add>0)\r\n\t\t{\r\n\t\t\t/**If the max capacity is reach, will break out to prevent further car instantiation*/\r\n\t\t\tif (carNum==LIMIT)\r\n\t\t\t{\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tboolean straight;\r\n\t\t\tint straightNum=gen.nextInt(2);\r\n\t\t\tif (straightNum==0)\r\n\t\t\t\tstraight=true;\r\n\t\t\telse\r\n\t\t\t\tstraight=false;\r\n\t\t\tint directionNumber=gen.nextInt(4);\r\n\t\t\tDirection direction=null;\r\n\t\t\tStreet street=null;\r\n\t\t\tswitch (directionNumber)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tdirection=Direction.N;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tdirection=Direction.S;\r\n\t\t\t\t\tstreet=Street.CHURCH;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tdirection=Direction.E;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tdirection=Direction.W;\r\n\t\t\t\t\tstreet=Street.MAIN;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tSystem.out.println(\"There was an error with your direction. Please look into this problem.\");\r\n\t\t\t}\r\n\t\t\tVehicle car=new Vehicle(carNum, time, direction, street, straight);\r\n\t\t\tcarNum++;\r\n\t\t\tif (car.getStraight())\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East straight\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastStraight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tswitch (car.getDirection())\r\n\t\t\t\t{\r\n\t\t\t\t\tcase N:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in North Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchNorthRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase S:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in South Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tChurchSouthRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase W:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in West Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainWestRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase E:\r\n\t\t\t\t\t\t//System.out.println(\"I was put in East Right\");\r\n\t\t\t\t\t\t//System.out.println(car);\r\n\t\t\t\t\t\tMainEastRight.enqueue(car);\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\tSystem.out.println(\"There wan an error enquing cars in the pre propulate method. You should look into this.\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tadd--;\t\r\n\t\t}\t\r\n\t}",
"public void defineProduct(String name,\r\n\t\t\t\t\t\t\t\t double calories,\r\n\t\t\t\t\t\t\t\t double proteins,\r\n\t\t\t\t\t\t\t\t double carbs,\r\n\t\t\t\t\t\t\t\t double fat){\r\n\t\tproducts.add(new Material(name,calories,proteins,carbs,fat,false));\r\n\t}"
] | [
"0.59434235",
"0.57952666",
"0.5699659",
"0.56358546",
"0.56164426",
"0.55707145",
"0.555287",
"0.55441487",
"0.54934597",
"0.5477061",
"0.545375",
"0.544572",
"0.541395",
"0.5394672",
"0.53884",
"0.5385611",
"0.53795564",
"0.5372221",
"0.5362084",
"0.53602105",
"0.53601694",
"0.5349965",
"0.53330153",
"0.53283244",
"0.53233737",
"0.5308083",
"0.5304531",
"0.53013796",
"0.5255318",
"0.52368224",
"0.5228082",
"0.5222045",
"0.5221387",
"0.51904917",
"0.5184477",
"0.5181667",
"0.51786786",
"0.51682514",
"0.51632434",
"0.51623875",
"0.5157897",
"0.5153327",
"0.51507956",
"0.51485515",
"0.5140097",
"0.5140028",
"0.51385957",
"0.5138568",
"0.5134257",
"0.51292896",
"0.5118445",
"0.511788",
"0.51135385",
"0.511286",
"0.5111492",
"0.5103076",
"0.5101337",
"0.51011866",
"0.50998265",
"0.50974727",
"0.5094246",
"0.5086407",
"0.50830287",
"0.50808686",
"0.50789297",
"0.5077225",
"0.5073395",
"0.50721",
"0.50685894",
"0.50674266",
"0.505805",
"0.5055814",
"0.5055097",
"0.5053901",
"0.5053217",
"0.50507486",
"0.50492847",
"0.50400317",
"0.50375974",
"0.5034107",
"0.50291264",
"0.5024631",
"0.5023039",
"0.50175935",
"0.5014492",
"0.5013354",
"0.5009383",
"0.50080705",
"0.5007961",
"0.4994722",
"0.49897137",
"0.49861032",
"0.49859583",
"0.49844116",
"0.49817824",
"0.4976807",
"0.49723238",
"0.49716818",
"0.49639583",
"0.49610943"
] | 0.5960664 | 0 |
TODO Autogenerated method stub | private void prepareCoinRacks() {
} | {
"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 getExras() {\n\n\t}",
"@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}",
"@Override\n\tpublic void entrenar() {\n\t\t\n\t}",
"@Override\n\tpublic void nadar() {\n\t\t\n\t}",
"@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}",
"@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}",
"@Override\n\tprotected void interr() {\n\t}",
"@Override\n\tpublic void emprestimo() {\n\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void grabar() {\n\t\t\n\t}",
"@Override\n\tpublic void gravarBd() {\n\t\t\n\t}",
"@Override\r\n\tpublic void rozmnozovat() {\n\t}",
"@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}",
"@Override\n protected void getExras() {\n }",
"@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}",
"@Override\n\tpublic void nefesAl() {\n\n\t}",
"@Override\n\tpublic void ligar() {\n\t\t\n\t}",
"@Override\n public void func_104112_b() {\n \n }",
"@Override\n\tprotected void initdata() {\n\n\t}",
"@Override\n\tpublic void nghe() {\n\n\t}",
"@Override\n public void function()\n {\n }",
"@Override\n public void function()\n {\n }",
"public final void mo51373a() {\n }",
"@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}",
"@Override\n public void inizializza() {\n\n super.inizializza();\n }",
"@Override\n\tprotected void initData() {\n\t\t\n\t}",
"@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}",
"@Override\n\tpublic void sacrifier() {\n\t\t\n\t}",
"@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}",
"public void designBasement() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}",
"public void gored() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\r\n\t}",
"@Override\n\tpublic void einkaufen() {\n\t}",
"@Override\n protected void initialize() {\n\n \n }",
"public void mo38117a() {\n }",
"@Override\n\tprotected void getData() {\n\t\t\n\t}",
"Constructor() {\r\n\t\t \r\n\t }",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}",
"@Override\n\tpublic void one() {\n\t\t\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}",
"private stendhal() {\n\t}",
"@Override\n\tprotected void update() {\n\t\t\n\t}",
"@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tprotected void initData() {\n\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\t\t\n\t}",
"@Override\n public void init() {\n\n }",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\n\tprotected void initialize() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\r\n\tpublic void init() {\n\t\t\r\n\t}",
"@Override\n\tpublic void debite() {\n\t\t\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"@Override\r\n\tpublic void init() {\n\r\n\t}",
"public contrustor(){\r\n\t}",
"@Override\n\tprotected void initialize() {\n\n\t}",
"@Override\r\n\tpublic void dispase() {\n\r\n\t}",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"@Override\n\tpublic void dtd() {\n\t\t\n\t}",
"@Override\n\tprotected void logic() {\n\n\t}",
"@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}",
"public void mo4359a() {\n }",
"@Override\r\n\tprotected void initialize() {\n\r\n\t}",
"@Override\n public void memoria() {\n \n }",
"@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}",
"private RepositorioAtendimentoPublicoHBM() {\r\t}",
"@Override\n protected void initialize() \n {\n \n }",
"@Override\r\n\tpublic void getProposition() {\n\r\n\t}",
"@Override\n\tpublic void particular1() {\n\t\t\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n\tpublic void init() {\n\n\t}",
"@Override\n protected void prot() {\n }",
"@Override\r\n\tpublic void init()\r\n\t{\n\t}",
"@Override\n\tprotected void initValue()\n\t{\n\n\t}",
"public void mo55254a() {\n }"
] | [
"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.6080161",
"0.6077022",
"0.6041561",
"0.6024072",
"0.6020252",
"0.59984857",
"0.59672105",
"0.59672105",
"0.5965777",
"0.59485507",
"0.5940904",
"0.59239364",
"0.5910017",
"0.5902906",
"0.58946234",
"0.5886006",
"0.58839184",
"0.58691067",
"0.5857751",
"0.58503544",
"0.5847024",
"0.58239377",
"0.5810564",
"0.5810089",
"0.5806823",
"0.5806823",
"0.5800025",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5792378",
"0.5790187",
"0.5789414",
"0.5787092",
"0.57844025",
"0.57844025",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5774479",
"0.5761362",
"0.57596046",
"0.57596046",
"0.575025",
"0.575025",
"0.575025",
"0.5747959",
"0.57337177",
"0.57337177",
"0.57337177",
"0.5721452",
"0.5715831",
"0.57142824",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.57140535",
"0.5711723",
"0.57041645",
"0.56991017",
"0.5696783",
"0.56881124",
"0.56774884",
"0.56734604",
"0.56728",
"0.56696945",
"0.5661323",
"0.5657007",
"0.5655942",
"0.5655942",
"0.5655942",
"0.56549734",
"0.5654792",
"0.5652974",
"0.5650185"
] | 0.0 | -1 |
/ 89: / 90: | public ServicioCreditoTributario getServicioCreditoTributario()
/* 91: */ {
/* 92:113 */ return this.servicioCreditoTributario;
/* 93: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"String mo21078i();",
"String mo30285c(long j);",
"public int mo34973b() {\n return 48;\n }",
"private static int m31084a(zzss zzss) {\n int a = zzss.mo32193a(5);\n if (a == 31) {\n return zzss.mo32193a(6) + 32;\n }\n return a;\n }",
"void mo5875b(String str, long j);",
"public int mo36g() {\n return 8;\n }",
"@Test\n public void Keypad() {\n Assert.assertEquals(11, Computation.keypadTime(\"91566165\",\"639485712\"));\n Assert.assertEquals(1, Computation.keypadTime(\"5111\",\"752961348\"));\n }",
"int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}",
"@Override\n protected int func_150123_b(int p_150123_1_)\n {\n return 60;\n }",
"public static long m3983tj(String str) {\n AppMethodBeat.m2504i(93203);\n int lastIndexOf = str.lastIndexOf(\";?enc=\");\n if (lastIndexOf > 0) {\n long anl = C5046bo.anl(str.substring(lastIndexOf + 6));\n AppMethodBeat.m2505o(93203);\n return anl;\n }\n AppMethodBeat.m2505o(93203);\n return 0;\n }",
"long mo20406a();",
"public int mo36g() {\n return 4;\n }",
"String mo20731c();",
"@Test\n public void testTakeNumberFromString224() { // FlairImage: 224\n assertEquals(\"From: FlairImage line: 225\", 123, takeNumberFromString(\"123\")); \n assertEquals(\"From: FlairImage line: 226\", 0, takeNumberFromString(\"123a\")); \n assertEquals(\"From: FlairImage line: 227\", -123, takeNumberFromString(\"-123\")); \n assertEquals(\"From: FlairImage line: 228\", 0, takeNumberFromString(\"--123\")); \n assertEquals(\"From: FlairImage line: 229\", 0, takeNumberFromString(\"pz4\")); \n }",
"@Test\n public void testDAM31102001() {\n testDAM31001001();\n }",
"String mo38971b();",
"@Test\n public void NineAndMissExpected_90(){\n String input = \"9-9-9-9-9-9-9-9-9-9-\";\n assertEquals(game.scoreOfGame(input),90);\n }",
"String mo20730b();",
"private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }",
"C20259y mo54455t(int i);",
"public abstract long mo9229aD();",
"C0139e mo89b();",
"private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }",
"public void mo9824b(String str) {\n int i;\n int i2;\n try {\n int length = str.length() * 3;\n int i3 = C3670m.m8671i(length);\n int i4 = i3 + length;\n if (i4 > this.f9107e) {\n byte[] bArr = new byte[length];\n int a = C3700r1.m8885a(str, bArr, 0, length);\n mo9814c(a);\n mo9826b(bArr, 0, a);\n return;\n }\n if (i4 > this.f9107e - this.f9108f) {\n mo9827i();\n }\n int i5 = C3670m.m8671i(str.length());\n i = this.f9108f;\n if (i5 == i3) {\n int i6 = i + i5;\n this.f9108f = i6;\n int a2 = C3700r1.m8885a(str, this.f9106d, i6, this.f9107e - i6);\n this.f9108f = i;\n i2 = (a2 - i) - i5;\n mo9820l(i2);\n this.f9108f = a2;\n } else {\n i2 = C3700r1.m8884a((CharSequence) str);\n mo9820l(i2);\n this.f9108f = C3700r1.m8885a(str, this.f9106d, this.f9108f, i2);\n }\n this.f9109g += i2;\n } catch (C3703c e) {\n this.f9109g -= this.f9108f - i;\n this.f9108f = i;\n throw e;\n } catch (ArrayIndexOutOfBoundsException e2) {\n throw new C3674d(e2);\n } catch (C3703c e3) {\n mo9808a(str, e3);\n }\n }",
"void circulardecode()\n{\nfor(i=0;i<s.length();i++)\n{\nc=s.charAt(i);\nk=(int)c;\nif(k==90)\nk1=65;\nelse\nif(k==122)\nk1=97;\nelse\nk1=k+1;\nc1=caseconverter(k,k1);\nSystem.out.print(c1);\n}\n}",
"private void m81856t() {\n try {\n String c = m81844c(C6969H.m41409d(\"G738BEA0DBA32BD20E319AF5CEBF5C6\"));\n if (!TextUtils.isEmpty(c)) {\n this.f58084p = Integer.parseInt(c);\n }\n } catch (Exception e) {\n WebUtil.m68654a(C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\"), e.getMessage());\n }\n }",
"void milestone2(double num){\n System.out.println(\"Integer part: \" + (int)num);\n double fractionPart = num - (int)num;\n fractionPart *= 100;\n System.out.println(\"Fractional part: \" + (int)fractionPart);\n }",
"public abstract long mo9755t();",
"public int arn() {\n return 383;\n }",
"public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }",
"C1458cs mo7613iS();",
"public static void main(String[] args) {\n System.out.println(getDurationString(65,45));\n\n System.out.println(getDurationString(3945));\n }",
"public void mo18644a(byte[] r8, int r9, int r10, com.startapp.p154a.p155a.p158c.C5047b.C5048a r11) {\n /*\n r7 = this;\n boolean r0 = r11.f16357f\n if (r0 == 0) goto L_0x0005\n return\n L_0x0005:\n r0 = 0\n r1 = 1\n if (r10 >= 0) goto L_0x00df\n r11.f16357f = r1\n int r8 = r11.f16359h\n if (r8 != 0) goto L_0x0014\n int r8 = r7.f16349c\n if (r8 != 0) goto L_0x0014\n return\n L_0x0014:\n int r8 = r7.f16346k\n byte[] r8 = r7.mo18648a(r8, r11)\n int r9 = r11.f16355d\n int r10 = r11.f16359h\n r1 = 61\n switch(r10) {\n case 0: goto L_0x00bb;\n case 1: goto L_0x0081;\n case 2: goto L_0x003c;\n default: goto L_0x0023;\n }\n L_0x0023:\n java.lang.IllegalStateException r8 = new java.lang.IllegalStateException\n java.lang.StringBuilder r9 = new java.lang.StringBuilder\n r9.<init>()\n java.lang.String r10 = \"Impossible modulus \"\n r9.append(r10)\n int r10 = r11.f16359h\n r9.append(r10)\n java.lang.String r9 = r9.toString()\n r8.<init>(r9)\n throw r8\n L_0x003c:\n int r10 = r11.f16355d\n int r2 = r10 + 1\n r11.f16355d = r2\n byte[] r2 = r7.f16342g\n int r3 = r11.f16352a\n int r3 = r3 >> 10\n r3 = r3 & 63\n byte r2 = r2[r3]\n r8[r10] = r2\n int r10 = r11.f16355d\n int r2 = r10 + 1\n r11.f16355d = r2\n byte[] r2 = r7.f16342g\n int r3 = r11.f16352a\n int r3 = r3 >> 4\n r3 = r3 & 63\n byte r2 = r2[r3]\n r8[r10] = r2\n int r10 = r11.f16355d\n int r2 = r10 + 1\n r11.f16355d = r2\n byte[] r2 = r7.f16342g\n int r3 = r11.f16352a\n int r3 = r3 << 2\n r3 = r3 & 63\n byte r2 = r2[r3]\n r8[r10] = r2\n byte[] r10 = r7.f16342g\n byte[] r2 = f16339d\n if (r10 != r2) goto L_0x00bb\n int r10 = r11.f16355d\n int r2 = r10 + 1\n r11.f16355d = r2\n r8[r10] = r1\n goto L_0x00bb\n L_0x0081:\n int r10 = r11.f16355d\n int r2 = r10 + 1\n r11.f16355d = r2\n byte[] r2 = r7.f16342g\n int r3 = r11.f16352a\n int r3 = r3 >> 2\n r3 = r3 & 63\n byte r2 = r2[r3]\n r8[r10] = r2\n int r10 = r11.f16355d\n int r2 = r10 + 1\n r11.f16355d = r2\n byte[] r2 = r7.f16342g\n int r3 = r11.f16352a\n int r3 = r3 << 4\n r3 = r3 & 63\n byte r2 = r2[r3]\n r8[r10] = r2\n byte[] r10 = r7.f16342g\n byte[] r2 = f16339d\n if (r10 != r2) goto L_0x00bb\n int r10 = r11.f16355d\n int r2 = r10 + 1\n r11.f16355d = r2\n r8[r10] = r1\n int r10 = r11.f16355d\n int r2 = r10 + 1\n r11.f16355d = r2\n r8[r10] = r1\n L_0x00bb:\n int r10 = r11.f16358g\n int r1 = r11.f16355d\n int r1 = r1 - r9\n int r10 = r10 + r1\n r11.f16358g = r10\n int r9 = r7.f16349c\n if (r9 <= 0) goto L_0x0172\n int r9 = r11.f16358g\n if (r9 <= 0) goto L_0x0172\n byte[] r9 = r7.f16344i\n int r10 = r11.f16355d\n byte[] r1 = r7.f16344i\n int r1 = r1.length\n java.lang.System.arraycopy(r9, r0, r8, r10, r1)\n int r8 = r11.f16355d\n byte[] r9 = r7.f16344i\n int r9 = r9.length\n int r8 = r8 + r9\n r11.f16355d = r8\n goto L_0x0172\n L_0x00df:\n r2 = r9\n r9 = r0\n L_0x00e1:\n if (r9 >= r10) goto L_0x0172\n int r3 = r7.f16346k\n byte[] r3 = r7.mo18648a(r3, r11)\n int r4 = r11.f16359h\n int r4 = r4 + r1\n int r4 = r4 % 3\n r11.f16359h = r4\n int r4 = r2 + 1\n byte r2 = r8[r2]\n if (r2 >= 0) goto L_0x00f8\n int r2 = r2 + 256\n L_0x00f8:\n int r5 = r11.f16352a\n int r5 = r5 << 8\n int r5 = r5 + r2\n r11.f16352a = r5\n int r2 = r11.f16359h\n if (r2 != 0) goto L_0x016d\n int r2 = r11.f16355d\n int r5 = r2 + 1\n r11.f16355d = r5\n byte[] r5 = r7.f16342g\n int r6 = r11.f16352a\n int r6 = r6 >> 18\n r6 = r6 & 63\n byte r5 = r5[r6]\n r3[r2] = r5\n int r2 = r11.f16355d\n int r5 = r2 + 1\n r11.f16355d = r5\n byte[] r5 = r7.f16342g\n int r6 = r11.f16352a\n int r6 = r6 >> 12\n r6 = r6 & 63\n byte r5 = r5[r6]\n r3[r2] = r5\n int r2 = r11.f16355d\n int r5 = r2 + 1\n r11.f16355d = r5\n byte[] r5 = r7.f16342g\n int r6 = r11.f16352a\n int r6 = r6 >> 6\n r6 = r6 & 63\n byte r5 = r5[r6]\n r3[r2] = r5\n int r2 = r11.f16355d\n int r5 = r2 + 1\n r11.f16355d = r5\n byte[] r5 = r7.f16342g\n int r6 = r11.f16352a\n r6 = r6 & 63\n byte r5 = r5[r6]\n r3[r2] = r5\n int r2 = r11.f16358g\n int r2 = r2 + 4\n r11.f16358g = r2\n int r2 = r7.f16349c\n if (r2 <= 0) goto L_0x016d\n int r2 = r7.f16349c\n int r5 = r11.f16358g\n if (r2 > r5) goto L_0x016d\n byte[] r2 = r7.f16344i\n int r5 = r11.f16355d\n byte[] r6 = r7.f16344i\n int r6 = r6.length\n java.lang.System.arraycopy(r2, r0, r3, r5, r6)\n int r2 = r11.f16355d\n byte[] r3 = r7.f16344i\n int r3 = r3.length\n int r2 = r2 + r3\n r11.f16355d = r2\n r11.f16358g = r0\n L_0x016d:\n int r9 = r9 + 1\n r2 = r4\n goto L_0x00e1\n L_0x0172:\n return\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.startapp.p154a.p155a.p158c.C5046a.mo18644a(byte[], int, int, com.startapp.a.a.c.b$a):void\");\n }",
"int mo5882g(String str);",
"int mo5867a(String str, long j);",
"private static char[] m6491z(String str) {\n char[] toCharArray = str.toCharArray();\n if (toCharArray.length < 2) {\n toCharArray[0] = (char) (toCharArray[0] ^ 108);\n }\n return toCharArray;\n }",
"public abstract long mo131997a() throws IOException;",
"public int mo36g() {\n return 2;\n }",
"public static String m3980s(String str, long j) {\n AppMethodBeat.m2504i(93201);\n String format;\n if (j == 0) {\n format = String.format(str + \";?enc=%d\", new Object[]{Long.valueOf(314159265)});\n AppMethodBeat.m2505o(93201);\n return format;\n }\n format = String.format(str + \";?enc=%d\", new Object[]{Long.valueOf(j)});\n AppMethodBeat.m2505o(93201);\n return format;\n }",
"int mo1505l();",
"int mo54450o(int i);",
"String mo131984a();",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"int mo4095a(int i);",
"static void m14930d(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"C15430g mo56154a();",
"C4945r5 mo19056B();",
"void mo64942a(String str, long j, long j2);",
"C20254v mo54454s(int i);",
"void mo9075h(String str, int i, int i2);",
"int mo5885j(String str);",
"int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }",
"@Test\n public void testDAM30903001() {\n testDAM30802001();\n }",
"void mo1507n();",
"long getUnknown72();",
"long mo49a();",
"public void mo12310b(String str) {\n int a = m14928a();\n int d = C3205z0.INFO.mo12550d();\n }",
"@Test public void shouldGive240MinFor950cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 4 * 60 /*minutes*/ , rs.calculateTime(950) ); \r\n }",
"void mo304a(C0366h c0366h);",
"public abstract long mo9748m();",
"public int mo9232aG() {\n return 0;\n }",
"public abstract Integer mo36210m();",
"public int mo1534c() {\n return 2;\n }",
"public void mo12202n() {\n this.f10959n = -1;\n }",
"int mo54441g(int i);",
"public abstract void mo4365a(int i, zzwt zzwt);",
"@org.junit.Test\n public void testTicksForDesiredAngle90From0() {\n int resultsTicks = SwerveDriveMath.ticksForDesiredAngle(testConfig,0, 90);\n assertEquals(90, resultsTicks);\n }",
"public final void mo1308a() {\n int i = this.f2309d;\n int i2 = i != Integer.MIN_VALUE ? i + this.f2308c : this.f2307b;\n this.f2309d = i2;\n String str = this.f2306a;\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 11);\n sb.append(str);\n sb.append(i2);\n this.f2310e = sb.toString();\n }",
"@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }",
"void mo1943l();",
"Period mo20733e();",
"public final void mo7596sH(String str) {\n }",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"final int ec_decode(final int _fti) {// FIXME it is called with int _ft, result uses as int\r\n\t\tfinal long _ft = ((long)_fti & 0xffffffffL);// java\r\n\t\tthis.ext = ( this.rng / _ft );\r\n\t\tlong s = (this.val / this.ext);\r\n\t\t// return (int)(_ft - EC_MINI( s + 1L, _ft ));\r\n\t\ts++;\r\n\t\tlong b = _ft;\r\n\t\tb -= s;\r\n\t\tif( b > 0 ) {\r\n\t\t\tb = 0;\r\n\t\t}\r\n\t\ts += b;\r\n\t\treturn (int)(_ft - s);\r\n\t}",
"@Test(timeout = 4000)\n public void test158() throws Throwable {\n StringReader stringReader0 = new StringReader(\".0*yBK7wQ\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 1997, 1997);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(1, javaCharStream0.bufpos);\n assertEquals(1998, javaCharStream0.getEndColumn());\n }",
"bdm mo1784a(akh akh);",
"int mo5878d();",
"static com.tencent.mm.plugin.appbrand.jsapi.b.a.a nI(java.lang.String r4) {\n /*\n r0 = 0;\n r1 = r4.length();\n r2 = 5;\n r1 = java.lang.Math.min(r1, r2);\n r1 = java.lang.Math.max(r0, r1);\n r1 = r4.substring(r0, r1);\n r2 = r1.toLowerCase();\n r1 = -1;\n r3 = r2.hashCode();\n switch(r3) {\n case 99228: goto L_0x003a;\n case 3704893: goto L_0x0025;\n case 104080000: goto L_0x002f;\n default: goto L_0x001e;\n };\n L_0x001e:\n r0 = r1;\n L_0x001f:\n switch(r0) {\n case 0: goto L_0x0045;\n case 1: goto L_0x0048;\n case 2: goto L_0x004b;\n default: goto L_0x0022;\n };\n L_0x0022:\n r0 = MONTH;\n L_0x0024:\n return r0;\n L_0x0025:\n r3 = \"year\";\n r2 = r2.equals(r3);\n if (r2 == 0) goto L_0x001e;\n L_0x002e:\n goto L_0x001f;\n L_0x002f:\n r0 = \"month\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0038:\n r0 = 1;\n goto L_0x001f;\n L_0x003a:\n r0 = \"day\";\n r0 = r2.equals(r0);\n if (r0 == 0) goto L_0x001e;\n L_0x0043:\n r0 = 2;\n goto L_0x001f;\n L_0x0045:\n r0 = YEAR;\n goto L_0x0024;\n L_0x0048:\n r0 = MONTH;\n goto L_0x0024;\n L_0x004b:\n r0 = DAY;\n goto L_0x0024;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.tencent.mm.plugin.appbrand.jsapi.b.a.a.nI(java.lang.String):com.tencent.mm.plugin.appbrand.jsapi.b.a$a\");\n }",
"int mo13164g();",
"public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }",
"@Test(timeout = 4000)\n public void test26() throws Throwable {\n Range range0 = Range.of((-1264L), 255L);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem0);\n Range range1 = Range.of((-1264L));\n range1.getEnd();\n range1.getEnd();\n List<Range> list0 = range1.split(255L);\n range0.complementFrom(list0);\n Range range2 = Range.of(range_CoordinateSystem0, (-1264L), 0L);\n range2.endsBefore(range0);\n Long.max((-1264L), (-3100L));\n range1.equals(range0);\n Range.Comparators.values();\n range1.getEnd();\n range0.getEnd(range_CoordinateSystem0);\n Range.Builder range_Builder0 = new Range.Builder();\n Range.Builder range_Builder1 = null;\n try {\n range_Builder1 = new Range.Builder(range_CoordinateSystem0, 255L, 248L);\n fail(\"Expecting exception: IllegalArgumentException\");\n \n } catch(IllegalArgumentException e) {\n //\n // length can not be negative\n //\n verifyException(\"org.jcvi.jillion.core.Range$Builder\", e);\n }\n }",
"@Test(timeout = 4000)\n public void test090() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-81L));\n range0.equals(range1);\n long long0 = range0.getEnd();\n assertEquals((-81L), long0);\n }",
"public abstract long mo9750o();",
"int mo44965b();",
"@Test\n public void allSpareAndLast_2_Expected_111(){\n String input = \"1/1/1/1/1/1/1/1/1/1/2\";\n assertEquals(game.scoreOfGame(input),111);\n }",
"int getAlphaMod(){\n return getPercentageValue(\"alphaMod\");\n }",
"@Test public void shouldGive180MinFor650cent() {\r\n // Three hours: $1.5+2.0+3.0\r\n assertEquals( 3 * 60 /*minutes*/ , rs.calculateTime(650) ); \r\n }",
"public void mo21794S() {\n }",
"public void mo9233aH() {\n }",
"@Test(timeout = 4000)\n public void test45() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateMktDepthL2(2146794261, 927, \"@\", 2146889800, (-180), 2146794261, (-1940));\n assertEquals(\"updateMktDepth: 2146794261 927 @ 2146889800 -180 2.146794261E9 -1940\", string0);\n }",
"private static int m18332b(int encoding) {\n if (encoding == 5) {\n return 80000;\n }\n if (encoding == 6) {\n return 768000;\n }\n if (encoding == 7) {\n return 192000;\n }\n if (encoding == 8) {\n return 2250000;\n }\n if (encoding == 14) {\n return 3062500;\n }\n throw new IllegalArgumentException();\n }",
"private String Interpretar(String num) {\r\n\t\tif(num.length() > 3)\r\n\t\t\treturn \"\";\r\n\t\tString salida=\"\";\r\n\t\t\r\n\t\tif(Dataposi(num,2) != 0)\r\n\t\t\tsalida = Centenas[Dataposi(num,2)-1];\r\n\t\t\r\n\t\tint k = Integer.parseInt(String.valueOf(Dataposi(num,1))+String.valueOf(Dataposi(num,0)));\r\n\r\n\t\tif(k <= 20)\r\n\t\t\tsalida += Numero[k];\r\n\t\telse {\r\n\t\t\tif(k > 30 && Dataposi(num,0) != 0)\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + \"Y \" + Numero[Dataposi(num,0)];\r\n\t\t\telse\r\n\t\t\t\tsalida += Decenas[Dataposi(num,1)-2] + Numero[Dataposi(num,0)];\r\n\t\t}\r\n\t\t//Caso especial con el 100\r\n\t\tif(Dataposi(num,2) == 1 && k == 0)\r\n\t\t\tsalida=\"CIEN\";\r\n\t\t\r\n\t\treturn salida;\r\n\t}",
"public void mo9769i(int r9) {\n /*\n r8 = this;\n int r0 = r8.f9080g\n int r1 = r8.f9082i\n int r0 = r0 - r1\n if (r9 > r0) goto L_0x000e\n if (r9 < 0) goto L_0x000e\n int r1 = r1 + r9\n r8.f9082i = r1\n goto L_0x0097\n L_0x000e:\n if (r9 < 0) goto L_0x00a2\n int r0 = r8.f9084k\n int r1 = r8.f9082i\n int r2 = r0 + r1\n int r3 = r2 + r9\n int r4 = r8.f9085l\n if (r3 > r4) goto L_0x0098\n q.b.c.a.j0.a.k$c$a r0 = r8.f9086m\n r3 = 0\n if (r0 != 0) goto L_0x007d\n r8.f9084k = r2\n int r0 = r8.f9080g\n int r0 = r0 - r1\n r8.f9080g = r3\n r8.f9082i = r3\n r3 = r0\n L_0x002b:\n if (r3 >= r9) goto L_0x0075\n int r0 = r9 - r3\n java.io.InputStream r1 = r8.f9078e // Catch:{ all -> 0x006b }\n long r4 = (long) r0 // Catch:{ all -> 0x006b }\n long r0 = r1.skip(r4) // Catch:{ all -> 0x006b }\n r6 = 0\n int r2 = (r0 > r6 ? 1 : (r0 == r6 ? 0 : -1))\n if (r2 < 0) goto L_0x0046\n int r4 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1))\n if (r4 > 0) goto L_0x0046\n if (r2 != 0) goto L_0x0043\n goto L_0x0075\n L_0x0043:\n int r0 = (int) r0 // Catch:{ all -> 0x006b }\n int r3 = r3 + r0\n goto L_0x002b\n L_0x0046:\n java.lang.IllegalStateException r9 = new java.lang.IllegalStateException // Catch:{ all -> 0x006b }\n java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch:{ all -> 0x006b }\n r2.<init>() // Catch:{ all -> 0x006b }\n java.io.InputStream r4 = r8.f9078e // Catch:{ all -> 0x006b }\n java.lang.Class r4 = r4.getClass() // Catch:{ all -> 0x006b }\n r2.append(r4) // Catch:{ all -> 0x006b }\n java.lang.String r4 = \"#skip returned invalid result: \"\n r2.append(r4) // Catch:{ all -> 0x006b }\n r2.append(r0) // Catch:{ all -> 0x006b }\n java.lang.String r0 = \"\\nThe InputStream implementation is buggy.\"\n r2.append(r0) // Catch:{ all -> 0x006b }\n java.lang.String r0 = r2.toString() // Catch:{ all -> 0x006b }\n r9.<init>(r0) // Catch:{ all -> 0x006b }\n throw r9 // Catch:{ all -> 0x006b }\n L_0x006b:\n r9 = move-exception\n int r0 = r8.f9084k\n int r0 = r0 + r3\n r8.f9084k = r0\n r8.mo9764A()\n throw r9\n L_0x0075:\n int r0 = r8.f9084k\n int r0 = r0 + r3\n r8.f9084k = r0\n r8.mo9764A()\n L_0x007d:\n if (r3 >= r9) goto L_0x0097\n int r0 = r8.f9080g\n int r1 = r8.f9082i\n int r1 = r0 - r1\n r8.f9082i = r0\n r0 = 1\n L_0x0088:\n r8.mo9768h(r0)\n int r2 = r9 - r1\n int r3 = r8.f9080g\n if (r2 <= r3) goto L_0x0095\n int r1 = r1 + r3\n r8.f9082i = r3\n goto L_0x0088\n L_0x0095:\n r8.f9082i = r2\n L_0x0097:\n return\n L_0x0098:\n int r4 = r4 - r0\n int r4 = r4 - r1\n r8.mo9769i(r4)\n q.b.c.a.j0.a.c0 r9 = p213q.p217b.p301c.p302a.p311j0.p312a.C3606c0.m8181h()\n throw r9\n L_0x00a2:\n q.b.c.a.j0.a.c0 r9 = p213q.p217b.p301c.p302a.p311j0.p312a.C3606c0.m8179f()\n throw r9\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9769i(int):void\");\n }",
"@Test(timeout = 4000)\n public void test018() throws Throwable {\n byte[] byteArray0 = new byte[6];\n byteArray0[0] = (byte)43;\n byteArray0[1] = (byte) (-110);\n ByteArrayInputStream byteArrayInputStream0 = new ByteArrayInputStream(byteArray0);\n JavaCharStream javaCharStream0 = new JavaCharStream(byteArrayInputStream0);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(\"+\", token0.toString());\n }",
"void mo1506m();",
"@Test(timeout = 4000)\n public void test095() throws Throwable {\n Byte byte0 = new Byte((byte)122);\n Byte.toUnsignedLong((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n Byte.toUnsignedInt((byte)122);\n HashMap<String, String> hashMap0 = new HashMap<String, String>();\n JSONObject jSONObject0 = new JSONObject((Map) hashMap0);\n Short short0 = new Short((short) (-1979));\n jSONObject0.put(\"\", (int) (short) (-1979));\n jSONObject0.optDouble(\"\", (double) 122);\n JSONObject.testValidity(hashMap0);\n assertEquals(0, hashMap0.size());\n }",
"@Test(timeout = 4000)\n public void test117() throws Throwable {\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.SPACE_BASED;\n Range range0 = Range.of(range_CoordinateSystem0, 32729L, 2147483647L);\n Range.CoordinateSystem range_CoordinateSystem1 = Range.CoordinateSystem.SPACE_BASED;\n range0.toString(range_CoordinateSystem1);\n range0.toString();\n Range range1 = Range.parseRange(\"[ 32729 .. 2147483646 ]/0B\", range_CoordinateSystem1);\n range1.equals(range0);\n Range.CoordinateSystem.values();\n Range.Comparators[] range_ComparatorsArray0 = Range.Comparators.values();\n assertEquals(4, range_ComparatorsArray0.length);\n }",
"@Test\n public void fixedTests() {\n assertEquals(69978 , Day02.parseInt(\"sixty nine thousand nine hundred seventy eight\"));\n }",
"C20241o mo54456u(int i);",
"public static void main(String[] args) {\n\t\tSystem.out.println( getDurationString(61, 61));\r\n\t\t System.out.println(getDurationString(60, 59));\r\n\t\t System.out.println(getDurationString(-610, 9));\r\n\t\t System.out.println( getDurationString(1, 6));\r\n\t\t System.out.println( getDurationString(3722));\r\n\t\t\r\n\t\t\r\n\t}",
"public void mo21788M() {\n }"
] | [
"0.5642133",
"0.56008023",
"0.5593588",
"0.5454283",
"0.5435965",
"0.543355",
"0.5414081",
"0.5406277",
"0.5393163",
"0.53802305",
"0.53668725",
"0.535799",
"0.5353468",
"0.53388697",
"0.53375494",
"0.53275687",
"0.5317208",
"0.53132766",
"0.5310494",
"0.52906793",
"0.5273373",
"0.526549",
"0.525786",
"0.52520245",
"0.52498204",
"0.52496815",
"0.5242141",
"0.52351505",
"0.52202773",
"0.52087027",
"0.5207985",
"0.52063465",
"0.5204153",
"0.52013236",
"0.5195463",
"0.51940525",
"0.51911193",
"0.5190679",
"0.5186569",
"0.5182023",
"0.51761436",
"0.51753217",
"0.51641035",
"0.5163983",
"0.5159381",
"0.51556516",
"0.5147976",
"0.5145043",
"0.5144061",
"0.5138583",
"0.51376796",
"0.5134851",
"0.5132781",
"0.51304805",
"0.5129304",
"0.5129085",
"0.5127909",
"0.51243556",
"0.5123054",
"0.5122101",
"0.5119267",
"0.5115084",
"0.5107132",
"0.51061976",
"0.50992537",
"0.5093975",
"0.50906074",
"0.50897795",
"0.50861764",
"0.5076891",
"0.5076396",
"0.50762665",
"0.5069026",
"0.5064895",
"0.5064147",
"0.5057783",
"0.5056267",
"0.505583",
"0.505403",
"0.50524426",
"0.50508875",
"0.50473136",
"0.504536",
"0.5045276",
"0.50443447",
"0.50437486",
"0.50437367",
"0.50421566",
"0.50346965",
"0.5032779",
"0.5031442",
"0.5030358",
"0.5029457",
"0.50292957",
"0.50290865",
"0.5028829",
"0.50278413",
"0.5027668",
"0.5026207",
"0.50239927",
"0.5022528"
] | 0.0 | -1 |
/ 94: / 95: | public void setServicioCreditoTributario(ServicioCreditoTributario servicioCreditoTributario)
/* 96: */ {
/* 97:117 */ this.servicioCreditoTributario = servicioCreditoTributario;
/* 98: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void method_4270() {}",
"public void mo21794S() {\n }",
"public void mo9233aH() {\n }",
"public void mo21786K() {\n }",
"public void mo21782G() {\n }",
"public void mo21783H() {\n }",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"public void mo21789N() {\n }",
"public void mo3749d() {\n }",
"public void mo21779D() {\n }",
"private void m50366E() {\n }",
"public void mo21795T() {\n }",
"public void mo21785J() {\n }",
"public void mo21793R() {\n }",
"public void mo21877s() {\n }",
"public void mo21787L() {\n }",
"public void mo21780E() {\n }",
"public void mo12628c() {\n }",
"public void mo21788M() {\n }",
"public void mo44053a() {\n }",
"private void kk12() {\n\n\t}",
"public void mo21791P() {\n }",
"public void mo21879u() {\n }",
"public void mo2740a() {\n }",
"public void mo21878t() {\n }",
"public void mo3376r() {\n }",
"public void mo55254a() {\n }",
"public void mo5097b() {\n }",
"public void mo6944a() {\n }",
"public void mo23813b() {\n }",
"public void mo56167c() {\n }",
"public void mo9848a() {\n }",
"public void mo5099c() {\n }",
"public void mo115190b() {\n }",
"public void mo21792Q() {\n }",
"public void mo115188a() {\n }",
"public void mo38117a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo21784I() {\n }",
"public void mo4359a() {\n }",
"public void mo2470d() {\n }",
"public void mo12930a() {\n }",
"public void mo5248a() {\n }",
"public void mo97908d() {\n }",
"void mo57278c();",
"public void mo8738a() {\n }",
"void mo1943l();",
"public void mo9137b() {\n }",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"private void m50367F() {\n }",
"public void mo21781F() {\n }",
"public abstract int mo8526p();",
"public void mo21825b() {\n }",
"C1458cs mo7613iS();",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"public final void mo7596sH(String str) {\n }",
"void mo41086b();",
"void mo3194r();",
"C2841w mo7234g();",
"public int mo36g() {\n return 4;\n }",
"public abstract String mo41086i();",
"void mo1942k();",
"public void mo2471e() {\n }",
"void mo57277b();",
"public void m23075a() {\n }",
"void mo21076g();",
"void mo41083a();",
"void mo12637b();",
"public void mo23438b() {\n }",
"public void mo21880v() {\n }",
"@Test(timeout = 4000)\n public void test53() throws Throwable {\n LovinsStemmer lovinsStemmer0 = new LovinsStemmer();\n String string0 = lovinsStemmer0.stemString(\"The database key of the entry being cross referenced. Any fields that are missing from the current record are inherited from the field being cross referenced.\");\n assertEquals(\"th databas key of th entr being cros refer. any field that ar mis from th cur record ar inherit from th field being cros refer.\", string0);\n }",
"static void m14937e(String str, Throwable th) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"public void mo3370l() {\n }",
"static void m14933d(String str, Throwable th) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"abstract String mo1748c();",
"public void mo6081a() {\n }",
"void mo54435d();",
"public abstract String mo118046b();",
"public void mo21800a() {\n }",
"public void mo3946e() {\n m25427g();\n }",
"public void mo97906c() {\n }",
"public void mo1405e() {\n }",
"void mo12638c();",
"public void func_70295_k_() {}",
"void mo56163g();",
"void mo119582b();",
"void mo1493c();",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"dkj mo4367a(dkk dkk);",
"public abstract String mo13682d();",
"public abstract String mo41079d();",
"C4945r5 mo19056B();",
"@Test(timeout = 4000)\n public void test45() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateMktDepthL2(2146794261, 927, \"@\", 2146889800, (-180), 2146794261, (-1940));\n assertEquals(\"updateMktDepth: 2146794261 927 @ 2146889800 -180 2.146794261E9 -1940\", string0);\n }",
"public abstract String mo9238av();",
"public void mo9241ay() {\n }"
] | [
"0.61051106",
"0.6097739",
"0.60813093",
"0.6060771",
"0.6033107",
"0.60279244",
"0.5996686",
"0.5911893",
"0.5911719",
"0.5909657",
"0.58795565",
"0.5877125",
"0.5869036",
"0.586722",
"0.5866616",
"0.58597857",
"0.5843463",
"0.58342946",
"0.5829761",
"0.5819417",
"0.57977664",
"0.5787936",
"0.5765316",
"0.57584286",
"0.5753129",
"0.5741233",
"0.57204384",
"0.5711569",
"0.5707854",
"0.5706601",
"0.5698383",
"0.56953126",
"0.5692152",
"0.56899595",
"0.5683147",
"0.56731683",
"0.56575674",
"0.56540126",
"0.56540126",
"0.56540126",
"0.56540126",
"0.56540126",
"0.56540126",
"0.56540126",
"0.56311196",
"0.5619408",
"0.56112397",
"0.5603998",
"0.5602413",
"0.5599834",
"0.5596255",
"0.5592976",
"0.55854267",
"0.55807537",
"0.5575509",
"0.55718285",
"0.5567046",
"0.556252",
"0.55622464",
"0.5557811",
"0.55576104",
"0.55568993",
"0.55533636",
"0.55480695",
"0.5545409",
"0.55444914",
"0.554202",
"0.5538767",
"0.5537119",
"0.553504",
"0.5530218",
"0.5522113",
"0.5517215",
"0.551692",
"0.55124897",
"0.55033517",
"0.55012375",
"0.5495445",
"0.5493613",
"0.54905075",
"0.5485731",
"0.5481408",
"0.5479967",
"0.5475572",
"0.5475249",
"0.54625326",
"0.5460345",
"0.5453057",
"0.5451081",
"0.54500294",
"0.5440143",
"0.54391503",
"0.5437946",
"0.54379004",
"0.54346454",
"0.5430172",
"0.5427938",
"0.5426555",
"0.5419774",
"0.5418949",
"0.54118276"
] | 0.0 | -1 |
/ 99: / 100: | public ServicioSRI getServicioSRI()
/* 101: */ {
/* 102:121 */ return this.servicioSRI;
/* 103: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"void milestone2(double num){\n System.out.println(\"Integer part: \" + (int)num);\n double fractionPart = num - (int)num;\n fractionPart *= 100;\n System.out.println(\"Fractional part: \" + (int)fractionPart);\n }",
"private String convert999(int num) {\r\n \t//return a number which is in 100th position\r\n \tStringBuilder str1= new StringBuilder(lowNames[num / ONE_HUNDRED]);\r\n \tstr1.append(SPACE);\r\n \tstr1.append(bigNames[0]);\r\n \tstr1.append(AND);\r\n \t\r\n \tStringBuilder str2=new StringBuilder(convert99(num % ONE_HUNDRED));\r\n \t\r\n\t\tif(num <= TWO_DIGIT_MAX_VALUE) {//check if number is lessthan or equal 99\r\n\t\t\treturn str2.toString();\r\n\t\t}else if(num % ONE_HUNDRED == ZERO) { //check if number is divisible by 100 and remainder is zero\r\n\t\t\treturn str1.toString();\r\n\t\t}\r\n\t\t\r\n\t\treturn str1.append(str2).toString();\r\n\t\t\r\n\t}",
"int getAlphaMod(){\n return getPercentageValue(\"alphaMod\");\n }",
"int getAlpha(){\n return getPercentageValue(\"alpha\"); \n }",
"void spray(double percent)\n {\n roaches = (int) (roaches - (roaches * percent / 100));\n }",
"public static void main(String[] args) {\n\t\tDivideRepeatNumbr.divide(229, 990);\n\t\tSystem.out.println(DivideRepeatNumbr.perfectSubstring(\"1\", 1));\n\t}",
"int main()\n{\n int num,rem;\n cin>>num;\n rem=num%10;\n cout<<rem+(num/1000);\n}",
"int getRemainderPercent();",
"public static void main(String args[])\n {\n \n Scanner in = new Scanner(System.in);\n int n = in.nextInt();\n int f = n/100;\n int s = ((n/10)%10);\n int t = n%10;\n int r = (t*100)+(s*10)+f;\n System.out.println(r);\n }",
"int main()\n{\n int a;\n std::cin>>a;\n int b=(a%10)+(a/1000);\n std::cout<<b;\n}",
"protected final int calculateInterst1(int pr){\n\t\t return pr*10*1/100;\n\t }",
"static int sumOf1To100nos() {\r\n\t\t \r\n\t\t int sum =0;\r\n\t\t \r\n\t\t for(int i=1; i<=100;i++) {\r\n\t\t\t sum+=i;\r\n\t\t }\r\n\t\t \r\n\t\t return sum;\r\n\t }",
"public static void main(String[] args) {\n\t\tint num = 0, sum = 0;\n\t\tdo\n\t\t{\n\t\t\tnum++;\n\t\t\tsum += num;\n\t\t\tif(num%10 == 0 && num == 100)\n\t\t\t\tSystem.out.println(\"1-\"+num+\" : \"+sum);\n\t\t\telse if(num%10 == 0 && num != 100)\n\t\t\t\tSystem.out.println(\"1-\"+num+\" : 0000\");\n\t\t}while(num<100);\n\t}",
"public boolean nearHundred(int n) {\n return (Math.abs(n - 100) <= 10 || Math.abs(n - 200) <= 10);\n}",
"public static void main002(String[] args) {\n\n\t\tint number\t= 20;\n\t\tSystem.out.println(\"Start = \" + number);\n\t\t\n\t\tnumber += 10;\t// number\t= number + 10;\n\t\tnumber -= 10;\t// number\t= number - 10\n\t\tnumber *= 10;\t// number\t= number * 10\n\t\tnumber /= 10;\t// number\t= number / 10\n\t\tnumber %= 10;\t// number\t= number % 10\n\t\tSystem.out.println(\"End = \" + number);\n\t}",
"public static void main(String[] args) {\n int a,b,c;\n int data;\n for (int i = 100; i < 999; i++) {\n\t\t\ta=i/100;//百位\n\t\t\tb=(i-a*100)/10;//十位\n\t\t\tc=i-100*a-10*b;//个位\n\t\t\tdata=a*a*a+b*b*b+c*c*c;\n\t\t\tif(data==i){\n\t\t\t\tSystem.out.println(\"水鲜花数字:\"+i);\n\t\t\t}\n\t\t}\n\t}",
"public static void main(String[] args){\n\n for(int n = 2; n < 102; n+=2)System.out.printf(\"%d\\n\",n);\n \n \n }",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"private static String m31929a(String str) {\n String[] split = str.split(\"\\\\.\");\n String str2 = split.length > 0 ? split[split.length - 1] : \"\";\n return str2.length() > 100 ? str2.substring(0, 100) : str2;\n }",
"public static String getConvertUptoHundreds(int number) {\r\n\t String current;\r\n\t \r\n\t if (number % 100 < 20){\r\n\t current = NumberPrinterConstant.NUMBERS[number % 100];\r\n\t number /= 100;\r\n\t }\r\n\t else {\r\n\t current = NumberPrinterConstant.NUMBERS[number % 10];\r\n\t number /= 10;\r\n\t \r\n\t current = NumberPrinterConstant.TENS[number % 10] + current;\r\n\t number /= 10;\r\n\t }\r\n\t if (number == 0) return current;\r\n\t return NumberPrinterConstant.NUMBERS[number] + NumberPrinterConstant.HUNDRED + current;\r\n\t }",
"@Override\n\tpublic String StatistiqueNbrRisuqe(){\n float m= accountRepository.NbrStatus(\"a risque\");\n float s=accountRepository.NbrStatus(\"Stable\");\n float res =( m / s)*100;\n return res+\"%\";\n\n\t}",
"private String convert99(int num) {\r\n\t\t\r\n\t\t//check if number is within 20\r\n\t\tif(num<TWENTY) {\r\n\t\t\treturn lowNames[num];\r\n\t\t}\r\n\t\t\r\n\t\t// fetch the appropriate value from tenNames array\r\n\t\tStringBuilder str=new StringBuilder(tenNames[num / TEN - TWO]);\r\n\t\t\r\n\t\t//check if number is divisible by 10 and remainder is zero\r\n\t\tif(num % TEN == ZERO) {\r\n\t\t\treturn str.toString();\r\n\t\t}\r\n\t\t\r\n\t\t//number is neither below 20 nor divisible by 10 and remainder is zero\r\n\t\tstr.append(SPACE);\r\n\t\treturn str.append(lowNames[num % TEN]).toString();\r\n\t}",
"private String calcMod(double val) {\n double vall = (val - 10) / 2;\n if (vall < 0) {\n val = Math.floor(vall);\n return String.valueOf((int)val);\n }\n else {\n val = Math.ceil(vall);\n return \"+\" + String.valueOf((int)val);\n }\n }",
"private int h1(int p){\n\t\t return p % table.length;\n\t}",
"public double getPercentRem(){\n return ((double)freeSpace / (double)totalSpace) * 100d;\n }",
"public void operacionletradni(int dni, int result){\n this.result=dni%23;}",
"java.lang.String getPercentage();",
"@Override\r\n\tpublic int div() {\n\t\treturn 0;\r\n\t}",
"static int valDiv2 (){\n return val/2;\n }",
"public static void main(String[] args) {\n\n\t\tint i = 80;\n\t\tint j = 20;\n\t\t\n\t\tdouble b = (double)(j)/(double)(i);\n\t\tdouble b_1 = b*100;\n\t\tSystem.out.println(b_1+\"%\");\n\t\t\n\t\tdouble b_2 = (double)(j)/(double)(i)*100;\n\t\tSystem.out.println(b_2+\"%\");\n\t\t\n\t\tdouble b_3 = (double)j/i;\n\t\tSystem.out.println(b_3);\n\t\tdouble b_4 =(double) b_3*100;\n\t\tSystem.out.println(b_4+\"%\");\n\t}",
"int getPercentageHeated();",
"public static float rebaseZ100(float zval, float mvabase) {return (mvabase==100F)?zval:zval*100F/mvabase;}",
"int getSatMod(){\n return getPercentageValue(\"satMod\");\n }",
"@Test\n public void testTakeNumberFromString224() { // FlairImage: 224\n assertEquals(\"From: FlairImage line: 225\", 123, takeNumberFromString(\"123\")); \n assertEquals(\"From: FlairImage line: 226\", 0, takeNumberFromString(\"123a\")); \n assertEquals(\"From: FlairImage line: 227\", -123, takeNumberFromString(\"-123\")); \n assertEquals(\"From: FlairImage line: 228\", 0, takeNumberFromString(\"--123\")); \n assertEquals(\"From: FlairImage line: 229\", 0, takeNumberFromString(\"pz4\")); \n }",
"public double toPercent(double x){\n\t\treturn x/ 100;\n\t}",
"@Override\npublic void div(int a, int b) {\n\t\n}",
"void div(double val) {\r\n\t\tresult = result / val;\r\n\t}",
"public static void main(String[] args) {\nint ans=1;\n\t\tfor(int i=0;i>=0;i++)\n{System.out.println(\"loop\");\n\t\t\tans*=100; \t\nif(i==100)\n{\n\tans=1;}\n}\n\t}",
"@Test\n public void checkDivisibilityByHundred() {\n LeapYear leapYear = new LeapYear();\n boolean flag = leapYear.isItDivisibleByHundred(1600);\n assertTrue(flag);\n }",
"@Test\n public void allSpareAndLast_2_Expected_111(){\n String input = \"1/1/1/1/1/1/1/1/1/1/2\";\n assertEquals(game.scoreOfGame(input),111);\n }",
"int div(int num1, int num2) {\n\t\treturn num1/num2;\n\t}",
"public boolean nearHundred(int n) {\n return ((Math.abs(100 - n) <= 10) || (Math.abs(200 - n) <= 10));\n}",
"private void peso(){\r\n if(getPeso()>80){\r\n precioBase+=100;\r\n }\r\n else if ((getPeso()<=79)&&(getPeso()>=50)){\r\n precioBase+=80;\r\n }\r\n else if ((getPeso()<=49)&&(getPeso()>=20)){\r\n precioBase+=50;\r\n }\r\n else if ((getPeso()<=19)&&(getPeso()>=0)){\r\n precioBase+=10;\r\n }\r\n }",
"Rule Digit() {\n // No effect on value stack\n return CharRange('0', '9');\n }",
"@Test\n public void NineAndMissExpected_90(){\n String input = \"9-9-9-9-9-9-9-9-9-9-\";\n assertEquals(game.scoreOfGame(input),90);\n }",
"double progress(double val)\n\t{\n\t\treturn val * linkDirection;\n\t}",
"private double getPseudoLoadingFactor( int... plus ) {\n if (plus.length > 0 && plus.length < 2) {\n return (double) (int) (((double) (n + nd + plus[0]) / N) * 10000) / 10000; \n }\n return (double) (int) (((double) (n + nd) / N) * 10000) / 10000;\n }",
"public static void main(String[] args) {\n\t\t\nfor(int contador=1;contador<=100;contador+=1)\n{\n\tSystem.out.println(contador);\n}\n\t}",
"private String hR(int x) {\n if (x < 10) {\n return \"0\" + x;\n }\n return \"\" + x;\n }",
"int main()\n{\n int n;\n cin>>n;\n if(n<=200)\n cout<<\"Rs.\"<<n/2;\n else if(n<=400)\n cout<<\"Rs.\"<<n*0.65+100;\n else if(n<=600)\n cout<<\"Rs.\"<<n*0.80+200;\n else cout<<\"Rs.\"<<n*1.25+425;\n return 0;\n \n}",
"private static void helloHelloModulo() {\n int a = 1;\n int b = 10;\n int c = 1 / 10;\n\n int d = 1 % 10;\n\n\n System.out.println(\" Result deleniya \" + c);\n System.out.println(\" Result deleniya \" + d);\n\n\n int делимое = 75;\n int делитель = 13;\n int f = делимое % делитель;\n\n int остаток = делимое - (делимое / делитель) * делитель;\n int j = 7 % 2;\n\n System.out.println(f);\n System.out.println(остаток);\n\n\n }",
"@Override\n public void init()\n {\n out = mul(num(100.0/Math.log10(length)), log10(div(sum(truerange(), length), diff(highest(length), lowest(length)))));\n }",
"double redPercentage();",
"@Test(timeout = 4000)\n public void test090() throws Throwable {\n Range range0 = Range.of((-81L));\n Range range1 = Range.of((-81L));\n range0.equals(range1);\n long long0 = range0.getEnd();\n assertEquals((-81L), long0);\n }",
"private void setProgressPercent(Integer integer) {\n\t\t\n\t}",
"@Test\n\tpublic void test100000() {\n\n\tdouble tax = Main.calcTax(100_000.);\n\tassertEquals(1750., tax, .01);\n\n\t}",
"public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }",
"int getAlphaOff(){\n return getPercentageValue(\"alphaOff\");\n }",
"public static void main(String[] args) {\n\n String result = NumberFormat.getPercentInstance().format(0.1);// method chaining\n System.out.println(result);\n }",
"public static void main(String[] args){\n int number = Integer.parseInt(args[0]);\n \n if (number >= 10000) {\n \twriteNumber(number / 1000);\n \twriteNumber(1000);\n number %= 1000;\n\t\t}\n \n if(number >= 1000) {\n writeNumber(number / 1000);\n writeNumber(1000);\n number %= 1000;\n }\n\n if(number >= 100) {\n writeNumber(number / 100);\n writeNumber(100);\n number %= 100;\n }\n\n if(number <= 20) {\n writeNumber(number);\n } else if(number < 100) {\n writeNumber(number / 10 * 10);\n \n writeNumber(number % 10);\n \n }\n }",
"public static void main(String[] args) {\n\t\tdouble media = 0, cont = 0, soma = 0;\r\n\t\tfor (int aux = 1000; aux <= 2000; aux++) {\r\n\t\t\tif (aux % 2 != 0) {\r\n\t\t\t\tsoma += aux;\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\tmedia = soma / cont;\r\n\t\tSystem.out.println(media);\r\n\t}",
"private static int trailzerofun(int num) {\n\t\tint count=0;\n\t\tif(num<0)\n\t\t\treturn -1;\n\t\tfor(int i=5;num/i>=1;i*=5)\n\t\t{\n\t\t\tcount+=num/i;\n\t\t}\n\t\treturn count;\n\t}",
"void doStuff() {\n System.out.println(7/0);\r\n }",
"private void devolver100() {\n cambio = cambio - 100;\n de100--;\n cambio100++;\n }",
"public static void main(String args[])\n {\n Scanner input = new Scanner(System.in);\n int num = input.nextInt();\n int d1 = num%10;\n num /= 10;\n int d2 = num%10;\n num /= 10;\n num += (d2*10 + d1*100);\n System.out.print(num);\n }",
"public static int percent(int nom, int den) {\r\n\t\treturn (int) Math.round(100 * ((double) nom / den));\r\n\t}",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n String string0 = SQLUtil.normalize(\"b}v&-;$$:Hw1:\", false);\n assertEquals(\"b } v & - ; $ $ : Hw1 :\", string0);\n }",
"public static void main(String[] args) {\nint t = 101010101;\n// koden begynner her\nString s = \"\";\nwhile ( t % 10 > 0 ) {\ns = t % 10 + s;\nt = t / 10;\n}\ns = \"s = \" + s;\nout.println(s);\n\n }",
"private String GetTolerance(int Value)\n {\n if (Value == 0)\n return \"+5% de tolerancia\";\n else\n return \"+10% de tolerancia\";\n }",
"private static double m1936a(double d) {\n if (d > 6.26d) {\n return 100.0d;\n }\n if (d < 0.01d) {\n return 0.0d;\n }\n return ((d - 0.01d) * 100.0d) / 6.25d;\n }",
"public String converter(int n){\r\n str = \"\";\r\n condition = true;\r\n while(condition){\r\n if(n >= 1 && n < 100){\r\n str = str + oneToHundred(n);\r\n condition = false; \r\n }else if (n >= 100 && n < 1000){\r\n str = str + oneToHundred(n / 100);\r\n str = str + \"Hundred \";\r\n n = n % 100;\r\n condition = true; \r\n }\r\n \r\n }\r\n return str;\r\n \r\n }",
"abstract public int getIncomeSegment( int hhIncomeInDollars );",
"private static int normalize(int sentimentValue) {\n\t\treturn sentimentValue - 2;\n\t}",
"public static void main(String[] args) {\n printFirstNumber(-1000);\n printFirstNumberBreak(-1000);\n\n printFirstNumber(1);\n printFirstNumberBreak(1);\n }",
"private String calculateL100Km() {\n double distance = parser(getTextFromEditText(R.id.distanceEdit));\n double fuel = parser(getTextFromEditText(R.id.fuelEdit));\n double value = (fuel * 100) / distance;\n return rounder(value);\n }",
"public void percentualGordura(){\n\n s0 = 4.95 / denscorp;\n s1 = s0 - 4.50;\n percentgord = s1 * 100;\n\n }",
"public int writeTLB(int va){\n int sp = va >> 9;\n int result = buffer.lookup(sp);\n if(result==-1){\n result = write(va);\n if(result>0){\n buffer.addNew(sp, result-(va%(int)(Math.pow(2,9))));\n System.out.print(\"m \");\n } \n return result;\n }\n else{\n System.out.print(\"h \");\n return result + (va%(int)(Math.pow(2,9)));\n }\n }",
"String divideAtWhite()[]{ return null; }",
"Period mo20733e();",
"@Test\n public void FiveAndSpareWithFinalFiveExpected_150(){\n String input = \"5/5/5/5/5/5/5/5/5/5/5\";\n assertEquals(game.scoreOfGame(input),150);\n }",
"public static int fractionDigits(String percent) {\n\t return BCMath.numberPrecision(percent) + 8;\n }",
"public static void main(String[] args) {\n\t\tint i = 80;\n\t\tint j = 20;\n\t\t\n\t\tdouble t = (double)(j)/(double)(i)*100;\n\t\t\n\t\tSystem.out.println(\"퍼센트: \"+ t +\"%\");\n\t\t\n\t\t\n\n\t}",
"public String toString(){ return \"DIV\";}",
"public String get_fraction_part();",
"public void divide() {\n\t\t\n\t}",
"private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }",
"public static void main(String[] args) {\n\t\tint x=0;\r\n\t\tint y=199;\r\n\t\tint z=y/x;\r\n\r\n\t}",
"private boolean isDivisibleBy100(int year) {\n\t\treturn checkDivisibility(year, 100);\n\t}",
"@Test(timeout = 4000)\n public void test033() throws Throwable {\n Range range0 = Range.ofLength(127L);\n LinkedList<Range> linkedList0 = new LinkedList<Range>();\n range0.complementFrom(linkedList0);\n Range.CoordinateSystem range_CoordinateSystem0 = Range.CoordinateSystem.ZERO_BASED;\n String string0 = range0.toString(range_CoordinateSystem0);\n assertEquals(\"[ 0 .. 125 ]/0B\", string0);\n }",
"void milestone3(){\n for(int i = 2; i <= 100; i++){\n int count = 0;\n for(int j = 1; j <= i; j++)\n if(i % j == 0) count += 1;\n if(count > 2) continue;\n else System.out.print(i + \" \");\n }\n System.out.println();\n }",
"@Test\n public void input_100_() throws ValueOutOfBoundsException, MalformedNumberException {\n final RomanArabicConverter rac = new RomanArabicConverter(\"100\");\n assertEquals(100, rac.toArabic());\n assertEquals(\"C\", rac.toRoman());\n }",
"public static void main(String[] args) {\n\t\r\n\t\t for(int i=100;i<=999;i++){\r\n\t\t int number = i;\r\n\t\t int temp = number;\r\n\t\t int c=0,a;\r\n\t\t while(number>0){\r\n\t\t a = number%10;\r\n\t\t number = number/10;\r\n\t\t c = c +(a*a*a);\r\n\t\t }\r\n\t\t if (temp==c){\r\n\t\t System.out.println(temp);\r\n\t\t }\r\n\t\t }\r\n\t\t \r\n\t\t\r\n\r\n\t}",
"@Test(timeout = 4000)\n public void test040() throws Throwable {\n String string0 = JSONObject.doubleToString((-0.80100864F));\n assertEquals(\"-0.8010086417198181\", string0);\n }",
"public int translateNum(int num) {\n String s = String.valueOf(num);\n int a=1,b=1;\n for(int i=s.length()-2; i>-1; i--){\n String tmp = s.substring(i, i+2);\n int c= tmp.compareTo(\"10\") >= 0 && tmp.compareTo(\"25\") <= 0 ? a+b:a;\n b=a;\n a=c;\n }\n return a;\n }",
"public static void main(String[] args) {\n\t\tint a=20;\n\t\tint b=0;\n\t\tint c=a/b;\n\t\tSystem.out.println(c);\n\t\tSystem.out.println(\"division=\"+c);\n\t\tSystem.out.println(c);\n\n\t}",
"public static void main(String[] args) {\n\t\tint i=1,b=0,c=0;\n\t\twhile(i<=100)\n\t\t{\n\t\t\tint a=i % 2;\n\t\t\tif(a==0)\n\t\t\t{\n\t\t\t\tc=i+b;\n\t\t\t\tb=c;\n\t\t\t}\n\t\t\ti++;\n\t\t\t\n\t\t}\n\t\tSystem.out.println(c);\n\n\t}",
"public void divide(int value) {\r\n\t\tif (value == 0) {\r\n\t\t\ttotal = 0;\r\n\t\t}\r\n\t\telse {\r\n\t\t\ttotal /= value;\r\n\t\t}\r\n\t\thistory += \" / \" + value;\r\n\t}",
"BaseNumber divide(BaseNumber operand);",
"public String getNormalizedN(int i) {\n\tint nb = getNb(i);\n\tif (nb == 1) return \"1\";\n\tint maxN = getMaxNb();\n\tif (maxN <= 5) return Integer.toString(nb);\n\tmaxN--;\n\tnb--;\n\tif (maxN < 21) {\n\t\tif (4*nb <= maxN) return \"1\";\n\t\tif (3*nb <= maxN) return \"2\";\n\t\tif (2*nb <= maxN) return \"3\";\n\t\tif (3*nb <= 2*maxN) return \"4\";\n\t\treturn \"5\";\n\t} else if (maxN < 100) {\n\t\tif (10*nb <= maxN) return \"1\";\n\t\tif (5*nb <= maxN) return \"2\";\n\t\tif (4*nb <= maxN) return \"3\";\n\t\tif (3*nb <= maxN) return \"4\";\n\t\tif (2*nb <= 1*maxN) return \"5\";\n\t\tif (3*nb <= 2*maxN) return \"6\";\n\t\treturn \"7\";\n\t} else {\n\t\tif (20*nb <= maxN) return \"1\";\n\t\tif (10*nb <= maxN) return \"2\";\n\t\tif (5*nb <= maxN) return \"3\";\n\t\tif (4*nb <= maxN) return \"4\";\n\t\tif (3*nb <= 1*maxN) return \"5\";\n\t\tif (2*nb <= 1*maxN) return \"6\";\n\t\treturn \"7\";\n\t}\n}",
"public int getScore(){\n \treturn 100;\n }",
"@Test\n void readabilityOfBigIntegers() {\n int x = 1_000_000;\n\n // However, these are not semantically checked:\n int y = 1_00;\n }"
] | [
"0.60108256",
"0.5648624",
"0.54830754",
"0.5357621",
"0.5330119",
"0.52917886",
"0.52557725",
"0.52548224",
"0.52407676",
"0.5213174",
"0.5191488",
"0.51726264",
"0.51569235",
"0.51566905",
"0.51558965",
"0.51446253",
"0.5143606",
"0.5123608",
"0.51073164",
"0.51005334",
"0.50969",
"0.5086024",
"0.5082919",
"0.5079542",
"0.5076233",
"0.50697654",
"0.5050318",
"0.5016996",
"0.50169694",
"0.5010162",
"0.50093496",
"0.4995739",
"0.49955532",
"0.49954593",
"0.49942145",
"0.49841702",
"0.49804842",
"0.49788967",
"0.49784768",
"0.49720713",
"0.49699202",
"0.49699017",
"0.4966556",
"0.4957766",
"0.49577168",
"0.49574193",
"0.49538365",
"0.49505383",
"0.49483952",
"0.49471337",
"0.49433511",
"0.49365786",
"0.4934003",
"0.4929233",
"0.49265558",
"0.4921428",
"0.49149892",
"0.4909417",
"0.4904606",
"0.49045518",
"0.49039364",
"0.49024487",
"0.4900814",
"0.48884785",
"0.48841906",
"0.48786673",
"0.48779616",
"0.4867388",
"0.48601002",
"0.4856688",
"0.48517683",
"0.4850868",
"0.4847328",
"0.48468503",
"0.4844832",
"0.4839438",
"0.48368537",
"0.48274228",
"0.48256698",
"0.48230937",
"0.48169854",
"0.48142135",
"0.4812865",
"0.48121616",
"0.48057243",
"0.48047176",
"0.48044765",
"0.48021927",
"0.47971565",
"0.4795108",
"0.4794476",
"0.47934207",
"0.4786129",
"0.47854644",
"0.47764692",
"0.47675535",
"0.4760813",
"0.47573206",
"0.47519293",
"0.47497973",
"0.4746561"
] | 0.0 | -1 |
/ 104: / 105: | public void setServicioSRI(ServicioSRI servicioSRI)
/* 106: */ {
/* 107:125 */ this.servicioSRI = servicioSRI;
/* 108: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"public void method_4270() {}",
"public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"public int method_2436() {\r\n return 16;\r\n }",
"public int arn() {\n return 383;\n }",
"int getUnknown13();",
"String mo20731c();",
"public int getExtendedID()\r\n/* 50: */ {\r\n/* 51: 39 */ return 0;\r\n/* 52: */ }",
"public void mo12628c() {\n }",
"public abstract String mo11611b();",
"public void mo21794S() {\n }",
"public int getExtendedID()\r\n/* 12: */ {\r\n/* 13:17 */ return 10;\r\n/* 14: */ }",
"public abstract String mo41079d();",
"public abstract String mo118046b();",
"include<stdio.h>\nint main()\n{\n printf(\"5103\");\n return 0;\n}",
"public void mo9233aH() {\n }",
"public void mo21779D() {\n }",
"public String toString()\r\n/* 438: */ {\r\n/* 439:522 */ return \"Luffa-\" + (getDigestLength() << 3);\r\n/* 440: */ }",
"String mo20730b();",
"public void mo21783H() {\n }",
"private void m50366E() {\n }",
"public int mo36g() {\n return 4;\n }",
"public int getNumero()\r\n/* 190: */ {\r\n/* 191:202 */ return this.numero;\r\n/* 192: */ }",
"public void mo21877s() {\n }",
"public abstract String mo41086i();",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo21782G() {\n }",
"java.lang.String getField1072();",
"public void mo21789N() {\n }",
"long getUnknown72();",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"String mo20732d();",
"public void mo21786K() {\n }",
"public void mo55254a() {\n }",
"String mo10312id();",
"static int designerPdfViewer(int[] h, String word) {\n char[] charactersInString = word.toCharArray();\n int top = 0;\n for ( char character: charactersInString){\n System.out.println(Character.getNumericValue(character));\n if (top < h[(Character.getNumericValue(character)-10)]){\n top = h[(Character.getNumericValue(character)-10)];\n }\n }\n int area = (top)*word.length();\n\n\n\n System.out.println(area);\n return area;\n }",
"public void mo21879u() {\n }",
"public void mo3749d() {\n }",
"static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"void mo12637b();",
"java.lang.String getField1697();",
"public void mo115190b() {\n }",
"abstract String mo1748c();",
"public void mo21780E() {\n }",
"public void mo97908d() {\n }",
"public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }",
"String mo38971b();",
"public void mo2740a() {\n }",
"private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }",
"static void m14930d(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"public int a_(int paramInt)\r\n/* 166: */ {\r\n/* 167:189 */ return 0;\r\n/* 168: */ }",
"public void mo12930a() {\n }",
"java.lang.String getField1696();",
"public void mo21788M() {\n }",
"public int mo36g() {\n return 8;\n }",
"public abstract String mo13682d();",
"public abstract CharSequence mo2161g();",
"public OctetString getMsg1027()\n {\n\treturn this.msg1027;\n }",
"public int method_113() {\r\n return 0;\r\n }",
"public void mo38117a() {\n }",
"public final void mo7596sH(String str) {\n }",
"public void mo21793R() {\n }",
"public void prlns(byte a) {\n\t\tSystem.out.println(a);\r\n\t}",
"String d(String paramString, int paramInt)\r\n/* 613: */ {\r\n/* 614:609 */ int i1 = e(paramString, paramInt);\r\n/* 615:610 */ if (paramString.length() <= i1) {\r\n/* 616:611 */ return paramString;\r\n/* 617: */ }\r\n/* 618:614 */ String str1 = paramString.substring(0, i1);\r\n/* 619: */ \r\n/* 620:616 */ int i2 = paramString.charAt(i1);\r\n/* 621:617 */ int i3 = (i2 == 32) || (i2 == 10) ? 1 : 0;\r\n/* 622:618 */ String str2 = b(str1) + paramString.substring(i1 + (i3 != 0 ? 1 : 0));\r\n/* 623: */ \r\n/* 624:620 */ return str1 + \"\\n\" + d(str2, paramInt);\r\n/* 625: */ }",
"C2841w mo7234g();",
"String mo21078i();",
"public abstract int mo8526p();",
"public void mo115188a() {\n }",
"void mo1507n();",
"public abstract String mo10149a();",
"public int method_6437() {\r\n return this.field_6227;\r\n }",
"int mo27483b();",
"java.lang.String getField1096();",
"private void kk12() {\n\n\t}",
"private byte m1655h() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n char charAt2 = charSequence.charAt(i3);\n this.f2520e = charAt2;\n if (charAt2 == '<') {\n return 12;\n }\n if (charAt2 == '>') {\n break;\n } else if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i4 = this.f2519d;\n if (i4 <= 0) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n int i5 = i4 - 1;\n this.f2519d = i5;\n charAt = charSequence2.charAt(i5);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n }\n this.f2519d = i;\n this.f2520e = '>';\n return 13;\n }",
"public abstract int mo13680b();",
"public int method_2031() {\r\n return this.field_1790;\r\n }",
"@Test(timeout = 4000)\n public void test104() throws Throwable {\n int int0 = JavaCharStream.hexval('D');\n assertEquals(13, int0);\n }",
"public static void main(String[] args) {\r\n\t\tint e=437;\r\n\t\tint a=0;\r\n\t\twhile(e>0)\r\n\t\t{\r\n\t\t\ta=e%10;\r\n\t\tSystem.out.print(a);\r\n\t\t\ta=e/10;\r\n\t\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"private byte[] m1034b(java.lang.String r8) {\n /*\n r7 = this;\n r6 = 2\n r4 = 6\n r2 = 0\n java.lang.String r0 = \":\"\n java.lang.String[] r0 = r8.split(r0)\n byte[] r1 = new byte[r4]\n if (r0 == 0) goto L_0x0010\n int r3 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r3 == r4) goto L_0x001e\n L_0x0010:\n r0 = 6\n java.lang.String[] r0 = new java.lang.String[r0] // Catch:{ Throwable -> 0x0043 }\n r3 = r2\n L_0x0014:\n int r4 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r3 >= r4) goto L_0x001e\n java.lang.String r4 = \"0\"\n r0[r3] = r4 // Catch:{ Throwable -> 0x0043 }\n int r3 = r3 + 1\n goto L_0x0014\n L_0x001e:\n int r3 = r0.length // Catch:{ Throwable -> 0x0043 }\n if (r2 >= r3) goto L_0x0041\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n int r3 = r3.length() // Catch:{ Throwable -> 0x0043 }\n if (r3 <= r6) goto L_0x0033\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n r4 = 0\n r5 = 2\n java.lang.String r3 = r3.substring(r4, r5) // Catch:{ Throwable -> 0x0043 }\n r0[r2] = r3 // Catch:{ Throwable -> 0x0043 }\n L_0x0033:\n r3 = r0[r2] // Catch:{ Throwable -> 0x0043 }\n r4 = 16\n int r3 = java.lang.Integer.parseInt(r3, r4) // Catch:{ Throwable -> 0x0043 }\n byte r3 = (byte) r3 // Catch:{ Throwable -> 0x0043 }\n r1[r2] = r3 // Catch:{ Throwable -> 0x0043 }\n int r2 = r2 + 1\n goto L_0x001e\n L_0x0041:\n r0 = r1\n L_0x0042:\n return r0\n L_0x0043:\n r0 = move-exception\n java.lang.String r1 = \"Req\"\n java.lang.StringBuilder r2 = new java.lang.StringBuilder\n r2.<init>()\n java.lang.String r3 = \"getMacBa \"\n java.lang.StringBuilder r2 = r2.append(r3)\n java.lang.StringBuilder r2 = r2.append(r8)\n java.lang.String r2 = r2.toString()\n com.amap.loc.C0310c.m956a(r0, r1, r2)\n java.lang.String r0 = \"00:00:00:00:00:00\"\n byte[] r0 = r7.m1034b(r0)\n goto L_0x0042\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.amap.loc.C0321cj.m1034b(java.lang.String):byte[]\");\n }",
"@Test(timeout = 4000)\n public void test128() throws Throwable {\n StringReader stringReader0 = new StringReader(\"D!tcbD=EVjn`\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-7), 6);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"D\", token0.toString());\n assertEquals(74, token0.kind);\n }",
"public void mo21791P() {\n }",
"public void mo23813b() {\n }",
"public void mo9848a() {\n }",
"public void mo21785J() {\n }",
"public void mo21792Q() {\n }",
"public abstract Integer mo36210m();",
"public String d_()\r\n/* 445: */ {\r\n/* 446:459 */ return \"container.inventory\";\r\n/* 447: */ }",
"public int mo36g() {\n return 2;\n }",
"public abstract String mo9239aw();",
"public String get_integer_part();",
"public static void main(String[] args){\n\n for(int n = 2; n < 102; n+=2)System.out.printf(\"%d\\n\",n);\n \n \n }",
"public abstract long mo9229aD();"
] | [
"0.599791",
"0.5676587",
"0.5635233",
"0.5546506",
"0.55006915",
"0.54737854",
"0.5469194",
"0.5460488",
"0.5415534",
"0.5395545",
"0.5387824",
"0.537584",
"0.5369171",
"0.5358546",
"0.53474134",
"0.5346952",
"0.5328695",
"0.53279203",
"0.5310574",
"0.53063416",
"0.52943027",
"0.52926326",
"0.5282627",
"0.5278763",
"0.52693933",
"0.5256749",
"0.525451",
"0.5251697",
"0.5251697",
"0.5251697",
"0.5251697",
"0.5251697",
"0.5251697",
"0.5251697",
"0.52502847",
"0.5246314",
"0.52444756",
"0.5238712",
"0.52386093",
"0.52366114",
"0.5236348",
"0.52342784",
"0.5219898",
"0.5213366",
"0.5212384",
"0.5211352",
"0.51996",
"0.51902807",
"0.51901704",
"0.5189535",
"0.5187496",
"0.5182894",
"0.51813054",
"0.5175258",
"0.5155061",
"0.5153535",
"0.5152302",
"0.5151896",
"0.51489",
"0.51471126",
"0.5133104",
"0.51267767",
"0.5124",
"0.51209",
"0.51196176",
"0.51189125",
"0.5118645",
"0.5115117",
"0.51135683",
"0.51120484",
"0.51100385",
"0.51068294",
"0.51057",
"0.5103056",
"0.510257",
"0.510203",
"0.509521",
"0.509262",
"0.5091992",
"0.50889456",
"0.5088682",
"0.5088036",
"0.5087734",
"0.50877124",
"0.5086564",
"0.508419",
"0.5083858",
"0.5080469",
"0.5078578",
"0.50766397",
"0.507573",
"0.5072428",
"0.50703704",
"0.506799",
"0.50661755",
"0.50660616",
"0.50641567",
"0.5060805",
"0.5059345",
"0.50592154",
"0.5052181"
] | 0.0 | -1 |
/ 109: / 110: | public ServicioFacturaProveedorSRI getServicioFacturaProveedorSRI()
/* 111: */ {
/* 112:129 */ return this.servicioFacturaProveedorSRI;
/* 113: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }",
"public void method_4270() {}",
"private void kk12() {\n\n\t}",
"public void mo21789N() {\n }",
"public void mo21786K() {\n }",
"public void mo21782G() {\n }",
"public void mo21877s() {\n }",
"public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }",
"public java.lang.String c(java.lang.String r9, java.lang.String r10) {\n /*\n r8 = this;\n r0 = 0;\n if (r9 == 0) goto L_0x0071;\n L_0x0003:\n r1 = r9.length();\n if (r1 != 0) goto L_0x000a;\n L_0x0009:\n goto L_0x0071;\n L_0x000a:\n r1 = r9.length();\n r2 = 59;\n r3 = r9.indexOf(r2);\n r4 = 1;\n r3 = r3 + r4;\n if (r3 == 0) goto L_0x0070;\n L_0x0018:\n if (r3 != r1) goto L_0x001b;\n L_0x001a:\n goto L_0x0070;\n L_0x001b:\n r5 = r9.indexOf(r2, r3);\n r6 = -1;\n if (r5 != r6) goto L_0x0023;\n L_0x0022:\n r5 = r1;\n L_0x0023:\n if (r3 >= r5) goto L_0x006f;\n L_0x0025:\n r7 = 61;\n r7 = r9.indexOf(r7, r3);\n if (r7 == r6) goto L_0x0066;\n L_0x002d:\n if (r7 >= r5) goto L_0x0066;\n L_0x002f:\n r3 = r9.substring(r3, r7);\n r3 = r3.trim();\n r3 = r10.equals(r3);\n if (r3 == 0) goto L_0x0066;\n L_0x003d:\n r7 = r7 + 1;\n r3 = r9.substring(r7, r5);\n r3 = r3.trim();\n r7 = r3.length();\n if (r7 == 0) goto L_0x0066;\n L_0x004d:\n r9 = 2;\n if (r7 <= r9) goto L_0x0065;\n L_0x0050:\n r9 = 0;\n r9 = r3.charAt(r9);\n r10 = 34;\n if (r10 != r9) goto L_0x0065;\n L_0x0059:\n r7 = r7 - r4;\n r9 = r3.charAt(r7);\n if (r10 != r9) goto L_0x0065;\n L_0x0060:\n r9 = r3.substring(r4, r7);\n return r9;\n L_0x0065:\n return r3;\n L_0x0066:\n r3 = r5 + 1;\n r5 = r9.indexOf(r2, r3);\n if (r5 != r6) goto L_0x0023;\n L_0x006e:\n goto L_0x0022;\n L_0x006f:\n return r0;\n L_0x0070:\n return r0;\n L_0x0071:\n return r0;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: io.fabric.sdk.android.services.network.HttpRequest.c(java.lang.String, java.lang.String):java.lang.String\");\n }",
"public void mo21794S() {\n }",
"public void mo21793R() {\n }",
"public void mo12628c() {\n }",
"public String c()\r\n/* 30: */ {\r\n/* 31:175 */ return \"step.\" + this.a;\r\n/* 32: */ }",
"public int method_2436() {\r\n return 16;\r\n }",
"public abstract int mo8526p();",
"public void mo21788M() {\n }",
"public void mo9233aH() {\n }",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"public void mo21787L() {\n }",
"public void mo21783H() {\n }",
"void mo12637b();",
"@Override\n\tpublic void challenge9() {\n\n\t}",
"public int a_(int paramInt)\r\n/* 166: */ {\r\n/* 167:189 */ return 0;\r\n/* 168: */ }",
"public int mo36g() {\n return 2;\n }",
"public void mo21879u() {\n }",
"public abstract int mo9754s();",
"public void mo21780E() {\n }",
"public abstract int mo9749n();",
"public void mo21779D() {\n }",
"C2841w mo7234g();",
"public void mo12930a() {\n }",
"public int mo36g() {\n return 8;\n }",
"@Test(timeout = 4000)\n public void test108() throws Throwable {\n XPathLexer xPathLexer0 = new XPathLexer(\":_]J_/L!uFQ7%)BrL\");\n Token token0 = xPathLexer0.minus();\n assertEquals(\":\", token0.getTokenText());\n assertEquals(6, token0.getTokenType());\n \n Token token1 = xPathLexer0.nextToken();\n assertEquals(\"_\", token1.getTokenText());\n assertEquals(15, token1.getTokenType());\n }",
"public void mo21792Q() {\n }",
"public void mo21785J() {\n }",
"public abstract Integer mo36210m();",
"public int mo36g() {\n return 4;\n }",
"public void mo32111rr(int i) {\n }",
"public void mo21791P() {\n }",
"public int g()\r\n/* 601: */ {\r\n/* 602:645 */ return 0;\r\n/* 603: */ }",
"public void mo21795T() {\n }",
"@Override\n\tpublic void challenge10() {\n\n\t}",
"public abstract String mo11611b();",
"public void mo3376r() {\n }",
"public abstract String mo118046b();",
"public void mo115190b() {\n }",
"String method_110();",
"public int method_113() {\r\n return 0;\r\n }",
"public int a(String paramString)\r\n/* 454: */ {\r\n/* 455:451 */ if (paramString == null) {\r\n/* 456:452 */ return 0;\r\n/* 457: */ }\r\n/* 458:454 */ int i1 = 0;\r\n/* 459:455 */ int i2 = 0;\r\n/* 460:457 */ for (int i3 = 0; i3 < paramString.length(); i3++)\r\n/* 461: */ {\r\n/* 462:458 */ char c1 = paramString.charAt(i3);\r\n/* 463: */ \r\n/* 464:460 */ int i4 = a(c1);\r\n/* 465:461 */ if ((i4 < 0) && (i3 < paramString.length() - 1))\r\n/* 466: */ {\r\n/* 467:462 */ c1 = paramString.charAt(++i3);\r\n/* 468:464 */ if ((c1 == 'l') || (c1 == 'L')) {\r\n/* 469:465 */ i2 = 1;\r\n/* 470:466 */ } else if ((c1 == 'r') || (c1 == 'R')) {\r\n/* 471:467 */ i2 = 0;\r\n/* 472: */ }\r\n/* 473:469 */ i4 = 0;\r\n/* 474: */ }\r\n/* 475:471 */ i1 += i4;\r\n/* 476:472 */ if ((i2 != 0) && (i4 > 0)) {\r\n/* 477:473 */ i1++;\r\n/* 478: */ }\r\n/* 479: */ }\r\n/* 480:477 */ return i1;\r\n/* 481: */ }",
"public abstract int mo12580RT(int i);",
"C5727e mo33224a();",
"void mo57277b();",
"public void mo2740a() {\n }",
"public void mo21878t() {\n }",
"@Override\n\tpublic void challenge11() {\n\n\t}",
"public abstract int mo9736c(int i);",
"private void m50366E() {\n }",
"public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }",
"public abstract Integer mo36212o();",
"public abstract String mo9239aw();",
"public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }",
"String mo20730b();",
"public void mo9137b() {\n }",
"public void mo56167c() {\n }",
"private int m5278d(int pos, int cmd) {\n int end;\n int start;\n for (int i = this.f3533c.size() - 1; i >= 0; i--) {\n C1070b postponed = (C1070b) this.f3533c.get(i);\n int i2 = postponed.f3539a;\n if (i2 == 8) {\n if (postponed.f3540b < postponed.f3542d) {\n start = postponed.f3540b;\n end = postponed.f3542d;\n } else {\n start = postponed.f3542d;\n end = postponed.f3540b;\n }\n if (pos < start || pos > end) {\n int i3 = postponed.f3540b;\n if (pos < i3) {\n if (cmd == 1) {\n postponed.f3540b = i3 + 1;\n postponed.f3542d++;\n } else if (cmd == 2) {\n postponed.f3540b = i3 - 1;\n postponed.f3542d--;\n }\n }\n } else {\n int i4 = postponed.f3540b;\n if (start == i4) {\n if (cmd == 1) {\n postponed.f3542d++;\n } else if (cmd == 2) {\n postponed.f3542d--;\n }\n pos++;\n } else {\n if (cmd == 1) {\n postponed.f3540b = i4 + 1;\n } else if (cmd == 2) {\n postponed.f3540b = i4 - 1;\n }\n pos--;\n }\n }\n } else {\n int i5 = postponed.f3540b;\n if (i5 <= pos) {\n if (i2 == 1) {\n pos -= postponed.f3542d;\n } else if (i2 == 2) {\n pos += postponed.f3542d;\n }\n } else if (cmd == 1) {\n postponed.f3540b = i5 + 1;\n } else if (cmd == 2) {\n postponed.f3540b = i5 - 1;\n }\n }\n }\n for (int i6 = this.f3533c.size() - 1; i6 >= 0; i6--) {\n C1070b op = (C1070b) this.f3533c.get(i6);\n if (op.f3539a == 8) {\n int i7 = op.f3542d;\n if (i7 == op.f3540b || i7 < 0) {\n this.f3533c.remove(i6);\n mo8470a(op);\n }\n } else if (op.f3542d <= 0) {\n this.f3533c.remove(i6);\n mo8470a(op);\n }\n }\n return pos;\n }",
"C7904c mo24084a();",
"public void mo133108l() {\n mo133081a(1000);\n }",
"public void mo21800a() {\n }",
"public abstract int mo12578RR(int i);",
"public void mo38117a() {\n }",
"public void mo9769i(int r9) {\n /*\n r8 = this;\n int r0 = r8.f9080g\n int r1 = r8.f9082i\n int r0 = r0 - r1\n if (r9 > r0) goto L_0x000e\n if (r9 < 0) goto L_0x000e\n int r1 = r1 + r9\n r8.f9082i = r1\n goto L_0x0097\n L_0x000e:\n if (r9 < 0) goto L_0x00a2\n int r0 = r8.f9084k\n int r1 = r8.f9082i\n int r2 = r0 + r1\n int r3 = r2 + r9\n int r4 = r8.f9085l\n if (r3 > r4) goto L_0x0098\n q.b.c.a.j0.a.k$c$a r0 = r8.f9086m\n r3 = 0\n if (r0 != 0) goto L_0x007d\n r8.f9084k = r2\n int r0 = r8.f9080g\n int r0 = r0 - r1\n r8.f9080g = r3\n r8.f9082i = r3\n r3 = r0\n L_0x002b:\n if (r3 >= r9) goto L_0x0075\n int r0 = r9 - r3\n java.io.InputStream r1 = r8.f9078e // Catch:{ all -> 0x006b }\n long r4 = (long) r0 // Catch:{ all -> 0x006b }\n long r0 = r1.skip(r4) // Catch:{ all -> 0x006b }\n r6 = 0\n int r2 = (r0 > r6 ? 1 : (r0 == r6 ? 0 : -1))\n if (r2 < 0) goto L_0x0046\n int r4 = (r0 > r4 ? 1 : (r0 == r4 ? 0 : -1))\n if (r4 > 0) goto L_0x0046\n if (r2 != 0) goto L_0x0043\n goto L_0x0075\n L_0x0043:\n int r0 = (int) r0 // Catch:{ all -> 0x006b }\n int r3 = r3 + r0\n goto L_0x002b\n L_0x0046:\n java.lang.IllegalStateException r9 = new java.lang.IllegalStateException // Catch:{ all -> 0x006b }\n java.lang.StringBuilder r2 = new java.lang.StringBuilder // Catch:{ all -> 0x006b }\n r2.<init>() // Catch:{ all -> 0x006b }\n java.io.InputStream r4 = r8.f9078e // Catch:{ all -> 0x006b }\n java.lang.Class r4 = r4.getClass() // Catch:{ all -> 0x006b }\n r2.append(r4) // Catch:{ all -> 0x006b }\n java.lang.String r4 = \"#skip returned invalid result: \"\n r2.append(r4) // Catch:{ all -> 0x006b }\n r2.append(r0) // Catch:{ all -> 0x006b }\n java.lang.String r0 = \"\\nThe InputStream implementation is buggy.\"\n r2.append(r0) // Catch:{ all -> 0x006b }\n java.lang.String r0 = r2.toString() // Catch:{ all -> 0x006b }\n r9.<init>(r0) // Catch:{ all -> 0x006b }\n throw r9 // Catch:{ all -> 0x006b }\n L_0x006b:\n r9 = move-exception\n int r0 = r8.f9084k\n int r0 = r0 + r3\n r8.f9084k = r0\n r8.mo9764A()\n throw r9\n L_0x0075:\n int r0 = r8.f9084k\n int r0 = r0 + r3\n r8.f9084k = r0\n r8.mo9764A()\n L_0x007d:\n if (r3 >= r9) goto L_0x0097\n int r0 = r8.f9080g\n int r1 = r8.f9082i\n int r1 = r0 - r1\n r8.f9082i = r0\n r0 = 1\n L_0x0088:\n r8.mo9768h(r0)\n int r2 = r9 - r1\n int r3 = r8.f9080g\n if (r2 <= r3) goto L_0x0095\n int r1 = r1 + r3\n r8.f9082i = r3\n goto L_0x0088\n L_0x0095:\n r8.f9082i = r2\n L_0x0097:\n return\n L_0x0098:\n int r4 = r4 - r0\n int r4 = r4 - r1\n r8.mo9769i(r4)\n q.b.c.a.j0.a.c0 r9 = p213q.p217b.p301c.p302a.p311j0.p312a.C3606c0.m8181h()\n throw r9\n L_0x00a2:\n q.b.c.a.j0.a.c0 r9 = p213q.p217b.p301c.p302a.p311j0.p312a.C3606c0.m8179f()\n throw r9\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p213q.p217b.p301c.p302a.p311j0.p312a.C3656k.C3659c.mo9769i(int):void\");\n }",
"String mo20731c();",
"public abstract String mo41086i();",
"public void mo97906c() {\n }",
"public void mo3749d() {\n }",
"public void mo23438b() {\n }",
"void mo9075h(String str, int i, int i2);",
"C3676k mo12649b();",
"public void mo97908d() {\n }",
"int mo9690a(int i, int i2);",
"C0139e mo89b();",
"int mo5882g(String str);",
"public void mo9848a() {\n }",
"public int arn() {\n return 383;\n }",
"public void mo23813b() {\n }",
"public abstract int mo12579RS(int i);",
"void mo41086b();",
"int mo98209b();",
"void mo10148a();",
"void mo21076g();",
"public abstract int mo9797a();",
"void mo1507n();",
"public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }",
"public void mo21880v() {\n }",
"public int a(int r12, androidx.recyclerview.widget.RecyclerView.u r13) {\n /*\n r11 = this;\n e.m.a.g r0 = r11.A\n int r0 = r0.a()\n r1 = 0\n if (r0 != 0) goto L_0x000a\n return r1\n L_0x000a:\n e.m.a.b r0 = e.m.a.b.c(r12)\n int r2 = r11.f8992j\n r3 = 1\n if (r2 == 0) goto L_0x0019\n int r2 = java.lang.Math.abs(r2)\n goto L_0x0088\n L_0x0019:\n int r2 = r11.f8991i\n int r2 = r0.a(r2)\n if (r2 <= 0) goto L_0x0023\n r2 = r3\n goto L_0x0024\n L_0x0023:\n r2 = r1\n L_0x0024:\n e.m.a.b r4 = e.m.a.b.START\n if (r0 != r4) goto L_0x003d\n int r4 = r11.k\n if (r4 != 0) goto L_0x003d\n int r2 = r11.f8991i\n if (r2 != 0) goto L_0x0032\n r2 = r3\n goto L_0x0033\n L_0x0032:\n r2 = r1\n L_0x0033:\n if (r2 == 0) goto L_0x0036\n goto L_0x0055\n L_0x0036:\n int r4 = r11.f8991i\n int r4 = java.lang.Math.abs(r4)\n goto L_0x0075\n L_0x003d:\n e.m.a.b r4 = e.m.a.b.END\n if (r0 != r4) goto L_0x005e\n int r4 = r11.k\n e.m.a.g r5 = r11.A\n int r5 = r5.c()\n int r5 = r5 - r3\n if (r4 != r5) goto L_0x005e\n int r2 = r11.f8991i\n if (r2 != 0) goto L_0x0052\n r2 = r3\n goto L_0x0053\n L_0x0052:\n r2 = r1\n L_0x0053:\n if (r2 == 0) goto L_0x0057\n L_0x0055:\n r4 = r1\n goto L_0x0075\n L_0x0057:\n int r4 = r11.f8991i\n int r4 = java.lang.Math.abs(r4)\n goto L_0x0075\n L_0x005e:\n if (r2 == 0) goto L_0x006a\n int r2 = r11.f8989g\n int r4 = r11.f8991i\n int r4 = java.lang.Math.abs(r4)\n int r2 = r2 - r4\n goto L_0x0073\n L_0x006a:\n int r2 = r11.f8989g\n int r4 = r11.f8991i\n int r4 = java.lang.Math.abs(r4)\n int r2 = r2 + r4\n L_0x0073:\n r4 = r2\n r2 = r1\n L_0x0075:\n e.m.a.c$c r5 = r11.y\n com.yarolegovich.discretescrollview.DiscreteScrollView$d r5 = (com.yarolegovich.discretescrollview.DiscreteScrollView.d) r5\n com.yarolegovich.discretescrollview.DiscreteScrollView r5 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n boolean r6 = r5.f3982d\n if (r6 == 0) goto L_0x0087\n if (r2 == 0) goto L_0x0083\n r2 = r1\n goto L_0x0084\n L_0x0083:\n r2 = 2\n L_0x0084:\n r5.setOverScrollMode(r2)\n L_0x0087:\n r2 = r4\n L_0x0088:\n if (r2 > 0) goto L_0x008b\n return r1\n L_0x008b:\n int r12 = java.lang.Math.abs(r12)\n int r12 = java.lang.Math.min(r2, r12)\n int r12 = r0.a(r12)\n int r0 = r11.f8991i\n int r0 = r0 + r12\n r11.f8991i = r0\n int r0 = r11.f8992j\n if (r0 == 0) goto L_0x00a3\n int r0 = r0 - r12\n r11.f8992j = r0\n L_0x00a3:\n e.m.a.a$c r0 = r11.n\n int r1 = -r12\n e.m.a.g r2 = r11.A\n r0.a(r1, r2)\n e.m.a.a$c r0 = r11.n\n boolean r0 = r0.a(r11)\n if (r0 == 0) goto L_0x00b6\n r11.a(r13)\n L_0x00b6:\n int r13 = r11.l\n r0 = -1\n if (r13 == r0) goto L_0x00c5\n int r13 = r11.f8991i\n int r1 = r11.f8992j\n int r13 = r13 + r1\n int r13 = java.lang.Math.abs(r13)\n goto L_0x00c7\n L_0x00c5:\n int r13 = r11.f8989g\n L_0x00c7:\n float r13 = (float) r13\n r1 = -1082130432(0xffffffffbf800000, float:-1.0)\n int r2 = r11.f8991i\n float r2 = (float) r2\n float r2 = r2 / r13\n float r13 = java.lang.Math.max(r1, r2)\n r1 = 1065353216(0x3f800000, float:1.0)\n float r13 = java.lang.Math.min(r13, r1)\n float r13 = -r13\n e.m.a.c$c r1 = r11.y\n com.yarolegovich.discretescrollview.DiscreteScrollView$d r1 = (com.yarolegovich.discretescrollview.DiscreteScrollView.d) r1\n com.yarolegovich.discretescrollview.DiscreteScrollView r2 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n java.util.List<com.yarolegovich.discretescrollview.DiscreteScrollView$c> r2 = r2.f3980b\n boolean r2 = r2.isEmpty()\n if (r2 == 0) goto L_0x00e8\n goto L_0x0133\n L_0x00e8:\n com.yarolegovich.discretescrollview.DiscreteScrollView r2 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n int r2 = r2.getCurrentItem()\n com.yarolegovich.discretescrollview.DiscreteScrollView r4 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n e.m.a.c r4 = r4.f3979a\n int r5 = r4.f8991i\n if (r5 != 0) goto L_0x00f9\n int r0 = r4.k\n goto L_0x010a\n L_0x00f9:\n int r6 = r4.l\n if (r6 == r0) goto L_0x00ff\n r0 = r6\n goto L_0x010a\n L_0x00ff:\n int r0 = r4.k\n e.m.a.b r4 = e.m.a.b.c(r5)\n int r3 = r4.a(r3)\n int r0 = r0 + r3\n L_0x010a:\n if (r2 == r0) goto L_0x0133\n com.yarolegovich.discretescrollview.DiscreteScrollView r3 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n androidx.recyclerview.widget.RecyclerView$d0 r10 = r3.a(r2)\n com.yarolegovich.discretescrollview.DiscreteScrollView r1 = com.yarolegovich.discretescrollview.DiscreteScrollView.this\n androidx.recyclerview.widget.RecyclerView$d0 r1 = r1.a(r0)\n java.util.List<com.yarolegovich.discretescrollview.DiscreteScrollView$c> r3 = r3.f3980b\n java.util.Iterator r3 = r3.iterator()\n L_0x011e:\n boolean r4 = r3.hasNext()\n if (r4 == 0) goto L_0x0133\n java.lang.Object r4 = r3.next()\n com.yarolegovich.discretescrollview.DiscreteScrollView$c r4 = (com.yarolegovich.discretescrollview.DiscreteScrollView.c) r4\n r5 = r13\n r6 = r2\n r7 = r0\n r8 = r10\n r9 = r1\n r4.a(r5, r6, r7, r8, r9)\n goto L_0x011e\n L_0x0133:\n r11.a()\n return r12\n */\n throw new UnsupportedOperationException(\"Method not decompiled: e.m.a.c.a(int, androidx.recyclerview.widget.RecyclerView$u):int\");\n }",
"void mo11024a(int i, int i2, String str);",
"dkj mo4367a(dkk dkk);",
"public void mo115188a() {\n }"
] | [
"0.6071492",
"0.60259265",
"0.59617686",
"0.5755471",
"0.5675237",
"0.56319857",
"0.56043756",
"0.5598948",
"0.5567393",
"0.55448395",
"0.5537525",
"0.55330753",
"0.5532362",
"0.5529561",
"0.552584",
"0.551564",
"0.5511368",
"0.5503281",
"0.5497172",
"0.54952854",
"0.54924303",
"0.54865444",
"0.5466368",
"0.5464982",
"0.54506725",
"0.5448216",
"0.5446521",
"0.5446488",
"0.54432577",
"0.54408467",
"0.54376745",
"0.5432087",
"0.5431058",
"0.5426127",
"0.54213494",
"0.5419124",
"0.5416156",
"0.54115444",
"0.54096746",
"0.53861487",
"0.53805226",
"0.53785247",
"0.5375838",
"0.53742486",
"0.53711206",
"0.5365753",
"0.53587747",
"0.5358459",
"0.5351644",
"0.53515375",
"0.53469574",
"0.5346769",
"0.534546",
"0.5333556",
"0.53237355",
"0.53166527",
"0.53109384",
"0.5309968",
"0.53033596",
"0.53023976",
"0.5293997",
"0.5282122",
"0.52753854",
"0.52746546",
"0.526919",
"0.52623314",
"0.52602017",
"0.52580786",
"0.52567947",
"0.5250769",
"0.5250527",
"0.5249554",
"0.524915",
"0.5248508",
"0.52473783",
"0.52455354",
"0.5238095",
"0.5237154",
"0.52366763",
"0.5235589",
"0.52327573",
"0.5229792",
"0.52270114",
"0.5223277",
"0.52229583",
"0.5222668",
"0.5221667",
"0.5221292",
"0.5219452",
"0.52158403",
"0.52135426",
"0.5207546",
"0.52066666",
"0.520427",
"0.52035326",
"0.52024865",
"0.5202453",
"0.5201715",
"0.5201209",
"0.5194834",
"0.51918024"
] | 0.0 | -1 |
/ 114: / 115: | public void setServicioFacturaProveedorSRI(ServicioFacturaProveedorSRI servicioFacturaProveedorSRI)
/* 116: */ {
/* 117:133 */ this.servicioFacturaProveedorSRI = servicioFacturaProveedorSRI;
/* 118: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mo12628c() {\n }",
"C2451d mo3408a(C2457e c2457e);",
"private byte m1654g() {\n char charAt;\n do {\n int i = this.f2519d;\n if (i >= this.f2518c) {\n return 12;\n }\n CharSequence charSequence = this.f2516a;\n this.f2519d = i + 1;\n charAt = charSequence.charAt(i);\n this.f2520e = charAt;\n } while (charAt != ';');\n return 12;\n }",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"C2841w mo7234g();",
"private byte m1655h() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n char charAt2 = charSequence.charAt(i3);\n this.f2520e = charAt2;\n if (charAt2 == '<') {\n return 12;\n }\n if (charAt2 == '>') {\n break;\n } else if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i4 = this.f2519d;\n if (i4 <= 0) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n int i5 = i4 - 1;\n this.f2519d = i5;\n charAt = charSequence2.charAt(i5);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n }\n this.f2519d = i;\n this.f2520e = '>';\n return 13;\n }",
"C5727e mo33224a();",
"void mo12637b();",
"private void a(String paramString, boolean paramBoolean)\r\n/* 282: */ {\r\n/* 283:293 */ for (int i1 = 0; i1 < paramString.length(); i1++)\r\n/* 284: */ {\r\n/* 285:294 */ char c1 = paramString.charAt(i1);\r\n/* 286: */ int i2;\r\n/* 287: */ int i3;\r\n/* 288:296 */ if ((c1 == '§') && (i1 + 1 < paramString.length()))\r\n/* 289: */ {\r\n/* 290:297 */ i2 = \"0123456789abcdefklmnor\".indexOf(paramString.toLowerCase().charAt(i1 + 1));\r\n/* 291:299 */ if (i2 < 16)\r\n/* 292: */ {\r\n/* 293:300 */ this.r = false;\r\n/* 294:301 */ this.s = false;\r\n/* 295:302 */ this.v = false;\r\n/* 296:303 */ this.u = false;\r\n/* 297:304 */ this.t = false;\r\n/* 298:305 */ if ((i2 < 0) || (i2 > 15)) {\r\n/* 299:306 */ i2 = 15;\r\n/* 300: */ }\r\n/* 301:309 */ if (paramBoolean) {\r\n/* 302:310 */ i2 += 16;\r\n/* 303: */ }\r\n/* 304:313 */ i3 = this.f[i2];\r\n/* 305:314 */ this.q = i3;\r\n/* 306:315 */ cjm.c((i3 >> 16) / 255.0F, (i3 >> 8 & 0xFF) / 255.0F, (i3 & 0xFF) / 255.0F, this.p);\r\n/* 307: */ }\r\n/* 308:316 */ else if (i2 == 16)\r\n/* 309: */ {\r\n/* 310:317 */ this.r = true;\r\n/* 311: */ }\r\n/* 312:318 */ else if (i2 == 17)\r\n/* 313: */ {\r\n/* 314:319 */ this.s = true;\r\n/* 315: */ }\r\n/* 316:320 */ else if (i2 == 18)\r\n/* 317: */ {\r\n/* 318:321 */ this.v = true;\r\n/* 319: */ }\r\n/* 320:322 */ else if (i2 == 19)\r\n/* 321: */ {\r\n/* 322:323 */ this.u = true;\r\n/* 323: */ }\r\n/* 324:324 */ else if (i2 == 20)\r\n/* 325: */ {\r\n/* 326:325 */ this.t = true;\r\n/* 327: */ }\r\n/* 328:326 */ else if (i2 == 21)\r\n/* 329: */ {\r\n/* 330:327 */ this.r = false;\r\n/* 331:328 */ this.s = false;\r\n/* 332:329 */ this.v = false;\r\n/* 333:330 */ this.u = false;\r\n/* 334:331 */ this.t = false;\r\n/* 335: */ \r\n/* 336:333 */ cjm.c(this.m, this.n, this.o, this.p);\r\n/* 337: */ }\r\n/* 338:336 */ i1++;\r\n/* 339: */ }\r\n/* 340: */ else\r\n/* 341: */ {\r\n/* 342:340 */ i2 = \"\".indexOf(c1);\r\n/* 343:342 */ if ((this.r) && (i2 != -1))\r\n/* 344: */ {\r\n/* 345: */ do\r\n/* 346: */ {\r\n/* 347:345 */ i3 = this.b.nextInt(this.d.length);\r\n/* 348:346 */ } while (this.d[i2] != this.d[i3]);\r\n/* 349:347 */ i2 = i3;\r\n/* 350: */ }\r\n/* 351:353 */ float f1 = this.k ? 0.5F : 1.0F;\r\n/* 352:354 */ int i4 = ((c1 == 0) || (i2 == -1) || (this.k)) && (paramBoolean) ? 1 : 0;\r\n/* 353:356 */ if (i4 != 0)\r\n/* 354: */ {\r\n/* 355:357 */ this.i -= f1;\r\n/* 356:358 */ this.j -= f1;\r\n/* 357: */ }\r\n/* 358:360 */ float f2 = a(i2, c1, this.t);\r\n/* 359:361 */ if (i4 != 0)\r\n/* 360: */ {\r\n/* 361:362 */ this.i += f1;\r\n/* 362:363 */ this.j += f1;\r\n/* 363: */ }\r\n/* 364:366 */ if (this.s)\r\n/* 365: */ {\r\n/* 366:367 */ this.i += f1;\r\n/* 367:368 */ if (i4 != 0)\r\n/* 368: */ {\r\n/* 369:369 */ this.i -= f1;\r\n/* 370:370 */ this.j -= f1;\r\n/* 371: */ }\r\n/* 372:372 */ a(i2, c1, this.t);\r\n/* 373:373 */ this.i -= f1;\r\n/* 374:374 */ if (i4 != 0)\r\n/* 375: */ {\r\n/* 376:375 */ this.i += f1;\r\n/* 377:376 */ this.j += f1;\r\n/* 378: */ }\r\n/* 379:378 */ f2 += 1.0F;\r\n/* 380: */ }\r\n/* 381: */ ckx localckx;\r\n/* 382: */ VertexBuffer localciv;\r\n/* 383:381 */ if (this.v)\r\n/* 384: */ {\r\n/* 385:382 */ localckx = ckx.getInstance();\r\n/* 386:383 */ localciv = localckx.getBuffer();\r\n/* 387:384 */ cjm.x();\r\n/* 388:385 */ localciv.begin();\r\n/* 389:386 */ localciv.addVertex(this.i, this.j + this.a / 2, 0.0D);\r\n/* 390:387 */ localciv.addVertex(this.i + f2, this.j + this.a / 2, 0.0D);\r\n/* 391:388 */ localciv.addVertex(this.i + f2, this.j + this.a / 2 - 1.0F, 0.0D);\r\n/* 392:389 */ localciv.addVertex(this.i, this.j + this.a / 2 - 1.0F, 0.0D);\r\n/* 393:390 */ localckx.draw();\r\n/* 394:391 */ cjm.w();\r\n/* 395: */ }\r\n/* 396:394 */ if (this.u)\r\n/* 397: */ {\r\n/* 398:395 */ localckx = ckx.getInstance();\r\n/* 399:396 */ localciv = localckx.getBuffer();\r\n/* 400:397 */ cjm.x();\r\n/* 401:398 */ localciv.begin();\r\n/* 402:399 */ int i5 = this.u ? -1 : 0;\r\n/* 403:400 */ localciv.addVertex(this.i + i5, this.j + this.a, 0.0D);\r\n/* 404:401 */ localciv.addVertex(this.i + f2, this.j + this.a, 0.0D);\r\n/* 405:402 */ localciv.addVertex(this.i + f2, this.j + this.a - 1.0F, 0.0D);\r\n/* 406:403 */ localciv.addVertex(this.i + i5, this.j + this.a - 1.0F, 0.0D);\r\n/* 407:404 */ localckx.draw();\r\n/* 408:405 */ cjm.w();\r\n/* 409: */ }\r\n/* 410:408 */ this.i += (int)f2;\r\n/* 411: */ }\r\n/* 412: */ }\r\n/* 413: */ }",
"C15430g mo56154a();",
"public abstract String mo11611b();",
"private void m27464b() {\n this.f25306u = 0;\n this.f25307v = 0;\n if (this.f25277aa) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(0)));\n } else if (m27462a(this.f25273T)) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(this.f25273T)));\n } else if (!TextUtils.isEmpty(this.f25302q)) {\n this.f25306u = (int) this.f25288c.measureText(this.f25302q);\n } else {\n for (Object valueOf : this.f25301p) {\n this.f25306u = Math.max(this.f25306u, (int) this.f25288c.measureText(String.valueOf(valueOf)));\n }\n }\n FontMetrics fontMetrics = this.f25288c.getFontMetrics();\n this.f25307v = (int) (fontMetrics.bottom - fontMetrics.top);\n }",
"private final void m46511P() {\n C15593cd.m50346a(this.f40707H.f44224a, this.f40705F, \"aeh2\");\n }",
"private void m81856t() {\n try {\n String c = m81844c(C6969H.m41409d(\"G738BEA0DBA32BD20E319AF5CEBF5C6\"));\n if (!TextUtils.isEmpty(c)) {\n this.f58084p = Integer.parseInt(c);\n }\n } catch (Exception e) {\n WebUtil.m68654a(C6969H.m41409d(\"G5C91D93EBA3CAE2EE71A95\"), e.getMessage());\n }\n }",
"private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }",
"public void mo115190b() {\n }",
"String getBbgSymbol();",
"C1458cs mo7613iS();",
"static void dcx_rp(String passed){\n\t\tint h,l;\n\t\tswitch(passed.charAt(4)){\n\t\tcase 'B':\n\t\t\th = hexa_to_deci(registers.get('B'));\n\t\t\tl = hexa_to_deci(registers.get('C'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\tregisters.put('C',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('B',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\tcase 'D':\n\t\t\th = hexa_to_deci(registers.get('D'));\n\t\t\tl = hexa_to_deci(registers.get('E'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('E',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('D',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\tcase 'H':\n\t\t\th = hexa_to_deci(registers.get('H'));\n\t\t\tl = hexa_to_deci(registers.get('L'));\n\t\t\tl--;\n\t\t\tif(l==-1)\n\t\t\t\th--;\n\t\t\tif(l==-1)\n\t\t\t\tl=255;\n\t\t\tif(h==-1)\n\t\t\t\th=255;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('L',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('H',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\t}\n\t}",
"private byte m1656i() {\n char charAt;\n int i = this.f2519d;\n while (true) {\n int i2 = this.f2519d;\n if (i2 < this.f2518c) {\n CharSequence charSequence = this.f2516a;\n this.f2519d = i2 + 1;\n char charAt2 = charSequence.charAt(i2);\n this.f2520e = charAt2;\n if (charAt2 == '>') {\n return 12;\n }\n if (charAt2 == '\\\"' || charAt2 == '\\'') {\n do {\n int i3 = this.f2519d;\n if (i3 >= this.f2518c) {\n break;\n }\n CharSequence charSequence2 = this.f2516a;\n this.f2519d = i3 + 1;\n charAt = charSequence2.charAt(i3);\n this.f2520e = charAt;\n } while (charAt != charAt2);\n }\n } else {\n this.f2519d = i;\n this.f2520e = '<';\n return 13;\n }\n }\n }",
"String mo38971b();",
"@Test(timeout = 4000)\n public void test056() throws Throwable {\n StringReader stringReader0 = new StringReader(\"+%WC\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0);\n javaCharStream0.backup(416);\n javaCharStream0.BeginToken();\n javaCharStream0.adjustBeginLineColumn(416, 416);\n assertEquals(3680, javaCharStream0.bufpos);\n }",
"void mo304a(C0366h c0366h);",
"static void inx_rp(String passed){\n\t\tint h,l;\n\t\tswitch(passed.charAt(4)){\n\t\tcase 'B':\n\t\t\th = hexa_to_deci(registers.get('B'));\n\t\t\tl = hexa_to_deci(registers.get('C'));\n\t\t\tl++;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('C',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('B',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\tcase 'D':\n\t\t\th = hexa_to_deci(registers.get('D'));\n\t\t\tl = hexa_to_deci(registers.get('E'));\n\t\t\tl++;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('E',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('D',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\tcase 'H':\n\t\t\th = hexa_to_deci(registers.get('H'));\n\t\t\tl = hexa_to_deci(registers.get('L'));\n\t\t\tl++;\n\t\t\th+=(l>255?1:0);\n\t\t\tregisters.put('L',decimel_to_hexa_8bit(l));\n\t\t\tregisters.put('H',decimel_to_hexa_8bit(h));\n\t\t\tbreak;\n\t\t}\n\t}",
"C12000e mo41087c(String str);",
"void mo4874b(C4718l c4718l);",
"@Test(timeout = 4000)\n public void test029() throws Throwable {\n StringReader stringReader0 = new StringReader(\"GD}>zPHIT2VcF.\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 0, 0, 1847);\n javaCharStream0.adjustBeginLineColumn((-2819), 2281);\n int int0 = javaCharStream0.getBeginLine();\n assertEquals((-2818), int0);\n }",
"String mo20730b();",
"String mo20731c();",
"private void m81850n() {\n m81843b(m81844c(C6969H.m41409d(\"G738BEA12B634AE16F20F9277F0E4D1\")));\n }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"private static String m11g() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n stringBuilder.append(\"_ve\");\n stringBuilder.append(\"rs\");\n stringBuilder.append(\"i\");\n stringBuilder.append(\"on\");\n return stringBuilder.toString();\n }",
"public void mo21783H() {\n }",
"public static void main(String[] args) {\r\n\t\tint e=437;\r\n\t\tint a=0;\r\n\t\twhile(e>0)\r\n\t\t{\r\n\t\t\ta=e%10;\r\n\t\tSystem.out.print(a);\r\n\t\t\ta=e/10;\r\n\t\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"void mo4873a(C4718l c4718l);",
"void mo8712a(C9714a c9714a);",
"void mo5290b(C5102c c5102c);",
"public void print1T0255(){\n StringBuilder out = new StringBuilder();\n for (int i = 1; i <= 255; i++){\n out.append( i + \" \");\n }\n System.out.println( out.toString());\n }",
"public void mo21782G() {\n }",
"@Override\n\t\tpublic char[] getPrintChars() {\n\t\t\tif(this.color == RedBlackTree.BLACK){\n\t\t\t\tString intString = data.toString()+\"(B)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\tString intString = data.toString()+\"(R)\";\n\t\t\t\treturn intString.toCharArray();\n\t\t\t}\n\t\t\t\n\t\t}",
"public void mo3795b(String str) {\n float f;\n if (str == null || str.length() == 0) {\n this.f1432G = 0.0f;\n return;\n }\n int i = -1;\n int length = str.length();\n int indexOf = str.indexOf(44);\n int i2 = 0;\n if (indexOf > 0 && indexOf < length - 1) {\n String substring = str.substring(0, indexOf);\n if (substring.equalsIgnoreCase(QLog.TAG_REPORTLEVEL_COLORUSER)) {\n i = 0;\n } else if (substring.equalsIgnoreCase(\"H\")) {\n i = 1;\n }\n i2 = indexOf + 1;\n }\n int indexOf2 = str.indexOf(58);\n if (indexOf2 < 0 || indexOf2 >= length - 1) {\n String substring2 = str.substring(i2);\n if (substring2.length() > 0) {\n try {\n f = Float.parseFloat(substring2);\n } catch (NumberFormatException unused) {\n }\n }\n f = 0.0f;\n } else {\n String substring3 = str.substring(i2, indexOf2);\n String substring4 = str.substring(indexOf2 + 1);\n if (substring3.length() > 0 && substring4.length() > 0) {\n try {\n float parseFloat = Float.parseFloat(substring3);\n float parseFloat2 = Float.parseFloat(substring4);\n f = (parseFloat <= 0.0f || parseFloat2 <= 0.0f) ? 0.0f : i == 1 ? Math.abs(parseFloat2 / parseFloat) : Math.abs(parseFloat / parseFloat2);\n } catch (NumberFormatException unused2) {\n }\n }\n f = 0.0f;\n }\n if (f > 0.0f) {\n this.f1432G = f;\n this.f1433H = i;\n }\n }",
"public int captureCodeFragment04(int x, int y) {\r\n return x + y;\r\n }",
"C4945r5 mo19056B();",
"long getUnknown72();",
"void mo5289a(C5102c c5102c);",
"@Test\n\tpublic void testBytesToHexStringForSrcMode() throws Exception {\n//TODO: Test goes here... \n\t}",
"@Override\r\n\tpublic int getcc() {\n\t\treturn 120;\r\n\t}",
"private static String m66046a(byte[] bArr) {\n int i = 0;\n int i2 = 0;\n int i3 = -1;\n int i4 = 0;\n while (i2 < bArr.length) {\n int i5 = i2;\n while (i5 < 16 && bArr[i5] == 0 && bArr[i5 + 1] == 0) {\n i5 += 2;\n }\n int i6 = i5 - i2;\n if (i6 > i4 && i6 >= 4) {\n i3 = i2;\n i4 = i6;\n }\n i2 = i5 + 2;\n }\n C13887c cVar = new C13887c();\n while (i < bArr.length) {\n if (i == i3) {\n cVar.writeByte(58);\n i += i4;\n if (i == 16) {\n cVar.writeByte(58);\n }\n } else {\n if (i > 0) {\n cVar.writeByte(58);\n }\n cVar.m59547e((long) (((bArr[i] & 255) << 8) | (bArr[i + 1] & 255)));\n i += 2;\n }\n }\n return cVar.mo43923w();\n }",
"C7904c mo24084a();",
"public static void main(String[] args) {\n\t\tchar aa = '\\u0000';\r\n\t\tchar a = '\\u0041';\r\n\t\tchar b = '\\u0042';\r\n\t\tchar c = '\\u0043';\r\n\t\tchar d = '\\u0044';\r\n\t\tchar e = '\\u0045';\r\n\t\tchar f = '\\u0046';\r\n\t\tchar g = '\\u0047';\r\n\t\tchar h = '\\u0048';\r\n\t\tchar i = '\\u0049';\r\n\t\tchar j = '\\u004A';\r\n\t\tchar k = '\\u004B';\r\n\t\tchar l = '\\u004C';\r\n\t\tchar m = '\\u004D';\r\n\t\tchar n = '\\u004E';\r\n\t\tchar o = '\\u004F';\r\n\t\tchar p = '\\u0051';\r\n\t\tchar q = '\\u0051';\r\n\t\tchar r = '\\u0052';\r\n\t\tchar s = '\\u0053';\r\n\t\tchar t = '\\u0054';\r\n\t\tchar u = '\\u0055';\r\n\t\tchar v = '\\u0056';\r\n\t\tchar w = '\\u0057';\r\n\t\tchar x = '\\u0058';\r\n\t\tchar y = '\\u0059';\r\n\t\tchar z = '\\u0060';\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(+i+\"\"+aa+\"\"+w+\"\"+i+\"\"+s+\"\"+h+\"\"+aa+\"\"+t+\"\"+o+\"\"+aa+\"\"+p+\"\"+e+\"\"+r+\"\"+i+\"\"+s+\"\"+h);\r\n\t}",
"protected void engineReset()\r\n/* 79: */ {\r\n/* 80:143 */ this.V00 = IV[0];\r\n/* 81:144 */ this.V01 = IV[1];\r\n/* 82:145 */ this.V02 = IV[2];\r\n/* 83:146 */ this.V03 = IV[3];\r\n/* 84:147 */ this.V04 = IV[4];\r\n/* 85:148 */ this.V05 = IV[5];\r\n/* 86:149 */ this.V06 = IV[6];\r\n/* 87:150 */ this.V07 = IV[7];\r\n/* 88:151 */ this.V10 = IV[8];\r\n/* 89:152 */ this.V11 = IV[9];\r\n/* 90:153 */ this.V12 = IV[10];\r\n/* 91:154 */ this.V13 = IV[11];\r\n/* 92:155 */ this.V14 = IV[12];\r\n/* 93:156 */ this.V15 = IV[13];\r\n/* 94:157 */ this.V16 = IV[14];\r\n/* 95:158 */ this.V17 = IV[15];\r\n/* 96:159 */ this.V20 = IV[16];\r\n/* 97:160 */ this.V21 = IV[17];\r\n/* 98:161 */ this.V22 = IV[18];\r\n/* 99:162 */ this.V23 = IV[19];\r\n/* 100:163 */ this.V24 = IV[20];\r\n/* 101:164 */ this.V25 = IV[21];\r\n/* 102:165 */ this.V26 = IV[22];\r\n/* 103:166 */ this.V27 = IV[23];\r\n/* 104: */ }",
"byte mo30283c();",
"private final java.lang.String m14284g() {\n /*\n r3 = this;\n b.h.b.a.b.b.ah r0 = r3.f8347b\n b.h.b.a.b.b.m r0 = r0.mo7065b()\n b.h.b.a.b.b.ah r1 = r3.f8347b\n b.h.b.a.b.b.az r1 = r1.mo7077p()\n b.h.b.a.b.b.az r2 = p073b.p085h.p087b.p088a.p090b.p094b.C1710ay.f5339d\n boolean r1 = p073b.p079e.p081b.C1489j.m6971a(r1, r2)\n if (r1 == 0) goto L_0x0056\n boolean r1 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2608e\n if (r1 == 0) goto L_0x0056\n b.h.b.a.b.j.a.a.e r0 = (p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2608e) r0\n b.h.b.a.b.e.a$c r0 = r0.mo9643H()\n b.h.b.a.b.g.i$c r0 = (p073b.p085h.p087b.p088a.p090b.p117g.C2383i.C2387c) r0\n b.h.b.a.b.g.i$f<b.h.b.a.b.e.a$c, java.lang.Integer> r1 = p073b.p085h.p087b.p088a.p090b.p112e.p114b.C2330b.f7137i\n java.lang.String r2 = \"JvmProtoBuf.classModuleName\"\n p073b.p079e.p081b.C1489j.m6969a(r1, r2)\n java.lang.Object r0 = p073b.p085h.p087b.p088a.p090b.p112e.p113a.C2288f.m11197a(r0, r1)\n java.lang.Integer r0 = (java.lang.Integer) r0\n if (r0 == 0) goto L_0x003e\n b.h.b.a.b.e.a.c r1 = r3.f8350e\n java.lang.Number r0 = (java.lang.Number) r0\n int r0 = r0.intValue()\n java.lang.String r0 = r1.mo8811a(r0)\n if (r0 == 0) goto L_0x003e\n goto L_0x0040\n L_0x003e:\n java.lang.String r0 = \"main\"\n L_0x0040:\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"$\"\n r1.append(r2)\n java.lang.String r0 = p073b.p085h.p087b.p088a.p090b.p116f.C2361g.m11709a(r0)\n r1.append(r0)\n java.lang.String r0 = r1.toString()\n return r0\n L_0x0056:\n b.h.b.a.b.b.ah r1 = r3.f8347b\n b.h.b.a.b.b.az r1 = r1.mo7077p()\n b.h.b.a.b.b.az r2 = p073b.p085h.p087b.p088a.p090b.p094b.C1710ay.f5336a\n boolean r1 = p073b.p079e.p081b.C1489j.m6971a(r1, r2)\n if (r1 == 0) goto L_0x00a0\n boolean r0 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p094b.C1680ab\n if (r0 == 0) goto L_0x00a0\n b.h.b.a.b.b.ah r0 = r3.f8347b\n if (r0 == 0) goto L_0x0098\n b.h.b.a.b.j.a.a.j r0 = (p073b.p085h.p087b.p088a.p090b.p127j.p128a.p129a.C2638j) r0\n b.h.b.a.b.j.a.a.f r0 = r0.mo9635N()\n boolean r1 = r0 instanceof p073b.p085h.p087b.p088a.p090b.p100d.p110b.C2129i\n if (r1 == 0) goto L_0x00a0\n b.h.b.a.b.d.b.i r0 = (p073b.p085h.p087b.p088a.p090b.p100d.p110b.C2129i) r0\n b.h.b.a.b.i.d.b r1 = r0.mo8045e()\n if (r1 == 0) goto L_0x00a0\n java.lang.StringBuilder r1 = new java.lang.StringBuilder\n r1.<init>()\n java.lang.String r2 = \"$\"\n r1.append(r2)\n b.h.b.a.b.f.f r0 = r0.mo8042b()\n java.lang.String r0 = r0.mo9039a()\n r1.append(r0)\n java.lang.String r0 = r1.toString()\n return r0\n L_0x0098:\n b.u r0 = new b.u\n java.lang.String r1 = \"null cannot be cast to non-null type org.jetbrains.kotlin.serialization.deserialization.descriptors.DeserializedPropertyDescriptor\"\n r0.<init>(r1)\n throw r0\n L_0x00a0:\n java.lang.String r0 = \"\"\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p073b.p085h.p087b.p088a.C3008g.C3011c.m14284g():java.lang.String\");\n }",
"A6E(int i) {\n this.A00 = i;\n }",
"C3676k mo12649b();",
"public int mo27008h() {\n TextView textView = this.f24577q;\n if (textView != null) {\n return textView.getCurrentTextColor();\n }\n return -1;\n }",
"private static int getPrevCC(PrevArgs paramPrevArgs)\n/* */ {\n/* 574 */ return (int)(0xFF & getPrevNorm32(paramPrevArgs, 768, 65280) >> 8);\n/* */ }",
"void mo57278c();",
"public final void mo1308a() {\n int i = this.f2309d;\n int i2 = i != Integer.MIN_VALUE ? i + this.f2308c : this.f2307b;\n this.f2309d = i2;\n String str = this.f2306a;\n StringBuilder sb = new StringBuilder(String.valueOf(str).length() + 11);\n sb.append(str);\n sb.append(i2);\n this.f2310e = sb.toString();\n }",
"public static void main(String[] args) {\n\t\t\tSystem.out.println(\"14CM0132\\n山出 達也\");\n\t\t\t\n\t}",
"public abstract String mo118046b();",
"private void b044904490449щ0449щ() {\n /*\n r7 = this;\n r0 = new rrrrrr.ccrcrc;\n r1 = new java.lang.StringBuilder;\n r1.<init>();\n r2 = r7.bнн043Dннн;\n r2 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r2);\n r2 = r2.getFilesDir();\n r1 = r1.append(r2);\n r2 = java.io.File.separator;\n r1 = r1.append(r2);\n L_0x001b:\n r2 = 1;\n switch(r2) {\n case 0: goto L_0x001b;\n case 1: goto L_0x0024;\n default: goto L_0x001f;\n };\n L_0x001f:\n r2 = 0;\n switch(r2) {\n case 0: goto L_0x0024;\n case 1: goto L_0x001b;\n default: goto L_0x0023;\n };\n L_0x0023:\n goto L_0x001f;\n L_0x0024:\n r2 = \"3HC4C-01.txt\";\n r1 = r1.append(r2);\n r1 = r1.toString();\n r0.<init>(r1);\n r0.load();\n L_0x0034:\n r1 = r0.size();\n if (r1 <= 0) goto L_0x007a;\n L_0x003a:\n r1 = r0.peek();\n r2 = new rrrrrr.rcccrr;\n r2.<init>();\n r3 = r7.bнн043Dннн;\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044Cь044C044Cьь(r3);\n monitor-enter(r3);\n r4 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r4 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r4);\t Catch:{ all -> 0x0074 }\n r4 = r4.bЛ041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r5 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r5 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r5);\t Catch:{ all -> 0x0074 }\n r5 = r5.b041B041B041BЛ041BЛ;\t Catch:{ all -> 0x0074 }\n r6 = r7.bнн043Dннн;\t Catch:{ all -> 0x0074 }\n r6 = com.immersion.aws.analytics.ImmrAnalytics.bь044C044C044Cьь(r6);\t Catch:{ all -> 0x0074 }\n r6 = r6.bЛЛЛ041B041BЛ;\t Catch:{ all -> 0x0074 }\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n r1 = r2.sendHttpRequestFromCache(r4, r5, r6, r1);\n if (r1 == 0) goto L_0x0077;\n L_0x0069:\n if (r4 == 0) goto L_0x0077;\n L_0x006b:\n if (r5 == 0) goto L_0x0077;\n L_0x006d:\n r0.remove();\n r0.save();\n goto L_0x0034;\n L_0x0074:\n r0 = move-exception;\n monitor-exit(r3);\t Catch:{ all -> 0x0074 }\n throw r0;\n L_0x0077:\n r0.save();\n L_0x007a:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.b044904490449щ0449щ():void\");\n }",
"@Override\n\tpublic void teclaCorrigeDigitada() {\n\t\t\n\t}",
"long mo1685a(C2369e c2369e);",
"static void sui_with_acc(String passed){\n\t\tint subt = hexa_to_deci(registers.get('A'));\n\t\tint minu = hexa_to_deci(passed.substring(4));\n\t\tminu = 256-minu;\n\t\tminu%=256;\n\t\tsubt+=minu;\n\t\tCS = subt>255?true:false;\n\t\tregisters.put('A', decimel_to_hexa_8bit(subt));\n\t\tmodify_status(registers.get('A'));\n\t}",
"int getUnknown13();",
"C12017a mo41088c();",
"private void outDec(){\n\t\tSystem.out.println(binary);\n\t\tpw.println(binary);\n\t\t\n\t}",
"@Test(timeout = 4000)\n public void test108() throws Throwable {\n StringReader stringReader0 = new StringReader(\"^z{b>wblu8^IJ+?\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, 21, 47, 21);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n javaParserTokenManager0.getNextToken();\n assertEquals(0, javaCharStream0.bufpos);\n assertEquals(47, javaCharStream0.getColumn());\n }",
"public void mo9233aH() {\n }",
"public void mo21794S() {\n }",
"private byte m1653f() {\n char charAt;\n int i = this.f2519d;\n do {\n int i2 = this.f2519d;\n if (i2 <= 0) {\n break;\n }\n CharSequence charSequence = this.f2516a;\n int i3 = i2 - 1;\n this.f2519d = i3;\n charAt = charSequence.charAt(i3);\n this.f2520e = charAt;\n if (charAt == '&') {\n return 12;\n }\n } while (charAt != ';');\n this.f2519d = i;\n this.f2520e = ';';\n return 13;\n }",
"public void mo115188a() {\n }",
"private String processBytes(String bytes){\n Pattern p = Pattern.compile(\"170-180\");\r\n Matcher m = p.matcher(bytes);\r\n //find two bounds\r\n int posi[] = new int[2];\r\n for(int i=0;i<2;i++){\r\n if(m.find()) posi[i] = m.start();\r\n }\r\n //Cut string\r\n return bytes.substring(posi[0], posi[1]);\r\n }",
"public String toString() {\n/* 96 */ return \"Outline (Zigzag)\";\n/* */ }",
"void ciff_block_1030()\n{\n int key[] = new int[2];\n key[0] = 0x410;\n key[1] = 0x45f3;\n int i, bpp, row, col, vbits=0;\n long bitbuf=0;\n\n get2();\n if ((get4()) != 0x80008 || get4()==0) return;\n bpp = get2();\n if (bpp != 10 && bpp != 12) return;\n for (i=row=0; row < 8; row++)\n for (col=0; col < 8; col++) {\n if (vbits < bpp) {\n\tbitbuf = bitbuf << 16 | (get2() ^ key[i++ & 1]);\n\tvbits += 16;\n }\n white[row][col] = ( char)( bitbuf << (LONG_BIT - vbits) >> (LONG_BIT - bpp));\n vbits -= bpp;\n }\n}",
"public final void zzy(int i) throws zzlm {\n zznu zznu;\n int i2;\n int i3 = 0;\n if (i != 160) {\n if (i == 174) {\n String str = this.zzbal.zzaor;\n if (\"V_VP8\".equals(str) || \"V_VP9\".equals(str) || \"V_MPEG2\".equals(str) || \"V_MPEG4/ISO/SP\".equals(str) || \"V_MPEG4/ISO/ASP\".equals(str) || \"V_MPEG4/ISO/AP\".equals(str) || \"V_MPEG4/ISO/AVC\".equals(str) || \"V_MPEGH/ISO/HEVC\".equals(str) || \"V_MS/VFW/FOURCC\".equals(str) || \"V_THEORA\".equals(str) || \"A_OPUS\".equals(str) || \"A_VORBIS\".equals(str) || \"A_AAC\".equals(str) || \"A_MPEG/L2\".equals(str) || \"A_MPEG/L3\".equals(str) || \"A_AC3\".equals(str) || \"A_EAC3\".equals(str) || \"A_TRUEHD\".equals(str) || \"A_DTS\".equals(str) || \"A_DTS/EXPRESS\".equals(str) || \"A_DTS/LOSSLESS\".equals(str) || \"A_FLAC\".equals(str) || \"A_MS/ACM\".equals(str) || \"A_PCM/INT/LIT\".equals(str) || \"S_TEXT/UTF8\".equals(str) || \"S_VOBSUB\".equals(str) || \"S_HDMV/PGS\".equals(str) || \"S_DVBSUB\".equals(str)) {\n i3 = 1;\n }\n if (i3 != 0) {\n this.zzbal.zza(this.zzbbf, this.zzbal.number);\n this.zzazy.put(this.zzbal.number, this.zzbal);\n }\n this.zzbal = null;\n } else if (i != 19899) {\n if (i != 25152) {\n if (i != 28032) {\n if (i == 357149030) {\n if (this.zzanu == C1470C.TIME_UNSET) {\n this.zzanu = 1000000;\n }\n if (this.zzbak != C1470C.TIME_UNSET) {\n this.zzack = zzdw(this.zzbak);\n }\n } else if (i != 374648427) {\n if (i == 475249515 && !this.zzbam) {\n zznp zznp = this.zzbbf;\n if (this.zzans == -1 || this.zzack == C1470C.TIME_UNSET || this.zzban == null || this.zzban.size() == 0 || this.zzbao == null || this.zzbao.size() != this.zzban.size()) {\n this.zzban = null;\n this.zzbao = null;\n zznu = new zznv(this.zzack);\n } else {\n int size = this.zzban.size();\n int[] iArr = new int[size];\n long[] jArr = new long[size];\n long[] jArr2 = new long[size];\n long[] jArr3 = new long[size];\n for (int i4 = 0; i4 < size; i4++) {\n jArr3[i4] = this.zzban.get(i4);\n jArr[i4] = this.zzans + this.zzbao.get(i4);\n }\n while (true) {\n i2 = size - 1;\n if (i3 >= i2) {\n break;\n }\n int i5 = i3 + 1;\n iArr[i3] = (int) (jArr[i5] - jArr[i3]);\n jArr2[i3] = jArr3[i5] - jArr3[i3];\n i3 = i5;\n }\n iArr[i2] = (int) ((this.zzans + this.zzant) - jArr[i2]);\n jArr2[i2] = this.zzack - jArr3[i2];\n this.zzban = null;\n this.zzbao = null;\n zznu = new zznl(iArr, jArr, jArr2, jArr3);\n }\n zznp.zza(zznu);\n this.zzbam = true;\n }\n } else if (this.zzazy.size() != 0) {\n this.zzbbf.zzfi();\n } else {\n throw new zzlm(\"No valid tracks were found\");\n }\n } else if (this.zzbal.zzaos && this.zzbal.zzbbi != null) {\n throw new zzlm(\"Combining encryption and compression is not supported\");\n }\n } else if (!this.zzbal.zzaos) {\n } else {\n if (this.zzbal.zzbbj != null) {\n this.zzbal.zzatr = new zzne(new zzne.zza(zzkt.zzarg, MimeTypes.VIDEO_WEBM, this.zzbal.zzbbj.zzazq));\n return;\n }\n throw new zzlm(\"Encrypted Track found but ContentEncKeyID was not found\");\n }\n } else if (this.zzanz == -1 || this.zzaoa == -1) {\n throw new zzlm(\"Mandatory element SeekID or SeekPosition not found\");\n } else if (this.zzanz == 475249515) {\n this.zzaoc = this.zzaoa;\n }\n } else if (this.zzbap == 2) {\n if (!this.zzaop) {\n this.zzbax |= 1;\n }\n zza(this.zzazy.get(this.zzbav), this.zzbaq);\n this.zzbap = 0;\n }\n }",
"@Test(timeout = 4000)\n public void test115() throws Throwable {\n int int0 = JavaCharStream.hexval('9');\n assertEquals(9, int0);\n }",
"private static byte[] m17790a(Bitmap bitmap) {\n int i;\n int i2;\n int i3;\n int width = bitmap.getWidth();\n int height = bitmap.getHeight();\n OutputStream byteArrayOutputStream = new ByteArrayOutputStream();\n for (i = 0; i < 32; i++) {\n byteArrayOutputStream.write(0);\n }\n int[] iArr = new int[(width - 2)];\n bitmap.getPixels(iArr, 0, width, 1, 0, width - 2, 1);\n Object obj = iArr[0] == -16777216 ? 1 : null;\n Object obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n int length = iArr.length;\n width = 0;\n int i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n int i5 = i4;\n int i6 = i5 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i3 = i - 1;\n } else {\n i3 = i;\n }\n iArr = new int[(height - 2)];\n bitmap.getPixels(iArr, 0, 1, 0, 1, 1, height - 2);\n obj = iArr[0] == -16777216 ? 1 : null;\n obj2 = iArr[iArr.length + -1] == -16777216 ? 1 : null;\n length = iArr.length;\n width = 0;\n i4 = 0;\n for (i2 = 0; i2 < length; i2++) {\n if (width != iArr[i2]) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, i2);\n width = iArr[i2];\n }\n }\n if (obj2 != null) {\n i4++;\n C5225r.m17788a(byteArrayOutputStream, length);\n }\n i6 = i4 + 1;\n if (obj != null) {\n i = i6 - 1;\n } else {\n i = i6;\n }\n if (obj2 != null) {\n i--;\n }\n for (i6 = 0; i6 < i3 * i; i6++) {\n C5225r.m17788a(byteArrayOutputStream, 1);\n }\n byte[] toByteArray = byteArrayOutputStream.toByteArray();\n toByteArray[0] = (byte) 1;\n toByteArray[1] = (byte) i5;\n toByteArray[2] = (byte) i4;\n toByteArray[3] = (byte) (i * i3);\n C5225r.m17787a(bitmap, toByteArray);\n return toByteArray;\n }",
"public final void mo11687c() {\n }",
"@Test(timeout = 4000)\n public void test116() throws Throwable {\n int int0 = JavaCharStream.hexval('8');\n assertEquals(8, int0);\n }",
"C4865b mo6249a();",
"public int arn() {\n return 383;\n }",
"public String toString() {\n return \"#ffff00\";\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public abstract CharSequence mo2160e();",
"private void bщ04490449щ0449щ(rrrrrr.rcccrr r6) {\n /*\n r5 = this;\n r4 = 0;\n r0 = r6.getJsonData();\t Catch:{ Exception -> 0x0056 }\n r1 = new rrrrrr.ccrcrc;\t Catch:{ Exception -> 0x0056 }\n r2 = new java.lang.StringBuilder;\t Catch:{ Exception -> 0x0056 }\n r2.<init>();\t Catch:{ Exception -> 0x0056 }\n r3 = r5.bнн043Dннн;\t Catch:{ Exception -> 0x0056 }\n r3 = com.immersion.aws.analytics.ImmrAnalytics.b044C044C044C044Cьь(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = r3.getFilesDir();\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = java.io.File.separator;\t Catch:{ Exception -> 0x0056 }\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r3 = \"3HC4C-01.txt\";\n r2 = r2.append(r3);\t Catch:{ Exception -> 0x0056 }\n r2 = r2.toString();\t Catch:{ Exception -> 0x0056 }\n r1.<init>(r2);\t Catch:{ Exception -> 0x0056 }\n r2 = bЗ04170417ЗЗЗ;\n r3 = bЗЗЗ0417ЗЗ;\n r3 = r3 + r2;\n r2 = r2 * r3;\n r3 = b04170417З0417ЗЗ;\n r2 = r2 % r3;\n switch(r2) {\n case 0: goto L_0x0041;\n default: goto L_0x0039;\n };\n L_0x0039:\n r2 = 38;\n bЗ04170417ЗЗЗ = r2;\n r2 = 29;\n b041704170417ЗЗЗ = r2;\n L_0x0041:\n r1.load();\t Catch:{ Exception -> 0x0056 }\n L_0x0044:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x0047;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x0047:\n switch(r4) {\n case 0: goto L_0x004b;\n case 1: goto L_0x0044;\n default: goto L_0x004a;\n };\t Catch:{ Exception -> 0x0056 }\n L_0x004a:\n goto L_0x0047;\n L_0x004b:\n r0 = r0.toString();\t Catch:{ Exception -> 0x0056 }\n r1.push(r0);\t Catch:{ Exception -> 0x0056 }\n r1.save();\t Catch:{ Exception -> 0x0056 }\n L_0x0055:\n return;\n L_0x0056:\n r0 = move-exception;\n goto L_0x0055;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rrrrrr.cccccr.bщ04490449щ0449щ(rrrrrr.rcccrr):void\");\n }",
"void mo72114c();",
"void mo12638c();",
"private static int colorspaceSh(int s) {\r\n return (s << 16);\r\n }",
"@Test(timeout = 4000)\n public void test119() throws Throwable {\n int int0 = JavaCharStream.hexval('5');\n assertEquals(5, int0);\n }",
"String mo30285c(long j);",
"public String toString()\r\n/* 438: */ {\r\n/* 439:522 */ return \"Luffa-\" + (getDigestLength() << 3);\r\n/* 440: */ }"
] | [
"0.5614244",
"0.5555092",
"0.5532969",
"0.55186975",
"0.54664844",
"0.5387238",
"0.53813106",
"0.537336",
"0.53699774",
"0.53690934",
"0.5358591",
"0.5354125",
"0.5339731",
"0.5339692",
"0.5326437",
"0.53219414",
"0.5279708",
"0.5278232",
"0.5269094",
"0.5267767",
"0.52670634",
"0.52662134",
"0.525441",
"0.5249512",
"0.52331465",
"0.52222824",
"0.5217989",
"0.5214605",
"0.5204737",
"0.5197877",
"0.5192896",
"0.5192536",
"0.51895607",
"0.5180809",
"0.51782787",
"0.51677096",
"0.5161214",
"0.51607305",
"0.51552385",
"0.5147931",
"0.5144887",
"0.5134564",
"0.5130764",
"0.5129139",
"0.51263374",
"0.512147",
"0.5117376",
"0.5115723",
"0.5112028",
"0.51097584",
"0.5106545",
"0.5106259",
"0.51056176",
"0.50974286",
"0.5085165",
"0.50839883",
"0.5078122",
"0.5073028",
"0.5070688",
"0.5060861",
"0.5060005",
"0.50588584",
"0.50539625",
"0.5051236",
"0.5050958",
"0.50501645",
"0.50490874",
"0.50467736",
"0.504327",
"0.5040389",
"0.50378627",
"0.5027551",
"0.5023867",
"0.50206804",
"0.50204223",
"0.5019913",
"0.50145984",
"0.50124",
"0.50123715",
"0.50108904",
"0.50095505",
"0.500766",
"0.50056624",
"0.50055766",
"0.5004484",
"0.5001951",
"0.5001805",
"0.5001805",
"0.5001805",
"0.5001805",
"0.5001805",
"0.5001805",
"0.5001805",
"0.4999444",
"0.4998811",
"0.49977392",
"0.49903622",
"0.49875975",
"0.49862477",
"0.49848932",
"0.4981199"
] | 0.0 | -1 |
/ 119: / 120: | public ServicioConceptoRetencionSRI getServicioConceptoRetencionSRI()
/* 121: */ {
/* 122:137 */ return this.servicioConceptoRetencionSRI;
/* 123: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"public void mo21786K() {\n }",
"public int mo36g() {\n return 4;\n }",
"public int mo36g() {\n return 8;\n }",
"public void mo21794S() {\n }",
"public int mo36g() {\n return 2;\n }",
"public void mo21788M() {\n }",
"public void mo21877s() {\n }",
"public void mo21787L() {\n }",
"public void mo21782G() {\n }",
"public void mo21783H() {\n }",
"public void mo21789N() {\n }",
"public void mo12930a() {\n }",
"public int method_2436() {\r\n return 16;\r\n }",
"public void mo21779D() {\n }",
"public void mo12628c() {\n }",
"private void kk12() {\n\n\t}",
"public void mo21791P() {\n }",
"public void mo21785J() {\n }",
"public void mo21795T() {\n }",
"public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }",
"public void mo9233aH() {\n }",
"public void mo3749d() {\n }",
"public void mo21793R() {\n }",
"public void mo21878t() {\n }",
"public String c()\r\n/* 30: */ {\r\n/* 31:175 */ return \"step.\" + this.a;\r\n/* 32: */ }",
"public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }",
"public void mo23813b() {\n }",
"@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }",
"private void m50366E() {\n }",
"int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}",
"public void mo21780E() {\n }",
"public void mo2470d() {\n }",
"public void mo38117a() {\n }",
"public void mo3376r() {\n }",
"public void method_4270() {}",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"void mo12637b();",
"C7904c mo24084a();",
"public void mo2740a() {\n }",
"public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }",
"public void mo56167c() {\n }",
"public void mo21879u() {\n }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"C2841w mo7234g();",
"public void mo21867i() {\n mo21877s();\n }",
"void mo12650d();",
"public abstract Integer mo36210m();",
"public void mo133108l() {\n mo133081a(1000);\n }",
"@Override\n protected int func_150123_b(int p_150123_1_)\n {\n return 60;\n }",
"public void mo3946e() {\n m25427g();\n }",
"public void mo4683c() {\n mo4679a(3);\n }",
"private void m50367F() {\n }",
"public void mo21880v() {\n }",
"C3676k mo12649b();",
"public void mo55254a() {\n }",
"public void mo23438b() {\n }",
"void mo33732Px();",
"@Override\n\tpublic void challenge17() {\n\n\t}",
"void mo21076g();",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"void mo119581a();",
"protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }",
"dkj mo4367a(dkk dkk);",
"C1458cs mo7613iS();",
"public void mo4359a() {\n }",
"public void mo12202n() {\n this.f10959n = -1;\n }",
"private static int m36201b(Rect rect) {\n return rect.width() * rect.height();\n }",
"void mo1943l();",
"public void mo44053a() {\n }",
"C20259y mo54455t(int i);",
"public void mo21792Q() {\n }",
"public void mo2471e() {\n }",
"public void mo21784I() {\n }",
"void mo1506m();",
"public int mo1534c() {\n return 2;\n }",
"public void mo115188a() {\n }",
"@Override\n\tpublic void limitSpeed() {\n\t\tSystem.out.println(\"120 KMPH\");\n\t}",
"public void mo8738a() {\n }",
"public abstract int mo8526p();",
"public void mo115190b() {\n }",
"@Override\n\tpublic void challenge11() {\n\n\t}",
"public short mo34e() {\n return 140;\n }",
"public int getDuration()\r\n/* 70: */ {\r\n/* 71: 71 */ return this.duration;\r\n/* 72: */ }",
"void mo119582b();",
"public void mo6081a() {\n }",
"public void mo5248a() {\n }",
"public void mo3370l() {\n }",
"public void mo97908d() {\n }",
"@Override\n\tpublic void challenge10() {\n\n\t}",
"public abstract long mo9229aD();",
"static int getNumPatterns() { return 64; }",
"private static String m11g() {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"sh\");\n stringBuilder.append(\"el\");\n stringBuilder.append(\"la\");\n stringBuilder.append(\"_ve\");\n stringBuilder.append(\"rs\");\n stringBuilder.append(\"i\");\n stringBuilder.append(\"on\");\n return stringBuilder.toString();\n }"
] | [
"0.58941054",
"0.58230025",
"0.5805021",
"0.5768733",
"0.5762516",
"0.5719344",
"0.5716034",
"0.5713773",
"0.5631015",
"0.5626668",
"0.5609322",
"0.55761194",
"0.5567528",
"0.55649817",
"0.5536967",
"0.55216825",
"0.55205834",
"0.55152243",
"0.55012786",
"0.54783946",
"0.546967",
"0.5464757",
"0.5459985",
"0.54512143",
"0.5447393",
"0.5441499",
"0.5440665",
"0.5431918",
"0.54314363",
"0.54266894",
"0.5422033",
"0.54056984",
"0.5405591",
"0.5381454",
"0.5363187",
"0.53620774",
"0.5360799",
"0.5314287",
"0.5309835",
"0.5306315",
"0.53055906",
"0.52983505",
"0.5290355",
"0.5289868",
"0.52886593",
"0.5286814",
"0.52860016",
"0.5284836",
"0.52811795",
"0.5280536",
"0.5277098",
"0.5274153",
"0.5269026",
"0.5264161",
"0.5258437",
"0.5257033",
"0.5252417",
"0.5251668",
"0.52494556",
"0.5245257",
"0.5242843",
"0.5239025",
"0.52385217",
"0.52385217",
"0.52385217",
"0.52385217",
"0.52385217",
"0.52385217",
"0.52385217",
"0.5237485",
"0.5234777",
"0.52298063",
"0.5221169",
"0.52201337",
"0.52177006",
"0.52172804",
"0.5213412",
"0.5211253",
"0.52104104",
"0.52096766",
"0.52092004",
"0.5206525",
"0.5199243",
"0.51980144",
"0.51913136",
"0.51907885",
"0.5186374",
"0.5184936",
"0.5183814",
"0.51832145",
"0.51784",
"0.51763",
"0.5175975",
"0.5173979",
"0.51729554",
"0.5165539",
"0.51647544",
"0.51621455",
"0.51621425",
"0.5159512",
"0.5157506"
] | 0.0 | -1 |
/ 124: / 125: | public void setServicioConceptoRetencionSRI(ServicioConceptoRetencionSRI servicioConceptoRetencionSRI)
/* 126: */ {
/* 127:141 */ this.servicioConceptoRetencionSRI = servicioConceptoRetencionSRI;
/* 128: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"public void mo12628c() {\n }",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }",
"public static void main(String[] args) {\n byte b1=125;\n System.out.println(b1);\n byte b2=(byte)129;\n System.out.println(b2);\t\t\n\t}",
"@Test\n @Tag(\"bm1000\")\n public void testE226() {\n CuteNetlibCase.doTest(\"E226.SIF\", \"-11.638929066370546\", \"111.65096068931459\", NumberContext.of(7, 4));\n }",
"void mo12637b();",
"public int mo36g() {\n return 8;\n }",
"public int method_2436() {\r\n return 16;\r\n }",
"public int mo36g() {\n return 4;\n }",
"public int mo36g() {\n return 2;\n }",
"public final void mo12688e_() {\n }",
"public static void main(String[] args) {\n\t\tint numAdd;\n\t\tnumAdd=125+24;\n\t\tSystem.out.println(numAdd+ \"=125+24\");\n\t\tint numSubstract=125-24;\n\t\tSystem.out.println(numSubstract+ \"=125-24\");\n\t\tint num1 =125;\n\t\tint num2= 24;\n\t\tSystem.out.println(num1+\"x\"+num2+\"=\"+(num1*num2));\n\t\t\n\t\t\n\t\t\n\t\t\t\t\n\t}",
"public void mo21794S() {\n }",
"private void kk12() {\n\n\t}",
"public void mo21786K() {\n }",
"public void mo21787L() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo9848a() {\n }",
"public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }",
"public int mo34973b() {\n return 48;\n }",
"public void mo55254a() {\n }",
"public int mo1534c() {\n return 2;\n }",
"public void mo23813b() {\n }",
"public void mo23438b() {\n }",
"public static void main(String[] args) {\r\n\t\tint e=437;\r\n\t\tint a=0;\r\n\t\twhile(e>0)\r\n\t\t{\r\n\t\t\ta=e%10;\r\n\t\tSystem.out.print(a);\r\n\t\t\ta=e/10;\r\n\t\t\t\r\n\t\t\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\r\n\t}",
"public void mo21782G() {\n }",
"public static int i()\r\n/* 25: */ {\r\n/* 26: 48 */ return 9;\r\n/* 27: */ }",
"@Test\n @Tag(\"bm1000\")\n public void testSC105() {\n CuteNetlibCase.doTest(\"SC105.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }",
"public java.lang.Integer getVar124() {\n return var124;\n }",
"@Test(timeout = 4000)\n public void test078() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n assertEquals(\"- 0\", string0);\n }",
"@Test\n @Tag(\"bm1000\")\n public void testGROW22() {\n CuteNetlibCase.doTest(\"GROW22.SIF\", \"-1.608343364825636E8\", \"0.0\", NumberContext.of(7, 4));\n }",
"@Test\n @Tag(\"bm1000\")\n public void testRECIPELP() {\n CuteNetlibCase.doTest(\"RECIPELP.SIF\", \"-266.616\", \"-104.818\", NumberContext.of(7, 4));\n }",
"public void mo38117a() {\n }",
"public void mo21779D() {\n }",
"public java.lang.Integer getVar124() {\n return var124;\n }",
"public int m224a() {\n return 1;\n }",
"public void mo12930a() {\n }",
"@Test(timeout = 4000)\n public void test128() throws Throwable {\n StringReader stringReader0 = new StringReader(\"D!tcbD=EVjn`\");\n JavaCharStream javaCharStream0 = new JavaCharStream(stringReader0, (-7), 6);\n JavaParserTokenManager javaParserTokenManager0 = new JavaParserTokenManager(javaCharStream0);\n Token token0 = javaParserTokenManager0.getNextToken();\n assertEquals(\"D\", token0.toString());\n assertEquals(74, token0.kind);\n }",
"public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }",
"@Test\n @Tag(\"bm1000\")\n public void testSC205() {\n CuteNetlibCase.doTest(\"SC205.SIF\", \"-52.202061211707246\", \"0.0\", NumberContext.of(7, 4));\n }",
"private void m50366E() {\n }",
"public void mo21791P() {\n }",
"public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }",
"@Test\n public void maskedpanTest() {\n assertEquals(\"400000******0002\", authResponse.getMaskedpan());\n }",
"public int mo3356c() {\n return 0;\n }",
"public void mo21792Q() {\n }",
"public abstract long mo9229aD();",
"@Test(timeout = 4000)\n public void test084() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n assertEquals(\"- 0\", string0);\n }",
"public void mo21877s() {\n }",
"public abstract long mo9755t();",
"public static void main(String[] args) {\n\n\t\t\n\t\tbyte b=3;\n\t\tshort s=34;\n\t\tint i=125;\n\t\t\n\t}",
"public int getExtendedID()\r\n/* 12: */ {\r\n/* 13:17 */ return 10;\r\n/* 14: */ }",
"public void mo21789N() {\n }",
"public void func_70295_k_() {}",
"int getUnknown13();",
"public void mo21879u() {\n }",
"@Test\n @Tag(\"bm1000\")\n public void testSCAGR25() {\n CuteNetlibCase.doTest(\"SCAGR25.SIF\", \"-1.475343306076852E7\", null, NumberContext.of(7, 4));\n }",
"public void mo21788M() {\n }",
"public void mo3749d() {\n }",
"public int mo9232aG() {\n return 0;\n }",
"public int g()\r\n/* 601: */ {\r\n/* 602:645 */ return 0;\r\n/* 603: */ }",
"public abstract long mo24412e();",
"public void mo21795T() {\n }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"public void mo115190b() {\n }",
"@Test(timeout = 4000)\n public void test33() throws Throwable {\n String string0 = EWrapperMsgGenerator.fundamentalData((-1622103582), \"convertible = \");\n assertEquals(\"id = -1622103582 len = 14\\nconvertible = \", string0);\n }",
"public void mo56167c() {\n }",
"public void mo21785J() {\n }",
"public void method_4270() {}",
"public static void main(String[] args) {\n\t\tbyte a=(byte)130;\n\t\tSystem.out.println(\"128을 저장한 byte 값은 : \"+ a);\n\n\t}",
"public void mo21878t() {\n }",
"public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }",
"int method20()\n {\n return 579190;\n }",
"public void mo12627b() {\n try {\n this.f4764b.mo12945a(this.f4765c);\n } catch (IOException unused) {\n }\n }",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"public void mo9137b() {\n }",
"public int getExtendedID()\r\n/* 50: */ {\r\n/* 51: 39 */ return 0;\r\n/* 52: */ }",
"@Override\n\tpublic void teclaCorrigeDigitada() {\n\t\t\n\t}",
"C1458cs mo7613iS();",
"@Test(timeout = 4000)\n public void test38() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = 744.4583836715912;\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n streamTokenizer0.ordinaryChar((-45));\n String string1 = SQLUtil.normalize(\"744.4583836715912\", false);\n assertTrue(string1.equals((Object)string0));\n }",
"public abstract int mo8526p();",
"public int method_113() {\r\n return 0;\r\n }",
"public abstract long mo9748m();",
"@Test\n @Tag(\"bm1000\")\n public void testDEGEN2() {\n CuteNetlibCase.doTest(\"DEGEN2.SIF\", \"-1435.1779999999999\", \"-1226.12\", NumberContext.of(7, 4));\n }",
"public int e() {\n return 12;\n }",
"@Test\n @Tag(\"bm1000\")\n public void testGROW7() {\n CuteNetlibCase.doTest(\"GROW7.SIF\", \"-4.7787811814711526E7\", \"0.0\", NumberContext.of(7, 4));\n }",
"void mo33732Px();",
"protected int mo3987c() {\n return -1;\n }",
"public void mo97908d() {\n }",
"public void mo9233aH() {\n }",
"public void mo8738a() {\n }",
"public void mo21780E() {\n }",
"public void method_192() {}",
"C3676k mo12649b();"
] | [
"0.6157937",
"0.59716064",
"0.5861314",
"0.5857763",
"0.5845602",
"0.58338106",
"0.5745078",
"0.5736567",
"0.57351804",
"0.57207876",
"0.5709222",
"0.5699688",
"0.5687231",
"0.562172",
"0.56029606",
"0.55883133",
"0.55857736",
"0.5573996",
"0.5573996",
"0.5573996",
"0.5573996",
"0.5573996",
"0.5573996",
"0.5573996",
"0.5560997",
"0.5552369",
"0.553238",
"0.55243653",
"0.55151975",
"0.551074",
"0.5502115",
"0.5501627",
"0.5486455",
"0.54800624",
"0.54781723",
"0.5475891",
"0.5475701",
"0.5475382",
"0.54736173",
"0.5469519",
"0.54670554",
"0.54652065",
"0.5459012",
"0.5451481",
"0.54504156",
"0.54486394",
"0.5441996",
"0.54413235",
"0.54405797",
"0.54400665",
"0.5439516",
"0.5438834",
"0.5438387",
"0.5437756",
"0.54372233",
"0.54340166",
"0.54289716",
"0.5426745",
"0.5419283",
"0.5416682",
"0.541527",
"0.54128927",
"0.5409044",
"0.540324",
"0.54017067",
"0.5400285",
"0.5396654",
"0.5396461",
"0.53945875",
"0.53897923",
"0.53823817",
"0.5376572",
"0.5376233",
"0.5374559",
"0.53743297",
"0.5373284",
"0.5370151",
"0.53657365",
"0.53637695",
"0.53631335",
"0.53551245",
"0.5352715",
"0.5343403",
"0.5341006",
"0.53389835",
"0.5338636",
"0.53242004",
"0.5319949",
"0.53180796",
"0.5312187",
"0.53093714",
"0.53089046",
"0.53069454",
"0.5306559",
"0.5302808",
"0.5298755",
"0.5297518",
"0.52956563",
"0.5288082",
"0.5283532",
"0.5283361"
] | 0.0 | -1 |
/ 129: / 130: | public List<CreditoTributarioSRI> getListaCreditoTributarioSRI()
/* 131: */ {
/* 132:145 */ return this.listaCreditoTributarioSRI;
/* 133: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void mo12628c() {\n }",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"void mo12637b();",
"public void mo12930a() {\n }",
"public void mo21879u() {\n }",
"public void mo21794S() {\n }",
"public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }",
"int getUnknown13();",
"public void mo21786K() {\n }",
"public final void mo12688e_() {\n }",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"public void mo21787L() {\n }",
"public void mo23813b() {\n }",
"public void mo21783H() {\n }",
"C1458cs mo7613iS();",
"public void mo21779D() {\n }",
"public void mo38117a() {\n }",
"void mo12638c();",
"public static void main(String[] args) {\n\t\tbyte a=(byte)130;\n\t\tSystem.out.println(\"128을 저장한 byte 값은 : \"+ a);\n\n\t}",
"public void mo21782G() {\n }",
"C3676k mo12649b();",
"public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }",
"protected int mo3987c() {\n return -1;\n }",
"public void mo21788M() {\n }",
"public void mo21780E() {\n }",
"public void mo21789N() {\n }",
"public void mo21785J() {\n }",
"public void mo115190b() {\n }",
"public void mo21877s() {\n }",
"C2841w mo7234g();",
"public static void main(String[] args) {\n byte b1=125;\n System.out.println(b1);\n byte b2=(byte)129;\n System.out.println(b2);\t\t\n\t}",
"public int n_()\r\n/* 429: */ {\r\n/* 430:442 */ return this.a.length + 4;\r\n/* 431: */ }",
"public int a(char paramChar)\r\n/* 484: */ {\r\n/* 485:481 */ if (paramChar == '§') {\r\n/* 486:482 */ return -1;\r\n/* 487: */ }\r\n/* 488:485 */ if (paramChar == ' ') {\r\n/* 489:486 */ return 4;\r\n/* 490: */ }\r\n/* 491:489 */ int i1 = \"\".indexOf(paramChar);\r\n/* 492:490 */ if ((paramChar > 0) && (i1 != -1) && (!this.k)) {\r\n/* 493:491 */ return this.d[i1];\r\n/* 494: */ }\r\n/* 495:495 */ if (this.e[paramChar] != 0)\r\n/* 496: */ {\r\n/* 497:496 */ int i2 = this.e[paramChar] >>> 4;\r\n/* 498:497 */ int i3 = this.e[paramChar] & 0xF;\r\n/* 499:499 */ if (i3 > 7)\r\n/* 500: */ {\r\n/* 501:500 */ i3 = 15;\r\n/* 502:501 */ i2 = 0;\r\n/* 503: */ }\r\n/* 504:503 */ i3++;\r\n/* 505: */ \r\n/* 506:505 */ return (i3 - i2) / 2 + 1;\r\n/* 507: */ }\r\n/* 508:508 */ return 0;\r\n/* 509: */ }",
"private void kk12() {\n\n\t}",
"public int mo36g() {\n return 8;\n }",
"public int mo1534c() {\n return 2;\n }",
"public void method_4270() {}",
"public void mo9848a() {\n }",
"public short mo34e() {\n return 140;\n }",
"public void mo9137b() {\n }",
"public int method_2436() {\r\n return 16;\r\n }",
"public void mo9233aH() {\n }",
"public void mo3749d() {\n }",
"private int e(String paramString, int paramInt)\r\n/* 628: */ {\r\n/* 629:624 */ int i1 = paramString.length();\r\n/* 630:625 */ int i2 = 0;\r\n/* 631:626 */ int i3 = 0;\r\n/* 632:627 */ int i4 = -1;\r\n/* 633:628 */ int i5 = 0;\r\n/* 634:631 */ for (; i3 < i1; i3++)\r\n/* 635: */ {\r\n/* 636:632 */ char c1 = paramString.charAt(i3);\r\n/* 637:634 */ switch (c1)\r\n/* 638: */ {\r\n/* 639: */ case '§': \r\n/* 640:636 */ if (i3 < i1 - 1)\r\n/* 641: */ {\r\n/* 642:637 */ char c2 = paramString.charAt(++i3);\r\n/* 643:638 */ if ((c2 == 'l') || (c2 == 'L')) {\r\n/* 644:639 */ i5 = 1;\r\n/* 645:640 */ } else if ((c2 == 'r') || (c2 == 'R') || (c(c2))) {\r\n/* 646:641 */ i5 = 0;\r\n/* 647: */ }\r\n/* 648: */ }\r\n/* 649:643 */ break;\r\n/* 650: */ case '\\n': \r\n/* 651:646 */ i3--;\r\n/* 652:647 */ break;\r\n/* 653: */ case ' ': \r\n/* 654:649 */ i4 = i3;\r\n/* 655: */ default: \r\n/* 656:651 */ i2 += a(c1);\r\n/* 657:652 */ if (i5 != 0) {\r\n/* 658:653 */ i2++;\r\n/* 659: */ }\r\n/* 660: */ break;\r\n/* 661: */ }\r\n/* 662:657 */ if (c1 == '\\n')\r\n/* 663: */ {\r\n/* 664:658 */ i3++;i4 = i3;\r\n/* 665: */ }\r\n/* 666: */ else\r\n/* 667: */ {\r\n/* 668:662 */ if (i2 > paramInt) {\r\n/* 669: */ break;\r\n/* 670: */ }\r\n/* 671: */ }\r\n/* 672: */ }\r\n/* 673:667 */ if ((i3 != i1) && (i4 != -1) && (i4 < i3)) {\r\n/* 674:668 */ return i4;\r\n/* 675: */ }\r\n/* 676:670 */ return i3;\r\n/* 677: */ }",
"public void mo21791P() {\n }",
"private void m50366E() {\n }",
"public abstract int mo8526p();",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }",
"public int mo80c() {\n return 7;\n }",
"C5727e mo33224a();",
"public void mo21878t() {\n }",
"String mo20731c();",
"public void mo21797V() {\n this.f24532d.mo21926U();\n }",
"public int mo34973b() {\n return 48;\n }",
"public void func_70295_k_() {}",
"public void mo55254a() {\n }",
"public int mo36g() {\n return 4;\n }",
"public void mo56167c() {\n }",
"@Override\n\tpublic void challenge17() {\n\n\t}",
"public abstract int mo9736c(int i);",
"public void mo21793R() {\n }",
"public void mo21792Q() {\n }",
"C7904c mo24084a();",
"public abstract long mo9229aD();",
"public abstract String mo11611b();",
"public void mo2740a() {\n }",
"public void mo21825b() {\n }",
"public void mo21784I() {\n }",
"byte mo30283c();",
"public void mo8738a() {\n }",
"public void mo5097b() {\n }",
"public int mo36g() {\n return 2;\n }",
"public void mo21795T() {\n }",
"abstract String mo1748c();",
"public abstract String mo118046b();",
"public void mo21880v() {\n }",
"public void mo3376r() {\n }",
"public void mo12202n() {\n this.f10959n = -1;\n }",
"public int mo13093a() {\n return this.f4233b;\n }",
"public abstract int mo13680b();",
"public abstract CharSequence mo2161g();",
"@Override\n\tpublic void challenge9() {\n\n\t}",
"public abstract Integer mo36210m();",
"public void mo12627b() {\n try {\n this.f4764b.mo12945a(this.f4765c);\n } catch (IOException unused) {\n }\n }",
"static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"public void mo23438b() {\n }",
"public final void mo11687c() {\n }",
"String mo38971b();",
"void mo12650d();",
"public int arn() {\n return 383;\n }",
"public String c()\r\n/* 30: */ {\r\n/* 31:175 */ return \"step.\" + this.a;\r\n/* 32: */ }",
"int mo27483b();",
"void mo57278c();",
"void mo3796b(int i);"
] | [
"0.6502977",
"0.62879986",
"0.6065769",
"0.60622394",
"0.59333986",
"0.5914234",
"0.5902842",
"0.5882744",
"0.5871668",
"0.5855766",
"0.5852926",
"0.58286166",
"0.58139145",
"0.58135927",
"0.5790558",
"0.57855976",
"0.57800853",
"0.57672155",
"0.5759611",
"0.5759386",
"0.575246",
"0.57377446",
"0.57307625",
"0.5727392",
"0.5718428",
"0.57161003",
"0.57149583",
"0.57140326",
"0.5711524",
"0.5707877",
"0.5698077",
"0.56895256",
"0.56858665",
"0.5684694",
"0.56817794",
"0.5675564",
"0.56572115",
"0.5656033",
"0.5655097",
"0.5651087",
"0.5628922",
"0.56229776",
"0.561885",
"0.5610832",
"0.5604475",
"0.5603551",
"0.560232",
"0.5599561",
"0.5599561",
"0.5599561",
"0.5599561",
"0.5599561",
"0.5599561",
"0.5599561",
"0.55963165",
"0.5595861",
"0.55867165",
"0.5581594",
"0.55662143",
"0.55571",
"0.5550081",
"0.5547985",
"0.5542248",
"0.55294925",
"0.5527479",
"0.5525642",
"0.5523377",
"0.5520902",
"0.55205274",
"0.55197173",
"0.5516678",
"0.55152756",
"0.55122733",
"0.55068743",
"0.55045694",
"0.5502811",
"0.5502074",
"0.549898",
"0.5498081",
"0.5495673",
"0.5495463",
"0.54932654",
"0.54919785",
"0.5489068",
"0.5487635",
"0.5484847",
"0.5476102",
"0.54736143",
"0.546668",
"0.5465409",
"0.5465095",
"0.54646355",
"0.5464468",
"0.54621994",
"0.54614925",
"0.54580593",
"0.54575497",
"0.5453912",
"0.5452688",
"0.5445807",
"0.5445488"
] | 0.0 | -1 |
/ 134: / 135: | public void setListaCreditoTributarioSRI(List<CreditoTributarioSRI> listaCreditoTributarioSRI)
/* 136: */ {
/* 137:149 */ this.listaCreditoTributarioSRI = listaCreditoTributarioSRI;
/* 138: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public int mo36g() {\n return 4;\n }",
"public int method_1143(int var1) {\r\n return this.height / 4 + 0 + (24 * var1 - 24) + this.field_987;\r\n }",
"public int mo36g() {\n return 8;\n }",
"public short mo34e() {\n return 140;\n }",
"int main()\n{\n cin>>a.h>>a.m>>a.s>>b.h>>b.m>>b.s;\n int x=a.s-b.s;\n int y=a.m-b.m;\n int z=a.h-b.h;\n if(y<0){\n y+=60;\n z--;\n }\n if(x<0){\n x+=60;\n y--;\n }\n cout<<z<<\":\"<<y<<\":\"<<x;\n}",
"void mo33732Px();",
"public int mo36g() {\n return 2;\n }",
"private int m15036d(C1085v vVar) {\n if (this.f13675n == 2) {\n return 0;\n }\n int d = this.f13674m.mo12697d(this.f13679r, vVar);\n int a = (this.f13674m.mo12721a(d, ViewCompat.m2862o(this.f13679r)) & 65280) >> 8;\n if (a == 0) {\n return 0;\n }\n int i = (d & 65280) >> 8;\n if (Math.abs(this.f13669h) > Math.abs(this.f13670i)) {\n int b = m15032b(vVar, a);\n if (b > 0) {\n return (i & b) == 0 ? C5319g.m15060b(b, ViewCompat.m2862o(this.f13679r)) : b;\n }\n int c = m15033c(vVar, a);\n if (c > 0) {\n return c;\n }\n } else {\n int c2 = m15033c(vVar, a);\n if (c2 > 0) {\n return c2;\n }\n int b2 = m15032b(vVar, a);\n if (b2 > 0) {\n if ((i & b2) == 0) {\n b2 = C5319g.m15060b(b2, ViewCompat.m2862o(this.f13679r));\n }\n return b2;\n }\n }\n return 0;\n }",
"private void m27468d() {\n switch (this.f25258E) {\n case 1:\n this.f25270Q = this.f25294i.left;\n break;\n case 2:\n this.f25270Q = this.f25294i.right;\n break;\n default:\n this.f25270Q = this.f25268O;\n break;\n }\n this.f25271R = (int) (((float) this.f25269P) - ((this.f25288c.ascent() + this.f25288c.descent()) / 2.0f));\n }",
"public int getSnakeStartLength();",
"public int getMobCap()\r\n/* 24: */ {\r\n/* 25:41 */ return this.f;\r\n/* 26: */ }",
"public static String m13823m() {\n return f12476h;\n }",
"private void ncpStep(double height) {\n/* 56 */ double posX = mc.field_71439_g.field_70165_t;\n/* 57 */ double posZ = mc.field_71439_g.field_70161_v;\n/* 58 */ double y = mc.field_71439_g.field_70163_u;\n/* 59 */ if (height >= 1.1D) {\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 80 */ if (height < 1.6D) {\n/* */ double[] offset;\n/* 82 */ for (double off : offset = new double[] { 0.42D, 0.33D, 0.24D, 0.083D, -0.078D }) {\n/* 83 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y += off, posZ, false));\n/* */ }\n/* 85 */ } else if (height < 2.1D) {\n/* */ double[] heights;\n/* 87 */ for (double off : heights = new double[] { 0.425D, 0.821D, 0.699D, 0.599D, 1.022D, 1.372D, 1.652D, 1.869D }) {\n/* 88 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + off, posZ, false));\n/* */ }\n/* */ } else {\n/* */ double[] heights;\n/* 92 */ for (double off : heights = new double[] { 0.425D, 0.821D, 0.699D, 0.599D, 1.022D, 1.372D, 1.652D, 1.869D, 2.019D, 1.907D })\n/* 93 */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + off, posZ, false)); \n/* */ } \n/* */ return;\n/* */ } \n/* */ double first = 0.42D;\n/* */ double d1 = 0.75D;\n/* */ if (height != 1.0D) {\n/* */ first *= height;\n/* */ d1 *= height;\n/* */ if (first > 0.425D)\n/* */ first = 0.425D; \n/* */ if (d1 > 0.78D)\n/* */ d1 = 0.78D; \n/* */ if (d1 < 0.49D)\n/* */ d1 = 0.49D; \n/* */ } \n/* */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + first, posZ, false));\n/* */ if (y + d1 < y + height)\n/* */ mc.field_71439_g.field_71174_a.func_147297_a((Packet)new CPacketPlayer.Position(posX, y + d1, posZ, false)); \n/* */ }",
"public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }",
"private void m27464b() {\n this.f25306u = 0;\n this.f25307v = 0;\n if (this.f25277aa) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(0)));\n } else if (m27462a(this.f25273T)) {\n this.f25306u = (int) this.f25288c.measureText(String.valueOf(this.f25301p.get(this.f25273T)));\n } else if (!TextUtils.isEmpty(this.f25302q)) {\n this.f25306u = (int) this.f25288c.measureText(this.f25302q);\n } else {\n for (Object valueOf : this.f25301p) {\n this.f25306u = Math.max(this.f25306u, (int) this.f25288c.measureText(String.valueOf(valueOf)));\n }\n }\n FontMetrics fontMetrics = this.f25288c.getFontMetrics();\n this.f25307v = (int) (fontMetrics.bottom - fontMetrics.top);\n }",
"long getMid();",
"long getMid();",
"private static double fds_h(Vec v) { return 2*ASTMad.mad(new Frame(v), null, 1.4826)*Math.pow(v.length(),-1./3.); }",
"protected float m()\r\n/* 234: */ {\r\n/* 235:247 */ return 0.03F;\r\n/* 236: */ }",
"public void mo21783H() {\n }",
"public abstract long mo9748m();",
"public int mo34973b() {\n return 48;\n }",
"private void m3935R() {\n int i;\n int i2;\n if (mo4322L() == 1) {\n i2 = mo4758r() - mo4756p();\n i = mo4754o();\n } else {\n i2 = mo4741h() - mo4752n();\n i = mo4757q();\n }\n m3945n(i2 - i);\n }",
"int mo13164g();",
"public int mo4321K() {\n View a = mo4328a(mo4732e() - 1, -1, false, true);\n if (a == null) {\n return -1;\n }\n return mo4749l(a);\n }",
"public String toString(){ return \"DIV\";}",
"public void mo21788M() {\n }",
"public short mo34e() {\n return 41;\n }",
"public final void mo12412a() {\n long j = -1;\n this.f1569g = this.f1564b - this.f1563a;\n this.f1570h = this.f1565c - this.f1564b;\n this.f1571i = this.f1566d - this.f1565c;\n this.f1572j = this.f1567e - this.f1566d;\n this.f1573k = this.f1568f - this.f1567e;\n long j2 = this.f1569g;\n if (j2 < 0) {\n j2 = -1;\n }\n this.f1569g = j2;\n j2 = this.f1570h;\n if (j2 < 0) {\n j2 = -1;\n }\n this.f1570h = j2;\n j2 = this.f1571i;\n if (j2 < 0) {\n j2 = -1;\n }\n this.f1571i = j2;\n j2 = this.f1572j;\n if (j2 < 0) {\n j2 = -1;\n }\n this.f1572j = j2;\n j2 = this.f1573k;\n if (j2 >= 0) {\n j = j2;\n }\n this.f1573k = j;\n }",
"private static String m21386a(int i) {\n StringBuilder sb = new StringBuilder();\n sb.append(i & 255);\n String str = \".\";\n sb.append(str);\n sb.append((i >> 8) & 255);\n sb.append(str);\n sb.append((i >> 16) & 255);\n sb.append(str);\n sb.append((i >> 24) & 255);\n return sb.toString();\n }",
"C1458cs mo7613iS();",
"public long mo9743h() {\n return mo9773w();\n }",
"private static int m24353e(int i) {\n return i - (i >> 2);\n }",
"int getTonicNote(){\n String lastnote=\"\";\n int result;\n lastnote += Strinput.toCharArray()[Strinput.length()-4];\n lastnote += Strinput.toCharArray()[Strinput.length()-3];\n result = Integer.parseInt(lastnote);\n if(result<72){\n return result-60;\n }else{\n return result-12-60;\n }\n }",
"public short mo34e() {\n return 15;\n }",
"public void mo21794S() {\n }",
"protected float measurePrefix() {\n return measureLineNumber() + mDividerMargin * 2 + mDividerWidth;\n }",
"private View m3984P() {\n return mo4729d(this.f3143x ? mo4732e() - 1 : 0);\n }",
"public int mo12196h() {\n return this.f10961p.f11005m;\n }",
"@Test(timeout = 4000)\n public void test45() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateMktDepthL2(2146794261, 927, \"@\", 2146889800, (-180), 2146794261, (-1940));\n assertEquals(\"updateMktDepth: 2146794261 927 @ 2146889800 -180 2.146794261E9 -1940\", string0);\n }",
"public int getDuration()\r\n/* 70: */ {\r\n/* 71: 71 */ return this.duration;\r\n/* 72: */ }",
"public int mo1534c() {\n return 2;\n }",
"public void mo21786K() {\n }",
"public void mo21867i() {\n mo21877s();\n }",
"public String tri4(int h){\n\t\tString S = \"\";\n\t\tint H = h;\n\t\tint HH = H;\n\t\tint Counter = 0;\n\t\tint UsingCounter = Counter;\n\n\t\twhile (H > 0){\n\t\t\tHH = H;\n\t\t\twhile (UsingCounter > 0){\n\t\t\t\tS = S + \" \";\n\t\t\t\tUsingCounter = UsingCounter - 1;}\n\t\t\twhile (HH > 0) {\n\t\t\t\tS = S + \"*\";\n\t\t\t\tHH = HH - 1;}\n\t\t\tCounter = Counter + 1;\n\t\t\tUsingCounter = Counter;\n\t\t\tS = S + \"\\n\";\n\t\t\tH = H - 1;}\n\n\t\treturn S; }",
"public void mo12746c() {\n float f = this.f13706a;\n float f2 = this.f13708c;\n if (f == f2) {\n this.f13718m = this.f13710e.itemView.getTranslationX();\n } else if (this.f13712g != null) {\n this.f13718m = f + (this.f13722q * (f2 - f));\n } else {\n this.f13718m = this.f13714i.mo3670a();\n }\n float f3 = this.f13707b;\n float f4 = this.f13709d;\n if (f3 == f4) {\n this.f13719n = this.f13710e.itemView.getTranslationY();\n } else if (this.f13712g != null) {\n this.f13719n = f3 + (this.f13722q * (f4 - f3));\n } else {\n this.f13719n = this.f13715j.mo3670a();\n }\n }",
"public long mo9743h() {\n return mo9760w();\n }",
"public abstract long mo9755t();",
"int getMid(int s, int e) {\n return s + (e - s) / 2;\n }",
"public int mo12192d() {\n return this.f10959n;\n }",
"public long mo9743h() {\n return mo9784w();\n }",
"public static int m22583h(long j) {\n return 8;\n }",
"int mo23521Ly();",
"String divideAtWhite()[]{ return null; }",
"public int method_2436() {\r\n return 16;\r\n }",
"public abstract long mo9229aD();",
"int getBaseline() {\n\treturn ascent;\n}",
"public void setDimensionRatio(java.lang.String r9) {\n /*\n r8 = this;\n r0 = 0;\n if (r9 == 0) goto L_0x008e;\n L_0x0003:\n r1 = r9.length();\n if (r1 != 0) goto L_0x000b;\n L_0x0009:\n goto L_0x008e;\n L_0x000b:\n r1 = -1;\n r2 = r9.length();\n r3 = 44;\n r3 = r9.indexOf(r3);\n r4 = 0;\n r5 = 1;\n if (r3 <= 0) goto L_0x0037;\n L_0x001a:\n r6 = r2 + -1;\n if (r3 >= r6) goto L_0x0037;\n L_0x001e:\n r6 = r9.substring(r4, r3);\n r7 = \"W\";\n r7 = r6.equalsIgnoreCase(r7);\n if (r7 == 0) goto L_0x002c;\n L_0x002a:\n r1 = 0;\n goto L_0x0035;\n L_0x002c:\n r4 = \"H\";\n r4 = r6.equalsIgnoreCase(r4);\n if (r4 == 0) goto L_0x0035;\n L_0x0034:\n r1 = 1;\n L_0x0035:\n r4 = r3 + 1;\n L_0x0037:\n r3 = 58;\n r3 = r9.indexOf(r3);\n if (r3 < 0) goto L_0x0075;\n L_0x003f:\n r2 = r2 - r5;\n if (r3 >= r2) goto L_0x0075;\n L_0x0042:\n r2 = r9.substring(r4, r3);\n r3 = r3 + r5;\n r9 = r9.substring(r3);\n r3 = r2.length();\n if (r3 <= 0) goto L_0x0084;\n L_0x0051:\n r3 = r9.length();\n if (r3 <= 0) goto L_0x0084;\n L_0x0057:\n r2 = java.lang.Float.parseFloat(r2);\t Catch:{ NumberFormatException -> 0x0084 }\n r9 = java.lang.Float.parseFloat(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n r3 = (r2 > r0 ? 1 : (r2 == r0 ? 0 : -1));\n if (r3 <= 0) goto L_0x0084;\n L_0x0063:\n r3 = (r9 > r0 ? 1 : (r9 == r0 ? 0 : -1));\n if (r3 <= 0) goto L_0x0084;\n L_0x0067:\n if (r1 != r5) goto L_0x006f;\n L_0x0069:\n r9 = r9 / r2;\n r9 = java.lang.Math.abs(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x006f:\n r2 = r2 / r9;\n r9 = java.lang.Math.abs(r2);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x0075:\n r9 = r9.substring(r4);\n r2 = r9.length();\n if (r2 <= 0) goto L_0x0084;\n L_0x007f:\n r9 = java.lang.Float.parseFloat(r9);\t Catch:{ NumberFormatException -> 0x0084 }\n goto L_0x0085;\n L_0x0084:\n r9 = 0;\n L_0x0085:\n r0 = (r9 > r0 ? 1 : (r9 == r0 ? 0 : -1));\n if (r0 <= 0) goto L_0x008d;\n L_0x0089:\n r8.mDimensionRatio = r9;\n r8.mDimensionRatioSide = r1;\n L_0x008d:\n return;\n L_0x008e:\n r8.mDimensionRatio = r0;\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: android.support.constraint.solver.widgets.ConstraintWidget.setDimensionRatio(java.lang.String):void\");\n }",
"public String c()\r\n/* 30: */ {\r\n/* 31:175 */ return \"step.\" + this.a;\r\n/* 32: */ }",
"public final void mo9764A() {\n int i = this.f9080g + this.f9081h;\n this.f9080g = i;\n int i2 = this.f9084k + i;\n int i3 = this.f9085l;\n if (i2 > i3) {\n int i4 = i2 - i3;\n this.f9081h = i4;\n this.f9080g = i - i4;\n return;\n }\n this.f9081h = 0;\n }",
"public abstract Integer mo36210m();",
"String mo30285c(long j);",
"public void mo3749d() {\n }",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"@Test(timeout = 4000)\n public void test29() throws Throwable {\n String string0 = EWrapperMsgGenerator.updateMktDepth(1, 1, 1002, 1002, 2494.84595, (-195));\n assertEquals(\"updateMktDepth: 1 1 1002 1002 2494.84595 -195\", string0);\n }",
"public int mo3384v() {\n return 0;\n }",
"public void mo12628c() {\n }",
"@Override\n protected long advanceH(final long k) {\n return 5 * k - 2;\n }",
"long mo1154d();",
"private int normalizeTime() {\n int currentTimeSeconds = (int) (System.currentTimeMillis() / 1000);\n\n // The graphing interval in minutes\n // TODO not hardcoded :3\n int interval = 30;\n\n // calculate the devisor denominator\n int denom = interval * 60;\n\n return (int) Math.round((currentTimeSeconds - (denom / 2d)) / denom) * denom;\n }",
"public void mo9233aH() {\n }",
"public void mo21797V() {\n this.f24532d.mo21926U();\n }",
"public static void main(String[] args) {\n\t\t\n\t\tint myNumber=356;\n\t\tint stepOne=myNumber*myNumber;\n\t\tint step2=stepOne+myNumber;\n\t\tint step3=step2/myNumber;\n\t\tint step4=step3+17;\n\t\tint step5=step4-myNumber;\n\t\tint step6=step5/6;\n\t\t\n\t\tSystem.out.println(\"The magic number is \"+step6);\n\n\t}",
"public void mo3946e() {\n m25427g();\n }",
"public void uneHeureDePlus() {\n\t\tthis.h = h+1 > 23 ? 0 : h+1 ;\n\t}",
"private void m4823s() {\n float f = this.f6613u;\n if (f > 100.0f || f < 0.0f) {\n throw new IllegalArgumentException(\"Invalid percentage.\");\n }\n float j = (float) m4814j();\n this.f6595c.setY((float) ((int) (j - ((f / 100.0f) * j))));\n }",
"public static int m8651d() {\n return 4;\n }",
"public void mo21877s() {\n }",
"public long mo9746k() {\n return mo9775y();\n }",
"public abstract String division();",
"private long m18337c(long durationUs) {\n return (((long) this.f16625s) * durationUs) / 1000000;\n }",
"@Test\n public void testTakeNumberFromString224() { // FlairImage: 224\n assertEquals(\"From: FlairImage line: 225\", 123, takeNumberFromString(\"123\")); \n assertEquals(\"From: FlairImage line: 226\", 0, takeNumberFromString(\"123a\")); \n assertEquals(\"From: FlairImage line: 227\", -123, takeNumberFromString(\"-123\")); \n assertEquals(\"From: FlairImage line: 228\", 0, takeNumberFromString(\"--123\")); \n assertEquals(\"From: FlairImage line: 229\", 0, takeNumberFromString(\"pz4\")); \n }",
"static int m22556b(zzwt zzwt, cu cuVar) {\n zztw zztw = (zztw) zzwt;\n int d = zztw.mo4835d();\n if (d == -1) {\n d = cuVar.mo3068b(zztw);\n zztw.mo4833a(d);\n }\n return m22576g(d) + d;\n }",
"@Test(timeout = 4000)\n public void test087() throws Throwable {\n String string0 = SQLUtil.normalize(\"Wk-M{)u04i&=ml]M\", false);\n assertEquals(\"Wk - M {) u04i & = ml ] M\", string0);\n }",
"public int getSecondR() {\n/* 48 */ return this.secondR;\n/* */ }",
"static void m14934e(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"public void mo2470d() {\n }",
"public int mo9745j() {\n return mo9774x();\n }",
"static void m14930d(String str) {\n int b = m14929b();\n int d = C3205z0.INFO.mo12550d();\n }",
"public static int m8655e() {\n return 8;\n }",
"@Test(timeout = 4000)\n public void test38() throws Throwable {\n PipedReader pipedReader0 = new PipedReader();\n StreamTokenizer streamTokenizer0 = new StreamTokenizer(pipedReader0);\n streamTokenizer0.nval = 744.4583836715912;\n String string0 = SQLUtil.renderNumber(streamTokenizer0);\n streamTokenizer0.ordinaryChar((-45));\n String string1 = SQLUtil.normalize(\"744.4583836715912\", false);\n assertTrue(string1.equals((Object)string0));\n }",
"private BigInteger divideWords(int w)\n {\n int n = magnitude.length;\n if (w >= n)\n {\n return ZERO;\n }\n int[] mag = new int[n - w];\n System.arraycopy(magnitude, 0, mag, 0, n - w);\n return new BigInteger(sign, mag);\n }",
"private static int m31084a(zzss zzss) {\n int a = zzss.mo32193a(5);\n if (a == 31) {\n return zzss.mo32193a(6) + 32;\n }\n return a;\n }",
"C3676k mo12649b();",
"public void mo4683c() {\n mo4679a(3);\n }",
"@Test(timeout = 4000)\n public void test04() throws Throwable {\n String string0 = SQLUtil.normalize(\"b}v&-;$$:Hw1:\", false);\n assertEquals(\"b } v & - ; $ $ : Hw1 :\", string0);\n }",
"public View mo15792hr() {\n return this.f3879JJ;\n }",
"public void mo21787L() {\n }",
"protected long m8217a(long j) {\n return (j * 1000000) / ((long) this.f7048i);\n }",
"private float m4812h(int i, float f) {\n return (i == 8388613 || i == 3) ? (((float) this.f6612t) - f) - ((float) this.f6595c.getDrawable().getIntrinsicWidth()) : f;\n }",
"public int mo9754s() {\n return mo9774x();\n }"
] | [
"0.58546853",
"0.5818259",
"0.5788476",
"0.56713516",
"0.563428",
"0.5516416",
"0.5501896",
"0.5437793",
"0.5380929",
"0.5366263",
"0.5360178",
"0.5352853",
"0.5338803",
"0.53385514",
"0.5330161",
"0.53296137",
"0.53296137",
"0.5311113",
"0.5300158",
"0.5290541",
"0.5288825",
"0.5275524",
"0.5273336",
"0.5266771",
"0.52584296",
"0.5257901",
"0.52512825",
"0.5250378",
"0.52436",
"0.5220293",
"0.52163756",
"0.5207807",
"0.52029824",
"0.5194398",
"0.5191846",
"0.51771057",
"0.51759833",
"0.5174143",
"0.5164675",
"0.516426",
"0.5162273",
"0.5161622",
"0.5158191",
"0.5154439",
"0.51454824",
"0.5141263",
"0.5139977",
"0.5138078",
"0.5135271",
"0.5133572",
"0.5132402",
"0.5131287",
"0.51283985",
"0.5120978",
"0.5119312",
"0.51187664",
"0.51169306",
"0.5108203",
"0.5107157",
"0.51031405",
"0.5101433",
"0.5101268",
"0.50972027",
"0.5094418",
"0.5087345",
"0.50871634",
"0.5086686",
"0.5082038",
"0.50683445",
"0.5068278",
"0.5063121",
"0.50601083",
"0.5059241",
"0.5052675",
"0.50487125",
"0.50475794",
"0.504692",
"0.504501",
"0.50444555",
"0.50421464",
"0.5038897",
"0.5037618",
"0.5035908",
"0.5030095",
"0.502914",
"0.5028442",
"0.5027294",
"0.5026093",
"0.50254935",
"0.50246465",
"0.5019899",
"0.5017848",
"0.5017065",
"0.5015236",
"0.50137216",
"0.5012829",
"0.5001953",
"0.5000026",
"0.49982643",
"0.49982473",
"0.49934277"
] | 0.0 | -1 |
/ 139: / 140: | public List<ConceptoRetencionSRI> getListaConceptoRetencionSRI()
/* 141: */ {
/* 142:153 */ if (this.listaConceptoRetencionSRI == null) {
/* 143:154 */ cargarConceptoRetencion();
/* 144: */ }
/* 145:156 */ return this.listaConceptoRetencionSRI;
/* 146: */ } | {
"objective": {
"self": [],
"paired": [],
"triplet": [
[
"query",
"document",
"negatives"
]
]
}
} | [
"public void method_4270() {}",
"public void mo12628c() {\n }",
"public int p_()\r\n/* 96: */ {\r\n/* 97:117 */ return 64;\r\n/* 98: */ }",
"public void mo21794S() {\n }",
"public void mo21782G() {\n }",
"private void m50366E() {\n }",
"public void mo21787L() {\n }",
"public int p_()\r\n/* 463: */ {\r\n/* 464:477 */ return 64;\r\n/* 465: */ }",
"public void mo21779D() {\n }",
"public void mo3749d() {\n }",
"public void mo38117a() {\n }",
"public void mo21793R() {\n }",
"public void mo115190b() {\n }",
"public void mo21879u() {\n }",
"int getUnknown13();",
"public void mo23813b() {\n }",
"public void mo12930a() {\n }",
"public void mo21786K() {\n }",
"public void mo21791P() {\n }",
"void mo12637b();",
"public void mo21780E() {\n }",
"public void mo21789N() {\n }",
"public void mo21785J() {\n }",
"public void mo21783H() {\n }",
"public void mo9233aH() {\n }",
"public void mo9137b() {\n }",
"public void mo2740a() {\n }",
"public abstract String mo118046b();",
"public void mo21792Q() {\n }",
"void mo1943l();",
"public void mo21877s() {\n }",
"public int g()\r\n/* 173: */ {\r\n/* 174:198 */ return 0;\r\n/* 175: */ }",
"private void m50367F() {\n }",
"void mo1493c();",
"public void mo21788M() {\n }",
"public abstract int mo8526p();",
"public void mo115188a() {\n }",
"public int mo36g() {\n return 4;\n }",
"public int func_70297_j_()\n/* */ {\n/* 71 */ return 64;\n/* */ }",
"public void mo21795T() {\n }",
"public int mo36g() {\n return 8;\n }",
"protected int mo3987c() {\n return -1;\n }",
"void mo57278c();",
"public void mo56167c() {\n }",
"void mo57277b();",
"public void mo9848a() {\n }",
"public void mo4359a() {\n }",
"public void mo44053a() {\n }",
"void mo12638c();",
"public void mo21878t() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public void mo55254a() {\n }",
"public abstract String mo13682d();",
"void mo3194r();",
"public void mo3376r() {\n }",
"public void mo55254a() {\n }",
"public abstract long mo13681c();",
"public abstract long mo9229aD();",
"public void mo6944a() {\n }",
"public int mo9232aG() {\n return 0;\n }",
"private void kk12() {\n\n\t}",
"public void mo3946e() {\n m25427g();\n }",
"C2841w mo7234g();",
"public abstract CharSequence mo2161g();",
"public void mo97908d() {\n }",
"public void mo21781F() {\n }",
"public void mo21880v() {\n }",
"void mo41086b();",
"public void m23075a() {\n }",
"public int mo36g() {\n return 2;\n }",
"void mo21073d();",
"void mo72114c();",
"void mo72113b();",
"public void mo21784I() {\n }",
"public abstract String mo41079d();",
"public void mo3370l() {\n }",
"protected float j()\r\n/* 67: */ {\r\n/* 68: 80 */ return 1.5F;\r\n/* 69: */ }",
"protected void method_4157() {\r\n super.method_4157();\r\n this.method_4211(class_1840.field_9390).method_390(200.0D);\r\n }",
"void mo41083a();",
"public int method_113() {\r\n return 0;\r\n }",
"public abstract String mo11611b();",
"void mo119582b();",
"void mo17013d();",
"C7904c mo24084a();",
"public int method_209() {\r\n return 0;\r\n }",
"public int g()\r\n/* 601: */ {\r\n/* 602:645 */ return 0;\r\n/* 603: */ }",
"public int method_2436() {\r\n return 16;\r\n }",
"private View m3984P() {\n return mo4729d(this.f3143x ? mo4732e() - 1 : 0);\n }",
"public abstract CharSequence mo2160e();",
"public void mo5097b() {\n }",
"public abstract int mo13680b();",
"public abstract void mo27385c();",
"private void m81850n() {\n m81843b(m81844c(C6969H.m41409d(\"G738BEA12B634AE16F20F9277F0E4D1\")));\n }",
"C5727e mo33224a();",
"public void mo8738a() {\n }",
"public void mo2471e() {\n }"
] | [
"0.633839",
"0.6241569",
"0.6199784",
"0.61575043",
"0.61322534",
"0.61294806",
"0.61204106",
"0.60876596",
"0.6085916",
"0.60714316",
"0.60713196",
"0.60578525",
"0.60490674",
"0.6039862",
"0.6019646",
"0.60193264",
"0.60163754",
"0.60033023",
"0.600243",
"0.5994165",
"0.5992447",
"0.59779435",
"0.59719354",
"0.596129",
"0.5958246",
"0.5915144",
"0.59101427",
"0.5885124",
"0.5876296",
"0.5875664",
"0.586782",
"0.58644813",
"0.5848281",
"0.5843542",
"0.5842209",
"0.5842108",
"0.5834128",
"0.5829267",
"0.58180916",
"0.5816485",
"0.5808018",
"0.5806205",
"0.58030117",
"0.579956",
"0.57974654",
"0.57965094",
"0.5789664",
"0.5788025",
"0.5785781",
"0.57849705",
"0.5782395",
"0.5782395",
"0.5782395",
"0.5782395",
"0.5782395",
"0.5782395",
"0.5782395",
"0.578177",
"0.57741505",
"0.57733566",
"0.57730913",
"0.57711387",
"0.5767821",
"0.5763467",
"0.57524127",
"0.5749637",
"0.57479244",
"0.573451",
"0.5734406",
"0.5733905",
"0.57281417",
"0.57137513",
"0.57119685",
"0.5705022",
"0.5693295",
"0.56902826",
"0.5686886",
"0.56777644",
"0.5677716",
"0.5674611",
"0.56716776",
"0.5671009",
"0.56703794",
"0.56673145",
"0.56652826",
"0.56651735",
"0.56645584",
"0.5659072",
"0.564634",
"0.5645844",
"0.5645631",
"0.56437194",
"0.56405854",
"0.56396836",
"0.5639261",
"0.56366736",
"0.56355995",
"0.56345785",
"0.5633151",
"0.5624483",
"0.5621835"
] | 0.0 | -1 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.